@globalpayments/vega 2.43.0 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-e80a14da.js → app-globals-c99ca280.js} +3 -3
- package/dist/cjs/{content-state-7b418b83.js → content-state-5659cad7.js} +1 -13
- package/dist/cjs/{design-token-622f55de.js → design-token-61572ad6.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-f704b06d.js → element-appender-slimmer-6de02fb6.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-9ea504a7.js → form-field-controller-slimmer-ac875498.js} +1 -1
- package/dist/cjs/{image-annotation-action-46632b22.js → image-annotation-action-cd529b25.js} +5 -2
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{public-rules-ba486ffa.js → public-rules-a23c74a9.js} +2 -2
- package/dist/cjs/{responsive-format-facade-23588691.js → responsive-format-facade-bf7d9ab2.js} +2 -2
- package/dist/cjs/{rich-text-editor-required-rule-792fede0.js → rich-text-editor-required-rule-cdc2e15e.js} +1 -1
- package/dist/cjs/{style-formatter-42a4e762.js → style-formatter-f26738b9.js} +1 -1
- package/dist/cjs/{translation-2c8a32bb.js → translation-f7279bf1.js} +61 -0
- package/dist/cjs/{translation-slimmer-593b92fe.js → translation-slimmer-4d852eab.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
- package/dist/cjs/vega-app-header-button.cjs.entry.js +4 -4
- package/dist/cjs/vega-box.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +4 -4
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_3.cjs.entry.js +2 -2
- package/dist/cjs/vega-card.cjs.entry.js +4 -4
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-chip.cjs.entry.js +4 -4
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +2 -2
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-dialog_2.cjs.entry.js +80 -5
- package/dist/cjs/vega-divider.cjs.entry.js +4 -4
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +33 -10
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flex.cjs.entry.js +5 -5
- package/dist/cjs/vega-font.cjs.entry.js +4 -4
- package/dist/cjs/vega-form.cjs.entry.js +2 -2
- package/dist/cjs/vega-grid.cjs.entry.js +4 -4
- package/dist/cjs/vega-icon.cjs.entry.js +4 -4
- package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +2 -2
- package/dist/cjs/vega-input-numeric.cjs.entry.js +2 -2
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +8 -5
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
- package/dist/cjs/vega-input.cjs.entry.js +2 -2
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +28 -11
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +17 -9
- package/dist/cjs/vega-pagination.cjs.entry.js +9 -8
- package/dist/cjs/vega-popover_2.cjs.entry.js +6 -8
- package/dist/cjs/vega-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +38 -17
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +6 -6
- package/dist/cjs/vega-skeleton.cjs.entry.js +14 -2
- package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
- package/dist/cjs/vega-table_8.cjs.entry.js +4 -4
- package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +22 -12
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega.cjs.js +4 -4
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.js +19 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.js +6 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +3 -8
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +8 -5
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +62 -1
- package/dist/collection/components/vega-modal/vega-modal.js +28 -0
- package/dist/collection/components/vega-nav/slimmers/renderers/vega-nav-list-renderer.js +3 -3
- package/dist/collection/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.js +7 -1
- package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +47 -2
- package/dist/collection/components/vega-nav/vega-left-nav-link/slimmers/renderers/vega-left-nav-link-renderer.js +4 -1
- package/dist/collection/components/vega-nav/vega-left-nav-link/vega-left-nav-link.js +21 -0
- package/dist/collection/components/vega-nav/vega-left-nav-section/slimmers/renderers/vega-left-nav-section-renderer.js +4 -1
- package/dist/collection/components/vega-nav/vega-left-nav-section/vega-left-nav-section.js +20 -0
- package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-renderer.js +16 -7
- package/dist/collection/components/vega-pagination/vega-pagination.js +6 -5
- package/dist/collection/components/vega-popover/vega-popover.js +3 -8
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +0 -11
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/toolbar-button-slimmer.abstract.js +4 -1
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-image-editor/slimmers/renderers/vega-rich-text-image-editor-renderer.js +12 -7
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +7 -4
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.js +5 -0
- package/dist/collection/components/vega-skeleton/slimmers/renderers/vega-skeleton-image-renderer.js +4 -1
- package/dist/collection/components/vega-skeleton/vega-skeleton.css +0 -1
- package/dist/collection/components/vega-skeleton/vega-skeleton.js +38 -0
- package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-dropdown-renderer.js +3 -0
- package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-dropdown-renderer.js +2 -0
- package/dist/collection/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.css +2 -1
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +10 -5
- package/dist/collection/helpers/translation/internal-translation-controller.js +25 -0
- package/dist/collection/helpers/translation/locales/en.js +36 -0
- package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +48 -0
- package/dist/collection/helpers/validator/test/rules/rich-text-editor-required-rule.test.js +4 -4
- package/dist/esm/{app-globals-f767f6be.js → app-globals-6a7d90a9.js} +3 -3
- package/dist/esm/{content-state-2b4fdc4f.js → content-state-7e9f3421.js} +1 -13
- package/dist/esm/{design-token-9a3c1dc5.js → design-token-e349fd57.js} +1 -1
- package/dist/esm/{element-appender-slimmer-8adfc578.js → element-appender-slimmer-a187435b.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-75f525f4.js → form-field-controller-slimmer-c9280871.js} +1 -1
- package/dist/esm/{image-annotation-action-aea4f430.js → image-annotation-action-2541490e.js} +5 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{public-rules-20db9763.js → public-rules-596db5ba.js} +2 -2
- package/dist/esm/{responsive-format-facade-175aee98.js → responsive-format-facade-ce8a1ef5.js} +2 -2
- package/dist/esm/{rich-text-editor-required-rule-ed41bdd9.js → rich-text-editor-required-rule-ef25c4da.js} +1 -1
- package/dist/esm/{style-formatter-99ad38cd.js → style-formatter-3b67ed25.js} +1 -1
- package/dist/esm/{translation-a18bc15e.js → translation-4bed3392.js} +61 -0
- package/dist/esm/{translation-slimmer-a8c20249.js → translation-slimmer-fc1ddf17.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +4 -4
- package/dist/esm/vega-app-header-button.entry.js +4 -4
- package/dist/esm/vega-box.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +3 -3
- package/dist/esm/vega-calendar_3.entry.js +2 -2
- package/dist/esm/vega-card.entry.js +4 -4
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +2 -2
- package/dist/esm/vega-chip.entry.js +4 -4
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +2 -2
- package/dist/esm/vega-date-picker_2.entry.js +6 -6
- package/dist/esm/vega-dialog_2.entry.js +80 -5
- package/dist/esm/vega-divider.entry.js +4 -4
- package/dist/esm/vega-dropdown_5.entry.js +33 -10
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flex.entry.js +5 -5
- package/dist/esm/vega-font.entry.js +4 -4
- package/dist/esm/vega-form.entry.js +2 -2
- package/dist/esm/vega-grid.entry.js +4 -4
- package/dist/esm/vega-icon.entry.js +4 -4
- package/dist/esm/vega-image-uploader.entry.js +5 -5
- package/dist/esm/vega-input-credit-card.entry.js +2 -2
- package/dist/esm/vega-input-numeric.entry.js +2 -2
- package/dist/esm/vega-input-phone-number.entry.js +8 -5
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +5 -5
- package/dist/esm/vega-input.entry.js +2 -2
- package/dist/esm/vega-left-nav_5.entry.js +28 -11
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +17 -9
- package/dist/esm/vega-pagination.entry.js +9 -8
- package/dist/esm/vega-popover_2.entry.js +6 -8
- package/dist/esm/vega-radio_2.entry.js +2 -2
- package/dist/esm/vega-rich-text-content.entry.js +2 -2
- package/dist/esm/vega-rich-text-editor_4.entry.js +38 -17
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +2 -2
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +6 -6
- package/dist/esm/vega-skeleton.entry.js +14 -2
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-table_8.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +22 -12
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +4 -4
- package/dist/esm/vega.js +4 -4
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.d.ts +17 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.d.ts +2 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +2 -4
- package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +6 -3
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +25 -0
- package/dist/types/components/vega-modal/vega-modal.d.ts +10 -0
- package/dist/types/components/vega-nav/interface.d.ts +4 -0
- package/dist/types/components/vega-nav/vega-left-nav-group/slimmers/renderers/vega-left-nav-group-renderer.d.ts +2 -0
- package/dist/types/components/vega-nav/vega-left-nav-group/vega-left-nav-group.d.ts +10 -0
- package/dist/types/components/vega-nav/vega-left-nav-link/slimmers/renderers/vega-left-nav-link-renderer.d.ts +1 -0
- package/dist/types/components/vega-nav/vega-left-nav-link/vega-left-nav-link.d.ts +7 -0
- package/dist/types/components/vega-nav/vega-left-nav-section/slimmers/renderers/vega-left-nav-section-renderer.d.ts +1 -0
- package/dist/types/components/vega-nav/vega-left-nav-section/vega-left-nav-section.d.ts +6 -0
- package/dist/types/components/vega-pagination/vega-pagination-page-size-selector-mobile/slimmers/renderers/page-size-selector-mobile-renderer.d.ts +2 -0
- package/dist/types/components/vega-pagination/vega-pagination.d.ts +5 -4
- package/dist/types/components/vega-popover/vega-popover.d.ts +2 -4
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +0 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/toolbar-button-slimmer.abstract.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-image-editor/slimmers/renderers/vega-rich-text-image-editor-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.d.ts +2 -0
- package/dist/types/components/vega-skeleton/slimmers/renderers/vega-skeleton-image-renderer.d.ts +1 -0
- package/dist/types/components/vega-skeleton/vega-skeleton.d.ts +10 -1
- package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +2 -0
- package/dist/types/components.d.ts +62 -14
- package/dist/types/helpers/translation/interface.d.ts +42 -1
- package/dist/types/helpers/translation/internal-translation-controller.d.ts +10 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-01d4c679.js +1 -0
- package/dist/vega/{p-fcfc7b00.entry.js → p-0d8136bc.entry.js} +1 -1
- package/dist/vega/{p-ffe7cf8b.entry.js → p-11249b56.entry.js} +1 -1
- package/dist/vega/{p-3fcf766c.entry.js → p-1d46d29d.entry.js} +1 -1
- package/dist/vega/{p-2940fa99.entry.js → p-25d18888.entry.js} +1 -1
- package/dist/vega/p-2b7252c6.js +1 -0
- package/dist/vega/{p-a194988c.entry.js → p-32af415d.entry.js} +1 -1
- package/dist/vega/p-39bb2289.js +1 -0
- package/dist/vega/{p-c76024af.entry.js → p-39d3782b.entry.js} +1 -1
- package/dist/vega/{p-da6d71ed.entry.js → p-3b877fa3.entry.js} +1 -1
- package/dist/vega/{p-56926f06.entry.js → p-3c36bd11.entry.js} +1 -1
- package/dist/vega/{p-3bcd66e9.entry.js → p-3d236584.entry.js} +1 -1
- package/dist/vega/{p-8f6c028b.entry.js → p-46555732.entry.js} +1 -1
- package/dist/vega/p-4868e57c.entry.js +1 -0
- package/dist/vega/{p-eb87d418.entry.js → p-4e406f70.entry.js} +1 -1
- package/dist/vega/{p-c531d2f3.js → p-51686ec2.js} +1 -1
- package/dist/vega/p-5299a287.entry.js +1 -0
- package/dist/vega/p-55101775.entry.js +1 -0
- package/dist/vega/{p-5e38f071.entry.js → p-57f406cf.entry.js} +1 -1
- package/dist/vega/{p-6008c0c0.entry.js → p-5825343a.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-eac0f7ff.js → p-5f5bfd9c.js} +1 -1
- package/dist/vega/{p-b82b01fa.entry.js → p-60234e0a.entry.js} +1 -1
- package/dist/vega/{p-15d40cb5.entry.js → p-639c3322.entry.js} +1 -1
- package/dist/vega/{p-ac91b1b5.entry.js → p-6be0a9bf.entry.js} +1 -1
- package/dist/vega/{p-c5ddea92.entry.js → p-71b82ba5.entry.js} +1 -1
- package/dist/vega/{p-15d7a049.js → p-7617b2ac.js} +1 -1
- package/dist/vega/{p-30d56b87.entry.js → p-7839a201.entry.js} +1 -1
- package/dist/vega/{p-9c4271d9.entry.js → p-8b044ac7.entry.js} +1 -1
- package/dist/vega/{p-e3d6e626.entry.js → p-8d1e0418.entry.js} +1 -1
- package/dist/vega/{p-9fdb3ef8.js → p-99289273.js} +1 -1
- package/dist/vega/{p-502f523c.entry.js → p-9955844c.entry.js} +1 -1
- package/dist/vega/p-9ba28523.js +1 -0
- package/dist/vega/{p-1538cafa.entry.js → p-9bebdace.entry.js} +1 -1
- package/dist/vega/{p-60e678ea.entry.js → p-9d3d7854.entry.js} +1 -1
- package/dist/vega/{p-251315ac.entry.js → p-a04624f3.entry.js} +1 -1
- package/dist/vega/{p-e3820e5b.js → p-a3fa41c8.js} +1 -1
- package/dist/vega/{p-058f2c79.entry.js → p-a501fb74.entry.js} +1 -1
- package/dist/vega/{p-d293df16.entry.js → p-a88acecd.entry.js} +1 -1
- package/dist/vega/{p-1edaa1cc.entry.js → p-acba84aa.entry.js} +1 -1
- package/dist/vega/{p-265f6155.entry.js → p-b196eab0.entry.js} +1 -1
- package/dist/vega/{p-150f8194.entry.js → p-b288e52e.entry.js} +1 -1
- package/dist/vega/p-b587e576.entry.js +1 -0
- package/dist/vega/{p-f61c9513.entry.js → p-b6c155d4.entry.js} +1 -1
- package/dist/vega/{p-3c235627.entry.js → p-b87ede84.entry.js} +1 -1
- package/dist/vega/{p-40239f3f.entry.js → p-c00d95d2.entry.js} +1 -1
- package/dist/vega/p-c906aa4f.js +1 -0
- package/dist/vega/{p-9721f1ea.entry.js → p-cf3d8e47.entry.js} +1 -1
- package/dist/vega/p-d0007822.entry.js +1 -0
- package/dist/vega/{p-d924d6d4.entry.js → p-d3101d07.entry.js} +1 -1
- package/dist/vega/p-d8683a5f.js +1 -0
- package/dist/vega/{p-31c88532.entry.js → p-dbd3e747.entry.js} +1 -1
- package/dist/vega/{p-91ec1b58.entry.js → p-dd94bd57.entry.js} +1 -1
- package/dist/vega/{p-97950866.entry.js → p-e244aa52.entry.js} +1 -1
- package/dist/vega/{p-502dcacc.entry.js → p-e8bb5d2e.entry.js} +1 -1
- package/dist/vega/{p-d3a815a7.entry.js → p-e8be1bd4.entry.js} +1 -1
- package/dist/vega/p-f18ed03e.entry.js +1 -0
- package/dist/vega/p-f5c32d70.entry.js +1 -0
- package/dist/vega/{p-ca52f952.entry.js → p-fe51bfea.entry.js} +1 -1
- package/dist/vega/{p-d13704a2.entry.js → p-fea464ce.entry.js} +1 -1
- package/dist/vega/{p-1040bac6.js → p-ffaafd34.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/vega/p-14514252.entry.js +0 -1
- package/dist/vega/p-1b6a38ab.js +0 -1
- package/dist/vega/p-31ba6562.entry.js +0 -1
- package/dist/vega/p-607ba0e0.entry.js +0 -1
- package/dist/vega/p-76076b46.js +0 -1
- package/dist/vega/p-7e1e319d.entry.js +0 -1
- package/dist/vega/p-8bc506e0.entry.js +0 -1
- package/dist/vega/p-b129beb6.js +0 -1
- package/dist/vega/p-b845ea28.js +0 -1
- package/dist/vega/p-c89c01b4.entry.js +0 -1
- package/dist/vega/p-d920b18c.js +0 -1
- package/dist/vega/p-e44c5f70.entry.js +0 -1
- package/dist/vega/p-f4931a1f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as r,g as s}from"./p-1c298d5a.js";import{R as a}from"./p-280cbcdb.js";import{c as o}from"./p-86194314.js";import{s as n}from"./p-9b797118.js";import{a as l,h as p,b as h}from"./p-bf953152.js";import{F as d}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i,H as r,g as s}from"./p-1c298d5a.js";import{R as a}from"./p-280cbcdb.js";import{c as o}from"./p-86194314.js";import{s as n}from"./p-9b797118.js";import{a as l,h as p,b as h}from"./p-bf953152.js";import{F as d}from"./p-a3fa41c8.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{b as g}from"./p-a247e073.js";import{c as x}from"./p-c8f914d2.js";import{C as b}from"./p-2d0d575f.js";import{f as v}from"./p-c8408c13.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-e06361df.js";import"./p-d8683a5f.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-59c9de55.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-3647d61d.js";import"./p-262ec334.js";import"./p-619fdde5.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,r){var s,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(o=(a<3?s(o):a>3?s(t,i,o):s(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};const k=class{constructor(r){e(this,r),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.globalSlimmers={},this.formFieldController=new d({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new a:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.colorPickerContainerRef,touchableAreaGetter:()=>[this.colorPickerTouchableAreaRef]}),this.changeEventEmitter=x(k,v),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(u),this.value="",this.hint="",this.disabled=!1,this.required=!1,this.label="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.isInline=!1,this.renderColorPickerContainer=()=>i("div",{class:l([this.isInline?null:"color-picker-inline"]),ref:e=>this.colorPickerContainerRef=e},i("vega-flex",{direction:"row",gap:"size-8"},this.colors.map((e=>i("div",{id:e,class:"color-picker-inline-items",ref:e=>this.colorPickerTouchableAreaRef=e,style:{backgroundColor:e},onClick:this.updateValueProp,role:"button",tabIndex:0,"aria-label":"color",onKeyDown:o()},this.value===e?i("vega-icon",{icon:"checkmark",size:"size-16",class:{"v-text-black":this.isDarkColorCheckmark(this.value),"v-text-white":!this.isDarkColorCheckmark(this.value)}}):null))))),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.updateValueProp=async e=>{this.disabled||(this.value=String(e.currentTarget.getAttribute("id")))}}watchValue(){this.resetValueIfInvalid(),this.changeEventEmitter.emit(this.value),b.notify(g,{host:this.host,detail:this.value})}watchValidationRules(){}connectedCallback(){this.resetValueIfInvalid()}render(){return n(i(r,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderColorPickerContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}isDarkColorCheckmark(e,t="#fcfcfc",i="#203645"){const r=this.getLuminance(e),s=this.getLuminance(t),a=this.getLuminance(i);return r>Math.sqrt((s+.05)*(a+.05))-.05}getLuminance(e){const t=[p(e).r/255,p(e).g/255,p(e).b/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]}resetValueIfInvalid(){this.colors.some((e=>h(e).toUpperCase()==h(this.value).toUpperCase()))||(this.value="")}get host(){return s(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([f()],k.prototype,"globalSlimmers",void 0),w([c()],k.prototype,"formFieldController",void 0),w([c()],k.prototype,"changeEventEmitter",void 0),w([c()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k.style=':host{display:inline-block;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host(.disabled) .color-picker-inline{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.color-picker-inline-items:hover{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}.color-picker-inline-items:focus-within{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host(.disabled) .color-picker-inline-items:hover{box-shadow:none}:host(.disabled) .color-picker-inline-items:focus-within{box-shadow:none}:host .color-picker-inline{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding:12px;max-width:max-content}:host .color-picker-inline-items{display:flex;border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1));border-radius:4px;width:24px;height:24px;cursor:pointer;align-items:center;justify-content:center}:host .checkmark-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .checkmark-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host vega-text{padding-left:8px;padding-right:8px;padding-top:4px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host vega-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .color-picker-inline.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-hidden{display:none}:host vega-flex{flex-wrap:wrap;max-width:264px}';export{k as vega_color_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as o,H as r,g as a}from"./p-1c298d5a.js";import{s as p}from"./p-9b797118.js";import{I as s}from"./p-f2373487.js";import{c as i,M as n,V as c,I as l}from"./p-6e1ab235.js";import{V as v,I as h}from"./p-4387d550.js";import{c as m}from"./p-c8f914d2.js";import{d as g,L as d,M as f}from"./p-c8408c13.js";import{E as b}from"./p-
|
|
1
|
+
import{h as e,r as t,c as o,H as r,g as a}from"./p-1c298d5a.js";import{s as p}from"./p-9b797118.js";import{I as s}from"./p-f2373487.js";import{c as i,M as n,V as c,I as l}from"./p-6e1ab235.js";import{V as v,I as h}from"./p-4387d550.js";import{c as m}from"./p-c8f914d2.js";import{d as g,L as d,M as f}from"./p-c8408c13.js";import{E as b}from"./p-ffaafd34.js";import{r as w}from"./p-901c5b75.js";import{p as x}from"./p-e06361df.js";import"./p-2e65e175.js";import"./p-bf953152.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-59c9de55.js";import"./p-619fdde5.js";import"./p-f1e0e7d4.js";import"./p-37b05e0b.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-262ec334.js";import"./p-b1f65b13.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-51686ec2.js";import"./p-0c667d6a.js";import"./p-3647d61d.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-01d4c679.js";import"./p-a247e073.js";import"./p-cc63e827.js";import"./p-0fd6c35b.js";import"./p-d8683a5f.js";var j=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};class u extends c{appendPopoverSlotContent(){const e=this.host.querySelector("[slot='popover']");e&&this.popoverContentBox.appendChild(e)}getPopoverContentBox(){return this.popoverContentBox}render(){return e("vega-popover-content-box",{ref:e=>this.popoverContentBox=e,showArrow:this.showArrow})}}j([i()],u.prototype,"host",void 0),j([i()],u.prototype,"showArrow",void 0),j([n("componentDidRender")],u.prototype,"appendPopoverSlotContent",null);var R=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};class y extends b{constructor(){super((()=>this.generateShowConfigFactory()),(()=>this.trigger),"isPopoverShow")}connectedCallback(){this.registerRemoteMethod()}disconnectedCallback(){w.unRegister(g.getSubject(this.host,x))}generateShowConfigFactory(){return{target:this.target||this.host,appendableElement:this.appenderRenderer.getPopoverContentBox(),positionRelativeTo:this.positionRelativeTo,matchTargetWidth:!1,size:this.size,placement:this.placement,alignment:this.alignment,isScreenPosition:this.isScreenPosition}}registerRemoteMethod(){w.register(g.getSubject(this.host,x),(e=>{this.target=e,super.updateShowConfigFactory(this.generateShowConfigFactory.bind(this))}))}}R([i()],y.prototype,"host",void 0),R([i()],y.prototype,"trigger",void 0),R([i()],y.prototype,"positionRelativeTo",void 0),R([i()],y.prototype,"placement",void 0),R([i()],y.prototype,"alignment",void 0),R([i()],y.prototype,"size",void 0),R([i()],y.prototype,"isScreenPosition",void 0),R([i({writable:!0})],y.prototype,"isPopoverShow",void 0),R([i()],y.prototype,"appenderRenderer",void 0),R([n("connectedCallback")],y.prototype,"connectedCallback",null),R([n("disconnectedCallback")],y.prototype,"disconnectedCallback",null);var S=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};const k=class{constructor(e){t(this,e),this.vegaPopoverShow=o(this,"vegaPopoverShow",7),this.popoverShow=o(this,"popoverShow",7),this.vegaPopoverHide=o(this,"vegaPopoverHide",7),this.popoverHide=o(this,"popoverHide",7),this.globalSlimmers={},this.appenderRenderer=new u,this.appenderController=new y,this.popoverShowEventEmitter=m(k,d),this.popoverHideEventEmitter=m(k,f),this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.isPopoverShow=!1,this.placement="top",this.alignment="center",this.trigger="click",this.showArrow=!0,this.isScreenPosition=!1,this.showPopover=()=>{this.appenderController.show()},this.hidePopover=()=>{this.appenderController.hide()}}async watchIsPopoverShow(){this.isPopoverShow?this.popoverShowEventEmitter.emit():this.popoverHideEventEmitter.emit()}watchToRefreshPopover(){this.isPopoverShow&&this.appenderController.show()}componentDidRender(){}async show(){this.isPopoverShow||this.showPopover()}async hide(){this.isPopoverShow&&this.hidePopover()}render(){return p(e(r,null,e("slot",{name:"popover-content"}),this.appenderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{isPopoverShow:["watchIsPopoverShow"],size:["watchToRefreshPopover"],placement:["watchToRefreshPopover"],alignment:["watchToRefreshPopover"]}}};S([h()],k.prototype,"globalSlimmers",void 0),S([l()],k.prototype,"appenderRenderer",void 0),S([l()],k.prototype,"appenderController",void 0),S([l()],k.prototype,"popoverShowEventEmitter",void 0),S([l()],k.prototype,"popoverHideEventEmitter",void 0),S([l()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S([s((e=>[{keyCode:"Escape",activeElementInScope:[e.host],callback:e.hidePopover},{keyCode:"Tab",activeElementOutScope:[e.host,e.appenderRenderer.getPopoverContentBox()],callback:e.hidePopover},{keyCode:"Tab",activeElementInScope:[e.host],callback:()=>{"hover"===e.trigger&&e.showPopover()}}]))],k.prototype,"host",void 0),k.style=":host{display:inline-block}";var C=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};const P=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.showArrow=!0}render(){return p(e(r,{class:{"vega-popover":!0,"no-arrow":!this.showArrow},role:"tooltip"},e("div",{class:"vega-popover-content"},e("slot",{name:"popover"}),this.showArrow&&e("div",{class:"vega-arrow"})),e("slot",null)),this.host)}get host(){return a(this)}};C([h()],P.prototype,"globalSlimmers",void 0),C([l()],P.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P.style=':host{position:absolute}:host(.vega-force-hidden){display:none !important}.vega-popover-content{border-radius:8px;padding:16px;position:relative;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));box-shadow:var(--v-shadow-popover, 0px 0px 88px 0px rgba(2, 2, 15, 0.01), 0px 0px 32px 0px rgba(2, 2, 15, 0.02), 0px 4px 72px 0px rgba(2, 2, 15, 0.06))}.vega-popover-content .vega-arrow{position:absolute}.vega-popover-content .vega-arrow::after{display:inline-block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));content:"";border-right-width:0px;border-bottom-width:0px;border-radius:4px 1px 0 1px;transform:skewX(18deg);width:18px;height:17.12px;border-right-color:transparent;border-bottom-color:transparent}:host(.vega-placement-left) .vega-arrow{transform:rotate(144deg);right:-9px}:host(.vega-placement-left.vega-alignment-start) .vega-arrow{top:8px}:host(.vega-placement-left.vega-alignment-center) .vega-arrow{top:calc(50% - 14px)}:host(.vega-placement-left.vega-alignment-end) .vega-arrow{bottom:12px}:host(.vega-placement-right) .vega-arrow{transform:rotate(324deg);left:-9px}:host(.vega-placement-right.vega-alignment-start) .vega-arrow{top:12px}:host(.vega-placement-right.vega-alignment-center) .vega-arrow{top:calc(50% - 10px)}:host(.vega-placement-right.vega-alignment-end) .vega-arrow{bottom:8px}:host(.vega-placement-top) .vega-arrow{transform:rotate(234deg);bottom:-10.65px}:host(.vega-placement-top.vega-alignment-start) .vega-arrow{left:24px}:host(.vega-placement-top.vega-alignment-center) .vega-arrow{left:calc(50% - 9px)}:host(.vega-placement-top.vega-alignment-end) .vega-arrow{right:18px}:host(.vega-placement-bottom) .vega-arrow{transform:rotate(54deg);top:-10.65px}:host(.vega-placement-bottom.vega-alignment-start) .vega-arrow{left:18px}:host(.vega-placement-bottom.vega-alignment-center) .vega-arrow{left:calc(50% - 14px)}:host(.vega-placement-bottom.vega-alignment-end) .vega-arrow{right:24px}:host(.vega-placement-top){margin-top:-20px}:host(.vega-placement-bottom){margin-top:20px}:host(.vega-placement-right){margin-left:20px}:host(.vega-placement-left){margin-left:-20px}:host(.no-arrow.vega-placement-top){margin-top:-8px}:host(.no-arrow.vega-placement-bottom){margin-top:8px}:host(.no-arrow.vega-placement-right){margin-left:8px}:host(.no-arrow.vega-placement-left){margin-left:-8px}';export{k as vega_popover,P as vega_popover_content_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as a}from"./p-1c298d5a.js";import{F as r}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as a}from"./p-1c298d5a.js";import{F as r}from"./p-a3fa41c8.js";import{C as h}from"./p-2d0d575f.js";import{v as o,w as n,x as m,O as d,d as c}from"./p-c8408c13.js";import{g as l,b as p,d as f,c as u,e as v,F as g,a as j}from"./p-a247e073.js";import{d as b}from"./p-3647d61d.js";import{s as w}from"./p-9b797118.js";import{f as F,c as y,i as V}from"./p-bf953152.js";import{I as E}from"./p-b28d4f7d.js";import{I as C}from"./p-6e1ab235.js";import{V as O,I as R}from"./p-4387d550.js";import{c as I}from"./p-c8f914d2.js";import{C as P}from"./p-179887da.js";import{C as S}from"./p-a02f52b7.js";import{d as M}from"./p-e06361df.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-d8683a5f.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-59c9de55.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-262ec334.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";var A=function(t,s,i,e){var a,r=arguments.length,h=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,e);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(h=(r<3?a(h):r>3?a(s,i,h):a(s,i))||h);return r>3&&h&&Object.defineProperty(s,i,h),h};const D=class{constructor(i){t(this,i),this.vegaValidate=s(this,"vegaValidate",7),this.validate=s(this,"validate",7),this.vegaFormSubmit=s(this,"vegaFormSubmit",7),this.formSubmit=s(this,"formSubmit",7),this.vegaFormReset=s(this,"vegaFormReset",7),this.formReset=s(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=I(D,o),this.resetEventEmitter=I(D,n),this.validateEventEmitter=I(D,m),this.childEventPrevent=new P([o,n],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new P([m],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new S(l,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new S(p,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new O,this.invalidFieldPathMap=new E(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new E(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const s=t.host,i=t.detail;r.isValidFormField(s)&&this.shouldVisitElement(s,!1,!1)&&(i?this.invalidFieldPathMap.delete(s):this.invalidFieldPathMap.set(s,s.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),h.notify(l,{host:this.host,detail:this.isValid})}async disconnectedCallback(){h.notify(f,{host:this.host}),h.unregister(f,this.formFieldDisconnectedObserver),h.unregister(u,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,s)=>{s||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const s={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(i,e)=>{if("function"==typeof i.valid&&e){const e=await i.valid(t);e.isValid||(s.isValid=!1,s.invalidFields.push(...e.invalidFields),s.invalidFieldsErrorMessages=Object.assign(Object.assign({},s.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(i,t);e||(s.isValid=!1,s.invalidFields.push(this.getFormFieldName(i)),s.invalidFieldsErrorMessages||(s.invalidFieldsErrorMessages={}),s.invalidFieldsErrorMessages[this.getFormFieldName(i)]=a)}})),s}async getValue(t){const s={};return await this.navigateVegaFormChildren((async(i,e)=>{const a=this.getFormFieldName(i);s[a]=e?await i.getValue(t):D.getFormFieldValue(i)}),t),b(s)?Object.values(s):s}async setValue(t,s){t&&(await this.navigateVegaFormChildren((async(i,e)=>{const a=this.getFormFieldName(i);e?await i.setValue(t[a],s):(await i.componentOnReady(),void 0!==t[a]&&("function"==typeof i.setValue?await i.setValue(t[a]):i.value=t[a]))}),s),this.isTouched=!1)}async reset(t={},s){await this.navigateVegaFormChildren((async(i,e)=>{const a=this.getFormFieldName(i);e&&await i.reset(t[a]||{},s)}),s),h.notify(v,{host:this.host,defaultValueMap:t,option:s}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return w(i(e,null,i("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,s,i=this.host){const e=[];Array.from(i.children).forEach((i=>{r.isValidFormField(i)?this.shouldVisitElement(i,null==s?void 0:s.skipDisabled,null==s?void 0:s.skipInvisible)&&e.push(t(i,"VEGA-FORM"===i.tagName)):e.push(this.navigateVegaFormChildren(t,s,i))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,s){let i=t.dataset.vegaForm;if(s){let s=F(t,"vega-form");for(;s&&s!==this.host;)i=s.dataset.vegaForm+" -> "+i,s=F(s,"vega-form")}return i}shouldVisitElement(t,s,i){return this.getFormFieldName(t)&&(!s||!t.disabled)&&(!i||y(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new d(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),h.register(f,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new d(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),h.register(g,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new d(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),h.register(j,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new d(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),h.register(u,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||V(t,this.host)}async handleChildFormFieldElementValid(t,s){const i=c.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);h.notify(i,{host:t,message:s,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"]}}};A([R()],D.prototype,"globalSlimmers",void 0),A([C()],D.prototype,"submitEventEmitter",void 0),A([C()],D.prototype,"resetEventEmitter",void 0),A([C()],D.prototype,"validateEventEmitter",void 0),A([C()],D.prototype,"childEventPrevent",void 0),A([C()],D.prototype,"childFormValidateEventPrevent",void 0),A([C()],D.prototype,"childNotifyObserver",void 0),A([C()],D.prototype,"childNodeValueChangeObserver",void 0),A([C()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=":host{display:block}";export{D as vega_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as l,V as c,M as d,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-4387d550.js";import{D as m}from"./p-59c9de55.js";import{a as w,f as u,b as g,d as x,g as b,h as y,i as k}from"./p-c8408c13.js";import{V as C}from"./p-b54328c6.js";import{p as R}from"./p-08835909.js";import{c as j}from"./p-c8f914d2.js";import{C as D}from"./p-179887da.js";import{r as E}from"./p-e06361df.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-3647d61d.js";import{g as M}from"./p-37b05e0b.js";import{P as S}from"./p-c0291e2e.js";import{d as T}from"./p-1bc5b3bc.js";import{C as O}from"./p-2d0d575f.js";import{c as V}from"./p-c66b55f8.js";import{T as $}from"./p-b129beb6.js";import{s as P}from"./p-6bd5c49b.js";import{q as B}from"./p-b1f65b13.js";import{s as N}from"./p-2205ee4c.js";import{S as L}from"./p-27192960.js";import{b as A}from"./p-0c667d6a.js";import"./p-bf953152.js";import"./p-cc63e827.js";import"./p-6a334573.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-d920b18c.js";import"./p-a247e073.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var F=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends c{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}F([l()],W.prototype,"switchPanelRenderer",void 0),F([l()],W.prototype,"viewRenderer",void 0);const H=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class U{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=H()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Y{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class _ extends U{generate(e){return new Y([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class q{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new q(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class K extends U{generate(e){const t=this.generateDates(e),n=e.showWeekends;let i=this.generateWeekHead(),r=[t.map(q.from)];return!1===n&&(i=i.slice(1,6),r=r.map((e=>e.slice(1,6)))),new Y(i,r)}}class X extends U{generate(e){const t=e.showWeekends;let n=[],i=[];this.generateDates(e).forEach(((e,t)=>{t%7||(n[t/7]=i=[]);const r=q.from(e);i.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),n=n.map((e=>e.slice(1,6)))),new Y(r,n)}}class G{constructor(e,t){this._count=e,this._current=t||q.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}goTo(e){return this.createBy(e)}now(){return this.createBy(q.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-H().indexOf(t.getDay())),this._startDate=q.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=q.from(t)}}class J extends G{constructor(e,t){super(J.DISPLAY_DATE_COUNT,e),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t,ee.PREVIOUS)),this.createBy(t)}now(){let e=q.from(new Date);return!1===this._showWeekends&&(e=re(e)),this.createBy(e)}createBy(e){return new J(e,this._showWeekends)}}J.DISPLAY_DATE_COUNT=1;class Q extends G{constructor(e,t){super(Q.DISPLAY_DATE_COUNT,e),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())+7),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())-7),this.createBy(q.from(e))}createBy(e){return new Q(e,this._showWeekends)}}Q.DISPLAY_DATE_COUNT=7;class Z extends G{constructor(e,t){super(Z.DISPLAY_DATE_COUNT,Z.getMonthFirstDay(e)),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e){const t=e||q.from(new Date);return new q(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(q.from(e))}createBy(e){return new Z(e,this._showWeekends)}}var ee;function te(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function ne(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function ie(e){return"vega-calendar-event-slot-"+e}function re(e,t=ee.NEXT){const n=e.toDate().getDay();if(0===n||6===n){let i=0===n?1:2;return t===ee.PREVIOUS&&(i=0===n?-2:-1),q.from(new Date(e.year,e.month-1,e.date+i))}return e}Z.DISPLAY_DATE_COUNT=42,function(e){e.PREVIOUS="-1",e.NEXT="1"}(ee||(ee={}));var ae=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class oe extends c{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,w,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:oe.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,u,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const n=this.translationSlimmer.t(te(e.toDate()));t=`${e.date} ${n}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],n=e[0],i=e[e.length-1],[r,a]=[n,i].map((e=>this.translationSlimmer.t(te(e.toDate()))));t=`${n.date} ${r}${n.year===i.year?"":", "+n.year} - ${i.date} ${a}, ${i.year}`;break}case"month":t=`${this.translationSlimmer.t(te(e.toDate()))}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 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="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 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="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),oe.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],ae([l()],oe.prototype,"viewMode",void 0),ae([l()],oe.prototype,"calendarView",void 0),ae([l()],oe.prototype,"currentPeriod",void 0),ae([l()],oe.prototype,"moreActionDropdownProps",void 0),ae([l()],oe.prototype,"moreActionClickEmitter",void 0),ae([l()],oe.prototype,"currentPeriodController",void 0),ae([l()],oe.prototype,"calendarViewController",void 0),ae([l()],oe.prototype,"translationSlimmer",void 0);var se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends c{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}se([l()],le.prototype,"viewMode",void 0),se([l()],le.prototype,"showWeekends",void 0),se([l()],le.prototype,"monthViewRenderer",void 0),se([l()],le.prototype,"viewWithTimeRenderer",void 0);var ce=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class de extends c{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`,onDblClick:e=>this.handleDateBlockClick(e,n)},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},te(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){const{target:n,clientX:i,clientY:r}=e;if(this.isMonthBlockBlankArea(n)){const{year:e,month:n,date:a}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:a,hour:0,mouseEventInfo:{clientX:i,clientY:r}})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}ce([l()],de.prototype,"viewMode",void 0),ce([l()],de.prototype,"calendarView",void 0),ce([l()],de.prototype,"currentPeriod",void 0),ce([l()],de.prototype,"currentPeriodController",void 0),ce([l()],de.prototype,"monthEventRenderer",void 0),ce([l()],de.prototype,"dateDblClickEmitter",void 0),ce([l()],de.prototype,"translationSlimmer",void 0);var he=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ve extends c{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,this.translationSlimmer.t(n[i])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t))))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t){return Array(24).fill("").map(((n,i)=>e("div",{class:"grid-cell border-divider-top",onDblClick:e=>{this.handleDateBlockClick(t,i,e)}})))}handleDateBlockClick(e,t,n){const{year:i,month:r,date:a}=e,{clientX:o,clientY:s}=n;this.dateDblClickEmitter.emit({year:i,month:r,date:a,hour:t,mouseEventInfo:{clientX:o,clientY:s}})}}he([l()],ve.prototype,"viewMode",void 0),he([l()],ve.prototype,"timeLineRenderer",void 0),he([l()],ve.prototype,"timeMarkerRenderer",void 0),he([l()],ve.prototype,"dayViewTimedEventRenderer",void 0),he([l()],ve.prototype,"dayViewFullDayEventRenderer",void 0),he([l()],ve.prototype,"calendarView",void 0),he([l()],ve.prototype,"dateDblClickEmitter",void 0),he([l()],ve.prototype,"translationSlimmer",void 0);class pe extends c{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${R(t)}`);return e}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],pe.prototype,"timeFormat",void 0);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends c{constructor(){super(...arguments),this.monthViewGenerator=new X,this.weekViewGenerator=new K,this.dayViewGenerator=new _}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}fe([l({writable:!0})],me.prototype,"calendarView",void 0),fe([l()],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"showWeekends",void 0),fe([l()],me.prototype,"currentPeriodController",void 0),fe([d("componentWillLoad")],me.prototype,"initialCalendarView",null),fe([d("watchCurrentPeriodChange")],me.prototype,"generateCalendarView",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends c{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new Z(t,this.showWeekends));break;case"week":this.setCurrentPeriod(new Q(t,this.showWeekends));break;case"day":t=!1===this.showWeekends?re(t):t,this.setCurrentPeriod(new J(t,this.showWeekends))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,q.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}we([l({writable:!0})],ue.prototype,"currentPeriod",void 0),we([l()],ue.prototype,"changeEventEmitter",void 0),we([l({writable:!0})],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"showWeekends",void 0),we([d("componentWillLoad")],ue.prototype,"initialCurrentPeriod",null),we([d("watchCurrentPeriodChange")],ue.prototype,"emitChangeEvent",null),we([d("watchViewModeChange")],ue.prototype,"updateCurrentPeriodByViewMode",null),we([d("watchShowWeekendsChange")],ue.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class xe extends c{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${te(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&e[e.length-1]&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ge([l()],xe.prototype,"viewMode",void 0),ge([l()],xe.prototype,"host",void 0),ge([l()],xe.prototype,"calendarEventController",void 0),ge([l()],xe.prototype,"eventItemRenderer",void 0),ge([l()],xe.prototype,"fullDayEventLayoutRenderer",void 0),ge([d("componentWillLoad")],xe.prototype,"addMaxDisplayCountChange",null);class be{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}be.daySeconds=864e5;class ye extends be{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class ke extends be{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class Ce extends be{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e[0]&&e[0].toDate()<=n[0].toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>q.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=Ce.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=q.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ce.weekDay.indexOf(e)-Ce.weekDay.indexOf(t))):[Ce.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ce.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Re extends be{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const je=new class{getPattern(e,t){const n=q.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return q.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new q(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new ye(t,n,i,r);case"weekly":return new Ce(t,n,i,r,a);case"monthly":return new ke(t,n,i,r);default:return new Re(t,n,i,r)}}},De=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ee=/^\d{1,2}:\d{1,2}/;class ze{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new ze(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=q.from(t),r=q.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=q.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!De.test(n)||i&&"string"==typeof i&&!De.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ee.test(r)||a&&"string"==typeof a&&!Ee.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=je.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=q.from(this.startDate),t=q.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends c{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new ze(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ie([l({writable:!0})],Me.prototype,"calendarEvents",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"events",void 0),Ie([d("watchEventsChange")],Me.prototype,"updateAfterEventChange",null),Ie([d("componentWillLoad")],Me.prototype,"updateWhenComponentWillLoad",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends c{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:ie(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Te.backgroundColorModeEventHeight=18,Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarView",void 0),Se([l()],Te.prototype,"eventClickEmitter",void 0);var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends S{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=T(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Ve.monthDateTitleHeight)/Te.backgroundColorModeEventHeight);O.notify(x.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Ve.monthDateTitleHeight=26,Oe([l()],Ve.prototype,"host",void 0),Oe([l()],Ve.prototype,"monthEventRenderer",void 0),Oe([l()],Ve.prototype,"viewMode",void 0),Oe([d("componentDidLoad")],Ve.prototype,"updateMaxDisplayCount",null),Oe([d("watchViewModeChange")],Ve.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var $e=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Pe extends c{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Te.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Pe.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Pe.maxDisplayEventLength=2,$e([l()],Pe.prototype,"calendarView",void 0),$e([l()],Pe.prototype,"calendarEventController",void 0),$e([l()],Pe.prototype,"eventItemRenderer",void 0),$e([l()],Pe.prototype,"fullDayEventLayoutRenderer",void 0),$e([l()],Pe.prototype,"showAllEventsInDayOrWeekView",void 0),$e([l()],Pe.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class Be extends c{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Be.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Be.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Be.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:void 0}}}Be.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],Be.prototype,"eventItemRenderer",void 0);class Ne{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Le{get eventLayoutCells(){return this.cells}}class Ae extends Le{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Fe{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class We extends Fe{constructor(){super(...arguments),this.slots=We.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[ne(t),ne(n)]}}We.defaultSlots=Array(96).fill(null);class He extends Ne{generate(e){const t=[new We];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ae(t)}createNewLayoutCell(){return new We}}class Ue{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=ne(e.startTime),i=ne(t.startTime);return n===i?ne(t.endTime)-ne(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class _e extends c{constructor(){super(...arguments),this.calendarEventSorter=new Ue,this.dayViewTimedEventLayoutGenerator=new He}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Ye([l()],_e.prototype,"calendarView",void 0),Ye([l()],_e.prototype,"calendarEventController",void 0),Ye([l()],_e.prototype,"dayViewEventLayoutRenderer",void 0);class qe extends Le{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class Ke extends Fe{constructor(){super(...arguments),this.slots=Ke.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}Ke.defaultSlots=Array(7).fill(null);class Xe extends Ne{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new qe(n)}createNewLayoutCell(){return new Ke}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Je extends c{constructor(){super(...arguments),this.longEventLayoutGenerator=new Xe,this.calendarEventSorter=new Ue}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Je.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const c=this.fullDayEventLayout.getEventRowsIndex(e);if(c>=0){const n=this.fullDayEventLayout.eventLayoutCells[c].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[c].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Te.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Je.monthViewEventOffsetTop=26,Ge([l()],Je.prototype,"eventItemRenderer",void 0),Ge([l()],Je.prototype,"viewMode",void 0),Ge([l()],Je.prototype,"calendarView",void 0);var Qe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ze extends c{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Qe([l({writable:!0})],Ze.prototype,"showAllEventsInDayOrWeekView",void 0),Qe([d("watchViewModeChange")],Ze.prototype,"resetShowAllFlag",null);var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends c{render(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container").offsetHeight,n=Math.max(e.offsetHeight-t,0)/2,i=e.scrollHeight,r=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(i-r-t,0);if(!isNaN(n)&&a&&a>n)return a-n+r}return 0}}et([l()],tt.prototype,"viewMode",void 0),et([l()],tt.prototype,"viewRenderer",void 0),et([d("watchViewModeChange")],tt.prototype,"updateTimeLine",null),et([d("disconnectedCallback")],tt.prototype,"clearTimer",null),et([d("connectedCallback")],tt.prototype,"updateTimeLineIfComponentAddBack",null),et([d("componentDidLoad")],tt.prototype,"displayCurrentTimeBlockByDefault",null);var nt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const it=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new $,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new W,this.switchPanelRenderer=new oe,this.viewRenderer=new le,this.monthViewRenderer=new de,this.viewWithTimeRenderer=new ve,this.timeLineRenderer=new pe,this.timeMarkerRenderer=new tt,this.monthEventRenderer=new xe,this.currentPeriodController=new ue,this.calendarViewController=new me,this.dayViewFullDayEventRenderer=new Pe,this.dayViewFullDayEventMoreButtonRenderer=new Ze,this.dayViewTimedEventRenderer=new _e,this.eventItemRenderer=new Te,this.dayViewEventLayoutRenderer=new Be,this.fullDayEventLayoutRenderer=new Je,this.calendarEventController=new Me,this.eventResponsiveController=new Ve,this.changeEventEmitter=j(it,u),this.eventClickEmitter=j(it,b),this.dateDblClickEmitter=j(it,y),this.moreActionClickEmitter=j(it,k),this.changeEventPrevent=new D([u],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(it,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(it,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.showEventColorBar=!0,this.showWeekends=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"]}}};nt([f()],it.prototype,"globalSlimmer",void 0),nt([v()],it.prototype,"translationSlimmer",void 0),nt([v()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt([v()],it.prototype,"renderer",void 0),nt([v()],it.prototype,"switchPanelRenderer",void 0),nt([v()],it.prototype,"viewRenderer",void 0),nt([v()],it.prototype,"monthViewRenderer",void 0),nt([v()],it.prototype,"viewWithTimeRenderer",void 0),nt([v()],it.prototype,"timeLineRenderer",void 0),nt([v()],it.prototype,"timeMarkerRenderer",void 0),nt([v()],it.prototype,"monthEventRenderer",void 0),nt([v()],it.prototype,"currentPeriodController",void 0),nt([v()],it.prototype,"calendarViewController",void 0),nt([v()],it.prototype,"dayViewFullDayEventRenderer",void 0),nt([v()],it.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),nt([v()],it.prototype,"dayViewTimedEventRenderer",void 0),nt([v()],it.prototype,"eventItemRenderer",void 0),nt([v()],it.prototype,"dayViewEventLayoutRenderer",void 0),nt([v()],it.prototype,"fullDayEventLayoutRenderer",void 0),nt([v()],it.prototype,"calendarEventController",void 0),nt([v()],it.prototype,"eventResponsiveController",void 0),nt([v()],it.prototype,"changeEventEmitter",void 0),nt([v()],it.prototype,"eventClickEmitter",void 0),nt([v()],it.prototype,"dateDblClickEmitter",void 0),nt([v()],it.prototype,"moreActionClickEmitter",void 0),nt([v()],it.prototype,"changeEventPrevent",void 0),nt([v()],it.prototype,"timeFormatNotifySlimmer",void 0),nt([v()],it.prototype,"showEventColorBarNotifySlimmer",void 0),it.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var rt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class at extends c{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:n}=this.calendarEvent,i=t||"primary",r=!this.host.classList.contains("day-event"),a={"slot-container":this.slotMode,"event-container":!0,disabled:n,[i]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:a,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},a),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{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="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),rt([l()],at.prototype,"host",void 0),rt([l()],at.prototype,"timeFormat",void 0),rt([l()],at.prototype,"calendarEvent",void 0),rt([l()],at.prototype,"slotMode",void 0),rt([l()],at.prototype,"showColorBar",void 0),rt([l()],at.prototype,"colorController",void 0);class ot extends c{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ot.prototype,"calendarEvent",void 0);var st=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class lt extends L{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}st([l({writable:!0})],lt.prototype,"timeFormat",void 0),st([l({writable:!0})],lt.prototype,"showColorBar",void 0);class ct extends c{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=A(t.height),i=A(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ct.prototype,"renderer",void 0);var dt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ht extends c{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}dt([l()],ht.prototype,"host",void 0),dt([l()],ht.prototype,"calendarEvent",void 0),dt([l({writable:!0})],ht.prototype,"slotMode",void 0),dt([l()],ht.prototype,"renderer",void 0),dt([d("componentWillLoad")],ht.prototype,"findTheCalendarEventSlot",null),dt([d("componentDidLoad")],ht.prototype,"appendTheRepeatEventSlotToContainer",null);var vt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const pt=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new S({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new at,this.colorController=new ot,this.slotController=new ht,this.subStateController=new lt,this.titleMaxHeightController=new ct,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};vt([f()],pt.prototype,"globalSlimmer",void 0),vt([v()],pt.prototype,"pageResizeObserverSlimmer",void 0),vt([v()],pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),vt([v()],pt.prototype,"renderer",void 0),vt([v()],pt.prototype,"colorController",void 0),vt([v()],pt.prototype,"slotController",void 0),vt([v()],pt.prototype,"subStateController",void 0),vt([v()],pt.prototype,"titleMaxHeightController",void 0),pt.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var ft=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const mt=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:ie(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};ft([f()],mt.prototype,"globalSlimmer",void 0),ft([v()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mt.style=":host{width:100%;height:100%;position:relative}";export{it as vega_calendar,pt as vega_calendar_event,mt as vega_calendar_event_slot}
|
|
1
|
+
import{h as e,F as t,f as n,r as i,c as r,H as a,g as o}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as l,V as c,M as d,L as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-4387d550.js";import{D as m}from"./p-59c9de55.js";import{a as w,f as u,b as g,d as x,g as b,h as y,i as k}from"./p-c8408c13.js";import{V as C}from"./p-b54328c6.js";import{p as R}from"./p-08835909.js";import{c as j}from"./p-c8f914d2.js";import{C as D}from"./p-179887da.js";import{r as E}from"./p-e06361df.js";import{c as z}from"./p-86194314.js";import{f as I}from"./p-3647d61d.js";import{g as M}from"./p-37b05e0b.js";import{P as S}from"./p-c0291e2e.js";import{d as T}from"./p-1bc5b3bc.js";import{C as O}from"./p-2d0d575f.js";import{c as V}from"./p-c66b55f8.js";import{T as $}from"./p-9ba28523.js";import{s as P}from"./p-6bd5c49b.js";import{q as B}from"./p-b1f65b13.js";import{s as N}from"./p-2205ee4c.js";import{S as L}from"./p-27192960.js";import{b as A}from"./p-0c667d6a.js";import"./p-bf953152.js";import"./p-cc63e827.js";import"./p-6a334573.js";import"./p-619fdde5.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-d8683a5f.js";import"./p-a247e073.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";var F=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class W extends c{render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render())}}F([l()],W.prototype,"switchPanelRenderer",void 0),F([l()],W.prototype,"viewRenderer",void 0);const H=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};class U{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=H()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),n=[];for(let i=0;i<e.count;i++)n.push(new Date(t)),t.setDate(t.getDate()+1);return n}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class Y{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class _ extends U{generate(e){return new Y([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class q{constructor(e,t,n){this._date=n,this._month=t,this._year=e}static from(e){return new q(e.getFullYear(),e.getMonth()+1,e.getDate())}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:n}=e,i={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<n?i.isPreviousMonth=!0:this.month>n?i.isNextMonth=!0:i.inMonth=!0:this.year>t?i.isNextMonth=!0:i.isPreviousMonth=!0,i}equal(e){const{year:t,month:n,date:i}=e;return this._year===t&&this._month===n&&this._date===i}}class K extends U{generate(e){const t=this.generateDates(e),n=e.showWeekends;let i=this.generateWeekHead(),r=[t.map(q.from)];return!1===n&&(i=i.slice(1,6),r=r.map((e=>e.slice(1,6)))),new Y(i,r)}}class X extends U{generate(e){const t=e.showWeekends;let n=[],i=[];this.generateDates(e).forEach(((e,t)=>{t%7||(n[t/7]=i=[]);const r=q.from(e);i.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),n=n.map((e=>e.slice(1,6)))),new Y(r,n)}}class G{constructor(e,t){this._count=e,this._current=t||q.from(new Date),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}goTo(e){return this.createBy(e)}now(){return this.createBy(q.from(new Date))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-H().indexOf(t.getDay())),this._startDate=q.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=q.from(t)}}class J extends G{constructor(e,t){super(J.DISPLAY_DATE_COUNT,e),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=q.from(e);return!1===this._showWeekends&&(t=re(t,ee.PREVIOUS)),this.createBy(t)}now(){let e=q.from(new Date);return!1===this._showWeekends&&(e=re(e)),this.createBy(e)}createBy(e){return new J(e,this._showWeekends)}}J.DISPLAY_DATE_COUNT=1;class Q extends G{constructor(e,t){super(Q.DISPLAY_DATE_COUNT,e),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())+7),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-H().indexOf(e.getDay())-7),this.createBy(q.from(e))}createBy(e){return new Q(e,this._showWeekends)}}Q.DISPLAY_DATE_COUNT=7;class Z extends G{constructor(e,t){super(Z.DISPLAY_DATE_COUNT,Z.getMonthFirstDay(e)),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e){const t=e||q.from(new Date);return new q(t.year,t.month,1)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(q.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(q.from(e))}createBy(e){return new Z(e,this._showWeekends)}}var ee;function te(e,t=!1){return e.toLocaleDateString("en-US",{month:t?"short":"long"})}function ne(e,t=15){const[n,i]=e.split(":");return Math.round((60*Number(n)+Number(i))/t)}function ie(e){return"vega-calendar-event-slot-"+e}function re(e,t=ee.NEXT){const n=e.toDate().getDay();if(0===n||6===n){let i=0===n?1:2;return t===ee.PREVIOUS&&(i=0===n?-2:-1),q.from(new Date(e.year,e.month-1,e.date+i))}return e}Z.DISPLAY_DATE_COUNT=42,function(e){e.PREVIOUS="-1",e.NEXT="1"}(ee||(ee={}));var ae=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class oe extends c{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.currentPeriod.current)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.renderViewSwitch(),this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{m.addUniqueObserverToNode(e,w,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:C.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{m.addUniqueObserverToNode(e,w,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:oe.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{m.addUniqueObserverToNode(e,u,this.handleViewChange)}})}renderMoreActionMenu(){var t,n;if(null===(n=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===n?void 0:n.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{m.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:C.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const n=this.translationSlimmer.t(te(e.toDate()));t=`${e.date} ${n}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],n=e[0],i=e[e.length-1],[r,a]=[n,i].map((e=>this.translationSlimmer.t(te(e.toDate()))));t=`${n.date} ${r}${n.year===i.year?"":", "+n.year} - ${i.date} ${a}, ${i.year}`;break}case"month":t=`${this.translationSlimmer.t(te(e.toDate()))}, ${e.year}`}return t}}C.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 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="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 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="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),oe.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],ae([l()],oe.prototype,"viewMode",void 0),ae([l()],oe.prototype,"calendarView",void 0),ae([l()],oe.prototype,"currentPeriod",void 0),ae([l()],oe.prototype,"moreActionDropdownProps",void 0),ae([l()],oe.prototype,"moreActionClickEmitter",void 0),ae([l()],oe.prototype,"currentPeriodController",void 0),ae([l()],oe.prototype,"calendarViewController",void 0),ae([l()],oe.prototype,"translationSlimmer",void 0);var se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class le extends c{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}se([l()],le.prototype,"viewMode",void 0),se([l()],le.prototype,"showWeekends",void 0),se([l()],le.prototype,"monthViewRenderer",void 0),se([l()],le.prototype,"viewWithTimeRenderer",void 0);var ce=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class de extends c{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((n,i)=>{const r=this.monthEventRenderer.getCurrentRowEvents(n),a=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:i,class:"calendar-view-row border-divider-bottom"},n.map(((n,i)=>e("div",{class:{"row-cell border-divider-right":!0,"current-month-day":n.compare(t).inMonth,active:n.isToday(),disabled:!1},key:`${n.month}-${n.date}`,onDblClick:e=>this.handleDateBlockClick(e,n)},this.renderDateBlock(n),this.monthEventRenderer.render(n,r[i],a[i],i)))))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},te(t.toDate(),!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>this.goToCurrentDayView(e,t)},t.date))}goToCurrentDayView(e,t){e.stopPropagation(),this.currentPeriodController.updateCalendarPeriod("day",t)}handleDateBlockClick(e,t){const{target:n,clientX:i,clientY:r}=e;if(this.isMonthBlockBlankArea(n)){const{year:e,month:n,date:a}=t;this.dateDblClickEmitter.emit({year:e,month:n,date:a,hour:0,mouseEventInfo:{clientX:i,clientY:r}})}}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}ce([l()],de.prototype,"viewMode",void 0),ce([l()],de.prototype,"calendarView",void 0),ce([l()],de.prototype,"currentPeriod",void 0),ce([l()],de.prototype,"currentPeriodController",void 0),ce([l()],de.prototype,"monthEventRenderer",void 0),ce([l()],de.prototype,"dateDblClickEmitter",void 0),ce([l()],de.prototype,"translationSlimmer",void 0);var he=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ve extends c{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}renderViewTitle(){const t=this.calendarView.dateItems[0],n=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,i)=>e("div",{key:t.date,class:{active:t.isToday()}},e("div",null,this.translationSlimmer.t(n[i])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>e("div",{class:"grid-col border-divider-left",key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t))))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t){return Array(24).fill("").map(((n,i)=>e("div",{class:"grid-cell border-divider-top",onDblClick:e=>{this.handleDateBlockClick(t,i,e)}})))}handleDateBlockClick(e,t,n){const{year:i,month:r,date:a}=e,{clientX:o,clientY:s}=n;this.dateDblClickEmitter.emit({year:i,month:r,date:a,hour:t,mouseEventInfo:{clientX:o,clientY:s}})}}he([l()],ve.prototype,"viewMode",void 0),he([l()],ve.prototype,"timeLineRenderer",void 0),he([l()],ve.prototype,"timeMarkerRenderer",void 0),he([l()],ve.prototype,"dayViewTimedEventRenderer",void 0),he([l()],ve.prototype,"dayViewFullDayEventRenderer",void 0),he([l()],ve.prototype,"calendarView",void 0),he([l()],ve.prototype,"dateDblClickEmitter",void 0),he([l()],ve.prototype,"translationSlimmer",void 0);class pe extends c{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,n)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===n?24:n},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${R(t)}`);return e}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],pe.prototype,"timeFormat",void 0);var fe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class me extends c{constructor(){super(...arguments),this.monthViewGenerator=new X,this.weekViewGenerator=new K,this.dayViewGenerator=new _}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}fe([l({writable:!0})],me.prototype,"calendarView",void 0),fe([l()],me.prototype,"currentPeriod",void 0),fe([l()],me.prototype,"showWeekends",void 0),fe([l()],me.prototype,"currentPeriodController",void 0),fe([d("componentWillLoad")],me.prototype,"initialCalendarView",null),fe([d("watchCurrentPeriodChange")],me.prototype,"generateCalendarView",null);var we=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ue extends c{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new Z(t,this.showWeekends));break;case"week":this.setCurrentPeriod(new Q(t,this.showWeekends));break;case"day":t=!1===this.showWeekends?re(t):t,this.setCurrentPeriod(new J(t,this.showWeekends))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,q.from(new Date))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:n}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:n.date,month:n.month,year:n.year}}}}we([l({writable:!0})],ue.prototype,"currentPeriod",void 0),we([l()],ue.prototype,"changeEventEmitter",void 0),we([l({writable:!0})],ue.prototype,"viewMode",void 0),we([l()],ue.prototype,"showWeekends",void 0),we([d("componentWillLoad")],ue.prototype,"initialCurrentPeriod",null),we([d("watchCurrentPeriodChange")],ue.prototype,"emitChangeEvent",null),we([d("watchViewModeChange")],ue.prototype,"updateCurrentPeriodByViewMode",null),we([d("watchShowWeekendsChange")],ue.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class xe extends c{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const n=this.calendarEventController.getCurrentDateEvents(e);t.push(n)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const n=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(n)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,n,i,r){const a=n.slice(i.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(i,r)),this.renderMoreButton(n,a,`${t.date} ${te(t.toDate())} ${t.year}`))}addMaxDisplayCountChange(){m.addUniqueObserverToNode(this.host,E,(e=>{this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&n(this.host)}))}renderMoreButton(t,n,i){if(n){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),a=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right"},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:z()},`${n} More`),e("vega-flex",{slot:"popover",direction:"col",gap:"0"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},i),e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:a.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0})))),a.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0}))))))}}hideTheCutOffEvents(e,t){const n=[],i=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((n=>{e.filter((e=>e.includes(n))).length>t.filter((e=>e.includes(n))).length&&i.push(n)})),i.length?(t.forEach((e=>{e.length&&e[e.length-1]&&i.includes(e[e.length-1])?n.push(e.slice(0,e.length-1)):n.push(e)})),n):t}}ge([l()],xe.prototype,"viewMode",void 0),ge([l()],xe.prototype,"host",void 0),ge([l()],xe.prototype,"calendarEventController",void 0),ge([l()],xe.prototype,"eventItemRenderer",void 0),ge([l()],xe.prototype,"fullDayEventLayoutRenderer",void 0),ge([d("componentWillLoad")],xe.prototype,"addMaxDisplayCountChange",null);class be{constructor(e,t,n,i){this.repeatStartDate=e,this.interval=t,this.count=n,this.until=i}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((n=>this.isSeriesInPeriod(n,t,e)))}isSeriesInPeriod(e,t,n){const i=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:a,endDate:o}=n,s=a.toDate(),l=o.toDate();return i>=s&&i<=l||r>=s&&r<=l||i<=s&&r>=l}}be.daySeconds=864e5;class ye extends be{constructor(e,t,n,i){super(e,t,n,i),this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}}class ke extends be{constructor(e,t,n,i){super(e,t,n,i),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e,t){const n=new Date(e,t,this.byMonthDay);return n.getDate()===this.byMonthDay?n:this.getNextStartDate(e,t+1)}}class Ce extends be{constructor(e,t,n,i,r){super(e,t,n,i),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((n=>this.isSeriesInPeriod(n,t,e)))}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e[0]&&e[0].toDate()<=n[0].toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>q.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((n=>{const i=Ce.weekDay.indexOf(n)-t,{year:r,month:a,date:o}=this.repeatStartDate,s=q.from(new Date(r,a-1,o+i));e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ce.weekDay.indexOf(e)-Ce.weekDay.indexOf(t))):[Ce.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=I(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ce.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Re extends be{constructor(e,t,n,i){super(e,t,n,i),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let n=this.getNextRepeatStartDate(t);for(;n&&n.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(n);if(e&&e.toDate()<=n.toDate()){this.cache.pop();break}if(n=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),n=q.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(n),n)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const je=new class{getPattern(e,t){const n=q.from(e),{frequency:i,interval:r=1,byWeekDay:a,until:o,count:s}=t,l=this.initDate(o);return this.initRepeatPattern(i,n,r<1?1:r,s,l,a)}initDate(e){if(e&&"object"==typeof e)return q.from(e);if(e&&"string"==typeof e){const[t,n,i]=e.split("/");return new q(Number(i),Number(t),Number(n))}}initRepeatPattern(e,t,n,i,r,a){switch(e){case"daily":return new ye(t,n,i,r);case"weekly":return new Ce(t,n,i,r,a);case"monthly":return new ke(t,n,i,r);default:return new Re(t,n,i,r)}}},De=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ee=/^\d{1,2}:\d{1,2}/;class ze{constructor(e,t){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||M(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDate}get endDate(){return this._endDate}get startTime(){return this._startTime}get endTime(){return this._endTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const n=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new ze(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:n,startTime:this.startTime,endTime:this.endTime}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:n}=this,i=q.from(t),r=q.from(new Date(n.getFullYear(),n.getMonth(),n.getDate()+1)),a=e.toDate();return i.toDate()<=a&&r.toDate()>a}getEventDuration(){const[e,t]=this.startTime.split(":"),[n,i]=this.endTime.split(":"),r=q.from(new Date),a=new Date(r.year,r.month,r.date,Number(e),Number(t));return(new Date(r.year,r.month,r.date,0===Number(n)&&0!==Number(e)?24:Number(n),Number(i)).valueOf()-a.valueOf())/6e4}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}convertTimeTo24Hour(e){if((e=e.toLocaleLowerCase()).indexOf("am")>0||e.indexOf("pm")>0){if(e.indexOf("am")>0){e=e.replace("am","").trim();const[t,n]=e.split(":");return`${"12"===t?"00":t}:${n}`}{e=e.replace("pm","").trim();const[t,n]=e.split(":");return`${"12"===t?"12":Number(t)+12}:${n}`}}return e}checkEventRequireField(e){const{title:t,startDate:n,endDate:i,startTime:r,endTime:a}=e;if(n&&"string"==typeof n&&!De.test(n)||i&&"string"==typeof i&&!De.test(i))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ee.test(r)||a&&"string"==typeof a&&!Ee.test(a))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!n||!i&&!a)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:n,endDate:i,endTime:r}=e;if(t&&"object"==typeof t)this._startDate=t;else if(t&&"string"==typeof t){const[e,n,i]=t.split("/");this._startDate=new Date(Number(i),Number(e)-1,Number(n))}if(this._startTime=n?this.convertTimeTo24Hour(n):`${this._startDate.getHours()}:${this._startDate.getMinutes()}`,i&&"object"==typeof i)this._endDate=i;else if(i&&"string"==typeof i){const[e,t,n]=i.split("/");this._endDate=new Date(Number(n),Number(e)-1,Number(t),23,59,59)}else this._endDate=new Date(this._startDate.getFullYear(),this._startDate.getMonth(),this._startDate.getDate(),23,59,59);this._endTime=r?this.convertTimeTo24Hour(r):`${this._endDate.getHours()}:${this._endDate.getMinutes()}`}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=je.getPattern(this._startDate,this._event.repeatOptions))}initEventSpansDays(){const e=q.from(this.startDate),t=q.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var Ie=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Me extends c{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const n=new ze(e);t.push(n)}catch(t){h.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((n=>{n.isRepeatEvent?n.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(n,e))})):e.push(n)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const n=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(n))return this.repeatEventMap.get(n);{const i=e.copyTo(n,t);return this.repeatEventMap.set(n,i),i}}}Ie([l({writable:!0})],Me.prototype,"calendarEvents",void 0),Ie([l()],Me.prototype,"currentPeriod",void 0),Ie([l()],Me.prototype,"events",void 0),Ie([d("watchEventsChange")],Me.prototype,"updateAfterEventChange",null),Ie([d("componentWillLoad")],Me.prototype,"updateWhenComponentWillLoad",null);var Se=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Te extends c{render(t,n){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:t.eventKey,calendarEvent:t,class:n,onKeyDown:z(),onClick:()=>this.handleEventClick(t)},!t.isRepeatEvent&&e("slot",{name:ie(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}}Te.backgroundColorModeEventHeight=18,Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarView",void 0),Se([l()],Te.prototype,"eventClickEmitter",void 0);var Oe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ve extends S{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=T(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,n=Math.floor((t-Ve.monthDateTitleHeight)/Te.backgroundColorModeEventHeight);O.notify(x.getSubject(this.host,E),{host:this.host,detail:n})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}Ve.monthDateTitleHeight=26,Oe([l()],Ve.prototype,"host",void 0),Oe([l()],Ve.prototype,"monthEventRenderer",void 0),Oe([l()],Ve.prototype,"viewMode",void 0),Oe([d("componentDidLoad")],Ve.prototype,"updateMaxDisplayCount",null),Oe([d("watchViewModeChange")],Ve.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var $e=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Pe extends c{render(){const t=this.calendarView.dateItems[0],n=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),i=this.fullDayEventLayoutRenderer.sortLongEvents(n),r=this.filterDisplayEvents(i);return e("div",{class:"calendar-view-event-all"},t.map(((t,n)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[n],n,i[n])))))}renderCurrentFullDayEvents(n,i,r){const a=n.length*Te.backgroundColorModeEventHeight-2,o=r.slice(n.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,n.length," events")),this.fullDayEventLayoutRenderer.render(n,i),o>0&&this.dayViewFullDayEventMoreButtonRenderer.render(o))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],n=Pe.maxDisplayEventLength;return e.forEach((e=>{const i=e.length>n?e.slice(0,n):e;t.push(i)})),t}}}Pe.maxDisplayEventLength=2,$e([l()],Pe.prototype,"calendarView",void 0),$e([l()],Pe.prototype,"calendarEventController",void 0),$e([l()],Pe.prototype,"eventItemRenderer",void 0),$e([l()],Pe.prototype,"fullDayEventLayoutRenderer",void 0),$e([l()],Pe.prototype,"showAllEventsInDayOrWeekView",void 0),$e([l()],Pe.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);class Be extends c{render(t){const n=[];return t.eventLayoutCells.forEach(((i,r)=>{let a=i.getEventBySlotIndex(0),o=0;for(let s=0;s<Be.totalNumberOfCells;s++){const l=i.getEventBySlotIndex(s);l!==a&&(a&&n.push(e("div",{key:r,class:"time-event-block",style:this.getTimeEventStyle(o,s,r,t.getEventColumnsSpannedCount(a))},this.eventItemRenderer.render(a,{"day-event":!0,"bg-shadow":r>0}))),a=l,o=s)}})),n}getTimeEventStyle(e,t,n,i){const r=n*(1/i);return{position:"absolute",left:100*r+"%",top:100/Be.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Be.totalNumberOfCells*(t-e)+"%",zIndex:n>0?`${n}`:void 0}}}Be.totalNumberOfCells=96,function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],Be.prototype,"eventItemRenderer",void 0);class Ne{addCurrentEventToLayout(e,t){let n=e.find((e=>!e.hasOverlapEvent(t)));n?n.updateSlots(t):(n=this.createNewLayoutCell(),n.updateSlots(t),e.push(n))}}class Le{get eventLayoutCells(){return this.cells}}class Ae extends Le{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let n=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&n++})),n}}class Fe{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let n=t;if(t>=0)for(let i=t+1;i<this.slots.length;i++){if(this.slots[i]!==e){n=i-1;break}i===this.slots.length-1&&(n=i)}return n}}class We extends Fe{constructor(){super(...arguments),this.slots=We.defaultSlots}hasOverlapEvent(e){const[t,n]=this.getIndexRangeFromEvent(e);let i=!1;for(let e=t;e<n;e++)if(this.slots[e]){i=!0;break}return i}updateSlots(e){const[t,n]=this.getIndexRangeFromEvent(e);n>t&&(this.slots=this.slots.slice(0,t).concat(Array(n-t).fill(e),this.slots.slice(n)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:n}=e;return[ne(t),ne(n)]}}We.defaultSlots=Array(96).fill(null);class He extends Ne{generate(e){const t=[new We];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new Ae(t)}createNewLayoutCell(){return new We}}class Ue{sort(e,t,n){const i=[],r=[],a=[];for(let t=0;t<e.length;t++){const n=e[t];n&&(n.isGroupEvent()?r.push(n):n.isAllDayEvent?i.push(n):a.push(n))}let o=i.concat(this.sortCalendarEventByTime(a)),s=n.getEventsByIndex(t);const l=s.filter((e=>e));if(o=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(o),s.length>l.length){const e=o.slice(0,s.length-l.length);o=o.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return o=s.concat(o),o}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const n=ne(e.startTime),i=ne(t.startTime);return n===i?ne(t.endTime)-ne(e.endTime):n-i}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var Ye=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class _e extends c{constructor(){super(...arguments),this.calendarEventSorter=new Ue,this.dayViewTimedEventLayoutGenerator=new He}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),n=this.calendarEventSorter.sortCalendarEventByTime(t),i=this.dayViewTimedEventLayoutGenerator.generate(n);return this.dayViewEventLayoutRenderer.render(i)}}Ye([l()],_e.prototype,"calendarView",void 0),Ye([l()],_e.prototype,"calendarEventController",void 0),Ye([l()],_e.prototype,"dayViewEventLayoutRenderer",void 0);class qe extends Le{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let n=0;return this.cells.forEach(((i,r)=>{const a=i.getEventBySlotIndex(e);t.push(a),a&&(n=r)})),t.slice(0,n+1)}}class Ke extends Fe{constructor(){super(...arguments),this.slots=Ke.defaultSlots}updateSlots(e){const{start:t,end:n}=e;this.slots=this.slots.slice(0,t).concat(Array(n-t+1).fill(e.event),this.slots.slice(n+1))}hasOverlapEvent(e){const{start:t,end:n}=e;let i=!1;for(let e=t;e<n+1;e++)if(this.slots[e]){i=!0;break}return i}}Ke.defaultSlots=Array(7).fill(null);class Xe extends Ne{generate(e){const t=this.collectAllShouldOrderLongEvents(e),n=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(n,e)})),new qe(n)}createNewLayoutCell(){return new Ke}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,n)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:n,start:n-t[e.eventKey].end!=1?n:t[e.eventKey].start}):{start:n,end:n,event:e}}))}));const n=Object.values(t);return this.sortLongEventViews(n)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:n,endDate:i}=e.event,{startDate:r,endDate:a}=t.event;n.setHours(0,0,0),r.setHours(0,0,0),i.setHours(23,59,59),a.setHours(23,59,59);const o=a.valueOf()-r.valueOf()-(i.valueOf()-n.valueOf());return n.valueOf()!==r.valueOf()?n.valueOf()-r.valueOf():o}))}}var Ge=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Je extends c{constructor(){super(...arguments),this.longEventLayoutGenerator=new Xe,this.calendarEventSorter=new Ue}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,n){return t.map(((t,i)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,n,i,"month"===this.viewMode?Je.monthViewEventOffsetTop:0)},this.eventItemRenderer.render(t,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,n,i){const r=this.calendarView.weekdays.length,a=t;let o=t+1;const s=n;let l=!0;const c=this.fullDayEventLayout.getEventRowsIndex(e);if(c>=0){const n=this.fullDayEventLayout.eventLayoutCells[c].getEventStartIndex(e),i=this.fullDayEventLayout.eventLayoutCells[c].getEventEndIndex(e);n===t?o=i+1:l=!1}return{position:"absolute",left:100/r*a+"%",top:`${s*Te.backgroundColorModeEventHeight+i}px`,width:100/r*(o-a)+"%",opacity:l?"1":"0"}}}Je.monthViewEventOffsetTop=26,Ge([l()],Je.prototype,"eventItemRenderer",void 0),Ge([l()],Je.prototype,"viewMode",void 0),Ge([l()],Je.prototype,"calendarView",void 0);var Qe=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class Ze extends c{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:z(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}Qe([l({writable:!0})],Ze.prototype,"showAllEventsInDayOrWeekView",void 0),Qe([d("watchViewModeChange")],Ze.prototype,"resetShowAllFlag",null);var et=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class tt extends c{render(t){const n=t.findIndex((e=>e.isToday()))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!n}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday()}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container").offsetHeight,n=Math.max(e.offsetHeight-t,0)/2,i=e.scrollHeight,r=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(i-r-t,0);if(!isNaN(n)&&a&&a>n)return a-n+r}return 0}}et([l()],tt.prototype,"viewMode",void 0),et([l()],tt.prototype,"viewRenderer",void 0),et([d("watchViewModeChange")],tt.prototype,"updateTimeLine",null),et([d("disconnectedCallback")],tt.prototype,"clearTimer",null),et([d("connectedCallback")],tt.prototype,"updateTimeLineIfComponentAddBack",null),et([d("componentDidLoad")],tt.prototype,"displayCurrentTimeBlockByDefault",null);var nt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const it=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new $,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new W,this.switchPanelRenderer=new oe,this.viewRenderer=new le,this.monthViewRenderer=new de,this.viewWithTimeRenderer=new ve,this.timeLineRenderer=new pe,this.timeMarkerRenderer=new tt,this.monthEventRenderer=new xe,this.currentPeriodController=new ue,this.calendarViewController=new me,this.dayViewFullDayEventRenderer=new Pe,this.dayViewFullDayEventMoreButtonRenderer=new Ze,this.dayViewTimedEventRenderer=new _e,this.eventItemRenderer=new Te,this.dayViewEventLayoutRenderer=new Be,this.fullDayEventLayoutRenderer=new Je,this.calendarEventController=new Me,this.eventResponsiveController=new Ve,this.changeEventEmitter=j(it,u),this.eventClickEmitter=j(it,b),this.dateDblClickEmitter=j(it,y),this.moreActionClickEmitter=j(it,k),this.changeEventPrevent=new D([u],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=V(it,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=V(it,"showEventColorBar","watchShowEventColorBar"),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.showEventColorBar=!0,this.showWeekends=!0}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}render(){return s(e(a,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"]}}};nt([f()],it.prototype,"globalSlimmer",void 0),nt([v()],it.prototype,"translationSlimmer",void 0),nt([v()],it.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),nt([v()],it.prototype,"renderer",void 0),nt([v()],it.prototype,"switchPanelRenderer",void 0),nt([v()],it.prototype,"viewRenderer",void 0),nt([v()],it.prototype,"monthViewRenderer",void 0),nt([v()],it.prototype,"viewWithTimeRenderer",void 0),nt([v()],it.prototype,"timeLineRenderer",void 0),nt([v()],it.prototype,"timeMarkerRenderer",void 0),nt([v()],it.prototype,"monthEventRenderer",void 0),nt([v()],it.prototype,"currentPeriodController",void 0),nt([v()],it.prototype,"calendarViewController",void 0),nt([v()],it.prototype,"dayViewFullDayEventRenderer",void 0),nt([v()],it.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),nt([v()],it.prototype,"dayViewTimedEventRenderer",void 0),nt([v()],it.prototype,"eventItemRenderer",void 0),nt([v()],it.prototype,"dayViewEventLayoutRenderer",void 0),nt([v()],it.prototype,"fullDayEventLayoutRenderer",void 0),nt([v()],it.prototype,"calendarEventController",void 0),nt([v()],it.prototype,"eventResponsiveController",void 0),nt([v()],it.prototype,"changeEventEmitter",void 0),nt([v()],it.prototype,"eventClickEmitter",void 0),nt([v()],it.prototype,"dateDblClickEmitter",void 0),nt([v()],it.prototype,"moreActionClickEmitter",void 0),nt([v()],it.prototype,"changeEventPrevent",void 0),nt([v()],it.prototype,"timeFormatNotifySlimmer",void 0),nt([v()],it.prototype,"showEventColorBarNotifySlimmer",void 0),it.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}';var rt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class at extends c{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:n}=this.calendarEvent,i=t||"primary",r=!this.host.classList.contains("day-event"),a={"slot-container":this.slotMode,"event-container":!0,disabled:n,[i]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:a,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventDuration();return e("div",{part:"event-container",class:Object.assign(Object.assign({},a),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!n,"bg-disabled":n}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:n}=this.calendarEvent;return e("div",{class:"event-title"},`${this.formatDisplayTime(t)} ${n}`)}defaultNormalTimedEventContentRender(t){const{startTime:n,endTime:i,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:C.getIconKey("clock-three")}),e("span",null,`${this.formatDisplayTime(n)} - ${this.formatDisplayTime(i)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",null,this.colorController.getBackgroundColorStyle())}formatDisplayTime(e){const[t,n]=e.split(":");if("24-hour"===this.timeFormat)return`${t.padStart(2,"0")}:${n.padStart(2,"0")}`;{const e=Number(t),i=e>=12?"pm":"am",r=n.padStart(2,"0");return e>12?`${e-12}:${r} pm`:0===e?`12:${r} am`:`${e}:${r} ${i}`}}}C.register({"clock-three":{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="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),rt([l()],at.prototype,"host",void 0),rt([l()],at.prototype,"timeFormat",void 0),rt([l()],at.prototype,"calendarEvent",void 0),rt([l()],at.prototype,"slotMode",void 0),rt([l()],at.prototype,"showColorBar",void 0),rt([l()],at.prototype,"colorController",void 0);class ot extends c{getBackgroundColorStyle(){const e=this.calendarEvent.color||"bg-accent6-primary";return B(e)?`.event-bg-color{${N.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ot.prototype,"calendarEvent",void 0);var st=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class lt extends L{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}st([l({writable:!0})],lt.prototype,"timeFormat",void 0),st([l({writable:!0})],lt.prototype,"showColorBar",void 0);class ct extends c{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),n=A(t.height),i=A(t.lineHeight),r=Math.max(Math.floor(n/i),1);e.style.maxHeight=r*i+"px"}}}!function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);a>3&&o&&Object.defineProperty(t,n,o)}([l()],ct.prototype,"renderer",void 0);var dt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};class ht extends c{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const n=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);n&&(this.slotMode=!0,this.matchSlotElement=n)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}dt([l()],ht.prototype,"host",void 0),dt([l()],ht.prototype,"calendarEvent",void 0),dt([l({writable:!0})],ht.prototype,"slotMode",void 0),dt([l()],ht.prototype,"renderer",void 0),dt([d("componentWillLoad")],ht.prototype,"findTheCalendarEventSlot",null),dt([d("componentDidLoad")],ht.prototype,"appendTheRepeatEventSlotToContainer",null);var vt=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const pt=class{constructor(e){i(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new S({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new at,this.colorController=new ot,this.slotController=new ht,this.subStateController=new lt,this.titleMaxHeightController=new ct,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return P(e("slot",null)),s(e(a,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return o(this)}};vt([f()],pt.prototype,"globalSlimmer",void 0),vt([v()],pt.prototype,"pageResizeObserverSlimmer",void 0),vt([v()],pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),vt([v()],pt.prototype,"renderer",void 0),vt([v()],pt.prototype,"colorController",void 0),vt([v()],pt.prototype,"slotController",void 0),vt([v()],pt.prototype,"subStateController",void 0),vt([v()],pt.prototype,"titleMaxHeightController",void 0),pt.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var ft=function(e,t,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o};const mt=class{constructor(e){i(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(a,{slot:ie(this.eventKey)},e("slot",null)),this.host)}get host(){return o(this)}};ft([f()],mt.prototype,"globalSlimmer",void 0),ft([v()],mt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),mt.style=":host{width:100%;height:100%;position:relative}";export{it as vega_calendar,pt as vega_calendar_event,mt as vega_calendar_event_slot}
|