@prolibu-suite/cobalt-core 0.11.0 → 0.11.1
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/README.md +12 -5
- package/custom-elements.json +2656 -799
- package/dist/cjs/co-accordion.cjs.entry.js +2 -2
- package/dist/cjs/co-action-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-app-shell.cjs.entry.js +2 -2
- package/dist/cjs/co-audio-player.cjs.entry.js +3 -3
- package/dist/cjs/co-autocomplete.cjs.entry.js +10 -3
- package/dist/cjs/co-avatar-group.cjs.entry.js +2 -2
- package/dist/cjs/co-avatar.cjs.entry.js +1 -1
- package/dist/cjs/co-badge.cjs.entry.js +1 -1
- package/dist/cjs/co-bottom-sheet.cjs.entry.js +4 -4
- package/dist/cjs/co-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/co-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/co-button-group.cjs.entry.js +3 -2
- package/dist/cjs/co-button.cjs.entry.js +5 -5
- package/dist/cjs/co-calendar-month_2.cjs.entry.js +14 -2
- package/dist/cjs/co-calendar_3.cjs.entry.js +9 -5
- package/dist/cjs/co-card.cjs.entry.js +2 -2
- package/dist/cjs/co-carousel.cjs.entry.js +5 -2
- package/dist/cjs/co-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/co-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/co-chip_2.cjs.entry.js +15 -5
- package/dist/cjs/co-color-area.cjs.entry.js +2 -2
- package/dist/cjs/co-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-color-slider.cjs.entry.js +3 -3
- package/dist/cjs/co-column-picker.cjs.entry.js +22 -2
- package/dist/cjs/co-combobox.cjs.entry.js +3 -3
- package/dist/cjs/co-command-search.cjs.entry.js +4 -4
- package/dist/cjs/co-data-table-pagination.cjs.entry.js +4 -4
- package/dist/cjs/co-data-table.cjs.entry.js +2 -2
- package/dist/cjs/co-date-picker.cjs.entry.js +8 -0
- package/dist/cjs/co-date-range-picker.cjs.entry.js +9 -0
- package/dist/cjs/co-date-range.cjs.entry.js +7 -1
- package/dist/cjs/co-date-time-picker.cjs.entry.js +9 -2
- package/dist/cjs/co-document-editor.cjs.entry.js +8 -2
- package/dist/cjs/co-drive-card.cjs.entry.js +1 -1
- package/dist/cjs/co-drop-zone.cjs.entry.js +1 -1
- package/dist/cjs/co-emoji-picker.cjs.entry.js +2 -2
- package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/co-event-calendar.cjs.entry.js +4 -2
- package/dist/cjs/co-event-popover.cjs.entry.js +5 -1
- package/dist/cjs/co-fab.cjs.entry.js +6 -2
- package/dist/cjs/co-file-field.cjs.entry.js +10 -6
- package/dist/cjs/co-file-type-tile.cjs.entry.js +2 -2
- package/dist/cjs/co-gradient-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-helper-text.cjs.entry.js +2 -2
- package/dist/cjs/co-icon-button.cjs.entry.js +5 -6
- package/dist/cjs/co-icon.cjs.entry.js +2 -2
- package/dist/cjs/co-json-field.cjs.entry.js +8 -3
- package/dist/cjs/co-kbd_2.cjs.entry.js +3 -3
- package/dist/cjs/co-list-footer.cjs.entry.js +1 -1
- package/dist/cjs/co-list-item.cjs.entry.js +4 -4
- package/dist/cjs/co-media-thumb.cjs.entry.js +2 -2
- package/dist/cjs/co-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/co-menu.cjs.entry.js +8 -8
- package/dist/cjs/co-modal.cjs.entry.js +9 -9
- package/dist/cjs/co-navbar.cjs.entry.js +2 -2
- package/dist/cjs/co-number-field.cjs.entry.js +9 -3
- package/dist/cjs/co-overlay.cjs.entry.js +1 -1
- package/dist/cjs/co-page-header.cjs.entry.js +1 -1
- package/dist/cjs/co-popover.cjs.entry.js +9 -7
- package/dist/cjs/co-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +1 -1
- package/dist/cjs/co-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/co-radio.cjs.entry.js +3 -3
- package/dist/cjs/co-rating.cjs.entry.js +10 -3
- package/dist/cjs/co-ref-field.cjs.entry.js +10 -1
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +17 -3
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +1 -0
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-segmented-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +19 -6
- package/dist/cjs/co-separator.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +2 -2
- package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +8 -2
- package/dist/cjs/co-swatch-grid.cjs.entry.js +1 -1
- package/dist/cjs/co-switch.cjs.entry.js +3 -3
- package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/co-tab.cjs.entry.js +5 -5
- package/dist/cjs/co-tags-field.cjs.entry.js +10 -5
- package/dist/cjs/co-tile.cjs.entry.js +1 -1
- package/dist/cjs/co-time-field.cjs.entry.js +4 -1
- package/dist/cjs/co-toast.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +7 -4
- package/dist/cjs/co-toggle-button.cjs.entry.js +5 -2
- package/dist/cjs/co-transfer-list.cjs.entry.js +6 -2
- package/dist/cjs/co-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/co-video.cjs.entry.js +10 -2
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-97a4fbba.entry.js → p-019eed8e.entry.js} +1 -1
- package/dist/cobalt/{p-1289131f.entry.js → p-04e3e1f6.entry.js} +1 -1
- package/dist/cobalt/p-0d046d98.entry.js +1 -0
- package/dist/cobalt/{p-d4979025.entry.js → p-0e4c2234.entry.js} +1 -1
- package/dist/cobalt/{p-f5934cd9.entry.js → p-1348d5ca.entry.js} +1 -1
- package/dist/cobalt/{p-ee88ec40.entry.js → p-13e5b724.entry.js} +1 -1
- package/dist/cobalt/{p-b2b13da8.entry.js → p-1a5bec8c.entry.js} +1 -1
- package/dist/cobalt/{p-9e406172.entry.js → p-21b4a830.entry.js} +1 -1
- package/dist/cobalt/{p-d1c378ff.entry.js → p-2231bacc.entry.js} +1 -1
- package/dist/cobalt/{p-1693b614.entry.js → p-26cbdc33.entry.js} +1 -1
- package/dist/cobalt/{p-7f3523ce.entry.js → p-28cf05f3.entry.js} +1 -1
- package/dist/cobalt/{p-8ab5b396.entry.js → p-358a6c2a.entry.js} +1 -1
- package/dist/cobalt/p-3b5024ce.entry.js +1 -0
- package/dist/cobalt/{p-8cd3acaa.entry.js → p-3b6efb79.entry.js} +1 -1
- package/dist/cobalt/{p-cc5989e9.entry.js → p-3d1a48e5.entry.js} +1 -1
- package/dist/cobalt/{p-90fad0f9.entry.js → p-47eca182.entry.js} +1 -1
- package/dist/cobalt/{p-b1994bb4.entry.js → p-4bcdd422.entry.js} +1 -1
- package/dist/cobalt/{p-2a2b0c7a.entry.js → p-4d743628.entry.js} +1 -1
- package/dist/cobalt/{p-66fc1528.entry.js → p-4e81e580.entry.js} +1 -1
- package/dist/cobalt/{p-c1caa112.entry.js → p-53a251ca.entry.js} +1 -1
- package/dist/cobalt/{p-67ad9544.entry.js → p-56176aa0.entry.js} +1 -1
- package/dist/cobalt/{p-44edde81.entry.js → p-58ebb303.entry.js} +1 -1
- package/dist/cobalt/{p-2e5702a0.entry.js → p-5e678e88.entry.js} +1 -1
- package/dist/cobalt/{p-889563d5.entry.js → p-60f948c4.entry.js} +1 -1
- package/dist/cobalt/{p-db42c4ab.entry.js → p-63908a8d.entry.js} +1 -1
- package/dist/cobalt/{p-5573985a.entry.js → p-65c191aa.entry.js} +1 -1
- package/dist/cobalt/{p-b5ec4286.entry.js → p-65d44da2.entry.js} +1 -1
- package/dist/cobalt/{p-5534a64f.entry.js → p-69ecc933.entry.js} +1 -1
- package/dist/cobalt/{p-c9990662.entry.js → p-6c1992c9.entry.js} +1 -1
- package/dist/cobalt/{p-22233b31.entry.js → p-6d4a660c.entry.js} +1 -1
- package/dist/cobalt/{p-7675cebe.entry.js → p-713637f2.entry.js} +1 -1
- package/dist/cobalt/{p-45007758.entry.js → p-71ae1551.entry.js} +1 -1
- package/dist/cobalt/{p-a930cdd7.entry.js → p-71ee36a8.entry.js} +1 -1
- package/dist/cobalt/{p-eeb114da.entry.js → p-71fe35c4.entry.js} +1 -1
- package/dist/cobalt/{p-a336178b.entry.js → p-73313cbe.entry.js} +1 -1
- package/dist/cobalt/{p-8b2e4579.entry.js → p-78412feb.entry.js} +1 -1
- package/dist/cobalt/{p-48c23310.entry.js → p-7beface1.entry.js} +1 -1
- package/dist/cobalt/p-7d1718ed.entry.js +1 -0
- package/dist/cobalt/{p-59d3e8fc.entry.js → p-7df18a52.entry.js} +1 -1
- package/dist/cobalt/{p-b9401dd7.entry.js → p-7e678cbd.entry.js} +1 -1
- package/dist/cobalt/{p-c109a1e1.entry.js → p-7fabd8ba.entry.js} +1 -1
- package/dist/cobalt/{p-8f701eac.entry.js → p-848f5ca4.entry.js} +1 -1
- package/dist/cobalt/{p-608d251d.entry.js → p-8680559b.entry.js} +1 -1
- package/dist/cobalt/{p-4b327483.entry.js → p-87de5469.entry.js} +1 -1
- package/dist/cobalt/{p-3011c84f.entry.js → p-87e62e2b.entry.js} +1 -1
- package/dist/cobalt/{p-a07dedd1.entry.js → p-8a2a2b6c.entry.js} +1 -1
- package/dist/cobalt/{p-f813569c.entry.js → p-903237f9.entry.js} +1 -1
- package/dist/cobalt/{p-1f3d5313.entry.js → p-95f2ebb1.entry.js} +1 -1
- package/dist/cobalt/{p-86b6fd81.entry.js → p-99df434b.entry.js} +1 -1
- package/dist/cobalt/{p-6c157ea2.entry.js → p-9adbab95.entry.js} +1 -1
- package/dist/cobalt/{p-4111fefa.entry.js → p-9ee5bef3.entry.js} +1 -1
- package/dist/cobalt/{p-9bee9dc8.entry.js → p-a27013e6.entry.js} +1 -1
- package/dist/cobalt/{p-9cf10331.entry.js → p-a4eb298c.entry.js} +1 -1
- package/dist/cobalt/{p-5b2aa70e.entry.js → p-a56bd4a8.entry.js} +1 -1
- package/dist/cobalt/{p-d1f47915.entry.js → p-a5eabecb.entry.js} +1 -1
- package/dist/cobalt/{p-f5e1873d.entry.js → p-a5ee1fc2.entry.js} +1 -1
- package/dist/cobalt/{p-ee42dca6.entry.js → p-a7cd61ce.entry.js} +1 -1
- package/dist/cobalt/{p-7569375a.entry.js → p-ad752791.entry.js} +1 -1
- package/dist/cobalt/{p-ea564148.entry.js → p-ae999b94.entry.js} +1 -1
- package/dist/cobalt/{p-30760f77.entry.js → p-aed832d5.entry.js} +1 -1
- package/dist/cobalt/{p-e6116149.entry.js → p-b2457431.entry.js} +1 -1
- package/dist/cobalt/{p-3b9a8e86.entry.js → p-b39a4999.entry.js} +1 -1
- package/dist/cobalt/{p-bc3ba0cd.entry.js → p-b5dabdc3.entry.js} +1 -1
- package/dist/cobalt/{p-ec7a6bf2.entry.js → p-b67fb616.entry.js} +1 -1
- package/dist/cobalt/{p-f8c7941f.entry.js → p-b9b73dcb.entry.js} +1 -1
- package/dist/cobalt/{p-a52ed6ff.entry.js → p-ba39a965.entry.js} +1 -1
- package/dist/cobalt/{p-7376f4ed.entry.js → p-be520bd5.entry.js} +1 -1
- package/dist/cobalt/{p-0a5cfed0.entry.js → p-bee30373.entry.js} +1 -1
- package/dist/cobalt/{p-e4ff2fcb.entry.js → p-c220362c.entry.js} +1 -1
- package/dist/cobalt/{p-f246946a.entry.js → p-c4c997f3.entry.js} +1 -1
- package/dist/cobalt/{p-6d541199.entry.js → p-c5464a98.entry.js} +1 -1
- package/dist/cobalt/{p-26fa36f8.entry.js → p-cf5b91be.entry.js} +1 -1
- package/dist/cobalt/{p-cc4b51fa.entry.js → p-cfaaa684.entry.js} +1 -1
- package/dist/cobalt/{p-57d250ad.entry.js → p-d00c3894.entry.js} +1 -1
- package/dist/cobalt/{p-f8d3c71e.entry.js → p-d5d8fa8b.entry.js} +1 -1
- package/dist/cobalt/p-d6215d80.entry.js +1 -0
- package/dist/cobalt/{p-78a20284.entry.js → p-dabcbba7.entry.js} +1 -1
- package/dist/cobalt/{p-9b46a8fe.entry.js → p-db623519.entry.js} +1 -1
- package/dist/cobalt/{p-136beb2c.entry.js → p-df529110.entry.js} +1 -1
- package/dist/cobalt/{p-5d6e02dd.entry.js → p-efb3cbb0.entry.js} +1 -1
- package/dist/cobalt/{p-e99ddf9c.entry.js → p-f2fa2ac0.entry.js} +1 -1
- package/dist/cobalt/p-f403eeec.entry.js +1 -0
- package/dist/cobalt/{p-ce2b2048.entry.js → p-f69804a6.entry.js} +1 -1
- package/dist/collection/components/co-accordion/co-accordion.js +12 -2
- package/dist/collection/components/co-action-bar/co-action-bar.css +6 -0
- package/dist/collection/components/co-action-bar/co-action-bar.js +3 -2
- package/dist/collection/components/co-app-shell/co-app-shell.css +6 -0
- package/dist/collection/components/co-app-shell/co-app-shell.js +13 -2
- package/dist/collection/components/co-audio-player/co-audio-player.js +19 -7
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +30 -17
- package/dist/collection/components/co-avatar/co-avatar.css +7 -2
- package/dist/collection/components/co-avatar/co-avatar.js +9 -2
- package/dist/collection/components/co-avatar-group/co-avatar-group.css +4 -0
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +8 -3
- package/dist/collection/components/co-badge/co-badge.js +8 -1
- package/dist/collection/components/co-bottom-sheet/co-bottom-sheet.js +13 -4
- package/dist/collection/components/co-breadcrumb/co-breadcrumb.js +5 -1
- package/dist/collection/components/co-breadcrumb-item/co-breadcrumb-item.js +8 -2
- package/dist/collection/components/co-button/co-button.css +10 -2
- package/dist/collection/components/co-button/co-button.js +14 -8
- package/dist/collection/components/co-button-group/co-button-group.js +10 -3
- package/dist/collection/components/co-calendar/co-calendar.css +8 -0
- package/dist/collection/components/co-calendar/co-calendar.js +3 -1
- package/dist/collection/components/co-calendar-timegrid/co-calendar-timegrid.js +36 -19
- package/dist/collection/components/co-card/co-card.js +11 -2
- package/dist/collection/components/co-carousel/co-carousel.css +10 -0
- package/dist/collection/components/co-carousel/co-carousel.js +17 -5
- package/dist/collection/components/co-checkbox/co-checkbox.js +11 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +9 -4
- package/dist/collection/components/co-chip/co-chip.css +9 -0
- package/dist/collection/components/co-chip/co-chip.js +15 -2
- package/dist/collection/components/co-color-area/co-color-area.css +4 -0
- package/dist/collection/components/co-color-area/co-color-area.js +6 -5
- package/dist/collection/components/co-color-picker/co-color-picker.js +4 -2
- package/dist/collection/components/co-color-slider/co-color-slider.js +6 -5
- package/dist/collection/components/co-column-picker/co-column-picker.js +51 -25
- package/dist/collection/components/co-combobox/co-combobox.js +18 -4
- package/dist/collection/components/co-command-search/co-command-search.js +19 -8
- package/dist/collection/components/co-data-table/co-data-table.js +8 -3
- package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +16 -4
- package/dist/collection/components/co-date-field/co-date-field.js +19 -13
- package/dist/collection/components/co-date-picker/co-date-picker.js +38 -25
- package/dist/collection/components/co-date-range/co-date-range.js +19 -10
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +44 -30
- package/dist/collection/components/co-date-time-picker/co-date-time-picker.js +30 -21
- package/dist/collection/components/co-document-editor/co-document-editor.js +22 -15
- package/dist/collection/components/co-drawer/co-drawer.css +5 -0
- package/dist/collection/components/co-drawer/co-drawer.js +13 -0
- package/dist/collection/components/co-drive-card/co-drive-card.js +14 -1
- package/dist/collection/components/co-drop-zone/co-drop-zone.js +7 -2
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.css +4 -0
- package/dist/collection/components/co-emoji-picker/co-emoji-picker.js +11 -2
- package/dist/collection/components/co-empty-state/co-empty-state.js +4 -2
- package/dist/collection/components/co-event-calendar/co-event-calendar.js +16 -4
- package/dist/collection/components/co-event-popover/co-event-popover.js +18 -6
- package/dist/collection/components/co-fab/co-fab.css +8 -0
- package/dist/collection/components/co-fab/co-fab.js +17 -8
- package/dist/collection/components/co-file-field/co-file-field.js +16 -11
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +9 -2
- package/dist/collection/components/co-gradient-bar/co-gradient-bar.css +5 -0
- package/dist/collection/components/co-gradient-bar/co-gradient-bar.js +7 -2
- package/dist/collection/components/co-helper-text/co-helper-text.js +4 -2
- package/dist/collection/components/co-icon/co-icon.js +6 -2
- package/dist/collection/components/co-icon-button/co-icon-button.css +9 -0
- package/dist/collection/components/co-icon-button/co-icon-button.js +12 -7
- package/dist/collection/components/co-input/co-input.css +3 -0
- package/dist/collection/components/co-input/co-input.js +11 -0
- package/dist/collection/components/co-json-field/co-json-field.js +19 -12
- package/dist/collection/components/co-kbd/co-kbd.js +8 -1
- package/dist/collection/components/co-list-footer/co-list-footer.js +4 -1
- package/dist/collection/components/co-list-item/co-list-item.js +7 -4
- package/dist/collection/components/co-loader/co-loader.js +5 -0
- package/dist/collection/components/co-media-thumb/co-media-thumb.js +9 -2
- package/dist/collection/components/co-menu/co-menu.css +11 -1
- package/dist/collection/components/co-menu/co-menu.js +13 -13
- package/dist/collection/components/co-menu-divider/co-menu-divider.css +4 -0
- package/dist/collection/components/co-menu-divider/co-menu-divider.js +2 -1
- package/dist/collection/components/co-menu-item/co-menu-item.css +14 -0
- package/dist/collection/components/co-menu-item/co-menu-item.js +2 -0
- package/dist/collection/components/co-modal/co-modal.css +6 -0
- package/dist/collection/components/co-modal/co-modal.js +29 -17
- package/dist/collection/components/co-navbar/co-navbar.css +7 -0
- package/dist/collection/components/co-navbar/co-navbar.js +4 -2
- package/dist/collection/components/co-number-field/co-number-field.js +29 -15
- package/dist/collection/components/co-option-list/co-option-list.css +38 -0
- package/dist/collection/components/co-option-list/co-option-list.js +33 -16
- package/dist/collection/components/co-overlay/co-overlay.css +4 -0
- package/dist/collection/components/co-overlay/co-overlay.js +11 -1
- package/dist/collection/components/co-page-header/co-page-header.js +4 -1
- package/dist/collection/components/co-popover/co-popover.css +7 -2
- package/dist/collection/components/co-popover/co-popover.js +29 -16
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +5 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +5 -2
- package/dist/collection/components/co-provider-logo/co-provider-logo.js +3 -0
- package/dist/collection/components/co-radio/co-radio.js +11 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +9 -4
- package/dist/collection/components/co-rating/co-rating.js +25 -13
- package/dist/collection/components/co-ref-field/co-ref-field.css +14 -0
- package/dist/collection/components/co-ref-field/co-ref-field.js +55 -27
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +46 -24
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +4 -1
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +8 -0
- package/dist/collection/components/co-row/co-row.js +5 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +9 -3
- package/dist/collection/components/co-select/co-select.css +13 -1
- package/dist/collection/components/co-select/co-select.js +42 -23
- package/dist/collection/components/co-separator/co-separator.js +8 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +10 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.css +5 -0
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +4 -3
- package/dist/collection/components/co-skeleton/co-skeleton.js +4 -1
- package/dist/collection/components/co-slider/co-slider.css +7 -0
- package/dist/collection/components/co-slider/co-slider.js +25 -13
- package/dist/collection/components/co-swatch-grid/co-swatch-grid.js +2 -1
- package/dist/collection/components/co-switch/co-switch.css +4 -0
- package/dist/collection/components/co-switch/co-switch.js +12 -3
- package/dist/collection/components/co-tab/co-tab.js +14 -6
- package/dist/collection/components/co-tab-group/co-tab-group.js +11 -2
- package/dist/collection/components/co-tags-field/co-tags-field.js +21 -14
- package/dist/collection/components/co-tile/co-tile.js +6 -1
- package/dist/collection/components/co-time-field/co-time-field.js +9 -4
- package/dist/collection/components/co-toast/co-toast.css +11 -0
- package/dist/collection/components/co-toast/co-toast.js +13 -4
- package/dist/collection/components/co-toggle-button/co-toggle-button.css +5 -0
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +13 -9
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +18 -9
- package/dist/collection/components/co-tooltip/co-tooltip.js +12 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +19 -10
- package/dist/collection/components/co-tree-item/co-tree-item.css +11 -2
- package/dist/collection/components/co-tree-item/co-tree-item.js +6 -4
- package/dist/collection/components/co-video/co-video.css +11 -0
- package/dist/collection/components/co-video/co-video.js +41 -22
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.js +1 -1
- package/dist/components/co-app-shell.js +1 -1
- package/dist/components/co-audio-player.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-badge.js +1 -1
- package/dist/components/co-bottom-sheet.js +1 -1
- package/dist/components/co-breadcrumb-item.js +1 -1
- package/dist/components/co-breadcrumb.js +1 -1
- package/dist/components/co-button-group.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.js +1 -1
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-card.js +1 -1
- package/dist/components/co-carousel.js +1 -1
- package/dist/components/co-checkbox-group.js +1 -1
- package/dist/components/co-checkbox.js +1 -1
- package/dist/components/co-chip.js +1 -1
- package/dist/components/co-color-area.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-color-slider.js +1 -1
- package/dist/components/co-column-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-data-table-pagination.js +1 -1
- package/dist/components/co-data-table.js +1 -1
- package/dist/components/co-date-field.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-date-time-picker.js +1 -1
- package/dist/components/co-document-editor.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-drive-card.js +1 -1
- package/dist/components/co-drop-zone.js +1 -1
- package/dist/components/co-emoji-picker.js +1 -1
- package/dist/components/co-empty-state.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-event-popover.js +1 -1
- package/dist/components/co-fab.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-gradient-bar.js +1 -1
- package/dist/components/co-helper-text.js +1 -1
- package/dist/components/co-icon-button.js +1 -1
- package/dist/components/co-icon.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-json-field.js +1 -1
- package/dist/components/co-kbd.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-footer.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-media-thumb.js +1 -1
- package/dist/components/co-menu-divider.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio-group.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-segmented-bar.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-swatch-grid.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-tile.js +1 -1
- package/dist/components/co-time-field.js +1 -1
- package/dist/components/co-toast.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-transfer-list.js +1 -1
- package/dist/components/co-tree-item.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/{p-BQltjDw5.js → p-8XzG8pzY.js} +1 -1
- package/dist/components/{p-FA1kBmZ-.js → p-9VoFSbIH.js} +1 -1
- package/dist/components/{p-CpGEV0iM.js → p-B3Egz082.js} +1 -1
- package/dist/components/{p-Bymi-A7C.js → p-B9wdMd_0.js} +1 -1
- package/dist/components/{p-Dp650Gpp.js → p-BRZci8B3.js} +1 -1
- package/dist/components/{p-CGH3E8uK.js → p-BVdCvEza.js} +1 -1
- package/dist/components/{p-Dh_eRYKu.js → p-BdmzslA5.js} +1 -1
- package/dist/components/{p-C3G8oPgU.js → p-Bw_b_czs.js} +1 -1
- package/dist/components/{p-BraiMwgs.js → p-C4sZjIDj.js} +1 -1
- package/dist/components/{p-B20o5exO.js → p-C6WHpL5X.js} +1 -1
- package/dist/components/p-COozgrEk.js +1 -0
- package/dist/components/{p-ChwSnCFf.js → p-CiYPJW0B.js} +1 -1
- package/dist/components/{p-f2xwcrXa.js → p-Cnfd6Zze.js} +1 -1
- package/dist/components/{p-C1jZYtUS.js → p-CxWo3qDo.js} +1 -1
- package/dist/components/p-D4XP17VP.js +1 -0
- package/dist/components/{p-D9or2g4j.js → p-Dn2wblrA.js} +1 -1
- package/dist/components/p-Dnz99Ox_.js +1 -0
- package/dist/components/{p-BcXdId8y.js → p-DsuFNmTI.js} +1 -1
- package/dist/components/{p-CfJgypOl.js → p-Du8EpQb-.js} +1 -1
- package/dist/components/{p-DKXCr-hE.js → p-DymSqdlK.js} +1 -1
- package/dist/components/{p-C-f8wTqe.js → p-Hi57w2_2.js} +1 -1
- package/dist/components/{p-B3kKOgsA.js → p-KK2vAKs-.js} +1 -1
- package/dist/components/{p-d4rf3H8p.js → p-TGRbLkLz.js} +1 -1
- package/dist/components/{p-BOqtnWTJ.js → p-VcrjNCew.js} +1 -1
- package/dist/components/{p-BR0LYW9v.js → p-nrwDl_gx.js} +1 -1
- package/dist/components/{p-BIDSDP05.js → p-zJ3pjFzW.js} +1 -1
- package/dist/esm/co-accordion.entry.js +2 -2
- package/dist/esm/co-action-bar.entry.js +2 -2
- package/dist/esm/co-app-shell.entry.js +2 -2
- package/dist/esm/co-audio-player.entry.js +3 -3
- package/dist/esm/co-autocomplete.entry.js +10 -3
- package/dist/esm/co-avatar-group.entry.js +2 -2
- package/dist/esm/co-avatar.entry.js +1 -1
- package/dist/esm/co-badge.entry.js +1 -1
- package/dist/esm/co-bottom-sheet.entry.js +4 -4
- package/dist/esm/co-breadcrumb-item.entry.js +2 -2
- package/dist/esm/co-breadcrumb.entry.js +1 -1
- package/dist/esm/co-button-group.entry.js +3 -2
- package/dist/esm/co-button.entry.js +5 -5
- package/dist/esm/co-calendar-month_2.entry.js +14 -2
- package/dist/esm/co-calendar_3.entry.js +9 -5
- package/dist/esm/co-card.entry.js +2 -2
- package/dist/esm/co-carousel.entry.js +5 -2
- package/dist/esm/co-checkbox-group.entry.js +3 -3
- package/dist/esm/co-checkbox.entry.js +3 -3
- package/dist/esm/co-chip_2.entry.js +15 -5
- package/dist/esm/co-color-area.entry.js +2 -2
- package/dist/esm/co-color-picker.entry.js +2 -2
- package/dist/esm/co-color-slider.entry.js +3 -3
- package/dist/esm/co-column-picker.entry.js +22 -2
- package/dist/esm/co-combobox.entry.js +3 -3
- package/dist/esm/co-command-search.entry.js +4 -4
- package/dist/esm/co-data-table-pagination.entry.js +4 -4
- package/dist/esm/co-data-table.entry.js +2 -2
- package/dist/esm/co-date-picker.entry.js +8 -0
- package/dist/esm/co-date-range-picker.entry.js +9 -0
- package/dist/esm/co-date-range.entry.js +7 -1
- package/dist/esm/co-date-time-picker.entry.js +9 -2
- package/dist/esm/co-document-editor.entry.js +8 -2
- package/dist/esm/co-drive-card.entry.js +1 -1
- package/dist/esm/co-drop-zone.entry.js +1 -1
- package/dist/esm/co-emoji-picker.entry.js +2 -2
- package/dist/esm/co-empty-state.entry.js +2 -2
- package/dist/esm/co-event-calendar.entry.js +4 -2
- package/dist/esm/co-event-popover.entry.js +5 -1
- package/dist/esm/co-fab.entry.js +6 -2
- package/dist/esm/co-file-field.entry.js +10 -6
- package/dist/esm/co-file-type-tile.entry.js +2 -2
- package/dist/esm/co-gradient-bar.entry.js +2 -2
- package/dist/esm/co-helper-text.entry.js +2 -2
- package/dist/esm/co-icon-button.entry.js +5 -6
- package/dist/esm/co-icon.entry.js +2 -2
- package/dist/esm/co-json-field.entry.js +8 -3
- package/dist/esm/co-kbd_2.entry.js +3 -3
- package/dist/esm/co-list-footer.entry.js +1 -1
- package/dist/esm/co-list-item.entry.js +4 -4
- package/dist/esm/co-media-thumb.entry.js +2 -2
- package/dist/esm/co-menu-divider.entry.js +1 -1
- package/dist/esm/co-menu.entry.js +8 -8
- package/dist/esm/co-modal.entry.js +9 -9
- package/dist/esm/co-navbar.entry.js +2 -2
- package/dist/esm/co-number-field.entry.js +9 -3
- package/dist/esm/co-overlay.entry.js +1 -1
- package/dist/esm/co-page-header.entry.js +1 -1
- package/dist/esm/co-popover.entry.js +9 -7
- package/dist/esm/co-progress-bar.entry.js +2 -2
- package/dist/esm/co-progress-circle.entry.js +2 -2
- package/dist/esm/co-provider-logo_2.entry.js +1 -1
- package/dist/esm/co-radio-group.entry.js +3 -3
- package/dist/esm/co-radio.entry.js +3 -3
- package/dist/esm/co-rating.entry.js +10 -3
- package/dist/esm/co-ref-field.entry.js +10 -1
- package/dist/esm/co-rich-text-editor.entry.js +17 -3
- package/dist/esm/co-rich-text-toolbar.entry.js +1 -0
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-segmented-bar.entry.js +2 -2
- package/dist/esm/co-select.entry.js +19 -6
- package/dist/esm/co-separator.entry.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +2 -2
- package/dist/esm/co-sidebar.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +8 -2
- package/dist/esm/co-swatch-grid.entry.js +1 -1
- package/dist/esm/co-switch.entry.js +3 -3
- package/dist/esm/co-tab-group.entry.js +2 -2
- package/dist/esm/co-tab.entry.js +5 -5
- package/dist/esm/co-tags-field.entry.js +10 -5
- package/dist/esm/co-tile.entry.js +1 -1
- package/dist/esm/co-time-field.entry.js +4 -1
- package/dist/esm/co-toast.entry.js +2 -2
- package/dist/esm/co-toggle-button-group.entry.js +7 -4
- package/dist/esm/co-toggle-button.entry.js +5 -2
- package/dist/esm/co-transfer-list.entry.js +6 -2
- package/dist/esm/co-tree-item.entry.js +2 -2
- package/dist/esm/co-video.entry.js +10 -2
- package/dist/types/components/co-accordion/co-accordion.d.ts +10 -0
- package/dist/types/components/co-action-bar/co-action-bar.d.ts +1 -0
- package/dist/types/components/co-app-shell/co-app-shell.d.ts +11 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +16 -0
- package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +21 -0
- package/dist/types/components/co-avatar/co-avatar.d.ts +8 -1
- package/dist/types/components/co-avatar-group/co-avatar-group.d.ts +5 -0
- package/dist/types/components/co-badge/co-badge.d.ts +7 -0
- package/dist/types/components/co-bottom-sheet/co-bottom-sheet.d.ts +9 -0
- package/dist/types/components/co-breadcrumb/co-breadcrumb.d.ts +4 -0
- package/dist/types/components/co-breadcrumb-item/co-breadcrumb-item.d.ts +6 -0
- package/dist/types/components/co-button/co-button.d.ts +9 -3
- package/dist/types/components/co-button-group/co-button-group.d.ts +7 -0
- package/dist/types/components/co-calendar/co-calendar.d.ts +2 -0
- package/dist/types/components/co-calendar-timegrid/co-calendar-timegrid.d.ts +23 -0
- package/dist/types/components/co-card/co-card.d.ts +9 -0
- package/dist/types/components/co-carousel/co-carousel.d.ts +12 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +8 -0
- package/dist/types/components/co-checkbox-group/co-checkbox-group.d.ts +5 -0
- package/dist/types/components/co-chip/co-chip.d.ts +13 -0
- package/dist/types/components/co-color-area/co-color-area.d.ts +2 -1
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +2 -0
- package/dist/types/components/co-color-slider/co-color-slider.d.ts +2 -1
- package/dist/types/components/co-column-picker/co-column-picker.d.ts +32 -0
- package/dist/types/components/co-combobox/co-combobox.d.ts +14 -0
- package/dist/types/components/co-command-search/co-command-search.d.ts +15 -0
- package/dist/types/components/co-data-table/co-data-table.d.ts +5 -0
- package/dist/types/components/co-data-table-pagination/co-data-table-pagination.d.ts +12 -0
- package/dist/types/components/co-date-field/co-date-field.d.ts +11 -0
- package/dist/types/components/co-date-picker/co-date-picker.d.ts +30 -0
- package/dist/types/components/co-date-range/co-date-range.d.ts +12 -0
- package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +33 -0
- package/dist/types/components/co-date-time-picker/co-date-time-picker.d.ts +21 -0
- package/dist/types/components/co-document-editor/co-document-editor.d.ts +9 -1
- package/dist/types/components/co-drawer/co-drawer.d.ts +13 -0
- package/dist/types/components/co-drive-card/co-drive-card.d.ts +13 -0
- package/dist/types/components/co-drop-zone/co-drop-zone.d.ts +6 -1
- package/dist/types/components/co-emoji-picker/co-emoji-picker.d.ts +9 -0
- package/dist/types/components/co-empty-state/co-empty-state.d.ts +2 -0
- package/dist/types/components/co-event-calendar/co-event-calendar.d.ts +12 -16
- package/dist/types/components/co-event-popover/co-event-popover.d.ts +13 -0
- package/dist/types/components/co-fab/co-fab.d.ts +11 -0
- package/dist/types/components/co-file-field/co-file-field.d.ts +6 -0
- package/dist/types/components/co-file-type-tile/co-file-type-tile.d.ts +7 -0
- package/dist/types/components/co-gradient-bar/co-gradient-bar.d.ts +5 -0
- package/dist/types/components/co-helper-text/co-helper-text.d.ts +2 -0
- package/dist/types/components/co-icon/co-icon.d.ts +4 -0
- package/dist/types/components/co-icon-button/co-icon-button.d.ts +9 -4
- package/dist/types/components/co-input/co-input.d.ts +11 -0
- package/dist/types/components/co-json-field/co-json-field.d.ts +11 -0
- package/dist/types/components/co-kbd/co-kbd.d.ts +7 -0
- package/dist/types/components/co-list-footer/co-list-footer.d.ts +3 -0
- package/dist/types/components/co-list-item/co-list-item.d.ts +3 -0
- package/dist/types/components/co-loader/co-loader.d.ts +5 -0
- package/dist/types/components/co-media-thumb/co-media-thumb.d.ts +7 -0
- package/dist/types/components/co-menu/co-menu.d.ts +6 -4
- package/dist/types/components/co-menu-divider/co-menu-divider.d.ts +1 -0
- package/dist/types/components/co-menu-item/co-menu-item.d.ts +2 -0
- package/dist/types/components/co-modal/co-modal.d.ts +24 -12
- package/dist/types/components/co-navbar/co-navbar.d.ts +2 -0
- package/dist/types/components/co-number-field/co-number-field.d.ts +20 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +28 -1
- package/dist/types/components/co-overlay/co-overlay.d.ts +10 -0
- package/dist/types/components/co-page-header/co-page-header.d.ts +3 -0
- package/dist/types/components/co-popover/co-popover.d.ts +20 -5
- package/dist/types/components/co-progress-bar/co-progress-bar.d.ts +3 -0
- package/dist/types/components/co-progress-circle/co-progress-circle.d.ts +3 -0
- package/dist/types/components/co-provider-logo/co-provider-logo.d.ts +3 -0
- package/dist/types/components/co-radio/co-radio.d.ts +8 -0
- package/dist/types/components/co-radio-group/co-radio-group.d.ts +5 -0
- package/dist/types/components/co-rating/co-rating.d.ts +15 -0
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +42 -0
- package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +29 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +3 -0
- package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +8 -0
- package/dist/types/components/co-row/co-row.d.ts +3 -0
- package/dist/types/components/co-segmented-bar/co-segmented-bar.d.ts +6 -0
- package/dist/types/components/co-select/co-select.d.ts +26 -0
- package/dist/types/components/co-separator/co-separator.d.ts +7 -0
- package/dist/types/components/co-sidebar/co-sidebar.d.ts +8 -0
- package/dist/types/components/co-sidebar-nav/co-sidebar-nav.d.ts +1 -0
- package/dist/types/components/co-skeleton/co-skeleton.d.ts +3 -0
- package/dist/types/components/co-slider/co-slider.d.ts +17 -0
- package/dist/types/components/co-swatch-grid/co-swatch-grid.d.ts +1 -0
- package/dist/types/components/co-switch/co-switch.d.ts +9 -0
- package/dist/types/components/co-tab/co-tab.d.ts +11 -3
- package/dist/types/components/co-tab-group/co-tab-group.d.ts +9 -0
- package/dist/types/components/co-tags-field/co-tags-field.d.ts +11 -0
- package/dist/types/components/co-tile/co-tile.d.ts +5 -0
- package/dist/types/components/co-time-field/co-time-field.d.ts +5 -0
- package/dist/types/components/co-toast/co-toast.d.ts +9 -0
- package/dist/types/components/co-toggle-button/co-toggle-button.d.ts +8 -0
- package/dist/types/components/co-toggle-button-group/co-toggle-button-group.d.ts +12 -2
- package/dist/types/components/co-tooltip/co-tooltip.d.ts +10 -0
- package/dist/types/components/co-transfer-list/co-transfer-list.d.ts +12 -0
- package/dist/types/components/co-tree-item/co-tree-item.d.ts +2 -0
- package/dist/types/components/co-video/co-video.d.ts +31 -0
- package/dist/types/components.d.ts +2202 -38
- package/package.json +4 -4
- package/dist/cobalt/p-1bfb69ae.entry.js +0 -1
- package/dist/cobalt/p-b9dfb333.entry.js +0 -1
- package/dist/cobalt/p-bc4fbfa6.entry.js +0 -1
- package/dist/cobalt/p-d75d2f3d.entry.js +0 -1
- package/dist/cobalt/p-f60bd4d6.entry.js +0 -1
- package/dist/components/p-BZDl9aFl.js +0 -1
- package/dist/components/p-DfcPGitr.js +0 -1
- package/dist/components/p-Dg-Ti_Bf.js +0 -1
- /package/dist/cobalt/{p-2794c500.entry.js → p-67a024dd.entry.js} +0 -0
- /package/dist/cobalt/{p-05000ef3.entry.js → p-6974df59.entry.js} +0 -0
- /package/dist/cobalt/{p-ffbe955a.entry.js → p-71dc8e4a.entry.js} +0 -0
- /package/dist/cobalt/{p-297b55cd.entry.js → p-77e0d401.entry.js} +0 -0
- /package/dist/cobalt/{p-4c6caa41.entry.js → p-c567533e.entry.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as i,H as e,c as s,h as o}from"./index.js";import{l as n,r as a}from"./p-dnaee7fS.js";import{d as r}from"./p-KK2vAKs-.js";import{d as h}from"./p-C-5cLeKr.js";import{d as l}from"./p-C6WHpL5X.js";import{c,z as d,a as u,w as g,t as v}from"./p-Ch837Ggl.js";import{a as f,t as p,b,c as _,p as m}from"./p-DJ468fPu.js";function x(t,i,e){return Math.min(e,Math.max(i,t))}function y(t,i){return i<=0?t:Math.round(t/i)*i}function w(t,i,e){const s=e-i;return s<=0?0:x(t,i,e)===t?(t-i)/s:Math.min(1,Math.max(0,(t-i)/s))}function k(t,i,e){const s=[...t].sort(((t,s)=>i(t)-i(s)||e(t)-e(s))),o=[];let n=[],a=[],r=-1/0;const h=()=>{const t=a.length;for(const i of n)o[i].columnCount=t;n=[],a=[],r=-1/0};for(const t of s){const s=i(t),l=e(t);n.length&&s>=r&&h();let c=-1;for(let t=0;t<a.length;t++)if(a[t]<=s){c=t;break}-1===c?(c=a.length,a.push(l)):a[c]=l,o.push({event:t,columnIndex:c,columnCount:1}),n.push(o.length-1),r=Math.max(r,l)}return h(),o}function M(t,i,e){const s=c(t),o=c(i);if(o<=s)return[];const n=[];let a=d(s,e),r=z(a,e);for(let t=0;t<366&&r<o;t++){const t=f(a,1),i=z(t,e),h=Math.max(s,r),l=Math.min(o,i);n.push({dateKey:a,startMinutes:h===r?0:u(h,e),endMinutes:l===i?1440:u(l,e),isStart:h===s,isEnd:l===o}),a=t,r=i}return n}const D=new Map;function z(t,i){const e=`${i}|${t}`;let s=D.get(e);if(void 0===s){const[o,n,a]=t.split("-").map(Number);s=g({year:o,month:n,day:a,hour:0,minute:0,second:0},i),D.size>1e3&&D.clear(),D.set(e,s)}return s}const $=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coRangeSelect=s(this,"coRangeSelect",1),this.coEventClick=s(this,"coEventClick",1),this.coEventDrop=s(this,"coEventDrop",1),this.coEventDblClick=s(this,"coEventDblClick",1),this.events=[],this.dates=[],this.locale="es-CO",this.editable=!0,this.selectable=!0,this.slotMinutes=15,this.snapMinutes=15,this.defaultDurationMinutes=60,this.scrollTime="07:00",this.nowIndicator=!0,this.loading=!1,this.allDaySlot=!0,this.minTime="00:00",this.maxTime="24:00",this.nowMinutes=0,this.nowDay="",this.focusDate="",this.focusMin=0,this.selDate=null,this.selStartMin=0,this.selEndMin=0,this.selecting=!1,this.pendingSel=null,this.selRaf=0,this.pendingDrag=null,this.dragRaf=0,this.onWindowPointerUp=()=>this.finishSelection(),this.dragId=null,this.dragMode=null,this.dragGrabOffsetMin=0,this.dragDurationMin=0,this.dragDate=null,this.dragStartMin=0,this.dragEndMin=0,this.origStartMin=0,this.origEndMin=0,this.origDate=null,this.suppressNextClick=!1,this.dragArmedId=null,this.dragStartPointer=null,this.onWindowPointerMove=t=>this.trackDrag(t),this.onWindowPointerUpDrag=()=>this.finishDrag(),this.colRects=[],this.gridRect=null,this.onDragViewportChange=()=>this.captureDragRects(),this.startSelection=(t,i,e)=>{if(!this.selectable||!this.isDayInteractable(i))return;if(t.target.closest(".tg__event, .tg__allday-bar"))return;t.preventDefault();const s=this.minutesFromPointer(t.clientY,e);this.selecting=!0,this.selDate=i,this.selStartMin=s,this.selEndMin=s,this.setInteracting(!0)},this.extendSelection=(t,i)=>{this.selecting&&(this.pendingSel={y:t.clientY,colEl:i},this.selRaf||(this.selRaf=requestAnimationFrame((()=>{this.selRaf=0;const t=this.pendingSel;if(this.pendingSel=null,!t||!this.selecting)return;const i=this.minutesFromPointer(t.y,t.colEl);i!==this.selEndMin&&(this.selEndMin=i)}))))},this.startMove=(t,i)=>{const e=this.eventById(i);if(!e||e.allDay||!this.editable||!1===e.editable||!1===e.startEditable)return;t.stopPropagation();const s=d(e.startMs,this.timeZone);if(this.captureDragRects(),!this.gridRect||!this.colRects.some((t=>t.d===s)))return;const o=this.minutesFromCachedY(t.clientY),n=u(e.startMs,this.timeZone);this.dragArmedId=i,this.dragMode="move",this.dragDate=s,this.dragGrabOffsetMin=o-n,this.dragDurationMin=Math.round((e.endMs-e.startMs)/6e4),this.dragStartMin=n,this.dragEndMin=n+this.dragDurationMin,this.origStartMin=n,this.origEndMin=n+this.dragDurationMin,this.origDate=s,this.dragStartPointer={x:t.clientX,y:t.clientY}},this.startResize=(t,i)=>{const e=this.eventById(i);if(!e||e.allDay||!this.editable||!1===e.editable||!1===e.durationEditable)return;t.stopPropagation();const s=d(e.startMs,this.timeZone);this.captureDragRects(),this.gridRect&&this.colRects.some((t=>t.d===s))&&(this.dragArmedId=i,this.dragMode="resize",this.dragDate=s,this.dragStartMin=u(e.startMs,this.timeZone),this.dragEndMin=u(e.endMs,this.timeZone),this.origStartMin=this.dragStartMin,this.origEndMin=this.dragEndMin,this.origDate=s,this.dragStartPointer={x:t.clientX,y:t.clientY})},this.handleKeyDown=t=>{const i=this.slotMinutes;let e=!0;switch(t.key){case"ArrowUp":this.focusMin=x(this.focusMin-i,this.minM,this.maxM-i);break;case"ArrowDown":this.focusMin=x(this.focusMin+i,this.minM,this.maxM-i);break;case"ArrowLeft":this.focusDate=this.shiftFocusDate(-1);break;case"ArrowRight":this.focusDate=this.shiftFocusDate(1);break;case"Enter":case" ":{if(!this.isDayInteractable(this.focusDate))break;const t=this.toInstant(this.focusDate,this.focusMin),i=this.toInstant(this.focusDate,Math.min(this.focusMin+this.defaultDurationMinutes,this.maxM));new Date(t).getTime()>=Date.now()&&this.coRangeSelect.emit({start:t,end:i});break}default:e=!1}e&&(t.preventDefault(),t.stopPropagation())}}componentWillLoad(){this.refreshNow(),this.focusDate=this.dates&&this.dates[0]||p(),this.focusMin=C(this.scrollTime,420)}componentDidLoad(){this.scrollToInitial(),this.nowTimer=window.setInterval((()=>this.refreshNow()),6e4),window.addEventListener("pointerup",this.onWindowPointerUp),window.addEventListener("pointermove",this.onWindowPointerMove),window.addEventListener("pointerup",this.onWindowPointerUpDrag)}disconnectedCallback(){this.nowTimer&&window.clearInterval(this.nowTimer),this.selRaf&&cancelAnimationFrame(this.selRaf),this.dragRaf&&cancelAnimationFrame(this.dragRaf),window.removeEventListener("pointerup",this.onWindowPointerUp),window.removeEventListener("pointermove",this.onWindowPointerMove),window.removeEventListener("pointerup",this.onWindowPointerUpDrag),this.bindDragViewportListeners(!1),this.hideGhost(),this.colRects=[],this.gridRect=null}async clearSelection(){this.selDate=null}onEventsChange(){this.selecting||(this.selDate=null)}refreshNow(){const t=Date.now();this.nowDay=d(t,this.timeZone),this.nowMinutes=u(t,this.timeZone)}get minM(){return C(this.minTime,0)}get maxM(){return C(this.maxTime,1440)}scrollToInitial(){var t,i,e;const s=null!==(t=this.scrollEl)&&void 0!==t?t:null===(i=this.el.shadowRoot)||void 0===i?void 0:i.querySelector(".tg__scroll"),o=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".tg__body");if(!s||!o)return;const n=w(C(this.scrollTime,420),this.minM,this.maxM);s.scrollTop=n*o.offsetHeight}visibleDates(){return this.dates.length?this.dates:[p()]}get slotM(){return this.slotMinutes>0?this.slotMinutes:15}slotCount(){return Math.max(1,Math.ceil((this.maxM-this.minM)/this.slotM))}hourList(){const t=[];for(let i=60*Math.ceil(this.minM/60);i<this.maxM;i+=60)t.push(i);return t}minutesFromPointer(t,i){const e=i.getBoundingClientRect();return this.minutesAtFraction((t-e.top)/e.height)}minutesFromCachedY(t){const i=this.gridRect;return i&&i.height?this.minutesAtFraction((t-i.top)/i.height):this.minM}minutesAtFraction(t){return x(y(this.minM+t*(this.maxM-this.minM),this.snapMinutes),this.minM,this.maxM)}captureDragRects(){const t=this.el.shadowRoot,i=null==t?void 0:t.querySelector(".tg__cols"),e=null==t?void 0:t.querySelectorAll(".tg__col");if(!i||!e||!e.length)return this.colRects=[],void(this.gridRect=null);const s=i.getBoundingClientRect();this.gridRect={top:s.top,height:s.height},this.colRects=Array.from(e).map((t=>{var i;const e=t.getBoundingClientRect();return{d:null!==(i=t.dataset.colDate)&&void 0!==i?i:"",left:e.left,right:e.right}}))}bindDragViewportListeners(t){const i=this.scrollEl;t?(null==i||i.addEventListener("scroll",this.onDragViewportChange,{passive:!0}),window.addEventListener("resize",this.onDragViewportChange)):(null==i||i.removeEventListener("scroll",this.onDragViewportChange),window.removeEventListener("resize",this.onDragViewportChange))}setInteracting(t){var i;null===(i=this.rootEl)||void 0===i||i.classList.toggle("tg--interacting",t)}toInstant(t,i){const[e,s,o]=t.split("-").map(Number),n=g({year:e,month:s,day:o,hour:Math.floor(i/60),minute:i%60,second:0},this.timeZone);return v(n)}isDayInteractable(t){return!(this.minDate&&t<this.minDate||this.maxDate&&t>this.maxDate)}finishSelection(){if(!this.selecting)return;this.selRaf&&(cancelAnimationFrame(this.selRaf),this.selRaf=0);const t=this.pendingSel;if(this.pendingSel=null,t){const i=this.minutesFromPointer(t.y,t.colEl);i!==this.selEndMin&&(this.selEndMin=i)}this.selecting=!1,this.setInteracting(!1);const i=this.selDate;let e=Math.min(this.selStartMin,this.selEndMin),s=Math.max(this.selStartMin,this.selEndMin);s-e<this.snapMinutes&&(s=e+this.defaultDurationMinutes),s=Math.min(s,this.maxM);const o=i?this.selectionRect(i,e,s):void 0;if(!i)return;const n=this.toInstant(i,e),a=this.toInstant(i,s);new Date(n).getTime()<Date.now()?this.selDate=null:(this.selStartMin=e,this.selEndMin=s,this.coRangeSelect.emit({start:n,end:a,rect:o}))}selectionRect(t,i,e){var s;const o=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector(`[data-col-date="${t}"]`);if(!o)return;const n=o.getBoundingClientRect();try{const t=w(i,this.minM,this.maxM),s=w(e,this.minM,this.maxM);return{top:n.top+t*n.height,left:n.left,width:n.width,height:(s-t)*n.height}}catch(t){return n}}eventById(t){return this.events.find((i=>i.id===t))}dateKeyAtX(t){for(const i of this.colRects)if(t>=i.left&&t<i.right)return i.d||null;return null}beginDragInteraction(){this.setInteracting(!0),this.bindDragViewportListeners(!0),this.paintGhost()}paintGhost(){const t=this.ghostEl;if(!t)return;const i=this.colRects.length,e=this.dragDate?this.colRects.findIndex((t=>t.d===this.dragDate)):-1;if(!i||e<0)return void(t.style.display="none");const s=this.maxM-this.minM||1,o=(this.dragStartMin-this.minM)/s,n=(this.dragEndMin-this.dragStartMin)/s;t.style.display="block",t.style.left=e/i*100+"%",t.style.width=`calc(${100/i}% - 2px)`,t.style.top=100*o+"%",t.style.height=100*n+"%"}hideGhost(){this.ghostEl&&(this.ghostEl.style.display="none")}trackDrag(t){if(this.dragArmedId&&!this.dragId){const i=this.dragStartPointer;if(!i)return;if(Math.hypot(t.clientX-i.x,t.clientY-i.y)<5)return;this.dragId=this.dragArmedId,this.dragArmedId=null,this.beginDragInteraction()}this.dragId&&this.dragMode&&this.dragDate&&(this.pendingDrag={x:t.clientX,y:t.clientY},this.dragRaf||(this.dragRaf=requestAnimationFrame((()=>{this.dragRaf=0;const t=this.pendingDrag;this.pendingDrag=null,t&&this.dragId&&this.dragMode&&this.dragDate&&this.applyDrag(t.x,t.y)}))))}applyDrag(t,i){var e;if(!this.dragId||!this.dragMode||!this.dragDate)return;if(!this.gridRect)return;const s=this.minutesFromCachedY(i);if("move"===this.dragMode){const i=null!==(e=this.dateKeyAtX(t))&&void 0!==e?e:this.dragDate;let o=s-this.dragGrabOffsetMin;o=x(y(o,this.snapMinutes),this.minM,this.maxM-this.dragDurationMin),this.dragDate=i,this.dragStartMin=o,this.dragEndMin=o+this.dragDurationMin}else this.dragEndMin=Math.max(this.dragStartMin+this.slotMinutes,s);this.paintGhost()}finishDrag(){if(this.dragArmedId&&!this.dragId)return this.dragArmedId=null,this.dragStartPointer=null,this.dragMode=null,this.dragDate=null,void(this.origDate=null);if(!this.dragId)return;this.dragRaf&&(cancelAnimationFrame(this.dragRaf),this.dragRaf=0);const t=this.pendingDrag;this.pendingDrag=null,t&&this.dragMode&&this.dragDate&&this.applyDrag(t.x,t.y),this.setInteracting(!1),this.bindDragViewportListeners(!1),this.hideGhost(),this.colRects=[],this.gridRect=null;const i=this.dragId,e=this.dragMode,s=this.dragDate,o=this.dragStartMin,n=this.dragEndMin,a=this.origStartMin,r=this.origEndMin,h=this.origDate;if(this.dragId=null,this.dragMode=null,this.dragDate=null,this.origDate=null,this.dragStartPointer=null,!i||!e||!s)return;const l=this.eventById(i);if(!l)return;if(!("move"===e?o!==a||s!==h:n!==r))return;const c="move"===e?this.toInstant(s,o):l.start,d=this.toInstant(s,n);new Date("move"===e?c:d).getTime()<Date.now()||this.isDayInteractable(s)&&(this.suppressNextClick=!0,setTimeout((()=>{this.suppressNextClick=!1}),0),this.coEventDrop.emit({id:i,start:c,end:d,oldStart:l.start,oldEnd:l.end,allDay:!1}))}shiftFocusDate(t){const i=this.dates.indexOf(this.focusDate)+t;return i<0||i>=this.dates.length?this.focusDate:this.dates[i]}renderSelectionGhost(){const t=Math.min(this.selStartMin,this.selEndMin),i=Math.max(this.selStartMin,this.selEndMin),e=w(t,this.minM,this.maxM),s=w(Math.max(i,t+this.snapMinutes),this.minM,this.maxM);return o("div",{class:"tg__selection",style:{top:100*e+"%",height:100*(s-e)+"%"}})}renderEventBox(t){var i;const e=t.event,s=e.endMs<=Date.now(),n=!0===(null===(i=e.extendedProps)||void 0===i?void 0:i.isExternal),r=!this.editable||!1===e.editable,h=100/t.columnCount,l={top:100*t.topFraction+"%",height:100*t.heightFraction+"%",left:t.columnIndex*h+"%",width:`calc(${h}% - 2px)`};if(e.backgroundColor){l["--co-cal-event-bg"]=e.backgroundColor;const t=a(this.rootEl,e.backgroundColor);t&&(l["--co-cal-event-text"]=t)}return o("button",{type:"button",key:`${e.id}-${t.dateKey}`,"data-event-id":e.id,"data-date":t.dateKey,class:{tg__event:!0,"tg__event--past":s,"tg__event--external":n,"tg__event--locked":r,"tg__event--dragging":this.dragId===e.id,"tg__event--tentative":"tentative"===e.responseState,"tg__event--cancelled":"cancelled"===e.responseState||"declined"===e.responseState},style:l,title:e.title,"aria-label":e.title,onClick:t=>{t.stopPropagation(),this.suppressNextClick?this.suppressNextClick=!1:this.coEventClick.emit({id:e.id,rect:t.currentTarget.getBoundingClientRect()})},onDblClick:t=>{t.stopPropagation(),this.coEventDblClick.emit({id:e.id,rect:t.currentTarget.getBoundingClientRect()})},onPointerDown:t=>{r||this.startMove(t,e.id)}},t.isStart&&o("span",{class:"tg__event-time"},function(t,i){const e=`${i}|${t}`,s=E.get(e);if(void 0!==s)return s;let o=A.get(i);o||(o=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit"}),A.set(i,o));const n=Math.floor(t/60),a=o.format(new Date(2e3,0,1,n,t%60));return E.size>2e3&&E.clear(),E.set(e,a),a}(t.startMinutes,this.locale)),o("span",{class:"tg__event-title"},e.title||"—"),n&&(K(e)?o("co-provider-logo",{provider:K(e),size:11,plated:!0,class:"tg__event-ext"}):o("co-icon",{name:"link",size:11,class:"tg__event-ext"})),t.isEnd&&!r&&!1!==e.durationEditable&&o("span",{class:"tg__event-resize",onPointerDown:t=>this.startResize(t,e.id)}))}renderAllDayBar(t,i,e){const s=e.get(t.eventId);if(!s)return null;const n={left:t.startCol/i*100+"%",width:(t.endCol-t.startCol+1)/i*100+"%",top:22*t.lane+"px"};if(s.backgroundColor){n["--co-cal-event-bg"]=s.backgroundColor;const t=a(this.rootEl,s.backgroundColor);t&&(n["--co-cal-event-text"]=t)}return o("button",{type:"button",key:s.id,"data-event-id":s.id,class:{"tg__allday-bar":!0,"tg__allday-bar--continues-before":t.continuesBefore,"tg__allday-bar--continues-after":t.continuesAfter,"tg__allday-bar--tentative":"tentative"===s.responseState,"tg__allday-bar--cancelled":"cancelled"===s.responseState||"declined"===s.responseState},style:n,title:s.title,onClick:t=>{t.stopPropagation(),this.coEventClick.emit({id:s.id,rect:t.currentTarget.getBoundingClientRect()})},onDblClick:t=>{t.stopPropagation(),this.coEventDblClick.emit({id:s.id,rect:t.currentTarget.getBoundingClientRect()})}},s.title||"—")}getLayouts(t){const i=t.join(","),e=this.layoutCache;if(e&&e.events===this.events&&e.datesKey===i&&e.tz===this.timeZone&&e.minM===this.minM&&e.maxM===this.maxM)return e;const s=function(t,i,e){const s=e.minMinutes??0,o=e.maxMinutes??1440,n=new Set(i),a={},r={},h={};for(const t of i)a[t]=[],r[t]=[],h[t]=[];for(const a of t)if(a.allDay){const t=a.start.slice(0,10),e=a.end.slice(0,10);for(const s of i)s>=t&&s<e&&r[s].push(a)}else for(const t of M(a.start,a.end,e.timeZone)){if(!n.has(t.dateKey))continue;const i=x(t.startMinutes,s,o),e=x(t.endMinutes,s,o);e<=i||h[t.dateKey].push({event:a,startMinutes:i,endMinutes:e,isStart:t.isStart&&i===t.startMinutes,isEnd:t.isEnd&&e===t.endMinutes})}for(const t of i){const i=k(h[t],(t=>t.startMinutes),(t=>t.endMinutes));a[t]=i.map((i=>{const e=w(i.event.startMinutes,s,o),n=w(i.event.endMinutes,s,o);return{event:i.event.event,dateKey:t,startMinutes:i.event.startMinutes,endMinutes:i.event.endMinutes,topFraction:e,heightFraction:n-e,columnIndex:i.columnIndex,columnCount:i.columnCount,isStart:i.event.isStart,isEnd:i.event.isEnd}}))}return{timed:a,allDay:r}}(this.events,t,{timeZone:this.timeZone,minMinutes:this.minM,maxMinutes:this.maxM}),o=function(t,i,e={}){const s=t.filter((t=>t.allDay)),o=n(s,[i],e);return{segments:o.segments.map((t=>({eventId:t.eventId,lane:t.lane,startCol:t.startCol,endCol:t.endCol,isStart:t.isStart,isEnd:t.isEnd,continuesBefore:t.continuesBefore,continuesAfter:t.continuesAfter}))),overflow:o.overflow,laneCount:o.laneCount}}(this.events,t,{timeZone:this.timeZone}),a=new Map(this.events.map((t=>[t.id,t])));return this.layoutCache={events:this.events,datesKey:i,tz:this.timeZone,minM:this.minM,maxM:this.maxM,layout:s,allDay:o,byId:a},this.layoutCache}render(){const t=this.visibleDates(),{layout:i,allDay:e,byId:s}=this.getLayouts(t),n=b(this.locale,0,"short"),a=`repeat(${t.length}, 1fr)`,r=p(),h=`calc(${this.slotCount()} * var(--co-cal-slot-h))`,l={"--co-cal-hour-h":`calc(${60/this.slotM} * var(--co-cal-slot-h))`,"--co-cal-hour-offset":`calc(${(60-this.minM%60)%60/this.slotM} * var(--co-cal-slot-h))`};return o("div",{key:"55c583abdd12ac65d8188a8f9d4f0448e4fcf5b7",class:"tg",tabIndex:0,onKeyDown:this.handleKeyDown,ref:t=>this.rootEl=t},o("div",{key:"33fa43418fdff096918441e6a2fdbf1d647980ec",class:"tg__head"},o("div",{key:"2c4134daefc3cb99aa4965787c11318be9f27d40",class:"tg__head-spacer"}),o("div",{key:"0b6c10bbfb8b91723d62f05f1387d8c0513d7b09",class:"tg__head-days",style:{gridTemplateColumns:a}},t.map((t=>{const i=m(t),e=function(t){const[i,e,s]=t.split("-").map(Number);return new Date(Date.UTC(i,e-1,s)).getUTCDay()}(t);return o("div",{class:{"tg__head-day":!0,"tg__head-day--today":0===_(t,r)}},o("span",{class:"tg__head-dow"},n[e]),o("span",{class:"tg__head-num"},i.day))})))),this.allDaySlot&&o("div",{key:"ac00b1d478138334f6b265e7e7861dc910ea778e",class:"tg__allday"},o("div",{key:"52ea789daff3b284863e90fe2356b3f1f5ed8e75",class:"tg__allday-axis"},function(t,i){if(!t)return"";const e=`${t}|${null!=i?i:""}`,s=F.get(e);if(void 0!==s)return s;const o=function(t,i){var e,s;try{const o=new Date(`${null!=i?i:"2026-01-01"}T12:00:00Z`),n=null!==(s=null===(e=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find((t=>"timeZoneName"===t.type)))||void 0===e?void 0:e.value)&&void 0!==s?s:"",a=n.match(/GMT([+-])(\d{1,2})(?::(\d{2}))?/);if(!a)return n;const r=a[2].padStart(2,"0");return a[3]?`GMT${a[1]}${r}:${a[3]}`:`GMT${a[1]}${r}`}catch(t){return""}}(t,i);return F.size>2e3&&F.clear(),F.set(e,o),o}(this.timeZone,t[0])),o("div",{key:"24e0a67773437bad42a3fb183cf55f53f2e04d0f",class:"tg__allday-lane",style:{height:22*Math.max(1,e.laneCount)+4+"px"}},e.segments.map((i=>this.renderAllDayBar(i,t.length,s))))),o("div",{key:"19ee69ba01bcd63d015acebba5001390324b1c93",class:"tg__scroll",ref:t=>this.scrollEl=t},o("div",{key:"644e0cae08a22795bfdaa802227c176e733dd418",class:"tg__body"},o("div",{key:"56a20d546083e0a0695c01a0910c80fdcaf56589",class:"tg__axis",style:{height:h}},this.hourList().map((t=>o("span",{class:"tg__axis-hour",style:{top:100*w(t,this.minM,this.maxM)+"%"}},function(t,i){const e=`${i}|${t}`,s=I.get(e);if(void 0!==s)return s;let o=S.get(i);o||(o=new Intl.DateTimeFormat(i,{hour:"numeric",hour12:!0}),S.set(i,o));const n=Math.floor(t/60),a=o.format(new Date(2e3,0,1,n,0));return I.size>2e3&&I.clear(),I.set(e,a),a}(t,this.locale))))),o("div",{key:"391004de33499561a0fdc75e3eabf401fb4e5561",class:"tg__cols",style:Object.assign({gridTemplateColumns:a,height:h},l)},t.map(((t,e)=>{var s;const n=0===_(t,r);return o("div",{class:{tg__col:!0,"tg__col--today":n},"data-col-date":t,onPointerDown:i=>this.startSelection(i,t,i.currentTarget),onPointerMove:t=>this.extendSelection(t,t.currentTarget)},this.loading?T[e%T.length].map((([t,i])=>o("div",{class:"tg__event-skeleton","aria-hidden":"true",style:{top:`${t}%`,height:`${i}%`}},o("co-skeleton",{variant:"rect",width:"100%",height:"100%"})))):(null!==(s=i.timed[t])&&void 0!==s?s:[]).map((t=>this.renderEventBox(t))),this.selDate===t&&this.renderSelectionGhost(),this.focusDate===t&&o("div",{class:"tg__focus",style:{top:100*w(this.focusMin,this.minM,this.maxM)+"%",height:100*(w(this.focusMin+this.slotMinutes,this.minM,this.maxM)-w(this.focusMin,this.minM,this.maxM))+"%"}}),this.nowIndicator&&this.nowDay===t&&this.nowMinutes>=this.minM&&this.nowMinutes<this.maxM&&o("div",{class:"tg__now",style:{top:100*w(this.nowMinutes,this.minM,this.maxM)+"%"}}))})),o("div",{class:"tg__drag-ghost",key:"tg-drag-ghost",ref:t=>this.ghostEl=t})))))}get el(){return this}static get watchers(){return{events:[{onEventsChange:0}]}}static get style(){return":host{display:flex;flex-direction:column;min-block-size:0;font-family:var(--co-font-family-primary);--co-cal-slot-h:12px;--co-cal-axis-w:56px;--co-cal-surface:var(--co-semantic-surface-page);--co-cal-border:var(--co-semantic-border-default);--co-cal-grid-line:color-mix(in srgb, var(--co-cal-border) 60%, transparent);--co-cal-text:var(--co-semantic-text-default);--co-cal-text-muted:var(--co-semantic-text-muted);--co-cal-hover:var(--co-semantic-surface-hover);--co-cal-today-ring:var(--co-color-primary-azul);--co-cal-now-color:var(--co-color-status-error, #AA2E1B);--co-cal-allday-h:28px;--co-cal-event-radius:6px;--co-cal-elevation-hover:var(--co-shadow-lg);--co-cal-event-bg:var(--co-color-primary-azul);--co-cal-event-border:transparent;--co-cal-event-text:var(--co-color-base-blanco, #fff);--co-cal-event-text-light:var(--co-color-base-blanco, #fff);--co-cal-event-text-dark:var(--co-semantic-text-default)}.tg{display:flex;flex-direction:column;min-block-size:0;border-radius:var(--co-border-radius-xs);overflow:hidden;background:var(--co-cal-surface)}.tg__head{display:grid;grid-template-columns:var(--co-cal-axis-w) 1fr;border-bottom:1px solid var(--co-cal-border)}.tg__head-spacer{border-right:1px solid var(--co-cal-border)}.tg__head-days{display:grid}.tg__head-day{display:flex;flex-direction:column;align-items:center;gap:2px;padding:var(--co-spacing-xs)}.tg__head-dow{font-size:var(--co-font-size-11, 11px);text-transform:uppercase;letter-spacing:0.04em;color:var(--co-cal-text-muted)}.tg__head-num{font-size:var(--co-font-size-20, 20px);color:var(--co-cal-text);min-width:34px;height:34px;line-height:34px;text-align:center;border-radius:var(--co-border-radius-full)}.tg__head-day--today .tg__head-dow{color:var(--co-cal-today-ring)}.tg__head-day--today .tg__head-num{background:var(--co-cal-today-ring);color:var(--co-color-base-blanco, #fff);font-weight:500}.tg__allday{display:grid;grid-template-columns:var(--co-cal-axis-w) 1fr;min-height:var(--co-cal-allday-h);border-bottom:1px solid var(--co-cal-border)}.tg__allday-axis{border-right:1px solid var(--co-cal-border);font-size:var(--co-font-size-10, 10px);color:var(--co-cal-text-muted);padding:var(--co-spacing-xxs)}.tg__allday-lane{position:relative;min-height:var(--co-cal-allday-h);padding:2px 0}.tg__allday-bar{position:absolute;height:20px;box-sizing:border-box;padding:0 var(--co-spacing-xs);border:0;border-radius:var(--co-cal-event-radius);background:var(--co-cal-event-bg);color:var(--co-cal-event-text);font:500 var(--co-font-size-11, 11px)/20px var(--co-font-family-primary);text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.tg__allday-bar:hover{box-shadow:var(--co-cal-elevation-hover);z-index:2}.tg__allday-bar--continues-before{border-top-left-radius:0;border-bottom-left-radius:0}.tg__allday-bar--continues-after{border-top-right-radius:0;border-bottom-right-radius:0}.tg__allday-bar--tentative{background-image:repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5) 0 4px, transparent 4px 8px)}.tg__allday-bar--cancelled{opacity:0.6;text-decoration:line-through}.tg__allday-bar:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.tg__scroll{flex:1 1 auto;min-block-size:0;overflow-y:auto}.tg__body{display:grid;grid-template-columns:var(--co-cal-axis-w) 1fr;position:relative}.tg__axis{border-right:1px solid var(--co-cal-border);position:relative}.tg__axis-hour{position:absolute;right:var(--co-spacing-xs);transform:translateY(-50%);font-size:var(--co-font-size-11, 11px);color:var(--co-cal-text-muted);white-space:nowrap}.tg__cols{display:grid;grid-auto-rows:100%;position:relative}.tg__col{position:relative;border-right:1px solid var(--co-cal-border);background-image:linear-gradient( to bottom, var(--co-cal-border) 0, var(--co-cal-border) 1px, transparent 1px );background-size:100% var(--co-cal-hour-h, calc(4 * var(--co-cal-slot-h)));background-position:0 var(--co-cal-hour-offset, 0px);background-repeat:repeat-y}.tg__col:last-child{border-right:0}.tg--interacting .tg__event{pointer-events:none}.tg--interacting .tg__col{contain:layout}.tg__event{position:absolute;user-select:none;-webkit-user-select:none;touch-action:none;box-sizing:border-box;border-radius:var(--co-cal-event-radius);background:var(--co-cal-event-bg);color:var(--co-cal-event-text);border:1px solid var(--co-cal-event-border);padding:2px var(--co-spacing-xs);font-size:var(--co-font-size-11, 11px);line-height:1.15;overflow:hidden;cursor:pointer;text-align:left}.tg__event-skeleton{position:absolute;inset-inline:0 2px;box-sizing:border-box;border-radius:var(--co-cal-event-radius);overflow:hidden;pointer-events:none}.tg__event-skeleton co-skeleton{display:block;block-size:100%}.tg__event:hover{box-shadow:var(--co-cal-elevation-hover);z-index:5}.tg__event--dragging:hover{box-shadow:none}.tg__event:focus-visible{outline:2px solid var(--co-semantic-border-focus);outline-offset:1px}.tg__event-time{display:block;font-variant-numeric:tabular-nums;opacity:0.85}.tg__event-title{display:block;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tg__event-ext{position:absolute;top:3px;right:3px;opacity:0.9}.tg__event--past{opacity:0.55}.tg__event--external{border-style:dashed}.tg__event--locked{cursor:default}.tg__event--dragging{opacity:0.5}.tg__event--tentative{background-image:repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5) 0 4px, transparent 4px 8px)}.tg__event--cancelled{opacity:0.6}.tg__event--cancelled .tg__event-title{text-decoration:line-through}.tg__event-resize{position:absolute;left:0;right:0;bottom:0;height:6px;cursor:ns-resize}.tg__selection{position:absolute;left:0;right:0;box-sizing:border-box;z-index:2;background:color-mix(in srgb, var(--co-cal-today-ring) 22%, transparent);border:1px solid var(--co-cal-today-ring);border-radius:var(--co-border-radius-xxs);pointer-events:none}.tg__drag-ghost{position:absolute;display:none;box-sizing:border-box;z-index:4;pointer-events:none;background:color-mix(in srgb, var(--co-cal-today-ring) 22%, transparent);border:1px solid var(--co-cal-today-ring);border-radius:var(--co-border-radius-xxs);will-change:transform}.tg__focus{position:absolute;left:0;right:0;z-index:1;pointer-events:none;box-sizing:border-box;outline:2px solid var(--co-semantic-border-focus);outline-offset:-2px;border-radius:var(--co-border-radius-xxs)}.tg__now{position:absolute;left:0;right:0;height:0;z-index:3;pointer-events:none}.tg__now::before{content:'';position:absolute;left:-4px;top:-4px;width:8px;height:8px;border-radius:50%;background:var(--co-cal-now-color)}.tg__now::after{content:'';position:absolute;left:0;right:0;top:0;border-top:2px solid var(--co-cal-now-color)}"}},[1,"co-calendar-timegrid",{events:[16],dates:[16],locale:[1],timeZone:[1,"time-zone"],editable:[4],selectable:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],slotMinutes:[2,"slot-minutes"],snapMinutes:[2,"snap-minutes"],defaultDurationMinutes:[2,"default-duration-minutes"],scrollTime:[1,"scroll-time"],nowIndicator:[4,"now-indicator"],loading:[4],allDaySlot:[4,"all-day-slot"],minTime:[1,"min-time"],maxTime:[1,"max-time"],nowMinutes:[32],nowDay:[32],focusDate:[32],focusMin:[32],selDate:[32],selStartMin:[32],selEndMin:[32],dragId:[32],clearSelection:[64]},void 0,{events:[{onEventsChange:0}]}]);function C(t,i){const e=/^(\d{1,2}):(\d{2})$/.exec(t);return e?60*Number(e[1])+Number(e[2]):i}const E=new Map,A=new Map,I=new Map,S=new Map,F=new Map,T=[[[26,8],[42,12]],[[30,14]],[[24,6],[38,9],[56,7]],[[34,11],[52,6]],[[28,9]],[[40,13],[60,8]],[[32,7],[46,10]]];function K(t){var i,e;const s=String(null!==(e=null===(i=t.extendedProps)||void 0===i?void 0:i.provider)&&void 0!==e?e:"").toLowerCase();return s.includes("google")?"google":s.includes("microsoft")||s.includes("outlook")?"microsoft":""}function j(){"undefined"!=typeof customElements&&["co-calendar-timegrid","co-icon","co-provider-logo","co-skeleton"].forEach((i=>{switch(i){case"co-calendar-timegrid":customElements.get(t(i))||customElements.define(t(i),$);break;case"co-icon":customElements.get(t(i))||r();break;case"co-provider-logo":customElements.get(t(i))||h();break;case"co-skeleton":customElements.get(t(i))||l()}}))}j();export{$ as C,j as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as t,H as c,h as i}from"./index.js";import{d as n}from"./p-
|
|
1
|
+
import{t as o,p as t,H as c,h as i}from"./index.js";import{d as n}from"./p-KK2vAKs-.js";const r=t(class extends c{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.variant="filled",this.surface="light",this.shape="rounded",this.size="md",this.disabled=!1,this.label="",this.toggled=!1,this.iconWeight="regular",this.selected=!1,this.fluid=!1,this.caret=!1}render(){var o,t;const c=null!==(o=this.iconSize)&&void 0!==o?o:null!==(t={xl:32,lg:28,md:24,sm:20,xs:16,xxs:16}[this.size])&&void 0!==t?t:24,n=null!=this.boxSize?{width:`${this.caret?this.boxSize+8:this.boxSize}px`,height:`${this.boxSize}px`,borderRadius:`var(--co-icon-button-radius, ${"square"===this.shape?"var(--co-border-radius-xs, 8px)":"var(--co-border-radius-full)"})`}:void 0,r=this.icon?n:Object.assign(Object.assign({},null!=n?n:{}),{"--co-icon-button-glyph-size":`${c}px`});return i("button",{key:"d04a7878b984d9613603801b0b18285d02e71f7e",class:{"co-icon-button":!0,[`co-icon-button--${this.variant}`]:!0,[`co-icon-button--${this.shape}`]:!0,[`co-icon-button--${this.size}`]:!0,"co-icon-button--dark":"dark"===this.surface,"co-icon-button--selected":this.selected,"co-icon-button--caret":this.caret,"co-icon-button--disabled":this.disabled},style:r,disabled:this.disabled,"aria-label":this.label||(this.toggled&&this.toggleIcon?this.toggleIcon:this.icon),"aria-pressed":this.selected?"true":void 0,part:"button"},this.icon&&this.toggleIcon?i("span",{class:{"co-icon-button__swap":!0,"co-icon-button__swap--toggled":this.toggled},"aria-hidden":"true"},i("co-icon",{name:this.icon,weight:this.iconWeight,size:c}),i("co-icon",{name:this.toggleIcon,weight:this.iconWeight,size:c})):this.icon?i("co-icon",{name:this.icon,weight:this.iconWeight,size:c}):i("slot",null),this.caret&&i("co-icon",{key:"db59eb79e6609b237ed3a642f5c44f2a046a4efe",class:"co-icon-button__caret",name:"caret-down",size:8}))}static get style(){return":host{display:inline-flex}:host([disabled]){pointer-events:none}:host([fluid]){flex:1 1 0;min-width:0}:host([fluid]) .co-icon-button{width:100%}.co-icon-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;outline:none;padding:0;flex-shrink:0;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-fast) var(--co-motion-ease-out);box-sizing:border-box;-webkit-font-smoothing:antialiased;-webkit-backdrop-filter:var(--co-icon-button-backdrop-filter, var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate))));backdrop-filter:var(--co-icon-button-backdrop-filter, var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate))))}.co-icon-button--filled{background:color-mix(in srgb, var(--co-semantic-surface-primary) 78%, transparent);color:var(--co-semantic-on-primary);border-color:color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent)}.co-icon-button--outlined{background:color-mix(in srgb, var(--co-icon-button-bg, var(--co-semantic-surface-secondary)) 55%, transparent);color:var(--co-icon-button-color, var(--co-semantic-on-secondary));border:1px solid var(--co-icon-button-border, var(--co-semantic-border-subtle))}.co-icon-button--ghost{background:transparent;color:var(--co-icon-button-color, var(--co-semantic-text-default));border:none;-webkit-backdrop-filter:none;backdrop-filter:none}.co-icon-button--ghost:hover:not(:disabled){background:var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-icon-button--soft{background:var(--co-semantic-surface-control);color:var(--co-icon-button-color, var(--co-semantic-text-default));border-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.co-icon-button--soft:hover:not(:disabled){background:color-mix(in srgb, var(--co-semantic-surface-control), var(--co-semantic-surface-hover))}.co-icon-button--dark{color:var(--co-icon-button-color, var(--co-color-base-blanco, #fff))}.co-icon-button--dark.co-icon-button--ghost:hover:not(:disabled){background:var(--co-color-opacity-blanco-16, rgba(255, 255, 255, 0.16))}.co-icon-button--selected,.co-icon-button--selected:hover:not(:disabled),.co-icon-button--dark.co-icon-button--selected:hover:not(:disabled){background:var(--co-icon-button-selected-bg, var(--co-semantic-accent));color:var(--co-icon-button-selected-color, var(--co-semantic-on-accent))}.co-icon-button--rounded.co-icon-button--xl{width:80px;height:80px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-full))}.co-icon-button--rounded.co-icon-button--lg{width:64px;height:64px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-full))}.co-icon-button--rounded.co-icon-button--md{width:56px;height:56px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-full))}.co-icon-button--rounded.co-icon-button--sm{width:48px;height:48px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-full))}.co-icon-button--rounded.co-icon-button--xs{width:32px;height:32px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-full))}.co-icon-button--rounded.co-icon-button--xxs{width:24px;height:24px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-full))}.co-icon-button--square.co-icon-button--xl{width:80px;height:80px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-xl));}.co-icon-button--square.co-icon-button--lg{width:64px;height:64px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-lg));}.co-icon-button--square.co-icon-button--md{width:56px;height:56px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-lg));}.co-icon-button--square.co-icon-button--sm{width:48px;height:48px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-sm));}.co-icon-button--square.co-icon-button--xs{width:32px;height:32px;border-radius:var(--co-icon-button-radius, var(--co-border-radius-xs));}.co-icon-button--square.co-icon-button--xxs{width:24px;height:24px;border-radius:var(--co-icon-button-radius, var(--co-spacing-sm));}::slotted(*){width:var(--co-icon-button-glyph-size);height:var(--co-icon-button-glyph-size);flex-shrink:0}.co-icon-button--caret{gap:4px}.co-icon-button--caret.co-icon-button--xl{width:calc(80px + 8px)}.co-icon-button--caret.co-icon-button--lg{width:calc(64px + 8px)}.co-icon-button--caret.co-icon-button--md{width:calc(56px + 8px)}.co-icon-button--caret.co-icon-button--sm{width:calc(48px + 8px)}.co-icon-button--caret.co-icon-button--xs{width:calc(32px + 8px)}.co-icon-button--caret.co-icon-button--xxs{width:calc(24px + 8px)}.co-icon-button--disabled,.co-icon-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-icon-button:hover:not(:disabled){opacity:0.88}.co-icon-button:focus-visible{outline:none;border-color:var(--co-semantic-border-focus);box-shadow:0 0 0 2px var(--co-semantic-border-focus)}.co-icon-button--dark:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--co-color-base-blanco, #fff) 45%, transparent)}.co-icon-button:active:not(:disabled){transform:scale(0.97);transition-duration:var(--co-motion-duration-instant)}@supports not (background: color-mix(in srgb, red, transparent)){.co-icon-button--filled{background:var(--co-semantic-surface-primary)}.co-icon-button--outlined{background:var(--co-icon-button-bg, var(--co-semantic-surface-secondary))}}.co-icon-button__swap{display:inline-grid}.co-icon-button__swap>co-icon{grid-area:1 / 1;transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-in-out), transform var(--co-motion-duration-base) var(--co-motion-ease-in-out), filter var(--co-motion-duration-base) var(--co-motion-ease-in-out)}.co-icon-button__swap>co-icon:last-child{opacity:0;transform:scale(0.25);filter:blur(var(--co-motion-blur-sm))}.co-icon-button__swap--toggled>co-icon:first-child{opacity:0;transform:scale(0.25);filter:blur(var(--co-motion-blur-sm))}.co-icon-button__swap--toggled>co-icon:last-child{opacity:1;transform:scale(1);filter:blur(0)}"}},[257,"co-icon-button",{variant:[1],surface:[1],shape:[513],size:[1],boxSize:[2,"box-size"],iconSize:[2,"icon-size"],disabled:[516],label:[1],icon:[1],toggleIcon:[1,"toggle-icon"],toggled:[4],iconWeight:[1,"icon-weight"],selected:[516],fluid:[516],caret:[4]}]);function a(){"undefined"!=typeof customElements&&["co-icon-button","co-icon"].forEach((t=>{switch(t){case"co-icon-button":customElements.get(o(t))||customElements.define(o(t),r);break;case"co-icon":customElements.get(o(t))||n()}}))}a();export{r as C,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as c,p as o,H as i,c as a,h as e}from"./index.js";import{d as r}from"./p-B3kKOgsA.js";const t=o(class extends i{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.coRemove=a(this,"coRemove",7),this.coClick=a(this,"coClick",7),this.shape="rounded",this.size="large",this.iconMode="none",this.variant="filled",this.color="default",this.iconWeight="regular",this.removable=!1,this.dot=!1,this.clickable=!1,this.disabled=!1,this.selected=!1,this.handleClick=()=>{this.disabled||this.clickable&&this.coClick.emit()},this.handleRemove=c=>{c.stopPropagation(),this.disabled||this.coRemove.emit()}}render(){const c="left"===this.iconMode||"both"===this.iconMode,o="both"===this.iconMode&&!this.removable,i="large"===this.size?16:10,a="large"===this.size?16:10,r="filter"===this.variant?13:i,t=c||!!this.iconLeft||this.dot,s=o||!!this.iconRight||this.removable||!!this.trailingIcon;let n;return n=t&&s?"both":t?"left":s?"right":"none",e(this.clickable?"button":"div",{key:"00d8eb125566907af12d288037c9b6129609857f",class:{"co-chip":!0,[`co-chip--${this.shape}`]:!0,[`co-chip--${this.size}`]:!0,[`co-chip--icon-${n}`]:!0,[`co-chip--${this.variant}`]:!0,[`co-chip--${this.color}`]:"default"!==this.color,"co-chip--clickable":this.clickable,"co-chip--disabled":this.disabled,"co-chip--selected":this.selected},part:"chip",type:this.clickable?"button":void 0,disabled:this.clickable?this.disabled:void 0,onClick:this.handleClick},this.dot&&e("span",{key:"f9df52bcd104f452ae56aaff384c434eebab7bf8",class:"co-chip__dot",part:"dot",style:this.dotColor?{color:this.dotColor}:void 0},e("co-icon",{key:"f50c4eb609c7302eb7cda669d8b560a8193aa9a0",name:"circle",size:i,weight:"fill"})),this.iconLeft&&!c&&e("span",{key:"a068106737290e16d4ffb0d2b2fdb26562f64987",class:"co-chip__icon-left",part:"icon-left"},e("co-icon",{key:"4f1631db1c7348ae0732574e01b3d5690c5a37c2",name:this.iconLeft,size:i,weight:this.iconWeight})),c&&e("span",{key:"10d132f52ad0c32f09c02d3917f3f5af689ff453",class:"co-chip__icon-left",part:"icon-left"},e("slot",{key:"0194d3829fcbd9141672d0f63e5a60ee147d154b",name:"icon-left"})),e("span",{key:"ee278a1de261e142819f8d3d32b8de45435b41b1",class:"co-chip__label"},e("slot",{key:"e28bf7aa97b05669fef495f81373064a3e061736"},this.label),null!=this.valueLabel&&""!==this.valueLabel&&e("span",{key:"2436fe42a2373a8edce158b8930bcd9f990abb04",class:"co-chip__value",part:"value"},`: ${this.valueLabel}`)),this.iconRight&&!o&&!this.removable&&e("span",{key:"84f726d0b004faff58f75a07efdc5162e0669b78",class:"co-chip__icon-right",part:"icon-right"},e("co-icon",{key:"5468eda2f54efc471bd36b1b2544088092d3c97b",name:this.iconRight,size:i,weight:this.iconWeight})),o&&e("span",{key:"d5fcdba05a10556d915b60abbb5a8bc67a663860",class:"co-chip__icon-right",part:"icon-right"},e("slot",{key:"e04de9508615a06bd232db11720d9f540ec35a0f",name:"icon-right"})),this.removable&&e("span",{key:"37fe709e4d60790707c2dc88693d4b09523d6516",class:"co-chip__remove",part:"remove",role:"button",tabIndex:this.disabled?-1:0,onClick:this.handleRemove,"aria-label":"Remove"},e("co-icon",{key:"1a9e734ebd80193f2a79a2f9a2339a17d77c7e49",name:"x-circle",size:a,weight:"fill"})),this.trailingIcon&&e("span",{key:"d9c5f717252d664f5b352944ebadf7628ee161b5",class:"co-chip__trailing",part:"trailing"},e("co-icon",{key:"3f2eee2b995c9f27ea502cf586e204ea78a81cd6",name:this.trailingIcon,size:r,weight:this.iconWeight})))}static get style(){return":host{display:inline-flex;max-width:var(--co-chip-max-width, none)}.co-chip{display:inline-flex;align-items:center;justify-content:center;font-family:var(--co-font-family-primary);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;box-sizing:border-box;-webkit-font-smoothing:antialiased;max-width:100%;overflow:hidden;border:1px solid transparent;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out);cursor:default;margin:0;padding:0}button.co-chip{cursor:pointer;outline:none}button.co-chip:focus-visible{box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.co-chip__value{color:var(--co-chip-value-color, var(--co-color-gray-500, #888888))}.co-chip--filled{background:var(--co-chip-bg, var(--co-semantic-surface-muted));color:var(--co-chip-color, var(--co-semantic-text-default));border-color:var(--co-chip-border, transparent)}.co-chip--filled.co-chip--clickable:hover:not(.co-chip--disabled){background:var(--co-color-opacity-negro-8, rgba(0, 0, 0, 0.08))}.co-chip--filled.co-chip--clickable:active:not(.co-chip--disabled){opacity:0.85}.co-chip--filled.co-chip--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary)}.co-chip--filled.co-chip--primary.co-chip--clickable:hover:not(.co-chip--disabled){background:var(--co-semantic-surface-primary);opacity:0.85}.co-chip--filled.co-chip--success{background:var(--co-semantic-status-success);color:#fff}.co-chip--filled.co-chip--error{background:var(--co-semantic-status-error);color:#fff}.co-chip--filled.co-chip--warning{background:var(--co-color-status-review);color:#fff}.co-chip--filled.co-chip--info{background:var(--co-semantic-status-info);color:#fff}.co-chip--filled.co-chip--pending{background:var(--co-color-status-pending);color:#fff}.co-chip--filled.co-chip--progress{background:var(--co-color-status-progress);color:#fff}.co-chip--filled.co-chip--review{background:var(--co-color-status-review);color:#fff}.co-chip--filled.co-chip--submitted{background:var(--co-color-status-submitted);color:#fff}.co-chip--outlined{background:transparent;color:var(--co-semantic-text-default);border-color:var(--co-semantic-border-default)}.co-chip--outlined.co-chip--clickable:hover:not(.co-chip--disabled){background:var(--co-semantic-surface-hover)}.co-chip--outlined.co-chip--clickable:active:not(.co-chip--disabled){background:var(--co-semantic-surface-muted)}.co-chip--outlined.co-chip--primary{color:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary)}.co-chip--outlined.co-chip--success{color:var(--co-semantic-status-success);border-color:var(--co-semantic-status-success)}.co-chip--outlined.co-chip--error{color:var(--co-semantic-status-error);border-color:var(--co-semantic-status-error)}.co-chip--outlined.co-chip--warning{color:var(--co-color-status-review);border-color:var(--co-color-status-review)}.co-chip--outlined.co-chip--info{color:var(--co-semantic-status-info);border-color:var(--co-semantic-status-info)}.co-chip--filled.co-chip--selected{box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.3)}.co-chip--outlined.co-chip--selected{background:var(--co-semantic-surface-muted);border-width:2px}.co-chip--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}button.co-chip--disabled{pointer-events:auto;}.co-chip--large{font-size:var(--co-font-size-12)}.co-chip--large.co-chip--icon-none{padding:var(--co-spacing-sm) var(--co-spacing-sm2);gap:0}.co-chip--large.co-chip--icon-left{padding:var(--co-spacing-xs) var(--co-spacing-sm2) var(--co-spacing-xs) var(--co-spacing-sm);gap:var(--co-spacing-sm)}.co-chip--large.co-chip--icon-right{padding:var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-sm2);gap:var(--co-spacing-sm)}.co-chip--large.co-chip--icon-both{padding:var(--co-spacing-xs);gap:var(--co-spacing-sm)}.co-chip--small{font-size:var(--co-font-size-10)}.co-chip--small.co-chip--icon-none{padding:var(--co-spacing-xs) var(--co-spacing-sm);gap:0}.co-chip--small.co-chip--icon-left{padding:var(--co-spacing-xs) var(--co-spacing-sm) var(--co-spacing-xs) var(--co-spacing-xs);gap:var(--co-spacing-xs)}.co-chip--small.co-chip--icon-right{padding:var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-sm);gap:var(--co-spacing-xs)}.co-chip--small.co-chip--icon-both{padding:var(--co-spacing-xs);gap:var(--co-spacing-xs)}.co-chip--rounded{border-radius:var(--co-border-radius-full)}.co-chip--square{border-radius:var(--co-spacing-sm)}.co-chip__icon-left,.co-chip__icon-right,.co-chip__dot,.co-chip__trailing{display:inline-flex;flex-shrink:0;align-items:center}.co-chip__trailing{color:var(--co-chip-trailing-color, currentColor)}.co-chip--large .co-chip__icon-left,.co-chip--large .co-chip__icon-right,.co-chip--large .co-chip__dot{width:16px;height:16px}.co-chip--small .co-chip__icon-left,.co-chip--small .co-chip__icon-right,.co-chip--small .co-chip__dot{width:10px;height:10px}.co-chip__remove{display:inline-flex;flex-shrink:0;align-items:center;cursor:pointer;opacity:1;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out);border:none;background:transparent;padding:0;color:inherit}.co-chip__remove:hover{opacity:0.7}.co-chip--large .co-chip__remove{width:16px;height:16px}.co-chip--small .co-chip__remove{width:10px;height:10px}::slotted(*){display:inline-flex;width:100%;height:100%}.co-chip.co-chip--filter{height:34px;padding:0 12px;gap:7px;font-size:13.5px;border-radius:var(--co-border-radius-full);background:var(--co-color-base-blanco, #fff);color:var(--co-color-base-negro, #1f1c1b);border-color:transparent;box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-16, rgba(0, 0, 0, 0.16))}.co-chip--filter .co-chip__icon-left{color:var(--co-color-gray-500, #888888)}.co-chip--filter .co-chip__trailing{color:var(--co-color-gray-400, #a0a0a0)}.co-chip--filter.co-chip--clickable:hover:not(.co-chip--disabled){box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-25, rgba(0, 0, 0, 0.25))}.co-chip--filter.co-chip--clickable:active:not(.co-chip--disabled){background:var(--co-color-gray-100, #f6f6f6)}.co-chip--filter.co-chip--selected{background:var(--co-color-gray-100, #f6f6f6)}"}},[257,"co-chip",{shape:[1],size:[1],iconMode:[1,"icon-mode"],variant:[1],color:[1],label:[1],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],iconWeight:[1,"icon-weight"],valueLabel:[1,"value-label"],trailingIcon:[1,"trailing-icon"],removable:[516],dot:[516],dotColor:[513,"dot-color"],clickable:[4],disabled:[4],selected:[1540]}]);function s(){"undefined"!=typeof customElements&&["co-chip","co-icon"].forEach((o=>{switch(o){case"co-chip":customElements.get(c(o))||customElements.define(c(o),t);break;case"co-icon":customElements.get(c(o))||r()}}))}s();export{t as C,s as d}
|
|
1
|
+
import{t as c,p as o,H as i,c as a,h as e}from"./index.js";import{d as r}from"./p-KK2vAKs-.js";const t=o(class extends i{constructor(c){super(),!1!==c&&this.__registerHost(),this.__attachShadow(),this.coRemove=a(this,"coRemove",7),this.coClick=a(this,"coClick",7),this.shape="rounded",this.size="large",this.iconMode="none",this.variant="filled",this.color="default",this.iconWeight="regular",this.removable=!1,this.dot=!1,this.clickable=!1,this.disabled=!1,this.selected=!1,this.handleClick=()=>{this.disabled||this.clickable&&this.coClick.emit()},this.handleRemove=c=>{c.stopPropagation(),this.disabled||this.coRemove.emit()}}render(){const c="left"===this.iconMode||"both"===this.iconMode,o="both"===this.iconMode&&!this.removable,i="large"===this.size?16:10,a="large"===this.size?16:10,r="filter"===this.variant?13:i,t=c||!!this.iconLeft||this.dot,s=o||!!this.iconRight||this.removable||!!this.trailingIcon;let n;return n=t&&s?"both":t?"left":s?"right":"none",e(this.clickable?"button":"div",{key:"a0fef13e5a67b2d8c1ac96576d1f75f5187c70cb",class:{"co-chip":!0,[`co-chip--${this.shape}`]:!0,[`co-chip--${this.size}`]:!0,[`co-chip--icon-${n}`]:!0,[`co-chip--${this.variant}`]:!0,[`co-chip--${this.color}`]:"default"!==this.color,"co-chip--clickable":this.clickable,"co-chip--disabled":this.disabled,"co-chip--selected":this.selected},part:"chip",type:this.clickable?"button":void 0,disabled:this.clickable?this.disabled:void 0,onClick:this.handleClick},this.dot&&e("span",{key:"cac1c98fa890bae489af9b3efb4fb3ec0a06d1ca",class:"co-chip__dot",part:"dot",style:this.dotColor?{color:this.dotColor}:void 0},e("co-icon",{key:"545dba15817d7375447a0adb1d472b2accf7b878",name:"circle",size:i,weight:"fill"})),this.iconLeft&&!c&&e("span",{key:"a54ecde8516125b1670716ebd8555d3ac6ca24be",class:"co-chip__icon-left",part:"icon-left"},e("co-icon",{key:"0e3174abeb9761a8a2abca7bbd9ebec0bd3e9dea",name:this.iconLeft,size:i,weight:this.iconWeight})),c&&e("span",{key:"cf7a72c01e63140bc22bde8d87841cbb79bb4f4a",class:"co-chip__icon-left",part:"icon-left"},e("slot",{key:"f2398a1b9bb41f1f2dc039303ec0a6b8c8ccfada",name:"icon-left"})),e("span",{key:"de70419bb5a522cd5425096f6da19752736d14b8",class:"co-chip__label"},e("slot",{key:"6bf611ee5235e60514eb2b3f37040183f7e0032c"},this.label),null!=this.valueLabel&&""!==this.valueLabel&&e("span",{key:"bc36276493cd3ff26ce131c85094125b27791028",class:"co-chip__value",part:"value"},`: ${this.valueLabel}`)),this.iconRight&&!o&&!this.removable&&e("span",{key:"8d20d206a23ed7109c5cc40b2beb278fd0e89614",class:"co-chip__icon-right",part:"icon-right"},e("co-icon",{key:"28cdb555b65fefcf3e3471aea46fe4ec0d2aad18",name:this.iconRight,size:i,weight:this.iconWeight})),o&&e("span",{key:"009206c164ae5d378481e8512fe8e63c921bb57e",class:"co-chip__icon-right",part:"icon-right"},e("slot",{key:"8397bf2f3add45386d34b61964fe6ea5ecb05f70",name:"icon-right"})),this.removable&&e("span",{key:"bb95705bdb89959b8bc64a5d692d54dcc2387e0b",class:"co-chip__remove",part:"remove",role:"button",tabIndex:this.disabled?-1:0,onClick:this.handleRemove,"aria-label":"Remove"},e("co-icon",{key:"a616ebe4d69c08be3bb908e7da1dcdd15a4c257a",name:"x-circle",size:a,weight:"fill"})),this.trailingIcon&&e("span",{key:"3302ddb23482eaeff3a4ba2de38282f423768b2c",class:"co-chip__trailing",part:"trailing"},e("co-icon",{key:"34a716149f174722d7b7a5549821a80ee7cdad63",name:this.trailingIcon,size:r,weight:this.iconWeight})))}static get style(){return":host{display:inline-flex;max-width:var(--co-chip-max-width, none)}.co-chip{display:inline-flex;align-items:center;justify-content:center;font-family:var(--co-font-family-primary);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;box-sizing:border-box;-webkit-font-smoothing:antialiased;max-width:100%;overflow:hidden;border:1px solid transparent;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out);cursor:default;margin:0;padding:0}button.co-chip{cursor:pointer;outline:none}button.co-chip:focus-visible{box-shadow:0 0 0 2px var(--co-semantic-border-focus-ring)}.co-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.co-chip__value{color:var(--co-chip-value-color, var(--co-color-gray-500, #888888))}.co-chip--filled{background:var(--co-chip-bg, var(--co-semantic-surface-muted));color:var(--co-chip-color, var(--co-semantic-text-default));border-color:var(--co-chip-border, transparent)}.co-chip--filled.co-chip--clickable:hover:not(.co-chip--disabled){background:var(--co-color-opacity-negro-8, rgba(0, 0, 0, 0.08))}.co-chip--filled.co-chip--clickable:active:not(.co-chip--disabled){opacity:0.85}.co-chip--filled.co-chip--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary)}.co-chip--filled.co-chip--primary.co-chip--clickable:hover:not(.co-chip--disabled){background:var(--co-semantic-surface-primary);opacity:0.85}.co-chip--filled.co-chip--success{background:var(--co-semantic-status-success);color:#fff}.co-chip--filled.co-chip--error{background:var(--co-semantic-status-error);color:#fff}.co-chip--filled.co-chip--warning{background:var(--co-color-status-review);color:#fff}.co-chip--filled.co-chip--info{background:var(--co-semantic-status-info);color:#fff}.co-chip--filled.co-chip--pending{background:var(--co-color-status-pending);color:#fff}.co-chip--filled.co-chip--progress{background:var(--co-color-status-progress);color:#fff}.co-chip--filled.co-chip--review{background:var(--co-color-status-review);color:#fff}.co-chip--filled.co-chip--submitted{background:var(--co-color-status-submitted);color:#fff}.co-chip--outlined{background:transparent;color:var(--co-semantic-text-default);border-color:var(--co-semantic-border-default)}.co-chip--outlined.co-chip--clickable:hover:not(.co-chip--disabled){background:var(--co-semantic-surface-hover)}.co-chip--outlined.co-chip--clickable:active:not(.co-chip--disabled){background:var(--co-semantic-surface-muted)}.co-chip--outlined.co-chip--primary{color:var(--co-semantic-surface-primary);border-color:var(--co-semantic-surface-primary)}.co-chip--outlined.co-chip--success{color:var(--co-semantic-status-success);border-color:var(--co-semantic-status-success)}.co-chip--outlined.co-chip--error{color:var(--co-semantic-status-error);border-color:var(--co-semantic-status-error)}.co-chip--outlined.co-chip--warning{color:var(--co-color-status-review);border-color:var(--co-color-status-review)}.co-chip--outlined.co-chip--info{color:var(--co-semantic-status-info);border-color:var(--co-semantic-status-info)}.co-chip--filled.co-chip--selected{box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.3)}.co-chip--outlined.co-chip--selected{background:var(--co-semantic-surface-muted);border-width:2px}.co-chip--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}button.co-chip--disabled{pointer-events:auto;}.co-chip--large{font-size:var(--co-font-size-12)}.co-chip--large.co-chip--icon-none{padding:var(--co-spacing-sm) var(--co-spacing-sm2);gap:0}.co-chip--large.co-chip--icon-left{padding:var(--co-spacing-xs) var(--co-spacing-sm2) var(--co-spacing-xs) var(--co-spacing-sm);gap:var(--co-spacing-sm)}.co-chip--large.co-chip--icon-right{padding:var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-sm2);gap:var(--co-spacing-sm)}.co-chip--large.co-chip--icon-both{padding:var(--co-spacing-xs);gap:var(--co-spacing-sm)}.co-chip--small{font-size:var(--co-font-size-10)}.co-chip--small.co-chip--icon-none{padding:var(--co-spacing-xs) var(--co-spacing-sm);gap:0}.co-chip--small.co-chip--icon-left{padding:var(--co-spacing-xs) var(--co-spacing-sm) var(--co-spacing-xs) var(--co-spacing-xs);gap:var(--co-spacing-xs)}.co-chip--small.co-chip--icon-right{padding:var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-xs) var(--co-spacing-sm);gap:var(--co-spacing-xs)}.co-chip--small.co-chip--icon-both{padding:var(--co-spacing-xs);gap:var(--co-spacing-xs)}.co-chip--rounded{border-radius:var(--co-border-radius-full)}.co-chip--square{border-radius:var(--co-spacing-sm)}.co-chip__icon-left,.co-chip__icon-right,.co-chip__dot,.co-chip__trailing{display:inline-flex;flex-shrink:0;align-items:center}.co-chip__trailing{color:var(--co-chip-trailing-color, currentColor)}.co-chip--large .co-chip__icon-left,.co-chip--large .co-chip__icon-right,.co-chip--large .co-chip__dot{width:16px;height:16px}.co-chip--small .co-chip__icon-left,.co-chip--small .co-chip__icon-right,.co-chip--small .co-chip__dot{width:10px;height:10px}.co-chip__remove{display:inline-flex;flex-shrink:0;align-items:center;cursor:pointer;opacity:1;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out);border:none;background:transparent;padding:0;color:inherit}.co-chip__remove:hover{opacity:0.7}.co-chip--large .co-chip__remove{width:16px;height:16px}.co-chip--small .co-chip__remove{width:10px;height:10px}::slotted(*){display:inline-flex;width:100%;height:100%}.co-chip.co-chip--filter{height:34px;padding:0 12px;gap:7px;font-size:13.5px;border-radius:var(--co-border-radius-full);background:var(--co-color-base-blanco, #fff);color:var(--co-color-base-negro, #1f1c1b);border-color:transparent;box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-16, rgba(0, 0, 0, 0.16))}.co-chip--filter .co-chip__icon-left{color:var(--co-color-gray-500, #888888)}.co-chip--filter .co-chip__trailing{color:var(--co-color-gray-400, #a0a0a0)}.co-chip--filter.co-chip--clickable:hover:not(.co-chip--disabled){box-shadow:inset 0 0 0 1px var(--co-color-opacity-negro-25, rgba(0, 0, 0, 0.25))}.co-chip--filter.co-chip--clickable:active:not(.co-chip--disabled){background:var(--co-color-gray-100, #f6f6f6)}.co-chip--filter.co-chip--selected{background:var(--co-color-gray-100, #f6f6f6)}"}},[257,"co-chip",{shape:[1],size:[1],iconMode:[1,"icon-mode"],variant:[1],color:[1],label:[1],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],iconWeight:[1,"icon-weight"],valueLabel:[1,"value-label"],trailingIcon:[1,"trailing-icon"],removable:[516],dot:[516],dotColor:[513,"dot-color"],clickable:[4],disabled:[4],selected:[1540]}]);function s(){"undefined"!=typeof customElements&&["co-chip","co-icon"].forEach((o=>{switch(o){case"co-chip":customElements.get(c(o))||customElements.define(c(o),t);break;case"co-icon":customElements.get(c(o))||r()}}))}s();export{t as C,s as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as t,H as e,c as o,h as s,a as r}from"./index.js";import{d as a}from"./p-B3kKOgsA.js";const n={es:{play:"Reproducir",pause:"Pausar",mute:"Silenciar",unmute:"Activar sonido",volume:"Volumen",fullscreen:"Pantalla completa",exitFullscreen:"Salir de pantalla completa",speed:"Velocidad",pip:"Imagen en imagen",exitPip:"Salir de imagen en imagen",download:"Descargar",seek:"Buscar",normal:"Normal",error:"Error al reproducir el video",retry:"Reintentar",player:"Reproductor de video"},en:{play:"Play",pause:"Pause",mute:"Mute",unmute:"Unmute",volume:"Volume",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",speed:"Speed",pip:"Picture in picture",exitPip:"Exit picture in picture",download:"Download",seek:"Seek",normal:"Normal",error:"Error playing video",retry:"Retry",player:"Video player"},pt:{play:"Reproduzir",pause:"Pausar",mute:"Silenciar",unmute:"Ativar som",volume:"Volume",fullscreen:"Tela cheia",exitFullscreen:"Sair da tela cheia",speed:"Velocidade",pip:"Imagem em imagem",exitPip:"Sair de imagem em imagem",download:"Baixar",seek:"Buscar",normal:"Normal",error:"Erro ao reproduzir o vídeo",retry:"Tentar novamente",player:"Reprodutor de vídeo"}},h={1:{es:"La carga del video fue interrumpida",en:"Video loading was aborted",pt:"O carregamento do vídeo foi interrompido"},2:{es:"Error de red al cargar el video",en:"Network error while loading video",pt:"Erro de rede ao carregar o vídeo"},3:{es:"Error al decodificar el video",en:"Error decoding video",pt:"Erro ao decodificar o vídeo"},4:{es:"Formato de video no soportado",en:"Video format not supported",pt:"Formato de vídeo não suportado"}},c=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.coPlay=o(this,"coPlay",7),this.coPause=o(this,"coPause",7),this.coEnded=o(this,"coEnded",7),this.coReady=o(this,"coReady",7),this.coError=o(this,"coError",7),this.coTimeUpdate=o(this,"coTimeUpdate",3),this.coSeeked=o(this,"coSeeked",7),this.coVolumeChange=o(this,"coVolumeChange",7),this.coFullscreenChange=o(this,"coFullscreenChange",7),this.coPlaybackRateChange=o(this,"coPlaybackRateChange",7),this.coPipChange=o(this,"coPipChange",7),this.coDownload=o(this,"coDownload",7),this.coThresholdReached=o(this,"coThresholdReached",7),this.src="",this.poster="",this.type="",this.preload="metadata",this.autoplay=!1,this.loop=!1,this.muted=!1,this.volume=1,this.currentTime=0,this.playbackRate=1,this.playbackRates="[0.5, 0.75, 1, 1.25, 1.5, 2]",this.controls=!0,this.showPlay=!0,this.showVolume=!0,this.showProgress=!0,this.showTime=!0,this.showFullscreen=!0,this.showSpeed=!1,this.showPip=!1,this.showDownload=!1,this.allowDownload=!1,this.aspectRatio="16:9",this.rounded="lg",this.controlsAutoHide=!0,this.controlsAutoHideDelay=3e3,this.disabled=!1,this.watchThreshold=0,this.locale="es",this.isPlaying=!1,this.internalCurrentTime=0,this.duration=0,this.buffered=0,this.volumeLevel=1,this.isMuted=!1,this.isFullscreen=!1,this.internalPlaybackRate=1,this.isLoading=!0,this.showControlBar=!0,this.hasError=!1,this.errorMessage="",this.showSpeedMenu=!1,this.isPip=!1,this.thresholdFired=!1,this.hasStarted=!1,this.isSeeking=!1,this.showVolumeSlider=!1,this.lastTimeUpdateEmit=0,this.parsedRates=[.5,.75,1,1.25,1.5,2],this.seekFromTime=0,this.externalTimeUpdate=!1,this.resetControlsTimer=()=>{this.controlsAutoHide&&this.controls&&(this.showControlBar=!0,this.controlsTimer&&clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout((()=>{this.isPlaying&&!this.showSpeedMenu&&(this.showControlBar=!1)}),this.controlsAutoHideDelay))},this.handleContainerMouseMove=()=>{this.resetControlsTimer()},this.handleContainerMouseLeave=()=>{this.isPlaying&&this.controlsAutoHide&&(this.showControlBar=!1,this.showSpeedMenu=!1)},this.handleContainerTouchStart=()=>{this.controlsAutoHide&&(this.showControlBar&&this.isPlaying?this.showControlBar=!1:this.resetControlsTimer())},this.onLoadedMetadata=()=>{this.videoEl&&(this.duration=this.videoEl.duration,this.hasError=!1,this.coReady.emit({duration:this.duration,width:this.videoEl.videoWidth,height:this.videoEl.videoHeight}),this.currentTime>0&&this.currentTime<this.duration&&(this.videoEl.currentTime=this.currentTime))},this.onPlay=()=>{this.isPlaying=!0,this.hasStarted=!0,this.coPlay.emit(),this.resetControlsTimer()},this.onPause=()=>{this.isPlaying=!1,this.showControlBar=!0,this.coPause.emit(),this.controlsTimer&&clearTimeout(this.controlsTimer)},this.onEnded=()=>{this.isPlaying=!1,this.showControlBar=!0,this.coEnded.emit()},this.onTimeUpdate=()=>{if(!this.videoEl||this.isSeeking)return;this.internalCurrentTime=this.videoEl.currentTime,this.externalTimeUpdate=!0,this.currentTime=this.videoEl.currentTime;const i=performance.now();if(i-this.lastTimeUpdateEmit>250){this.lastTimeUpdateEmit=i;const t=this.duration>0?Math.round(this.internalCurrentTime/this.duration*100):0;this.coTimeUpdate.emit({currentTime:this.internalCurrentTime,duration:this.duration,progressPercent:t}),this.watchThreshold>0&&!this.thresholdFired&&t>=this.watchThreshold&&(this.thresholdFired=!0,this.coThresholdReached.emit({threshold:this.watchThreshold,currentTime:this.internalCurrentTime,duration:this.duration}))}},this.onWaiting=()=>{this.isLoading=!0},this.onCanPlay=()=>{this.isLoading=!1},this.onError=()=>{var i,t;if(!(null===(i=this.videoEl)||void 0===i?void 0:i.error))return;const e=this.videoEl.error.code,o=(null===(t=h[e])||void 0===t?void 0:t[this.locale])||this.t.error;this.hasError=!0,this.errorMessage=o,this.isLoading=!1,this.coError.emit({code:e,message:o})},this.onProgress=()=>{if(!this.videoEl||this.duration<=0)return;const i=this.videoEl.buffered;i.length>0&&(this.buffered=i.end(i.length-1)/this.duration*100)},this.onNativeVolumeChange=()=>{this.videoEl&&(this.volumeLevel=this.videoEl.volume,this.isMuted=this.videoEl.muted,this.volume=this.videoEl.volume,this.muted=this.videoEl.muted,this.coVolumeChange.emit({volume:this.volumeLevel,muted:this.isMuted}))},this.onNativeRateChange=()=>{this.videoEl&&(this.internalPlaybackRate=this.videoEl.playbackRate,this.playbackRate=this.videoEl.playbackRate,this.coPlaybackRateChange.emit({rate:this.internalPlaybackRate}))},this.handlePlayClick=()=>{!this.disabled&&this.videoEl&&(this.isPlaying?this.videoEl.pause():this.videoEl.play().catch((()=>{})))},this.handleBigPlayClick=()=>{this.disabled||this.handlePlayClick()},this.handleMuteClick=()=>{!this.disabled&&this.videoEl&&(this.videoEl.muted=!this.videoEl.muted)},this.isDraggingVolume=!1,this.handleVolumeMouseEnter=()=>{this.showVolumeSlider=!0},this.handleVolumeMouseLeave=()=>{this.isDraggingVolume||(this.showVolumeSlider=!1)},this.handleProgressPointerDown=i=>{if(this.disabled||!this.videoEl)return;i.preventDefault(),this.isSeeking=!0,this.seekFromTime=this.videoEl.currentTime,this.seekFromPointerEvent(i);const t=i=>this.seekFromPointerEvent(i),e=()=>{this.videoEl&&this.coSeeked.emit({from:this.seekFromTime,to:this.videoEl.currentTime}),this.isSeeking=!1,document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",e)};document.addEventListener("pointermove",t),document.addEventListener("pointerup",e)},this.handleVolumePointerDown=i=>{if(this.disabled||!this.videoEl)return;i.preventDefault(),i.stopPropagation(),this.isDraggingVolume=!0,this.showVolumeSlider=!0,this.setVolumeFromPointerEvent(i);const t=i=>this.setVolumeFromPointerEvent(i),e=()=>{this.isDraggingVolume=!1,document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",e)};document.addEventListener("pointermove",t),document.addEventListener("pointerup",e)},this.handleSpeedClick=i=>{i.stopPropagation(),this.showSpeedMenu=!this.showSpeedMenu},this.handleSpeedSelect=i=>{!this.disabled&&this.videoEl&&(this.videoEl.playbackRate=i,this.showSpeedMenu=!1)},this.handleFullscreenClick=()=>{if(!this.disabled)if(document.fullscreenElement||document.webkitFullscreenElement)document.exitFullscreen?document.exitFullscreen().catch((()=>{})):document.webkitExitFullscreen&&document.webkitExitFullscreen();else{const i=this.el;i.requestFullscreen?i.requestFullscreen().catch((()=>{})):i.webkitRequestFullscreen?i.webkitRequestFullscreen():this.videoEl&&this.videoEl.webkitEnterFullscreen&&this.videoEl.webkitEnterFullscreen()}},this.handleFullscreenChange=()=>{const i=document.fullscreenElement||document.webkitFullscreenElement;this.isFullscreen=i===this.el,this.coFullscreenChange.emit({fullscreen:this.isFullscreen})},this.handlePipClick=async()=>{if(!this.disabled&&this.videoEl)try{this.isPip?await document.exitPictureInPicture():await this.videoEl.requestPictureInPicture()}catch(i){}},this.handleEnterPip=()=>{this.isPip=!0,this.coPipChange.emit({pip:!0})},this.handleLeavePip=()=>{this.isPip=!1,this.coPipChange.emit({pip:!1})},this.handleDownloadClick=()=>{if(!this.allowDownload||!this.src)return;this.coDownload.emit({src:this.src});const i=document.createElement("a");i.href=this.src,i.download="",i.target="_blank",i.rel="noopener",document.body.appendChild(i),i.click(),document.body.removeChild(i)},this.handleRetryClick=()=>{this.videoEl&&(this.hasError=!1,this.errorMessage="",this.isLoading=!0,this.videoEl.load())},this.handleKeyDown=i=>{var t,e;if(this.disabled||!this.videoEl)return;const o=null===(e=null===(t=i.target)||void 0===t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase();if("input"!==o&&"textarea"!==o)switch(i.key){case" ":case"k":case"K":i.preventDefault(),this.handlePlayClick();break;case"ArrowRight":i.preventDefault(),this.videoEl.currentTime=Math.min(this.duration,this.videoEl.currentTime+5);break;case"ArrowLeft":i.preventDefault(),this.videoEl.currentTime=Math.max(0,this.videoEl.currentTime-5);break;case"ArrowUp":i.preventDefault(),this.videoEl.volume=Math.min(1,this.videoEl.volume+.1);break;case"ArrowDown":i.preventDefault(),this.videoEl.volume=Math.max(0,this.videoEl.volume-.1);break;case"m":case"M":i.preventDefault(),this.handleMuteClick();break;case"f":case"F":i.preventDefault(),this.handleFullscreenClick();break;case"Escape":this.showSpeedMenu&&(i.preventDefault(),this.showSpeedMenu=!1)}},this.handleVideoAreaClick=()=>{this.disabled||(this.handlePlayClick(),this.resetControlsTimer())}}get t(){return n[this.locale]||n.es}get progressPercent(){return this.duration<=0?0:this.internalCurrentTime/this.duration*100}get pipSupported(){return"undefined"!=typeof document&&"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}onSrcChange(){this.resetState()}onMutedChange(){this.videoEl&&(this.videoEl.muted=this.muted),this.isMuted=this.muted}onVolumeChange(){const i=Math.max(0,Math.min(1,this.volume));this.videoEl&&(this.videoEl.volume=i),this.volumeLevel=i}onCurrentTimeChange(){this.externalTimeUpdate?this.externalTimeUpdate=!1:this.videoEl&&Math.abs(this.videoEl.currentTime-this.currentTime)>.5&&(this.videoEl.currentTime=this.currentTime)}onPlaybackRateChange(){this.videoEl&&(this.videoEl.playbackRate=this.playbackRate),this.internalPlaybackRate=this.playbackRate}onPlaybackRatesChange(){this.parseRates()}componentWillLoad(){var i,t;this.parseRates(),this.volumeLevel=Math.max(0,Math.min(1,null!==(i=this.volume)&&void 0!==i?i:1)),this.isMuted=null!==(t=this.muted)&&void 0!==t&&t,this.internalPlaybackRate=this.playbackRate||1}componentDidLoad(){this.videoEl&&(this.bindVideoEvents(),this.videoEl.volume=this.volumeLevel,this.videoEl.muted=this.isMuted,this.videoEl.playbackRate=this.internalPlaybackRate,this.videoEl.readyState>=1&&this.onLoadedMetadata(),this.videoEl.readyState>=3&&this.onCanPlay(),this.autoplay&&this.muted&&this.videoEl.play().catch((()=>{}))),document.addEventListener("fullscreenchange",this.handleFullscreenChange),document.addEventListener("webkitfullscreenchange",this.handleFullscreenChange)}disconnectedCallback(){this.controlsTimer&&clearTimeout(this.controlsTimer),document.removeEventListener("fullscreenchange",this.handleFullscreenChange),document.removeEventListener("webkitfullscreenchange",this.handleFullscreenChange),this.videoEl&&(this.videoEl.removeEventListener("loadedmetadata",this.onLoadedMetadata),this.videoEl.removeEventListener("play",this.onPlay),this.videoEl.removeEventListener("pause",this.onPause),this.videoEl.removeEventListener("ended",this.onEnded),this.videoEl.removeEventListener("timeupdate",this.onTimeUpdate),this.videoEl.removeEventListener("waiting",this.onWaiting),this.videoEl.removeEventListener("canplay",this.onCanPlay),this.videoEl.removeEventListener("error",this.onError),this.videoEl.removeEventListener("progress",this.onProgress),this.videoEl.removeEventListener("volumechange",this.onNativeVolumeChange),this.videoEl.removeEventListener("ratechange",this.onNativeRateChange),this.videoEl.removeEventListener("enterpictureinpicture",this.handleEnterPip),this.videoEl.removeEventListener("leavepictureinpicture",this.handleLeavePip))}async play(){var i;await(null===(i=this.videoEl)||void 0===i?void 0:i.play())}async pause(){var i;null===(i=this.videoEl)||void 0===i||i.pause()}async togglePlay(){var i,t;this.isPlaying?null===(i=this.videoEl)||void 0===i||i.pause():await(null===(t=this.videoEl)||void 0===t?void 0:t.play())}async seek(i){this.videoEl&&(this.videoEl.currentTime=i)}async setVolume(i){const t=Math.max(0,Math.min(1,i));this.volume=t,this.videoEl&&(this.videoEl.volume=t),this.volumeLevel=t}async toggleMute(){this.handleMuteClick()}async toggleFullscreen(){this.handleFullscreenClick()}async togglePip(){this.handlePipClick()}parseRates(){try{const i=JSON.parse(this.playbackRates);Array.isArray(i)&&(this.parsedRates=i.filter((i=>"number"==typeof i&&i>0)).sort(((i,t)=>i-t)))}catch(i){this.parsedRates=[.5,.75,1,1.25,1.5,2]}}resetState(){this.isPlaying=!1,this.internalCurrentTime=0,this.duration=0,this.buffered=0,this.hasError=!1,this.errorMessage="",this.thresholdFired=!1,this.hasStarted=!1,this.isLoading=!0,this.showSpeedMenu=!1}bindVideoEvents(){this.videoEl&&(this.videoEl.addEventListener("loadedmetadata",this.onLoadedMetadata),this.videoEl.addEventListener("play",this.onPlay),this.videoEl.addEventListener("pause",this.onPause),this.videoEl.addEventListener("ended",this.onEnded),this.videoEl.addEventListener("timeupdate",this.onTimeUpdate),this.videoEl.addEventListener("waiting",this.onWaiting),this.videoEl.addEventListener("canplay",this.onCanPlay),this.videoEl.addEventListener("error",this.onError),this.videoEl.addEventListener("progress",this.onProgress),this.videoEl.addEventListener("volumechange",this.onNativeVolumeChange),this.videoEl.addEventListener("ratechange",this.onNativeRateChange),this.videoEl.addEventListener("enterpictureinpicture",this.handleEnterPip),this.videoEl.addEventListener("leavepictureinpicture",this.handleLeavePip))}formatTime(i){if(!isFinite(i)||i<0)return"0:00";const t=Math.floor(i/3600),e=Math.floor(i%3600/60),o=Math.floor(i%60);return t>0?`${t}:${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${e}:${o.toString().padStart(2,"0")}`}seekFromPointerEvent(i){if(!this.progressTrackEl||!this.videoEl)return;const t=this.progressTrackEl.getBoundingClientRect(),e=Math.max(0,Math.min(1,(i.clientX-t.left)/t.width))*this.duration;this.videoEl.currentTime=e,this.internalCurrentTime=e}setVolumeFromPointerEvent(i){if(!this.volumeTrackEl||!this.videoEl)return;const t=this.volumeTrackEl.getBoundingClientRect(),e=Math.max(0,Math.min(1,(i.clientX-t.left)/t.width));this.videoEl.volume=e,e>0&&this.videoEl.muted&&(this.videoEl.muted=!1)}renderBigPlayButton(){return this.isPlaying||this.hasError||this.isLoading?null:s("button",{class:"co-video__big-play",part:"big-play",onClick:this.handleBigPlayClick,"aria-label":this.t.play,tabindex:"-1"},s("div",{class:"co-video__big-play-circle"},s("co-icon",{name:"play",size:32,weight:"fill"})))}renderPoster(){return!this.poster||this.hasStarted?null:s("div",{class:"co-video__poster",part:"poster",style:{backgroundImage:`url(${this.poster})`}})}renderLoader(){return!this.isLoading||this.hasError?null:s("div",{class:"co-video__loader"},s("div",{class:"co-video__spinner"}))}renderError(){return this.hasError?s("div",{class:"co-video__error"},s("co-icon",{name:"warning-circle",size:48,weight:"regular"}),s("p",{class:"co-video__error-text"},this.errorMessage||this.t.error),s("button",{class:"co-video__error-retry",onClick:this.handleRetryClick},s("co-icon",{name:"arrow-clockwise",size:16,weight:"bold"}),this.t.retry)):null}renderProgressBar(){if(!this.showProgress)return null;const i=this.progressPercent,t=this.buffered;return s("div",{class:"co-video__progress",part:"progress",role:"slider","aria-label":this.t.seek,"aria-valuenow":Math.round(this.internalCurrentTime),"aria-valuemin":0,"aria-valuemax":Math.round(this.duration),tabindex:0,ref:i=>this.progressTrackEl=i,onPointerDown:this.handleProgressPointerDown},s("div",{class:"co-video__progress-track"},s("div",{class:"co-video__progress-buffered",style:{width:`${t}%`}}),s("div",{class:"co-video__progress-played",style:{width:`${i}%`}})),s("div",{class:"co-video__progress-thumb",style:{left:`${i}%`}}))}renderVolumeControl(){if(!this.showVolume)return null;const i=this.isMuted?0:100*this.volumeLevel;return s("div",{class:"co-video__volume",onMouseEnter:this.handleVolumeMouseEnter,onMouseLeave:this.handleVolumeMouseLeave},s("button",{class:"co-video__btn",onClick:this.handleMuteClick,"aria-label":this.isMuted?this.t.unmute:this.t.mute},s("co-icon",{name:this.isMuted||0===this.volumeLevel?"speaker-x":this.volumeLevel<.5?"speaker-low":"speaker-high",size:20,weight:"fill"})),s("div",{class:{"co-video__volume-slider-wrap":!0,"co-video__volume-slider-wrap--visible":this.showVolumeSlider}},s("div",{class:"co-video__volume-slider",onPointerDown:this.handleVolumePointerDown,role:"slider","aria-label":this.t.volume,"aria-valuenow":Math.round(i),"aria-valuemin":0,"aria-valuemax":100},s("div",{class:"co-video__volume-track",ref:i=>this.volumeTrackEl=i},s("div",{class:"co-video__volume-fill",style:{width:`${i}%`}}),s("div",{class:"co-video__volume-thumb",style:{left:`${i}%`}})))))}renderSpeedMenu(){return this.showSpeed?s("div",{class:"co-video__speed-wrap"},s("button",{class:"co-video__btn co-video__btn--speed",onClick:this.handleSpeedClick,"aria-label":this.t.speed,"aria-haspopup":"listbox","aria-expanded":this.showSpeedMenu?"true":"false"},s("span",{class:"co-video__speed-label"},1===this.internalPlaybackRate?"1x":`${this.internalPlaybackRate}x`)),this.showSpeedMenu&&s("div",{class:"co-video__speed-menu",role:"listbox","aria-label":this.t.speed},this.parsedRates.map((i=>s("button",{class:{"co-video__speed-option":!0,"co-video__speed-option--active":i===this.internalPlaybackRate},role:"option","aria-selected":i===this.internalPlaybackRate?"true":"false",onClick:()=>this.handleSpeedSelect(i)},s("span",null,1===i?this.t.normal:`${i}x`),i===this.internalPlaybackRate&&s("co-icon",{name:"check",size:14,weight:"bold"})))))):null}renderControls(){return this.controls?s("div",{class:{"co-video__controls":!0,"co-video__controls--hidden":!this.showControlBar},part:"controls",onClick:i=>i.stopPropagation()},this.renderProgressBar(),s("div",{class:"co-video__toolbar",part:"toolbar"},s("div",{class:"co-video__toolbar-left"},this.showPlay&&s("button",{class:"co-video__btn",onClick:this.handlePlayClick,"aria-label":this.isPlaying?this.t.pause:this.t.play},s("co-icon",{name:this.isPlaying?"pause":"play",size:20,weight:"fill"})),this.renderVolumeControl(),this.showTime&&s("span",{class:"co-video__time","aria-live":"off"},this.formatTime(this.internalCurrentTime)," / ",this.formatTime(this.duration))),s("div",{class:"co-video__toolbar-right"},this.renderSpeedMenu(),this.showPip&&this.pipSupported&&s("button",{class:"co-video__btn",onClick:this.handlePipClick,"aria-label":this.isPip?this.t.exitPip:this.t.pip},s("co-icon",{name:"picture-in-picture",size:20,weight:this.isPip?"fill":"regular"})),this.showDownload&&s("button",{class:{"co-video__btn":!0,"co-video__btn--disabled":!this.allowDownload},onClick:this.handleDownloadClick,"aria-label":this.t.download,disabled:!this.allowDownload},s("co-icon",{name:"download-simple",size:20,weight:"regular"})),this.showFullscreen&&s("button",{class:"co-video__btn",onClick:this.handleFullscreenClick,"aria-label":this.isFullscreen?this.t.exitFullscreen:this.t.fullscreen},s("co-icon",{name:this.isFullscreen?"corners-in":"corners-out",size:20,weight:"regular"}))))):null}render(){const i=`co-video--${this.aspectRatio.replace(":","-")}`;return s(r,{key:"6cf0c87865e83b6022604a5bf2cfbe57832d283e"},s("div",{key:"ae2c18c38e9ffb9df78db8a562222effd5a07109",class:{"co-video":!0,[i]:!0,[`co-video--rounded-${this.rounded}`]:!0,"co-video--disabled":this.disabled,"co-video--fullscreen":this.isFullscreen,"co-video--playing":this.isPlaying},part:"container",ref:i=>this.containerEl=i,role:"region","aria-label":this.t.player,tabindex:0,onKeyDown:this.handleKeyDown,onMouseMove:this.handleContainerMouseMove,onMouseLeave:this.handleContainerMouseLeave,onTouchStart:this.handleContainerTouchStart},s("video",{key:"8b0b5dfb94c4e0c62b782aa6011d056111eea5fb",ref:i=>this.videoEl=i,class:"co-video__native",part:"video",src:this.src||void 0,poster:void 0,preload:this.preload,loop:this.loop,playsinline:!0,tabindex:-1,controlsList:this.allowDownload?void 0:"nodownload"}),this.renderPoster(),this.renderLoader(),this.renderBigPlayButton(),this.renderError(),s("div",{key:"4e010f52473dddffd6bc188a5389de17c27966b1",class:"co-video__click-area",onClick:this.handleVideoAreaClick}),this.renderControls()))}get el(){return this}static get watchers(){return{src:[{onSrcChange:0}],muted:[{onMutedChange:0}],volume:[{onVolumeChange:0}],currentTime:[{onCurrentTimeChange:0}],playbackRate:[{onPlaybackRateChange:0}],playbackRates:[{onPlaybackRatesChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);--co-video-controls-bg:linear-gradient(transparent, rgba(0, 0, 0, 0.75));--co-video-controls-color:#fff;--co-video-progress-height:4px;--co-video-progress-height-hover:8px;--co-video-accent:var(--co-color-base-blanco);--co-video-buffered:rgba(255, 255, 255, 0.25);--co-video-btn-hover:rgba(255, 255, 255, 0.16)}.co-video{position:relative;width:100%;background:#000;overflow:hidden;outline:none;user-select:none;-webkit-user-select:none}.co-video:focus-visible{outline:2px solid var(--co-semantic-border-focus-ring);outline-offset:2px}.co-video--16-9{aspect-ratio:16 / 9}.co-video--4-3{aspect-ratio:4 / 3}.co-video--1-1{aspect-ratio:1 / 1}.co-video--21-9{aspect-ratio:21 / 9}.co-video--auto{height:100%}.co-video--rounded-none{border-radius:0}.co-video--rounded-sm{border-radius:var(--co-border-radius-xs)}.co-video--rounded-md{border-radius:var(--co-border-radius-sm)}.co-video--rounded-lg{border-radius:var(--co-border-radius-lg)}.co-video--rounded-xl{border-radius:var(--co-border-radius-xl)}:host(:fullscreen){width:100%;height:100%}:host(:fullscreen) .co-video{border-radius:0 !important;aspect-ratio:unset;width:100%;height:100%}.co-video--disabled{opacity:0.5;pointer-events:none}.co-video__native{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}.co-video__click-area{position:absolute;inset:0;z-index:1;cursor:pointer}.co-video__poster{position:absolute;inset:0;z-index:1;background-size:cover;background-position:center;background-repeat:no-repeat}.co-video__loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:3;pointer-events:none}.co-video__spinner{width:40px;height:40px;border:3px solid rgba(255, 255, 255, 0.15);border-top-color:#fff;border-radius:50%;animation:co-video-spin 0.7s linear infinite}@keyframes co-video-spin{to{transform:rotate(360deg)}}.co-video__big-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;cursor:pointer;background:transparent;border:none;padding:0;color:#fff}.co-video__big-play-circle{width:72px;height:72px;border-radius:var(--co-border-radius-full);background:rgba(0, 0, 0, 0.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), background var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-video__big-play:hover .co-video__big-play-circle{transform:scale(1.1);background:rgba(0, 0, 0, 0.7)}.co-video__error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-md);z-index:4;background:rgba(0, 0, 0, 0.85);color:#fff}.co-video__error-text{font-size:var(--co-font-size-14);color:rgba(255, 255, 255, 0.7);margin:0;text-align:center;padding:0 var(--co-spacing-xl)}.co-video__error-retry{display:inline-flex;align-items:center;gap:var(--co-spacing-xs);padding:var(--co-spacing-sm2) var(--co-spacing-lg);border:1px solid rgba(255, 255, 255, 0.3);border-radius:var(--co-border-radius-full);background:transparent;color:#fff;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-video__error-retry:hover{background:rgba(255, 255, 255, 0.1);border-color:rgba(255, 255, 255, 0.5)}.co-video__controls{position:absolute;bottom:0;left:0;right:0;background:var(--co-video-controls-bg);padding:var(--co-spacing-3xl) var(--co-spacing-lg) var(--co-spacing-md);z-index:5;opacity:1;transition:opacity var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-video__controls--hidden{opacity:0;pointer-events:none}.co-video__progress{position:relative;width:100%;height:var(--co-video-progress-height);cursor:pointer;transition:height var(--co-motion-duration-fast) var(--co-motion-ease-out);margin-bottom:var(--co-spacing-sm);outline:none;touch-action:none}.co-video__progress:hover,.co-video__progress:focus-visible{height:var(--co-video-progress-height-hover)}.co-video__progress:focus-visible{outline:2px solid var(--co-semantic-border-focus-ring);outline-offset:4px;border-radius:var(--co-border-radius-full)}.co-video__progress-track{position:absolute;inset:0;background:rgba(255, 255, 255, 0.2);border-radius:var(--co-border-radius-full);overflow:hidden}.co-video__progress-buffered{position:absolute;top:0;left:0;height:100%;background:var(--co-video-buffered);border-radius:var(--co-border-radius-full);transition:width var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-video__progress-played{position:absolute;top:0;left:0;height:100%;background:var(--co-video-accent);border-radius:var(--co-border-radius-full)}.co-video__progress-thumb{position:absolute;top:50%;width:14px;height:14px;border-radius:var(--co-border-radius-full);background:var(--co-video-accent);transform:translate(-50%, -50%) scale(0);transition:transform var(--co-motion-duration-fast) var(--co-motion-ease-out);pointer-events:none}.co-video__progress:hover .co-video__progress-thumb{transform:translate(-50%, -50%) scale(1)}.co-video__toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm)}.co-video__toolbar-left,.co-video__toolbar-right{display:flex;align-items:center;gap:var(--co-spacing-sm)}.co-video__btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:transparent;color:var(--co-video-controls-color);cursor:pointer;border-radius:var(--co-border-radius-xs);padding:0;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);flex-shrink:0}.co-video__btn:hover{background:var(--co-video-btn-hover)}.co-video__btn:focus-visible{outline:2px solid #fff;outline-offset:2px}.co-video__btn--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-video__time{font-size:var(--co-font-size-12);color:var(--co-video-controls-color);white-space:nowrap;padding:0 var(--co-spacing-xs);font-variant-numeric:tabular-nums}.co-video__volume{display:flex;align-items:center;position:relative}.co-video__volume-slider-wrap{width:0;overflow:hidden;transition:width var(--co-motion-duration-base) var(--co-motion-ease-out), opacity var(--co-motion-duration-base) var(--co-motion-ease-out);opacity:0}.co-video__volume-slider-wrap--visible{width:96px;opacity:1;overflow:visible}.co-video__volume-slider{width:96px;height:20px;display:flex;align-items:center;cursor:pointer;touch-action:none;padding:0 10px}.co-video__volume-track{position:relative;width:100%;height:4px;background:rgba(255, 255, 255, 0.2);border-radius:var(--co-border-radius-full)}.co-video__volume-fill{position:absolute;top:0;left:0;height:100%;background:var(--co-video-accent);border-radius:var(--co-border-radius-full)}.co-video__volume-thumb{position:absolute;top:50%;width:12px;height:12px;border-radius:var(--co-border-radius-full);background:var(--co-video-accent);transform:translate(-50%, -50%);pointer-events:none}.co-video__speed-wrap{position:relative}.co-video__btn--speed{width:auto;padding:0 var(--co-spacing-sm)}.co-video__speed-label{font-family:var(--co-font-family-primary);font-size:var(--co-font-size-13, 13px);font-weight:500;color:var(--co-video-controls-color)}.co-video__speed-menu{position:absolute;bottom:100%;right:0;margin-bottom:var(--co-spacing-xs);background:rgba(20, 20, 20, 0.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-radius:var(--co-border-radius-sm);padding:var(--co-spacing-xs) 0;min-width:130px;box-shadow:var(--co-shadow-lg);z-index:10}.co-video__speed-option{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--co-spacing-sm) var(--co-spacing-lg);color:#fff;font-size:var(--co-font-size-14);font-family:var(--co-font-family-primary);cursor:pointer;background:transparent;border:none;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);text-align:left}.co-video__speed-option:hover{background:rgba(255, 255, 255, 0.08)}.co-video__speed-option--active{font-weight:600}@media (max-width: 480px){.co-video__volume-slider-wrap{display:none}.co-video__toolbar{gap:var(--co-spacing-xxs)}.co-video__btn{width:32px;height:32px}.co-video__big-play-circle{width:56px;height:56px}.co-video__time{font-size:var(--co-font-size-11, 11px)}.co-video__controls{padding:var(--co-spacing-2xl) var(--co-spacing-sm2) var(--co-spacing-sm)}}"}},[1,"co-video",{src:[1],poster:[1],type:[1],preload:[1],autoplay:[4],loop:[4],muted:[1028],volume:[1026],currentTime:[1026,"current-time"],playbackRate:[1026,"playback-rate"],playbackRates:[1,"playback-rates"],controls:[4],showPlay:[4,"show-play"],showVolume:[4,"show-volume"],showProgress:[4,"show-progress"],showTime:[4,"show-time"],showFullscreen:[4,"show-fullscreen"],showSpeed:[4,"show-speed"],showPip:[4,"show-pip"],showDownload:[4,"show-download"],allowDownload:[4,"allow-download"],aspectRatio:[1,"aspect-ratio"],rounded:[1],controlsAutoHide:[4,"controls-auto-hide"],controlsAutoHideDelay:[2,"controls-auto-hide-delay"],disabled:[4],watchThreshold:[2,"watch-threshold"],locale:[1],isPlaying:[32],internalCurrentTime:[32],duration:[32],buffered:[32],volumeLevel:[32],isMuted:[32],isFullscreen:[32],internalPlaybackRate:[32],isLoading:[32],showControlBar:[32],hasError:[32],errorMessage:[32],showSpeedMenu:[32],isPip:[32],thresholdFired:[32],hasStarted:[32],isSeeking:[32],showVolumeSlider:[32],play:[64],pause:[64],togglePlay:[64],seek:[64],setVolume:[64],toggleMute:[64],toggleFullscreen:[64],togglePip:[64]},void 0,{src:[{onSrcChange:0}],muted:[{onMutedChange:0}],volume:[{onVolumeChange:0}],currentTime:[{onCurrentTimeChange:0}],playbackRate:[{onPlaybackRateChange:0}],playbackRates:[{onPlaybackRatesChange:0}]}]);function d(){"undefined"!=typeof customElements&&["co-video","co-icon"].forEach((t=>{switch(t){case"co-video":customElements.get(i(t))||customElements.define(i(t),c);break;case"co-icon":customElements.get(i(t))||a()}}))}d();export{c as C,d}
|
|
1
|
+
import{t as i,p as t,H as e,c as o,h as s,a as r}from"./index.js";import{d as a}from"./p-KK2vAKs-.js";const n={es:{play:"Reproducir",pause:"Pausar",mute:"Silenciar",unmute:"Activar sonido",volume:"Volumen",fullscreen:"Pantalla completa",exitFullscreen:"Salir de pantalla completa",speed:"Velocidad",pip:"Imagen en imagen",exitPip:"Salir de imagen en imagen",download:"Descargar",seek:"Buscar",normal:"Normal",error:"Error al reproducir el video",retry:"Reintentar",player:"Reproductor de video"},en:{play:"Play",pause:"Pause",mute:"Mute",unmute:"Unmute",volume:"Volume",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",speed:"Speed",pip:"Picture in picture",exitPip:"Exit picture in picture",download:"Download",seek:"Seek",normal:"Normal",error:"Error playing video",retry:"Retry",player:"Video player"},pt:{play:"Reproduzir",pause:"Pausar",mute:"Silenciar",unmute:"Ativar som",volume:"Volume",fullscreen:"Tela cheia",exitFullscreen:"Sair da tela cheia",speed:"Velocidade",pip:"Imagem em imagem",exitPip:"Sair de imagem em imagem",download:"Baixar",seek:"Buscar",normal:"Normal",error:"Erro ao reproduzir o vídeo",retry:"Tentar novamente",player:"Reprodutor de vídeo"}},h={1:{es:"La carga del video fue interrumpida",en:"Video loading was aborted",pt:"O carregamento do vídeo foi interrompido"},2:{es:"Error de red al cargar el video",en:"Network error while loading video",pt:"Erro de rede ao carregar o vídeo"},3:{es:"Error al decodificar el video",en:"Error decoding video",pt:"Erro ao decodificar o vídeo"},4:{es:"Formato de video no soportado",en:"Video format not supported",pt:"Formato de vídeo não suportado"}},c=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.coPlay=o(this,"coPlay",7),this.coPause=o(this,"coPause",7),this.coEnded=o(this,"coEnded",7),this.coReady=o(this,"coReady",7),this.coError=o(this,"coError",7),this.coTimeUpdate=o(this,"coTimeUpdate",3),this.coSeeked=o(this,"coSeeked",7),this.coVolumeChange=o(this,"coVolumeChange",7),this.coFullscreenChange=o(this,"coFullscreenChange",7),this.coPlaybackRateChange=o(this,"coPlaybackRateChange",7),this.coPipChange=o(this,"coPipChange",7),this.coDownload=o(this,"coDownload",7),this.coThresholdReached=o(this,"coThresholdReached",7),this.src="",this.poster="",this.type="",this.preload="metadata",this.autoplay=!1,this.loop=!1,this.muted=!1,this.volume=1,this.currentTime=0,this.playbackRate=1,this.playbackRates="[0.5, 0.75, 1, 1.25, 1.5, 2]",this.controls=!0,this.showPlay=!0,this.showVolume=!0,this.showProgress=!0,this.showTime=!0,this.showFullscreen=!0,this.showSpeed=!1,this.showPip=!1,this.showDownload=!1,this.allowDownload=!1,this.aspectRatio="16:9",this.rounded="lg",this.controlsAutoHide=!0,this.controlsAutoHideDelay=3e3,this.disabled=!1,this.watchThreshold=0,this.locale="es",this.isPlaying=!1,this.internalCurrentTime=0,this.duration=0,this.buffered=0,this.volumeLevel=1,this.isMuted=!1,this.isFullscreen=!1,this.internalPlaybackRate=1,this.isLoading=!0,this.showControlBar=!0,this.hasError=!1,this.errorMessage="",this.showSpeedMenu=!1,this.isPip=!1,this.thresholdFired=!1,this.hasStarted=!1,this.isSeeking=!1,this.showVolumeSlider=!1,this.lastTimeUpdateEmit=0,this.parsedRates=[.5,.75,1,1.25,1.5,2],this.seekFromTime=0,this.externalTimeUpdate=!1,this.resetControlsTimer=()=>{this.controlsAutoHide&&this.controls&&(this.showControlBar=!0,this.controlsTimer&&clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout((()=>{this.isPlaying&&!this.showSpeedMenu&&(this.showControlBar=!1)}),this.controlsAutoHideDelay))},this.handleContainerMouseMove=()=>{this.resetControlsTimer()},this.handleContainerMouseLeave=()=>{this.isPlaying&&this.controlsAutoHide&&(this.showControlBar=!1,this.showSpeedMenu=!1)},this.handleContainerTouchStart=()=>{this.controlsAutoHide&&(this.showControlBar&&this.isPlaying?this.showControlBar=!1:this.resetControlsTimer())},this.onLoadedMetadata=()=>{this.videoEl&&(this.duration=this.videoEl.duration,this.hasError=!1,this.coReady.emit({duration:this.duration,width:this.videoEl.videoWidth,height:this.videoEl.videoHeight}),this.currentTime>0&&this.currentTime<this.duration&&(this.videoEl.currentTime=this.currentTime))},this.onPlay=()=>{this.isPlaying=!0,this.hasStarted=!0,this.coPlay.emit(),this.resetControlsTimer()},this.onPause=()=>{this.isPlaying=!1,this.showControlBar=!0,this.coPause.emit(),this.controlsTimer&&clearTimeout(this.controlsTimer)},this.onEnded=()=>{this.isPlaying=!1,this.showControlBar=!0,this.coEnded.emit()},this.onTimeUpdate=()=>{if(!this.videoEl||this.isSeeking)return;this.internalCurrentTime=this.videoEl.currentTime,this.externalTimeUpdate=!0,this.currentTime=this.videoEl.currentTime;const i=performance.now();if(i-this.lastTimeUpdateEmit>250){this.lastTimeUpdateEmit=i;const t=this.duration>0?Math.round(this.internalCurrentTime/this.duration*100):0;this.coTimeUpdate.emit({currentTime:this.internalCurrentTime,duration:this.duration,progressPercent:t}),this.watchThreshold>0&&!this.thresholdFired&&t>=this.watchThreshold&&(this.thresholdFired=!0,this.coThresholdReached.emit({threshold:this.watchThreshold,currentTime:this.internalCurrentTime,duration:this.duration}))}},this.onWaiting=()=>{this.isLoading=!0},this.onCanPlay=()=>{this.isLoading=!1},this.onError=()=>{var i,t;if(!(null===(i=this.videoEl)||void 0===i?void 0:i.error))return;const e=this.videoEl.error.code,o=(null===(t=h[e])||void 0===t?void 0:t[this.locale])||this.t.error;this.hasError=!0,this.errorMessage=o,this.isLoading=!1,this.coError.emit({code:e,message:o})},this.onProgress=()=>{if(!this.videoEl||this.duration<=0)return;const i=this.videoEl.buffered;i.length>0&&(this.buffered=i.end(i.length-1)/this.duration*100)},this.onNativeVolumeChange=()=>{this.videoEl&&(this.volumeLevel=this.videoEl.volume,this.isMuted=this.videoEl.muted,this.volume=this.videoEl.volume,this.muted=this.videoEl.muted,this.coVolumeChange.emit({volume:this.volumeLevel,muted:this.isMuted}))},this.onNativeRateChange=()=>{this.videoEl&&(this.internalPlaybackRate=this.videoEl.playbackRate,this.playbackRate=this.videoEl.playbackRate,this.coPlaybackRateChange.emit({rate:this.internalPlaybackRate}))},this.handlePlayClick=()=>{!this.disabled&&this.videoEl&&(this.isPlaying?this.videoEl.pause():this.videoEl.play().catch((()=>{})))},this.handleBigPlayClick=()=>{this.disabled||this.handlePlayClick()},this.handleMuteClick=()=>{!this.disabled&&this.videoEl&&(this.videoEl.muted=!this.videoEl.muted)},this.isDraggingVolume=!1,this.handleVolumeMouseEnter=()=>{this.showVolumeSlider=!0},this.handleVolumeMouseLeave=()=>{this.isDraggingVolume||(this.showVolumeSlider=!1)},this.handleProgressPointerDown=i=>{if(this.disabled||!this.videoEl)return;i.preventDefault(),this.isSeeking=!0,this.seekFromTime=this.videoEl.currentTime,this.seekFromPointerEvent(i);const t=i=>this.seekFromPointerEvent(i),e=()=>{this.videoEl&&this.coSeeked.emit({from:this.seekFromTime,to:this.videoEl.currentTime}),this.isSeeking=!1,document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",e)};document.addEventListener("pointermove",t),document.addEventListener("pointerup",e)},this.handleVolumePointerDown=i=>{if(this.disabled||!this.videoEl)return;i.preventDefault(),i.stopPropagation(),this.isDraggingVolume=!0,this.showVolumeSlider=!0,this.setVolumeFromPointerEvent(i);const t=i=>this.setVolumeFromPointerEvent(i),e=()=>{this.isDraggingVolume=!1,document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",e)};document.addEventListener("pointermove",t),document.addEventListener("pointerup",e)},this.handleSpeedClick=i=>{i.stopPropagation(),this.showSpeedMenu=!this.showSpeedMenu},this.handleSpeedSelect=i=>{!this.disabled&&this.videoEl&&(this.videoEl.playbackRate=i,this.showSpeedMenu=!1)},this.handleFullscreenClick=()=>{if(!this.disabled)if(document.fullscreenElement||document.webkitFullscreenElement)document.exitFullscreen?document.exitFullscreen().catch((()=>{})):document.webkitExitFullscreen&&document.webkitExitFullscreen();else{const i=this.el;i.requestFullscreen?i.requestFullscreen().catch((()=>{})):i.webkitRequestFullscreen?i.webkitRequestFullscreen():this.videoEl&&this.videoEl.webkitEnterFullscreen&&this.videoEl.webkitEnterFullscreen()}},this.handleFullscreenChange=()=>{const i=document.fullscreenElement||document.webkitFullscreenElement;this.isFullscreen=i===this.el,this.coFullscreenChange.emit({fullscreen:this.isFullscreen})},this.handlePipClick=async()=>{if(!this.disabled&&this.videoEl)try{this.isPip?await document.exitPictureInPicture():await this.videoEl.requestPictureInPicture()}catch(i){}},this.handleEnterPip=()=>{this.isPip=!0,this.coPipChange.emit({pip:!0})},this.handleLeavePip=()=>{this.isPip=!1,this.coPipChange.emit({pip:!1})},this.handleDownloadClick=()=>{if(!this.allowDownload||!this.src)return;this.coDownload.emit({src:this.src});const i=document.createElement("a");i.href=this.src,i.download="",i.target="_blank",i.rel="noopener",document.body.appendChild(i),i.click(),document.body.removeChild(i)},this.handleRetryClick=()=>{this.videoEl&&(this.hasError=!1,this.errorMessage="",this.isLoading=!0,this.videoEl.load())},this.handleKeyDown=i=>{var t,e;if(this.disabled||!this.videoEl)return;const o=null===(e=null===(t=i.target)||void 0===t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase();if("input"!==o&&"textarea"!==o)switch(i.key){case" ":case"k":case"K":i.preventDefault(),this.handlePlayClick();break;case"ArrowRight":i.preventDefault(),this.videoEl.currentTime=Math.min(this.duration,this.videoEl.currentTime+5);break;case"ArrowLeft":i.preventDefault(),this.videoEl.currentTime=Math.max(0,this.videoEl.currentTime-5);break;case"ArrowUp":i.preventDefault(),this.videoEl.volume=Math.min(1,this.videoEl.volume+.1);break;case"ArrowDown":i.preventDefault(),this.videoEl.volume=Math.max(0,this.videoEl.volume-.1);break;case"m":case"M":i.preventDefault(),this.handleMuteClick();break;case"f":case"F":i.preventDefault(),this.handleFullscreenClick();break;case"Escape":this.showSpeedMenu&&(i.preventDefault(),this.showSpeedMenu=!1)}},this.handleVideoAreaClick=()=>{this.disabled||(this.handlePlayClick(),this.resetControlsTimer())}}get t(){return n[this.locale]||n.es}get progressPercent(){return this.duration<=0?0:this.internalCurrentTime/this.duration*100}get pipSupported(){return"undefined"!=typeof document&&"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}onSrcChange(){this.resetState()}onMutedChange(){this.videoEl&&(this.videoEl.muted=this.muted),this.isMuted=this.muted}onVolumeChange(){const i=Math.max(0,Math.min(1,this.volume));this.videoEl&&(this.videoEl.volume=i),this.volumeLevel=i}onCurrentTimeChange(){this.externalTimeUpdate?this.externalTimeUpdate=!1:this.videoEl&&Math.abs(this.videoEl.currentTime-this.currentTime)>.5&&(this.videoEl.currentTime=this.currentTime)}onPlaybackRateChange(){this.videoEl&&(this.videoEl.playbackRate=this.playbackRate),this.internalPlaybackRate=this.playbackRate}onPlaybackRatesChange(){this.parseRates()}componentWillLoad(){var i,t;this.parseRates(),this.volumeLevel=Math.max(0,Math.min(1,null!==(i=this.volume)&&void 0!==i?i:1)),this.isMuted=null!==(t=this.muted)&&void 0!==t&&t,this.internalPlaybackRate=this.playbackRate||1}componentDidLoad(){this.videoEl&&(this.bindVideoEvents(),this.videoEl.volume=this.volumeLevel,this.videoEl.muted=this.isMuted,this.videoEl.playbackRate=this.internalPlaybackRate,this.videoEl.readyState>=1&&this.onLoadedMetadata(),this.videoEl.readyState>=3&&this.onCanPlay(),this.autoplay&&this.muted&&this.videoEl.play().catch((()=>{}))),document.addEventListener("fullscreenchange",this.handleFullscreenChange),document.addEventListener("webkitfullscreenchange",this.handleFullscreenChange)}disconnectedCallback(){this.controlsTimer&&clearTimeout(this.controlsTimer),document.removeEventListener("fullscreenchange",this.handleFullscreenChange),document.removeEventListener("webkitfullscreenchange",this.handleFullscreenChange),this.videoEl&&(this.videoEl.removeEventListener("loadedmetadata",this.onLoadedMetadata),this.videoEl.removeEventListener("play",this.onPlay),this.videoEl.removeEventListener("pause",this.onPause),this.videoEl.removeEventListener("ended",this.onEnded),this.videoEl.removeEventListener("timeupdate",this.onTimeUpdate),this.videoEl.removeEventListener("waiting",this.onWaiting),this.videoEl.removeEventListener("canplay",this.onCanPlay),this.videoEl.removeEventListener("error",this.onError),this.videoEl.removeEventListener("progress",this.onProgress),this.videoEl.removeEventListener("volumechange",this.onNativeVolumeChange),this.videoEl.removeEventListener("ratechange",this.onNativeRateChange),this.videoEl.removeEventListener("enterpictureinpicture",this.handleEnterPip),this.videoEl.removeEventListener("leavepictureinpicture",this.handleLeavePip))}async play(){var i;await(null===(i=this.videoEl)||void 0===i?void 0:i.play())}async pause(){var i;null===(i=this.videoEl)||void 0===i||i.pause()}async togglePlay(){var i,t;this.isPlaying?null===(i=this.videoEl)||void 0===i||i.pause():await(null===(t=this.videoEl)||void 0===t?void 0:t.play())}async seek(i){this.videoEl&&(this.videoEl.currentTime=i)}async setVolume(i){const t=Math.max(0,Math.min(1,i));this.volume=t,this.videoEl&&(this.videoEl.volume=t),this.volumeLevel=t}async toggleMute(){this.handleMuteClick()}async toggleFullscreen(){this.handleFullscreenClick()}async togglePip(){this.handlePipClick()}parseRates(){try{const i=JSON.parse(this.playbackRates);Array.isArray(i)&&(this.parsedRates=i.filter((i=>"number"==typeof i&&i>0)).sort(((i,t)=>i-t)))}catch(i){this.parsedRates=[.5,.75,1,1.25,1.5,2]}}resetState(){this.isPlaying=!1,this.internalCurrentTime=0,this.duration=0,this.buffered=0,this.hasError=!1,this.errorMessage="",this.thresholdFired=!1,this.hasStarted=!1,this.isLoading=!0,this.showSpeedMenu=!1}bindVideoEvents(){this.videoEl&&(this.videoEl.addEventListener("loadedmetadata",this.onLoadedMetadata),this.videoEl.addEventListener("play",this.onPlay),this.videoEl.addEventListener("pause",this.onPause),this.videoEl.addEventListener("ended",this.onEnded),this.videoEl.addEventListener("timeupdate",this.onTimeUpdate),this.videoEl.addEventListener("waiting",this.onWaiting),this.videoEl.addEventListener("canplay",this.onCanPlay),this.videoEl.addEventListener("error",this.onError),this.videoEl.addEventListener("progress",this.onProgress),this.videoEl.addEventListener("volumechange",this.onNativeVolumeChange),this.videoEl.addEventListener("ratechange",this.onNativeRateChange),this.videoEl.addEventListener("enterpictureinpicture",this.handleEnterPip),this.videoEl.addEventListener("leavepictureinpicture",this.handleLeavePip))}formatTime(i){if(!isFinite(i)||i<0)return"0:00";const t=Math.floor(i/3600),e=Math.floor(i%3600/60),o=Math.floor(i%60);return t>0?`${t}:${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${e}:${o.toString().padStart(2,"0")}`}seekFromPointerEvent(i){if(!this.progressTrackEl||!this.videoEl)return;const t=this.progressTrackEl.getBoundingClientRect(),e=Math.max(0,Math.min(1,(i.clientX-t.left)/t.width))*this.duration;this.videoEl.currentTime=e,this.internalCurrentTime=e}setVolumeFromPointerEvent(i){if(!this.volumeTrackEl||!this.videoEl)return;const t=this.volumeTrackEl.getBoundingClientRect(),e=Math.max(0,Math.min(1,(i.clientX-t.left)/t.width));this.videoEl.volume=e,e>0&&this.videoEl.muted&&(this.videoEl.muted=!1)}renderBigPlayButton(){return this.isPlaying||this.hasError||this.isLoading?null:s("button",{class:"co-video__big-play",part:"big-play",onClick:this.handleBigPlayClick,"aria-label":this.t.play,tabindex:"-1"},s("div",{class:"co-video__big-play-circle"},s("co-icon",{name:"play",size:32,weight:"fill"})))}renderPoster(){return!this.poster||this.hasStarted?null:s("div",{class:"co-video__poster",part:"poster",style:{backgroundImage:`url(${this.poster})`}})}renderLoader(){return!this.isLoading||this.hasError?null:s("div",{class:"co-video__loader"},s("div",{class:"co-video__spinner"}))}renderError(){return this.hasError?s("div",{class:"co-video__error"},s("co-icon",{name:"warning-circle",size:48,weight:"regular"}),s("p",{class:"co-video__error-text"},this.errorMessage||this.t.error),s("button",{class:"co-video__error-retry",onClick:this.handleRetryClick},s("co-icon",{name:"arrow-clockwise",size:16,weight:"bold"}),this.t.retry)):null}renderProgressBar(){if(!this.showProgress)return null;const i=this.progressPercent,t=this.buffered;return s("div",{class:"co-video__progress",part:"progress",role:"slider","aria-label":this.t.seek,"aria-valuenow":Math.round(this.internalCurrentTime),"aria-valuemin":0,"aria-valuemax":Math.round(this.duration),tabindex:0,ref:i=>this.progressTrackEl=i,onPointerDown:this.handleProgressPointerDown},s("div",{class:"co-video__progress-track"},s("div",{class:"co-video__progress-buffered",style:{width:`${t}%`}}),s("div",{class:"co-video__progress-played",style:{width:`${i}%`}})),s("div",{class:"co-video__progress-thumb",style:{left:`${i}%`}}))}renderVolumeControl(){if(!this.showVolume)return null;const i=this.isMuted?0:100*this.volumeLevel;return s("div",{class:"co-video__volume",onMouseEnter:this.handleVolumeMouseEnter,onMouseLeave:this.handleVolumeMouseLeave},s("button",{class:"co-video__btn",onClick:this.handleMuteClick,"aria-label":this.isMuted?this.t.unmute:this.t.mute},s("co-icon",{name:this.isMuted||0===this.volumeLevel?"speaker-x":this.volumeLevel<.5?"speaker-low":"speaker-high",size:20,weight:"fill"})),s("div",{class:{"co-video__volume-slider-wrap":!0,"co-video__volume-slider-wrap--visible":this.showVolumeSlider}},s("div",{class:"co-video__volume-slider",onPointerDown:this.handleVolumePointerDown,role:"slider","aria-label":this.t.volume,"aria-valuenow":Math.round(i),"aria-valuemin":0,"aria-valuemax":100},s("div",{class:"co-video__volume-track",ref:i=>this.volumeTrackEl=i},s("div",{class:"co-video__volume-fill",style:{width:`${i}%`}}),s("div",{class:"co-video__volume-thumb",style:{left:`${i}%`}})))))}renderSpeedMenu(){return this.showSpeed?s("div",{class:"co-video__speed-wrap"},s("button",{class:"co-video__btn co-video__btn--speed",onClick:this.handleSpeedClick,"aria-label":this.t.speed,"aria-haspopup":"listbox","aria-expanded":this.showSpeedMenu?"true":"false"},s("span",{class:"co-video__speed-label"},1===this.internalPlaybackRate?"1x":`${this.internalPlaybackRate}x`)),this.showSpeedMenu&&s("div",{class:"co-video__speed-menu",role:"listbox","aria-label":this.t.speed},this.parsedRates.map((i=>s("button",{class:{"co-video__speed-option":!0,"co-video__speed-option--active":i===this.internalPlaybackRate},role:"option","aria-selected":i===this.internalPlaybackRate?"true":"false",onClick:()=>this.handleSpeedSelect(i)},s("span",null,1===i?this.t.normal:`${i}x`),i===this.internalPlaybackRate&&s("co-icon",{name:"check",size:14,weight:"bold"})))))):null}renderControls(){return this.controls?s("div",{class:{"co-video__controls":!0,"co-video__controls--hidden":!this.showControlBar},part:"controls",onClick:i=>i.stopPropagation()},this.renderProgressBar(),s("div",{class:"co-video__toolbar",part:"toolbar"},s("div",{class:"co-video__toolbar-left"},this.showPlay&&s("button",{class:"co-video__btn",onClick:this.handlePlayClick,"aria-label":this.isPlaying?this.t.pause:this.t.play},s("co-icon",{name:this.isPlaying?"pause":"play",size:20,weight:"fill"})),this.renderVolumeControl(),this.showTime&&s("span",{class:"co-video__time","aria-live":"off"},this.formatTime(this.internalCurrentTime)," / ",this.formatTime(this.duration))),s("div",{class:"co-video__toolbar-right"},this.renderSpeedMenu(),this.showPip&&this.pipSupported&&s("button",{class:"co-video__btn",onClick:this.handlePipClick,"aria-label":this.isPip?this.t.exitPip:this.t.pip},s("co-icon",{name:"picture-in-picture",size:20,weight:this.isPip?"fill":"regular"})),this.showDownload&&s("button",{class:{"co-video__btn":!0,"co-video__btn--disabled":!this.allowDownload},onClick:this.handleDownloadClick,"aria-label":this.t.download,disabled:!this.allowDownload},s("co-icon",{name:"download-simple",size:20,weight:"regular"})),this.showFullscreen&&s("button",{class:"co-video__btn",onClick:this.handleFullscreenClick,"aria-label":this.isFullscreen?this.t.exitFullscreen:this.t.fullscreen},s("co-icon",{name:this.isFullscreen?"corners-in":"corners-out",size:20,weight:"regular"}))))):null}render(){const i=`co-video--${this.aspectRatio.replace(":","-")}`;return s(r,{key:"d2f25697003337a41f2c6ac1f8b52b82c8341731"},s("div",{key:"b656b85d82072035f31358820db8c61a2db4cbbc",class:{"co-video":!0,[i]:!0,[`co-video--rounded-${this.rounded}`]:!0,"co-video--disabled":this.disabled,"co-video--fullscreen":this.isFullscreen,"co-video--playing":this.isPlaying},part:"container",ref:i=>this.containerEl=i,role:"region","aria-label":this.t.player,tabindex:0,onKeyDown:this.handleKeyDown,onMouseMove:this.handleContainerMouseMove,onMouseLeave:this.handleContainerMouseLeave,onTouchStart:this.handleContainerTouchStart},s("video",{key:"960e58a18058da5840fdbbdaf32a01afd1db06f9",ref:i=>this.videoEl=i,class:"co-video__native",part:"video",src:this.src||void 0,poster:void 0,preload:this.preload,loop:this.loop,playsinline:!0,tabindex:-1,controlsList:this.allowDownload?void 0:"nodownload"}),this.renderPoster(),this.renderLoader(),this.renderBigPlayButton(),this.renderError(),s("div",{key:"4a772011fe579f90d3befe3ad925026835cece73",class:"co-video__click-area",onClick:this.handleVideoAreaClick}),this.renderControls()))}get el(){return this}static get watchers(){return{src:[{onSrcChange:0}],muted:[{onMutedChange:0}],volume:[{onVolumeChange:0}],currentTime:[{onCurrentTimeChange:0}],playbackRate:[{onPlaybackRateChange:0}],playbackRates:[{onPlaybackRatesChange:0}]}}static get style(){return":host{display:block;font-family:var(--co-font-family-primary);--co-video-controls-bg:linear-gradient(transparent, rgba(0, 0, 0, 0.75));--co-video-controls-color:#fff;--co-video-progress-height:4px;--co-video-progress-height-hover:8px;--co-video-accent:var(--co-color-base-blanco);--co-video-buffered:rgba(255, 255, 255, 0.25);--co-video-btn-hover:rgba(255, 255, 255, 0.16)}.co-video{position:relative;width:100%;background:#000;overflow:hidden;outline:none;user-select:none;-webkit-user-select:none}.co-video:focus-visible{outline:2px solid var(--co-semantic-border-focus-ring);outline-offset:2px}.co-video--16-9{aspect-ratio:16 / 9}.co-video--4-3{aspect-ratio:4 / 3}.co-video--1-1{aspect-ratio:1 / 1}.co-video--21-9{aspect-ratio:21 / 9}.co-video--auto{height:100%}.co-video--rounded-none{border-radius:0}.co-video--rounded-sm{border-radius:var(--co-border-radius-xs)}.co-video--rounded-md{border-radius:var(--co-border-radius-sm)}.co-video--rounded-lg{border-radius:var(--co-border-radius-lg)}.co-video--rounded-xl{border-radius:var(--co-border-radius-xl)}:host(:fullscreen){width:100%;height:100%}:host(:fullscreen) .co-video{border-radius:0 !important;aspect-ratio:unset;width:100%;height:100%}.co-video--disabled{opacity:0.5;pointer-events:none}.co-video__native{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}.co-video__click-area{position:absolute;inset:0;z-index:1;cursor:pointer}.co-video__poster{position:absolute;inset:0;z-index:1;background-size:cover;background-position:center;background-repeat:no-repeat}.co-video__loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:3;pointer-events:none}.co-video__spinner{width:40px;height:40px;border:3px solid rgba(255, 255, 255, 0.15);border-top-color:#fff;border-radius:50%;animation:co-video-spin 0.7s linear infinite}@keyframes co-video-spin{to{transform:rotate(360deg)}}.co-video__big-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;cursor:pointer;background:transparent;border:none;padding:0;color:#fff}.co-video__big-play-circle{width:72px;height:72px;border-radius:var(--co-border-radius-full);background:rgba(0, 0, 0, 0.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), background var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-video__big-play:hover .co-video__big-play-circle{transform:scale(1.1);background:rgba(0, 0, 0, 0.7)}.co-video__error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--co-spacing-md);z-index:4;background:rgba(0, 0, 0, 0.85);color:#fff}.co-video__error-text{font-size:var(--co-font-size-14);color:rgba(255, 255, 255, 0.7);margin:0;text-align:center;padding:0 var(--co-spacing-xl)}.co-video__error-retry{display:inline-flex;align-items:center;gap:var(--co-spacing-xs);padding:var(--co-spacing-sm2) var(--co-spacing-lg);border:1px solid rgba(255, 255, 255, 0.3);border-radius:var(--co-border-radius-full);background:transparent;color:#fff;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);cursor:pointer;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), border-color var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-video__error-retry:hover{background:rgba(255, 255, 255, 0.1);border-color:rgba(255, 255, 255, 0.5)}.co-video__controls{position:absolute;bottom:0;left:0;right:0;background:var(--co-video-controls-bg);padding:var(--co-spacing-3xl) var(--co-spacing-lg) var(--co-spacing-md);z-index:5;opacity:1;transition:opacity var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-video__controls--hidden{opacity:0;pointer-events:none}.co-video__progress{position:relative;width:100%;height:var(--co-video-progress-height);cursor:pointer;transition:height var(--co-motion-duration-fast) var(--co-motion-ease-out);margin-bottom:var(--co-spacing-sm);outline:none;touch-action:none}.co-video__progress:hover,.co-video__progress:focus-visible{height:var(--co-video-progress-height-hover)}.co-video__progress:focus-visible{outline:2px solid var(--co-semantic-border-focus-ring);outline-offset:4px;border-radius:var(--co-border-radius-full)}.co-video__progress-track{position:absolute;inset:0;background:rgba(255, 255, 255, 0.2);border-radius:var(--co-border-radius-full);overflow:hidden}.co-video__progress-buffered{position:absolute;top:0;left:0;height:100%;background:var(--co-video-buffered);border-radius:var(--co-border-radius-full);transition:width var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-video__progress-played{position:absolute;top:0;left:0;height:100%;background:var(--co-video-accent);border-radius:var(--co-border-radius-full)}.co-video__progress-thumb{position:absolute;top:50%;width:14px;height:14px;border-radius:var(--co-border-radius-full);background:var(--co-video-accent);transform:translate(-50%, -50%) scale(0);transition:transform var(--co-motion-duration-fast) var(--co-motion-ease-out);pointer-events:none}.co-video__progress:hover .co-video__progress-thumb{transform:translate(-50%, -50%) scale(1)}.co-video__toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm)}.co-video__toolbar-left,.co-video__toolbar-right{display:flex;align-items:center;gap:var(--co-spacing-sm)}.co-video__btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:transparent;color:var(--co-video-controls-color);cursor:pointer;border-radius:var(--co-border-radius-xs);padding:0;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);flex-shrink:0}.co-video__btn:hover{background:var(--co-video-btn-hover)}.co-video__btn:focus-visible{outline:2px solid #fff;outline-offset:2px}.co-video__btn--disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-video__time{font-size:var(--co-font-size-12);color:var(--co-video-controls-color);white-space:nowrap;padding:0 var(--co-spacing-xs);font-variant-numeric:tabular-nums}.co-video__volume{display:flex;align-items:center;position:relative}.co-video__volume-slider-wrap{width:0;overflow:hidden;transition:width var(--co-motion-duration-base) var(--co-motion-ease-out), opacity var(--co-motion-duration-base) var(--co-motion-ease-out);opacity:0}.co-video__volume-slider-wrap--visible{width:96px;opacity:1;overflow:visible}.co-video__volume-slider{width:96px;height:20px;display:flex;align-items:center;cursor:pointer;touch-action:none;padding:0 10px}.co-video__volume-track{position:relative;width:100%;height:4px;background:rgba(255, 255, 255, 0.2);border-radius:var(--co-border-radius-full)}.co-video__volume-fill{position:absolute;top:0;left:0;height:100%;background:var(--co-video-accent);border-radius:var(--co-border-radius-full)}.co-video__volume-thumb{position:absolute;top:50%;width:12px;height:12px;border-radius:var(--co-border-radius-full);background:var(--co-video-accent);transform:translate(-50%, -50%);pointer-events:none}.co-video__speed-wrap{position:relative}.co-video__btn--speed{width:auto;padding:0 var(--co-spacing-sm)}.co-video__speed-label{font-family:var(--co-font-family-primary);font-size:var(--co-font-size-13, 13px);font-weight:500;color:var(--co-video-controls-color)}.co-video__speed-menu{position:absolute;bottom:100%;right:0;margin-bottom:var(--co-spacing-xs);background:rgba(20, 20, 20, 0.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-radius:var(--co-border-radius-sm);padding:var(--co-spacing-xs) 0;min-width:130px;box-shadow:var(--co-shadow-lg);z-index:10}.co-video__speed-option{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--co-spacing-sm) var(--co-spacing-lg);color:#fff;font-size:var(--co-font-size-14);font-family:var(--co-font-family-primary);cursor:pointer;background:transparent;border:none;transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);text-align:left}.co-video__speed-option:hover{background:rgba(255, 255, 255, 0.08)}.co-video__speed-option--active{font-weight:600}@media (max-width: 480px){.co-video__volume-slider-wrap{display:none}.co-video__toolbar{gap:var(--co-spacing-xxs)}.co-video__btn{width:32px;height:32px}.co-video__big-play-circle{width:56px;height:56px}.co-video__time{font-size:var(--co-font-size-11, 11px)}.co-video__controls{padding:var(--co-spacing-2xl) var(--co-spacing-sm2) var(--co-spacing-sm)}}"}},[1,"co-video",{src:[1],poster:[1],type:[1],preload:[1],autoplay:[4],loop:[4],muted:[1028],volume:[1026],currentTime:[1026,"current-time"],playbackRate:[1026,"playback-rate"],playbackRates:[1,"playback-rates"],controls:[4],showPlay:[4,"show-play"],showVolume:[4,"show-volume"],showProgress:[4,"show-progress"],showTime:[4,"show-time"],showFullscreen:[4,"show-fullscreen"],showSpeed:[4,"show-speed"],showPip:[4,"show-pip"],showDownload:[4,"show-download"],allowDownload:[4,"allow-download"],aspectRatio:[1,"aspect-ratio"],rounded:[1],controlsAutoHide:[4,"controls-auto-hide"],controlsAutoHideDelay:[2,"controls-auto-hide-delay"],disabled:[4],watchThreshold:[2,"watch-threshold"],locale:[1],isPlaying:[32],internalCurrentTime:[32],duration:[32],buffered:[32],volumeLevel:[32],isMuted:[32],isFullscreen:[32],internalPlaybackRate:[32],isLoading:[32],showControlBar:[32],hasError:[32],errorMessage:[32],showSpeedMenu:[32],isPip:[32],thresholdFired:[32],hasStarted:[32],isSeeking:[32],showVolumeSlider:[32],play:[64],pause:[64],togglePlay:[64],seek:[64],setVolume:[64],toggleMute:[64],toggleFullscreen:[64],togglePip:[64]},void 0,{src:[{onSrcChange:0}],muted:[{onMutedChange:0}],volume:[{onVolumeChange:0}],currentTime:[{onCurrentTimeChange:0}],playbackRate:[{onPlaybackRateChange:0}],playbackRates:[{onPlaybackRatesChange:0}]}]);function d(){"undefined"!=typeof customElements&&["co-video","co-icon"].forEach((t=>{switch(t){case"co-video":customElements.get(i(t))||customElements.define(i(t),c);break;case"co-icon":customElements.get(i(t))||a()}}))}d();export{c as C,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as t,H as r,h as a}from"./index.js";import{d as c}from"./p-
|
|
1
|
+
import{t as o,p as t,H as r,h as a}from"./index.js";import{d as c}from"./p-KK2vAKs-.js";const n={l:20,m:18,s:16,xs:14,sm:16},s=t(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.variant="primary",this.shape="rounded",this.size="m",this.fullWidth=!1,this.elevated=!1,this.surface="light",this.disabled=!1,this.iconWeight="regular",this.type="button",this.handleClick=()=>{if(!this.disabled){if("submit"===this.type){const o=this.el.closest("form");if(o)return void o.requestSubmit()}if("reset"===this.type){const o=this.el.closest("form");o&&o.reset()}}}}render(){var o,t;const r=null!==(t=null!==(o=this.iconSize)&&void 0!==o?o:n[this.size])&&void 0!==t?t:18,c={};return this.color&&(c.background=this.color),this.textColor&&(c.color=this.textColor),a("button",{key:"e77a3b67e23b2690a818e6ad9aa38b21b4c8f972",class:{"co-button":!0,[`co-button--${this.variant}`]:!0,[`co-button--${this.shape}`]:!0,[`co-button--${this.size}`]:!0,[`co-button--surface-${this.surface}`]:!0,"co-button--elevated":this.elevated,"co-button--disabled":this.disabled},style:Object.keys(c).length?c:void 0,type:this.type,disabled:this.disabled,"aria-label":this.ariaLabelText||void 0,onClick:this.handleClick,part:"button"},this.iconLeft?a("co-icon",{name:this.iconLeft,weight:this.iconWeight,size:r}):null,a("slot",{key:"ee52eb057c04ee3e1f5a5b2e87dc778a338d9887"},this.label),this.iconRight?a("co-icon",{name:this.iconRight,weight:this.iconWeight,size:r}):null)}get el(){return this}static get style(){return':host{display:inline-flex}:host([disabled]){pointer-events:none}.co-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;outline:none;font-family:var(--co-font-family-primary);font-weight:400;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);white-space:nowrap;-webkit-font-smoothing:antialiased;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-fast) var(--co-motion-ease-out);box-sizing:border-box;-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-button--primary{background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);border-color:var(--co-button-border-color, color-mix(in srgb, var(--co-semantic-on-primary) 28%, transparent))}.co-button--secondary{background:color-mix(in srgb, var(--co-button-bg, var(--co-semantic-surface-secondary)) 55%, transparent);color:var(--co-button-color, var(--co-semantic-on-secondary));border-color:var(--co-button-border-color, var(--co-button-border, var(--co-semantic-border-subtle)))}.co-button--stroke{background:color-mix(in srgb, var(--co-semantic-surface-secondary) 25%, transparent);color:var(--co-semantic-text-default);border-color:var(--co-button-border-color, var(--co-semantic-border-default))}.co-button--ghost{background:transparent;color:var(--co-semantic-text-default);border-color:var(--co-button-border-color, transparent);-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger{background:var(--co-semantic-status-error);color:var(--co-color-base-blanco);border-color:var(--co-button-border-color, transparent)}.co-button--success{background:var(--co-semantic-status-success);color:var(--co-color-base-blanco);border-color:var(--co-button-border-color, transparent)}.co-button--rounded.co-button--l{padding:var(--co-spacing-xl) var(--co-spacing-2xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--m{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-16);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--s{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-14);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--rounded.co-button--xs{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-12);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--square.co-button--l{padding:var(--co-spacing-lg) var(--co-spacing-xl);gap:var(--co-spacing-md);font-size:var(--co-font-size-18);border-radius:var(--co-border-radius-lg)}.co-button--square.co-button--m{padding:var(--co-spacing-md) var(--co-spacing-lg);gap:var(--co-spacing-sm2);font-size:var(--co-font-size-16);border-radius:var(--co-border-radius-sm)}.co-button--square.co-button--s{padding:var(--co-spacing-sm2) var(--co-spacing-md);gap:var(--co-spacing-sm);font-size:var(--co-font-size-14);border-radius:var(--co-border-radius-xs)}.co-button--square.co-button--xs{padding:var(--co-spacing-sm) var(--co-spacing-sm2);gap:var(--co-spacing-xs);font-size:var(--co-font-size-12);border-radius:var(--co-spacing-sm)}.co-button--disabled,.co-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.co-button--primary:hover:not(:disabled){opacity:0.88}.co-button--secondary:hover:not(:disabled),.co-button--stroke:hover:not(:disabled){background:var(--co-semantic-surface-hover)}.co-button--ghost:hover:not(:disabled){background:color-mix(in srgb, var(--co-semantic-surface-hover) 60%, transparent);-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-button--danger:hover:not(:disabled),.co-button--success:hover:not(:disabled){opacity:0.88}.co-button:active:not(:disabled){transform:scale(0.97);transition-duration:var(--co-motion-duration-instant)}.co-button--primary{transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out), background var(--co-motion-duration-fast) var(--co-motion-ease-out), transform var(--co-motion-duration-slow) var(--co-motion-ease-spring)}.co-button--secondary.co-button--elevated{box-shadow:var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)), inset 0 0 0 1px var(--co-color-opacity-negro-8)}.co-button--ghost.co-button--surface-dark,.co-button--stroke.co-button--surface-dark{color:var(--co-color-base-blanco, #fff)}.co-button--ghost.co-button--surface-dark:hover:not(:disabled),.co-button--stroke.co-button--surface-dark:hover:not(:disabled){background:var(--co-color-opacity-blanco-16);-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--danger.co-button--surface-dark:hover:not(:disabled){opacity:1;background:color-mix(in srgb, var(--co-semantic-status-error) 84%, var(--co-color-base-blanco, #fff))}.co-button--danger.co-button--surface-dark:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--co-color-base-blanco, #fff) 45%, transparent)}::slotted([slot="icon-left"]),::slotted([slot="icon-right"]){display:inline-flex;flex-shrink:0}.co-button>co-icon{margin-block:-1px}@supports not (background: color-mix(in srgb, red, transparent)){.co-button--primary{background:var(--co-semantic-surface-primary)}.co-button--secondary{background:var(--co-semantic-surface-secondary)}.co-button--stroke{background:transparent}}.co-button--soft{background:var(--co-semantic-surface-control);color:var(--co-semantic-text-default);border-color:var(--co-button-border-color, transparent);-webkit-backdrop-filter:none;backdrop-filter:none}.co-button--soft:hover:not(:disabled){background:color-mix(in srgb, var(--co-semantic-surface-control), var(--co-semantic-surface-hover))}.co-button--rounded.co-button--sm{height:32px;padding:var(--co-spacing-sm2) var(--co-spacing-md);gap:var(--co-spacing-sm);font-size:var(--co-font-size-12);font-weight:500;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);border-radius:var(--co-button-radius, var(--co-border-radius-full))}.co-button--square.co-button--sm{height:32px;padding:var(--co-spacing-sm2) var(--co-spacing-md);gap:var(--co-spacing-sm);font-size:var(--co-font-size-12);font-weight:500;line-height:1;letter-spacing:var(--co-font-letter-spacing-body);border-radius:var(--co-border-radius-xs)}:host([full-width]){display:block;width:100%}:host([full-width]) .co-button{width:100%}co-icon{color:var(--co-button-icon-color, inherit)}'}},[257,"co-button",{variant:[1],shape:[513],size:[1],fullWidth:[516,"full-width"],elevated:[4],surface:[1],disabled:[516],label:[1],ariaLabelText:[1,"aria-label-text"],iconLeft:[1,"icon-left"],iconRight:[1,"icon-right"],iconWeight:[1,"icon-weight"],type:[1],color:[1],textColor:[1,"text-color"],iconSize:[2,"icon-size"]}]);function e(){"undefined"!=typeof customElements&&["co-button","co-icon"].forEach((t=>{switch(t){case"co-button":customElements.get(o(t))||customElements.define(o(t),s);break;case"co-icon":customElements.get(o(t))||c()}}))}e();export{s as C,e as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,h as n,a as i}from"./index.js";const o=new Map;const
|
|
1
|
+
import{t,p as e,H as s,h as n,a as i}from"./index.js";const o=new Map;const r=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.name="",this.weight="regular",this.size=16,this.svgContent=""}async componentWillLoad(){await this.fetch()}async onPropsChange(){await this.fetch()}async fetch(){this.svgContent=this.name?await function(t,e){const s=`${e}/${t}`,n=o.get(s);if(n)return n;const i=globalThis.__cobaltIconVersion,r=`${globalThis.__cobaltIconBasePath||"https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets"}/${e}/${function(t,e){return"regular"===e?`${t}.svg`:`${t}-${e}.svg`}(t,e)}`,a=fetch(i?`${r}?v=${i}`:r,{priority:"low"}).then((async t=>{if(!t.ok)return"";const e=await t.text();return/^\s*(<\?xml|<svg)/i.test(e)?e:(o.delete(s),"")})).catch((()=>(o.delete(s),"")));return o.set(s,a),a}(this.name,this.weight):""}render(){return n(i,{key:"e6f8302d22e1fbeac4e82d199b9214063c7b2313","aria-hidden":"true",style:{display:"inline-flex",width:`${this.size}px`,height:`${this.size}px`,flexShrink:"0"}},n("span",{key:"7967a0787112955036f6f88231a2a635e647e218",part:"svg",innerHTML:this.svgContent}))}static get watchers(){return{name:[{onPropsChange:0}],weight:[{onPropsChange:0}]}}static get style(){return":host{display:inline-flex;align-items:center;justify-content:center;color:inherit;line-height:1;flex-shrink:0}span{display:contents}svg{display:block;width:100%;height:100%;fill:currentColor}"}},[1,"co-icon",{name:[1],weight:[1],size:[2],svgContent:[32]},void 0,{name:[{onPropsChange:0}],weight:[{onPropsChange:0}]}]);function a(){"undefined"!=typeof customElements&&["co-icon"].forEach((e=>{"co-icon"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}a();export{r as C,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as s,c as o,h as e}from"./index.js";import{i as h,c as n,g as r,f as
|
|
1
|
+
import{t,p as i,H as s,c as o,h as e}from"./index.js";import{i as h,c as n,g as r,f as a}from"./p-BtliEQAT.js";const c=[];function p(t){const i=c.indexOf(t);-1!==i&&c.splice(i,1)}function l(t){return c.length>0&&c[c.length-1]===t}const d=["top","bottom","left","right"].map((t=>`co-popover__panel--${t}`)),m=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coOpen=o(this,"coOpen",3),this.coClose=o(this,"coClose",3),this.coPlacement=o(this,"coPlacement",3),this.open=!1,this.placement="bottom-start",this.matchWidth=!1,this.offset=4,this.closeOnClickOutside=!0,this.closeOnEscape=!0,this.flip=!0,this.bare=!1,this.shift=0,this.closing=!1,this.anchorSeenVisible=!1,this.scrollParents=[],this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.docListenersBound=!1,this.finishClose=()=>{clearTimeout(this.closeFallbackTimer),this.open||(this.closing=!1,this.panelEl=void 0)},this.handlePanelTransitionEnd=t=>{!this.open&&this.closing&&t.target===this.panelEl&&"transform"===t.propertyName&&this.finishClose()},this.pressStartedInside=!1,this.handleDocumentPointerDownManual=t=>{this.pressStartedInside=t.composedPath().includes(this.el)},this.handleDocumentClickManual=t=>{const i=this.pressStartedInside;this.pressStartedInside=!1,this.open&&this.closeOnClickOutside&&(i||l(this.el)&&(t.composedPath().includes(this.el)||(this.open=!1)))},this.handleDocumentKeydownManual=t=>{this.open&&this.closeOnEscape&&l(this.el)&&"Escape"===t.key&&(t.stopPropagation(),this.open=!1)},this.updatePosition=()=>{if(!this.open||!this.triggerEl||!this.panelEl)return;const t=this.triggerEl.getBoundingClientRect(),i=this.scrollParents.map((t=>t.getBoundingClientRect()));if(h(t,i))this.anchorSeenVisible=!0;else if(this.anchorSeenVisible&&this.closeOnClickOutside)return void(this.open=!1);const s=DOMRect.fromRect({width:this.panelEl.offsetWidth,height:this.panelEl.offsetHeight}),o=this.resolveAnchor(),e=null==o?void 0:o.getBoundingClientRect(),{top:a,left:c,actualPlacement:p}=n(t,s,{placement:this.placement,offset:this.offset,flip:this.flip,anchorRect:e,shift:this.shift});let l=a,m=c;if(!this.panelEl.matches(":popover-open")&&(this.offsetAncestorComputed||(this.cachedOffsetAncestor=r(this.panelEl),this.offsetAncestorComputed=!0),this.cachedOffsetAncestor)){const t=this.cachedOffsetAncestor.getBoundingClientRect();l-=t.top,m-=t.left}const f={top:`${l}px`,left:`${m}px`};if(this.matchWidth&&(f.width=`${(null!=e?e:t).width}px`),this.panelEl){Object.assign(this.panelEl.style,f);const t=`co-popover__panel--${p.split("-")[0]}`;this.panelEl.classList.contains(t)||(this.panelEl.classList.remove(...d),this.panelEl.classList.add(t),this.coPlacement.emit({placement:p})),this.panelEl.classList.add("co-popover__panel--positioned")}},this.scheduleUpdate=()=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.updatePosition)},this.handleTriggerClick=()=>{this.open=!this.open}}componentDidLoad(){this.open&&this.onOpenChange(!0)}disconnectedCallback(){p(this.el),this.unbindDocListeners(),this.cleanupListeners(),clearTimeout(this.closeFallbackTimer),this.closing=!1}onOpenChange(t){var i;this.anchorSeenVisible=!1,t?(this.closing=!1,clearTimeout(this.closeFallbackTimer),p(i=this.el),c.push(i),this.coOpen.emit(),this.bindDocListeners(),this.scheduleUpdate(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.updatePosition()}))})),this.addScrollListeners()):(p(this.el),this.coClose.emit(),this.cleanupListeners(),this.unbindDocListeners(),this.cachedOffsetAncestor=null,this.offsetAncestorComputed=!1,this.closing=!0,clearTimeout(this.closeFallbackTimer),this.closeFallbackTimer=setTimeout((()=>this.finishClose()),400))}bindDocListeners(){this.docListenersBound||(document.addEventListener("pointerdown",this.handleDocumentPointerDownManual,!0),document.addEventListener("click",this.handleDocumentClickManual,!0),document.addEventListener("keydown",this.handleDocumentKeydownManual,!0),this.docListenersBound=!0)}unbindDocListeners(){this.docListenersBound&&(document.removeEventListener("pointerdown",this.handleDocumentPointerDownManual,!0),document.removeEventListener("click",this.handleDocumentClickManual,!0),document.removeEventListener("keydown",this.handleDocumentKeydownManual,!0),this.docListenersBound=!1,this.pressStartedInside=!1)}async toggle(){this.open=!this.open}async show(){this.open=!0}async hide(){this.open=!1}resolveAnchor(){return this.anchor?"string"==typeof this.anchor?document.querySelector(this.anchor):this.anchor:null}promotePanel(){const t=this.panelEl;if(t&&"function"==typeof t.showPopover)try{t.matches(":popover-open")||t.showPopover()}catch(t){}}addScrollListeners(){window.addEventListener("resize",this.scheduleUpdate,{passive:!0}),window.addEventListener("scroll",this.scheduleUpdate,{passive:!0,capture:!0}),this.scrollParents=a(this.el);for(const t of this.scrollParents)t.addEventListener("scroll",this.scheduleUpdate,{passive:!0})}cleanupListeners(){this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0),window.removeEventListener("resize",this.scheduleUpdate),window.removeEventListener("scroll",this.scheduleUpdate,{capture:!0});for(const t of this.scrollParents)t.removeEventListener("scroll",this.scheduleUpdate);this.scrollParents=[]}render(){return e("div",{key:"f9c23cf5b7beb42230fbc37e6aacb9d8423a2c34",class:"co-popover"},e("div",{key:"255b7a3b713719283e3b4a6d65ed520661b4e40b",class:"co-popover__trigger",ref:t=>this.triggerEl=t,onClick:this.handleTriggerClick},e("slot",{key:"82c7133648e7c55db263f1abae8902c3ab579d27",name:"trigger"})),(this.open||this.closing)&&e("div",{key:"990ca1400e5e19d6614dbc7b43e78b116626e1b0",class:{"co-popover__panel":!0,"co-popover__panel--closing":this.closing},part:"panel",popover:"manual",onTransitionEnd:this.handlePanelTransitionEnd,ref:t=>{t&&t!==this.panelEl&&(this.panelEl=t,this.promotePanel(),this.scheduleUpdate())}},e("slot",{key:"fb635cf42e7866b055a59aaf471bab5bca995afb"})))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return":host{display:inline-block;position:relative}:host([match-width]){display:block;width:100%}.co-popover{display:block;width:100%}.co-popover__trigger{display:block;width:100%;cursor:pointer}.co-popover__panel{position:fixed;inset:auto;top:0;left:0;margin:0;padding:0;width:auto;height:auto;max-width:none;max-height:none;z-index:10000;visibility:hidden;opacity:0;transform:scale(0.97);background:var(--co-semantic-surface-page, #fff);border:1px solid var(--co-popover-border-color, var(--co-semantic-border-subtle));border-radius:var(--co-border-radius-sm, 12px);box-shadow:var(--co-popover-shadow, 0 4px 16px rgba(31, 28, 27, 0.08));overflow:visible}:host([bare]) .co-popover__panel{background:transparent;border:0;box-shadow:none}.co-popover__panel--positioned{visibility:visible;opacity:1;transform:scale(1);transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out)}.co-popover__panel--closing{visibility:visible;opacity:0;transform:scale(0.99);pointer-events:none;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-in), transform var(--co-motion-duration-fast) var(--co-motion-ease-in)}.co-popover__panel--bottom{transform-origin:top center}.co-popover__panel--top{transform-origin:bottom center}.co-popover__panel--right{transform-origin:center left}.co-popover__panel--left{transform-origin:center right}"}},[257,"co-popover",{open:[1540],placement:[1],matchWidth:[516,"match-width"],offset:[2],closeOnClickOutside:[4,"close-on-click-outside"],closeOnEscape:[4,"close-on-escape"],flip:[4],bare:[516],anchor:[1],shift:[2],closing:[32],toggle:[64],show:[64],hide:[64]},void 0,{open:[{onOpenChange:0}]}]);function f(){"undefined"!=typeof customElements&&["co-popover"].forEach((i=>{"co-popover"===i&&(customElements.get(t(i))||customElements.define(t(i),m))}))}f();export{m as C,f as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a,p as t,H as r,h as o}from"./index.js";import{i as e}from"./p-BVGGRfNG.js";import{d as s}from"./p-
|
|
1
|
+
import{t as a,p as t,H as r,h as o}from"./index.js";import{i as e}from"./p-BVGGRfNG.js";import{d as s}from"./p-KK2vAKs-.js";import{d as i}from"./p-8XzG8pzY.js";import{d as c}from"./p-9VoFSbIH.js";const n={xl:80,lg:64,md:56,sm:48,xs:32,xxs:24},l={xl:32,lg:28,md:24,sm:20,xs:16,xxs:12},v={xl:"var(--co-font-size-26)",lg:"var(--co-font-size-22)",md:"var(--co-font-size-18)",sm:"var(--co-font-size-16)",xs:"var(--co-font-size-12)",xxs:"var(--co-font-size-10)"},L=t(class extends r{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.type="text",this.size="md",this.icon="user",this.iconWeight="regular",this.shape="circle",this.imgFailed=!1,this.handleImgError=()=>{this.imgFailed=!0}}render(){var a,t,r,s,i,c,L;const h=null!==(a=n[this.size])&&void 0!==a?a:56,d=null!==(t=l[this.size])&&void 0!==t?t:24,m=null!==(r=v[this.size])&&void 0!==r?r:"var(--co-font-size-18)",p="image"===this.type&&this.src&&!this.imgFailed,u="icon"===this.type||"image"===this.type&&!p&&!this.text,x="text"===this.type?this.text:"image"===this.type&&null!==(i=null!==(s=this.alt)&&void 0!==s?s:this.text)&&void 0!==i?i:this.icon,f=o("div",{class:{"co-avatar":!0,[`co-avatar--${this.size}`]:!0,[`co-avatar--${this.type}`]:!0,"co-avatar--square":"square"===this.shape,"co-avatar--rounded":"rounded"===this.shape,"co-avatar--light":!!this.color&&e(this.color)},style:Object.assign(Object.assign({width:`var(--co-avatar-size, ${h}px)`,height:`var(--co-avatar-size, ${h}px)`,fontSize:m},this.color?{background:this.color}:{}),this.ringColor?{"--co-avatar-border-color":this.ringColor,"--co-avatar-border-width":"2px"}:{}),part:"avatar",role:"img","aria-label":x},p?o("img",{class:"co-avatar__img",src:this.src,alt:null!==(L=null!==(c=this.alt)&&void 0!==c?c:this.text)&&void 0!==L?L:"",onError:this.handleImgError}):u?o("co-icon",{name:this.icon,weight:this.iconWeight,size:d}):o("span",{class:"co-avatar__text"},this.text));return this.name?o("co-tooltip",{content:this.name},f):f}static get style(){return":host{display:inline-flex;--co-avatar-squircle:url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M100 50L99.94 68.06L99.75 73.81L99.44 77.94L99.01 81.26L98.44 84.05L97.74 86.46L96.91 88.57L95.94 90.43L94.81 92.07L93.53 93.53L92.07 94.81L90.43 95.94L88.57 96.91L86.46 97.74L84.05 98.44L81.26 99.01L77.94 99.44L73.81 99.75L68.06 99.94L50 100L31.94 99.94L26.19 99.75L22.06 99.44L18.74 99.01L15.95 98.44L13.54 97.74L11.43 96.91L9.57 95.94L7.93 94.81L6.47 93.53L5.19 92.07L4.06 90.43L3.09 88.57L2.26 86.46L1.56 84.05L0.99 81.26L0.56 77.94L0.25 73.81L0.06 68.06L0 50L0.06 31.94L0.25 26.19L0.56 22.06L0.99 18.74L1.56 15.95L2.26 13.54L3.09 11.43L4.06 9.57L5.19 7.93L6.47 6.47L7.93 5.19L9.57 4.06L11.43 3.09L13.54 2.26L15.95 1.56L18.74 0.99L22.06 0.56L26.19 0.25L31.94 0.06L50 0L68.06 0.06L73.81 0.25L77.94 0.56L81.26 0.99L84.05 1.56L86.46 2.26L88.57 3.09L90.43 4.06L92.07 5.19L93.53 6.47L94.81 7.93L95.94 9.57L96.91 11.43L97.74 13.54L98.44 15.95L99.01 18.74L99.44 22.06L99.75 26.19L99.94 31.94Z' fill='%23fff'/></svg>\")}.co-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--co-border-radius-full);background:var(--co-semantic-surface-primary);color:var(--co-semantic-on-primary);font-family:var(--co-font-family-primary);font-weight:var(--co-avatar-font-weight, 500);line-height:1;letter-spacing:var(--co-font-letter-spacing-body);overflow:hidden;flex-shrink:0;user-select:none;-webkit-font-smoothing:antialiased}.co-avatar::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 var(--co-avatar-border-width, 1px) var(--co-avatar-border-color, transparent)}.co-avatar__text{text-transform:uppercase}.co-avatar--xxs .co-avatar__text,.co-avatar--xs .co-avatar__text,.co-avatar--sm .co-avatar__text,.co-avatar--md .co-avatar__text{transform:translateY(0.5px)}.co-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.co-avatar--square{border-radius:0;-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat}.co-avatar--square::after{--co-avatar-bw:var(--co-avatar-border-width, 1px);box-shadow:none;background:var(--co-avatar-border-color, transparent);-webkit-mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;-webkit-mask-composite:xor;mask:var(--co-avatar-squircle) center / 100% 100% no-repeat, var(--co-avatar-squircle) center / calc(100% - 2 * var(--co-avatar-bw)) calc(100% - 2 * var(--co-avatar-bw)) no-repeat;mask-composite:exclude}.co-avatar--light{color:rgba(0, 0, 0, 0.87)}co-tooltip{display:inline-flex;align-items:center;line-height:0}.co-avatar--rounded{border-radius:var(--co-border-radius-xs)}"}},[1,"co-avatar",{type:[1],size:[1],text:[1],src:[1],alt:[1],icon:[1],iconWeight:[1,"icon-weight"],shape:[1],color:[1],ringColor:[513,"ring-color"],name:[1],imgFailed:[32]}]);function h(){"undefined"!=typeof customElements&&["co-avatar","co-icon","co-kbd","co-tooltip"].forEach((t=>{switch(t){case"co-avatar":customElements.get(a(t))||customElements.define(a(t),L);break;case"co-icon":customElements.get(a(t))||s();break;case"co-kbd":customElements.get(a(t))||i();break;case"co-tooltip":customElements.get(a(t))||c()}}))}h();export{L as C,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as n,c as o,h as i}from"./index.js";function s(t,e,n){return t!==n?null:e?"after-open":"after-close"}const
|
|
1
|
+
import{t,p as e,H as n,c as o,h as i}from"./index.js";function s(t,e,n){return t!==n?null:e?"after-open":"after-close"}const a=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex="-1"])'].join(",");function r(t){return Array.from(t.querySelectorAll(a)).filter((t=>!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-hidden")&&(null!==t.offsetParent||t.getClientRects().length>0)))}let c=0,h="";const l=e(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.coClose=o(this,"coClose",7),this.coAfterClose=o(this,"coAfterClose",3),this.coAfterOpen=o(this,"coAfterOpen",3),this.open=!1,this.trapFocus=!1,this.closeOnEscape=!1,this.hasLock=!1,this.pressDownTarget=null,this.pressUpTarget=null,this.handlePointerDown=t=>{var e;this.pressDownTarget=null!==(e=t.composedPath()[0])&&void 0!==e?e:null,this.pressUpTarget=null},this.handlePointerUp=t=>{var e;this.pressUpTarget=null!==(e=t.composedPath()[0])&&void 0!==e?e:null},this.handleClick=t=>{var e;const n=null!==(e=t.composedPath()[0])&&void 0!==e?e:null,o=n===this.overlayEl&&function(t,e,n){return null!==t&&t===e&&e===n}(this.pressDownTarget,this.pressUpTarget,n);this.pressDownTarget=null,this.pressUpTarget=null,o&&this.coClose.emit()},this.handleTransitionEnd=t=>{if(t.target!==this.overlayEl)return;const e=s(t.propertyName,this.open,"opacity");"after-open"===e?this.coAfterOpen.emit():"after-close"===e&&this.coAfterClose.emit()}}onOpenChange(t){t?this.acquireLock():this.releaseLock(),this.syncPopover(),this.trapFocus&&(t?this.captureAndFocus():this.restoreFocus())}componentDidLoad(){this.open&&this.acquireLock(),this.syncPopover(),this.open&&this.trapFocus&&this.captureAndFocus()}disconnectedCallback(){this.releaseLock(),this.trapFocus&&this.restoreFocus()}acquireLock(){this.hasLock||(this.hasLock=!0,"undefined"!=typeof document&&(0===c&&(h=document.body.style.overflow,document.body.style.overflow="hidden"),c++))}releaseLock(){this.hasLock&&(this.hasLock=!1,"undefined"!=typeof document&&0!==c&&(c--,0===c&&(document.body.style.overflow=h)))}syncPopover(){const t=this.overlayEl;if(t&&"function"==typeof t.showPopover)try{const e=t.matches(":popover-open");this.open&&!e?t.showPopover():!this.open&&e&&t.hidePopover()}catch(t){}}captureAndFocus(){var t;"undefined"!=typeof document&&(this.returnFocusEl=document.activeElement),t=()=>{var t;if(!this.open)return;const e=r(this.el);e.length>0?e[0].focus():null===(t=this.overlayEl)||void 0===t||t.focus()},"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()}restoreFocus(){const t=this.returnFocusEl;this.returnFocusEl=null,t&&"function"==typeof t.focus&&t.focus()}deepActiveElement(){if("undefined"==typeof document)return null;let t=document.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}handleKeydown(t){this.open&&(this.closeOnEscape&&"Escape"===t.key?this.coClose.emit():this.trapFocus&&"Tab"===t.key&&this.trapTab(t))}trapTab(t){var e;const n=r(this.el);if(0===n.length)return t.preventDefault(),void(null===(e=this.overlayEl)||void 0===e||e.focus());const o=n.indexOf(this.deepActiveElement()),i=function(t,e,n){return t<=0?-1:n?e<=0?t-1:e-1:-1===e||e>=t-1?0:e+1}(n.length,o,t.shiftKey);i<0||(t.preventDefault(),n[i].focus())}render(){return i("div",{key:"1edc956747aa0c79bcc7863fd3530c4f64fd6746",class:{"co-overlay":!0,"co-overlay--open":this.open},part:"overlay",popover:"manual",tabindex:this.trapFocus?-1:void 0,ref:t=>this.overlayEl=t,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,onClick:this.handleClick,onTransitionEnd:this.handleTransitionEnd},i("slot",{key:"b17930138f924657b21511b95bd152e90a53a04a"}))}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return":host{display:contents}.co-overlay{position:fixed;inset:0;z-index:1000;margin:0;border:0;padding:0;width:auto;height:auto;max-width:none;max-height:none;overflow:visible;display:flex;align-items:center;justify-content:center;background:var(--co-overlay-bg, rgba(0, 0, 0, 0.4));-webkit-backdrop-filter:blur(var(--co-overlay-blur, 2px));backdrop-filter:blur(var(--co-overlay-blur, 2px));opacity:0;pointer-events:none;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-in)}.co-overlay--open{opacity:1;pointer-events:auto;transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out)}"}},[257,"co-overlay",{open:[1540],trapFocus:[516,"trap-focus"],closeOnEscape:[516,"close-on-escape"]},[[4,"keydown","handleKeydown"]],{open:[{onOpenChange:0}]}]);function d(){"undefined"!=typeof customElements&&["co-overlay"].forEach((e=>{"co-overlay"===e&&(customElements.get(t(e))||customElements.define(t(e),l))}))}d();export{l as C,s as a,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as o,H as e,c as a,h as t}from"./index.js";import{d as s,a as c}from"./p-BR0LYW9v.js";import{s as i}from"./p-CBX_oabB.js";import{d as n}from"./p-B3kKOgsA.js";import{d}from"./p-BH184F0X.js";const l=o(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.coClose=a(this,"coClose",7),this.coOpen=a(this,"coOpen",7),this.coAfterOpen=a(this,"coAfterOpen",7),this.coAfterClose=a(this,"coAfterClose",7),this.open=!1,this.position="right",this.size="md",this.heading="",this.description="",this.icon="",this.closable=!0,this.closeOnOverlay=!0,this.closeOnEscape=!0,this.modeless=!1,this.loading=!1,this.hasFooter=!1,this.hasTabs=!1,this.hasHeaderSlot=!1,this.handleFooterSlotChange=r=>{this.hasFooter=i(r)},this.handleTabsSlotChange=r=>{this.hasTabs=i(r)},this.handleHeaderSlotChange=r=>{this.hasHeaderSlot=i(r)},this.handleOverlayClose=()=>{this.closeOnOverlay&&this.coClose.emit()},this.handleCloseClick=()=>{this.coClose.emit()},this.stopPropagation=r=>{r.stopPropagation()},this.handleTransitionEnd=r=>{if(r.target!==this.asideEl)return;const o=c(r.propertyName,this.open,"transform");"after-open"===o?this.coAfterOpen.emit():"after-close"===o&&this.coAfterClose.emit()},this.promoteModeless=r=>{r&&(this.asideEl=r);const o=this.asideEl;if(this.modeless&&o&&"function"==typeof o.showPopover)try{o.matches(":popover-open")||o.showPopover()}catch(r){}}}get labelledBy(){return this.hasHeaderSlot?"co-drawer-header-content":this.heading?"co-drawer-heading":void 0}onOpenChange(r,o){r&&!o&&this.coOpen.emit()}handleKey(r){this.open&&this.closeOnEscape&&"Escape"===r.key&&(this.modeless&&document.querySelector("co-drawer[open]:not([modeless]), co-modal[open]")||this.coClose.emit())}componentDidLoad(){this.promoteModeless()}render(){const r=t("aside",{class:{"co-drawer":!0,"co-sq-elevation":!0,"co-sq-elevation-fallback":!0,"co-drawer--open":this.open,"co-drawer--modeless":this.modeless,[`co-drawer--${this.position}`]:!0,[`co-drawer--${this.size}`]:!0},popover:this.modeless?"manual":void 0,ref:this.promoteModeless,part:"drawer",role:"dialog","aria-modal":this.modeless?"false":"true","aria-labelledby":this.labelledBy,onClick:this.stopPropagation,onTransitionEnd:this.handleTransitionEnd},t("div",{class:"co-drawer__card co-sq-clip",part:"card"},t("header",{class:"co-drawer__header",part:"header"},t("div",{class:"co-drawer__header-content",id:"co-drawer-header-content"},t("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange},t("div",{class:"co-drawer__heading-row"},this.icon&&t("co-icon",{name:this.icon,size:20,class:"co-drawer__icon"}),t("h2",{class:"co-drawer__heading",id:"co-drawer-heading"},this.heading)),this.description&&t("p",{class:"co-drawer__description"},this.description))),this.closable&&t("button",{class:"co-drawer__close",type:"button","aria-label":"Close",onClick:this.handleCloseClick},t("co-icon",{name:"x",size:20}))),t("div",{class:{"co-drawer__tabs":!0,"co-drawer__tabs--empty":!this.hasTabs},part:"tabs"},t("slot",{name:"tabs",onSlotchange:this.handleTabsSlotChange})),t("div",{class:"co-drawer__body",part:"body"},t("slot",null),t("co-loader",{overlay:!0,visible:this.loading,part:"loader"})),t("footer",{class:{"co-drawer__footer":!0,"co-drawer__footer--empty":!this.hasFooter},part:"footer"},t("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))));return this.modeless?r:t("co-overlay",{open:this.open,onCoClose:this.handleOverlayClose},r)}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return'.co-sq-elevation{border-radius:var(--co-sq-r);corner-shape:squircle;box-shadow:var(--co-sq-shadow)}.co-sq-clip{overflow:hidden;border-radius:var(--co-sq-r);corner-shape:squircle}@supports not (corner-shape: squircle){.co-sq-elevation{box-shadow:none}.co-sq-elevation-fallback{filter:var(--co-sq-drop-shadow)}.co-sq-clip{border-radius:0;--co-sq-tl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 0L95 0L92.5 0L90 0L87.5 0.01L85 0.01L82.5 0.02L80 0.04L77.5 0.06L75 0.1L72.5 0.14L70 0.2L67.5 0.28L65 0.38L62.5 0.5L60 0.65L57.5 0.83L55 1.04L52.5 1.3L50 1.6L47.5 1.96L45 2.37L42.5 2.85L40 3.41L37.5 4.05L35 4.8L32.5 5.65L30 6.63L27.5 7.77L25 9.07L22.5 10.58L20 12.34L17.5 14.41L15 16.85L12.5 19.79L10 23.42L7.5 28.06L5 34.37L2.5 44.29L0 100L100 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-tr:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 0L5 0L7.5 0L10 0L12.5 0.01L15 0.01L17.5 0.02L20 0.04L22.5 0.06L25 0.1L27.5 0.14L30 0.2L32.5 0.28L35 0.38L37.5 0.5L40 0.65L42.5 0.83L45 1.04L47.5 1.3L50 1.6L52.5 1.96L55 2.37L57.5 2.85L60 3.41L62.5 4.05L65 4.8L67.5 5.65L70 6.63L72.5 7.77L75 9.07L77.5 10.58L80 12.34L82.5 14.41L85 16.85L87.5 19.79L90 23.42L92.5 28.06L95 34.37L97.5 44.29L100 100L0 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-bl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 55.71L5 65.63L7.5 71.94L10 76.58L12.5 80.21L15 83.15L17.5 85.59L20 87.66L22.5 89.42L25 90.93L27.5 92.23L30 93.37L32.5 94.35L35 95.2L37.5 95.95L40 96.59L42.5 97.15L45 97.63L47.5 98.04L50 98.4L52.5 98.7L55 98.96L57.5 99.17L60 99.35L62.5 99.5L65 99.62L67.5 99.72L70 99.8L72.5 99.86L75 99.9L77.5 99.94L80 99.96L82.5 99.98L85 99.99L87.5 99.99L90 100L92.5 100L95 100L97.5 100L100 100L100 0Z%27 fill=%27%23fff%27/></svg>");--co-sq-br:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 55.71L95 65.63L92.5 71.94L90 76.58L87.5 80.21L85 83.15L82.5 85.59L80 87.66L77.5 89.42L75 90.93L72.5 92.23L70 93.37L67.5 94.35L65 95.2L62.5 95.95L60 96.59L57.5 97.15L55 97.63L52.5 98.04L50 98.4L47.5 98.7L45 98.96L42.5 99.17L40 99.35L37.5 99.5L35 99.62L32.5 99.72L30 99.8L27.5 99.86L25 99.9L22.5 99.94L20 99.96L17.5 99.98L15 99.99L12.5 99.99L10 100L7.5 100L5 100L2.5 100L0 100L0 0Z%27 fill=%27%23fff%27/></svg>");-webkit-mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat}}:host{display:contents}.co-drawer{position:fixed;display:flex;flex-direction:column;font-family:var(--co-font-family-primary);transition:transform var(--co-motion-duration-slow) var(--co-motion-ease-in-out);will-change:transform;z-index:1;contain:layout;--co-drawer-r:var(--co-shell-r, var(--co-border-radius-md));--co-sq-r:var(--co-drawer-r);--co-sq-shadow:0 1px 4px rgba(31, 28, 27, 0.06), 0 10px 56px rgba(31, 28, 27, 0.12);--co-sq-drop-shadow:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12))}.co-drawer--right{top:0;right:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(100% + 12px))}.co-drawer--right.co-drawer--open{transform:translateX(0)}.co-drawer--left{top:0;left:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(-100% - 12px))}.co-drawer--left.co-drawer--open{transform:translateX(0)}.co-drawer--bottom{bottom:0;left:0;right:0;margin:6px;width:auto;transform:translateY(calc(100% + 12px))}.co-drawer--bottom.co-drawer--open{transform:translateY(0)}.co-drawer--right.co-drawer--sm,.co-drawer--left.co-drawer--sm{width:400px;max-width:100vw}.co-drawer--right.co-drawer--md,.co-drawer--left.co-drawer--md{width:520px;max-width:100vw}.co-drawer--right.co-drawer--lg,.co-drawer--left.co-drawer--lg{width:672px;max-width:100vw}.co-drawer--right.co-drawer--xl,.co-drawer--left.co-drawer--xl{width:960px;max-width:100vw}.co-drawer--right.co-drawer--full,.co-drawer--left.co-drawer--full{width:100vw}.co-drawer--bottom.co-drawer--sm{height:40vh}.co-drawer--bottom.co-drawer--md{height:60vh}.co-drawer--bottom.co-drawer--lg{height:80vh}.co-drawer--bottom.co-drawer--xl{height:95vh}.co-drawer--bottom.co-drawer--full{height:100vh}.co-drawer__card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--co-semantic-surface-page)}.co-drawer__header{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-bottom:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__header-content{flex:1;min-width:0}.co-drawer__heading-row{display:flex;align-items:center;gap:var(--co-spacing-sm, 8px)}.co-drawer__icon{flex-shrink:0;color:var(--co-semantic-text-secondary)}.co-drawer__heading{margin:0;font-size:var(--co-font-size-18);font-weight:600;color:var(--co-semantic-text-default);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-drawer__description{margin:var(--co-spacing-xs) 0 0;font-size:var(--co-font-size-13, 13px);font-weight:400;color:var(--co-semantic-text-muted);line-height:1.4}.co-drawer__close{display:flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs);margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-sm);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);flex-shrink:0}.co-drawer__close:hover{background:var(--co-semantic-surface-hover)}.co-drawer__close:focus-visible{outline:2px solid var(--co-color-primary-azul);outline-offset:2px}.co-drawer__tabs{flex-shrink:0;border-bottom:1px solid var(--co-semantic-border-default)}.co-drawer__tabs--empty{display:none}.co-drawer__body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:var(--co-spacing-xl);position:relative}.co-drawer__body{scrollbar-width:thin;scrollbar-color:transparent transparent}.co-drawer__body:hover{scrollbar-color:var(--co-color-opacity-negro-16) transparent}.co-drawer__body::-webkit-scrollbar{width:6px}.co-drawer__body::-webkit-scrollbar-track{background:transparent}.co-drawer__body::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.co-drawer__body:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-negro-16)}.co-drawer__body:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-negro-25)}.co-drawer__body:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-negro-50)}.co-drawer__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-top:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__footer--empty{display:none}@media (max-width: 600px){.co-drawer--right,.co-drawer--left{width:100vw !important}}.co-drawer--modeless{z-index:1000;border:0;padding:0;background:transparent}.co-drawer--modeless.co-drawer--right{left:auto;bottom:auto}.co-drawer--modeless.co-drawer--left{right:auto;bottom:auto}.co-drawer--modeless.co-drawer--bottom{top:auto}'}},[257,"co-drawer",{open:[1540],position:[513],size:[513],heading:[1],description:[1],icon:[1],closable:[4],closeOnOverlay:[4,"close-on-overlay"],closeOnEscape:[4,"close-on-escape"],modeless:[516],loading:[4],hasFooter:[32],hasTabs:[32],hasHeaderSlot:[32]},[[4,"keydown","handleKey"]],{open:[{onOpenChange:0}]}]);function h(){"undefined"!=typeof customElements&&["co-drawer","co-icon","co-loader","co-overlay"].forEach((o=>{switch(o){case"co-drawer":customElements.get(r(o))||customElements.define(r(o),l);break;case"co-icon":customElements.get(r(o))||n();break;case"co-loader":customElements.get(r(o))||d();break;case"co-overlay":customElements.get(r(o))||s()}}))}h();export{l as C,h as d}
|
|
1
|
+
import{t as r,p as o,H as e,c as a,h as t}from"./index.js";import{d as s,a as c}from"./p-nrwDl_gx.js";import{s as i}from"./p-CBX_oabB.js";import{d as n}from"./p-KK2vAKs-.js";import{d}from"./p-BH184F0X.js";const l=o(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.coClose=a(this,"coClose",7),this.coOpen=a(this,"coOpen",7),this.coAfterOpen=a(this,"coAfterOpen",7),this.coAfterClose=a(this,"coAfterClose",7),this.open=!1,this.position="right",this.size="md",this.heading="",this.description="",this.icon="",this.closable=!0,this.closeOnOverlay=!0,this.closeOnEscape=!0,this.modeless=!1,this.loading=!1,this.hasFooter=!1,this.hasTabs=!1,this.hasHeaderSlot=!1,this.handleFooterSlotChange=r=>{this.hasFooter=i(r)},this.handleTabsSlotChange=r=>{this.hasTabs=i(r)},this.handleHeaderSlotChange=r=>{this.hasHeaderSlot=i(r)},this.handleOverlayClose=()=>{this.closeOnOverlay&&this.coClose.emit()},this.handleCloseClick=()=>{this.coClose.emit()},this.stopPropagation=r=>{r.stopPropagation()},this.handleTransitionEnd=r=>{if(r.target!==this.asideEl)return;const o=c(r.propertyName,this.open,"transform");"after-open"===o?this.coAfterOpen.emit():"after-close"===o&&this.coAfterClose.emit()},this.promoteModeless=r=>{r&&(this.asideEl=r);const o=this.asideEl;if(this.modeless&&o&&"function"==typeof o.showPopover)try{o.matches(":popover-open")||o.showPopover()}catch(r){}}}get labelledBy(){return this.hasHeaderSlot?"co-drawer-header-content":this.heading?"co-drawer-heading":void 0}onOpenChange(r,o){r&&!o&&this.coOpen.emit()}handleKey(r){this.open&&this.closeOnEscape&&"Escape"===r.key&&(this.modeless&&document.querySelector("co-drawer[open]:not([modeless]), co-modal[open]")||this.coClose.emit())}componentDidLoad(){this.promoteModeless()}render(){const r=t("aside",{class:{"co-drawer":!0,"co-sq-elevation":!0,"co-sq-elevation-fallback":!0,"co-drawer--open":this.open,"co-drawer--modeless":this.modeless,[`co-drawer--${this.position}`]:!0,[`co-drawer--${this.size}`]:!0},popover:this.modeless?"manual":void 0,ref:this.promoteModeless,part:"drawer",role:"dialog","aria-modal":this.modeless?"false":"true","aria-labelledby":this.labelledBy,onClick:this.stopPropagation,onTransitionEnd:this.handleTransitionEnd},t("div",{class:"co-drawer__card co-sq-clip",part:"card"},t("header",{class:"co-drawer__header",part:"header"},t("div",{class:"co-drawer__header-content",id:"co-drawer-header-content"},t("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange},t("div",{class:"co-drawer__heading-row"},this.icon&&t("co-icon",{name:this.icon,size:20,class:"co-drawer__icon"}),t("h2",{class:"co-drawer__heading",id:"co-drawer-heading"},this.heading)),this.description&&t("p",{class:"co-drawer__description"},this.description))),this.closable&&t("button",{class:"co-drawer__close",type:"button","aria-label":"Close",onClick:this.handleCloseClick},t("co-icon",{name:"x",size:20}))),t("div",{class:{"co-drawer__tabs":!0,"co-drawer__tabs--empty":!this.hasTabs},part:"tabs"},t("slot",{name:"tabs",onSlotchange:this.handleTabsSlotChange})),t("div",{class:"co-drawer__body",part:"body"},t("slot",null),t("co-loader",{overlay:!0,visible:this.loading,part:"loader"})),t("footer",{class:{"co-drawer__footer":!0,"co-drawer__footer--empty":!this.hasFooter},part:"footer"},t("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))));return this.modeless?r:t("co-overlay",{open:this.open,onCoClose:this.handleOverlayClose},r)}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return'.co-sq-elevation{border-radius:var(--co-sq-r);corner-shape:squircle;box-shadow:var(--co-sq-shadow)}.co-sq-clip{overflow:hidden;border-radius:var(--co-sq-r);corner-shape:squircle}@supports not (corner-shape: squircle){.co-sq-elevation{box-shadow:none}.co-sq-elevation-fallback{filter:var(--co-sq-drop-shadow)}.co-sq-clip{border-radius:0;--co-sq-tl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 0L95 0L92.5 0L90 0L87.5 0.01L85 0.01L82.5 0.02L80 0.04L77.5 0.06L75 0.1L72.5 0.14L70 0.2L67.5 0.28L65 0.38L62.5 0.5L60 0.65L57.5 0.83L55 1.04L52.5 1.3L50 1.6L47.5 1.96L45 2.37L42.5 2.85L40 3.41L37.5 4.05L35 4.8L32.5 5.65L30 6.63L27.5 7.77L25 9.07L22.5 10.58L20 12.34L17.5 14.41L15 16.85L12.5 19.79L10 23.42L7.5 28.06L5 34.37L2.5 44.29L0 100L100 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-tr:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 0L5 0L7.5 0L10 0L12.5 0.01L15 0.01L17.5 0.02L20 0.04L22.5 0.06L25 0.1L27.5 0.14L30 0.2L32.5 0.28L35 0.38L37.5 0.5L40 0.65L42.5 0.83L45 1.04L47.5 1.3L50 1.6L52.5 1.96L55 2.37L57.5 2.85L60 3.41L62.5 4.05L65 4.8L67.5 5.65L70 6.63L72.5 7.77L75 9.07L77.5 10.58L80 12.34L82.5 14.41L85 16.85L87.5 19.79L90 23.42L92.5 28.06L95 34.37L97.5 44.29L100 100L0 100Z%27 fill=%27%23fff%27/></svg>");--co-sq-bl:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M0 0L2.5 55.71L5 65.63L7.5 71.94L10 76.58L12.5 80.21L15 83.15L17.5 85.59L20 87.66L22.5 89.42L25 90.93L27.5 92.23L30 93.37L32.5 94.35L35 95.2L37.5 95.95L40 96.59L42.5 97.15L45 97.63L47.5 98.04L50 98.4L52.5 98.7L55 98.96L57.5 99.17L60 99.35L62.5 99.5L65 99.62L67.5 99.72L70 99.8L72.5 99.86L75 99.9L77.5 99.94L80 99.96L82.5 99.98L85 99.99L87.5 99.99L90 100L92.5 100L95 100L97.5 100L100 100L100 0Z%27 fill=%27%23fff%27/></svg>");--co-sq-br:url("data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27 preserveAspectRatio=%27none%27><path d=%27M100 0L97.5 55.71L95 65.63L92.5 71.94L90 76.58L87.5 80.21L85 83.15L82.5 85.59L80 87.66L77.5 89.42L75 90.93L72.5 92.23L70 93.37L67.5 94.35L65 95.2L62.5 95.95L60 96.59L57.5 97.15L55 97.63L52.5 98.04L50 98.4L47.5 98.7L45 98.96L42.5 99.17L40 99.35L37.5 99.5L35 99.62L32.5 99.72L30 99.8L27.5 99.86L25 99.9L22.5 99.94L20 99.96L17.5 99.98L15 99.99L12.5 99.99L10 100L7.5 100L5 100L2.5 100L0 100L0 0Z%27 fill=%27%23fff%27/></svg>");-webkit-mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat;mask:var(--co-sq-tl) top left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-tr) top right / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-bl) bottom left / var(--co-sq-r) var(--co-sq-r) no-repeat, var(--co-sq-br) bottom right / var(--co-sq-r) var(--co-sq-r) no-repeat, linear-gradient(#fff 0 0) center / 100% calc(100% - 2 * var(--co-sq-r) + 2px) no-repeat, linear-gradient(#fff 0 0) center / calc(100% - 2 * var(--co-sq-r) + 2px) 100% no-repeat}}:host{display:contents}.co-drawer{position:fixed;display:flex;flex-direction:column;font-family:var(--co-font-family-primary);transition:transform var(--co-motion-duration-slow) var(--co-motion-ease-in-out);will-change:transform;z-index:1;contain:layout;--co-drawer-r:var(--co-shell-r, var(--co-border-radius-md));--co-sq-r:var(--co-drawer-r);--co-sq-shadow:0 1px 4px rgba(31, 28, 27, 0.06), 0 10px 56px rgba(31, 28, 27, 0.12);--co-sq-drop-shadow:drop-shadow(0 1px 2px rgba(31, 28, 27, 0.06)) drop-shadow(0 10px 28px rgba(31, 28, 27, 0.12))}.co-drawer--right{top:0;right:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(100% + 12px))}.co-drawer--right.co-drawer--open{transform:translateX(0)}.co-drawer--left{top:0;left:0;margin:6px;height:100vh;height:-webkit-fill-available;transform:translateX(calc(-100% - 12px))}.co-drawer--left.co-drawer--open{transform:translateX(0)}.co-drawer--bottom{bottom:0;left:0;right:0;margin:6px;width:auto;transform:translateY(calc(100% + 12px))}.co-drawer--bottom.co-drawer--open{transform:translateY(0)}.co-drawer--right.co-drawer--sm,.co-drawer--left.co-drawer--sm{width:400px;max-width:100vw}.co-drawer--right.co-drawer--md,.co-drawer--left.co-drawer--md{width:520px;max-width:100vw}.co-drawer--right.co-drawer--lg,.co-drawer--left.co-drawer--lg{width:672px;max-width:100vw}.co-drawer--right.co-drawer--xl,.co-drawer--left.co-drawer--xl{width:960px;max-width:100vw}.co-drawer--right.co-drawer--full,.co-drawer--left.co-drawer--full{width:100vw}.co-drawer--bottom.co-drawer--sm{height:40vh}.co-drawer--bottom.co-drawer--md{height:60vh}.co-drawer--bottom.co-drawer--lg{height:80vh}.co-drawer--bottom.co-drawer--xl{height:95vh}.co-drawer--bottom.co-drawer--full{height:100vh}.co-drawer__card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--co-semantic-surface-page)}.co-drawer__header{display:flex;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-bottom:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__header-content{flex:1;min-width:0}.co-drawer__heading-row{display:flex;align-items:center;gap:var(--co-spacing-sm, 8px)}.co-drawer__icon{flex-shrink:0;color:var(--co-semantic-text-secondary)}.co-drawer__heading{margin:0;font-size:var(--co-font-size-18);font-weight:600;color:var(--co-semantic-text-default);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-drawer__description{margin:var(--co-spacing-xs) 0 0;font-size:var(--co-font-size-13, 13px);font-weight:400;color:var(--co-semantic-text-muted);line-height:1.4}.co-drawer__close{display:flex;align-items:center;justify-content:center;padding:var(--co-spacing-xs);margin:0;border:none;background:transparent;cursor:pointer;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-sm);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out);flex-shrink:0}.co-drawer__close:hover{background:var(--co-semantic-surface-hover)}.co-drawer__close:focus-visible{outline:2px solid var(--co-color-primary-azul);outline-offset:2px}.co-drawer__tabs{flex-shrink:0;border-bottom:1px solid var(--co-semantic-border-default)}.co-drawer__tabs--empty{display:none}.co-drawer__body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:var(--co-spacing-xl);position:relative}.co-drawer__body{scrollbar-width:thin;scrollbar-color:transparent transparent}.co-drawer__body:hover{scrollbar-color:var(--co-color-opacity-negro-16) transparent}.co-drawer__body::-webkit-scrollbar{width:6px}.co-drawer__body::-webkit-scrollbar-track{background:transparent}.co-drawer__body::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}.co-drawer__body:hover::-webkit-scrollbar-thumb{background:var(--co-color-opacity-negro-16)}.co-drawer__body:hover::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-negro-25)}.co-drawer__body:hover::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-negro-50)}.co-drawer__footer{display:flex;justify-content:flex-end;align-items:center;gap:var(--co-spacing-md);padding:var(--co-spacing-lg) var(--co-spacing-xl);border-top:1px solid var(--co-semantic-border-default);flex-shrink:0}.co-drawer__footer--empty{display:none}@media (max-width: 600px){.co-drawer--right,.co-drawer--left{width:100vw !important}}.co-drawer--modeless{z-index:1000;border:0;padding:0;background:transparent}.co-drawer--modeless.co-drawer--right{left:auto;bottom:auto}.co-drawer--modeless.co-drawer--left{right:auto;bottom:auto}.co-drawer--modeless.co-drawer--bottom{top:auto}'}},[257,"co-drawer",{open:[1540],position:[513],size:[513],heading:[1],description:[1],icon:[1],closable:[4],closeOnOverlay:[4,"close-on-overlay"],closeOnEscape:[4,"close-on-escape"],modeless:[516],loading:[4],hasFooter:[32],hasTabs:[32],hasHeaderSlot:[32]},[[4,"keydown","handleKey"]],{open:[{onOpenChange:0}]}]);function h(){"undefined"!=typeof customElements&&["co-drawer","co-icon","co-loader","co-overlay"].forEach((o=>{switch(o){case"co-drawer":customElements.get(r(o))||customElements.define(r(o),l);break;case"co-icon":customElements.get(r(o))||n();break;case"co-loader":customElements.get(r(o))||d();break;case"co-overlay":customElements.get(r(o))||s()}}))}h();export{l as C,h as d}
|