@awc-ui/core 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/lazy-loading-indicator-CoC-_DMs.js +69 -0
- package/dist/cjs/lazy-loading-indicator-CoC-_DMs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/md-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/md-app-bar.cjs.entry.js +1 -1
- package/dist/cjs/md-area-chart.cjs.entry.js +2 -2
- package/dist/cjs/md-autocomplete.cjs.entry.js +4 -3
- package/dist/cjs/md-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/md-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/md-badge.cjs.entry.js +2 -2
- package/dist/cjs/md-bar-chart.cjs.entry.js +2 -2
- package/dist/cjs/md-bottom-sheet.cjs.entry.js +4 -4
- package/dist/cjs/md-breadcrumbs.cjs.entry.js +2 -2
- package/dist/cjs/md-button-group.cjs.entry.js +2 -2
- package/dist/cjs/{md-button_7.cjs.entry.js → md-button_6.cjs.entry.js} +13 -38
- package/dist/cjs/md-button_6.cjs.entry.js.map +1 -0
- package/dist/cjs/md-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/md-chip.cjs.entry.js +2 -2
- package/dist/cjs/md-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/md-dialog.cjs.entry.js +2 -2
- package/dist/cjs/md-divider.cjs.entry.js +2 -2
- package/dist/cjs/md-fab-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/md-fab-menu.cjs.entry.js +2 -2
- package/dist/cjs/md-fab.cjs.entry.js +2 -2
- package/dist/cjs/md-line-chart.cjs.entry.js +2 -2
- package/dist/cjs/md-list-item.cjs.entry.js +3 -3
- package/dist/cjs/md-list.cjs.entry.js +3 -3
- package/dist/cjs/md-loading-indicator-CmzdcYLR.js +33 -0
- package/dist/cjs/md-loading-indicator-CmzdcYLR.js.map +1 -0
- package/dist/cjs/md-loading-indicator.cjs.entry.js +11 -0
- package/dist/cjs/md-loading-indicator.cjs.entry.js.map +1 -0
- package/dist/cjs/md-menu_2.cjs.entry.js +5 -5
- package/dist/cjs/md-multi-select.cjs.entry.js +5 -4
- package/dist/cjs/md-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/md-navigation-bar.cjs.entry.js +1 -1
- package/dist/cjs/md-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/md-number-field.cjs.entry.js +2 -2
- package/dist/cjs/md-organization-chart.cjs.entry.js +2 -2
- package/dist/cjs/md-otp-field.cjs.entry.js +3 -3
- package/dist/cjs/md-search.cjs.entry.js +7 -6
- package/dist/cjs/md-search.cjs.entry.js.map +1 -1
- package/dist/cjs/md-select-option.cjs.entry.js +1 -1
- package/dist/cjs/md-select.cjs.entry.js +5 -4
- package/dist/cjs/md-select.cjs.entry.js.map +1 -1
- package/dist/cjs/md-slider.cjs.entry.js +2 -2
- package/dist/cjs/md-sparkline.cjs.entry.js +2 -2
- package/dist/cjs/md-status-dot.cjs.entry.js +1 -1
- package/dist/cjs/md-table.cjs.entry.js +3 -3
- package/dist/cjs/md-text-field.cjs.entry.js +7 -7
- package/dist/cjs/md-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/md-transfer-list.cjs.entry.js +1 -1
- package/dist/cjs/md3.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/md-accordion-item/md-accordion-item.js +3 -3
- package/dist/collection/components/md-app-bar/md-app-bar.js +1 -1
- package/dist/collection/components/md-area-chart/md-area-chart.js +2 -2
- package/dist/collection/components/md-autocomplete/md-autocomplete.js +4 -3
- package/dist/collection/components/md-autocomplete/md-autocomplete.js.map +1 -1
- package/dist/collection/components/md-avatar/md-avatar.js +2 -2
- package/dist/collection/components/md-badge/md-badge.js +2 -2
- package/dist/collection/components/md-bar-chart/md-bar-chart.js +2 -2
- package/dist/collection/components/md-bottom-sheet/md-bottom-sheet.js +4 -4
- package/dist/collection/components/md-breadcrumbs/md-breadcrumbs.js +2 -2
- package/dist/collection/components/md-button/md-button.js +4 -3
- package/dist/collection/components/md-button/md-button.js.map +1 -1
- package/dist/collection/components/md-button-group/md-button-group.js +2 -2
- package/dist/collection/components/md-card/md-card.js +2 -2
- package/dist/collection/components/md-checkbox/md-checkbox.js +2 -2
- package/dist/collection/components/md-chip/md-chip.js +2 -2
- package/dist/collection/components/md-date-picker/md-date-picker.js +1 -1
- package/dist/collection/components/md-dialog/md-dialog.js +2 -2
- package/dist/collection/components/md-divider/md-divider.js +2 -2
- package/dist/collection/components/md-fab/md-fab.js +2 -2
- package/dist/collection/components/md-fab-menu/md-fab-menu.js +2 -2
- package/dist/collection/components/md-fab-menu-item/md-fab-menu-item.js +2 -2
- package/dist/collection/components/md-icon-button/md-icon-button.js +4 -4
- package/dist/collection/components/md-line-chart/md-line-chart.js +2 -2
- package/dist/collection/components/md-list/md-list.js +3 -3
- package/dist/collection/components/md-list-item/md-list-item.js +3 -3
- package/dist/collection/components/md-loading-indicator/md-loading-indicator.js +2 -2
- package/dist/collection/components/md-menu/md-menu.js +3 -3
- package/dist/collection/components/md-menu-item/md-menu-item.js +2 -2
- package/dist/collection/components/md-multi-select/md-multi-select.js +5 -4
- package/dist/collection/components/md-multi-select/md-multi-select.js.map +1 -1
- package/dist/collection/components/md-navigation-bar/md-navigation-bar.js +1 -1
- package/dist/collection/components/md-navigation-tab/md-navigation-tab.js +2 -2
- package/dist/collection/components/md-number-field/md-number-field.js +2 -2
- package/dist/collection/components/md-organization-chart/md-organization-chart.js +2 -2
- package/dist/collection/components/md-otp-field/md-otp-field.js +3 -3
- package/dist/collection/components/md-ripple/md-ripple.js +1 -1
- package/dist/collection/components/md-search/md-search.js +7 -6
- package/dist/collection/components/md-search/md-search.js.map +1 -1
- package/dist/collection/components/md-select/md-select.js +5 -4
- package/dist/collection/components/md-select/md-select.js.map +1 -1
- package/dist/collection/components/md-select-option/md-select-option.js +1 -1
- package/dist/collection/components/md-slider/md-slider.js +2 -2
- package/dist/collection/components/md-sparkline/md-sparkline.js +2 -2
- package/dist/collection/components/md-status-dot/md-status-dot.js +1 -1
- package/dist/collection/components/md-table/md-table.js +3 -3
- package/dist/collection/components/md-text-field/md-text-field.js +7 -7
- package/dist/collection/components/md-time-picker/md-time-picker.js +1 -1
- package/dist/collection/components/md-tooltip/md-tooltip.js +1 -1
- package/dist/collection/components/md-transfer-list/md-transfer-list.js +1 -1
- package/dist/collection/utils/lazy-loading-indicator.js +62 -0
- package/dist/collection/utils/lazy-loading-indicator.js.map +1 -0
- package/dist/components/md-accordion-item.js +1 -1
- package/dist/components/md-app-bar.js +1 -1
- package/dist/components/md-area-chart.js +1 -1
- package/dist/components/md-area-chart.js.map +1 -1
- package/dist/components/md-autocomplete.js +1 -1
- package/dist/components/md-autocomplete.js.map +1 -1
- package/dist/components/md-avatar.js +1 -1
- package/dist/components/md-badge.js +1 -1
- package/dist/components/md-bar-chart.js +1 -1
- package/dist/components/md-bottom-sheet.js +1 -1
- package/dist/components/md-breadcrumb-item.js +1 -1
- package/dist/components/md-breadcrumbs.js +1 -1
- package/dist/components/md-button-group.js +1 -1
- package/dist/components/md-button.js +1 -1
- package/dist/components/md-card.js +1 -1
- package/dist/components/md-checkbox.js +1 -1
- package/dist/components/md-chip.js +1 -1
- package/dist/components/md-date-picker.js +1 -1
- package/dist/components/md-date-picker.js.map +1 -1
- package/dist/components/md-dialog.js +1 -1
- package/dist/components/md-dialog.js.map +1 -1
- package/dist/components/md-divider.js +1 -1
- package/dist/components/md-divider.js.map +1 -1
- package/dist/components/md-fab-menu-item.js +1 -1
- package/dist/components/md-fab-menu.js +1 -1
- package/dist/components/md-fab.js +1 -1
- package/dist/components/md-icon-button.js +1 -1
- package/dist/components/md-line-chart.js +1 -1
- package/dist/components/md-line-chart.js.map +1 -1
- package/dist/components/md-list-item.js +1 -1
- package/dist/components/md-list.js +1 -1
- package/dist/components/md-loading-indicator.js +1 -1
- package/dist/components/md-menu-item.js +1 -1
- package/dist/components/md-menu.js +1 -1
- package/dist/components/md-multi-select.js +1 -1
- package/dist/components/md-multi-select.js.map +1 -1
- package/dist/components/md-navigation-bar.js +1 -1
- package/dist/components/md-navigation-rail-tab.js +1 -1
- package/dist/components/md-navigation-rail.js +1 -1
- package/dist/components/md-navigation-tab.js +1 -1
- package/dist/components/md-number-field.js +1 -1
- package/dist/components/md-organization-chart.js +1 -1
- package/dist/components/md-otp-field.js +1 -1
- package/dist/components/md-radio.js +1 -1
- package/dist/components/md-ripple.js +1 -1
- package/dist/components/md-search.js +1 -1
- package/dist/components/md-search.js.map +1 -1
- package/dist/components/md-segmented-button.js +1 -1
- package/dist/components/md-select-option.js +1 -1
- package/dist/components/md-select.js +1 -1
- package/dist/components/md-side-sheet.js +1 -1
- package/dist/components/md-slider.js +1 -1
- package/dist/components/md-snackbar.js +1 -1
- package/dist/components/md-snackbar.js.map +1 -1
- package/dist/components/md-sparkline.js +1 -1
- package/dist/components/md-split-button.js +1 -1
- package/dist/components/md-status-dot.js +1 -1
- package/dist/components/md-step.js +1 -1
- package/dist/components/md-step.js.map +1 -1
- package/dist/components/md-stepper.js +1 -1
- package/dist/components/md-stepper.js.map +1 -1
- package/dist/components/md-sub-menu-item.js +1 -1
- package/dist/components/md-tab.js +1 -1
- package/dist/components/md-table-expand-toggle.js +1 -1
- package/dist/components/md-table-pagination.js +1 -1
- package/dist/components/md-table-pagination.js.map +1 -1
- package/dist/components/md-table.js +1 -1
- package/dist/components/md-text-field.js +1 -1
- package/dist/components/md-time-picker.js +1 -1
- package/dist/components/md-time-picker.js.map +1 -1
- package/dist/components/md-tooltip.js +1 -1
- package/dist/components/md-transfer-list.js +1 -1
- package/dist/components/{p-Eb44PPZa.js → p-1RSrsLOs.js} +2 -2
- package/dist/components/{p-D8oM1Kr3.js → p-2HV152w7.js} +2 -2
- package/dist/components/{p-BA2v4IuG.js → p-6ZDAcEKN.js} +2 -2
- package/dist/components/{p-BADA63mI.js → p-B2fYoYe9.js} +2 -2
- package/dist/components/p-B2fYoYe9.js.map +1 -0
- package/dist/components/{p-CCMritCA.js → p-C77M30dm.js} +2 -2
- package/dist/{components-csr/p-Bmu7RqHM.js → components/p-CNgkGl_1.js} +2 -2
- package/dist/components/p-CNgkGl_1.js.map +1 -0
- package/dist/components/{p-CtVItLby.js → p-D5Ht729E.js} +2 -2
- package/dist/components/p-DPqGg8C1.js +2 -0
- package/dist/components/p-DPqGg8C1.js.map +1 -0
- package/dist/components/{p-CTC8XAB6.js → p-De3E5Q8v.js} +2 -2
- package/dist/components/{p-B-JfuA2g.js → p-Dm_7DA1f.js} +2 -2
- package/dist/components/{p-DEzb9xsY.js → p-Dz3R-2Wn.js} +2 -2
- package/dist/components/{p-B-iHDK5h.js → p-Zjf9uhOr.js} +2 -2
- package/dist/components/{p-DfU4xY2F.js → p-ssLobpGS.js} +2 -2
- package/dist/components/{p-DYL-8C5C.js → p-zMR3UIR_.js} +2 -2
- package/dist/components-csr/md-accordion-item.js +1 -1
- package/dist/components-csr/md-app-bar.js +1 -1
- package/dist/components-csr/md-area-chart.js +1 -1
- package/dist/components-csr/md-area-chart.js.map +1 -1
- package/dist/components-csr/md-autocomplete.js +1 -1
- package/dist/components-csr/md-autocomplete.js.map +1 -1
- package/dist/components-csr/md-avatar.js +1 -1
- package/dist/components-csr/md-badge.js +1 -1
- package/dist/components-csr/md-bar-chart.js +1 -1
- package/dist/components-csr/md-bottom-sheet.js +1 -1
- package/dist/components-csr/md-breadcrumb-item.js +1 -1
- package/dist/components-csr/md-breadcrumbs.js +1 -1
- package/dist/components-csr/md-button-group.js +1 -1
- package/dist/components-csr/md-button.js +1 -1
- package/dist/components-csr/md-card.js +1 -1
- package/dist/components-csr/md-checkbox.js +1 -1
- package/dist/components-csr/md-chip.js +1 -1
- package/dist/components-csr/md-date-picker.js +1 -1
- package/dist/components-csr/md-date-picker.js.map +1 -1
- package/dist/components-csr/md-dialog.js +1 -1
- package/dist/components-csr/md-dialog.js.map +1 -1
- package/dist/components-csr/md-divider.js +1 -1
- package/dist/components-csr/md-divider.js.map +1 -1
- package/dist/components-csr/md-fab-menu-item.js +1 -1
- package/dist/components-csr/md-fab-menu.js +1 -1
- package/dist/components-csr/md-fab.js +1 -1
- package/dist/components-csr/md-icon-button.js +1 -1
- package/dist/components-csr/md-line-chart.js +1 -1
- package/dist/components-csr/md-line-chart.js.map +1 -1
- package/dist/components-csr/md-list-item.js +1 -1
- package/dist/components-csr/md-list.js +1 -1
- package/dist/components-csr/md-loading-indicator.js +1 -1
- package/dist/components-csr/md-menu-item.js +1 -1
- package/dist/components-csr/md-menu.js +1 -1
- package/dist/components-csr/md-multi-select.js +1 -1
- package/dist/components-csr/md-multi-select.js.map +1 -1
- package/dist/components-csr/md-navigation-bar.js +1 -1
- package/dist/components-csr/md-navigation-rail-tab.js +1 -1
- package/dist/components-csr/md-navigation-rail.js +1 -1
- package/dist/components-csr/md-navigation-tab.js +1 -1
- package/dist/components-csr/md-number-field.js +1 -1
- package/dist/components-csr/md-organization-chart.js +1 -1
- package/dist/components-csr/md-otp-field.js +1 -1
- package/dist/components-csr/md-radio.js +1 -1
- package/dist/components-csr/md-ripple.js +1 -1
- package/dist/components-csr/md-search.js +1 -1
- package/dist/components-csr/md-search.js.map +1 -1
- package/dist/components-csr/md-segmented-button.js +1 -1
- package/dist/components-csr/md-select-option.js +1 -1
- package/dist/components-csr/md-select.js +1 -1
- package/dist/components-csr/md-side-sheet.js +1 -1
- package/dist/components-csr/md-slider.js +1 -1
- package/dist/components-csr/md-snackbar.js +1 -1
- package/dist/components-csr/md-snackbar.js.map +1 -1
- package/dist/components-csr/md-sparkline.js +1 -1
- package/dist/components-csr/md-split-button.js +1 -1
- package/dist/components-csr/md-status-dot.js +1 -1
- package/dist/components-csr/md-step.js +1 -1
- package/dist/components-csr/md-step.js.map +1 -1
- package/dist/components-csr/md-stepper.js +1 -1
- package/dist/components-csr/md-stepper.js.map +1 -1
- package/dist/components-csr/md-sub-menu-item.js +1 -1
- package/dist/components-csr/md-tab.js +1 -1
- package/dist/components-csr/md-table-expand-toggle.js +1 -1
- package/dist/components-csr/md-table-pagination.js +1 -1
- package/dist/components-csr/md-table-pagination.js.map +1 -1
- package/dist/components-csr/md-table.js +1 -1
- package/dist/components-csr/md-text-field.js +1 -1
- package/dist/components-csr/md-time-picker.js +1 -1
- package/dist/components-csr/md-time-picker.js.map +1 -1
- package/dist/components-csr/md-tooltip.js +1 -1
- package/dist/components-csr/md-transfer-list.js +1 -1
- package/dist/components-csr/p-6WgHjhDg.js +2 -0
- package/dist/components-csr/p-6WgHjhDg.js.map +1 -0
- package/dist/components-csr/{p-C0DlKmRg.js → p-BEmwDSzw.js} +2 -2
- package/dist/components-csr/{p-DvXQXhgu.js → p-BQKzjYcY.js} +2 -2
- package/dist/components-csr/{p-CG6FaRlt.js → p-BWMwewtY.js} +2 -2
- package/dist/components-csr/{p--OUYjgKN.js → p-BZakoRau.js} +2 -2
- package/dist/components-csr/p-BZakoRau.js.map +1 -0
- package/dist/components-csr/{p-CSrxeWwL.js → p-Bkt_X-6v.js} +2 -2
- package/dist/components-csr/{p-Hm3X1iai.js → p-C3vB0Hd9.js} +2 -2
- package/dist/components-csr/{p-CrbzXk64.js → p-CF7mq5T7.js} +2 -2
- package/dist/components-csr/{p-DF19mmLl.js → p-CVMM-tdC.js} +2 -2
- package/dist/components-csr/{p-C4_7YnHT.js → p-DMQ-6aj8.js} +2 -2
- package/dist/components-csr/{p--TCJgZnE.js → p-DjKPc5EU.js} +2 -2
- package/dist/{components/p-Lsoo1B-2.js → components-csr/p-If0JHsYV.js} +2 -2
- package/dist/components-csr/p-If0JHsYV.js.map +1 -0
- package/dist/components-csr/{p-IWA0yIjJ.js → p-R_guULjT.js} +2 -2
- package/dist/components-csr/{p-uZbtHo-A.js → p-uSMrgqAy.js} +2 -2
- package/dist/esm/{a11y-C6CRqodW.js → a11y-BckJ95d7.js} +3 -3
- package/dist/esm/{a11y-C6CRqodW.js.map → a11y-BckJ95d7.js.map} +1 -1
- package/dist/esm/{bar-chart-ZZrajEkM.js → bar-chart-BuTyuCbt.js} +4 -4
- package/dist/esm/{bar-chart-ZZrajEkM.js.map → bar-chart-BuTyuCbt.js.map} +1 -1
- package/dist/esm/{chart-32olae06.js → chart-ByIhkqsG.js} +4 -4
- package/dist/esm/{chart-32olae06.js.map → chart-ByIhkqsG.js.map} +1 -1
- package/dist/esm/{hit-test-DHldf5Lm.js → hit-test-c_hI-yCX.js} +3 -3
- package/dist/esm/{hit-test-DHldf5Lm.js.map → hit-test-c_hI-yCX.js.map} +1 -1
- package/dist/esm/lazy-loading-indicator-BWFcjJiK.js +67 -0
- package/dist/esm/lazy-loading-indicator-BWFcjJiK.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/md-accordion-item.entry.js +3 -3
- package/dist/esm/md-app-bar.entry.js +1 -1
- package/dist/esm/md-area-chart.entry.js +6 -6
- package/dist/esm/md-autocomplete.entry.js +4 -3
- package/dist/esm/md-autocomplete.entry.js.map +1 -1
- package/dist/esm/md-avatar_2.entry.js +3 -3
- package/dist/esm/md-badge.entry.js +2 -2
- package/dist/esm/md-bar-chart.entry.js +6 -6
- package/dist/esm/md-bottom-sheet.entry.js +4 -4
- package/dist/esm/md-breadcrumb-item.entry.js +1 -1
- package/dist/esm/md-breadcrumbs.entry.js +2 -2
- package/dist/esm/md-button-group.entry.js +2 -2
- package/dist/esm/{md-button_7.entry.js → md-button_6.entry.js} +15 -39
- package/dist/esm/md-button_6.entry.js.map +1 -0
- package/dist/esm/md-checkbox.entry.js +2 -2
- package/dist/esm/md-chip.entry.js +2 -2
- package/dist/esm/md-date-picker.entry.js +1 -1
- package/dist/esm/md-dialog.entry.js +2 -2
- package/dist/esm/md-divider.entry.js +2 -2
- package/dist/esm/md-fab-menu-item.entry.js +2 -2
- package/dist/esm/md-fab-menu.entry.js +2 -2
- package/dist/esm/md-fab.entry.js +2 -2
- package/dist/esm/md-line-chart.entry.js +6 -6
- package/dist/esm/md-list-item.entry.js +4 -4
- package/dist/esm/md-list.entry.js +3 -3
- package/dist/esm/md-loading-indicator-Bf-Pt29l.js +31 -0
- package/dist/esm/md-loading-indicator-Bf-Pt29l.js.map +1 -0
- package/dist/esm/md-loading-indicator.entry.js +5 -0
- package/dist/esm/md-loading-indicator.entry.js.map +1 -0
- package/dist/esm/md-menu_2.entry.js +5 -5
- package/dist/esm/md-multi-select.entry.js +5 -4
- package/dist/esm/md-multi-select.entry.js.map +1 -1
- package/dist/esm/md-navigation-bar.entry.js +1 -1
- package/dist/esm/md-navigation-rail-tab.entry.js +1 -1
- package/dist/esm/md-navigation-tab.entry.js +3 -3
- package/dist/esm/md-number-field.entry.js +2 -2
- package/dist/esm/md-organization-chart.entry.js +2 -2
- package/dist/esm/md-otp-field.entry.js +3 -3
- package/dist/esm/md-pie-chart.entry.js +2 -2
- package/dist/esm/md-search.entry.js +7 -6
- package/dist/esm/md-search.entry.js.map +1 -1
- package/dist/esm/md-select-option.entry.js +1 -1
- package/dist/esm/md-select.entry.js +5 -4
- package/dist/esm/md-select.entry.js.map +1 -1
- package/dist/esm/md-slider.entry.js +2 -2
- package/dist/esm/md-sparkline.entry.js +6 -6
- package/dist/esm/md-status-dot.entry.js +1 -1
- package/dist/esm/md-table.entry.js +3 -3
- package/dist/esm/md-text-field.entry.js +7 -7
- package/dist/esm/md-time-picker.entry.js +1 -1
- package/dist/esm/md-transfer-list.entry.js +1 -1
- package/dist/esm/md3.js +1 -1
- package/dist/esm/{rtl-DvOKnoqK.js → rtl-CVFH1DkU.js} +3 -3
- package/dist/esm/{rtl-DvOKnoqK.js.map → rtl-CVFH1DkU.js.map} +1 -1
- package/dist/esm/{url-BjYKc1Ge.js → url-BdEoSBtL.js} +3 -3
- package/dist/esm/{url-BjYKc1Ge.js.map → url-BdEoSBtL.js.map} +1 -1
- package/dist/md3/md3.esm.js +1 -1
- package/dist/md3/p-08f1c469.entry.js +2 -0
- package/dist/md3/{p-7f53a423.entry.js.map → p-08f1c469.entry.js.map} +1 -1
- package/dist/md3/{p-7112374d.entry.js → p-108f89d7.entry.js} +2 -2
- package/dist/md3/{p-d7e99f9e.entry.js → p-1112bffc.entry.js} +2 -2
- package/dist/md3/{p-ef7b1826.entry.js → p-114c270b.entry.js} +2 -2
- package/dist/md3/{p-944e69e0.entry.js → p-1835fe36.entry.js} +2 -2
- package/dist/md3/{p-22633b2d.entry.js → p-2ba2db3b.entry.js} +2 -2
- package/dist/md3/{p-1d7e0203.entry.js → p-3f64a27d.entry.js} +2 -2
- package/dist/md3/{p-bed8dfec.entry.js → p-43c708ad.entry.js} +2 -2
- package/dist/md3/{p-ae360663.entry.js → p-4b7cf934.entry.js} +2 -2
- package/dist/md3/{p-27135a6b.entry.js → p-4f26bd60.entry.js} +2 -2
- package/dist/md3/{p-2befc42c.entry.js → p-56c7c570.entry.js} +2 -2
- package/dist/md3/{p-0a599351.entry.js → p-56ca0c3c.entry.js} +2 -2
- package/dist/md3/{p-96c06b24.entry.js → p-5b63149a.entry.js} +2 -2
- package/dist/md3/{p-4ba3623e.entry.js → p-5f668b0a.entry.js} +2 -2
- package/dist/md3/{p-9b9677cc.entry.js → p-6237ddac.entry.js} +2 -2
- package/dist/md3/{p-b243284b.entry.js → p-6d65fc6a.entry.js} +2 -2
- package/dist/md3/{p-8b1ea5dc.entry.js → p-707b6d7c.entry.js} +2 -2
- package/dist/md3/{p-a49df43d.entry.js → p-71f1660b.entry.js} +2 -2
- package/dist/md3/{p-7858833e.entry.js → p-7501170f.entry.js} +2 -2
- package/dist/md3/{p-6ea7117d.entry.js → p-7d1686a7.entry.js} +2 -2
- package/dist/md3/p-7e7f0e45.entry.js +2 -0
- package/dist/md3/p-7e7f0e45.entry.js.map +1 -0
- package/dist/md3/{p-4aed552f.entry.js → p-80379565.entry.js} +2 -2
- package/dist/md3/p-830724e4.entry.js +2 -0
- package/dist/md3/p-830724e4.entry.js.map +1 -0
- package/dist/md3/{p-e3c37222.entry.js → p-87f88d62.entry.js} +2 -2
- package/dist/md3/p-8a7e0297.entry.js +2 -0
- package/dist/md3/p-8a7e0297.entry.js.map +1 -0
- package/dist/md3/{p-8135c606.entry.js → p-8bdcda53.entry.js} +2 -2
- package/dist/md3/p-9003a7d4.entry.js +2 -0
- package/dist/md3/p-9003a7d4.entry.js.map +1 -0
- package/dist/md3/{p-6bf632c7.entry.js → p-90ccf4c3.entry.js} +2 -2
- package/dist/md3/{p-BjYKc1Ge.js → p-BdEoSBtL.js} +2 -2
- package/dist/md3/{p-BjYKc1Ge.js.map → p-BdEoSBtL.js.map} +1 -1
- package/dist/md3/{p-DzPKu-Ma.js → p-CGqeEMjY.js} +2 -2
- package/dist/md3/{p-DzPKu-Ma.js.map → p-CGqeEMjY.js.map} +1 -1
- package/dist/md3/{p-DvOKnoqK.js → p-CVFH1DkU.js} +2 -2
- package/dist/md3/{p-DvOKnoqK.js.map → p-CVFH1DkU.js.map} +1 -1
- package/dist/md3/p-Cch92tDM.js +2 -0
- package/dist/md3/{p-RLxbNqRv.js.map → p-Cch92tDM.js.map} +1 -1
- package/dist/md3/p-D17cVKxS.js +2 -0
- package/dist/md3/p-D17cVKxS.js.map +1 -0
- package/dist/md3/{p-Bx6--dQF.js → p-DGtztV3K.js} +2 -2
- package/dist/md3/{p-Bx6--dQF.js.map → p-DGtztV3K.js.map} +1 -1
- package/dist/md3/p-DnKDoE8K.js +2 -0
- package/dist/md3/p-DnKDoE8K.js.map +1 -0
- package/dist/md3/{p-5f39b49d.entry.js → p-ab568d1c.entry.js} +2 -2
- package/dist/md3/p-ae30e899.entry.js +2 -0
- package/dist/md3/p-ae30e899.entry.js.map +1 -0
- package/dist/md3/p-b54bbf88.entry.js +2 -0
- package/dist/md3/p-b54bbf88.entry.js.map +1 -0
- package/dist/md3/{p-21c89d1d.entry.js → p-ba011453.entry.js} +2 -2
- package/dist/md3/{p-cdcea99f.entry.js → p-c2944c87.entry.js} +2 -2
- package/dist/md3/{p-3a4bd4eb.entry.js → p-cc6e8afd.entry.js} +2 -2
- package/dist/md3/{p-c0476406.entry.js → p-d8885f53.entry.js} +2 -2
- package/dist/md3/{p-da0c36d9.entry.js → p-db6fb4e1.entry.js} +2 -2
- package/dist/md3/{p-5929e59c.entry.js → p-dcba2857.entry.js} +2 -2
- package/dist/md3/{p-925768ac.entry.js → p-e357e8ac.entry.js} +2 -2
- package/dist/md3/{p-e6b09e71.entry.js → p-e5c6795e.entry.js} +2 -2
- package/dist/md3/{p-1e85b8a8.entry.js → p-e871663b.entry.js} +2 -2
- package/dist/md3/p-f297d786.entry.js +2 -0
- package/dist/md3/{p-38f82d34.entry.js.map → p-f297d786.entry.js.map} +1 -1
- package/dist/md3/{p-b5586b66.entry.js → p-f5399b73.entry.js} +2 -2
- package/dist/md3/{p-5c35f916.entry.js → p-fd686966.entry.js} +2 -2
- package/dist/md3/{p-C_ogF68H.js → p-nhfFYWzy.js} +2 -2
- package/dist/md3/{p-C_ogF68H.js.map → p-nhfFYWzy.js.map} +1 -1
- package/dist/types/utils/lazy-loading-indicator.d.ts +7 -0
- package/hydrate/index.js +172 -106
- package/hydrate/index.mjs +172 -106
- package/package.json +18 -4
- package/dist/cjs/md-button_7.cjs.entry.js.map +0 -1
- package/dist/components/p-BADA63mI.js.map +0 -1
- package/dist/components/p-Lsoo1B-2.js.map +0 -1
- package/dist/components-csr/p--OUYjgKN.js.map +0 -1
- package/dist/components-csr/p-Bmu7RqHM.js.map +0 -1
- package/dist/esm/md-button_7.entry.js.map +0 -1
- package/dist/md3/p-2dda08b2.entry.js +0 -2
- package/dist/md3/p-2dda08b2.entry.js.map +0 -1
- package/dist/md3/p-38f82d34.entry.js +0 -2
- package/dist/md3/p-5db87a9d.entry.js +0 -2
- package/dist/md3/p-5db87a9d.entry.js.map +0 -1
- package/dist/md3/p-637baee1.entry.js +0 -2
- package/dist/md3/p-637baee1.entry.js.map +0 -1
- package/dist/md3/p-7f53a423.entry.js +0 -2
- package/dist/md3/p-RLxbNqRv.js +0 -2
- package/dist/md3/p-b7602557.entry.js +0 -2
- package/dist/md3/p-b7602557.entry.js.map +0 -1
- package/dist/md3/p-eddae19a.entry.js +0 -2
- package/dist/md3/p-eddae19a.entry.js.map +0 -1
- /package/dist/components/{p-Eb44PPZa.js.map → p-1RSrsLOs.js.map} +0 -0
- /package/dist/components/{p-D8oM1Kr3.js.map → p-2HV152w7.js.map} +0 -0
- /package/dist/components/{p-BA2v4IuG.js.map → p-6ZDAcEKN.js.map} +0 -0
- /package/dist/components/{p-CCMritCA.js.map → p-C77M30dm.js.map} +0 -0
- /package/dist/components/{p-CtVItLby.js.map → p-D5Ht729E.js.map} +0 -0
- /package/dist/components/{p-CTC8XAB6.js.map → p-De3E5Q8v.js.map} +0 -0
- /package/dist/components/{p-B-JfuA2g.js.map → p-Dm_7DA1f.js.map} +0 -0
- /package/dist/components/{p-DEzb9xsY.js.map → p-Dz3R-2Wn.js.map} +0 -0
- /package/dist/components/{p-B-iHDK5h.js.map → p-Zjf9uhOr.js.map} +0 -0
- /package/dist/components/{p-DfU4xY2F.js.map → p-ssLobpGS.js.map} +0 -0
- /package/dist/components/{p-DYL-8C5C.js.map → p-zMR3UIR_.js.map} +0 -0
- /package/dist/components-csr/{p-C0DlKmRg.js.map → p-BEmwDSzw.js.map} +0 -0
- /package/dist/components-csr/{p-DvXQXhgu.js.map → p-BQKzjYcY.js.map} +0 -0
- /package/dist/components-csr/{p-CG6FaRlt.js.map → p-BWMwewtY.js.map} +0 -0
- /package/dist/components-csr/{p-CSrxeWwL.js.map → p-Bkt_X-6v.js.map} +0 -0
- /package/dist/components-csr/{p-Hm3X1iai.js.map → p-C3vB0Hd9.js.map} +0 -0
- /package/dist/components-csr/{p-CrbzXk64.js.map → p-CF7mq5T7.js.map} +0 -0
- /package/dist/components-csr/{p-DF19mmLl.js.map → p-CVMM-tdC.js.map} +0 -0
- /package/dist/components-csr/{p-C4_7YnHT.js.map → p-DMQ-6aj8.js.map} +0 -0
- /package/dist/components-csr/{p--TCJgZnE.js.map → p-DjKPc5EU.js.map} +0 -0
- /package/dist/components-csr/{p-IWA0yIjJ.js.map → p-R_guULjT.js.map} +0 -0
- /package/dist/components-csr/{p-uZbtHo-A.js.map → p-uSMrgqAy.js.map} +0 -0
- /package/dist/md3/{p-7112374d.entry.js.map → p-108f89d7.entry.js.map} +0 -0
- /package/dist/md3/{p-d7e99f9e.entry.js.map → p-1112bffc.entry.js.map} +0 -0
- /package/dist/md3/{p-ef7b1826.entry.js.map → p-114c270b.entry.js.map} +0 -0
- /package/dist/md3/{p-944e69e0.entry.js.map → p-1835fe36.entry.js.map} +0 -0
- /package/dist/md3/{p-22633b2d.entry.js.map → p-2ba2db3b.entry.js.map} +0 -0
- /package/dist/md3/{p-1d7e0203.entry.js.map → p-3f64a27d.entry.js.map} +0 -0
- /package/dist/md3/{p-bed8dfec.entry.js.map → p-43c708ad.entry.js.map} +0 -0
- /package/dist/md3/{p-ae360663.entry.js.map → p-4b7cf934.entry.js.map} +0 -0
- /package/dist/md3/{p-27135a6b.entry.js.map → p-4f26bd60.entry.js.map} +0 -0
- /package/dist/md3/{p-2befc42c.entry.js.map → p-56c7c570.entry.js.map} +0 -0
- /package/dist/md3/{p-0a599351.entry.js.map → p-56ca0c3c.entry.js.map} +0 -0
- /package/dist/md3/{p-96c06b24.entry.js.map → p-5b63149a.entry.js.map} +0 -0
- /package/dist/md3/{p-4ba3623e.entry.js.map → p-5f668b0a.entry.js.map} +0 -0
- /package/dist/md3/{p-9b9677cc.entry.js.map → p-6237ddac.entry.js.map} +0 -0
- /package/dist/md3/{p-b243284b.entry.js.map → p-6d65fc6a.entry.js.map} +0 -0
- /package/dist/md3/{p-8b1ea5dc.entry.js.map → p-707b6d7c.entry.js.map} +0 -0
- /package/dist/md3/{p-a49df43d.entry.js.map → p-71f1660b.entry.js.map} +0 -0
- /package/dist/md3/{p-7858833e.entry.js.map → p-7501170f.entry.js.map} +0 -0
- /package/dist/md3/{p-6ea7117d.entry.js.map → p-7d1686a7.entry.js.map} +0 -0
- /package/dist/md3/{p-4aed552f.entry.js.map → p-80379565.entry.js.map} +0 -0
- /package/dist/md3/{p-e3c37222.entry.js.map → p-87f88d62.entry.js.map} +0 -0
- /package/dist/md3/{p-8135c606.entry.js.map → p-8bdcda53.entry.js.map} +0 -0
- /package/dist/md3/{p-6bf632c7.entry.js.map → p-90ccf4c3.entry.js.map} +0 -0
- /package/dist/md3/{p-5f39b49d.entry.js.map → p-ab568d1c.entry.js.map} +0 -0
- /package/dist/md3/{p-21c89d1d.entry.js.map → p-ba011453.entry.js.map} +0 -0
- /package/dist/md3/{p-cdcea99f.entry.js.map → p-c2944c87.entry.js.map} +0 -0
- /package/dist/md3/{p-3a4bd4eb.entry.js.map → p-cc6e8afd.entry.js.map} +0 -0
- /package/dist/md3/{p-c0476406.entry.js.map → p-d8885f53.entry.js.map} +0 -0
- /package/dist/md3/{p-da0c36d9.entry.js.map → p-db6fb4e1.entry.js.map} +0 -0
- /package/dist/md3/{p-5929e59c.entry.js.map → p-dcba2857.entry.js.map} +0 -0
- /package/dist/md3/{p-925768ac.entry.js.map → p-e357e8ac.entry.js.map} +0 -0
- /package/dist/md3/{p-e6b09e71.entry.js.map → p-e5c6795e.entry.js.map} +0 -0
- /package/dist/md3/{p-1e85b8a8.entry.js.map → p-e871663b.entry.js.map} +0 -0
- /package/dist/md3/{p-b5586b66.entry.js.map → p-f5399b73.entry.js.map} +0 -0
- /package/dist/md3/{p-5c35f916.entry.js.map → p-fd686966.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mdButtonCss","MdButton","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","type","variant","size","shape","disabled","softDisabled","ripple","loading","icon","trailingIcon","href","target","toggle","selected","shapeMorph","mirrorIcon","suppressExpandIconFlip","fullWidth","connectedLeft","connectedRight","value","groupTabindex","roleOverride","density","hasSlottedLeadingIcon","hasSlottedTrailingIcon","pressed","handleClick","e","isDisabled","preventDefault","nextSelected","evt","mdClick","emit","originalEvent","defaultPrevented","mdChange","sanitizeHref","window","open","SAFE_WINDOW_FEATURES","internals","form","requestSubmit","reset","handleKeyDown","key","triggerRipple","el","click","setTimeout","handlePointerDown","handlePointerUp","componentDidLoad","shadow","shadowRoot","leadingSlot","querySelector","trailingSlot","addEventListener","assignedElements","length","render","isEffectivelyDisabled","hasLeadingIcon","hasTrailingIcon","h","Host","class","role","String","undefined","tabindex","onClick","onKeyDown","onPointerDown","onPointerUp","onPointerLeave","onPointerCancel","part","name","LazyLoadingIndicator"],"sources":["src/components/md-button/md-button.css?tag=md-button&encapsulation=shadow","src/components/md-button/md-button.tsx"],"sourcesContent":["/* ==========================================================\n md-button — Material Design 3 Common Button\n Spec: https://m3.material.io/components/buttons/specs\n API: https://developer.android.com/reference/kotlin/\n androidx/compose/material3/ButtonDefaults\n Supports M3 + M3 Expressive (size, shape)\n\n PUBLIC CSS CUSTOM PROPERTIES (override per-instance):\n --md-button-container-color Container background\n --md-button-label-color Label + icon text color\n --md-button-icon-color Icon-only color override\n --md-button-icon-size Icon dimensions\n --md-button-container-shape Border-radius override\n --md-button-outline-color Outlined border color\n --md-button-outline-width Outlined border width\n --md-button-width Fixed inline-size (default: auto)\n --md-button-min-width Minimum inline-size (default: per-size touch target)\n --md-button-max-width Maximum inline-size (default: none)\n --md-button-height Fixed block-size (default: auto)\n --md-button-min-height Minimum block-size (default: per-size touch target)\n\n CSS PARTS:\n state-layer State-layer overlay\n icon Leading icon (fallback)\n trailing-icon Trailing icon (fallback)\n label Label text wrapper\n loading Loading spinner\n\n SLOTS:\n leading-icon Custom leading icon (replaces icon prop)\n trailing-icon Custom trailing icon (replaces trailingIcon prop)\n\n RTL:\n Layout uses CSS logical properties throughout, so leading/\n trailing icons swap visual sides automatically in `dir=\"rtl\"`.\n Set the `mirror-icon` attribute on buttons that use directional\n glyphs (arrows, chevrons) so the icon path itself flips.\n ========================================================== */\n\n:host {\n --_container-color: var(--md-button-container-color, transparent);\n --_label-color: var(--md-button-label-color, var(--md-sys-color-primary));\n --_state-layer-color: var(--md-sys-color-primary);\n --_container-elevation: var(--md-sys-elevation-0, none);\n --_icon-size: var(--md-button-icon-size, 18px);\n\n /* Sizing — defaults come from each size class via --_size-* tokens.\n Public --md-button-{width,min-width,max-width,height,min-height}\n custom properties override per-instance for variable / full-width\n buttons without sacrificing the spec touch-target on resize. */\n --_width: var(--md-button-width, auto);\n /* Min-width tightens with density too (floored at 40px) so short-label\n buttons narrow, not just content-wide ones. Unchanged at density 0. */\n --_min-width: var(\n --md-button-min-width,\n max(40px, calc(var(--_size-min-width, 48px) + var(--md-sys-density-scale, 0) * 4px))\n );\n --_max-width: var(--md-button-max-width, none);\n --_height: var(--md-button-height, auto);\n /* Global density: on top of the size scale, each `data-density` rung (0…-4)\n trims 4px off the touch target, floored at 24px so small buttons stay\n usable. density-scale is 0 by default so the per-size height is unchanged. */\n --_min-height: var(\n --md-button-min-height,\n max(24px, calc(var(--_size-min-height, 32px) + var(--md-sys-density-scale, 0) * 4px))\n );\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n user-select: none;\n text-decoration: none;\n border: none;\n /* Transparent resting outline; focus-visible swaps outline-color in instantly.\n Deliberately NOT transitioned — on hydration the host's pre-upgrade UA outline\n (style:none, color:currentColor) animates to solid/transparent, which renders a\n dark ring that fades out on every button. Most visible when many mount at once\n (e.g. the 42 day cells in md-date-picker). Instant focus ring matches M3. */\n outline: 3px solid transparent;\n outline-offset: 2px;\n box-sizing: border-box;\n inline-size: var(--_width);\n block-size: var(--_height);\n min-inline-size: var(--_min-width);\n min-block-size: var(--_min-height);\n max-inline-size: var(--_max-width);\n background-color: var(--_container-color);\n color: var(--_label-color);\n box-shadow: var(--_container-elevation);\n --_shape-round: 20px;\n transition:\n box-shadow var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),\n background-color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),\n border-color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),\n border-radius var(--md-sys-motion-duration-medium4, 400ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1)),\n color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n -webkit-tap-highlight-color: transparent;\n vertical-align: middle;\n}\n\n/* ==========================================================\n 1. SIZE\n XS (32px) · SM (40px, default) · MD (48px) · LG (56px) · XL (96px)\n ========================================================== */\n/* Icon<->label gap tapers with density like the rest of the button: the\n container height and icon already shrink per rung, so a frozen gap made\n compact buttons read as loosely spaced. Each tier halves across the range\n (rate = base/8 per rung), floored at half its base. */\n:host(.md-button--xs) {\n --_icon-size: var(--md-button-icon-size, max(10px, calc(20px + var(--md-sys-density-scale, 0) * 2.5px)));\n --_shape-round: 16px;\n --_size-min-height: 32px;\n --_size-min-width: 48px;\n /* 25% across the density range, floored at half. At 50% the inset shrank\n faster than the button did — a -4 sm button was still 24px tall but had\n only 8px of side padding, which read crammed. */\n padding: 0 max(6px, calc(12px + var(--md-sys-density-scale, 0) * 0.75px));\n gap: max(2px, calc(4px + var(--md-sys-density-scale, 0) * 0.5px));\n font-family: var(--md-sys-typescale-label-medium-font-family, Roboto, sans-serif);\n font-size: max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));\n font-weight: var(--md-sys-typescale-label-medium-font-weight, 500);\n letter-spacing: var(--md-sys-typescale-label-medium-letter-spacing, 0.5px);\n line-height: max(14px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));\n}\n\n:host(.md-button--sm) {\n --_icon-size: var(--md-button-icon-size, max(10px, calc(20px + var(--md-sys-density-scale, 0) * 2.5px)));\n --_shape-round: 20px;\n --_size-min-height: 40px;\n --_size-min-width: 58px;\n /* 25% across the density range, floored at half. At 50% the inset shrank\n faster than the button did — a -4 sm button was still 24px tall but had\n only 8px of side padding, which read crammed. */\n padding: 0 max(8px, calc(16px + var(--md-sys-density-scale, 0) * 1px));\n gap: max(4px, calc(8px + var(--md-sys-density-scale, 0) * 1px));\n font-family: var(--md-sys-typescale-label-large-font-family, Roboto, sans-serif);\n font-size: max(12px, calc(14px + var(--md-sys-density-scale, 0) * 0.5px));\n font-weight: var(--md-sys-typescale-label-large-font-weight, 500);\n letter-spacing: var(--md-sys-typescale-label-large-letter-spacing, 0.1px);\n line-height: max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px));\n}\n\n:host(.md-button--md) {\n --_icon-size: var(--md-button-icon-size, max(12px, calc(24px + var(--md-sys-density-scale, 0) * 3px)));\n --_shape-round: 28px;\n --_size-min-height: 56px;\n --_size-min-width: 72px;\n /* 25% across the density range, floored at half. At 50% the inset shrank\n faster than the button did — a -4 sm button was still 24px tall but had\n only 8px of side padding, which read crammed. */\n padding: 0 max(12px, calc(24px + var(--md-sys-density-scale, 0) * 1.5px));\n gap: max(4px, calc(8px + var(--md-sys-density-scale, 0) * 1px));\n font-family: var(--md-sys-typescale-title-small-font-family, Roboto, sans-serif);\n font-size: max(12px, calc(14px + var(--md-sys-density-scale, 0) * 0.5px));\n font-weight: var(--md-sys-typescale-title-small-font-weight, 500);\n letter-spacing: var(--md-sys-typescale-title-small-letter-spacing, 0.1px);\n line-height: max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px));\n}\n\n:host(.md-button--lg) {\n --_icon-size: var(--md-button-icon-size, max(16px, calc(32px + var(--md-sys-density-scale, 0) * 4px)));\n --_shape-round: 48px;\n --_size-min-height: 96px;\n --_size-min-width: 88px;\n /* 25% across the density range, floored at half. At 50% the inset shrank\n faster than the button did — a -4 sm button was still 24px tall but had\n only 8px of side padding, which read crammed. */\n padding: 0 max(24px, calc(48px + var(--md-sys-density-scale, 0) * 3px));\n gap: max(6px, calc(12px + var(--md-sys-density-scale, 0) * 1.5px));\n font-family: var(--md-sys-typescale-title-medium-font-family, Roboto, sans-serif);\n font-size: max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));\n font-weight: var(--md-sys-typescale-title-medium-font-weight, 500);\n letter-spacing: var(--md-sys-typescale-title-medium-letter-spacing, 0.15px);\n line-height: max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));\n}\n\n:host(.md-button--xl) {\n --_icon-size: var(--md-button-icon-size, max(20px, calc(40px + var(--md-sys-density-scale, 0) * 5px)));\n --_shape-round: 68px;\n --_size-min-height: 136px;\n --_size-min-width: 120px;\n /* 25% across the density range, floored at half. At 50% the inset shrank\n faster than the button did — a -4 sm button was still 24px tall but had\n only 8px of side padding, which read crammed. */\n padding: 0 max(32px, calc(64px + var(--md-sys-density-scale, 0) * 4px));\n gap: max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px));\n font-family: var(--md-sys-typescale-headline-small-font-family, Roboto, sans-serif);\n font-size: max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));\n font-weight: var(--md-sys-typescale-headline-small-font-weight, 400);\n letter-spacing: var(--md-sys-typescale-headline-small-letter-spacing, 0px);\n line-height: max(24px, calc(32px + var(--md-sys-density-scale, 0) * 2px));\n}\n\n/* ==========================================================\n 1b. FULL WIDTH — block-level, fills inline axis\n `full-width` switches the host from inline-flex to flex and stretches\n inline-size to 100% of the containing block. The size's\n --_size-min-height (touch target) is still in force, so the button\n keeps its spec block-size unless --md-button-height overrides it.\n --md-button-width still wins if explicitly set.\n ========================================================== */\n:host(.md-button--full-width) {\n display: flex;\n --_width: var(--md-button-width, 100%);\n}\n\n/* ==========================================================\n 2. SHAPE\n Round (default) · Square (scaled corner radius)\n Round uses --_shape-round (height/2 per size) instead of\n corner-full (9999px) so the browser can smoothly interpolate\n border-radius transitions between resting and morphed states.\n --md-button-container-shape overrides both.\n ========================================================== */\n/* The RESTING radius is named (--_shape-rest) so the morph states below can be\n expressed as a blend back toward it. --_morph-to carries the morphed target\n and defaults to the resting value, so a button with no active morph state\n resolves to exactly its resting radius:\n\n calc(REST + FLAG * (MORPH - REST)) FLAG 1 -> MORPH, FLAG 0 -> REST\n\n That is what makes `data-shape-morph=\"off\"` / `shape-morph=\"off\"` freeze the\n shape (§13 in tokens.css) without a re-render and without :host-context,\n which Firefox does not implement. */\n:host(.md-button--round) {\n --_shape-rest: var(--md-button-container-shape, var(--_shape-round));\n border-radius: calc(var(--_shape-rest) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_shape-rest)) - var(--_shape-rest)));\n}\n\n:host(.md-button--square.md-button--xs) { --_shape-rest: var(--md-button-container-shape, var(--md-sys-shape-corner-small, 8px)); border-radius: calc(var(--_shape-rest) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_shape-rest)) - var(--_shape-rest))); }\n:host(.md-button--square.md-button--sm) { --_shape-rest: var(--md-button-container-shape, var(--md-sys-shape-corner-medium, 12px)); border-radius: calc(var(--_shape-rest) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_shape-rest)) - var(--_shape-rest))); }\n:host(.md-button--square.md-button--md) { --_shape-rest: var(--md-button-container-shape, var(--md-sys-shape-corner-medium, 12px)); border-radius: calc(var(--_shape-rest) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_shape-rest)) - var(--_shape-rest))); }\n:host(.md-button--square.md-button--lg) { --_shape-rest: var(--md-button-container-shape, var(--md-sys-shape-corner-large, 16px)); border-radius: calc(var(--_shape-rest) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_shape-rest)) - var(--_shape-rest))); }\n:host(.md-button--square.md-button--xl) { --_shape-rest: var(--md-button-container-shape, var(--md-sys-shape-corner-extra-large, 28px)); border-radius: calc(var(--_shape-rest) + var(--md-sys-shape-morph-enabled, 1) * (var(--_morph-to, var(--_shape-rest)) - var(--_shape-rest))); }\n\n/* ==========================================================\n 2b. SHAPE MORPHING — M3 Expressive\n Uses direct border-radius overrides for reliable transitions.\n\n Order: selected rules FIRST, pressed rules LAST so pressed\n always wins while the pointer is down.\n\n Asymmetric timing (M3 motion tokens):\n Release / selected : medium4 (400ms) + emphasized-decelerate\n Press-in : short4 (200ms) + standard\n ========================================================== */\n\n/* ── Selected shape — round resting → square tokens when selected ── */\n:host(.md-button--shape-morph.md-button--round.md-button--selected.md-button--xs) { --_morph-to: var(--md-sys-shape-corner-small, 8px); }\n:host(.md-button--shape-morph.md-button--round.md-button--selected.md-button--sm) { --_morph-to: var(--md-sys-shape-corner-medium, 12px); }\n:host(.md-button--shape-morph.md-button--round.md-button--selected.md-button--md) { --_morph-to: var(--md-sys-shape-corner-medium, 12px); }\n:host(.md-button--shape-morph.md-button--round.md-button--selected.md-button--lg) { --_morph-to: var(--md-sys-shape-corner-large, 16px); }\n:host(.md-button--shape-morph.md-button--round.md-button--selected.md-button--xl) { --_morph-to: var(--md-sys-shape-corner-extra-large, 28px); }\n\n/* ── Selected shape — square resting → round when selected ── */\n:host(.md-button--shape-morph.md-button--square.md-button--selected) {\n --_morph-to: var(--md-button-container-shape, var(--_shape-round));\n}\n\n/* ── Pressed shape — both round & square morph to more square, overrides selected ── */\n:host(.md-button--pressed.md-button--xs) {\n --_morph-to: var(--md-sys-shape-corner-extra-small, 4px);\n transition-duration: var(--md-sys-motion-duration-short4, 200ms);\n transition-timing-function: var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n}\n:host(.md-button--pressed.md-button--sm) {\n --_morph-to: var(--md-sys-shape-corner-small, 8px);\n transition-duration: var(--md-sys-motion-duration-short4, 200ms);\n transition-timing-function: var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n}\n:host(.md-button--pressed.md-button--md) {\n --_morph-to: var(--md-sys-shape-corner-small, 8px);\n transition-duration: var(--md-sys-motion-duration-short4, 200ms);\n transition-timing-function: var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n}\n:host(.md-button--pressed.md-button--lg) {\n --_morph-to: var(--md-sys-shape-corner-medium, 12px);\n transition-duration: var(--md-sys-motion-duration-short4, 200ms);\n transition-timing-function: var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n}\n:host(.md-button--pressed.md-button--xl) {\n --_morph-to: var(--md-sys-shape-corner-large, 16px);\n transition-duration: var(--md-sys-motion-duration-short4, 200ms);\n transition-timing-function: var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n}\n\n/* ==========================================================\n 2c. CONNECTED GROUP — per-corner border-radius\n Set by md-button-group when variant=\"connected\".\n shapeMorph is disabled for connected children so these rules\n only need to beat the base shape rules (section 2, specificity 0-1-0).\n ========================================================== */\n\n:host(.md-button--connected-left.md-button--xs),\n:host(.md-button--connected-right.md-button--xs) { --_c-inner: 4px; }\n:host(.md-button--connected-left.md-button--sm),\n:host(.md-button--connected-right.md-button--sm) { --_c-inner: 8px; }\n:host(.md-button--connected-left.md-button--md),\n:host(.md-button--connected-right.md-button--md) { --_c-inner: 8px; }\n:host(.md-button--connected-left.md-button--lg),\n:host(.md-button--connected-right.md-button--lg) { --_c-inner: 16px; }\n:host(.md-button--connected-left.md-button--xl),\n:host(.md-button--connected-right.md-button--xl) { --_c-inner: 20px; }\n\n/* Middle button — all corners inner */\n:host(.md-button--connected-left.md-button--connected-right) {\n border-radius: var(--_c-inner);\n}\n\n/* `connected-left` / `connected-right` reflect DOM-order siblings (set by\n md-button-group when a previous / next sibling exists), so the radii\n here must use logical corner properties to flip correctly under\n `dir=\"rtl\"`. The outer pill always lives on the free inline-start\n (first child) or inline-end (last child) edge. */\n\n/* First button (round) — pill on inline-start edge, inner on inline-end edge */\n:host(.md-button--round.md-button--connected-right:not(.md-button--connected-left)) {\n border-start-start-radius: var(--_shape-round);\n border-end-start-radius: var(--_shape-round);\n border-start-end-radius: var(--_c-inner);\n border-end-end-radius: var(--_c-inner);\n}\n\n/* Last button (round) — inner on inline-start edge, pill on inline-end edge */\n:host(.md-button--round.md-button--connected-left:not(.md-button--connected-right)) {\n border-start-start-radius: var(--_c-inner);\n border-end-start-radius: var(--_c-inner);\n border-start-end-radius: var(--_shape-round);\n border-end-end-radius: var(--_shape-round);\n}\n\n/* Square first / last — outer equals inner */\n:host(.md-button--square.md-button--connected-right:not(.md-button--connected-left)),\n:host(.md-button--square.md-button--connected-left:not(.md-button--connected-right)) {\n border-radius: var(--_c-inner);\n}\n\n/* ==========================================================\n 3. ICON PADDING\n An icon does NOT change the button's insets. The M3 Expressive size sheet\n specifies the SAME padding on both sides whether or not a leading icon is\n present (12/12, 16/16, 24/24, 48/48, 64/64) — the third number on those\n drawings is the icon-to-label gap, not a reduced leading inset. The size's\n base padding therefore applies symmetrically and there is nothing to override.\n ========================================================== */\n\n/* ==========================================================\n 4. COLOR VARIANTS\n --md-button-container-color and --md-button-label-color\n override the variant defaults when set.\n ========================================================== */\n\n/* Filled */\n:host(.md-button--filled) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-primary));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-on-primary));\n --_state-layer-color: var(--md-sys-color-on-primary);\n}\n:host(.md-button--filled:hover) { --_container-elevation: var(--md-sys-elevation-1); }\n:host(.md-button--filled:active) { --_container-elevation: var(--md-sys-elevation-0, none); }\n:host(.md-button--filled:focus-visible) { --_container-elevation: var(--md-sys-elevation-0, none); }\n\n/* Outlined */\n:host(.md-button--outlined) {\n --_container-color: var(--md-button-container-color, transparent);\n --_label-color: var(--md-button-label-color, var(--md-sys-color-primary));\n --_state-layer-color: var(--md-sys-color-primary);\n border: var(--md-button-outline-width, 1px) solid var(--md-button-outline-color, var(--md-sys-color-outline));\n}\n:host(.md-button--outlined.md-button--xs) { padding: 0 max(3px, calc(11px + var(--md-sys-density-scale, 0) * 2px)); }\n:host(.md-button--outlined.md-button--sm) { padding: 0 max(7px, calc(23px + var(--md-sys-density-scale, 0) * 4px)); }\n:host(.md-button--outlined.md-button--md) { padding: 0 max(9px, calc(27px + var(--md-sys-density-scale, 0) * 4px)); }\n:host(.md-button--outlined.md-button--lg) { padding: 0 max(10px, calc(31px + var(--md-sys-density-scale, 0) * 4px)); }\n:host(.md-button--outlined.md-button--xl) { padding: 0 max(15px, calc(47px + var(--md-sys-density-scale, 0) * 2px)); }\n:host(.md-button--outlined:hover:not(.md-button--disabled)) {\n border-color: var(--md-button-outline-color, var(--md-sys-color-primary));\n}\n:host(.md-button--outlined:focus-visible) {\n border-color: var(--md-button-outline-color, var(--md-sys-color-primary));\n}\n\n/* Text */\n:host(.md-button--text) {\n --_container-color: var(--md-button-container-color, transparent);\n --_label-color: var(--md-button-label-color, var(--md-sys-color-primary));\n --_state-layer-color: var(--md-sys-color-primary);\n}\n:host(.md-button--text.md-button--xs) { padding: 0 max(3px, calc(8px + var(--md-sys-density-scale, 0) * 2px)); }\n:host(.md-button--text.md-button--sm) { padding: 0 max(4px, calc(12px + var(--md-sys-density-scale, 0) * 4px)); }\n:host(.md-button--text.md-button--md) { padding: 0 max(5px, calc(16px + var(--md-sys-density-scale, 0) * 4px)); }\n:host(.md-button--text.md-button--lg) { padding: 0 max(6px, calc(20px + var(--md-sys-density-scale, 0) * 4px)); }\n:host(.md-button--text.md-button--xl) { padding: 0 max(10px, calc(32px + var(--md-sys-density-scale, 0) * 2px)); }\n\n/* Elevated */\n:host(.md-button--elevated) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-surface-container-low));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-primary));\n --_state-layer-color: var(--md-sys-color-primary);\n --_container-elevation: var(--md-sys-elevation-1);\n}\n:host(.md-button--elevated:hover) { --_container-elevation: var(--md-sys-elevation-2); }\n:host(.md-button--elevated:focus-visible) { --_container-elevation: var(--md-sys-elevation-1); }\n:host(.md-button--elevated:active) { --_container-elevation: var(--md-sys-elevation-1); }\n\n/* Tonal */\n:host(.md-button--tonal) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-secondary-container));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-on-secondary-container));\n --_state-layer-color: var(--md-sys-color-on-secondary-container);\n}\n:host(.md-button--tonal:hover) { --_container-elevation: var(--md-sys-elevation-1); }\n:host(.md-button--tonal:focus-visible) { --_container-elevation: var(--md-sys-elevation-0, none); }\n:host(.md-button--tonal:active) { --_container-elevation: var(--md-sys-elevation-0, none); }\n\n/* ==========================================================\n 4b. TOGGLE SELECTED / UNSELECTED — MD3 spec\n When toggle=true, the unselected state is muted; selected\n shows the full variant color. Mirrors md-icon-button pattern.\n ========================================================== */\n\n/* The toggle-state rules below all carry `:not(.md-button--disabled)` so\n they drop out when the host becomes disabled. Without it, their higher\n specificity (4 classes vs the disabled rules' 2–3) would override the\n muted disabled palette and the button would still look enabled. */\n\n/* ── Filled toggle ── */\n:host(.md-button--filled.md-button--toggle:not(.md-button--selected):not(.md-button--disabled)) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-primary));\n --_state-layer-color: var(--md-sys-color-primary);\n}\n\n/* ── Tonal toggle ── */\n:host(.md-button--tonal.md-button--toggle:not(.md-button--selected):not(.md-button--disabled)) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-on-surface-variant, #49454F));\n --_state-layer-color: var(--md-sys-color-on-surface-variant, #49454F);\n}\n\n/* ── Outlined toggle ── */\n:host(.md-button--outlined.md-button--toggle.md-button--selected:not(.md-button--disabled)) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-secondary-container, #E8DEF8));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-on-secondary-container, #1E192B));\n --_state-layer-color: var(--md-sys-color-on-secondary-container, #1E192B);\n border-color: transparent;\n}\n\n/* ── Elevated toggle ── */\n:host(.md-button--elevated.md-button--toggle:not(.md-button--selected):not(.md-button--disabled)) {\n --_container-color: var(--md-button-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));\n --_label-color: var(--md-button-label-color, var(--md-sys-color-on-surface-variant, #49454F));\n --_state-layer-color: var(--md-sys-color-on-surface-variant, #49454F);\n --_container-elevation: var(--md-sys-elevation-0, none);\n}\n\n/* ── Text toggle ── */\n:host(.md-button--text.md-button--toggle:not(.md-button--selected):not(.md-button--disabled)) {\n --_label-color: var(--md-button-label-color, var(--md-sys-color-on-surface-variant, #49454F));\n --_state-layer-color: var(--md-sys-color-on-surface-variant, #49454F);\n}\n\n/* ==========================================================\n 5. STATE LAYER\n ========================================================== */\n.md-button__state-layer {\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background-color: var(--_state-layer-color);\n opacity: 0;\n transition: opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n pointer-events: none;\n}\n:host(:hover) .md-button__state-layer {\n opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);\n}\n:host(:active:not(.md-button--disabled)) .md-button__state-layer {\n opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);\n transition-duration: var(--md-sys-motion-duration-short1, 50ms);\n transition-timing-function: var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1));\n}\n:host(:focus-visible) .md-button__state-layer {\n opacity: var(--md-sys-state-focus-state-layer-opacity, 0.12);\n}\n\n/* ==========================================================\n 6. FOCUS RING\n `z-index: 1` raises the focused button above its siblings so the\n outline is never clipped by a neighbor — important inside\n md-button-group, where connected groups have only 2px between\n buttons and standard groups animate neighbor padding on press.\n ========================================================== */\n/* Connected children inside md-button-group sit only 2px apart, so a\n 3px-outset focus ring naturally extends across the neighbor. The\n `z-index: 1` raise lets it draw *on top* of the neighbor cleanly so\n the ring keeps its full 2px breathing room — same visual treatment\n as a stand-alone button. */\n:host(:focus-visible) {\n outline-color: var(--md-sys-color-secondary);\n z-index: 1;\n}\n\n/* ==========================================================\n 7. DISABLED\n ========================================================== */\n:host(.md-button--disabled) {\n cursor: default;\n pointer-events: none;\n --_container-elevation: var(--md-sys-elevation-0, none) !important;\n transition: none;\n}\n\n:host([soft-disabled]) {\n cursor: default;\n pointer-events: auto;\n}\n:host([soft-disabled]) .md-button__state-layer { display: none; }\n\n:host(.md-button--filled.md-button--disabled),\n:host(.md-button--tonal.md-button--disabled) {\n --_container-color: color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent);\n}\n:host(.md-button--elevated.md-button--disabled) {\n --_container-color: color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent);\n --_container-elevation: var(--md-sys-elevation-0, none);\n}\n\n:host(.md-button--disabled) {\n --_label-color: color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent);\n}\n\n:host(.md-button--outlined.md-button--disabled) {\n --_container-color: transparent;\n border-color: color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-container-opacity, 0.12) * 100%), transparent);\n}\n\n:host(.md-button--text.md-button--disabled) {\n --_container-color: transparent;\n}\n\n:host(.md-button--disabled:hover) .md-button__state-layer,\n:host(.md-button--disabled:active) .md-button__state-layer,\n:host(.md-button--disabled:focus-visible) .md-button__state-layer {\n opacity: 0;\n}\n\n/* ==========================================================\n 8. ICON (prop-based fallback inside slot)\n ========================================================== */\n.md-button__icon,\n.md-button__trailing-icon {\n color: var(--md-button-icon-color, inherit);\n font-size: var(--_icon-size, 18px);\n width: var(--_icon-size, 18px);\n height: var(--_icon-size, 18px);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n/* ==========================================================\n 9. NAMED ICON SLOTS\n Slots use display:contents so they don't create a box;\n slotted content participates directly in flex layout.\n ========================================================== */\nslot[name=\"leading-icon\"],\nslot[name=\"trailing-icon\"] {\n display: contents;\n}\n\n::slotted([slot=\"leading-icon\"]),\n::slotted([slot=\"trailing-icon\"]) {\n color: var(--md-button-icon-color, inherit);\n width: var(--_icon-size, 18px);\n height: var(--_icon-size, 18px);\n flex-shrink: 0;\n}\n\n/* ----------------------------------------------------------\n Trailing-icon rotation when this button is a popover anchor.\n\n md-menu (and any other popup component using the same ARIA\n contract) sets aria-expanded=\"true\" on its anchor element\n while the popup is open. Rotating the trailing dropdown\n indicator 180° on that signal flips arrow_drop_down to\n point up, matching MD3 select-trigger behavior, with no\n wiring needed on the consumer side.\n\n Honors prefers-reduced-motion via short2 motion duration.\n ---------------------------------------------------------- */\n.md-button__trailing-icon,\n::slotted([slot=\"trailing-icon\"]) {\n transition: transform var(--md-sys-motion-duration-short2, 150ms)\n var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));\n}\n\n:host([aria-expanded=\"true\"]:not([suppress-expand-icon-flip])) .md-button__trailing-icon,\n:host([aria-expanded=\"true\"]:not([suppress-expand-icon-flip])) ::slotted([slot=\"trailing-icon\"]) {\n transform: rotate(180deg);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n\n .md-button__state-layer {\n transition: none;\n }\n\n .md-button__trailing-icon,\n ::slotted([slot=\"trailing-icon\"]) {\n transition: none;\n }\n}\n\n/* ==========================================================\n 10. LABEL\n ========================================================== */\n.md-button__label {\n display: flex;\n align-items: center;\n white-space: nowrap;\n}\n\n/* ==========================================================\n 11. LOADING SPINNER (scales with icon size)\n ========================================================== */\n.md-button__loading {\n /* A FRACTION of the icon it stands in for. Two constraints pull against each\n other: at full --_icon-size the ring reads heavier than the glyph (a bare\n stroke has none of the internal padding a Material glyph carries), but at\n 1em it was pinned to the label and stopped scaling per tier -- sm and md\n share a 14px label, so a 40px and a 56px button drew the same 14px ring\n despite 20px vs 24px icons. 0.7 keeps it visibly lighter than a glyph while\n tracking the tier, and inherits the icon's density taper. */\n /* 10px floor: the icon token itself bottoms out at 10px on the small tiers,\n and 0.7 of that is a 7px ring — too small to read as a spinner at all. */\n --_loading-size: var(--md-button-loading-size, max(10px, calc(var(--_icon-size, 18px) * 0.7)));\n\n /* Hand the size straight to md-loading-indicator's PUBLIC hooks. These\n replace the child's whole default expression, so the button's own taper\n (and its 10px floor) survives instead of hitting the child's 32px floor.\n Not --_size / --_shape-size: those are the child's private vars and\n writing them from out here is the handoff trap. currentColor keeps the\n indicator matching each variant's label, which a token would not. */\n --md-loading-indicator-size: var(--_loading-size);\n --md-loading-indicator-shape-size: var(--_loading-size);\n --md-loading-indicator-color: currentColor;\n flex-shrink: 0;\n /* A wrapper now, so the hooks above reach a SLOTTED replacement too. It has\n to lay out like the indicator it replaced — an inline span would add a text\n baseline gap next to the label. */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Whatever the consumer slots in gets the same box the default occupies. */\n.md-button__loading ::slotted(*) {\n flex-shrink: 0;\n}\n\n/* ==========================================================\n 12. MATERIAL SYMBOLS (default icon font)\n ========================================================== */\n.material-symbols-outlined {\n font-family: var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');\n font-weight: normal;\n font-style: normal;\n font-size: var(--_icon-size, 18px);\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n overflow-wrap: normal;\n direction: ltr;\n font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n}\n\n/* ==========================================================\n 13. RTL — opt-in directional-icon mirroring\n\n Buttons that show directional Material Symbols (arrow_forward,\n chevron_right, send, reply…) should set `mirror-icon` so the\n glyph itself flips alongside the leading/trailing slot swap that\n the logical-property layout already performs. Non-directional\n icons (add, search, favorite…) leave `mirror-icon` unset so the\n glyph stays semantically correct.\n\n Two rules cover both placements of `dir=\"rtl\"`:\n (a) on the host itself — `:host([dir=\"rtl\"])`\n (b) on any ancestor element — `:host-context([dir=\"rtl\"])`\n ========================================================== */\n:host([mirror-icon][dir=\"rtl\"]) .md-button__icon,\n:host([mirror-icon][dir=\"rtl\"]) .md-button__trailing-icon,\n:host([mirror-icon][dir=\"rtl\"]) ::slotted([slot=\"leading-icon\"]),\n:host([mirror-icon][dir=\"rtl\"]) ::slotted([slot=\"trailing-icon\"]) {\n transform: scaleX(-1);\n}\n\n:host-context([dir=\"rtl\"]):host([mirror-icon]) .md-button__icon,\n:host-context([dir=\"rtl\"]):host([mirror-icon]) .md-button__trailing-icon,\n:host-context([dir=\"rtl\"]):host([mirror-icon]) ::slotted([slot=\"leading-icon\"]),\n:host-context([dir=\"rtl\"]):host([mirror-icon]) ::slotted([slot=\"trailing-icon\"]) {\n transform: scaleX(-1);\n}\n\n/* ==========================================================\n DENSITY (local override)\n Maps the local `density` prop onto the same --md-sys-density-scale signal a\n global `data-density` ancestor sets. Declared on :host, so a local rung wins\n over the inherited global one. Every density-sensitive value in this file\n derives from that single signal by calc — never add a fixed per-rung ladder.\n ========================================================== */\n:host([density='-1']) { --md-sys-density-scale: -1; }\n:host([density='-2']) { --md-sys-density-scale: -2; }\n:host([density='-3']) { --md-sys-density-scale: -3; }\n:host([density='-4']) { --md-sys-density-scale: -4; }\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Element, AttachInternals } from '@stencil/core';\nimport { LazyLoadingIndicator } from '../../utils/lazy-loading-indicator';\nimport { triggerRipple } from '../../utils/ripple';\nimport { sanitizeHref, SAFE_WINDOW_FEATURES } from '../../utils/url';\n\n/**\n * Detail payload emitted by `md-button`'s `mdClick` event when the user\n * activates the button (mouse, touch, or keyboard).\n *\n * The event is **cancelable** — calling `event.preventDefault()` from a\n * listener stops the button's default side effects (toggle-state flip\n * and `href` navigation) but does NOT stop the underlying DOM click\n * event. This is the recommended hook for SPA routing and \"are you\n * sure?\" confirmation flows.\n */\nexport interface MdButtonClickDetail {\n /** The button's `value` prop (useful when grouped via `md-button-group`). */\n value: string;\n /** Whether toggle mode is enabled. */\n toggle: boolean;\n /**\n * Selected state the button WILL transition to if the click is not\n * cancelled. In non-toggle mode this is identical to `selected`.\n */\n selected: boolean;\n /** Navigation target (empty if the button is not a link). */\n href: string;\n /** Browsing context (`_self`, `_blank`, …). */\n target: string;\n /** The original DOM event that triggered the activation. */\n originalEvent: MouseEvent | KeyboardEvent;\n}\n\n/**\n * Detail payload emitted by `md-button`'s `mdChange` event when toggle\n * mode flips the selected state in response to a user activation.\n */\nexport interface MdButtonChangeDetail {\n /** New selected state. */\n selected: boolean;\n /** The button's `value` prop. */\n value: string;\n}\n\n@Component({\n tag: 'md-button',\n styleUrl: 'md-button.css',\n shadow: true,\n formAssociated: true,\n})\nexport class MdButton {\n @Element() el!: HTMLElement;\n\n /**\n * Form-association handle. Used to submit/reset the associated form when\n * `type` is `submit`/`reset` — works across shadow boundaries, unlike a\n * native `<button>` rendered in the shadow root (which can't see the\n * light-DOM `<form>` it lives in).\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * Activation behavior, mirroring the native `<button type>`:\n * - `button` (default): no implicit form action.\n * - `submit`: submits the associated form (`requestSubmit`, so the form's\n * `submit` event fires and constraint validation runs).\n * - `reset`: resets the associated form.\n */\n @Prop({ reflect: true }) type: 'button' | 'submit' | 'reset' = 'button';\n\n @Prop() variant: 'filled' | 'outlined' | 'text' | 'elevated' | 'tonal' = 'filled';\n @Prop() size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n @Prop() shape: 'round' | 'square' = 'round';\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true, attribute: 'soft-disabled' }) softDisabled: boolean = false;\n @Prop() ripple: boolean = true;\n @Prop() loading: boolean = false;\n @Prop() icon: string = '';\n @Prop() trailingIcon: string = '';\n @Prop() href: string = '';\n @Prop() target: string = '_self';\n\n /** Enable toggle behavior (selected/unselected) */\n @Prop() toggle: boolean = false;\n\n /** Current selected state (toggle mode) */\n @Prop({ mutable: true }) selected: boolean = false;\n\n /** Enable M3 Expressive shape morphing on press and toggle */\n @Prop() shapeMorph: boolean = true;\n\n /**\n * Mirror leading and trailing icons horizontally when the button is\n * rendered in a right-to-left context. Set this on buttons that use\n * **directional** Material Symbols (arrows, chevrons, send, reply…)\n * — non-directional icons (add, search, favorite…) should leave it\n * `false` so the glyph stays semantically correct.\n */\n @Prop({ reflect: true, attribute: 'mirror-icon' }) mirrorIcon: boolean = false;\n\n /**\n * When true, suppresses the default 180° trailing-icon rotation while\n * `aria-expanded=\"true\"`. Use when the consumer swaps the glyph (e.g.\n * docked `md-date-picker` month/year triggers use `chevron_right`).\n */\n @Prop({ reflect: true, attribute: 'suppress-expand-icon-flip' })\n suppressExpandIconFlip: boolean = false;\n\n /**\n * Stretch the button to fill its inline-axis container.\n *\n * Switches the host from `inline-flex` to `flex` and sets\n * `inline-size: 100%` so the button consumes the full width of its\n * parent — the standard pattern for primary CTAs in forms, modals,\n * and bottom sheets. The size's `min-block-size` (touch target) is\n * preserved.\n *\n * For arbitrary fixed widths or heights, set the\n * `--md-button-width`, `--md-button-height`, `--md-button-min-width`,\n * `--md-button-min-height`, or `--md-button-max-width` CSS custom\n * properties on the host instead.\n */\n @Prop({ reflect: true, attribute: 'full-width' }) fullWidth: boolean = false;\n\n /** @internal Set by md-button-group — left side is connected to a neighbor */\n @Prop({ reflect: true }) connectedLeft: boolean = false;\n\n /** @internal Set by md-button-group — right side is connected to a neighbor */\n @Prop({ reflect: true }) connectedRight: boolean = false;\n\n /** @internal Value for button-group association */\n @Prop() value: string = '';\n\n /**\n * @internal Roving-tabindex override set by `md-button-group`. When the\n * button is a child of a group, the group sets this to `0` on the\n * currently-active button and `-1` on the rest, so Tab enters the group\n * once instead of stepping through every button. Outside a group, this\n * stays `null` and the button uses its normal tabindex behavior.\n */\n @Prop({ mutable: true, reflect: false }) groupTabindex: number | null = null;\n\n /**\n * Override the default `role=\"button\"`. Used by composite widgets such as\n * `md-date-picker` day cells (`role=\"gridcell\"`). Leave empty for `button`.\n */\n @Prop({ attribute: 'role-override' }) roleOverride: string = '';\n\n /**\n * Local density rung. Drives the same `--md-sys-density-scale` signal that a\n * global `data-density` ancestor sets, so a local value simply overrides the\n * inherited one. 0 = default, -4 = ultra-compact.\n */\n @Prop({ reflect: true }) density: 0 | -1 | -2 | -3 | -4 = 0;\n\n /**\n * Fires every time the user activates the button (mouse click, touch,\n * or `Enter`/`Space` while focused). The event is **cancelable** and\n * the detail payload describes what *would* happen: the post-click\n * toggle state, the navigation `href`, and so on.\n *\n * Calling `event.preventDefault()` from a listener suppresses the\n * default side effects (toggle flip + `href` navigation) but lets\n * the underlying DOM click bubble. This is the hook to use for SPA\n * routing, \"are you sure?\" prompts, async confirmation, etc.\n *\n * The event bubbles and is composed, so listeners outside the\n * shadow tree (the typical case) receive it.\n *\n * ```ts\n * document.querySelector('md-button')!.addEventListener('mdClick', (e) => {\n * const { href, selected } = (e as CustomEvent).detail;\n * if (!confirm('Continue?')) e.preventDefault();\n * });\n * ```\n */\n @Event({ cancelable: true, bubbles: true, composed: true })\n mdClick!: EventEmitter<MdButtonClickDetail>;\n\n /**\n * Fires when toggle mode flips the `selected` state in response to a\n * user activation. Not cancelable — the state change has already\n * happened. Pair with `mdClick` (cancelable) when you need a veto.\n *\n * Bubbles and is composed.\n */\n @Event({ bubbles: true, composed: true })\n mdChange!: EventEmitter<MdButtonChangeDetail>;\n\n @State() private hasSlottedLeadingIcon = false;\n @State() private hasSlottedTrailingIcon = false;\n @State() private pressed = false;\n\n private get isDisabled() {\n return this.disabled || this.softDisabled || this.loading;\n }\n\n componentDidLoad() {\n const shadow = this.el.shadowRoot;\n if (!shadow) return;\n\n const leadingSlot = shadow.querySelector('slot[name=\"leading-icon\"]') as HTMLSlotElement | null;\n const trailingSlot = shadow.querySelector('slot[name=\"trailing-icon\"]') as HTMLSlotElement | null;\n\n leadingSlot?.addEventListener('slotchange', () => {\n this.hasSlottedLeadingIcon = leadingSlot.assignedElements().length > 0;\n });\n trailingSlot?.addEventListener('slotchange', () => {\n this.hasSlottedTrailingIcon = trailingSlot.assignedElements().length > 0;\n });\n }\n\n private handleClick = (e: MouseEvent) => {\n if (this.isDisabled) { e.preventDefault(); return; }\n\n // Compute the post-click toggle state up front so the detail\n // payload describes what *would* happen — listeners can then\n // call preventDefault on the CustomEvent to veto the change.\n const nextSelected = this.toggle ? !this.selected : this.selected;\n\n const evt = this.mdClick.emit({\n value: this.value,\n toggle: this.toggle,\n selected: nextSelected,\n href: this.href,\n target: this.target,\n originalEvent: e,\n });\n\n if (evt.defaultPrevented) {\n // Suppress browser's default link navigation as well so the\n // host stays consistent. We don't flip selected and don't\n // open the href.\n e.preventDefault();\n return;\n }\n\n if (this.toggle && nextSelected !== this.selected) {\n this.selected = nextSelected;\n this.mdChange.emit({ selected: nextSelected, value: this.value });\n }\n\n /* Setting `href` makes this a link rather than a form control, so the\n branch is taken on the raw prop — an unsafe URL must not silently fall\n through to submitting the form. Only the navigation itself is refused. */\n if (this.href) {\n const href = sanitizeHref(this.href);\n if (href) window.open(href, this.target, SAFE_WINDOW_FEATURES);\n return;\n }\n\n // Implicit form action, mirroring a native submit/reset button. Uses\n // ElementInternals so the associated <form> is found across the shadow\n // boundary. requestSubmit() (not submit()) so the form's submit event\n // fires and built-in constraint validation runs.\n if (this.type === 'submit') {\n this.internals.form?.requestSubmit();\n } else if (this.type === 'reset') {\n this.internals.form?.reset();\n }\n };\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (!this.isDisabled) {\n this.pressed = true;\n triggerRipple(this.el);\n this.el.click();\n setTimeout(() => { this.pressed = false; }, 150);\n }\n }\n };\n\n private handlePointerDown = () => {\n if (!this.isDisabled) this.pressed = true;\n };\n\n private handlePointerUp = () => {\n this.pressed = false;\n };\n\n render() {\n const isEffectivelyDisabled = this.isDisabled;\n const hasLeadingIcon = !!this.icon;\n const hasTrailingIcon = !!this.trailingIcon;\n\n return (\n <Host\n class={{\n 'md-button': true,\n [`md-button--${this.variant}`]: true,\n [`md-button--${this.size}`]: true,\n [`md-button--${this.shape}`]: true,\n 'md-button--with-leading-icon': hasLeadingIcon || this.hasSlottedLeadingIcon,\n 'md-button--with-trailing-icon': hasTrailingIcon || this.hasSlottedTrailingIcon,\n 'md-button--disabled': this.disabled || this.softDisabled,\n 'md-button--loading': this.loading,\n 'md-button--toggle': this.toggle,\n 'md-button--selected': this.selected,\n 'md-button--shape-morph': this.shapeMorph,\n 'md-button--pressed': this.shapeMorph && this.pressed,\n 'md-button--connected-left': this.connectedLeft,\n 'md-button--connected-right': this.connectedRight,\n 'md-button--full-width': this.fullWidth,\n }}\n role={this.roleOverride || 'button'}\n aria-disabled={isEffectivelyDisabled ? 'true' : 'false'}\n aria-pressed={this.toggle ? String(this.selected) : undefined}\n tabindex={\n this.disabled\n ? '-1'\n : (this.groupTabindex !== null ? String(this.groupTabindex) : '0')\n }\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onPointerDown={this.handlePointerDown}\n onPointerUp={this.handlePointerUp}\n onPointerLeave={this.handlePointerUp}\n onPointerCancel={this.handlePointerUp}\n >\n {this.ripple && <md-ripple disabled={isEffectivelyDisabled}></md-ripple>}\n <span class=\"md-button__state-layer\" part=\"state-layer\" aria-hidden=\"true\"></span>\n <slot name=\"leading-icon\">\n {hasLeadingIcon && <span class=\"md-button__icon material-symbols-outlined\" part=\"icon\">{this.icon}</span>}\n </slot>\n <span class=\"md-button__label\" part=\"label\"><slot /></span>\n <slot name=\"trailing-icon\">\n {hasTrailingIcon && <span class=\"md-button__trailing-icon material-symbols-outlined\" part=\"trailing-icon\">{this.trailingIcon}</span>}\n </slot>\n {this.loading && (\n /* md-loading-indicator, not a hand-rolled ring: never ship a custom\n loading affordance where a library component exists. It is\n md-loading-indicator rather than md-progress-indicator because the\n latter clamps its circular variant to a 24dp M3 minimum, while a\n button spinner runs 10-28px -- every tier but xl would clamp up and\n lose the density taper. Same choice md-select made for its trigger.\n\n The `loader` slot lets a consumer swap it (e.g. for a circular\n md-progress-indicator). The size hooks sit on this WRAPPER so they\n cascade to whatever ends up inside it, default or slotted. */\n <span class=\"md-button__loading\" part=\"loading\" aria-hidden=\"true\">\n <slot name=\"loader\">\n <LazyLoadingIndicator class=\"md-button__loading-default\" />\n </slot>\n </span>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"8NAAA,MAAMA,EAAc,IAAM,iroB,MCkDbC,EAAQC,EAAA,MAAAD,UAAAE,EANrB,WAAAC,CAAAC,G,4KAwB2BC,KAAAC,KAAsC,SAEvDD,KAAAE,QAAiE,SACjEF,KAAAG,KAAyC,KACzCH,KAAAI,MAA4B,QACXJ,KAAAK,SAAoB,MACQL,KAAAM,aAAwB,MACrEN,KAAAO,OAAkB,KAClBP,KAAAQ,QAAmB,MACnBR,KAAAS,KAAe,GACfT,KAAAU,aAAuB,GACvBV,KAAAW,KAAe,GACfX,KAAAY,OAAiB,QAGjBZ,KAAAa,OAAkB,MAGDb,KAAAc,SAAoB,MAGrCd,KAAAe,WAAsB,KASqBf,KAAAgB,WAAsB,MAQzEhB,KAAAiB,uBAAkC,MAgBgBjB,KAAAkB,UAAqB,MAG9ClB,KAAAmB,cAAyB,MAGzBnB,KAAAoB,eAA0B,MAG3CpB,KAAAqB,MAAgB,GASiBrB,KAAAsB,cAA+B,KAMlCtB,KAAAuB,aAAuB,GAOpCvB,KAAAwB,QAAiC,EAoCzCxB,KAAAyB,sBAAwB,MACxBzB,KAAA0B,uBAAyB,MACzB1B,KAAA2B,QAAU,MAqBnB3B,KAAA4B,YAAeC,IACrB,GAAI7B,KAAK8B,WAAY,CAAED,EAAEE,iBAAkB,M,CAK3C,MAAMC,EAAehC,KAAKa,QAAUb,KAAKc,SAAWd,KAAKc,SAEzD,MAAMmB,EAAMjC,KAAKkC,QAAQC,KAAK,CAC5Bd,MAAOrB,KAAKqB,MACZR,OAAQb,KAAKa,OACbC,SAAUkB,EACVrB,KAAMX,KAAKW,KACXC,OAAQZ,KAAKY,OACbwB,cAAeP,IAGjB,GAAII,EAAII,iBAAkB,CAIxBR,EAAEE,iBACF,M,CAGF,GAAI/B,KAAKa,QAAUmB,IAAiBhC,KAAKc,SAAU,CACjDd,KAAKc,SAAWkB,EAChBhC,KAAKsC,SAASH,KAAK,CAAErB,SAAUkB,EAAcX,MAAOrB,KAAKqB,O,CAM3D,GAAIrB,KAAKW,KAAM,CACb,MAAMA,EAAO4B,EAAavC,KAAKW,MAC/B,GAAIA,EAAM6B,OAAOC,KAAK9B,EAAMX,KAAKY,OAAQ8B,GACzC,M,CAOF,GAAI1C,KAAKC,OAAS,SAAU,CAC1BD,KAAK2C,UAAUC,MAAMC,e,MAChB,GAAI7C,KAAKC,OAAS,QAAS,CAChCD,KAAK2C,UAAUC,MAAME,O,GAIjB9C,KAAA+C,cAAiBlB,IACvB,GAAIA,EAAEmB,MAAQ,SAAWnB,EAAEmB,MAAQ,IAAK,CACtCnB,EAAEE,iBACF,IAAK/B,KAAK8B,WAAY,CACpB9B,KAAK2B,QAAU,KACfsB,EAAcjD,KAAKkD,IACnBlD,KAAKkD,GAAGC,QACRC,YAAW,KAAQpD,KAAK2B,QAAU,KAAK,GAAK,I,IAK1C3B,KAAAqD,kBAAoB,KAC1B,IAAKrD,KAAK8B,WAAY9B,KAAK2B,QAAU,IAAI,EAGnC3B,KAAAsD,gBAAkB,KACxBtD,KAAK2B,QAAU,KAAK,CAuEvB,CA7JC,cAAYG,GACV,OAAO9B,KAAKK,UAAYL,KAAKM,cAAgBN,KAAKQ,O,CAGpD,gBAAA+C,GACE,MAAMC,EAASxD,KAAKkD,GAAGO,WACvB,IAAKD,EAAQ,OAEb,MAAME,EAAcF,EAAOG,cAAc,6BACzC,MAAMC,EAAeJ,EAAOG,cAAc,8BAE1CD,GAAaG,iBAAiB,cAAc,KAC1C7D,KAAKyB,sBAAwBiC,EAAYI,mBAAmBC,OAAS,CAAC,IAExEH,GAAcC,iBAAiB,cAAc,KAC3C7D,KAAK0B,uBAAyBkC,EAAaE,mBAAmBC,OAAS,CAAC,G,CA0E5E,MAAAC,GACE,MAAMC,EAAwBjE,KAAK8B,WACnC,MAAMoC,IAAmBlE,KAAKS,KAC9B,MAAM0D,IAAoBnE,KAAKU,aAE/B,OACE0D,EAACC,EAAI,CAAArB,IAAA,2CACHsB,MAAO,CACL,YAAa,KACb,CAAC,cAActE,KAAKE,WAAY,KAChC,CAAC,cAAcF,KAAKG,QAAS,KAC7B,CAAC,cAAcH,KAAKI,SAAU,KAC9B,+BAAgC8D,GAAkBlE,KAAKyB,sBACvD,gCAAiC0C,GAAmBnE,KAAK0B,uBACzD,sBAAuB1B,KAAKK,UAAYL,KAAKM,aAC7C,qBAAsBN,KAAKQ,QAC3B,oBAAqBR,KAAKa,OAC1B,sBAAuBb,KAAKc,SAC5B,yBAA0Bd,KAAKe,WAC/B,qBAAsBf,KAAKe,YAAcf,KAAK2B,QAC9C,4BAA6B3B,KAAKmB,cAClC,6BAA8BnB,KAAKoB,eACnC,wBAAyBpB,KAAKkB,WAEhCqD,KAAMvE,KAAKuB,cAAgB,SAAQ,gBACpB0C,EAAwB,OAAS,QAAO,eACzCjE,KAAKa,OAAS2D,OAAOxE,KAAKc,UAAY2D,UACpDC,SACE1E,KAAKK,SACD,KACCL,KAAKsB,gBAAkB,KAAOkD,OAAOxE,KAAKsB,eAAiB,IAElEqD,QAAS3E,KAAK4B,YACdgD,UAAW5E,KAAK+C,cAChB8B,cAAe7E,KAAKqD,kBACpByB,YAAa9E,KAAKsD,gBAClByB,eAAgB/E,KAAKsD,gBACrB0B,gBAAiBhF,KAAKsD,iBAErBtD,KAAKO,QAAU6D,EAAA,aAAApB,IAAA,2CAAW3C,SAAU4D,IACrCG,EAAA,QAAApB,IAAA,2CAAMsB,MAAM,yBAAyBW,KAAK,cAAa,cAAa,SACpEb,EAAA,QAAApB,IAAA,2CAAMkC,KAAK,gBACRhB,GAAkBE,EAAA,QAAApB,IAAA,2CAAMsB,MAAM,4CAA4CW,KAAK,QAAQjF,KAAKS,OAE/F2D,EAAA,QAAApB,IAAA,2CAAMsB,MAAM,mBAAmBW,KAAK,SAAQb,EAAA,QAAApB,IAAA,8CAC5CoB,EAAA,QAAApB,IAAA,2CAAMkC,KAAK,iBACRf,GAAmBC,EAAA,QAAApB,IAAA,2CAAMsB,MAAM,qDAAqDW,KAAK,iBAAiBjF,KAAKU,eAEjHV,KAAKQ,SAWJ4D,EAAA,QAAApB,IAAA,2CAAMsB,MAAM,qBAAqBW,KAAK,UAAS,cAAa,QAC1Db,EAAA,QAAApB,IAAA,2CAAMkC,KAAK,UACTd,EAACe,EAAoB,CAAAnC,IAAA,2CAACsB,MAAM,iC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as i,d as n,t as r}from"./p-bSpXNc5J.js";const a=()=>`:host{display:block;position:fixed;z-index:auto;pointer-events:none}:host(.md-menu--open){pointer-events:auto}.md-menu__surface{background-color:var(--md-sys-color-surface-container, #F7F2FA);border-radius:var(--md-sys-shape-corner-small, 8px);box-shadow:0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);min-width:var(--md-menu-min-width, 112px);max-width:min( var(--md-menu-max-width, 100vw), calc(100vw - 2 * var(--md-menu-viewport-margin, 8px)) );padding:var(--md-sys-spacing-inset-xs, 4px) 0;overflow:visible;opacity:0;transform:scaleY(0.8);transform-origin:top left;transition:opacity var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1)), transform var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(.md-menu--open) .md-menu__surface{opacity:1;transform:none}:host(.md-menu--closing) .md-menu__surface{opacity:0;transform:scaleY(0.8);transition:opacity var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)), transform var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15))}:host(.md-menu--closing){pointer-events:none}:host(.md-menu--quick) .md-menu__surface{transition:none}:host(.md-menu--inline-fill){position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-block-size:0;block-size:100%;inline-size:100%;pointer-events:auto}:host(.md-menu--inline-fill) .md-menu__surface{flex:1 1 auto;block-size:100%;min-block-size:0;min-inline-size:100%;max-inline-size:none;display:flex;flex-direction:column;overflow:hidden;box-shadow:none;border:none;outline:none;padding:0;border-radius:0;border-end-start-radius:var(--md-menu-inline-fill-radius-end, 0);border-end-end-radius:var(--md-menu-inline-fill-radius-end, 0);background-color:var(--md-menu-inline-surface-color, transparent)}:host(.md-menu--inline-fill) .md-menu__scroll-shadow{flex:1 1 auto;min-block-size:0;block-size:100%}:host(.md-menu--inline-fill) .md-menu__surface ::slotted(md-menu-item:last-child){border-end-start-radius:var(--md-menu-inline-fill-radius-end, 0);border-end-end-radius:var(--md-menu-inline-fill-radius-end, 0)}:host(.md-menu--scroll):not(.md-menu--has-submenu) .md-menu__surface{overflow:hidden}:host(.md-menu--scroll) .md-menu__scroll-shadow{min-block-size:0}.md-menu__scroll-shadow{overflow-y:auto;overflow-anchor:none}:host([match-anchor-width]) .md-menu__surface{max-width:calc(100vw - 2 * var(--md-menu-viewport-margin, 8px));box-sizing:border-box}:host(:not(.md-menu--has-submenu):not(.md-menu--inline-fill):not(.md-menu--scroll)) .md-menu__surface{max-height:calc(100dvh - 2 * var(--md-menu-viewport-margin, 8px));overflow-y:auto;overscroll-behavior:contain}@media (max-width: 600px){:host(.md-menu--responsive) .md-menu__surface{width:calc(100vw - 2 * var(--md-menu-viewport-margin, 8px));min-width:0;max-width:none;box-sizing:border-box}}:host([placement="bottom-start"]) .md-menu__surface{transform-origin:top left}:host([placement="bottom-end"]) .md-menu__surface{transform-origin:top right}:host([placement="top-start"]) .md-menu__surface{transform-origin:bottom left}:host([placement="top-end"]) .md-menu__surface{transform-origin:bottom right}:host(.md-menu--standard) .md-menu__surface{background-color:var(--md-sys-color-surface-container-low, #F7F2FA);border-radius:var(--md-sys-shape-corner-large, 16px);box-shadow:0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 8px 3px rgba(0, 0, 0, 0.08);padding:var(--md-sys-spacing-inset-xs, 4px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item){border-radius:var(--md-sys-shape-corner-small, 8px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:first-child),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:first-child){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:last-child),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:last-child){border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:hover),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:hover){border-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:active),:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item.md-menu-item--selected),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:active){border-radius:var(--md-sys-shape-corner-medium, 12px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:first-child:hover),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:first-child:hover){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px);border-end-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-end-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:last-child:hover),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:last-child:hover){border-start-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-start-end-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--vibrant) .md-menu__surface{background-color:var(--md-sys-color-tertiary-container, #FFD8E4);border-radius:var(--md-sys-shape-corner-large, 16px);box-shadow:0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 8px 3px rgba(0, 0, 0, 0.08);padding:var(--md-sys-spacing-inset-xs, 4px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item){border-radius:var(--md-sys-shape-corner-small, 8px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:first-child),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:first-child){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:last-child),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:last-child){border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:hover),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:hover){border-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:active),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item.md-menu-item--selected),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:active){border-radius:var(--md-sys-shape-corner-medium, 12px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:first-child:hover),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:first-child:hover){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px);border-end-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-end-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:last-child:hover),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:last-child:hover){border-start-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-start-end-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--gap) .md-menu__surface{gap:var(--md-sys-spacing-gap-xs, 4px);display:flex;flex-direction:column}:host(.md-menu--grouped.md-menu--gap.md-menu--standard) .md-menu__surface,:host(.md-menu--grouped.md-menu--gap.md-menu--vibrant) .md-menu__surface{background-color:transparent;box-shadow:none;overflow:visible;display:flex;flex-direction:column;gap:var(--md-menu-group-gap, 4px);padding:0;filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1))}:host(.md-menu--grouped.md-menu--gap) .md-menu__surface ::slotted(md-menu-item-group),:host(.md-menu--grouped.md-menu--gap) .md-menu__scroll-shadow ::slotted(md-menu-item-group){flex-shrink:0}:host(.md-menu--grouped.md-menu--gap) .md-menu__scroll-shadow{display:flex;flex-direction:column;row-gap:var(--md-menu-group-gap, 4px)}:host(.md-menu--sectioned.md-menu--baseline) .md-menu__surface ::slotted([gap]){margin-bottom:var(--md-menu-section-gap, 2px)}.md-menu__empty{display:none;padding:var(--md-sys-spacing-inset-md, 12px) var(--md-sys-spacing-inset-lg, 16px);font-family:var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif);font-size:var(--md-sys-typescale-body-medium-size, 14px);line-height:var(--md-sys-typescale-body-medium-line-height, 20px);color:var(--md-sys-color-on-surface-variant, #49454F);text-align:center}:host(.md-menu--empty) .md-menu__empty{display:block}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;const d=150;const o=500;const m=8;const u=600;const h=new Set(["button","combobox","link","menuitem","tab","treeitem","checkbox","gridcell","row","rowheader","columnheader"]);const c=new Set(["BUTTON","SUMMARY"]);let l=0;const f=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.mdOpen=s(this,"mdOpen",1);this.mdClose=s(this,"mdClose",1);this.open=false;this.anchor="";this.placement="bottom-start";this.quick=false;this.variant="baseline";this.layout="standard";this.useGap=false;this.emptyText="";this.matchAnchorWidth=false;this.responsive=false;this.persistent=false;this.autoFocus=true;this.closing=false;this.sectioned=false;this.empty=false;this.hasSubmenu=false;this.focusedIndex=-1;this.navSeq=0;this.ringedIndex=-1;this.skipAutoFocus=false;this.menuId=`md-menu-${++l}`;this.typeaheadBuffer="";this.keyboardModality=false;this.openedViaKeyboard=false;this.listboxMode=false;this.listbox=false;this.density=0;this.trackKeyboardModality=()=>{this.keyboardModality=true};this.trackPointerModality=()=>{this.keyboardModality=false};this.lastSurfaceSize="";this.handleOutsideClick=e=>{if(this.persistent)return;const t=e.composedPath();if(!t.includes(this.el)){this.close()}};this.handleDocumentKeyDown=e=>{if(e.key==="Escape"&&this.open){this.close();this.restoreFocusToAnchor()}};this.handleScroll=()=>{if(this.open&&!this.closing){this.positionMenu()}};this.handleSlotChange=()=>{this.updateSections();this.propagateVariant();this.wireItemObserver();this.updateEmpty();this.hasSubmenu=!!this.el.querySelector("md-sub-menu-item")}}get asListbox(){return this.listbox||this.listboxMode}async setComboboxElement(e){if(this.comboboxEl&&this.comboboxEl!==e){this.comboboxEl.removeAttribute("aria-activedescendant")}this.comboboxEl=e??undefined}connectedCallback(){if(typeof document==="undefined")return;document.addEventListener("keydown",this.trackKeyboardModality,true);document.addEventListener("pointerdown",this.trackPointerModality,true)}componentDidLoad(){if(this.open){this.applyDepthZIndex()}this.wireItemObserver();this.updateEmpty();this.propagateVariant()}onEmptyTextChange(){this.updateEmpty()}onVariantChange(){this.propagateVariant()}async setVirtualProvider(e){this.provider=e??undefined;this.listboxMode=!!this.provider}async getScrollViewport(){return this.el.shadowRoot?.querySelector(".md-menu__scroll-shadow")??null}async show(e){clearTimeout(this.closeTimer);this.closing=false;if(this.anchor)this.collapseSubmenus();this.skipAutoFocus=e?.autoFocus===false;this.open=true;this.applyDepthZIndex()}async reposition(){if(this.open)this.positionMenu()}async close(){if(!this.open||this.closing)return;if(this.quick){this.open=false;return}this.closing=true;this.closeTimer=setTimeout((()=>{this.closing=false;this.open=false}),d)}onOpenChange(e){if(e){this.openedViaKeyboard=this.keyboardModality;this.dismissPeerMenus();this.applyDepthZIndex();requestAnimationFrame((()=>this.positionMenu()));this.mdOpen.emit();this.updateAnchorAria(true);if(this.anchor){requestAnimationFrame((()=>{document.addEventListener("click",this.handleOutsideClick);document.addEventListener("keydown",this.handleDocumentKeyDown)}));window.addEventListener("scroll",this.handleScroll,true);window.addEventListener("resize",this.handleScroll);this.observeSurfaceResize()}if(this.skipAutoFocus||!this.autoFocus){this.scheduleFocus((()=>this.initRovingTabindex()))}else{this.scheduleFocus((()=>this.focusFirstItem()))}this.skipAutoFocus=false}else{this.mdClose.emit();this.focusedIndex=-1;this.updateAnchorAria(false);this.resetRovingTabindex();this.collapseSubmenus();if(this.anchor){document.removeEventListener("click",this.handleOutsideClick);document.removeEventListener("keydown",this.handleDocumentKeyDown);window.removeEventListener("scroll",this.handleScroll,true);window.removeEventListener("resize",this.handleScroll)}this.unobserveSurfaceResize()}}observeSurfaceResize(){if(typeof ResizeObserver==="undefined")return;const e=this.el.shadowRoot?.querySelector(".md-menu__surface");if(!e)return;this.lastSurfaceSize="";this.surfaceRO=new ResizeObserver((e=>{if(!this.open)return;const t=e[e.length-1]?.contentRect;if(!t)return;const s=`${Math.round(t.width)}x${Math.round(t.height)}`;if(s===this.lastSurfaceSize)return;this.lastSurfaceSize=s;this.positionMenu()}));this.surfaceRO.observe(e)}unobserveSurfaceResize(){this.surfaceRO?.disconnect();this.surfaceRO=undefined}handleFocusIn(e){if(!this.open)return;const t=e.target;if(this.provider){const e=t.closest("md-menu-item");const s=e?.getAttribute("data-vindex");if(e&&s!=null){const t=parseInt(s,10);if(!isNaN(t)&&t!==this.focusedIndex){const s=this.focusedIndex>=0?this.provider.domItemForIndex(this.focusedIndex):null;s?.setAttribute("tabindex","-1");this.focusedIndex=t;e.setAttribute("tabindex","0");if(this.ringedIndex>=0&&this.ringedIndex!==t){const e=this.provider.domItemForIndex(this.ringedIndex);e?.removeAttribute("data-md-focused")}this.ringedIndex=-1}}return}const s=this.getMenuItems();const i=s.indexOf(t);if(i>=0&&i!==this.focusedIndex){if(this.focusedIndex>=0&&this.focusedIndex<s.length){s[this.focusedIndex].setAttribute("tabindex","-1")}this.focusedIndex=i;t.setAttribute("tabindex","0")}}handleKeyDown(e){if(!this.open)return;const t=e.target;if(t&&t.closest("md-menu")!==this.el)return;if(this.provider){this.handleKeyDownVirtual(e);return}const s=this.getMenuItems();if(!s.length)return;switch(e.key){case"ArrowDown":e.preventDefault();this.focusItem(s,this.focusedIndex+1);break;case"ArrowUp":e.preventDefault();this.focusItem(s,this.focusedIndex-1);break;case"Home":e.preventDefault();this.focusItem(s,0);break;case"End":e.preventDefault();this.focusItem(s,s.length-1);break;case"Escape":e.preventDefault();this.close();this.restoreFocusToAnchor();break;case"Tab":e.stopPropagation();this.closeEntireMenuTree();this.restoreFocusToAnchor();break;default:if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&!e.shiftKey){this.handleTypeahead(e.key,s)}break}}handleKeyDownVirtual(e){const t=this.provider;const s=t.count();const i=e.target?.tagName==="INPUT";switch(e.key){case"ArrowDown":e.preventDefault();this.focusVirtual(this.nextEnabled(this.focusedIndex,1,s));break;case"ArrowUp":e.preventDefault();this.focusVirtual(this.nextEnabled(this.focusedIndex,-1,s));break;case"Home":e.preventDefault();this.focusVirtual(this.nextEnabled(-1,1,s));break;case"End":e.preventDefault();this.focusVirtual(this.nextEnabled(s,-1,s));break;case"Enter":if(this.comboboxEl&&this.focusedIndex>=0){e.preventDefault();this.provider.domItemForIndex(this.focusedIndex)?.click()}break;case"Escape":e.preventDefault();this.close();this.restoreFocusToAnchor();break;case"Tab":e.stopPropagation();this.closeEntireMenuTree();this.restoreFocusToAnchor();break;default:if(!i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&!e.shiftKey){this.handleTypeaheadVirtual(e.key)}break}}nextEnabled(e,t,s){if(s<=0)return-1;let i=e;for(let e=0;e<s;e++){i+=t;if(i<0)i=s-1;else if(i>=s)i=0;if(!this.provider.isDisabledAt(i))return i}return e>=0&&e<s?e:-1}async focusVirtual(e,t=true){if(e<0)return;const s=this.provider;const i=++this.navSeq;this.focusedIndex=e;await s.ensureVisible(e);if(i!==this.navSeq)return;const n=s.domItemForIndex(e);if(!n)return;if(this.ringedIndex>=0&&this.ringedIndex!==e){const e=s.domItemForIndex(this.ringedIndex);e?.setAttribute("tabindex","-1");e?.removeAttribute("data-md-focused")}if(t){n.setAttribute("data-md-focused","");this.ringedIndex=e}else{n.removeAttribute("data-md-focused");this.ringedIndex=-1}if(this.comboboxEl){n.id||(n.id=`${this.menuId}-opt-${e}`);if(n.id)this.comboboxEl.setAttribute("aria-activedescendant",n.id)}else{n.setAttribute("tabindex","0");n.focus({preventScroll:true})}}handleTypeaheadVirtual(e){clearTimeout(this.typeaheadTimer);this.typeaheadBuffer+=e.toLowerCase();this.typeaheadTimer=setTimeout((()=>{this.typeaheadBuffer=""}),o);const t=this.typeaheadBuffer.length===1?this.focusedIndex+1:this.focusedIndex;const s=this.provider.findPrefix(this.typeaheadBuffer,t<0?0:t);if(s>=0)this.focusVirtual(s)}getMenuItems(){const e=Array.from(this.el.querySelectorAll("md-menu-item, md-sub-menu-item"));return e.filter((e=>e.closest("md-menu")===this.el))}getItemLabel(e){return e.headline||e.textContent?.trim()||""}handleTypeahead(e,t){clearTimeout(this.typeaheadTimer);this.typeaheadBuffer+=e.toLowerCase();this.typeaheadTimer=setTimeout((()=>{this.typeaheadBuffer=""}),o);const s=this.typeaheadBuffer.length===1?this.focusedIndex+1:this.focusedIndex;for(let e=0;e<t.length;e++){const i=(s+e)%t.length;const n=this.getItemLabel(t[i]).toLowerCase();if(n.startsWith(this.typeaheadBuffer)){this.focusItem(t,i);return}}}focusItem(e,t,s=true){if(e.length===0)return;if(t<0)t=e.length-1;if(t>=e.length)t=0;if(this.focusedIndex>=0&&this.focusedIndex<e.length){e[this.focusedIndex].setAttribute("tabindex","-1");e[this.focusedIndex].removeAttribute("data-md-focused")}this.focusedIndex=t;e[t].setAttribute("tabindex","0");if(s){e[t].setAttribute("data-md-focused","")}else{e[t].removeAttribute("data-md-focused")}e[t].focus()}initRovingTabindex(){if(this.provider){this.focusedIndex=-1;return}const e=this.getMenuItems();e.forEach(((e,t)=>{e.setAttribute("tabindex",t===0?"0":"-1")}));this.focusedIndex=0}resetRovingTabindex(){if(this.provider){const e=this.focusedIndex>=0?this.provider.domItemForIndex(this.focusedIndex):null;e?.setAttribute("tabindex","-1");e?.removeAttribute("data-md-focused");if(this.ringedIndex>=0&&this.ringedIndex!==this.focusedIndex){const e=this.provider.domItemForIndex(this.ringedIndex);e?.setAttribute("tabindex","-1");e?.removeAttribute("data-md-focused")}this.ringedIndex=-1;this.comboboxEl?.removeAttribute("aria-activedescendant");return}const e=this.getMenuItems();e.forEach((e=>{e.setAttribute("tabindex","-1");e.removeAttribute("data-md-focused")}))}collapseSubmenus(){const e=Array.from(this.el.querySelectorAll("md-sub-menu-item"));e.forEach((e=>e.collapse?.()));const t=Array.from(this.el.querySelectorAll("md-menu-item, md-sub-menu-item"));t.forEach((e=>{e.removeAttribute("data-md-focused");e.setAttribute("tabindex","-1")}))}scheduleFocus(e){setTimeout((()=>requestAnimationFrame((()=>e()))),0)}focusFirstItem(e=3){if(this.provider){const t=this.provider.count();if(t>0){this.focusVirtual(this.nextEnabled(-1,1,t),this.openedViaKeyboard)}else if(e>0){this.scheduleFocus((()=>this.focusFirstItem(e-1)))}return}const t=this.getMenuItems();if(t.length){this.focusItem(t,0,this.openedViaKeyboard)}else if(e>0){this.scheduleFocus((()=>this.focusFirstItem(e-1)))}}getAnchorEl(e=this.anchor){if(!e)return null;const t=this.el.getRootNode();return t.getElementById?.(e)??document.getElementById(e)}updateAnchorAria(e){if(!this.anchor)return;const t=this.getAnchorEl();if(!t)return;const s=t.getAttribute("role");const i=s!==null?h.has(s):c.has(t.tagName)||t.tagName==="A"&&t.hasAttribute("href");if(e){t.setAttribute("aria-haspopup",this.asListbox?"listbox":"menu");if(!this.asListbox)t.setAttribute("aria-controls",this.menuId)}if(i)t.setAttribute("aria-expanded",e?"true":"false");else t.removeAttribute("aria-expanded")}applyDepthZIndex(){if(!this.anchor)return;this.el.style.zIndex="var(--md-sys-z-index-popup, 1000)"}positionMenu(){if(!this.anchor)return;const e=this.getAnchorEl();if(!e)return;const t=e.getBoundingClientRect();const s=this.el.shadowRoot?.querySelector(".md-menu__surface");if(!s)return;const i=4;s.style.minWidth=this.matchAnchorWidth?`${t.width}px`:"";this.el.style.top="0";this.el.style.left="0";this.el.style.right="auto";this.el.style.bottom="auto";const n=s.offsetWidth;let r=s.offsetHeight;if(n===0||r===0){requestAnimationFrame((()=>this.positionMenu()));return}const a=window.innerWidth;const d=window.innerHeight;const o=m;if(this.responsive&&a<=u){const e=s.offsetHeight;let n=t.bottom+i;if(n+e+o>d&&t.top-i-e>=o){n=t.top-i-e;s.style.transformOrigin="bottom left"}else{s.style.transformOrigin="top left"}n=Math.max(o,Math.min(n,d-e-o));this.el.style.top=`${n}px`;this.el.style.left=`${o}px`;return}let h=this.placement.startsWith("bottom")?"bottom":"top";let c=this.placement.endsWith("start")?"start":"end";const l=d-t.bottom-i-o;const f=t.top-i-o;if(h==="bottom"&&r>l){if(r<=f||this.scrollCapped&&f>l)h="top"}else if(h==="top"&&r>f){if(r<=l||this.scrollCapped&&l>f)h="bottom"}if(c==="start"&&t.left+n>a){if(t.right-n>=0)c="end"}else if(c==="end"&&t.right-n<0){if(t.left+n<=a)c="start"}if(this.scrollCapped){const e=h==="bottom"?l:f;const t=s.querySelector(".md-menu__scroll-shadow");const i=s.offsetHeight-(t?.offsetHeight??0);this.el.style.setProperty("--md-menu-avail-block",`${Math.max(48,e-i)}px`);r=s.offsetHeight}else{this.el.style.removeProperty("--md-menu-avail-block")}const p=h==="bottom"?"top":"bottom";const b=c==="start"?"left":"right";s.style.transformOrigin=`${p} ${b}`;const x=h==="bottom"?t.bottom+i:t.top-i-r;const v=c==="start"?t.left:t.right-n;const y=Math.max(o,Math.min(v,a-n-o));const g=Math.max(o,Math.min(x,d-r-o));this.el.style.top=`${g}px`;this.el.style.left=`${y}px`}restoreFocusToAnchor(){if(!this.anchor)return;const e=this.getAnchorEl();e?.focus()}closeEntireMenuTree(){let e=this.el;let t=this.el;while(t){const s=t.parentElement?.closest("md-menu");if(s){e=s;t=s}else{break}}const s=e.querySelectorAll("md-menu-item, md-sub-menu-item");s.forEach((e=>e.setAttribute("tabindex","-1")));if(e.close)e.close();const i=e.anchor;if(i){const t=e.getRootNode();const s=t.getElementById?.(i)??document.getElementById(i);s?.focus()}}dismissPeerMenus(){if(this.persistent)return;if(typeof document==="undefined")return;const e=Array.from(document.querySelectorAll("md-menu"));for(const t of e){if(t===this.el)continue;if(!t.open)continue;if(t.persistent)continue;if(t.contains(this.el))continue;if(this.el.contains(t))continue;t.close()}}isHidden(e){if(e.hasAttribute("hidden"))return true;if(e.style.display==="none")return true;return false}hasVisibleItem(e){if(this.isHidden(e))return false;const t=e.tagName.toLowerCase();if(t==="md-menu-item"||t==="md-sub-menu-item")return true;if(t==="md-menu-item-group"){return Array.from(e.children).some((e=>this.hasVisibleItem(e)))}return false}updateEmpty(){if(!this.emptyText){this.empty=false;return}const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();this.empty=!t.some((e=>this.hasVisibleItem(e)))}wireItemObserver(){this.itemObserver?.disconnect();if(typeof MutationObserver==="undefined")return;const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();if(t.length===0)return;this.itemObserver=new MutationObserver((()=>this.updateEmpty()));for(const e of t){this.itemObserver.observe(e,{attributes:true,attributeFilter:["style","hidden"],subtree:true})}}getContentSlot(){const e=this.el.shadowRoot;if(!e)return null;const t=Array.from(e.querySelectorAll("slot"));return t.find((e=>!e.getAttribute("name")))??null}propagateVariant(){const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();for(const e of t){e.setAttribute("data-variant",this.variant);if(e.tagName.toLowerCase()==="md-menu-item-group"){if(this.useGap){e.setAttribute("data-use-gap","")}else{e.removeAttribute("data-use-gap")}const t=e.querySelectorAll("md-menu-item, md-sub-menu-item");for(const e of Array.from(t)){e.setAttribute("data-variant",this.variant)}}}}updateSections(){const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();let s=false;let i=false;for(const e of t){if(i){e.setAttribute("data-after-gap","");i=false}else{e.removeAttribute("data-after-gap")}if(e.hasAttribute("gap")){s=true;i=true}}this.sectioned=s}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick);document.removeEventListener("keydown",this.handleDocumentKeyDown);document.removeEventListener("keydown",this.trackKeyboardModality,true);document.removeEventListener("pointerdown",this.trackPointerModality,true);window.removeEventListener("scroll",this.handleScroll,true);window.removeEventListener("resize",this.handleScroll);clearTimeout(this.closeTimer);clearTimeout(this.typeaheadTimer);this.itemObserver?.disconnect();this.itemObserver=undefined;this.unobserveSurfaceResize();this.updateAnchorAria(false)}get inlineFill(){return this.el.classList.contains("md-menu--inline-fill")}get maxHeightValue(){if(this.maxHeight===undefined||this.maxHeight===null||this.maxHeight===""){return null}const e=String(this.maxHeight);return/^\d+(\.\d+)?$/.test(e)?`${e}px`:e}get scrollCapped(){return!this.hasSubmenu&&!this.inlineFill}get useScrollViewport(){return this.inlineFill||this.scrollCapped}renderMenuBody(){return[i("slot",{onSlotchange:this.handleSlotChange}),this.emptyText?i("span",{class:"md-menu__empty",part:"empty-text",role:"status"},this.emptyText):null]}render(){return i(n,{key:"349ce271693310ea70aa98cb3980029e3afa1594",class:{"md-menu":true,"md-menu--open":this.open,"md-menu--closing":this.closing,"md-menu--quick":this.quick,[`md-menu--${this.variant}`]:true,[`md-menu--${this.layout}`]:this.variant!=="baseline","md-menu--gap":this.useGap,"md-menu--sectioned":this.sectioned,"md-menu--empty":this.empty,"md-menu--responsive":this.responsive,"md-menu--has-submenu":this.hasSubmenu,"md-menu--scroll":this.scrollCapped},"aria-hidden":!this.open||this.closing?"true":"false",inert:!this.open||this.closing},i("div",{key:"9a3e0ab8f4586b4164412fe972acbbf4cbc3000a",class:"md-menu__surface",part:"surface",role:this.asListbox?"presentation":"menu",id:this.menuId,"aria-orientation":this.asListbox?undefined:"vertical","aria-labelledby":this.asListbox?undefined:this.anchor||undefined},i("slot",{key:"abf20ee5e25dfcc174f8aa45814b6603b77e1c65",name:"header"}),this.useScrollViewport?i("div",{class:"md-menu__scroll-shadow",part:"menu-viewport",tabindex:this.asListbox?"0":undefined,style:this.inlineFill?undefined:{maxBlockSize:this.maxHeightValue?`min(${this.maxHeightValue}, var(--md-menu-avail-block, 100dvh), calc(100dvh - 2 * var(--md-menu-viewport-margin, 8px)))`:`min(var(--md-menu-avail-block, 100dvh), calc(100dvh - 2 * var(--md-menu-viewport-margin, 8px)))`}},this.renderMenuBody()):this.renderMenuBody()))}get el(){return this}static get watchers(){return{emptyText:[{onEmptyTextChange:0}],variant:[{onVariantChange:0}],useGap:[{onVariantChange:0}],open:[{onOpenChange:0}]}}static get style(){return a()}},[257,"md-menu",{open:[1540],anchor:[1],placement:[513],quick:[4],variant:[513],layout:[513],useGap:[516,"use-gap"],emptyText:[1,"empty-text"],matchAnchorWidth:[516,"match-anchor-width"],responsive:[516],persistent:[516],autoFocus:[516,"auto-focus"],maxHeight:[8,"max-height"],listLabel:[1,"list-label"],listbox:[516],density:[514],closing:[32],sectioned:[32],empty:[32],hasSubmenu:[32],listboxMode:[32],setComboboxElement:[64],setVirtualProvider:[64],getScrollViewport:[64],show:[64],reposition:[64],close:[64]},[[0,"focusin","handleFocusIn"],[0,"keydown","handleKeyDown"]],{emptyText:[{onEmptyTextChange:0}],variant:[{onVariantChange:0}],useGap:[{onVariantChange:0}],open:[{onOpenChange:0}]}]);function p(){if(typeof customElements==="undefined"){return}const e=["md-menu"];e.forEach((e=>{switch(e){case"md-menu":if(!customElements.get(r(e))){customElements.define(r(e),f)}break}}))}p();export{f as M,p as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as s,h as i,d as n,t as r}from"./p-bSpXNc5J.js";const a=()=>`:host{display:block;position:fixed;z-index:auto;pointer-events:none}:host(.md-menu--open){pointer-events:auto}.md-menu__surface{background-color:var(--md-sys-color-surface-container, #F7F2FA);border-radius:var(--md-sys-shape-corner-small, 8px);box-shadow:0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);min-width:var(--md-menu-min-width, 112px);max-width:min( var(--md-menu-max-width, 100vw), calc(100vw - 2 * var(--md-menu-viewport-margin, 8px)) );padding:var(--md-sys-spacing-inset-xs, 4px) 0;overflow:visible;opacity:0;transform:scaleY(0.8);transform-origin:top left;transition:opacity var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1)), transform var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(.md-menu--open) .md-menu__surface{opacity:1;transform:none}:host(.md-menu--closing) .md-menu__surface{opacity:0;transform:scaleY(0.8);transition:opacity var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)), transform var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15))}:host(.md-menu--closing){pointer-events:none}:host(.md-menu--quick) .md-menu__surface{transition:none}:host(.md-menu--inline-fill){position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-block-size:0;block-size:100%;inline-size:100%;pointer-events:auto}:host(.md-menu--inline-fill) .md-menu__surface{flex:1 1 auto;block-size:100%;min-block-size:0;min-inline-size:100%;max-inline-size:none;display:flex;flex-direction:column;overflow:hidden;box-shadow:none;border:none;outline:none;padding:0;border-radius:0;border-end-start-radius:var(--md-menu-inline-fill-radius-end, 0);border-end-end-radius:var(--md-menu-inline-fill-radius-end, 0);background-color:var(--md-menu-inline-surface-color, transparent)}:host(.md-menu--inline-fill) .md-menu__scroll-shadow{flex:1 1 auto;min-block-size:0;block-size:100%}:host(.md-menu--inline-fill) .md-menu__surface ::slotted(md-menu-item:last-child){border-end-start-radius:var(--md-menu-inline-fill-radius-end, 0);border-end-end-radius:var(--md-menu-inline-fill-radius-end, 0)}:host(.md-menu--scroll):not(.md-menu--has-submenu) .md-menu__surface{overflow:hidden}:host(.md-menu--scroll) .md-menu__scroll-shadow{min-block-size:0}.md-menu__scroll-shadow{overflow-y:auto;overflow-anchor:none}:host([match-anchor-width]) .md-menu__surface{max-width:calc(100vw - 2 * var(--md-menu-viewport-margin, 8px));box-sizing:border-box}:host(:not(.md-menu--has-submenu):not(.md-menu--inline-fill):not(.md-menu--scroll)) .md-menu__surface{max-height:calc(100dvh - 2 * var(--md-menu-viewport-margin, 8px));overflow-y:auto;overscroll-behavior:contain}@media (max-width: 600px){:host(.md-menu--responsive) .md-menu__surface{width:calc(100vw - 2 * var(--md-menu-viewport-margin, 8px));min-width:0;max-width:none;box-sizing:border-box}}:host([placement="bottom-start"]) .md-menu__surface{transform-origin:top left}:host([placement="bottom-end"]) .md-menu__surface{transform-origin:top right}:host([placement="top-start"]) .md-menu__surface{transform-origin:bottom left}:host([placement="top-end"]) .md-menu__surface{transform-origin:bottom right}:host(.md-menu--standard) .md-menu__surface{background-color:var(--md-sys-color-surface-container-low, #F7F2FA);border-radius:var(--md-sys-shape-corner-large, 16px);box-shadow:0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 8px 3px rgba(0, 0, 0, 0.08);padding:var(--md-sys-spacing-inset-xs, 4px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item){border-radius:var(--md-sys-shape-corner-small, 8px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:first-child),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:first-child){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:last-child),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:last-child){border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:hover),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:hover){border-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:active),:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item.md-menu-item--selected),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:active){border-radius:var(--md-sys-shape-corner-medium, 12px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:first-child:hover),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:first-child:hover){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px);border-end-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-end-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--standard) .md-menu__surface ::slotted(md-menu-item:last-child:hover),:host(.md-menu--standard) .md-menu__surface ::slotted(md-sub-menu-item:last-child:hover){border-start-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-start-end-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--vibrant) .md-menu__surface{background-color:var(--md-sys-color-tertiary-container, #FFD8E4);border-radius:var(--md-sys-shape-corner-large, 16px);box-shadow:0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 8px 3px rgba(0, 0, 0, 0.08);padding:var(--md-sys-spacing-inset-xs, 4px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item){border-radius:var(--md-sys-shape-corner-small, 8px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:first-child),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:first-child){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:last-child),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:last-child){border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:hover),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:hover){border-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:active),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item.md-menu-item--selected),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:active){border-radius:var(--md-sys-shape-corner-medium, 12px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:first-child:hover),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:first-child:hover){border-start-start-radius:var(--md-sys-shape-corner-large, 16px);border-start-end-radius:var(--md-sys-shape-corner-large, 16px);border-end-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-end-radius:var(--md-sys-shape-corner-extra-small, 4px)}:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-menu-item:last-child:hover),:host(.md-menu--vibrant) .md-menu__surface ::slotted(md-sub-menu-item:last-child:hover){border-start-start-radius:var(--md-sys-shape-corner-extra-small, 4px);border-start-end-radius:var(--md-sys-shape-corner-extra-small, 4px);border-end-start-radius:var(--md-sys-shape-corner-large, 16px);border-end-end-radius:var(--md-sys-shape-corner-large, 16px)}:host(.md-menu--gap) .md-menu__surface{gap:var(--md-sys-spacing-gap-xs, 4px);display:flex;flex-direction:column}:host(.md-menu--grouped.md-menu--gap.md-menu--standard) .md-menu__surface,:host(.md-menu--grouped.md-menu--gap.md-menu--vibrant) .md-menu__surface{background-color:transparent;box-shadow:none;overflow:visible;display:flex;flex-direction:column;gap:var(--md-menu-group-gap, 4px);padding:0;filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1))}:host(.md-menu--grouped.md-menu--gap) .md-menu__surface ::slotted(md-menu-item-group),:host(.md-menu--grouped.md-menu--gap) .md-menu__scroll-shadow ::slotted(md-menu-item-group){flex-shrink:0}:host(.md-menu--grouped.md-menu--gap) .md-menu__scroll-shadow{display:flex;flex-direction:column;row-gap:var(--md-menu-group-gap, 4px)}:host(.md-menu--sectioned.md-menu--baseline) .md-menu__surface ::slotted([gap]){margin-bottom:var(--md-menu-section-gap, 2px)}.md-menu__empty{display:none;padding:var(--md-sys-spacing-inset-md, 12px) var(--md-sys-spacing-inset-lg, 16px);font-family:var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif);font-size:var(--md-sys-typescale-body-medium-size, 14px);line-height:var(--md-sys-typescale-body-medium-line-height, 20px);color:var(--md-sys-color-on-surface-variant, #49454F);text-align:center}:host(.md-menu--empty) .md-menu__empty{display:block}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}`;const d=150;const o=500;const m=8;const u=600;const h=new Set(["button","combobox","link","menuitem","tab","treeitem","checkbox","gridcell","row","rowheader","columnheader"]);const c=new Set(["BUTTON","SUMMARY"]);let l=0;const f=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.mdOpen=s(this,"mdOpen",1);this.mdClose=s(this,"mdClose",1);this.open=false;this.anchor="";this.placement="bottom-start";this.quick=false;this.variant="baseline";this.layout="standard";this.useGap=false;this.emptyText="";this.matchAnchorWidth=false;this.responsive=false;this.persistent=false;this.autoFocus=true;this.closing=false;this.sectioned=false;this.empty=false;this.hasSubmenu=false;this.focusedIndex=-1;this.navSeq=0;this.ringedIndex=-1;this.skipAutoFocus=false;this.menuId=`md-menu-${++l}`;this.typeaheadBuffer="";this.keyboardModality=false;this.openedViaKeyboard=false;this.listboxMode=false;this.listbox=false;this.density=0;this.trackKeyboardModality=()=>{this.keyboardModality=true};this.trackPointerModality=()=>{this.keyboardModality=false};this.lastSurfaceSize="";this.handleOutsideClick=e=>{if(this.persistent)return;const t=e.composedPath();if(!t.includes(this.el)){this.close()}};this.handleDocumentKeyDown=e=>{if(e.key==="Escape"&&this.open){this.close();this.restoreFocusToAnchor()}};this.handleScroll=()=>{if(this.open&&!this.closing){this.positionMenu()}};this.handleSlotChange=()=>{this.updateSections();this.propagateVariant();this.wireItemObserver();this.updateEmpty();this.hasSubmenu=!!this.el.querySelector("md-sub-menu-item")}}get asListbox(){return this.listbox||this.listboxMode}async setComboboxElement(e){if(this.comboboxEl&&this.comboboxEl!==e){this.comboboxEl.removeAttribute("aria-activedescendant")}this.comboboxEl=e??undefined}connectedCallback(){if(typeof document==="undefined")return;document.addEventListener("keydown",this.trackKeyboardModality,true);document.addEventListener("pointerdown",this.trackPointerModality,true)}componentDidLoad(){if(this.open){this.applyDepthZIndex()}this.wireItemObserver();this.updateEmpty();this.propagateVariant()}onEmptyTextChange(){this.updateEmpty()}onVariantChange(){this.propagateVariant()}async setVirtualProvider(e){this.provider=e??undefined;this.listboxMode=!!this.provider}async getScrollViewport(){return this.el.shadowRoot?.querySelector(".md-menu__scroll-shadow")??null}async show(e){clearTimeout(this.closeTimer);this.closing=false;if(this.anchor)this.collapseSubmenus();this.skipAutoFocus=e?.autoFocus===false;this.open=true;this.applyDepthZIndex()}async reposition(){if(this.open)this.positionMenu()}async close(){if(!this.open||this.closing)return;if(this.quick){this.open=false;return}this.closing=true;this.closeTimer=setTimeout((()=>{this.closing=false;this.open=false}),d)}onOpenChange(e){if(e){this.openedViaKeyboard=this.keyboardModality;this.dismissPeerMenus();this.applyDepthZIndex();requestAnimationFrame((()=>this.positionMenu()));this.mdOpen.emit();this.updateAnchorAria(true);if(this.anchor){requestAnimationFrame((()=>{document.addEventListener("click",this.handleOutsideClick);document.addEventListener("keydown",this.handleDocumentKeyDown)}));window.addEventListener("scroll",this.handleScroll,true);window.addEventListener("resize",this.handleScroll);this.observeSurfaceResize()}if(this.skipAutoFocus||!this.autoFocus){this.scheduleFocus((()=>this.initRovingTabindex()))}else{this.scheduleFocus((()=>this.focusFirstItem()))}this.skipAutoFocus=false}else{this.mdClose.emit();this.focusedIndex=-1;this.updateAnchorAria(false);this.resetRovingTabindex();this.collapseSubmenus();if(this.anchor){document.removeEventListener("click",this.handleOutsideClick);document.removeEventListener("keydown",this.handleDocumentKeyDown);window.removeEventListener("scroll",this.handleScroll,true);window.removeEventListener("resize",this.handleScroll)}this.unobserveSurfaceResize()}}observeSurfaceResize(){if(typeof ResizeObserver==="undefined")return;const e=this.el.shadowRoot?.querySelector(".md-menu__surface");if(!e)return;this.lastSurfaceSize="";this.surfaceRO=new ResizeObserver((e=>{if(!this.open)return;const t=e[e.length-1]?.contentRect;if(!t)return;const s=`${Math.round(t.width)}x${Math.round(t.height)}`;if(s===this.lastSurfaceSize)return;this.lastSurfaceSize=s;this.positionMenu()}));this.surfaceRO.observe(e)}unobserveSurfaceResize(){this.surfaceRO?.disconnect();this.surfaceRO=undefined}handleFocusIn(e){if(!this.open)return;const t=e.target;if(this.provider){const e=t.closest("md-menu-item");const s=e?.getAttribute("data-vindex");if(e&&s!=null){const t=parseInt(s,10);if(!isNaN(t)&&t!==this.focusedIndex){const s=this.focusedIndex>=0?this.provider.domItemForIndex(this.focusedIndex):null;s?.setAttribute("tabindex","-1");this.focusedIndex=t;e.setAttribute("tabindex","0");if(this.ringedIndex>=0&&this.ringedIndex!==t){const e=this.provider.domItemForIndex(this.ringedIndex);e?.removeAttribute("data-md-focused")}this.ringedIndex=-1}}return}const s=this.getMenuItems();const i=s.indexOf(t);if(i>=0&&i!==this.focusedIndex){if(this.focusedIndex>=0&&this.focusedIndex<s.length){s[this.focusedIndex].setAttribute("tabindex","-1")}this.focusedIndex=i;t.setAttribute("tabindex","0")}}handleKeyDown(e){if(!this.open)return;const t=e.target;if(t&&t.closest("md-menu")!==this.el)return;if(this.provider){this.handleKeyDownVirtual(e);return}const s=this.getMenuItems();if(!s.length)return;switch(e.key){case"ArrowDown":e.preventDefault();this.focusItem(s,this.focusedIndex+1);break;case"ArrowUp":e.preventDefault();this.focusItem(s,this.focusedIndex-1);break;case"Home":e.preventDefault();this.focusItem(s,0);break;case"End":e.preventDefault();this.focusItem(s,s.length-1);break;case"Escape":e.preventDefault();this.close();this.restoreFocusToAnchor();break;case"Tab":e.stopPropagation();this.closeEntireMenuTree();this.restoreFocusToAnchor();break;default:if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&!e.shiftKey){this.handleTypeahead(e.key,s)}break}}handleKeyDownVirtual(e){const t=this.provider;const s=t.count();const i=e.target?.tagName==="INPUT";switch(e.key){case"ArrowDown":e.preventDefault();this.focusVirtual(this.nextEnabled(this.focusedIndex,1,s));break;case"ArrowUp":e.preventDefault();this.focusVirtual(this.nextEnabled(this.focusedIndex,-1,s));break;case"Home":e.preventDefault();this.focusVirtual(this.nextEnabled(-1,1,s));break;case"End":e.preventDefault();this.focusVirtual(this.nextEnabled(s,-1,s));break;case"Enter":if(this.comboboxEl&&this.focusedIndex>=0){e.preventDefault();this.provider.domItemForIndex(this.focusedIndex)?.click()}break;case"Escape":e.preventDefault();this.close();this.restoreFocusToAnchor();break;case"Tab":e.stopPropagation();this.closeEntireMenuTree();this.restoreFocusToAnchor();break;default:if(!i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&!e.shiftKey){this.handleTypeaheadVirtual(e.key)}break}}nextEnabled(e,t,s){if(s<=0)return-1;let i=e;for(let e=0;e<s;e++){i+=t;if(i<0)i=s-1;else if(i>=s)i=0;if(!this.provider.isDisabledAt(i))return i}return e>=0&&e<s?e:-1}async focusVirtual(e,t=true){if(e<0)return;const s=this.provider;const i=++this.navSeq;this.focusedIndex=e;await s.ensureVisible(e);if(i!==this.navSeq)return;const n=s.domItemForIndex(e);if(!n)return;if(this.ringedIndex>=0&&this.ringedIndex!==e){const e=s.domItemForIndex(this.ringedIndex);e?.setAttribute("tabindex","-1");e?.removeAttribute("data-md-focused")}if(t){n.setAttribute("data-md-focused","");this.ringedIndex=e}else{n.removeAttribute("data-md-focused");this.ringedIndex=-1}if(this.comboboxEl){n.id||(n.id=`${this.menuId}-opt-${e}`);if(n.id)this.comboboxEl.setAttribute("aria-activedescendant",n.id)}else{n.setAttribute("tabindex","0");n.focus({preventScroll:true})}}handleTypeaheadVirtual(e){clearTimeout(this.typeaheadTimer);this.typeaheadBuffer+=e.toLowerCase();this.typeaheadTimer=setTimeout((()=>{this.typeaheadBuffer=""}),o);const t=this.typeaheadBuffer.length===1?this.focusedIndex+1:this.focusedIndex;const s=this.provider.findPrefix(this.typeaheadBuffer,t<0?0:t);if(s>=0)this.focusVirtual(s)}getMenuItems(){const e=Array.from(this.el.querySelectorAll("md-menu-item, md-sub-menu-item"));return e.filter((e=>e.closest("md-menu")===this.el))}getItemLabel(e){return e.headline||e.textContent?.trim()||""}handleTypeahead(e,t){clearTimeout(this.typeaheadTimer);this.typeaheadBuffer+=e.toLowerCase();this.typeaheadTimer=setTimeout((()=>{this.typeaheadBuffer=""}),o);const s=this.typeaheadBuffer.length===1?this.focusedIndex+1:this.focusedIndex;for(let e=0;e<t.length;e++){const i=(s+e)%t.length;const n=this.getItemLabel(t[i]).toLowerCase();if(n.startsWith(this.typeaheadBuffer)){this.focusItem(t,i);return}}}focusItem(e,t,s=true){if(e.length===0)return;if(t<0)t=e.length-1;if(t>=e.length)t=0;if(this.focusedIndex>=0&&this.focusedIndex<e.length){e[this.focusedIndex].setAttribute("tabindex","-1");e[this.focusedIndex].removeAttribute("data-md-focused")}this.focusedIndex=t;e[t].setAttribute("tabindex","0");if(s){e[t].setAttribute("data-md-focused","")}else{e[t].removeAttribute("data-md-focused")}e[t].focus()}initRovingTabindex(){if(this.provider){this.focusedIndex=-1;return}const e=this.getMenuItems();e.forEach(((e,t)=>{e.setAttribute("tabindex",t===0?"0":"-1")}));this.focusedIndex=0}resetRovingTabindex(){if(this.provider){const e=this.focusedIndex>=0?this.provider.domItemForIndex(this.focusedIndex):null;e?.setAttribute("tabindex","-1");e?.removeAttribute("data-md-focused");if(this.ringedIndex>=0&&this.ringedIndex!==this.focusedIndex){const e=this.provider.domItemForIndex(this.ringedIndex);e?.setAttribute("tabindex","-1");e?.removeAttribute("data-md-focused")}this.ringedIndex=-1;this.comboboxEl?.removeAttribute("aria-activedescendant");return}const e=this.getMenuItems();e.forEach((e=>{e.setAttribute("tabindex","-1");e.removeAttribute("data-md-focused")}))}collapseSubmenus(){const e=Array.from(this.el.querySelectorAll("md-sub-menu-item"));e.forEach((e=>e.collapse?.()));const t=Array.from(this.el.querySelectorAll("md-menu-item, md-sub-menu-item"));t.forEach((e=>{e.removeAttribute("data-md-focused");e.setAttribute("tabindex","-1")}))}scheduleFocus(e){setTimeout((()=>requestAnimationFrame((()=>e()))),0)}focusFirstItem(e=3){if(this.provider){const t=this.provider.count();if(t>0){this.focusVirtual(this.nextEnabled(-1,1,t),this.openedViaKeyboard)}else if(e>0){this.scheduleFocus((()=>this.focusFirstItem(e-1)))}return}const t=this.getMenuItems();if(t.length){this.focusItem(t,0,this.openedViaKeyboard)}else if(e>0){this.scheduleFocus((()=>this.focusFirstItem(e-1)))}}getAnchorEl(e=this.anchor){if(!e)return null;const t=this.el.getRootNode();return t.getElementById?.(e)??document.getElementById(e)}updateAnchorAria(e){if(!this.anchor)return;const t=this.getAnchorEl();if(!t)return;const s=t.getAttribute("role");const i=s!==null?h.has(s):c.has(t.tagName)||t.tagName==="A"&&t.hasAttribute("href");if(e){t.setAttribute("aria-haspopup",this.asListbox?"listbox":"menu");if(!this.asListbox)t.setAttribute("aria-controls",this.menuId)}if(i)t.setAttribute("aria-expanded",e?"true":"false");else t.removeAttribute("aria-expanded")}applyDepthZIndex(){if(!this.anchor)return;this.el.style.zIndex="var(--md-sys-z-index-popup, 1000)"}positionMenu(){if(!this.anchor)return;const e=this.getAnchorEl();if(!e)return;const t=e.getBoundingClientRect();const s=this.el.shadowRoot?.querySelector(".md-menu__surface");if(!s)return;const i=4;s.style.minWidth=this.matchAnchorWidth?`${t.width}px`:"";this.el.style.top="0";this.el.style.left="0";this.el.style.right="auto";this.el.style.bottom="auto";const n=s.offsetWidth;let r=s.offsetHeight;if(n===0||r===0){requestAnimationFrame((()=>this.positionMenu()));return}const a=window.innerWidth;const d=window.innerHeight;const o=m;if(this.responsive&&a<=u){const e=s.offsetHeight;let n=t.bottom+i;if(n+e+o>d&&t.top-i-e>=o){n=t.top-i-e;s.style.transformOrigin="bottom left"}else{s.style.transformOrigin="top left"}n=Math.max(o,Math.min(n,d-e-o));this.el.style.top=`${n}px`;this.el.style.left=`${o}px`;return}let h=this.placement.startsWith("bottom")?"bottom":"top";let c=this.placement.endsWith("start")?"start":"end";const l=d-t.bottom-i-o;const f=t.top-i-o;if(h==="bottom"&&r>l){if(r<=f||this.scrollCapped&&f>l)h="top"}else if(h==="top"&&r>f){if(r<=l||this.scrollCapped&&l>f)h="bottom"}if(c==="start"&&t.left+n>a){if(t.right-n>=0)c="end"}else if(c==="end"&&t.right-n<0){if(t.left+n<=a)c="start"}if(this.scrollCapped){const e=h==="bottom"?l:f;const t=s.querySelector(".md-menu__scroll-shadow");const i=s.offsetHeight-(t?.offsetHeight??0);this.el.style.setProperty("--md-menu-avail-block",`${Math.max(48,e-i)}px`);r=s.offsetHeight}else{this.el.style.removeProperty("--md-menu-avail-block")}const p=h==="bottom"?"top":"bottom";const b=c==="start"?"left":"right";s.style.transformOrigin=`${p} ${b}`;const x=h==="bottom"?t.bottom+i:t.top-i-r;const v=c==="start"?t.left:t.right-n;const y=Math.max(o,Math.min(v,a-n-o));const g=Math.max(o,Math.min(x,d-r-o));this.el.style.top=`${g}px`;this.el.style.left=`${y}px`}restoreFocusToAnchor(){if(!this.anchor)return;const e=this.getAnchorEl();e?.focus()}closeEntireMenuTree(){let e=this.el;let t=this.el;while(t){const s=t.parentElement?.closest("md-menu");if(s){e=s;t=s}else{break}}const s=e.querySelectorAll("md-menu-item, md-sub-menu-item");s.forEach((e=>e.setAttribute("tabindex","-1")));if(e.close)e.close();const i=e.anchor;if(i){const t=e.getRootNode();const s=t.getElementById?.(i)??document.getElementById(i);s?.focus()}}dismissPeerMenus(){if(this.persistent)return;if(typeof document==="undefined")return;const e=Array.from(document.querySelectorAll("md-menu"));for(const t of e){if(t===this.el)continue;if(!t.open)continue;if(t.persistent)continue;if(t.contains(this.el))continue;if(this.el.contains(t))continue;t.close()}}isHidden(e){if(e.hasAttribute("hidden"))return true;if(e.style.display==="none")return true;return false}hasVisibleItem(e){if(this.isHidden(e))return false;const t=e.tagName.toLowerCase();if(t==="md-menu-item"||t==="md-sub-menu-item")return true;if(t==="md-menu-item-group"){return Array.from(e.children).some((e=>this.hasVisibleItem(e)))}return false}updateEmpty(){if(!this.emptyText){this.empty=false;return}const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();this.empty=!t.some((e=>this.hasVisibleItem(e)))}wireItemObserver(){this.itemObserver?.disconnect();if(typeof MutationObserver==="undefined")return;const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();if(t.length===0)return;this.itemObserver=new MutationObserver((()=>this.updateEmpty()));for(const e of t){this.itemObserver.observe(e,{attributes:true,attributeFilter:["style","hidden"],subtree:true})}}getContentSlot(){const e=this.el.shadowRoot;if(!e)return null;const t=Array.from(e.querySelectorAll("slot"));return t.find((e=>!e.getAttribute("name")))??null}propagateVariant(){const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();for(const e of t){e.setAttribute("data-variant",this.variant);if(e.tagName.toLowerCase()==="md-menu-item-group"){if(this.useGap){e.setAttribute("data-use-gap","")}else{e.removeAttribute("data-use-gap")}const t=e.querySelectorAll("md-menu-item, md-sub-menu-item");for(const e of Array.from(t)){e.setAttribute("data-variant",this.variant)}}}}updateSections(){const e=this.getContentSlot();if(!e)return;const t=e.assignedElements();let s=false;let i=false;for(const e of t){if(i){e.setAttribute("data-after-gap","");i=false}else{e.removeAttribute("data-after-gap")}if(e.hasAttribute("gap")){s=true;i=true}}this.sectioned=s}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick);document.removeEventListener("keydown",this.handleDocumentKeyDown);document.removeEventListener("keydown",this.trackKeyboardModality,true);document.removeEventListener("pointerdown",this.trackPointerModality,true);window.removeEventListener("scroll",this.handleScroll,true);window.removeEventListener("resize",this.handleScroll);clearTimeout(this.closeTimer);clearTimeout(this.typeaheadTimer);this.itemObserver?.disconnect();this.itemObserver=undefined;this.unobserveSurfaceResize();this.updateAnchorAria(false)}get inlineFill(){return this.el.classList.contains("md-menu--inline-fill")}get maxHeightValue(){if(this.maxHeight===undefined||this.maxHeight===null||this.maxHeight===""){return null}const e=String(this.maxHeight);return/^\d+(\.\d+)?$/.test(e)?`${e}px`:e}get scrollCapped(){return!this.hasSubmenu&&!this.inlineFill}get useScrollViewport(){return this.inlineFill||this.scrollCapped}renderMenuBody(){return[i("slot",{onSlotchange:this.handleSlotChange}),this.emptyText?i("span",{class:"md-menu__empty",part:"empty-text",role:"status"},this.emptyText):null]}render(){return i(n,{key:"b56dcecef34cbb5f88ec2ca077bb24793416a0e7",class:{"md-menu":true,"md-menu--open":this.open,"md-menu--closing":this.closing,"md-menu--quick":this.quick,[`md-menu--${this.variant}`]:true,[`md-menu--${this.layout}`]:this.variant!=="baseline","md-menu--gap":this.useGap,"md-menu--sectioned":this.sectioned,"md-menu--empty":this.empty,"md-menu--responsive":this.responsive,"md-menu--has-submenu":this.hasSubmenu,"md-menu--scroll":this.scrollCapped},"aria-hidden":!this.open||this.closing?"true":"false",inert:!this.open||this.closing},i("div",{key:"a3e6653976727089bc7f11162c5a363916525a3a",class:"md-menu__surface",part:"surface",role:this.asListbox?"presentation":"menu",id:this.menuId,"aria-orientation":this.asListbox?undefined:"vertical","aria-labelledby":this.asListbox?undefined:this.anchor||undefined},i("slot",{key:"0ca8b628a129b2447b3db6102c4368072faa1d02",name:"header"}),this.useScrollViewport?i("div",{class:"md-menu__scroll-shadow",part:"menu-viewport",tabindex:this.asListbox?"0":undefined,style:this.inlineFill?undefined:{maxBlockSize:this.maxHeightValue?`min(${this.maxHeightValue}, var(--md-menu-avail-block, 100dvh), calc(100dvh - 2 * var(--md-menu-viewport-margin, 8px)))`:`min(var(--md-menu-avail-block, 100dvh), calc(100dvh - 2 * var(--md-menu-viewport-margin, 8px)))`}},this.renderMenuBody()):this.renderMenuBody()))}get el(){return this}static get watchers(){return{emptyText:[{onEmptyTextChange:0}],variant:[{onVariantChange:0}],useGap:[{onVariantChange:0}],open:[{onOpenChange:0}]}}static get style(){return a()}},[257,"md-menu",{open:[1540],anchor:[1],placement:[513],quick:[4],variant:[513],layout:[513],useGap:[516,"use-gap"],emptyText:[1,"empty-text"],matchAnchorWidth:[516,"match-anchor-width"],responsive:[516],persistent:[516],autoFocus:[516,"auto-focus"],maxHeight:[8,"max-height"],listLabel:[1,"list-label"],listbox:[516],density:[514],closing:[32],sectioned:[32],empty:[32],hasSubmenu:[32],listboxMode:[32],setComboboxElement:[64],setVirtualProvider:[64],getScrollViewport:[64],show:[64],reposition:[64],close:[64]},[[0,"focusin","handleFocusIn"],[0,"keydown","handleKeyDown"]],{emptyText:[{onEmptyTextChange:0}],variant:[{onVariantChange:0}],useGap:[{onVariantChange:0}],open:[{onOpenChange:0}]}]);function p(){if(typeof customElements==="undefined"){return}const e=["md-menu"];e.forEach((e=>{switch(e){case"md-menu":if(!customElements.get(r(e))){customElements.define(r(e),f)}break}}))}p();export{f as M,p as d};
|
|
2
|
+
//# sourceMappingURL=p-Bkt_X-6v.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as i,t as n}from"./p-bSpXNc5J.js";const r=()=>`:host{display:contents;border-radius:inherit;--_color:var(--md-ripple-color, currentColor)}.md-ripple{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}.md-ripple__wave{position:absolute;border-radius:50%;pointer-events:none;background:var(--_color);opacity:0;transform:scale(0);will-change:transform, opacity}.md-ripple{opacity:var(--md-sys-ripple-enabled, 1)}`;const o=450;const
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as t,H as s,h as e,d as i,t as n}from"./p-bSpXNc5J.js";const r=()=>`:host{display:contents;border-radius:inherit;--_color:var(--md-ripple-color, currentColor)}.md-ripple{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}.md-ripple__wave{position:absolute;border-radius:50%;pointer-events:none;background:var(--_color);opacity:0;transform:scale(0);will-change:transform, opacity}.md-ripple{opacity:var(--md-sys-ripple-enabled, 1)}`;const o=450;const a=150;const c=.12;const h="cubic-bezier(0.2, 0, 0, 1)";const l="--md-ripple-grow-duration";const p="--md-ripple-grow-easing";const d=t(class t extends s{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.disabled=false;this.hostEl=null;this.activeWave=null;this.growAnimation=null;this.activeOpacity=c;this.bound=false;this.settlePromise=null;this.settleResolve=null;this.onPointerDown=t=>{if(this.disabled||this.rippleSuppressed())return;const s=this.el.shadowRoot?.querySelector(".md-ripple");if(!s||!this.hostEl)return;this.endWave();const e=this.hostEl.getBoundingClientRect();const i=this.resolveExtent("--md-ripple-extend-inline");const n=this.resolveExtent("--md-ripple-extend-block");const r=e.left-i;const o=e.right+i;const a=e.top-n;const c=e.bottom+n;const h=Math.max(Math.abs(t.clientX-r),Math.abs(t.clientX-o));const l=Math.max(Math.abs(t.clientY-a),Math.abs(t.clientY-c));const p=Math.sqrt(h*h+l*l);const d=p*2;const u=t.clientX-e.left-p;const f=t.clientY-e.top-p;const m=document.createElement("span");m.classList.add("md-ripple__wave");m.style.width=m.style.height=`${d}px`;m.style.left=`${u}px`;m.style.top=`${f}px`;s.appendChild(m);this.activeWave=m;this.activeOpacity=this.resolveOpacity();this.beginSettle();this.growAnimation=m.animate([{transform:"scale(0)",opacity:this.activeOpacity},{transform:"scale(1)",opacity:this.activeOpacity}],{duration:this.resolveGrowDuration(),easing:this.resolveGrowEasing(),fill:"forwards"});window.addEventListener("pointerup",this.onRelease,{once:true});window.addEventListener("pointercancel",this.onRelease,{once:true})};this.onRelease=()=>{this.endWave()}}rippleSuppressed(){if(typeof getComputedStyle!=="function")return false;try{return getComputedStyle(this.el).getPropertyValue("--md-sys-ripple-enabled").trim()==="0"}catch{return false}}resolveOpacity(){if(!this.hostEl)return c;const t=getComputedStyle(this.hostEl).getPropertyValue("--md-ripple-opacity").trim();if(!t)return c;const s=parseFloat(t);return Number.isFinite(s)?s:c}resolveExtent(t){const s=getComputedStyle(this.el).getPropertyValue(t).trim();if(!s)return 0;const e=parseFloat(s);return Number.isFinite(e)&&e>0?e:0}resolveGrowDuration(){const t=getComputedStyle(this.el).getPropertyValue(l).trim();if(!t)return o;const s=parseFloat(t);return Number.isFinite(s)&&s>0?s:o}resolveGrowEasing(){const t=getComputedStyle(this.el).getPropertyValue(p).trim();return t||h}beginSettle(){this.finishSettle();this.settlePromise=new Promise((t=>{this.settleResolve=t}))}finishSettle(){this.settleResolve?.();this.settleResolve=null;this.settlePromise=null}async whenSettled(){if(!this.settlePromise)return;const t=new Promise((t=>{setTimeout(t,a+50)}));await Promise.race([this.settlePromise,t]);this.finishSettle()}resolveHost(){const t=this.el.getRootNode();return this.el.parentElement??(t instanceof ShadowRoot?t.host:null)}bind(){if(this.bound)return;this.hostEl=this.resolveHost();if(!this.hostEl)return;this.bound=true;this.hostEl.addEventListener("pointerdown",this.onPointerDown)}connectedCallback(){this.bind();if(!this.bound){queueMicrotask((()=>this.bind()))}}disconnectedCallback(){this.hostEl?.removeEventListener("pointerdown",this.onPointerDown);this.hostEl=null;this.bound=false}async endWave(){const t=this.activeWave;const s=this.growAnimation;if(!t||!s)return;this.activeWave=null;this.growAnimation=null;if(s.playState!=="finished"){await s.finished}const e=t.animate([{opacity:this.activeOpacity},{opacity:0}],{duration:a,easing:h,fill:"forwards"});try{if(typeof e.finished?.then==="function"){await e.finished}else{await new Promise((t=>setTimeout(t,a)))}}catch{}t.remove();this.finishSettle()}async trigger(){if(this.disabled||this.rippleSuppressed())return;if(!this.hostEl)this.hostEl=this.resolveHost();const t=this.el.shadowRoot?.querySelector(".md-ripple");if(!t||!this.hostEl)return;this.endWave();const s=this.hostEl.getBoundingClientRect();const e=this.resolveExtent("--md-ripple-extend-inline");const i=this.resolveExtent("--md-ripple-extend-block");const n=s.width/2;const r=s.height/2;const o=n+e;const a=r+i;const c=Math.sqrt(o*o+a*a);const h=c*2;const l=document.createElement("span");l.classList.add("md-ripple__wave");l.style.width=l.style.height=`${h}px`;l.style.left=`${n-c}px`;l.style.top=`${r-c}px`;t.appendChild(l);this.activeWave=l;this.activeOpacity=this.resolveOpacity();this.beginSettle();this.growAnimation=l.animate([{transform:"scale(0)",opacity:this.activeOpacity},{transform:"scale(1)",opacity:this.activeOpacity}],{duration:this.resolveGrowDuration(),easing:this.resolveGrowEasing(),fill:"forwards"});this.growAnimation.addEventListener("finish",(()=>this.endWave()),{once:true})}render(){return e(i,{key:"8e980fcdaae407a6adaa3ea90cd6f9e3771c19af","aria-hidden":"true"},e("div",{key:"d4c6fb757ce02f8cbba86d5e07de6cb4efb6d93b",class:"md-ripple"}))}get el(){return this}static get style(){return r()}},[1,"md-ripple",{disabled:[4],whenSettled:[64],trigger:[64]}]);function u(){if(typeof customElements==="undefined"){return}const t=["md-ripple"];t.forEach((t=>{switch(t){case"md-ripple":if(!customElements.get(n(t))){customElements.define(n(t),d)}break}}))}u();export{d as M,u as d};
|
|
2
|
+
//# sourceMappingURL=p-C3vB0Hd9.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as s,d,t as o}from"./p-bSpXNc5J.js";import{g as l}from"./p-DWxN44zD.js";const r=()=>`:host{--_container-color:var(--md-text-field-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));--_input-color:var(--md-text-field-input-color, var(--md-sys-color-on-surface, #1C1B1F));--_label-color:var(--md-text-field-label-color, var(--md-sys-color-on-surface-variant, #49454F));--_active-indicator-color:var(--md-text-field-active-indicator-color, var(--md-sys-color-primary, #6750A4));--_outline-color:var(--md-text-field-outline-color, var(--md-sys-color-outline, #79747E));--_error-color:var(--md-text-field-error-color, var(--md-sys-color-error, #B3261E));--_supporting-text-color:var(--md-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454F));--_icon-color:var(--md-text-field-icon-color, var(--md-sys-color-on-surface-variant, #49454F));--_text-inset:calc(var(--md-sys-spacing-inset-lg, 16px) + 7px);--_icon-size:var(--md-text-field-icon-size, max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px)));--_container-shape:var(--md-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px));--_filled-pill:var(--md-text-field-filled-pill, 0);--_filled-block-end-radius:calc(var(--_filled-pill) * var(--_container-shape));display:flex;flex-direction:column;position:relative;font-family:var(--md-sys-typescale-body-large-font-family, Roboto, sans-serif);width:100%;box-sizing:border-box}.md-text-field__container{position:relative;display:flex;align-items:stretch;min-height:calc(56px + var(--md-sys-density-scale, 0) * 4px);cursor:var(--md-text-field-cursor, text);box-sizing:border-box}:host(.md-text-field--filled) .md-text-field__container{background-color:var(--_container-color);border-start-start-radius:var(--_container-shape);border-start-end-radius:var(--_container-shape);border-end-start-radius:var(--_filled-block-end-radius);border-end-end-radius:var(--_filled-block-end-radius);padding-block:max(2px, calc(8px + var(--md-sys-density-scale, 0) * 0.5px));padding-inline-start:var(--md-text-field-padding-inline-start, var(--_text-inset));padding-inline-end:var(--md-text-field-padding-inline-end, var(--_text-inset));transition:background-color var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1))}:host(.md-text-field--filled.md-text-field--focused) .md-text-field__container{background-color:var(--md-text-field-container-color, var(--md-sys-color-surface-container-high, #ECE6F0))}:host(.md-text-field--outlined) .md-text-field__container{background-color:transparent;border-radius:var(--_container-shape);padding-block:max(2px, calc(8px + var(--md-sys-density-scale, 0) * 1px));padding-inline-start:var(--md-text-field-padding-inline-start, var(--_text-inset));padding-inline-end:var(--md-text-field-padding-inline-end, var(--_text-inset))}:host(.md-text-field--outlined) .md-text-field__input{position:relative;inset-block-start:var(--md-text-field-optical-nudge, 0px)}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}.md-text-field__state-layer{position:absolute;inset:0;border-radius:inherit;background-color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0;transition:opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));pointer-events:none}:host(.md-text-field--filled:hover:not(.md-text-field--disabled)) .md-text-field__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(.md-text-field--outlined) .md-text-field__state-layer{display:none}.md-text-field__input-wrap{flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0;position:relative;padding:0}:host(.md-text-field--filled) .md-text-field__input-wrap{justify-content:flex-end}.md-text-field__input-row{display:flex;align-items:center}.md-text-field__chips{display:inline-flex;flex-wrap:nowrap;align-items:center;gap:4px;min-inline-size:0;overflow:hidden}:host(.md-text-field--with-chips:not([chips-wrap])) .md-text-field__chips{flex:1 1 auto}:host(.md-text-field--with-chips) .md-text-field__input-row{flex-wrap:nowrap;gap:4px;min-inline-size:0}:host(.md-text-field--with-chips:not([chips-wrap])) .md-text-field__input{flex:0 1 0;min-inline-size:0}:host(.md-text-field--with-chips) .md-text-field__input{flex:1 0 40px;min-inline-size:40px}:host(.md-text-field--with-chips[chips-wrap]) .md-text-field__input-row{flex-wrap:wrap;row-gap:6px}:host([chips-wrap]) .md-text-field__chips{flex-wrap:wrap;overflow:visible}.md-text-field__input{flex:1;border:none;outline:none;background:transparent;font-family:inherit;font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));font-weight:var(--md-sys-typescale-body-large-weight, 400);letter-spacing:var(--md-sys-typescale-body-large-tracking, 0.5px);color:var(--_input-color);caret-color:var(--_active-indicator-color);cursor:var(--md-text-field-cursor, text);padding:0;margin:0;min-width:0;width:100%}.md-text-field__input::placeholder{color:var(--_label-color)}:host(.md-text-field--error) .md-text-field__input{caret-color:var(--_error-color)}.md-text-field__input--textarea{resize:none;overflow-wrap:break-word}.md-text-field__input--auto-grow{overflow:hidden}.md-text-field__input--fixed{overflow-y:auto}:host(.md-text-field--multiline) .md-text-field__container{align-items:flex-start;min-height:auto}:host(.md-text-field--multiline) .md-text-field__input-wrap{justify-content:flex-start}:host(.md-text-field--multiline.md-text-field--filled) .md-text-field__input-wrap{justify-content:flex-start;padding-block-start:20px}:host(.md-text-field--multiline) .md-text-field__input-row{align-items:flex-start}:host(.md-text-field--filled.md-text-field--floating.md-text-field--with-chips) .md-text-field__input-wrap{padding-block-start:max(12px, calc(16px + var(--md-sys-density-scale, 0) * 1px))}:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__icon,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__trailing-icon-button,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__clear,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__password-toggle,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__speech{align-self:flex-start;margin-block-start:16px}:host(.md-text-field--auto-grow) .md-text-field__icon,:host(.md-text-field--auto-grow) .md-text-field__trailing-icon-button,:host(.md-text-field--auto-grow) .md-text-field__clear,:host(.md-text-field--auto-grow) .md-text-field__password-toggle,:host(.md-text-field--auto-grow) .md-text-field__speech{align-self:center}.md-text-field__label{position:absolute;inset-inline-start:0;font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));color:var(--_label-color);pointer-events:none;transition:top var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), inset-inline-start var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), font-size var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), line-height var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), transform var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), background-color var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), padding var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), color var(--md-sys-motion-duration-short2, 100ms) ease;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}:host(.md-text-field--filled) .md-text-field__label{top:50%;transform:translateY(-50%)}:host(.md-text-field--multiline:not(.md-text-field--floating)) .md-text-field__label{top:28px}:host(.md-text-field--multiline.md-text-field--outlined:not(.md-text-field--floating)) .md-text-field__label{top:12px;}:host(.md-text-field--multiline.md-text-field--filled:not(.md-text-field--floating)) .md-text-field__label{top:32px;}:host(.md-text-field--filled.md-text-field--floating) .md-text-field__label{top:0;transform:translateY(0);font-size:max(11px, calc(var(--md-sys-typescale-body-small-size, 12px) + var(--md-sys-density-scale, 0) * 0.25px));line-height:max(12px, calc(var(--md-sys-typescale-body-small-line-height, 16px) + var(--md-sys-density-scale, 0) * 1px))}:host(.md-text-field--outlined) .md-text-field__label{top:50%;transform:translateY(-50%);background-color:transparent;padding:0}:host(.md-text-field--outlined.md-text-field--floating) .md-text-field__label{top:calc(-8px - var(--md-sys-density-scale, 0) * 1px);inset-inline-start:0;transform:translateY(-50%);font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(12px, calc(16px + var(--md-sys-density-scale, 0) * 1px));background-color:transparent;padding:0}:host([density='-1'].md-text-field--filled.md-text-field--floating) .md-text-field__label,:host([density='-2'].md-text-field--filled.md-text-field--floating) .md-text-field__label,:host([density='-3'].md-text-field--filled.md-text-field--floating) .md-text-field__label,:host([density='-4'].md-text-field--filled.md-text-field--floating) .md-text-field__label{font-size:11px;line-height:12px;top:1px}:host([density='-2'].md-text-field--filled.md-text-field--floating) .md-text-field__label{top:-2px;}:host([density='-3'].md-text-field--outlined.md-text-field--floating) .md-text-field__label,:host([density='-4'].md-text-field--outlined.md-text-field--floating) .md-text-field__label{top:-4px}:host(.md-text-field--filled) .md-text-field__input{line-height:max(16px, calc(24px + var(--md-sys-density-scale, 0) * 2px))}:host(.md-text-field--outlined.md-text-field--floating.md-text-field--with-leading) .md-text-field__label{inset-inline-start:calc(-1 * (var(--_icon-size) + var(--md-sys-spacing-gap-lg, 16px)))}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__label{color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__label{color:var(--md-sys-color-on-error-container, #8C1D18)}:host(.md-text-field--focused) .md-text-field__label{color:var(--_active-indicator-color)}:host(.md-text-field--error) .md-text-field__label{color:var(--_error-color)}.md-text-field__prefix,.md-text-field__suffix{font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));color:var(--_supporting-text-color);white-space:nowrap;user-select:none;transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__prefix{margin-inline-end:2px}.md-text-field__suffix{margin-inline-start:2px}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled)) .md-text-field__prefix,:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled)) .md-text-field__suffix{color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__icon{display:flex;align-items:center;justify-content:center;font-size:var(--_icon-size);color:var(--_icon-color);flex-shrink:0;align-self:center;user-select:none;transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__icon ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__icon--leading{margin-inline-end:var(--md-sys-spacing-gap-lg, 16px)}.md-text-field__icon--trailing{margin-inline-start:0}.md-text-field__trailing-icon-button{display:flex;align-items:center;flex-shrink:0;align-self:center;margin-inline-start:0}.md-text-field__error-icon+.md-text-field__trailing-icon-button{margin-inline-start:4px}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled)) .md-text-field__icon--leading{color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__icon--trailing{color:var(--md-sys-color-on-surface, #1C1B1F)}:host(.md-text-field--error) .md-text-field__icon--trailing{color:var(--_error-color)}:host(.md-text-field--error) .md-text-field__icon--trailing ::slotted(*){color:inherit}.md-text-field__clear{display:flex;align-items:center;justify-content:center;align-self:center;border:none;background:none;padding:0;margin:0;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);cursor:pointer;border-radius:50%;width:var(--_icon-size);height:var(--_icon-size);flex-shrink:0;color:var(--_icon-color);transition:color var(--md-sys-motion-duration-short2, 100ms) ease, opacity var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__clear ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__clear:hover:not(:disabled){color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__clear:focus-visible,.md-text-field__password-toggle:focus-visible,.md-text-field__speech:focus-visible{outline:2px solid var(--md-sys-color-secondary, #625B71);outline-offset:-6px}.md-text-field__clear--disabled{color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0.38;cursor:default;pointer-events:none}:host(.md-text-field--error) .md-text-field__clear:not(:disabled){color:var(--_error-color)}.md-text-field__password-toggle{display:flex;align-items:center;justify-content:center;align-self:center;border:none;background:none;padding:0;margin:0;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);cursor:pointer;border-radius:50%;width:var(--_icon-size);height:var(--_icon-size);flex-shrink:0;color:var(--_icon-color);transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__password-toggle ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__password-toggle:hover:not(:disabled){color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__password-toggle--disabled{color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0.38;cursor:default;pointer-events:none}:host(.md-text-field--error) .md-text-field__password-toggle:not(:disabled){color:var(--_error-color)}.md-text-field__speech{display:flex;align-items:center;justify-content:center;align-self:center;border:none;background:none;padding:0;margin:0;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);cursor:pointer;border-radius:50%;width:var(--_icon-size);height:var(--_icon-size);flex-shrink:0;color:var(--_icon-color);transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__speech ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__speech:hover:not(:disabled){color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__speech--listening{color:var(--_error-color);animation:md-speech-pulse 1.2s ease-in-out infinite}.md-text-field__speech--disabled{color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0.38;cursor:default;pointer-events:none}:host(.md-text-field--error) .md-text-field__speech:not(:disabled):not(.md-text-field__speech--listening){color:var(--_error-color)}@keyframes md-speech-pulse{0%,100%{opacity:1}50%{opacity:0.4}}.md-text-field__error-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center;width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size);line-height:1;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);color:var(--_error-color)}.md-text-field__error-icon ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__error-icon{align-self:flex-start;margin-block-start:16px}:host(.md-text-field--auto-grow) .md-text-field__error-icon{align-self:center}.md-text-field__indicator{position:absolute;inset-block-end:0;inset-inline:0;height:1px;background-color:var(--md-sys-color-on-surface-variant, #49454F);opacity:calc(1 - var(--_filled-pill));transition:height var(--md-sys-motion-duration-short2, 100ms) ease, background-color var(--md-sys-motion-duration-short2, 100ms) ease, opacity var(--md-sys-motion-duration-short2, 100ms) ease}:host(.md-text-field--focused) .md-text-field__indicator{height:var(--md-text-field-focus-border-width, 3px);background-color:var(--_active-indicator-color);transition:height var(--md-sys-motion-duration-short2, 100ms) ease}:host(.md-text-field--error) .md-text-field__indicator{background-color:var(--_error-color)}:host(.md-text-field--error.md-text-field--focused) .md-text-field__indicator{height:var(--md-text-field-focus-border-width, 3px);background-color:var(--_error-color);transition:height var(--md-sys-motion-duration-short2, 100ms) ease;}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__indicator{height:1px;background-color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__indicator{height:1px;background-color:var(--md-sys-color-on-error-container, #8C1D18)}.md-text-field__fieldset{position:absolute;inset:0;margin:0;max-inline-size:100%;min-inline-size:0;overflow:hidden;padding-inline-start:calc( var(--md-text-field-padding-inline-start, var(--_text-inset)) - 1px - var(--_legend-inline-padding, 4px) );padding-inline-end:calc( var(--md-text-field-padding-inline-end, var(--_text-inset)) - 1px - var(--_legend-inline-padding, 4px) );padding-block:0;border:1px solid var(--_outline-color);border-radius:var(--_container-shape);pointer-events:none;transition:border-color var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1))}:host(.md-text-field--focused) .md-text-field__fieldset{border-color:var(--_active-indicator-color);border-width:var(--md-text-field-focus-border-width, 3px);inset:var(--md-text-field-focus-inset, -2px);transition:none}:host(.md-text-field--error) .md-text-field__fieldset{border-color:var(--_error-color)}:host(.md-text-field--error.md-text-field--focused) .md-text-field__fieldset{border-color:var(--_error-color);border-width:var(--md-text-field-focus-border-width, 3px);inset:var(--md-text-field-focus-inset, -2px);transition:none;}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__fieldset{border-color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__fieldset{border-color:var(--md-sys-color-on-error-container, #8C1D18)}.md-text-field__legend{max-inline-size:calc(100% - 16px);overflow:hidden;height:0;padding:0;font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));max-width:0;transition:max-width var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), padding-inline var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));white-space:nowrap}.md-text-field__legend--active{max-width:100%;padding-inline:var(--_legend-inline-padding, 4px);transition:max-width var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), padding-inline var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1))}.md-text-field__legend span{display:inline-block;padding:0;visibility:hidden}.md-text-field__support-row{display:flex;justify-content:space-between;padding:4px 16px 0;gap:16px}.md-text-field__support-text{font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(14px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));color:var(--_supporting-text-color)}.md-text-field__support-text--error{color:var(--_error-color)}.md-text-field__counter{font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(14px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));color:var(--_supporting-text-color);flex-shrink:0}:host(.md-text-field--disabled) .md-text-field__container{cursor:default;pointer-events:none}:host(.md-text-field--disabled.md-text-field--filled) .md-text-field__container{background-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 4%, transparent)}:host(.md-text-field--disabled) .md-text-field__label{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__input{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__indicator{background-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__fieldset{border-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 12%, transparent)}:host(.md-text-field--disabled) .md-text-field__icon{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__icon ::slotted(*){color:inherit}:host(.md-text-field--disabled) .md-text-field__support-text,:host(.md-text-field--disabled) .md-text-field__counter{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__prefix,:host(.md-text-field--disabled) .md-text-field__suffix{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}.material-symbols-outlined{font-family:var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;font-size:var(--_icon-size);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;overflow-wrap:normal;direction:ltr;font-feature-settings:'liga';-webkit-font-smoothing:antialiased}@keyframes md-tf-autofill-start{from{--md-tf-autofill:1}}@keyframes md-tf-autofill-cancel{from{--md-tf-autofill:0}}.md-text-field__input:-webkit-autofill{animation-name:md-tf-autofill-start;box-shadow:0 0 0 1000px var(--_container-color, #E6E1E6) inset;-webkit-text-fill-color:var(--md-text-field-input-color, var(--md-sys-color-on-surface, #1D1B20));caret-color:var(--md-text-field-input-color, var(--md-sys-color-on-surface, #1D1B20))}.md-text-field__input:not(:-webkit-autofill){animation-name:md-tf-autofill-cancel}@media (prefers-reduced-motion: reduce){.md-text-field__label,.md-text-field__indicator,.md-text-field__state-layer,.md-text-field__fieldset,.md-text-field__legend,.md-text-field__legend>span,.md-text-field__container{transition-duration:0.01ms !important}.md-text-field__speech--listening,.md-text-field__speech--listening *{animation:none !important}}@media (forced-colors: active){:host(.md-text-field--filled) .md-text-field__container,:host(.md-text-field--filled.md-text-field--focused) .md-text-field__container,:host(.md-text-field--filled.md-text-field--disabled) .md-text-field__container,:host(.md-text-field--outlined) .md-text-field__container,.md-text-field__container{border:1px solid ButtonText;forced-color-adjust:none;background:Field;color:FieldText}:host(.md-text-field--focused) .md-text-field__indicator{background-color:Highlight}.md-text-field__input{caret-color:FieldText}:host(.md-text-field--filled.md-text-field--disabled) .md-text-field__indicator{background-color:GrayText}:host(.md-text-field--outlined.md-text-field--disabled) .md-text-field__fieldset{border-color:GrayText}:host(.md-text-field--focused) .md-text-field__label,:host(.md-text-field--error) .md-text-field__label,:host(.md-text-field--disabled) .md-text-field__label{color:FieldText}:host(.md-text-field--disabled) .md-text-field__label,:host(.md-text-field--disabled) .md-text-field__input{color:GrayText}:host(.md-text-field--error) .md-text-field__indicator{background-color:LinkText}.md-text-field__input{background:Field;color:FieldText}:host(.md-text-field--focused) .md-text-field__container{outline:2px solid Highlight;outline-offset:1px}:host(.md-text-field--error) .md-text-field__container{border-color:LinkText}:host(.md-text-field--disabled) .md-text-field__container,:host(.md-text-field--disabled) .md-text-field__input{color:GrayText;border-color:GrayText}.md-text-field__support-text,.md-text-field__counter{color:CanvasText}.md-text-field__support-text--error{color:LinkText}.md-text-field__label,.md-text-field__prefix,.md-text-field__suffix,.md-text-field__icon,.md-text-field__clear,.md-text-field__password-toggle,.md-text-field__speech{color:FieldText;forced-color-adjust:none}.md-text-field__error-icon{color:LinkText}.md-text-field__indicator{background-color:FieldText}:host(.md-text-field--outlined) .md-text-field__container{border:none}:host(.md-text-field--outlined) .md-text-field__fieldset{border-color:ButtonText}:host(.md-text-field--outlined.md-text-field--error) .md-text-field__fieldset{border-color:LinkText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__label,:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__label,:host(:hover) .md-text-field__prefix,:host(:hover) .md-text-field__suffix,:host(:hover) .md-text-field__icon{color:FieldText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__label{color:LinkText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__indicator,:host(:hover:not(.md-text-field--focused)) .md-text-field__indicator{background-color:FieldText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__indicator{background-color:LinkText}:host(:hover) .md-text-field__clear,:host(:hover) .md-text-field__password-toggle,:host(:hover) .md-text-field__speech{color:FieldText;background:none}}:host(.md-text-field--outlined) .md-text-field__input:-webkit-autofill{box-shadow:0 0 0 1000px var(--md-sys-color-surface, #FEF7FF) inset}.md-text-field__clear,.md-text-field__password-toggle,.md-text-field__speech{min-inline-size:40px;min-block-size:40px;display:inline-flex;align-items:center;justify-content:center;margin-inline:-6px;margin-block:-8px}.md-text-field__clear--empty{visibility:hidden}`;const n={numeric:/[^0-9]/g,integer:/[^0-9-]/g,decimal:/[^0-9.\-]/g,alpha:/[^a-zA-Z]/g,alphanumeric:/[^a-zA-Z0-9]/g};const a=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdInput=i(this,"mdInput",7);this.mdChange=i(this,"mdChange",7);this.mdSearch=i(this,"mdSearch",7);this.mdClear=i(this,"mdClear",7);this.mdPasswordToggle=i(this,"mdPasswordToggle",7);this.mdSpeechResult=i(this,"mdSpeechResult",7);this.mdValidityChange=i(this,"mdValidityChange",5);this.internals=this.attachInternals();this.reserveSupportingSpace=false;this.variant="filled";this.label="";this.value="";this.placeholder="";this.type="text";this.name="";this.pattern="";this.autocomplete="";this.inputMode="";this.enterKeyHint="";this.autoCapitalize="";this.disabled=false;this.readOnly=false;this.required=false;this.error=false;this.errorText="";this.supportingText="";this.prefixText="";this.suffixText="";this.clearable=false;this.passwordToggle=false;this.density=0;this.multiline=false;this.speechToText=false;this.speechLang="";this.restrict="";this.formatOn="blur";this.focusBorderWidth=3;this.appearFocused=false;this.chipsWrap=false;this.debounce=0;this.throttle=0;this.focused=false;this.formDisabled=false;this.autofilled=false;this.hostAriaLabel="";this.passwordVisible=false;this.hasSlottedLeading=false;this.hasSlottedChips=false;this.hasSlottedTrailing=false;this.hasTrailingIconButton=false;this.listening=false;this.displayValue="";this.defaultValue="";this.internalWrite=false;this.composing=false;this.warnedLiveFormat=false;this.uid=`md-text-field-${Math.random().toString(36).slice(2,7)}`;this.throttlePending=false;this.customValidityMessage="";this.inputRole="";this.inputExpanded=false;this.inputAriaAutocomplete="";this.lastValidityKey=null;this.pendingTypeResync=false;this.formatterEpoch=0;this.handleInput=t=>{const e=t.target||this.inputEl;if(!e)return;if(this.composing)return;let i=e.value;let s=e.selectionStart??i.length;let d=this.applyRestrict(i);if(this.restrict&&this.maxLength!=null&&!isNaN(this.maxLength)&&d.length>this.maxLength){const t=Array.from(d);let e="";for(const i of t){if((e+i).length>this.maxLength)break;e+=i}d=e}if(d!==i){const t=this.applyRestrict(i.substring(0,s));i=d;e.value=i;s=Math.min(t.length,i.length);try{e.setSelectionRange(s,s)}catch{}}this.internalWrite=true;try{this.value=this.parser?this.parser(i):i}catch(t){this.value=i}if(this.formatter&&this.effectiveFormatOn==="input"&&this.maxLength!=null){const t=this.value.replace(/[-/\s]/g,"");if(t.length>this.maxLength){const e=Array.from(t);let i="";for(const t of e){if((i+t).length>this.maxLength)break;i+=t}this.value=i}}if(this.formatter&&this.effectiveFormatOn==="input"){try{const t=t=>this.parser?this.parser(t).length:(t.match(/[0-9a-zA-Z]/g)||[]).length;const d=t(i.substring(0,s));const o=this.formatter(this.value);this.displayValue=o;e.value=o;let l=d===0?0:o.length;for(let e=0;d>0&&e<o.length;e++){if(t(o.slice(0,e+1))===d){l=e+1;break}}try{e.setSelectionRange(l,l)}catch{}}catch(t){this.displayValue=this.value;e.value=this.value}}if(!(this.formatter&&this.effectiveFormatOn==="input")){this.displayValue=e.value}this.internalWrite=false;this.mdInput.emit(this.value);this.emitSearch(this.value);if(this.multiline==="auto-grow"){this.autoGrow()}};this.handleCompositionStart=()=>{this.composing=true};this.handleCompositionEnd=t=>{this.composing=false;this.handleInput(t)};this.handleKeyDown=t=>{if(t.key==="Enter"&&!this.multiline&&!this.composing){try{const t=this.internals?.form;const e=t?.querySelector('button[type="submit"], input[type="submit"], button:not([type])');t?.requestSubmit(e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:undefined)}catch{}}if(t.key==="Escape"&&!this.composing&&this.clearable==="internal"&&this.value&&!this.readOnly&&!this.isDisabled){t.stopPropagation();t.preventDefault();this.clearValue();this.mdClear.emit()}};this.handleAutofillStart=t=>{if(t.animationName==="md-tf-autofill-start")this.autofilled=true;if(t.animationName==="md-tf-autofill-cancel")this.autofilled=false};this.handleChange=()=>{this.mdChange.emit(this.value);this.el.dispatchEvent(new CustomEvent("change",{bubbles:true}))};this.handleFocus=()=>{this.focused=true;if(this.formatter&&this.effectiveFormatOn==="blur"&&this.inputEl){this.displayValue=this.value;this.inputEl.value=this.value}};this.handleBlur=()=>{this.focused=false;this.composing=false;this.syncDisplayValue();if(this.inputEl){this.inputEl.value=this.displayValue}};this.handleContainerClick=()=>{this.inputEl?.focus()};this.handleClear=t=>{t.stopPropagation();if(this.isDisabled||this.readOnly||!this.value)return;if(this.clearable==="internal"){this.clearValue()}this.mdClear.emit();this.inputEl?.focus()};this.handlePasswordToggle=t=>{t.stopPropagation();if(this.isDisabled)return;if(this.passwordToggle==="internal"){this.passwordVisible=!this.passwordVisible;this.mdPasswordToggle.emit({visible:this.passwordVisible})}else{this.mdPasswordToggle.emit({visible:this.type==="password"})}this.inputEl?.focus()};this.handleSpeechToggle=t=>{t.stopPropagation();if(this.isDisabled||this.readOnly)return;if(this.speechToText==="external"){this.listening=!this.listening;this.mdSpeechResult.emit({transcript:"",listening:this.listening});return}if(this.listening){this.recognition?.stop();return}const e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e){console.warn("md-text-field: SpeechRecognition API not supported in this browser.");return}const i=new e;i.continuous=false;i.interimResults=true;if(this.speechLang){i.lang=this.speechLang}let s="";const d=this.value;i.onresult=t=>{let e="";for(let i=t.resultIndex;i<t.results.length;i++){const d=t.results[i][0].transcript;if(t.results[i].isFinal){s+=d}else{e+=d}}const i=d&&!d.endsWith(" ")?" ":"";this.internalWrite=true;this.value=d+i+s+e;this.internalWrite=false;if(this.inputEl)this.inputEl.value=this.value;this.mdInput.emit(this.value);this.mdSpeechResult.emit({transcript:s+e,listening:true})};i.onend=()=>{this.listening=false;this.recognition=undefined;const t=d&&!d.endsWith(" ")?" ":"";this.internalWrite=true;this.value=d+t+s;this.internalWrite=false;if(this.inputEl)this.inputEl.value=this.value;this.mdInput.emit(this.value);this.mdChange.emit(this.value);this.mdSpeechResult.emit({transcript:s,listening:false})};i.onerror=t=>{if(t.error!=="aborted"){console.warn("md-text-field: Speech recognition error:",t.error)}this.listening=false;this.recognition=undefined};this.recognition=i;this.listening=true;i.start()}}get isDisabled(){return this.disabled||this.formDisabled}get effectiveFormatOn(){if(this.formatOn==="input"&&this.formatter&&!this.parser){return"blur"}return this.formatOn}static isInteractive(t){const e=t.tagName.toLowerCase();return["md-icon-button","md-button","button","a","input","select","textarea"].includes(e)||t.hasAttribute("tabindex")}get isFloating(){return this.focused||this.appearFocused||!!this.value||!!this.placeholder||this.autofilled||this.hasSlottedChips}get effectiveRows(){if(this.rows!=null)return this.rows;return this.multiline==="fixed"?4:2}get restrictPattern(){if(!this.restrict)return null;if(n[this.restrict])return n[this.restrict];try{const t=this.restrict.startsWith("[")&&this.restrict.endsWith("]")?this.restrict.slice(1,-1):this.restrict;return new RegExp(`[^${t}]`,"g")}catch{return null}}applyRestrict(t){const e=this.restrictPattern;return e?t.replace(e,""):t}syncTrailingSlotState(e){if(!e)return;this.hasSlottedTrailing=e.assignedNodes().length>0;this.hasTrailingIconButton=e.assignedElements().some((e=>t.isInteractive(e)))}syncHostSlottedIcons(){const e=this.el.querySelector('[slot="leading-icon"]');const i=this.el.querySelector('[slot="trailing-icon"]');this.hasSlottedLeading=!!e;this.hasSlottedTrailing=!!i;this.hasTrailingIconButton=!!i&&t.isInteractive(i)}componentWillLoad(){this.bridgeFormatterProps();if(this.el.hasAttribute("clearable")&&!this.clearable)this.clearable="internal";if(this.el.hasAttribute("password-toggle")&&!this.passwordToggle)this.passwordToggle="internal";if(this.el.hasAttribute("speech-to-text")&&!this.speechToText)this.speechToText="internal";if(this.maxLength==null&&this.el.hasAttribute("maxlength")){this.maxLength=parseInt(this.el.getAttribute("maxlength"),10)}if(this.minLength==null&&this.el.hasAttribute("minlength")){this.minLength=parseInt(this.el.getAttribute("minlength"),10)}if(!this.label&&!this.hostAriaLabel){const t=this.el.getAttribute("aria-label");if(t){this.hostAriaLabel=t;this.el.removeAttribute("aria-label")}}if(!this.multiline&&/[\r\n]/.test(this.value)){this.value=this.value.replace(/[\r\n]+/g,"")}this.defaultValue=this.value;this.syncDisplayValue();this.syncHostSlottedIcons();this.updateFormValue()}updateFormValue(){try{this.internals?.setFormValue(this.value)}catch{}}updateValidity(){const t=this.inputEl;if(!t)return;try{if(this.customValidityMessage){this.internals?.setValidity({customError:true},this.customValidityMessage,t);return}if(this.focused&&t.value!==this.value)return;const e=t.value;let i=false;if(t.value!==this.value){t.value=this.value;i=true;if(t.value!==this.value){t.value=e;this.internals?.setValidity({badInput:true},"Invalid value",t);return}}const s=t.validity;const d={valueMissing:s.valueMissing,typeMismatch:s.typeMismatch,patternMismatch:s.patternMismatch,tooLong:s.tooLong,tooShort:s.tooShort,rangeUnderflow:s.rangeUnderflow,rangeOverflow:s.rangeOverflow,stepMismatch:s.stepMismatch,badInput:s.badInput};const o=s.valid;const l=t.validationMessage;if(i)t.value=e;if(o){this.internals?.setValidity({})}else{this.internals?.setValidity(d,l||"Invalid value",t)}}catch{}this.emitValidityChange()}formResetCallback(){this.internalWrite=false;this.value=this.defaultValue;this.syncDisplayValue();if(this.inputEl)this.inputEl.value=this.displayValue;this.updateFormValue()}formDisabledCallback(t){queueMicrotask((()=>{this.formDisabled=t}))}async setFocus(){this.inputEl?.focus()}async select(){this.inputEl?.select()}async getInputElement(){return this.inputEl??null}async getValidity(){try{const t=this.internals.validity;return{valid:t.valid,validationMessage:this.internals.validationMessage,flags:{valueMissing:t.valueMissing,typeMismatch:t.typeMismatch,patternMismatch:t.patternMismatch,tooLong:t.tooLong,tooShort:t.tooShort,rangeUnderflow:t.rangeUnderflow,rangeOverflow:t.rangeOverflow,stepMismatch:t.stepMismatch,badInput:t.badInput,customError:t.customError}}}catch{return{valid:true,validationMessage:"",flags:{}}}}async setCustomValidity(t){this.customValidityMessage=t;this.updateValidity()}formStateRestoreCallback(t){if(typeof t==="string"){this.value=t}}emitValidityChange(){const t=l(this.internals);const e=`${t.valid}|${t.validationMessage}`;if(this.lastValidityKey===e)return;const i=this.lastValidityKey!==null;this.lastValidityKey=e;if(i)this.mdValidityChange.emit(t)}async checkValidity(){try{return this.internals.checkValidity()}catch{return this.inputEl?.checkValidity()??true}}async reportValidity(){try{return this.internals.reportValidity()}catch{return this.inputEl?.reportValidity()??true}}componentDidLoad(){const t=this.el.shadowRoot;const e=t?.querySelector('slot[name="leading-icon"]');e?.addEventListener("slotchange",(()=>{this.hasSlottedLeading=e.assignedNodes().length>0}));const i=t?.querySelector('slot[name="trailing-icon"]');i?.addEventListener("slotchange",(()=>{this.syncTrailingSlotState(i)}));const s=t?.querySelector('slot[name="chips"]');s?.addEventListener("slotchange",(()=>{this.hasSlottedChips=s.assignedNodes().length>0}));this.hasSlottedLeading=(e?.assignedNodes().length??0)>0;this.hasSlottedChips=(s?.assignedNodes().length??0)>0;this.syncTrailingSlotState(i);if(this.multiline==="auto-grow"){this.autoGrow()}this.syncDisplayValue();this.updateValidity()}onValueChange(){if(this.value==null){this.value="";return}if(!this.internalWrite&&!this.multiline&&/[\r\n]/.test(this.value)){this.value=this.value.replace(/[\r\n]+/g,"");return}if(this.multiline==="auto-grow"){this.autoGrow()}this.updateFormValue();if(!this.focused){this.syncDisplayValue();return}if(!this.internalWrite){this.composing=false;this.syncDisplayValue();const t=this.inputEl;if(t){t.value=this.effectiveFormatOn==="blur"&&this.formatter?this.value:this.displayValue;const e=t.value.length;try{t.setSelectionRange(e,e)}catch{}}this.updateValidity()}}onTypeChange(){this.pendingTypeResync=true}componentDidRender(){if(this.pendingTypeResync){this.pendingTypeResync=false;const t=this.inputEl;if(t){const e=this.focused&&this.formatter&&this.effectiveFormatOn==="blur"?this.value:this.displayValue;if(t.value!==e){t.value=e}}}this.updateValidity()}bridgeFormatterProps(){["formatter","parser"].forEach((t=>{Object.defineProperty(this.el,t,{configurable:true,get:()=>this[t],set:e=>{this[t]=e;if(!this.focused){this.syncDisplayValue()}this.formatterEpoch++}})}))}syncDisplayValue(){if(this.formatter){try{const t=this.formatter(this.value);this.displayValue=typeof t==="string"?t:this.value}catch(t){this.displayValue=this.value}}else{this.displayValue=this.value}}emitSearchDistinct(t){if(t===this.lastEmittedSearch)return;this.lastEmittedSearch=t;this.mdSearch.emit(t)}emitSearch(t){if(this.debounce>0){clearTimeout(this.debounceTimer);this.debounceTimer=setTimeout((()=>this.emitSearchDistinct(t)),this.debounce)}if(this.throttle>0){if(!this.throttleTimer){this.emitSearchDistinct(t);this.throttlePending=false;this.throttleTimer=setTimeout((()=>{this.throttleTimer=undefined;if(this.throttlePending){this.emitSearchDistinct(this.value);this.throttlePending=false}}),this.throttle)}else{this.throttlePending=true}}if(this.debounce<=0&&this.throttle<=0){this.emitSearchDistinct(t)}}autoGrow(){const t=this.inputEl;if(!t)return;t.value=this.value;t.style.height="auto";t.style.height=`${t.scrollHeight}px`}clearValue(){this.internalWrite=true;this.value="";this.internalWrite=false;if(this.inputEl){this.inputEl.value=""}this.displayValue="";this.updateValidity();this.mdInput.emit(this.value);this.mdChange.emit(this.value);this.emitSearch("")}disconnectedCallback(){this.recognition?.abort();this.recognition=undefined;clearTimeout(this.debounceTimer);clearTimeout(this.throttleTimer);this.debounceTimer=undefined;this.throttleTimer=undefined;this.throttlePending=false}renderInputElement(){const t=this.passwordToggle==="internal"&&this.passwordVisible?"text":this.type;const e=this.focused&&this.formatter&&this.effectiveFormatOn==="blur";const i=e?this.value:this.displayValue;const d=this.error&&this.errorText?this.errorText:this.supportingText;const o=[d?`${this.uid}-support`:"",this.maxLength!=null&&!isNaN(this.maxLength)?`${this.uid}-counter`:""].filter(Boolean).join(" ");const l=this.el.getAttribute("aria-haspopup");const r=l==="dialog"||l==="listbox"?l:null;const n=this.inputRole==="combobox"?"combobox":undefined;const a={placeholder:this.isFloating?this.placeholder:"",disabled:this.isDisabled,readOnly:this.readOnly,required:this.required,maxLength:this.formatter&&this.effectiveFormatOn==="input"||this.restrict?undefined:this.maxLength,pattern:this.pattern||undefined,minLength:this.minLength,min:this.min,max:this.max,step:this.step,autocomplete:this.autocomplete||undefined,inputMode:this.inputMode||undefined,enterKeyHint:this.enterKeyHint||undefined,autoCapitalize:this.autoCapitalize||undefined,spellcheck:this.spellcheck,value:i,"aria-label":this.label||this.hostAriaLabel||undefined,"aria-haspopup":r||undefined,role:n,"aria-expanded":n?String(this.inputExpanded):undefined,"aria-autocomplete":n&&this.inputAriaAutocomplete?this.inputAriaAutocomplete:undefined,"aria-describedby":o||undefined,"aria-invalid":this.error?"true":undefined,"aria-required":this.required?"true":undefined,id:`${this.uid}-input`,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onAnimationStart:this.handleAutofillStart};if(this.multiline){return s("textarea",{ref:t=>{this.inputEl=t},...a,rows:this.effectiveRows,part:"input",class:{"md-text-field__input":true,"md-text-field__input--textarea":true,"md-text-field__input--auto-grow":this.multiline==="auto-grow","md-text-field__input--fixed":this.multiline==="fixed"}},i)}return s("input",{ref:t=>{this.inputEl=t},class:"md-text-field__input",part:"input",type:t,...a})}render(){const t=this.error&&this.errorText?this.errorText:this.supportingText;const e=!!this.clearable;const i=!this.multiline&&!!this.passwordToggle;const o=!!this.speechToText;const l=this.hasSlottedLeading;const r=this.hasSlottedTrailing||e||i||o||this.error;const n=!!this.formatter&&this.effectiveFormatOn==="input";const a=n?this.value.replace(/[-/\s]/g,"").length:this.value.length;const c=this.maxLength!=null&&!isNaN(this.maxLength)?`${a}/${this.maxLength}`:"";const f=this.isDisabled||this.readOnly||!this.value;const h=this.passwordToggle==="internal"?this.passwordVisible:this.type!=="password";const m=h?"visibility_off":"visibility";return s(d,{key:"4508bf039397006cfe5cbf6b6d4b4486161cf528",class:{"md-text-field":true,[`md-text-field--${this.variant}`]:true,"md-text-field--focused":this.focused||this.appearFocused,"md-text-field--error":this.error,"md-text-field--disabled":this.isDisabled,"md-text-field--with-leading":l,"md-text-field--with-trailing":r,"md-text-field--with-chips":this.hasSlottedChips,"md-text-field--floating":this.isFloating,[`md-text-field--density${this.density}`]:this.density!==0,"md-text-field--multiline":!!this.multiline,"md-text-field--auto-grow":this.multiline==="auto-grow","md-text-field--textarea":this.multiline==="fixed","md-text-field--listening":this.listening},style:Number(this.focusBorderWidth)!==3?{"--md-text-field-focus-border-width":`${Number(this.focusBorderWidth)}px`,"--md-text-field-focus-inset":`${-(Number(this.focusBorderWidth)-1)}px`}:undefined},s("div",{key:"d9d373cfa27b4ba168f47f4b05d6433524227e1f",class:"md-text-field__container",part:"container",onClick:this.handleContainerClick},s("div",{key:"9312fd06590051f02f66cca2d488d537a4b7b083",class:"md-text-field__state-layer","aria-hidden":"true"}),s("span",{key:"73efa44c0053b753a101e1f64c64e2d2c39564fd",class:"md-text-field__icon md-text-field__icon--leading","aria-hidden":"true",style:{display:l?undefined:"none"}},s("slot",{key:"bf4a47cc04bca6daa5d11aaad263d87f20377378",name:"leading-icon"})),s("div",{key:"06c44f320928d78994d992c2e32794ca4132ffed",class:"md-text-field__input-wrap"},this.label&&s("label",{key:"a0d7d3b96ac067b17959770389461591baef936a",class:"md-text-field__label",part:"label",htmlFor:`${this.uid}-input`},this.label),s("div",{key:"ea7bcb96445bcaf3df21602c391068e47649d997",class:"md-text-field__input-row"},s("span",{key:"44c6f618e62608f265c6d87b59534f572ed00b75",class:"md-text-field__chips",part:"chips",style:{display:this.hasSlottedChips?undefined:"none"}},s("slot",{key:"e977d02a77960b0fee7125cdd784caf9f66e41e0",name:"chips"})),this.prefixText&&this.isFloating&&s("span",{key:"df25770815ba1f3307c61d860745257bfecb8209",class:"md-text-field__prefix"},this.prefixText),this.renderInputElement(),this.suffixText&&this.isFloating&&s("span",{key:"4effa7c4af78f7af50229c8ef132a981fcdb2722",class:"md-text-field__suffix"},this.suffixText))),e&&s("button",{key:"46bfde02d14bd0c828171fc5f8c30c10f15d84ed",type:"button",class:{"md-text-field__clear":true,"md-text-field__clear--disabled":f,"md-text-field__clear--empty":!this.value},disabled:f,onClick:this.handleClear,"aria-label":"Clear"},s("slot",{key:"ce2c25c56aefc9e6b2eca382f1359e305c33b8e8",name:"clear-icon"},s("span",{key:"58d4069b1f6581d87ad8d18e64604608bdcee805",class:"material-symbols-outlined","aria-hidden":"true"},"cancel"))),i&&s("button",{key:"ebd029da05a0eaa3132c7bae860bbba548c6b243",type:"button",class:{"md-text-field__password-toggle":true,"md-text-field__password-toggle--disabled":this.isDisabled},disabled:this.isDisabled,onClick:this.handlePasswordToggle,"aria-label":h?"Hide password":"Show password","aria-pressed":h?"true":"false"},s("slot",{key:"a32e0b4ab841edd5299d5e09ce69d5fd700d6e34",name:"password-toggle-icon"},s("span",{key:"616afe93a98c1a609b1e01feaf3bc8043145f36c",class:"material-symbols-outlined","aria-hidden":"true"},m))),o&&s("button",{key:"e53cbc05ae3fb648500470932bc96865fd206b2f",type:"button",class:{"md-text-field__speech":true,"md-text-field__speech--listening":this.listening,"md-text-field__speech--disabled":this.isDisabled},disabled:this.isDisabled||this.readOnly,onClick:this.handleSpeechToggle,"aria-label":this.listening?"Stop listening":"Start voice input","aria-pressed":this.listening?"true":"false"},s("slot",{key:"9a5f7868e44b1c8e9f9047e536c1c63505226886",name:"speech-icon"},s("span",{key:"a71be510232fddeb96cb6bb8f673231da9670dc9",class:"material-symbols-outlined","aria-hidden":"true"},this.listening?"hearing":"mic"))),this.error&&s("span",{key:"d729440b9e9e3ce6d8e6486036c97d7f3b443f0b",class:"md-text-field__error-icon","aria-hidden":"true"},s("slot",{key:"90e770cf0fc390961ecb181dc48f92370c7823fd",name:"error-icon"},s("span",{key:"e149f154a1f3d0194aff25d742ebc2c44b6d0547",class:"material-symbols-outlined",style:{fontVariationSettings:"'FILL' 1"}},"error"))),s("span",{key:"53a7d1b64a6385257de98f1f2a40806b76a0d35a",class:{"md-text-field__icon":!this.hasTrailingIconButton,"md-text-field__icon--trailing":!this.hasTrailingIconButton,"md-text-field__trailing-icon-button":this.hasTrailingIconButton},"aria-hidden":this.hasTrailingIconButton?null:"true",style:{display:this.hasSlottedTrailing?undefined:"none"}},s("slot",{key:"9a66c71717eae11fead8bed3e8ccc6217d1dd32e",name:"trailing-icon"})),this.variant==="filled"&&s("div",{key:"44c58eacdabd17b343bd2d9779f9146983412df6",class:"md-text-field__indicator"}),this.variant==="outlined"&&s("fieldset",{key:"0030dec6fd5327ee80d106167eb8746f6857a1b8",class:"md-text-field__fieldset"},s("legend",{key:"f970588bb684f4a6d8c35f6e156c02fb5029a462",class:{"md-text-field__legend":true,"md-text-field__legend--active":this.isFloating&&!!this.label}},s("span",{key:"e1ca66b55e706fe2368e8da9b7087c0bd2144de9"},this.label)))),(t||c||this.reserveSupportingSpace)&&s("div",{key:"2d8c198e0a0ff72cfef291edef33078cbec15338",class:"md-text-field__support-row"},s("span",{key:"e63c054d0e1443b0a968606742dea66f9b26b3fc",id:`${this.uid}-support`,part:"supporting-text",role:this.error?"alert":undefined,class:{"md-text-field__support-text":true,"md-text-field__support-text--error":this.error}},t||(this.reserveSupportingSpace?"":"")),c&&s("span",{key:"cbad922f5b336990a6e126e82e23d9fea9a171e4",id:`${this.uid}-counter`,part:"counter",class:"md-text-field__counter"},c)))}static get delegatesFocus(){return true}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{onValueChange:0}],type:[{onTypeChange:0}]}}static get style(){return r()}},[337,"md-text-field",{reserveSupportingSpace:[4,"reserve-supporting-space"],variant:[1],label:[1],value:[1025],placeholder:[1],type:[1],name:[513],pattern:[1],minLength:[1026,"min-length"],min:[8],max:[8],step:[8],autocomplete:[1],inputMode:[1,"inputmode"],enterKeyHint:[1,"enterkeyhint"],autoCapitalize:[1,"autocapitalize"],spellcheck:[4],disabled:[516],readOnly:[4,"readonly"],required:[4],error:[4],errorText:[1,"error-text"],supportingText:[1,"supporting-text"],prefixText:[1,"prefix-text"],suffixText:[1,"suffix-text"],maxLength:[1026,"max-length"],clearable:[1032],passwordToggle:[1032,"password-toggle"],density:[514],multiline:[8],rows:[2],speechToText:[1032,"speech-to-text"],speechLang:[1,"speech-lang"],restrict:[1],formatter:[1040],parser:[1040],formatOn:[1,"format-on"],focusBorderWidth:[514,"focus-border-width"],appearFocused:[516,"appear-focused"],chipsWrap:[516,"chips-wrap"],debounce:[514],throttle:[514],inputRole:[1,"input-role"],inputExpanded:[4,"input-expanded"],inputAriaAutocomplete:[1,"input-aria-autocomplete"],focused:[32],formDisabled:[32],autofilled:[32],hostAriaLabel:[32],passwordVisible:[32],hasSlottedLeading:[32],hasSlottedChips:[32],hasSlottedTrailing:[32],hasTrailingIconButton:[32],listening:[32],displayValue:[32],formatterEpoch:[32],setFocus:[64],select:[64],getInputElement:[64],getValidity:[64],setCustomValidity:[64],checkValidity:[64],reportValidity:[64]},undefined,{value:[{onValueChange:0}],type:[{onTypeChange:0}]}]);function c(){if(typeof customElements==="undefined"){return}const t=["md-text-field"];t.forEach((t=>{switch(t){case"md-text-field":if(!customElements.get(o(t))){customElements.define(o(t),a)}break}}))}c();export{a as M,c as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as t,H as e,c as i,h as s,d,t as o}from"./p-bSpXNc5J.js";import{g as l}from"./p-DWxN44zD.js";const r=()=>`:host{--_container-color:var(--md-text-field-container-color, var(--md-sys-color-surface-container-highest, #E6E0E9));--_input-color:var(--md-text-field-input-color, var(--md-sys-color-on-surface, #1C1B1F));--_label-color:var(--md-text-field-label-color, var(--md-sys-color-on-surface-variant, #49454F));--_active-indicator-color:var(--md-text-field-active-indicator-color, var(--md-sys-color-primary, #6750A4));--_outline-color:var(--md-text-field-outline-color, var(--md-sys-color-outline, #79747E));--_error-color:var(--md-text-field-error-color, var(--md-sys-color-error, #B3261E));--_supporting-text-color:var(--md-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454F));--_icon-color:var(--md-text-field-icon-color, var(--md-sys-color-on-surface-variant, #49454F));--_text-inset:calc(var(--md-sys-spacing-inset-lg, 16px) + 7px);--_icon-size:var(--md-text-field-icon-size, max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px)));--_container-shape:var(--md-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px));--_filled-pill:var(--md-text-field-filled-pill, 0);--_filled-block-end-radius:calc(var(--_filled-pill) * var(--_container-shape));display:flex;flex-direction:column;position:relative;font-family:var(--md-sys-typescale-body-large-font-family, Roboto, sans-serif);width:100%;box-sizing:border-box}.md-text-field__container{position:relative;display:flex;align-items:stretch;min-height:calc(56px + var(--md-sys-density-scale, 0) * 4px);cursor:var(--md-text-field-cursor, text);box-sizing:border-box}:host(.md-text-field--filled) .md-text-field__container{background-color:var(--_container-color);border-start-start-radius:var(--_container-shape);border-start-end-radius:var(--_container-shape);border-end-start-radius:var(--_filled-block-end-radius);border-end-end-radius:var(--_filled-block-end-radius);padding-block:max(2px, calc(8px + var(--md-sys-density-scale, 0) * 0.5px));padding-inline-start:var(--md-text-field-padding-inline-start, var(--_text-inset));padding-inline-end:var(--md-text-field-padding-inline-end, var(--_text-inset));transition:background-color var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1))}:host(.md-text-field--filled.md-text-field--focused) .md-text-field__container{background-color:var(--md-text-field-container-color, var(--md-sys-color-surface-container-high, #ECE6F0))}:host(.md-text-field--outlined) .md-text-field__container{background-color:transparent;border-radius:var(--_container-shape);padding-block:max(2px, calc(8px + var(--md-sys-density-scale, 0) * 1px));padding-inline-start:var(--md-text-field-padding-inline-start, var(--_text-inset));padding-inline-end:var(--md-text-field-padding-inline-end, var(--_text-inset))}:host(.md-text-field--outlined) .md-text-field__input{position:relative;inset-block-start:var(--md-text-field-optical-nudge, 0px)}:host([density='-1']){--md-sys-density-scale:-1}:host([density='-2']){--md-sys-density-scale:-2}:host([density='-3']){--md-sys-density-scale:-3}:host([density='-4']){--md-sys-density-scale:-4}.md-text-field__state-layer{position:absolute;inset:0;border-radius:inherit;background-color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0;transition:opacity var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));pointer-events:none}:host(.md-text-field--filled:hover:not(.md-text-field--disabled)) .md-text-field__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(.md-text-field--outlined) .md-text-field__state-layer{display:none}.md-text-field__input-wrap{flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0;position:relative;padding:0}:host(.md-text-field--filled) .md-text-field__input-wrap{justify-content:flex-end}.md-text-field__input-row{display:flex;align-items:center}.md-text-field__chips{display:inline-flex;flex-wrap:nowrap;align-items:center;gap:4px;min-inline-size:0;overflow:hidden}:host(.md-text-field--with-chips:not([chips-wrap])) .md-text-field__chips{flex:1 1 auto}:host(.md-text-field--with-chips) .md-text-field__input-row{flex-wrap:nowrap;gap:4px;min-inline-size:0}:host(.md-text-field--with-chips:not([chips-wrap])) .md-text-field__input{flex:0 1 0;min-inline-size:0}:host(.md-text-field--with-chips) .md-text-field__input{flex:1 0 40px;min-inline-size:40px}:host(.md-text-field--with-chips[chips-wrap]) .md-text-field__input-row{flex-wrap:wrap;row-gap:6px}:host([chips-wrap]) .md-text-field__chips{flex-wrap:wrap;overflow:visible}.md-text-field__input{flex:1;border:none;outline:none;background:transparent;font-family:inherit;font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));font-weight:var(--md-sys-typescale-body-large-weight, 400);letter-spacing:var(--md-sys-typescale-body-large-tracking, 0.5px);color:var(--_input-color);caret-color:var(--_active-indicator-color);cursor:var(--md-text-field-cursor, text);padding:0;margin:0;min-width:0;width:100%}.md-text-field__input::placeholder{color:var(--_label-color)}:host(.md-text-field--error) .md-text-field__input{caret-color:var(--_error-color)}.md-text-field__input--textarea{resize:none;overflow-wrap:break-word}.md-text-field__input--auto-grow{overflow:hidden}.md-text-field__input--fixed{overflow-y:auto}:host(.md-text-field--multiline) .md-text-field__container{align-items:flex-start;min-height:auto}:host(.md-text-field--multiline) .md-text-field__input-wrap{justify-content:flex-start}:host(.md-text-field--multiline.md-text-field--filled) .md-text-field__input-wrap{justify-content:flex-start;padding-block-start:20px}:host(.md-text-field--multiline) .md-text-field__input-row{align-items:flex-start}:host(.md-text-field--filled.md-text-field--floating.md-text-field--with-chips) .md-text-field__input-wrap{padding-block-start:max(12px, calc(16px + var(--md-sys-density-scale, 0) * 1px))}:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__icon,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__trailing-icon-button,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__clear,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__password-toggle,:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__speech{align-self:flex-start;margin-block-start:16px}:host(.md-text-field--auto-grow) .md-text-field__icon,:host(.md-text-field--auto-grow) .md-text-field__trailing-icon-button,:host(.md-text-field--auto-grow) .md-text-field__clear,:host(.md-text-field--auto-grow) .md-text-field__password-toggle,:host(.md-text-field--auto-grow) .md-text-field__speech{align-self:center}.md-text-field__label{position:absolute;inset-inline-start:0;font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));color:var(--_label-color);pointer-events:none;transition:top var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), inset-inline-start var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), font-size var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), line-height var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), transform var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), background-color var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), padding var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), color var(--md-sys-motion-duration-short2, 100ms) ease;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}:host(.md-text-field--filled) .md-text-field__label{top:50%;transform:translateY(-50%)}:host(.md-text-field--multiline:not(.md-text-field--floating)) .md-text-field__label{top:28px}:host(.md-text-field--multiline.md-text-field--outlined:not(.md-text-field--floating)) .md-text-field__label{top:12px;}:host(.md-text-field--multiline.md-text-field--filled:not(.md-text-field--floating)) .md-text-field__label{top:32px;}:host(.md-text-field--filled.md-text-field--floating) .md-text-field__label{top:0;transform:translateY(0);font-size:max(11px, calc(var(--md-sys-typescale-body-small-size, 12px) + var(--md-sys-density-scale, 0) * 0.25px));line-height:max(12px, calc(var(--md-sys-typescale-body-small-line-height, 16px) + var(--md-sys-density-scale, 0) * 1px))}:host(.md-text-field--outlined) .md-text-field__label{top:50%;transform:translateY(-50%);background-color:transparent;padding:0}:host(.md-text-field--outlined.md-text-field--floating) .md-text-field__label{top:calc(-8px - var(--md-sys-density-scale, 0) * 1px);inset-inline-start:0;transform:translateY(-50%);font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(12px, calc(16px + var(--md-sys-density-scale, 0) * 1px));background-color:transparent;padding:0}:host([density='-1'].md-text-field--filled.md-text-field--floating) .md-text-field__label,:host([density='-2'].md-text-field--filled.md-text-field--floating) .md-text-field__label,:host([density='-3'].md-text-field--filled.md-text-field--floating) .md-text-field__label,:host([density='-4'].md-text-field--filled.md-text-field--floating) .md-text-field__label{font-size:11px;line-height:12px;top:1px}:host([density='-2'].md-text-field--filled.md-text-field--floating) .md-text-field__label{top:-2px;}:host([density='-3'].md-text-field--outlined.md-text-field--floating) .md-text-field__label,:host([density='-4'].md-text-field--outlined.md-text-field--floating) .md-text-field__label{top:-4px}:host(.md-text-field--filled) .md-text-field__input{line-height:max(16px, calc(24px + var(--md-sys-density-scale, 0) * 2px))}:host(.md-text-field--outlined.md-text-field--floating.md-text-field--with-leading) .md-text-field__label{inset-inline-start:calc(-1 * (var(--_icon-size) + var(--md-sys-spacing-gap-lg, 16px)))}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__label{color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__label{color:var(--md-sys-color-on-error-container, #8C1D18)}:host(.md-text-field--focused) .md-text-field__label{color:var(--_active-indicator-color)}:host(.md-text-field--error) .md-text-field__label{color:var(--_error-color)}.md-text-field__prefix,.md-text-field__suffix{font-size:max(13px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(18px, calc(24px + var(--md-sys-density-scale, 0) * 1px));color:var(--_supporting-text-color);white-space:nowrap;user-select:none;transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__prefix{margin-inline-end:2px}.md-text-field__suffix{margin-inline-start:2px}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled)) .md-text-field__prefix,:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled)) .md-text-field__suffix{color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__icon{display:flex;align-items:center;justify-content:center;font-size:var(--_icon-size);color:var(--_icon-color);flex-shrink:0;align-self:center;user-select:none;transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__icon ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__icon--leading{margin-inline-end:var(--md-sys-spacing-gap-lg, 16px)}.md-text-field__icon--trailing{margin-inline-start:0}.md-text-field__trailing-icon-button{display:flex;align-items:center;flex-shrink:0;align-self:center;margin-inline-start:0}.md-text-field__error-icon+.md-text-field__trailing-icon-button{margin-inline-start:4px}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled)) .md-text-field__icon--leading{color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__icon--trailing{color:var(--md-sys-color-on-surface, #1C1B1F)}:host(.md-text-field--error) .md-text-field__icon--trailing{color:var(--_error-color)}:host(.md-text-field--error) .md-text-field__icon--trailing ::slotted(*){color:inherit}.md-text-field__clear{display:flex;align-items:center;justify-content:center;align-self:center;border:none;background:none;padding:0;margin:0;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);cursor:pointer;border-radius:50%;width:var(--_icon-size);height:var(--_icon-size);flex-shrink:0;color:var(--_icon-color);transition:color var(--md-sys-motion-duration-short2, 100ms) ease, opacity var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__clear ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__clear:hover:not(:disabled){color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__clear:focus-visible,.md-text-field__password-toggle:focus-visible,.md-text-field__speech:focus-visible{outline:2px solid var(--md-sys-color-secondary, #625B71);outline-offset:-6px}.md-text-field__clear--disabled{color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0.38;cursor:default;pointer-events:none}:host(.md-text-field--error) .md-text-field__clear:not(:disabled){color:var(--_error-color)}.md-text-field__password-toggle{display:flex;align-items:center;justify-content:center;align-self:center;border:none;background:none;padding:0;margin:0;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);cursor:pointer;border-radius:50%;width:var(--_icon-size);height:var(--_icon-size);flex-shrink:0;color:var(--_icon-color);transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__password-toggle ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__password-toggle:hover:not(:disabled){color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__password-toggle--disabled{color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0.38;cursor:default;pointer-events:none}:host(.md-text-field--error) .md-text-field__password-toggle:not(:disabled){color:var(--_error-color)}.md-text-field__speech{display:flex;align-items:center;justify-content:center;align-self:center;border:none;background:none;padding:0;margin:0;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);cursor:pointer;border-radius:50%;width:var(--_icon-size);height:var(--_icon-size);flex-shrink:0;color:var(--_icon-color);transition:color var(--md-sys-motion-duration-short2, 100ms) ease}.md-text-field__speech ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}.md-text-field__speech:hover:not(:disabled){color:var(--md-sys-color-on-surface, #1C1B1F)}.md-text-field__speech--listening{color:var(--_error-color);animation:md-speech-pulse 1.2s ease-in-out infinite}.md-text-field__speech--disabled{color:var(--md-sys-color-on-surface, #1C1B1F);opacity:0.38;cursor:default;pointer-events:none}:host(.md-text-field--error) .md-text-field__speech:not(:disabled):not(.md-text-field__speech--listening){color:var(--_error-color)}@keyframes md-speech-pulse{0%,100%{opacity:1}50%{opacity:0.4}}.md-text-field__error-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center;width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size);line-height:1;margin-inline-start:var(--md-sys-spacing-gap-lg, 16px);color:var(--_error-color)}.md-text-field__error-icon ::slotted(*){font-size:var(--_icon-size) !important;width:var(--_icon-size);height:var(--_icon-size);color:inherit}:host(.md-text-field--multiline:not(.md-text-field--auto-grow)) .md-text-field__error-icon{align-self:flex-start;margin-block-start:16px}:host(.md-text-field--auto-grow) .md-text-field__error-icon{align-self:center}.md-text-field__indicator{position:absolute;inset-block-end:0;inset-inline:0;height:1px;background-color:var(--md-sys-color-on-surface-variant, #49454F);opacity:calc(1 - var(--_filled-pill));transition:height var(--md-sys-motion-duration-short2, 100ms) ease, background-color var(--md-sys-motion-duration-short2, 100ms) ease, opacity var(--md-sys-motion-duration-short2, 100ms) ease}:host(.md-text-field--focused) .md-text-field__indicator{height:var(--md-text-field-focus-border-width, 3px);background-color:var(--_active-indicator-color);transition:height var(--md-sys-motion-duration-short2, 100ms) ease}:host(.md-text-field--error) .md-text-field__indicator{background-color:var(--_error-color)}:host(.md-text-field--error.md-text-field--focused) .md-text-field__indicator{height:var(--md-text-field-focus-border-width, 3px);background-color:var(--_error-color);transition:height var(--md-sys-motion-duration-short2, 100ms) ease;}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__indicator{height:1px;background-color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__indicator{height:1px;background-color:var(--md-sys-color-on-error-container, #8C1D18)}.md-text-field__fieldset{position:absolute;inset:0;margin:0;max-inline-size:100%;min-inline-size:0;overflow:hidden;padding-inline-start:calc( var(--md-text-field-padding-inline-start, var(--_text-inset)) - 1px - var(--_legend-inline-padding, 4px) );padding-inline-end:calc( var(--md-text-field-padding-inline-end, var(--_text-inset)) - 1px - var(--_legend-inline-padding, 4px) );padding-block:0;border:1px solid var(--_outline-color);border-radius:var(--_container-shape);pointer-events:none;transition:border-color var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1))}:host(.md-text-field--focused) .md-text-field__fieldset{border-color:var(--_active-indicator-color);border-width:var(--md-text-field-focus-border-width, 3px);inset:var(--md-text-field-focus-inset, -2px);transition:none}:host(.md-text-field--error) .md-text-field__fieldset{border-color:var(--_error-color)}:host(.md-text-field--error.md-text-field--focused) .md-text-field__fieldset{border-color:var(--_error-color);border-width:var(--md-text-field-focus-border-width, 3px);inset:var(--md-text-field-focus-inset, -2px);transition:none;}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__fieldset{border-color:var(--md-sys-color-on-surface, #1C1B1F)}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__fieldset{border-color:var(--md-sys-color-on-error-container, #8C1D18)}.md-text-field__legend{max-inline-size:calc(100% - 16px);overflow:hidden;height:0;padding:0;font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));max-width:0;transition:max-width var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), padding-inline var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));white-space:nowrap}.md-text-field__legend--active{max-width:100%;padding-inline:var(--_legend-inline-padding, 4px);transition:max-width var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), padding-inline var(--md-sys-motion-duration-medium1, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1))}.md-text-field__legend span{display:inline-block;padding:0;visibility:hidden}.md-text-field__support-row{display:flex;justify-content:space-between;padding:4px 16px 0;gap:16px}.md-text-field__support-text{font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(14px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));color:var(--_supporting-text-color)}.md-text-field__support-text--error{color:var(--_error-color)}.md-text-field__counter{font-size:max(10px, calc(12px + var(--md-sys-density-scale, 0) * 0.5px));line-height:max(14px, calc(16px + var(--md-sys-density-scale, 0) * 0.5px));color:var(--_supporting-text-color);flex-shrink:0}:host(.md-text-field--disabled) .md-text-field__container{cursor:default;pointer-events:none}:host(.md-text-field--disabled.md-text-field--filled) .md-text-field__container{background-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 4%, transparent)}:host(.md-text-field--disabled) .md-text-field__label{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__input{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__indicator{background-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__fieldset{border-color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 12%, transparent)}:host(.md-text-field--disabled) .md-text-field__icon{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__icon ::slotted(*){color:inherit}:host(.md-text-field--disabled) .md-text-field__support-text,:host(.md-text-field--disabled) .md-text-field__counter{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}:host(.md-text-field--disabled) .md-text-field__prefix,:host(.md-text-field--disabled) .md-text-field__suffix{color:color-mix(in srgb, var(--md-sys-color-on-surface, #1C1B1F) 38%, transparent)}.material-symbols-outlined{font-family:var(--md-sys-icon-font-family, 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;font-size:var(--_icon-size);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;overflow-wrap:normal;direction:ltr;font-feature-settings:'liga';-webkit-font-smoothing:antialiased}@keyframes md-tf-autofill-start{from{--md-tf-autofill:1}}@keyframes md-tf-autofill-cancel{from{--md-tf-autofill:0}}.md-text-field__input:-webkit-autofill{animation-name:md-tf-autofill-start;box-shadow:0 0 0 1000px var(--_container-color, #E6E1E6) inset;-webkit-text-fill-color:var(--md-text-field-input-color, var(--md-sys-color-on-surface, #1D1B20));caret-color:var(--md-text-field-input-color, var(--md-sys-color-on-surface, #1D1B20))}.md-text-field__input:not(:-webkit-autofill){animation-name:md-tf-autofill-cancel}@media (prefers-reduced-motion: reduce){.md-text-field__label,.md-text-field__indicator,.md-text-field__state-layer,.md-text-field__fieldset,.md-text-field__legend,.md-text-field__legend>span,.md-text-field__container{transition-duration:0.01ms !important}.md-text-field__speech--listening,.md-text-field__speech--listening *{animation:none !important}}@media (forced-colors: active){:host(.md-text-field--filled) .md-text-field__container,:host(.md-text-field--filled.md-text-field--focused) .md-text-field__container,:host(.md-text-field--filled.md-text-field--disabled) .md-text-field__container,:host(.md-text-field--outlined) .md-text-field__container,.md-text-field__container{border:1px solid ButtonText;forced-color-adjust:none;background:Field;color:FieldText}:host(.md-text-field--focused) .md-text-field__indicator{background-color:Highlight}.md-text-field__input{caret-color:FieldText}:host(.md-text-field--filled.md-text-field--disabled) .md-text-field__indicator{background-color:GrayText}:host(.md-text-field--outlined.md-text-field--disabled) .md-text-field__fieldset{border-color:GrayText}:host(.md-text-field--focused) .md-text-field__label,:host(.md-text-field--error) .md-text-field__label,:host(.md-text-field--disabled) .md-text-field__label{color:FieldText}:host(.md-text-field--disabled) .md-text-field__label,:host(.md-text-field--disabled) .md-text-field__input{color:GrayText}:host(.md-text-field--error) .md-text-field__indicator{background-color:LinkText}.md-text-field__input{background:Field;color:FieldText}:host(.md-text-field--focused) .md-text-field__container{outline:2px solid Highlight;outline-offset:1px}:host(.md-text-field--error) .md-text-field__container{border-color:LinkText}:host(.md-text-field--disabled) .md-text-field__container,:host(.md-text-field--disabled) .md-text-field__input{color:GrayText;border-color:GrayText}.md-text-field__support-text,.md-text-field__counter{color:CanvasText}.md-text-field__support-text--error{color:LinkText}.md-text-field__label,.md-text-field__prefix,.md-text-field__suffix,.md-text-field__icon,.md-text-field__clear,.md-text-field__password-toggle,.md-text-field__speech{color:FieldText;forced-color-adjust:none}.md-text-field__error-icon{color:LinkText}.md-text-field__indicator{background-color:FieldText}:host(.md-text-field--outlined) .md-text-field__container{border:none}:host(.md-text-field--outlined) .md-text-field__fieldset{border-color:ButtonText}:host(.md-text-field--outlined.md-text-field--error) .md-text-field__fieldset{border-color:LinkText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__label,:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__label,:host(:hover) .md-text-field__prefix,:host(:hover) .md-text-field__suffix,:host(:hover) .md-text-field__icon{color:FieldText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__label{color:LinkText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled):not(.md-text-field--error)) .md-text-field__indicator,:host(:hover:not(.md-text-field--focused)) .md-text-field__indicator{background-color:FieldText}:host(:hover:not(.md-text-field--focused):not(.md-text-field--disabled).md-text-field--error) .md-text-field__indicator{background-color:LinkText}:host(:hover) .md-text-field__clear,:host(:hover) .md-text-field__password-toggle,:host(:hover) .md-text-field__speech{color:FieldText;background:none}}:host(.md-text-field--outlined) .md-text-field__input:-webkit-autofill{box-shadow:0 0 0 1000px var(--md-sys-color-surface, #FEF7FF) inset}.md-text-field__clear,.md-text-field__password-toggle,.md-text-field__speech{min-inline-size:40px;min-block-size:40px;display:inline-flex;align-items:center;justify-content:center;margin-inline:-6px;margin-block:-8px}.md-text-field__clear--empty{visibility:hidden}`;const n={numeric:/[^0-9]/g,integer:/[^0-9-]/g,decimal:/[^0-9.\-]/g,alpha:/[^a-zA-Z]/g,alphanumeric:/[^a-zA-Z0-9]/g};const a=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdInput=i(this,"mdInput",7);this.mdChange=i(this,"mdChange",7);this.mdSearch=i(this,"mdSearch",7);this.mdClear=i(this,"mdClear",7);this.mdPasswordToggle=i(this,"mdPasswordToggle",7);this.mdSpeechResult=i(this,"mdSpeechResult",7);this.mdValidityChange=i(this,"mdValidityChange",5);this.internals=this.attachInternals();this.reserveSupportingSpace=false;this.variant="filled";this.label="";this.value="";this.placeholder="";this.type="text";this.name="";this.pattern="";this.autocomplete="";this.inputMode="";this.enterKeyHint="";this.autoCapitalize="";this.disabled=false;this.readOnly=false;this.required=false;this.error=false;this.errorText="";this.supportingText="";this.prefixText="";this.suffixText="";this.clearable=false;this.passwordToggle=false;this.density=0;this.multiline=false;this.speechToText=false;this.speechLang="";this.restrict="";this.formatOn="blur";this.focusBorderWidth=3;this.appearFocused=false;this.chipsWrap=false;this.debounce=0;this.throttle=0;this.focused=false;this.formDisabled=false;this.autofilled=false;this.hostAriaLabel="";this.passwordVisible=false;this.hasSlottedLeading=false;this.hasSlottedChips=false;this.hasSlottedTrailing=false;this.hasTrailingIconButton=false;this.listening=false;this.displayValue="";this.defaultValue="";this.internalWrite=false;this.composing=false;this.warnedLiveFormat=false;this.uid=`md-text-field-${Math.random().toString(36).slice(2,7)}`;this.throttlePending=false;this.customValidityMessage="";this.inputRole="";this.inputExpanded=false;this.inputAriaAutocomplete="";this.lastValidityKey=null;this.pendingTypeResync=false;this.formatterEpoch=0;this.handleInput=t=>{const e=t.target||this.inputEl;if(!e)return;if(this.composing)return;let i=e.value;let s=e.selectionStart??i.length;let d=this.applyRestrict(i);if(this.restrict&&this.maxLength!=null&&!isNaN(this.maxLength)&&d.length>this.maxLength){const t=Array.from(d);let e="";for(const i of t){if((e+i).length>this.maxLength)break;e+=i}d=e}if(d!==i){const t=this.applyRestrict(i.substring(0,s));i=d;e.value=i;s=Math.min(t.length,i.length);try{e.setSelectionRange(s,s)}catch{}}this.internalWrite=true;try{this.value=this.parser?this.parser(i):i}catch(t){this.value=i}if(this.formatter&&this.effectiveFormatOn==="input"&&this.maxLength!=null){const t=this.value.replace(/[-/\s]/g,"");if(t.length>this.maxLength){const e=Array.from(t);let i="";for(const t of e){if((i+t).length>this.maxLength)break;i+=t}this.value=i}}if(this.formatter&&this.effectiveFormatOn==="input"){try{const t=t=>this.parser?this.parser(t).length:(t.match(/[0-9a-zA-Z]/g)||[]).length;const d=t(i.substring(0,s));const o=this.formatter(this.value);this.displayValue=o;e.value=o;let l=d===0?0:o.length;for(let e=0;d>0&&e<o.length;e++){if(t(o.slice(0,e+1))===d){l=e+1;break}}try{e.setSelectionRange(l,l)}catch{}}catch(t){this.displayValue=this.value;e.value=this.value}}if(!(this.formatter&&this.effectiveFormatOn==="input")){this.displayValue=e.value}this.internalWrite=false;this.mdInput.emit(this.value);this.emitSearch(this.value);if(this.multiline==="auto-grow"){this.autoGrow()}};this.handleCompositionStart=()=>{this.composing=true};this.handleCompositionEnd=t=>{this.composing=false;this.handleInput(t)};this.handleKeyDown=t=>{if(t.key==="Enter"&&!this.multiline&&!this.composing){try{const t=this.internals?.form;const e=t?.querySelector('button[type="submit"], input[type="submit"], button:not([type])');t?.requestSubmit(e instanceof HTMLButtonElement||e instanceof HTMLInputElement?e:undefined)}catch{}}if(t.key==="Escape"&&!this.composing&&this.clearable==="internal"&&this.value&&!this.readOnly&&!this.isDisabled){t.stopPropagation();t.preventDefault();this.clearValue();this.mdClear.emit()}};this.handleAutofillStart=t=>{if(t.animationName==="md-tf-autofill-start")this.autofilled=true;if(t.animationName==="md-tf-autofill-cancel")this.autofilled=false};this.handleChange=()=>{this.mdChange.emit(this.value);this.el.dispatchEvent(new CustomEvent("change",{bubbles:true}))};this.handleFocus=()=>{this.focused=true;if(this.formatter&&this.effectiveFormatOn==="blur"&&this.inputEl){this.displayValue=this.value;this.inputEl.value=this.value}};this.handleBlur=()=>{this.focused=false;this.composing=false;this.syncDisplayValue();if(this.inputEl){this.inputEl.value=this.displayValue}};this.handleContainerClick=()=>{this.inputEl?.focus()};this.handleClear=t=>{t.stopPropagation();if(this.isDisabled||this.readOnly||!this.value)return;if(this.clearable==="internal"){this.clearValue()}this.mdClear.emit();this.inputEl?.focus()};this.handlePasswordToggle=t=>{t.stopPropagation();if(this.isDisabled)return;if(this.passwordToggle==="internal"){this.passwordVisible=!this.passwordVisible;this.mdPasswordToggle.emit({visible:this.passwordVisible})}else{this.mdPasswordToggle.emit({visible:this.type==="password"})}this.inputEl?.focus()};this.handleSpeechToggle=t=>{t.stopPropagation();if(this.isDisabled||this.readOnly)return;if(this.speechToText==="external"){this.listening=!this.listening;this.mdSpeechResult.emit({transcript:"",listening:this.listening});return}if(this.listening){this.recognition?.stop();return}const e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e){console.warn("md-text-field: SpeechRecognition API not supported in this browser.");return}const i=new e;i.continuous=false;i.interimResults=true;if(this.speechLang){i.lang=this.speechLang}let s="";const d=this.value;i.onresult=t=>{let e="";for(let i=t.resultIndex;i<t.results.length;i++){const d=t.results[i][0].transcript;if(t.results[i].isFinal){s+=d}else{e+=d}}const i=d&&!d.endsWith(" ")?" ":"";this.internalWrite=true;this.value=d+i+s+e;this.internalWrite=false;if(this.inputEl)this.inputEl.value=this.value;this.mdInput.emit(this.value);this.mdSpeechResult.emit({transcript:s+e,listening:true})};i.onend=()=>{this.listening=false;this.recognition=undefined;const t=d&&!d.endsWith(" ")?" ":"";this.internalWrite=true;this.value=d+t+s;this.internalWrite=false;if(this.inputEl)this.inputEl.value=this.value;this.mdInput.emit(this.value);this.mdChange.emit(this.value);this.mdSpeechResult.emit({transcript:s,listening:false})};i.onerror=t=>{if(t.error!=="aborted"){console.warn("md-text-field: Speech recognition error:",t.error)}this.listening=false;this.recognition=undefined};this.recognition=i;this.listening=true;i.start()}}get isDisabled(){return this.disabled||this.formDisabled}get effectiveFormatOn(){if(this.formatOn==="input"&&this.formatter&&!this.parser){return"blur"}return this.formatOn}static isInteractive(t){const e=t.tagName.toLowerCase();return["md-icon-button","md-button","button","a","input","select","textarea"].includes(e)||t.hasAttribute("tabindex")}get isFloating(){return this.focused||this.appearFocused||!!this.value||!!this.placeholder||this.autofilled||this.hasSlottedChips}get effectiveRows(){if(this.rows!=null)return this.rows;return this.multiline==="fixed"?4:2}get restrictPattern(){if(!this.restrict)return null;if(n[this.restrict])return n[this.restrict];try{const t=this.restrict.startsWith("[")&&this.restrict.endsWith("]")?this.restrict.slice(1,-1):this.restrict;return new RegExp(`[^${t}]`,"g")}catch{return null}}applyRestrict(t){const e=this.restrictPattern;return e?t.replace(e,""):t}syncTrailingSlotState(e){if(!e)return;this.hasSlottedTrailing=e.assignedNodes().length>0;this.hasTrailingIconButton=e.assignedElements().some((e=>t.isInteractive(e)))}syncHostSlottedIcons(){const e=this.el.querySelector('[slot="leading-icon"]');const i=this.el.querySelector('[slot="trailing-icon"]');this.hasSlottedLeading=!!e;this.hasSlottedTrailing=!!i;this.hasTrailingIconButton=!!i&&t.isInteractive(i)}componentWillLoad(){this.bridgeFormatterProps();if(this.el.hasAttribute("clearable")&&!this.clearable)this.clearable="internal";if(this.el.hasAttribute("password-toggle")&&!this.passwordToggle)this.passwordToggle="internal";if(this.el.hasAttribute("speech-to-text")&&!this.speechToText)this.speechToText="internal";if(this.maxLength==null&&this.el.hasAttribute("maxlength")){this.maxLength=parseInt(this.el.getAttribute("maxlength"),10)}if(this.minLength==null&&this.el.hasAttribute("minlength")){this.minLength=parseInt(this.el.getAttribute("minlength"),10)}if(!this.label&&!this.hostAriaLabel){const t=this.el.getAttribute("aria-label");if(t){this.hostAriaLabel=t;this.el.removeAttribute("aria-label")}}if(!this.multiline&&/[\r\n]/.test(this.value)){this.value=this.value.replace(/[\r\n]+/g,"")}this.defaultValue=this.value;this.syncDisplayValue();this.syncHostSlottedIcons();this.updateFormValue()}updateFormValue(){try{this.internals?.setFormValue(this.value)}catch{}}updateValidity(){const t=this.inputEl;if(!t)return;try{if(this.customValidityMessage){this.internals?.setValidity({customError:true},this.customValidityMessage,t);return}if(this.focused&&t.value!==this.value)return;const e=t.value;let i=false;if(t.value!==this.value){t.value=this.value;i=true;if(t.value!==this.value){t.value=e;this.internals?.setValidity({badInput:true},"Invalid value",t);return}}const s=t.validity;const d={valueMissing:s.valueMissing,typeMismatch:s.typeMismatch,patternMismatch:s.patternMismatch,tooLong:s.tooLong,tooShort:s.tooShort,rangeUnderflow:s.rangeUnderflow,rangeOverflow:s.rangeOverflow,stepMismatch:s.stepMismatch,badInput:s.badInput};const o=s.valid;const l=t.validationMessage;if(i)t.value=e;if(o){this.internals?.setValidity({})}else{this.internals?.setValidity(d,l||"Invalid value",t)}}catch{}this.emitValidityChange()}formResetCallback(){this.internalWrite=false;this.value=this.defaultValue;this.syncDisplayValue();if(this.inputEl)this.inputEl.value=this.displayValue;this.updateFormValue()}formDisabledCallback(t){queueMicrotask((()=>{this.formDisabled=t}))}async setFocus(){this.inputEl?.focus()}async select(){this.inputEl?.select()}async getInputElement(){return this.inputEl??null}async getValidity(){try{const t=this.internals.validity;return{valid:t.valid,validationMessage:this.internals.validationMessage,flags:{valueMissing:t.valueMissing,typeMismatch:t.typeMismatch,patternMismatch:t.patternMismatch,tooLong:t.tooLong,tooShort:t.tooShort,rangeUnderflow:t.rangeUnderflow,rangeOverflow:t.rangeOverflow,stepMismatch:t.stepMismatch,badInput:t.badInput,customError:t.customError}}}catch{return{valid:true,validationMessage:"",flags:{}}}}async setCustomValidity(t){this.customValidityMessage=t;this.updateValidity()}formStateRestoreCallback(t){if(typeof t==="string"){this.value=t}}emitValidityChange(){const t=l(this.internals);const e=`${t.valid}|${t.validationMessage}`;if(this.lastValidityKey===e)return;const i=this.lastValidityKey!==null;this.lastValidityKey=e;if(i)this.mdValidityChange.emit(t)}async checkValidity(){try{return this.internals.checkValidity()}catch{return this.inputEl?.checkValidity()??true}}async reportValidity(){try{return this.internals.reportValidity()}catch{return this.inputEl?.reportValidity()??true}}componentDidLoad(){const t=this.el.shadowRoot;const e=t?.querySelector('slot[name="leading-icon"]');e?.addEventListener("slotchange",(()=>{this.hasSlottedLeading=e.assignedNodes().length>0}));const i=t?.querySelector('slot[name="trailing-icon"]');i?.addEventListener("slotchange",(()=>{this.syncTrailingSlotState(i)}));const s=t?.querySelector('slot[name="chips"]');s?.addEventListener("slotchange",(()=>{this.hasSlottedChips=s.assignedNodes().length>0}));this.hasSlottedLeading=(e?.assignedNodes().length??0)>0;this.hasSlottedChips=(s?.assignedNodes().length??0)>0;this.syncTrailingSlotState(i);if(this.multiline==="auto-grow"){this.autoGrow()}this.syncDisplayValue();this.updateValidity()}onValueChange(){if(this.value==null){this.value="";return}if(!this.internalWrite&&!this.multiline&&/[\r\n]/.test(this.value)){this.value=this.value.replace(/[\r\n]+/g,"");return}if(this.multiline==="auto-grow"){this.autoGrow()}this.updateFormValue();if(!this.focused){this.syncDisplayValue();return}if(!this.internalWrite){this.composing=false;this.syncDisplayValue();const t=this.inputEl;if(t){t.value=this.effectiveFormatOn==="blur"&&this.formatter?this.value:this.displayValue;const e=t.value.length;try{t.setSelectionRange(e,e)}catch{}}this.updateValidity()}}onTypeChange(){this.pendingTypeResync=true}componentDidRender(){if(this.pendingTypeResync){this.pendingTypeResync=false;const t=this.inputEl;if(t){const e=this.focused&&this.formatter&&this.effectiveFormatOn==="blur"?this.value:this.displayValue;if(t.value!==e){t.value=e}}}this.updateValidity()}bridgeFormatterProps(){["formatter","parser"].forEach((t=>{Object.defineProperty(this.el,t,{configurable:true,get:()=>this[t],set:e=>{this[t]=e;if(!this.focused){this.syncDisplayValue()}this.formatterEpoch++}})}))}syncDisplayValue(){if(this.formatter){try{const t=this.formatter(this.value);this.displayValue=typeof t==="string"?t:this.value}catch(t){this.displayValue=this.value}}else{this.displayValue=this.value}}emitSearchDistinct(t){if(t===this.lastEmittedSearch)return;this.lastEmittedSearch=t;this.mdSearch.emit(t)}emitSearch(t){if(this.debounce>0){clearTimeout(this.debounceTimer);this.debounceTimer=setTimeout((()=>this.emitSearchDistinct(t)),this.debounce)}if(this.throttle>0){if(!this.throttleTimer){this.emitSearchDistinct(t);this.throttlePending=false;this.throttleTimer=setTimeout((()=>{this.throttleTimer=undefined;if(this.throttlePending){this.emitSearchDistinct(this.value);this.throttlePending=false}}),this.throttle)}else{this.throttlePending=true}}if(this.debounce<=0&&this.throttle<=0){this.emitSearchDistinct(t)}}autoGrow(){const t=this.inputEl;if(!t)return;t.value=this.value;t.style.height="auto";t.style.height=`${t.scrollHeight}px`}clearValue(){this.internalWrite=true;this.value="";this.internalWrite=false;if(this.inputEl){this.inputEl.value=""}this.displayValue="";this.updateValidity();this.mdInput.emit(this.value);this.mdChange.emit(this.value);this.emitSearch("")}disconnectedCallback(){this.recognition?.abort();this.recognition=undefined;clearTimeout(this.debounceTimer);clearTimeout(this.throttleTimer);this.debounceTimer=undefined;this.throttleTimer=undefined;this.throttlePending=false}renderInputElement(){const t=this.passwordToggle==="internal"&&this.passwordVisible?"text":this.type;const e=this.focused&&this.formatter&&this.effectiveFormatOn==="blur";const i=e?this.value:this.displayValue;const d=this.error&&this.errorText?this.errorText:this.supportingText;const o=[d?`${this.uid}-support`:"",this.maxLength!=null&&!isNaN(this.maxLength)?`${this.uid}-counter`:""].filter(Boolean).join(" ");const l=this.el.getAttribute("aria-haspopup");const r=l==="dialog"||l==="listbox"?l:null;const n=this.inputRole==="combobox"?"combobox":undefined;const a={placeholder:this.isFloating?this.placeholder:"",disabled:this.isDisabled,readOnly:this.readOnly,required:this.required,maxLength:this.formatter&&this.effectiveFormatOn==="input"||this.restrict?undefined:this.maxLength,pattern:this.pattern||undefined,minLength:this.minLength,min:this.min,max:this.max,step:this.step,autocomplete:this.autocomplete||undefined,inputMode:this.inputMode||undefined,enterKeyHint:this.enterKeyHint||undefined,autoCapitalize:this.autoCapitalize||undefined,spellcheck:this.spellcheck,value:i,"aria-label":this.label||this.hostAriaLabel||undefined,"aria-haspopup":r||undefined,role:n,"aria-expanded":n?String(this.inputExpanded):undefined,"aria-autocomplete":n&&this.inputAriaAutocomplete?this.inputAriaAutocomplete:undefined,"aria-describedby":o||undefined,"aria-invalid":this.error?"true":undefined,"aria-required":this.required?"true":undefined,id:`${this.uid}-input`,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onAnimationStart:this.handleAutofillStart};if(this.multiline){return s("textarea",{ref:t=>{this.inputEl=t},...a,rows:this.effectiveRows,part:"input",class:{"md-text-field__input":true,"md-text-field__input--textarea":true,"md-text-field__input--auto-grow":this.multiline==="auto-grow","md-text-field__input--fixed":this.multiline==="fixed"}},i)}return s("input",{ref:t=>{this.inputEl=t},class:"md-text-field__input",part:"input",type:t,...a})}render(){const t=this.error&&this.errorText?this.errorText:this.supportingText;const e=!!this.clearable;const i=!this.multiline&&!!this.passwordToggle;const o=!!this.speechToText;const l=this.hasSlottedLeading;const r=this.hasSlottedTrailing||e||i||o||this.error;const n=!!this.formatter&&this.effectiveFormatOn==="input";const a=n?this.value.replace(/[-/\s]/g,"").length:this.value.length;const c=this.maxLength!=null&&!isNaN(this.maxLength)?`${a}/${this.maxLength}`:"";const f=this.isDisabled||this.readOnly||!this.value;const h=this.passwordToggle==="internal"?this.passwordVisible:this.type!=="password";const m=h?"visibility_off":"visibility";return s(d,{key:"6cbbe2bcaf6c34d30d8827e89aa323c1b5d9314e",class:{"md-text-field":true,[`md-text-field--${this.variant}`]:true,"md-text-field--focused":this.focused||this.appearFocused,"md-text-field--error":this.error,"md-text-field--disabled":this.isDisabled,"md-text-field--with-leading":l,"md-text-field--with-trailing":r,"md-text-field--with-chips":this.hasSlottedChips,"md-text-field--floating":this.isFloating,[`md-text-field--density${this.density}`]:this.density!==0,"md-text-field--multiline":!!this.multiline,"md-text-field--auto-grow":this.multiline==="auto-grow","md-text-field--textarea":this.multiline==="fixed","md-text-field--listening":this.listening},style:Number(this.focusBorderWidth)!==3?{"--md-text-field-focus-border-width":`${Number(this.focusBorderWidth)}px`,"--md-text-field-focus-inset":`${-(Number(this.focusBorderWidth)-1)}px`}:undefined},s("div",{key:"5bdb646e75bf62c1ed0379007b7b3b22db7d5886",class:"md-text-field__container",part:"container",onClick:this.handleContainerClick},s("div",{key:"f57cfb58fd26f34fd74adef8c75a38b9c6216e1f",class:"md-text-field__state-layer","aria-hidden":"true"}),s("span",{key:"90ebb55e16dfda11b999cc03b9f221d9c4d77f4c",class:"md-text-field__icon md-text-field__icon--leading","aria-hidden":"true",style:{display:l?undefined:"none"}},s("slot",{key:"b0ed2d7ffb99a500eb725f59de296a1918c628a8",name:"leading-icon"})),s("div",{key:"f041d801dde559a376fd7a620b916f0149efa9e1",class:"md-text-field__input-wrap"},this.label&&s("label",{key:"235d07b1a1c9259e4174cdf54edf902be369fc78",class:"md-text-field__label",part:"label",htmlFor:`${this.uid}-input`},this.label),s("div",{key:"92000c4f462faa01d25868b984bcff83b393f982",class:"md-text-field__input-row"},s("span",{key:"0d6c0371556531f8fad881426eda0388915e43c8",class:"md-text-field__chips",part:"chips",style:{display:this.hasSlottedChips?undefined:"none"}},s("slot",{key:"b49c5ad937b4ddabc9d91c7d269f96da2a9a39e8",name:"chips"})),this.prefixText&&this.isFloating&&s("span",{key:"3e81d28ec2408c5616f321960a4dba1ec4fc2646",class:"md-text-field__prefix"},this.prefixText),this.renderInputElement(),this.suffixText&&this.isFloating&&s("span",{key:"6571a4c1e01543de58d4fdf21d5a53f1e15cd7b5",class:"md-text-field__suffix"},this.suffixText))),e&&s("button",{key:"85761281d21c6134ccad222ea0992c4e2ba9870b",type:"button",class:{"md-text-field__clear":true,"md-text-field__clear--disabled":f,"md-text-field__clear--empty":!this.value},disabled:f,onClick:this.handleClear,"aria-label":"Clear"},s("slot",{key:"e02eb3263ba5642abb380903a2e2ecd06c09e263",name:"clear-icon"},s("span",{key:"00017f708b0cff2b2ab745d58e8b1d01135e2458",class:"material-symbols-outlined","aria-hidden":"true"},"cancel"))),i&&s("button",{key:"3a0a64d481cc0f0aa3d998258b50ae39c1f2647a",type:"button",class:{"md-text-field__password-toggle":true,"md-text-field__password-toggle--disabled":this.isDisabled},disabled:this.isDisabled,onClick:this.handlePasswordToggle,"aria-label":h?"Hide password":"Show password","aria-pressed":h?"true":"false"},s("slot",{key:"899e838a72dc7dd638b2e40184f8510f1346c870",name:"password-toggle-icon"},s("span",{key:"58075bfb8af4f9b364b0315ed0326a1b82de0cd4",class:"material-symbols-outlined","aria-hidden":"true"},m))),o&&s("button",{key:"8e83a60479e56939e54ffb9545f70339f135d3b8",type:"button",class:{"md-text-field__speech":true,"md-text-field__speech--listening":this.listening,"md-text-field__speech--disabled":this.isDisabled},disabled:this.isDisabled||this.readOnly,onClick:this.handleSpeechToggle,"aria-label":this.listening?"Stop listening":"Start voice input","aria-pressed":this.listening?"true":"false"},s("slot",{key:"70feffa1e5ed9eb6e20bcc6c6ffb5047e63ff641",name:"speech-icon"},s("span",{key:"1b22447f4cef33cb9411be12bc0629d8e805383d",class:"material-symbols-outlined","aria-hidden":"true"},this.listening?"hearing":"mic"))),this.error&&s("span",{key:"6eae9694d74cb4cad1885874aed38da94bef8cb4",class:"md-text-field__error-icon","aria-hidden":"true"},s("slot",{key:"5d9559047404f51870c33b6245595e0f81b65237",name:"error-icon"},s("span",{key:"6b1a1e213eeef03558ac817e9acc6cafd94cd1d3",class:"material-symbols-outlined",style:{fontVariationSettings:"'FILL' 1"}},"error"))),s("span",{key:"b7504d7f26f3561e50e0b260944e10b5831907fc",class:{"md-text-field__icon":!this.hasTrailingIconButton,"md-text-field__icon--trailing":!this.hasTrailingIconButton,"md-text-field__trailing-icon-button":this.hasTrailingIconButton},"aria-hidden":this.hasTrailingIconButton?null:"true",style:{display:this.hasSlottedTrailing?undefined:"none"}},s("slot",{key:"3e49ea37c07daec2cd87e9868b7d019d619bd670",name:"trailing-icon"})),this.variant==="filled"&&s("div",{key:"4945e217ef49ef9193f2fa6d24f836d318f5f026",class:"md-text-field__indicator"}),this.variant==="outlined"&&s("fieldset",{key:"3e5c4128a7f443cff23fad429b05def7ca1efbcf",class:"md-text-field__fieldset"},s("legend",{key:"55e0c1bd976f8e3816a470862febb8ccf3bdf099",class:{"md-text-field__legend":true,"md-text-field__legend--active":this.isFloating&&!!this.label}},s("span",{key:"7758d3c094f73d57fd7cb1fcbfd3b0caa54574ca"},this.label)))),(t||c||this.reserveSupportingSpace)&&s("div",{key:"8ed3ce21209aef15ab1ea826b048af01906209c5",class:"md-text-field__support-row"},s("span",{key:"340954eb48fc72808e342fb49acd98183dd2d138",id:`${this.uid}-support`,part:"supporting-text",role:this.error?"alert":undefined,class:{"md-text-field__support-text":true,"md-text-field__support-text--error":this.error}},t||(this.reserveSupportingSpace?"":"")),c&&s("span",{key:"b081ffcf8b1be7f341f69d6fbea01519c7aeb30d",id:`${this.uid}-counter`,part:"counter",class:"md-text-field__counter"},c)))}static get delegatesFocus(){return true}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{onValueChange:0}],type:[{onTypeChange:0}]}}static get style(){return r()}},[337,"md-text-field",{reserveSupportingSpace:[4,"reserve-supporting-space"],variant:[1],label:[1],value:[1025],placeholder:[1],type:[1],name:[513],pattern:[1],minLength:[1026,"min-length"],min:[8],max:[8],step:[8],autocomplete:[1],inputMode:[1,"inputmode"],enterKeyHint:[1,"enterkeyhint"],autoCapitalize:[1,"autocapitalize"],spellcheck:[4],disabled:[516],readOnly:[4,"readonly"],required:[4],error:[4],errorText:[1,"error-text"],supportingText:[1,"supporting-text"],prefixText:[1,"prefix-text"],suffixText:[1,"suffix-text"],maxLength:[1026,"max-length"],clearable:[1032],passwordToggle:[1032,"password-toggle"],density:[514],multiline:[8],rows:[2],speechToText:[1032,"speech-to-text"],speechLang:[1,"speech-lang"],restrict:[1],formatter:[1040],parser:[1040],formatOn:[1,"format-on"],focusBorderWidth:[514,"focus-border-width"],appearFocused:[516,"appear-focused"],chipsWrap:[516,"chips-wrap"],debounce:[514],throttle:[514],inputRole:[1,"input-role"],inputExpanded:[4,"input-expanded"],inputAriaAutocomplete:[1,"input-aria-autocomplete"],focused:[32],formDisabled:[32],autofilled:[32],hostAriaLabel:[32],passwordVisible:[32],hasSlottedLeading:[32],hasSlottedChips:[32],hasSlottedTrailing:[32],hasTrailingIconButton:[32],listening:[32],displayValue:[32],formatterEpoch:[32],setFocus:[64],select:[64],getInputElement:[64],getValidity:[64],setCustomValidity:[64],checkValidity:[64],reportValidity:[64]},undefined,{value:[{onValueChange:0}],type:[{onTypeChange:0}]}]);function c(){if(typeof customElements==="undefined"){return}const t=["md-text-field"];t.forEach((t=>{switch(t){case"md-text-field":if(!customElements.get(o(t))){customElements.define(o(t),a)}break}}))}c();export{a as M,c as d};
|
|
2
|
+
//# sourceMappingURL=p-CF7mq5T7.js.map
|