@duetds/components 9.4.2 → 9.5.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/hydrate/index.js +2282 -200
- package/lib/cjs/{a11y-utils-821a2919.js → a11y-utils-1e25e6e3.js} +1 -1
- package/lib/cjs/{app-globals-b8946136.js → app-globals-b0eb39d1.js} +1 -1
- package/lib/cjs/duet-action-button.cjs.entry.js +2 -2
- package/lib/cjs/duet-alert.cjs.entry.js +3 -3
- package/lib/cjs/duet-badge.cjs.entry.js +3 -3
- package/lib/cjs/duet-banner.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +6 -6
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +4 -4
- package/lib/cjs/duet-button_2.cjs.entry.js +10 -10
- package/lib/cjs/duet-callout.cjs.entry.js +4 -4
- package/lib/cjs/duet-caption_4.cjs.entry.js +11 -10
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkmark.cjs.entry.js +3 -3
- package/lib/cjs/{duet-chip_3.cjs.entry.js → duet-chip.cjs.entry.js} +3 -377
- package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-collapsible.cjs.entry.js +4 -4
- package/lib/cjs/duet-combobox.cjs.entry.js +3 -3
- package/lib/cjs/duet-contact-card.cjs.entry.js +4 -4
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +2 -2
- package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
- package/lib/cjs/duet-divider_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +7 -7
- package/lib/cjs/duet-empty-state.cjs.entry.js +3 -3
- package/lib/cjs/duet-fieldset.cjs.entry.js +5 -5
- package/lib/cjs/duet-file-chooser.cjs.entry.js +2 -2
- package/lib/cjs/duet-footer.cjs.entry.js +7 -7
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
- package/lib/cjs/duet-hero.cjs.entry.js +8 -8
- package/lib/cjs/duet-icon.cjs.entry.js +4 -4
- package/lib/cjs/duet-input_2.cjs.entry.js +5 -5
- package/lib/cjs/duet-layout.cjs.entry.js +7 -7
- package/lib/cjs/duet-list_2.cjs.entry.js +4 -4
- package/lib/cjs/duet-menu-bar-button.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-menu-bar-item.cjs.entry.js +6 -6
- package/lib/cjs/duet-menu-bar-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-menu-bar.cjs.entry.js +4 -4
- package/lib/cjs/duet-modal.cjs.entry.js +10 -10
- package/lib/cjs/duet-multiselect.cjs.entry.js +8 -8
- package/lib/cjs/duet-nav.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +6 -6
- package/lib/cjs/duet-number-input.cjs.entry.js +3 -3
- package/lib/cjs/duet-overlay.cjs.entry.js +2 -2
- package/lib/cjs/duet-page-heading.cjs.entry.js +3 -3
- package/lib/cjs/duet-pagination_2.cjs.entry.js +15 -15
- package/lib/cjs/duet-phone-input.cjs.entry.js +2008 -0
- package/lib/cjs/duet-popup-menu_2.cjs.entry.js +426 -0
- package/lib/cjs/duet-progress.cjs.entry.js +2 -2
- package/lib/cjs/duet-promo-card.cjs.entry.js +4 -4
- package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +18 -13
- package/lib/cjs/duet-section-layout.cjs.entry.js +4 -4
- package/lib/cjs/duet-select.cjs.entry.js +2 -2
- package/lib/cjs/duet-shaped-image.cjs.entry.js +3 -3
- package/lib/cjs/duet-show-more.cjs.entry.js +4 -4
- package/lib/cjs/duet-slideout-lang.cjs.entry.js +3 -3
- package/lib/cjs/duet-slideout-link.cjs.entry.js +22 -4
- package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-slideout-panel.cjs.entry.js +10 -10
- package/lib/cjs/duet-slideout.cjs.entry.js +8 -8
- package/lib/cjs/duet-status-icon.cjs.entry.js +3 -3
- package/lib/cjs/duet-step_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +5 -5
- package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +2 -2
- package/lib/cjs/duet-submenu-bar.cjs.entry.js +6 -6
- package/lib/cjs/duet-textarea.cjs.entry.js +3 -3
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +5 -5
- package/lib/cjs/duet-toolbar-item.cjs.entry.js +7 -7
- package/lib/cjs/duet-toolbar-link.cjs.entry.js +3 -3
- package/lib/cjs/duet-toolbar.cjs.entry.js +3 -3
- package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +6 -6
- package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
- package/lib/cjs/duet-tray.cjs.entry.js +4 -4
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +2 -2
- package/lib/cjs/duet-upload-item.cjs.entry.js +5 -5
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +2 -2
- package/lib/cjs/duet.cjs.js +3 -3
- package/lib/cjs/{errorcodes.utils-4059c3de.js → errorcodes.utils-dc219661.js} +1 -1
- package/lib/cjs/{focus-utils-b50cfb47.js → focus-utils-21fac156.js} +1 -1
- package/lib/cjs/{index-ae9c685d.js → index-e6a117fc.js} +11 -3
- package/lib/cjs/{language-utils-eb134c64.js → language-utils-c291fe9b.js} +1 -1
- package/lib/cjs/loader.cjs.js +3 -3
- package/lib/cjs/{slot-utils-66b2afa4.js → slot-utils-8d10ec0a.js} +1 -1
- package/lib/collection/collection-manifest.json +1 -0
- package/lib/collection/components/duet-badge/duet-badge.js +2 -2
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +4 -4
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +2 -2
- package/lib/collection/components/duet-button/duet-button.css +32 -18
- package/lib/collection/components/duet-button/duet-button.js +6 -6
- package/lib/collection/components/duet-callout/duet-callout.js +2 -2
- package/lib/collection/components/duet-chip/duet-chip.js +1 -1
- package/lib/collection/components/duet-choice/duet-checkmark.js +2 -2
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +2 -2
- package/lib/collection/components/duet-contact-card/duet-contact-card.js +2 -2
- package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
- package/lib/collection/components/duet-divider/duet-divider.js +1 -1
- package/lib/collection/components/duet-empty-state/duet-empty-state.js +2 -2
- package/lib/collection/components/duet-fieldset/duet-fieldset.js +3 -3
- package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +1 -1
- package/lib/collection/components/duet-footer/duet-footer.js +4 -4
- package/lib/collection/components/duet-heading/duet-heading.js +22 -2
- package/lib/collection/components/duet-hero/duet-hero.js +5 -5
- package/lib/collection/components/duet-icon/duet-icon.js +3 -3
- package/lib/collection/components/duet-input/duet-input.css +34 -3
- package/lib/collection/components/duet-input/duet-input.js +4 -4
- package/lib/collection/components/duet-layout/duet-layout.js +5 -5
- package/lib/collection/components/duet-link/duet-link.js +2 -2
- package/lib/collection/components/duet-list/duet-list.js +1 -1
- package/lib/collection/components/duet-list-item/duet-list-item.js +2 -2
- package/lib/collection/components/duet-logo/duet-logo.js +1 -1
- package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +2 -2
- package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +2 -2
- package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.js +4 -4
- package/lib/collection/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-menu-bar-item/duet-menu-bar-item.js +2 -2
- package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +2 -2
- package/lib/collection/components/duet-modal/duet-modal.js +6 -6
- package/lib/collection/components/duet-multiselect/duet-multiselect.js +5 -5
- package/lib/collection/components/duet-nav/duet-nav.js +1 -1
- package/lib/collection/components/duet-notification/duet-notification.js +2 -2
- package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +2 -2
- package/lib/collection/components/duet-overlay/duet-overlay.js +1 -1
- package/lib/collection/components/duet-page-heading/duet-page-heading.js +2 -2
- package/lib/collection/components/duet-pagination/duet-pagination.js +11 -11
- package/lib/collection/components/duet-paragraph/duet-paragraph.js +2 -2
- package/lib/collection/components/duet-phone-input/duet-phone-input.css +61 -0
- package/lib/collection/components/duet-phone-input/duet-phone-input.js +802 -0
- package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +69 -9
- package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +2 -2
- package/lib/collection/components/duet-promo-card/duet-promo-card.js +2 -2
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +2 -2
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +11 -6
- package/lib/collection/components/duet-section-layout/duet-section-layout.js +3 -3
- package/lib/collection/components/duet-shaped-image/duet-shaped-image.js +2 -2
- package/lib/collection/components/duet-show-more/duet-show-more.js +2 -2
- package/lib/collection/components/duet-slideout/duet-slideout.js +4 -4
- package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +1 -1
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.css +17 -2
- package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +90 -2
- package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +6 -6
- package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +4 -4
- package/lib/collection/components/duet-spacer/duet-spacer.js +1 -1
- package/lib/collection/components/duet-spinner/duet-spinner.js +2 -2
- package/lib/collection/components/duet-status-icon/duet-status-icon.js +2 -2
- package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
- package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.js +5 -5
- package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +4 -4
- package/lib/collection/components/duet-submenu-bar-dropdown-link/duet-submenu-bar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-submenu-bar-item/duet-submenu-bar-item.js +1 -1
- package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.js +1 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +4 -4
- package/lib/collection/components/duet-table/duet-table.js +2 -2
- package/lib/collection/components/duet-toolbar/duet-toolbar.js +2 -2
- package/lib/collection/components/duet-toolbar-dropdown/duet-toolbar-dropdown.js +4 -4
- package/lib/collection/components/duet-toolbar-dropdown-link/duet-toolbar-dropdown-link.js +2 -2
- package/lib/collection/components/duet-toolbar-item/duet-toolbar-item.js +3 -3
- package/lib/collection/components/duet-toolbar-link/duet-toolbar-link.js +2 -2
- package/lib/collection/components/duet-tooltip/duet-tooltip-button.js +2 -2
- package/lib/collection/components/duet-tooltip/duet-tooltip-popup.js +2 -2
- package/lib/collection/components/duet-tray/duet-tray.js +2 -2
- package/lib/collection/components/duet-upload/duet-upload.js +2 -2
- package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +1 -1
- package/lib/collection/components/duet-upload-item/duet-upload-item.js +2 -2
- package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +1 -1
- package/lib/collection/data/countries.js +1762 -0
- package/lib/dist-custom-elements/duet-action-button.js +1 -1
- package/lib/dist-custom-elements/duet-alert.js +1 -1
- package/lib/dist-custom-elements/duet-badge.js +1 -1
- package/lib/dist-custom-elements/duet-banner.js +3 -3
- package/lib/dist-custom-elements/duet-breadcrumb.js +7 -7
- package/lib/dist-custom-elements/duet-breadcrumbs.js +3 -3
- package/lib/dist-custom-elements/duet-button.js +1 -1
- package/lib/dist-custom-elements/duet-callout.js +4 -4
- package/lib/dist-custom-elements/duet-caption.js +1 -1
- package/lib/dist-custom-elements/duet-card.js +3 -3
- package/lib/dist-custom-elements/duet-checkbox.js +1 -1
- package/lib/dist-custom-elements/duet-checkmark.js +1 -1
- package/lib/dist-custom-elements/duet-chip.js +1 -1
- package/lib/dist-custom-elements/duet-choice-group.js +8 -8
- package/lib/dist-custom-elements/duet-choice.js +4 -4
- package/lib/dist-custom-elements/duet-collapsible.js +5 -5
- package/lib/dist-custom-elements/duet-combobox.js +15 -15
- package/lib/dist-custom-elements/duet-contact-card.js +10 -10
- package/lib/dist-custom-elements/duet-cookie-consent.js +7 -7
- package/lib/dist-custom-elements/duet-date-picker.js +13 -13
- package/lib/dist-custom-elements/duet-divider.js +1 -1
- package/lib/dist-custom-elements/duet-editable-table.js +7 -7
- package/lib/dist-custom-elements/duet-empty-state.js +1 -1
- package/lib/dist-custom-elements/duet-fieldset.js +1 -1
- package/lib/dist-custom-elements/duet-file-chooser.js +3 -3
- package/lib/dist-custom-elements/duet-footer.js +11 -11
- package/lib/dist-custom-elements/duet-grid-item.js +1 -1
- package/lib/dist-custom-elements/duet-grid.js +1 -1
- package/lib/dist-custom-elements/duet-header.js +8 -8
- package/lib/dist-custom-elements/duet-heading.js +1 -1
- package/lib/dist-custom-elements/duet-hero.js +14 -14
- package/lib/dist-custom-elements/duet-icon.js +1 -1
- package/lib/dist-custom-elements/duet-input.js +1 -1
- package/lib/dist-custom-elements/duet-label.js +1 -1
- package/lib/dist-custom-elements/duet-layout.js +6 -6
- package/lib/dist-custom-elements/duet-link.js +1 -1
- package/lib/dist-custom-elements/duet-list-item.js +1 -1
- package/lib/dist-custom-elements/duet-list.js +1 -1
- package/lib/dist-custom-elements/duet-logo.js +1 -1
- package/lib/dist-custom-elements/duet-menu-bar-button.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-menu-bar-item.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar-link.js +4 -4
- package/lib/dist-custom-elements/duet-menu-bar.js +4 -4
- package/lib/dist-custom-elements/duet-modal.js +14 -14
- package/lib/dist-custom-elements/duet-multiselect.js +14 -14
- package/lib/dist-custom-elements/duet-nav.js +2 -2
- package/lib/dist-custom-elements/duet-notification-drawer.js +6 -6
- package/lib/dist-custom-elements/duet-notification.js +4 -4
- package/lib/dist-custom-elements/duet-number-input.js +11 -11
- package/lib/dist-custom-elements/duet-overlay.js +1 -1
- package/lib/dist-custom-elements/duet-page-heading.js +5 -5
- package/lib/dist-custom-elements/duet-pagination.js +24 -24
- package/lib/dist-custom-elements/duet-paragraph.js +1 -1
- package/lib/dist-custom-elements/duet-phone-input.d.ts +11 -0
- package/lib/dist-custom-elements/duet-phone-input.js +2135 -0
- package/lib/dist-custom-elements/duet-popup-menu-item.js +1 -1
- package/lib/dist-custom-elements/duet-popup-menu.js +1 -1
- package/lib/dist-custom-elements/duet-progress.js +1 -1
- package/lib/dist-custom-elements/duet-promo-card.js +5 -5
- package/lib/dist-custom-elements/duet-radio-group.js +8 -8
- package/lib/dist-custom-elements/duet-radio.js +1 -1
- package/lib/dist-custom-elements/duet-range-slider.js +2 -2
- package/lib/dist-custom-elements/duet-range-stepper.js +6 -6
- package/lib/dist-custom-elements/duet-scrollable.js +1 -1
- package/lib/dist-custom-elements/duet-section-layout.js +4 -4
- package/lib/dist-custom-elements/duet-select.js +1 -1
- package/lib/dist-custom-elements/duet-shaped-image.js +3 -3
- package/lib/dist-custom-elements/duet-show-more.js +1 -1
- package/lib/dist-custom-elements/duet-slideout-lang.js +3 -3
- package/lib/dist-custom-elements/duet-slideout-link.js +25 -6
- package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-slideout-panel.js +8 -8
- package/lib/dist-custom-elements/duet-slideout.js +7 -7
- package/lib/dist-custom-elements/duet-spacer.js +1 -1
- package/lib/dist-custom-elements/duet-spinner.js +1 -1
- package/lib/dist-custom-elements/duet-status-icon.js +4 -4
- package/lib/dist-custom-elements/duet-step.js +4 -4
- package/lib/dist-custom-elements/duet-stepper.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +4 -4
- package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-submenu-bar-item.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar-link.js +3 -3
- package/lib/dist-custom-elements/duet-submenu-bar.js +8 -8
- package/lib/dist-custom-elements/duet-tab-group.js +11 -11
- package/lib/dist-custom-elements/duet-tab.js +1 -1
- package/lib/dist-custom-elements/duet-table.js +1 -1
- package/lib/dist-custom-elements/duet-textarea.js +10 -10
- package/lib/dist-custom-elements/duet-toggle.js +2 -2
- package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +4 -4
- package/lib/dist-custom-elements/duet-toolbar-dropdown.js +6 -6
- package/lib/dist-custom-elements/duet-toolbar-item.js +5 -5
- package/lib/dist-custom-elements/duet-toolbar-link.js +4 -4
- package/lib/dist-custom-elements/duet-toolbar.js +3 -3
- package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
- package/lib/dist-custom-elements/duet-tooltip.js +1 -1
- package/lib/dist-custom-elements/duet-tray.js +5 -5
- package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
- package/lib/dist-custom-elements/duet-upload-item.js +1 -1
- package/lib/dist-custom-elements/duet-upload.js +21 -21
- package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
- package/lib/dist-custom-elements/index.js +1 -1
- package/lib/dist-custom-elements/{p-f904de26.js → p-0a5495b6.js} +3 -3
- package/lib/dist-custom-elements/{p-12afa6a9.js → p-1219c53a.js} +4 -4
- package/lib/dist-custom-elements/{p-64e2d3ca.js → p-1237d11e.js} +8 -8
- package/lib/dist-custom-elements/{p-682759c1.js → p-1a132b1a.js} +1 -1
- package/lib/dist-custom-elements/{p-cf7ebeca.js → p-1f0fcce4.js} +16 -11
- package/lib/dist-custom-elements/{p-e7837082.js → p-2b1e6b5d.js} +3 -3
- package/lib/dist-custom-elements/{p-5f69b1a3.js → p-2c7e8fea.js} +6 -6
- package/lib/dist-custom-elements/{p-fc719f13.js → p-35112a3e.js} +5 -5
- package/lib/dist-custom-elements/{p-7bd61001.js → p-40b6cfdc.js} +10 -10
- package/lib/dist-custom-elements/{p-db63d729.js → p-41f565f8.js} +2 -2
- package/lib/dist-custom-elements/{p-e40f6f72.js → p-49e93494.js} +4 -4
- package/lib/dist-custom-elements/{p-ea1b9fd2.js → p-4a747b86.js} +1 -1
- package/lib/dist-custom-elements/{p-20670f23.js → p-4ac79666.js} +6 -4
- package/lib/dist-custom-elements/{p-3cebc38f.js → p-4bbce223.js} +1 -1
- package/lib/dist-custom-elements/{p-6c512deb.js → p-57030e72.js} +3 -3
- package/lib/dist-custom-elements/{p-8bb33e70.js → p-5814136c.js} +3 -3
- package/lib/dist-custom-elements/{p-2bba9071.js → p-5d240efc.js} +12 -12
- package/lib/dist-custom-elements/{p-996b724b.js → p-629b86f6.js} +4 -4
- package/lib/dist-custom-elements/{p-a8105585.js → p-6f0a0708.js} +1 -1
- package/lib/dist-custom-elements/{p-81287261.js → p-75e0f2c0.js} +264 -1
- package/lib/dist-custom-elements/{p-8c206875.js → p-80b6a631.js} +3 -3
- package/lib/dist-custom-elements/{p-9d6b2f72.js → p-80d7e109.js} +3 -3
- package/lib/dist-custom-elements/{p-96198aec.js → p-87b5d28b.js} +5 -5
- package/lib/dist-custom-elements/{p-fa1cdac3.js → p-8df0e44b.js} +3 -3
- package/lib/dist-custom-elements/{p-0ead9c70.js → p-8eb7fe43.js} +2 -2
- package/lib/dist-custom-elements/{p-84a16ba6.js → p-9baca56c.js} +1 -1
- package/lib/dist-custom-elements/{p-792db7b0.js → p-9e44038b.js} +1 -1
- package/lib/dist-custom-elements/{p-3e337443.js → p-b6c1319b.js} +2 -2
- package/lib/dist-custom-elements/{p-43578452.js → p-d34a377a.js} +119 -12
- package/lib/dist-custom-elements/{p-32dde064.js → p-d40633ba.js} +3 -3
- package/lib/dist-custom-elements/{p-919a3f56.js → p-d6afe712.js} +7 -7
- package/lib/dist-custom-elements/{p-95bf575a.js → p-da3f596f.js} +2 -2
- package/lib/dist-custom-elements/{p-2218a02d.js → p-de88ebc9.js} +2 -2
- package/lib/dist-custom-elements/{p-eb8c49d0.js → p-e639defe.js} +4 -4
- package/lib/dist-custom-elements/{p-57b14f14.js → p-ea83aa97.js} +4 -4
- package/lib/dist-custom-elements/{p-b1d9f172.js → p-eb67694d.js} +2 -2
- package/lib/dist-custom-elements/{p-55baf5dc.js → p-eee324c4.js} +3 -3
- package/lib/dist-custom-elements/{p-1783819b.js → p-f58c99dc.js} +12 -12
- package/lib/dist-custom-elements/{p-9613c7ae.js → p-ffd0da9c.js} +2 -2
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-2590f7b0.system.entry.js → p-004f4889.system.entry.js} +1 -1
- package/lib/duet/{p-7e67797a.system.entry.js → p-005170b7.system.entry.js} +1 -1
- package/lib/duet/{p-53c14a6d.system.entry.js → p-00a09206.system.entry.js} +1 -1
- package/lib/duet/{p-d8a7a6eb.entry.js → p-02464eab.entry.js} +1 -1
- package/lib/duet/{p-c06b8830.system.entry.js → p-025b2278.system.entry.js} +1 -1
- package/lib/duet/{p-5817c9a6.entry.js → p-078b7a5e.entry.js} +1 -1
- package/lib/duet/p-082839ec.entry.js +4 -0
- package/lib/duet/{p-05bd5fc1.system.entry.js → p-08d304b6.system.entry.js} +1 -1
- package/lib/duet/{p-67b77e1a.system.entry.js → p-09b58b33.system.entry.js} +1 -1
- package/lib/duet/{p-89a86ebc.system.entry.js → p-09e94e65.system.entry.js} +1 -1
- package/lib/duet/{p-edda0b76.system.entry.js → p-0a3c17d4.system.entry.js} +1 -1
- package/lib/duet/{p-6791795c.entry.js → p-0b690c76.entry.js} +1 -1
- package/lib/duet/{p-5c6fa752.entry.js → p-0c24394e.entry.js} +1 -1
- package/lib/duet/p-0c618613.entry.js +4 -0
- package/lib/duet/{p-59cbcc2e.system.js → p-0d75b285.system.js} +1 -1
- package/lib/duet/p-0e5ef946.js +4 -0
- package/lib/duet/{p-f1f562bb.entry.js → p-0ecd1f95.entry.js} +1 -1
- package/lib/duet/p-12e049bd.system.js +4 -0
- package/lib/duet/p-14618c69.entry.js +4 -0
- package/lib/duet/{p-d451ec53.entry.js → p-147d6e48.entry.js} +1 -1
- package/lib/duet/p-152229b6.entry.js +4 -0
- package/lib/duet/{p-e51fe789.entry.js → p-159d4c32.entry.js} +1 -1
- package/lib/duet/{p-bca39a19.system.entry.js → p-19516bf2.system.entry.js} +1 -1
- package/lib/duet/{p-9b6794b3.entry.js → p-1a67a738.entry.js} +1 -1
- package/lib/duet/p-1aaa8644.system.entry.js +4 -0
- package/lib/duet/{p-bca6125e.entry.js → p-1dd3ef28.entry.js} +1 -1
- package/lib/duet/{p-e8334ed1.entry.js → p-1e540c4c.entry.js} +1 -1
- package/lib/duet/{p-f6f21b70.entry.js → p-1ea7e7a7.entry.js} +1 -1
- package/lib/duet/{p-1e4e0a4d.entry.js → p-20577153.entry.js} +1 -1
- package/lib/duet/{p-b5c7f8cd.entry.js → p-22884344.entry.js} +1 -1
- package/lib/duet/{p-59339a3e.system.entry.js → p-230d0772.system.entry.js} +1 -1
- package/lib/duet/{p-fa03d3b3.system.entry.js → p-23dafa29.system.entry.js} +1 -1
- package/lib/duet/{p-42ed9cf5.entry.js → p-248d1fc1.entry.js} +1 -1
- package/lib/duet/{p-4aa4bece.system.entry.js → p-24aece3a.system.entry.js} +1 -1
- package/lib/duet/{p-ee3b1868.system.entry.js → p-24fc6b8a.system.entry.js} +1 -1
- package/lib/duet/{p-709882f3.system.entry.js → p-25aca626.system.entry.js} +1 -1
- package/lib/duet/{p-472dab44.system.entry.js → p-263ba5bc.system.entry.js} +1 -1
- package/lib/duet/p-276503fe.system.entry.js +4 -0
- package/lib/duet/p-27b82d35.entry.js +4 -0
- package/lib/duet/{p-4ec25d4a.system.js → p-27f2bc53.system.js} +1 -1
- package/lib/duet/{p-653c75c3.system.entry.js → p-28ce8dcb.system.entry.js} +1 -1
- package/lib/duet/p-2922d3fe.entry.js +4 -0
- package/lib/duet/{p-c05be5e1.entry.js → p-29641354.entry.js} +1 -1
- package/lib/duet/{p-7df5aaf6.system.entry.js → p-333be6f6.system.entry.js} +2 -2
- package/lib/duet/{p-3a495087.entry.js → p-33f45e04.entry.js} +1 -1
- package/lib/duet/{p-8c8f2565.entry.js → p-34524a03.entry.js} +1 -1
- package/lib/duet/{p-73f5d7d3.system.entry.js → p-34f1a0c8.system.entry.js} +2 -2
- package/lib/duet/{p-b99e40e7.entry.js → p-383d480f.entry.js} +1 -1
- package/lib/duet/{p-f89203db.entry.js → p-39293af6.entry.js} +1 -1
- package/lib/duet/{p-05673dd4.system.entry.js → p-398ffdcd.system.entry.js} +1 -1
- package/lib/duet/{p-e64cdc3b.system.entry.js → p-39934ea9.system.entry.js} +1 -1
- package/lib/duet/{p-3a0a60fb.system.entry.js → p-3ad59868.system.entry.js} +1 -1
- package/lib/duet/{p-d72393c6.entry.js → p-3b1d8855.entry.js} +1 -1
- package/lib/duet/{p-7abde534.system.js → p-3b451879.system.js} +1 -1
- package/lib/duet/{p-475672d1.entry.js → p-3c520d06.entry.js} +1 -1
- package/lib/duet/{p-a6f485ce.system.entry.js → p-404880c0.system.entry.js} +1 -1
- package/lib/duet/{p-b2a5f5d0.entry.js → p-40525c72.entry.js} +1 -1
- package/lib/duet/{p-3b88a791.system.entry.js → p-416a6b00.system.entry.js} +1 -1
- package/lib/duet/p-427c3017.system.entry.js +4 -0
- package/lib/duet/{p-5b2030f6.entry.js → p-4513706a.entry.js} +1 -1
- package/lib/duet/{p-b77c2cc1.entry.js → p-457121d7.entry.js} +1 -1
- package/lib/duet/{p-df67d91b.system.entry.js → p-457d4e7b.system.entry.js} +1 -1
- package/lib/duet/{p-b2fbe44f.entry.js → p-4b998fe4.entry.js} +1 -1
- package/lib/duet/p-4d569314.entry.js +4 -0
- package/lib/duet/{p-49cddce5.system.entry.js → p-4d88d4d8.system.entry.js} +1 -1
- package/lib/duet/{p-7ae20674.system.entry.js → p-4ede4c9b.system.entry.js} +1 -1
- package/lib/duet/{p-3ee0e7a2.system.entry.js → p-50d381f8.system.entry.js} +1 -1
- package/lib/duet/p-531431a4.entry.js +4 -0
- package/lib/duet/{p-d3ba2b21.entry.js → p-54d22e9f.entry.js} +1 -1
- package/lib/duet/{p-5e98b366.system.entry.js → p-559373ce.system.entry.js} +1 -1
- package/lib/duet/{p-968c2680.entry.js → p-56172ea4.entry.js} +1 -1
- package/lib/duet/p-56d25af6.entry.js +4 -0
- package/lib/duet/{p-849a093c.system.entry.js → p-57ed1115.system.entry.js} +1 -1
- package/lib/duet/{p-e1d6e640.system.entry.js → p-5b19279e.system.entry.js} +1 -1
- package/lib/duet/{p-0620d479.system.entry.js → p-5cb308e3.system.entry.js} +1 -1
- package/lib/duet/{p-1dbbe6df.system.entry.js → p-5e37ae74.system.entry.js} +1 -1
- package/lib/duet/{p-f8cda4cb.entry.js → p-5e587df2.entry.js} +1 -1
- package/lib/duet/{p-09fea5ea.system.entry.js → p-608d87af.system.entry.js} +1 -1
- package/lib/duet/{p-c1030c78.entry.js → p-61df374f.entry.js} +1 -1
- package/lib/duet/{p-2f333676.system.entry.js → p-62467dcd.system.entry.js} +2 -2
- package/lib/duet/p-635329d5.js +4 -0
- package/lib/duet/{p-e9d69dba.entry.js → p-63a85911.entry.js} +1 -1
- package/lib/duet/p-63a866fd.entry.js +4 -0
- package/lib/duet/{p-87cc03bb.system.entry.js → p-63c713ac.system.entry.js} +1 -1
- package/lib/duet/{p-4261665d.system.entry.js → p-68f1ac3d.system.entry.js} +1 -1
- package/lib/duet/{p-05fcbe8e.system.entry.js → p-6989245e.system.entry.js} +1 -1
- package/lib/duet/{p-c71a58da.js → p-6be21d53.js} +1 -1
- package/lib/duet/{p-3677dc32.entry.js → p-6cdf7d12.entry.js} +1 -1
- package/lib/duet/{p-2b8d5ebf.system.entry.js → p-6f585b8e.system.entry.js} +1 -1
- package/lib/duet/{p-7b39ff48.entry.js → p-701148c7.entry.js} +1 -1
- package/lib/duet/{p-1f521358.system.entry.js → p-70565a72.system.entry.js} +1 -1
- package/lib/duet/{p-457a2d83.system.entry.js → p-73d6f3f1.system.entry.js} +1 -1
- package/lib/duet/{p-f2a35fdd.entry.js → p-7404823f.entry.js} +1 -1
- package/lib/duet/{p-9ea49d85.system.entry.js → p-79dfa1cd.system.entry.js} +1 -1
- package/lib/duet/{p-042e2fe8.entry.js → p-7a55ccd4.entry.js} +1 -1
- package/lib/duet/{p-9c4c9249.system.entry.js → p-7b464a76.system.entry.js} +1 -1
- package/lib/duet/{p-ad2f0283.system.entry.js → p-7c217bba.system.entry.js} +1 -1
- package/lib/duet/{p-d46c21c3.system.entry.js → p-7e74329c.system.entry.js} +2 -2
- package/lib/duet/{p-ddc04775.entry.js → p-7f8cd5ca.entry.js} +1 -1
- package/lib/duet/p-7faa23b3.entry.js +4 -0
- package/lib/duet/{p-72b3dc7c.entry.js → p-7ff5d518.entry.js} +1 -1
- package/lib/duet/{p-99110a93.entry.js → p-81779e0c.entry.js} +1 -1
- package/lib/duet/{p-d2a5a09f.js → p-82fc6160.js} +1 -1
- package/lib/duet/{p-e39b4df9.system.entry.js → p-83827bc3.system.entry.js} +1 -1
- package/lib/duet/{p-758432df.entry.js → p-85f02853.entry.js} +1 -1
- package/lib/duet/p-891a644e.system.js +4 -0
- package/lib/duet/{p-5e988172.system.entry.js → p-8a4d54c7.system.entry.js} +1 -1
- package/lib/duet/{p-9a1ede4b.system.entry.js → p-8bcec5d9.system.entry.js} +1 -1
- package/lib/duet/{p-f2a5e96f.entry.js → p-8ea137df.entry.js} +1 -1
- package/lib/duet/{p-829f18ac.entry.js → p-8fe213ce.entry.js} +1 -1
- package/lib/duet/{p-242c72b4.entry.js → p-9342741d.entry.js} +1 -1
- package/lib/duet/{p-3b03ad48.js → p-93c1b76f.js} +1 -1
- package/lib/duet/p-958736f6.entry.js +4 -0
- package/lib/duet/{p-3945d323.system.entry.js → p-960955b8.system.entry.js} +1 -1
- package/lib/duet/{p-23c363ea.system.entry.js → p-981c3a70.system.entry.js} +1 -1
- package/lib/duet/{p-ee268c5a.entry.js → p-987c6807.entry.js} +1 -1
- package/lib/duet/{p-75e262dd.system.entry.js → p-9c346e3e.system.entry.js} +1 -1
- package/lib/duet/{p-fae62327.system.entry.js → p-9f2d018f.system.entry.js} +1 -1
- package/lib/duet/{p-3a5017af.entry.js → p-9f4deff5.entry.js} +1 -1
- package/lib/duet/{p-373e1b99.entry.js → p-a56e7b3e.entry.js} +1 -1
- package/lib/duet/{p-b6e4d58e.system.entry.js → p-a596cd3a.system.entry.js} +1 -1
- package/lib/duet/{p-7b249d64.system.entry.js → p-a79b216a.system.entry.js} +1 -1
- package/lib/duet/{p-31fcb811.entry.js → p-a8ba38dd.entry.js} +1 -1
- package/lib/duet/{p-75e12142.js → p-ac43ccbd.js} +1 -1
- package/lib/duet/p-adf55373.system.entry.js +4 -0
- package/lib/duet/{p-6e1b9c32.system.entry.js → p-af2289ca.system.entry.js} +2 -2
- package/lib/duet/{p-fd38377e.system.entry.js → p-af4ddc28.system.entry.js} +1 -1
- package/lib/duet/{p-b2f48572.entry.js → p-b1cc50bc.entry.js} +1 -1
- package/lib/duet/{p-d1274fac.entry.js → p-b25b4fa7.entry.js} +1 -1
- package/lib/duet/{p-dc807a5c.system.js → p-b3cb308a.system.js} +1 -1
- package/lib/duet/{p-b7393278.entry.js → p-bb93284d.entry.js} +1 -1
- package/lib/duet/{p-e9d570bf.entry.js → p-bbff29df.entry.js} +1 -1
- package/lib/duet/{p-3f8677ac.system.js → p-bca7337f.system.js} +1 -1
- package/lib/duet/{p-f5e1a0cc.entry.js → p-be1b4801.entry.js} +1 -1
- package/lib/duet/{p-2bb74e72.entry.js → p-c002302d.entry.js} +1 -1
- package/lib/duet/{p-d5a1fea0.entry.js → p-c18cf73d.entry.js} +1 -1
- package/lib/duet/{p-ef16cf2f.system.entry.js → p-c1ad9533.system.entry.js} +1 -1
- package/lib/duet/{p-2a4b6723.system.entry.js → p-c25ffdd4.system.entry.js} +1 -1
- package/lib/duet/p-c5850fb4.entry.js +4 -0
- package/lib/duet/{p-6460ecdd.entry.js → p-c67bc178.entry.js} +1 -1
- package/lib/duet/p-c77f6d5d.entry.js +4 -0
- package/lib/duet/{p-f3e0a76f.system.entry.js → p-c82bf6d3.system.entry.js} +1 -1
- package/lib/duet/{p-2822c55e.system.entry.js → p-c8ebba85.system.entry.js} +1 -1
- package/lib/duet/{p-c6564753.system.entry.js → p-cc425ef7.system.entry.js} +1 -1
- package/lib/duet/{p-8d66d9ff.entry.js → p-ccc9d700.entry.js} +1 -1
- package/lib/duet/{p-fe63ab87.system.entry.js → p-ce0aeaf2.system.entry.js} +2 -2
- package/lib/duet/p-d02896d8.js +4 -0
- package/lib/duet/p-d070e142.system.entry.js +4 -0
- package/lib/duet/{p-6b4ca314.entry.js → p-d0e04b56.entry.js} +1 -1
- package/lib/duet/{p-a488b792.system.entry.js → p-d3d379cf.system.entry.js} +1 -1
- package/lib/duet/{p-714399a1.system.entry.js → p-d4d5d006.system.entry.js} +1 -1
- package/lib/duet/{p-07be03a5.system.js → p-d526e143.system.js} +1 -1
- package/lib/duet/{p-d1219b00.system.entry.js → p-d63f49eb.system.entry.js} +1 -1
- package/lib/duet/p-d67da533.system.entry.js +4 -0
- package/lib/duet/{p-e8eed1e6.entry.js → p-d754a42c.entry.js} +1 -1
- package/lib/duet/{p-58f49211.system.entry.js → p-dcb533d6.system.entry.js} +1 -1
- package/lib/duet/{p-1a045554.entry.js → p-dd9d2671.entry.js} +1 -1
- package/lib/duet/{p-9f5a2024.entry.js → p-df0fb865.entry.js} +1 -1
- package/lib/duet/{p-ab2b67ab.entry.js → p-df7ef805.entry.js} +1 -1
- package/lib/duet/{p-3215139d.system.entry.js → p-e0b8ed9a.system.entry.js} +1 -1
- package/lib/duet/{p-93c4d3c3.system.entry.js → p-e1d536a6.system.entry.js} +1 -1
- package/lib/duet/{p-a220b676.entry.js → p-e1ec6cd6.entry.js} +1 -1
- package/lib/duet/{p-53a07476.system.entry.js → p-e2cb818b.system.entry.js} +1 -1
- package/lib/duet/{p-2c565a29.entry.js → p-e2e8a654.entry.js} +1 -1
- package/lib/duet/{p-243553ce.entry.js → p-e3454275.entry.js} +1 -1
- package/lib/duet/{p-37631fb0.system.entry.js → p-e3834dc3.system.entry.js} +1 -1
- package/lib/duet/{p-dfe8ce73.system.entry.js → p-e4f41663.system.entry.js} +1 -1
- package/lib/duet/{p-f409cd1f.system.entry.js → p-e6563981.system.entry.js} +2 -2
- package/lib/duet/{p-3e9b5b6f.entry.js → p-e7d36069.entry.js} +1 -1
- package/lib/duet/{p-5b8b0f3b.entry.js → p-f2a9ebce.entry.js} +1 -1
- package/lib/duet/p-f33aace0.entry.js +4 -0
- package/lib/duet/p-f6ecfb29.system.entry.js +4 -0
- package/lib/duet/p-f75cbdb7.system.entry.js +4 -0
- package/lib/duet/{p-27aab6b1.entry.js → p-f9189172.entry.js} +1 -1
- package/lib/duet/{p-772f84d7.system.entry.js → p-f989f433.system.entry.js} +1 -1
- package/lib/duet/{p-52d6efa6.system.entry.js → p-fb841ad4.system.entry.js} +1 -1
- package/lib/duet/{p-03d1fe77.entry.js → p-fbc20d2d.entry.js} +1 -1
- package/lib/duet/{p-f12da4d6.system.entry.js → p-ff948c06.system.entry.js} +1 -1
- package/lib/duet/{p-e5ef5e89.entry.js → p-ffb66495.entry.js} +1 -1
- package/lib/esm/{a11y-utils-47ea468e.js → a11y-utils-42550857.js} +1 -1
- package/lib/esm/{app-globals-52a8e9e5.js → app-globals-e40eeed5.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +2 -2
- package/lib/esm/duet-alert.entry.js +3 -3
- package/lib/esm/duet-badge.entry.js +3 -3
- package/lib/esm/duet-banner.entry.js +2 -2
- package/lib/esm/duet-breadcrumb.entry.js +6 -6
- package/lib/esm/duet-breadcrumbs.entry.js +4 -4
- package/lib/esm/duet-button_2.entry.js +10 -10
- package/lib/esm/duet-callout.entry.js +4 -4
- package/lib/esm/duet-caption_4.entry.js +11 -10
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-checkmark.entry.js +3 -3
- package/lib/esm/{duet-chip_3.entry.js → duet-chip.entry.js} +5 -377
- package/lib/esm/duet-choice_2.entry.js +3 -3
- package/lib/esm/duet-collapsible.entry.js +4 -4
- package/lib/esm/duet-combobox.entry.js +3 -3
- package/lib/esm/duet-contact-card.entry.js +4 -4
- package/lib/esm/duet-cookie-consent.entry.js +2 -2
- package/lib/esm/duet-date-picker.entry.js +4 -4
- package/lib/esm/duet-divider_2.entry.js +3 -3
- package/lib/esm/duet-editable-table_3.entry.js +7 -7
- package/lib/esm/duet-empty-state.entry.js +3 -3
- package/lib/esm/duet-fieldset.entry.js +5 -5
- package/lib/esm/duet-file-chooser.entry.js +2 -2
- package/lib/esm/duet-footer.entry.js +7 -7
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +3 -3
- package/lib/esm/duet-hero.entry.js +8 -8
- package/lib/esm/duet-icon.entry.js +4 -4
- package/lib/esm/duet-input_2.entry.js +5 -5
- package/lib/esm/duet-layout.entry.js +7 -7
- package/lib/esm/duet-list_2.entry.js +4 -4
- package/lib/esm/duet-menu-bar-button.entry.js +3 -3
- package/lib/esm/duet-menu-bar-dropdown-link.entry.js +3 -3
- package/lib/esm/duet-menu-bar-dropdown.entry.js +5 -5
- package/lib/esm/duet-menu-bar-item.entry.js +6 -6
- package/lib/esm/duet-menu-bar-link.entry.js +3 -3
- package/lib/esm/duet-menu-bar.entry.js +4 -4
- package/lib/esm/duet-modal.entry.js +10 -10
- package/lib/esm/duet-multiselect.entry.js +8 -8
- package/lib/esm/duet-nav.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +6 -6
- package/lib/esm/duet-number-input.entry.js +3 -3
- package/lib/esm/duet-overlay.entry.js +2 -2
- package/lib/esm/duet-page-heading.entry.js +3 -3
- package/lib/esm/duet-pagination_2.entry.js +15 -15
- package/lib/esm/duet-phone-input.entry.js +2004 -0
- package/lib/esm/duet-popup-menu_2.entry.js +421 -0
- package/lib/esm/duet-progress.entry.js +2 -2
- package/lib/esm/duet-promo-card.entry.js +4 -4
- package/lib/esm/duet-radio_2.entry.js +2 -2
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +18 -13
- package/lib/esm/duet-section-layout.entry.js +4 -4
- package/lib/esm/duet-select.entry.js +2 -2
- package/lib/esm/duet-shaped-image.entry.js +3 -3
- package/lib/esm/duet-show-more.entry.js +4 -4
- package/lib/esm/duet-slideout-lang.entry.js +3 -3
- package/lib/esm/duet-slideout-link.entry.js +22 -4
- package/lib/esm/duet-slideout-panel-dropdown.entry.js +5 -5
- package/lib/esm/duet-slideout-panel.entry.js +10 -10
- package/lib/esm/duet-slideout.entry.js +8 -8
- package/lib/esm/duet-status-icon.entry.js +3 -3
- package/lib/esm/duet-step_2.entry.js +2 -2
- package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +3 -3
- package/lib/esm/duet-submenu-bar-dropdown.entry.js +5 -5
- package/lib/esm/duet-submenu-bar-item.entry.js +5 -5
- package/lib/esm/duet-submenu-bar-link.entry.js +2 -2
- package/lib/esm/duet-submenu-bar.entry.js +6 -6
- package/lib/esm/duet-textarea.entry.js +3 -3
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-toolbar-dropdown-link.entry.js +3 -3
- package/lib/esm/duet-toolbar-dropdown.entry.js +5 -5
- package/lib/esm/duet-toolbar-item.entry.js +7 -7
- package/lib/esm/duet-toolbar-link.entry.js +3 -3
- package/lib/esm/duet-toolbar.entry.js +3 -3
- package/lib/esm/duet-tooltip-button_2.entry.js +6 -6
- package/lib/esm/duet-tooltip.entry.js +2 -2
- package/lib/esm/duet-tray.entry.js +4 -4
- package/lib/esm/duet-upload-aria-status.entry.js +2 -2
- package/lib/esm/duet-upload-item.entry.js +5 -5
- package/lib/esm/duet-visually-hidden.entry.js +2 -2
- package/lib/esm/duet.js +4 -4
- package/lib/esm/{errorcodes.utils-e55da25d.js → errorcodes.utils-871f54ed.js} +1 -1
- package/lib/esm/{focus-utils-b09f6029.js → focus-utils-3e4436c1.js} +1 -1
- package/lib/esm/{index-ed83a687.js → index-caf8af66.js} +11 -3
- package/lib/esm/{language-utils-d2c8afdc.js → language-utils-37fa60e1.js} +1 -1
- package/lib/esm/loader.js +4 -4
- package/lib/esm/{slot-utils-035ffb1f.js → slot-utils-44165de2.js} +1 -1
- package/lib/esm-es5/{a11y-utils-47ea468e.js → a11y-utils-42550857.js} +1 -1
- package/lib/esm-es5/{app-globals-52a8e9e5.js → app-globals-e40eeed5.js} +1 -1
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-banner.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +2 -2
- package/lib/esm-es5/duet-callout.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-checkmark.entry.js +1 -1
- package/lib/esm-es5/duet-chip.entry.js +4 -0
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-contact-card.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-file-chooser.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +2 -2
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +2 -2
- package/lib/esm-es5/duet-menu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-multiselect.entry.js +1 -1
- package/lib/esm-es5/duet-nav.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +2 -2
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-overlay.entry.js +1 -1
- package/lib/esm-es5/duet-page-heading.entry.js +1 -1
- package/lib/esm-es5/duet-pagination_2.entry.js +2 -2
- package/lib/esm-es5/duet-phone-input.entry.js +4 -0
- package/lib/esm-es5/duet-popup-menu_2.entry.js +4 -0
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-promo-card.entry.js +2 -2
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +2 -2
- package/lib/esm-es5/duet-section-layout.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
- package/lib/esm-es5/duet-show-more.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
- package/lib/esm-es5/duet-slideout.entry.js +2 -2
- package/lib/esm-es5/duet-status-icon.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-item.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
- package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +2 -2
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar-item.entry.js +2 -2
- package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
- package/lib/esm-es5/duet-toolbar.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-upload-item.entry.js +2 -2
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{errorcodes.utils-e55da25d.js → errorcodes.utils-871f54ed.js} +1 -1
- package/lib/esm-es5/focus-utils-3e4436c1.js +4 -0
- package/lib/esm-es5/index-caf8af66.js +4 -0
- package/lib/esm-es5/{language-utils-d2c8afdc.js → language-utils-37fa60e1.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/{slot-utils-035ffb1f.js → slot-utils-44165de2.js} +1 -1
- package/lib/types/components/duet-button/duet-button.d.ts +1 -1
- package/lib/types/components/duet-heading/duet-heading.d.ts +6 -0
- package/lib/types/components/duet-input/duet-input.d.ts +4 -3
- package/lib/types/components/duet-phone-input/duet-phone-input.d.ts +161 -0
- package/lib/types/components/duet-popup-menu/duet-popup-menu.d.ts +11 -1
- package/lib/types/components/duet-slideout-link/duet-slideout-link.d.ts +17 -0
- package/lib/types/components.d.ts +267 -2
- package/lib/types/data/countries.d.ts +22 -0
- package/package.json +4 -4
- package/lib/dist-custom-elements/p-b48eb919.js +0 -268
- package/lib/duet/p-05744ea4.entry.js +0 -4
- package/lib/duet/p-0dee442d.system.entry.js +0 -4
- package/lib/duet/p-0f354fb2.system.entry.js +0 -4
- package/lib/duet/p-15b3553c.system.entry.js +0 -4
- package/lib/duet/p-254f4171.entry.js +0 -4
- package/lib/duet/p-2f769f52.system.entry.js +0 -4
- package/lib/duet/p-46d7ebac.js +0 -4
- package/lib/duet/p-55d318e7.entry.js +0 -4
- package/lib/duet/p-571bc7a8.js +0 -4
- package/lib/duet/p-5bb1c4b6.entry.js +0 -4
- package/lib/duet/p-6044fe21.entry.js +0 -4
- package/lib/duet/p-7e0c5458.entry.js +0 -4
- package/lib/duet/p-8396cd14.entry.js +0 -4
- package/lib/duet/p-96ba9bdb.system.entry.js +0 -4
- package/lib/duet/p-97b9b2ae.entry.js +0 -4
- package/lib/duet/p-a1f1645c.system.entry.js +0 -4
- package/lib/duet/p-a4bab4d8.entry.js +0 -4
- package/lib/duet/p-bf4d22d5.system.js +0 -4
- package/lib/duet/p-c4fc305d.entry.js +0 -4
- package/lib/duet/p-ceb3a8ca.entry.js +0 -4
- package/lib/duet/p-d681c210.entry.js +0 -4
- package/lib/duet/p-da4d3c61.js +0 -4
- package/lib/duet/p-f1bb265f.entry.js +0 -4
- package/lib/duet/p-f872ec26.system.js +0 -4
- package/lib/esm-es5/duet-chip_3.entry.js +0 -4
- package/lib/esm-es5/focus-utils-b09f6029.js +0 -4
- package/lib/esm-es5/index-ed83a687.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,g as getElement,H as Host}from"./index-
|
|
4
|
+
import{r as registerInstance,h,g as getElement,H as Host}from"./index-caf8af66.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{g as getColorByName}from"./token-utils-a32eb753.js";import"./tokens.module-a746651a.js";var duetDividerCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:36px !important;margin-bottom:28px;background:rgb(212, 223, 229)}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:rgb(222, 224, 228)}";var DuetDividerStyle0=duetDividerCss;var DuetDivider=function(){function e(e){registerInstance(this,e);this.theme="";this.margin="auto";this.color=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){var e=getColorByName(this.color);return h("div",{key:"a8ffb4c7ae688f5132e92183c4f1505ae5137b44",class:{"duet-m-0":this.margin==="none","duet-m-s":this.margin==="small","duet-divider":true,"duet-theme-turva":this.theme==="turva"},style:{background:e}})};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetDivider.style=DuetDividerStyle0;var duetSpacerCss=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";var DuetSpacerStyle0=duetSpacerCss;var DuetSpacer=function(){function e(e){registerInstance(this,e);this.size="medium";this.direction="vertical";this.breakpoint=""}e.prototype.render=function(){var e;return h(Host,{key:"37319380d158f854c7b73b9fc3360a521c6660a3",class:(e={"duet-spacer":true,"duet-spacer-xx-small":this.breakpoint==="xx-small","duet-spacer-x-small":this.breakpoint==="x-small","duet-spacer-small":this.breakpoint==="small","duet-spacer-medium":this.breakpoint==="medium","duet-spacer-large":this.breakpoint==="large","duet-spacer-x-large":this.breakpoint==="x-large","duet-spacer-xx-large":this.breakpoint==="xx-large"},e[this.size]=true,e["duet-spacer-".concat(this.direction)]=true,e)})};return e}();DuetSpacer.style=DuetSpacerStyle0;export{DuetDivider as duet_divider,DuetSpacer as duet_spacer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,a,i){function n(t){return t instanceof a?t:new a((function(e){e(t)}))}return new(a||(a=Promise))((function(a,r){function d(t){try{l(i.next(t))}catch(t){r(t)}}function o(t){try{l(i["throw"](t))}catch(t){r(t)}}function l(t){t.done?a(t.value):n(t.value).then(d,o)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(t){return function(e){return l([t,e])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(a=0)),a)try{if(i=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(o[0]===6&&a.label<r[1]){a.label=r[1];r=o;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(o);break}if(r[2])a.ops.pop();a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t];n=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,a){if(a||arguments.length===2)for(var i=0,n=e.length,r;i<n;i++){if(r||!(i in e)){if(!r)r=Array.prototype.slice.call(e,0,i);r[i]=e[i]}}return t.concat(r||Array.prototype.slice.call(e))};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement,F as Fragment}from"./index-ed83a687.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{f as fieldSorter,d as debounce}from"./js-utils-9b9e0039.js";import{i as isKeyboardClick}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver,g as getLocaleString,s as sanitizeString}from"./language-utils-d2c8afdc.js";import{p as sizeNavigation,s as sizeHeader}from"./tokens.module-a746651a.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-a32eb753.js";import{c as createID}from"./create-id-149a1b6d.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";import{g as getError,a as getI18nError}from"./errorcodes.utils-e55da25d.js";var TableData=function(t,e){var a=t.data,i=t.groupId,n=t.alignment;var r="duet-editable-table duet-editable-table-content-".concat(i);if(typeof a==="string"){return h("td",{innerHTML:a,class:r,part:"".concat(i,"content"),style:{verticalAlign:n}})}else{return h("td",{class:r,part:"".concat(i,"content"),style:{verticalAlign:n}},a)}};var duetEditableTableCss=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";var DuetEditableTableStyle0=duetEditableTableCss;var DuetEditableTable=function(){function t(t){var e=this;registerInstance(this,t);this.duetTableToggle=createEvent(this,"duetTableToggle",7);this.duetMenuClick=createEvent(this,"duetMenuClick",7);this.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;this.hasFootSlot=false;this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"};this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"};this.toggleColumn=function(t,a){a.preventDefault();var i=t.sort_order,n=t.direction,r=t.index,d=t.key;e.duetTableToggle.emit({sort_order:i,index:r,direction:n,key:d,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(t,a){if(isKeyboardClick(a)){e.toggleColumn(t,a)}};this.language=getLanguage();this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined;this.hideHeadVisually=false}t.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']");this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")};t.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};t.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};t.prototype.createLabel=function(t){var e=this;var a=t.sort_order,i=t.direction,n=t.index,r=t.label;var d=getLocaleString(r);if(!this.sortable){return d}var o=function(){if(!!a&&i===1){return"action-arrow-down-small"}else if(!!a&&i===-1){return"action-arrow-up-small"}return"action-subtract-small"};return h("span",{class:"duet-table-label","data-index":n},h("duet-button",{size:"small",icon:o(),"icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":true,onClick:function(a){return e.toggleColumn(t,a)},onKeyDown:function(a){return e.handleKeyDown(t,a)}},d))};t.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(fieldSorter(["index"]))};t.prototype.getRowSortOrder=function(){var t=__spreadArray([],this.columns,true).sort(fieldSorter(["sort_order"]));return t.filter((function(t){return t.sort_order})).map((function(t){return t.direction===-1?"-".concat(t.key):t.key}))};t.prototype.renderTableHeader=function(){var t=this;if(!this.columns){return}var e=this.getSortedColumns();return h("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((function(e){if(e.display!==false){var a=t.createLabel(e);return a!==""?h("th",{scope:"col"},a):h("td",null)}})),this.actions&&h("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&h("duet-visually-hidden",null,this.actionColumnLabel[this.language])))};t.prototype.renderActions=function(t,e){var a=this;if(!this.actions){return}return h("td",{class:"duet-text-right"},this.actions.map((function(i){return h("duet-action-button",{actionMeta:Object.assign({},(t===null||t===void 0?void 0:t.meta)||{},{index:e}),actionId:(t===null||t===void 0?void 0:t.uid)||(t===null||t===void 0?void 0:t.id)||null,actionName:i.name,theme:a.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background,"accessible-label":"".concat(t.actionDescription||""," ").concat(getLocaleString(i.label)," ")})})))};t.prototype.renderTableBody=function(){var t=this;var e=this.getSortedColumns();var a=this.getRowSortOrder();var i=__spreadArray([],this.rows,true).sort(fieldSorter(a));return i.map((function(a,i){var n;return h("tr",{class:(n={"duet-table-action-row":!!t.actions,"duet-editable-table-row":true},n["duet-editable-table-row-".concat(t.groupId)]=true,n),"data-meta":JSON.stringify(a.meta)},e.map((function(e){var i=a[e.key]?a[e.key]:a.item;if(e.display!==false){return h(TableData,{data:i,groupId:t.groupId})}})),t.actions&&t.renderActions(a,i))}))};t.prototype.render=function(){var t;return h(Host,{class:(t={},t["duet-editable-table-".concat(this.variation)]=true,t["duet-editable-table"]=true,t["duet-editable-table-".concat(this.theme)]=true,t["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",t["duet-editable-table-sortable"]=this.sortable,t["duet-editable-table-actions"]=!!this.actions,t["duet-m-0"]=this.margin==="none",t["duet-theme-turva"]=this.theme==="turva",t)},h("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},h("table",{role:this.accessibleRole},h("caption",null,h("slot",{name:"tcaption"})),h("thead",null,this.hasHeadSlotFirst&&h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-last"})))),h("tbody",null,this.renderTableBody()),this.hasFootSlot&&h("tfoot",null,h("tr",null,h("td",{class:"duet-editable-table-footer-menu",colSpan:99},h("slot",{name:"tfoot"})))))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();DuetEditableTable.style=DuetEditableTableStyle0;var duetTableCss='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(8, 42, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}duet-table.duet-theme-turva th{color:rgb(143, 147, 158)}duet-table tbody th{font-weight:600;color:rgb(8, 42, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}duet-table span.duet-table-cell-heading{display:none}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(8, 42, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(222, 224, 228)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(222, 224, 228)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(222, 224, 228)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(98, 121, 138)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(113, 118, 132)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(222, 224, 228)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(222, 224, 228)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(222, 224, 228)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(113, 118, 132, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';var DuetTableStyle0=duetTableCss;var stickyTopValues={none:0,"with-links":parseFloat(sizeNavigation)*16,"without-links":parseFloat(sizeHeader)*16};var DuetTable=function(){function t(t){var e=this;registerInstance(this,t);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(t){e.matchesBreakpoint=breakpointTokensUpTo.includes(e.breakpoint)?!t.matches:t.matches};this.matchesBreakpoint=true;this.language=getLanguage();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}t.prototype.watchLanguageStateHandler=function(t,e){var a=this;if(t!==e){setTimeout((function(){return a.copyHeadingsToCells()}),50)}};t.prototype.connectedCallback=function(){var t=this;var e=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":breakpointToToken[this.breakpoint];this.mq=matchMedia(e);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return debounce(t.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};t.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var t=stickyTopValues[this.stickyDistance];var e=this.element.querySelectorAll(this.headingSelector);e.forEach((function(e){return e.style.top="".concat(t,"px")}))}};t.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null;connectLanguageChangeObserver(this)};t.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;disconnectLanguageChangeObserver(this)};t.prototype.copyHeadingsToCells=function(){var t=this.element.querySelectorAll(this.headingSelector);var e=this.element.querySelectorAll("tbody tr");var a=Array.from(t).map((function(t){return t.textContent.trim()}));e.forEach((function(t){t.querySelectorAll("td").forEach((function(t,e){if(a[e]){var i=t.querySelector(".duet-table-cell-heading");if(!i||i.textContent!==a[e]){i===null||i===void 0?void 0:i.remove();var n=document.createElement("span");n.textContent=a[e];n.classList.add("duet-table-cell-heading");n.setAttribute("aria-hidden","true");n.inert=true;t.prepend(n)}}}))}))};t.prototype.render=function(){var t;return h(Host,{key:"26ab3b66d99bdff07554198125e8867b84051c9f",class:(t={},t["duet-table-".concat(this.variation)]=true,t["duet-table-flattened"]=!this.matchesBreakpoint,t["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,t["duet-table-scrollable"]=this.breakpoint==="none-scrollable",t["duet-m-0"]=this.margin==="none",t["duet-theme-turva"]=this.theme==="turva",t["duet-table-hide-head-visually"]=this.hideHeadVisually,t)},h("slot",{key:"1df61c45d1faa92385e24949ff773ec71852e0a5"}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},enumerable:false,configurable:true});return t}();DuetTable.style=DuetTableStyle0;var errorCodes=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}];var headerAriaLabel={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"};var UploadItemHeader=function(t){var e=t.label,a=t.categoryLabel;return h("div",{class:"items-header",tabindex:"-1","aria-label":getLocaleString(headerAriaLabel)},a&&h("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(a)),h("duet-heading",{class:{"filename-header":true,"no-category":!a},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(e)))};var validateFileExtension=function(t,e){if(!e){return true}var a=t.split(".");var i=e.split(",");var n=a[a.length-1];return i.includes(n)};var validateFileMime=function(t,e){if(!e||!t){return true}var a=e.split(",");var i=false;a.forEach((function(e){var a=e.split("/");var n=t.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var validateFileSize=function(t,e){if(!e||!t){return true}return e>=t};var validateFile=function(t,e,a){var i=e.allowedMimetypes,n=e.allowedExtensions,r=e.maxBytes;var d=false;var o=getError("default",a);if(t){var l=t.name,s=t.type,u=t.size;var h=validateFileMime(s,i);var f=n==="all"||n===""||n===" "||n===undefined?true:validateFileExtension(l.toLowerCase(),n);var b=validateFileSize(u,r);if(!h){o=getError("duet-upload-101",a)}if(!f){o=getError("duet-upload-100",a)}if(!b){o=getError("duet-upload-201",a)}d=h&&f&&b}else{d=false}return{valid:d,errorMessage:d?undefined:getLocaleString(o.message),errorSystem:d?undefined:o.system_message,errorType:d?undefined:o.type}};var validateTotalSizeIsAboveMax=function(t,e){var a=0;if(e){t.forEach((function(t){if(t.valid&&t.size){a+=t.size}}));if(a>=e){return true}}return false};var validateTotalAmountIsAboveMax=function(t,e){var a=0;if(e){t.forEach((function(t){if(t.valid){a++}}));if(a>=e){return true}}return false};var filesToUploadCountAboveMax=function(t,e,a){if(t+e>a){return true}return false};var filesToUploadTotalSizeIsAboveMax=function(t,e,a){var i=0;if(a){t.forEach((function(t){if(t.valid&&t.size){i+=t.size}}));e.forEach((function(t){if(t.size){i+=t.size}}));if(i>=a){return true}}return false};var makeXhrRequest=function(t){var e=t.payload,a=t.options,i=t.onFailure,n=t.onSuccess,r=t.onProgress;var d=a.type,o=d===void 0?"POST":d,l=a.xhr,s=a.uri,u=a.argument,h=u===void 0?null:u,f=a.headers,b=f===void 0?null:f;l.open(o,"".concat(s).concat(h||""),true);var c=e.data,p=e.name;if(b){Object.keys(b).forEach((function(t){l.setRequestHeader(t,b[t])}))}if(o==="POST"){l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300){n(l,p,l.status)}if(l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999){i(l,p,l.status)}};r(p)}l.send(c);return l};var duetUploadCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";var DuetUploadStyle0=duetUploadCss;var DuetUpload=function(){function t(t){var e=this;registerInstance(this,t);this.duetChange=createEvent(this,"duetChange",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetReady=createEvent(this,"duetReady",7);this.duetDone=createEvent(this,"duetDone",3);this.duetState=createEvent(this,"duetState",3);this.duetDelete=createEvent(this,"duetDelete",3);this.duetCancel=createEvent(this,"duetCancel",3);this.duetProgress=createEvent(this,"duetProgress",3);this.duetUpload=createEvent(this,"duetUpload",3);this.linkClick=createEvent(this,"linkClick",3);this.buttonId=createID("DuetButton");this.labelId=createID("DuetLabel");this.uploadId=createID("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.filesToUploadExceedsLimit=false;this.filesToUploadTotalSizeIsAboveMax=false;this.internalStatusMessageLabel=undefined;this.itemRefs=new Map;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=debounce((function(){e.tick=Date.now()}),30);this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};this.listenForActionEvents=function(){e.element.addEventListener("duetActionEvent",(function(t){var a=t.detail;var i=a.action,n=a.id,r=a.originalEvent;switch(i){case"delete":e.onDelete(n,r);break;case"cancel":e.onCancel(n,r);break}}))};this.verifyValidity=function(){var t=e.getFilesAsArray(),a=t.invalid,i=t.valid;var n=e.valid;e.valid=a.length===0&&i.length!==0;if(e.valid!==n){e.duetState.emit({originalEvent:undefined,data:{valid:e.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(t){if(t.valid&&t.progress===100){return e.DefaultGroups.success}else if(t.progress>0&&t.progress!==100){return e.DefaultGroups.inprogress}else if(!t.valid){return e.DefaultGroups.failure}else if(t.pending){return e.DefaultGroups.pending}else if(t.group){return t.group}else{return"none"}};this.mapFilesToUploadItems=function(t,a,i,n){if(a===e.DefaultGroups.success){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"success",data:t,showLinks:e.showLinks,linkClickEvent:e.emitEvent?e.linkClick:undefined,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(a===e.DefaultGroups.inprogress){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"inprogress",data:t,showLinks:e.showLinks,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(a===e.DefaultGroups.pending){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"pending",data:t,showLinks:e.showLinks,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(a===e.DefaultGroups.failure){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"failure",data:t,showLinks:e.showLinks,errorCodes:e.errorCodes,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(t.group){return t.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(t,a,i,n){if(n===void 0){n=true}try{var r=e.files.get(t);r[a]=i;e.files.set(t,r);if(e.external&&a!=="url"){e.trackProgress(t,a==="uploaded")}}catch(t){}if(n){e.kick()}};this.updateProgress=function(t,a){var i=function(i){e.updateValueInMap(a,"progress",i);e.onProgress(a,i,t)};if(t.lengthComputable){var n=t.loaded/t.total*100;i(n)}else{console.log("cant read progress")}};this.trackProgress=function(t,a){if(a===void 0){a=false}if(a){e.filesInProgress.delete(t)}else{e.filesInProgress.set(t,"inprogress")}if(e.filesInProgress.size===0){e.onDone()}};this.getFilesAsArray=function(){var t=[];var a=[];e.files.forEach((function(e){if(e.valid&&!e.deleted){t.push(e)}else if(!e.valid&&!e.deleted){a.push(e)}}));return{valid:t,invalid:a}};this.resetFormFields=function(){e.nativeInput.value=""};this.startUpload=function(t){var a=[];for(var i=1;i<arguments.length;i++){a[i-1]=arguments[i]}return __awaiter(e,__spreadArray([t],a,true),void 0,(function(t,e){var a,i,n;if(e===void 0){e=undefined}return __generator(this,(function(r){a=this.validateTotals(),i=a.bytesMaxReached,n=a.fileMaxReached;if(i||n){this.kick();return[2]}this.metaData=e;this.nativeInput.click();this.onUpload(t,e);t.stopPropagation();t.preventDefault();return[2]}))}))};this.transferComplete=function(t){e.updateValueInMap(t,"progress",100,false);e.trackProgress(t,true)};this.transferDone=function(t,a,i){e.updateValueInMap(a,"status",i,false);e.updateValueInMap(a,"uploaded",true,false);try{var n=JSON.parse(t.response);e.updateValueInMap(a,"url",n.url)}catch(t){e.updateValueInMap(a,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(t,a,i){try{var n=JSON.parse(t.response).error;e.updateValueInMap(a,"error",{message:n.message,type:n.type},false)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}");e.updateValueInMap(a,"error",{type:i},false)}e.updateValueInMap(a,"valid",false,true)};this.transferFailed=function(t){e.updateValueInMap(t,"error",getI18nError("duet-upload-001",e.errorCodes))};this.transferCanceled=function(t){e.files.delete(t);e.validateTotals(t);e.kick()};this.validateTotals=function(t){var a=validateTotalSizeIsAboveMax(e.files,e.maxBytesTotal);var i=validateTotalAmountIsAboveMax(e.files,e.maxFiles);if(a&&t){e.updateValueInMap(t,"error",getI18nError("duet-upload-202",e.errorCodes),false)}if(i&&t){e.updateValueInMap(t,"error",getI18nError("duet-upload-301",e.errorCodes),false)}e.bytesMaxReached=a;e.fileMaxReached=i;return{bytesMaxReached:a,fileMaxReached:i}};this.uploadFile=function(t){var a=[];for(var i=1;i<arguments.length;i++){a[i-1]=arguments[i]}return __awaiter(e,__spreadArray([t],a,true),void 0,(function(t,e,a){var i,n,r;if(e===void 0){e=false}return __generator(this,(function(d){switch(d.label){case 0:if(!e&&this.deferUpload){this.updateValueInMap(t.item.name,"pending",true,false);this.updateValueInMap(t.item.name,"group","pending",true)}else if(e){this.updateValueInMap(t.item.name,"pending",false,false);this.updateValueInMap(t.item.name,"group",undefined,true)}d.label=1;case 1:d.trys.push([1,4,,5]);if(!(!this.deferUpload||e))return[3,3];i=new FormData;i.append("file",t.item);if(a){i.append("key",a)}i.append("uid",t.uid);i.append("name",t.item.name);i.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta}));n=t;return[4,this.makeXHRPostRequest(i)];case 2:n.xhr=d.sent();d.label=3;case 3:return[3,5];case 4:r=d.sent();this.updateValueInMap(t.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var t=0,a=Array.from(e.files.entries());t<a.length;t++){var i=a[t],n=i[0],r=i[1];if(r.group==="pending"&&r.pending===true){e.uploadFile(r,true,n)}}};this.getItemFromUID=function(t){for(var a=0,i=Array.from(e.files.entries());a<i.length;a++){var n=i[a],r=n[0],d=n[1];if(d.uid===t){return{value:d,key:r}}}return null};this.handleExternalUploadButton=function(t,a){if(e.externalUploadButton){if(t||a){e.externalUploadButton.disabled=true}else{e.externalUploadButton.disabled=false}}};this.onDelete=function(t,a){var i=e.getItemFromUID(t);var n=i.key;var r=e.files.get(n);e.files.delete(n);var d=e.validateTotals(),o=d.bytesMaxReached,l=d.fileMaxReached;e.handleExternalUploadButton(o,l);e.kick();e.duetDelete.emit({originalEvent:a,data:{deletion:r},component:"duet-upload"});if(!e.external&&!r.pending){e.makeXHRDeleteRequest(r)}e.resetFormFields()};this.onCancel=function(t,a){var i=e.getItemFromUID(t).key;var n=e.files.get(i);e.files.delete(i);var r=e.validateTotals(),d=r.bytesMaxReached,o=r.fileMaxReached;e.handleExternalUploadButton(d,o);if(!e.external){var l=n.xhr;if(l){l.abort()}}e.kick();e.resetFormFields();e.duetCancel.emit({originalEvent:a,data:{cancelled:n},component:"duet-upload"})};this.onUpload=function(t,a){e.duetUpload.emit({originalEvent:t,metaData:a,component:"duet-upload"})};this.onBlur=function(t){e.duetBlur.emit({originalEvent:t,component:"duet-upload"})};this.onProgress=function(t,a,i){e.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:a},component:"duet-upload"})};this.onFocus=function(t){e.duetFocus.emit({originalEvent:t,component:"duet-upload"})};this.onReady=function(){e.duetReady.emit({component:"duet-upload"})};this.onDone=function(){e.duetDone.emit({component:"duet-upload",data:{files:e.files}})};this.filterMap=function(){var t=Array.from(e.files.values());var a=[];var i=[];var n=[];var r=[];var d=false;t.forEach((function(t){var o=e.getGroupFromItemData(t);if(t.meta&&!!t.meta.badges){d=true}if(o===e.DefaultGroups.success){r.push({uid:t.uid,data:t})}else if(o===e.DefaultGroups.inprogress){a.push({uid:t.uid,data:t})}else if(o===e.DefaultGroups.pending){n.push({uid:t.uid,data:t})}else if(o===e.DefaultGroups.failure){i.push({uid:t.uid,data:t})}else if(t.group){a.push({uid:t.uid,data:t})}}));return{pending:n,failure:i,success:r,inprogress:a,hasCategory:d}};this.getActions=function(t,e){return e.filter((function(e){return e.map.includes(t)}))};this.renderUploadedItems=function(){e.itemRefs.clear();var t=e.filterMap();var a=t.hasCategory;var i=e.hideCancelButton?e.actions.filter((function(t){return t.name!=="cancel"})):e.actions;var n=e.groups.map((function(n){var r=t[n.id];if(!(r===null||r===void 0?void 0:r.length)){return}return h(Fragment,null,!e.hideGroups&&h(UploadItemHeader,{categoryLabel:a?e.categoryLabel:undefined,label:n.label}),r.map((function(t){return e.mapFilesToUploadItems(t.data,n.id,a,i)})))}));return h(Fragment,null,e.showUploadedItemsHeader&&h(UploadItemHeader,{categoryLabel:a?e.categoryLabel:undefined,label:e.uploadedItemsHeaderLabel}),n)};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.uri=undefined;this.showLinks=false;this.caption=undefined;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}};this.statusMessageLabel=getLocaleString(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=getLocaleString(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=getLocaleString(this.labelDefaults);this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."};this.description=getLocaleString(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=getLocaleString(this.fileListEmptyDefaults);this.error="";this.errorCodes=errorCodes;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="";this.multiple=true;this.limitSelection=false;this.hideCancelButton=false;this.value=undefined;this.externalUploadButtonId=undefined;this.captionOnBottom=false;this.showUploadedItemsHeader=false;this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"};this.headerHeadingLevel="h3";this.hideHeader=false;this.emitEvent=false;this.actionButtonTitles={cancel:false,delete:false};this.renameDuplicates=false;this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}t.prototype.watchValidHandler=function(t,e){if(t!==e){this.kick()}};t.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=sanitizeString(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}inheritGlobalTheme(this);this.listenForActionEvents();this.onReady();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId));this.processedButtonTitles=parsePossibleJSON(this.actionButtonTitles)};t.prototype.componentWillRender=function(){this.verifyValidity()};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeInput){this.nativeInput.focus(t)}return[2]}))}))};t.prototype.upload=function(){return __awaiter(this,arguments,void 0,(function(t){var e,a,i;if(t===void 0){t=undefined}return __generator(this,(function(n){e=this.validateTotals(),a=e.bytesMaxReached,i=e.fileMaxReached;if(a||i){this.handleExternalUploadButton(a,i);this.kick();return[2]}this.metaData=t;this.nativeInput.click();return[2]}))}))};t.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.uploadPendingFiles();return[2]}))}))};t.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.kick();return[4,this.setFocus()];case 1:t.sent();return[2]}}))}))};t.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};t.prototype.updateValue=function(t,e,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(t,e,a);return[2]}))}))};t.prototype.focusActionButton=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(a){switch(a.label){case 0:return[4,(e=this.itemRefs.get(t))===null||e===void 0?void 0:e.focusActionButton()];case 1:a.sent();return[2]}}))}))};t.prototype.render=function(){var t=this;var e=this.identifier||this.uploadId;var a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var i=Math.round(this.maxBytes/1024/1024);var n=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());n=n.replace(/{maxbytes}/g,"".concat(i.toString()," MB"));n=n.replace(/{maxbytestotal}/g,"".concat(a.toString()," MB"));n=n.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));if(this.externalUploadButton){this.externalUploadButton.accessibleLabel="".concat(this.externalUploadButton.innerText,". ").concat(n)}return h(Host,{key:"7f8970727b44bee3669b221659dd1f5a72df4ee2",class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{key:"074fc7ec948f6d0ab5c89c7d2d3d3ec3358343f4","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},h("slot",{key:"84797a77942534e80a641d8a2ce9badef0e77937",name:"header"}),!this.files.size&&h("duet-empty-state",{key:"224610821155dae048fd126b8d517486fa6efd38",id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},h("duet-paragraph",{key:"6d01352482dd687520dd26d8d7c0d3863b61d4a4",margin:"none"},this.fileListEmpty)),!!this.files.size&&h("slot",{key:"328346632314eb8a8d0ae41de9761a488fc0bc1c",name:"fileheader"}),!!this.files.size&&h("duet-upload-aria-status",{key:"cab1390fc0ff3a6eb197be8e7ea16d719c2b6dc4",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&h("slot",{key:"26051e329900efc2b29e6d8ebb6b2f1184ec547c",name:"filefooter"}),h("slot",{key:"c9018b5e95065813d29ee08ce924794e1ee476ff",name:"uploadfooter"}),this.captionOnBottom&&h("duet-caption",{key:"8fffcc2935df87ccfa5bd89d3df773b9810d2f63",margin:"none",size:"small"},h("div",{key:"17c320b6eeefbd2b5f047b77eb613aa4e912cbdb",class:"upload-bottom-caption"},n)),h("slot",{key:"ada6f8c46784788c5900ad5a6dddfebed8a70e39",name:"afterfooter"}),!this.hideButton&&h(Fragment,{key:"f352401910296a33c56ef5bb2e3f0b7e4be0594a"},h("duet-spacer",{key:"ae4ae0b0490a4e88dab0a7319fd2dde20f05e400",size:"large"}),h("duet-button",{key:"ded36c705e15f44936844d057962cb731d47941c",id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||"".concat(this.buttonLabel,". ").concat(n),"accessible-owns":e,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&h(Fragment,{key:"385520d7dc48477cea039a0c71f1bcd5e1730cca"},h("duet-spacer",{key:"79ea5d94a4eda84e3f8328a2ac1e42890e0bbde2",size:"medium"}),h("duet-alert",{key:"33e5de19e511439a04deeb8478e167558946c4a7",part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&getI18nError("duet-upload-301",this.errorCodes),this.bytesMaxReached&&getI18nError("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&getI18nError("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&getI18nError("duet-upload-203",this.errorCodes))),h("duet-visually-hidden",{key:"2fc08bb48c1f47113399c63fd1a81dcef85fc0cf","aria-hidden":"true"},h("input",{key:"81268132202065717f2e21b1f8dc4ef3e2173394",ref:function(e){t.nativeInput=e},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(e){return t.onChange(e)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};t.prototype.makeXHRPostRequest=function(t){var e=this;var a=new XMLHttpRequest;var i=t.get("name");a.upload.addEventListener("progress",(function(t){e.updateProgress(t,i)}));a.upload.addEventListener("load",(function(){e.transferComplete(i)}));a.upload.addEventListener("error",(function(){e.transferFailed(i)}));a.upload.addEventListener("abort",(function(){e.transferCanceled(i)}));var n={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return makeXhrRequest(n)};t.prototype.makeXHRDeleteRequest=function(t){var e=t.uid,a=t.item;var i=new XMLHttpRequest;var n={"x-fileuid":e,"x-filename":a.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(e,"&name=").concat(a.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return makeXhrRequest(r)};t.prototype.escapeSpecialCharacters=function(t){return(t+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")};t.prototype.getRenamedFileName=function(t,e){var a=new RegExp("".concat(this.escapeSpecialCharacters(t)," \\(\\d+\\).").concat(e));var i=Array.from(this.files.entries()).map((function(t){var e=t[0],a=t[1];return e})).filter((function(i){return a.test(i)||i==="".concat(t,".").concat(e)})).sort((function(t,e){return t.split(".").slice(0,-1).join(".")>e.split(".").slice(0,-1).join(".")?1:-1})).pop().split(".").slice(0,-1).join(".");if(i===t){return"".concat(t," (1).").concat(e)}var n=parseInt(i.split("(").pop().slice(0,-1));return"".concat(t," (").concat(n+1,").").concat(e)};t.prototype.renameFiles=function(t){var e=this;return t.map((function(t){if(e.files.get(t.name)){var a=t.name.split(".");var i=a.pop();var n=a.join(".");var r=e.getRenamedFileName(n,i);return new File([t],r,{type:t.type,lastModified:t.lastModified})}else{return t}}))};t.prototype.onChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e,a,i,n,r,d,o,l,s,u,h,f;return __generator(this,(function(b){switch(b.label){case 0:a=Array.from((e=this.nativeInput)===null||e===void 0?void 0:e.files);this.filesToUploadExceedsLimit=false;if(filesToUploadCountAboveMax(this.files.size,a.length,this.maxFiles)){this.filesToUploadExceedsLimit=true;this.kick();return[2]}this.filesToUploadTotalSizeIsAboveMax=false;if(filesToUploadTotalSizeIsAboveMax(this.files,a,this.maxBytesTotal)){this.filesToUploadTotalSizeIsAboveMax=true;this.kick();return[2]}if(!a)return[3,6];if(this.renameDuplicates){a=this.renameFiles(a)}i=0,n=a;b.label=1;case 1:if(!(i<n.length))return[3,6];r=n[i];d=validateFile(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=d.valid,l=d.errorMessage,s=d.errorType,u=d.errorSystem;h=this.genHashName();f={uid:h,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:s,message:o?undefined:l,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);if(!(o&&!this.external))return[3,3];return[4,this.uploadFile(f)];case 2:b.sent();return[3,4];case 3:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}b.label=4;case 4:this.kick();b.label=5;case 5:i++;return[3,1];case 6:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return t}();DuetUpload.style=DuetUploadStyle0;export{DuetEditableTable as duet_editable_table,DuetTable as duet_table,DuetUpload as duet_upload};
|
|
4
|
+
*/import{h,r as registerInstance,c as createEvent,H as Host,g as getElement,F as Fragment}from"./index-caf8af66.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{f as fieldSorter,d as debounce}from"./js-utils-9b9e0039.js";import{i as isKeyboardClick}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver,g as getLocaleString,s as sanitizeString}from"./language-utils-37fa60e1.js";import{p as sizeNavigation,s as sizeHeader}from"./tokens.module-a746651a.js";import{b as breakpointTokensUpTo,a as breakpointToToken}from"./token-utils-a32eb753.js";import{c as createID}from"./create-id-149a1b6d.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";import{g as getError,a as getI18nError}from"./errorcodes.utils-871f54ed.js";var TableData=function(t,e){var a=t.data,i=t.groupId,n=t.alignment;var r="duet-editable-table duet-editable-table-content-".concat(i);if(typeof a==="string"){return h("td",{innerHTML:a,class:r,part:"".concat(i,"content"),style:{verticalAlign:n}})}else{return h("td",{class:r,part:"".concat(i,"content"),style:{verticalAlign:n}},a)}};var duetEditableTableCss=".sc-duet-editable-table-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-actions-menu.sc-duet-editable-table{position:relative;padding:0 !important;margin:0}.duet-editable-table-actions-menu-button.sc-duet-editable-table{position:relative;right:-16px;float:right;padding:0}.duet-editable-table-actions-menu-icon.sc-duet-editable-table .duet-icon.sc-duet-editable-table{max-width:16px;max-height:16px}.duet-editable-table-row.duet-table-action-row.sc-duet-editable-table .duet-text-right.sc-duet-editable-table{text-align:right}.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";var DuetEditableTableStyle0=duetEditableTableCss;var DuetEditableTable=function(){function t(t){var e=this;registerInstance(this,t);this.duetTableToggle=createEvent(this,"duetTableToggle",7);this.duetMenuClick=createEvent(this,"duetMenuClick",7);this.hasHeadSlotFirst=false;this.hasHeadSlotLast=false;this.hasFootSlot=false;this.sortableDefaultLabel={fi:"Järjestä",en:"Click to sort",sv:"Klicka för att sortera"};this.actionColumnLabel={en:"Actions for rows",fi:"Toiminnot rivillä",sv:"Åtgärder för rader"};this.toggleColumn=function(t,a){a.preventDefault();var i=t.sort_order,n=t.direction,r=t.index,d=t.key;e.duetTableToggle.emit({sort_order:i,index:r,direction:n,key:d,component:"duet-editable-table",originalEvent:a})};this.handleKeyDown=function(t,a){if(isKeyboardClick(a)){e.toggleColumn(t,a)}};this.language=getLanguage();this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.actions=undefined;this.columns=undefined;this.rows=undefined;this.sortable=false;this.groupId="";this.theme="";this.accessibleRole=undefined;this.hideHeadVisually=false}t.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasHeadSlotFirst=!!this.element.querySelector("[slot='thead-first']");this.hasHeadSlotLast=!!this.element.querySelector("[slot='thead-last']");this.hasFootSlot=!!this.element.querySelector("[slot='tfoot']")};t.prototype.connectedCallback=function(){connectLanguageChangeObserver(this)};t.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this)};t.prototype.createLabel=function(t){var e=this;var a=t.sort_order,i=t.direction,n=t.index,r=t.label;var d=getLocaleString(r);if(!this.sortable){return d}var o=function(){if(!!a&&i===1){return"action-arrow-down-small"}else if(!!a&&i===-1){return"action-arrow-up-small"}return"action-subtract-small"};return h("span",{class:"duet-table-label","data-index":n},h("duet-button",{size:"small",icon:o(),"icon-size":"medium-small","accessible-label":this.sortableDefaultLabel[this.language],variation:"plain",margin:"none","icon-right":true,onClick:function(a){return e.toggleColumn(t,a)},onKeyDown:function(a){return e.handleKeyDown(t,a)}},d))};t.prototype.getSortedColumns=function(){return __spreadArray([],this.columns,true).sort(fieldSorter(["index"]))};t.prototype.getRowSortOrder=function(){var t=__spreadArray([],this.columns,true).sort(fieldSorter(["sort_order"]));return t.filter((function(t){return t.sort_order})).map((function(t){return t.direction===-1?"-".concat(t.key):t.key}))};t.prototype.renderTableHeader=function(){var t=this;if(!this.columns){return}var e=this.getSortedColumns();return h("tr",{class:{"duet-table-action-header":!!this.actions}},e.map((function(e){if(e.display!==false){var a=t.createLabel(e);return a!==""?h("th",{scope:"col"},a):h("td",null)}})),this.actions&&h("th",{scope:"col",class:"duet-table-action-header-heading"},this.actions&&h("duet-visually-hidden",null,this.actionColumnLabel[this.language])))};t.prototype.renderActions=function(t,e){var a=this;if(!this.actions){return}return h("td",{class:"duet-text-right"},this.actions.map((function(i){return h("duet-action-button",{actionMeta:Object.assign({},(t===null||t===void 0?void 0:t.meta)||{},{index:e}),actionId:(t===null||t===void 0?void 0:t.uid)||(t===null||t===void 0?void 0:t.id)||null,actionName:i.name,theme:a.theme,iconName:i.icon,iconColor:i.color,iconSize:i.size,background:i.background,"accessible-label":"".concat(t.actionDescription||""," ").concat(getLocaleString(i.label)," ")})})))};t.prototype.renderTableBody=function(){var t=this;var e=this.getSortedColumns();var a=this.getRowSortOrder();var i=__spreadArray([],this.rows,true).sort(fieldSorter(a));return i.map((function(a,i){var n;return h("tr",{class:(n={"duet-table-action-row":!!t.actions,"duet-editable-table-row":true},n["duet-editable-table-row-".concat(t.groupId)]=true,n),"data-meta":JSON.stringify(a.meta)},e.map((function(e){var i=a[e.key]?a[e.key]:a.item;if(e.display!==false){return h(TableData,{data:i,groupId:t.groupId})}})),t.actions&&t.renderActions(a,i))}))};t.prototype.render=function(){var t;return h(Host,{class:(t={},t["duet-editable-table-".concat(this.variation)]=true,t["duet-editable-table"]=true,t["duet-editable-table-".concat(this.theme)]=true,t["duet-editable-table-scrollable"]=this.breakpoint==="none-scrollable",t["duet-editable-table-sortable"]=this.sortable,t["duet-editable-table-actions"]=!!this.actions,t["duet-m-0"]=this.margin==="none",t["duet-theme-turva"]=this.theme==="turva",t)},h("duet-table",{class:"duet-editable-table-table",sticky:this.sticky,stickyDistance:this.stickyDistance,margin:this.margin,theme:this.theme,variation:this.variation,breakpoint:this.breakpoint,"hide-head-visually":this.hideHeadVisually},h("table",{role:this.accessibleRole},h("caption",null,h("slot",{name:"tcaption"})),h("thead",null,this.hasHeadSlotFirst&&h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-first"}))),this.renderTableHeader(),this.hasHeadSlotLast&&h("tr",null,h("td",{class:"duet-editable-table-actions-menu",colSpan:99},h("slot",{name:"thead-last"})))),h("tbody",null,this.renderTableBody()),this.hasFootSlot&&h("tfoot",null,h("tr",null,h("td",{class:"duet-editable-table-footer-menu",colSpan:99},h("slot",{name:"tfoot"})))))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();DuetEditableTable.style=DuetEditableTableStyle0;var duetTableCss='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead,duet-table.duet-table-hide-head-visually.duet-table-hide-head-visually thead *{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:rgb(8, 42, 77)}duet-table.duet-theme-turva td{color:rgb(23, 28, 58)}duet-table th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}duet-table.duet-theme-turva th{color:rgb(143, 147, 158)}duet-table tbody th{font-weight:600;color:rgb(8, 42, 77)}duet-table.duet-theme-turva tbody th{color:rgb(23, 28, 58)}duet-table .duet-table-action-row td:last-child{justify-self:end;padding-right:20px !important;white-space:nowrap}duet-table span.duet-table-cell-heading{display:none}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened td span.duet-table-cell-heading{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:rgb(8, 42, 77)}.duet-table-flattened.duet-theme-turva td span.duet-table-cell-heading{color:rgb(23, 28, 58)}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:rgb(98, 121, 138);text-align:left}.duet-table-sticky thead th{position:sticky;top:0;background:rgb(255, 255, 255)}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:rgb(255, 255, 255)}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:rgb(222, 224, 228)}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(4, 81, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:rgb(222, 224, 228)}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid rgb(212, 223, 229)}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:rgb(222, 224, 228)}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid rgb(98, 121, 138)}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:rgb(113, 118, 132)}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:rgb(222, 224, 228)}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid rgb(212, 223, 229)}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:rgb(222, 224, 228)}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:rgb(222, 224, 228)}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(113, 118, 132, 0.08)}.duet-table-sortable tbody tr td:first-child,.duet-table-sortable thead tr th:first-child{padding:20px}.duet-table-sortable:not(.duet-table-flattened) tfoot{border-top:1px solid rgb(212, 223, 229)}.duet-table-sortable:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:rgb(222, 224, 228)}.duet-table-actions table{table-layout:auto}.duet-table-actions thead th:last-child{width:1px;white-space:nowrap}.duet-editable-table-table.duet-table-flattened tr{display:grid;grid-template-columns:repeat(2, 1fr);grid-auto-rows:auto;gap:10px}.duet-editable-table-table.duet-table-flattened tr.duet-table-action-row td:last-child::before{padding:0;content:""}.duet-editable-table-table.duet-table-flattened td{grid-column:1/2}.duet-editable-table-table.duet-table-flattened td:first-child{grid-row:1;grid-column:1}.duet-editable-table-table.duet-table-flattened td:last-child{grid-row:1;grid-column:2}';var DuetTableStyle0=duetTableCss;var stickyTopValues={none:0,"with-links":parseFloat(sizeNavigation)*16,"without-links":parseFloat(sizeHeader)*16};var DuetTable=function(){function t(t){var e=this;registerInstance(this,t);this.headingSelector="thead tr > :not(*.duet-editable-table-actions-menu)";this.handleMediaQueryChange=function(t){e.matchesBreakpoint=breakpointTokensUpTo.includes(e.breakpoint)?!t.matches:t.matches};this.matchesBreakpoint=true;this.language=getLanguage();this.theme=undefined;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.hideHeadVisually=false}t.prototype.watchLanguageStateHandler=function(t,e){var a=this;if(t!==e){setTimeout((function(){return a.copyHeadingsToCells()}),50)}};t.prototype.connectedCallback=function(){var t=this;var e=this.breakpoint==="none"||this.breakpoint==="none-scrollable"?"all":breakpointToToken[this.breakpoint];this.mq=matchMedia(e);this.mq.addEventListener("change",debounce(this.handleMediaQueryChange,50));this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return debounce(t.copyHeadingsToCells(),50)}));this.observer.observe(this.element,{childList:true,subtree:true})};t.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var t=stickyTopValues[this.stickyDistance];var e=this.element.querySelectorAll(this.headingSelector);e.forEach((function(e){return e.style.top="".concat(t,"px")}))}};t.prototype.componentDidLoad=function(){this.observer?this.observer.takeRecords():null;connectLanguageChangeObserver(this)};t.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true;disconnectLanguageChangeObserver(this)};t.prototype.copyHeadingsToCells=function(){var t=this.element.querySelectorAll(this.headingSelector);var e=this.element.querySelectorAll("tbody tr");var a=Array.from(t).map((function(t){return t.textContent.trim()}));e.forEach((function(t){t.querySelectorAll("td").forEach((function(t,e){if(a[e]){var i=t.querySelector(".duet-table-cell-heading");if(!i||i.textContent!==a[e]){i===null||i===void 0?void 0:i.remove();var n=document.createElement("span");n.textContent=a[e];n.classList.add("duet-table-cell-heading");n.setAttribute("aria-hidden","true");n.inert=true;t.prepend(n)}}}))}))};t.prototype.render=function(){var t;return h(Host,{key:"b3ed604b2b5f0b8e31f7b90abc64693662bfef3d",class:(t={},t["duet-table-".concat(this.variation)]=true,t["duet-table-flattened"]=!this.matchesBreakpoint,t["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,t["duet-table-scrollable"]=this.breakpoint==="none-scrollable",t["duet-m-0"]=this.margin==="none",t["duet-theme-turva"]=this.theme==="turva",t["duet-table-hide-head-visually"]=this.hideHeadVisually,t)},h("slot",{key:"29df6d3c640fbf3a7fa51b73323c3628246d3095"}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["watchLanguageStateHandler"]}},enumerable:false,configurable:true});return t}();DuetTable.style=DuetTableStyle0;var errorCodes=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-203",system_message:"Files to upload exceed total byte size limit",message:{fi:"Yritit lisätä tiedostoja, jotka ylittäisivät suurimman sallitun yhteenlasketun koon.",sv:"Du försökte lägga till filer som skulle överskrida den maximala kombinerade storleken.",en:"You tried to add files that would exceed the maximum combined size."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}},{type:"duet-upload-302",system_message:"Files to upload exceeds limits",message:{fi:"Et voi lähettää enempää kuin enimmäismäärän liitteitä.",sv:"Du kan inte ladda upp fler än det maximala antalet bilagor.",en:"You can't upload more than maximum number of attachments."}}];var headerAriaLabel={fi:"Liiteluettelo",sv:"Lista över bilagor",en:"Attachments list"};var UploadItemHeader=function(t){var e=t.label,a=t.categoryLabel;return h("div",{class:"items-header",tabindex:"-1","aria-label":getLocaleString(headerAriaLabel)},a&&h("duet-heading",{class:"category-header",border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(a)),h("duet-heading",{class:{"filename-header":true,"no-category":!a},border:"solid",color:"gray-darker",level:"h3","visual-level":"h6",weight:"semibold",margin:"none","aria-hidden":"true"},getLocaleString(e)))};var validateFileExtension=function(t,e){if(!e){return true}var a=t.split(".");var i=e.split(",");var n=a[a.length-1];return i.includes(n)};var validateFileMime=function(t,e){if(!e||!t){return true}var a=e.split(",");var i=false;a.forEach((function(e){var a=e.split("/");var n=t.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var validateFileSize=function(t,e){if(!e||!t){return true}return e>=t};var validateFile=function(t,e,a){var i=e.allowedMimetypes,n=e.allowedExtensions,r=e.maxBytes;var d=false;var o=getError("default",a);if(t){var l=t.name,s=t.type,u=t.size;var h=validateFileMime(s,i);var f=n==="all"||n===""||n===" "||n===undefined?true:validateFileExtension(l.toLowerCase(),n);var b=validateFileSize(u,r);if(!h){o=getError("duet-upload-101",a)}if(!f){o=getError("duet-upload-100",a)}if(!b){o=getError("duet-upload-201",a)}d=h&&f&&b}else{d=false}return{valid:d,errorMessage:d?undefined:getLocaleString(o.message),errorSystem:d?undefined:o.system_message,errorType:d?undefined:o.type}};var validateTotalSizeIsAboveMax=function(t,e){var a=0;if(e){t.forEach((function(t){if(t.valid&&t.size){a+=t.size}}));if(a>=e){return true}}return false};var validateTotalAmountIsAboveMax=function(t,e){var a=0;if(e){t.forEach((function(t){if(t.valid){a++}}));if(a>=e){return true}}return false};var filesToUploadCountAboveMax=function(t,e,a){if(t+e>a){return true}return false};var filesToUploadTotalSizeIsAboveMax=function(t,e,a){var i=0;if(a){t.forEach((function(t){if(t.valid&&t.size){i+=t.size}}));e.forEach((function(t){if(t.size){i+=t.size}}));if(i>=a){return true}}return false};var makeXhrRequest=function(t){var e=t.payload,a=t.options,i=t.onFailure,n=t.onSuccess,r=t.onProgress;var d=a.type,o=d===void 0?"POST":d,l=a.xhr,s=a.uri,u=a.argument,h=u===void 0?null:u,f=a.headers,b=f===void 0?null:f;l.open(o,"".concat(s).concat(h||""),true);var c=e.data,p=e.name;if(b){Object.keys(b).forEach((function(t){l.setRequestHeader(t,b[t])}))}if(o==="POST"){l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300){n(l,p,l.status)}if(l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999){i(l,p,l.status)}};r(p)}l.send(c);return l};var duetUploadCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}::slotted([slot=uploadfooter]){margin-top:20px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:rgb(245, 248, 250)}.duet-upload-filelist-empty-label{font-size:1rem;font-weight:400}.duet-upload-editable-table-header-hidden{display:none}.duet-upload-editable-table tbody .duet-upload-editable-table-data{padding:0 !important;border:0}.duet-upload-editable-table duet-editable-table tfoot,.duet-upload-editable-table duet-editable-table thead{display:none}.duet-upload-editable-table duet-editable-table .duet-editable-table-content{padding-right:0 !important;padding-left:0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td{padding:1rem 0 !important}.duet-upload-editable-table duet-editable-table duet-table .duet-table-action-row td:last-child{padding-right:0 !important}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending{position:relative}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-progress,.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-progress{position:absolute;bottom:0;width:100%}.duet-upload-editable-table duet-editable-table .duet-editable-table-row-inprogress duet-action-button::part(button),.duet-upload-editable-table duet-editable-table .duet-editable-table-row-pending duet-action-button::part(button){border:0}duet-paragraph::part(duet-paragraph){word-break:break-word}duet-editable-table tfoot{display:none}.upload-bottom-caption{margin-top:12px;margin-bottom:16px;line-height:1.4rem}.items-header{display:none;flex-direction:row;margin-bottom:0}@media (min-width: 36em){.items-header{display:flex}}.items-header:not(:last-child),.items-header:not(:first-child){margin-top:12px}.items-header .category-header{width:35%}.items-header .filename-header{width:65%}.items-header .filename-header.no-category{width:100%}.upload-item-row{display:flex;flex-direction:column;gap:16px;align-content:center;align-items:center;padding:16px 0 16px 0;border-bottom:1px solid rgb(212, 223, 229)}@media (min-width: 36em){.upload-item-row{flex-direction:row;gap:10px}}.upload-item-row .item-categories{width:100%}@media (min-width: 36em){.upload-item-row .item-categories{width:35%}}.upload-item-row .item-name{position:relative;bottom:2px;width:100%;text-align:left}@media (min-width: 36em){.upload-item-row .item-name{width:50%}.upload-item-row .item-name.no-category{width:85%}}.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:block}@media (min-width: 36em){.upload-item-row .item-categories .heading,.upload-item-row .item-name .heading{display:none}}.upload-item-row .item-actions{width:100%;margin-left:-8px;text-align:left}@media (min-width: 36em){.upload-item-row .item-actions{width:15%;padding-top:0;margin-left:auto;text-align:right}}.upload-item-row .duet-upload-item-name duet-icon{position:relative;top:4px}.upload-item-row .duet-upload-item-name duet-progress{display:block;margin-top:16px}";var DuetUploadStyle0=duetUploadCss;var DuetUpload=function(){function t(t){var e=this;registerInstance(this,t);this.duetChange=createEvent(this,"duetChange",3);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetReady=createEvent(this,"duetReady",7);this.duetDone=createEvent(this,"duetDone",3);this.duetState=createEvent(this,"duetState",3);this.duetDelete=createEvent(this,"duetDelete",3);this.duetCancel=createEvent(this,"duetCancel",3);this.duetProgress=createEvent(this,"duetProgress",3);this.duetUpload=createEvent(this,"duetUpload",3);this.linkClick=createEvent(this,"linkClick",3);this.buttonId=createID("DuetButton");this.labelId=createID("DuetLabel");this.uploadId=createID("DuetUpload");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.filesToUploadExceedsLimit=false;this.filesToUploadTotalSizeIsAboveMax=false;this.internalStatusMessageLabel=undefined;this.itemRefs=new Map;this.DefaultGroups={inprogress:"inprogress",success:"success",pending:"pending",failure:"failure"};this.kick=debounce((function(){e.tick=Date.now()}),30);this.categoryLabel={en:"Category",sv:"Filtyp",fi:"Tiedostotyyppi"};this.listenForActionEvents=function(){e.element.addEventListener("duetActionEvent",(function(t){var a=t.detail;var i=a.action,n=a.id,r=a.originalEvent;switch(i){case"delete":e.onDelete(n,r);break;case"cancel":e.onCancel(n,r);break}}))};this.verifyValidity=function(){var t=e.getFilesAsArray(),a=t.invalid,i=t.valid;var n=e.valid;e.valid=a.length===0&&i.length!==0;if(e.valid!==n){e.duetState.emit({originalEvent:undefined,data:{valid:e.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(t){if(t.valid&&t.progress===100){return e.DefaultGroups.success}else if(t.progress>0&&t.progress!==100){return e.DefaultGroups.inprogress}else if(!t.valid){return e.DefaultGroups.failure}else if(t.pending){return e.DefaultGroups.pending}else if(t.group){return t.group}else{return"none"}};this.mapFilesToUploadItems=function(t,a,i,n){if(a===e.DefaultGroups.success){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"success",data:t,showLinks:e.showLinks,linkClickEvent:e.emitEvent?e.linkClick:undefined,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(a===e.DefaultGroups.inprogress){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"inprogress",data:t,showLinks:e.showLinks,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(a===e.DefaultGroups.pending){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"pending",data:t,showLinks:e.showLinks,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(a===e.DefaultGroups.failure){return h("duet-upload-item",{theme:e.theme,actions:e.getActions(a,n),type:"failure",data:t,showLinks:e.showLinks,errorCodes:e.errorCodes,categoryLabel:e.categoryLabel,label:e.uploadedItemsHeaderLabel,showCategory:i,buttonTitles:e.processedButtonTitles,ref:function(a){e.itemRefs.set(t.uid,a)}})}else if(t.group){return t.html}else{return"none"}};this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(t,a,i,n){if(n===void 0){n=true}try{var r=e.files.get(t);r[a]=i;e.files.set(t,r);if(e.external&&a!=="url"){e.trackProgress(t,a==="uploaded")}}catch(t){}if(n){e.kick()}};this.updateProgress=function(t,a){var i=function(i){e.updateValueInMap(a,"progress",i);e.onProgress(a,i,t)};if(t.lengthComputable){var n=t.loaded/t.total*100;i(n)}else{console.log("cant read progress")}};this.trackProgress=function(t,a){if(a===void 0){a=false}if(a){e.filesInProgress.delete(t)}else{e.filesInProgress.set(t,"inprogress")}if(e.filesInProgress.size===0){e.onDone()}};this.getFilesAsArray=function(){var t=[];var a=[];e.files.forEach((function(e){if(e.valid&&!e.deleted){t.push(e)}else if(!e.valid&&!e.deleted){a.push(e)}}));return{valid:t,invalid:a}};this.resetFormFields=function(){e.nativeInput.value=""};this.startUpload=function(t){var a=[];for(var i=1;i<arguments.length;i++){a[i-1]=arguments[i]}return __awaiter(e,__spreadArray([t],a,true),void 0,(function(t,e){var a,i,n;if(e===void 0){e=undefined}return __generator(this,(function(r){a=this.validateTotals(),i=a.bytesMaxReached,n=a.fileMaxReached;if(i||n){this.kick();return[2]}this.metaData=e;this.nativeInput.click();this.onUpload(t,e);t.stopPropagation();t.preventDefault();return[2]}))}))};this.transferComplete=function(t){e.updateValueInMap(t,"progress",100,false);e.trackProgress(t,true)};this.transferDone=function(t,a,i){e.updateValueInMap(a,"status",i,false);e.updateValueInMap(a,"uploaded",true,false);try{var n=JSON.parse(t.response);e.updateValueInMap(a,"url",n.url)}catch(t){e.updateValueInMap(a,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(t,a,i){try{var n=JSON.parse(t.response).error;e.updateValueInMap(a,"error",{message:n.message,type:n.type},false)}catch(t){console.error("Server did not respond with expected response error:{message: string, type: int}");e.updateValueInMap(a,"error",{type:i},false)}e.updateValueInMap(a,"valid",false,true)};this.transferFailed=function(t){e.updateValueInMap(t,"error",getI18nError("duet-upload-001",e.errorCodes))};this.transferCanceled=function(t){e.files.delete(t);e.validateTotals(t);e.kick()};this.validateTotals=function(t){var a=validateTotalSizeIsAboveMax(e.files,e.maxBytesTotal);var i=validateTotalAmountIsAboveMax(e.files,e.maxFiles);if(a&&t){e.updateValueInMap(t,"error",getI18nError("duet-upload-202",e.errorCodes),false)}if(i&&t){e.updateValueInMap(t,"error",getI18nError("duet-upload-301",e.errorCodes),false)}e.bytesMaxReached=a;e.fileMaxReached=i;return{bytesMaxReached:a,fileMaxReached:i}};this.uploadFile=function(t){var a=[];for(var i=1;i<arguments.length;i++){a[i-1]=arguments[i]}return __awaiter(e,__spreadArray([t],a,true),void 0,(function(t,e,a){var i,n,r;if(e===void 0){e=false}return __generator(this,(function(d){switch(d.label){case 0:if(!e&&this.deferUpload){this.updateValueInMap(t.item.name,"pending",true,false);this.updateValueInMap(t.item.name,"group","pending",true)}else if(e){this.updateValueInMap(t.item.name,"pending",false,false);this.updateValueInMap(t.item.name,"group",undefined,true)}d.label=1;case 1:d.trys.push([1,4,,5]);if(!(!this.deferUpload||e))return[3,3];i=new FormData;i.append("file",t.item);if(a){i.append("key",a)}i.append("uid",t.uid);i.append("name",t.item.name);i.append("metadata",JSON.stringify({uid:t.uid,url:this.uri,size:t.item.size,meta:t.meta}));n=t;return[4,this.makeXHRPostRequest(i)];case 2:n.xhr=d.sent();d.label=3;case 3:return[3,5];case 4:r=d.sent();this.updateValueInMap(t.item.name,"valid",false,false);return[3,5];case 5:return[2]}}))}))};this.uploadPendingFiles=function(){for(var t=0,a=Array.from(e.files.entries());t<a.length;t++){var i=a[t],n=i[0],r=i[1];if(r.group==="pending"&&r.pending===true){e.uploadFile(r,true,n)}}};this.getItemFromUID=function(t){for(var a=0,i=Array.from(e.files.entries());a<i.length;a++){var n=i[a],r=n[0],d=n[1];if(d.uid===t){return{value:d,key:r}}}return null};this.handleExternalUploadButton=function(t,a){if(e.externalUploadButton){if(t||a){e.externalUploadButton.disabled=true}else{e.externalUploadButton.disabled=false}}};this.onDelete=function(t,a){var i=e.getItemFromUID(t);var n=i.key;var r=e.files.get(n);e.files.delete(n);var d=e.validateTotals(),o=d.bytesMaxReached,l=d.fileMaxReached;e.handleExternalUploadButton(o,l);e.kick();e.duetDelete.emit({originalEvent:a,data:{deletion:r},component:"duet-upload"});if(!e.external&&!r.pending){e.makeXHRDeleteRequest(r)}e.resetFormFields()};this.onCancel=function(t,a){var i=e.getItemFromUID(t).key;var n=e.files.get(i);e.files.delete(i);var r=e.validateTotals(),d=r.bytesMaxReached,o=r.fileMaxReached;e.handleExternalUploadButton(d,o);if(!e.external){var l=n.xhr;if(l){l.abort()}}e.kick();e.resetFormFields();e.duetCancel.emit({originalEvent:a,data:{cancelled:n},component:"duet-upload"})};this.onUpload=function(t,a){e.duetUpload.emit({originalEvent:t,metaData:a,component:"duet-upload"})};this.onBlur=function(t){e.duetBlur.emit({originalEvent:t,component:"duet-upload"})};this.onProgress=function(t,a,i){e.duetChange.emit({originalEvent:i,data:{key:t,percentComplete:a},component:"duet-upload"})};this.onFocus=function(t){e.duetFocus.emit({originalEvent:t,component:"duet-upload"})};this.onReady=function(){e.duetReady.emit({component:"duet-upload"})};this.onDone=function(){e.duetDone.emit({component:"duet-upload",data:{files:e.files}})};this.filterMap=function(){var t=Array.from(e.files.values());var a=[];var i=[];var n=[];var r=[];var d=false;t.forEach((function(t){var o=e.getGroupFromItemData(t);if(t.meta&&!!t.meta.badges){d=true}if(o===e.DefaultGroups.success){r.push({uid:t.uid,data:t})}else if(o===e.DefaultGroups.inprogress){a.push({uid:t.uid,data:t})}else if(o===e.DefaultGroups.pending){n.push({uid:t.uid,data:t})}else if(o===e.DefaultGroups.failure){i.push({uid:t.uid,data:t})}else if(t.group){a.push({uid:t.uid,data:t})}}));return{pending:n,failure:i,success:r,inprogress:a,hasCategory:d}};this.getActions=function(t,e){return e.filter((function(e){return e.map.includes(t)}))};this.renderUploadedItems=function(){e.itemRefs.clear();var t=e.filterMap();var a=t.hasCategory;var i=e.hideCancelButton?e.actions.filter((function(t){return t.name!=="cancel"})):e.actions;var n=e.groups.map((function(n){var r=t[n.id];if(!(r===null||r===void 0?void 0:r.length)){return}return h(Fragment,null,!e.hideGroups&&h(UploadItemHeader,{categoryLabel:a?e.categoryLabel:undefined,label:n.label}),r.map((function(t){return e.mapFilesToUploadItems(t.data,n.id,a,i)})))}));return h(Fragment,null,e.showUploadedItemsHeader&&h(UploadItemHeader,{categoryLabel:a?e.categoryLabel:undefined,label:e.uploadedItemsHeaderLabel}),n)};this.tick=Date.now();this.accessibleActiveDescendant=undefined;this.accessibleDescribedBy=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.external=false;this.middleware=null;this.deferUpload=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",size:"x-small",background:"gray-lightest",name:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Delete the file",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",size:"x-small",background:"gray-lightest",name:"cancel",map:["inprogress","pending"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.uri=undefined;this.showLinks=false;this.caption=undefined;this.statusLabelDefaults={fi:{inProgress:"Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",inProgressWithErrors:"Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",done:"Lähetys valmis, {filesTotal} lisätty onnistuneesti",doneWithErrors:"Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",files:"tiedostoa",file:"tiedosto"},sv:{inProgress:"Laddar upp {filesUploaded} av {filesTotal}",inProgressWithErrors:"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",done:"Uppladdningen slutförd, {filesTotal} har lagts till",doneWithErrors:"Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",files:"filer",file:"fil"},en:{inProgress:"Uploading {filesUploaded} of {filesTotal}",inProgressWithErrors:"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",done:"Upload completed, {filesTotal} added successfully",doneWithErrors:"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",files:"files",file:"file"}};this.statusMessageLabel=getLocaleString(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=getLocaleString(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.identifier=undefined;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=getLocaleString(this.labelDefaults);this.descriptionDefaults={en:"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",sv:"Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",fi:"Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena."};this.description=getLocaleString(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=getLocaleString(this.fileListEmptyDefaults);this.error="";this.errorCodes=errorCodes;this.name=undefined;this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="";this.multiple=true;this.limitSelection=false;this.hideCancelButton=false;this.value=undefined;this.externalUploadButtonId=undefined;this.captionOnBottom=false;this.showUploadedItemsHeader=false;this.uploadedItemsHeaderLabel={fi:"Ladattu tiedosto",sv:"Lägg till en bilaga",en:"Uploaded file"};this.headerHeadingLevel="h3";this.hideHeader=false;this.emitEvent=false;this.actionButtonTitles={cancel:false,delete:false};this.renameDuplicates=false;this.groups=[{id:this.DefaultGroups.success,label:{fi:"Valmiit tiedostot",sv:"Files success",en:"Files success"}},{id:this.DefaultGroups.failure,label:{fi:"Tiedostot, joissa on virheitä",sv:"Filer med fel",en:"Files with errors"}},{id:this.DefaultGroups.inprogress,label:{fi:"Kesken olevat tiedostot",sv:"Filer inprogress",en:"Files inprogress"}},{id:this.DefaultGroups.pending,label:{en:"Files to upload",sv:"Filer att ladda",fi:"Ladattavat tiedostot"}}]}t.prototype.watchValidHandler=function(t,e){if(t!==e){this.kick()}};t.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=sanitizeString(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}inheritGlobalTheme(this);this.listenForActionEvents();this.onReady();this.externalUploadButton=document.querySelector("#".concat(this.externalUploadButtonId));this.processedButtonTitles=parsePossibleJSON(this.actionButtonTitles)};t.prototype.componentWillRender=function(){this.verifyValidity()};t.prototype.setFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeInput){this.nativeInput.focus(t)}return[2]}))}))};t.prototype.upload=function(){return __awaiter(this,arguments,void 0,(function(t){var e,a,i;if(t===void 0){t=undefined}return __generator(this,(function(n){e=this.validateTotals(),a=e.bytesMaxReached,i=e.fileMaxReached;if(a||i){this.handleExternalUploadButton(a,i);this.kick();return[2]}this.metaData=t;this.nativeInput.click();return[2]}))}))};t.prototype.uploadPending=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.uploadPendingFiles();return[2]}))}))};t.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.kick();return[4,this.setFocus()];case 1:t.sent();return[2]}}))}))};t.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};t.prototype.updateValue=function(t,e,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(t,e,a);return[2]}))}))};t.prototype.focusActionButton=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(a){switch(a.label){case 0:return[4,(e=this.itemRefs.get(t))===null||e===void 0?void 0:e.focusActionButton()];case 1:a.sent();return[2]}}))}))};t.prototype.render=function(){var t=this;var e=this.identifier||this.uploadId;var a=Math.round((this.maxBytesTotal?this.maxBytesTotal:this.maxBytes*this.maxFiles)/1024/1024);var i=Math.round(this.maxBytes/1024/1024);var n=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());n=n.replace(/{maxbytes}/g,"".concat(i.toString()," MB"));n=n.replace(/{maxbytestotal}/g,"".concat(a.toString()," MB"));n=n.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));if(this.externalUploadButton){this.externalUploadButton.accessibleLabel="".concat(this.externalUploadButton.innerText,". ").concat(n)}return h(Host,{key:"38feaf3413c255e5602a19102a388d6711488a96",class:{"duet-m-0":this.margin==="none"}},h("duet-fieldset",{key:"f9d0d2c774f44f358468d0e4ce6f782cbcbf3154","label-heading-level":this.headerHeadingLevel,"label-hidden":this.hideHeader,label:this.label},h("slot",{key:"842fd73d7a52c84756eb16f16fd7adc45a04e85b",name:"header"}),!this.files.size&&h("duet-empty-state",{key:"a6395aad02057aee59a1bf6e4c003409c93c3022",id:this.labelId,part:this.identifier?"".concat(this.identifier,"-empty-state"):"duet-upload-empty-state",icon:"messaging-attachment"},h("duet-paragraph",{key:"d918e8f0dc3e5259a79f29d32636f53c15be18c9",margin:"none"},this.fileListEmpty)),!!this.files.size&&h("slot",{key:"2404442011955d90a1f97a9c10156de9ef34ca71",name:"fileheader"}),!!this.files.size&&h("duet-upload-aria-status",{key:"904339cf1df017bbd912a030102b9fc834c3ffd1",invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&this.renderUploadedItems(),!!this.files.size&&h("slot",{key:"0ae4715f3f753a29fc05173d5322d9c3cc44c90d",name:"filefooter"}),h("slot",{key:"4d803341b66718656b31b5f934fb8d93eca9788d",name:"uploadfooter"}),this.captionOnBottom&&h("duet-caption",{key:"8037c4c708dafbf143d6af166d53f6671722bc7c",margin:"none",size:"small"},h("div",{key:"e428fa5083174ad4b33d1563d6650743b06a9c10",class:"upload-bottom-caption"},n)),h("slot",{key:"3566dfc4ec670a6d9ac643c86b677c51a4c2af2b",name:"afterfooter"}),!this.hideButton&&h(Fragment,{key:"f28ec47277260bd20ca1edf2337028cc1f3e80a1"},h("duet-spacer",{key:"0224d4006036fac15971565b81ef29b0f9ae001d",size:"large"}),h("duet-button",{key:"4e8a7a0ad1861117d45c36d3150d5ff3208bea12",id:this.buttonId,onClick:this.startUpload,"accessible-controls":e,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel||"".concat(this.buttonLabel,". ").concat(n),"accessible-owns":e,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?"".concat(this.identifier,"-button-upload"):"duet-upload-button-upload"},this.buttonLabel)),(this.fileMaxReached||this.bytesMaxReached||this.filesToUploadExceedsLimit||this.filesToUploadTotalSizeIsAboveMax)&&h(Fragment,{key:"864de6deba948873fe7ada428e1af73106320c47"},h("duet-spacer",{key:"6540680972c8d28ef7f699cce9eb0440e3c913b5",size:"medium"}),h("duet-alert",{key:"0c566f6e55449a1e9067a749f937827b0935ab3d",part:this.identifier?"".concat(this.identifier,"-error-notification"):"duet-upload-error-notification"},this.fileMaxReached&&getI18nError("duet-upload-301",this.errorCodes),this.bytesMaxReached&&getI18nError("duet-upload-202",this.errorCodes),this.filesToUploadExceedsLimit&&getI18nError("duet-upload-302",this.errorCodes),this.filesToUploadTotalSizeIsAboveMax&&getI18nError("duet-upload-203",this.errorCodes))),h("duet-visually-hidden",{key:"36e20ff69c0ec8eb36ccd907ef1cf87453ce4815","aria-hidden":"true"},h("input",{key:"d567ddb0ef056f02ac40e2595ecf97bfaded35d7",ref:function(e){t.nativeInput=e},accept:!this.limitSelection?undefined:"".concat(this.allowedMimetypes,",").concat(this.allowedExtensions),onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(e){return t.onChange(e)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,tabIndex:-1}))))};t.prototype.makeXHRPostRequest=function(t){var e=this;var a=new XMLHttpRequest;var i=t.get("name");a.upload.addEventListener("progress",(function(t){e.updateProgress(t,i)}));a.upload.addEventListener("load",(function(){e.transferComplete(i)}));a.upload.addEventListener("error",(function(){e.transferFailed(i)}));a.upload.addEventListener("abort",(function(){e.transferCanceled(i)}));var n={payload:{data:t,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:undefined},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){n=this.middleware(n)}return makeXhrRequest(n)};t.prototype.makeXHRDeleteRequest=function(t){var e=t.uid,a=t.item;var i=new XMLHttpRequest;var n={"x-fileuid":e,"x-filename":a.name};var r={payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,argument:"?key=".concat(e,"&name=").concat(a.name),headers:n},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress};if(this.middleware){r=this.middleware(r)}return makeXhrRequest(r)};t.prototype.escapeSpecialCharacters=function(t){return(t+"").replace(/[\\"'(){}\[\]*?$^+]/g,"\\$&").replace(/\u0000/g,"\\0")};t.prototype.getRenamedFileName=function(t,e){var a=new RegExp("".concat(this.escapeSpecialCharacters(t)," \\(\\d+\\).").concat(e));var i=Array.from(this.files.entries()).map((function(t){var e=t[0],a=t[1];return e})).filter((function(i){return a.test(i)||i==="".concat(t,".").concat(e)})).sort((function(t,e){return t.split(".").slice(0,-1).join(".")>e.split(".").slice(0,-1).join(".")?1:-1})).pop().split(".").slice(0,-1).join(".");if(i===t){return"".concat(t," (1).").concat(e)}var n=parseInt(i.split("(").pop().slice(0,-1));return"".concat(t," (").concat(n+1,").").concat(e)};t.prototype.renameFiles=function(t){var e=this;return t.map((function(t){if(e.files.get(t.name)){var a=t.name.split(".");var i=a.pop();var n=a.join(".");var r=e.getRenamedFileName(n,i);return new File([t],r,{type:t.type,lastModified:t.lastModified})}else{return t}}))};t.prototype.onChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e,a,i,n,r,d,o,l,s,u,h,f;return __generator(this,(function(b){switch(b.label){case 0:a=Array.from((e=this.nativeInput)===null||e===void 0?void 0:e.files);this.filesToUploadExceedsLimit=false;if(filesToUploadCountAboveMax(this.files.size,a.length,this.maxFiles)){this.filesToUploadExceedsLimit=true;this.kick();return[2]}this.filesToUploadTotalSizeIsAboveMax=false;if(filesToUploadTotalSizeIsAboveMax(this.files,a,this.maxBytesTotal)){this.filesToUploadTotalSizeIsAboveMax=true;this.kick();return[2]}if(!a)return[3,6];if(this.renameDuplicates){a=this.renameFiles(a)}i=0,n=a;b.label=1;case 1:if(!(i<n.length))return[3,6];r=n[i];d=validateFile(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes},this.errorCodes),o=d.valid,l=d.errorMessage,s=d.errorType,u=d.errorSystem;h=this.genHashName();f={uid:h,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:s,message:o?undefined:l,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);if(!(o&&!this.external))return[3,3];return[4,this.uploadFile(f)];case 2:b.sent();return[3,4];case 3:if(o&&this.external){this.updateValueInMap(f.item.name,"pending",true,false);this.updateValueInMap(f.item.name,"group","pending",true)}else if(!o){this.updateValueInMap(r.name,"valid",false,true)}b.label=4;case 4:this.kick();b.label=5;case 5:i++;return[3,1];case 6:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return t}();DuetUpload.style=DuetUploadStyle0;export{DuetEditableTable as duet_editable_table,DuetTable as duet_table,DuetUpload as duet_upload};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-caf8af66.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";var duetEmptyStateCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}.duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:rgb(8, 42, 77);text-align:center;background:rgb(245, 248, 250);border-radius:4px}.duet-empty-state.duet-theme-turva{color:rgb(23, 28, 58);background:rgb(245, 247, 250)}";var DuetEmptyStateStyle0=duetEmptyStateCss;var DuetEmptyState=function(){function e(e){registerInstance(this,e);this.theme="";this.icon="messaging-question";this.size="medium"}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){return h(Host,{key:"15bccd2c13aab1465840c9dcc4318b7a112edf7b"},h("div",{key:"5952a98691e9c06ae16439f6411ae635f61d3db4",class:{"duet-empty-state":true,"duet-theme-turva":this.theme==="turva","duet-is-small":this.size==="small"}},h("duet-icon",{key:"7b46aa60033f7777c3e606baa4d548dfb46d4c9c",color:"currentColor",name:this.icon,size:this.size==="small"?"large":"x-large"}),h("div",{key:"0e58a4fea54cfd7cab1f5b611e5e076c03ffffe4"},h("slot",{key:"57378c8bb666cb31a04d0199c910ecf4b49b402f"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetEmptyState.style=DuetEmptyStateStyle0;export{DuetEmptyState as duet_empty_state};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-
|
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-caf8af66.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{c as createID}from"./create-id-149a1b6d.js";import{h as hasSlot}from"./slot-utils-44165de2.js";var duetFieldsetCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{position:relative;width:100%;min-width:0;border:0}fieldset legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:rgb(8, 42, 77);text-align:left;background:transparent}.duet-legend-wrapper.duet-legend-compact:not(.duet-legend-has-caption){line-height:1.25}.duet-theme-turva .duet-legend-wrapper{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(214, 28, 82);border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(214, 28, 82)}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}';var DuetFieldsetStyle0=duetFieldsetCss;var DuetFieldset=function(){function e(e){var t=this;registerInstance(this,e);this.errorId=createID("DuetError");this.labelId=createID("DuetLabel");this.checkHasTooltip=function(){t.hasTooltip=hasSlot(t.element,"tooltip")};this.hasTooltip=false;this.theme="";this.margin="auto";this.caption=undefined;this.label=undefined;this.compactLabel=false;this.error=undefined;this.accessibleLiveError="polite";this.labelHeadingLevel="span";this.labelHidden=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.checkHasTooltip()};e.prototype.render=function(){return h(Host,{key:"b168d38f9adb462f0f44e4e5d2f4696ca4d7bc10",class:{"duet-m-0":this.margin==="none"}},h("fieldset",{key:"7800fa169b7871195421414bf75c0d919d12bf9b","aria-labelledby":this.labelId,"aria-describedby":this.error?this.errorId:null,class:{"duet-fieldset":true,"duet-theme-turva":this.theme==="turva"}},h("legend",{key:"5f1926deca424959efcff40befe8779d2077998f",id:this.labelId},h(this.labelHeadingLevel,{key:"19d831a69931e0b557efff7f2653b23a017c136a"},this.label),this.caption&&h("span",{key:"03daf2a72c3a0bd7d8d52f428c2d26ed3d008bed"},this.caption)),h("div",{key:"790d7c7ac6f3141415cbe4cfe3a1e5196c354a32",class:{"duet-legend-wrapper":true,"duet-legend-has-caption":!!this.caption,"duet-legend-has-tooltip":this.hasTooltip,"duet-legend-hidden":this.labelHidden,"duet-legend-compact":this.compactLabel}},h("div",{key:"cde80fe36abae43beaea46abe5f9995f16c04c7c",class:"duet-fieldset-label"},h("span",{key:"9e67d598f47389ec90534d7899d399dc0558e24e","aria-hidden":"true"},this.label),h("slot",{key:"2d427290dc70d8d4f2ab05f03e283bf1cb9cd637",onSlotchange:this.checkHasTooltip,name:"tooltip"})),this.caption&&h("div",{key:"4ebecc5ab46bf1b48c6f3b981cfeb3c64de15393",class:"duet-fieldset-caption","aria-hidden":"true"},h("duet-caption",{key:"9281fb9d06e5e5c359504ca84f1e5f4c4a2f136f",theme:this.theme,margin:"none"},this.caption))),h("slot",{key:"e3afdf3b06e81f9eb49ad8a16c5792a3fef7dc86"}),h("span",{key:"97ada7026bc7d9d5c659be4eab71eaa416edab4f",class:"duet-fieldset-help",id:this.errorId,"aria-atomic":"true","aria-live":this.accessibleLiveError,"aria-relevant":"additions removals"},this.error&&h("span",{key:"35ecd3fbb5810c1e374ebe8d104a28ae475effa3"},this.error))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetFieldset.style=DuetFieldsetStyle0;export{DuetFieldset as duet_fieldset};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function o(e){try{c(i.next(e))}catch(e){a(e)}}function u(e){try{c(i["throw"](e))}catch(e){a(e)}}function c(e){e.done?n(e.value):r(e.value).then(o,u)}c((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(t){return c([e,t])}}function c(u){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(i=1,r&&(a=u[0]&2?r["return"]:u[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;if(r=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1];a=u;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(u);break}if(a[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];r=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent,h,H as Host}from"./index-
|
|
4
|
+
*/import{r as registerInstance,c as createEvent,h,H as Host}from"./index-caf8af66.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";var duetFileChooserCss="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.container{display:flex;flex-direction:row;gap:8px;align-items:center}.container .label{margin-bottom:8px}";var DuetFileChooserStyle0=duetFileChooserCss;var DuetUploadItem=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",3);this.onChange=function(e){e.preventDefault();e.stopPropagation();t.duetChange.emit({originalEvent:e,data:{files:t.nativeInput.files},component:"duet-file-chooser"})};this.theme="";this.multiple=false;this.accept=undefined}e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){(e=this.nativeInput)===null||e===void 0?void 0:e.click();return[2]}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.nativeInput.files]}))}))};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){var e=this;return h(Host,{key:"10d219682193a77214731256ff8efeb8847762aa"},h("duet-visually-hidden",{key:"78cf6009458b26f2f0f1bb1db60c850489e45556","aria-hidden":"true"},h("input",{key:"d1ad31afd5645d9ad9cd6b431532a76934812684",ref:function(t){e.nativeInput=t},type:"file",class:{"duet-upload":true},"aria-hidden":"true",tabIndex:-1,onChange:this.onChange,multiple:this.multiple,accept:this.accept})))};return e}();DuetUploadItem.style=DuetFileChooserStyle0;export{DuetUploadItem as duet_file_chooser};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function r(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function a(e){try{u(i.next(e))}catch(e){n(e)}}function d(e){try{u(i["throw"](e))}catch(e){n(e)}}function u(e){e.done?o(e.value):r(e.value).then(a,d)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,r,n,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(e){return function(t){return u([e,t])}}function u(d){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(o=0)),o)try{if(i=1,r&&(n=d[0]&2?r["return"]:d[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,d[1])).done)return n;if(r=0,n)d=[d[0]&2,n.value];switch(d[0]){case 0:case 1:n=d;break;case 4:o.label++;return{value:d[1],done:false};case 5:o.label++;r=d[1];d=[0];continue;case 7:d=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!n||d[1]>n[0]&&d[1]<n[3])){o.label=d[1];break}if(d[0]===6&&o.label<n[1]){o.label=n[1];n=d;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(d);break}if(n[2])o.ops.pop();o.trys.pop();continue}d=t.call(e,o)}catch(e){d=[6,e];r=0}finally{i=n=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Built with Duet Design System
|
|
4
|
-
*/import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-ed83a687.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import{D as DuetStringsExternalDefaults}from"./common-strings-af765cad.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-d2c8afdc.js";import{h as hasSlot}from"./slot-utils-035ffb1f.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";var duetFooterCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}::slotted([slot=info]){padding:0 28px;margin-top:0;margin-bottom:16px}@media (min-width: 62em){::slotted([slot=info]){padding:0;margin-top:calc(20px - 0.5em);margin-bottom:0}}.duet-footer{display:block;width:100%;padding-top:24px;padding-bottom:16px;margin-top:48px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(8, 42, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center}.duet-footer-top.duet-has-info{align-items:flex-start}}.duet-footer-top .footer-top-logo{flex-grow:1}.duet-footer-top .footer-top-right-container{flex-grow:1}@media (min-width: 62em){.duet-footer-top .footer-top-right-container{text-align:right}}.duet-footer-top .footer-top-items{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding-left:28px}@media (min-width: 62em){.duet-footer-top .footer-top-items{flex-direction:row;justify-content:flex-end}}duet-logo{margin-bottom:24px;margin-left:16px !important}@media (min-width: 62em){duet-logo{margin-bottom:0;margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;padding-left:28px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-right:0 !important;padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;overflow-wrap:break-word}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{display:block;flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:28px;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(8, 42, 77);background:transparent !important;border-top:1px solid rgb(212, 223, 229)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(8, 42, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(222, 224, 228)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}';var DuetFooterStyle0=duetFooterCss;var i18n={fi:{lahi:"© LähiTapiola",turva:"© Turva"},sv:{lahi:"© LokalTapiola",turva:"© Turva"},en:{lahi:"© LocalTapiola",turva:"© Turva"}};var createEvent=function(e,t){return{component:"duet-footer",data:t,originalEvent:e}};var DuetFooter=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent$1(this,"duetChange",3);this.duetLogoClick=createEvent$1(this,"duetLogoClick",7);this.duetMenuClick=createEvent$1(this,"duetMenuClick",7);this.duetItemClick=createEvent$1(this,"duetItemClick",7);this.duetAnalytics=createEvent$1(this,"duetAnalytics",7);this.duetEvent=createEvent$1(this,"duetEvent",7);this.handleClick=function(e){if(e.data.analyticsId){t.duetAnalytics.emit({component:"duet-footer",analyticsId:e.data.analyticsId})}t.duetChange.emit(e)};this.handleLogoClick=function(e){var o=createEvent(e,{href:t.logoHref,label:"logo"});t.duetLogoClick.emit(o);t.handleClick(o)};this.handleMenuClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetMenuClick.emit(i)};this.handleItemClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetItemClick.emit(i)};this.emitDuetEvent=function(e,o){t.duetEvent.emit({component:"duet-footer",data:o,originalEvent:e})};this.setDataAttributes=function(e,t){if(!t.data){return}for(var o in t.data){e.dataset[o]=t.data[o]}};this.processedMainItem=null;this.processedItems=null;this.processedMenu=null;this.theme="";this.variation="default";this.margin="auto";this.logoHref="/";this.language=getLanguage();this.items=undefined;this.accessibleLabel=undefined;this.accessibleLabelExternalDefaults=DuetStringsExternalDefaults;this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults);this.menu=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.refresh();this.hasInfoSlot=hasSlot(this.element,"info")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"accessibleLabelExternal",defaults:"accessibleLabelExternalDefaults"});subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this);unsubscribeTabbingChange(this)};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.processedItems=parsePossibleJSON(this.items);this.processedMenu=parsePossibleJSON(this.menu);return[2]}))}))};e.prototype.render=function(){var e=this;var t=getLocaleString(i18n,this.language);var o=this.theme==="turva"?t.turva:t.lahi;return h("footer",{key:"8fd345b0b7ccb794b603dc1fa9164ebf8c495060",class:{"duet-footer":true,"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-footer-simple":this.variation==="simple"},"aria-label":this.accessibleLabel},h("div",{key:"773caa00c8f629d512537cfab5771e918c78ba57",class:"duet-footer-wrapper"},this.variation!=="simple"&&h("div",{key:"4541d65907daf88fe8fd3c740eabd4bd9ad82307",class:{"duet-footer-top":true,"duet-has-info":this.hasInfoSlot},part:"top"},h("div",{key:"549ec0600b48e174d161cbdfe01544126440da66",class:"footer-top-logo"},h("duet-logo",{key:"840cb0600e17103f1501cb248b89dd819f7a661e",href:this.logoHref,onClick:this.handleLogoClick,size:"large",inverse:true,language:this.language,theme:this.theme})),h("div",{key:"3327e1009bfc9721b5e2529dcc938cc8f4257854",class:"footer-top-right-container"},h("slot",{key:"a00901969c97143af27151402579f4ca5c12a84e",name:"info"}),h("div",{key:"e2e6e62fd027d2b77460546d9ab74f69a9f258bb",class:"footer-top-items"},this.processedItems&&this.processedItems.map((function(t,o){var i,r,n,a,d,u;return h(Fragment,null,o>0&&h("duet-spacer",{size:"x-large",direction:"horizontal"}),h("duet-button",{ref:function(o){return e.setDataAttributes(o,t)},theme:e.theme,id:t.id,class:"duet-footer-link",variation:"plain",margin:"none",fixed:true,negative:true,url:t.href,external:t.external,icon:((i=t.href)===null||i===void 0?void 0:i.startsWith("tel:"))?"form-tel":((r=t.href)===null||r===void 0?void 0:r.startsWith("mailto:"))?"navigation-message":"navigation-arrow-right","icon-right":!((n=t.href)===null||n===void 0?void 0:n.startsWith("tel:"))&&!((a=t.href)===null||a===void 0?void 0:a.startsWith("mailto:")),"icon-size":((d=t.href)===null||d===void 0?void 0:d.startsWith("tel:"))||((u=t.href)===null||u===void 0?void 0:u.startsWith("mailto:"))?"medium":"medium-small",onClick:function(o){return e.handleItemClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label))}))))),h("slot",{key:"288da5793cca9b97494edad50ec731ebdb8cd008",name:"extra"}),h("p",{key:"d6e5f190770d85f7f23997fb3010940568a11da9",class:"duet-footer-menu",part:"menu"},h("span",{key:"d03cd42008101259ae77c5dfadad2fc719c3bc6f",class:"duet-footer-copyright"},"".concat(o," ").concat((new Date).getFullYear())),h("span",{key:"abf31941139f2bfcaa290710ce02a3151815d6f5",class:"duet-footer-menu-links"},this.processedMenu&&h(Fragment,{key:"45e583b238584d4f699cf8d80d7e8c77d4204eea"},this.processedMenu.map((function(t){return h("a",{ref:function(o){return e.setDataAttributes(o,t)},href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleMenuClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label,t.external&&h(Fragment,null,h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("span",{class:"duet-footer-external"},h("duet-icon",{icon:actionNewWindowSmall.svg,size:"xx-small",margin:"none",color:"currentColor"}))),h("span",{class:"duet-footer-divider",role:"presentation","aria-hidden":"true"},"/"))}))))),h("p",{key:"673765574f21e139f2e25c722cf7e3f38fd7b2d3",class:"duet-footer-copyright duet-footer-copyright-mobile"},"".concat(o," ").concat((new Date).getFullYear()))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:["refresh"],items:["refresh"]}},enumerable:false,configurable:true});return e}();DuetFooter.style=DuetFooterStyle0;export{DuetFooter as duet_footer};
|
|
4
|
+
*/import{r as registerInstance,c as createEvent$1,h,F as Fragment,g as getElement}from"./index-caf8af66.js";import{a as actionNewWindowSmall}from"./action-new-window-small-1945be91.js";import{D as DuetStringsExternalDefaults}from"./common-strings-af765cad.js";import{i as inheritGlobalTheme}from"./themeable-component-860041c5.js";import{s as subscribeTabbingChange,u as unsubscribeTabbingChange}from"./keyboard-utils-daf80d44.js";import{a as getLanguage,g as getLocaleString,c as connectLanguageChangeObserver,d as disconnectLanguageChangeObserver}from"./language-utils-37fa60e1.js";import{h as hasSlot}from"./slot-utils-44165de2.js";import{p as parsePossibleJSON}from"./string-utils-192eb3c8.js";var duetFooterCss='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex-shrink:0;width:100%}::slotted([slot=info]){padding:0 28px;margin-top:0;margin-bottom:16px}@media (min-width: 62em){::slotted([slot=info]){padding:0;margin-top:calc(20px - 0.5em);margin-bottom:0}}.duet-footer{display:block;width:100%;padding-top:24px;padding-bottom:16px;margin-top:48px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:rgb(255, 255, 255);text-align:left;background:rgb(8, 42, 77)}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background:rgb(198, 12, 48)}.duet-footer a{color:rgb(255, 255, 255);text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center}.duet-footer-top.duet-has-info{align-items:flex-start}}.duet-footer-top .footer-top-logo{flex-grow:1}.duet-footer-top .footer-top-right-container{flex-grow:1}@media (min-width: 62em){.duet-footer-top .footer-top-right-container{text-align:right}}.duet-footer-top .footer-top-items{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding-left:28px}@media (min-width: 62em){.duet-footer-top .footer-top-items{flex-direction:row;justify-content:flex-end}}duet-logo{margin-bottom:24px;margin-left:16px !important}@media (min-width: 62em){duet-logo{margin-bottom:0;margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-menu{padding:20px !important;display:flex;gap:2rem;padding-left:28px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-right:0 !important;padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;overflow-wrap:break-word}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu .duet-footer-divider-copyright{display:none}.duet-footer-menu .duet-footer-menu-links{display:block;flex:1}@media (min-width: 62em){.duet-footer-menu .duet-footer-menu-links{text-align:right}}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{display:none;font-size:0.875rem;color:rgb(255, 255, 255)}@media (min-width: 62em){.duet-footer-copyright{display:inline}}.duet-footer-copyright.duet-footer-copyright-mobile{display:block;padding-top:0.5rem;padding-bottom:1.25rem;padding-left:28px;text-align:left}@media (min-width: 62em){.duet-footer-copyright.duet-footer-copyright-mobile{display:none}}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:rgb(8, 42, 77);background:transparent !important;border-top:1px solid rgb(212, 223, 229)}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:rgb(8, 42, 77)}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple .duet-footer-copyright-mobile{padding-left:0}.duet-footer-simple.duet-theme-turva{color:rgb(23, 28, 58);border-color:rgb(222, 224, 228)}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:rgb(23, 28, 58)}.duet-footer-external{display:inline-block;margin-left:4px;color:rgb(0, 119, 179)}.duet-theme-turva .duet-footer-external{color:rgb(255, 255, 255)}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:rgb(198, 12, 48)}';var DuetFooterStyle0=duetFooterCss;var i18n={fi:{lahi:"© LähiTapiola",turva:"© Turva"},sv:{lahi:"© LokalTapiola",turva:"© Turva"},en:{lahi:"© LocalTapiola",turva:"© Turva"}};var createEvent=function(e,t){return{component:"duet-footer",data:t,originalEvent:e}};var DuetFooter=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent$1(this,"duetChange",3);this.duetLogoClick=createEvent$1(this,"duetLogoClick",7);this.duetMenuClick=createEvent$1(this,"duetMenuClick",7);this.duetItemClick=createEvent$1(this,"duetItemClick",7);this.duetAnalytics=createEvent$1(this,"duetAnalytics",7);this.duetEvent=createEvent$1(this,"duetEvent",7);this.handleClick=function(e){if(e.data.analyticsId){t.duetAnalytics.emit({component:"duet-footer",analyticsId:e.data.analyticsId})}t.duetChange.emit(e)};this.handleLogoClick=function(e){var o=createEvent(e,{href:t.logoHref,label:"logo"});t.duetLogoClick.emit(o);t.handleClick(o)};this.handleMenuClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetMenuClick.emit(i)};this.handleItemClick=function(e,o){var i=createEvent(e,o);t.handleClick(i);t.duetItemClick.emit(i)};this.emitDuetEvent=function(e,o){t.duetEvent.emit({component:"duet-footer",data:o,originalEvent:e})};this.setDataAttributes=function(e,t){if(!t.data){return}for(var o in t.data){e.dataset[o]=t.data[o]}};this.processedMainItem=null;this.processedItems=null;this.processedMenu=null;this.theme="";this.variation="default";this.margin="auto";this.logoHref="/";this.language=getLanguage();this.items=undefined;this.accessibleLabel=undefined;this.accessibleLabelExternalDefaults=DuetStringsExternalDefaults;this.accessibleLabelExternal=getLocaleString(this.accessibleLabelExternalDefaults);this.menu=undefined}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.refresh();this.hasInfoSlot=hasSlot(this.element,"info")};e.prototype.connectedCallback=function(){connectLanguageChangeObserver(this,{prop:"accessibleLabelExternal",defaults:"accessibleLabelExternalDefaults"});subscribeTabbingChange(this)};e.prototype.disconnectedCallback=function(){disconnectLanguageChangeObserver(this);unsubscribeTabbingChange(this)};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.processedItems=parsePossibleJSON(this.items);this.processedMenu=parsePossibleJSON(this.menu);return[2]}))}))};e.prototype.render=function(){var e=this;var t=getLocaleString(i18n,this.language);var o=this.theme==="turva"?t.turva:t.lahi;return h("footer",{key:"0239c9d8d627418f97e0ae24abc1c9e2ca47c229",class:{"duet-footer":true,"duet-m-0":this.margin==="none","duet-theme-turva":this.theme==="turva","duet-footer-simple":this.variation==="simple"},"aria-label":this.accessibleLabel},h("div",{key:"98d1156ad2f44e0d8ab3121ee3db513b82386703",class:"duet-footer-wrapper"},this.variation!=="simple"&&h("div",{key:"ec729eff6008f31125a808b77a97155700a7b480",class:{"duet-footer-top":true,"duet-has-info":this.hasInfoSlot},part:"top"},h("div",{key:"0d5208bde7c1870767a3946cc9b9611585469908",class:"footer-top-logo"},h("duet-logo",{key:"e6f83fe8968570abb566d1ed1f7aa9fc2930441e",href:this.logoHref,onClick:this.handleLogoClick,size:"large",inverse:true,language:this.language,theme:this.theme})),h("div",{key:"c5c60cb251a4b78d0f5b86820abb813ee2db1f23",class:"footer-top-right-container"},h("slot",{key:"68ca65194609d5ead28262311b69a4a377f29c5d",name:"info"}),h("div",{key:"adc5b5c6f8d8fc6127acb6ba6d8a64459621cef5",class:"footer-top-items"},this.processedItems&&this.processedItems.map((function(t,o){var i,r,n,a,d,u;return h(Fragment,null,o>0&&h("duet-spacer",{size:"x-large",direction:"horizontal"}),h("duet-button",{ref:function(o){return e.setDataAttributes(o,t)},theme:e.theme,id:t.id,class:"duet-footer-link",variation:"plain",margin:"none",fixed:true,negative:true,url:t.href,external:t.external,icon:((i=t.href)===null||i===void 0?void 0:i.startsWith("tel:"))?"form-tel":((r=t.href)===null||r===void 0?void 0:r.startsWith("mailto:"))?"navigation-message":"navigation-arrow-right","icon-right":!((n=t.href)===null||n===void 0?void 0:n.startsWith("tel:"))&&!((a=t.href)===null||a===void 0?void 0:a.startsWith("mailto:")),"icon-size":((d=t.href)===null||d===void 0?void 0:d.startsWith("tel:"))||((u=t.href)===null||u===void 0?void 0:u.startsWith("mailto:"))?"medium":"medium-small",onClick:function(o){return e.handleItemClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label))}))))),h("slot",{key:"92391739f41ed1b88eb34ebd22bbdd1a6b94a5e3",name:"extra"}),h("p",{key:"692485bfd3c550e5abd173b358cf7ec18ec49a3e",class:"duet-footer-menu",part:"menu"},h("span",{key:"074f786140a2219127a987881cbce05045c150b8",class:"duet-footer-copyright"},"".concat(o," ").concat((new Date).getFullYear())),h("span",{key:"95e7b17c83d7994ec0ae75e710a39900f1f7dfad",class:"duet-footer-menu-links"},this.processedMenu&&h(Fragment,{key:"78e702876e88b1f4b0e2edcf09e06154f601824b"},this.processedMenu.map((function(t){return h("a",{ref:function(o){return e.setDataAttributes(o,t)},href:t.href,id:t.id,target:t.external?"_blank":"_self",onClick:function(o){return e.handleMenuClick(o,t)},onMouseEnter:function(o){return e.emitDuetEvent(o,t)},onTouchStart:function(o){return e.emitDuetEvent(o,t)}},t.label,t.external&&h(Fragment,null,h("duet-visually-hidden",null,", ",e.accessibleLabelExternal),h("span",{class:"duet-footer-external"},h("duet-icon",{icon:actionNewWindowSmall.svg,size:"xx-small",margin:"none",color:"currentColor"}))),h("span",{class:"duet-footer-divider",role:"presentation","aria-hidden":"true"},"/"))}))))),h("p",{key:"716654a0bdebdb4b395c0cd1dafbfcbea17d69eb",class:"duet-footer-copyright duet-footer-copyright-mobile"},"".concat(o," ").concat((new Date).getFullYear()))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{menu:["refresh"],items:["refresh"]}},enumerable:false,configurable:true});return e}();DuetFooter.style=DuetFooterStyle0;export{DuetFooter as duet_footer};
|