@angular/material
Version:
Angular Material
1 lines • 1.42 MB
Source Map (JSON)
{"version":3,"file":"material.umd.min.js","sources":["../../src/material/tabs/tab-header.ts","../../src/material/tabs/tab-nav-bar/tab-nav-bar.ts","../../src/material/tabs/tabs-module.ts","../../src/material/toolbar/toolbar.ts","../../src/material/toolbar/toolbar-module.ts","../../src/material/tree/node.ts","../../src/material/tree/padding.ts","../../src/material/tree/outlet.ts","../../src/material/tree/tree.ts","../../src/material/tree/toggle.ts","../../src/material/tree/tree-module.ts","../../src/material/tree/data-source/flat-data-source.ts","../../src/material/tree/data-source/nested-data-source.ts","../../src/material/autocomplete/autocomplete-trigger.ts","../../src/material/core/month-constants.ts","../../src/material/datepicker/multi-year-view.ts","../../src/material/expansion/expansion-animations.ts","../../src/material/select/select.ts","../../src/material/tooltip/tooltip.ts","../../src/material/table/table-data-source.ts","../../src/material/tabs/ink-bar.ts","../../src/material/tabs/tab-content.ts","../../src/material/tabs/tab-label.ts","../../src/material/tabs/tab.ts","../../src/material/tabs/tabs-animations.ts","../../src/material/tabs/tab-body.ts","../../src/material/tabs/tab-group.ts","../../src/material/tabs/tab-label-wrapper.ts","../../src/material/tabs/paginated-tab-header.ts","../../src/material/sort/sort-header.ts","../../src/material/sort/sort-module.ts","../../src/material/stepper/step-label.ts","../../src/material/stepper/stepper-intl.ts","../../src/material/stepper/step-header.ts","../../src/material/stepper/stepper-animations.ts","../../src/material/stepper/stepper-icon.ts","../../src/material/stepper/stepper.ts","../../src/material/stepper/stepper-button.ts","../../src/material/stepper/stepper-module.ts","../../src/material/table/table.ts","../../src/material/table/cell.ts","../../src/material/table/row.ts","../../src/material/table/text-column.ts","../../src/material/table/table-module.ts","../../src/material/slider/slider.ts","../../src/material/slider/slider-module.ts","../../src/material/snack-bar/snack-bar-ref.ts","../../src/material/snack-bar/snack-bar-config.ts","../../src/material/snack-bar/simple-snack-bar.ts","../../src/material/snack-bar/snack-bar-animations.ts","../../src/material/snack-bar/snack-bar-container.ts","../../src/material/snack-bar/snack-bar-module.ts","../../src/material/snack-bar/snack-bar.ts","../../src/material/sort/sort.ts","../../src/material/sort/sort-animations.ts","../../src/material/sort/sort-header-intl.ts","../../src/material/sidenav/drawer.ts","../../src/material/sidenav/sidenav.ts","../../src/material/sidenav/sidenav-module.ts","../../src/material/slide-toggle/slide-toggle-config.ts","../../src/material/slide-toggle/slide-toggle.ts","../../src/material/slide-toggle/slide-toggle-required-validator.ts","../../src/material/slide-toggle/slide-toggle-module.ts","../../src/material/progress-spinner/progress-spinner.ts","../../src/material/progress-spinner/progress-spinner-module.ts","../../src/material/radio/radio.ts","../../src/material/radio/radio-module.ts","../../src/material/sidenav/drawer-animations.ts","../../src/material/select/select-module.ts","../../src/material/tooltip/tooltip-animations.ts","../../src/material/tooltip/tooltip-module.ts","../../src/material/paginator/paginator-intl.ts","../../src/material/paginator/paginator.ts","../../src/material/paginator/paginator-module.ts","../../src/material/progress-bar/progress-bar.ts","../../src/material/progress-bar/progress-bar-module.ts","../../src/material/menu/menu.ts","../../src/material/menu/menu-trigger.ts","../../src/material/menu/menu-module.ts","../../src/material/select/select-animations.ts","../../src/material/list/selection-list.ts","../../src/material/list/list-module.ts","../../src/material/menu/menu-animations.ts","../../src/material/menu/menu-content.ts","../../src/material/menu/menu-panel.ts","../../src/material/menu/menu-item.ts","../../src/material/list/list.ts","../../src/material/expansion/expansion-panel-header.ts","../../src/material/expansion/accordion.ts","../../src/material/expansion/expansion-module.ts","../../src/material/grid-list/grid-list-base.ts","../../src/material/grid-list/grid-tile.ts","../../src/material/grid-list/tile-coordinator.ts","../../src/material/grid-list/tile-styler.ts","../../src/material/grid-list/grid-list.ts","../../src/material/grid-list/grid-list-module.ts","../../src/material/icon/icon-registry.ts","../../src/material/icon/icon.ts","../../src/material/icon/icon-module.ts","../../src/material/datepicker/calendar.ts","../../src/material/datepicker/datepicker-animations.ts","../../src/material/datepicker/datepicker.ts","../../src/material/datepicker/datepicker-input.ts","../../src/material/datepicker/datepicker-toggle.ts","../../src/material/datepicker/datepicker-module.ts","../../src/material/divider/divider.ts","../../src/material/divider/divider-module.ts","../../src/material/expansion/accordion-base.ts","../../src/material/expansion/expansion-panel-content.ts","../../src/material/expansion/expansion-panel.ts","../../src/material/input/input.ts","../../src/material/input/input-module.ts","../../src/material/datepicker/datepicker-intl.ts","../../src/material/datepicker/calendar-body.ts","../../src/material/datepicker/month-view.ts","../../src/material/datepicker/year-view.ts","../../src/material/chips/chip-list.ts","../../src/material/chips/chip-input.ts","../../src/material/chips/chips-module.ts","../../src/material/dialog/dialog-config.ts","../../src/material/dialog/dialog-animations.ts","../../src/material/dialog/dialog-container.ts","../../src/material/dialog/dialog-ref.ts","../../src/material/dialog/dialog.ts","../../src/material/dialog/dialog-content-directives.ts","../../src/material/dialog/dialog-module.ts","../../src/material/input/autosize.ts","../../src/material/input/input-value-accessor.ts","../../src/material/card/card.ts","../../src/material/card/card-module.ts","../../src/material/checkbox/checkbox-config.ts","../../src/material/checkbox/checkbox.ts","../../src/material/checkbox/checkbox-required-validator.ts","../../src/material/checkbox/checkbox-module.ts","../../src/material/chips/chip.ts","../../src/material/chips/chip-default-options.ts","../../src/material/button/button.ts","../../src/material/button/button-module.ts","../../src/material/button-toggle/button-toggle.ts","../../src/material/button-toggle/button-toggle-module.ts","../../src/material/form-field/form-field.ts","../../src/material/form-field/form-field-module.ts","../../src/material/autocomplete/autocomplete.ts","../../src/material/autocomplete/autocomplete-origin.ts","../../src/material/autocomplete/autocomplete-module.ts","../../src/material/badge/badge.ts","../../src/material/badge/badge-module.ts","../../src/material/bottom-sheet/bottom-sheet-config.ts","../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../src/material/bottom-sheet/bottom-sheet-container.ts","../../src/material/bottom-sheet/bottom-sheet-module.ts","../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../src/material/bottom-sheet/bottom-sheet.ts","../../src/material/core/option/option.ts","../../src/material/core/option/index.ts","../../src/material/core/label/label-options.ts","../../src/material/form-field/error.ts","../../src/material/form-field/form-field-animations.ts","../../src/material/form-field/form-field-control.ts","../../src/material/form-field/hint.ts","../../src/material/form-field/label.ts","../../src/material/form-field/placeholder.ts","../../src/material/form-field/prefix.ts","../../src/material/form-field/suffix.ts","../../node_modules/tslib/tslib.es6.js","../../src/material/core/common-behaviors/common-module.ts","../../src/material/core/common-behaviors/disabled.ts","../../src/material/core/common-behaviors/color.ts","../../src/material/core/common-behaviors/disable-ripple.ts","../../src/material/core/common-behaviors/tabindex.ts","../../src/material/core/common-behaviors/error-state.ts","../../src/material/core/common-behaviors/initialized.ts","../../src/material/core/datetime/date-adapter.ts","../../src/material/core/datetime/native-date-adapter.ts","../../src/material/core/line/line.ts","../../src/material/core/ripple/ripple-renderer.ts","../../src/material/form-field/form-field-errors.ts","../../src/material/input/input-errors.ts","../../src/material/datepicker/datepicker-errors.ts","../../src/material/menu/menu-errors.ts","../../src/material/select/select-errors.ts","../../src/material/sort/sort-errors.ts","../../src/material/core/version.ts","../../src/material/core/animation/animation.ts","../../src/material/core/datetime/date-formats.ts","../../src/material/core/datetime/native-date-formats.ts","../../src/material/core/datetime/index.ts","../../src/material/core/error/error-options.ts","../../src/material/core/gestures/gesture-config.ts","../../src/material/core/ripple/ripple-ref.ts","../../src/material/core/ripple/ripple.ts","../../src/material/core/ripple/index.ts","../../src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts","../../src/material/core/selection/index.ts","../../src/material/core/option/optgroup.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n NgZone,\n OnDestroy,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n Input,\n Inject,\n} from '@angular/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MatInkBar} from './ink-bar';\nimport {MatTabLabelWrapper} from './tab-label-wrapper';\nimport {Platform} from '@angular/cdk/platform';\nimport {MatPaginatedTabHeader} from './paginated-tab-header';\n\n/** Base class with all of the `MatTabHeader` functionality. */\n// tslint:disable-next-line:class-name\nexport abstract class _MatTabHeaderBase extends MatPaginatedTabHeader implements\n AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {\n\n /** Whether the ripple effect is disabled or not. */\n @Input()\n get disableRipple() { return this._disableRipple; }\n set disableRipple(value: any) { this._disableRipple = coerceBooleanProperty(value); }\n private _disableRipple: boolean = false;\n\n constructor(elementRef: ElementRef,\n changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n @Optional() dir: Directionality,\n ngZone: NgZone,\n platform: Platform,\n // @breaking-change 9.0.0 `_animationMode` parameter to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n\n protected _itemSelected(event: KeyboardEvent) {\n event.preventDefault();\n }\n}\n\n/**\n * The header of the tab group which displays a list of all the tabs in the tab group. Includes\n * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the\n * width of the header container, then arrows will be displayed to allow the user to scroll\n * left and right across the header.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-tab-header',\n templateUrl: 'tab-header.html',\n styleUrls: ['tab-header.css'],\n inputs: ['selectedIndex'],\n outputs: ['selectFocusedIndex', 'indexFocused'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-tab-header',\n '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',\n '[class.mat-tab-header-rtl]': \"_getLayoutDirection() == 'rtl'\",\n },\n})\nexport class MatTabHeader extends _MatTabHeaderBase {\n @ContentChildren(MatTabLabelWrapper) _items: QueryList<MatTabLabelWrapper>;\n @ViewChild(MatInkBar, {static: true}) _inkBar: MatInkBar;\n @ViewChild('tabListContainer', {static: true}) _tabListContainer: ElementRef;\n @ViewChild('tabList', {static: true}) _tabList: ElementRef;\n @ViewChild('nextPaginator', {static: false}) _nextPaginator: ElementRef<HTMLElement>;\n @ViewChild('previousPaginator', {static: false}) _previousPaginator: ElementRef<HTMLElement>;\n\n constructor(elementRef: ElementRef,\n changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n @Optional() dir: Directionality,\n ngZone: NgZone,\n platform: Platform,\n // @breaking-change 9.0.0 `_animationMode` parameter to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Platform} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {\n AfterContentChecked,\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n CanDisable, CanDisableCtor,\n CanDisableRipple, CanDisableRippleCtor,\n HasTabIndex, HasTabIndexCtor,\n MAT_RIPPLE_GLOBAL_OPTIONS,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex, RippleConfig,\n RippleGlobalOptions,\n RippleRenderer,\n RippleTarget,\n ThemePalette,\n} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {FocusMonitor, FocusableOption} from '@angular/cdk/a11y';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {MatInkBar} from '../ink-bar';\nimport {MatPaginatedTabHeader, MatPaginatedTabHeaderItem} from '../paginated-tab-header';\nimport {startWith, takeUntil} from 'rxjs/operators';\n\n/** Base class with all of the `MatTabNav` functionality. */\n// tslint:disable-next-line:class-name\nexport abstract class _MatTabNavBase extends MatPaginatedTabHeader implements AfterContentChecked,\n AfterContentInit, OnDestroy {\n\n /** Query list of all tab links of the tab navigation. */\n abstract _items: QueryList<MatPaginatedTabHeaderItem & {active: boolean}>;\n\n /** Background color of the tab nav. */\n @Input()\n get backgroundColor(): ThemePalette { return this._backgroundColor; }\n set backgroundColor(value: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-background-${this.backgroundColor}`);\n\n if (value) {\n classList.add(`mat-background-${value}`);\n }\n\n this._backgroundColor = value;\n }\n private _backgroundColor: ThemePalette;\n\n /** Whether the ripple effect is disabled or not. */\n @Input()\n get disableRipple() { return this._disableRipple; }\n set disableRipple(value: any) { this._disableRipple = coerceBooleanProperty(value); }\n private _disableRipple: boolean = false;\n\n /** Theme color of the nav bar. */\n @Input() color: ThemePalette = 'primary';\n\n constructor(elementRef: ElementRef,\n @Optional() dir: Directionality,\n ngZone: NgZone,\n changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n /**\n * @deprecated @breaking-change 9.0.0 `platform` parameter to become required.\n */\n @Optional() platform?: Platform,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n\n protected _itemSelected() {\n // noop\n }\n\n ngAfterContentInit() {\n // We need this to run before the `changes` subscription in parent to ensure that the\n // selectedIndex is up-to-date by the time the super class starts looking for it.\n this._items.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this.updateActiveLink();\n });\n\n super.ngAfterContentInit();\n }\n\n /**\n * Notifies the component that the active link has been changed.\n * @breaking-change 8.0.0 `element` parameter to be removed.\n */\n updateActiveLink(_element?: ElementRef) {\n if (!this._items) {\n return;\n }\n\n const items = this._items.toArray();\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].active) {\n this.selectedIndex = i;\n this._changeDetectorRef.markForCheck();\n return;\n }\n }\n\n // The ink bar should hide itself if no items are active.\n this.selectedIndex = -1;\n this._inkBar.hide();\n }\n}\n\n\n/**\n * Navigation component matching the styles of the tab group header.\n * Provides anchored navigation with animated ink bar.\n */\n@Component({\n moduleId: module.id,\n selector: '[mat-tab-nav-bar]',\n exportAs: 'matTabNavBar, matTabNav',\n inputs: ['color'],\n templateUrl: 'tab-nav-bar.html',\n styleUrls: ['tab-nav-bar.css'],\n host: {\n 'class': 'mat-tab-nav-bar mat-tab-header',\n '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',\n '[class.mat-tab-header-rtl]': \"_getLayoutDirection() == 'rtl'\",\n '[class.mat-primary]': 'color !== \"warn\" && color !== \"accent\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatTabNav extends _MatTabNavBase {\n @ContentChildren(forwardRef(() => MatTabLink), {descendants: true}) _items: QueryList<MatTabLink>;\n @ViewChild(MatInkBar, {static: true}) _inkBar: MatInkBar;\n @ViewChild('tabListContainer', {static: true}) _tabListContainer: ElementRef;\n @ViewChild('tabList', {static: true}) _tabList: ElementRef;\n @ViewChild('nextPaginator', {static: false}) _nextPaginator: ElementRef<HTMLElement>;\n @ViewChild('previousPaginator', {static: false}) _previousPaginator: ElementRef<HTMLElement>;\n\n constructor(elementRef: ElementRef,\n @Optional() dir: Directionality,\n ngZone: NgZone,\n changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n /**\n * @deprecated @breaking-change 9.0.0 `platform` parameter to become required.\n */\n @Optional() platform?: Platform,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode);\n }\n}\n\n// Boilerplate for applying mixins to MatTabLink.\nclass MatTabLinkMixinBase {}\nconst _MatTabLinkMixinBase:\n HasTabIndexCtor & CanDisableRippleCtor & CanDisableCtor & typeof MatTabLinkMixinBase =\n mixinTabIndex(mixinDisableRipple(mixinDisabled(MatTabLinkMixinBase)));\n\n/** Base class with all of the `MatTabLink` functionality. */\n// tslint:disable-next-line:class-name\nexport class _MatTabLinkBase extends _MatTabLinkMixinBase implements OnDestroy, CanDisable,\n CanDisableRipple, HasTabIndex, RippleTarget, FocusableOption {\n\n /** Whether the tab link is active or not. */\n protected _isActive: boolean = false;\n\n /** Whether the link is active. */\n @Input()\n get active(): boolean { return this._isActive; }\n set active(value: boolean) {\n if (value !== this._isActive) {\n this._isActive = value;\n this._tabNavBar.updateActiveLink(this.elementRef);\n }\n }\n\n /**\n * Ripple configuration for ripples that are launched on pointer down. The ripple config\n * is set to the global ripple options since we don't have any configurable options for\n * the tab link ripples.\n * @docs-private\n */\n rippleConfig: RippleConfig & RippleGlobalOptions;\n\n /**\n * Whether ripples are disabled on interaction.\n * @docs-private\n */\n get rippleDisabled(): boolean {\n return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||\n !!this.rippleConfig.disabled;\n }\n\n constructor(\n private _tabNavBar: _MatTabNavBase, public elementRef: ElementRef,\n @Optional() @Inject(MAT_RIPPLE_GLOBAL_OPTIONS) globalRippleOptions: RippleGlobalOptions|null,\n @Attribute('tabindex') tabIndex: string, private _focusMonitor: FocusMonitor,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super();\n\n this.rippleConfig = globalRippleOptions || {};\n this.tabIndex = parseInt(tabIndex) || 0;\n\n if (animationMode === 'NoopAnimations') {\n this.rippleConfig.animation = {enterDuration: 0, exitDuration: 0};\n }\n\n _focusMonitor.monitor(elementRef);\n }\n\n focus() {\n this.elementRef.nativeElement.focus();\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this.elementRef);\n }\n}\n\n\n/**\n * Link inside of a `mat-tab-nav-bar`.\n */\n@Directive({\n selector: '[mat-tab-link], [matTabLink]',\n exportAs: 'matTabLink',\n inputs: ['disabled', 'disableRipple', 'tabIndex'],\n host: {\n 'class': 'mat-tab-link',\n '[attr.aria-current]': 'active ? \"page\" : null',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabIndex]': 'tabIndex',\n '[class.mat-tab-disabled]': 'disabled',\n '[class.mat-tab-label-active]': 'active',\n }\n})\nexport class MatTabLink extends _MatTabLinkBase implements OnDestroy {\n /** Reference to the RippleRenderer for the tab-link. */\n private _tabLinkRipple: RippleRenderer;\n\n constructor(\n tabNavBar: MatTabNav, elementRef: ElementRef, ngZone: NgZone,\n platform: Platform,\n @Optional() @Inject(MAT_RIPPLE_GLOBAL_OPTIONS) globalRippleOptions: RippleGlobalOptions|null,\n @Attribute('tabindex') tabIndex: string, focusMonitor: FocusMonitor,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(tabNavBar, elementRef, globalRippleOptions, tabIndex, focusMonitor, animationMode);\n this._tabLinkRipple = new RippleRenderer(this, ngZone, elementRef, platform);\n this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this._tabLinkRipple._removeTriggerEvents();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatInkBar} from './ink-bar';\nimport {MatTab} from './tab';\nimport {MatTabBody, MatTabBodyPortal} from './tab-body';\nimport {MatTabContent} from './tab-content';\nimport {MatTabGroup} from './tab-group';\nimport {MatTabHeader} from './tab-header';\nimport {MatTabLabel} from './tab-label';\nimport {MatTabLabelWrapper} from './tab-label-wrapper';\nimport {MatTabLink, MatTabNav} from './tab-nav-bar/tab-nav-bar';\nimport {A11yModule} from '@angular/cdk/a11y';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatCommonModule,\n PortalModule,\n MatRippleModule,\n ObserversModule,\n A11yModule,\n ],\n // Don't export all components because some are only to be used internally.\n exports: [\n MatCommonModule,\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatTabNav,\n MatTabLink,\n MatTabContent,\n ],\n declarations: [\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatInkBar,\n MatTabLabelWrapper,\n MatTabNav,\n MatTabLink,\n MatTabBody,\n MatTabBodyPortal,\n MatTabHeader,\n MatTabContent,\n ],\n})\nexport class MatTabsModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Inject,\n isDevMode,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\n\n\n// Boilerplate for applying mixins to MatToolbar.\n/** @docs-private */\nclass MatToolbarBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatToolbarMixinBase: CanColorCtor & typeof MatToolbarBase = mixinColor(MatToolbarBase);\n\n@Directive({\n selector: 'mat-toolbar-row',\n exportAs: 'matToolbarRow',\n host: {'class': 'mat-toolbar-row'},\n})\nexport class MatToolbarRow {}\n\n@Component({\n moduleId: module.id,\n selector: 'mat-toolbar',\n exportAs: 'matToolbar',\n templateUrl: 'toolbar.html',\n styleUrls: ['toolbar.css'],\n inputs: ['color'],\n host: {\n 'class': 'mat-toolbar',\n '[class.mat-toolbar-multiple-rows]': '_toolbarRows.length > 0',\n '[class.mat-toolbar-single-row]': '_toolbarRows.length === 0',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatToolbar extends _MatToolbarMixinBase implements CanColor, AfterViewInit {\n private _document: Document;\n\n /** Reference to all toolbar row elements that have been projected. */\n @ContentChildren(MatToolbarRow) _toolbarRows: QueryList<MatToolbarRow>;\n\n constructor(\n elementRef: ElementRef,\n private _platform: Platform,\n @Inject(DOCUMENT) document?: any) {\n super(elementRef);\n\n // TODO: make the document a required param when doing breaking changes.\n this._document = document;\n }\n\n ngAfterViewInit() {\n if (!isDevMode() || !this._platform.isBrowser) {\n return;\n }\n\n this._checkToolbarMixedModes();\n this._toolbarRows.changes.subscribe(() => this._checkToolbarMixedModes());\n }\n\n /**\n * Throws an exception when developers are attempting to combine the different toolbar row modes.\n */\n private _checkToolbarMixedModes() {\n if (!this._toolbarRows.length) {\n return;\n }\n\n // Check if there are any other DOM nodes that can display content but aren't inside of\n // a <mat-toolbar-row> element.\n const isCombinedUsage = Array.from<HTMLElement>(this._elementRef.nativeElement.childNodes)\n .filter(node => !(node.classList && node.classList.contains('mat-toolbar-row')))\n .filter(node => node.nodeType !== (this._document ? this._document.COMMENT_NODE : 8))\n .some(node => !!(node.textContent && node.textContent.trim()));\n\n if (isCombinedUsage) {\n throwToolbarMixedModesError();\n }\n }\n}\n\n/**\n * Throws an exception when attempting to combine the different toolbar row modes.\n * @docs-private\n */\nexport function throwToolbarMixedModesError() {\n throw Error('MatToolbar: Attempting to combine different toolbar modes. ' +\n 'Either specify multiple `<mat-toolbar-row>` elements explicitly or just place content ' +\n 'inside of a `<mat-toolbar>` for a single row.');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatToolbar, MatToolbarRow} from './toolbar';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatToolbar, MatToolbarRow, MatCommonModule],\n declarations: [MatToolbar, MatToolbarRow],\n})\nexport class MatToolbarModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n CDK_TREE_NODE_OUTLET_NODE,\n CdkNestedTreeNode,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeDef,\n} from '@angular/cdk/tree';\nimport {\n AfterContentInit,\n Attribute,\n Directive,\n ElementRef,\n Input,\n IterableDiffers,\n OnDestroy,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinDisabled,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\n\nconst _MatTreeNodeMixinBase: HasTabIndexCtor & CanDisableCtor & typeof CdkTreeNode =\n mixinTabIndex(mixinDisabled(CdkTreeNode));\n\n/**\n * Wrapper for the CdkTree node with Material design styles.\n */\n@Directive({\n selector: 'mat-tree-node',\n exportAs: 'matTreeNode',\n inputs: ['disabled', 'tabIndex'],\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.aria-level]': 'role === \"treeitem\" ? level : null',\n '[attr.role]': 'role',\n 'class': 'mat-tree-node'\n },\n providers: [{provide: CdkTreeNode, useExisting: MatTreeNode}]\n})\nexport class MatTreeNode<T> extends _MatTreeNodeMixinBase<T>\n implements CanDisable, HasTabIndex {\n @Input() role: 'treeitem' | 'group' = 'treeitem';\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n @Attribute('tabindex') tabIndex: string) {\n super(_elementRef, _tree);\n\n this.tabIndex = Number(tabIndex) || 0;\n }\n}\n\n/**\n * Wrapper for the CdkTree node definition with Material design styles.\n */\n@Directive({\n selector: '[matTreeNodeDef]',\n inputs: [\n 'when: matTreeNodeDefWhen'\n ],\n providers: [{provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef}]\n})\nexport class MatTreeNodeDef<T> extends CdkTreeNodeDef<T> {\n @Input('matTreeNode') data: T;\n}\n\n/**\n * Wrapper for the CdkTree nested node with Material design styles.\n */\n@Directive({\n selector: 'mat-nested-tree-node',\n exportAs: 'matNestedTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.role]': 'role',\n 'class': 'mat-nested-tree-node',\n },\n providers: [\n {provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode},\n {provide: CdkTreeNode, useExisting: MatNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode}\n ]\n})\nexport class MatNestedTreeNode<T> extends CdkNestedTreeNode<T> implements AfterContentInit,\n OnDestroy {\n @Input('matNestedTreeNode') node: T;\n\n /** Whether the node is disabled. */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(value: any) { this._disabled = coerceBooleanProperty(value); }\n private _disabled = false;\n\n /** Tabindex for the node. */\n @Input()\n get tabIndex(): number { return this.disabled ? -1 : this._tabIndex; }\n set tabIndex(value: number) {\n // If the specified tabIndex value is null or undefined, fall back to the default value.\n this._tabIndex = value != null ? value : 0;\n }\n private _tabIndex: number;\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n protected _differs: IterableDiffers,\n @Attribute('tabindex') tabIndex: string) {\n super(_elementRef, _tree, _differs);\n this.tabIndex = Number(tabIndex) || 0;\n }\n\n // This is a workaround for https://github.com/angular/angular/issues/23091\n // In aot mode, the lifecycle hooks from parent class are not called.\n // TODO(tinayuangao): Remove when the angular issue #23091 is fixed\n ngAfterContentInit() {\n super.ngAfterContentInit();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CdkTreeNodePadding} from '@angular/cdk/tree';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Wrapper for the CdkTree padding with Material design styles.\n */\n@Directive({\n selector: '[matTreeNodePadding]',\n providers: [{provide: CdkTreeNodePadding, useExisting: MatTreeNodePadding}]\n})\nexport class MatTreeNodePadding<T> extends CdkTreeNodePadding<T> {\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('matTreeNodePadding') level: number;\n\n /** The indent for each level. Default number 40px from material design menu sub-menu spec. */\n @Input('matTreeNodePaddingIndent') indent: number;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from '@angular/cdk/tree';\nimport {\n Directive,\n Inject,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * Outlet for nested CdkNode. Put `[matTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[matTreeNodeOutlet]',\n providers: [{\n provide: CdkTreeNodeOutlet,\n useExisting: MatTreeNodeOutlet\n }]\n})\nexport class MatTreeNodeOutlet implements CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CdkTree} from '@angular/cdk/tree';\nimport {ChangeDetectionStrategy, Component, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {MatTreeNodeOutlet} from './outlet';\n\n/**\n * Wrapper for the CdkTable with Material design styles.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-tree',\n exportAs: 'matTree',\n template: `<ng-container matTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'mat-tree',\n 'role': 'tree',\n },\n styleUrls: ['tree.css'],\n encapsulation: ViewEncapsulation.None,\n // See note on CdkTree for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [{provide: CdkTree, useExisting: MatTree}]\n})\nexport class MatTree<T> extends CdkTree<T> {\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(MatTreeNodeOutlet, {static: true}) _nodeOutlet: MatTreeNodeOutlet;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CdkTreeNodeToggle} from '@angular/cdk/tree';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Wrapper for the CdkTree's toggle with Material design styles.\n */\n@Directive({\n selector: '[matTreeNodeToggle]',\n providers: [{provide: CdkTreeNodeToggle, useExisting: MatTreeNodeToggle}]\n})\nexport class MatTreeNodeToggle<T> extends CdkTreeNodeToggle<T> {\n @Input('matTreeNodeToggleRecursive') recursive: boolean = false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkTreeModule} from '@angular/cdk/tree';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatNestedTreeNode, MatTreeNodeDef, MatTreeNode} from './node';\nimport {MatTree} from './tree';\nimport {MatTreeNodeToggle} from './toggle';\nimport {MatTreeNodeOutlet} from './outlet';\nimport {MatTreeNodePadding} from './padding';\n\nconst MAT_TREE_DIRECTIVES = [\n MatNestedTreeNode,\n MatTreeNodeDef,\n MatTreeNodePadding,\n MatTreeNodeToggle,\n MatTree,\n MatTreeNode,\n MatTreeNodeOutlet\n];\n\n@NgModule({\n imports: [CdkTreeModule, CommonModule, MatCommonModule],\n exports: MAT_TREE_DIRECTIVES,\n declarations: MAT_TREE_DIRECTIVES,\n})\nexport class MatTreeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CollectionViewer, DataSource} from '@angular/cdk/collections';\nimport {FlatTreeControl, TreeControl} from '@angular/cdk/tree';\nimport {BehaviorSubject, merge, Observable} from 'rxjs';\nimport {map, take} from 'rxjs/operators';\n\n/**\n * Tree flattener to convert a normal type of node to node with children & level information.\n * Transform nested nodes of type `T` to flattened nodes of type `F`.\n *\n * For example, the input data of type `T` is nested, and contains its children data:\n * SomeNode: {\n * key: 'Fruits',\n * children: [\n * NodeOne: {\n * key: 'Apple',\n * },\n * NodeTwo: {\n * key: 'Pear',\n * }\n * ]\n * }\n * After flattener flatten the tree, the structure will become\n * SomeNode: {\n * key: 'Fruits',\n * expandable: true,\n * level: 1\n * },\n * NodeOne: {\n * key: 'Apple',\n * expandable: false,\n * level: 2\n * },\n * NodeTwo: {\n * key: 'Pear',\n * expandable: false,\n * level: 2\n * }\n * and the output flattened type is `F` with additional information.\n */\nexport class MatTreeFlattener<T, F> {\n\n constructor(public transformFunction: (node: T, level: number) => F,\n public getLevel: (node: F) => number,\n public isExpandable: (node: F) => boolean,\n public getChildren: (node: T) =>\n Observable<T[]> | T[] | undefined | null) {}\n\n _flattenNode(node: T, level: number,\n resultNodes: F[], parentMap: boolean[]): F[] {\n const flatNode = this.transformFunction(node, level);\n resultNodes.push(flatNode);\n\n if (this.isExpandable(flatNode)) {\n const childrenNodes = this.getChildren(node);\n if (childrenNodes) {\n if (Array.isArray(childrenNodes)) {\n this._flattenChildren(childrenNodes, level, resultNodes, parentMap);\n } else {\n childrenNodes.pipe(take(1)).subscribe(children => {\n this._flattenChildren(children, level, resultNodes, parentMap);\n });\n }\n }\n }\n return resultNodes;\n }\n\n _flattenChildren(children: T[], level: number,\n resultNodes: F[], parentMap: boolean[]): void {\n children.forEach((child, index) => {\n let childParentMap: boolean[] = parentMap.slice();\n childParentMap.push(index != children.length - 1);\n this._flattenNode(child, level + 1, resultNodes, childParentMap);\n });\n }\n\n /**\n * Flatten a list of node type T to flattened version of node F.\n * Please note that type T may be nested, and the length of `structuredData` may be different\n * from that of returned list `F[]`.\n */\n flattenNodes(structuredData: T[]): F[] {\n let resultNodes: F[] = [];\n structuredData.forEach(node => this._flattenNode(node, 0, resultNodes, []));\n return resultNodes;\n }\n\n /**\n * Expand flattened node with current expansion status.\n * The returned list may have different length.\n */\n expandFlattenedNodes(nodes: F[], treeControl: TreeControl<F>): F[] {\n let results: F[] = [];\n let currentExpand: boolean[] = [];\n currentExpand[0] = true;\n\n nodes.forEach(node => {\n let expand = true;\n for (let i = 0; i <= this.getLevel(node); i++) {\n expand = expand && currentExpand[i];\n }\n if (expand) {\n results.push(node);\n }\n if (this.isExpandable(node)) {\n currentExpand[this.getLevel(node) + 1] = treeControl.isExpanded(node);\n }\n });\n return results;\n }\n}\n\n\n/**\n * Data source for flat tree.\n * The data source need to handle expansion/collapsion of the tree node and change the data feed\n * to `MatTree`.\n * The nested tree nodes of type `T` are flattened through `MatTreeFlattener`, and converted\n * to type `F` for `MatTree` to consume.\n */\nexport class MatTreeFlatDataSource<T, F> extends DataSource<F> {\n _flattenedData = new BehaviorSubject<F[]>([]);\n\n _expandedData = new BehaviorSubject<F[]>([]);\n\n _data: BehaviorSubject<T[]>;\n get data() { return this._data.value; }\n set data(value: T[]) {\n this._data.next(value);\n this._flattenedData.next(this._treeFlattener.flattenNodes(this.data));\n this._treeControl.dataNodes = this._flattenedData.value;\n }\n\n constructor(private _treeControl: FlatTreeControl<F>,\n private _treeFlattener: MatTreeFlattener<T, F>,\n initialData: T[] = []) {\n super();\n this._data = new BehaviorSubject<T[]>(initialData);\n }\n\n connect(collectionViewer: CollectionViewer): Observable<F[]> {\n const changes = [\n collectionViewer.viewChange,\n this._treeControl.expansionModel.onChange,\n this._flattenedData\n ];\n return merge(...changes).pipe(map(() => {\n this._expandedData.next(\n this._treeFlattener.expandFlattenedNodes(this._flattenedData.value, this._treeControl));\n return this._expandedData.value;\n }));\n }\n\n disconnect() {\n // no op\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CollectionViewer, DataSource} from '@angular/cdk/collections';\nimport {BehaviorSubject, merge, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n\n/**\n * Data source for nested tree.\n *\n * The data source for nested tree doesn't have to consider node flattener, or the way to expand\n * or collapse. The expansion/collapsion will be handled by TreeControl and each non-leaf node.\n */\nexport class MatTreeNestedDataSource<T> extends DataSource<T> {\n _data = new BehaviorSubject<T[]>([]);\n\n /**\n * Data for the nested tree\n */\n get data() { return this._data.value; }\n set data(value: T[]) { this._data.next(value); }\n\n connect(collectionViewer: CollectionViewer): Observable<T[]> {\n return merge(...[collectionViewer.viewChange, this._data])\n .pipe(map(() => {\n return this.data;\n }));\n }\n\n disconnect() {\n // no op\n }\n}\n\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW} from '@angular/cdk/keycodes';\nimport {\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport {_supportsShadowDom} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n ViewContainerRef,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n MatOption,\n MatOptionSelectionChange,\n} from '@angular/material/core';\nimport {MatFormField} from '@angular/material/form-field';\nimport {defer, fromEvent, merge, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {delay, filter, map, switchMap, take, tap} from 'rxjs/operators';\n\nimport {MatAutocomplete} from './autocomplete';\nimport {MatAutocompleteOrigin} from './autocomplete-origin';\n\n\n/**\n * The following style constants are necessary to save here in order\n * to properly calculate the scrollTop of the panel. Because we are not\n * actually focusing the active item, scroll must be handled manually.\n */\n\n/** The height of each autocomplete option. */\nexport const AUTOCOMPLETE_OPTION_HEIGHT = 48;\n\n/** The total height of the autocomplete panel. */\nexport const AUTOCOMPLETE_PANEL_HEIGHT = 256;\n\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-autocomplete-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,\n};\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nexport const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatAutocompleteTrigger),\n multi: true\n};\n\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nexport function getMatAutocompleteMissingPanelError(): Error {\n return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' +\n 'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n 'you\\'re attempting to open it after the ngAfterContentInit hook.');\n}\n\n\n@Directive({\n selector: `input[matAutocomplete], textarea[matAutocomplete]`,\n host: {\n 'class': 'mat-autocomplete-trigger',\n '[attr.autocomplete]': 'autocompleteAttribute',\n '[attr.role]': 'autocompleteDisabled ? null : \"combobox\"',\n '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : \"list\"',\n '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',\n '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',\n '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',\n '[attr.aria-haspopup]': '!autocompleteDisabled',\n // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n // a little earlier. This avoids issues where IE delays the focusing of the input.\n '(focusin)': '_handleFocus()',\n '(blur)': '_onTouched()',\n '(input)': '_handleInput($event)',\n '(keydown)': '_handleKeydown($event)',\n },\n exportAs: 'matAutocompleteTrigger',\n providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR]\n})\nexport class MatAutocompleteTrigger implements ControlValueAccessor, AfterViewInit, OnChanges,\n OnDestroy {\n private _overlayRef: OverlayRef | null;\n private _portal: TemplatePortal;\n private _componentDestroyed = false;\n private _autocompleteDisabled = false;\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n private _previousValue: string | number | null;\n\n /** Strategy that is used to position the panel. */\n private _positionStrategy: FlexibleConnectedPositionStrategy;\n\n /** Whether or not the label state is being overridden. */\n private _manuallyFloatingLabel = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription: Subscription;\n\n /** Subscription to viewport size changes. */\n private _viewportSubscription = Subscription.EMPTY;\n\n /**\n * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n * closed autocomplete from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /** Whether the element is inside of a ShadowRoot component. */\n private _isInsideShadowRoot: boolean;\n\n /** Stream of keyboard events that can close the panel. */\n private readonly _closeKeyEventStream = new Subject<void>();\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the autocomplete is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n }\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: