@globalpayments/vega 2.88.0 → 2.89.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/{action-color-accessibility-validator-15fa91e4.js → action-color-accessibility-validator-24498816.js} +2 -2
- package/dist/cjs/{app-globals-6fbbcb2f.js → app-globals-4872f4e6.js} +9 -8
- package/dist/cjs/{aria-dialog-focusable-trap-slimmer-c2ca46db.js → aria-dialog-focusable-trap-slimmer-a0ff1263.js} +2 -2
- package/dist/cjs/{brand-switch-state-controller-slimmer-3d41b2a4.js → brand-switch-state-controller-slimmer-97882447.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-01930b4e.js → child-nodes-event-prevent-slimmer-85a7fdb0.js} +1 -1
- package/dist/cjs/{child-nodes-notify-observer-slimmer-34a606b3.js → child-nodes-notify-observer-slimmer-7ae2a78f.js} +1 -1
- package/dist/cjs/{code-block-00fee034.js → code-block-7c49d175.js} +4 -4
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-066645b3.js → component-value-history-controller-slimmer.abstract-aae22ddf.js} +5 -5
- package/dist/cjs/{content-state-d4f54659.js → content-state-76b81780.js} +32 -7
- package/dist/cjs/{dark-mode-state-controller-slimmer-8a87ec08.js → dark-mode-state-controller-slimmer-b454645a.js} +1 -1
- package/dist/cjs/{dark-mode-style-controller-ed481250.js → dark-mode-style-controller-32d4054a.js} +2 -2
- package/dist/cjs/{date-required-rule-4cea8fc8.js → date-required-rule-71f71b32.js} +1 -1
- package/dist/cjs/{design-token-ad9f413c.js → design-token-c80d3f32.js} +3 -3
- package/dist/cjs/{dom-node-subject-observer-factory-ba6a95f3.js → dom-node-subject-observer-factory-c82df135.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-d04aa177.js → element-appender-slimmer-e95427b5.js} +5 -5
- package/dist/cjs/{event-emit-slimmer-5fd6e54a.js → event-emit-slimmer-146316b2.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-23d112bd.js → form-field-controller-slimmer-430b4f02.js} +5 -5
- package/dist/cjs/{image-annotation-action-bcf2a1b4.js → image-annotation-action-7959fd77.js} +5 -5
- package/dist/cjs/index.cjs.js +22 -21
- package/dist/cjs/{inject-keyboard-manager-acaf1530.js → inject-keyboard-manager-3ccf1cb6.js} +1 -1
- package/dist/cjs/{internal-translation-controller-a1250419.js → internal-translation-controller-5582d789.js} +5 -2
- package/dist/cjs/{internal-vega-event-manager-c515cf5e.js → internal-vega-event-manager-6e49d1ca.js} +3 -3
- package/dist/cjs/{keyboard-manager-6821709a.js → keyboard-manager-5babfda8.js} +2 -2
- package/dist/cjs/{keyboard-manager-slimmer-74528545.js → keyboard-manager-slimmer-a73354ca.js} +1 -1
- package/dist/cjs/loader.cjs.js +16 -16
- package/dist/cjs/{month-view-generator-61578283.js → month-view-generator-43e75062.js} +1 -1
- package/dist/cjs/{public-rules-d2fbbbf5.js → public-rules-b23ab52d.js} +11 -11
- package/dist/cjs/{range-e797475c.js → range-abe1b989.js} +2 -2
- package/dist/cjs/{replace-selected-text-action-a098523f.js → replace-selected-text-action-ef079fed.js} +1 -1
- package/dist/cjs/{responsive-format-facade-bf330592.js → responsive-format-facade-cc368403.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-ba9d42fa.js → rich-text-editor-required-rule-bbd727a2.js} +1 -1
- package/dist/cjs/{split-cell-operation-91ee6894.js → split-cell-operation-b1fe91b5.js} +5 -5
- package/dist/cjs/{state-border-formatter-fd194e53.js → state-border-formatter-398134c1.js} +1 -1
- package/dist/cjs/{static-subject-title-5829a298.js → static-subject-title-70c73b16.js} +2 -0
- package/dist/cjs/{string-format-strategy.abstract-af9fc35e.js → string-format-strategy.abstract-67421e2b.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-a3fb1292.js → string-input-formatter-slimmer-e84530b9.js} +3 -3
- package/dist/cjs/{string-mask-strategy-2054f3fb.js → string-mask-strategy-f9806f9b.js} +2 -2
- package/dist/cjs/{style-formatter-7d60fb70.js → style-formatter-da3a556b.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-757e3a76.js → sub-state-notify-slimmer-450277b6.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-aa93ab4f.js → sub-state-observer-slimmer-5bfe8e97.js} +2 -2
- package/dist/cjs/{time-required-rule-ba450bbd.js → time-required-rule-618109fa.js} +1 -1
- package/dist/cjs/{token-extension-8b69f7e1.js → token-extension-dfee303a.js} +525 -12
- package/dist/cjs/{translation-slimmer-aee3fb1c.js → translation-slimmer-1a7a2b6d.js} +1 -1
- package/dist/cjs/{type-guard-424efe26.js → type-guard-474dec0d.js} +1 -1
- package/dist/cjs/{ui-3727d685.js → ui-c91c37a7.js} +1 -31
- package/dist/cjs/{valid-credit-card-number-rule-6bd5834c.js → valid-credit-card-number-rule-00c18527.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +12 -12
- package/dist/cjs/vega-app-footer.cjs.entry.js +3 -3
- package/dist/cjs/vega-app-header-button.cjs.entry.js +15 -15
- package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/vega-banner.cjs.entry.js +5 -5
- package/dist/cjs/vega-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +7 -7
- package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-button-link.cjs.entry.js +8 -8
- package/dist/cjs/vega-button.cjs.entry.js +10 -10
- package/dist/cjs/vega-calendar_4.cjs.entry.js +15 -15
- package/dist/cjs/vega-card.cjs.entry.js +7 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +9 -9
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +147 -18
- package/dist/cjs/vega-chip.cjs.entry.js +14 -14
- package/dist/cjs/vega-code-block.cjs.entry.js +16 -16
- package/dist/cjs/vega-color-picker.cjs.entry.js +21 -11
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +11 -11
- package/dist/cjs/vega-color-swatch.cjs.entry.js +8 -8
- package/dist/cjs/vega-combo-box.cjs.entry.js +42 -20
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +37 -24
- package/dist/cjs/vega-dialog_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-divider.cjs.entry.js +6 -6
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +18 -18
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-39dedd17.js → vega-event-id-37c1716f.js} +2 -0
- package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
- package/dist/cjs/vega-field-label.cjs.entry.js +86 -14
- package/dist/cjs/vega-file-uploader.cjs.entry.js +10 -10
- package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
- package/dist/cjs/vega-flex.cjs.entry.js +8 -8
- package/dist/cjs/vega-font.cjs.entry.js +7 -7
- package/dist/cjs/vega-form.cjs.entry.js +13 -13
- package/dist/cjs/vega-grid.cjs.entry.js +7 -7
- package/dist/cjs/vega-icon.cjs.entry.js +7 -7
- package/dist/cjs/vega-image-uploader.cjs.entry.js +29 -16
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-numeric.cjs.entry.js +28 -15
- package/dist/cjs/vega-input-passcode.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +12 -12
- package/dist/cjs/vega-input-range.cjs.entry.js +25 -12
- package/dist/cjs/vega-input-select.cjs.entry.js +34 -21
- package/dist/cjs/vega-input.cjs.entry.js +14 -14
- package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -5
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -17
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +3 -3
- 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 +6 -6
- package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-radio_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -13
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +26 -26
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +11 -11
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +16 -16
- package/dist/cjs/vega-segment-control.cjs.entry.js +6 -6
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +32 -34
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +11 -11
- package/dist/cjs/vega-signature-capture.cjs.entry.js +28 -15
- package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-table_11.cjs.entry.js +13 -13
- package/dist/cjs/vega-text.cjs.entry.js +177 -63
- package/dist/cjs/vega-textarea.cjs.entry.js +11 -11
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +31 -18
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +20 -10
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
- package/dist/cjs/vega.cjs.js +16 -16
- package/dist/cjs/{wait-for-component-did-render-a13f7eb9.js → wait-for-component-did-render-762084fc.js} +1 -1
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.css +1 -0
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +2 -2
- package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-collapsed-item-renderer.js +1 -1
- package/dist/collection/components/vega-button-link/vega-button-link.css +3 -0
- package/dist/collection/components/vega-button-link/vega-button-link.js +1 -1
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +96 -4
- package/dist/collection/components/vega-checkbox/vega-checkbox.js +148 -6
- package/dist/collection/components/vega-chip/vega-chip.css +1 -0
- package/dist/collection/components/vega-chip/vega-chip.js +1 -1
- package/dist/collection/components/vega-color-picker/vega-color-picker.js +36 -2
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +14 -2
- package/dist/collection/components/vega-combo-box/vega-combo-box.css +12 -0
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +44 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.js +4 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +34 -0
- package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.js +69 -0
- package/dist/collection/components/vega-field-label/vega-field-label.css +12 -0
- package/dist/collection/components/vega-field-label/vega-field-label.js +11 -2
- package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-renderer.js +4 -1
- package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +34 -0
- package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +4 -1
- package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +34 -0
- package/dist/collection/components/vega-input-range/slimmers/renderers/vega-input-range-renderer.js +4 -1
- package/dist/collection/components/vega-input-range/vega-input-range.js +34 -0
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +6 -6
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.js +4 -1
- package/dist/collection/components/vega-input-select/vega-input-select.css +1 -0
- package/dist/collection/components/vega-input-select/vega-input-select.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/horizontal-line-block-insert-strategy.js +79 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/hr-to-horizontal-line-block-strategy.js +45 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/actions/insert-horizontal-line-block-action.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/assets/horizontal-line.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-annotation.js +63 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.js +89 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.js +32 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.js +45 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/predicate.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +41 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.js +77 -0
- package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.js +8 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-element-to-text-node-strategy.js +18 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +1 -1
- package/dist/collection/components/vega-segment-control/slimmers/renderers/vega-segment-renderer.js +1 -1
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.js +9 -21
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.css +1 -38
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +34 -0
- package/dist/collection/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.js +4 -1
- package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +34 -0
- package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +153 -61
- package/dist/collection/components/vega-text/vega-text.css +37 -0
- package/dist/collection/components/vega-text/vega-text.js +48 -0
- package/dist/collection/components/vega-textarea/vega-textarea.js +1 -1
- package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-label-renderer.js +4 -1
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +34 -0
- package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +35 -1
- package/dist/collection/constants/ui.js +1 -0
- package/dist/collection/global/scripts/before-vega-load.js +2 -0
- package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +1 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -3
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
- package/dist/collection/helpers/translation/locales/en.js +4 -1
- package/dist/esm/{action-color-accessibility-validator-3d8efb64.js → action-color-accessibility-validator-ce55cb07.js} +2 -2
- package/dist/esm/{app-globals-98c3d676.js → app-globals-081bbfd9.js} +9 -8
- package/dist/esm/{aria-dialog-focusable-trap-slimmer-7d9a9f5a.js → aria-dialog-focusable-trap-slimmer-7db3d5a7.js} +2 -2
- package/dist/esm/{brand-switch-state-controller-slimmer-60249013.js → brand-switch-state-controller-slimmer-9ca03c81.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-2f823df2.js → child-nodes-event-prevent-slimmer-1e3ac106.js} +1 -1
- package/dist/esm/{child-nodes-notify-observer-slimmer-8822d0d0.js → child-nodes-notify-observer-slimmer-499a3aa7.js} +1 -1
- package/dist/esm/{code-block-6261a99d.js → code-block-17f596fc.js} +5 -5
- package/dist/esm/{component-value-history-controller-slimmer.abstract-07488472.js → component-value-history-controller-slimmer.abstract-21e9126a.js} +5 -5
- package/dist/esm/{content-state-9bf85e00.js → content-state-96741bb0.js} +32 -7
- package/dist/esm/{dark-mode-state-controller-slimmer-f2b4f8ed.js → dark-mode-state-controller-slimmer-778dd929.js} +1 -1
- package/dist/esm/{dark-mode-style-controller-fcda24ec.js → dark-mode-style-controller-ca5afd2d.js} +2 -2
- package/dist/esm/{date-required-rule-281aab50.js → date-required-rule-d6ce832c.js} +1 -1
- package/dist/esm/{design-token-b7ce7ed4.js → design-token-0a575bf2.js} +3 -3
- package/dist/esm/{dom-node-subject-observer-factory-3897e95b.js → dom-node-subject-observer-factory-ddff8662.js} +1 -1
- package/dist/esm/{element-appender-slimmer-3926470f.js → element-appender-slimmer-44bbb5c6.js} +5 -5
- package/dist/esm/{event-emit-slimmer-0990037c.js → event-emit-slimmer-3eb4d8ad.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-24aca6c4.js → form-field-controller-slimmer-03894a51.js} +5 -5
- package/dist/esm/{image-annotation-action-dadda36f.js → image-annotation-action-e8ab7b64.js} +5 -5
- package/dist/esm/index.js +21 -21
- package/dist/esm/{inject-keyboard-manager-6317d1b3.js → inject-keyboard-manager-e5874185.js} +1 -1
- package/dist/esm/{internal-translation-controller-0b9589d0.js → internal-translation-controller-84958bc9.js} +5 -2
- package/dist/esm/{internal-vega-event-manager-dc4c3a37.js → internal-vega-event-manager-a9758b6e.js} +3 -3
- package/dist/esm/{keyboard-manager-69761aa6.js → keyboard-manager-404b9c17.js} +2 -2
- package/dist/esm/{keyboard-manager-slimmer-c2d038f0.js → keyboard-manager-slimmer-c8fcfe60.js} +1 -1
- package/dist/esm/loader.js +16 -16
- package/dist/esm/{month-view-generator-4c1ee949.js → month-view-generator-d341fa5a.js} +1 -1
- package/dist/esm/{public-rules-da28b413.js → public-rules-09387dcf.js} +11 -11
- package/dist/esm/{range-342cbce9.js → range-47d9f95e.js} +2 -2
- package/dist/esm/{replace-selected-text-action-a45bee4b.js → replace-selected-text-action-a217dc89.js} +1 -1
- package/dist/esm/{responsive-format-facade-3ca1422d.js → responsive-format-facade-51c0c2e1.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-46d0bc5b.js → rich-text-editor-required-rule-cca16fd0.js} +1 -1
- package/dist/esm/{split-cell-operation-1d114aa3.js → split-cell-operation-ddde4106.js} +5 -5
- package/dist/esm/{state-border-formatter-3ebc76a4.js → state-border-formatter-50394e9c.js} +1 -1
- package/dist/esm/{static-subject-title-52f93124.js → static-subject-title-1c86e974.js} +2 -1
- package/dist/esm/{string-format-strategy.abstract-95d691e1.js → string-format-strategy.abstract-de17b899.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-e18d202c.js → string-input-formatter-slimmer-c3d483ef.js} +3 -3
- package/dist/esm/{string-mask-strategy-43d846ac.js → string-mask-strategy-87efdb9e.js} +2 -2
- package/dist/esm/{style-formatter-197e2fd3.js → style-formatter-c20c1988.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-80ac7dee.js → sub-state-notify-slimmer-d5a21bb3.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-81538a8c.js → sub-state-observer-slimmer-d924288a.js} +2 -2
- package/dist/esm/{time-required-rule-78d8ecf1.js → time-required-rule-026c17a1.js} +1 -1
- package/dist/esm/{token-extension-30011dc4.js → token-extension-76323d76.js} +525 -13
- package/dist/esm/{translation-slimmer-49903fc8.js → translation-slimmer-7f195ba8.js} +1 -1
- package/dist/esm/{type-guard-b18807dc.js → type-guard-30eec79c.js} +1 -1
- package/dist/esm/{ui-64815a12.js → ui-d73f756a.js} +2 -30
- package/dist/esm/{valid-credit-card-number-rule-fe1c8a9c.js → valid-credit-card-number-rule-1ac471e8.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +12 -12
- package/dist/esm/vega-app-footer.entry.js +3 -3
- package/dist/esm/vega-app-header-button.entry.js +15 -15
- package/dist/esm/vega-backdrop.entry.js +1 -1
- package/dist/esm/vega-banner.entry.js +5 -5
- package/dist/esm/vega-box.entry.js +8 -8
- package/dist/esm/vega-brand-logo.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +7 -7
- package/dist/esm/vega-button-circle.entry.js +12 -12
- package/dist/esm/vega-button-group_2.entry.js +8 -8
- package/dist/esm/vega-button-link.entry.js +8 -8
- package/dist/esm/vega-button.entry.js +10 -10
- package/dist/esm/vega-calendar_4.entry.js +15 -15
- package/dist/esm/vega-card.entry.js +7 -7
- package/dist/esm/vega-carousel.entry.js +9 -9
- package/dist/esm/vega-checkbox_2.entry.js +147 -18
- package/dist/esm/vega-chip.entry.js +14 -14
- package/dist/esm/vega-code-block.entry.js +16 -16
- package/dist/esm/vega-color-picker.entry.js +21 -11
- package/dist/esm/vega-color-swatch-picker.entry.js +11 -11
- package/dist/esm/vega-color-swatch.entry.js +8 -8
- package/dist/esm/vega-combo-box.entry.js +42 -20
- package/dist/esm/vega-date-picker_2.entry.js +37 -24
- package/dist/esm/vega-dialog_2.entry.js +11 -11
- package/dist/esm/vega-divider.entry.js +6 -6
- package/dist/esm/vega-dropdown_5.entry.js +18 -18
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-20494454.js → vega-event-id-92848bf5.js} +2 -1
- package/dist/esm/vega-field-error.entry.js +1 -1
- package/dist/esm/vega-field-label.entry.js +86 -14
- package/dist/esm/vega-file-uploader.entry.js +10 -10
- package/dist/esm/vega-flag-icon.entry.js +6 -6
- package/dist/esm/vega-flex.entry.js +8 -8
- package/dist/esm/vega-font.entry.js +7 -7
- package/dist/esm/vega-form.entry.js +13 -13
- package/dist/esm/vega-grid.entry.js +7 -7
- package/dist/esm/vega-icon.entry.js +7 -7
- package/dist/esm/vega-image-uploader.entry.js +29 -16
- package/dist/esm/vega-input-credit-card.entry.js +14 -14
- package/dist/esm/vega-input-numeric.entry.js +28 -15
- package/dist/esm/vega-input-passcode.entry.js +13 -13
- package/dist/esm/vega-input-phone-number.entry.js +12 -12
- package/dist/esm/vega-input-range.entry.js +25 -12
- package/dist/esm/vega-input-select.entry.js +34 -21
- package/dist/esm/vega-input.entry.js +14 -14
- package/dist/esm/vega-item-toggle.entry.js +5 -5
- package/dist/esm/vega-left-nav_5.entry.js +17 -17
- package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
- package/dist/esm/vega-page-notification_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
- package/dist/esm/vega-pagination.entry.js +11 -11
- package/dist/esm/vega-popover_2.entry.js +15 -15
- package/dist/esm/vega-progress-tracker_2.entry.js +11 -11
- package/dist/esm/vega-radio_2.entry.js +14 -14
- package/dist/esm/vega-rich-text-content.entry.js +13 -13
- package/dist/esm/vega-rich-text-editor_4.entry.js +26 -26
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +11 -11
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +16 -16
- package/dist/esm/vega-segment-control.entry.js +6 -6
- package/dist/esm/vega-selection-chip_2.entry.js +13 -13
- package/dist/esm/vega-selection-tile_2.entry.js +32 -34
- package/dist/esm/vega-sidenav_3.entry.js +11 -11
- package/dist/esm/vega-signature-capture.entry.js +28 -15
- package/dist/esm/vega-stepper.entry.js +10 -10
- package/dist/esm/vega-tab-group_2.entry.js +7 -7
- package/dist/esm/vega-table_11.entry.js +13 -13
- package/dist/esm/vega-text.entry.js +177 -63
- package/dist/esm/vega-textarea.entry.js +11 -11
- package/dist/esm/vega-time-picker_2.entry.js +31 -18
- package/dist/esm/vega-toggle-switch.entry.js +20 -10
- package/dist/esm/vega-tooltip_2.entry.js +9 -9
- package/dist/esm/vega.js +16 -16
- package/dist/esm/{wait-for-component-did-render-4069cbea.js → wait-for-component-did-render-b378bf16.js} +1 -1
- package/dist/sri/vega-sri-manifest.json +399 -399
- package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +41 -1
- package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +60 -0
- package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +10 -0
- package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +21 -0
- package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.d.ts +1 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +10 -0
- package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.d.ts +21 -0
- package/dist/types/components/vega-field-label/vega-field-label.d.ts +2 -0
- package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-renderer.d.ts +1 -0
- package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +10 -0
- package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +1 -0
- package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +10 -0
- package/dist/types/components/vega-input-range/slimmers/renderers/vega-input-range-renderer.d.ts +1 -0
- package/dist/types/components/vega-input-range/vega-input-range.d.ts +10 -0
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.d.ts +1 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/horizontal-line-block-insert-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/hr-to-horizontal-line-block-strategy.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/actions/insert-horizontal-line-block-action.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/assets/horizontal-line.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-annotation.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.d.ts +53 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.d.ts +26 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/predicate.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
- package/dist/types/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.d.ts +2 -1
- package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +10 -0
- package/dist/types/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.d.ts +1 -0
- package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +10 -0
- package/dist/types/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.d.ts +34 -12
- package/dist/types/components/vega-text/vega-text.d.ts +19 -0
- package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-label-renderer.d.ts +1 -0
- package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +10 -0
- package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +10 -0
- package/dist/types/components.d.ts +172 -0
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +2 -1
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
- package/dist/types/helpers/translation/interface.d.ts +4 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-d24892d6.entry.js → p-00d2a013.entry.js} +1 -1
- package/dist/vega/{p-77fb5d5c.js → p-014cd411.js} +1 -1
- package/dist/vega/{p-b2a0d104.entry.js → p-059ba5f5.entry.js} +1 -1
- package/dist/vega/{p-fea75b87.js → p-091fbc35.js} +1 -1
- package/dist/vega/p-09deb867.entry.js +1 -0
- package/dist/vega/{p-9e0f8b46.entry.js → p-0e298ee8.entry.js} +1 -1
- package/dist/vega/p-157a2459.entry.js +1 -0
- package/dist/vega/p-1827a459.entry.js +1 -0
- package/dist/vega/{p-36e46c4f.js → p-1ab4c08d.js} +1 -1
- package/dist/vega/{p-4914a5f8.entry.js → p-1d16a7fa.entry.js} +1 -1
- package/dist/vega/p-1e68e217.entry.js +1 -0
- package/dist/vega/{p-416e89b0.entry.js → p-2649051e.entry.js} +1 -1
- package/dist/vega/{p-a87bc75a.entry.js → p-26a54a73.entry.js} +1 -1
- package/dist/vega/{p-ba4f23d8.entry.js → p-285b161c.entry.js} +1 -1
- package/dist/vega/{p-c93dfe23.js → p-2abdca42.js} +1 -1
- package/dist/vega/{p-c0c13993.entry.js → p-2c5352fe.entry.js} +1 -1
- package/dist/vega/{p-1f563387.js → p-2e86aee5.js} +1 -1
- package/dist/vega/p-2f2201d6.entry.js +1 -0
- package/dist/vega/p-306720b8.entry.js +1 -0
- package/dist/vega/{p-7292ac20.js → p-328dbe8e.js} +1 -1
- package/dist/vega/p-337440ce.entry.js +1 -0
- package/dist/vega/{p-0c460945.js → p-3390bb20.js} +1 -1
- package/dist/vega/{p-e7fb7eee.js → p-35e800ac.js} +1 -1
- package/dist/vega/{p-9c48e4e5.js → p-363e453b.js} +1 -1
- package/dist/vega/{p-518e0a24.js → p-3a49089e.js} +1 -1
- package/dist/vega/{p-ffda64ac.js → p-3a5737fa.js} +1 -1
- package/dist/vega/{p-b565a6a5.js → p-3e09aeed.js} +1 -1
- package/dist/vega/{p-6be01c6b.entry.js → p-3ef9c69d.entry.js} +1 -1
- package/dist/vega/{p-18d1d404.entry.js → p-43af604c.entry.js} +1 -1
- package/dist/vega/{p-c6201e76.entry.js → p-44d2f9e7.entry.js} +1 -1
- package/dist/vega/{p-a53e1a60.entry.js → p-4694fe27.entry.js} +1 -1
- package/dist/vega/p-46cab60a.js +1 -0
- package/dist/vega/{p-341d5e4e.js → p-46e0c6ca.js} +1 -1
- package/dist/vega/{p-7dcc0b23.entry.js → p-48ea74b5.entry.js} +1 -1
- package/dist/vega/p-4b34df4c.entry.js +1 -0
- package/dist/vega/{p-b5d00d38.entry.js → p-4c6baf92.entry.js} +1 -1
- package/dist/vega/p-4edd7f8c.js +1 -0
- package/dist/vega/{p-3312e3dd.js → p-50e7020c.js} +1 -1
- package/dist/vega/{p-11e2dcf5.js → p-526e3634.js} +1 -1
- package/dist/vega/p-528748fa.js +1 -0
- package/dist/vega/{p-1d752c37.entry.js → p-57b34bf9.entry.js} +1 -1
- package/dist/vega/{p-4f53b45d.entry.js → p-5a6e2c08.entry.js} +1 -1
- package/dist/vega/{p-b857a661.js → p-5f09aba8.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-d8591207.entry.js → p-5fd29f29.entry.js} +1 -1
- package/dist/vega/p-600f0316.entry.js +1 -0
- package/dist/vega/{p-92710213.entry.js → p-61536fcf.entry.js} +1 -1
- package/dist/vega/{p-6bd37d32.js → p-630cd479.js} +1 -1
- package/dist/vega/{p-a0dd5273.entry.js → p-66b2a285.entry.js} +1 -1
- package/dist/vega/p-6a3ea3f0.entry.js +1 -0
- package/dist/vega/p-6c484462.entry.js +1 -0
- package/dist/vega/p-73508c24.js +1 -0
- package/dist/vega/{p-3d6568cc.js → p-76454c9a.js} +1 -1
- package/dist/vega/{p-b7f30f68.entry.js → p-78a6e741.entry.js} +1 -1
- package/dist/vega/p-7fbd11b0.js +1 -0
- package/dist/vega/{p-a73d8915.entry.js → p-8258dc37.entry.js} +1 -1
- package/dist/vega/p-8457b6b7.entry.js +1 -0
- package/dist/vega/{p-92468c30.entry.js → p-8666f206.entry.js} +1 -1
- package/dist/vega/{p-a0fa5ccc.entry.js → p-8865613a.entry.js} +1 -1
- package/dist/vega/p-894fb9c9.entry.js +1 -0
- package/dist/vega/p-89947a43.js +1 -0
- package/dist/vega/{p-a36d4199.entry.js → p-89d55444.entry.js} +1 -1
- package/dist/vega/{p-ea48decc.js → p-8a34c08a.js} +1 -1
- package/dist/vega/p-8a3d12e6.js +1 -0
- package/dist/vega/p-8ce92f5f.entry.js +1 -0
- package/dist/vega/p-92e493ea.entry.js +1 -0
- package/dist/vega/{p-0d248322.entry.js → p-93cbc231.entry.js} +1 -1
- package/dist/vega/{p-f0d70de3.js → p-94a064a3.js} +1 -1
- package/dist/vega/{p-03b32939.entry.js → p-976536c7.entry.js} +1 -1
- package/dist/vega/{p-5a960f83.entry.js → p-9a35a34f.entry.js} +1 -1
- package/dist/vega/p-9a562813.entry.js +1 -0
- package/dist/vega/{p-b0fb5099.entry.js → p-9cb92fa3.entry.js} +1 -1
- package/dist/vega/{p-3967fa98.entry.js → p-a05a2f1e.entry.js} +1 -1
- package/dist/vega/{p-d2237b95.entry.js → p-a0705cd0.entry.js} +1 -1
- package/dist/vega/p-a18d280f.js +3 -0
- package/dist/vega/{p-10fa27d2.js → p-a58cacca.js} +1 -1
- package/dist/vega/p-a9b6ce74.js +1 -0
- package/dist/vega/{p-788ada42.js → p-ad89f499.js} +1 -1
- package/dist/vega/{p-f7ad9349.js → p-b2488adb.js} +1 -1
- package/dist/vega/{p-7cd2b93b.js → p-b3420fcf.js} +1 -1
- package/dist/vega/{p-d1641644.entry.js → p-b3b22e36.entry.js} +1 -1
- package/dist/vega/{p-0d3830f1.js → p-b66d46ce.js} +1 -1
- package/dist/vega/p-b9bd85d6.entry.js +1 -0
- package/dist/vega/{p-01f617ee.entry.js → p-baef217a.entry.js} +1 -1
- package/dist/vega/{p-ecbead18.entry.js → p-bd5566e3.entry.js} +1 -1
- package/dist/vega/{p-81d55efd.js → p-be6c1415.js} +1 -1
- package/dist/vega/p-c016b230.entry.js +1 -0
- package/dist/vega/{p-ce8a0aa6.entry.js → p-c3be0c29.entry.js} +1 -1
- package/dist/vega/{p-b5a3de00.entry.js → p-c4bd6cf8.entry.js} +1 -1
- package/dist/vega/{p-abfe46ca.js → p-c91e0a43.js} +1 -1
- package/dist/vega/{p-0dafd071.entry.js → p-ca4773c3.entry.js} +1 -1
- package/dist/vega/p-cb378636.js +1 -0
- package/dist/vega/p-cdde6e64.entry.js +1 -0
- package/dist/vega/p-d1cc3544.entry.js +1 -0
- package/dist/vega/{p-919de162.js → p-d2916121.js} +1 -1
- package/dist/vega/{p-5424e837.js → p-d319ebb5.js} +1 -1
- package/dist/vega/{p-6629a68b.js → p-d7790113.js} +1 -1
- package/dist/vega/{p-b3e97e2f.entry.js → p-d93574dd.entry.js} +1 -1
- package/dist/vega/{p-df4f9264.entry.js → p-dbb02b32.entry.js} +1 -1
- package/dist/vega/p-dd529875.js +1 -0
- package/dist/vega/{p-5c1a4fd7.entry.js → p-df3a649c.entry.js} +1 -1
- package/dist/vega/{p-b72d7b57.entry.js → p-df71c830.entry.js} +1 -1
- package/dist/vega/p-e80e7cd9.entry.js +1 -0
- package/dist/vega/{p-1385da31.entry.js → p-ed0cc518.entry.js} +1 -1
- package/dist/vega/{p-296c90bd.entry.js → p-efe48ed5.entry.js} +1 -1
- package/dist/vega/{p-e5726df7.entry.js → p-efe6e4e6.entry.js} +1 -1
- package/dist/vega/{p-b519b9ab.entry.js → p-f597b65e.entry.js} +1 -1
- package/dist/vega/p-f764b62e.entry.js +1 -0
- package/dist/vega/p-f7c6af07.js +1 -0
- package/dist/vega/{p-cdd3af89.entry.js → p-f7cab150.entry.js} +1 -1
- package/dist/vega/{p-0b2ca33b.js → p-f7e8081e.js} +1 -1
- package/dist/vega/{p-36f3dd19.entry.js → p-fa398acc.entry.js} +1 -1
- package/dist/vega/{p-cacec680.js → p-fae4d64e.js} +1 -1
- package/dist/vega/{p-9f03856e.js → p-fbde6153.js} +1 -1
- package/dist/vega/{p-b31802b3.entry.js → p-fc0ce3b5.entry.js} +1 -1
- package/dist/vega/p-fcefb62c.js +1 -0
- package/dist/vega/p-ff24b342.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-05dc6718.js +0 -1
- package/dist/vega/p-0edf9c6e.entry.js +0 -1
- package/dist/vega/p-30f76962.js +0 -3
- package/dist/vega/p-3186995a.entry.js +0 -1
- package/dist/vega/p-3ab50c06.entry.js +0 -1
- package/dist/vega/p-3e2e4b00.entry.js +0 -1
- package/dist/vega/p-50958342.js +0 -1
- package/dist/vega/p-540bd78a.entry.js +0 -1
- package/dist/vega/p-54ed506c.entry.js +0 -1
- package/dist/vega/p-5c8522eb.entry.js +0 -1
- package/dist/vega/p-6205288e.entry.js +0 -1
- package/dist/vega/p-696d7b8f.js +0 -1
- package/dist/vega/p-6ab23e89.entry.js +0 -1
- package/dist/vega/p-70e0c3eb.entry.js +0 -1
- package/dist/vega/p-7168ef16.entry.js +0 -1
- package/dist/vega/p-7348a091.entry.js +0 -1
- package/dist/vega/p-7cd8d054.entry.js +0 -1
- package/dist/vega/p-8ee917b4.js +0 -1
- package/dist/vega/p-a32ad1ac.entry.js +0 -1
- package/dist/vega/p-a528714c.js +0 -1
- package/dist/vega/p-a5713178.js +0 -1
- package/dist/vega/p-ad815280.js +0 -1
- package/dist/vega/p-b218141f.entry.js +0 -1
- package/dist/vega/p-c4675cd2.entry.js +0 -1
- package/dist/vega/p-c51e3b9e.js +0 -1
- package/dist/vega/p-c84aa55a.js +0 -1
- package/dist/vega/p-cd382652.entry.js +0 -1
- package/dist/vega/p-cf5c6172.entry.js +0 -1
- package/dist/vega/p-da42fde0.js +0 -1
- package/dist/vega/p-dc0f7ef1.entry.js +0 -1
- package/dist/vega/p-dcd3b421.entry.js +0 -1
- package/dist/vega/p-ea4b5520.entry.js +0 -1
- package/dist/vega/p-eb78a2f2.entry.js +0 -1
- package/dist/vega/p-ec2a1d4c.js +0 -1
- package/dist/vega/p-fdf6f368.js +0 -1
- package/dist/vega/p-ffe8a826.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,u as e,k as a,v as r,h as s,w as o,x as n,y as i,z as u,E as l,G as d,H as m,I as
|
|
1
|
+
import{t,u as e,k as a,v as r,h as s,w as o,x as n,y as i,z as u,E as l,G as d,H as m,I as c,J as f,K as p,L as $,l as b,N as v,B as g,O as h}from"./p-b2488adb.js";import{L as x}from"./p-6e1ab235.js";import{G as T,F as w,a as y,b as j,c as k,d as O,T as I}from"./p-d4ea8e22.js";import{g as N,c as C}from"./p-49a2e141.js";import{i as E}from"./p-262ec334.js";import{p as R}from"./p-0c667d6a.js";import{B as A}from"./p-ed45b3b6.js";import{s as F}from"./p-d27ae9ff.js";import{F as S}from"./p-dcf162e9.js";class D{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const G={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},_=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${G[e]}-${t[e]}`)).join(" "):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},B={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},H=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-m-${t}`:n(t)?Object.keys(t).map((e=>`${r}v-${B[e]}-${t[e]}`)).join(" "):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},J={x:"gap-col",y:"gap-row"},L=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${J[e]}-${t[e]}`)).join(" "):(x.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},z=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],K=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],V=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return i(t)?`${r}v-grid-cols-${t}`:(x.warn(`The column value ${t} is invalid, it must be a value of: `,K),"")}},W=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return u(t)?`${r}v-grid-rows-${t}`:(x.warn(`The row value ${t} is invalid, it must be a value of: `,z),"")}},M=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-justify-items-${t}`:(x.warn(`The grid justifyItems value ${t} is invalid, it must be a value of: `,T),"")}},P=new class{format(e){const a=N();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&E(e)?e:t(e)?(e=C(e))[a]:null:Number(e)}},U=new class{format(e){if(d(e))return e;if(t(e)){const t=N();return(e=C(e))[t]}return null}},q=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(x.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},Q=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-flex-${t}`:(x.warn(`The direction value ${t} is invalid, it must be a value of: `,w),"")}},X=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-items-${t}`:(x.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,y),"")}},Y=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return f(t)?`${r}v-justify-${this.mapInput(t)}`:(x.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,j),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},Z=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?`${r}v-flex-${t}`:(x.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,k),"")}},tt=new class{format(e){const a=N();return t(e)?(e=C(e))[a]:e}},et=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return $(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(x.warn(`The box display value ${t} is invalid, it must be a value of: `,O),"")}},at=new class{format(e){const a=N();return t(e)?(e=C(e),R(e[a])):R(e)}},rt={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},st=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return b(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:v(t)?Object.keys(t).map((e=>`${r}v-rounded-${rt[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},ot=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return h(t)?`${r}v-text-${t}`:(x.warn(`The text align value ${t} is invalid, it must be a value of: `,I),"")}};class nt{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${A[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const it={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},ut=new class extends nt{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>it[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},lt={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},dt=new class extends nt{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>lt[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},mt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},ct=new class extends nt{formatToken(t){return b(t)?`border-radius:${g[t]}px`:v(t)?this.getDirectionKeys(t).map((e=>mt[e].map((a=>`${a}:${g[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}getDirectionKeys(t){const e=Object.keys(t);return S.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?F(e,(e=>t[e]),void 0,Object.keys(g)):e}},ft=new class{format(t,e){switch(e){case"padding":return _.format(t);case"margin":return H.format(t);case"gap":return L.format(t);case"gridColumn":return V.format(t);case"gridRow":return W.format(t);case"gridJustifyItems":return M.format(t);case"size":return P.format(t);case"translocation":return U.format(t);case"display":return q.format(t);case"flexDirection":return Q.format(t);case"flexAlignItem":return X.format(t);case"flexJustifyContent":return Y.format(t);case"flexWrap":return Z.format(t);case"boxDisplay":return et.format(t);case"widthAndHeight":return at.format(t);case"corners":return st.format(t);case"textAlign":return ot.format(t);case"paddingStyle":return ut.format(t);case"marginStyle":return dt.format(t);case"cornersStyle":return ct.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return tt.format(t)}};export{K as G,ft as R,z as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as o,H as e,g as i}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{j as r,f as l,k as
|
|
1
|
+
import{r as t,h as o,H as e,g as i}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{j as r,f as l,k as n}from"./p-ad89f499.js";import{a as d}from"./p-528748fa.js";import{c as a,M as h,V as c,I as p}from"./p-6e1ab235.js";import{V as b,I as v}from"./p-8ce9e214.js";import{v as m}from"./p-4866e390.js";import{h as g,s as f}from"./p-f0e828d8.js";import{R as y}from"./p-94a064a3.js";import{P as w}from"./p-81dd00d0.js";import{f as u}from"./p-8a3d12e6.js";import"./p-b2488adb.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-091fbc35.js";import"./p-2d0d575f.js";import"./p-cb378636.js";import"./p-3390bb20.js";import"./p-b75ee3ba.js";import"./p-49a2e141.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-dcf162e9.js";import"./p-982747ef.js";var k=function(t,o,e,i){var s,r=arguments.length,l=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,o,e,i);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(l=(r<3?s(l):r>3?s(o,e,l):s(o,e))||l);return r>3&&l&&Object.defineProperty(o,e,l),l};class j extends c{componentWillLoad(){this.appendAllStateStyles()}watchBorder(){this.appendStateStyles(this.border,"border"),this.makeBorderColorAfterBorder()}watchShadow(){this.appendStateStyles(this.shadow,"shadow")}watchBorderColor(){this.appendStateStyles(this.borderColor,"borderColor"),this.makeBorderColorAfterBorder()}watchBackgroundColor(){this.appendStateStyles(this.backgroundColor,"backgroundColor")}appendStateStyles(t,o){var e;if(null===(e=this.host.shadowRoot.querySelector(`style#state-styles-${o}`))||void 0===e||e.remove(),r(t,o)){const e=document.createElement("style");e.setAttribute("id",`state-styles-${o}`),m.nonce&&e.setAttribute("nonce",m.nonce),e.innerHTML=g.sanitize(r(t,o),f),this.host.shadowRoot.append(e)}}makeBorderColorAfterBorder(){const t=this.host.shadowRoot.querySelector("style#state-styles-borderColor"),o=this.host.shadowRoot.querySelector("style#state-styles-border");t&&o&&o.after(t)}appendAllStateStyles(){this.appendStateStyles(this.backgroundColor,"backgroundColor"),this.appendStateStyles(this.border,"border"),this.appendStateStyles(this.borderColor,"borderColor"),this.appendStateStyles(this.shadow,"shadow")}}k([a()],j.prototype,"host",void 0),k([a()],j.prototype,"backgroundColor",void 0),k([a()],j.prototype,"borderColor",void 0),k([a()],j.prototype,"border",void 0),k([a()],j.prototype,"shadow",void 0),k([h("componentWillLoad")],j.prototype,"componentWillLoad",null),k([h("watchBorder")],j.prototype,"watchBorder",null),k([h("watchShadow")],j.prototype,"watchShadow",null),k([h("watchBorderColor")],j.prototype,"watchBorderColor",null),k([h("watchBackgroundColor")],j.prototype,"watchBackgroundColor",null);var C=function(t,o,e,i){var s,r=arguments.length,l=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,o,e,i);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(l=(r<3?s(l):r>3?s(o,e,l):s(o,e))||l);return r>3&&l&&Object.defineProperty(o,e,l),l};class S extends c{constructor(){super(...arguments),this.paddingStyleRef=null,this.marginStyleRef=null,this.cornersStyleRef=null}setDefaultStyle(){this.generatePaddingStyle(),this.generateMarginStyle(),this.generateCornersStyle()}generatePaddingStyle(){const t=l(this.padding,"paddingStyle");this.attachStyle("padding",t)}generateMarginStyle(){const t=l(this.margin,"marginStyle");this.attachStyle("margin",t)}generateCornersStyle(){const t=l(this.corners,"cornersStyle");this.attachStyle("corners",t)}attachStyle(t,o){if(o){const e=`${t}StyleRef`,i=this.host.shadowRoot;this[e]||(this[e]=document.createElement("style"),m.nonce&&this[e].setAttribute("nonce",m.nonce),i.appendChild(this[e])),this[e].innerHTML=g.sanitize(o,f)}}}C([a()],S.prototype,"host",void 0),C([a()],S.prototype,"padding",void 0),C([a()],S.prototype,"margin",void 0),C([a()],S.prototype,"corners",void 0),C([h("componentWillLoad")],S.prototype,"setDefaultStyle",null),C([h("watchPaddingChange")],S.prototype,"generatePaddingStyle",null),C([h("watchMarginChange")],S.prototype,"generateMarginStyle",null),C([h("watchCornersChange")],S.prototype,"generateCornersStyle",null);var B=function(t,o,e,i){var s,r=arguments.length,l=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,o,e,i);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(l=(r<3?s(l):r>3?s(o,e,l):s(o,e))||l);return r>3&&l&&Object.defineProperty(o,e,l),l};const L=class{constructor(o){t(this,o),this.globalSlimmers={},this.pageResizeSlimmer=new w,this.stateStyleController=new j,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.responsiveStyleController=new S}watchPaddingChange(){}watchMarginChange(){}watchBorder(){}watchShadow(){}watchBorderColor(){}watchBackgroundColor(){}watchCornersChange(){}render(){const t=[l(this.padding,"padding"),l(this.margin,"margin"),l(this.display,"boxDisplay"),l(this.corners,"corners"),n(this.borderStyle),y.formatCustom(this.responsiveClass)],i=Object.assign({width:l(this.width,"widthAndHeight"),height:l(this.height,"widthAndHeight"),minHeight:l(this.minHeight,"widthAndHeight"),maxHeight:l(this.maxHeight,"widthAndHeight"),order:this.order&&`${y.formatCustom(this.order)}`,alignSelf:this.alignSelf&&`${y.formatCustom(this.alignSelf)}`,justifySelf:this.justifySelf&&`${y.formatCustom(this.justifySelf)}`},u(this.flex,this.flexGrow,this.flexShrink,this.flexBasis));return this.gridArea?i.gridArea=`${y.formatCustom(this.gridArea)}`:(i.gridColumn=this.gridColumn&&`${y.formatCustom(this.gridColumn)}`,i.gridRow=this.gridRow&&`${y.formatCustom(this.gridRow)}`),s(o(e,{style:i,class:d(t)},o("slot",null)),this.host)}get host(){return i(this)}static get watchers(){return{padding:["watchPaddingChange"],margin:["watchMarginChange"],border:["watchBorder"],shadow:["watchShadow"],borderColor:["watchBorderColor"],backgroundColor:["watchBackgroundColor"],corners:["watchCornersChange"]}}};B([v()],L.prototype,"globalSlimmers",void 0),B([p()],L.prototype,"pageResizeSlimmer",void 0),B([p()],L.prototype,"stateStyleController",void 0),B([p()],L.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B([p()],L.prototype,"responsiveStyleController",void 0),L.style=":host(.v-block),.v-block{display:block}:host(.v-inline-block),.v-inline-block{display:inline-block}:host(.v-hidden),.v-hidden{display:none}@media (min-width: 320px){:host(.S\\:v-block),.S\\:v-block{display:block}:host(.S\\:v-inline-block),.S\\:v-inline-block{display:inline-block}:host(.S\\:v-hidden),.S\\:v-hidden{display:none}}@media (min-width: 768px){:host(.M\\:v-block),.M\\:v-block{display:block}:host(.M\\:v-inline-block),.M\\:v-inline-block{display:inline-block}:host(.M\\:v-hidden),.M\\:v-hidden{display:none}}@media (min-width: 1024px){:host(.L\\:v-block),.L\\:v-block{display:block}:host(.L\\:v-inline-block),.L\\:v-inline-block{display:inline-block}:host(.L\\:v-hidden),.L\\:v-hidden{display:none}}@media (min-width: 1440px){:host(.XL\\:v-block),.XL\\:v-block{display:block}:host(.XL\\:v-inline-block),.XL\\:v-inline-block{display:inline-block}:host(.XL\\:v-hidden),.XL\\:v-hidden{display:none}}:host(.v-border-solid),.v-border-solid{border-style:solid}:host(.v-border-dashed),.v-border-dashed{border-style:dashed}:host(.v-border-dotted),.v-border-dotted{border-style:dotted}:host(.v-border-double),.v-border-double{border-style:double}:host(.v-border-none),.v-border-none{border-style:none}:host{display:block}";export{L as vega_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as c}from"./p-8ce9e214.js";import{F as m}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as c}from"./p-8ce9e214.js";import{F as m}from"./p-3a49089e.js";import{C as u}from"./p-328dbe8e.js";import{D as f}from"./p-526e3634.js";import{i as g,K as b,a as v}from"./p-fcefb62c.js";import{F as x}from"./p-cb378636.js";import{C as y}from"./p-2d0d575f.js";import{c as j}from"./p-d7790113.js";import{a as w}from"./p-528748fa.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-3a93730e.js";import"./p-091fbc35.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-a58cacca.js";import"./p-46cab60a.js";import"./p-5f377954.js";import"./p-dcf162e9.js";import"./p-982747ef.js";const I=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!1===t.autoValidation},{payloadKey:"BUTTON_VARIANT_IS_PRIMARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"primary"===t.buttonVariant},{payloadKey:"BUTTON_VARIANT_IS_SECONDARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"secondary"===t.buttonVariant}];var A=function(t,e,i,a){var r,s=arguments.length,p=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(p=(s<3?r(p):s>3?r(e,i,p):r(e,i))||p);return s>3&&p&&Object.defineProperty(e,i,p),p};const V=class{constructor(i){t(this,i),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.formFieldController=new m({propertyRules:[{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new p({maxValue:t}):null}],defaultValue:0,attributeGetter:t=>this[t],touchableAreaGetter:()=>this.touchableAreaGetter(),inputContainerGetter:()=>this.stepperContainerRef}),this.changeEventEmitter=j(V,g),this.inputEventPrevent=new u([b,g],(()=>this.stepperContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(I),this.max=9999,this.min=0,this.value=0,this.label="",this.inputDisabled=null,this.disabled=!1,this.isValid=null,this.autoValidation=!0,this.buttonVariant="primary",this.onDecrease=()=>{this.value>this.max?this.value=this.max:this.value>this.min&&(this.value-=1)},this.onIncrease=()=>{this.value<this.max&&(this.value+=1)},this.onChildInputChange=t=>{""!==t.detail&&(this.value=n(t.detail))},this.handleInputBlur=t=>{""===t.host.value&&(this.value=this.min)},this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValue(){const t=h(n(this.value,0),this.min,this.max);this.value=t,this.inputRef.value=t.toString(),this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}render(){return o(i(a,{class:w(["vega-flex-shrink-0",this.inputDisabled||this.disabled?"disabled":""])},this.renderLabelDom(),i("div",{class:{"vega-stepper-container":!0,"vega-stepper-container-edited":this.inputDisabled},ref:t=>this.stepperContainerRef=t},i("vega-button-circle",{label:"Decrease",showTooltip:!1,icon:"minus-sign",ref:t=>{f.addUniqueObserverToNode(t,v,(()=>this.onDecrease()))},disabled:this.value<=this.min||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}),i("vega-input",{size:"small",type:"number",max:this.max,min:this.min,value:`${this.value}`,disabled:this.inputDisabled||this.disabled,showClearIcon:!1,ref:t=>(f.addUniqueObserverToNode(t,b,(t=>this.handleInputBlur(t))),f.addUniqueObserverToNode(t,g,(t=>this.onChildInputChange(t))),this.inputRef=t),"data-aria-label":this.label||"stepper"}),i("vega-button-circle",{label:"Increase",showTooltip:!1,ref:t=>{f.addUniqueObserverToNode(t,v,(()=>this.onIncrease()))},icon:"plus-sign",disabled:this.value>=this.max||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"})),i("div",{class:"aria-announcement","aria-live":"polite","aria-atomic":"true"},`${this.label||"stepper"}: ${this.value}`)),this.host)}renderLabelDom(){return this.label?i("label",{class:"v-text-center v-text-medium-typeset-1",htmlFor:this.stepperId},this.label):null}get host(){return r(this)}static get watchers(){return{value:["watchValue"]}}};A([c()],V.prototype,"globalSlimmers",void 0),A([l()],V.prototype,"formFieldController",void 0),A([l()],V.prototype,"changeEventEmitter",void 0),A([l()],V.prototype,"inputEventPrevent",void 0),A([l()],V.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),V.style=':host{display:inline-block;line-height:normal}:host>label{display:block;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host>div{display:inline-flex;justify-content:center;align-items:center}:host>label+div{margin-top:8px}:host div.vega-stepper-container-edited vega-input::part(container-wrapper){padding-left:0px;padding-right:0px}:host(.disabled) vega-input::part(input-container){text-align:center;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));padding:0px;border:0;box-shadow:unset}:host(.disabled) vega-input::part(input-container):hover{border:0}:host(.disabled) vega-input::part(input){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:0}:host vega-input::part(input){width:48px;text-align:center;-moz-appearance:textfield}:host vega-input::part(input)::-webkit-inner-spin-button{-webkit-appearance:none}:host vega-input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none}:host vega-input::part(error){display:none}:host vega-input::part(container-wrapper){padding-left:8px;padding-right:8px}:host .vega-error{display:none}:host .vega-stepper-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-stepper-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-stepper-container.error vega-input::part(input-container):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))}.aria-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}';export{V as vega_stepper}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as e,h as t,H as a,g as r}from"./p-6b2342e0.js";import{i as s}from"./p-fcefb62c.js";import{c as o}from"./p-d7790113.js";import{c as n}from"./p-3a620268.js";import{s as p}from"./p-519a7d55.js";import{I as h}from"./p-6e1ab235.js";import{V as l,I as d}from"./p-8ce9e214.js";import{F as c}from"./p-3a49089e.js";import{T as g}from"./p-7c0b4c36.js";import{F as v}from"./p-cb378636.js";import{C as m}from"./p-2d0d575f.js";import"./p-6a334573.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-46cab60a.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-3a93730e.js";import"./p-091fbc35.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a58cacca.js";var b=function(i,e,t,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(i,e,t,a);else for(var n=i.length-1;n>=0;n--)(r=i[n])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const f=class{constructor(t){i(this,t),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.formFieldController=new c({propertyRules:[{propertyName:"required",ruleFactory:i=>i?new g:null}],validationRulesName:"validationRules",defaultValue:!1,attributeGetter:i=>this[i],inputContainerGetter:()=>this.toggleSwitchContainer,touchableAreaGetter:()=>[this.toggleSwitchContainer]}),this.changeEventEmitter=o(f,s),this.checked=!1,this.value=!1,this.size="default",this.required=!1,this.optional=!1,this.disabled=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null,this.toggleSwitch=()=>{this.disabled||(this.checked=!this.checked)},this.updateValue=i=>{this.checked=i.currentTarget.checked,i.stopPropagation()}}watchCheckedChange(){this.value=this.checked,this.changeEventEmitter.emit(this.checked),m.notify(v,{host:this.host,detail:this.value})}watchValue(i){this.checked=!0===i}watchValidationRules(){}componentWillLoad(){this.checked||!0!==this.value?this.value=this.checked:this.checked=!0}render(){let i=this.checked?"vega-container vega-container-checked":"vega-container";return i+=this.disabled?" vega-container-disabled":"",i+="small"===this.size?" vega-container-small-size":"",p(t(a,null,t("vega-flex",{gap:"size-8",ref:i=>this.toggleSwitchContainer=i},t("div",{class:`${i} vega-flex-shrink-0 v-min-w-min`},t("input",{type:"checkbox",name:"switch",disabled:this.disabled,checked:this.checked,onChange:this.updateValue,"aria-label":this.label||"No label defined",role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:this.disabled?"v-bg-tertiary":"v-bg-primary"})),this.renderLabelDom())),this.host)}renderLabelDom(){return this.label?t("div",{class:"vega-flex-basis-0 vega-flex-grow"},t("vega-field-label",{onClick:this.toggleSwitch,disabled:this.disabled,label:this.label,isFieldRequired:this.required,optional:this.optional})):null}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"],value:["watchValue"],validationRules:["watchValidationRules"]}}};b([d()],f.prototype,"globalSlimmers",void 0),b([h()],f.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b([h()],f.prototype,"formFieldController",void 0),b([h()],f.prototype,"changeEventEmitter",void 0),f.style=':host{display:inline-block}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;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 .vega-hidden{display:none}div.vega-container{display:flex;justify-content:flex-start;align-items:center;border-radius:9999px;position:relative;box-sizing:content-box;height:24px;width:48px;padding:4px;background-color:rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))}div.vega-container:hover{background-color:rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))}div.vega-container.vega-container-checked{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}div.vega-container.vega-container-checked:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}div.vega-container.vega-container-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}div.vega-container.vega-container-checked.vega-container-disabled{background-color:rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))}div.vega-container-small-size{box-sizing:border-box;height:20px;width:32px;padding:2px}div.vega-container>span{margin-left:0px;transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}div.vega-container-checked>span{margin-left:24px}div.vega-container-checked.vega-container-small-size>span{margin-left:12px}div.vega-container>input{position:absolute;cursor:pointer;opacity:0;left:0px;top:0px;width:100%;height:100%;margin:0px;-webkit-tap-highlight-color:transparent}div.vega-container input:disabled{cursor:default}div.vega-container>span{display:inline-block;border-radius:9999px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));width:24px;height:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container-small-size{height:20px}div.vega-container-small-size>span{width:16px;height:16px}div{align-self:center}';export{f as vega_toggle_switch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,r as o,c as r,H as i,g as a}from"./p-6b2342e0.js";import{s as l}from"./p-519a7d55.js";import{c as s,V as n,M as d,I as c}from"./p-6e1ab235.js";import{V as v,I as p}from"./p-8ce9e214.js";import{V as h}from"./p-724df1f5.js";import{D as f}from"./p-11e2dcf5.js";import{a as g,i as u,A as b,p as m,B as x,C as w}from"./p-05dc6718.js";import{g as C}from"./p-8b5d3a52.js";import{c as y}from"./p-3a620268.js";import{t as j}from"./p-aacf6920.js";import{c as F}from"./p-6629a68b.js";import{C as R}from"./p-2d0d575f.js";import{F as L}from"./p-a528714c.js";import{F as k}from"./p-518e0a24.js";import{F as z}from"./p-0bb860cc.js";import{D as E}from"./p-b19b1c08.js";import{T as M}from"./p-fdf6f368.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-ec2a1d4c.js";import"./p-c84aa55a.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-3a93730e.js";import"./p-fea75b87.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-10fa27d2.js";import"./p-280cbcdb.js";var V=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class I extends n{render(){return e(t,null,e("vega-field-label",{isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label}),this.vegaFileUploaderContainerRenderer.render(),this.hint?e("vega-hint",null,this.hint):null,this.vegaFileUploaderFileListRenderer.render())}}V([s()],I.prototype,"required",void 0),V([s()],I.prototype,"optional",void 0),V([s()],I.prototype,"disabled",void 0),V([s()],I.prototype,"label",void 0),V([s()],I.prototype,"hint",void 0),V([s()],I.prototype,"vegaFileUploaderContainerRenderer",void 0),V([s()],I.prototype,"vegaFileUploaderFileListRenderer",void 0);var U=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class O extends n{constructor(){super(...arguments),this.handleDropAreaClick=e=>{e.stopPropagation(),this.shouldDisableUploadButton()||this.triggerFileInputClick()},this.triggerFileInputClick=()=>{this.inputElementRef.click()},this.inputChangeHandler=e=>{e.stopPropagation();const t=this.getVegaFilesFromFileList(e.target.files);this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(t)),this.inputElementRef.value=""},this.dropHandler=e=>{var t;if(e.preventDefault(),!this.shouldDisableUploadButton()){const o=this.getVegaFilesFromFileList(this.dropFileFilterController.process(null===(t=e.dataTransfer)||void 0===t?void 0:t.files));this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(o))}}}getUploaderContainerRef(){return this.uploaderContainerRef}render(){return e("div",{class:"vega-file-uploader-container",ref:e=>this.uploaderContainerRef=e},e("input",{onChange:this.inputChangeHandler,type:"file",multiple:!this.fileLimitController.isSingleMode(),accept:this.accept,style:{display:"none"},ref:e=>this.inputElementRef=e}),"uploadButton"===this.variant?this.renderUploadButton():this.renderUploadDropArea())}renderUploadButton(){return e("vega-button",{label:"Upload Document",icon:h.getIconKey("arrow-up-from-line"),variant:"secondary",size:"small",disabled:this.shouldDisableUploadButton(),ref:e=>{f.addUniqueObserverToNode(e,g,this.triggerFileInputClick)}})}renderUploadDropArea(){return e("vega-box",{class:{"vega-file-upload-area":!0,disabled:this.shouldDisableUploadButton()},padding:"size-24",border:"border-input-field",borderStyle:"dashed",backgroundColor:"bg-tertiary",corners:"rounded-8",tabIndex:0,onDrop:this.dropHandler,onDragEnter:this.preventDefaultBehavior,onDragOver:this.preventDefaultBehavior,onClick:this.handleDropAreaClick,onKeyDown:y()},e("vega-flex",{gap:"size-8",alignItems:"center",justifyContent:"center"},e("vega-icon",{color:"text-link",icon:h.getIconKey("arrow-up-from-line")}),e("vega-font",{color:"text-link",variant:"font-btn-label"},this.translationSlimmer.t("Select or drop your file here"))))}preventDefaultBehavior(e){e.preventDefault()}selectFileChangeEventEmitHandler(e){e&&e.length&&(this.selectFileChangeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value&&this.value.length?(new Array).concat(this.value,e):e))}getVegaFilesFromFileList(e){const t=[];return e&&e.length&&Array.from(e).map((e=>{t.push({key:C(),name:e.name,url:e})})),t}shouldDisableUploadButton(){return this.disabled||!!(this.value&&this.maxCount&&this.value.length>=this.maxCount)}filterExceedLimitFiles(e){const t=Number(this.maxCount);if(!isNaN(t)&&t&&e.length){const o=Math.max(0,t-(this.value?this.value.length:0));return e.slice(0,o)}return e}}h.register({"arrow-up-from-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.3V208 320c0 17.7 14.3 32 32 32s32-14.3 32-32V208 141.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg>'}}),U([s()],O.prototype,"variant",void 0),U([s()],O.prototype,"accept",void 0),U([s()],O.prototype,"disabled",void 0),U([s()],O.prototype,"value",void 0),U([s()],O.prototype,"selectFileChangeEventEmitter",void 0),U([s()],O.prototype,"vegaFileUploaderValueController",void 0),U([s()],O.prototype,"dropFileFilterController",void 0),U([s()],O.prototype,"translationSlimmer",void 0),U([s()],O.prototype,"fileLimitController",void 0),U([s()],O.prototype,"maxCount",void 0);var A=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class D extends n{constructor(){super(...arguments),this.fileRemoveHandler=e=>{this.removeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value.filter((t=>t!==e)))},this.fileReUploadHandler=e=>{this.retryEventEmitter.emit(e)},this.filePreviewHandler=e=>{this.previewEventEmitter.emit(e)}}render(){const t=!this.value||this.value.length<1;return e("div",{class:{"vega-file-uploader-file-list":!0,"vega-file-list-hidden":t}},!t&&this.value.map((t=>e("vega-box",{key:t.key,class:"vega-file-uploader-file",padding:"size-8",corners:"rounded-8"},e("vega-flex",{alignItems:"start",justifyContent:"space-between"},e("vega-flex",{class:"vega-file-status-and-name",gap:"size-8",alignItems:"start"},e("div",{style:{paddingTop:"3px"}},this.vegaFileUploaderFileStatusRenderer.render(t.status,t.uploadingPercent)),e("vega-flex",{gap:"size-4",direction:"col"},e("vega-font",{color:"done"===t.status||"error"===t.status?"text-primary":"text-secondary",variant:"font-field-label"},t.name),"error"===t.status&&t.errorMessage&&e("vega-font",{color:"text-error",variant:"font-footnote1-short"},t.errorMessage))),e("vega-flex",{gap:"size-4",class:"vega-file-list-buttons",justifyContent:"end"},t.previewable&&e("vega-button-circle",{class:"vega-file-preview-button",variant:"icon-only",size:"small",icon:"zoom-in",iconColor:"text-secondary",label:"Preview",tooltip:{disableInteractive:!0},ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.filePreviewHandler(t)}))}}),"error"===t.status&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("arrow-rotate-right"),iconColor:"text-secondary",label:"Retry",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileReUploadHandler(t)}))}}),e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("trash-can"),iconColor:"text-secondary",label:"Delete",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileRemoveHandler(t)}))}})))))))}}h.register({"trash-can":j,"arrow-rotate-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M456 224c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24s-24 10.7-24 24v80.1l-20-23.5C371 63.4 309.1 32 240 32C116.3 32 16 132.3 16 256s100.3 224 224 224c50.4 0 97-16.7 134.4-44.8c10.6-8 12.7-23 4.8-33.6s-23-12.7-33.6-4.8C316.2 418.9 279.7 432 240 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c54.3 0 102.9 24.6 135.2 63.4l.1 .2 0 0L402.9 176H312c-13.3 0-24 10.7-24 24s10.7 24 24 24H456z"/></svg>'}}),A([s()],D.prototype,"value",void 0),A([s()],D.prototype,"disabled",void 0),A([s()],D.prototype,"vegaFileUploaderFileStatusRenderer",void 0),A([s()],D.prototype,"removeEventEmitter",void 0),A([s()],D.prototype,"vegaFileUploaderValueController",void 0),A([s()],D.prototype,"retryEventEmitter",void 0),A([s()],D.prototype,"previewEventEmitter",void 0);class S extends n{render(t,o){switch(t){case"uploading":return e("vega-loading-indicator",Object.assign({class:"vega-file-list-status",mode:o?"determinate":"indeterminate",size:"micro"},o?{percent:o}:{}));case"done":return e("vega-icon",{class:"vega-file-list-status",color:"text-success",icon:h.getIconKey("circle-check-regular")});case"error":return e("vega-icon",{class:"vega-file-list-status",color:"text-error",icon:h.getIconKey("circle-xmark")});default:return e("vega-loading-indicator",{class:"vega-file-list-status",mode:"determinate",size:"micro"})}}}h.register({"circle-check-regular":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'},"circle-xmark":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175V175zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'}});var B=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class H extends n{valueChangeHandler(e){!e||Array.isArray(e)?(this.changeEventEmitter.emit(e),R.notify(L,{host:this.host,detail:this.value})):e&&!Array.isArray(e)&&this.setValue(null)}setValue(e){this.value=e}}B([s()],H.prototype,"host",void 0),B([s({writable:!0})],H.prototype,"value",void 0),B([s()],H.prototype,"changeEventEmitter",void 0),B([d("watchValue")],H.prototype,"valueChangeHandler",null);var N=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class P extends n{isSingleMode(){return 1===Number(this.maxCount)}checkMaxCount(){null!==this.maxCount&&this.maxCount<1&&(this.maxCount=null)}}N([s({writable:!0})],P.prototype,"maxCount",void 0),N([d("componentDidLoad"),d("watchMaxCount")],P.prototype,"checkMaxCount",null);var q=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const G=class{constructor(e){o(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaSelectedFileChange=r(this,"vegaSelectedFileChange",7),this.selectedFileChange=r(this,"selectedFileChange",7),this.vegaRemove=r(this,"vegaRemove",7),this.remove=r(this,"remove",7),this.vegaRetry=r(this,"vegaRetry",7),this.retry=r(this,"retry",7),this.vegaPreview=r(this,"vegaPreview",7),this.preview=r(this,"preview",7),this.globalSlimmers={},this.translationSlimmer=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new z:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaFileUploaderContainerRenderer.getUploaderContainerRef(),touchableAreaGetter:()=>[this.vegaFileUploaderContainerRenderer.getUploaderContainerRef()]}),this.vegaFileUploaderRenderer=new I,this.vegaFileUploaderContainerRenderer=new O,this.vegaFileUploaderFileListRenderer=new D,this.vegaFileUploaderFileStatusRenderer=new S,this.vegaFileUploaderValueController=new H,this.dropFileFilterController=new E,this.fileLimitController=new P,this.changeEventEmitter=F(G,u),this.selectFileChangeEventEmitter=F(G,b),this.removeEventEmitter=F(G,m),this.retryEventEmitter=F(G,x),this.previewEventEmitter=F(G,w),this.label="",this.variant="uploadArea",this.hint="",this.value=[],this.disabled=!1,this.maxCount=null,this.required=!1,this.optional=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchValue(e){}watchMaxCount(){}watchValidationRules(){}render(){return l(e(i,null,this.vegaFileUploaderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],maxCount:["watchMaxCount"],validationRules:["watchValidationRules"]}}};q([p()],G.prototype,"globalSlimmers",void 0),q([c()],G.prototype,"translationSlimmer",void 0),q([c()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([c()],G.prototype,"formFieldController",void 0),q([c()],G.prototype,"vegaFileUploaderRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderContainerRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderFileListRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderFileStatusRenderer",void 0),q([c()],G.prototype,"vegaFileUploaderValueController",void 0),q([c()],G.prototype,"dropFileFilterController",void 0),q([c()],G.prototype,"fileLimitController",void 0),q([c()],G.prototype,"changeEventEmitter",void 0),q([c()],G.prototype,"selectFileChangeEventEmitter",void 0),q([c()],G.prototype,"removeEventEmitter",void 0),q([c()],G.prototype,"retryEventEmitter",void 0),q([c()],G.prototype,"previewEventEmitter",void 0),G.style=':host{display:inline-block;text-align:left;width:100%;line-height:normal}:host .vega-file-uploader-container .vega-file-upload-area{text-align:center}:host .vega-file-uploader-container .vega-file-upload-area:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))}:host .vega-file-uploader-container .vega-file-upload-area:hover vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:hover vega-font{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-file-uploader-container .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-file-uploader-container .vega-file-upload-area:active{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area:active vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:active vega-font{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area.disabled{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));outline:none}:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-icon,:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-file-uploader-container vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error .vega-file-upload-area{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-file-uploader-container.error .vega-file-upload-area:active{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error vega-button::part(button),:host .vega-file-uploader-container.error vega-button::part(button):hover{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1));border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error vega-button::part(button):hover{background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-file-uploader-container.error vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error vega-button::part(button):active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-file-uploader-file-list .vega-file-uploader-file .vega-file-preview-button{visibility:hidden}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover{background-color:rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover .vega-file-preview-button{visibility:visible}:host .vega-file-uploader-file-list .vega-file-list-buttons{margin-left:8px;flex-shrink:0}:host .vega-file-uploader-file-list .vega-file-list-status svg{width:16px;height:16px}:host .vega-file-uploader-file-list .vega-file-status-and-name{padding-top:5px}:host .vega-file-uploader-file-list .vega-file-status-and-name vega-font{word-break:break-word}:host vega-field-label{margin-bottom:8px}:host .vega-file-uploader-file-list{margin-top:8px}:host .vega-file-uploader-file-list.vega-file-list-hidden{display:none}: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 .vega-hidden{display:none}';export{G as vega_file_uploader}
|
|
1
|
+
import{h as e,F as t,r as o,c as r,H as i,g as a}from"./p-6b2342e0.js";import{s as l}from"./p-519a7d55.js";import{c as s,V as n,M as c,I as d}from"./p-6e1ab235.js";import{V as v,I as p}from"./p-8ce9e214.js";import{V as h}from"./p-724df1f5.js";import{D as f}from"./p-526e3634.js";import{a as g,i as u,B as b,q as m,C as x,D as w}from"./p-fcefb62c.js";import{g as C}from"./p-8b5d3a52.js";import{c as y}from"./p-3a620268.js";import{t as j}from"./p-aacf6920.js";import{c as F}from"./p-d7790113.js";import{C as R}from"./p-2d0d575f.js";import{F as L}from"./p-cb378636.js";import{F as k}from"./p-3a49089e.js";import{F as z}from"./p-0bb860cc.js";import{D as E}from"./p-b19b1c08.js";import{T as M}from"./p-7fbd11b0.js";import"./p-1704ff25.js";import"./p-9a6bd32c.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-46cab60a.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-3a93730e.js";import"./p-091fbc35.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a58cacca.js";import"./p-280cbcdb.js";var V=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class I extends n{render(){return e(t,null,e("vega-field-label",{isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label}),this.vegaFileUploaderContainerRenderer.render(),this.hint?e("vega-hint",null,this.hint):null,this.vegaFileUploaderFileListRenderer.render())}}V([s()],I.prototype,"required",void 0),V([s()],I.prototype,"optional",void 0),V([s()],I.prototype,"disabled",void 0),V([s()],I.prototype,"label",void 0),V([s()],I.prototype,"hint",void 0),V([s()],I.prototype,"vegaFileUploaderContainerRenderer",void 0),V([s()],I.prototype,"vegaFileUploaderFileListRenderer",void 0);var U=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class O extends n{constructor(){super(...arguments),this.handleDropAreaClick=e=>{e.stopPropagation(),this.shouldDisableUploadButton()||this.triggerFileInputClick()},this.triggerFileInputClick=()=>{this.inputElementRef.click()},this.inputChangeHandler=e=>{e.stopPropagation();const t=this.getVegaFilesFromFileList(e.target.files);this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(t)),this.inputElementRef.value=""},this.dropHandler=e=>{var t;if(e.preventDefault(),!this.shouldDisableUploadButton()){const o=this.getVegaFilesFromFileList(this.dropFileFilterController.process(null===(t=e.dataTransfer)||void 0===t?void 0:t.files));this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(o))}}}getUploaderContainerRef(){return this.uploaderContainerRef}render(){return e("div",{class:"vega-file-uploader-container",ref:e=>this.uploaderContainerRef=e},e("input",{onChange:this.inputChangeHandler,type:"file",multiple:!this.fileLimitController.isSingleMode(),accept:this.accept,style:{display:"none"},ref:e=>this.inputElementRef=e}),"uploadButton"===this.variant?this.renderUploadButton():this.renderUploadDropArea())}renderUploadButton(){return e("vega-button",{label:"Upload Document",icon:h.getIconKey("arrow-up-from-line"),variant:"secondary",size:"small",disabled:this.shouldDisableUploadButton(),ref:e=>{f.addUniqueObserverToNode(e,g,this.triggerFileInputClick)}})}renderUploadDropArea(){return e("vega-box",{class:{"vega-file-upload-area":!0,disabled:this.shouldDisableUploadButton()},padding:"size-24",border:"border-input-field",borderStyle:"dashed",backgroundColor:"bg-tertiary",corners:"rounded-8",tabIndex:0,onDrop:this.dropHandler,onDragEnter:this.preventDefaultBehavior,onDragOver:this.preventDefaultBehavior,onClick:this.handleDropAreaClick,onKeyDown:y()},e("vega-flex",{gap:"size-8",alignItems:"center",justifyContent:"center"},e("vega-icon",{color:"text-link",icon:h.getIconKey("arrow-up-from-line")}),e("vega-font",{color:"text-link",variant:"font-btn-label"},this.translationSlimmer.t("Select or drop your file here"))))}preventDefaultBehavior(e){e.preventDefault()}selectFileChangeEventEmitHandler(e){e&&e.length&&(this.selectFileChangeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value&&this.value.length?(new Array).concat(this.value,e):e))}getVegaFilesFromFileList(e){const t=[];return e&&e.length&&Array.from(e).map((e=>{t.push({key:C(),name:e.name,url:e})})),t}shouldDisableUploadButton(){return this.disabled||!!(this.value&&this.maxCount&&this.value.length>=this.maxCount)}filterExceedLimitFiles(e){const t=Number(this.maxCount);if(!isNaN(t)&&t&&e.length){const o=Math.max(0,t-(this.value?this.value.length:0));return e.slice(0,o)}return e}}h.register({"arrow-up-from-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.3V208 320c0 17.7 14.3 32 32 32s32-14.3 32-32V208 141.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg>'}}),U([s()],O.prototype,"variant",void 0),U([s()],O.prototype,"accept",void 0),U([s()],O.prototype,"disabled",void 0),U([s()],O.prototype,"value",void 0),U([s()],O.prototype,"selectFileChangeEventEmitter",void 0),U([s()],O.prototype,"vegaFileUploaderValueController",void 0),U([s()],O.prototype,"dropFileFilterController",void 0),U([s()],O.prototype,"translationSlimmer",void 0),U([s()],O.prototype,"fileLimitController",void 0),U([s()],O.prototype,"maxCount",void 0);var D=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class A extends n{constructor(){super(...arguments),this.fileRemoveHandler=e=>{this.removeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value.filter((t=>t!==e)))},this.fileReUploadHandler=e=>{this.retryEventEmitter.emit(e)},this.filePreviewHandler=e=>{this.previewEventEmitter.emit(e)}}render(){const t=!this.value||this.value.length<1;return e("div",{class:{"vega-file-uploader-file-list":!0,"vega-file-list-hidden":t}},!t&&this.value.map((t=>e("vega-box",{key:t.key,class:"vega-file-uploader-file",padding:"size-8",corners:"rounded-8"},e("vega-flex",{alignItems:"start",justifyContent:"space-between"},e("vega-flex",{class:"vega-file-status-and-name",gap:"size-8",alignItems:"start"},e("div",{style:{paddingTop:"3px"}},this.vegaFileUploaderFileStatusRenderer.render(t.status,t.uploadingPercent)),e("vega-flex",{gap:"size-4",direction:"col"},e("vega-font",{color:"done"===t.status||"error"===t.status?"text-primary":"text-secondary",variant:"font-field-label"},t.name),"error"===t.status&&t.errorMessage&&e("vega-font",{color:"text-error",variant:"font-footnote1-short"},t.errorMessage))),e("vega-flex",{gap:"size-4",class:"vega-file-list-buttons",justifyContent:"end"},t.previewable&&e("vega-button-circle",{class:"vega-file-preview-button",variant:"icon-only",size:"small",icon:"zoom-in",iconColor:"text-secondary",label:"Preview",tooltip:{disableInteractive:!0},ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.filePreviewHandler(t)}))}}),"error"===t.status&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("arrow-rotate-right"),iconColor:"text-secondary",label:"Retry",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileReUploadHandler(t)}))}}),e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("trash-can"),iconColor:"text-secondary",label:"Delete",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileRemoveHandler(t)}))}})))))))}}h.register({"trash-can":j,"arrow-rotate-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M456 224c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24s-24 10.7-24 24v80.1l-20-23.5C371 63.4 309.1 32 240 32C116.3 32 16 132.3 16 256s100.3 224 224 224c50.4 0 97-16.7 134.4-44.8c10.6-8 12.7-23 4.8-33.6s-23-12.7-33.6-4.8C316.2 418.9 279.7 432 240 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c54.3 0 102.9 24.6 135.2 63.4l.1 .2 0 0L402.9 176H312c-13.3 0-24 10.7-24 24s10.7 24 24 24H456z"/></svg>'}}),D([s()],A.prototype,"value",void 0),D([s()],A.prototype,"disabled",void 0),D([s()],A.prototype,"vegaFileUploaderFileStatusRenderer",void 0),D([s()],A.prototype,"removeEventEmitter",void 0),D([s()],A.prototype,"vegaFileUploaderValueController",void 0),D([s()],A.prototype,"retryEventEmitter",void 0),D([s()],A.prototype,"previewEventEmitter",void 0);class S extends n{render(t,o){switch(t){case"uploading":return e("vega-loading-indicator",Object.assign({class:"vega-file-list-status",mode:o?"determinate":"indeterminate",size:"micro"},o?{percent:o}:{}));case"done":return e("vega-icon",{class:"vega-file-list-status",color:"text-success",icon:h.getIconKey("circle-check-regular")});case"error":return e("vega-icon",{class:"vega-file-list-status",color:"text-error",icon:h.getIconKey("circle-xmark")});default:return e("vega-loading-indicator",{class:"vega-file-list-status",mode:"determinate",size:"micro"})}}}h.register({"circle-check-regular":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'},"circle-xmark":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175V175zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'}});var B=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class H extends n{valueChangeHandler(e){!e||Array.isArray(e)?(this.changeEventEmitter.emit(e),R.notify(L,{host:this.host,detail:this.value})):e&&!Array.isArray(e)&&this.setValue(null)}setValue(e){this.value=e}}B([s()],H.prototype,"host",void 0),B([s({writable:!0})],H.prototype,"value",void 0),B([s()],H.prototype,"changeEventEmitter",void 0),B([c("watchValue")],H.prototype,"valueChangeHandler",null);var N=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class P extends n{isSingleMode(){return 1===Number(this.maxCount)}checkMaxCount(){null!==this.maxCount&&this.maxCount<1&&(this.maxCount=null)}}N([s({writable:!0})],P.prototype,"maxCount",void 0),N([c("componentDidLoad"),c("watchMaxCount")],P.prototype,"checkMaxCount",null);var q=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const G=class{constructor(e){o(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaSelectedFileChange=r(this,"vegaSelectedFileChange",7),this.selectedFileChange=r(this,"selectedFileChange",7),this.vegaRemove=r(this,"vegaRemove",7),this.remove=r(this,"remove",7),this.vegaRetry=r(this,"vegaRetry",7),this.retry=r(this,"retry",7),this.vegaPreview=r(this,"vegaPreview",7),this.preview=r(this,"preview",7),this.globalSlimmers={},this.translationSlimmer=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new z:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaFileUploaderContainerRenderer.getUploaderContainerRef(),touchableAreaGetter:()=>[this.vegaFileUploaderContainerRenderer.getUploaderContainerRef()]}),this.vegaFileUploaderRenderer=new I,this.vegaFileUploaderContainerRenderer=new O,this.vegaFileUploaderFileListRenderer=new A,this.vegaFileUploaderFileStatusRenderer=new S,this.vegaFileUploaderValueController=new H,this.dropFileFilterController=new E,this.fileLimitController=new P,this.changeEventEmitter=F(G,u),this.selectFileChangeEventEmitter=F(G,b),this.removeEventEmitter=F(G,m),this.retryEventEmitter=F(G,x),this.previewEventEmitter=F(G,w),this.label="",this.variant="uploadArea",this.hint="",this.value=[],this.disabled=!1,this.maxCount=null,this.required=!1,this.optional=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchValue(e){}watchMaxCount(){}watchValidationRules(){}render(){return l(e(i,null,this.vegaFileUploaderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],maxCount:["watchMaxCount"],validationRules:["watchValidationRules"]}}};q([p()],G.prototype,"globalSlimmers",void 0),q([d()],G.prototype,"translationSlimmer",void 0),q([d()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([d()],G.prototype,"formFieldController",void 0),q([d()],G.prototype,"vegaFileUploaderRenderer",void 0),q([d()],G.prototype,"vegaFileUploaderContainerRenderer",void 0),q([d()],G.prototype,"vegaFileUploaderFileListRenderer",void 0),q([d()],G.prototype,"vegaFileUploaderFileStatusRenderer",void 0),q([d()],G.prototype,"vegaFileUploaderValueController",void 0),q([d()],G.prototype,"dropFileFilterController",void 0),q([d()],G.prototype,"fileLimitController",void 0),q([d()],G.prototype,"changeEventEmitter",void 0),q([d()],G.prototype,"selectFileChangeEventEmitter",void 0),q([d()],G.prototype,"removeEventEmitter",void 0),q([d()],G.prototype,"retryEventEmitter",void 0),q([d()],G.prototype,"previewEventEmitter",void 0),G.style=':host{display:inline-block;text-align:left;width:100%;line-height:normal}:host .vega-file-uploader-container .vega-file-upload-area{text-align:center}:host .vega-file-uploader-container .vega-file-upload-area:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))}:host .vega-file-uploader-container .vega-file-upload-area:hover vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:hover vega-font{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-file-uploader-container .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-file-uploader-container .vega-file-upload-area:active{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area:active vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:active vega-font{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area.disabled{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));outline:none}:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-icon,:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-file-uploader-container vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error .vega-file-upload-area{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-file-uploader-container.error .vega-file-upload-area:active{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error vega-button::part(button),:host .vega-file-uploader-container.error vega-button::part(button):hover{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1));border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error vega-button::part(button):hover{background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-file-uploader-container.error vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error vega-button::part(button):active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-file-uploader-file-list .vega-file-uploader-file .vega-file-preview-button{visibility:hidden}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover{background-color:rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover .vega-file-preview-button{visibility:visible}:host .vega-file-uploader-file-list .vega-file-list-buttons{margin-left:8px;flex-shrink:0}:host .vega-file-uploader-file-list .vega-file-list-status svg{width:16px;height:16px}:host .vega-file-uploader-file-list .vega-file-status-and-name{padding-top:5px}:host .vega-file-uploader-file-list .vega-file-status-and-name vega-font{word-break:break-word}:host vega-field-label{margin-bottom:8px}:host .vega-file-uploader-file-list{margin-top:8px}:host .vega-file-uploader-file-list.vega-file-list-hidden{display:none}: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 .vega-hidden{display:none}';export{G as vega_file_uploader}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,H as o,r as e,c as i,g as r}from"./p-6b2342e0.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-8ce9e214.js";import{a as b}from"./p-
|
|
1
|
+
import{h as t,H as o,r as e,c as i,g as r}from"./p-6b2342e0.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-8ce9e214.js";import{a as b}from"./p-528748fa.js";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 v 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))}}h([a()],v.prototype,"host",void 0),h([a()],v.prototype,"visible",void 0),h([a()],v.prototype,"duration",void 0),h([c("componentDidLoad")],v.prototype,"componentDidLoad",null),h([c("watchVisible")],v.prototype,"watchVisible",null);var f=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(),"aria-hidden":!0})}}f([a()],u.prototype,"visible",void 0),f([a()],u.prototype,"color",void 0),f([a()],u.prototype,"duration",void 0),f([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 v,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 t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as a,M as o,V as n,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-8ce9e214.js";import{s as d}from"./p-519a7d55.js";import{I as u,J as c,i as m,L as f,M as v}from"./p-05dc6718.js";import{D as g}from"./p-11e2dcf5.js";import{F as b}from"./p-a528714c.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-6629a68b.js";import{K as j}from"./p-ffda64ac.js";import{C as y}from"./p-7292ac20.js";import{F as I}from"./p-518e0a24.js";import{R}from"./p-280cbcdb.js";import"./p-331a62d5.js";import"./p-ec2a1d4c.js";import"./p-6a334573.js";import"./p-c84aa55a.js";import"./p-b75ee3ba.js";import"./p-8ee917b4.js";import"./p-f7ad9349.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-fea75b87.js";import"./p-5f377954.js";import"./p-dcf162e9.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-3a93730e.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-10fa27d2.js";var V=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class C extends n{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,"data-tabindex":0!==i?-1:0,showClearIcon:!1,disabled:this.disabled,"data-aria-hidden":String(!this.isInputAccessibleForScreenReader(i)),"data-aria-label":`Passcode input ${i+1} of ${this.length}`,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",inputmode:"text"===this.inputType?"text":"numeric",ref:t=>{this.vegaInputRefs[i]=t,g.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),g.addUniqueObserverToNode(t,c,this.handleVegaBlur(i)),g.addUniqueObserverToNode(t,m,this.handleVegaChange(i)),g.addUniqueObserverToNode(t,f,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",role:"group","aria-label":this.label||"One-time password input",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label})}getFirstEmptyIndexForRender(t){for(let e=0;e<t;e++)if(!this.vegaInputValues.get(e))return e;return-1}isInputAccessibleForScreenReader(t){const e=this.getFirstEmptyIndexForRender(this.length);return-1===e||t<=e}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([a()],C.prototype,"host",void 0),V([a()],C.prototype,"value",void 0),V([a()],C.prototype,"label",void 0),V([a()],C.prototype,"required",void 0),V([a()],C.prototype,"length",void 0),V([a()],C.prototype,"disabled",void 0),V([a()],C.prototype,"hint",void 0),V([a()],C.prototype,"size",void 0),V([a()],C.prototype,"inputType",void 0),V([a()],C.prototype,"vegaInputValues",void 0),V([a()],C.prototype,"valueController",void 0),V([a()],C.prototype,"optional",void 0),V([o("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class k extends n{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([a()],k.prototype,"host",void 0),A([a({writable:!0})],k.prototype,"value",void 0),A([a({writable:!0})],k.prototype,"vegaInputValues",void 0),A([a()],k.prototype,"length",void 0),A([a()],k.prototype,"inputType",void 0),A([a()],k.prototype,"inputPasscodeRenderer",void 0),A([a()],k.prototype,"changeEventEmitter",void 0),A([a()],k.prototype,"completeEventEmitter",void 0),A([o("componentWillLoad")],k.prototype,"componentWillLoad",null),A([o("watchValue")],k.prototype,"watchValue",null),A([o("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var L=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class E extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}L([a()],E.prototype,"value",void 0),L([a()],E.prototype,"length",void 0),L([a()],E.prototype,"vegaInputValues",void 0),L([a()],E.prototype,"valueController",void 0),L([a()],E.prototype,"inputPasscodeRenderer",void 0);class F{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new F(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var O=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const T=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers={},this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new E,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(T,m),this.completeEventEmitter=w(T,v),this.eventPreventSlimmer=new y([m],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new F(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.optional=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};O([l()],T.prototype,"globalSlimmers",void 0),O([h()],T.prototype,"formFieldController",void 0),O([h()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([h()],T.prototype,"keyboardController",void 0),O([h()],T.prototype,"valueController",void 0),O([h()],T.prototype,"inputPasscodeRenderer",void 0),O([h()],T.prototype,"changeEventEmitter",void 0),O([h()],T.prototype,"completeEventEmitter",void 0),O([h()],T.prototype,"eventPreventSlimmer",void 0),T.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):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));box-shadow:0 0 0}: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 .vega-hidden{display:none}';export{T as vega_input_passcode}
|
|
1
|
+
import{h as t,H as e,r as i,c as s,g as r}from"./p-6b2342e0.js";import{c as a,M as o,V as n,I as h}from"./p-6e1ab235.js";import{V as p,I as l}from"./p-8ce9e214.js";import{s as d}from"./p-519a7d55.js";import{J as u,K as c,i as m,M as f,N as v}from"./p-fcefb62c.js";import{D as g}from"./p-526e3634.js";import{F as b}from"./p-cb378636.js";import{C as x}from"./p-2d0d575f.js";import{c as w}from"./p-d7790113.js";import{K as j}from"./p-3a5737fa.js";import{C as y}from"./p-328dbe8e.js";import{F as I}from"./p-3a49089e.js";import{R}from"./p-280cbcdb.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-6a334573.js";import"./p-46cab60a.js";import"./p-b75ee3ba.js";import"./p-dd529875.js";import"./p-b2488adb.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-091fbc35.js";import"./p-5f377954.js";import"./p-dcf162e9.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-3a93730e.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a58cacca.js";var V=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class C extends n{constructor(){super(...arguments),this.vegaInputRefs=[],this.focusInputPasscode=()=>{this.vegaInputRefs[0]&&this.vegaInputRefs[0].doFocus()},this.handleVegaFocus=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=null);const e=this.vegaInputValues.get(t)?t:this.valueController.getFirstEmptyIndex(),i=-1===e?this.length-1:e;this.currentIndex=i,this.vegaInputRefs[i].doFocus()},this.handleVegaBlur=t=>()=>{0!==t&&(this.vegaInputRefs[t].tabIndex=-1)},this.handleVegaChange=t=>e=>{var i;const s=e.detail||"";if(2===s.length||1===s.length&&!this.vegaInputValues.get(t)){const e=this.generateNewInputValue(t,s);this.vegaInputValues.set(t,e),null===(i=this.vegaInputRefs[t+1])||void 0===i||i.doFocus()}},this.handleVegaPaste=()=>t=>{t.preventDefault();const e=t.detail.getData("text");this.valueController.setValuesArray(e),this.vegaInputRefs[this.value.length<this.length?this.value.length:this.length-1].doFocus()}}watchLengthAndInputType(){this.valueController.setValuesArray(this.value)}getVegaInputRefs(){return this.vegaInputRefs}getCurrentIndex(){return this.currentIndex}getInputPasscodeContainerRef(){return this.inputPasscodeContainerRef}render(){const i=Array.from({length:this.length}).map(((e,i)=>t("vega-input",{class:"small"===this.size?"small":"medium",key:i,"data-tabindex":0!==i?-1:0,showClearIcon:!1,disabled:this.disabled,"data-aria-hidden":String(!this.isInputAccessibleForScreenReader(i)),"data-aria-label":`Passcode input ${i+1} of ${this.length}`,value:this.vegaInputValues.get(i)||"",autocomplete:0===i?"one-time-code":"off",inputmode:"text"===this.inputType?"text":"numeric",ref:t=>{this.vegaInputRefs[i]=t,g.addUniqueObserverToNode(t,u,this.handleVegaFocus(i)),g.addUniqueObserverToNode(t,c,this.handleVegaBlur(i)),g.addUniqueObserverToNode(t,m,this.handleVegaChange(i)),g.addUniqueObserverToNode(t,f,this.handleVegaPaste())},maskConfig:{type:"custom-formatter",formatter:t=>this.valueController.valueValidationFilter(t)}})));return t(e,null,this.label&&this.renderLabel(),t("vega-flex",{class:"vega-input-passcode-container",direction:"row",gap:"size-8",role:"group","aria-label":this.label||"One-time password input",ref:t=>this.inputPasscodeContainerRef=t},i),this.hint&&t("vega-hint",null,this.hint))}renderLabel(){return t("vega-field-label",{onClick:this.focusInputPasscode,isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label})}getFirstEmptyIndexForRender(t){for(let e=0;e<t;e++)if(!this.vegaInputValues.get(e))return e;return-1}isInputAccessibleForScreenReader(t){const e=this.getFirstEmptyIndexForRender(this.length);return-1===e||t<=e}generateNewInputValue(t,e){if(2===e.length){for(let i=0;i<e.length;i++)if(e[i]!==this.vegaInputValues.get(t))return e[i];return this.vegaInputValues.get(t)}return e}}V([a()],C.prototype,"host",void 0),V([a()],C.prototype,"value",void 0),V([a()],C.prototype,"label",void 0),V([a()],C.prototype,"required",void 0),V([a()],C.prototype,"length",void 0),V([a()],C.prototype,"disabled",void 0),V([a()],C.prototype,"hint",void 0),V([a()],C.prototype,"size",void 0),V([a()],C.prototype,"inputType",void 0),V([a()],C.prototype,"vegaInputValues",void 0),V([a()],C.prototype,"valueController",void 0),V([a()],C.prototype,"optional",void 0),V([o("watchLengthAndInputType")],C.prototype,"watchLengthAndInputType",null);var A=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class k extends n{componentWillLoad(){this.setValuesArray(this.value),this.value=this.vegaInputValues.join("")}watchValue(){this.setValuesArray(this.value),this.changeEventEmitter.emit(this.value),x.notify(b,{host:this.host,detail:this.value}),this.value.length===this.length&&this.completeEventEmitter.emit(this.value)}watchVegaInputValues(){for(let t=0;t<this.length;t++)this.inputPasscodeRenderer.getVegaInputRefs()[t]&&(this.inputPasscodeRenderer.getVegaInputRefs()[t].value=this.vegaInputValues.get(t)||"");this.value=this.vegaInputValues.join("")}setValuesArray(t){const e=this.valueValidationFilter(t).slice(0,this.length).split("");this.vegaInputValues.setAll(e)}valueValidationFilter(t){return t.replace("text"===this.inputType?/\s/g:/\D/g,"")}getFirstEmptyIndex(){var t;const{length:e}=this;return null!==(t=Array.from({length:e},((t,e)=>this.vegaInputValues.get(e)||"")).findIndex((t=>!t||""===t)))&&void 0!==t?t:-1}}A([a()],k.prototype,"host",void 0),A([a({writable:!0})],k.prototype,"value",void 0),A([a({writable:!0})],k.prototype,"vegaInputValues",void 0),A([a()],k.prototype,"length",void 0),A([a()],k.prototype,"inputType",void 0),A([a()],k.prototype,"inputPasscodeRenderer",void 0),A([a()],k.prototype,"changeEventEmitter",void 0),A([a()],k.prototype,"completeEventEmitter",void 0),A([o("componentWillLoad")],k.prototype,"componentWillLoad",null),A([o("watchValue")],k.prototype,"watchValue",null),A([o("watchVegaInputValues")],k.prototype,"watchVegaInputValues",null);var E=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class L extends j{constructor(){super((t=>[{keyCode:"Backspace",activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.deletePasscode(e)}},{keyCode:["ArrowLeft","ArrowRight"],activeElementInScope:[this.inputPasscodeRenderer.getInputPasscodeContainerRef()],eventName:"keydown",callback:e=>{t.controlDirectionByKeyboard(e)}}])),this.deletePasscode=t=>{t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex();this.vegaInputValues.get(e)?this.vegaInputValues.withMutation((t=>{for(let i=e;i<this.length-1;i++)t[i]=t[i+1];t[this.length-1]=""})):!this.vegaInputValues.get(e)&&e>0&&(this.vegaInputValues.set(e-1,""),this.inputPasscodeRenderer.getVegaInputRefs()[e-1].doFocus())}}controlDirectionByKeyboard(t){t.preventDefault();const e=this.inputPasscodeRenderer.getCurrentIndex(),i=this.inputPasscodeRenderer.getVegaInputRefs();"ArrowLeft"===t.key&&e>0&&i[e-1].doFocus(),"ArrowRight"===t.key&&this.vegaInputValues.get(e)&&e<this.length-1&&i[e+1].doFocus()}}E([a()],L.prototype,"value",void 0),E([a()],L.prototype,"length",void 0),E([a()],L.prototype,"vegaInputValues",void 0),E([a()],L.prototype,"valueController",void 0),E([a()],L.prototype,"inputPasscodeRenderer",void 0);class F{constructor(t,e){this.length=0,this.array=[],t&&(this.array=t,this.length=t.length),e&&(this.onMutate=e)}onMutate(t){}push(...t){return this.withMutation((e=>{e.push(...t)}))}pop(){return this.withMutation((t=>{t.length>0&&t.pop()}))}set(t,e){return this.withMutation((i=>{t>=0&&(i[t]=e)}))}setAll(t){return this.withMutation((e=>{e.length=0;for(let i=0;i<t.length;i++)e[i]=t[i]}))}clear(){return this.withMutation((t=>{t.length=0}))}withMutation(t){const e=[...this.array];t(e);const i=new F(e,this.onMutate);return this.onMutate(i),i}get(t){return this.array[t]}join(t){return this.array.join(t)}toArray(){return this.array}}var O=function(t,e,i,s){var r,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const T=class{constructor(t){i(this,t),this.vegaChange=s(this,"vegaChange",7),this.change=s(this,"change",7),this.vegaComplete=s(this,"vegaComplete",7),this.complete=s(this,"complete",7),this.globalSlimmers={},this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputPasscodeRenderer.getInputPasscodeContainerRef(),touchableAreaGetter:()=>[...this.inputPasscodeRenderer.getVegaInputRefs()]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.keyboardController=new L,this.valueController=new k,this.inputPasscodeRenderer=new C,this.changeEventEmitter=w(T,m),this.completeEventEmitter=w(T,v),this.eventPreventSlimmer=new y([m],(()=>this.host),{useCapture:!0}),this.vegaInputValues=new F(new Array,(t=>{this.vegaInputValues=t})),this.label="",this.disabled=!1,this.size="medium",this.hint="",this.length=4,this.inputType="numeric",this.value="",this.required=!1,this.optional=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchVegaInputValues(){}watchLengthAndInputType(){}watchValue(){}watchValidationRules(){}render(){return d(this.inputPasscodeRenderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{vegaInputValues:["watchVegaInputValues"],length:["watchLengthAndInputType"],inputType:["watchLengthAndInputType"],value:["watchValue"],validationRules:["watchValidationRules"]}}};O([l()],T.prototype,"globalSlimmers",void 0),O([h()],T.prototype,"formFieldController",void 0),O([h()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),O([h()],T.prototype,"keyboardController",void 0),O([h()],T.prototype,"valueController",void 0),O([h()],T.prototype,"inputPasscodeRenderer",void 0),O([h()],T.prototype,"changeEventEmitter",void 0),O([h()],T.prototype,"completeEventEmitter",void 0),O([h()],T.prototype,"eventPreventSlimmer",void 0),T.style=':host{display:inline-block}:host vega-field-label{margin-bottom:8px}:host vega-input::part(input-container){padding-left:0px;padding-right:0px}:host vega-input.small{width:38px;height:42px;box-sizing:border-box}:host vega-input.medium{width:42px;height:50px;box-sizing:border-box}:host vega-input::part(input){text-align:center}:host vega-input.small::part(input-container){padding-top:8px;padding-bottom:8px}:host vega-input.medium::part(input-container){padding-top:12px;padding-bottom:12px}:host .vega-input-passcode-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-input-passcode-container.error vega-input::part(input-container):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));box-shadow:0 0 0}: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 .vega-hidden{display:none}';export{T as vega_input_passcode}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{g as t,e,c as n,h as s,A as r,T as i,u as a,H as o,v as l,l as c,w as h,x as u,y as d,z as w,D as p,I as m,n as f,E as g,j as x,B as T,F as b,d as O,t as y,G as E,o as A,r as k,s as H,J as N,N as j,q as C,K as B,L as v,m as S,O as I,M as R,S as L,P as $,Q as D,U as M,W as P,X as F,Y as z,Z as U,_ as V,$ as W,a0 as G,a1 as J,a2 as K,R as Y,a3 as X,p as Q,a4 as Z,a5 as _,a6 as q,b as tt,a7 as et,a8 as nt,a9 as st,aa as rt}from"./p-50e7020c.js";import{g as it}from"./p-8b5d3a52.js";import{i as at}from"./p-b2488adb.js";import{C as ot}from"./p-2d0d575f.js";import{d as lt}from"./p-526e3634.js";import{c as ct,d as ht}from"./p-3a93730e.js";import{r as ut,i as dt}from"./p-528748fa.js";import{c as wt}from"./p-a841cf13.js";import{L as pt}from"./p-6e1ab235.js";class mt extends e{constructor(t,e,n){super(t,"list-item",n),this.dtoName=mt.dtoName,this.nestList=[],this.nestList=e}static from(t,e={autoMatchFormat:!0}){const s=new mt(t.id,void 0,e);s.children=t.nodes.map((t=>n.from(t,s,e))),t.children&&(s.nestList=t.children.map((t=>{const e=gt.from(t);return e.parent=s,e})));const{annotations:r}=t;return r&&Object.entries(r).forEach((([t,e])=>{const n=this.createAnnotationEntity(t,e);at(n)&&s.annotationMap.set(...n)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.nestList)||void 0===t?void 0:t.map((t=>t.toJSON()))})}toHtml(t){return[`<li${super.generateAttributeString(t)}>`,this.getChildrenHtml(t),"</li>"].join("")}cloneWithNodes(t){const e=new mt(it());return e.children=[],e.apply(new s(t)),e}getLastNode(){return this.nestList&&this.nestList.length>0?this.nestList[this.nestList.length-1].getLastNode():super.getLastNode()}createNewListItem(){return new mt(it())}clone(t){var e;const n=new mt(this.id);return n.children=this.children.map((t=>t.clone(n))),n.annotationMap=super.cloneAnnotations(),n.nestList=null===(e=this.nestList)||void 0===e?void 0:e.map((t=>t.clone(n))),n.parent=t,n}}r.register(i.name,mt.name,new a),r.register(o.name,mt.name,new l),r.register(c.LINE_BREAK_SINGLE_BLOCK,mt.name,new h),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,mt.name,new u),r.register(c.DELETE_NEST_LIST,mt.name,new class extends t{handleAction(t,e){e.nestList&&(e.nestList=e.nestList.length>1?e.nestList.filter((e=>e!==t.nestListBlockToBeRemoved)):void 0)}}),r.register(c.SPLIT_BLOCK_WITH_NODE,mt.name,new d),r.register(c.REPLACE_CHILD_NODES,mt.name,new w),r.register(c.REPLACE_NEST_LIST,mt.name,new class extends t{handleAction(t,e){t.newList.forEach((t=>{t.parent=e})),e.nestList=t.newList}}),r.register(c.MERGE_TWO_BLOCKS_NODES,mt.name,new p),r.register(c.INSERT_IMAGE_TO_BLOCK,mt.name,new class extends t{handleAction(t,e){e.parent.apply(t)}}),mt.dtoName="RTEListItemBlock";class ft extends T{constructor(){super(...arguments),this.type=b.LIST}static getDefaultStyles(){return{paddingLeft:"8px",marginLeft:"16px"}}renderStyle(t){return(null==t?void 0:t.standalone)?ft.getDefaultStyles():null}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--list"}clone(){return new ft}toJSON(){}}class gt extends O{constructor(t,e,n){super(t),this.dtoName=gt.dtoName,this.type="bullet-list",this.children=[],this.type=e;const{autoMatchFormat:s}=n||{autoMatchFormat:!0};s&&this.annotationMap.set(b.LIST,new ft)}static from(t,e={autoMatchFormat:!0}){const n=new gt(t.id,t.type,e),{annotations:s}=t;return s&&Object.entries(s).forEach((([t,e])=>{const s=this.createAnnotationEntity(t,e);at(s)&&n.annotationMap.set(...s)})),n.children=t.blocks.map((t=>{const s=mt.from(t,e);return s.parent=n,s})),n}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return A.from(e);case"customClass":return E.from(e);case"customStyle":return y.from(e)}}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag();return[`<${e}${super.generateAttributeString(t)}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}isNotEmpty(){return this.children.length>0}getLastNode(){return this.children[this.children.length-1].getLastNode()}clone(t){const e=new gt(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getBlockTag(){return"number-list"===this.type?"ol":"ul"}}r.register(c.TRANSFORM_LIST_BLOCK,gt.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,r=e.parent.createList(t.listType);if(n.every((t=>t.parent===e)))r.apply(new s(e.children)),e.parent.apply(new m(e,r)),e.parent.apply(new f(e)),n.forEach((t=>t.children.map((t=>t.apply(new g)))));else{const n=t.selectedBlocks.map((t=>e.parent.toListItem(t)));r.apply(new s(n)),e.parent.apply(new m(e,r)),t.selectedBlocks.forEach((t=>{t.parent.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}}}),r.register(c.TRANSFORM_PARAGRAPH_BLOCK,gt.name,new class extends t{handleAction(t,e){let n=!1,r=!1;const i=t.selectedBlocks,a=i.map((t=>(t.children.map((t=>t.apply(new g))),t===e.children[0]&&(n=!0),t===e.children[e.children.length-1]&&(r=!0),this.toParagraph(t))));if(n)e.parent.apply(new x(e,...a));else if(r)e.parent.apply(new m(e,...a));else{const t=e.children.indexOf(i[0]),n=e.children.indexOf(i[i.length-1]),r=e.parent.createList(e.type);r.apply(new s(e.children.slice(0,t)));const o=e.parent.createList(e.type);o.apply(new s(e.children.slice(n+1))),e.parent.apply(new x(e,r,...a,o)),e.parent.apply(new f(e))}i.map((t=>{e.apply(new f(t))})),0===e.children.length&&e.parent.apply(new f(e))}toParagraph(t){const n=new e(it(),"paragraph");return n.apply(new s(t.children)),n.annotationMap=t.annotationMap,n}}),r.register(c.INSERT_IMAGE_TO_BLOCK,gt.name,new class extends t{handleAction(t,e){e.parent.apply("list-item"!==e.parent.type?new m(e,t.imageBlockToBeInserted):t)}}),gt.dtoName="RTEListBlock";class xt{}class Tt{constructor(t,e){this.childrenOutput=[],this.currentStrategy=t,this.currentElements=e}setChildrenOutput(t){this.childrenOutput=t}toDto(t={autoMatchFormat:!0,skipCustomAnnotations:!0}){const e=this.currentStrategy.handle(this.currentElements,t);return this.childrenOutput.length>0&&e&&this.currentStrategy.appendChildBlocks(e,this.childrenOutput.map((e=>e.toDto(t))).filter(at)),e}}const bt=new class{constructor(){this.elementToBlockStrategies=[],this.elementToNodeStrategies=[]}registerElementToBlockStrategy(t){this.hasDuplicateStrategy(t,this.elementToBlockStrategies)||this.elementToBlockStrategies.unshift(t)}registerElementToNodeStrategy(t){this.hasDuplicateStrategy(t,this.elementToNodeStrategies)||this.elementToNodeStrategies.unshift(t)}getElementToBlockStrategies(){return this.elementToBlockStrategies}getElementToNodeStrategies(){return this.elementToNodeStrategies}hasDuplicateStrategy(t,e){return e.includes(t)}},Ot=new class{process(t,e={autoMatchFormat:!0,skipCustomAnnotations:!0}){const n=this.getElementToBlockStrategies(),s=[];for(let r=0;r<t.length;r++){if(this.isInvalidElement(t[r],e))continue;let i=0;for(const a of n)if(i=a.canHandle(t,r,e),i>0){const n=t.slice(r,r+i),o=new Tt(a,n);1===i&&a.shouldProceedToElementChildren()&&o.setChildrenOutput(this.process(Array.from(n[0].childNodes),e)),s.push(o),r+=i-1;break}if(0===i&&r<t.length){const n=Array.from(t[r].childNodes),i=this.process(Array.from(n),e);i.length>0&&s.push(...i)}}return s}isInvalidElement(t,e){return t.nodeType===Node.COMMENT_NODE||!1!==e.autoMatchFormat&&["META","STYLE"].includes(t.nodeName)}getElementToBlockStrategies(){return bt.getElementToBlockStrategies()}};class yt extends t{handleAction(t,e){const n=t.entityToBeAppended;e.children&&(n.forEach((t=>{t.parent=e})),e.children=e.children.concat(n))}}class Et extends t{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[...t.childrenToBeInserted,t.referChildren])}replaceElementWithElements(t,e,n){t.children&&(n.forEach((e=>{e.parent=t})),t.children=t.children.flatMap((t=>t===e?n:t)))}}class At extends Et{handleAction(t,e){this.replaceElementWithElements(e,t.referChildren,[t.referChildren,...t.childrenToBeInserted])}}class kt extends N{constructor(t,e){super(),this.type=j.IMAGE,this.size=t,this.alt=e}static from(t,e){return[j.IMAGE,new kt(t,e)]}static getDefaultStyles(){return{verticalAlign:"bottom"}}toJSON(){return at(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}clone(){return new kt(this.size,this.alt)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.size?`v-rte--image-size-${this.size}`:null}renderStyle(t){if(!(null==t?void 0:t.standalone))return null;const e=kt.getDefaultStyles();switch(this.size){case"sm":return Object.assign(Object.assign({},e),{width:"25%"});case"md":return Object.assign(Object.assign({},e),{width:"50%"});case"lg":return Object.assign(Object.assign({},e),{width:"100%"})}}}kt.BASE_STYLES={verticalAlign:"bottom"};class Ht extends C{constructor(t,e,n,s){super(t,s),this.dtoName=Ht.dtoName,this.type=B.IMAGE,this.url=e,this.parent=n}static from(t,e,n={autoMatchFormat:!0}){const s=new Ht(t.id,t.url,e),r=!!n.autoMatchFormat,i=Object.assign({},t.annotations),{size:a}=i,o=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(i,["size"]),l=Object.assign(Object.assign({},o),{size:null!=a?a:r?"md":void 0});return s.annotationMap=new Map(Object.keys(l).map((t=>"size"===t||"alt"===t?kt.from(l.size,l.alt):this.createAnnotationEntity(t,l[t]))).filter(at)),s}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof kt||t instanceof v)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return""==t.alt&&delete t.alt,Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"image",url:this.url})}clone(t){return new Ht(this.id,this.url,t,super.cloneAnnotations())}toHtml(t){const e=this.getAnnotationByType(j.IMAGE);return`<img${super.generateAttributeString(t,...[e&&e.alt?`alt="${e.alt}"`:null,`src="${this.url}"`,e&&e.size?`data-size="${e.size}"`:null].filter(at))}>`}doAnnotationActionApply(t){const e=r.get(S.name,Ht.name);e&&e.execute(t,this)}doModifyActionApply(t){r.executeTheStrategy(t,this)}}r.register(c.UPDATE_IMAGE_NODE_URL,Ht.name,new class extends t{handleAction(t,e){e.url=t.url}}),r.register(S.name,Ht.name,new class extends t{handleAction(t,e){const n=t.toAnnotation();e.annotationMap.set(n.type,n)}}),Ht.dtoName="RTEImageNode";class Nt extends R{constructor(t,e){super(),this.type=c.INSERT_NEW_PARAGRAPH,this.startContainerNode=t,this.startOffset=e}}class jt extends O{constructor(t){super(t),this.dtoName=jt.dtoName,this.type="image",this.children=[]}static from(t,e={autoMatchFormat:!0}){const n=new jt(t.id),{annotations:s}=t;return n.children=t.nodes.map((t=>Ht.from(t,n,e))),s&&super.convertAnnotationsToMap(n.annotationMap,s),n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=super.generateAttributeString(t),n=this.children.map((e=>e.toHtml(t))).join("");return super.shouldRenderAsInternalWrapper()?n:[`<div${e}>`,n,"</div>"].join("")}isNotEmpty(){return this.children.length>0&&this.children.some((t=>t.url.length>0))}getLastNode(){return this.children[this.children.length-1]}createNewImageBlock(){return new jt(it())}clone(t){const e=new jt(this.id);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}}r.register(c.MERGE_TWO_BLOCKS_NODES,jt.name,new p),r.register(c.REPLACE_CHILD_NODES,jt.name,new w),r.register(c.SPLIT_BLOCK_WITH_NODE,jt.name,new class extends t{handleAction(t,e){t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode,e)}splitImageNodes(t,e,n){const s=n.children.indexOf(t);if(s>-1){const t=n.children.slice(0,s+e),r=n.children.slice(s+e);n.apply(new I(t));const i=this.cloneWithNodes(r,n);return n.parent.apply(new m(n,i)),i}}cloneWithNodes(t,e){const n=e.createNewImageBlock();return n.children=[],n.apply(new s(t)),n}}),r.register(c.LINE_BREAK_SINGLE_BLOCK,jt.name,new class extends t{handleAction(t,e){const n=new Nt(t.startContainerNode,t.startOffset);e.apply(n);const s=n.newBlock;s&&(t.lineBreakNode=s.children[0])}}),r.register(c.LINE_BREAK_MULTIPLE_BLOCKS,jt.name,new class extends t{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,r){const i=e.from({id:it(),type:"paragraph",nodes:[{id:it(),type:"text",text:"\n"}]});r.parent.apply(new m(r,i));const a=this.concatBlocksNodes(t.slice(1));return(0===a.length||a[0]&&""===a[0].text)&&a.push(new n(it(),"\n",i)),i.apply(new s(a)),i.children[0]}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new f(t)))})),e}}),r.register(c.INSERT_IMAGE_TO_BLOCK,jt.name,new class extends t{handleAction(t,e){const n=t.splitPointNode,r=t.startOffsetOfNode,i=t.imageBlockToBeInserted;e.children.length<1?e.apply(new s(i.children)):this.isCaretPositionAtBlockEnd(e,n,r)?e.parent.apply(new m(e,i)):this.isCaretPositionAtBlockStart(e,n,r)?e.parent.apply(new x(e,i)):(e.apply(new L(n,r)),e.parent.apply(new m(e,i)))}}),r.register(o.name,jt.name,new l),jt.dtoName="RTEImageBlock";class Ct extends O{constructor(t,e){super(t),this.dtoName=Ct.dtoName,this.type="html-block",this.children=[],this.htmlTag=e}static from(t,e){const n=new Ct(t.id,t.htmlTag),{annotations:s}=t;return s&&super.convertAnnotationsToMap(n.annotationMap,s),n.children=this.generateBlockChildren(t.children,e,n),n}clone(t){const e=new Ct(this.id,this.htmlTag);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return!0}toHtml(t){const e=this.htmlTag,n=super.generateAttributeString(t);return $.has(this.htmlTag)?`<${e}${n}>`:[`<${e}${n}>`,this.children.map((e=>e.toHtml(t))).join(""),`</${e}>`].join("")}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,htmlTag:this.htmlTag,children:this.children.map((t=>t.toJSON()))})}}Ct.dtoName="RTEHtmlBlock";class Bt extends R{constructor(t){super(),this.type=c.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class vt extends D{handleAction(t,e){const{startContainerNode:n}=t;n.isContentEditable()?n.isTextNode()&&this.deleteTextNodeContent(t,e):this.deleteDecoratorNodeContent(t,e);const s=e.parent;s&&e.isListItemBlock()&&0===s.children.length&&s.parent.apply(new f(s))}deleteTextNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;if(0!==s&&!n.isEmpty()){const r=n.text.slice(0,s-1)+n.text.slice(s);if(n.apply(new M(r)),r)return void(t.previousNode=n);{const s=this.getPreviousNode(n);return s&&s.parent===e&&"\n"===s.text||1===e.children.length?void(t.previousNode=n):(e.apply(new f(n)),void(t.previousNode=s))}}{let s=this.getPreviousNode(n),r=null;const i=n.isEmpty();if(e.children.length&&s&&s.parent!==e)i&&e.apply(new f(n)),e.type===s.parent.type&&s.parent.apply(new Bt(e));else if(this.isContentFirstNode(n)&&i&&(r=this.getNextNode(n)),i&&e.apply(new f(n)),s&&s.isTextNode()&&(s.isEmpty()||!s.isContentEditable()&&s.parent===e)){const t=s;s=this.getPreviousNode(s),t.parent.apply(new f(t)),s||i||(r=n)}0===e.children.length&&e.parent.apply(new f(e)),s?t.previousNode=s:r&&(t.nextNode=r)}}deleteDecoratorNodeContent(t,e){const n=t.startContainerNode,s=t.startOffset;let r=this.getPreviousNode(n),i=null;if(0!==s){const t=e;this.isContentFirstNode(n)&&(i=this.getNextNode(n)),1===t.children.length?t.parent.apply(new f(t)):t.apply(new f(n))}else{const e=r;e&&!e.isContentEditable()&&(r=this.getPreviousNode(e),e.parent.apply(new f(e)),r||(t.nextNode=n))}r?t.previousNode=r:i&&(t.nextNode=i)}}class St extends t{handleAction(t,e){const{startContainerNode:n}=t;t.newBlock=this.breakSingleBlock(n,t.startOffset,e)}breakSingleBlock(t,e,n){const s=this.getNewParagraph(t);if(s){if(this.isCaretPositionAtBlockEnd(n,t,e))n.parent.apply(new m(n,s));else{if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}n.parent.apply(new x(n,s))}return s}}getNewParagraph(t){const e=this.createNewParagraph("");if(e){let n=e.children[0];return t.isTextNode()&&t.isContentEditable()&&(e.children=[],n=t.cloneWithText(""),n.annotationMap.delete(j.LINK),e.apply(new s([n]))),e}}}class It extends R{constructor(t,e,n=!1){super(),this.isFlushable=!0,this.type=c.UPDATE_CURSOR_POSITION,this.immediatelyRun=!1,this.nextFocusNode=t,this.offset=e,this.immediatelyRun=n,this.immediatelyRun&&(this.isFlushable=!1)}}class Rt extends t{handleAction(t,e){const{rteRange:n,nodeToBeInserted:s}=t,{startNode:r,startOffset:i}=n;if(r){const t=e;if(r.isContentEditable()&&r.isTextNode())if("\n"!==r.text&&r.text&&0!==i){const e=r.text.substring(0,i),n=r.text.substring(i),a=r.cloneWithText(e),o=r.cloneWithText(n),l=[a,s];n&&l.push(o),t.apply(new x(r,...l)),t.apply(new f(r))}else t.apply(new x(r,s));else t.apply(0!==i?new m(r,s):new x(r,s));this.updateCursorPosition(s)}}updateCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new It(t))}}class Lt extends t{handleAction(t,e){const{text:n,offset:s,decoratorNode:r}=t,i=this.createNewParagraph(n);if(i){const t=i.children[0];e.apply(0!==s?new m(r,t):new x(r,t)),this.setTheCursorPosition(t)}}setTheCursorPosition(t){const e=this.getRootContent(t.parent);e&&e.apply(new It(t))}}class $t extends t{handleAction(t,e){t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset,e)}breakSingleListItemBlock(t,e,n){const r=n.createNewListItem(),i=this.copyInlineStyleToNewNode(t);if(r.apply(new s([i])),this.isCaretPositionAtBlockEnd(n,t,e))return this.breakListItemAtEnd(r,n);if(!this.isCaretPositionAtBlockStart(n,t,e)){const s=new L(t,e);return n.apply(s),s.newBlock}return n.parent.apply(new x(n,r)),r}breakListItemAtEnd(t,n){const r=n.parent.children[n.parent.children.length-1],i=1===n.children.length&&n.children[0].isEmpty();if(n===r&&i){const r=n.parent.parent;if("list-item"!==r.type){const i=e.from({id:it(),type:"paragraph",nodes:[]});return i.apply(new s(t.children)),r.apply(new m(n.parent,i)),n.parent.apply(new f(n)),i}r.parent.apply(new m(r,t)),n.parent.apply(new f(n))}else n.parent.apply(new m(n,t));return t}copyInlineStyleToNewNode(t){const e=t.cloneWithText("");return e.annotationMap.delete(j.LINK),e}}class Dt extends R{constructor(t){super(),this.type=c.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class Mt extends P{handleAction(t,e){super.handleAction(t,e);const n=e.parent;0===e.children.length&&n&&n.apply("list-item"===n.type?new Dt(e):new f(e))}}class Pt extends t{handleAction(t,e){if(e.parent){const{blocksToBeInserted:n,startNode:s,startOffset:r}=t;let i=e;if(s===e.children[0]&&0===r)e.parent.apply(new x(e,...n));else{const t=new L(s,r);e.apply(t),e.parent.apply(new m(e,...n)),i=t.newBlock}t.futureFocusBlock=i}}}const Ft=new class{registerBlockBasicStrategies(t){r.register(c.DELETE_CHILDREN,t,t===gt.name?new Mt:new P),r.register(c.APPEND_CHILDREN,t,new yt),r.register(c.INSERT_CHILDREN_BEFORE,t,new Et),r.register(c.INSERT_CHILDREN_AFTER,t,new At),r.register(c.DELETE_BLOCK_CONTENT,t,new vt),r.register(c.INSERT_NEW_PARAGRAPH,t,t===mt.name?new $t:new St),r.register(c.INSERT_TEXT_TO_DECORATOR_NODE,t,new Lt),r.register(c.INSERT_NODE_TO_NEAREST_ROOT,t,new Rt),r.register(c.PASTE_CONTENT,t,new Pt)}};class zt{}class Ut extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isBold(t)||e.bold?{bold:!0}:{}}isBold(t){return"STRONG"===t.nodeName||"B"===t.nodeName||t.style.fontWeight===F||t.style.fontWeight===z||t.classList.contains("v-rte--bold")}}class Vt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getAttributes(t);return Object.keys(e).length>0?{customAttribute:e}:{}}getAttributes(t){return t.getAttributeNames().filter((t=>"style"!==t&&"class"!==t&&this.isValidAttr(t))).reduce(((e,n)=>(e[n]=t.getAttribute(n),e)),{})}isValidAttr(t){return/^[a-zA-Z_][\w-]*$/.test(t)}}class Wt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=this.getCustomClass(t);return e.length>0?{customClass:e}:{}}getCustomClass(t){return t.classList.toString().split(" ").filter((t=>!t.includes("v-rte")&&""!==t))}}class Gt extends zt{canHandle(t,e){return!e.skipCustomAnnotations&&!!t}handle(t){const e=U(t);return Object.keys(e).length>0?{customStyle:e}:{}}}class Jt extends zt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getIndent(t);return e?{indent:e}:{}}getIndent(t){const e=t.style;let n;if(e.marginLeft)n=e.marginLeft;else{if(!e.margin)return null;{const t=e.margin.split(" ");switch(t.length){case 4:n=t[3];break;case 2:case 3:n=t[1];break;default:n=t[0]}}}const s=Number(n.replace("px",""));return s&&s>=0?Math.floor(s/16):null}}class Kt extends zt{canHandle(t){return["RTETextBlock","RTEListItemBlock","RTEListBlock"].includes(t.dtoName)}handle(t){const e=this.getTextAlign(t);return e?{textAlign:e}:{}}getTextAlign(t){const e=t.classList;if(e.contains("v-rte--horizontal-alignment-left"))return"left";if(e.contains("v-rte--horizontal-alignment-center"))return"center";if(e.contains("v-rte--horizontal-alignment-right"))return"right";if(e.contains("v-rte--horizontal-alignment-justify"))return"justify";switch(t.style.textAlign){case"center":return"center";case"right":return"right";case"justify":return"justify";case"left":return"left";default:return null}}}class Yt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isCode(t)||e.code?{code:!0}:{}}isCode(t){return t.classList.contains("v-rte--code")||"CODE"===t.nodeName||"PRE"===t.nodeName||"monospace"===t.style.fontFamily||"Roboto Mono"===t.style.fontFamily.replace(/["']/g,"")}}class Xt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){const n=this.getColor(t)||e.textColor;return n?{textColor:n}:{}}getColor(t){var e;const n=null===(e=ut(t.style.color))||void 0===e?void 0:e.toUpperCase();if(n){const t=V.filter((t=>t.key!==W.key)).find((t=>t.light===n||t.dark===n));return t?t.key:null}for(const e of V)if(t.style.color.includes(e.key))return e.key;return null}}class Qt extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isItalic(t)||e.italic?{italic:!0}:{}}isItalic(t){return"I"===t.nodeName||t.style.fontStyle===G||"EM"===t.nodeName||t.classList.contains("v-rte--italic")}}class Zt extends zt{canHandle(t,e){return!!e.autoMatchFormat&&"RTETextBlock"===t.dtoName}handle(t){const e=this.getTextStyle(t);return e?{textStyle:e}:{}}getTextStyle(t){const e=this.getElementTypeByDataType(t);if(e)return e;const n=this.getElementTypeByNodeName(t);if(n)return n;const s=this.getElementTypeByFontSize(t);if(s)return s;return this.getElementTypeByClassName(t)||null}getElementTypeByDataType(t){return t.nodeType!==Node.TEXT_NODE&&t.hasAttribute("data-type")?t.getAttribute("data-type"):null}getElementTypeByFontSize(t){var e;switch(null===(e=t.style)||void 0===e?void 0:e.fontSize){case"36px":return"title";case"28px":return"subtitle";case"22px":return"heading-1";case"20px":return"heading-2";case"18px":return"heading-3";default:return null}}getElementTypeByNodeName(t){switch(t.nodeName){case"P":return"paragraph";case"H1":return"heading-1";case"H2":return"heading-2";case"H3":return"heading-3";case"H4":return"heading-4";case"H5":return"heading-5";case"H6":return"heading-6";default:return null}}getElementTypeByClassName(t){if(t.className){const e=/\bv-rte-(?:-text-style-)?(title|subtitle|heading-1|heading-2|heading-3|heading-4|heading-5|heading-6|paragraph)\b/.exec(t.className);if(e)return e[1]}return null}}class _t{static isTitleOrSubtitle(t){if("DIV"===t.nodeName){const e=_t.textStyleHandler.getTextStyle(t);return"title"===e||"subtitle"===e}return!1}static isLinkElement(t){return"A"===t.nodeName}}_t.textStyleHandler=new Zt;class qt extends zt{constructor(){super(...arguments),this.handlers=[new Vt,new Wt,new Gt]}canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return e.link?{link:e.link}:_t.isLinkElement(t)?{link:this.generateLinkAnnotations(t)}:{}}generateLinkAnnotations(t){const e={href:t.getAttribute("href")||"",groupKey:it()};return this.handlers.forEach((n=>{Object.assign(e,n.handle(t))})),e}}class te extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isStrikethrough(t)||e.strikethrough?{strikethrough:!0}:{}}isStrikethrough(t){return t.style.textDecoration.includes(J)||"S"===t.nodeName||"DEL"===t.nodeName||t.classList.contains("v-rte--strikethrough")}}class ee extends zt{canHandle(t){return"RTETextNode"===t.dtoName}handle(t,e={}){return this.isUnderline(t)||e.underline?{underline:!0}:{}}isUnderline(t){return t.style.textDecoration.includes(K)||"U"===t.nodeName||"INS"===t.nodeName||t.classList.contains("v-rte--underline")}}class ne extends zt{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){const e=this.getImageSize(t);return e?{size:e}:{}}getImageSize(t){return t.getAttribute("data-size")?t.getAttribute("data-size"):null}}class se extends zt{canHandle(t){return"RTEImageNode"===t.dtoName}handle(t){return t.hasAttribute("alt")?{alt:t.getAttribute("alt")}:{}}}const re=new Set(["P","H1","H2","H3","H4","H5","H6","LI"]),ie=new Set(["P","H1","H2","H3","H4","H5","H6","LI","UL","OL","IMG","CODE"]),ae=new Set(["BR","VEGA-RICH-TEXT-LINK-EDITOR","CODE","A"]),oe=new Set(["TABLE","THEAD","TBODY","TFOOT","TR","DL"]),le=new Set(["ABBR","B","BDI","BDO","CITE","DEL","DFN","EM","I","INS","KBD","MARK","METER","OUTPUT","PROGRESS","Q","S","SAMP","SMALL","SPAN","STRONG","SUB","SUP","TIME","U","VAR"]);function ce(t){return re.has(t.parentElement.nodeName)}class he extends zt{constructor(){super(...arguments),this.customAttributeHandler=new Vt,this.customStyleAnnotationHandler=new Gt,this.customClassAnnotationHandler=new Wt}canHandle(t,e){return"RTETextNode"===t.dtoName&&!1===e.autoMatchFormat}handle(t,e){if(ie.has(t.nodeName)&&!ae.has(t.nodeName))return{};const n=this.generateInlineHtmlAnnotation(t,Object.assign({},e));return n?{inlineHtml:n}:{}}generateInlineHtmlAnnotation(t,e){let{inlineHtml:s}=e;const r=Array.from(t.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE));if(!n.supportsHtmlTag(t.nodeName.toLowerCase())||r){const e=Object.assign(Object.assign({htmlTag:t.nodeName.toLowerCase()},r?{groupId:it()}:{}),{customAttribute:this.customAttributeHandler.handle(t).customAttribute,customStyle:this.customStyleAnnotationHandler.handle(t).customStyle,customClass:this.customClassAnnotationHandler.handle(t).customClass});s=s?this.appendToInlineHtmlChain(s,e,t.parentNode):e}return s?Object.assign({},s):null}appendToInlineHtmlChain(t,e,n){return t.child&&n&&t.child.htmlTag===n.nodeName.toLowerCase()?Object.assign(Object.assign({},t),{child:this.appendToInlineHtmlChain(t.child,e,n)}):Object.assign(Object.assign({},t),{child:e})}}const ue=new class{constructor(){this.handlers=[new Kt,new Jt,new Ut,new Qt,new ee,new te,new Xt,new qt,new Yt,new ne,new se,new Vt,new Wt,new Gt,new Zt,new he]}registerHandler(t){this.handlers.unshift(t)}generate(t,e,n={autoMatchFormat:!0}){n&&n.filterInlineStyles&&Y.executeTheStrategyRefillAction(t.dtoName,e);const s=_t.isLinkElement(e)&&"RTETextNode"===t.dtoName,r=this.handlers.filter((t=>!(!n.autoMatchFormat&&s)||t instanceof qt)).filter((r=>e.nodeType!==Node.TEXT_NODE&&r.canHandle(t,{skipCustomAnnotations:n.skipCustomAnnotations||s,autoMatchFormat:n.autoMatchFormat}))).reduce(((t,s)=>{const r=s.handle(e,n.parentAnnotations);return Object.assign(Object.assign({},t),r)}),{});this.removeTextStyleDefaultsFromCustomStyle(r);const i=Y.getStrategies(t.dtoName);for(const t of i)(n.autoMatchFormat||t.alwaysFilter)&&t.filterAnnotations(r);return r}removeTextStyleDefaultsFromCustomStyle(t){const e="textStyle"in t?t.textStyle:void 0,n=t.customStyle;if(!e||!n)return t;const s=X.getDefaultStyles(e);if(!s)return t;for(const t of Object.keys(s))n[t]===s[t]&&delete n[t];return 0===Object.keys(n).length&&delete t.customStyle,t}};class de extends xt{constructor(){super(...arguments),this.annotationHandler=new Zt}generateChildNodes(t,e,s){const r=[],i=!(!s||!1!==s.autoMatchFormat),a=Object.assign({},e);return t.forEach((t=>{const o=bt.getElementToNodeStrategies().find((e=>e.canHandle([t],0,s)>0));let l=null;if(o&&(l=o.handle([t],s,a)),l)r.push(l);else if(dt(t)&&t.childNodes.length>0){const o=ue.generate(n,t,Object.assign({parentAnnotations:i?{inlineHtml:a.inlineHtml,link:a.link,code:a.code}:e},s));r.push(...this.generateChildNodes(Array.from(t.childNodes),o,s))}})),r}matchTextBlockType(t){var e;return null!==(e=this.annotationHandler.handle(t).textStyle)&&void 0!==e?e:"paragraph"}}class we extends de{canHandle(t,e){return"PRE"!==t[e].tagName&&"CODE"!==t[e].tagName||!t[e].hasAttribute("data-language")?0:1}handle(t){const e=t[0];if(e){const t=e.textContent,n=e.dataset.language;return k.from({id:it(),type:"code-block",content:t,language:n})}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}class pe extends de{createRTEImageBlock(t,e){const n=!(e&&e.autoMatchFormat||!t.parentNode||"DIV"===t.parentNode.nodeName);return jt.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:t.src,annotations:ue.generate(Ht,t,e)}],annotations:Object.assign(Object.assign({},ue.generate(jt,t.parentElement,e)),{internalWrapper:n})},e)}}class me extends xt{shouldProceedToElementChildren(){return!1}appendChildBlocks(){}generateTextNode(t,e){return{id:it(),type:"text",text:t,annotations:e}}}class fe extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const{textAlign:e,customStyle:n}=t;return e&&n?(this.stylesToBeFiltered=_.getDefaultStyles(e),super.filterAnnotations(t)):t}}class ge extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.type="paragraph",this.elementTagName="p"}filterAnnotations(t){return t}canFilter(t){return Z.isTextBlock(t.dtoName)&&t.type===this.type}canRefill(t,e){const n=this.classNameToBeAdded?`.${this.classNameToBeAdded}`:this.elementTagName;return Z.isTextBlock(t)&&e.matches(n)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}class xe extends ge{constructor(t){super(),this.type="heading-1",this.elementTagName="h1",this.type=`heading-${t}`,this.elementTagName=`h${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class Te extends ge{constructor(t){super(),this.type="title",this.elementTagName="div",this.classNameToBeAdded="v-rte-title",this.type=t,this.classNameToBeAdded=`v-rte-${t}`,this.stylesToBeFiltered=X.getDefaultStyles(this.type)}}class be extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=be.BOLD_STYLES,this.elementTagName="span",this.parentBlockTypes=["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title"],this.parentElementSelectors=["h1","h2","h3","h4","h5","h6",".v-rte-title"],this.toBeCheckedSelector=this.parentElementSelectors.join(",")}filterAnnotations(t){return t}canFilter(t){return Z.isTextNode(t.dtoName)&&this.parentBlockIsHeadingOrTitle(t)}canRefill(t,e){return Z.isTextNode(t)&&"SPAN"===e.nodeName&&this.isHeadingOrTitleChild(e)}toCssText(){return`${this.parentElementSelectors.map((t=>`.${be.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t}`)).join(",")} { ${this.convertStylesMapToCssText()} }`}parentBlockIsHeadingOrTitle(t){const e=t.parent;return!!e&&this.parentBlockTypes.includes(e.type)}isHeadingOrTitleChild(t){let e=t.parentElement;for(;e;){if(e.matches(this.toBeCheckedSelector))return!0;if(be.NON_HEADING_TITLE_ELEMENT_TAGS.includes(e.tagName))return!1;e=e.parentElement}return!1}}be.BOLD_STYLES={fontWeight:"700"},be.NON_HEADING_TITLE_ELEMENT_TAGS=["TD","TH","TR","TABLE","THEAD","TBODY","DIV","BODY"];class Oe extends xe{constructor(t){super(t),this.classNameToBeAdded=`v-rte-h${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}class ye extends Te{constructor(t){super(t),this.classNameToBeAdded=`v-rte-${t}`,this.elementTagName="li"}canFilter(t){return Z.isListItemBlock(t.dtoName)&&this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"])}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&e.classList.contains(this.classNameToBeAdded)}}tt.registerRTEDTOClass("paragraph",e),tt.registerRTEDTOClass("title",e),tt.registerRTEDTOClass("subtitle",e),tt.registerRTEDTOClass("heading-1",e),tt.registerRTEDTOClass("heading-2",e),tt.registerRTEDTOClass("heading-3",e),tt.registerRTEDTOClass("heading-4",e),tt.registerRTEDTOClass("heading-5",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("heading-6",e),tt.registerRTEDTOClass("list-item",mt),tt.registerRTEDTOClass("bullet-list",gt),tt.registerRTEDTOClass("number-list",gt),tt.registerRTEDTOClass("image",jt),tt.registerRTEDTOClass("code-block",k),tt.registerRTEDTOClass("html-block",Ct),tt.registerRTEDTOClass("text",n),tt.registerRTEDTOClass("image",Ht),Ft.registerBlockBasicStrategies(e.name),Ft.registerBlockBasicStrategies(gt.name),Ft.registerBlockBasicStrategies(mt.name),Ft.registerBlockBasicStrategies(jt.name),Ft.registerBlockBasicStrategies(Ct.name),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e,n){let s=0;for(let r=e;r<t.length&&this.isInlineCandidate(t[r],n);r++)s++;return s}handle(t,s){const r=t[0].parentElement,i=s&&s.autoMatchFormat,a=this.generateChildNodes(t,i?ue.generate(n,r,Object.assign(Object.assign({},s),{skipCustomAnnotations:!0})):{},s),o=i?super.matchTextBlockType(r):this.matchTextBlockTypeByTagName(r),l=!i&&!o;return e.from(Object.assign({id:it(),type:o||"paragraph",nodes:a},l?{annotations:{internalWrapper:l}}:{annotations:ue.generate(e,r,s)}),s)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}matchTextBlockTypeByTagName(t){switch(t.nodeName){case"P":return"paragraph";default:return null}}isInlineCandidate(t,e){return t.nodeType===Node.TEXT_NODE||!!ae.has(t.nodeName)||!this.isDedicatedBlockTag(t.nodeName)&&(!(!1!==e.autoMatchFormat||!ce(t))||this.isInlineLeafOrWrapper(t))}isDedicatedBlockTag(t){return ie.has(t)&&!ae.has(t)}isInlineLeafOrWrapper(t){return 0===t.childNodes.length?le.has(t.nodeName):this.isTextOnlyElement(t)?le.has(t.nodeName)||ae.has(t.nodeName):this.hasOnlyInlineDescendants(t)}isTextOnlyElement(t){const e=Array.from(t.childNodes);return!e.some((t=>t.nodeType===Node.ELEMENT_NODE))&&e.some((t=>t.nodeType===Node.TEXT_NODE))}hasOnlyInlineDescendants(t){for(let e=0;e<t.children.length;e++){const n=t.children[e];if(this.isDedicatedBlockTag(n.nodeName))return!1;if(!n.hasChildNodes())return!1;if(!this.hasOnlyInlineDescendants(n))return!1}return!0}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){const n=t[e];return n.nodeType===Node.ELEMENT_NODE&&""===n.textContent&&n.querySelector("img")?1:0}handle(t,e){const n=t[0].querySelector("img");return this.createRTEImageBlock(n,e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"VEGA-RICH-TEXT-IMAGE-EDITOR"===t[e].tagName?1:0}handle(t,e){const n=t[0],s=n.querySelector("img");if(at(s))return jt.from({id:it(),type:"image",nodes:[{id:it(),type:"image",url:s.src,annotations:ue.generate(Ht,n,e)}],annotations:ue.generate(jt,n.parentElement,e)},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends pe{canHandle(t,e){return"IMG"===t[e].tagName?1:0}handle(t,e){return this.createRTEImageBlock(t[0],e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return["heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","title","subtitle"].includes(super.matchTextBlockType(t[e]))?1:0}handle(t,n){const s=this.generateChildNodes(Array.from(t[0].childNodes),{},n);return 0===s.length?null:e.from({id:it(),type:super.matchTextBlockType(t[0]),nodes:s,annotations:ue.generate(e,t[0],n)},n)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){if(!["UL","OL"].includes(t[e].parentElement.nodeName)&&t.some((t=>"LI"===t.nodeName))){let n=0;for(let s=e;s<t.length&&"LI"===t[s].nodeName;s++)n++;return n}return"LI"===t[e].tagName?1:0}handle(t,e){const n=t[0];return["UL","OL"].includes(n.parentElement.nodeName)?mt.from(this.generateListItemBlockDTO(n,e),e):this.generateWithListBlock(t,e)}appendChildBlocks(t,e){t.nestList=e.filter((t=>["bullet-list","number-list"].includes(t.type)))}shouldProceedToElementChildren(){return!0}generateWithListBlock(t,e){return gt.from({id:it(),type:"bullet-list",blocks:t.map((t=>this.generateListItemBlockDTO(t,e)))},e)}generateListItemBlockDTO(t,e){return{id:it(),type:"list-item",annotations:ue.generate(mt,t,e),nodes:this.generateChildNodes(Array.from(t.childNodes.length?t.childNodes:[t]).filter((t=>!["UL","OL"].includes(t.nodeName))),ue.generate(n,t,Object.assign(Object.assign({},e),{skipCustomAnnotations:!0})),e)}}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){const n=t[e],s=n.parentElement,r="LI"!==n.nodeName,i=n.nodeType===Node.TEXT_NODE&&""===n.textContent.trim(),a=at(s)&&["UL","OL"].includes(s.nodeName);return r&&!i&&a?1:0}handle(t,e){const n=this.generateChildNodes(t,{},e);return mt.from({id:it(),type:"list-item",nodes:n,annotations:{}},e)}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return"OL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:gt.from({id:it(),type:"number-list",blocks:[],annotations:ue.generate(gt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof mt)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e){return"UL"===t[e].tagName?1:0}handle(t,e){return 0===t[0].childNodes.length?null:gt.from({id:it(),type:"bullet-list",blocks:[],annotations:ue.generate(gt,t[0],e)},e)}appendChildBlocks(t,e){t.children=e.filter((t=>t instanceof mt)),e.forEach((e=>e.parent=t))}shouldProceedToElementChildren(){return!0}}),bt.registerElementToBlockStrategy(new class extends de{canHandle(t,e,n){const s=t[e];return s.nodeType===Node.TEXT_NODE||this.isInlineTagWithoutBlockChildren(s,n)||ie.has(s.nodeName)&&!this.shouldFallBackToHtmlBlock(s)||n.autoMatchFormat||!this.isCustomHtmlContainer(s)||_t.isTitleOrSubtitle(s)?0:1}handle(t,e){return Ct.from(this.generateHtmlBlock(t[0],e),e)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}isInlineTagWithoutBlockChildren(t,e){if(ae.has(t.nodeName)&&0===t.childNodes.length)return!0;if(ce(t))return!(0===t.childNodes.length&&""===t.textContent&&!ae.has(t.nodeName)&&!le.has(t.nodeName));const n=Array.from(t.childNodes);return!(n.some((t=>t.nodeType===Node.ELEMENT_NODE))||!n.some((t=>t.nodeType===Node.TEXT_NODE)))&&(!1!==e.autoMatchFormat||!oe.has(t.parentElement.nodeName)&&(le.has(t.nodeName)||ae.has(t.nodeName)))}shouldFallBackToHtmlBlock(t){const e=Array.from(t.childNodes);if(0===e.length)return!1;const n=t.parentElement.nodeName;return"UL"!==n&&"OL"!==n&&e.every((t=>t.nodeType===Node.ELEMENT_NODE&&""===t.textContent&&!ae.has(t.nodeName)&&!le.has(t.nodeName)))}isCustomHtmlContainer(t){return"DIV"!==t.nodeName||t.childNodes.length>0&&"IMG"!==t.childNodes[0].nodeName}generateHtmlBlock(t,e){return{id:it(),type:"html-block",htmlTag:t.nodeName.toLowerCase(),annotations:ue.generate(Ct,t,e),children:[]}}}),
|
|
2
|
+
//!important: Code block strategies must be registered after HtmlBlockStrategy because registerElementToBlockStrategy uses unshift, giving later registrations higher priority.
|
|
3
|
+
bt.registerElementToBlockStrategy(new we),bt.registerElementToBlockStrategy(new class extends we{canHandle(t,e){return"VEGA-CODE-BLOCK"===t[e].tagName&&0==!!t[e].querySelector("vega-code-block")||this.isCodeBlockContainer(t[e])?1:0}handle(t){const e=this.isCodeBlockContainer(t[0])?t[0].querySelector("vega-code-block"):t[0],n=e.querySelector("code");if(n)return super.handle([n]);if(e.hasAttribute("data-content")){const t=document.createElement("code");return t.textContent=e.dataset.content,t.dataset.language=e.dataset.language,super.handle([t])}}appendChildBlocks(){}shouldProceedToElementChildren(){return!1}isCodeBlockContainer(t){return"PRE"===t.tagName&&t.classList.contains("code-block-container")&&1===t.querySelectorAll("vega-code-block").length}}),bt.registerElementToNodeStrategy(new class extends me{canHandle(t,e){const n=t[e];return!dt(n)||"BR"!==n.nodeName&&0!==n.childNodes.length?0:1}handle(t,e,s){const r=!(!e||!1!==e.autoMatchFormat),i=Object.assign({},s),a=t[0],o=ue.generate(n,a,Object.assign({parentAnnotations:r?{inlineHtml:i.inlineHtml,link:i.link,code:i.code}:s},e));if("BR"===a.nodeName){const{inlineHtml:t}=o,e=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(n[s[r]]=t[s[r]])}return n}(o,["inlineHtml"]);return this.generateTextNode("\n",t&&"br"===t.htmlTag?e:o)}if(0===a.childNodes.length){const t=r?wt(Object.assign(Object.assign({},n.supportsHtmlTag(a.nodeName.toLowerCase())?o:{}),{inlineHtml:o.inlineHtml})):o;return Object.assign({},this.generateTextNode("",t))}}}),bt.registerElementToNodeStrategy(new class extends me{canHandle(t,e){return t[e].nodeType===Node.TEXT_NODE?1:0}handle(t,e,s){const r=Object.assign({},s),i=!(!e||!1!==e.autoMatchFormat),a=t[0],o=a.parentNode.nodeName.toLowerCase(),l=i&&!n.supportsHtmlTag(o),c=this.generateTextNode(String(a.textContent),i?wt(Object.assign(Object.assign({},"span"===o?r:{link:r.link,code:"code"===o?r.code:void 0}),{inlineHtml:r.inlineHtml,plainText:l||void 0})):r);return Object.assign({},c)}}),Y.register(e.dtoName,new fe),Y.register(gt.dtoName,new fe),Y.register(mt.dtoName,new fe),Y.register(n.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered={}}get alwaysFilter(){return!0}filterAnnotations(t){const e=t,n=e.customStyle;if(!n)return t;e.bold&&n.fontWeight===z&&delete n.fontWeight,e.italic&&n.fontStyle===G&&delete n.fontStyle;const s=this.normalizeTextDecoration(n.textDecoration);return s&&this.shouldRemoveTextDecoration(s,e)&&delete n.textDecoration,0===Object.keys(n).length&&delete e.customStyle,t}normalizeTextDecoration(t){if(!t)return;const e=t.trim().toLowerCase().split(/\s+/);return e.some((t=>t!==K&&t!==J))?void 0:Array.from(new Set(e)).sort().join(" ")}shouldRemoveTextDecoration(t,e){const n=[];return e.underline&&n.push(K),e.strikethrough&&n.push(J),0!==n.length&&t===n.sort().join(" ")}}),Y.register(e.dtoName,new ge),Y.register(e.dtoName,new xe(1)),Y.register(e.dtoName,new xe(2)),Y.register(e.dtoName,new xe(3)),Y.register(e.dtoName,new xe(4)),Y.register(e.dtoName,new xe(5)),Y.register(e.dtoName,new xe(6)),Y.register(e.dtoName,new Te("title")),Y.register(e.dtoName,new Te("subtitle")),Y.register(n.dtoName,new be),Y.register(n.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=q.getDefaultStyles(),this.elementTagName="code"}filterAnnotations(t){const{code:e,customStyle:n}=t;return e&&n?super.filterAnnotations(t):t}canFilter(t){return Z.isCodeNode(t)}canRefill(t,e){return Z.isTextNode(t)&&e.matches(this.elementTagName)}toCssText(){return`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${this.elementTagName} { ${this.convertStylesMapToCssText(Object.assign(Object.assign({},this.stylesToBeFiltered),{fontWeight:"500"}))} }`}}),Y.register(n.dtoName,new et),Y.register(Ht.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=kt.getDefaultStyles(),this.elementTagName="img"}get alwaysFilter(){return!0}canFilter(t){return Z.isImageNode(t)}canRefill(t,e){return e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}),Y.register(k.dtoName,new nt),Y.register(st.dtoName,new rt),Y.register(gt.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=ft.getDefaultStyles(),this.elementTagName="ol,ul"}canFilter(t){return Z.isListBlock(t.dtoName)}canRefill(t,e){return Z.isListBlock(t)&&e.matches(this.elementTagName)}toCssText(){return`${this.elementTagName.split(",").map((t=>`.${Q.RTE_CONTENT_CONTAINER_CLASS_NAME} ${t.trim()}`)).join(", ")} { ${this.convertStylesMapToCssText(this.stylesToBeFiltered)} }`}}),Y.register(mt.dtoName,new class extends Q{constructor(){super(...arguments),this.stylesToBeFiltered=X.getDefaultStyles("paragraph"),this.elementTagName="li",this.headingOrTitleClassNamePattern=/^v-rte-(h[1-6]|title|subtitle)$/}canFilter(t){const e=!t.getStyles().fontSize||this.isBlockOrNodeStylesMatchFilterStyles(t,["fontSize","lineHeight"]);return Z.isListItemBlock(t.dtoName)&&e}canRefill(t,e){return Z.isListItemBlock(t)&&e.matches(this.elementTagName)&&this.isElementNotHeadingOrTitle(e)}toCssText(){return this.buildCssTextForStyles(this.elementTagName)}isElementNotHeadingOrTitle(t){return!t.className.split(" ").some((t=>this.headingOrTitleClassNamePattern.test(t.trim())))}}),Y.register(mt.dtoName,new Oe(1)),Y.register(mt.dtoName,new Oe(2)),Y.register(mt.dtoName,new Oe(3)),Y.register(mt.dtoName,new Oe(4)),Y.register(mt.dtoName,new Oe(5)),Y.register(mt.dtoName,new Oe(6)),Y.register(mt.dtoName,new ye("title")),Y.register(mt.dtoName,new ye("subtitle"));class Ee{static preserve(t){const e=t.replace(/\s+style=/g," data-style=");return new Ae(e)}}class Ae{constructor(t){this.processedHtml=t}getProcessedHtml(){return this.processedHtml}restore(t){this.walkNodes(t)}walkNodes(t){t.forEach((t=>{if(dt(t)){const e=t.getAttribute("data-style");e&&(t.style.cssText=e,t.removeAttribute("data-style")),t.children.length>0&&this.walkNodes(Array.from(t.children))}}))}}class ke{process(t){return t.replace(/(<[^>]+>)(\s+)(<[^>]+>)/g,((t,e,n,s)=>{const r=this.extractOpeningTagName(e),i=this.extractClosingTagName(s);return r&&i&&r===i?`${e}${n}${s}`:`${e}${s}`}))}extractOpeningTagName(t){const e=t.match(/<(\w[\w-]*)/);return e?e[1]:null}extractClosingTagName(t){const e=t.match(/<\/(\w[\w-]*)/);return e?e[1]:null}}class He{process(t){return t.replace(/(>)[\n\t]+(?=.)/g,"$1")}}class Ne{process(t){return t.replace(/(.?)[\n\t]+(?=<)/g,"$1")}}class je{constructor(){this.processors=[new ke,new He,new Ne]}clean(t){if(!t||0===t.trim().length)return t;let e,n=t;do{e=n;for(const t of this.processors)n=t.process(n)}while(n!==e);return n}}class Ce{constructor(t){this.dtoName=Ce.dtoName,t.forEach((t=>{t.parent=this})),this.children=t}static fromJSON(t,e={autoMatchFormat:!0}){const n=t.map((t=>{const n=tt.getRTEBlockClass(t.type);if(n)return n.from(t,e);throw new Error(`[Vega] Unknown block type: ${t.type}`)}));return new Ce(n)}static createEmptyContent(t={autoMatchFormat:!0}){return Ce.fromJSON([{id:it(),type:"paragraph",annotations:{internalWrapper:!t.autoMatchFormat},nodes:[{id:it(),annotations:{plainText:!t.autoMatchFormat},type:"text",text:""}]}],t)}static fromHtml(t,e={autoMatchFormat:!0,skipCustomAnnotations:!1}){const n=(new je).clean(t),s=Ee.preserve(n),r=s.getProcessedHtml(),i=(new DOMParser).parseFromString(r,"text/html").body,a=Array.from(i.childNodes);s.restore(a);const o=Ot.process(a,e).filter(at).map((t=>t.toDto(e))).filter(at);return new Ce(o)}static generateContentStyles(t){return Y.generateAllStylesContent(null==t?void 0:t.enableFontImports)}clone(t=!1){return new Ce(t?this.children.map((t=>t.clone(this))):[...this.children])}toJSON(){return this.children.map((t=>t.toJSON()))}toHtml(t){return t&&(at(t.autoMatchFormat)||at(t.skipCustomAnnotations))&&pt.warn("The 'options' parameter's properties 'autoMatchFormat' and 'skipCustomAnnotations' in toHtml method are deprecated and will be removed in the future."),this.isEmpty()?"":this.children.map((e=>e.toHtml({filterInlineStyles:null==t?void 0:t.filterInlineStyles}))).join("")}isEmpty(){return 0===this.children.length||1===this.children.length&&!this.children[0].isNotEmpty()}apply(t){if(r.executeTheStrategy(t,this),t.executedFlag&&t.isFlushable){const t=H.getDOMByEntity(this);t&&ot.notify(lt.getSubject(t,ht),{})}}getLastNode(){return 0===this.children.length?null:this.children[this.children.length-1].getLastNode()}toListItem(t){t.children.map((t=>t.apply(new g)));const e=new mt(it());return e.apply(new s(t.children)),e.annotationMap=t.annotationMap,e}createList(t){return new gt(it(),t)}findNodeById(t){return this.findNodeInBlocksById(t,this.children)}findNodeInBlocksById(t,e){for(const n of e){if("children"in n)for(const e of n.children)if(e.id===t)return e;if(n instanceof mt&&n.nestList)for(const e of n.nestList){const n=this.findNodeInBlocksById(t,e.children);if(n)return n}if(n instanceof gt&&n.children){const e=this.findNodeInBlocksById(t,n.children);if(e)return e}}return null}}r.register(c.DELETE_CHILDREN,Ce.name,new P),r.register(c.APPEND_CHILDREN,Ce.name,new yt),r.register(c.INSERT_CHILDREN_BEFORE,Ce.name,new Et),r.register(c.INSERT_CHILDREN_AFTER,Ce.name,new At),r.register(c.TRANSFORM_TO_CODE_BLOCK,Ce.name,new class extends t{handleAction(t,e){const n=t.selectedBlocks,s=new k(it(),this.getCodeContent(n),"plainText");e.apply(new x(n[0],s)),t.newCodeBlock=s,this.removeSelectBlocks(n,e)}getCodeContent(t){return t.filter((t=>"image"!==t.type&&"list-item"!==t.type)).map((t=>t.children.map((t=>t.text)).join(""))).join("\n")}removeSelectBlocks(t,e){for(let n=0;n<t.length;n++)e.apply(new f(t[n]))}}),r.register(c.UPDATE_CURSOR_POSITION,Ce.name,new class extends t{handleAction(t,e){const{offset:n,nextFocusNode:s,immediatelyRun:r}=t,i=H.getDOMByEntity(e);i&&ot.notify(lt.getSubject(i,ct),{node:s,offset:n,updateDirectly:r})}}),Ce.dtoName="VegaRTEContent";export{zt as A,de as B,bt as E,Nt as I,Bt as M,Pt as P,Ft as R,Ee as S,It as U,Ce as V,xt as a,jt as b,Et as c,mt as d,gt as e,Ht as f,kt as g,ue as h,Ot as i}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,M as s,V as e}from"./p-6e1ab235.js";import{O as i}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{f as a}from"./p-
|
|
1
|
+
import{c as t,M as s,V as e}from"./p-6e1ab235.js";import{O as i}from"./p-331a62d5.js";import{C as o}from"./p-2d0d575f.js";import{f as a}from"./p-528748fa.js";import{d as c}from"./p-526e3634.js";import{j as n,k as l}from"./p-3a93730e.js";var h=function(t,s,e,i){var o,a=arguments.length,c=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(c=(a<3?o(c):a>3?o(s,e,c):o(s,e))||c);return a>3&&c&&Object.defineProperty(s,e,c),c};class r extends e{constructor(t){super(),this.isAcceptableObserverPayload=t=>"object"==typeof t&&!!t&&t.host===this.parent,this.observerEntry=t}connectedCallback(){if(this.parent=this.getParent(),!this.parent)return;const{subStates:t}=this.observerEntry;this.subStateObserver=new i(this.isAcceptableObserverPayload,(s=>{const e=t.find((t=>t.parentStateName===s.stateName));e&&this.updateState(e,s.value)})),o.register(c.getSubject(this.parent,n),this.subStateObserver),this.observerEntry.pullStatesWhenReattached&&this.host.classList.contains("hydrated")&&(this.parent=this.getParent(),this.pullStates())}disconnectedCallback(){this.parent&&o.unregister(c.getSubject(this.parent,n),this.subStateObserver)}componentWillLoad(){this.pullStates()}getParent(){return"string"==typeof this.observerEntry.parent?a(this.host,this.observerEntry.parent):this.observerEntry.parent()}updateState(t,s){t.callback?t.callback(s):this[t.subStateName]=s}pullStates(){if(!this.parent)return;const{subStates:t}=this.observerEntry;t.forEach((t=>{o.notify(c.getSubject(this.parent,l),{host:this.parent,stateName:t.parentStateName,callback:s=>{this.updateState(t,s)}})}))}}h([t()],r.prototype,"host",void 0),h([s("connectedCallback")],r.prototype,"connectedCallback",null),h([s("disconnectedCallback")],r.prototype,"disconnectedCallback",null),h([s("componentWillLoad")],r.prototype,"componentWillLoad",null);export{r as S}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as n}from"./p-dd529875.js";function t(t){return i=>{const{connectedCallback:o,componentDidLoad:s,disconnectedCallback:e}=i;i.connectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.register(t),null==o?void 0:o.call(this)},i.componentDidLoad=function(){return this.keyboardEventListeners=t(this),n.register(this.keyboardEventListeners),null==s?void 0:s.call(this)},i.disconnectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.deregister(t),null==e?void 0:e.call(this)}}}export{t as I}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,k as a,l as t,m as o,n,o as s,p as e,q as i,h as f,r as u,B as c,C as
|
|
1
|
+
import{j as r,k as a,l as t,m as o,n,o as s,p as e,q as i,h as f,r as u,B as c,C as b,f as d,s as p}from"./p-b2488adb.js";import{B as l}from"./p-ed45b3b6.js";import{L as m}from"./p-6e1ab235.js";import{R as $}from"./p-94a064a3.js";import{a as v}from"./p-d884c644.js";import{S as j,a as g,b as k}from"./p-3390bb20.js";import{B as h}from"./p-d4ea8e22.js";const w=new class{format(a,t){switch(t){case"backgroundColor":return r.format(a);case"borderColor":return k.format(a);case"shadow":return g.format(a);case"border":return j.format(a);default:throw new Error(`Invalid flag ${t} passed into StateFormatFacade`)}}};function O(r,a,t){m.warn(`The ${r} value ${a} is invalid, it must be a value of: `,t)}function x(r,a){let t="";return a.includes("dark")&&(t+=` dark:v-dark-${r}`),t}function B(r){if(a(r))return`v-p-${r}`;O("padding",r,Object.keys(f))}function C(r){if(u(r))return`v-border-${r}`;O("border-style",r,h)}function F(r){if(t(r))return`v-${r}`;O("border-radius",r,Object.keys(c))}function S(r){if(o(r))return`v-${r}`;O("border-color",r,b.filter((()=>/^border-color-.+$/.test)))}function q(r,a=[]){if(n(r))return`v-${r}`+x(r,a);O("background-color",r,b.filter((()=>/^bg-.+$/.test)))}function y(r,a=[]){if(s(r))return`v-${r}`+x(r,a);O("text-color",r,b.filter((()=>/^text-.+$/.test)))}function E(r){if(e(r))return`vega-flex-${r}`;O("breakpoint",r,Object.keys(l))}function I(r){if(e(r))return l[r];O("breakpoint",r,Object.keys(l))}function L(r){if(a(r))return`v-gap-${r}`;O("gap",r,Object.keys(f))}function R(r,a=[]){if(i(r))return`v-${r}`+x(r,a);O("shadows",r,d)}function T(r,a){if(null!=r)return $.format(r,a)}function z(r){if(p(r))return`v-${r}`;O("font",r,v)}function A(r,a){if(null!=r)return w.format(r,a)}export{L as a,R as b,I as c,q as d,S as e,T as f,F as g,B as h,y as i,A as j,C as k,E as l,z as m}
|