@globalpayments/vega 2.56.0 → 2.57.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-7e482341.js → app-globals-26e2fe1e.js} +9 -9
- package/dist/cjs/{child-nodes-event-prevent-slimmer-29020cc8.js → child-nodes-event-prevent-slimmer-96240a0e.js} +1 -1
- package/dist/cjs/{code-block-e56c5216.js → code-block-7650c868.js} +3 -3
- package/dist/cjs/{component-usage-runtime-metrics-dcb32c24.js → component-usage-runtime-metrics-d10ace87.js} +1 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-9a1285a1.js → component-value-history-controller-slimmer.abstract-a6e4e5bc.js} +3 -3
- package/dist/cjs/{content-state-e07c843c.js → content-state-fd5ad4a8.js} +3 -3
- package/dist/cjs/{create-public-api-runtime-metrics-slimmer-a3d17afb.js → create-public-api-runtime-metrics-slimmer-e2e274e1.js} +1 -1
- package/dist/cjs/{design-token-3e0bd48d.js → design-token-e771bb16.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-2b9ca234.js → element-appender-slimmer-7f98d16b.js} +4 -4
- package/dist/cjs/{feature-flag-controller-5e58aae4.js → feature-flag-controller-ce2162c8.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-dc6d0fe1.js → form-field-controller-slimmer-7bb7df10.js} +4 -4
- package/dist/cjs/{icon-manager-9a47399c.js → icon-manager-9072356d.js} +1 -1
- package/dist/cjs/{image-annotation-action-76e3c89d.js → image-annotation-action-6715d6f3.js} +2 -2
- package/dist/cjs/{index-8b247c17.js → index-4d7bce1a.js} +2 -2
- package/dist/cjs/{index-ebb1bb17.js → index-ee4bc191.js} +2 -2
- package/dist/cjs/index.cjs.js +16 -16
- package/dist/cjs/{inject-keyboard-manager-11df8296.js → inject-keyboard-manager-f1f781b7.js} +1 -1
- package/dist/cjs/{internal-icon-manager-00f49470.js → internal-icon-manager-f8677abb.js} +1 -1
- package/dist/cjs/{keyboard-manager-1843112c.js → keyboard-manager-0be55fb9.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-0a5f5770.js → keyboard-manager-slimmer-92c7227b.js} +1 -1
- package/dist/cjs/loader.cjs.js +14 -14
- package/dist/cjs/{public-rules-1ac67099.js → public-rules-036795a4.js} +6 -6
- package/dist/cjs/{responsive-format-facade-e2e11c24.js → responsive-format-facade-d164ced7.js} +7 -7
- package/dist/cjs/{rich-text-editor-required-rule-63f50aa4.js → rich-text-editor-required-rule-91eb0e22.js} +1 -1
- package/dist/cjs/{state-background-color-formatter-e585a027.js → state-background-color-formatter-c57409ea.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-a5feb2ed.js → string-input-formatter-slimmer-92ab034f.js} +3 -3
- package/dist/cjs/{style-formatter-0213d3a8.js → style-formatter-3e7af35b.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-f68fbf29.js → sub-state-notify-slimmer-409bbd1a.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-e06cdf7e.js → sub-state-observer-slimmer-93d0a609.js} +1 -1
- package/dist/cjs/{translation-e5003a00.js → translation-de7e351e.js} +1 -1
- package/dist/cjs/{translation-slimmer-127a0f83.js → translation-slimmer-83bdb9fe.js} +1 -1
- package/dist/cjs/{type-guard-4ba85fdc.js → type-guard-aa8fdeaf.js} +16 -0
- package/dist/cjs/vega-accordion.cjs.entry.js +16 -16
- package/dist/cjs/vega-app-footer.cjs.entry.js +1 -1
- package/dist/cjs/vega-app-header-button.cjs.entry.js +17 -17
- package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/vega-banner.cjs.entry.js +6 -6
- package/dist/cjs/vega-bar-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-box.cjs.entry.js +16 -16
- package/dist/cjs/vega-brand-logo.cjs.entry.js +4 -4
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
- package/dist/cjs/vega-button-circle.cjs.entry.js +16 -16
- package/dist/cjs/vega-button-group_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
- package/dist/cjs/vega-button.cjs.entry.js +14 -14
- package/dist/cjs/vega-calendar_3.cjs.entry.js +14 -14
- package/dist/cjs/vega-card.cjs.entry.js +15 -15
- package/dist/cjs/vega-carousel.cjs.entry.js +13 -13
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-chip.cjs.entry.js +16 -16
- package/dist/cjs/vega-code-block.cjs.entry.js +15 -15
- package/dist/cjs/vega-color-picker.cjs.entry.js +6 -6
- package/dist/cjs/vega-combo-box.cjs.entry.js +12 -12
- package/dist/cjs/vega-counter-badge.cjs.entry.js +1 -1
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +23 -23
- package/dist/cjs/vega-dialog_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-divider.cjs.entry.js +15 -15
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +20 -20
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
- package/dist/cjs/vega-field-label.cjs.entry.js +1 -1
- package/dist/cjs/vega-file-uploader.cjs.entry.js +9 -9
- package/dist/cjs/vega-flag-icon.cjs.entry.js +16 -16
- package/dist/cjs/vega-flex.cjs.entry.js +16 -16
- package/dist/cjs/vega-font.cjs.entry.js +15 -15
- package/dist/cjs/vega-form.cjs.entry.js +10 -10
- package/dist/cjs/vega-grid.cjs.entry.js +15 -15
- package/dist/cjs/vega-hint.cjs.entry.js +1 -1
- package/dist/cjs/vega-icon.cjs.entry.js +15 -15
- package/dist/cjs/vega-image-uploader.cjs.entry.js +17 -17
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-numeric.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +16 -16
- package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-select.cjs.entry.js +18 -18
- package/dist/cjs/vega-input.cjs.entry.js +10 -10
- package/dist/cjs/{vega-internal-event-id-6cdc95fe.js → vega-internal-event-id-bda08efa.js} +6 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +1 -1
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +18 -18
- package/dist/cjs/vega-line-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination.cjs.entry.js +15 -15
- package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
- package/dist/cjs/vega-popover_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +1 -1
- package/dist/cjs/vega-radio_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +12 -12
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +23 -23
- package/dist/cjs/vega-section-title.cjs.entry.js +1 -1
- package/dist/cjs/vega-segment-control.cjs.entry.js +1 -1
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +17 -17
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +16 -16
- package/dist/cjs/vega-signature-capture.cjs.entry.js +19 -19
- package/dist/cjs/{vega-skeleton-loader-controller-3833c813.js → vega-skeleton-loader-controller-d534f5a1.js} +1 -1
- package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/vega-slot-container.cjs.entry.js +1 -1
- package/dist/cjs/vega-stepper.cjs.entry.js +9 -9
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-table_8.cjs.entry.js +1474 -316
- package/dist/cjs/vega-text.cjs.entry.js +1 -1
- package/dist/cjs/vega-textarea.cjs.entry.js +9 -9
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +20 -20
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -6
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +16 -16
- package/dist/cjs/vega.cjs.js +14 -14
- package/dist/cjs/{wait-for-vega-handler-4491efc9.js → wait-for-vega-handler-5469ff80.js} +1 -1
- package/dist/collection/components/vega-table/slimmers/controllers/dto/column-render-input-model.js +216 -0
- package/dist/collection/components/vega-table/slimmers/controllers/dto/column-structure-model.js +238 -0
- package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.js +83 -0
- package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.js +147 -0
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.js +66 -0
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +171 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-renderer.js +6 -1
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-cell-renderer.js +22 -4
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-col-group-renderer.js +13 -3
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-header-renderer.js +43 -6
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +175 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-renderer.js +7 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +6 -5
- package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.js +41 -0
- package/dist/collection/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-row-state-controller.js +48 -0
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.css +58 -11
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +49 -6
- package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.js +5 -1
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.css +11 -0
- package/dist/collection/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-state-controller.js +15 -0
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +42 -11
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +45 -9
- package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +53 -10
- package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.css +37 -0
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.css +5 -16
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +21 -0
- package/dist/collection/components/vega-table/vega-table.css +22 -0
- package/dist/collection/components/vega-table/vega-table.js +52 -1
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +3 -0
- package/dist/collection/types/type-guard.js +15 -0
- package/dist/esm/{app-globals-b5881948.js → app-globals-366415b3.js} +9 -9
- package/dist/esm/{child-nodes-event-prevent-slimmer-2b975cbf.js → child-nodes-event-prevent-slimmer-b59a578e.js} +1 -1
- package/dist/esm/{code-block-1cdb0599.js → code-block-73869a3c.js} +3 -3
- package/dist/esm/{component-usage-runtime-metrics-385c7124.js → component-usage-runtime-metrics-a84cc93e.js} +1 -1
- package/dist/esm/{component-value-history-controller-slimmer.abstract-c12b2958.js → component-value-history-controller-slimmer.abstract-dfe89c93.js} +3 -3
- package/dist/esm/{content-state-cf27d19b.js → content-state-953906e8.js} +3 -3
- package/dist/esm/{create-public-api-runtime-metrics-slimmer-8ada793f.js → create-public-api-runtime-metrics-slimmer-bedf3a1e.js} +1 -1
- package/dist/esm/{design-token-96e03257.js → design-token-28a0a2e6.js} +3 -3
- package/dist/esm/{element-appender-slimmer-00dcccb9.js → element-appender-slimmer-7b9f4a8e.js} +4 -4
- package/dist/esm/{feature-flag-controller-0fbe8fb0.js → feature-flag-controller-51659753.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-6f49d396.js → form-field-controller-slimmer-707a6da2.js} +4 -4
- package/dist/esm/{icon-manager-638dd4d4.js → icon-manager-2ee1c619.js} +1 -1
- package/dist/esm/{image-annotation-action-e76b3396.js → image-annotation-action-5bfda07c.js} +2 -2
- package/dist/esm/{index-f5d2fe61.js → index-3e551cbe.js} +2 -2
- package/dist/esm/{index-44c794b4.js → index-e9da316f.js} +2 -2
- package/dist/esm/index.js +16 -16
- package/dist/esm/{inject-keyboard-manager-a15cf43c.js → inject-keyboard-manager-5141d09a.js} +1 -1
- package/dist/esm/{internal-icon-manager-58cf8aa6.js → internal-icon-manager-7eac52c8.js} +1 -1
- package/dist/esm/{keyboard-manager-f496a623.js → keyboard-manager-3ffe81b0.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-a4cc9593.js → keyboard-manager-slimmer-751e98f5.js} +1 -1
- package/dist/esm/loader.js +14 -14
- package/dist/esm/{public-rules-e8616346.js → public-rules-c5d2c1e1.js} +6 -6
- package/dist/esm/{responsive-format-facade-464498b6.js → responsive-format-facade-60731164.js} +7 -7
- package/dist/esm/{rich-text-editor-required-rule-69844536.js → rich-text-editor-required-rule-4429066e.js} +1 -1
- package/dist/esm/{state-background-color-formatter-121ae7d3.js → state-background-color-formatter-da5e76e8.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-e53b6412.js → string-input-formatter-slimmer-6ab5cad6.js} +3 -3
- package/dist/esm/{style-formatter-670e20f7.js → style-formatter-57fc600a.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-b6c8051c.js → sub-state-notify-slimmer-1c4d1e78.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-93eeb87d.js → sub-state-observer-slimmer-1e9af9ec.js} +1 -1
- package/dist/esm/{translation-71e0711d.js → translation-a6eacb5f.js} +1 -1
- package/dist/esm/{translation-slimmer-e6b130bf.js → translation-slimmer-f28e4708.js} +1 -1
- package/dist/esm/{type-guard-158f6d7a.js → type-guard-84b1f192.js} +16 -1
- package/dist/esm/vega-accordion.entry.js +16 -16
- package/dist/esm/vega-app-footer.entry.js +1 -1
- package/dist/esm/vega-app-header-button.entry.js +17 -17
- package/dist/esm/vega-backdrop.entry.js +1 -1
- package/dist/esm/vega-banner.entry.js +6 -6
- package/dist/esm/vega-bar-chart.entry.js +1 -1
- package/dist/esm/vega-box.entry.js +16 -16
- package/dist/esm/vega-brand-logo.entry.js +4 -4
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +16 -16
- package/dist/esm/vega-button-group_2.entry.js +7 -7
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +14 -14
- package/dist/esm/vega-calendar_3.entry.js +14 -14
- package/dist/esm/vega-card.entry.js +15 -15
- package/dist/esm/vega-carousel.entry.js +13 -13
- package/dist/esm/vega-checkbox_2.entry.js +9 -9
- package/dist/esm/vega-chip.entry.js +16 -16
- package/dist/esm/vega-code-block.entry.js +15 -15
- package/dist/esm/vega-color-picker.entry.js +6 -6
- package/dist/esm/vega-combo-box.entry.js +12 -12
- package/dist/esm/vega-counter-badge.entry.js +1 -1
- package/dist/esm/vega-date-picker_2.entry.js +23 -23
- package/dist/esm/vega-dialog_2.entry.js +16 -16
- package/dist/esm/vega-divider.entry.js +15 -15
- package/dist/esm/vega-dropdown_5.entry.js +20 -20
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +1 -1
- package/dist/esm/vega-field-label.entry.js +1 -1
- package/dist/esm/vega-file-uploader.entry.js +9 -9
- package/dist/esm/vega-flag-icon.entry.js +16 -16
- package/dist/esm/vega-flex.entry.js +16 -16
- package/dist/esm/vega-font.entry.js +15 -15
- package/dist/esm/vega-form.entry.js +10 -10
- package/dist/esm/vega-grid.entry.js +15 -15
- package/dist/esm/vega-hint.entry.js +1 -1
- package/dist/esm/vega-icon.entry.js +15 -15
- package/dist/esm/vega-image-uploader.entry.js +17 -17
- package/dist/esm/vega-input-credit-card.entry.js +11 -11
- package/dist/esm/vega-input-numeric.entry.js +13 -13
- package/dist/esm/vega-input-phone-number.entry.js +16 -16
- package/dist/esm/vega-input-range.entry.js +10 -10
- package/dist/esm/vega-input-select.entry.js +18 -18
- package/dist/esm/vega-input.entry.js +10 -10
- package/dist/esm/{vega-internal-event-id-178b2743.js → vega-internal-event-id-f0ea2bab.js} +4 -1
- package/dist/esm/vega-item-toggle.entry.js +1 -1
- package/dist/esm/vega-left-nav_5.entry.js +18 -18
- package/dist/esm/vega-line-chart.entry.js +1 -1
- package/dist/esm/vega-loader-wrapper_2.entry.js +13 -13
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination.entry.js +15 -15
- package/dist/esm/vega-pie-chart.entry.js +1 -1
- package/dist/esm/vega-popover_2.entry.js +16 -16
- package/dist/esm/vega-progress-tracker.entry.js +1 -1
- package/dist/esm/vega-radio_2.entry.js +12 -12
- package/dist/esm/vega-rich-text-content.entry.js +12 -12
- package/dist/esm/vega-rich-text-editor_4.entry.js +23 -23
- package/dist/esm/vega-section-title.entry.js +1 -1
- package/dist/esm/vega-segment-control.entry.js +1 -1
- package/dist/esm/vega-selection-chip_2.entry.js +17 -17
- package/dist/esm/vega-selection-tile_2.entry.js +10 -10
- package/dist/esm/vega-sidenav_3.entry.js +16 -16
- package/dist/esm/vega-signature-capture.entry.js +19 -19
- package/dist/esm/{vega-skeleton-loader-controller-9d1ffa6c.js → vega-skeleton-loader-controller-3f6faa17.js} +1 -1
- package/dist/esm/vega-skeleton.entry.js +1 -1
- package/dist/esm/vega-slot-container.entry.js +1 -1
- package/dist/esm/vega-stepper.entry.js +9 -9
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_8.entry.js +1475 -317
- package/dist/esm/vega-text.entry.js +1 -1
- package/dist/esm/vega-textarea.entry.js +9 -9
- package/dist/esm/vega-time-picker_2.entry.js +20 -20
- package/dist/esm/vega-toggle-switch.entry.js +6 -6
- package/dist/esm/vega-tooltip_2.entry.js +16 -16
- package/dist/esm/vega.js +14 -14
- package/dist/esm/{wait-for-vega-handler-e0a928cd.js → wait-for-vega-handler-c2c07ac3.js} +1 -1
- package/dist/types/components/vega-table/interface.d.ts +31 -0
- package/dist/types/components/vega-table/slimmers/controllers/dto/column-render-input-model.d.ts +138 -0
- package/dist/types/components/vega-table/slimmers/controllers/dto/column-structure-model.d.ts +140 -0
- package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.d.ts +35 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +103 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-cell-renderer.d.ts +5 -2
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-col-group-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-header-renderer.d.ts +4 -1
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +18 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-row-renderer.d.ts +1 -1
- package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-cell-state-controller.d.ts +4 -0
- package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-row-state-controller.d.ts +15 -0
- package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +10 -0
- package/dist/types/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-state-controller.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +8 -1
- package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +5 -0
- package/dist/types/components/vega-table/vega-table.d.ts +17 -1
- package/dist/types/components.d.ts +21 -1
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +3 -0
- package/dist/types/types/components.type.d.ts +2 -0
- package/dist/types/types/type-guard.d.ts +10 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-397c7199.js → p-007bf7df.js} +1 -1
- package/dist/vega/{p-03c759ae.entry.js → p-0496f1cb.entry.js} +1 -1
- package/dist/vega/{p-1ebc1acf.entry.js → p-0604563a.entry.js} +1 -1
- package/dist/vega/{p-08a0cbd0.entry.js → p-07927476.entry.js} +1 -1
- package/dist/vega/{p-f50cd6c3.entry.js → p-0b77c6c9.entry.js} +1 -1
- package/dist/vega/{p-7e70938a.entry.js → p-1792a352.entry.js} +1 -1
- package/dist/vega/{p-7cc20ed5.entry.js → p-1c4d05de.entry.js} +1 -1
- package/dist/vega/{p-6b8d105e.entry.js → p-1e3f4007.entry.js} +1 -1
- package/dist/vega/{p-1737536e.entry.js → p-21a7530c.entry.js} +1 -1
- package/dist/vega/{p-ae74d511.js → p-2458ad97.js} +1 -1
- package/dist/vega/{p-0c660956.entry.js → p-27dca371.entry.js} +1 -1
- package/dist/vega/{p-3162a3f0.entry.js → p-2873b600.entry.js} +1 -1
- package/dist/vega/{p-e2282f71.entry.js → p-29f4cbed.entry.js} +1 -1
- package/dist/vega/{p-c5afd9aa.entry.js → p-2ebef70f.entry.js} +1 -1
- package/dist/vega/{p-578ac47f.entry.js → p-311f338d.entry.js} +1 -1
- package/dist/vega/p-34643550.entry.js +1 -0
- package/dist/vega/{p-5016b57e.entry.js → p-34dc3f71.entry.js} +1 -1
- package/dist/vega/{p-5cb92c51.entry.js → p-39049341.entry.js} +1 -1
- package/dist/vega/{p-a2c4c241.entry.js → p-397b5d91.entry.js} +1 -1
- package/dist/vega/{p-61e1e356.entry.js → p-3a7e897b.entry.js} +1 -1
- package/dist/vega/{p-06cd4a19.entry.js → p-41465ad0.entry.js} +1 -1
- package/dist/vega/{p-002062c3.entry.js → p-44880bdf.entry.js} +1 -1
- package/dist/vega/{p-7a8b6f2f.entry.js → p-4674c318.entry.js} +1 -1
- package/dist/vega/{p-e5eda663.entry.js → p-47e89c0e.entry.js} +1 -1
- package/dist/vega/p-49fd1009.js +1 -0
- package/dist/vega/{p-6bd7114d.entry.js → p-4c871d0f.entry.js} +1 -1
- package/dist/vega/{p-8e31e7ea.js → p-4f5eb8d5.js} +1 -1
- package/dist/vega/{p-72a4edf2.entry.js → p-500684e1.entry.js} +1 -1
- package/dist/vega/p-51297b96.js +1 -0
- package/dist/vega/{p-bbdc6170.entry.js → p-5130bb06.entry.js} +1 -1
- package/dist/vega/{p-4c595d8d.entry.js → p-51a4dc20.entry.js} +1 -1
- package/dist/vega/p-53e9595f.js +1 -0
- package/dist/vega/{p-bba5b112.entry.js → p-59282fc8.entry.js} +1 -1
- package/dist/vega/{p-fa5eb496.js → p-5d676a94.js} +1 -1
- package/dist/vega/{p-46eb330f.entry.js → p-5dec9bd9.entry.js} +1 -1
- package/dist/vega/{p-b1f65b13.js → p-5e2c9e69.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-e860318d.entry.js → p-5f6b942c.entry.js} +1 -1
- package/dist/vega/{p-b6e0d996.entry.js → p-6131f229.entry.js} +1 -1
- package/dist/vega/p-65d8c2bc.js +1 -0
- package/dist/vega/{p-6419abd9.entry.js → p-66e9d31a.entry.js} +1 -1
- package/dist/vega/{p-dc383362.entry.js → p-6acf0a51.entry.js} +1 -1
- package/dist/vega/{p-7503fe08.entry.js → p-6dad2e5c.entry.js} +1 -1
- package/dist/vega/{p-da1d0c02.js → p-6e1b5949.js} +1 -1
- package/dist/vega/{p-636142ae.entry.js → p-6ec338b0.entry.js} +1 -1
- package/dist/vega/{p-246090cf.entry.js → p-75ff12da.entry.js} +1 -1
- package/dist/vega/{p-144d2390.entry.js → p-766ed063.entry.js} +1 -1
- package/dist/vega/{p-78937642.entry.js → p-76818196.entry.js} +1 -1
- package/dist/vega/p-79a0a06c.js +1 -0
- package/dist/vega/p-79c2282c.entry.js +1 -0
- package/dist/vega/p-7c0004dc.entry.js +1 -0
- package/dist/vega/{p-0ce88865.entry.js → p-7c348ac7.entry.js} +1 -1
- package/dist/vega/{p-fc790de5.entry.js → p-7d5ebd26.entry.js} +1 -1
- package/dist/vega/p-81ed90d5.js +1 -0
- package/dist/vega/{p-c685adcd.js → p-8246f8ae.js} +1 -1
- package/dist/vega/{p-aab6f547.entry.js → p-82b18195.entry.js} +1 -1
- package/dist/vega/{p-cc6410e6.js → p-832b59af.js} +1 -1
- package/dist/vega/{p-5c9efff8.entry.js → p-86a300e8.entry.js} +1 -1
- package/dist/vega/{p-576b812b.entry.js → p-888dc143.entry.js} +1 -1
- package/dist/vega/{p-b3da0b44.entry.js → p-8ba8a7cc.entry.js} +1 -1
- package/dist/vega/{p-cc63e827.js → p-8c46e116.js} +1 -1
- package/dist/vega/{p-6ec0e3ce.entry.js → p-8e581755.entry.js} +1 -1
- package/dist/vega/{p-a46ac2eb.js → p-8e662f26.js} +1 -1
- package/dist/vega/{p-fac5990f.entry.js → p-8fb5bcb0.entry.js} +1 -1
- package/dist/vega/{p-04c8b83d.entry.js → p-9481c073.entry.js} +1 -1
- package/dist/vega/{p-1a7d0e21.entry.js → p-99c4559e.entry.js} +1 -1
- package/dist/vega/{p-4ab3df00.js → p-9d6003ef.js} +1 -1
- package/dist/vega/{p-f3ec4ae6.entry.js → p-a1e50e6c.entry.js} +1 -1
- package/dist/vega/{p-302e01e9.entry.js → p-a2ef3429.entry.js} +1 -1
- package/dist/vega/p-a33c6652.entry.js +1 -0
- package/dist/vega/p-a4670e23.js +1 -0
- package/dist/vega/{p-487c0f17.entry.js → p-a92a8172.entry.js} +1 -1
- package/dist/vega/{p-4b2a90b8.js → p-aed3320d.js} +1 -1
- package/dist/vega/{p-7728041e.entry.js → p-b449fe9a.entry.js} +1 -1
- package/dist/vega/{p-81e56716.entry.js → p-b44ebc84.entry.js} +2 -2
- package/dist/vega/{p-5e530257.js → p-b8d7d4a9.js} +1 -1
- package/dist/vega/{p-d5f1794e.js → p-bcdb235d.js} +1 -1
- package/dist/vega/{p-36827489.entry.js → p-bd84b7b9.entry.js} +1 -1
- package/dist/vega/p-bdaf1143.entry.js +1 -0
- package/dist/vega/{p-ac3a2d9c.entry.js → p-c42ec0ac.entry.js} +1 -1
- package/dist/vega/{p-1c3e1134.js → p-cd3d468c.js} +1 -1
- package/dist/vega/{p-d8e1ed2d.js → p-ce14af16.js} +1 -1
- package/dist/vega/{p-2a6517f9.entry.js → p-d5ab867e.entry.js} +1 -1
- package/dist/vega/{p-6b7dca3e.js → p-d789b291.js} +1 -1
- package/dist/vega/{p-9a9766cc.entry.js → p-d82ceacf.entry.js} +1 -1
- package/dist/vega/p-d849e0f5.js +1 -0
- package/dist/vega/{p-7a40e033.js → p-db8cdba6.js} +1 -1
- package/dist/vega/{p-586139ce.entry.js → p-dc16e6ba.entry.js} +1 -1
- package/dist/vega/{p-c9f544bd.entry.js → p-e277ea73.entry.js} +1 -1
- package/dist/vega/{p-5f86a286.entry.js → p-e28fcf04.entry.js} +1 -1
- package/dist/vega/{p-c0043eed.entry.js → p-e32efc2e.entry.js} +1 -1
- package/dist/vega/{p-5be150cb.entry.js → p-e5196440.entry.js} +1 -1
- package/dist/vega/{p-4d793cb0.js → p-e77a83e4.js} +1 -1
- package/dist/vega/{p-c990e249.js → p-e940bc37.js} +1 -1
- package/dist/vega/{p-138fcf6e.js → p-ecd032fc.js} +1 -1
- package/dist/vega/{p-c9b9322b.js → p-f08a4adf.js} +1 -1
- package/dist/vega/{p-151dec6a.entry.js → p-f3bd26a1.entry.js} +1 -1
- package/dist/vega/p-f3f7d059.entry.js +1 -0
- package/dist/vega/{p-59f1fd3e.entry.js → p-f4546425.entry.js} +1 -1
- package/dist/vega/{p-ec7dc51f.entry.js → p-f4a7acff.entry.js} +1 -1
- package/dist/vega/{p-a42bc438.entry.js → p-f79c82c7.entry.js} +1 -1
- package/dist/vega/{p-4df90a1b.entry.js → p-f8e0e4f0.entry.js} +1 -1
- package/dist/vega/p-f8f8e7d2.entry.js +1 -0
- package/dist/vega/{p-73821eba.entry.js → p-f940b7f7.entry.js} +1 -1
- package/dist/vega/{p-66516ee9.js → p-fb8c99c5.js} +1 -1
- package/dist/vega/{p-778fd499.js → p-fcb04960.js} +1 -1
- package/dist/vega/{p-dc3d93d6.js → p-fd2f699b.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/vega/p-063d0bee.entry.js +0 -1
- package/dist/vega/p-2205ee4c.js +0 -1
- package/dist/vega/p-23064067.entry.js +0 -1
- package/dist/vega/p-2f6c4f2c.entry.js +0 -1
- package/dist/vega/p-37b05e0b.js +0 -1
- package/dist/vega/p-425ba7d6.js +0 -1
- package/dist/vega/p-4387d550.js +0 -1
- package/dist/vega/p-4a12fb0d.entry.js +0 -1
- package/dist/vega/p-68864531.js +0 -1
- package/dist/vega/p-6a7b7214.js +0 -1
- package/dist/vega/p-7cb11f3f.entry.js +0 -1
- package/dist/vega/p-962b40d1.entry.js +0 -1
- package/dist/vega/p-9d286c08.entry.js +0 -1
- package/dist/vega/p-d64b20c2.js +0 -1
- package/dist/vega/p-f4a13f3f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as n,g as a}from"./p-21d26bb4.js";import{I as r}from"./p-abd7aeaa.js";import{M as s,a as o}from"./p-4e68dfd9.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as h}from"./p-280cbcdb.js";import{s as d}from"./p-519a7d55.js";import{c as u}from"./p-86194314.js";import{C as c}from"./p-75b58efe.js";import{c as f,V as x,M as g,I as m}from"./p-6e1ab235.js";import{s as v}from"./p-6bd5c49b.js";import{V as b,I as w}from"./p-4387d550.js";import{F as y}from"./p-da1d0c02.js";import{c as j}from"./p-012cbd8f.js";import{f as I,A as C,B as z,s as k}from"./p-6e01f0a2.js";import{b as S}from"./p-5773a9a3.js";import{C as R}from"./p-2d0d575f.js";import{S as N,a as T,b as E}from"./p-5e530257.js";import{i as A}from"./p-b1f65b13.js";import{D as O}from"./p-e7b00bf0.js";import{P as D}from"./p-7d9cd9c8.js";import{S as F}from"./p-138fcf6e.js";import{i as V}from"./p-d27ae9ff.js";import{d as $}from"./p-47a4c625.js";import"./p-262ec334.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-d5776087.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-425ba7d6.js";import"./p-4ab3df00.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-613ee009.js";import"./p-b75ee3ba.js";import"./p-f4a13f3f.js";import"./p-fa5eb496.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";const L=/^(?:[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 M extends r{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=L.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 P extends x{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);r>3&&s&&Object.defineProperty(e,i,s)}([f()],P.prototype,"disableCopyPaste",void 0);var _=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class B extends x{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"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}_([f()],B.prototype,"host",void 0),_([f()],B.prototype,"prefixIcon",void 0);class U extends N{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),a=i.substring(0,e),r=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-r)}}class W extends N{constructor(t){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.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(A(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 K extends N{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(A(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class q extends W{constructor(t){super(t)}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),a=t.substring(0,e),r=n.substring(0,e),s=(a.match(/,/g)||[]).length;return e+((r.match(/,/g)||[]).length-s)-(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):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var G=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class H extends T{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRef,this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}setupStringFormatter(t){this.inputRef=t,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.PHONE_MASK;break;case"taxId":i=E.TAX_ID_MASK;break;case"zipcode":i=E.ZIPCODE_MASK;break;case"thousand-comma":i=new U;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=new E(e.options);break;case"custom-formatter":i=new K(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new W),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new q(t):new W(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}}G([f()],H.prototype,"maskConfig",void 0),G([f()],H.prototype,"disableCopyPaste",void 0),G([f()],H.prototype,"type",void 0);const J=[{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 Q=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class X extends x{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}}Q([f()],X.prototype,"host",void 0),Q([f()],X.prototype,"value",void 0),Q([f()],X.prototype,"placeholder",void 0),Q([f()],X.prototype,"isCompactInputWidth",void 0),Q([f()],X.prototype,"suffixText",void 0),Q([g("componentDidLoad")],X.prototype,"componentDidLoad",null),Q([g("watchValue")],X.prototype,"watchValue",null),Q([g("watchSuffixText")],X.prototype,"watchSuffixText",null);var Y=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Z extends F{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}Y([f()],Z.prototype,"host",void 0),Y([f({writable:!0})],Z.prototype,"prefixText",void 0),Y([f({writable:!0})],Z.prototype,"suffixText",void 0),Y([f({writable:!0})],Z.prototype,"isCompactInputWidth",void 0);var tt=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const et=class{constructor(n){e(this,n),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",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.globalSlimmers={},this.formFieldController=new y({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new h:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new o({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new M:null},{propertyName:"type",ruleFactory:t=>"email"===t?new M:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.pageResizeObserverSlimmer=new D({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new P,this.compactWidthController=new X,this.stateController=new Z,this.maskConfigController=new H,this.prefixSlotRenderer=new B,this.changeEventEmitter=j(et,I),this.focusEventEmitter=j(et,C),this.blurEventEmitter=j(et,z),this.labelButtonClickEventEmitter=j(et,k),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(J),this.label="",this.labelSuffixButtonProps=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!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,this.focusInput=()=>{this.inputRef.focus()},this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.maskConfigController.setupStringFormatter(t))},this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.onClickClearIcon=()=>{this.value=""},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onInputHandler=t=>{"change"!==this.valueUpdateTrigger&&(this.value=t.target.value)},this.inputChangeHandler=t=>{"change"===this.valueUpdateTrigger&&(this.value=t.target.value)},this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}watchSuffixText(){}watchValue(t){this.changeEventEmitter.emit(t),this.inputRef.value!==this.value&&(this.inputRef.value=this.value),R.notify(S,{host:this.host,detail:this.value})}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.maskConfigController.setupStringFormatter(this.inputRef)}watchValidationRules(){}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.maskConfigController.setupStringFormatter(this.inputRef)}async doFocus(){this.focusInput()}async doBlur(){this.inputRef.blur()}render(){return v(t("slot",null)),d(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.groupDom()),this.host)}containerDom(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:"number"===this.type?"text":this.type,autoComplete:this.autocomplete,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler},this.copyPasteController.getCopyPasteProps())))}groupDom(){let e="vega-input-container";return this.value&&(e+=" with-value"),e+="small"===this.size?" vega-input-size-small":" vega-input-size-default",e+=this.disabled?" vega-input-disabled":"",this.isCompactInputWidth&&(e+=" compact-input-width"),t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:e,onClick:this.focusInput,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:u()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.containerDom(),this.renderSuffixText(),this.showClearIcon&&this.renderClearIcon()),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{onClick:this.focusInput,"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,ref:t=>{O.addUniqueObserverToNode(t,k,this.handleLabelButtonClick)}})}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:u(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return V(i,n,!0,((t,e)=>$(t,e)?0:-1))}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};tt([w()],et.prototype,"globalSlimmers",void 0),tt([m()],et.prototype,"formFieldController",void 0),tt([m()],et.prototype,"pageResizeObserverSlimmer",void 0),tt([m()],et.prototype,"copyPasteController",void 0),tt([m()],et.prototype,"compactWidthController",void 0),tt([m()],et.prototype,"stateController",void 0),tt([m()],et.prototype,"maskConfigController",void 0),tt([m()],et.prototype,"prefixSlotRenderer",void 0),tt([m()],et.prototype,"changeEventEmitter",void 0),tt([m()],et.prototype,"focusEventEmitter",void 0),tt([m()],et.prototype,"blurEventEmitter",void 0),tt([m()],et.prototype,"labelButtonClickEventEmitter",void 0),tt([m()],et.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),tt([c()],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}.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}}';export{et as vega_input}
|
|
1
|
+
import{h as t,r as e,c as i,H as n,g as a}from"./p-21d26bb4.js";import{I as r}from"./p-abd7aeaa.js";import{M as s,a as o}from"./p-4e68dfd9.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as h}from"./p-280cbcdb.js";import{s as d}from"./p-519a7d55.js";import{c as u}from"./p-86194314.js";import{C as c}from"./p-75b58efe.js";import{c as f,V as x,M as g,I as m}from"./p-6e1ab235.js";import{s as v}from"./p-6bd5c49b.js";import{V as b,I as w}from"./p-d849e0f5.js";import{F as y}from"./p-6e1b5949.js";import{c as j}from"./p-012cbd8f.js";import{f as I,A as C,B as z,s as k}from"./p-6e01f0a2.js";import{b as S}from"./p-5773a9a3.js";import{C as R}from"./p-2d0d575f.js";import{S as N,a as T,b as E}from"./p-b8d7d4a9.js";import{i as A}from"./p-5e2c9e69.js";import{D as O}from"./p-e7b00bf0.js";import{P as D}from"./p-7d9cd9c8.js";import{S as F}from"./p-ecd032fc.js";import{i as V}from"./p-d27ae9ff.js";import{d as $}from"./p-47a4c625.js";import"./p-262ec334.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-d5776087.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-65d8c2bc.js";import"./p-9d6003ef.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-613ee009.js";import"./p-b75ee3ba.js";import"./p-51297b96.js";import"./p-5d676a94.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";const L=/^(?:[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 M extends r{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=L.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 P extends x{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);r>3&&s&&Object.defineProperty(e,i,s)}([f()],P.prototype,"disableCopyPaste",void 0);var _=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class B extends x{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"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}_([f()],B.prototype,"host",void 0),_([f()],B.prototype,"prefixIcon",void 0);class U extends N{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),a=i.substring(0,e),r=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-r)}}class W extends N{constructor(t){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.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(A(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 K extends N{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(A(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class q extends W{constructor(t){super(t)}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),a=t.substring(0,e),r=n.substring(0,e),s=(a.match(/,/g)||[]).length;return e+((r.match(/,/g)||[]).length-s)-(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):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var G=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class H extends T{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRef,this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}setupStringFormatter(t){this.inputRef=t,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.PHONE_MASK;break;case"taxId":i=E.TAX_ID_MASK;break;case"zipcode":i=E.ZIPCODE_MASK;break;case"thousand-comma":i=new U;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=new E(e.options);break;case"custom-formatter":i=new K(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new W),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new q(t):new W(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}}G([f()],H.prototype,"maskConfig",void 0),G([f()],H.prototype,"disableCopyPaste",void 0),G([f()],H.prototype,"type",void 0);const J=[{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 Q=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class X extends x{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}}Q([f()],X.prototype,"host",void 0),Q([f()],X.prototype,"value",void 0),Q([f()],X.prototype,"placeholder",void 0),Q([f()],X.prototype,"isCompactInputWidth",void 0),Q([f()],X.prototype,"suffixText",void 0),Q([g("componentDidLoad")],X.prototype,"componentDidLoad",null),Q([g("watchValue")],X.prototype,"watchValue",null),Q([g("watchSuffixText")],X.prototype,"watchSuffixText",null);var Y=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Z extends F{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}Y([f()],Z.prototype,"host",void 0),Y([f({writable:!0})],Z.prototype,"prefixText",void 0),Y([f({writable:!0})],Z.prototype,"suffixText",void 0),Y([f({writable:!0})],Z.prototype,"isCompactInputWidth",void 0);var tt=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const et=class{constructor(n){e(this,n),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",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.globalSlimmers={},this.formFieldController=new y({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new h:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new o({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new M:null},{propertyName:"type",ruleFactory:t=>"email"===t?new M:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.pageResizeObserverSlimmer=new D({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new P,this.compactWidthController=new X,this.stateController=new Z,this.maskConfigController=new H,this.prefixSlotRenderer=new B,this.changeEventEmitter=j(et,I),this.focusEventEmitter=j(et,C),this.blurEventEmitter=j(et,z),this.labelButtonClickEventEmitter=j(et,k),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(J),this.label="",this.labelSuffixButtonProps=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!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,this.focusInput=()=>{this.inputRef.focus()},this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.maskConfigController.setupStringFormatter(t))},this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.onClickClearIcon=()=>{this.value=""},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onClearInputFocus=()=>{this.inputContainerRef.classList.add("no-focus")},this.onClearInputBlur=()=>{this.inputContainerRef.classList.remove("no-focus")},this.onInputHandler=t=>{"change"!==this.valueUpdateTrigger&&(this.value=t.target.value)},this.inputChangeHandler=t=>{"change"===this.valueUpdateTrigger&&(this.value=t.target.value)},this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}watchSuffixText(){}watchValue(t){this.changeEventEmitter.emit(t),this.inputRef.value!==this.value&&(this.inputRef.value=this.value),R.notify(S,{host:this.host,detail:this.value})}watchTypeChange(t,e){"number"!==t&&"number"!==e||this.maskConfigController.setupStringFormatter(this.inputRef)}watchValidationRules(){}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.maskConfigController.setupStringFormatter(this.inputRef)}async doFocus(){this.focusInput()}async doBlur(){this.inputRef.blur()}render(){return v(t("slot",null)),d(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.groupDom()),this.host)}containerDom(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:"number"===this.type?"text":this.type,autoComplete:this.autocomplete,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler},this.copyPasteController.getCopyPasteProps())))}groupDom(){let e="vega-input-container";return this.value&&(e+=" with-value"),e+="small"===this.size?" vega-input-size-small":" vega-input-size-default",e+=this.disabled?" vega-input-disabled":"",this.isCompactInputWidth&&(e+=" compact-input-width"),t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:e,onClick:this.focusInput,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:u()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.containerDom(),this.renderSuffixText(),this.showClearIcon&&this.renderClearIcon()),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{onClick:this.focusInput,"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,ref:t=>{O.addUniqueObserverToNode(t,k,this.handleLabelButtonClick)}})}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:u(),onFocusin:this.onClearInputFocus,onFocusout:this.onClearInputBlur},t("vega-icon",{icon:"close"}))}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return V(i,n,!0,((t,e)=>$(t,e)?0:-1))}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],type:["watchTypeChange"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};tt([w()],et.prototype,"globalSlimmers",void 0),tt([m()],et.prototype,"formFieldController",void 0),tt([m()],et.prototype,"pageResizeObserverSlimmer",void 0),tt([m()],et.prototype,"copyPasteController",void 0),tt([m()],et.prototype,"compactWidthController",void 0),tt([m()],et.prototype,"stateController",void 0),tt([m()],et.prototype,"maskConfigController",void 0),tt([m()],et.prototype,"prefixSlotRenderer",void 0),tt([m()],et.prototype,"changeEventEmitter",void 0),tt([m()],et.prototype,"focusEventEmitter",void 0),tt([m()],et.prototype,"blurEventEmitter",void 0),tt([m()],et.prototype,"labelButtonClickEventEmitter",void 0),tt([m()],et.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),tt([c()],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}.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}}';export{et as vega_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o}from"./p-5e2c9e69.js";import{R as f}from"./p-fb8c99c5.js";function i(i,r,e,s){return o(i)?{flex:`${f.formatCustom(i)}`}:{flexGrow:o(r)?`${f.formatCustom(r)}`:void 0,flexShrink:o(e)?`${f.formatCustom(e)}`:void 0,flexBasis:o(s)?`${f.formatCustom(s)}`:void 0}}export{i as f}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as r,g as o}from"./p-21d26bb4.js";import{R as s}from"./p-280cbcdb.js";import{c as a}from"./p-86194314.js";import{s as n}from"./p-519a7d55.js";import{a as l,h as p,b as h}from"./p-d5776087.js";import{F as d}from"./p-6e1b5949.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-d849e0f5.js";import{b as g}from"./p-5773a9a3.js";import{c as x}from"./p-012cbd8f.js";import{C as b}from"./p-2d0d575f.js";import{f as v}from"./p-6e01f0a2.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-65d8c2bc.js";import"./p-9d6003ef.js";import"./p-7d9cd9c8.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-e7b00bf0.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-ecd032fc.js";import"./p-613ee009.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,r){var o,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const y=class{constructor(r){e(this,r),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.globalSlimmers={},this.formFieldController=new d({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.colorPickerContainerRef,touchableAreaGetter:()=>[this.colorPickerTouchableAreaRef]}),this.changeEventEmitter=x(y,v),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(u),this.value="",this.hint="",this.disabled=!1,this.required=!1,this.label="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.isInline=!1,this.renderColorPickerContainer=()=>i("div",{class:l([this.isInline?null:"color-picker-inline"]),ref:e=>this.colorPickerContainerRef=e},i("vega-flex",{direction:"row",gap:"size-8",alignItems:"center"},this.colors.map((e=>{const t=this.value===e;return i("div",{id:e,class:{"color-picker-inline-items":!0,selected:t},ref:e=>this.colorPickerTouchableAreaRef=e,style:{backgroundColor:e},onClick:this.updateValueProp,role:"button",tabIndex:0,"aria-label":"color",onKeyDown:a()},t?i("vega-icon",{icon:"checkmark",size:"size-16",class:{"v-text-black":this.isDarkColorCheckmark(this.value),"v-text-white":!this.isDarkColorCheckmark(this.value)}}):null)})))),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.updateValueProp=async e=>{this.disabled||(this.value=String(e.currentTarget.getAttribute("id")))}}watchValue(){this.resetValueIfInvalid(),this.changeEventEmitter.emit(this.value),b.notify(g,{host:this.host,detail:this.value})}watchValidationRules(){}connectedCallback(){this.resetValueIfInvalid()}render(){return n(i(r,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderColorPickerContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}isDarkColorCheckmark(e,t="#fcfcfc",i="#203645"){const r=this.getLuminance(e),o=this.getLuminance(t),s=this.getLuminance(i);return r>Math.sqrt((o+.05)*(s+.05))-.05}getLuminance(e){const t=[p(e).r/255,p(e).g/255,p(e).b/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]}resetValueIfInvalid(){this.colors.some((e=>h(e).toUpperCase()==h(this.value).toUpperCase()))||(this.value="")}get host(){return o(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([f()],y.prototype,"globalSlimmers",void 0),w([c()],y.prototype,"formFieldController",void 0),w([c()],y.prototype,"changeEventEmitter",void 0),w([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host(.disabled) .color-picker-inline{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))}:host(.disabled) .color-picker-inline-items:hover{box-shadow:none}:host(.disabled) .color-picker-inline-items:focus-within{box-shadow:none}:host .color-picker-inline{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding:12px;max-width:max-content}:host .color-picker-inline-items{display:flex;border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1));border-radius:4px;width:24px;height:24px;cursor:pointer;align-items:center;justify-content:center}:host .color-picker-inline-items.selected{border-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1))}:host .color-picker-inline-items:hover{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host .color-picker-inline-items:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));box-shadow:0px 0px 0px 1px rgba(var(--v-bg-primary, 252, 252, 252, 1)) inset;border:1px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host .checkmark-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .checkmark-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host vega-text{padding-left:8px;padding-right:8px;padding-top:4px;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){:host vega-text{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){:host vega-text{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){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;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))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .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){:host .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){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .color-picker-inline.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-hidden{display:none}:host vega-flex{flex-wrap:wrap;max-width:264px}';export{y as vega_color_picker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-21d26bb4.js";import{R as n}from"./p-280cbcdb.js";import{g as s,s as d}from"./p-519a7d55.js";import{N as p,O as l}from"./p-5e2c9e69.js";import{c,M as h,V as b,I as f}from"./p-6e1ab235.js";import{V as m,I as v}from"./p-d849e0f5.js";import{F as g}from"./p-6e1b5949.js";import{C as x}from"./p-d789b291.js";import{c as u}from"./p-012cbd8f.js";import{l as w,o as y,b as j,c as R,f as I,m as C}from"./p-6e01f0a2.js";import{b as k}from"./p-5773a9a3.js";import{C as O}from"./p-2d0d575f.js";import{c as D}from"./p-86194314.js";import{D as S}from"./p-e7b00bf0.js";import{g as z}from"./p-65d8c2bc.js";import{K as E}from"./p-832b59af.js";import{f as A}from"./p-d5776087.js";import{M as V}from"./p-78a57a17.js";import{T as L}from"./p-52b8f2d2.js";import"./p-abd7aeaa.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-9d6003ef.js";import"./p-7d9cd9c8.js";import"./p-b75ee3ba.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-ecd032fc.js";import"./p-613ee009.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-8e662f26.js";const T=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var F=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends b{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,z,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},this.renderSelectedContainer(),this.renderInputContainer())}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:t.label,variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,R,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:D(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}F([c()],N.prototype,"host",void 0),F([c()],N.prototype,"value",void 0),F([c()],N.prototype,"source",void 0),F([c()],N.prototype,"disabled",void 0),F([c()],N.prototype,"size",void 0),F([c()],N.prototype,"vegaDropdownProps",void 0),F([c()],N.prototype,"label",void 0),F([c()],N.prototype,"placeholder",void 0),F([c()],N.prototype,"useDefaultFilter",void 0),F([c()],N.prototype,"createEventEmit",void 0),F([c()],N.prototype,"searchEventEmit",void 0),F([c()],N.prototype,"valueController",void 0),F([c()],N.prototype,"sourceController",void 0),F([h("connectedCallback")],N.prototype,"connectedCallback",null);class _ extends b{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([c({writable:!0})],_.prototype,"value",void 0);var K=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class G extends b{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}K([c()],G.prototype,"required",void 0),K([c()],G.prototype,"hint",void 0),K([c()],G.prototype,"disabled",void 0),K([c()],G.prototype,"dropdownRenderer",void 0),K([c()],G.prototype,"label",void 0);var H=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class M extends E{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=s();if(t&&t.classList.contains("vega-chip-close-icon")){const i=A(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}H([c()],M.prototype,"host",void 0),H([c()],M.prototype,"value",void 0),H([c()],M.prototype,"dropdownRenderer",void 0),H([c()],M.prototype,"valueController",void 0);var P=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class U extends b{constructor(){super(...arguments),this.mutationObserver=new V({mutationFilter:L("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}P([f()],U.prototype,"mutationObserver",void 0),P([c()],U.prototype,"host",void 0),P([c()],U.prototype,"dropdownRenderer",void 0),P([h("componentDidLoad")],U.prototype,"componentDidLoad",null);class q extends b{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([c({writable:!0})],q.prototype,"source",void 0);var B=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const W=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.globalSlimmers={},this.itemsSlotController=new U,this.keyboardController=new M,this.valueController=new _,this.sourceController=new q,this.renderer=new G,this.dropdownRenderer=new N,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new n:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(W,I),this.createEventEmit=u(W,w),this.searchEventEmit=u(W,C),this.dropdownEventPrevent=new x([w,C],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(T),this.label="",this.required=!1,this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,l)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),O.notify(k,{host:this.host,detail:this.value})}watchValidationRules(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"]}}};B([v()],W.prototype,"globalSlimmers",void 0),B([f()],W.prototype,"itemsSlotController",void 0),B([f()],W.prototype,"keyboardController",void 0),B([f()],W.prototype,"valueController",void 0),B([f()],W.prototype,"sourceController",void 0),B([f()],W.prototype,"renderer",void 0),B([f()],W.prototype,"dropdownRenderer",void 0),B([f()],W.prototype,"formFieldController",void 0),B([f()],W.prototype,"changeEventEmit",void 0),B([f()],W.prototype,"createEventEmit",void 0),B([f()],W.prototype,"searchEventEmit",void 0),B([f()],W.prototype,"dropdownEventPrevent",void 0),B([f()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),W.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));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));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container 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-combo-box-container 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-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;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))}@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-combo-box-hint{padding-left:8px;padding-right:8px;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));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{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-combo-box-hint{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-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{W as vega_combo_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,H as o,r as e,c as i,g as r}from"./p-21d26bb4.js";import{s}from"./p-519a7d55.js";import{c as a,M as c,V as n,I as l}from"./p-6e1ab235.js";import{V as p,I as d}from"./p-
|
|
1
|
+
import{h as t,H as o,r as e,c as i,g as r}from"./p-21d26bb4.js";import{s}from"./p-519a7d55.js";import{c as a,M as c,V as n,I as l}from"./p-6e1ab235.js";import{V as p,I as d}from"./p-d849e0f5.js";import{a as b}from"./p-d5776087.js";var v=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};class f extends n{componentDidLoad(){this.updateBackdropStyle()}watchVisible(){this.updateBackdropStyle()}updateBackdropStyle(){this.visible?(this.host.style.display="block",setTimeout((()=>{this.host.style.opacity="1"}))):(this.host.style.opacity="0",setTimeout((()=>{this.visible||(this.host.style.display="none")}),this.duration))}}v([a()],f.prototype,"host",void 0),v([a()],f.prototype,"visible",void 0),v([a()],f.prototype,"duration",void 0),v([c("componentDidLoad")],f.prototype,"componentDidLoad",null),v([c("watchVisible")],f.prototype,"watchVisible",null);var h=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};class u extends n{render(){const{duration:e=0,color:i}=this;return t(o,{style:{transitionDuration:e?`${e}ms`:""},class:b([i]),onClick:()=>this.vegaClick.emit()})}}h([a()],u.prototype,"visible",void 0),h([a()],u.prototype,"color",void 0),h([a()],u.prototype,"duration",void 0),h([a()],u.prototype,"vegaClick",void 0);var m=function(t,o,e,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(a=(s<3?r(a):s>3?r(o,e,a):r(o,e))||a);return s>3&&a&&Object.defineProperty(o,e,a),a};const g=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.globalSlimmers={},this.vegaBackdropVisibleController=new f,this.vegaBackdropRenderer=new u,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.color="bg-backdrop-modal",this.visible=!1}watchVisible(){}render(){return s(this.vegaBackdropRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{visible:["watchVisible"]}}};m([d()],g.prototype,"globalSlimmers",void 0),m([l()],g.prototype,"vegaBackdropVisibleController",void 0),m([l()],g.prototype,"vegaBackdropRenderer",void 0),m([l()],g.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g.style=":host{position:fixed;top:0px;left:0px;right:0px;bottom:0px;opacity:0;display:none;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:opacity}:host(.bg-backdrop-modal){background-color:rgba(var(--v-bg-backdrop-modal, 18, 18, 39, 0.85))}:host(.bg-backdrop-popover){background-color:rgba(var(--v-bg-backdrop-popover, 32, 54, 69, 0.16))}:host(.bg-transparent){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}";export{g as vega_backdrop}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,r as i,c as n,H as s,g as o}from"./p-21d26bb4.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as l,M as c,I as d}from"./p-6e1ab235.js";import{V as h,I as g}from"./p-
|
|
1
|
+
import{h as e,F as t,r as i,c as n,H as s,g as o}from"./p-21d26bb4.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as l,M as c,I as d}from"./p-6e1ab235.js";import{V as h,I as g}from"./p-d849e0f5.js";import{c as m}from"./p-012cbd8f.js";import{f as p}from"./p-6e01f0a2.js";import{P as f}from"./p-7d9cd9c8.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-e7b00bf0.js";import"./p-331a62d5.js";import"./p-613ee009.js";import"./p-b75ee3ba.js";import"./p-d5776087.js";import"./p-74168615.js";import"./p-ed45b3b6.js";var v=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class b extends l{render(){var t;return e("div",{class:"vega-segment-control-container"},null===(t=this.segments)||void 0===t?void 0:t.map((e=>this.segmentRenderer.render(e))))}}v([a()],b.prototype,"segments",void 0),v([a()],b.prototype,"segmentRenderer",void 0);var x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class u extends l{componentWillLoad(){this.setDefaultSelected()}watchSegments(){this.setDefaultSelected()}watchSelected(){this.changeEventEmitter.emit(this.selected)}setSelected(e){this.selected=e.key}setDefaultSelected(){var e;(null===(e=this.segments)||void 0===e?void 0:e.length)>0&&!this.segments.find((e=>e.key===this.selected))&&(this.selected=this.segments[0].key)}}x([a({writable:!0})],u.prototype,"selected",void 0),x([a()],u.prototype,"segments",void 0),x([a()],u.prototype,"changeEventEmitter",void 0),x([c("componentWillLoad")],u.prototype,"componentWillLoad",null),x([c("watchSegments")],u.prototype,"watchSegments",null),x([c("watchSelected")],u.prototype,"watchSelected",null);var w=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class j extends l{watchSegments(){this.setIsOverflowBlockSegments()}watchBlock(){this.setIsOverflowBlockSegments()}watchSize(){this.setIsOverflowBlockSegments()}setIsOverflowBlockSegments(){this.isOverflowBlockSegments=this.isExceedContainerWidth()}isExceedContainerWidth(){if(this.block){const e=this.host.shadowRoot.querySelector(".vega-segment-control-container");return e.clientWidth<e.children.length*j.SEGMENTS_OVERFLOW_THRESHOLD[this.size]+4*(e.children.length-1)+5}return!1}}j.SEGMENTS_OVERFLOW_THRESHOLD={medium:101.9,small:82},w([a()],j.prototype,"host",void 0),w([a()],j.prototype,"block",void 0),w([a()],j.prototype,"size",void 0),w([a({writable:!0})],j.prototype,"isOverflowBlockSegments",void 0),w([c("watchSegments")],j.prototype,"watchSegments",null),w([c("watchBlock")],j.prototype,"watchBlock",null),w([c("watchSize")],j.prototype,"watchSize",null);var y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class S extends l{render(t){return e("button",{key:t.key,class:{"vega-segment":!0,selected:this.selected===t.key,disabled:t.disabled,[`${this.size}`]:!0},onClick:()=>this.selectedController.setSelected(t),disabled:t.disabled},this.renderSegments(t))}renderSegments(i){return e(t,null,(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"text-only"!==this.variant)&&i.icon&&this.renderIcon(i),(this.isOverflowBlockSegments&&!i.icon||!this.isOverflowBlockSegments&&"icon-only"!==this.variant)&&i.text&&this.renderText(i))}renderIcon(t){return e("vega-tooltip",{text:t.text,trigger:t.text&&(this.isOverflowBlockSegments||!this.isOverflowBlockSegments&&"icon-only"===this.variant)?"hover":"none",placement:["bottom","top"],disableInteractive:!1},e("vega-icon",{icon:t.icon,size:"size-16"}))}renderText(t){return e("vega-text",{overflow:"ellipsis",tooltip:{placement:["bottom","top"]}},t.text)}}y([a()],S.prototype,"host",void 0),y([a()],S.prototype,"size",void 0),y([a()],S.prototype,"selected",void 0),y([a()],S.prototype,"variant",void 0),y([a()],S.prototype,"block",void 0),y([a()],S.prototype,"isOverflowBlockSegments",void 0),y([a()],S.prototype,"selectedController",void 0);var k=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const R=class{constructor(e){i(this,e),this.vegaChange=n(this,"vegaChange",7),this.change=n(this,"change",7),this.globalSlimmers={},this.segmentControlRenderer=new b,this.segmentOverflowController=new j,this.segmentRenderer=new S,this.selectedController=new u,this.changeEventEmitter=m(R,p),this.pageResizeObserverSlimmer=new f({callback:()=>{this.segmentControlWidth=this.host.clientWidth,this.segmentOverflowController.setIsOverflowBlockSegments()},shouldTrigger:()=>this.host.clientWidth!==this.segmentControlWidth}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.segmentControlWidth=0,this.isOverflowBlockSegments=!1,this.block=!1,this.size="medium",this.segments=[],this.variant="default"}watchBlock(){}watchSize(){}watchSegments(){}watchSelected(){}componentWillLoad(){}render(){return r(e(s,{class:{"vega-segment-control-block":this.block}},this.segmentControlRenderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{block:["watchBlock"],size:["watchSize"],segments:["watchSegments"],selected:["watchSelected"]}}};k([g()],R.prototype,"globalSlimmers",void 0),k([d()],R.prototype,"segmentControlRenderer",void 0),k([d()],R.prototype,"segmentOverflowController",void 0),k([d()],R.prototype,"segmentRenderer",void 0),k([d()],R.prototype,"selectedController",void 0),k([d()],R.prototype,"changeEventEmitter",void 0),k([d()],R.prototype,"pageResizeObserverSlimmer",void 0),k([d()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),R.style=':host{display:inline-block}.vega-segment-control-container{display:flex;gap:4px;border-radius:9999px;background-color:rgba(var(--v-bg-segment-control, 89, 96, 99, 0.1));padding:3px}:host(.vega-segment-control-block){display:block}:host(.vega-segment-control-block) .vega-segment{flex-basis:0;flex-grow:1}.vega-segment{display:flex;align-items:center;justify-content:center;gap:8px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:9999px;cursor:pointer;text-align:center;border-width:1px;border-style:solid;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-color:transparent}.vega-segment vega-icon{vertical-align:middle}.vega-segment.medium{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.medium{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-segment.small{padding-left:16px;padding-right:16px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;padding-top:3px;padding-bottom:3px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-segment.small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-segment.disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));pointer-events:none}.vega-segment:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-segment:hover{background-color:rgba(var(--v-bg-segment-hover, 205, 209, 211, 1))}.vega-segment.selected{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1))}';export{R as vega_segment_control}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,M as t,V as c}from"./p-6e1ab235.js";import{V as s}from"./p-9d6003ef.js";var a=function(e,t,c,s){var a,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,c):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,c,s);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(l=(o<3?a(l):o>3?a(t,c,l):a(t,c))||l);return o>3&&l&&Object.defineProperty(t,c,l),l};class o extends c{disconnectedCallback(){s.unRegisterComponent(this.host)}t(e,...t){return s.registerComponent(this.host),s.t(e,...t)}}a([e()],o.prototype,"host",void 0),a([t("disconnectedCallback")],o.prototype,"disconnectedCallback",null);export{o as T}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as t}from"./p-b1f65b13.js";import{C as e}from"./p-2d0d575f.js";import{d as s}from"./p-6e01f0a2.js";import{a as n,b as i}from"./p-425ba7d6.js";import{L as r}from"./p-6e1ab235.js";import{g as o}from"./p-37b05e0b.js";import{V as c}from"./p-0c8bd757.js";var a,h;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(a||(a={}));class l{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT"}(h||(h={}));class u extends l{}const d=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap}register(t,e){this.domToEntity.set(t,e),this.entityToDOM.set(e,t)}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}};var p,f,w;!function(t){t.DELETE_CHILD="DELETE_CHILD",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILD_NODES="APPEND_CHILD_NODES",t.INSERT_BLOCKS_AFTER="INSERT_BLOCKS_AFTER",t.INSERT_BLOCKS_BEFORE="INSERT_BLOCKS_BEFORE",t.INSERT_NODES_AFTER="INSERT_NODES_AFTER",t.INSERT_NODES_BEFORE="INSERT_NODES_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.BREAK_SINGLE_BLOCK="BREAK_SINGLE_BLOCK",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK"}(p||(p={}));class x{constructor(){this.isFlushable=!1}}class A extends u{constructor(t){super(),this.type=h.ALIGNMENT,this.textAlign=t}static from(t){return[h.ALIGNMENT,new A(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}clone(){return new A(this.textAlign)}render(){return null}}class E extends u{constructor(t){super(),this.type=h.INDENT,this.indent=Math.max(0,t)}static from(t){return[h.INDENT,new E(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new E(this.indent)}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class g{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=t instanceof x?t.type:t.constructor.name,n=g.get(s,e.constructor.name);if(n)return n.execute(t,e);r.error(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)}}g.registry=new Map;class O{constructor(t){this.annotationMap=new Map,this.id=t}static createAnnotationEntity(t,e){switch(t){case"textAlign":return A.from(e);case"indent":return E.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof u)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(t){if(this.doApply(t),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isListItemBlock(){return"list-item"===this.type}doApply(t){t instanceof x?g.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(f||(f={}));class N{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}doApply(t){t instanceof x?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK"}(w||(w={}));class y extends l{}class S extends y{constructor(t="md",e){super(),this.type=w.IMAGE,this.size=t,this.alt=e}static from(t,e){return[w.IMAGE,new S(t,e)]}toJSON(){return t(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new S(this.size,this.alt)}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class T{execute(t,e){return r.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtTextBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&1===s}}class m{}class _ extends N{constructor(t,e,s,n){super(t,n),this.type=f.IMAGE,this.url=e,this.parent=s}static from(e,s){const n=new _(e.id,e.url,s);let i;return i=e.annotations&&0!==Object.keys(e.annotations).length?e.annotations:{size:"md"},n.annotationMap=new Map(Object.keys(i).map((()=>S.from(i.size,i.alt))).filter(t)),n}toJSON(){const t=this.annotationMap.get(w.IMAGE),e={};return(null==t?void 0:t.size)&&(e.size=t.size),(null==t?void 0:t.alt)&&(e.alt=t.alt),Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"image",url:this.url})}clone(){return new _(this.id,this.url,this.parent,super.cloneAnnotations())}doAnnotationActionApply(t){const e=g.get(m.name,_.name);e&&e.execute(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_IMAGE_NODE_URL,_.name,new class extends T{handleAction(t,e){e.url=t.url}}),g.register(m.name,_.name,new class extends T{handleAction(t,e){const s=t.toAnnotation();e.annotationMap.set(s.type,s)}});class C extends x{constructor(t){super(),this.type=p.DELETE_CHILD,this.entityToBeRemoved=t}}class L extends T{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class B extends x{constructor(t){super(),this.type=p.APPEND_CHILD_NODES,this.entityToBeAppended=t}}class I extends T{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new B(t)),s.parent.apply(new C(s))}}}class k extends T{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&e.parent&&e.parent.apply(new C(e))}}class D extends T{handleAction(t,e){const s=t.entityToBeAppended;s.forEach((t=>{t.parent=e})),e.children=e.children.concat(s)}}class b extends T{handleAction(t,e){e.children=[],e.apply(new B(t.newChildNodes))}}class R extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_AFTER,this.referBlock=t,this.blocksToBeInserted=e}}class M extends x{constructor(t){super(),this.type=p.REPLACE_CHILD_NODES,this.newChildNodes=t}}class F extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_BEFORE,this.referBlock=t,this.blocksToBeInserted=e}}class K extends x{constructor(t,e){super(),this.type=p.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class j extends m{constructor(){super(...arguments),this.doSplit=!0}}class P extends l{constructor(t){super(),this.type=a.SELECTION_RANGE,this.range=t}clone(){return new P(this.range)}}class v extends y{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new v(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new v(this.strikethrough)}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class H extends y{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new H(t)]}toJSON(){return{underline:this.underline}}clone(){return new H(this.underline)}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class J extends y{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new J(t)]}toJSON(){return{italic:this.italic}}clone(){return new J(this.italic)}render(){return this.italic?{"font-style":"italic"}:null}}class W extends y{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}clone(){return new W(this.bold)}render(){return this.bold?{"font-weight":"700"}:null}}class G extends y{constructor(t){super(),this.type=w.CODE,this.code=t}static from(t){return[w.CODE,new G(t)]}toJSON(){return{code:this.code}}clone(){return new G(this.code)}renderClass(){return this.code?"v-rte--code":null}render(){return null}}const z=[{key:"black",light:"#111128",dark:"#E3E3E8"},{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],U="";class $ extends y{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new $(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new $(this.textColor.key)}renderClass(){return null}render(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return z.find((e=>e.key===t))||z[0]}}class X extends y{constructor(t){super(),this.type=w.LINK,this.link=t}static from(t){return[w.LINK,new X({href:t.href,groupKey:t.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}clone(){return new X(this.link)}toEqual(t){return this.link.groupKey===t.link.groupKey}render(){return null}}class q extends l{constructor(t){super(),this.type=a.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new q("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone())))})),t}}class V extends m{constructor(t,e){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e}toAnnotation(){return new q(this.groupKey)}}class Y extends m{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class Q extends x{constructor(t){super(),this.type=p.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Z extends l{constructor(){super(...arguments),this.type=a.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE]}}class tt extends j{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Z}}class et extends j{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new G(this.code)}}class st extends m{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends j{constructor({link:e,newText:s,needMergeNode:n,doSplit:i}){super(),this.isFlushable=!0,this.link=e,this.needMergeNode=n,this.newText=s,t(i)&&(this.doSplit=i)}toAnnotation(){return new X(this.link)}}class it extends N{constructor(t,e,s,n){super(t,n),this.type=f.TEXT,this.parent=s,this.text=e}static from(e,s){const n=new it(e.id,e.text,s),{annotations:i}=e;return i&&(n.annotationMap=new Map(Object.keys(i).map((t=>(i.link&&s.apply(new V(i.link.groupKey,[n])),this.createAnnotationEntity(t,i[t])))).filter(t))),n}static createAnnotationEntity(t,e){switch(t){case"bold":return W.from(e);case"italic":return J.from(e);case"underline":return H.from(e);case"strikethrough":return v.from(e);case"code":return G.from(e);case"textColor":return $.from(e);case"link":return X.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof y)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}cloneWithText(t){return new it(o(),t,this.parent,super.cloneAnnotations())}clone(){return new it(this.id,this.text,this.parent,super.cloneAnnotations())}isEmpty(){return!this.text||""===this.text||"\n"===this.text}doAnnotationActionApply(t){const e=this.getAnnotationByType(a.SELECTION_RANGE);if(t instanceof j&&t.doSplit&&e){const e=g.get(j.name,it.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);this.parent.mergeNodes(t)}doModifyActionApply(t){g.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof Y)return void this.syncUpSelectedNodes(t);s instanceof P||this.syncUpSelectedNodes(t);const n=g.get(m.name,it.name);n&&n.execute(e,t)}syncUpSelectedNodes(t){const n=d.getDOMByEntity(this);if(n){const r=s.getSubjectFromParentNodeByEventId(n,i);r&&e.notify(r,{node:t})}}}g.register(p.UPDATE_TEXT,it.name,new class extends T{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.annotationMap.delete(w.LINK)}}),g.register(p.REPLACE_SELECTED_TEXT,it.name,new class extends T{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:i,startOffset:r,endOffset:o}=e;let c=s.text;if(n===i&&r===o&&t)c=s.text.slice(0,r)+t+s.text.slice(r);else{const e=n.parentElement,a=i.parentElement,h=e&&d.getEntityByDOM(e),l=a&&d.getEntityByDOM(a);let u=0,p=s.text.length;h&&h===s?(u=r,p=n===i?o:p):l&&l===s&&(p=o),c=s.text.slice(0,u)+t+s.text.slice(p)}s.apply(new Q(c))}}}),g.register(j.name,it.name,new class extends T{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(a.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof j&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:i,endOffset:r}=s.range,o=t===n&&i===r;e.parent.children=e.parent.children.flatMap((t=>t.id===e.id?o?this.insertNewNode(i,e):this.shouldSplitSelection(s.range)?this.splitTextNode(s.range,e):(this.setApplyTargetNode(e),e):t))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");return this.setApplyTargetNode(s),0===t?[s,e]:t===e.text.length?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:i}=t;return e!==s||n>0||i<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:i}=t,r=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const i=t.substring(0,s),r=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(i),e.cloneWithText(r),e.cloneWithText(o)]},a=r&&d.getEntityByDOM(r),h=o&&d.getEntityByDOM(o);if(a&&a.id===e.id){const r=s===n?t.endOffset:e.text.length,[o,a,h]=c(e.text,i,r);return this.setApplyTargetNode(a),[o,a,h].filter((t=>!!t.text))}if(h&&h.id===e.id){const[s,n,i]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,i].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}),g.register(m.name,it.name,new class extends T{handleAction(e,s){const n=e.toAnnotation();if(e instanceof st)s.annotationMap.delete(e.annotationType);else{if(!(n instanceof Z))return n instanceof y||n instanceof P?(e instanceof nt&&(t(e.newText)&&(s.text=e.newText),s.parent.apply(new V(e.link.groupKey,[s]))),e instanceof et&&this.handleAction(new tt,s),void s.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{s.deleteAnnotationByType(t)}))}}});class rt extends u{constructor(t){super(),this.type=h.TEXT_STYLE,this.textStyle=t}static from(t){return[h.TEXT_STYLE,new rt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new rt(this.textStyle)}render(){const t={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return t;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500"}}}}class ot extends m{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new rt(this.textStyle)}}class ct extends j{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class at extends T{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),i=t.text.slice(e),r=s.children.indexOf(t);if(r>-1){const e=s.children.slice(0,r),o=s.children.slice(r+1);n&&e.push(t.cloneWithText(n)),i&&o.unshift(t.cloneWithText(i)),s.apply(new M(e));const c=s.cloneWithNodes(o);return s.parent.apply(new R(s,c)),c}}}}class ht extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new it(o(),"\n",s),i=t.text.slice(0,e),r=t.text.slice(e),c=s.children.indexOf(t);if(c>-1){const e=s.children.slice(0,c),o=s.children.slice(c+1);i&&e.push(t.cloneWithText(i)),r&&o.unshift(t.cloneWithText(r)),this.mergeLineBreakNodes(e,n,o,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new M([...t,e,...s]))}}class lt extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new it(o(),"\n",e),i=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,i,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new C(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new M([...t,e,...s]))}}class ut extends x{constructor(t){super(),this.type=p.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt extends L{handleAction(t,e){this.deleteNodeContent(t,e)}deleteNodeContent(t,e){const s=t.startContainerNode,n=t.startOffset;if(0!==n&&!s.isEmpty()){const i=s.text.slice(0,n-1)+s.text.slice(n);if(s.apply(new Q(i)),i)return void(t.previousNode=s);{const n=this.getPreviousNode(s);return n&&n.parent===e&&"\n"===n.text||1===e.children.length?void(t.previousNode=s):(e.apply(new C(s)),void(t.previousNode=n))}}{let n=this.getPreviousNode(s),i=null;if(e.children.length&&n&&n.parent!==e)s.isEmpty()&&e.apply(new C(s)),e.type===n.parent.type&&n.parent.apply(new ut(e));else if(this.isContentFirstNode(s)&&s.isEmpty()&&(i=this.getNextNode(s)),s.isEmpty()&&e.apply(new C(s)),n instanceof it&&n.isEmpty()){const t=n;n=this.getPreviousNode(n),t.parent.apply(new C(t)),n||(i=s)}0===e.children.length&&e.parent.apply(new C(e)),n?t.previousNode=n:i&&(t.nextNode=i)}}}class pt extends T{replaceNodeWithNodes(t,e,s){t.children&&(s.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?s:t)))}}class ft extends pt{handleAction(t,e){const s=t.referNode,n=[...t.nodesToBeInserted,s];this.replaceNodeWithNodes(e,s,n)}}class wt extends O{constructor(t,e){super(t),this.children=[],this.type=e,this.annotationMap=wt.isAcceptableTextStyle(e)?new Map([rt.from(e)]):new Map([rt.from("paragraph")])}static from(e){const s=new wt(e.id,e.type),{annotations:n}=e;return s.children=e.nodes.map((t=>it.from(t,s))),n&&Object.entries(n).forEach((([e,n])=>{const i=this.createAnnotationEntity(e,n);t(i)&&s.annotationMap.set(...i)})),s}static createAnnotationEntity(t,e){return"textStyle"===t?rt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof nt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(w.LINK),i=s.getAnnotationByType(w.LINK);if(t&&i&&t.toEqual(i))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}cloneWithNodes(t){const e=new wt(o(),this.type);return e.children=[],e.apply(new B(t)),e}clone(){const t=new wt(this.id,this.type);return t.children=this.children.map((e=>{const s=e.clone();return s.parent=t,s})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}createNewParagraph(){return new wt(o(),"paragraph")}doAnnotationActionApply(t){const e=g.get(t.constructor.name,wt.name);e&&e.execute(t,this)}}g.register(ot.name,wt.name,new class extends T{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new ct(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new st(w.BOLD))})}}),g.register(V.name,wt.name,new class extends T{handleAction(t,e){const s=e.getAnnotationByType(a.LINK_GROUP);if(s){const n=s.linkGroups.get(t.groupKey);s.linkGroups.set(t.groupKey,[...n,...t.nodes]),e.annotationMap.set(a.LINK_GROUP,s)}}}),g.register(p.DELETE_CHILD,wt.name,new k),g.register(p.APPEND_CHILD_NODES,wt.name,new D),g.register(p.SPLIT_BLOCK_WITH_NODE,wt.name,new at),g.register(p.REPLACE_CHILD_NODES,wt.name,new b),g.register(p.MERGE_TWO_BLOCKS_NODES,wt.name,new I),g.register(p.BREAK_SINGLE_BLOCK,wt.name,new class extends T{handleAction(t,e){t.newBlock=this.breakSingleTextBlock(t.startContainerNode,t.startOffset,e)}breakSingleTextBlock(t,e,s){const n=this.copyInlineStyleToNewParagraph(t,s);if(this.isCaretPositionAtTextBlockEnd(s,t,e))s.parent.apply(new R(s,n));else{if(!this.isCaretPositionAtTextBlockStart(s,t,e)){const n=new K(t,e);return s.apply(n),n.newBlock}s.parent.apply(new F(s,n))}return n}copyInlineStyleToNewParagraph(t,e){const s=t.cloneWithText("");s.annotationMap.delete(w.LINK);const n=e.createNewParagraph();return n.apply(new B([s])),n}}),g.register(p.LINE_BREAK_SINGLE_BLOCK,wt.name,new ht),g.register(p.LINE_BREAK_MULTIPLE_BLOCKS,wt.name,new lt),g.register(p.DELETE_BLOCK_CONTENT,wt.name,new dt),g.register(p.INSERT_IMAGE_TO_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,i=t.imageBlockToBeInserted;if(this.isCaretPositionAtTextBlockEnd(e,s,n))e.parent.apply(new R(e,i));else if(this.isCaretPositionAtTextBlockStart(e,s,n))e.parent.apply(new F(e,i));else{const t=new K(s,n);e.apply(t),e.parent.apply(new R(e,i))}}}),g.register(p.INSERT_NODES_BEFORE,wt.name,new ft),g.register(p.TRANSFORM_LIST_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),i=t.selectedBlocks,r=i.map((t=>s.toListItem(t)));n.apply(new B(r)),s.apply(new R(t.selectedBlocks[0],n)),i.forEach((t=>{t.parent.apply(new C(t))}))}});class xt extends x{constructor(t,e){super(),this.isFlushable=!0,this.type=p.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class At extends m{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new P(this.range)}}class Et extends N{constructor(t,e,s,n){super(t),this.type=f.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}clone(){return new Et(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){g.executeTheStrategy(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_CODE_BLOCK,Et.name,new class extends T{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),g.register(At.name,Et.name,new class extends T{handleAction(t,e){e.annotationMap.set(a.SELECTION_RANGE,t.toAnnotation())}});class gt extends O{constructor(t,e,s){super(t),this.type="code-block",this.children=[new Et(`${t}-1`,e,s,this)]}static from(t){return new gt(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}clone(){const t=gt.from(this.toJSON());return t.parent=this.parent,t}apply(t){if(t instanceof x&&g.executeTheStrategy(t,this),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(a.SELECTION_RANGE)}}g.register(p.DELETE_CODE_BLOCK,gt.name,new class extends L{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),i=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),i=0),n.apply(new C(e));const r=t?d.getDOMByEntity(t):null;if(0===n.children.length){const s=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),type:"text",text:""}]});e.parent.apply(new B([s])),t=s.children[0],i=0}this.notifyUpdateSelection(t,r,i,e)}}notifyUpdateSelection(t,n,r,o){const c=d.getDOMByEntity(o);if(c){const o=s.getSubjectFromParentNodeByEventId(c,i);o&&e.notify(o,{node:t,updateDirectly:!!n,offset:r})}}getRTENodeEndOffset(t){return t&&"CODE_BLOCK_NODE"!==t.type?"IMAGE"!==t.type?t.text.length:1:0}}),g.register(p.DELETE_CHILD,gt.name,new k),g.register(p.SWITCH_OUT_FROM_CODE_BLOCK,gt.name,new class extends T{handleAction(t,n){const{content:r,language:c}=t,a=r.split("\n"),h=new xt(a.slice(0,a.length-2).join("\n"),c);h.isFlushable=!1,n.children[0].apply(h);const l=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),text:"",type:"text"}]});n.parent.apply(new R(n,l));const u=d.getDOMByEntity(n);if(u){const t=s.getSubjectFromParentNodeByEventId(u,i);t&&e.notify(t,{node:l.children[0]})}}}),g.register(p.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends T{handleAction(t,e){e.parent.apply(new R(e,t.imageBlockToBeInserted))}}),gt.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{E as $,T as A,L as B,S as C,At as D,$ as E,z as F,Et as G,m as H,R as I,ct as J,J as K,nt as L,x as M,w as N,H as O,ot as P,rt as Q,C as R,K as S,j as T,xt as U,W as V,h as W,tt as X,et as Y,U as Z,v as _,_ as a,A as a0,Q as a1,ut as a2,M as b,B as c,wt as d,F as e,p as f,it as g,pt as h,O as i,g as j,I as k,k as l,D as m,b as n,ft as o,dt as p,ht as q,lt as r,at as s,Y as t,gt as u,N as v,d as w,u as x,y,a as z}
|
|
1
|
+
import{i as t}from"./p-5e2c9e69.js";import{C as e}from"./p-2d0d575f.js";import{d as s}from"./p-6e01f0a2.js";import{a as n,b as i}from"./p-65d8c2bc.js";import{L as r}from"./p-6e1ab235.js";import{g as o}from"./p-a4670e23.js";import{V as c}from"./p-0c8bd757.js";var a,h;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(a||(a={}));class l{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT"}(h||(h={}));class u extends l{}const d=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap}register(t,e){this.domToEntity.set(t,e),this.entityToDOM.set(e,t)}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}};var p,f,w;!function(t){t.DELETE_CHILD="DELETE_CHILD",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILD_NODES="APPEND_CHILD_NODES",t.INSERT_BLOCKS_AFTER="INSERT_BLOCKS_AFTER",t.INSERT_BLOCKS_BEFORE="INSERT_BLOCKS_BEFORE",t.INSERT_NODES_AFTER="INSERT_NODES_AFTER",t.INSERT_NODES_BEFORE="INSERT_NODES_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.BREAK_SINGLE_BLOCK="BREAK_SINGLE_BLOCK",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK"}(p||(p={}));class x{constructor(){this.isFlushable=!1}}class A extends u{constructor(t){super(),this.type=h.ALIGNMENT,this.textAlign=t}static from(t){return[h.ALIGNMENT,new A(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}clone(){return new A(this.textAlign)}render(){return null}}class E extends u{constructor(t){super(),this.type=h.INDENT,this.indent=Math.max(0,t)}static from(t){return[h.INDENT,new E(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new E(this.indent)}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class g{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=t instanceof x?t.type:t.constructor.name,n=g.get(s,e.constructor.name);if(n)return n.execute(t,e);r.error(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)}}g.registry=new Map;class O{constructor(t){this.annotationMap=new Map,this.id=t}static createAnnotationEntity(t,e){switch(t){case"textAlign":return A.from(e);case"indent":return E.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof u)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(t){if(this.doApply(t),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isListItemBlock(){return"list-item"===this.type}doApply(t){t instanceof x?g.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(f||(f={}));class N{constructor(t,e){this.annotationMap=new Map,this.id=t,e&&(this.annotationMap=e)}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}doApply(t){t instanceof x?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}!function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK"}(w||(w={}));class y extends l{}class S extends y{constructor(t="md",e){super(),this.type=w.IMAGE,this.size=t,this.alt=e}static from(t,e){return[w.IMAGE,new S(t,e)]}toJSON(){return t(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new S(this.size,this.alt)}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class T{execute(t,e){return r.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtTextBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtImageBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&1===s}}class m{}class _ extends N{constructor(t,e,s,n){super(t,n),this.type=f.IMAGE,this.url=e,this.parent=s}static from(e,s){const n=new _(e.id,e.url,s);let i;return i=e.annotations&&0!==Object.keys(e.annotations).length?e.annotations:{size:"md"},n.annotationMap=new Map(Object.keys(i).map((()=>S.from(i.size,i.alt))).filter(t)),n}toJSON(){const t=this.annotationMap.get(w.IMAGE),e={};return(null==t?void 0:t.size)&&(e.size=t.size),(null==t?void 0:t.alt)&&(e.alt=t.alt),Object.assign(Object.assign({id:this.id},Object.keys(e).length>0?{annotations:e}:{}),{type:"image",url:this.url})}clone(){return new _(this.id,this.url,this.parent,super.cloneAnnotations())}doAnnotationActionApply(t){const e=g.get(m.name,_.name);e&&e.execute(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_IMAGE_NODE_URL,_.name,new class extends T{handleAction(t,e){e.url=t.url}}),g.register(m.name,_.name,new class extends T{handleAction(t,e){const s=t.toAnnotation();e.annotationMap.set(s.type,s)}});class C extends x{constructor(t){super(),this.type=p.DELETE_CHILD,this.entityToBeRemoved=t}}class L extends T{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}}class B extends x{constructor(t){super(),this.type=p.APPEND_CHILD_NODES,this.entityToBeAppended=t}}class I extends T{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new B(t)),s.parent.apply(new C(s))}}}class k extends T{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&e.parent&&e.parent.apply(new C(e))}}class D extends T{handleAction(t,e){const s=t.entityToBeAppended;s.forEach((t=>{t.parent=e})),e.children=e.children.concat(s)}}class R extends T{handleAction(t,e){e.children=[],e.apply(new B(t.newChildNodes))}}class b extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_AFTER,this.referBlock=t,this.blocksToBeInserted=e}}class M extends x{constructor(t){super(),this.type=p.REPLACE_CHILD_NODES,this.newChildNodes=t}}class F extends x{constructor(t,...e){super(),this.type=p.INSERT_BLOCKS_BEFORE,this.referBlock=t,this.blocksToBeInserted=e}}class K extends x{constructor(t,e){super(),this.type=p.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class j extends m{constructor(){super(...arguments),this.doSplit=!0}}class P extends l{constructor(t){super(),this.type=a.SELECTION_RANGE,this.range=t}clone(){return new P(this.range)}}class v extends y{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new v(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new v(this.strikethrough)}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class H extends y{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new H(t)]}toJSON(){return{underline:this.underline}}clone(){return new H(this.underline)}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class J extends y{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new J(t)]}toJSON(){return{italic:this.italic}}clone(){return new J(this.italic)}render(){return this.italic?{"font-style":"italic"}:null}}class W extends y{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new W(t)]}toJSON(){return{bold:this.bold}}clone(){return new W(this.bold)}render(){return this.bold?{"font-weight":"700"}:null}}class G extends y{constructor(t){super(),this.type=w.CODE,this.code=t}static from(t){return[w.CODE,new G(t)]}toJSON(){return{code:this.code}}clone(){return new G(this.code)}renderClass(){return this.code?"v-rte--code":null}render(){return null}}const z=[{key:"black",light:"#111128",dark:"#E3E3E8"},{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],U="";class $ extends y{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new $(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new $(this.textColor.key)}renderClass(){return null}render(){return{color:c.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return z.find((e=>e.key===t))||z[0]}}class X extends y{constructor(t){super(),this.type=w.LINK,this.link=t}static from(t){return[w.LINK,new X({href:t.href,groupKey:t.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}clone(){return new X(this.link)}toEqual(t){return this.link.groupKey===t.link.groupKey}render(){return null}}class q extends l{constructor(t){super(),this.type=a.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}clone(){const t=new q("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone())))})),t}}class V extends m{constructor(t,e){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e}toAnnotation(){return new q(this.groupKey)}}class Y extends m{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class Q extends x{constructor(t){super(),this.type=p.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Z extends l{constructor(){super(...arguments),this.type=a.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE]}}class tt extends j{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Z}}class et extends j{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new G(this.code)}}class st extends m{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class nt extends j{constructor({link:e,newText:s,needMergeNode:n,doSplit:i}){super(),this.isFlushable=!0,this.link=e,this.needMergeNode=n,this.newText=s,t(i)&&(this.doSplit=i)}toAnnotation(){return new X(this.link)}}class it extends N{constructor(t,e,s,n){super(t,n),this.type=f.TEXT,this.parent=s,this.text=e}static from(e,s){const n=new it(e.id,e.text,s),{annotations:i}=e;return i&&(n.annotationMap=new Map(Object.keys(i).map((t=>(i.link&&s.apply(new V(i.link.groupKey,[n])),this.createAnnotationEntity(t,i[t])))).filter(t))),n}static createAnnotationEntity(t,e){switch(t){case"bold":return W.from(e);case"italic":return J.from(e);case"underline":return H.from(e);case"strikethrough":return v.from(e);case"code":return G.from(e);case"textColor":return $.from(e);case"link":return X.from(e)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof y)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}cloneWithText(t){return new it(o(),t,this.parent,super.cloneAnnotations())}clone(){return new it(this.id,this.text,this.parent,super.cloneAnnotations())}isEmpty(){return!this.text||""===this.text||"\n"===this.text}doAnnotationActionApply(t){const e=this.getAnnotationByType(a.SELECTION_RANGE);if(t instanceof j&&t.doSplit&&e){const e=g.get(j.name,it.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);this.parent.mergeNodes(t)}doModifyActionApply(t){g.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof Y)return void this.syncUpSelectedNodes(t);s instanceof P||this.syncUpSelectedNodes(t);const n=g.get(m.name,it.name);n&&n.execute(e,t)}syncUpSelectedNodes(t){const n=d.getDOMByEntity(this);if(n){const r=s.getSubjectFromParentNodeByEventId(n,i);r&&e.notify(r,{node:t})}}}g.register(p.UPDATE_TEXT,it.name,new class extends T{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.annotationMap.delete(w.LINK)}}),g.register(p.REPLACE_SELECTED_TEXT,it.name,new class extends T{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:i,startOffset:r,endOffset:o}=e;let c=s.text;if(n===i&&r===o&&t)c=s.text.slice(0,r)+t+s.text.slice(r);else{const e=n.parentElement,a=i.parentElement,h=e&&d.getEntityByDOM(e),l=a&&d.getEntityByDOM(a);let u=0,p=s.text.length;h&&h===s?(u=r,p=n===i?o:p):l&&l===s&&(p=o),c=s.text.slice(0,u)+t+s.text.slice(p)}s.apply(new Q(c))}}}),g.register(j.name,it.name,new class extends T{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(a.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof j&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:i,endOffset:r}=s.range,o=t===n&&i===r;e.parent.children=e.parent.children.flatMap((t=>t.id===e.id?o?this.insertNewNode(i,e):this.shouldSplitSelection(s.range)?this.splitTextNode(s.range,e):(this.setApplyTargetNode(e),e):t))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");return this.setApplyTargetNode(s),0===t?[s,e]:t===e.text.length?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:i}=t;return e!==s||n>0||i<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:i}=t,r=s.parentElement,o=n.parentElement,c=(t,s,n)=>{const i=t.substring(0,s),r=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(i),e.cloneWithText(r),e.cloneWithText(o)]},a=r&&d.getEntityByDOM(r),h=o&&d.getEntityByDOM(o);if(a&&a.id===e.id){const r=s===n?t.endOffset:e.text.length,[o,a,h]=c(e.text,i,r);return this.setApplyTargetNode(a),[o,a,h].filter((t=>!!t.text))}if(h&&h.id===e.id){const[s,n,i]=c(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,i].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}),g.register(m.name,it.name,new class extends T{handleAction(e,s){const n=e.toAnnotation();if(e instanceof st)s.annotationMap.delete(e.annotationType);else{if(!(n instanceof Z))return n instanceof y||n instanceof P?(e instanceof nt&&(t(e.newText)&&(s.text=e.newText),s.parent.apply(new V(e.link.groupKey,[s]))),e instanceof et&&this.handleAction(new tt,s),void s.annotationMap.set(n.type,n)):void 0;n.items.forEach((t=>{s.deleteAnnotationByType(t)}))}}});class rt extends u{constructor(t){super(),this.type=h.TEXT_STYLE,this.textStyle=t}static from(t){return[h.TEXT_STYLE,new rt(t)]}toJSON(){return{textStyle:this.textStyle}}clone(){return new rt(this.textStyle)}render(){const t={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return t;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500"};case"heading-4":return{fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};case"heading-5":return{fontFamily:"Inter",fontSize:"14px",lineHeight:"22px",fontWeight:"500"};case"heading-6":return{fontFamily:"Inter",fontSize:"12px",lineHeight:"22px",fontWeight:"500"}}}}class ot extends m{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new rt(this.textStyle)}}class ct extends j{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new W(this.bold)}}class at extends T{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),i=t.text.slice(e),r=s.children.indexOf(t);if(r>-1){const e=s.children.slice(0,r),o=s.children.slice(r+1);n&&e.push(t.cloneWithText(n)),i&&o.unshift(t.cloneWithText(i)),s.apply(new M(e));const c=s.cloneWithNodes(o);return s.parent.apply(new b(s,c)),c}}}}class ht extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new it(o(),"\n",s),i=t.text.slice(0,e),r=t.text.slice(e),c=s.children.indexOf(t);if(c>-1){const e=s.children.slice(0,c),o=s.children.slice(c+1);i&&e.push(t.cloneWithText(i)),r&&o.unshift(t.cloneWithText(r)),this.mergeLineBreakNodes(e,n,o,s)}return n}}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new M([...t,e,...s]))}}class lt extends T{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new it(o(),"\n",e),i=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,i,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new C(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new it(o(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new M([...t,e,...s]))}}class ut extends x{constructor(t){super(),this.type=p.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class dt extends L{handleAction(t,e){this.deleteNodeContent(t,e)}deleteNodeContent(t,e){const s=t.startContainerNode,n=t.startOffset;if(0!==n&&!s.isEmpty()){const i=s.text.slice(0,n-1)+s.text.slice(n);if(s.apply(new Q(i)),i)return void(t.previousNode=s);{const n=this.getPreviousNode(s);return n&&n.parent===e&&"\n"===n.text||1===e.children.length?void(t.previousNode=s):(e.apply(new C(s)),void(t.previousNode=n))}}{let n=this.getPreviousNode(s),i=null;if(e.children.length&&n&&n.parent!==e)s.isEmpty()&&e.apply(new C(s)),e.type===n.parent.type&&n.parent.apply(new ut(e));else if(this.isContentFirstNode(s)&&s.isEmpty()&&(i=this.getNextNode(s)),s.isEmpty()&&e.apply(new C(s)),n instanceof it&&n.isEmpty()){const t=n;n=this.getPreviousNode(n),t.parent.apply(new C(t)),n||(i=s)}0===e.children.length&&e.parent.apply(new C(e)),n?t.previousNode=n:i&&(t.nextNode=i)}}}class pt extends T{replaceNodeWithNodes(t,e,s){t.children&&(s.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?s:t)))}}class ft extends pt{handleAction(t,e){const s=t.referNode,n=[...t.nodesToBeInserted,s];this.replaceNodeWithNodes(e,s,n)}}class wt extends O{constructor(t,e){super(t),this.children=[],this.type=e,this.annotationMap=wt.isAcceptableTextStyle(e)?new Map([rt.from(e)]):new Map([rt.from("paragraph")])}static from(e){const s=new wt(e.id,e.type),{annotations:n}=e;return s.children=e.nodes.map((t=>it.from(t,s))),n&&Object.entries(n).forEach((([e,n])=>{const i=this.createAnnotationEntity(e,n);t(i)&&s.annotationMap.set(...i)})),s}static createAnnotationEntity(t,e){return"textStyle"===t?rt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof nt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(w.LINK),i=s.getAnnotationByType(w.LINK);if(t&&i&&t.toEqual(i))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}cloneWithNodes(t){const e=new wt(o(),this.type);return e.children=[],e.apply(new B(t)),e}clone(){const t=new wt(this.id,this.type);return t.children=this.children.map((e=>{const s=e.clone();return s.parent=t,s})),t.annotationMap=super.cloneAnnotations(),t.parent=this.parent,t}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}createNewParagraph(){return new wt(o(),"paragraph")}doAnnotationActionApply(t){const e=g.get(t.constructor.name,wt.name);e&&e.execute(t,this)}}g.register(ot.name,wt.name,new class extends T{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new ct(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new st(w.BOLD))})}}),g.register(V.name,wt.name,new class extends T{handleAction(t,e){const s=e.getAnnotationByType(a.LINK_GROUP);if(s){const n=s.linkGroups.get(t.groupKey);s.linkGroups.set(t.groupKey,[...n,...t.nodes]),e.annotationMap.set(a.LINK_GROUP,s)}}}),g.register(p.DELETE_CHILD,wt.name,new k),g.register(p.APPEND_CHILD_NODES,wt.name,new D),g.register(p.SPLIT_BLOCK_WITH_NODE,wt.name,new at),g.register(p.REPLACE_CHILD_NODES,wt.name,new R),g.register(p.MERGE_TWO_BLOCKS_NODES,wt.name,new I),g.register(p.BREAK_SINGLE_BLOCK,wt.name,new class extends T{handleAction(t,e){t.newBlock=this.breakSingleTextBlock(t.startContainerNode,t.startOffset,e)}breakSingleTextBlock(t,e,s){const n=this.copyInlineStyleToNewParagraph(t,s);if(this.isCaretPositionAtTextBlockEnd(s,t,e))s.parent.apply(new b(s,n));else{if(!this.isCaretPositionAtTextBlockStart(s,t,e)){const n=new K(t,e);return s.apply(n),n.newBlock}s.parent.apply(new F(s,n))}return n}copyInlineStyleToNewParagraph(t,e){const s=t.cloneWithText("");s.annotationMap.delete(w.LINK);const n=e.createNewParagraph();return n.apply(new B([s])),n}}),g.register(p.LINE_BREAK_SINGLE_BLOCK,wt.name,new ht),g.register(p.LINE_BREAK_MULTIPLE_BLOCKS,wt.name,new lt),g.register(p.DELETE_BLOCK_CONTENT,wt.name,new dt),g.register(p.INSERT_IMAGE_TO_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,i=t.imageBlockToBeInserted;if(this.isCaretPositionAtTextBlockEnd(e,s,n))e.parent.apply(new b(e,i));else if(this.isCaretPositionAtTextBlockStart(e,s,n))e.parent.apply(new F(e,i));else{const t=new K(s,n);e.apply(t),e.parent.apply(new b(e,i))}}}),g.register(p.INSERT_NODES_BEFORE,wt.name,new ft),g.register(p.TRANSFORM_LIST_BLOCK,wt.name,new class extends T{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),i=t.selectedBlocks,r=i.map((t=>s.toListItem(t)));n.apply(new B(r)),s.apply(new b(t.selectedBlocks[0],n)),i.forEach((t=>{t.parent.apply(new C(t))}))}});class xt extends x{constructor(t,e){super(),this.isFlushable=!0,this.type=p.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class At extends m{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new P(this.range)}}class Et extends N{constructor(t,e,s,n){super(t),this.type=f.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}clone(){return new Et(this.id,this.text,this.language,this.parent)}doAnnotationActionApply(t){g.executeTheStrategy(t,this)}doModifyActionApply(t){g.executeTheStrategy(t,this)}}g.register(p.UPDATE_CODE_BLOCK,Et.name,new class extends T{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),g.register(At.name,Et.name,new class extends T{handleAction(t,e){e.annotationMap.set(a.SELECTION_RANGE,t.toAnnotation())}});class gt extends O{constructor(t,e,s){super(t),this.type="code-block",this.children=[new Et(`${t}-1`,e,s,this)]}static from(t){return new gt(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}clone(){const t=gt.from(this.toJSON());return t.parent=this.parent,t}apply(t){if(t instanceof x&&g.executeTheStrategy(t,this),t.isFlushable){const t=d.getDOMByEntity(this);if(t){const i=s.getSubjectFromParentNodeByEventId(t,n);i&&e.notify(i,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(a.SELECTION_RANGE)}}g.register(p.DELETE_CODE_BLOCK,gt.name,new class extends L{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),i=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),i=0),n.apply(new C(e));const r=t?d.getDOMByEntity(t):null;if(0===n.children.length){const s=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),type:"text",text:""}]});e.parent.apply(new B([s])),t=s.children[0],i=0}this.notifyUpdateSelection(t,r,i,e)}}notifyUpdateSelection(t,n,r,o){const c=d.getDOMByEntity(o);if(c){const o=s.getSubjectFromParentNodeByEventId(c,i);o&&e.notify(o,{node:t,updateDirectly:!!n,offset:r})}}getRTENodeEndOffset(t){return t&&"CODE_BLOCK_NODE"!==t.type?"IMAGE"!==t.type?t.text.length:1:0}}),g.register(p.DELETE_CHILD,gt.name,new k),g.register(p.SWITCH_OUT_FROM_CODE_BLOCK,gt.name,new class extends T{handleAction(t,n){const{content:r,language:c}=t,a=r.split("\n"),h=new xt(a.slice(0,a.length-2).join("\n"),c);h.isFlushable=!1,n.children[0].apply(h);const l=wt.from({id:o(),type:"paragraph",nodes:[{id:o(),text:"",type:"text"}]});n.parent.apply(new b(n,l));const u=d.getDOMByEntity(n);if(u){const t=s.getSubjectFromParentNodeByEventId(u,i);t&&e.notify(t,{node:l.children[0]})}}}),g.register(p.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends T{handleAction(t,e){e.parent.apply(new b(e,t.imageBlockToBeInserted))}}),gt.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{E as $,T as A,L as B,S as C,At as D,$ as E,z as F,Et as G,m as H,b as I,ct as J,J as K,nt as L,x as M,w as N,H as O,ot as P,rt as Q,C as R,K as S,j as T,xt as U,W as V,h as W,tt as X,et as Y,U as Z,v as _,_ as a,A as a0,Q as a1,ut as a2,M as b,B as c,wt as d,F as e,p as f,it as g,pt as h,O as i,g as j,I as k,k as l,D as m,R as n,ft as o,dt as p,ht as q,lt as r,at as s,Y as t,gt as u,N as v,d as w,u as x,y,a as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,H as t,F as a,r as s,g as l}from"./p-21d26bb4.js";import{c as n,V as o,I as i}from"./p-6e1ab235.js";import{V as r,I as d}from"./p-
|
|
1
|
+
import{h as e,H as t,F as a,r as s,g as l}from"./p-21d26bb4.js";import{c as n,V as o,I as i}from"./p-6e1ab235.js";import{V as r,I as d}from"./p-d849e0f5.js";import{s as c}from"./p-519a7d55.js";import{p as v}from"./p-0c667d6a.js";var h=function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o};class g extends o{render(){return c(e(t,{class:{animated:this.animated},style:this.assignHostStyle()},this.renderChildren()),this.host)}}h([n()],g.prototype,"host",void 0),h([n()],g.prototype,"animated",void 0);class f extends g{assignHostStyle(){const{width:e="180px"}=this;return{width:v(e)}}renderChildren(){return e("div",{class:"vega-skeleton-text"})}}!function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);n>3&&o&&Object.defineProperty(t,a,o)}([n()],f.prototype,"width",void 0);class b extends g{assignHostStyle(){return{width:this.getWidthWithUnit()}}renderChildren(){return e("vega-flex",{gap:"size-16",direction:"col"},e("div",{class:"vega-skeleton-text"}),e("div",{class:"vega-skeleton-text",style:{width:`calc(${this.getWidthWithUnit()} * 0.8)`}}),e("div",{class:"vega-skeleton-text",style:{width:`calc(${this.getWidthWithUnit()} * 0.6)`}}))}getWidthWithUnit(){const{width:e="320px"}=this;return v(e)}}!function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);n>3&&o&&Object.defineProperty(t,a,o)}([n()],b.prototype,"width",void 0);class p extends g{assignHostStyle(){const{width:e="100%"}=this;return{width:v(e)}}renderChildren(){return e("vega-flex",{gap:"size-16",direction:"col"},e("div",{class:"vega-skeleton-text full-width"}),e("div",{class:"vega-skeleton-text full-width"}),e("div",{class:"vega-skeleton-text full-width"}))}}!function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);n>3&&o&&Object.defineProperty(t,a,o)}([n()],p.prototype,"width",void 0);var u=function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o};class k extends g{assignHostStyle(){const{width:e="180px",height:t="120px"}=this;return{width:v(e),height:v(t)}}renderChildren(){return e("vega-box",{class:"vega-skeleton-image",corners:this.corners})}}u([n()],k.prototype,"height",void 0),u([n()],k.prototype,"width",void 0),u([n()],k.prototype,"corners",void 0);class y extends g{constructor(){super(...arguments),this.rows=4,this.cells=5,this.renderCells=()=>e(a,null,[...Array(this.cells).keys()].map((t=>e("td",{class:"vega-skeleton-table-cell",key:t},e("vega-skeleton",{type:"text",width:"100%",animated:this.animated})))))}assignHostStyle(){const{width:e="100%"}=this;return{width:v(e)}}renderChildren(){return e("table",{class:"vega-skeleton-table"},e("thead",{class:"vega-skeleton-table-head"},e("tr",{class:"vega-skeleton-table-row"},this.renderCells())),e("tbody",{class:"vega-skeleton-table-body"},[...Array(this.rows).keys()].map((t=>e("tr",{class:"vega-skeleton-table-row",key:t},this.renderCells())))))}}!function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);n>3&&o&&Object.defineProperty(t,a,o)}([n()],y.prototype,"width",void 0);var x=function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o};class w extends o{render(){switch(this.type){case"text":return this.vegaSkeletonTextRenderer.render();case"paragraph":return this.vegaSkeletonParagraphRenderer.render();case"full-width-paragraph":return this.vegaSkeletonFullWidthParagraphRenderer.render();case"ellipse":return this.vegaSkeletonEllipseRenderer.render();case"image":return this.vegaSkeletonImageRenderer.render();case"table":return this.vegaSkeletonTableRenderer.render()}}}x([n()],w.prototype,"type",void 0),x([n()],w.prototype,"vegaSkeletonTextRenderer",void 0),x([n()],w.prototype,"vegaSkeletonParagraphRenderer",void 0),x([n()],w.prototype,"vegaSkeletonFullWidthParagraphRenderer",void 0),x([n()],w.prototype,"vegaSkeletonEllipseRenderer",void 0),x([n()],w.prototype,"vegaSkeletonImageRenderer",void 0),x([n()],w.prototype,"vegaSkeletonTableRenderer",void 0);var R=function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o};class m extends g{assignHostStyle(){const{width:e="120px",height:t="120px"}=this;return{width:v(e),height:v(t)}}renderChildren(){return e("div",{class:"vega-skeleton-ellipse"})}}R([n()],m.prototype,"width",void 0),R([n()],m.prototype,"height",void 0);var j=function(e,t,a,s){var l,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,s);else for(var i=e.length-1;i>=0;i--)(l=e[i])&&(o=(n<3?l(o):n>3?l(t,a,o):l(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o};const S=class{constructor(e){s(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new r,this.vegaSkeletonTextRenderer=new f,this.vegaSkeletonParagraphRenderer=new b,this.vegaSkeletonFullWidthParagraphRenderer=new p,this.vegaSkeletonEllipseRenderer=new m,this.vegaSkeletonImageRenderer=new k,this.vegaSkeletonTableRenderer=new y,this.vegaSkeletonRendererManager=new w,this.type="text",this.animated=!1,this.corners="rounded-12"}render(){return this.vegaSkeletonRendererManager.render()}get host(){return l(this)}};j([d()],S.prototype,"globalSlimmers",void 0),j([i()],S.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j([i()],S.prototype,"vegaSkeletonTextRenderer",void 0),j([i()],S.prototype,"vegaSkeletonParagraphRenderer",void 0),j([i()],S.prototype,"vegaSkeletonFullWidthParagraphRenderer",void 0),j([i()],S.prototype,"vegaSkeletonEllipseRenderer",void 0),j([i()],S.prototype,"vegaSkeletonImageRenderer",void 0),j([i()],S.prototype,"vegaSkeletonTableRenderer",void 0),j([i()],S.prototype,"vegaSkeletonRendererManager",void 0),S.style=":host{display:block}:host([type=text]),:host([type=image]),:host([type=ellipse]){display:inline-block}@keyframes v-skeleton-loading{0%{background-position:100% 50%}100%{background-position:0 50%}}.vega-skeleton-bg-base,.vega-skeleton-image,.vega-skeleton-ellipse,.vega-skeleton-text-base,.vega-skeleton-text{background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}:host(.animated) .vega-skeleton-bg-base,:host(.animated) .vega-skeleton-image,:host(.animated) .vega-skeleton-ellipse,:host(.animated) .vega-skeleton-text-base,:host(.animated) .vega-skeleton-text{animation:v-skeleton-loading 1750ms cubic-bezier(0.56, 0, 0.38, 0.98) infinite;animation-delay:1ms;background:linear-gradient(90deg, rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1)) 25%, rgba(var(--v-bg-action-quaternary-hover, 239, 239, 239, 1)) 37%, rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1)) 63%);background-size:400% 100%}.vega-skeleton-text-base,.vega-skeleton-text{border-radius:9999px;height:16px}.vega-skeleton-text.full-width{width:100%}.vega-skeleton-ellipse{border-radius:9999px;width:100%;height:100%}.vega-skeleton-image{width:100%;height:100%}.vega-skeleton-table{width:100%;border-spacing:0;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden}.vega-skeleton-table .vega-skeleton-table-head{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1))}.vega-skeleton-table .vega-skeleton-table-body{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-skeleton-table .vega-skeleton-table-cell{box-sizing:border-box;padding:16px}.vega-skeleton-table .vega-skeleton-table-cell:nth-of-type(4),.vega-skeleton-table .vega-skeleton-table-cell:nth-of-type(5){display:none}@media (min-width: 768px){.vega-skeleton-table .vega-skeleton-table-cell:nth-of-type(4),.vega-skeleton-table .vega-skeleton-table-cell:nth-of-type(5){display:table-cell}}";export{S as vega_skeleton}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as e,V as t}from"./p-6e1ab235.js";import{K as c}from"./p-
|
|
1
|
+
import{M as e,V as t}from"./p-6e1ab235.js";import{K as c}from"./p-8e662f26.js";var n=function(e,t,c,n){var o,l=arguments.length,a=l<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,c):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,c,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(l<3?o(a):l>3?o(t,c,a):o(t,c))||a);return l>3&&a&&Object.defineProperty(t,c,a),a};class o extends t{constructor(e){super(),this.keyboardEventListeners=[],this.listenersRetriever=e}connectedCallback(){c.register(this.keyboardEventListeners)}disconnectedCallback(){c.deregister(this.keyboardEventListeners)}componentDidLoad(){this.keyboardEventListeners=this.listenersRetriever(this),c.register(this.keyboardEventListeners)}}n([e("connectedCallback")],o.prototype,"connectedCallback",null),n([e("disconnectedCallback")],o.prototype,"disconnectedCallback",null),n([e("componentDidLoad")],o.prototype,"componentDidLoad",null);export{o as K}
|