@awc-ui/core 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/templates/astro/package.json +2 -2
- package/bin/templates/html/index.html +3 -3
- package/bin/templates/html/package.json +2 -2
- package/bin/templates/next/package.json +3 -3
- package/bin/templates/nuxt/package.json +2 -2
- package/bin/templates/sveltekit/package.json +2 -2
- package/custom-elements.json +390 -0
- package/dist/cjs/{index-DLOFxFlM.js → index-DHpWaYWF.js} +23 -3
- package/dist/cjs/{index-DLOFxFlM.js.map → index-DHpWaYWF.js.map} +1 -1
- package/dist/cjs/{initial-motion-DVmpmKD8.js → initial-motion-COVdXmbQ.js} +3 -3
- package/dist/cjs/{initial-motion-DVmpmKD8.js.map → initial-motion-COVdXmbQ.js.map} +1 -1
- package/dist/cjs/{lazy-loading-indicator-Bgw5HXaX.js → lazy-loading-indicator-DqjeYBZo.js} +4 -4
- package/dist/cjs/{lazy-loading-indicator-Bgw5HXaX.js.map → lazy-loading-indicator-DqjeYBZo.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/md-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/md-accordion.cjs.entry.js +2 -2
- package/dist/cjs/md-app-bar.cjs.entry.js +2 -2
- package/dist/cjs/md-area-chart.cjs.entry.js +27 -15
- package/dist/cjs/md-area-chart.cjs.entry.js.map +1 -1
- package/dist/cjs/md-autocomplete.cjs.entry.js +3 -3
- package/dist/cjs/md-avatar_2.cjs.entry.js +2 -2
- package/dist/cjs/md-badge.cjs.entry.js +2 -2
- package/dist/cjs/md-bar-chart.cjs.entry.js +27 -15
- package/dist/cjs/md-bar-chart.cjs.entry.js.map +1 -1
- package/dist/cjs/md-bottom-sheet.cjs.entry.js +2 -2
- package/dist/cjs/md-breadcrumb-item.cjs.entry.js +2 -2
- 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_6.cjs.entry.js +4 -4
- package/dist/cjs/md-chart-series.cjs.entry.js +122 -0
- package/dist/cjs/md-chart-series.cjs.entry.js.map +1 -0
- package/dist/cjs/md-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/md-chip.cjs.entry.js +4 -4
- package/dist/cjs/md-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/md-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/md-dialog.cjs.entry.js +5 -5
- package/dist/cjs/md-divider.cjs.entry.js +4 -4
- package/dist/cjs/md-fab-menu-item.cjs.entry.js +4 -4
- package/dist/cjs/md-fab-menu.cjs.entry.js +5 -5
- package/dist/cjs/md-fab.cjs.entry.js +4 -4
- package/dist/cjs/md-line-chart.cjs.entry.js +31 -19
- package/dist/cjs/md-line-chart.cjs.entry.js.map +1 -1
- package/dist/cjs/md-list-item.cjs.entry.js +2 -2
- package/dist/cjs/md-list.cjs.entry.js +2 -2
- package/dist/cjs/{md-loading-indicator-BB9ghhFd.js → md-loading-indicator-Px_NR8tC.js} +4 -4
- package/dist/cjs/{md-loading-indicator-BB9ghhFd.js.map → md-loading-indicator-Px_NR8tC.js.map} +1 -1
- package/dist/cjs/md-loading-indicator.cjs.entry.js +3 -3
- package/dist/cjs/md-menu-item-group.cjs.entry.js +2 -2
- package/dist/cjs/md-menu_2.cjs.entry.js +3 -3
- package/dist/cjs/md-meter.cjs.entry.js +2 -2
- package/dist/cjs/md-multi-select.cjs.entry.js +3 -3
- package/dist/cjs/md-navigation-bar.cjs.entry.js +2 -2
- package/dist/cjs/md-navigation-rail-tab.cjs.entry.js +2 -2
- package/dist/cjs/md-navigation-rail.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/md-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/md-progress-indicator.cjs.entry.js +2 -2
- package/dist/cjs/md-rating.cjs.entry.js +2 -2
- package/dist/cjs/md-search.cjs.entry.js +4 -4
- package/dist/cjs/md-segmented-button-set.cjs.entry.js +2 -2
- package/dist/cjs/md-segmented-button.cjs.entry.js +2 -2
- package/dist/cjs/md-select-option.cjs.entry.js +2 -2
- package/dist/cjs/md-select.cjs.entry.js +3 -3
- package/dist/cjs/md-side-sheet.cjs.entry.js +3 -3
- package/dist/cjs/md-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/md-slider.cjs.entry.js +2 -2
- package/dist/cjs/md-sparkline.cjs.entry.js +2 -2
- package/dist/cjs/md-split-button.cjs.entry.js +2 -2
- package/dist/cjs/md-status-dot.cjs.entry.js +2 -2
- package/dist/cjs/md-step.cjs.entry.js +2 -2
- package/dist/cjs/md-stepper.cjs.entry.js +2 -2
- package/dist/cjs/md-sub-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/md-switch.cjs.entry.js +2 -2
- package/dist/cjs/md-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/md-tab-panels.cjs.entry.js +2 -2
- package/dist/cjs/md-tab.cjs.entry.js +2 -2
- package/dist/cjs/md-table-body.cjs.entry.js +2 -2
- package/dist/cjs/md-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/md-table-container.cjs.entry.js +2 -2
- package/dist/cjs/md-table-expand-toggle.cjs.entry.js +2 -2
- package/dist/cjs/md-table-foot.cjs.entry.js +2 -2
- package/dist/cjs/md-table-head.cjs.entry.js +2 -2
- package/dist/cjs/md-table-pagination.cjs.entry.js +2 -2
- package/dist/cjs/md-table-row.cjs.entry.js +2 -2
- package/dist/cjs/md-table-sort-label.cjs.entry.js +2 -2
- package/dist/cjs/md-table-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/md-table.cjs.entry.js +2 -2
- package/dist/cjs/md-tabs.cjs.entry.js +2 -2
- package/dist/cjs/md-text-field.cjs.entry.js +2 -2
- package/dist/cjs/md-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/md-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/md-transfer-list.cjs.entry.js +2 -2
- package/dist/cjs/md3.cjs.js +2 -2
- package/dist/cjs/{overlay-lifecycle-CUc_dfNl.js → overlay-lifecycle-Bhu5zauR.js} +3 -3
- package/dist/cjs/{overlay-lifecycle-CUc_dfNl.js.map → overlay-lifecycle-Bhu5zauR.js.map} +1 -1
- package/dist/cjs/series-elements-B4T7vF5A.js +90 -0
- package/dist/cjs/series-elements-B4T7vF5A.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/md-area-chart/md-area-chart.js +35 -22
- package/dist/collection/components/md-area-chart/md-area-chart.js.map +1 -1
- package/dist/collection/components/md-bar-chart/md-bar-chart.js +31 -18
- package/dist/collection/components/md-bar-chart/md-bar-chart.js.map +1 -1
- package/dist/collection/components/md-chart-series/md-chart-series.css +4 -0
- package/dist/collection/components/md-chart-series/md-chart-series.js +654 -0
- package/dist/collection/components/md-chart-series/md-chart-series.js.map +1 -0
- package/dist/collection/components/md-checkbox/md-checkbox.js +3 -3
- package/dist/collection/components/md-chip/md-chip.js +2 -2
- 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-line-chart/md-line-chart.js +31 -18
- package/dist/collection/components/md-line-chart/md-line-chart.js.map +1 -1
- package/dist/collection/components/md-ripple/md-ripple.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/charts/series-elements.js +82 -0
- package/dist/collection/utils/charts/series-elements.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/md-accordion-item.js +1 -1
- package/dist/components/md-accordion.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-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-bar-chart.js.map +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-chart-series.d.ts +11 -0
- package/dist/components/md-chart-series.js +2 -0
- package/dist/components/md-chart-series.js.map +1 -0
- package/dist/components/md-checkbox.js +1 -1
- package/dist/components/md-chip.js +1 -1
- package/dist/components/md-color-picker.js +1 -1
- package/dist/components/md-date-picker.js +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-fab-menu-item.js +1 -1
- package/dist/components/md-fab-menu-item.js.map +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-group.js +1 -1
- package/dist/components/md-menu-item.js +1 -1
- package/dist/components/md-menu.js +1 -1
- package/dist/components/md-meter.js +1 -1
- package/dist/components/md-multi-select.js +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-pie-chart.js +1 -1
- package/dist/components/md-progress-indicator.js +1 -1
- package/dist/components/md-radio.js +1 -1
- package/dist/components/md-rating.js +1 -1
- package/dist/components/md-ripple.js +1 -1
- package/dist/components/md-search.js +1 -1
- package/dist/components/md-segmented-button-set.js +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-skeleton.js +1 -1
- package/dist/components/md-slider.js +1 -1
- package/dist/components/md-snackbar.js +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-stepper.js +1 -1
- package/dist/components/md-sub-menu-item.js +1 -1
- package/dist/components/md-switch.js +1 -1
- package/dist/components/md-tab-panel.js +1 -1
- package/dist/components/md-tab-panels.js +1 -1
- package/dist/components/md-tab.js +1 -1
- package/dist/components/md-table-body.js +1 -1
- package/dist/components/md-table-cell.js +1 -1
- package/dist/components/md-table-container.js +1 -1
- package/dist/components/md-table-expand-toggle.js +1 -1
- package/dist/components/md-table-foot.js +1 -1
- package/dist/components/md-table-head.js +1 -1
- package/dist/components/md-table-pagination.js +1 -1
- package/dist/components/md-table-row.js +1 -1
- package/dist/components/md-table-sort-label.js +1 -1
- package/dist/components/md-table-toolbar.js +1 -1
- package/dist/components/md-table.js +1 -1
- package/dist/components/md-tabs.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-toolbar.js +1 -1
- package/dist/components/md-tooltip.js +1 -1
- package/dist/components/md-transfer-list.js +1 -1
- package/dist/components/{p-63ROhs5i.js → p-0IF02V78.js} +2 -2
- package/dist/{md3/p-BytnCy9Z.js → components/p-0hoYij4e.js} +2 -2
- package/dist/{components-csr/p-B3y4Sfu7.js → components/p-3GSjLPGH.js} +2 -2
- package/dist/components/p-BcgBd7Uo.js +2 -0
- package/dist/components/p-BcgBd7Uo.js.map +1 -0
- package/dist/components/{p-BCAoGEfF.js → p-BzXHX-ab.js} +2 -2
- package/dist/{components-csr/p-mPtoRtT7.js → components/p-C84E82vc.js} +2 -2
- package/dist/{components-csr/p-D5zCIaks.js → components/p-CMkPI5PO.js} +2 -2
- package/dist/components/{p-CGKlSro0.js → p-CWveMYei.js} +2 -2
- package/dist/components/{p-CjV5tPMM.js → p-CXPZ-DjB.js} +2 -2
- package/dist/components/{p-D_fs8IXJ.js → p-CoxMxFp3.js} +2 -2
- package/dist/components/{p-C6Dk5I_4.js → p-CuijKuQR.js} +2 -2
- package/dist/components/{p-B9jJRlnU.js → p-D9C2BtN-.js} +2 -2
- package/dist/components/{p-AD7q8XNf.js → p-DI0ebvMQ.js} +2 -2
- package/dist/components/{p-BJAKwQqQ.js → p-DM30Y_8c.js} +2 -2
- package/dist/components/{p-CXOHmY2w.js → p-DTAVEp79.js} +2 -2
- package/dist/components/{p-KXxaSDnZ.js → p-DfuTvIyO.js} +2 -2
- package/dist/components/{p-BcOsCkxa.js → p-P38YgsfT.js} +2 -2
- package/dist/components/{p-DIGH4LlS.js → p-lK_nIs4o.js} +2 -2
- package/dist/components/{p-CspVD-eh.js → p-t9lomFml.js} +2 -2
- package/dist/components/p-t9lomFml.js.map +1 -0
- package/dist/components-csr/index.js +1 -1
- package/dist/components-csr/md-accordion-item.js +1 -1
- package/dist/components-csr/md-accordion.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-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-bar-chart.js.map +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-chart-series.js +2 -0
- package/dist/components-csr/md-chart-series.js.map +1 -0
- package/dist/components-csr/md-checkbox.js +1 -1
- package/dist/components-csr/md-chip.js +1 -1
- package/dist/components-csr/md-color-picker.js +1 -1
- package/dist/components-csr/md-date-picker.js +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-fab-menu-item.js +1 -1
- package/dist/components-csr/md-fab-menu-item.js.map +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-group.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-meter.js +1 -1
- package/dist/components-csr/md-multi-select.js +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-pie-chart.js +1 -1
- package/dist/components-csr/md-progress-indicator.js +1 -1
- package/dist/components-csr/md-radio.js +1 -1
- package/dist/components-csr/md-rating.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-segmented-button-set.js +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-skeleton.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-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-stepper.js +1 -1
- package/dist/components-csr/md-sub-menu-item.js +1 -1
- package/dist/components-csr/md-switch.js +1 -1
- package/dist/components-csr/md-tab-panel.js +1 -1
- package/dist/components-csr/md-tab-panels.js +1 -1
- package/dist/components-csr/md-tab.js +1 -1
- package/dist/components-csr/md-table-body.js +1 -1
- package/dist/components-csr/md-table-cell.js +1 -1
- package/dist/components-csr/md-table-container.js +1 -1
- package/dist/components-csr/md-table-expand-toggle.js +1 -1
- package/dist/components-csr/md-table-foot.js +1 -1
- package/dist/components-csr/md-table-head.js +1 -1
- package/dist/components-csr/md-table-pagination.js +1 -1
- package/dist/components-csr/md-table-row.js +1 -1
- package/dist/components-csr/md-table-sort-label.js +1 -1
- package/dist/components-csr/md-table-toolbar.js +1 -1
- package/dist/components-csr/md-table.js +1 -1
- package/dist/components-csr/md-tabs.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-toolbar.js +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-Ca8f4AyH.js → p-B0CFxLUh.js} +2 -2
- package/dist/components-csr/{p-Cr1trPWZ.js → p-B_7E_AYp.js} +2 -2
- package/dist/components-csr/p-BcgBd7Uo.js +2 -0
- package/dist/components-csr/p-BcgBd7Uo.js.map +1 -0
- package/dist/{components/p-DoJOR0pW.js → components-csr/p-BrkO_ex-.js} +2 -2
- package/dist/components-csr/{p-C7SO-MXq.js → p-CJoJbayQ.js} +2 -2
- package/dist/{components/p-WQOlnYmQ.js → components-csr/p-CSbYwMnb.js} +2 -2
- package/dist/components-csr/{p-CWxDc07j.js → p-CgwYzoLw.js} +2 -2
- package/dist/components-csr/{p-B_K-3G0S.js → p-D9cIx3li.js} +2 -2
- package/dist/components-csr/{p-CUMT_XYv.js → p-DFJO04Vn.js} +2 -2
- package/dist/components-csr/{p-Px_e-xy9.js → p-DH9RCl21.js} +2 -2
- package/dist/components-csr/{p-CB_bjwk9.js → p-DHw4bV7s.js} +2 -2
- package/dist/components-csr/{p-CZp-Xecz.js → p-DNOD_gWq.js} +2 -2
- package/dist/components-csr/{p-BuMwJsnQ.js → p-DeGXyF1I.js} +2 -2
- package/dist/components-csr/{p-CQoO26r0.js → p-DtvcCARI.js} +2 -2
- package/dist/components-csr/{p-DQL7SnR8.js → p-GBA16NLW.js} +2 -2
- package/dist/components-csr/{p-B37-0L5e.js → p-dBZ_5SDM.js} +2 -2
- package/dist/components-csr/p-dBZ_5SDM.js.map +1 -0
- package/dist/{components/p-BWCwdLDy.js → components-csr/p-iDisQkYG.js} +2 -2
- package/dist/components-csr/{p-CvTDNP2i.js → p-oV2Z2HiI.js} +2 -2
- package/dist/components-csr/{p-BT43J7lo.js → p-pIQRKNpB.js} +2 -2
- package/dist/esm/{index-DkJ2hl1A.js → index-DuCsV-Tv.js} +23 -3
- package/dist/esm/{index-DkJ2hl1A.js.map → index-DuCsV-Tv.js.map} +1 -1
- package/dist/esm/{initial-motion-DdqthWsh.js → initial-motion-D_VxK6y5.js} +3 -3
- package/dist/esm/{initial-motion-DdqthWsh.js.map → initial-motion-D_VxK6y5.js.map} +1 -1
- package/dist/esm/{lazy-loading-indicator-CrT32bSG.js → lazy-loading-indicator-D01l1mnu.js} +4 -4
- package/dist/esm/{lazy-loading-indicator-CrT32bSG.js.map → lazy-loading-indicator-D01l1mnu.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/md-accordion-item.entry.js +2 -2
- package/dist/esm/md-accordion.entry.js +2 -2
- package/dist/esm/md-app-bar.entry.js +2 -2
- package/dist/esm/md-area-chart.entry.js +27 -15
- package/dist/esm/md-area-chart.entry.js.map +1 -1
- package/dist/esm/md-autocomplete.entry.js +3 -3
- package/dist/esm/md-avatar_2.entry.js +2 -2
- package/dist/esm/md-badge.entry.js +2 -2
- package/dist/esm/md-bar-chart.entry.js +27 -15
- package/dist/esm/md-bar-chart.entry.js.map +1 -1
- package/dist/esm/md-bottom-sheet.entry.js +2 -2
- package/dist/esm/md-breadcrumb-item.entry.js +2 -2
- package/dist/esm/md-breadcrumbs.entry.js +2 -2
- package/dist/esm/md-button-group.entry.js +2 -2
- package/dist/esm/md-button_6.entry.js +4 -4
- package/dist/esm/md-chart-series.entry.js +120 -0
- package/dist/esm/md-chart-series.entry.js.map +1 -0
- package/dist/esm/md-checkbox.entry.js +5 -5
- package/dist/esm/md-chip.entry.js +4 -4
- package/dist/esm/md-color-picker.entry.js +3 -3
- package/dist/esm/md-date-picker.entry.js +3 -3
- package/dist/esm/md-dialog.entry.js +5 -5
- package/dist/esm/md-divider.entry.js +4 -4
- package/dist/esm/md-fab-menu-item.entry.js +4 -4
- package/dist/esm/md-fab-menu.entry.js +5 -5
- package/dist/esm/md-fab.entry.js +4 -4
- package/dist/esm/md-line-chart.entry.js +31 -19
- package/dist/esm/md-line-chart.entry.js.map +1 -1
- package/dist/esm/md-list-item.entry.js +2 -2
- package/dist/esm/md-list.entry.js +2 -2
- package/dist/esm/{md-loading-indicator-y7Swvv8I.js → md-loading-indicator-DvHmp-e1.js} +4 -4
- package/dist/esm/{md-loading-indicator-y7Swvv8I.js.map → md-loading-indicator-DvHmp-e1.js.map} +1 -1
- package/dist/esm/md-loading-indicator.entry.js +3 -3
- package/dist/esm/md-menu-item-group.entry.js +2 -2
- package/dist/esm/md-menu_2.entry.js +3 -3
- package/dist/esm/md-meter.entry.js +2 -2
- package/dist/esm/md-multi-select.entry.js +3 -3
- package/dist/esm/md-navigation-bar.entry.js +2 -2
- package/dist/esm/md-navigation-rail-tab.entry.js +2 -2
- package/dist/esm/md-navigation-rail.entry.js +2 -2
- package/dist/esm/md-navigation-tab.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/md-pie-chart.entry.js +2 -2
- package/dist/esm/md-progress-indicator.entry.js +2 -2
- package/dist/esm/md-rating.entry.js +2 -2
- package/dist/esm/md-search.entry.js +4 -4
- package/dist/esm/md-segmented-button-set.entry.js +2 -2
- package/dist/esm/md-segmented-button.entry.js +2 -2
- package/dist/esm/md-select-option.entry.js +2 -2
- package/dist/esm/md-select.entry.js +3 -3
- package/dist/esm/md-side-sheet.entry.js +3 -3
- package/dist/esm/md-skeleton.entry.js +2 -2
- package/dist/esm/md-slider.entry.js +2 -2
- package/dist/esm/md-sparkline.entry.js +2 -2
- package/dist/esm/md-split-button.entry.js +2 -2
- package/dist/esm/md-status-dot.entry.js +2 -2
- package/dist/esm/md-step.entry.js +2 -2
- package/dist/esm/md-stepper.entry.js +2 -2
- package/dist/esm/md-sub-menu-item.entry.js +2 -2
- package/dist/esm/md-switch.entry.js +2 -2
- package/dist/esm/md-tab-panel.entry.js +2 -2
- package/dist/esm/md-tab-panels.entry.js +2 -2
- package/dist/esm/md-tab.entry.js +2 -2
- package/dist/esm/md-table-body.entry.js +2 -2
- package/dist/esm/md-table-cell.entry.js +2 -2
- package/dist/esm/md-table-container.entry.js +2 -2
- package/dist/esm/md-table-expand-toggle.entry.js +2 -2
- package/dist/esm/md-table-foot.entry.js +2 -2
- package/dist/esm/md-table-head.entry.js +2 -2
- package/dist/esm/md-table-pagination.entry.js +2 -2
- package/dist/esm/md-table-row.entry.js +2 -2
- package/dist/esm/md-table-sort-label.entry.js +2 -2
- package/dist/esm/md-table-toolbar.entry.js +2 -2
- package/dist/esm/md-table.entry.js +2 -2
- package/dist/esm/md-tabs.entry.js +2 -2
- package/dist/esm/md-text-field.entry.js +2 -2
- package/dist/esm/md-time-picker.entry.js +3 -3
- package/dist/esm/md-toolbar.entry.js +2 -2
- package/dist/esm/md-transfer-list.entry.js +2 -2
- package/dist/esm/md3.js +3 -3
- package/dist/esm/{overlay-lifecycle-B4XGZ4dz.js → overlay-lifecycle-CcRpkenI.js} +3 -3
- package/dist/esm/{overlay-lifecycle-B4XGZ4dz.js.map → overlay-lifecycle-CcRpkenI.js.map} +1 -1
- package/dist/esm/series-elements-BcgBd7Uo.js +86 -0
- package/dist/esm/series-elements-BcgBd7Uo.js.map +1 -0
- package/dist/md3/md3.css +1 -1
- package/dist/md3/md3.esm.js +1 -1
- package/dist/md3/{p-eb3958a7.entry.js → p-0208c7bd.entry.js} +2 -2
- package/dist/md3/{p-9fe46046.entry.js → p-05960ec0.entry.js} +2 -2
- package/dist/md3/{p-ffbde7ad.entry.js → p-16e69a81.entry.js} +2 -2
- package/dist/md3/{p-b14baec4.entry.js → p-1b57b1a8.entry.js} +2 -2
- package/dist/md3/{p-3f8959d1.entry.js → p-1cd1a2fb.entry.js} +2 -2
- package/dist/md3/{p-8a863529.entry.js → p-1d6e080c.entry.js} +2 -2
- package/dist/md3/{p-67d958e6.entry.js → p-1e67a61f.entry.js} +2 -2
- package/dist/md3/p-22fd4581.entry.js +2 -0
- package/dist/md3/p-22fd4581.entry.js.map +1 -0
- package/dist/md3/{p-3b8b58ae.entry.js → p-2fcada07.entry.js} +2 -2
- package/dist/md3/{p-8003b9d7.entry.js → p-3277f812.entry.js} +2 -2
- package/dist/md3/{p-b5a8f03c.entry.js → p-35216f14.entry.js} +2 -2
- package/dist/md3/{p-9f0f41c8.entry.js → p-3552a619.entry.js} +2 -2
- package/dist/md3/{p-19e517bc.entry.js → p-3595b838.entry.js} +2 -2
- package/dist/md3/p-36651efa.entry.js +2 -0
- package/dist/md3/{p-c41bd8c9.entry.js.map → p-36651efa.entry.js.map} +1 -1
- package/dist/md3/{p-a0f17bfb.entry.js → p-37f1060f.entry.js} +2 -2
- package/dist/md3/{p-097ad5a5.entry.js → p-3aea8887.entry.js} +2 -2
- package/dist/md3/{p-0baf9f88.entry.js → p-3bd61073.entry.js} +2 -2
- package/dist/md3/{p-908456a6.entry.js → p-3be8439d.entry.js} +2 -2
- package/dist/md3/{p-137d6f2a.entry.js → p-3e194c1e.entry.js} +2 -2
- package/dist/md3/{p-fd02aa37.entry.js → p-3fc88c67.entry.js} +2 -2
- package/dist/md3/{p-96cbfdca.entry.js → p-427de13e.entry.js} +2 -2
- package/dist/md3/{p-16306734.entry.js → p-42a51853.entry.js} +2 -2
- package/dist/md3/{p-1b506237.entry.js → p-45931478.entry.js} +2 -2
- package/dist/md3/{p-b9e28a86.entry.js → p-46711014.entry.js} +2 -2
- package/dist/md3/{p-9d1c66a8.entry.js → p-46759ada.entry.js} +2 -2
- package/dist/md3/{p-03f06a3c.entry.js → p-4a60f85d.entry.js} +2 -2
- package/dist/md3/{p-a9fbc697.entry.js → p-4b299eb7.entry.js} +2 -2
- package/dist/md3/{p-1ed83da9.entry.js → p-54c42926.entry.js} +2 -2
- package/dist/md3/{p-f8b52c07.entry.js → p-5c961827.entry.js} +2 -2
- package/dist/md3/{p-85e00706.entry.js → p-64a05e9e.entry.js} +2 -2
- package/dist/md3/{p-c1ace95d.entry.js → p-6620fab1.entry.js} +2 -2
- package/dist/md3/{p-8077ceaf.entry.js → p-6d700596.entry.js} +2 -2
- package/dist/md3/p-78df4a72.entry.js +2 -0
- package/dist/md3/p-78df4a72.entry.js.map +1 -0
- package/dist/md3/{p-d5a459bf.entry.js → p-7b1fd787.entry.js} +2 -2
- package/dist/md3/{p-0c795946.entry.js → p-925d5156.entry.js} +2 -2
- package/dist/md3/{p-c664501b.entry.js → p-941eb93e.entry.js} +2 -2
- package/dist/md3/{p-e3211f30.entry.js → p-966c3ada.entry.js} +2 -2
- package/dist/md3/{p-858dda75.entry.js → p-9aabec5d.entry.js} +2 -2
- package/dist/md3/{p-93afcce6.entry.js → p-9bada6da.entry.js} +2 -2
- package/dist/md3/{p-RiA8nMw1.js → p-BOlcFCii.js} +2 -2
- package/dist/md3/{p-RiA8nMw1.js.map → p-BOlcFCii.js.map} +1 -1
- package/dist/md3/p-BcgBd7Uo.js +2 -0
- package/dist/md3/p-BcgBd7Uo.js.map +1 -0
- package/dist/md3/{p-ZTAwTx66.js → p-BgRw_myY.js} +2 -2
- package/dist/md3/{p-ZTAwTx66.js.map → p-BgRw_myY.js.map} +1 -1
- package/dist/{components/p-gd9_5R5P.js → md3/p-CUho8MPx.js} +2 -2
- package/dist/md3/{p-BytnCy9Z.js.map → p-CUho8MPx.js.map} +1 -1
- package/dist/md3/{p-Bin9vIoJ.js → p-DH_rSF2a.js} +2 -2
- package/dist/md3/{p-Bin9vIoJ.js.map → p-DH_rSF2a.js.map} +1 -1
- package/dist/md3/{p-DkJ2hl1A.js → p-DuCsV-Tv.js} +2 -2
- package/dist/md3/{p-DkJ2hl1A.js.map → p-DuCsV-Tv.js.map} +1 -1
- package/dist/md3/{p-c7746547.entry.js → p-a7e198c6.entry.js} +2 -2
- package/dist/md3/{p-b50448b3.entry.js → p-ac834a37.entry.js} +2 -2
- package/dist/md3/{p-6d4889c1.entry.js → p-b133fc2b.entry.js} +2 -2
- package/dist/md3/{p-26122b64.entry.js → p-b17357b9.entry.js} +2 -2
- package/dist/md3/{p-b38d7576.entry.js → p-b2ecdc9d.entry.js} +2 -2
- package/dist/md3/p-b7c8253a.entry.js +2 -0
- package/dist/md3/{p-4bee383f.entry.js → p-bcb6b76c.entry.js} +2 -2
- package/dist/md3/{p-5adc9387.entry.js → p-c069c032.entry.js} +2 -2
- package/dist/md3/{p-6f8d6ff0.entry.js → p-c0f9a8ce.entry.js} +2 -2
- package/dist/md3/{p-5355af66.entry.js → p-c46dcf66.entry.js} +2 -2
- package/dist/md3/{p-ea762ac2.entry.js → p-c715010f.entry.js} +2 -2
- package/dist/md3/{p-94da49fa.entry.js → p-c74eecab.entry.js} +2 -2
- package/dist/md3/{p-b1da3d4f.entry.js → p-caab4c1f.entry.js} +2 -2
- package/dist/md3/{p-d2692d90.entry.js → p-cc3e468e.entry.js} +2 -2
- package/dist/md3/p-ce494bd1.entry.js +2 -0
- package/dist/md3/p-ce494bd1.entry.js.map +1 -0
- package/dist/md3/{p-eef9c775.entry.js → p-d147397f.entry.js} +2 -2
- package/dist/md3/{p-4d5100e0.entry.js → p-d2ee5d68.entry.js} +2 -2
- package/dist/md3/{p-be2082bc.entry.js → p-d44c3521.entry.js} +2 -2
- package/dist/md3/{p-af437c3c.entry.js → p-d4d1259c.entry.js} +2 -2
- package/dist/md3/{p-bc863e1b.entry.js → p-d8442714.entry.js} +2 -2
- package/dist/md3/{p-47aa8306.entry.js → p-d9b44b23.entry.js} +2 -2
- package/dist/md3/{p-272ef8cb.entry.js → p-de52f723.entry.js} +2 -2
- package/dist/md3/{p-db74251c.entry.js → p-de71d1e9.entry.js} +2 -2
- package/dist/md3/{p-d70d0db3.entry.js → p-defc5e78.entry.js} +2 -2
- package/dist/md3/{p-3d703571.entry.js → p-df417df4.entry.js} +2 -2
- package/dist/md3/{p-cb498d56.entry.js → p-e3704fc4.entry.js} +2 -2
- package/dist/md3/{p-3d90a202.entry.js → p-e67f228c.entry.js} +2 -2
- package/dist/md3/{p-5ec552ec.entry.js → p-e86abc6c.entry.js} +2 -2
- package/dist/md3/{p-19aea41a.entry.js → p-edf74454.entry.js} +2 -2
- package/dist/md3/{p-e2b5d561.entry.js → p-f4f64aa2.entry.js} +2 -2
- package/dist/md3/p-f5ba0d4c.entry.js +2 -0
- package/dist/md3/{p-77635ead.entry.js.map → p-f5ba0d4c.entry.js.map} +1 -1
- package/dist/md3/p-f741f2c7.entry.js +2 -0
- package/dist/md3/{p-4f7838e1.entry.js.map → p-f741f2c7.entry.js.map} +1 -1
- package/dist/md3/{p-2a220f40.entry.js → p-f7abc084.entry.js} +2 -2
- package/dist/md3/p-fc4034bf.entry.js +2 -0
- package/dist/md3/p-fc4034bf.entry.js.map +1 -0
- package/dist/md3/{p-2e1e04c6.entry.js → p-fcbdf4ba.entry.js} +2 -2
- package/dist/md3/{p-b098f546.entry.js → p-ff41fc7e.entry.js} +2 -2
- package/dist/sources/1072375249d01bb6640401cf49dc3d9e87d0ebac412fcfcd1afd3b5cb37df7b7/app-data +3 -0
- package/dist/sources/35dadf059de729b390f3df3b0fd05fd1578e1afbd6f0fa9d382cd0d8794c32aa/series-elements.ts +81 -0
- package/dist/sources/{d3f592ff8c47ce0c056b6e6cbcaa9d43687c53ebe7c8d193110a731a3e3a4af2 → 85eac5ca1350ced6718812f829f335dc5aa0026c954125260013367c738a7c9e}/index.ts +1 -0
- package/dist/sources/{0257008c17c104ed27ee727cf7dbbad94cf14f4148dd8e281b510dd37a34c730 → 88da03acb5e30b2d52fe3d0021dfc64d19dffb81a9f5c630b8bb67de21c9465d}/md-line-chart.tsx +31 -15
- package/dist/sources/{e6f1f0a964cd8962a51c61e3cdf7851c46e88a48833ea5e3da575166bde936c3 → aee3bad879c53f8a56ed81e96b445b3979341c756330370f1e41c5faee0af1a6}/md-bar-chart.tsx +30 -14
- package/dist/sources/c721f0ed0c4097f171e84a2ae5b4c537ad352844cffded2d805afc600255d248/md-chart-series.tsx +84 -0
- package/dist/sources/{2f88f34ffdcaef324270476cf641a5f8fa62c288ad7d5d92acbae19cb08f7d5c → c8e8a52259b376459bd17703d1d97716abc1fa35931cc95aedc07f1a3196b0c9}/md-area-chart.tsx +33 -17
- package/dist/sources/d1d5e4161ad69f87c2c806ba8c8308c99911631504a5e3c1867b7de0b5e58853/md-chart-series.css_tag_md-chart-series_encapsulation_shadow +4 -0
- package/dist/sources/dc5930bf3b00c49a265ba4bb975468f4d4f69b6d9f0e2eb6f6912e856fe5f27f/app-data +3 -0
- package/dist/sources/fcfb5850a256d7109a45b7925913ecd1427f826af8d94c955c17dc6a5f6a7b89/app-data +3 -0
- package/dist/types/components/md-area-chart/md-area-chart.d.ts +9 -5
- package/dist/types/components/md-bar-chart/md-bar-chart.d.ts +7 -3
- package/dist/types/components/md-chart-series/md-chart-series.d.ts +61 -0
- package/dist/types/components/md-line-chart/md-line-chart.d.ts +5 -1
- package/dist/types/components.d.ts +273 -16
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/charts/series-elements.d.ts +38 -0
- package/hydrate/index.js +329 -59
- package/hydrate/index.mjs +329 -59
- package/package.json +2 -2
- package/src/components/md-chart-series/readme.md +25 -0
- package/dist/components/p-CspVD-eh.js.map +0 -1
- package/dist/components-csr/p-B37-0L5e.js.map +0 -1
- package/dist/md3/p-2f99585e.entry.js +0 -2
- package/dist/md3/p-2f99585e.entry.js.map +0 -1
- package/dist/md3/p-3d251149.entry.js +0 -2
- package/dist/md3/p-3d251149.entry.js.map +0 -1
- package/dist/md3/p-4f7838e1.entry.js +0 -2
- package/dist/md3/p-77635ead.entry.js +0 -2
- package/dist/md3/p-9379dfca.entry.js +0 -2
- package/dist/md3/p-9379dfca.entry.js.map +0 -1
- package/dist/md3/p-c41bd8c9.entry.js +0 -2
- package/dist/md3/p-de0967a6.entry.js +0 -2
- package/dist/sources/249f56e5f4c1e582903551d8d8a39d83e268058e66194832a21408420ea4a5fb/app-data +0 -3
- package/dist/sources/a9800d32bbcaf3d8baa4abf6f1c13d77f4f7e22dd03bfd1c90ad1cc9c5ac49a9/app-data +0 -3
- package/dist/sources/bb0c438a1a8f4b6d77c43db8d11b2366bfa6c0c48d4daa3ebbdbcd2bdefa4749/app-data +0 -3
- /package/dist/components/{p-63ROhs5i.js.map → p-0IF02V78.js.map} +0 -0
- /package/dist/components/{p-gd9_5R5P.js.map → p-0hoYij4e.js.map} +0 -0
- /package/dist/components/{p-DoJOR0pW.js.map → p-3GSjLPGH.js.map} +0 -0
- /package/dist/components/{p-BCAoGEfF.js.map → p-BzXHX-ab.js.map} +0 -0
- /package/dist/components/{p-WQOlnYmQ.js.map → p-C84E82vc.js.map} +0 -0
- /package/dist/components/{p-BWCwdLDy.js.map → p-CMkPI5PO.js.map} +0 -0
- /package/dist/components/{p-CGKlSro0.js.map → p-CWveMYei.js.map} +0 -0
- /package/dist/components/{p-CjV5tPMM.js.map → p-CXPZ-DjB.js.map} +0 -0
- /package/dist/components/{p-D_fs8IXJ.js.map → p-CoxMxFp3.js.map} +0 -0
- /package/dist/components/{p-C6Dk5I_4.js.map → p-CuijKuQR.js.map} +0 -0
- /package/dist/components/{p-B9jJRlnU.js.map → p-D9C2BtN-.js.map} +0 -0
- /package/dist/components/{p-AD7q8XNf.js.map → p-DI0ebvMQ.js.map} +0 -0
- /package/dist/components/{p-BJAKwQqQ.js.map → p-DM30Y_8c.js.map} +0 -0
- /package/dist/components/{p-CXOHmY2w.js.map → p-DTAVEp79.js.map} +0 -0
- /package/dist/components/{p-KXxaSDnZ.js.map → p-DfuTvIyO.js.map} +0 -0
- /package/dist/components/{p-BcOsCkxa.js.map → p-P38YgsfT.js.map} +0 -0
- /package/dist/components/{p-DIGH4LlS.js.map → p-lK_nIs4o.js.map} +0 -0
- /package/dist/components-csr/{p-Ca8f4AyH.js.map → p-B0CFxLUh.js.map} +0 -0
- /package/dist/components-csr/{p-Cr1trPWZ.js.map → p-B_7E_AYp.js.map} +0 -0
- /package/dist/components-csr/{p-B3y4Sfu7.js.map → p-BrkO_ex-.js.map} +0 -0
- /package/dist/components-csr/{p-C7SO-MXq.js.map → p-CJoJbayQ.js.map} +0 -0
- /package/dist/components-csr/{p-mPtoRtT7.js.map → p-CSbYwMnb.js.map} +0 -0
- /package/dist/components-csr/{p-CWxDc07j.js.map → p-CgwYzoLw.js.map} +0 -0
- /package/dist/components-csr/{p-B_K-3G0S.js.map → p-D9cIx3li.js.map} +0 -0
- /package/dist/components-csr/{p-CUMT_XYv.js.map → p-DFJO04Vn.js.map} +0 -0
- /package/dist/components-csr/{p-Px_e-xy9.js.map → p-DH9RCl21.js.map} +0 -0
- /package/dist/components-csr/{p-CB_bjwk9.js.map → p-DHw4bV7s.js.map} +0 -0
- /package/dist/components-csr/{p-CZp-Xecz.js.map → p-DNOD_gWq.js.map} +0 -0
- /package/dist/components-csr/{p-BuMwJsnQ.js.map → p-DeGXyF1I.js.map} +0 -0
- /package/dist/components-csr/{p-CQoO26r0.js.map → p-DtvcCARI.js.map} +0 -0
- /package/dist/components-csr/{p-DQL7SnR8.js.map → p-GBA16NLW.js.map} +0 -0
- /package/dist/components-csr/{p-D5zCIaks.js.map → p-iDisQkYG.js.map} +0 -0
- /package/dist/components-csr/{p-CvTDNP2i.js.map → p-oV2Z2HiI.js.map} +0 -0
- /package/dist/components-csr/{p-BT43J7lo.js.map → p-pIQRKNpB.js.map} +0 -0
- /package/dist/md3/{p-eb3958a7.entry.js.map → p-0208c7bd.entry.js.map} +0 -0
- /package/dist/md3/{p-9fe46046.entry.js.map → p-05960ec0.entry.js.map} +0 -0
- /package/dist/md3/{p-ffbde7ad.entry.js.map → p-16e69a81.entry.js.map} +0 -0
- /package/dist/md3/{p-b14baec4.entry.js.map → p-1b57b1a8.entry.js.map} +0 -0
- /package/dist/md3/{p-3f8959d1.entry.js.map → p-1cd1a2fb.entry.js.map} +0 -0
- /package/dist/md3/{p-8a863529.entry.js.map → p-1d6e080c.entry.js.map} +0 -0
- /package/dist/md3/{p-67d958e6.entry.js.map → p-1e67a61f.entry.js.map} +0 -0
- /package/dist/md3/{p-3b8b58ae.entry.js.map → p-2fcada07.entry.js.map} +0 -0
- /package/dist/md3/{p-8003b9d7.entry.js.map → p-3277f812.entry.js.map} +0 -0
- /package/dist/md3/{p-b5a8f03c.entry.js.map → p-35216f14.entry.js.map} +0 -0
- /package/dist/md3/{p-9f0f41c8.entry.js.map → p-3552a619.entry.js.map} +0 -0
- /package/dist/md3/{p-19e517bc.entry.js.map → p-3595b838.entry.js.map} +0 -0
- /package/dist/md3/{p-a0f17bfb.entry.js.map → p-37f1060f.entry.js.map} +0 -0
- /package/dist/md3/{p-097ad5a5.entry.js.map → p-3aea8887.entry.js.map} +0 -0
- /package/dist/md3/{p-0baf9f88.entry.js.map → p-3bd61073.entry.js.map} +0 -0
- /package/dist/md3/{p-908456a6.entry.js.map → p-3be8439d.entry.js.map} +0 -0
- /package/dist/md3/{p-137d6f2a.entry.js.map → p-3e194c1e.entry.js.map} +0 -0
- /package/dist/md3/{p-fd02aa37.entry.js.map → p-3fc88c67.entry.js.map} +0 -0
- /package/dist/md3/{p-96cbfdca.entry.js.map → p-427de13e.entry.js.map} +0 -0
- /package/dist/md3/{p-16306734.entry.js.map → p-42a51853.entry.js.map} +0 -0
- /package/dist/md3/{p-1b506237.entry.js.map → p-45931478.entry.js.map} +0 -0
- /package/dist/md3/{p-b9e28a86.entry.js.map → p-46711014.entry.js.map} +0 -0
- /package/dist/md3/{p-9d1c66a8.entry.js.map → p-46759ada.entry.js.map} +0 -0
- /package/dist/md3/{p-03f06a3c.entry.js.map → p-4a60f85d.entry.js.map} +0 -0
- /package/dist/md3/{p-a9fbc697.entry.js.map → p-4b299eb7.entry.js.map} +0 -0
- /package/dist/md3/{p-1ed83da9.entry.js.map → p-54c42926.entry.js.map} +0 -0
- /package/dist/md3/{p-f8b52c07.entry.js.map → p-5c961827.entry.js.map} +0 -0
- /package/dist/md3/{p-85e00706.entry.js.map → p-64a05e9e.entry.js.map} +0 -0
- /package/dist/md3/{p-c1ace95d.entry.js.map → p-6620fab1.entry.js.map} +0 -0
- /package/dist/md3/{p-8077ceaf.entry.js.map → p-6d700596.entry.js.map} +0 -0
- /package/dist/md3/{p-d5a459bf.entry.js.map → p-7b1fd787.entry.js.map} +0 -0
- /package/dist/md3/{p-0c795946.entry.js.map → p-925d5156.entry.js.map} +0 -0
- /package/dist/md3/{p-c664501b.entry.js.map → p-941eb93e.entry.js.map} +0 -0
- /package/dist/md3/{p-e3211f30.entry.js.map → p-966c3ada.entry.js.map} +0 -0
- /package/dist/md3/{p-858dda75.entry.js.map → p-9aabec5d.entry.js.map} +0 -0
- /package/dist/md3/{p-93afcce6.entry.js.map → p-9bada6da.entry.js.map} +0 -0
- /package/dist/md3/{p-c7746547.entry.js.map → p-a7e198c6.entry.js.map} +0 -0
- /package/dist/md3/{p-b50448b3.entry.js.map → p-ac834a37.entry.js.map} +0 -0
- /package/dist/md3/{p-6d4889c1.entry.js.map → p-b133fc2b.entry.js.map} +0 -0
- /package/dist/md3/{p-26122b64.entry.js.map → p-b17357b9.entry.js.map} +0 -0
- /package/dist/md3/{p-b38d7576.entry.js.map → p-b2ecdc9d.entry.js.map} +0 -0
- /package/dist/md3/{p-de0967a6.entry.js.map → p-b7c8253a.entry.js.map} +0 -0
- /package/dist/md3/{p-4bee383f.entry.js.map → p-bcb6b76c.entry.js.map} +0 -0
- /package/dist/md3/{p-5adc9387.entry.js.map → p-c069c032.entry.js.map} +0 -0
- /package/dist/md3/{p-6f8d6ff0.entry.js.map → p-c0f9a8ce.entry.js.map} +0 -0
- /package/dist/md3/{p-5355af66.entry.js.map → p-c46dcf66.entry.js.map} +0 -0
- /package/dist/md3/{p-ea762ac2.entry.js.map → p-c715010f.entry.js.map} +0 -0
- /package/dist/md3/{p-94da49fa.entry.js.map → p-c74eecab.entry.js.map} +0 -0
- /package/dist/md3/{p-b1da3d4f.entry.js.map → p-caab4c1f.entry.js.map} +0 -0
- /package/dist/md3/{p-d2692d90.entry.js.map → p-cc3e468e.entry.js.map} +0 -0
- /package/dist/md3/{p-eef9c775.entry.js.map → p-d147397f.entry.js.map} +0 -0
- /package/dist/md3/{p-4d5100e0.entry.js.map → p-d2ee5d68.entry.js.map} +0 -0
- /package/dist/md3/{p-be2082bc.entry.js.map → p-d44c3521.entry.js.map} +0 -0
- /package/dist/md3/{p-af437c3c.entry.js.map → p-d4d1259c.entry.js.map} +0 -0
- /package/dist/md3/{p-bc863e1b.entry.js.map → p-d8442714.entry.js.map} +0 -0
- /package/dist/md3/{p-47aa8306.entry.js.map → p-d9b44b23.entry.js.map} +0 -0
- /package/dist/md3/{p-272ef8cb.entry.js.map → p-de52f723.entry.js.map} +0 -0
- /package/dist/md3/{p-db74251c.entry.js.map → p-de71d1e9.entry.js.map} +0 -0
- /package/dist/md3/{p-d70d0db3.entry.js.map → p-defc5e78.entry.js.map} +0 -0
- /package/dist/md3/{p-3d703571.entry.js.map → p-df417df4.entry.js.map} +0 -0
- /package/dist/md3/{p-cb498d56.entry.js.map → p-e3704fc4.entry.js.map} +0 -0
- /package/dist/md3/{p-3d90a202.entry.js.map → p-e67f228c.entry.js.map} +0 -0
- /package/dist/md3/{p-5ec552ec.entry.js.map → p-e86abc6c.entry.js.map} +0 -0
- /package/dist/md3/{p-19aea41a.entry.js.map → p-edf74454.entry.js.map} +0 -0
- /package/dist/md3/{p-e2b5d561.entry.js.map → p-f4f64aa2.entry.js.map} +0 -0
- /package/dist/md3/{p-2a220f40.entry.js.map → p-f7abc084.entry.js.map} +0 -0
- /package/dist/md3/{p-2e1e04c6.entry.js.map → p-fcbdf4ba.entry.js.map} +0 -0
- /package/dist/md3/{p-b098f546.entry.js.map → p-ff41fc7e.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,d as n,t as o}from"./p-CspVD-eh.js";import{c as a,d as r,b as h,i as c,r as l,p as d}from"./p-B9jJRlnU.js";import{O as p,C as u,P as f,Q as m,c as y,g,h as b,j as x,s as v,n as M,o as A,R as _,y as k,S as C,T as w,U as P,V as z,w as F,a as R,W as L,X as S,b as $,p as D}from"./p-DJLHsp6c.js";import{d as I}from"./p-DoJOR0pW.js";import{b as E,a as j}from"./p-DnjAYLoh.js";function q(t,e){return{from:p(t,e.surface,.3),to:t}}function T(t,e,s){const i=t+e;const n=Math.min(t,i);const o=Math.max(t,i);const a=[];const r=[];for(const t of[n,o]){for(const e of[1,s]){a.push(Math.cos(t)*e);r.push(Math.sin(t)*e)}}const h=Math.PI/2;for(let t=Math.ceil(n/h);t*h<=o;t++){a.push(Math.cos(t*h));r.push(Math.sin(t*h))}return{x0:Math.min(...a),x1:Math.max(...a),y0:Math.min(...r),y1:Math.max(...r)}}function H(t,e,s){return U(t,e,s)||U(t,s,e)}function U(t,e,s){let i=s;let n=0;while(i>=0&&n++<32){if(i===e)return true;i=t[i]?.parent??-1}return false}function V(t,e,s){const i=e.labelMode??s;const n=e.valueFormatter(t.value);if(i==="name")return t.label;if(i==="both")return`${t.label} · ${n}`;return n}const W=12;const B=.52;const O=1.45;const N=.12;const J=.02;const K=7;const G=3;const Q=K+G;const X=3;const Y=.45;const Z=Math.PI/180;function tt(t,e){return t.length*e*.58}function et(t){const[e,s,i]=f(t);const n=.299*e+.587*s+.114*i;return n>.62?"rgba(0, 0, 0, 0.82)":"#ffffff"}function st(t,e){if(typeof t==="number")return Number.isFinite(t)&&t>=0?t:0;const s=t.trim();const i=parseFloat(s);if(!Number.isFinite(i)||i<0)return 0;return s.endsWith("%")?i/100*e:i}function it(t,e,s,i){const n=t.data.map(((t,e)=>({d:t,i:e}))).filter((t=>!t.d.hidden&&t.d.value>0&&(t.d.level??0)===0));const o=n.reduce(((t,e)=>t+e.d.value),0);const a=t.data.reduce(((t,e)=>Math.max(t,(e.level??0)+1)),1);const r=t.title?e.titleSize+12+(t.subtitle?e.labelSize+4:0):0;const h=t.legend&&t.legend!=="none"&&t.data.length>1?t.legend:null;const c=h?Math.max(0,...t.data.map((t=>tt(t.label,e.labelSize)))):0;let l=8;let d=8;let f=8+r;let y=8;if(h){const i=h==="left"||h==="right";if(i){const e=t.legendExtent!=null?t.legendExtent+16:c+30;const i=Math.min(e,s*m);if(h==="left")l+=i;else d+=i}else{let i=t.legendExtent!=null?t.legendExtent+8:0;if(t.legendExtent==null){const n=Math.max(60,s*.86);let o=1;let a=0;for(const s of t.data){const t=tt(s.label,e.labelSize)+28;if(a>0&&a+t>n){o++;a=t}else a+=t}i=o*(e.labelSize+8)+6}if(h.startsWith("bottom"))y+=i;else f+=i}}const g={x:l,y:f,width:Math.max(1,s-l-d),height:Math.max(1,i-f-y)};const b=-t.startAngleDeg*Z;const x=-(t.endAngleDeg-t.startAngleDeg)*Z;const v=(()=>{const e=st(t.innerRadius,100);const s=st(t.outerRadius,100);return s>0?Math.max(0,Math.min(.95,e/s)):0})();const M=Math.abs(x)<Math.PI*2-.02;const A=M?T(b,x,v):{x0:-1,x1:1,y0:-1,y1:1};const _=Math.max(1,Math.min(g.width/Math.max(.01,A.x1-A.x0),g.height/Math.max(.01,A.y1-A.y0)));const k=g.x+g.width/2-(A.x0+A.x1)/2*_;const C=g.y+g.height/2-(A.y0+A.y1)/2*_;const w=(()=>{if(!t.showLabels||h)return 6;const s=n.reduce(((e,s)=>Math.max(e,V(s.d,t,"both").length)),0);const i=st(t.outerRadius,_);const o=12+s*e.labelSize*B;const a=Math.max(.05,i/Math.max(1,_));return Math.max(6,Math.min(_*.45,(i+o-_)/a))})();const P=Math.max(8,_-w);const z=Math.max(1,Math.min(st(t.outerRadius,P),P));const F=Math.max(0,Math.min(st(t.innerRadius,P),z-2));const R=Array.from({length:a},((e,s)=>{const i=t.ringWidths?.[s];return Number.isFinite(i)&&i>0?i:s<a-1?O:1}));const L=R.reduce(((t,e)=>t+e),0)||1;const S=z-F;const $=a>1?Math.min(X,S/a*.3):0;const D=Math.max(1,S-$*(a-1));const I=t=>D*R[t]/L;const E=(()=>{const t=[];let e=F;for(let s=0;s<a;s++){t.push(e);e+=I(s)+(s<a-1?$:0)}return t})();const j=t=>E[t]??F;const U=t=>j(t)+I(t);const it=new Map;const nt=new Set;for(const e of t.data)if(e.parent!=null&&e.parent>=0)nt.add(e.parent);const ot=(e,s)=>{const i=nt.has(s)?U(e):z;const n=t.data[s]?.radius;if(n==null)return i;const o=j(e);return o+(i-o)*Math.max(.15,Math.min(1,n))};const at=x>=0?1:-1;const rt=n.length?Math.min(t.paddingAngleDeg*Z*n.length,Math.abs(x)*.9):0;const ht=n.length?rt/n.length:0;const ct=x-at*rt;const lt=[];const dt=[];const pt=[];const ut=[];let ft=b;const mt=t.sliceStroke??e.surface;const yt=n.length>1?t.sliceStrokeWidth??1:0;const gt=(()=>{if(F>0||yt<=0||n.length<2)return 0;const e=yt/2;const s=n.reduce(((t,e)=>t+Math.max(0,e.d.value)),0)||1;const i=Math.abs(-(t.endAngleDeg-t.startAngleDeg)*Z);let o=0;for(const t of n){const n=Math.max(0,t.d.value)/s*i;if(n>.001)o=Math.max(o,e/Math.sin(Math.min(n,Math.PI)/2))}return Math.min(o,z*.04,4)})();const bt=[];const xt=(t,e,s,i,n,o)=>{const a=K*Mt;const r=G*Mt;const h=s+r+a/2;const c=(h>0?a/2/h:0)*vt;bt.push({cx:t,cy:e,innerR:s+r,outerR:s+r+a,startAngle:i+c,endAngle:n-c,color:o,dataIndex:-1,pill:true})};const vt=at;const Mt=Math.max(0,Math.min(1,t.highlightT??1));const At=t.highlight!=="none"&&t.highlightIndex!=null&&t.highlightIndex>=0;const _t=[];{let t=0;for(const{d:e}of n){const s=o>0?e.value/o:0;_t.push(t+s/2);t+=s}}const kt=n.findIndex((e=>e.i===t.highlightIndex));const Ct=At?t.data[t.highlightIndex??-1]?.level??0:Infinity;const wt=t=>{if(kt<0)return Mt;const e=Math.abs(_t[t]-_t[kt]);const s=Math.min(e,1-e)*2;const i=s*Y;return Math.max(0,Math.min(1,(Mt-i)/(1-i||1)))};const Pt=new Map;n.forEach((({d:s,i},n)=>{const r=wt(n);const c=o>0?s.value/o:0;const l=ct*c;const d=ft+at*ht/2;const u=d+l;ft=u+at*ht/2;const f=(d+u)/2;const m=At&&(t.highlightIndex===i||t.highlight==="series");const y=At&&H(t.data,i,t.highlightIndex??-1);const g=(s.selectT??(s.selected?1:0))*W;const b=k+Math.cos(f)*g;const x=C+Math.sin(f)*g;Pt.set(i,{x:b-k,y:x-C});const v=At&&!m&&!y&&r>0?p(s.color,e.surface,.62*r):s.color;if(m&&Mt>0)xt(b,x,ot(0,i),d,u,s.color);lt.push({cx:b,cy:x,innerR:Math.max(j(0),gt),outerR:ot(0,i),startAngle:d,endAngle:u,color:v,dataIndex:i,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?q(s.color,e):undefined});it.set(i,{a0:d,a1:u});const M=!!h||a>1;if(t.showLabels&&Math.abs(l)>(M?N:J)){if(M){const n=j(0);const o=ot(0,i);const r=n>0?(n+o)/2:o*.62;dt.push({x:b+Math.cos(f)*r,y:x+Math.sin(f)*r,text:V(s,t,a>1?"name":"value"),color:et(v),fontSize:e.labelSize,align:"center",baseline:"middle",key:`pl-${i}`})}else{ut.push({key:`pl-${i}`,text:V(s,t,"both"),x1:b+Math.cos(f)*ot(0,i),y1:x+Math.sin(f)*ot(0,i),x:b+Math.cos(f)*(z+12),y:x+Math.sin(f)*(z+12),right:Math.cos(f)>=0})}}}));for(let s=1;s<a;s++){const i=t.data.map(((t,e)=>({d:t,i:e}))).filter((t=>(t.d.level??0)===s&&!t.d.hidden));const n=new Map;for(const t of i){const e=t.d.parent??-1;if(!n.has(e))n.set(e,[]);n.get(e).push(t)}for(const[i,o]of n){const n=it.get(i);if(!n)continue;const r=o.reduce(((t,e)=>t+Math.max(0,e.d.value)),0);if(r<=0)continue;const h=n.a1-n.a0;let c=n.a0;for(const{d:n,i:l}of o){const o=c;const d=o+h*(Math.max(0,n.value)/r);c=d;it.set(l,{a0:o,a1:d});const u=s>Ct?Q*Mt:0;const f=j(s)+u;const m=ot(s,l)+u;const y=kt<0||t.highlightIndex===l||H(t.data,l,t.highlightIndex??-1);const g=(n.selectT??(n.selected?1:0))*W;const b=(o+d)/2;const x=Pt.get(i)??{x:0,y:0};const v=x.x+Math.cos(b)*g;const M=x.y+Math.sin(b)*g;Pt.set(l,{x:v,y:M});lt.push({cx:k+v,cy:C+M,innerR:f,outerR:m,startAngle:o,endAngle:d,color:At&&!y&&Mt>0?p(n.color,e.surface,.62*Mt):n.color,dataIndex:l,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?q(n.color,e):undefined});if(At&&t.highlightIndex===l&&Mt>0){xt(k+v,C+M,m,o,d,n.color)}const A=(o+d)/2;if(t.showLabels&&Math.abs(d-o)>J&&s===a-1){ut.push({key:`pl-${l}`,text:V(n,t,"both"),x1:k+v+Math.cos(A)*m,y1:C+M+Math.sin(A)*m,x:k+v+Math.cos(A)*(m+12),y:C+M+Math.sin(A)*(m+12),right:Math.cos(A)>=0})}}}}if(ut.length){const t=e.labelSize*1.45;for(const e of[true,false]){const s=ut.filter((t=>t.right===e)).sort(((t,e)=>t.y-e.y));if(!s.length)continue;for(let e=1;e<s.length;e++){if(s[e].y-s[e-1].y<t)s[e].y=s[e-1].y+t}const n=s[s.length-1].y-(i-t/2);if(n>0)for(const t of s)t.y-=n;const o=t/2-s[0].y;if(o>0)for(const t of s)t.y+=o}for(const t of ut){const i=t.right?s-6-t.x:t.x-6;const n=Math.max(3,Math.floor(i/(e.labelSize*B)));const o=t.text.length>n?`${t.text.slice(0,n-1)}…`:t.text;pt.push({x1:t.x1,y1:t.y1,x2:t.x,y2:t.y,color:e.gridLineColor,width:1});dt.push({x:t.x+(t.right?3:-3),y:t.y,text:o,color:e.textColorMuted,fontSize:e.labelSize,align:t.right?"start":"end",baseline:"middle",key:t.key})}}lt.push(...bt);if(t.title){const i=u(t.titleAlign,12,s-24);dt.push({x:i.x,y:6,text:t.title,color:e.textColor,fontSize:e.titleSize,fontWeight:600,align:i.align,baseline:"top",key:"title"});if(t.subtitle){dt.push({x:i.x,y:6+e.titleSize+4,text:t.subtitle,color:e.textColorMuted,fontSize:e.labelSize,align:i.align,baseline:"top",key:"subtitle"})}}const zt=h?t.data.map(((t,e)=>({label:t.label,color:t.color,seriesIndex:e,hidden:!!t.hidden,x:0,y:0}))):[];return{width:s,height:i,plot:g,background:e.background==="transparent"?undefined:e.background,gridlines:pt,axisLines:[],areas:[],bars:[],slices:lt,lines:[],markers:[],texts:dt,legend:zt,legendPosition:h??undefined,pieCenter:{x:k,y:C},...(()=>{const t=M?T(b,x,0):{x0:-1,x1:1,y0:-1,y1:1};const e=F/Math.SQRT2;return{pieHoleSize:F>0?(t.x1-t.x0)*e:0,pieHoleHeight:F>0?(t.y1-t.y0)*e:0,pieCenterSlot:{x:k+(t.x0+t.x1)/2*e,y:C+(t.y0+t.y1)/2*e}}})(),xPositions:[],xValues:[],xLabels:[],hoverPoints:[]}}const nt=260;const ot=520;const at=450;const rt=.16;const ht=300;const ct=.8;class lt{constructor(t){this.container=t;this.ctx=null;this.spec=null;this.theme=null;this.scene=null;this.cb={};this.hoverRaf=0;this.hoverIndex=-1;this.hasRendered=false;this.introRaf=0;this.pendingDrill=null;this.drillRun=null;this.ripple=null;this.rippleRaf=0;this.dpr=1;this.selectRaf=0;this.lastW=0;this.lastH=0;this.dprWatch=y((()=>this.render()));this.hoverT=0;this.hoverTweenRaf=0;this.handlePointerMove=t=>{if(!this.scene)return;const e=this.canvas.getBoundingClientRect();const s=t.clientX-e.left;const i=t.clientY-e.top;if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.hoverRaf=requestAnimationFrame((()=>{this.hoverRaf=0;const t=this.sliceAt(s,i);const e=t?t.dataIndex:-1;this.canvas.style.cursor=t?"pointer":"";if(e!==this.hoverIndex){this.hoverIndex=e;this.tweenHover();this.cb.onHover?.(e)}this.renderTooltip(e,s,i)}))};this.handlePointerLeave=()=>{if(this.hoverRaf){cancelAnimationFrame(this.hoverRaf);this.hoverRaf=0}this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.canvas.style.cursor="";this.tweenHover();this.cb.onHover?.(-1)}};this.handlePointerDown=t=>{const e=this.canvas.getBoundingClientRect();const s=t.clientX-e.left;const i=t.clientY-e.top;const n=this.sliceAt(s,i);if(n)this.startRipple(s,i,n)};this.handleClick=t=>{const e=this.canvas.getBoundingClientRect();const s=this.sliceAt(t.clientX-e.left,t.clientY-e.top);if(!s)return;this.cb.onPointClick?.(0,s.dataIndex,t);this.toggleSelected(s.dataIndex)};this.onLegendToggle=t=>{if(this.spec){const e=this.spec.data[t.seriesIndex];if(e){e.hidden=!e.hidden;this.hasRendered=false;this.render();this.cb.onLegendClick?.({...t,hidden:!!e.hidden});return}}this.cb.onLegendClick?.(t)};if(getComputedStyle(t).position==="static")t.style.position="relative";this.canvas=document.createElement("canvas");this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block";this.canvas.setAttribute("part","plot-canvas");this.overlay=document.createElement("div");this.overlay.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";this.legendLayer=document.createElement("div");this.legendLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:visible";this.hoverLayer=document.createElement("div");this.hoverLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";t.append(this.canvas,this.overlay,this.legendLayer,this.hoverLayer);this.ctx=this.canvas.getContext("2d");this.canvas.addEventListener("pointermove",this.handlePointerMove);this.canvas.addEventListener("pointerleave",this.handlePointerLeave);this.canvas.addEventListener("click",this.handleClick);this.canvas.addEventListener("pointerdown",this.handlePointerDown)}getScene(){return this.scene}getHoleBox(){return{width:this.scene?.pieHoleSize??0,height:this.scene?.pieHoleHeight??0}}getCenter(){if(!this.scene)return null;const t=this.scene.pieCenterSlot;if(t)return{x:t.x,y:t.y};return{x:this.scene.plot.x+this.scene.plot.width/2,y:this.scene.plot.y+this.scene.plot.height/2}}setTooltip(t){this.tooltipRender=t.render}setSpec(t,e,s={}){const i=this.spec?.data;const n=!i||i.length!==t.data.length||i.some(((e,s)=>e.label!==t.data[s]?.label||e.value!==t.data[s]?.value));this.spec=t;this.theme=e;this.cb=s;if(n&&this.hoverIndex!==-1){this.hoverIndex=-1;this.spec.highlightIndex=-1;g(this.hoverLayer)}this.render()}resize(){const t=this.container.getBoundingClientRect();if(Math.round(t.width)===this.lastW&&Math.round(t.height)===this.lastH)return;this.render()}toDataURL(t="image/png"){return this.canvas.toDataURL(t)}dispose(){if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.stopIntro();cancelAnimationFrame(this.hoverTweenRaf);cancelAnimationFrame(this.rippleRaf);cancelAnimationFrame(this.selectRaf);cancelAnimationFrame(this.selectRaf);this.canvas.removeEventListener("pointermove",this.handlePointerMove);this.canvas.removeEventListener("pointerleave",this.handlePointerLeave);this.canvas.removeEventListener("click",this.handleClick);this.canvas.removeEventListener("pointerdown",this.handlePointerDown);this.dprWatch.dispose();this.canvas.remove();this.overlay.remove();this.hoverLayer.remove();this.spec=null;this.scene=null;this.drillRun=null}render(){if(!this.spec||!this.theme)return;this.dprWatch.update();const t=this.container.getBoundingClientRect();const e=Math.round(t.width);const s=Math.round(t.height);if(e<2||s<2)return;this.lastW=e;this.lastH=s;const i=Math.min(window.devicePixelRatio||1,4);this.dpr=i;this.canvas.width=e*i;this.canvas.height=s*i;this.spec.highlightIndex=this.hoverIndex;this.spec.highlightT=this.hoverT;this.layoutAndOverlay(e,s);const n=this.overlay.querySelector('[part="legend"]');if(n&&this.spec.legend&&this.spec.legend!=="none"){const t=this.spec.legend==="left"||this.spec.legend==="right";const i=t?n.offsetWidth:n.offsetHeight;if(i>0&&Math.abs((this.spec.legendExtent??-1)-i)>2){this.spec.legendExtent=i;this.layoutAndOverlay(e,s)}}if(!this.scene)return;const{variant:o,duration:a}=x(this.spec);const r=this.pendingDrill;this.pendingDrill=null;if(r?.leaving&&o!=="none"&&!b()){this.hasRendered=true;this.playDrill(i,r.index,r.up,r.leaving);return}if(this.drillRun){this.hasRendered=true;this.clearIntroOpacity();this.drillFrame(i);return}const h=!this.hasRendered&&o!=="none"&&!b();const c=this.scene.slices.length>0;if(h){this.hasRendered=c;this.playIntro(i,o,a);return}this.hasRendered=this.hasRendered||c;this.stopIntro();this.drawGeometry(this.scene,i)}clearIntroOpacity(){this.canvas.style.opacity="";for(const t of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){t.style.transition="";t.style.opacity=""}}stopIntro(){cancelAnimationFrame(this.introRaf);this.introRaf=0;this.clearIntroOpacity()}drill(t,e="down"){this.pendingDrill=this.scene?{index:t,up:e==="up",leaving:this.scene}:null}replay(){this.hasRendered=false;this.render()}layoutAndOverlay(t,e){if(!this.spec||!this.theme)return;this.scene=it(this.spec,this.theme,t,e);v(this.overlay,this.scene,this.theme.fontFamily,{onLegendClick:this.onLegendToggle},false,this.legendLayer)}drawGeometry(t,e){if(this.ctx){this.ctx.setTransform(e,0,0,e,0,0);M(this.ctx,t)}}paceLabels(t){for(const e of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){e.style.transition="opacity 180ms ease";e.style.opacity=t>=ct?"":"0"}}playIntro(t,e,s){const i=this.scene;if(!i)return;this.stopIntro();const n=t=>{this.canvas.style.opacity=t<1?String(t):""};n(A(e,i,0).alpha);this.paceLabels(0);let o=0;const a=r=>{if(!o)o=r;const h=(r-o)/s;if(h>=1){n(1);this.paceLabels(1);this.drawGeometry(i,t);return}this.paceLabels(h);const{scene:c,alpha:l}=A(e,i,h);n(l);this.drawGeometry(c,t);this.introRaf=requestAnimationFrame(a)};this.introRaf=requestAnimationFrame(a)}playDrill(t,e,s,i){if(!this.scene)return;this.stopIntro();this.drillRun={index:e,up:s,frozen:i,start:performance.now()};const n=()=>{if(!this.drillRun)return;if(this.drillFrame(t))return;this.introRaf=requestAnimationFrame(n)};n()}drillFrame(t){const e=this.drillRun;const s=this.scene;if(!e||!s)return true;const i=(performance.now()-e.start)/ot;if(i>=1){this.drillRun=null;this.paceLabels(1);this.drawGeometry(s,t);return true}this.paceLabels(i);const n=t=>{const e=t.slices?.find((t=>t.dataIndex>=0))??t.slices?.[0];return e?{x:e.cx,y:e.cy}:null};const o=(t,e,s)=>!e&&!s?t:{...t,slices:(t.slices??[]).map((t=>({...t,cx:t.cx+e,cy:t.cy+s})))};const a=n(s);const r=n(e.frozen);const h=a&&r?o(e.frozen,a.x-r.x,a.y-r.y):e.frozen;const c=e.up?s:h;const l=e.up?h:s;const d=z(i);const p=_(c,l,e.index,e.up?1-d:d);if(!p)return true;if(!this.ctx)return false;this.ctx.setTransform(t,0,0,t,0,0);M(this.ctx,this.withRipple(p.base));this.ctx.globalAlpha=p.overAlpha;M(this.ctx,p.over,false);this.ctx.globalAlpha=1;return false}sliceAt(t,e){if(!this.scene)return null;for(const s of this.scene.slices){if(dt(t,e,s,s.cx,s.cy))return s}return null}focusIndex(t){if(!this.scene)return;if(t<0){this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.tweenHover()}return}const e=this.scene.slices.find((e=>e.dataIndex===t));if(!e)return;if(this.hoverIndex!==t){this.hoverIndex=t;this.tweenHover()}const s=(e.startAngle+e.endAngle)/2;const i=(e.innerR+e.outerR)/2;this.renderTooltip(t,e.cx+Math.cos(s)*i,e.cy+Math.sin(s)*i)}tweenHover(){const t=this.hoverIndex>=0?1:0;if(b()){this.hoverT=t;this.render();return}cancelAnimationFrame(this.hoverTweenRaf);const e=this.hoverT;if(e===t){this.render();return}const s=performance.now();const i=n=>{const o=Math.min(1,(n-s)/nt);this.hoverT=e+(t-e)*P(o);this.render();if(o<1)this.hoverTweenRaf=requestAnimationFrame(i)};this.hoverTweenRaf=requestAnimationFrame(i)}activate(t){const e=this.scene?.slices.find((e=>!e.pill&&e.dataIndex===t));if(!e)return;const s=(e.startAngle+e.endAngle)/2;const i=(e.innerR+e.outerR)/2;this.startRipple(e.cx+Math.cos(s)*i,e.cy+Math.sin(s)*i,e);this.toggleSelected(t)}startRipple(t,e,s){if(b())return;const i=[s.startAngle,s.endAngle].flatMap((i=>[s.innerR,s.outerR].map((n=>Math.hypot(s.cx+Math.cos(i)*n-t,s.cy+Math.sin(i)*n-e)))));this.ripple={dataIndex:s.dataIndex,x:t,y:e,max:Math.max(...i,1),color:k(s.color),start:performance.now()};cancelAnimationFrame(this.rippleRaf);const n=()=>{if(!this.ripple)return;if((performance.now()-this.ripple.start)/at>=1){this.ripple=null;if(!this.drillRun&&this.scene)this.drawGeometry(this.scene,this.dpr);return}if(!this.drillRun&&this.scene)this.drawGeometry(this.withRipple(this.scene),this.dpr);this.rippleRaf=requestAnimationFrame(n)};this.rippleRaf=requestAnimationFrame(n)}withRipple(t){const e=this.ripple;if(!e)return t;const s=Math.min(1,(performance.now()-e.start)/at);return{...t,ripple:{dataIndex:e.dataIndex,x:e.x,y:e.y,radius:e.max*C(s),color:e.color,alpha:rt*(1-Math.max(0,(s-.35)/.65))}}}toggleSelected(t){const e=this.spec?.data;if(!e?.[t])return;const s=e.map((t=>t.selectT??(t.selected?1:0)));const i=!!e[t].selected;e.forEach(((e,s)=>{e.selected=s===t&&!i}));const n=e.map((t=>t.selected?1:0));if(s.every(((t,e)=>t===n[e])))return;if(b()){e.forEach(((t,e)=>t.selectT=n[e]));this.render();return}cancelAnimationFrame(this.selectRaf);const o=performance.now();const a=t=>{const i=Math.min(1,(t-o)/ht);const r=P(i);e.forEach(((t,e)=>{t.selectT=s[e]+(n[e]-s[e])*r}));this.render();if(i<1)this.selectRaf=requestAnimationFrame(a)};this.selectRaf=requestAnimationFrame(a)}renderTooltip(t,e,s){this.hoverLayer.textContent="";if(t<0||!this.spec||!this.theme||!this.scene)return;const i=this.spec.data[t];if(!i)return;const n=this.spec.data.reduce(((t,e)=>e.hidden||e.level!==i.level||e.parent!==i.parent?t:t+e.value),0);const o=n>0?i.value/n*100:0;const a=document.createElement("div");a.setAttribute("part","tooltip");a.style.cssText=["position:absolute","pointer-events:none","background:var(--md-sys-color-surface-container-high, #ECE6F0)","color:var(--md-sys-color-on-surface, #1C1B1F)","border-radius:8px","padding:8px 10px","box-shadow:0 2px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.2)",`font:400 ${this.theme.labelSize}px ${this.theme.fontFamily}`,"white-space:nowrap","z-index:2"].join(";");if(this.tooltipRender){const o=n;const r=this.tooltipRender({dataIndex:t,axisValue:i.label,axisLabel:i.label,focusedSeriesIndex:t,missing:[],series:this.spec.data.map(((e,s)=>({seriesIndex:s,label:e.label,color:e.color,value:e.value,formattedValue:this.spec.valueFormatter(e.value),percent:o>0?e.value/o*100:0,focused:s===t,missing:false})))});if(r!=null){w(a,r);this.hoverLayer.appendChild(a);this.placeTooltip(a,e,s)}return}const r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:8px;line-height:1.5";const h=document.createElement("span");h.style.cssText=`width:10px;height:10px;border-radius:3px;background:${i.color};flex:none`;const c=document.createElement("span");c.textContent=i.label;c.style.cssText="flex:1";const l=document.createElement("strong");l.textContent=`${this.spec.valueFormatter(i.value)} (${o.toFixed(1)}%)`;r.append(h,c,l);a.appendChild(r);this.hoverLayer.appendChild(a);this.placeTooltip(a,e,s)}placeTooltip(t,e,s){if(!this.scene)return;const i=t.offsetWidth||120;const n=t.offsetHeight||40;let o=e+14;if(o+i>this.scene.width-4)o=e-i-14;const a=Math.max(4,Math.min(s-n/2,this.scene.height-n-4));t.style.left=`${Math.max(4,o)}px`;t.style.top=`${a}px`}}function dt(t,e,s,i,n){const o=t-i;const a=e-n;const r=Math.hypot(o,a);if(r<s.innerR||r>s.outerR)return false;const h=Math.min(s.startAngle,s.endAngle);const c=Math.max(s.startAngle,s.endAngle);const l=Math.PI*2;let d=(Math.atan2(a,o)-h)%l;if(d<0)d+=l;return d<=c-h}const pt=()=>`:host(:not([data-awc-motion-ready])),:host(:not([data-awc-motion-ready]))::before,:host(:not([data-awc-motion-ready]))::after,:host(:not([data-awc-motion-ready])) *,:host(:not([data-awc-motion-ready])) *::before,:host(:not([data-awc-motion-ready])) *::after{transition-property:none !important}`;const ut=()=>`:host{--_block-size:var(--md-pie-chart-block-size, auto);--_min-block-size:var(--md-pie-chart-min-block-size, max(140px, calc(200px + var(--md-sys-density-scale, 0) * 12px)));--_aspect-ratio:var(--md-pie-chart-aspect-ratio, 1 / 1);--_background:var(--md-pie-chart-background, var(--md-sys-color-surface-container-low, #F7F2FA));--_padding:var(--md-pie-chart-padding, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_shape:var(--md-pie-chart-shape, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_empty-color:var(--md-pie-chart-empty-color, var(--md-sys-color-on-surface-variant, #49454F));--_empty-background:var(--md-pie-chart-empty-background, var(--_background));--_empty-font:var(--md-pie-chart-empty-font, var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif));--_empty-font-size:var(--md-pie-chart-empty-font-size, var(--md-sys-typescale-body-medium-font-size, 14px));--_empty-icon-size:var(--md-pie-chart-empty-icon-size, 40px);--_center-color:var(--md-pie-chart-center-color, var(--md-sys-color-on-surface, #1C1B1F));display:block;position:relative;inline-size:100%;block-size:var(--_block-size);min-block-size:var(--_min-block-size);background:var(--_background);padding:var(--_padding);border-radius:var(--_shape);box-sizing:border-box;min-inline-size:0;aspect-ratio:var(--_aspect-ratio)}.md-pie-chart__header,.md-pie-chart__footer{display:contents}.md-pie-chart__header>slot[name='header']::slotted(*),.md-pie-chart__footer>slot[name='footer']::slotted(*){display:block;margin-block:8px}.md-pie-chart__canvas{position:absolute;inset:var(--_padding);min-block-size:0;min-inline-size:0}.md-pie-chart__center{position:absolute;top:var(--_pie-center-y, 50%);left:var(--_pie-center-x, 50%);transform:translate(-50%, -50%);pointer-events:none;color:var(--_center-color);text-align:center;font-family:var(--md-sys-typescale-headline-small-font-family, Roboto, system-ui, sans-serif);font-variant-numeric:tabular-nums;display:flex;align-items:center;justify-content:center;max-width:var(--md-pie-center-max-width, var(--_pie-hole, none));max-height:var(--md-pie-center-max-height, var(--_pie-hole-h, none))}.md-pie-chart__center>slot[name='center']::slotted(*){pointer-events:auto}.md-pie-chart__empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background);border-radius:var(--_shape);color:var(--_empty-color);font-family:var(--_empty-font);font-size:var(--_empty-font-size);line-height:var(--md-sys-typescale-body-medium-line-height, 20px);pointer-events:none;text-align:center}.md-pie-chart__empty ::slotted(.material-symbols-outlined),.md-pie-chart__empty ::slotted(.material-symbols-rounded),.md-pie-chart__empty ::slotted(.material-symbols-sharp),.md-pie-chart__empty ::slotted(.material-icons){font-size:var(--_empty-icon-size) !important;line-height:1;opacity:0.55}.md-pie-chart__a11y-table{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media (forced-colors: active){:host{forced-color-adjust:auto}}.md-pie-chart__loading{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background, var(--_background));border-radius:var(--_shape);color:var(--_empty-color);text-align:center}.md-pie-chart__spinner{inline-size:40px;block-size:40px}.md-pie-chart__canvas:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:-3px;border-radius:4px}.md-pie-chart__live{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}[part='legend'] button:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:2px;border-radius:6px}: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}:host([hidden]){display:none !important}`;function ft(t,e){if(t.includes(e))return t;for(const s of t){if(s.children?.length){const t=ft(s.children,e);if(t)return t}}return null}const mt=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdSliceClick=s(this,"mdSliceClick",7);this.mdLegendClick=s(this,"mdLegendClick",7);this.mdReady=s(this,"mdReady",7);this.label="";this.titleAlign="start";this.data=[];this.innerRadius="0%";this.outerRadius="75%";this.startAngle=90;this.endAngle=-270;this.paddingAngle=0;this.cornerRadius=4;this.showLabels=true;this.gradient=false;this.highlight="slice";this.legend="right";this.tooltip="item";this.locale="";this.summary="";this.labelEmpty="No data to display";this.loading=false;this.loadingLabel="Loading chart…";this.labelPlot="Chart data. Use the arrow keys to move between slices, Home and End for the first and last, Escape to leave.";this.labelPoint="%label%: %value% (%percent%)";this.noAnimation=false;this.animation="expressive";this.density=0;this.mounted=false;this.kbIndex=-1;this.announcement="";this.engine=null;this.ro=null;this.legendHidden=new Map;this.bindChartHost=t=>{this.chartHost=t};this.bindA11yTableHost=t=>{this.a11yTableHost=t};this.onPlotKeyDown=t=>{const e=this.flatDatums().length-1;if(e<0)return;const s=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const i=s?"ArrowLeft":"ArrowRight";const n=s?"ArrowRight":"ArrowLeft";let o=this.kbIndex;switch(t.key){case i:case"ArrowDown":o=this.kbIndex<0?0:Math.min(e,this.kbIndex+1);break;case n:case"ArrowUp":o=this.kbIndex<0?e:Math.max(0,this.kbIndex-1);break;case"Home":o=0;break;case"End":o=e;break;case"Escape":if(this.kbIndex<0)return;o=-1;break;case"Enter":case" ":if(this.kbIndex<0)return;t.preventDefault();this.emitSliceClick(this.kbIndex,t);this.engine?.activate(this.kbIndex);return;default:return}t.preventDefault();this.moveKeyboardCursor(o)};this.onPlotBlur=()=>{if(this.kbIndex>=0)this.moveKeyboardCursor(-1)}}datumKeys(){const t=new Map;return this.flatDatums().map(((e,s)=>{const i=e.id!=null?`id:${e.id}`:e.label!=null?`label:${e.label}`:`pos:${s}`;const n=t.get(i)??0;t.set(i,n+1);return n===0?i:`${i}#${n}`}))}componentDidLoad(){try{this.initChart();this.disposeThemeWatch=F(this.el,(()=>this.applyEngine()))}finally{a(this)}}disconnectedCallback(){r(this);this.ro?.disconnect();this.ro=null;this.engine?.dispose();this.engine=null;this.disposeThemeWatch?.();this.disposeThemeWatch=undefined}onAnyPropChange(){this.applyEngine();this.rebuildA11yTable()}async refreshTheme(){this.applyEngine()}async resize(){this.engine?.resize()}async replay(){this.engine?.replay()}async drill(t,e="down"){this.engine?.drill(t,e)}async toDataURL(){return this.engine?.toDataURL("image/png")??""}async getInstance(){return this.engine}initChart(){this.makeEngine();this.applyEngine();this.rebuildA11yTable();this.mounted=true;this.mdReady.emit()}makeEngine(){if(!this.chartHost)return;this.ro?.disconnect();this.ro=null;this.engine?.dispose();try{this.engine=new lt(this.chartHost)}catch{this.engine=null}if(this.engine&&typeof ResizeObserver!=="undefined"){this.ro=new ResizeObserver((()=>{this.engine?.resize();this.updateCenterVars()}));this.ro.observe(this.chartHost)}}buildEngineTheme(t){return{background:t.background,textColor:t.textColor,textColorMuted:t.textColorMuted,axisLineColor:t.axisLineColor,gridLineColor:t.gridColor,surface:t.surface,fontFamily:t.fontFamily,labelSize:t.labelSize,titleSize:t.titleSize}}flatten(t,e){const s=this.datumKeys();const i=[];const n=this.monochrome!=null?R(this.el,this.monochrome||"primary",t.palette[0]):null;const o=(a,r,h,c)=>{a.forEach(((l,d)=>{const u=c!=null?p(c,t.surface,.18+d/Math.max(1,a.length)*.42):n!=null?p(n,t.surface,d/Math.max(1,a.length)*.7):e[d]??D(t.palette,d);const f=R(this.el,l.color,u);const m=i.length;i.push({label:l.label,value:l.value,color:f,selected:l.selected,radius:l.radius,hidden:l.hidden??this.legendHidden.get(s[m])??false,level:r,parent:h});if(l.children?.length)o(l.children,r+1,m,f)}))};o(this.data??[],0,undefined);return i}flatDatums(){const t=[];const e=s=>{for(const i of s){t.push(i);if(i.children?.length)e(i.children)}};e(this.data??[]);return t}buildSpec(t){const e=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const s=L(t.palette.slice(0,3),this.data.length,{light:t.surface,dark:t.textColor});return{data:this.flatten(t,s),title:this.label||undefined,subtitle:this.subtitle||undefined,titleAlign:this.titleAlign,innerRadius:this.innerRadius,outerRadius:this.outerRadius,startAngleDeg:this.startAngle,endAngleDeg:this.endAngle,paddingAngleDeg:this.paddingAngle,cornerRadius:this.cornerRadius,showLabels:this.showLabels,labelMode:this.labelMode,gradient:this.gradient,highlight:this.highlight,legend:e?S(this.legend):this.legend,ringWidths:this.ringWidths,valueFormatter:t=>this.formatValue(t),animation:this.noAnimation?"none":this.animation,animationDuration:this.animationDuration}}applyEngine(){if(!this.engine)return;const t=$(this.el);this.engine.setSpec(this.buildSpec(t),this.buildEngineTheme(t),{onLegendClick:t=>{const e=this.datumKeys()[t.seriesIndex];if(e!=null)this.legendHidden.set(e,!!t.hidden);this.mdLegendClick.emit({dataIndex:t.seriesIndex,selected:!t.hidden})},onPointClick:(t,e,s)=>this.emitSliceClick(e,s)});this.engine.setTooltip({render:this.tooltipRenderer});this.updateCenterVars()}updateCenterVars(){const t=this.engine?.getCenter();if(!t||!this.chartHost)return;const e=this.el.getBoundingClientRect();const s=this.chartHost.getBoundingClientRect();const i=s.left-e.left;const n=s.top-e.top;this.el.style.setProperty("--_pie-center-x",`${t.x+i}px`);this.el.style.setProperty("--_pie-center-y",`${t.y+n}px`);const o=this.engine?.getHoleBox();this.el.style.setProperty("--_pie-hole",o&&o.width>0?`${o.width}px`:"none");this.el.style.setProperty("--_pie-hole-h",o&&o.height>0?`${o.height}px`:"none")}rebuildA11yTable(){if(!this.a11yTableHost)return;const t=this.data.reduce(((t,e)=>t+e.value),0);const e=this.tableLabels??{};this.a11yTableHost.innerHTML=E({title:this.label,xAxisLabel:e.category??"Category",xAxisData:this.data.map((t=>t.label)),locale:this.locale,series:[{label:e.value??"Value",data:this.data.map((t=>t.value))},{label:e.share??"Share",data:this.data.map((e=>t>0?e.value/t*100:0))}],valueFormatter:t=>t==null?"—":this.formatValue(t)})}formatValue(t){return this.valueFormatter?this.valueFormatter(t):t.toLocaleString(this.locale||undefined)}emitSliceClick(t,e){const s=this.flatDatums()[t];if(!s)return;this.mdSliceClick.emit({seriesIndex:0,seriesId:s.id,dataIndex:t,value:s.value,nativeEvent:e,series:s})}moveKeyboardCursor(t){this.kbIndex=t;this.engine?.focusIndex(t);if(t<0){this.announcement="";return}const e=this.flatDatums();const s=e[t];if(!s)return;const i=this.data?.some((t=>t.children?.length))?ft(this.data??[],s)??e:e;const n=i.reduce(((t,e)=>t+e.value),0);const o=n>0?s.value/n*100:0;this.announcement=this.labelPoint.replace("%label%",s.label).replace("%value%",this.formatValue(s.value)).replace("%percent%",`${o.toLocaleString(this.locale||undefined,{maximumFractionDigits:1})}%`)}render(){const t=this.data.length===0&&!this.loading;const e=this.summary||j({title:this.label,chartType:"pie",seriesCount:this.data.length,locale:this.locale});return i(n,{key:"d6bafc72dcb4fe1023aa56b617670155505d1b7f",class:{"md-pie-chart":true,"md-pie-chart--empty":t,"md-pie-chart--mounted":this.mounted,"md-pie-chart--donut":this.innerRadius!=="0%"&&this.innerRadius!==0},role:"figure","aria-label":e,"aria-busy":this.loading?"true":null,style:this.heightProp?{blockSize:this.heightProp}:undefined},i("header",{key:"841199c41da5dfcbbe6d4337fb2e082bbb65f52d",class:"md-pie-chart__header",part:"header"},i("slot",{key:"a3af9ebcb23f36005ac75e5b8ef5f3365399cb49",name:"header"})),i("div",{key:"e420cccbf9af4c434dbc1d7aea13d4282dac9ddf",class:"md-pie-chart__canvas",part:"canvas",ref:t=>this.bindChartHost(t),tabindex:t?undefined:"0",role:t?undefined:"application","aria-label":t?undefined:this.labelPlot,onKeyDown:this.onPlotKeyDown,onBlur:this.onPlotBlur}),i("div",{key:"c41530062dd928a6d3a20577461f706ab9e771e0",class:"md-pie-chart__center",part:"center","aria-hidden":"true"},i("slot",{key:"2e97b657165d27224f4dc020ff3456a49e708c94",name:"center"})),t&&i("div",{key:"fe5ca0142d3a8837a3e2fadc01b1fb198d628bbf",class:"md-pie-chart__empty",part:"empty"},i("slot",{key:"4317eb251e309be6b4f3fab26e8b901ddcd323a7",name:"empty"},this.labelEmpty)),this.loading&&i("div",{key:"60f9989d8013136381b2b28a48eeddb6da42d15c",class:"md-pie-chart__loading",part:"loading",role:"status"},i("slot",{key:"fe516eea61998f62ddd479995308daeeb9fe46b0",name:"loader"},i("slot",{key:"c0c82a36832d2c73a08bf3fa1da467f10280810f",name:"loading"},i("md-progress-indicator",{key:"4f890f080a93b15cd8a121cd458355c332f19b37",class:"md-pie-chart__spinner",variant:"circular",indeterminate:true,label:this.loadingLabel}),i("span",{key:"7c1e162513542a32f8316c66c4135a79af572ee6",class:"md-pie-chart__loading-text"},this.loadingLabel)))),i("footer",{key:"a46d210c090f1fbe9bc3262bc4f7eaea294eec9f",class:"md-pie-chart__footer",part:"footer"},i("slot",{key:"655fc742ee41104860df8ff5ce8b3d8540aa24af",name:"footer"})),i("div",{key:"71d8ed2b47eebf66d7e44a22a6bbcf5336cd8eb8",class:"md-pie-chart__a11y-table",ref:t=>this.bindA11yTableHost(t)}),i("div",{key:"ede91f2f3a05199f2efc043541906b4c23f15bb1",class:"md-pie-chart__live",role:"status","aria-live":"polite","aria-atomic":"true"},this.announcement))}componentWillLoad(){h(this)}componentDidRender(){c(this)}connectedCallback(){l(this)}componentShouldUpdate(){d(this);return true}get el(){return this}static get watchers(){return{data:[{onAnyPropChange:0}],innerRadius:[{onAnyPropChange:0}],outerRadius:[{onAnyPropChange:0}],startAngle:[{onAnyPropChange:0}],endAngle:[{onAnyPropChange:0}],paddingAngle:[{onAnyPropChange:0}],cornerRadius:[{onAnyPropChange:0}],showLabels:[{onAnyPropChange:0}],labelMode:[{onAnyPropChange:0}],monochrome:[{onAnyPropChange:0}],gradient:[{onAnyPropChange:0}],highlight:[{onAnyPropChange:0}],legend:[{onAnyPropChange:0}],tooltip:[{onAnyPropChange:0}],label:[{onAnyPropChange:0}],titleAlign:[{onAnyPropChange:0}],animation:[{onAnyPropChange:0}],animationDuration:[{onAnyPropChange:0}],ringWidths:[{onAnyPropChange:0}],locale:[{onAnyPropChange:0}],subtitle:[{onAnyPropChange:0}],loading:[{onAnyPropChange:0}],valueFormatter:[{onAnyPropChange:0}]}}static get style(){return pt()+ut()}},[257,"md-pie-chart",{label:[1],titleAlign:[1,"title-align"],data:[16],innerRadius:[8,"inner-radius"],outerRadius:[8,"outer-radius"],startAngle:[2,"start-angle"],endAngle:[2,"end-angle"],paddingAngle:[2,"padding-angle"],cornerRadius:[2,"corner-radius"],showLabels:[4,"show-labels"],labelMode:[1,"label-mode"],monochrome:[1],gradient:[4],highlight:[1],legend:[513],tooltip:[1],locale:[1],subtitle:[1],summary:[1],tableLabels:[16],labelEmpty:[1,"label-empty"],loading:[4],loadingLabel:[1,"loading-label"],labelPlot:[1,"label-plot"],labelPoint:[1,"label-point"],tooltipRenderer:[16],valueFormatter:[16],ringWidths:[16],heightProp:[1,"height"],noAnimation:[4,"no-animation"],animation:[1],animationDuration:[2,"animation-duration"],density:[514],mounted:[32],kbIndex:[32],announcement:[32],refreshTheme:[64],resize:[64],replay:[64],drill:[64],toDataURL:[64],getInstance:[64]},undefined,{data:[{onAnyPropChange:0}],innerRadius:[{onAnyPropChange:0}],outerRadius:[{onAnyPropChange:0}],startAngle:[{onAnyPropChange:0}],endAngle:[{onAnyPropChange:0}],paddingAngle:[{onAnyPropChange:0}],cornerRadius:[{onAnyPropChange:0}],showLabels:[{onAnyPropChange:0}],labelMode:[{onAnyPropChange:0}],monochrome:[{onAnyPropChange:0}],gradient:[{onAnyPropChange:0}],highlight:[{onAnyPropChange:0}],legend:[{onAnyPropChange:0}],tooltip:[{onAnyPropChange:0}],label:[{onAnyPropChange:0}],titleAlign:[{onAnyPropChange:0}],animation:[{onAnyPropChange:0}],animationDuration:[{onAnyPropChange:0}],ringWidths:[{onAnyPropChange:0}],locale:[{onAnyPropChange:0}],subtitle:[{onAnyPropChange:0}],loading:[{onAnyPropChange:0}],valueFormatter:[{onAnyPropChange:0}]}]);function yt(){if(typeof customElements==="undefined"){return}const t=["md-pie-chart","md-progress-indicator"];t.forEach((t=>{switch(t){case"md-pie-chart":if(!customElements.get(o(t))){customElements.define(o(t),mt)}break;case"md-progress-indicator":if(!customElements.get(o(t))){I()}break}}))}yt();const gt=mt;const bt=yt;export{gt as MdPieChart,bt as defineCustomElement};
|
|
1
|
+
import{p as t,H as e,c as s,h as i,d as n,t as o}from"./p-t9lomFml.js";import{c as a,d as r,b as h,i as c,r as l,p as d}from"./p-D9C2BtN-.js";import{O as p,C as u,P as f,Q as m,c as y,g,h as b,j as x,s as v,n as M,o as A,R as _,y as k,S as C,T as w,U as P,V as z,w as F,a as R,W as L,X as S,b as $,p as D}from"./p-DJLHsp6c.js";import{d as I}from"./p-3GSjLPGH.js";import{b as E,a as j}from"./p-DnjAYLoh.js";function q(t,e){return{from:p(t,e.surface,.3),to:t}}function H(t,e,s){const i=t+e;const n=Math.min(t,i);const o=Math.max(t,i);const a=[];const r=[];for(const t of[n,o]){for(const e of[1,s]){a.push(Math.cos(t)*e);r.push(Math.sin(t)*e)}}const h=Math.PI/2;for(let t=Math.ceil(n/h);t*h<=o;t++){a.push(Math.cos(t*h));r.push(Math.sin(t*h))}return{x0:Math.min(...a),x1:Math.max(...a),y0:Math.min(...r),y1:Math.max(...r)}}function T(t,e,s){return B(t,e,s)||B(t,s,e)}function B(t,e,s){let i=s;let n=0;while(i>=0&&n++<32){if(i===e)return true;i=t[i]?.parent??-1}return false}function U(t,e,s){const i=e.labelMode??s;const n=e.valueFormatter(t.value);if(i==="name")return t.label;if(i==="both")return`${t.label} · ${n}`;return n}const V=12;const W=.52;const N=1.45;const O=.12;const G=.02;const K=7;const J=3;const Q=K+J;const X=3;const Y=.45;const Z=Math.PI/180;function tt(t,e){return t.length*e*.58}function et(t){const[e,s,i]=f(t);const n=.299*e+.587*s+.114*i;return n>.62?"rgba(0, 0, 0, 0.82)":"#ffffff"}function st(t,e){if(typeof t==="number")return Number.isFinite(t)&&t>=0?t:0;const s=t.trim();const i=parseFloat(s);if(!Number.isFinite(i)||i<0)return 0;return s.endsWith("%")?i/100*e:i}function it(t,e,s,i){const n=t.data.map(((t,e)=>({d:t,i:e}))).filter((t=>!t.d.hidden&&t.d.value>0&&(t.d.level??0)===0));const o=n.reduce(((t,e)=>t+e.d.value),0);const a=t.data.reduce(((t,e)=>Math.max(t,(e.level??0)+1)),1);const r=t.title?e.titleSize+12+(t.subtitle?e.labelSize+4:0):0;const h=t.legend&&t.legend!=="none"&&t.data.length>1?t.legend:null;const c=h?Math.max(0,...t.data.map((t=>tt(t.label,e.labelSize)))):0;let l=8;let d=8;let f=8+r;let y=8;if(h){const i=h==="left"||h==="right";if(i){const e=t.legendExtent!=null?t.legendExtent+16:c+30;const i=Math.min(e,s*m);if(h==="left")l+=i;else d+=i}else{let i=t.legendExtent!=null?t.legendExtent+8:0;if(t.legendExtent==null){const n=Math.max(60,s*.86);let o=1;let a=0;for(const s of t.data){const t=tt(s.label,e.labelSize)+28;if(a>0&&a+t>n){o++;a=t}else a+=t}i=o*(e.labelSize+8)+6}if(h.startsWith("bottom"))y+=i;else f+=i}}const g={x:l,y:f,width:Math.max(1,s-l-d),height:Math.max(1,i-f-y)};const b=-t.startAngleDeg*Z;const x=-(t.endAngleDeg-t.startAngleDeg)*Z;const v=(()=>{const e=st(t.innerRadius,100);const s=st(t.outerRadius,100);return s>0?Math.max(0,Math.min(.95,e/s)):0})();const M=Math.abs(x)<Math.PI*2-.02;const A=M?H(b,x,v):{x0:-1,x1:1,y0:-1,y1:1};const _=Math.max(1,Math.min(g.width/Math.max(.01,A.x1-A.x0),g.height/Math.max(.01,A.y1-A.y0)));const k=g.x+g.width/2-(A.x0+A.x1)/2*_;const C=g.y+g.height/2-(A.y0+A.y1)/2*_;const w=(()=>{if(!t.showLabels||h)return 6;const s=n.reduce(((e,s)=>Math.max(e,U(s.d,t,"both").length)),0);const i=st(t.outerRadius,_);const o=12+s*e.labelSize*W;const a=Math.max(.05,i/Math.max(1,_));return Math.max(6,Math.min(_*.45,(i+o-_)/a))})();const P=Math.max(8,_-w);const z=Math.max(1,Math.min(st(t.outerRadius,P),P));const F=Math.max(0,Math.min(st(t.innerRadius,P),z-2));const R=Array.from({length:a},((e,s)=>{const i=t.ringWidths?.[s];return Number.isFinite(i)&&i>0?i:s<a-1?N:1}));const L=R.reduce(((t,e)=>t+e),0)||1;const S=z-F;const $=a>1?Math.min(X,S/a*.3):0;const D=Math.max(1,S-$*(a-1));const I=t=>D*R[t]/L;const E=(()=>{const t=[];let e=F;for(let s=0;s<a;s++){t.push(e);e+=I(s)+(s<a-1?$:0)}return t})();const j=t=>E[t]??F;const B=t=>j(t)+I(t);const it=new Map;const nt=new Set;for(const e of t.data)if(e.parent!=null&&e.parent>=0)nt.add(e.parent);const ot=(e,s)=>{const i=nt.has(s)?B(e):z;const n=t.data[s]?.radius;if(n==null)return i;const o=j(e);return o+(i-o)*Math.max(.15,Math.min(1,n))};const at=x>=0?1:-1;const rt=n.length?Math.min(t.paddingAngleDeg*Z*n.length,Math.abs(x)*.9):0;const ht=n.length?rt/n.length:0;const ct=x-at*rt;const lt=[];const dt=[];const pt=[];const ut=[];let ft=b;const mt=t.sliceStroke??e.surface;const yt=n.length>1?t.sliceStrokeWidth??1:0;const gt=(()=>{if(F>0||yt<=0||n.length<2)return 0;const e=yt/2;const s=n.reduce(((t,e)=>t+Math.max(0,e.d.value)),0)||1;const i=Math.abs(-(t.endAngleDeg-t.startAngleDeg)*Z);let o=0;for(const t of n){const n=Math.max(0,t.d.value)/s*i;if(n>.001)o=Math.max(o,e/Math.sin(Math.min(n,Math.PI)/2))}return Math.min(o,z*.04,4)})();const bt=[];const xt=(t,e,s,i,n,o)=>{const a=K*Mt;const r=J*Mt;const h=s+r+a/2;const c=(h>0?a/2/h:0)*vt;bt.push({cx:t,cy:e,innerR:s+r,outerR:s+r+a,startAngle:i+c,endAngle:n-c,color:o,dataIndex:-1,pill:true})};const vt=at;const Mt=Math.max(0,Math.min(1,t.highlightT??1));const At=t.highlight!=="none"&&t.highlightIndex!=null&&t.highlightIndex>=0;const _t=[];{let t=0;for(const{d:e}of n){const s=o>0?e.value/o:0;_t.push(t+s/2);t+=s}}const kt=n.findIndex((e=>e.i===t.highlightIndex));const Ct=At?t.data[t.highlightIndex??-1]?.level??0:Infinity;const wt=t=>{if(kt<0)return Mt;const e=Math.abs(_t[t]-_t[kt]);const s=Math.min(e,1-e)*2;const i=s*Y;return Math.max(0,Math.min(1,(Mt-i)/(1-i||1)))};const Pt=new Map;n.forEach((({d:s,i},n)=>{const r=wt(n);const c=o>0?s.value/o:0;const l=ct*c;const d=ft+at*ht/2;const u=d+l;ft=u+at*ht/2;const f=(d+u)/2;const m=At&&(t.highlightIndex===i||t.highlight==="series");const y=At&&T(t.data,i,t.highlightIndex??-1);const g=(s.selectT??(s.selected?1:0))*V;const b=k+Math.cos(f)*g;const x=C+Math.sin(f)*g;Pt.set(i,{x:b-k,y:x-C});const v=At&&!m&&!y&&r>0?p(s.color,e.surface,.62*r):s.color;if(m&&Mt>0)xt(b,x,ot(0,i),d,u,s.color);lt.push({cx:b,cy:x,innerR:Math.max(j(0),gt),outerR:ot(0,i),startAngle:d,endAngle:u,color:v,dataIndex:i,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?q(s.color,e):undefined});it.set(i,{a0:d,a1:u});const M=!!h||a>1;if(t.showLabels&&Math.abs(l)>(M?O:G)){if(M){const n=j(0);const o=ot(0,i);const r=n>0?(n+o)/2:o*.62;dt.push({x:b+Math.cos(f)*r,y:x+Math.sin(f)*r,text:U(s,t,a>1?"name":"value"),color:et(v),fontSize:e.labelSize,align:"center",baseline:"middle",key:`pl-${i}`})}else{ut.push({key:`pl-${i}`,text:U(s,t,"both"),x1:b+Math.cos(f)*ot(0,i),y1:x+Math.sin(f)*ot(0,i),x:b+Math.cos(f)*(z+12),y:x+Math.sin(f)*(z+12),right:Math.cos(f)>=0})}}}));for(let s=1;s<a;s++){const i=t.data.map(((t,e)=>({d:t,i:e}))).filter((t=>(t.d.level??0)===s&&!t.d.hidden));const n=new Map;for(const t of i){const e=t.d.parent??-1;if(!n.has(e))n.set(e,[]);n.get(e).push(t)}for(const[i,o]of n){const n=it.get(i);if(!n)continue;const r=o.reduce(((t,e)=>t+Math.max(0,e.d.value)),0);if(r<=0)continue;const h=n.a1-n.a0;let c=n.a0;for(const{d:n,i:l}of o){const o=c;const d=o+h*(Math.max(0,n.value)/r);c=d;it.set(l,{a0:o,a1:d});const u=s>Ct?Q*Mt:0;const f=j(s)+u;const m=ot(s,l)+u;const y=kt<0||t.highlightIndex===l||T(t.data,l,t.highlightIndex??-1);const g=(n.selectT??(n.selected?1:0))*V;const b=(o+d)/2;const x=Pt.get(i)??{x:0,y:0};const v=x.x+Math.cos(b)*g;const M=x.y+Math.sin(b)*g;Pt.set(l,{x:v,y:M});lt.push({cx:k+v,cy:C+M,innerR:f,outerR:m,startAngle:o,endAngle:d,color:At&&!y&&Mt>0?p(n.color,e.surface,.62*Mt):n.color,dataIndex:l,cornerRadius:t.cornerRadius,gap:yt,gapColor:mt,gradient:t.gradient?q(n.color,e):undefined});if(At&&t.highlightIndex===l&&Mt>0){xt(k+v,C+M,m,o,d,n.color)}const A=(o+d)/2;if(t.showLabels&&Math.abs(d-o)>G&&s===a-1){ut.push({key:`pl-${l}`,text:U(n,t,"both"),x1:k+v+Math.cos(A)*m,y1:C+M+Math.sin(A)*m,x:k+v+Math.cos(A)*(m+12),y:C+M+Math.sin(A)*(m+12),right:Math.cos(A)>=0})}}}}if(ut.length){const t=e.labelSize*1.45;for(const e of[true,false]){const s=ut.filter((t=>t.right===e)).sort(((t,e)=>t.y-e.y));if(!s.length)continue;for(let e=1;e<s.length;e++){if(s[e].y-s[e-1].y<t)s[e].y=s[e-1].y+t}const n=s[s.length-1].y-(i-t/2);if(n>0)for(const t of s)t.y-=n;const o=t/2-s[0].y;if(o>0)for(const t of s)t.y+=o}for(const t of ut){const i=t.right?s-6-t.x:t.x-6;const n=Math.max(3,Math.floor(i/(e.labelSize*W)));const o=t.text.length>n?`${t.text.slice(0,n-1)}…`:t.text;pt.push({x1:t.x1,y1:t.y1,x2:t.x,y2:t.y,color:e.gridLineColor,width:1});dt.push({x:t.x+(t.right?3:-3),y:t.y,text:o,color:e.textColorMuted,fontSize:e.labelSize,align:t.right?"start":"end",baseline:"middle",key:t.key})}}lt.push(...bt);if(t.title){const i=u(t.titleAlign,12,s-24);dt.push({x:i.x,y:6,text:t.title,color:e.textColor,fontSize:e.titleSize,fontWeight:600,align:i.align,baseline:"top",key:"title"});if(t.subtitle){dt.push({x:i.x,y:6+e.titleSize+4,text:t.subtitle,color:e.textColorMuted,fontSize:e.labelSize,align:i.align,baseline:"top",key:"subtitle"})}}const zt=h?t.data.map(((t,e)=>({label:t.label,color:t.color,seriesIndex:e,hidden:!!t.hidden,x:0,y:0}))):[];return{width:s,height:i,plot:g,background:e.background==="transparent"?undefined:e.background,gridlines:pt,axisLines:[],areas:[],bars:[],slices:lt,lines:[],markers:[],texts:dt,legend:zt,legendPosition:h??undefined,pieCenter:{x:k,y:C},...(()=>{const t=M?H(b,x,0):{x0:-1,x1:1,y0:-1,y1:1};const e=F/Math.SQRT2;return{pieHoleSize:F>0?(t.x1-t.x0)*e:0,pieHoleHeight:F>0?(t.y1-t.y0)*e:0,pieCenterSlot:{x:k+(t.x0+t.x1)/2*e,y:C+(t.y0+t.y1)/2*e}}})(),xPositions:[],xValues:[],xLabels:[],hoverPoints:[]}}const nt=260;const ot=520;const at=450;const rt=.16;const ht=300;const ct=.8;class lt{constructor(t){this.container=t;this.ctx=null;this.spec=null;this.theme=null;this.scene=null;this.cb={};this.hoverRaf=0;this.hoverIndex=-1;this.hasRendered=false;this.introRaf=0;this.pendingDrill=null;this.drillRun=null;this.ripple=null;this.rippleRaf=0;this.dpr=1;this.selectRaf=0;this.lastW=0;this.lastH=0;this.dprWatch=y((()=>this.render()));this.hoverT=0;this.hoverTweenRaf=0;this.handlePointerMove=t=>{if(!this.scene)return;const e=this.canvas.getBoundingClientRect();const s=t.clientX-e.left;const i=t.clientY-e.top;if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.hoverRaf=requestAnimationFrame((()=>{this.hoverRaf=0;const t=this.sliceAt(s,i);const e=t?t.dataIndex:-1;this.canvas.style.cursor=t?"pointer":"";if(e!==this.hoverIndex){this.hoverIndex=e;this.tweenHover();this.cb.onHover?.(e)}this.renderTooltip(e,s,i)}))};this.handlePointerLeave=()=>{if(this.hoverRaf){cancelAnimationFrame(this.hoverRaf);this.hoverRaf=0}this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.canvas.style.cursor="";this.tweenHover();this.cb.onHover?.(-1)}};this.handlePointerDown=t=>{const e=this.canvas.getBoundingClientRect();const s=t.clientX-e.left;const i=t.clientY-e.top;const n=this.sliceAt(s,i);if(n)this.startRipple(s,i,n)};this.handleClick=t=>{const e=this.canvas.getBoundingClientRect();const s=this.sliceAt(t.clientX-e.left,t.clientY-e.top);if(!s)return;this.cb.onPointClick?.(0,s.dataIndex,t);this.toggleSelected(s.dataIndex)};this.onLegendToggle=t=>{if(this.spec){const e=this.spec.data[t.seriesIndex];if(e){e.hidden=!e.hidden;this.hasRendered=false;this.render();this.cb.onLegendClick?.({...t,hidden:!!e.hidden});return}}this.cb.onLegendClick?.(t)};if(getComputedStyle(t).position==="static")t.style.position="relative";this.canvas=document.createElement("canvas");this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block";this.canvas.setAttribute("part","plot-canvas");this.overlay=document.createElement("div");this.overlay.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";this.legendLayer=document.createElement("div");this.legendLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:visible";this.hoverLayer=document.createElement("div");this.hoverLayer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden";t.append(this.canvas,this.overlay,this.legendLayer,this.hoverLayer);this.ctx=this.canvas.getContext("2d");this.canvas.addEventListener("pointermove",this.handlePointerMove);this.canvas.addEventListener("pointerleave",this.handlePointerLeave);this.canvas.addEventListener("click",this.handleClick);this.canvas.addEventListener("pointerdown",this.handlePointerDown)}getScene(){return this.scene}getHoleBox(){return{width:this.scene?.pieHoleSize??0,height:this.scene?.pieHoleHeight??0}}getCenter(){if(!this.scene)return null;const t=this.scene.pieCenterSlot;if(t)return{x:t.x,y:t.y};return{x:this.scene.plot.x+this.scene.plot.width/2,y:this.scene.plot.y+this.scene.plot.height/2}}setTooltip(t){this.tooltipRender=t.render}setSpec(t,e,s={}){const i=this.spec?.data;const n=!i||i.length!==t.data.length||i.some(((e,s)=>e.label!==t.data[s]?.label||e.value!==t.data[s]?.value));this.spec=t;this.theme=e;this.cb=s;if(n&&this.hoverIndex!==-1){this.hoverIndex=-1;this.spec.highlightIndex=-1;g(this.hoverLayer)}this.render()}resize(){const t=this.container.getBoundingClientRect();if(Math.round(t.width)===this.lastW&&Math.round(t.height)===this.lastH)return;this.render()}toDataURL(t="image/png"){return this.canvas.toDataURL(t)}dispose(){if(this.hoverRaf)cancelAnimationFrame(this.hoverRaf);this.stopIntro();cancelAnimationFrame(this.hoverTweenRaf);cancelAnimationFrame(this.rippleRaf);cancelAnimationFrame(this.selectRaf);cancelAnimationFrame(this.selectRaf);this.canvas.removeEventListener("pointermove",this.handlePointerMove);this.canvas.removeEventListener("pointerleave",this.handlePointerLeave);this.canvas.removeEventListener("click",this.handleClick);this.canvas.removeEventListener("pointerdown",this.handlePointerDown);this.dprWatch.dispose();this.canvas.remove();this.overlay.remove();this.hoverLayer.remove();this.spec=null;this.scene=null;this.drillRun=null}render(){if(!this.spec||!this.theme)return;this.dprWatch.update();const t=this.container.getBoundingClientRect();const e=Math.round(t.width);const s=Math.round(t.height);if(e<2||s<2)return;this.lastW=e;this.lastH=s;const i=Math.min(window.devicePixelRatio||1,4);this.dpr=i;this.canvas.width=e*i;this.canvas.height=s*i;this.spec.highlightIndex=this.hoverIndex;this.spec.highlightT=this.hoverT;this.layoutAndOverlay(e,s);const n=this.overlay.querySelector('[part="legend"]');if(n&&this.spec.legend&&this.spec.legend!=="none"){const t=this.spec.legend==="left"||this.spec.legend==="right";const i=t?n.offsetWidth:n.offsetHeight;if(i>0&&Math.abs((this.spec.legendExtent??-1)-i)>2){this.spec.legendExtent=i;this.layoutAndOverlay(e,s)}}if(!this.scene)return;const{variant:o,duration:a}=x(this.spec);const r=this.pendingDrill;this.pendingDrill=null;if(r?.leaving&&o!=="none"&&!b()){this.hasRendered=true;this.playDrill(i,r.index,r.up,r.leaving);return}if(this.drillRun){this.hasRendered=true;this.clearIntroOpacity();this.drillFrame(i);return}const h=!this.hasRendered&&o!=="none"&&!b();const c=this.scene.slices.length>0;if(h){this.hasRendered=c;this.playIntro(i,o,a);return}this.hasRendered=this.hasRendered||c;this.stopIntro();this.drawGeometry(this.scene,i)}clearIntroOpacity(){this.canvas.style.opacity="";for(const t of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){t.style.transition="";t.style.opacity=""}}stopIntro(){cancelAnimationFrame(this.introRaf);this.introRaf=0;this.clearIntroOpacity()}drill(t,e="down"){this.pendingDrill=this.scene?{index:t,up:e==="up",leaving:this.scene}:null}replay(){this.hasRendered=false;this.render()}layoutAndOverlay(t,e){if(!this.spec||!this.theme)return;this.scene=it(this.spec,this.theme,t,e);v(this.overlay,this.scene,this.theme.fontFamily,{onLegendClick:this.onLegendToggle},false,this.legendLayer)}drawGeometry(t,e){if(this.ctx){this.ctx.setTransform(e,0,0,e,0,0);M(this.ctx,t)}}paceLabels(t){for(const e of Array.from(this.overlay.querySelectorAll('[data-key^="pl-"]'))){e.style.transition="opacity 180ms ease";e.style.opacity=t>=ct?"":"0"}}playIntro(t,e,s){const i=this.scene;if(!i)return;this.stopIntro();const n=t=>{this.canvas.style.opacity=t<1?String(t):""};n(A(e,i,0).alpha);this.paceLabels(0);let o=0;const a=r=>{if(!o)o=r;const h=(r-o)/s;if(h>=1){n(1);this.paceLabels(1);this.drawGeometry(i,t);return}this.paceLabels(h);const{scene:c,alpha:l}=A(e,i,h);n(l);this.drawGeometry(c,t);this.introRaf=requestAnimationFrame(a)};this.introRaf=requestAnimationFrame(a)}playDrill(t,e,s,i){if(!this.scene)return;this.stopIntro();this.drillRun={index:e,up:s,frozen:i,start:performance.now()};const n=()=>{if(!this.drillRun)return;if(this.drillFrame(t))return;this.introRaf=requestAnimationFrame(n)};n()}drillFrame(t){const e=this.drillRun;const s=this.scene;if(!e||!s)return true;const i=(performance.now()-e.start)/ot;if(i>=1){this.drillRun=null;this.paceLabels(1);this.drawGeometry(s,t);return true}this.paceLabels(i);const n=t=>{const e=t.slices?.find((t=>t.dataIndex>=0))??t.slices?.[0];return e?{x:e.cx,y:e.cy}:null};const o=(t,e,s)=>!e&&!s?t:{...t,slices:(t.slices??[]).map((t=>({...t,cx:t.cx+e,cy:t.cy+s})))};const a=n(s);const r=n(e.frozen);const h=a&&r?o(e.frozen,a.x-r.x,a.y-r.y):e.frozen;const c=e.up?s:h;const l=e.up?h:s;const d=z(i);const p=_(c,l,e.index,e.up?1-d:d);if(!p)return true;if(!this.ctx)return false;this.ctx.setTransform(t,0,0,t,0,0);M(this.ctx,this.withRipple(p.base));this.ctx.globalAlpha=p.overAlpha;M(this.ctx,p.over,false);this.ctx.globalAlpha=1;return false}sliceAt(t,e){if(!this.scene)return null;for(const s of this.scene.slices){if(dt(t,e,s,s.cx,s.cy))return s}return null}focusIndex(t){if(!this.scene)return;if(t<0){this.hoverLayer.textContent="";if(this.hoverIndex!==-1){this.hoverIndex=-1;this.tweenHover()}return}const e=this.scene.slices.find((e=>e.dataIndex===t));if(!e)return;if(this.hoverIndex!==t){this.hoverIndex=t;this.tweenHover()}const s=(e.startAngle+e.endAngle)/2;const i=(e.innerR+e.outerR)/2;this.renderTooltip(t,e.cx+Math.cos(s)*i,e.cy+Math.sin(s)*i)}tweenHover(){const t=this.hoverIndex>=0?1:0;if(b()){this.hoverT=t;this.render();return}cancelAnimationFrame(this.hoverTweenRaf);const e=this.hoverT;if(e===t){this.render();return}const s=performance.now();const i=n=>{const o=Math.min(1,(n-s)/nt);this.hoverT=e+(t-e)*P(o);this.render();if(o<1)this.hoverTweenRaf=requestAnimationFrame(i)};this.hoverTweenRaf=requestAnimationFrame(i)}activate(t){const e=this.scene?.slices.find((e=>!e.pill&&e.dataIndex===t));if(!e)return;const s=(e.startAngle+e.endAngle)/2;const i=(e.innerR+e.outerR)/2;this.startRipple(e.cx+Math.cos(s)*i,e.cy+Math.sin(s)*i,e);this.toggleSelected(t)}startRipple(t,e,s){if(b())return;const i=[s.startAngle,s.endAngle].flatMap((i=>[s.innerR,s.outerR].map((n=>Math.hypot(s.cx+Math.cos(i)*n-t,s.cy+Math.sin(i)*n-e)))));this.ripple={dataIndex:s.dataIndex,x:t,y:e,max:Math.max(...i,1),color:k(s.color),start:performance.now()};cancelAnimationFrame(this.rippleRaf);const n=()=>{if(!this.ripple)return;if((performance.now()-this.ripple.start)/at>=1){this.ripple=null;if(!this.drillRun&&this.scene)this.drawGeometry(this.scene,this.dpr);return}if(!this.drillRun&&this.scene)this.drawGeometry(this.withRipple(this.scene),this.dpr);this.rippleRaf=requestAnimationFrame(n)};this.rippleRaf=requestAnimationFrame(n)}withRipple(t){const e=this.ripple;if(!e)return t;const s=Math.min(1,(performance.now()-e.start)/at);return{...t,ripple:{dataIndex:e.dataIndex,x:e.x,y:e.y,radius:e.max*C(s),color:e.color,alpha:rt*(1-Math.max(0,(s-.35)/.65))}}}toggleSelected(t){const e=this.spec?.data;if(!e?.[t])return;const s=e.map((t=>t.selectT??(t.selected?1:0)));const i=!!e[t].selected;e.forEach(((e,s)=>{e.selected=s===t&&!i}));const n=e.map((t=>t.selected?1:0));if(s.every(((t,e)=>t===n[e])))return;if(b()){e.forEach(((t,e)=>t.selectT=n[e]));this.render();return}cancelAnimationFrame(this.selectRaf);const o=performance.now();const a=t=>{const i=Math.min(1,(t-o)/ht);const r=P(i);e.forEach(((t,e)=>{t.selectT=s[e]+(n[e]-s[e])*r}));this.render();if(i<1)this.selectRaf=requestAnimationFrame(a)};this.selectRaf=requestAnimationFrame(a)}renderTooltip(t,e,s){this.hoverLayer.textContent="";if(t<0||!this.spec||!this.theme||!this.scene)return;const i=this.spec.data[t];if(!i)return;const n=this.spec.data.reduce(((t,e)=>e.hidden||e.level!==i.level||e.parent!==i.parent?t:t+e.value),0);const o=n>0?i.value/n*100:0;const a=document.createElement("div");a.setAttribute("part","tooltip");a.style.cssText=["position:absolute","pointer-events:none","background:var(--md-sys-color-surface-container-high, #ECE6F0)","color:var(--md-sys-color-on-surface, #1C1B1F)","border-radius:8px","padding:8px 10px","box-shadow:0 2px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.2)",`font:400 ${this.theme.labelSize}px ${this.theme.fontFamily}`,"white-space:nowrap","z-index:2"].join(";");if(this.tooltipRender){const o=n;const r=this.tooltipRender({dataIndex:t,axisValue:i.label,axisLabel:i.label,focusedSeriesIndex:t,missing:[],series:this.spec.data.map(((e,s)=>({seriesIndex:s,label:e.label,color:e.color,value:e.value,formattedValue:this.spec.valueFormatter(e.value),percent:o>0?e.value/o*100:0,focused:s===t,missing:false})))});if(r!=null){w(a,r);this.hoverLayer.appendChild(a);this.placeTooltip(a,e,s)}return}const r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:8px;line-height:1.5";const h=document.createElement("span");h.style.cssText=`width:10px;height:10px;border-radius:3px;background:${i.color};flex:none`;const c=document.createElement("span");c.textContent=i.label;c.style.cssText="flex:1";const l=document.createElement("strong");l.textContent=`${this.spec.valueFormatter(i.value)} (${o.toFixed(1)}%)`;r.append(h,c,l);a.appendChild(r);this.hoverLayer.appendChild(a);this.placeTooltip(a,e,s)}placeTooltip(t,e,s){if(!this.scene)return;const i=t.offsetWidth||120;const n=t.offsetHeight||40;let o=e+14;if(o+i>this.scene.width-4)o=e-i-14;const a=Math.max(4,Math.min(s-n/2,this.scene.height-n-4));t.style.left=`${Math.max(4,o)}px`;t.style.top=`${a}px`}}function dt(t,e,s,i,n){const o=t-i;const a=e-n;const r=Math.hypot(o,a);if(r<s.innerR||r>s.outerR)return false;const h=Math.min(s.startAngle,s.endAngle);const c=Math.max(s.startAngle,s.endAngle);const l=Math.PI*2;let d=(Math.atan2(a,o)-h)%l;if(d<0)d+=l;return d<=c-h}const pt=()=>`:host(:not([data-awc-motion-ready])),:host(:not([data-awc-motion-ready]))::before,:host(:not([data-awc-motion-ready]))::after,:host(:not([data-awc-motion-ready])) *,:host(:not([data-awc-motion-ready])) *::before,:host(:not([data-awc-motion-ready])) *::after{transition-property:none !important}`;const ut=()=>`:host{--_block-size:var(--md-pie-chart-block-size, auto);--_min-block-size:var(--md-pie-chart-min-block-size, max(140px, calc(200px + var(--md-sys-density-scale, 0) * 12px)));--_aspect-ratio:var(--md-pie-chart-aspect-ratio, 1 / 1);--_background:var(--md-pie-chart-background, var(--md-sys-color-surface-container-low, #F7F2FA));--_padding:var(--md-pie-chart-padding, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_shape:var(--md-pie-chart-shape, max(8px, calc(16px + var(--md-sys-density-scale, 0) * 2px)));--_empty-color:var(--md-pie-chart-empty-color, var(--md-sys-color-on-surface-variant, #49454F));--_empty-background:var(--md-pie-chart-empty-background, var(--_background));--_empty-font:var(--md-pie-chart-empty-font, var(--md-sys-typescale-body-medium-font-family, Roboto, sans-serif));--_empty-font-size:var(--md-pie-chart-empty-font-size, var(--md-sys-typescale-body-medium-font-size, 14px));--_empty-icon-size:var(--md-pie-chart-empty-icon-size, 40px);--_center-color:var(--md-pie-chart-center-color, var(--md-sys-color-on-surface, #1C1B1F));display:block;position:relative;inline-size:100%;block-size:var(--_block-size);min-block-size:var(--_min-block-size);background:var(--_background);padding:var(--_padding);border-radius:var(--_shape);box-sizing:border-box;min-inline-size:0;aspect-ratio:var(--_aspect-ratio)}.md-pie-chart__header,.md-pie-chart__footer{display:contents}.md-pie-chart__header>slot[name='header']::slotted(*),.md-pie-chart__footer>slot[name='footer']::slotted(*){display:block;margin-block:8px}.md-pie-chart__canvas{position:absolute;inset:var(--_padding);min-block-size:0;min-inline-size:0}.md-pie-chart__center{position:absolute;top:var(--_pie-center-y, 50%);left:var(--_pie-center-x, 50%);transform:translate(-50%, -50%);pointer-events:none;color:var(--_center-color);text-align:center;font-family:var(--md-sys-typescale-headline-small-font-family, Roboto, system-ui, sans-serif);font-variant-numeric:tabular-nums;display:flex;align-items:center;justify-content:center;max-width:var(--md-pie-center-max-width, var(--_pie-hole, none));max-height:var(--md-pie-center-max-height, var(--_pie-hole-h, none))}.md-pie-chart__center>slot[name='center']::slotted(*){pointer-events:auto}.md-pie-chart__empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background);border-radius:var(--_shape);color:var(--_empty-color);font-family:var(--_empty-font);font-size:var(--_empty-font-size);line-height:var(--md-sys-typescale-body-medium-line-height, 20px);pointer-events:none;text-align:center}.md-pie-chart__empty ::slotted(.material-symbols-outlined),.md-pie-chart__empty ::slotted(.material-symbols-rounded),.md-pie-chart__empty ::slotted(.material-symbols-sharp),.md-pie-chart__empty ::slotted(.material-icons){font-size:var(--_empty-icon-size) !important;line-height:1;opacity:0.55}.md-pie-chart__a11y-table{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media (forced-colors: active){:host{forced-color-adjust:auto}}.md-pie-chart__loading{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;padding:24px;background:var(--_empty-background, var(--_background));border-radius:var(--_shape);color:var(--_empty-color);text-align:center}.md-pie-chart__spinner{inline-size:40px;block-size:40px}.md-pie-chart__canvas:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:-3px;border-radius:4px}.md-pie-chart__live{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}[part='legend'] button:focus-visible{outline:3px solid var(--md-sys-color-secondary, #625B71);outline-offset:2px;border-radius:6px}: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}:host([hidden]){display:none !important}`;function ft(t,e){if(t.includes(e))return t;for(const s of t){if(s.children?.length){const t=ft(s.children,e);if(t)return t}}return null}const mt=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdSliceClick=s(this,"mdSliceClick",7);this.mdLegendClick=s(this,"mdLegendClick",7);this.mdReady=s(this,"mdReady",7);this.label="";this.titleAlign="start";this.data=[];this.innerRadius="0%";this.outerRadius="75%";this.startAngle=90;this.endAngle=-270;this.paddingAngle=0;this.cornerRadius=4;this.showLabels=true;this.gradient=false;this.highlight="slice";this.legend="right";this.tooltip="item";this.locale="";this.summary="";this.labelEmpty="No data to display";this.loading=false;this.loadingLabel="Loading chart…";this.labelPlot="Chart data. Use the arrow keys to move between slices, Home and End for the first and last, Escape to leave.";this.labelPoint="%label%: %value% (%percent%)";this.noAnimation=false;this.animation="expressive";this.density=0;this.mounted=false;this.kbIndex=-1;this.announcement="";this.engine=null;this.ro=null;this.legendHidden=new Map;this.bindChartHost=t=>{this.chartHost=t};this.bindA11yTableHost=t=>{this.a11yTableHost=t};this.onPlotKeyDown=t=>{const e=this.flatDatums().length-1;if(e<0)return;const s=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const i=s?"ArrowLeft":"ArrowRight";const n=s?"ArrowRight":"ArrowLeft";let o=this.kbIndex;switch(t.key){case i:case"ArrowDown":o=this.kbIndex<0?0:Math.min(e,this.kbIndex+1);break;case n:case"ArrowUp":o=this.kbIndex<0?e:Math.max(0,this.kbIndex-1);break;case"Home":o=0;break;case"End":o=e;break;case"Escape":if(this.kbIndex<0)return;o=-1;break;case"Enter":case" ":if(this.kbIndex<0)return;t.preventDefault();this.emitSliceClick(this.kbIndex,t);this.engine?.activate(this.kbIndex);return;default:return}t.preventDefault();this.moveKeyboardCursor(o)};this.onPlotBlur=()=>{if(this.kbIndex>=0)this.moveKeyboardCursor(-1)}}datumKeys(){const t=new Map;return this.flatDatums().map(((e,s)=>{const i=e.id!=null?`id:${e.id}`:e.label!=null?`label:${e.label}`:`pos:${s}`;const n=t.get(i)??0;t.set(i,n+1);return n===0?i:`${i}#${n}`}))}componentDidLoad(){try{this.initChart();this.disposeThemeWatch=F(this.el,(()=>this.applyEngine()))}finally{a(this)}}disconnectedCallback(){r(this);this.ro?.disconnect();this.ro=null;this.engine?.dispose();this.engine=null;this.disposeThemeWatch?.();this.disposeThemeWatch=undefined}onAnyPropChange(){this.applyEngine();this.rebuildA11yTable()}async refreshTheme(){this.applyEngine()}async resize(){this.engine?.resize()}async replay(){this.engine?.replay()}async drill(t,e="down"){this.engine?.drill(t,e)}async toDataURL(){return this.engine?.toDataURL("image/png")??""}async getInstance(){return this.engine}initChart(){this.makeEngine();this.applyEngine();this.rebuildA11yTable();this.mounted=true;this.mdReady.emit()}makeEngine(){if(!this.chartHost)return;this.ro?.disconnect();this.ro=null;this.engine?.dispose();try{this.engine=new lt(this.chartHost)}catch{this.engine=null}if(this.engine&&typeof ResizeObserver!=="undefined"){this.ro=new ResizeObserver((()=>{this.engine?.resize();this.updateCenterVars()}));this.ro.observe(this.chartHost)}}buildEngineTheme(t){return{background:t.background,textColor:t.textColor,textColorMuted:t.textColorMuted,axisLineColor:t.axisLineColor,gridLineColor:t.gridColor,surface:t.surface,fontFamily:t.fontFamily,labelSize:t.labelSize,titleSize:t.titleSize}}flatten(t,e){const s=this.datumKeys();const i=[];const n=this.monochrome!=null?R(this.el,this.monochrome||"primary",t.palette[0]):null;const o=(a,r,h,c)=>{a.forEach(((l,d)=>{const u=c!=null?p(c,t.surface,.18+d/Math.max(1,a.length)*.42):n!=null?p(n,t.surface,d/Math.max(1,a.length)*.7):e[d]??D(t.palette,d);const f=R(this.el,l.color,u);const m=i.length;i.push({label:l.label,value:l.value,color:f,selected:l.selected,radius:l.radius,hidden:l.hidden??this.legendHidden.get(s[m])??false,level:r,parent:h});if(l.children?.length)o(l.children,r+1,m,f)}))};o(this.data??[],0,undefined);return i}flatDatums(){const t=[];const e=s=>{for(const i of s){t.push(i);if(i.children?.length)e(i.children)}};e(this.data??[]);return t}buildSpec(t){const e=typeof getComputedStyle==="function"&&getComputedStyle(this.el).direction==="rtl";const s=L(t.palette.slice(0,3),this.data.length,{light:t.surface,dark:t.textColor});return{data:this.flatten(t,s),title:this.label||undefined,subtitle:this.subtitle||undefined,titleAlign:this.titleAlign,innerRadius:this.innerRadius,outerRadius:this.outerRadius,startAngleDeg:this.startAngle,endAngleDeg:this.endAngle,paddingAngleDeg:this.paddingAngle,cornerRadius:this.cornerRadius,showLabels:this.showLabels,labelMode:this.labelMode,gradient:this.gradient,highlight:this.highlight,legend:e?S(this.legend):this.legend,ringWidths:this.ringWidths,valueFormatter:t=>this.formatValue(t),animation:this.noAnimation?"none":this.animation,animationDuration:this.animationDuration}}applyEngine(){if(!this.engine)return;const t=$(this.el);this.engine.setSpec(this.buildSpec(t),this.buildEngineTheme(t),{onLegendClick:t=>{const e=this.datumKeys()[t.seriesIndex];if(e!=null)this.legendHidden.set(e,!!t.hidden);this.mdLegendClick.emit({dataIndex:t.seriesIndex,selected:!t.hidden})},onPointClick:(t,e,s)=>this.emitSliceClick(e,s)});this.engine.setTooltip({render:this.tooltipRenderer});this.updateCenterVars()}updateCenterVars(){const t=this.engine?.getCenter();if(!t||!this.chartHost)return;const e=this.el.getBoundingClientRect();const s=this.chartHost.getBoundingClientRect();const i=s.left-e.left;const n=s.top-e.top;this.el.style.setProperty("--_pie-center-x",`${t.x+i}px`);this.el.style.setProperty("--_pie-center-y",`${t.y+n}px`);const o=this.engine?.getHoleBox();this.el.style.setProperty("--_pie-hole",o&&o.width>0?`${o.width}px`:"none");this.el.style.setProperty("--_pie-hole-h",o&&o.height>0?`${o.height}px`:"none")}rebuildA11yTable(){if(!this.a11yTableHost)return;const t=this.data.reduce(((t,e)=>t+e.value),0);const e=this.tableLabels??{};this.a11yTableHost.innerHTML=E({title:this.label,xAxisLabel:e.category??"Category",xAxisData:this.data.map((t=>t.label)),locale:this.locale,series:[{label:e.value??"Value",data:this.data.map((t=>t.value))},{label:e.share??"Share",data:this.data.map((e=>t>0?e.value/t*100:0))}],valueFormatter:t=>t==null?"—":this.formatValue(t)})}formatValue(t){return this.valueFormatter?this.valueFormatter(t):t.toLocaleString(this.locale||undefined)}emitSliceClick(t,e){const s=this.flatDatums()[t];if(!s)return;this.mdSliceClick.emit({seriesIndex:0,seriesId:s.id,dataIndex:t,value:s.value,nativeEvent:e,series:s})}moveKeyboardCursor(t){this.kbIndex=t;this.engine?.focusIndex(t);if(t<0){this.announcement="";return}const e=this.flatDatums();const s=e[t];if(!s)return;const i=this.data?.some((t=>t.children?.length))?ft(this.data??[],s)??e:e;const n=i.reduce(((t,e)=>t+e.value),0);const o=n>0?s.value/n*100:0;this.announcement=this.labelPoint.replace("%label%",s.label).replace("%value%",this.formatValue(s.value)).replace("%percent%",`${o.toLocaleString(this.locale||undefined,{maximumFractionDigits:1})}%`)}render(){const t=this.data.length===0&&!this.loading;const e=this.summary||j({title:this.label,chartType:"pie",seriesCount:this.data.length,locale:this.locale});return i(n,{key:"d6bafc72dcb4fe1023aa56b617670155505d1b7f",class:{"md-pie-chart":true,"md-pie-chart--empty":t,"md-pie-chart--mounted":this.mounted,"md-pie-chart--donut":this.innerRadius!=="0%"&&this.innerRadius!==0},role:"figure","aria-label":e,"aria-busy":this.loading?"true":null,style:this.heightProp?{blockSize:this.heightProp}:undefined},i("header",{key:"841199c41da5dfcbbe6d4337fb2e082bbb65f52d",class:"md-pie-chart__header",part:"header"},i("slot",{key:"a3af9ebcb23f36005ac75e5b8ef5f3365399cb49",name:"header"})),i("div",{key:"e420cccbf9af4c434dbc1d7aea13d4282dac9ddf",class:"md-pie-chart__canvas",part:"canvas",ref:t=>this.bindChartHost(t),tabindex:t?undefined:"0",role:t?undefined:"application","aria-label":t?undefined:this.labelPlot,onKeyDown:this.onPlotKeyDown,onBlur:this.onPlotBlur}),i("div",{key:"c41530062dd928a6d3a20577461f706ab9e771e0",class:"md-pie-chart__center",part:"center","aria-hidden":"true"},i("slot",{key:"2e97b657165d27224f4dc020ff3456a49e708c94",name:"center"})),t&&i("div",{key:"fe5ca0142d3a8837a3e2fadc01b1fb198d628bbf",class:"md-pie-chart__empty",part:"empty"},i("slot",{key:"4317eb251e309be6b4f3fab26e8b901ddcd323a7",name:"empty"},this.labelEmpty)),this.loading&&i("div",{key:"60f9989d8013136381b2b28a48eeddb6da42d15c",class:"md-pie-chart__loading",part:"loading",role:"status"},i("slot",{key:"fe516eea61998f62ddd479995308daeeb9fe46b0",name:"loader"},i("slot",{key:"c0c82a36832d2c73a08bf3fa1da467f10280810f",name:"loading"},i("md-progress-indicator",{key:"4f890f080a93b15cd8a121cd458355c332f19b37",class:"md-pie-chart__spinner",variant:"circular",indeterminate:true,label:this.loadingLabel}),i("span",{key:"7c1e162513542a32f8316c66c4135a79af572ee6",class:"md-pie-chart__loading-text"},this.loadingLabel)))),i("footer",{key:"a46d210c090f1fbe9bc3262bc4f7eaea294eec9f",class:"md-pie-chart__footer",part:"footer"},i("slot",{key:"655fc742ee41104860df8ff5ce8b3d8540aa24af",name:"footer"})),i("div",{key:"71d8ed2b47eebf66d7e44a22a6bbcf5336cd8eb8",class:"md-pie-chart__a11y-table",ref:t=>this.bindA11yTableHost(t)}),i("div",{key:"ede91f2f3a05199f2efc043541906b4c23f15bb1",class:"md-pie-chart__live",role:"status","aria-live":"polite","aria-atomic":"true"},this.announcement))}componentWillLoad(){h(this)}componentDidRender(){c(this)}connectedCallback(){l(this)}componentShouldUpdate(){d(this);return true}get el(){return this}static get watchers(){return{data:[{onAnyPropChange:0}],innerRadius:[{onAnyPropChange:0}],outerRadius:[{onAnyPropChange:0}],startAngle:[{onAnyPropChange:0}],endAngle:[{onAnyPropChange:0}],paddingAngle:[{onAnyPropChange:0}],cornerRadius:[{onAnyPropChange:0}],showLabels:[{onAnyPropChange:0}],labelMode:[{onAnyPropChange:0}],monochrome:[{onAnyPropChange:0}],gradient:[{onAnyPropChange:0}],highlight:[{onAnyPropChange:0}],legend:[{onAnyPropChange:0}],tooltip:[{onAnyPropChange:0}],label:[{onAnyPropChange:0}],titleAlign:[{onAnyPropChange:0}],animation:[{onAnyPropChange:0}],animationDuration:[{onAnyPropChange:0}],ringWidths:[{onAnyPropChange:0}],locale:[{onAnyPropChange:0}],subtitle:[{onAnyPropChange:0}],loading:[{onAnyPropChange:0}],valueFormatter:[{onAnyPropChange:0}]}}static get style(){return pt()+ut()}},[257,"md-pie-chart",{label:[1],titleAlign:[1,"title-align"],data:[16],innerRadius:[8,"inner-radius"],outerRadius:[8,"outer-radius"],startAngle:[2,"start-angle"],endAngle:[2,"end-angle"],paddingAngle:[2,"padding-angle"],cornerRadius:[2,"corner-radius"],showLabels:[4,"show-labels"],labelMode:[1,"label-mode"],monochrome:[1],gradient:[4],highlight:[1],legend:[513],tooltip:[1],locale:[1],subtitle:[1],summary:[1],tableLabels:[16],labelEmpty:[1,"label-empty"],loading:[4],loadingLabel:[1,"loading-label"],labelPlot:[1,"label-plot"],labelPoint:[1,"label-point"],tooltipRenderer:[16],valueFormatter:[16],ringWidths:[16],heightProp:[1,"height"],noAnimation:[4,"no-animation"],animation:[1],animationDuration:[2,"animation-duration"],density:[514],mounted:[32],kbIndex:[32],announcement:[32],refreshTheme:[64],resize:[64],replay:[64],drill:[64],toDataURL:[64],getInstance:[64]},undefined,{data:[{onAnyPropChange:0}],innerRadius:[{onAnyPropChange:0}],outerRadius:[{onAnyPropChange:0}],startAngle:[{onAnyPropChange:0}],endAngle:[{onAnyPropChange:0}],paddingAngle:[{onAnyPropChange:0}],cornerRadius:[{onAnyPropChange:0}],showLabels:[{onAnyPropChange:0}],labelMode:[{onAnyPropChange:0}],monochrome:[{onAnyPropChange:0}],gradient:[{onAnyPropChange:0}],highlight:[{onAnyPropChange:0}],legend:[{onAnyPropChange:0}],tooltip:[{onAnyPropChange:0}],label:[{onAnyPropChange:0}],titleAlign:[{onAnyPropChange:0}],animation:[{onAnyPropChange:0}],animationDuration:[{onAnyPropChange:0}],ringWidths:[{onAnyPropChange:0}],locale:[{onAnyPropChange:0}],subtitle:[{onAnyPropChange:0}],loading:[{onAnyPropChange:0}],valueFormatter:[{onAnyPropChange:0}]}]);function yt(){if(typeof customElements==="undefined"){return}const t=["md-pie-chart","md-progress-indicator"];t.forEach((t=>{switch(t){case"md-pie-chart":if(!customElements.get(o(t))){customElements.define(o(t),mt)}break;case"md-progress-indicator":if(!customElements.get(o(t))){I()}break}}))}yt();const gt=mt;const bt=yt;export{gt as MdPieChart,bt as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=md-pie-chart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-
|
|
1
|
+
import{M as o,d as s}from"./p-3GSjLPGH.js";const t=o;const p=s;export{t as MdProgressIndicator,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=md-progress-indicator.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as i,h as t,d as a,t as r}from"./p-CspVD-eh.js";import{i as o,r as d,b as n,c,d as l,p as h}from"./p-B9jJRlnU.js";import{c as m}from"./p-mwCGMdmr.js";import{t as u}from"./p-DYBUr7K_.js";import{I as y,g as f,s as p,a as b,c as _,r as v}from"./p-EuzGe8T6.js";import{d as g}from"./p-BWCwdLDy.js";const k=()=>`:host(:not([data-awc-motion-ready])),:host(:not([data-awc-motion-ready]))::before,:host(:not([data-awc-motion-ready]))::after,:host(:not([data-awc-motion-ready])) *,:host(:not([data-awc-motion-ready])) *::before,:host(:not([data-awc-motion-ready])) *::after{transition-property:none !important}`;const x=()=>`:host{--_icon-color:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant));--_selected-icon-color:var(--md-radio-selected-icon-color, var(--md-sys-color-primary));--_icon-size:var(--md-radio-icon-size, max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px)));--_inner-circle-size:var(--md-radio-inner-circle-size, max(8px, calc(10px + var(--md-sys-density-scale, 0) * 0.5px)));--_state-layer-size:max(24px, calc(var(--md-radio-state-layer-size, 40px) + var(--md-sys-density-scale, 0) * 4px));--_state-layer-color:var(--md-radio-state-layer-color, var(--md-sys-color-on-surface));--_selected-state-layer-color:var(--md-radio-selected-state-layer-color, var(--md-sys-color-primary));--_touch-size:max(32px, calc(48px + var(--md-sys-density-scale, 0) * 4px));display:inline-flex;align-items:center;justify-content:center;position:relative;inline-size:var(--_touch-size);block-size:var(--_touch-size);cursor:pointer;border-radius:var(--md-sys-shape-corner-full, 50%);overflow:hidden;-webkit-tap-highlight-color:transparent;box-sizing:border-box;flex-shrink:0;vertical-align:middle;outline:none;color:var(--_state-layer-color)}:host(.md-radio--checked){color:var(--_selected-state-layer-color)}.md-radio__native{display:none}.md-radio__ripple-layer{position:absolute;inline-size:var(--_state-layer-size);block-size:var(--_state-layer-size);border-radius:var(--md-sys-shape-corner-full, 50%);overflow:hidden}:host(.md-radio--disabled) .md-radio__ripple-layer,:host([soft-disabled]) .md-radio__ripple-layer{display:none}.md-radio__state-layer{position:absolute;inline-size:var(--_state-layer-size);block-size:var(--_state-layer-size);border-radius:var(--md-sys-shape-corner-full, 50%);background-color:var(--_state-layer-color);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-radio--unchecked:hover) .md-radio__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(.md-radio--unchecked:active) .md-radio__state-layer{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(.md-radio--checked) .md-radio__state-layer{background-color:var(--_selected-state-layer-color)}:host(.md-radio--checked:hover) .md-radio__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(.md-radio--checked:active) .md-radio__state-layer{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(:focus-visible) .md-radio__target::after,:host(.md-radio--focus-ring) .md-radio__target::after{content:'';position:absolute;inset:0;margin:auto;inline-size:var(--_state-layer-size);block-size:var(--_state-layer-size);border-radius:var(--md-sys-shape-corner-full, 50%);outline:3px solid var(--md-sys-color-secondary);outline-offset:0;pointer-events:none}.md-radio__container{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_icon-size);block-size:var(--_icon-size);pointer-events:none;transition:transform var(--md-sys-motion-duration-medium4, 400ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(.md-radio--pressed) .md-radio__container{transform:scale(0.82);transition:transform var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}.md-radio__outer{position:absolute;inset:0;border-radius:var(--md-sys-shape-corner-full, 50%);border:2px solid var(--_icon-color);box-sizing:border-box;transition:border-color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-radio--checked) .md-radio__outer{border-color:var(--_selected-icon-color)}.md-radio__inner{inline-size:var(--_inner-circle-size);block-size:var(--_inner-circle-size);border-radius:var(--md-sys-shape-corner-full, 50%);background-color:var(--_selected-icon-color);transform:scale(0);transition:transform var(--md-sys-motion-duration-medium4, 400ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(.md-radio--checked) .md-radio__inner{transform:scale(1)}:host(.md-radio--disabled){cursor:default;pointer-events:none}:host(.md-radio--disabled.md-radio--unchecked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-radio--disabled.md-radio--checked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-radio--disabled.md-radio--checked) .md-radio__inner{background-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-radio--disabled) .md-radio__state-layer{display:none}:host([soft-disabled]){cursor:default;pointer-events:auto}:host([soft-disabled].md-radio--unchecked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host([soft-disabled].md-radio--checked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host([soft-disabled].md-radio--checked) .md-radio__inner{background-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host([soft-disabled]) .md-radio__state-layer{display:none}@media (prefers-reduced-motion: reduce){.md-radio__container,.md-radio__state-layer,.md-radio__outer,.md-radio__inner{transition:none}}@media (forced-colors: active){:host{forced-color-adjust:none}.md-radio__outer{border-color:ButtonText}:host(.md-radio--checked) .md-radio__outer{border-color:Highlight}:host(.md-radio--checked) .md-radio__inner{background-color:Highlight}:host(:focus-visible) .md-radio__target::after,:host(.md-radio--focus-ring) .md-radio__target::after{outline-color:Highlight}:host(.md-radio--disabled) .md-radio__outer{border-color:GrayText}:host(.md-radio--disabled.md-radio--checked) .md-radio__inner{background-color:GrayText}.md-radio__state-layer{display:none}}: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-radio__target{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_touch-size);block-size:var(--_touch-size);flex-shrink:0;border-radius:var(--md-sys-shape-corner-full, 50%);overflow:hidden}:host(.md-radio--has-support){flex-direction:column;align-items:flex-start;block-size:auto;overflow:visible;border-radius:0}.md-radio__support{display:block;margin-block-start:2px;margin-inline-start:calc((var(--_touch-size) - var(--_icon-size)) / 2);inline-size:max-content;max-inline-size:min(60ch, calc(100vw - 48px));overflow-wrap:anywhere;font-family:var(--md-sys-typescale-body-small-font-family, Roboto, sans-serif);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(--md-sys-color-error, #B3261E)}:host([hidden]){display:none !important}`;const z=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.mdChange=i(this,"mdChange",7);this.mdFocus=i(this,"mdFocus",7);this.mdBlur=i(this,"mdBlur",7);this.mdValidityChange=i(this,"mdValidityChange",5);this.internals=this.attachInternals();this.valueMissingLabel="Please select one of these options.";this.customValidityMessage="";this.uid=m("md-radio");this.validationMessage="";this.validationPresenter=new y({host:()=>this.el,validity:()=>f(this.internals),message:e=>{this.validationMessage=e},focus:()=>this.setFocus()});this.invalid=false;this.defaultChecked=false;this.checked=false;this.disabled=false;this.softDisabled=false;this.required=false;this.name="";this.value="";this.density=0;this.pressed=false;this.focused=false;this.programmaticFocus=false;this.managedTabIndex="0";this.parentLabel=null;this.lastValidityKey=null;this.handleLabelClick=e=>{if(!e.composedPath().includes(this.el)){this.handleClick()}};this.handleClick=()=>{if(this.isDisabled||this.checked)return;this.checked=true;this.mdChange.emit({checked:true,value:this.value})};this.handleKeyDown=e=>{if(this.isDisabled)return;if(e.key===" "){e.preventDefault();this.pressed=true;this.handleClick();u(this.el);setTimeout((()=>{this.pressed=false}),150);return}if(e.key==="ArrowDown"||e.key==="ArrowRight"){e.preventDefault();this.focusSibling(1)}else if(e.key==="ArrowUp"||e.key==="ArrowLeft"){e.preventDefault();this.focusSibling(-1)}};this.handleFocus=()=>{this.focused=true;this.mdFocus.emit()};this.handleBlur=()=>{this.focused=false;this.programmaticFocus=false;this.mdBlur.emit()};this.handlePointerDown=()=>{this.programmaticFocus=false;if(!this.isDisabled)this.pressed=true};this.handlePointerUp=()=>{this.pressed=false}}resetValidationPresentation(){this.validationPresenter.reset()}handleInvalid(e){this.validationPresenter.handleInvalid(e)}componentDidRender(){o(this);if(this.internals&&"ariaDescribedByElements"in this.internals){this.internals.ariaDescribedByElements=this.supportEl?[this.supportEl]:[]}}get isDisabled(){return this.disabled||this.softDisabled}connectedCallback(){d(this);this.parentLabel=this.el.closest("label");this.parentLabel?.addEventListener("click",this.handleLabelClick)}componentWillLoad(){n(this);this.defaultChecked=this.checked;this.syncFormValue()}componentDidLoad(){try{this.updateRovingTabIndex();this.syncGroupValidity()}finally{c(this)}}disconnectedCallback(){l(this);this.parentLabel?.removeEventListener("click",this.handleLabelClick);this.parentLabel=null}onCheckedChange(e){if(e){this.uncheckOthers(this.el)}this.updateRovingTabIndex();this.syncFormValue();this.syncGroupValidity()}onValidityInputChange(){this.syncGroupValidity()}syncFormValue(){p(this.internals,this.checked?this.value||"on":null)}get groupHasSelection(){if(!this.name)return this.checked;const e=this.el.getRootNode();return Array.from(e.querySelectorAll(`md-radio[name="${this.name}"]`)).some((e=>{const s=e;return typeof s.checked==="boolean"?s.checked:e.hasAttribute("checked")}))}get groupIsRequired(){if(this.required)return true;if(!this.name)return false;const e=this.el.getRootNode();return Array.from(e.querySelectorAll(`md-radio[name="${this.name}"]`)).some((e=>e.hasAttribute("required")))}syncValidity(){this.invalid=this.customValidityMessage?true:this.groupIsRequired&&!this.groupHasSelection;b(this.internals,{missing:this.groupIsRequired&&!this.groupHasSelection,missingMessage:this.valueMissingLabel,customMessage:this.customValidityMessage});this.validationPresenter.refresh();this.emitValidityChange()}syncGroupValidity(){this.syncValidity();if(!this.name)return;const e=this.el.getRootNode();e.querySelectorAll(`md-radio[name="${this.name}"]`).forEach((e=>{if(e!==this.el)e.syncValidityFromGroup?.()}))}async syncValidityFromGroup(){this.syncValidity()}formDisabledCallback(e){if(e)queueMicrotask((()=>this.validationPresenter.reset()))}formResetCallback(){this.validationPresenter.reset();this.checked=this.defaultChecked}async getValidity(){return f(this.internals)}emitValidityChange(){const e=f(this.internals);const s=`${e.valid}|${e.validationMessage}`;if(this.lastValidityKey===s)return;const i=this.lastValidityKey!==null;this.lastValidityKey=s;if(i)this.mdValidityChange.emit(e)}async checkValidity(){return _(this.internals)}async reportValidity(){return v(this.internals)}async setCustomValidity(e){this.customValidityMessage=e;this.syncValidity()}onDisabledChange(){this.updateRovingTabIndex()}async setFocus(){this.programmaticFocus=true;this.el.focus()}async setBlur(){this.el.blur()}async select(){if(this.isDisabled||this.checked)return;this.checked=true;this.mdChange.emit({checked:true,value:this.value})}updateRovingTabIndex(){if(this.disabled){this.managedTabIndex="-1";return}if(this.checked){this.managedTabIndex="0";return}if(!this.name){this.managedTabIndex="0";return}const e=this.el.getRootNode();const s=Array.from(e.querySelectorAll(`md-radio[name="${this.name}"]`));const i=s.some((e=>e!==this.el&&e.checked));if(i){this.managedTabIndex="-1";return}const t=s.find((e=>!e.disabled));this.managedTabIndex=t===this.el?"0":"-1"}uncheckOthers(e){if(!this.name)return;const s=this.el.getRootNode();const i=s.querySelectorAll(`md-radio[name="${this.name}"]`);i.forEach((s=>{if(s!==e&&s.hasAttribute("checked")){s.removeAttribute("checked")}}))}focusSibling(e){if(!this.name)return;const s=this.el.getRootNode();const i=Array.from(s.querySelectorAll(`md-radio[name="${this.name}"]`));const t=i.filter((e=>!e.hasAttribute("disabled")&&!e.hasAttribute("soft-disabled")));if(t.length===0)return;const a=t.indexOf(this.el);const r=(a+e+t.length)%t.length;const o=t[r];o.focus();o.setAttribute("checked","");u(o);o.dispatchEvent(new CustomEvent("mdChange",{detail:{checked:true,value:o.getAttribute("value")||""},bubbles:true,composed:true}))}render(){const e=this.isDisabled;return t(a,{key:"f7517fd257b0fd841de000b335bc0f31ff6074a9",class:{"md-radio":true,"md-radio--checked":this.checked,"md-radio--unchecked":!this.checked,"md-radio--disabled":e,"md-radio--pressed":this.pressed,"md-radio--focused":this.focused,"md-radio--focus-ring":this.programmaticFocus,"md-radio--has-support":!!this.validationMessage},role:"radio","aria-invalid":this.invalid?"true":undefined,"aria-checked":String(this.checked),"aria-disabled":e?"true":undefined,"aria-required":this.required?"true":undefined,tabindex:this.managedTabIndex,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,onPointerLeave:this.handlePointerUp,onPointerCancel:this.handlePointerUp},t("span",{key:"660ccf9043eb838bbc64a163e975092bbe67de4d",class:"md-radio__target"},t("span",{key:"1b14cbb4b5646b5593364b8ee45eff7be62b7cda",class:"md-radio__ripple-layer","aria-hidden":"true"},t("md-ripple",{key:"fd90bea07de4528cd00babd03146003d681ea501",disabled:e})),t("span",{key:"1af17c1b036d5fc1bc8fb4a2486640dad7f9562f",class:"md-radio__state-layer",part:"state-layer","aria-hidden":"true"}),t("span",{key:"0a373dc896346c42cb04a13b714cb8fb7a4d2fc3",class:"md-radio__container",part:"container","aria-hidden":"true"},t("span",{key:"69e25e2565558593cdbc8f3517698316ebea5fb9",class:"md-radio__outer",part:"outer-circle"}),t("span",{key:"0ee5abaf44ad3f0196f90a136d3d743b18c0255f",class:"md-radio__inner",part:"inner-circle"})),t("input",{key:"2c9956053ff93451d0fb29d7bd49ef898b7d1e5b",type:"radio",class:"md-radio__native",checked:this.checked,disabled:this.disabled,required:this.required,name:this.name,value:this.value,"aria-hidden":"true","aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.validationMessage?`${this.uid}-support`:undefined,tabindex:"-1",onChange:()=>{}})),this.validationMessage&&t("span",{key:"cd2f80765ce600f347052fc313b5cdaf07e2dfd9",id:`${this.uid}-support`,ref:e=>{this.supportEl=e},class:"md-radio__support",role:"alert"},this.validationMessage))}componentShouldUpdate(){h(this);return true}static get formAssociated(){return true}get el(){return this}static get watchers(){return{name:[{resetValidationPresentation:0},{onValidityInputChange:0}],checked:[{onCheckedChange:0}],required:[{onValidityInputChange:0}],valueMissingLabel:[{onValidityInputChange:0}],disabled:[{onDisabledChange:0}]}}static get style(){return k()+x()}},[65,"md-radio",{valueMissingLabel:[1,"value-missing-label"],checked:[1540],disabled:[516],softDisabled:[516,"soft-disabled"],required:[516],name:[513],value:[513],density:[514],validationMessage:[32],invalid:[32],pressed:[32],focused:[32],programmaticFocus:[32],managedTabIndex:[32],syncValidityFromGroup:[64],getValidity:[64],checkValidity:[64],reportValidity:[64],setCustomValidity:[64],setFocus:[64],setBlur:[64],select:[64]},[[0,"invalid","handleInvalid"]],{name:[{resetValidationPresentation:0},{onValidityInputChange:0}],checked:[{onCheckedChange:0}],required:[{onValidityInputChange:0}],valueMissingLabel:[{onValidityInputChange:0}],disabled:[{onDisabledChange:0}]}]);function C(){if(typeof customElements==="undefined"){return}const e=["md-radio","md-ripple"];e.forEach((e=>{switch(e){case"md-radio":if(!customElements.get(r(e))){customElements.define(r(e),z)}break;case"md-ripple":if(!customElements.get(r(e))){g()}break}}))}C();const w=z;const V=C;export{w as MdRadio,V as defineCustomElement};
|
|
1
|
+
import{p as e,H as s,c as i,h as t,d as a,t as r}from"./p-t9lomFml.js";import{i as o,r as d,b as n,c,d as l,p as h}from"./p-D9C2BtN-.js";import{c as m}from"./p-mwCGMdmr.js";import{t as u}from"./p-DYBUr7K_.js";import{I as y,g as f,s as p,a as b,c as _,r as v}from"./p-EuzGe8T6.js";import{d as g}from"./p-CMkPI5PO.js";const k=()=>`:host(:not([data-awc-motion-ready])),:host(:not([data-awc-motion-ready]))::before,:host(:not([data-awc-motion-ready]))::after,:host(:not([data-awc-motion-ready])) *,:host(:not([data-awc-motion-ready])) *::before,:host(:not([data-awc-motion-ready])) *::after{transition-property:none !important}`;const x=()=>`:host{--_icon-color:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant));--_selected-icon-color:var(--md-radio-selected-icon-color, var(--md-sys-color-primary));--_icon-size:var(--md-radio-icon-size, max(16px, calc(20px + var(--md-sys-density-scale, 0) * 1px)));--_inner-circle-size:var(--md-radio-inner-circle-size, max(8px, calc(10px + var(--md-sys-density-scale, 0) * 0.5px)));--_state-layer-size:max(24px, calc(var(--md-radio-state-layer-size, 40px) + var(--md-sys-density-scale, 0) * 4px));--_state-layer-color:var(--md-radio-state-layer-color, var(--md-sys-color-on-surface));--_selected-state-layer-color:var(--md-radio-selected-state-layer-color, var(--md-sys-color-primary));--_touch-size:max(32px, calc(48px + var(--md-sys-density-scale, 0) * 4px));display:inline-flex;align-items:center;justify-content:center;position:relative;inline-size:var(--_touch-size);block-size:var(--_touch-size);cursor:pointer;border-radius:var(--md-sys-shape-corner-full, 50%);overflow:hidden;-webkit-tap-highlight-color:transparent;box-sizing:border-box;flex-shrink:0;vertical-align:middle;outline:none;color:var(--_state-layer-color)}:host(.md-radio--checked){color:var(--_selected-state-layer-color)}.md-radio__native{display:none}.md-radio__ripple-layer{position:absolute;inline-size:var(--_state-layer-size);block-size:var(--_state-layer-size);border-radius:var(--md-sys-shape-corner-full, 50%);overflow:hidden}:host(.md-radio--disabled) .md-radio__ripple-layer,:host([soft-disabled]) .md-radio__ripple-layer{display:none}.md-radio__state-layer{position:absolute;inline-size:var(--_state-layer-size);block-size:var(--_state-layer-size);border-radius:var(--md-sys-shape-corner-full, 50%);background-color:var(--_state-layer-color);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-radio--unchecked:hover) .md-radio__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(.md-radio--unchecked:active) .md-radio__state-layer{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(.md-radio--checked) .md-radio__state-layer{background-color:var(--_selected-state-layer-color)}:host(.md-radio--checked:hover) .md-radio__state-layer{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}:host(.md-radio--checked:active) .md-radio__state-layer{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(:focus-visible) .md-radio__target::after,:host(.md-radio--focus-ring) .md-radio__target::after{content:'';position:absolute;inset:0;margin:auto;inline-size:var(--_state-layer-size);block-size:var(--_state-layer-size);border-radius:var(--md-sys-shape-corner-full, 50%);outline:3px solid var(--md-sys-color-secondary);outline-offset:0;pointer-events:none}.md-radio__container{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_icon-size);block-size:var(--_icon-size);pointer-events:none;transition:transform var(--md-sys-motion-duration-medium4, 400ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(.md-radio--pressed) .md-radio__container{transform:scale(0.82);transition:transform var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}.md-radio__outer{position:absolute;inset:0;border-radius:var(--md-sys-shape-corner-full, 50%);border:2px solid var(--_icon-color);box-sizing:border-box;transition:border-color var(--md-sys-motion-duration-short2, 100ms) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))}:host(.md-radio--checked) .md-radio__outer{border-color:var(--_selected-icon-color)}.md-radio__inner{inline-size:var(--_inner-circle-size);block-size:var(--_inner-circle-size);border-radius:var(--md-sys-shape-corner-full, 50%);background-color:var(--_selected-icon-color);transform:scale(0);transition:transform var(--md-sys-motion-duration-medium4, 400ms) var(--md-sys-motion-easing-emphasized-decelerate, cubic-bezier(0.05, 0.7, 0.1, 1))}:host(.md-radio--checked) .md-radio__inner{transform:scale(1)}:host(.md-radio--disabled){cursor:default;pointer-events:none}:host(.md-radio--disabled.md-radio--unchecked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-radio--disabled.md-radio--checked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-radio--disabled.md-radio--checked) .md-radio__inner{background-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host(.md-radio--disabled) .md-radio__state-layer{display:none}:host([soft-disabled]){cursor:default;pointer-events:auto}:host([soft-disabled].md-radio--unchecked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host([soft-disabled].md-radio--checked) .md-radio__outer{border-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host([soft-disabled].md-radio--checked) .md-radio__inner{background-color:color-mix(in srgb, var(--md-sys-color-on-surface) calc(var(--md-sys-state-disabled-content-opacity, 0.38) * 100%), transparent)}:host([soft-disabled]) .md-radio__state-layer{display:none}@media (prefers-reduced-motion: reduce){.md-radio__container,.md-radio__state-layer,.md-radio__outer,.md-radio__inner{transition:none}}@media (forced-colors: active){:host{forced-color-adjust:none}.md-radio__outer{border-color:ButtonText}:host(.md-radio--checked) .md-radio__outer{border-color:Highlight}:host(.md-radio--checked) .md-radio__inner{background-color:Highlight}:host(:focus-visible) .md-radio__target::after,:host(.md-radio--focus-ring) .md-radio__target::after{outline-color:Highlight}:host(.md-radio--disabled) .md-radio__outer{border-color:GrayText}:host(.md-radio--disabled.md-radio--checked) .md-radio__inner{background-color:GrayText}.md-radio__state-layer{display:none}}: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-radio__target{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_touch-size);block-size:var(--_touch-size);flex-shrink:0;border-radius:var(--md-sys-shape-corner-full, 50%);overflow:hidden}:host(.md-radio--has-support){flex-direction:column;align-items:flex-start;block-size:auto;overflow:visible;border-radius:0}.md-radio__support{display:block;margin-block-start:2px;margin-inline-start:calc((var(--_touch-size) - var(--_icon-size)) / 2);inline-size:max-content;max-inline-size:min(60ch, calc(100vw - 48px));overflow-wrap:anywhere;font-family:var(--md-sys-typescale-body-small-font-family, Roboto, sans-serif);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(--md-sys-color-error, #B3261E)}:host([hidden]){display:none !important}`;const z=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.mdChange=i(this,"mdChange",7);this.mdFocus=i(this,"mdFocus",7);this.mdBlur=i(this,"mdBlur",7);this.mdValidityChange=i(this,"mdValidityChange",5);this.internals=this.attachInternals();this.valueMissingLabel="Please select one of these options.";this.customValidityMessage="";this.uid=m("md-radio");this.validationMessage="";this.validationPresenter=new y({host:()=>this.el,validity:()=>f(this.internals),message:e=>{this.validationMessage=e},focus:()=>this.setFocus()});this.invalid=false;this.defaultChecked=false;this.checked=false;this.disabled=false;this.softDisabled=false;this.required=false;this.name="";this.value="";this.density=0;this.pressed=false;this.focused=false;this.programmaticFocus=false;this.managedTabIndex="0";this.parentLabel=null;this.lastValidityKey=null;this.handleLabelClick=e=>{if(!e.composedPath().includes(this.el)){this.handleClick()}};this.handleClick=()=>{if(this.isDisabled||this.checked)return;this.checked=true;this.mdChange.emit({checked:true,value:this.value})};this.handleKeyDown=e=>{if(this.isDisabled)return;if(e.key===" "){e.preventDefault();this.pressed=true;this.handleClick();u(this.el);setTimeout((()=>{this.pressed=false}),150);return}if(e.key==="ArrowDown"||e.key==="ArrowRight"){e.preventDefault();this.focusSibling(1)}else if(e.key==="ArrowUp"||e.key==="ArrowLeft"){e.preventDefault();this.focusSibling(-1)}};this.handleFocus=()=>{this.focused=true;this.mdFocus.emit()};this.handleBlur=()=>{this.focused=false;this.programmaticFocus=false;this.mdBlur.emit()};this.handlePointerDown=()=>{this.programmaticFocus=false;if(!this.isDisabled)this.pressed=true};this.handlePointerUp=()=>{this.pressed=false}}resetValidationPresentation(){this.validationPresenter.reset()}handleInvalid(e){this.validationPresenter.handleInvalid(e)}componentDidRender(){o(this);if(this.internals&&"ariaDescribedByElements"in this.internals){this.internals.ariaDescribedByElements=this.supportEl?[this.supportEl]:[]}}get isDisabled(){return this.disabled||this.softDisabled}connectedCallback(){d(this);this.parentLabel=this.el.closest("label");this.parentLabel?.addEventListener("click",this.handleLabelClick)}componentWillLoad(){n(this);this.defaultChecked=this.checked;this.syncFormValue()}componentDidLoad(){try{this.updateRovingTabIndex();this.syncGroupValidity()}finally{c(this)}}disconnectedCallback(){l(this);this.parentLabel?.removeEventListener("click",this.handleLabelClick);this.parentLabel=null}onCheckedChange(e){if(e){this.uncheckOthers(this.el)}this.updateRovingTabIndex();this.syncFormValue();this.syncGroupValidity()}onValidityInputChange(){this.syncGroupValidity()}syncFormValue(){p(this.internals,this.checked?this.value||"on":null)}get groupHasSelection(){if(!this.name)return this.checked;const e=this.el.getRootNode();return Array.from(e.querySelectorAll(`md-radio[name="${this.name}"]`)).some((e=>{const s=e;return typeof s.checked==="boolean"?s.checked:e.hasAttribute("checked")}))}get groupIsRequired(){if(this.required)return true;if(!this.name)return false;const e=this.el.getRootNode();return Array.from(e.querySelectorAll(`md-radio[name="${this.name}"]`)).some((e=>e.hasAttribute("required")))}syncValidity(){this.invalid=this.customValidityMessage?true:this.groupIsRequired&&!this.groupHasSelection;b(this.internals,{missing:this.groupIsRequired&&!this.groupHasSelection,missingMessage:this.valueMissingLabel,customMessage:this.customValidityMessage});this.validationPresenter.refresh();this.emitValidityChange()}syncGroupValidity(){this.syncValidity();if(!this.name)return;const e=this.el.getRootNode();e.querySelectorAll(`md-radio[name="${this.name}"]`).forEach((e=>{if(e!==this.el)e.syncValidityFromGroup?.()}))}async syncValidityFromGroup(){this.syncValidity()}formDisabledCallback(e){if(e)queueMicrotask((()=>this.validationPresenter.reset()))}formResetCallback(){this.validationPresenter.reset();this.checked=this.defaultChecked}async getValidity(){return f(this.internals)}emitValidityChange(){const e=f(this.internals);const s=`${e.valid}|${e.validationMessage}`;if(this.lastValidityKey===s)return;const i=this.lastValidityKey!==null;this.lastValidityKey=s;if(i)this.mdValidityChange.emit(e)}async checkValidity(){return _(this.internals)}async reportValidity(){return v(this.internals)}async setCustomValidity(e){this.customValidityMessage=e;this.syncValidity()}onDisabledChange(){this.updateRovingTabIndex()}async setFocus(){this.programmaticFocus=true;this.el.focus()}async setBlur(){this.el.blur()}async select(){if(this.isDisabled||this.checked)return;this.checked=true;this.mdChange.emit({checked:true,value:this.value})}updateRovingTabIndex(){if(this.disabled){this.managedTabIndex="-1";return}if(this.checked){this.managedTabIndex="0";return}if(!this.name){this.managedTabIndex="0";return}const e=this.el.getRootNode();const s=Array.from(e.querySelectorAll(`md-radio[name="${this.name}"]`));const i=s.some((e=>e!==this.el&&e.checked));if(i){this.managedTabIndex="-1";return}const t=s.find((e=>!e.disabled));this.managedTabIndex=t===this.el?"0":"-1"}uncheckOthers(e){if(!this.name)return;const s=this.el.getRootNode();const i=s.querySelectorAll(`md-radio[name="${this.name}"]`);i.forEach((s=>{if(s!==e&&s.hasAttribute("checked")){s.removeAttribute("checked")}}))}focusSibling(e){if(!this.name)return;const s=this.el.getRootNode();const i=Array.from(s.querySelectorAll(`md-radio[name="${this.name}"]`));const t=i.filter((e=>!e.hasAttribute("disabled")&&!e.hasAttribute("soft-disabled")));if(t.length===0)return;const a=t.indexOf(this.el);const r=(a+e+t.length)%t.length;const o=t[r];o.focus();o.setAttribute("checked","");u(o);o.dispatchEvent(new CustomEvent("mdChange",{detail:{checked:true,value:o.getAttribute("value")||""},bubbles:true,composed:true}))}render(){const e=this.isDisabled;return t(a,{key:"f7517fd257b0fd841de000b335bc0f31ff6074a9",class:{"md-radio":true,"md-radio--checked":this.checked,"md-radio--unchecked":!this.checked,"md-radio--disabled":e,"md-radio--pressed":this.pressed,"md-radio--focused":this.focused,"md-radio--focus-ring":this.programmaticFocus,"md-radio--has-support":!!this.validationMessage},role:"radio","aria-invalid":this.invalid?"true":undefined,"aria-checked":String(this.checked),"aria-disabled":e?"true":undefined,"aria-required":this.required?"true":undefined,tabindex:this.managedTabIndex,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,onPointerLeave:this.handlePointerUp,onPointerCancel:this.handlePointerUp},t("span",{key:"660ccf9043eb838bbc64a163e975092bbe67de4d",class:"md-radio__target"},t("span",{key:"1b14cbb4b5646b5593364b8ee45eff7be62b7cda",class:"md-radio__ripple-layer","aria-hidden":"true"},t("md-ripple",{key:"fd90bea07de4528cd00babd03146003d681ea501",disabled:e})),t("span",{key:"1af17c1b036d5fc1bc8fb4a2486640dad7f9562f",class:"md-radio__state-layer",part:"state-layer","aria-hidden":"true"}),t("span",{key:"0a373dc896346c42cb04a13b714cb8fb7a4d2fc3",class:"md-radio__container",part:"container","aria-hidden":"true"},t("span",{key:"69e25e2565558593cdbc8f3517698316ebea5fb9",class:"md-radio__outer",part:"outer-circle"}),t("span",{key:"0ee5abaf44ad3f0196f90a136d3d743b18c0255f",class:"md-radio__inner",part:"inner-circle"})),t("input",{key:"2c9956053ff93451d0fb29d7bd49ef898b7d1e5b",type:"radio",class:"md-radio__native",checked:this.checked,disabled:this.disabled,required:this.required,name:this.name,value:this.value,"aria-hidden":"true","aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.validationMessage?`${this.uid}-support`:undefined,tabindex:"-1",onChange:()=>{}})),this.validationMessage&&t("span",{key:"cd2f80765ce600f347052fc313b5cdaf07e2dfd9",id:`${this.uid}-support`,ref:e=>{this.supportEl=e},class:"md-radio__support",role:"alert"},this.validationMessage))}componentShouldUpdate(){h(this);return true}static get formAssociated(){return true}get el(){return this}static get watchers(){return{name:[{resetValidationPresentation:0},{onValidityInputChange:0}],checked:[{onCheckedChange:0}],required:[{onValidityInputChange:0}],valueMissingLabel:[{onValidityInputChange:0}],disabled:[{onDisabledChange:0}]}}static get style(){return k()+x()}},[65,"md-radio",{valueMissingLabel:[1,"value-missing-label"],checked:[1540],disabled:[516],softDisabled:[516,"soft-disabled"],required:[516],name:[513],value:[513],density:[514],validationMessage:[32],invalid:[32],pressed:[32],focused:[32],programmaticFocus:[32],managedTabIndex:[32],syncValidityFromGroup:[64],getValidity:[64],checkValidity:[64],reportValidity:[64],setCustomValidity:[64],setFocus:[64],setBlur:[64],select:[64]},[[0,"invalid","handleInvalid"]],{name:[{resetValidationPresentation:0},{onValidityInputChange:0}],checked:[{onCheckedChange:0}],required:[{onValidityInputChange:0}],valueMissingLabel:[{onValidityInputChange:0}],disabled:[{onDisabledChange:0}]}]);function C(){if(typeof customElements==="undefined"){return}const e=["md-radio","md-ripple"];e.forEach((e=>{switch(e){case"md-radio":if(!customElements.get(r(e))){customElements.define(r(e),z)}break;case"md-ripple":if(!customElements.get(r(e))){g()}break}}))}C();const w=z;const V=C;export{w as MdRadio,V as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=md-radio.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as i,c as e,h as a,d as s,t as n}from"./p-CspVD-eh.js";import{b as r,c as o,i as l,r as d,d as c,p as m}from"./p-B9jJRlnU.js";import{s as h}from"./p-EuzGe8T6.js";const g=()=>`:host(:not([data-awc-motion-ready])),:host(:not([data-awc-motion-ready]))::before,:host(:not([data-awc-motion-ready]))::after,:host(:not([data-awc-motion-ready])) *,:host(:not([data-awc-motion-ready])) *::before,:host(:not([data-awc-motion-ready])) *::after{transition-property:none !important}`;const u=()=>`:host{--_size:var(--md-rating-item-size, max(12px, calc(28px + var(--md-sys-density-scale, 0) * 2px)));--_gap:var(--md-rating-item-gap, var(--md-sys-spacing-gap-xs, 4px));--_active-color:var(--md-rating-active-color, var(--md-sys-color-secondary, #FFB400));--_inactive-color:var(--md-rating-inactive-color, color-mix(in srgb, var(--md-sys-color-on-surface-variant) 30%, transparent));--_focus-ring-color:var(--md-rating-focus-ring-color, var(--md-sys-color-secondary));--_focus-ring-width:var(--md-rating-focus-ring-width, 3px);--_focus-ring-offset:var(--md-rating-focus-ring-offset, 2px);--_state-layer-color:var(--md-rating-state-layer-color, var(--md-sys-color-on-surface));--_label-color:var(--md-rating-value-label-color, var(--md-sys-color-on-surface));--_label-font:var( --md-rating-value-label-font, var(--md-sys-typescale-label-medium-font, system-ui) );--_pop-scale:var(--md-rating-pop-scale, 1.12);--_duration:var(--md-rating-duration, var(--md-sys-motion-duration-short3, 150ms));display:inline-flex;align-items:center;gap:var(--md-sys-spacing-gap-md, 12px);color:var(--_active-color);vertical-align:middle}:host([size="xs"]){--_size:var(--md-rating-item-size, max(12px, calc(16px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="sm"]){--_size:var(--md-rating-item-size, max(12px, calc(20px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="md"]){--_size:var(--md-rating-item-size, max(12px, calc(28px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="lg"]){--_size:var(--md-rating-item-size, max(12px, calc(36px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="xl"]){--_size:var(--md-rating-item-size, max(12px, calc(48px + var(--md-sys-density-scale, 0) * 2px)))}.md-rating__items{display:inline-flex;align-items:center;gap:var(--_gap);position:relative;border-radius:var(--md-sys-shape-corner-full, 999px);outline:none}.md-rating__items:focus-visible{outline:var(--_focus-ring-width) solid var(--_focus-ring-color);outline-offset:var(--_focus-ring-offset)}.md-rating__item{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_size);block-size:var(--_size);padding:0;margin:0;border:0;background:transparent;cursor:pointer;border-radius:50%;color:inherit;font:inherit;transition:transform var(--_duration) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), color var(--_duration) ease;-webkit-tap-highlight-color:transparent;will-change:transform;backface-visibility:hidden}:host(.md-rating--readonly) .md-rating__item,:host(.md-rating--disabled) .md-rating__item,:host(.md-rating--soft-disabled) .md-rating__item{cursor:default}.md-rating__item:hover{transform:scale(var(--_pop-scale))}:host(.md-rating--readonly) .md-rating__item:hover,:host(.md-rating--disabled) .md-rating__item:hover,:host(.md-rating--soft-disabled) .md-rating__item:hover{transform:none}.md-rating__icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--md-rating-icon-font-family, 'Material Symbols Rounded', 'Material Symbols Outlined', 'Material Icons');font-size:var(--_size);font-weight:normal;font-style:normal;letter-spacing:normal;text-transform:none;line-height:1;white-space:nowrap;direction:ltr;pointer-events:none;-webkit-font-smoothing:antialiased;font-feature-settings:'liga';font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.md-rating__icon--bg{color:var(--_inactive-color)}.md-rating__icon--fg{color:var(--_active-color);font-variation-settings:'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24}:host([outline-empty]) .md-rating__icon--bg{font-variation-settings:'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24}.md-rating__icon--state{color:var(--_state-layer-color);opacity:0;font-variation-settings:'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;transition:opacity var(--_duration) ease}.md-rating__item:hover .md-rating__icon--state{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}.md-rating__item:active .md-rating__icon--state{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(.md-rating--readonly) .md-rating__icon--state,:host(.md-rating--disabled) .md-rating__icon--state,:host(.md-rating--soft-disabled) .md-rating__icon--state{display:none}.md-rating__icon--ripple{color:var(--_state-layer-color);opacity:0;font-variation-settings:'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24}:host(.md-rating--readonly) .md-rating__icon--ripple,:host(.md-rating--disabled) .md-rating__icon--ripple,:host(.md-rating--soft-disabled) .md-rating__icon--ripple{display:none}.md-rating__value-label{display:inline-grid;place-items:center start;font:var(--_label-font);font-size:var(--md-sys-typescale-label-large-size, 14px);font-weight:var(--md-sys-typescale-label-large-weight, 500);color:var(--_label-color);white-space:nowrap;font-variant-numeric:tabular-nums}.md-rating__value-label>*{grid-area:1 / 1}.md-rating__value-label-sizer{visibility:hidden;pointer-events:none}:host(.md-rating--disabled){opacity:var(--md-sys-state-disabled-content-opacity, 0.38);pointer-events:none}:host(.md-rating--soft-disabled){opacity:var(--md-sys-state-disabled-content-opacity, 0.38)}:host(.md-rating--soft-disabled) .md-rating__items{pointer-events:none}:host(.md-rating--soft-disabled) .md-rating__items{pointer-events:auto}:host(.md-rating--soft-disabled) .md-rating__item{pointer-events:none}:host-context([dir="rtl"]) .md-rating__items,:host([dir="rtl"]) .md-rating__items{flex-direction:row-reverse}@media (prefers-reduced-motion: reduce){.md-rating__item,.md-rating__icon--state{transition:none}.md-rating__item:hover{transform:none}}.material-symbols-outlined{font-family:var(--md-rating-icon-font-family, 'Material Symbols Rounded', 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;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}: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}:host([hidden]){display:none !important}`;const p=t(class t extends i{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdHover=e(this,"mdHover",7);this.mdChange=e(this,"mdChange",7);this.internals=this.attachInternals();this.value=0;this.defaultValue=0;this.max=5;this.precision=1;this.size="md";this.readonly=false;this.disabled=false;this.softDisabled=false;this.icon="star";this.emptyIcon="star";this.outlineEmpty=true;this.showValueLabel=false;this.ratingLabel="Rating";this.name="";this.hover="preview";this.density=0;this.hoveredValue=null;this.focused=false;this.initialValue=0;this.computeValueFromPointer=(t,i,e)=>{if(this.precision===1)return t+1;const a=e.getBoundingClientRect();const s=getComputedStyle(this.el).direction==="rtl";const n=i.clientX-a.left;const r=s?1-n/a.width:n/a.width;return t+(r<=.5?.5:1)};this.handleItemPointerMove=t=>i=>{if(!this.isInteractive)return;if(this.hover==="off")return;const e=i.currentTarget;const a=this.computeValueFromPointer(t,i,e);if(a!==this.hoveredValue){this.hoveredValue=a;this.mdHover.emit(a)}};this.handlePointerLeave=()=>{if(!this.isInteractive)return;if(this.hoveredValue==null)return;this.hoveredValue=null;this.mdHover.emit(null)};this.handleItemClick=t=>i=>{if(!this.isInteractive)return;const e=i.currentTarget;let a=this.computeValueFromPointer(t,i,e);if(a===this.value){a=this.defaultValue}this.value=a;this.mdChange.emit(a)};this.handleItemPointerDown=()=>t=>{if(!this.isInteractive||this.rippleSuppressed())return;const i=t.currentTarget;const e=i.querySelector(".md-rating__icon--ripple");if(!e||typeof e.animate!=="function")return;const a=i.getBoundingClientRect();const s=a.width?(t.clientX-a.left)/a.width*100:50;const n=a.height?(t.clientY-a.top)/a.height*100:50;e.animate([{clipPath:`circle(0% at ${s}% ${n}%)`,opacity:.22},{clipPath:`circle(85% at ${s}% ${n}%)`,opacity:0}],{duration:420,easing:"cubic-bezier(0.2, 0, 0, 1)"})};this.handleKeyDown=t=>{if(!this.isInteractive)return;const i=this.precision;let e=this.value;const a=getComputedStyle(this.el).direction==="rtl";switch(t.key){case"ArrowRight":e=a?this.value-i:this.value+i;break;case"ArrowLeft":e=a?this.value+i:this.value-i;break;case"ArrowUp":e=this.value+i;break;case"ArrowDown":e=this.value-i;break;case"Home":e=0;break;case"End":e=this.max;break;default:if(/^[0-9]$/.test(t.key)){const i=Number(t.key);if(i<=this.max)e=i}else{return}}t.preventDefault();e=Math.max(0,Math.min(this.max,e));if(e!==this.value){this.value=e;this.mdChange.emit(e)}};this.handleFocus=()=>{this.focused=true};this.handleBlur=()=>{this.focused=false;if(this.hoveredValue!=null){this.hoveredValue=null;this.mdHover.emit(null)}}}componentWillLoad(){r(this);this.validateValue(this.value);this.initialValue=this.value}validateValue(t){if(typeof t!=="number"||Number.isNaN(t)){this.value=0;return}if(t<0)this.value=0;if(t>this.max)this.value=this.max;this.syncFormValue()}onMaxChange(){if(this.value>this.max)this.value=this.max}formResetCallback(){this.value=this.initialValue}syncFormValue(){h(this.internals,this.value?String(this.value):null)}async focusRating(){const t=this.el.shadowRoot;const i=t?.querySelector(".md-rating__items");i?.focus()}get isInteractive(){return!this.readonly&&!this.disabled&&!this.softDisabled}get displayValue(){return this.hoveredValue!=null&&this.hover==="preview"?this.hoveredValue:this.value}resolveLabel(t){if(this.getLabel)return this.getLabel(t);if(t===0)return"Empty";if(t===1)return"1 Star";return`${t} Stars`}resolveAccessibleLabel(){const t=this.el;const i=t.getRootNode();const e=t=>i.getElementById?.(t)??(typeof document!=="undefined"?document.getElementById(t):null);const a=t=>t.map((t=>t?.textContent?.trim()??"")).filter(Boolean).join(" ");const s=t.getAttribute("aria-labelledby");if(s){const t=a(s.split(/\s+/).map(e));if(t)return t}const n=t.getAttribute("aria-label");if(n)return n;const r=this.internals?.labels;if(r&&r.length){const t=a(Array.from(r));if(t)return t}return this.ratingLabel}valueLabelVariants(){const t=this.precision||1;const i=new Set;for(let e=0;e<=this.max+1e-9;e+=t){const a=Math.min(Math.round(e/t)*t,this.max);i.add(this.resolveLabel(a))}return Array.from(i)}rippleSuppressed(){if(typeof getComputedStyle!=="function")return false;try{return getComputedStyle(this.el).getPropertyValue("--md-sys-ripple-enabled").trim()==="0"}catch{return false}}renderItem(t){const i=this.displayValue;const e=Math.max(0,Math.min(1,i-t));const s=e>0&&e<1;const n=e>=1;const r=e<=0;return a("span",{class:{"md-rating__item":true,"md-rating__item--full":n,"md-rating__item--half":s,"md-rating__item--empty":r},part:`item ${n?"item-full":s?"item-half":"item-empty"}`,"aria-hidden":"true",onPointerMove:this.handleItemPointerMove(t),onPointerDown:this.handleItemPointerDown(),onClick:this.handleItemClick(t)},a("span",{class:"md-rating__icon md-rating__icon--bg material-symbols-outlined",part:"icon-empty"},this.outlineEmpty?this.icon:this.emptyIcon),a("span",{class:"md-rating__icon md-rating__icon--fg material-symbols-outlined",part:"icon-filled",style:{clipPath:`inset(0 ${(1-e)*100}% 0 0)`}},this.icon),a("span",{class:"md-rating__icon md-rating__icon--state material-symbols-outlined",part:"state-layer","aria-hidden":"true"},this.icon),a("span",{class:"md-rating__icon md-rating__icon--ripple material-symbols-outlined",part:"ripple","aria-hidden":"true"},this.icon))}render(){const t=this.disabled?"-1":this.readonly?undefined:"0";const i=this.value;const e=!this.readonly;const n=this.resolveAccessibleLabel();const r=e?n:`${n}: ${this.resolveLabel(i)}`;return a(s,{key:"215616e52eb1268bde7ccdfaf86418b04f339958",class:{"md-rating":true,[`md-rating--${this.size}`]:true,"md-rating--readonly":this.readonly,"md-rating--disabled":this.disabled,"md-rating--soft-disabled":this.softDisabled,"md-rating--focused":this.focused}},a("div",{key:"52e5d38b642290ecbcabab1f101d3749ce7aa2de",class:"md-rating__items",role:e?"slider":"img","aria-label":r,"aria-valuemin":e?0:undefined,"aria-valuemax":e?this.max:undefined,"aria-valuenow":e?i:undefined,"aria-valuetext":e?this.resolveLabel(i):undefined,"aria-orientation":e?"horizontal":undefined,"aria-readonly":e?"false":undefined,"aria-disabled":e&&(this.disabled||this.softDisabled)?"true":undefined,tabindex:t,part:"items",onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onPointerLeave:this.handlePointerLeave},Array.from({length:this.max},((t,i)=>this.renderItem(i)))),this.showValueLabel&&a("span",{key:"b3d68eeeb636b38160d165157c92e7d28f264647",class:"md-rating__value-label",part:"value-label","aria-hidden":"true"},this.valueLabelVariants().map((t=>a("span",{key:t,class:"md-rating__value-label-sizer","aria-hidden":"true"},t))),a("span",{key:"b649a136d4511c49211f4ee23c148428a100e67e",class:"md-rating__value-label-text"},this.resolveLabel(this.displayValue))))}componentDidLoad(){o(this)}componentDidRender(){l(this)}connectedCallback(){d(this)}disconnectedCallback(){c(this)}componentShouldUpdate(){m(this);return true}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{validateValue:0}],max:[{onMaxChange:0}]}}static get style(){return g()+u()}},[65,"md-rating",{value:[1538],defaultValue:[2,"default-value"],max:[514],precision:[514],size:[513],readonly:[516],disabled:[516],softDisabled:[516,"soft-disabled"],icon:[1],emptyIcon:[1,"empty-icon"],outlineEmpty:[516,"outline-empty"],getLabel:[16],showValueLabel:[516,"show-value-label"],ratingLabel:[1,"rating-label"],name:[513],hover:[513],density:[514],hoveredValue:[32],focused:[32],focusRating:[64]},undefined,{value:[{validateValue:0}],max:[{onMaxChange:0}]}]);function f(){if(typeof customElements==="undefined"){return}const t=["md-rating"];t.forEach((t=>{switch(t){case"md-rating":if(!customElements.get(n(t))){customElements.define(n(t),p)}break}}))}f();const y=p;const _=f;export{y as MdRating,_ as defineCustomElement};
|
|
1
|
+
import{p as t,H as i,c as e,h as a,d as s,t as n}from"./p-t9lomFml.js";import{b as r,c as o,i as l,r as d,d as c,p as m}from"./p-D9C2BtN-.js";import{s as h}from"./p-EuzGe8T6.js";const g=()=>`:host(:not([data-awc-motion-ready])),:host(:not([data-awc-motion-ready]))::before,:host(:not([data-awc-motion-ready]))::after,:host(:not([data-awc-motion-ready])) *,:host(:not([data-awc-motion-ready])) *::before,:host(:not([data-awc-motion-ready])) *::after{transition-property:none !important}`;const u=()=>`:host{--_size:var(--md-rating-item-size, max(12px, calc(28px + var(--md-sys-density-scale, 0) * 2px)));--_gap:var(--md-rating-item-gap, var(--md-sys-spacing-gap-xs, 4px));--_active-color:var(--md-rating-active-color, var(--md-sys-color-secondary, #FFB400));--_inactive-color:var(--md-rating-inactive-color, color-mix(in srgb, var(--md-sys-color-on-surface-variant) 30%, transparent));--_focus-ring-color:var(--md-rating-focus-ring-color, var(--md-sys-color-secondary));--_focus-ring-width:var(--md-rating-focus-ring-width, 3px);--_focus-ring-offset:var(--md-rating-focus-ring-offset, 2px);--_state-layer-color:var(--md-rating-state-layer-color, var(--md-sys-color-on-surface));--_label-color:var(--md-rating-value-label-color, var(--md-sys-color-on-surface));--_label-font:var( --md-rating-value-label-font, var(--md-sys-typescale-label-medium-font, system-ui) );--_pop-scale:var(--md-rating-pop-scale, 1.12);--_duration:var(--md-rating-duration, var(--md-sys-motion-duration-short3, 150ms));display:inline-flex;align-items:center;gap:var(--md-sys-spacing-gap-md, 12px);color:var(--_active-color);vertical-align:middle}:host([size="xs"]){--_size:var(--md-rating-item-size, max(12px, calc(16px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="sm"]){--_size:var(--md-rating-item-size, max(12px, calc(20px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="md"]){--_size:var(--md-rating-item-size, max(12px, calc(28px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="lg"]){--_size:var(--md-rating-item-size, max(12px, calc(36px + var(--md-sys-density-scale, 0) * 2px)))}:host([size="xl"]){--_size:var(--md-rating-item-size, max(12px, calc(48px + var(--md-sys-density-scale, 0) * 2px)))}.md-rating__items{display:inline-flex;align-items:center;gap:var(--_gap);position:relative;border-radius:var(--md-sys-shape-corner-full, 999px);outline:none}.md-rating__items:focus-visible{outline:var(--_focus-ring-width) solid var(--_focus-ring-color);outline-offset:var(--_focus-ring-offset)}.md-rating__item{position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--_size);block-size:var(--_size);padding:0;margin:0;border:0;background:transparent;cursor:pointer;border-radius:50%;color:inherit;font:inherit;transition:transform var(--_duration) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), color var(--_duration) ease;-webkit-tap-highlight-color:transparent;will-change:transform;backface-visibility:hidden}:host(.md-rating--readonly) .md-rating__item,:host(.md-rating--disabled) .md-rating__item,:host(.md-rating--soft-disabled) .md-rating__item{cursor:default}.md-rating__item:hover{transform:scale(var(--_pop-scale))}:host(.md-rating--readonly) .md-rating__item:hover,:host(.md-rating--disabled) .md-rating__item:hover,:host(.md-rating--soft-disabled) .md-rating__item:hover{transform:none}.md-rating__icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--md-rating-icon-font-family, 'Material Symbols Rounded', 'Material Symbols Outlined', 'Material Icons');font-size:var(--_size);font-weight:normal;font-style:normal;letter-spacing:normal;text-transform:none;line-height:1;white-space:nowrap;direction:ltr;pointer-events:none;-webkit-font-smoothing:antialiased;font-feature-settings:'liga';font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.md-rating__icon--bg{color:var(--_inactive-color)}.md-rating__icon--fg{color:var(--_active-color);font-variation-settings:'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24}:host([outline-empty]) .md-rating__icon--bg{font-variation-settings:'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24}.md-rating__icon--state{color:var(--_state-layer-color);opacity:0;font-variation-settings:'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;transition:opacity var(--_duration) ease}.md-rating__item:hover .md-rating__icon--state{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}.md-rating__item:active .md-rating__icon--state{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}:host(.md-rating--readonly) .md-rating__icon--state,:host(.md-rating--disabled) .md-rating__icon--state,:host(.md-rating--soft-disabled) .md-rating__icon--state{display:none}.md-rating__icon--ripple{color:var(--_state-layer-color);opacity:0;font-variation-settings:'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24}:host(.md-rating--readonly) .md-rating__icon--ripple,:host(.md-rating--disabled) .md-rating__icon--ripple,:host(.md-rating--soft-disabled) .md-rating__icon--ripple{display:none}.md-rating__value-label{display:inline-grid;place-items:center start;font:var(--_label-font);font-size:var(--md-sys-typescale-label-large-size, 14px);font-weight:var(--md-sys-typescale-label-large-weight, 500);color:var(--_label-color);white-space:nowrap;font-variant-numeric:tabular-nums}.md-rating__value-label>*{grid-area:1 / 1}.md-rating__value-label-sizer{visibility:hidden;pointer-events:none}:host(.md-rating--disabled){opacity:var(--md-sys-state-disabled-content-opacity, 0.38);pointer-events:none}:host(.md-rating--soft-disabled){opacity:var(--md-sys-state-disabled-content-opacity, 0.38)}:host(.md-rating--soft-disabled) .md-rating__items{pointer-events:none}:host(.md-rating--soft-disabled) .md-rating__items{pointer-events:auto}:host(.md-rating--soft-disabled) .md-rating__item{pointer-events:none}:host-context([dir="rtl"]) .md-rating__items,:host([dir="rtl"]) .md-rating__items{flex-direction:row-reverse}@media (prefers-reduced-motion: reduce){.md-rating__item,.md-rating__icon--state{transition:none}.md-rating__item:hover{transform:none}}.material-symbols-outlined{font-family:var(--md-rating-icon-font-family, 'Material Symbols Rounded', 'Material Symbols Outlined', 'Material Icons');font-weight:normal;font-style:normal;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}: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}:host([hidden]){display:none !important}`;const p=t(class t extends i{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.mdHover=e(this,"mdHover",7);this.mdChange=e(this,"mdChange",7);this.internals=this.attachInternals();this.value=0;this.defaultValue=0;this.max=5;this.precision=1;this.size="md";this.readonly=false;this.disabled=false;this.softDisabled=false;this.icon="star";this.emptyIcon="star";this.outlineEmpty=true;this.showValueLabel=false;this.ratingLabel="Rating";this.name="";this.hover="preview";this.density=0;this.hoveredValue=null;this.focused=false;this.initialValue=0;this.computeValueFromPointer=(t,i,e)=>{if(this.precision===1)return t+1;const a=e.getBoundingClientRect();const s=getComputedStyle(this.el).direction==="rtl";const n=i.clientX-a.left;const r=s?1-n/a.width:n/a.width;return t+(r<=.5?.5:1)};this.handleItemPointerMove=t=>i=>{if(!this.isInteractive)return;if(this.hover==="off")return;const e=i.currentTarget;const a=this.computeValueFromPointer(t,i,e);if(a!==this.hoveredValue){this.hoveredValue=a;this.mdHover.emit(a)}};this.handlePointerLeave=()=>{if(!this.isInteractive)return;if(this.hoveredValue==null)return;this.hoveredValue=null;this.mdHover.emit(null)};this.handleItemClick=t=>i=>{if(!this.isInteractive)return;const e=i.currentTarget;let a=this.computeValueFromPointer(t,i,e);if(a===this.value){a=this.defaultValue}this.value=a;this.mdChange.emit(a)};this.handleItemPointerDown=()=>t=>{if(!this.isInteractive||this.rippleSuppressed())return;const i=t.currentTarget;const e=i.querySelector(".md-rating__icon--ripple");if(!e||typeof e.animate!=="function")return;const a=i.getBoundingClientRect();const s=a.width?(t.clientX-a.left)/a.width*100:50;const n=a.height?(t.clientY-a.top)/a.height*100:50;e.animate([{clipPath:`circle(0% at ${s}% ${n}%)`,opacity:.22},{clipPath:`circle(85% at ${s}% ${n}%)`,opacity:0}],{duration:420,easing:"cubic-bezier(0.2, 0, 0, 1)"})};this.handleKeyDown=t=>{if(!this.isInteractive)return;const i=this.precision;let e=this.value;const a=getComputedStyle(this.el).direction==="rtl";switch(t.key){case"ArrowRight":e=a?this.value-i:this.value+i;break;case"ArrowLeft":e=a?this.value+i:this.value-i;break;case"ArrowUp":e=this.value+i;break;case"ArrowDown":e=this.value-i;break;case"Home":e=0;break;case"End":e=this.max;break;default:if(/^[0-9]$/.test(t.key)){const i=Number(t.key);if(i<=this.max)e=i}else{return}}t.preventDefault();e=Math.max(0,Math.min(this.max,e));if(e!==this.value){this.value=e;this.mdChange.emit(e)}};this.handleFocus=()=>{this.focused=true};this.handleBlur=()=>{this.focused=false;if(this.hoveredValue!=null){this.hoveredValue=null;this.mdHover.emit(null)}}}componentWillLoad(){r(this);this.validateValue(this.value);this.initialValue=this.value}validateValue(t){if(typeof t!=="number"||Number.isNaN(t)){this.value=0;return}if(t<0)this.value=0;if(t>this.max)this.value=this.max;this.syncFormValue()}onMaxChange(){if(this.value>this.max)this.value=this.max}formResetCallback(){this.value=this.initialValue}syncFormValue(){h(this.internals,this.value?String(this.value):null)}async focusRating(){const t=this.el.shadowRoot;const i=t?.querySelector(".md-rating__items");i?.focus()}get isInteractive(){return!this.readonly&&!this.disabled&&!this.softDisabled}get displayValue(){return this.hoveredValue!=null&&this.hover==="preview"?this.hoveredValue:this.value}resolveLabel(t){if(this.getLabel)return this.getLabel(t);if(t===0)return"Empty";if(t===1)return"1 Star";return`${t} Stars`}resolveAccessibleLabel(){const t=this.el;const i=t.getRootNode();const e=t=>i.getElementById?.(t)??(typeof document!=="undefined"?document.getElementById(t):null);const a=t=>t.map((t=>t?.textContent?.trim()??"")).filter(Boolean).join(" ");const s=t.getAttribute("aria-labelledby");if(s){const t=a(s.split(/\s+/).map(e));if(t)return t}const n=t.getAttribute("aria-label");if(n)return n;const r=this.internals?.labels;if(r&&r.length){const t=a(Array.from(r));if(t)return t}return this.ratingLabel}valueLabelVariants(){const t=this.precision||1;const i=new Set;for(let e=0;e<=this.max+1e-9;e+=t){const a=Math.min(Math.round(e/t)*t,this.max);i.add(this.resolveLabel(a))}return Array.from(i)}rippleSuppressed(){if(typeof getComputedStyle!=="function")return false;try{return getComputedStyle(this.el).getPropertyValue("--md-sys-ripple-enabled").trim()==="0"}catch{return false}}renderItem(t){const i=this.displayValue;const e=Math.max(0,Math.min(1,i-t));const s=e>0&&e<1;const n=e>=1;const r=e<=0;return a("span",{class:{"md-rating__item":true,"md-rating__item--full":n,"md-rating__item--half":s,"md-rating__item--empty":r},part:`item ${n?"item-full":s?"item-half":"item-empty"}`,"aria-hidden":"true",onPointerMove:this.handleItemPointerMove(t),onPointerDown:this.handleItemPointerDown(),onClick:this.handleItemClick(t)},a("span",{class:"md-rating__icon md-rating__icon--bg material-symbols-outlined",part:"icon-empty"},this.outlineEmpty?this.icon:this.emptyIcon),a("span",{class:"md-rating__icon md-rating__icon--fg material-symbols-outlined",part:"icon-filled",style:{clipPath:`inset(0 ${(1-e)*100}% 0 0)`}},this.icon),a("span",{class:"md-rating__icon md-rating__icon--state material-symbols-outlined",part:"state-layer","aria-hidden":"true"},this.icon),a("span",{class:"md-rating__icon md-rating__icon--ripple material-symbols-outlined",part:"ripple","aria-hidden":"true"},this.icon))}render(){const t=this.disabled?"-1":this.readonly?undefined:"0";const i=this.value;const e=!this.readonly;const n=this.resolveAccessibleLabel();const r=e?n:`${n}: ${this.resolveLabel(i)}`;return a(s,{key:"215616e52eb1268bde7ccdfaf86418b04f339958",class:{"md-rating":true,[`md-rating--${this.size}`]:true,"md-rating--readonly":this.readonly,"md-rating--disabled":this.disabled,"md-rating--soft-disabled":this.softDisabled,"md-rating--focused":this.focused}},a("div",{key:"52e5d38b642290ecbcabab1f101d3749ce7aa2de",class:"md-rating__items",role:e?"slider":"img","aria-label":r,"aria-valuemin":e?0:undefined,"aria-valuemax":e?this.max:undefined,"aria-valuenow":e?i:undefined,"aria-valuetext":e?this.resolveLabel(i):undefined,"aria-orientation":e?"horizontal":undefined,"aria-readonly":e?"false":undefined,"aria-disabled":e&&(this.disabled||this.softDisabled)?"true":undefined,tabindex:t,part:"items",onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onPointerLeave:this.handlePointerLeave},Array.from({length:this.max},((t,i)=>this.renderItem(i)))),this.showValueLabel&&a("span",{key:"b3d68eeeb636b38160d165157c92e7d28f264647",class:"md-rating__value-label",part:"value-label","aria-hidden":"true"},this.valueLabelVariants().map((t=>a("span",{key:t,class:"md-rating__value-label-sizer","aria-hidden":"true"},t))),a("span",{key:"b649a136d4511c49211f4ee23c148428a100e67e",class:"md-rating__value-label-text"},this.resolveLabel(this.displayValue))))}componentDidLoad(){o(this)}componentDidRender(){l(this)}connectedCallback(){d(this)}disconnectedCallback(){c(this)}componentShouldUpdate(){m(this);return true}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{validateValue:0}],max:[{onMaxChange:0}]}}static get style(){return g()+u()}},[65,"md-rating",{value:[1538],defaultValue:[2,"default-value"],max:[514],precision:[514],size:[513],readonly:[516],disabled:[516],softDisabled:[516,"soft-disabled"],icon:[1],emptyIcon:[1,"empty-icon"],outlineEmpty:[516,"outline-empty"],getLabel:[16],showValueLabel:[516,"show-value-label"],ratingLabel:[1,"rating-label"],name:[513],hover:[513],density:[514],hoveredValue:[32],focused:[32],focusRating:[64]},undefined,{value:[{validateValue:0}],max:[{onMaxChange:0}]}]);function f(){if(typeof customElements==="undefined"){return}const t=["md-rating"];t.forEach((t=>{switch(t){case"md-rating":if(!customElements.get(n(t))){customElements.define(n(t),p)}break}}))}f();const y=p;const _=f;export{y as MdRating,_ as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=md-rating.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-
|
|
1
|
+
import{M as o,d as s}from"./p-CMkPI5PO.js";const t=o;const p=s;export{t as MdRipple,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=md-ripple.js.map
|