blob: cff8204f66a30b17f4e16fe36d31a1ce9c578830 [file] [log] [blame]
{"version":3,"file":"material-select.umd.js","sources":["../../src/material/select/select-module.ts","../../src/material/select/select.ts","../../src/material/select/select-errors.ts","../../src/material/select/select-animations.ts","../../node_modules/tslib/tslib.es6.js"],"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 {OverlayModule} from '@angular/cdk/overlay';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatOptionModule} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MatSelect, MatSelectTrigger} from './select';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n MatOptionModule,\n MatCommonModule,\n ],\n exports: [MatFormFieldModule, MatSelect, MatSelectTrigger, MatOptionModule, MatCommonModule],\n declarations: [MatSelect, MatSelectTrigger],\n providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER]\n})\nexport class MatSelectModule {}\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 {ActiveDescendantKeyManager, LiveAnnouncer} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n A,\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n RIGHT_ARROW,\n SPACE,\n UP_ARROW,\n hasModifierKey,\n} from '@angular/cdk/keycodes';\nimport {CdkConnectedOverlay, Overlay, ScrollStrategy} from '@angular/cdk/overlay';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n DoCheck,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n isDevMode,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n CanDisable,\n CanDisableCtor,\n CanDisableRipple,\n CanDisableRippleCtor,\n CanUpdateErrorState,\n CanUpdateErrorStateCtor,\n ErrorStateMatcher,\n HasTabIndex,\n HasTabIndexCtor,\n MAT_OPTION_PARENT_COMPONENT,\n MatOptgroup,\n MatOption,\n MatOptionSelectionChange,\n mixinDisabled,\n mixinDisableRipple,\n mixinErrorState,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {MatFormField, MatFormFieldControl} from '@angular/material/form-field';\nimport {defer, merge, Observable, Subject} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\nimport {matSelectAnimations} from './select-animations';\nimport {\n getMatSelectDynamicMultipleError,\n getMatSelectNonArrayValueError,\n getMatSelectNonFunctionValueError,\n} from './select-errors';\n\n\nlet nextUniqueId = 0;\n\n/**\n * The following style constants are necessary to save here in order\n * to properly calculate the alignment of the selected option over\n * the trigger element.\n */\n\n/** The max height of the select's overlay panel */\nexport const SELECT_PANEL_MAX_HEIGHT = 256;\n\n/** The panel's padding on the x-axis */\nexport const SELECT_PANEL_PADDING_X = 16;\n\n/** The panel's x axis padding if it is indented (e.g. there is an option group). */\nexport const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;\n\n/** The height of the select items in `em` units. */\nexport const SELECT_ITEM_HEIGHT_EM = 3;\n\n// TODO(josephperrott): Revert to a constant after 2018 spec updates are fully merged.\n/**\n * Distance between the panel edge and the option text in\n * multi-selection mode.\n *\n * Calculated as:\n * (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44\n * The padding is multiplied by 1.5 because the checkbox's margin is half the padding.\n * The checkbox width is 16px.\n */\nexport let SELECT_MULTIPLE_PANEL_PADDING_X = 0;\n\n/**\n * The select panel will only \"fit\" inside the viewport if it is positioned at\n * this value or more away from the viewport boundary.\n */\nexport const SELECT_PANEL_VIEWPORT_PADDING = 8;\n\n/** Injection token that determines the scroll handling while a select is open. */\nexport const MAT_SELECT_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-select-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay):\n () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_SELECT_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/** Change event object that is emitted when the select value has changed. */\nexport class MatSelectChange {\n constructor(\n /** Reference to the select that emitted the change event. */\n public source: MatSelect,\n /** Current value of the select that emitted the event. */\n public value: any) { }\n}\n\n// Boilerplate for applying mixins to MatSelect.\n/** @docs-private */\nclass MatSelectBase {\n constructor(public _elementRef: ElementRef,\n public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n public ngControl: NgControl) {}\n}\nconst _MatSelectMixinBase:\n CanDisableCtor &\n HasTabIndexCtor &\n CanDisableRippleCtor &\n CanUpdateErrorStateCtor &\n typeof MatSelectBase =\n mixinDisableRipple(mixinTabIndex(mixinDisabled(mixinErrorState(MatSelectBase))));\n\n\n/**\n * Allows the user to customize the trigger that is displayed when the select has a value.\n */\n@Directive({\n selector: 'mat-select-trigger'\n})\nexport class MatSelectTrigger {}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-select',\n exportAs: 'matSelect',\n templateUrl: 'select.html',\n styleUrls: ['select.css'],\n inputs: ['disabled', 'disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'listbox',\n '[attr.id]': 'id',\n '[attr.tabindex]': 'tabIndex',\n '[attr.aria-label]': '_getAriaLabel()',\n '[attr.aria-labelledby]': '_getAriaLabelledby()',\n '[attr.aria-required]': 'required.toString()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-owns]': 'panelOpen ? _optionIds : null',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[class.mat-select-disabled]': 'disabled',\n '[class.mat-select-invalid]': 'errorState',\n '[class.mat-select-required]': 'required',\n '[class.mat-select-empty]': 'empty',\n 'class': 'mat-select',\n '(keydown)': '_handleKeydown($event)',\n '(focus)': '_onFocus()',\n '(blur)': '_onBlur()',\n },\n animations: [\n matSelectAnimations.transformPanelWrap,\n matSelectAnimations.transformPanel\n ],\n providers: [\n {provide: MatFormFieldControl, useExisting: MatSelect},\n {provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect}\n ],\n})\nexport class MatSelect extends _MatSelectMixinBase implements AfterContentInit, OnChanges,\n OnDestroy, OnInit, DoCheck, ControlValueAccessor, CanDisable, HasTabIndex,\n MatFormFieldControl<any>, CanUpdateErrorState, CanDisableRipple {\n private _scrollStrategyFactory: () => ScrollStrategy;\n\n /** Whether or not the overlay panel is open. */\n private _panelOpen = false;\n\n /** Whether filling out the select is required in the form. */\n private _required: boolean = false;\n\n /** The scroll position of the overlay panel, calculated to center the selected option. */\n private _scrollTop = 0;\n\n /** The placeholder displayed in the trigger of the select. */\n private _placeholder: string;\n\n /** Whether the component is in multiple selection mode. */\n private _multiple: boolean = false;\n\n /** Comparison function to specify which option is displayed. Defaults to object equality. */\n private _compareWith = (o1: any, o2: any) => o1 === o2;\n\n /** Unique id for this input. */\n private _uid = `mat-select-${nextUniqueId++}`;\n\n /** Emits whenever the component is destroyed. */\n private readonly _destroy = new Subject<void>();\n\n /** The last measured value for the trigger's client bounding rect. */\n _triggerRect: ClientRect;\n\n /** The aria-describedby attribute on the select for improved a11y. */\n _ariaDescribedby: string;\n\n /** The cached font-size of the trigger element. */\n _triggerFontSize = 0;\n\n /** Deals with the selection logic. */\n _selectionModel: SelectionModel<MatOption>;\n\n /** Manages keyboard events for options in the panel. */\n _keyManager: ActiveDescendantKeyManager<MatOption>;\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when select has been touched` */\n _onTouched = () => {};\n\n /** The IDs of child options to be passed to the aria-owns attribute. */\n _optionIds: string = '';\n\n /** The value of the select panel's transform-origin property. */\n _transformOrigin: string = 'top';\n\n /** Emits when the panel element is finished transforming in. */\n _panelDoneAnimatingStream = new Subject<string>();\n\n /** Strategy that will be used to handle scrolling while the select panel is open. */\n _scrollStrategy: ScrollStrategy;\n\n /**\n * The y-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text.\n * when the panel opens. Will change based on the y-position of the selected option.\n */\n _offsetY = 0;\n\n /**\n * This position config ensures that the top \"start\" corner of the overlay\n * is aligned with with the top \"start\" of the origin by default (overlapping\n * the trigger completely). If the panel cannot fit below the trigger, it\n * will fall back to a position above the trigger.\n */\n _positions = [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n ];\n\n /** Whether the component is disabling centering of the active option over the trigger. */\n private _disableOptionCentering: boolean = false;\n\n /** Whether the select is focused. */\n get focused(): boolean {\n return this._focused || this._panelOpen;\n }\n /**\n * @deprecated Setter to be removed as this property is intended to be readonly.\n * @breaking-change 8.0.0\n */\n set focused(value: boolean) {\n this._focused = value;\n }\n private _focused = false;\n\n /** A name for this control that can be used by `mat-form-field`. */\n controlType = 'mat-select';\n\n /** Trigger that opens the select. */\n @ViewChild('trigger', {static: false}) trigger: ElementRef;\n\n /** Panel containing the select options. */\n @ViewChild('panel', {static: false}) panel: ElementRef;\n\n /** Overlay pane containing the options. */\n @ViewChild(CdkConnectedOverlay, {static: false}) overlayDir: CdkConnectedOverlay;\n\n /** All of the defined select options. */\n @ContentChildren(MatOption, { descendants: true }) options: QueryList<MatOption>;\n\n /** All of the defined groups of options. */\n @ContentChildren(MatOptgroup) optionGroups: QueryList<MatOptgroup>;\n\n /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */\n @Input() panelClass: string|string[]|Set<string>|{[key: string]: any};\n\n /** User-supplied override of the trigger element. */\n @ContentChild(MatSelectTrigger, {static: false}) customTrigger: MatSelectTrigger;\n\n /** Placeholder to be shown if no value has been selected. */\n @Input()\n get placeholder(): string { return this._placeholder; }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n\n /** Whether the component is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n /** Whether the user should be allowed to select multiple options. */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n if (this._selectionModel) {\n throw getMatSelectDynamicMultipleError();\n }\n\n this._multiple = coerceBooleanProperty(value);\n }\n\n /** Whether to center the active option over the trigger. */\n @Input()\n get disableOptionCentering(): boolean { return this._disableOptionCentering; }\n set disableOptionCentering(value: boolean) {\n this._disableOptionCentering = coerceBooleanProperty(value);\n }\n\n /**\n * Function to compare the option values with the selected values. The first argument\n * is a value from an option. The second is a value from the selection. A boolean\n * should be returned.\n */\n @Input()\n get compareWith() { return this._compareWith; }\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw getMatSelectNonFunctionValueError();\n }\n this._compareWith = fn;\n if (this._selectionModel) {\n // A different comparator means the selection could change.\n this._initializeSelection();\n }\n }\n\n /** Value of the select control. */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (newValue !== this._value) {\n this.writeValue(newValue);\n this._value = newValue;\n }\n }\n private _value: any;\n\n /** Aria label of the select. If not specified, the placeholder will be used as label. */\n @Input('aria-label') ariaLabel: string = '';\n\n /** Input that can be used to specify the `aria-labelledby` attribute. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Function used to sort the values in a select in multiple mode.\n * Follows the same logic as `Array.prototype.sort`.\n */\n @Input() sortComparator: (a: MatOption, b: MatOption, options: MatOption[]) => number;\n\n /** Unique id of the element. */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) {\n this._id = value || this._uid;\n this.stateChanges.next();\n }\n private _id: string;\n\n /** Combined stream of all of the child options' change events. */\n readonly optionSelectionChanges: Observable<MatOptionSelectionChange> = defer(() => {\n const options = this.options;\n\n if (options) {\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.onSelectionChange)))\n );\n }\n\n return this._ngZone.onStable\n .asObservable()\n .pipe(take(1), switchMap(() => this.optionSelectionChanges));\n }) as Observable<MatOptionSelectionChange>;\n\n /** Event emitted when the select panel has been toggled. */\n @Output() readonly openedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Event emitted when the select has been opened. */\n @Output('opened') readonly _openedStream: Observable<void> =\n this.openedChange.pipe(filter(o => o), map(() => {}));\n\n /** Event emitted when the select has been closed. */\n @Output('closed') readonly _closedStream: Observable<void> =\n this.openedChange.pipe(filter(o => !o), map(() => {}));\n\n /** Event emitted when the selected value has been changed by the user. */\n @Output() readonly selectionChange: EventEmitter<MatSelectChange> =\n new EventEmitter<MatSelectChange>();\n\n /**\n * Event that emits whenever the raw value of the select changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(\n private _viewportRuler: ViewportRuler,\n private _changeDetectorRef: ChangeDetectorRef,\n private _ngZone: NgZone,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n elementRef: ElementRef,\n @Optional() private _dir: Directionality,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n @Optional() private _parentFormField: MatFormField,\n @Self() @Optional() public ngControl: NgControl,\n @Attribute('tabindex') tabIndex: string,\n @Inject(MAT_SELECT_SCROLL_STRATEGY) scrollStrategyFactory: any,\n /**\n * @deprecated _liveAnnouncer to be turned into a required parameter.\n * @breaking-change 8.0.0\n */\n private _liveAnnouncer?: LiveAnnouncer) {\n super(elementRef, _defaultErrorStateMatcher, _parentForm,\n _parentFormGroup, ngControl);\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n\n this._scrollStrategyFactory = scrollStrategyFactory;\n this._scrollStrategy = this._scrollStrategyFactory();\n this.tabIndex = parseInt(tabIndex) || 0;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n }\n\n ngOnInit() {\n this._selectionModel = new SelectionModel<MatOption>(this.multiple);\n this.stateChanges.next();\n\n // We need `distinctUntilChanged` here, because some browsers will\n // fire the animation end event twice for the same animation. See:\n // https://github.com/angular/angular/issues/24084\n this._panelDoneAnimatingStream\n .pipe(distinctUntilChanged(), takeUntil(this._destroy))\n .subscribe(() => {\n if (this.panelOpen) {\n this._scrollTop = 0;\n this.openedChange.emit(true);\n } else {\n this.openedChange.emit(false);\n this.overlayDir.offsetX = 0;\n this._changeDetectorRef.markForCheck();\n }\n });\n\n this._viewportRuler.change()\n .pipe(takeUntil(this._destroy))\n .subscribe(() => {\n if (this._panelOpen) {\n this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();\n this._changeDetectorRef.markForCheck();\n }\n });\n }\n\n ngAfterContentInit() {\n this._initKeyManager();\n\n this._selectionModel.onChange.pipe(takeUntil(this._destroy)).subscribe(event => {\n event.added.forEach(option => option.select());\n event.removed.forEach(option => option.deselect());\n });\n\n this.options.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\n this._resetOptions();\n this._initializeSelection();\n });\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let\n // the parent form field know to run change detection when the disabled state changes.\n if (changes['disabled']) {\n this.stateChanges.next();\n }\n }\n\n ngOnDestroy() {\n this._destroy.next();\n this._destroy.complete();\n this.stateChanges.complete();\n }\n\n /** Toggles the overlay panel open or closed. */\n toggle(): void {\n this.panelOpen ? this.close() : this.open();\n }\n\n /** Opens the overlay panel. */\n open(): void {\n if (this.disabled || !this.options || !this.options.length || this._panelOpen) {\n return;\n }\n\n this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();\n // Note: The computed font-size will be a string pixel value (e.g. \"16px\").\n // `parseInt` ignores the trailing 'px' and converts this to a number.\n this._triggerFontSize = parseInt(getComputedStyle(this.trigger.nativeElement).fontSize || '0');\n\n this._panelOpen = true;\n this._keyManager.withHorizontalOrientation(null);\n this._calculateOverlayPosition();\n this._highlightCorrectOption();\n this._changeDetectorRef.markForCheck();\n\n // Set the font size on the panel element once it exists.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (this._triggerFontSize && this.overlayDir.overlayRef &&\n this.overlayDir.overlayRef.overlayElement) {\n this.overlayDir.overlayRef.overlayElement.style.fontSize = `${this._triggerFontSize}px`;\n }\n });\n }\n\n /** Closes the overlay panel and focuses the host element. */\n close(): void {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._keyManager.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n this._changeDetectorRef.markForCheck();\n this._onTouched();\n }\n }\n\n /**\n * Sets the select's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: any): void {\n if (this.options) {\n this._setSelectionByValue(value);\n }\n }\n\n /**\n * Saves a callback function to be invoked when the select's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Saves a callback function to be invoked when the select is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: () => {}): void {\n this._onTouched = fn;\n }\n\n /**\n * Disables the select. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n\n /** Whether or not the overlay panel is open. */\n get panelOpen(): boolean {\n return this._panelOpen;\n }\n\n /** The currently selected option. */\n get selected(): MatOption | MatOption[] {\n return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];\n }\n\n /** The value displayed in the trigger. */\n get triggerValue(): string {\n if (this.empty) {\n return '';\n }\n\n if (this._multiple) {\n const selectedOptions = this._selectionModel.selected.map(option => option.viewValue);\n\n if (this._isRtl()) {\n selectedOptions.reverse();\n }\n\n // TODO(crisbeto): delimiter should be configurable for proper localization.\n return selectedOptions.join(', ');\n }\n\n return this._selectionModel.selected[0].viewValue;\n }\n\n /** Whether the element is in RTL mode. */\n _isRtl(): boolean {\n return this._dir ? this._dir.value === 'rtl' : false;\n }\n\n /** Handles all keydown events on the select. */\n _handleKeydown(event: KeyboardEvent): void {\n if (!this.disabled) {\n this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\n }\n }\n\n /** Handles keyboard events while the select is closed. */\n private _handleClosedKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW ||\n keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW;\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n const manager = this._keyManager;\n\n // Open the select on ALT + arrow key to match the native <select>\n if ((isOpenKey && !hasModifierKey(event)) || ((this.multiple || event.altKey) && isArrowKey)) {\n event.preventDefault(); // prevents the page from scrolling down when pressing space\n this.open();\n } else if (!this.multiple) {\n const previouslySelectedOption = this.selected;\n\n if (keyCode === HOME || keyCode === END) {\n keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n\n const selectedOption = this.selected;\n\n // Since the value has changed, we need to announce it ourselves.\n // @breaking-change 8.0.0 remove null check for _liveAnnouncer.\n if (this._liveAnnouncer && selectedOption && previouslySelectedOption !== selectedOption) {\n // We set a duration on the live announcement, because we want the live element to be\n // cleared after a while so that users can't navigate to it using the arrow keys.\n this._liveAnnouncer.announce((selectedOption as MatOption).viewValue, 10000);\n }\n }\n }\n\n /** Handles keyboard events when the selected is open. */\n private _handleOpenKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n const manager = this._keyManager;\n\n if (keyCode === HOME || keyCode === END) {\n event.preventDefault();\n keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();\n } else if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n } else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem &&\n !hasModifierKey(event)) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n } else if (this._multiple && keyCode === A && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n\n this.options.forEach(option => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n } else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n\n manager.onKeydown(event);\n\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }\n\n _onFocus() {\n if (!this.disabled) {\n this._focused = true;\n this.stateChanges.next();\n }\n }\n\n /**\n * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\n * \"blur\" to the panel when it opens, causing a false positive.\n */\n _onBlur() {\n this._focused = false;\n\n if (!this.disabled && !this.panelOpen) {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n }\n\n /**\n * Callback that is invoked when the overlay panel has been attached.\n */\n _onAttached(): void {\n this.overlayDir.positionChange.pipe(take(1)).subscribe(() => {\n this._setPseudoCheckboxPaddingSize();\n this._changeDetectorRef.detectChanges();\n this._calculateOverlayOffsetX();\n this.panel.nativeElement.scrollTop = this._scrollTop;\n });\n }\n\n /** Returns the theme to be used on the panel. */\n _getPanelTheme(): string {\n return this._parentFormField ? `mat-${this._parentFormField.color}` : '';\n }\n\n // TODO(josephperrott): Remove after 2018 spec updates are fully merged.\n /** Sets the pseudo checkbox padding size based on the width of the pseudo checkbox. */\n private _setPseudoCheckboxPaddingSize() {\n if (!SELECT_MULTIPLE_PANEL_PADDING_X && this.multiple) {\n const pseudoCheckbox = this.panel.nativeElement.querySelector('.mat-pseudo-checkbox');\n if (pseudoCheckbox) {\n SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + pseudoCheckbox.offsetWidth;\n }\n }\n }\n\n /** Whether the select has a value. */\n get empty(): boolean {\n return !this._selectionModel || this._selectionModel.isEmpty();\n }\n\n private _initializeSelection(): void {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value);\n this.stateChanges.next();\n });\n }\n\n /**\n * Sets the selected option based on a value. If no option can be\n * found with the designated value, the select trigger is cleared.\n */\n private _setSelectionByValue(value: any | any[]): void {\n if (this.multiple && value) {\n if (!Array.isArray(value)) {\n throw getMatSelectNonArrayValueError();\n }\n\n this._selectionModel.clear();\n value.forEach((currentValue: any) => this._selectValue(currentValue));\n this._sortValues();\n } else {\n this._selectionModel.clear();\n const correspondingOption = this._selectValue(value);\n\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n this._keyManager.setActiveItem(correspondingOption);\n }\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Finds and selects and option based on its value.\n * @returns Option that has the corresponding value.\n */\n private _selectValue(value: any): MatOption | undefined {\n const correspondingOption = this.options.find((option: MatOption) => {\n try {\n // Treat null as a special reset value.\n return option.value != null && this._compareWith(option.value, value);\n } catch (error) {\n if (isDevMode()) {\n // Notify developers of errors in their comparator.\n console.warn(error);\n }\n return false;\n }\n });\n\n if (correspondingOption) {\n this._selectionModel.select(correspondingOption);\n }\n\n return correspondingOption;\n }\n\n /** Sets up a key manager to listen to keyboard events on the overlay panel. */\n private _initKeyManager() {\n this._keyManager = new ActiveDescendantKeyManager<MatOption>(this.options)\n .withTypeAhead()\n .withVerticalOrientation()\n .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')\n .withAllowedModifierKeys(['shiftKey']);\n\n this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(() => {\n // Restore focus to the trigger before closing. Ensures that the focus\n // position won't be lost if the user got focus into the overlay.\n this.focus();\n this.close();\n });\n\n this._keyManager.change.pipe(takeUntil(this._destroy)).subscribe(() => {\n if (this._panelOpen && this.panel) {\n this._scrollActiveOptionIntoView();\n } else if (!this._panelOpen && !this.multiple && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n });\n }\n\n /** Drops current option subscriptions and IDs and resets from scratch. */\n private _resetOptions(): void {\n const changedOrDestroyed = merge(this.options.changes, this._destroy);\n\n this.optionSelectionChanges.pipe(takeUntil(changedOrDestroyed)).subscribe(event => {\n this._onSelect(event.source, event.isUserInput);\n\n if (event.isUserInput && !this.multiple && this._panelOpen) {\n this.close();\n this.focus();\n }\n });\n\n // Listen to changes in the internal state of the options and react accordingly.\n // Handles cases like the labels of the selected options changing.\n merge(...this.options.map(option => option._stateChanges))\n .pipe(takeUntil(changedOrDestroyed))\n .subscribe(() => {\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n\n this._setOptionIds();\n }\n\n /** Invoked when an option is clicked. */\n private _onSelect(option: MatOption, isUserInput: boolean): void {\n const wasSelected = this._selectionModel.isSelected(option);\n\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n this._propagateChanges(option.value);\n } else {\n option.selected ? this._selectionModel.select(option) : this._selectionModel.deselect(option);\n\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n\n if (this.multiple) {\n this._sortValues();\n\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n\n this.stateChanges.next();\n }\n\n /** Sorts the selected values in the selected based on their order in the panel. */\n private _sortValues() {\n if (this.multiple) {\n const options = this.options.toArray();\n\n this._selectionModel.sort((a, b) => {\n return this.sortComparator ? this.sortComparator(a, b, options) :\n options.indexOf(a) - options.indexOf(b);\n });\n this.stateChanges.next();\n }\n }\n\n /** Emits change event to set the model value. */\n private _propagateChanges(fallbackValue?: any): void {\n let valueToEmit: any = null;\n\n if (this.multiple) {\n valueToEmit = (this.selected as MatOption[]).map(option => option.value);\n } else {\n valueToEmit = this.selected ? (this.selected as MatOption).value : fallbackValue;\n }\n\n this._value = valueToEmit;\n this.valueChange.emit(valueToEmit);\n this._onChange(valueToEmit);\n this.selectionChange.emit(new MatSelectChange(this, valueToEmit));\n this._changeDetectorRef.markForCheck();\n }\n\n /** Records option IDs to pass to the aria-owns property. */\n private _setOptionIds() {\n this._optionIds = this.options.map(option => option.id).join(' ');\n }\n\n /**\n * Highlights the selected item. If no option is selected, it will highlight\n * the first item instead.\n */\n private _highlightCorrectOption(): void {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n } else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }\n\n /** Scrolls the active option into view. */\n private _scrollActiveOptionIntoView(): void {\n const activeOptionIndex = this._keyManager.activeItemIndex || 0;\n const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.options,\n this.optionGroups);\n\n this.panel.nativeElement.scrollTop = _getOptionScrollPosition(\n activeOptionIndex + labelCount,\n this._getItemHeight(),\n this.panel.nativeElement.scrollTop,\n SELECT_PANEL_MAX_HEIGHT\n );\n }\n\n /** Focuses the select element. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n /** Gets the index of the provided option in the option list. */\n private _getOptionIndex(option: MatOption): number | undefined {\n return this.options.reduce((result: number | undefined, current: MatOption, index: number) => {\n return result === undefined ? (option === current ? index : undefined) : result;\n }, undefined);\n }\n\n /** Calculates the scroll position and x- and y-offsets of the overlay panel. */\n private _calculateOverlayPosition(): void {\n const itemHeight = this._getItemHeight();\n const items = this._getItemCount();\n const panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const scrollContainerHeight = items * itemHeight;\n\n // The farthest the panel can be scrolled before it hits the bottom\n const maxScroll = scrollContainerHeight - panelHeight;\n\n // If no value is selected we open the popup to the first item.\n let selectedOptionOffset =\n this.empty ? 0 : this._getOptionIndex(this._selectionModel.selected[0])!;\n\n selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options,\n this.optionGroups);\n\n // We must maintain a scroll buffer so the selected option will be scrolled to the\n // center of the overlay panel rather than the top.\n const scrollBuffer = panelHeight / 2;\n this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);\n this._offsetY = this._calculateOverlayOffsetY(selectedOptionOffset, scrollBuffer, maxScroll);\n\n this._checkOverlayWithinViewport(maxScroll);\n }\n\n /**\n * Calculates the scroll position of the select's overlay panel.\n *\n * Attempts to center the selected option in the panel. If the option is\n * too high or too low in the panel to be scrolled to the center, it clamps the\n * scroll position to the min or max scroll positions respectively.\n */\n _calculateOverlayScroll(selectedIndex: number, scrollBuffer: number,\n maxScroll: number): number {\n const itemHeight = this._getItemHeight();\n const optionOffsetFromScrollTop = itemHeight * selectedIndex;\n const halfOptionHeight = itemHeight / 2;\n\n // Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the\n // scroll container, then subtracts the scroll buffer to scroll the option down to\n // the center of the overlay panel. Half the option height must be re-added to the\n // scrollTop so the option is centered based on its middle, not its top edge.\n const optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;\n return Math.min(Math.max(0, optimalScrollPosition), maxScroll);\n }\n\n /** Returns the aria-label of the select component. */\n _getAriaLabel(): string | null {\n // If an ariaLabelledby value has been set by the consumer, the select should not overwrite the\n // `aria-labelledby` value by setting the ariaLabel to the placeholder.\n return this.ariaLabelledby ? null : this.ariaLabel || this.placeholder;\n }\n\n /** Returns the aria-labelledby of the select component. */\n _getAriaLabelledby(): string | null {\n if (this.ariaLabelledby) {\n return this.ariaLabelledby;\n }\n\n // Note: we use `_getAriaLabel` here, because we want to check whether there's a\n // computed label. `this.ariaLabel` is only the user-specified label.\n if (!this._parentFormField || !this._parentFormField._hasFloatingLabel() ||\n this._getAriaLabel()) {\n return null;\n }\n\n return this._parentFormField._labelId || null;\n }\n\n /** Determines the `aria-activedescendant` to be set on the host. */\n _getAriaActiveDescendant(): string | null {\n if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\n return this._keyManager.activeItem.id;\n }\n\n return null;\n }\n\n /**\n * Sets the x-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text when\n * the panel opens. Will change based on LTR or RTL text direction. Note that the offset\n * can't be calculated until the panel has been attached, because we need to know the\n * content width in order to constrain the panel within the viewport.\n */\n private _calculateOverlayOffsetX(): void {\n const overlayRect = this.overlayDir.overlayRef.overlayElement.getBoundingClientRect();\n const viewportSize = this._viewportRuler.getViewportSize();\n const isRtl = this._isRtl();\n const paddingWidth = this.multiple ? SELECT_MULTIPLE_PANEL_PADDING_X + SELECT_PANEL_PADDING_X :\n SELECT_PANEL_PADDING_X * 2;\n let offsetX: number;\n\n // Adjust the offset, depending on the option padding.\n if (this.multiple) {\n offsetX = SELECT_MULTIPLE_PANEL_PADDING_X;\n } else {\n let selected = this._selectionModel.selected[0] || this.options.first;\n offsetX = selected && selected.group ? SELECT_PANEL_INDENT_PADDING_X : SELECT_PANEL_PADDING_X;\n }\n\n // Invert the offset in LTR.\n if (!isRtl) {\n offsetX *= -1;\n }\n\n // Determine how much the select overflows on each side.\n const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));\n const rightOverflow = overlayRect.right + offsetX - viewportSize.width\n + (isRtl ? 0 : paddingWidth);\n\n // If the element overflows on either side, reduce the offset to allow it to fit.\n if (leftOverflow > 0) {\n offsetX += leftOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n } else if (rightOverflow > 0) {\n offsetX -= rightOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n }\n\n // Set the offset directly in order to avoid having to go through change detection and\n // potentially triggering \"changed after it was checked\" errors. Round the value to avoid\n // blurry content in some browsers.\n this.overlayDir.offsetX = Math.round(offsetX);\n this.overlayDir.overlayRef.updatePosition();\n }\n\n /**\n * Calculates the y-offset of the select's overlay panel in relation to the\n * top start corner of the trigger. It has to be adjusted in order for the\n * selected option to be aligned over the trigger when the panel opens.\n */\n private _calculateOverlayOffsetY(selectedIndex: number, scrollBuffer: number,\n maxScroll: number): number {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const maxOptionsDisplayed = Math.floor(SELECT_PANEL_MAX_HEIGHT / itemHeight);\n let optionOffsetFromPanelTop: number;\n\n // Disable offset if requested by user by returning 0 as value to offset\n if (this._disableOptionCentering) {\n return 0;\n }\n\n if (this._scrollTop === 0) {\n optionOffsetFromPanelTop = selectedIndex * itemHeight;\n } else if (this._scrollTop === maxScroll) {\n const firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;\n const selectedDisplayIndex = selectedIndex - firstDisplayedIndex;\n\n // The first item is partially out of the viewport. Therefore we need to calculate what\n // portion of it is shown in the viewport and account for it in our offset.\n let partialItemHeight =\n itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;\n\n // Because the panel height is longer than the height of the options alone,\n // there is always extra padding at the top or bottom of the panel. When\n // scrolled to the very bottom, this padding is at the top of the panel and\n // must be added to the offset.\n optionOffsetFromPanelTop = selectedDisplayIndex * itemHeight + partialItemHeight;\n } else {\n // If the option was scrolled to the middle of the panel using a scroll buffer,\n // its offset will be the scroll buffer minus the half height that was added to\n // center it.\n optionOffsetFromPanelTop = scrollBuffer - itemHeight / 2;\n }\n\n // The final offset is the option's offset from the top, adjusted for the height difference,\n // multiplied by -1 to ensure that the overlay moves in the correct direction up the page.\n // The value is rounded to prevent some browsers from blurring the content.\n return Math.round(optionOffsetFromPanelTop * -1 - optionHeightAdjustment);\n }\n\n /**\n * Checks that the attempted overlay position will fit within the viewport.\n * If it will not fit, tries to adjust the scroll position and the associated\n * y-offset so the panel can open fully on-screen. If it still won't fit,\n * sets the offset back to 0 to allow the fallback position to take over.\n */\n private _checkOverlayWithinViewport(maxScroll: number): void {\n const itemHeight = this._getItemHeight();\n const viewportSize = this._viewportRuler.getViewportSize();\n\n const topSpaceAvailable = this._triggerRect.top - SELECT_PANEL_VIEWPORT_PADDING;\n const bottomSpaceAvailable =\n viewportSize.height - this._triggerRect.bottom - SELECT_PANEL_VIEWPORT_PADDING;\n\n const panelHeightTop = Math.abs(this._offsetY);\n const totalPanelHeight =\n Math.min(this._getItemCount() * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const panelHeightBottom = totalPanelHeight - panelHeightTop - this._triggerRect.height;\n\n if (panelHeightBottom > bottomSpaceAvailable) {\n this._adjustPanelUp(panelHeightBottom, bottomSpaceAvailable);\n } else if (panelHeightTop > topSpaceAvailable) {\n this._adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll);\n } else {\n this._transformOrigin = this._getOriginBasedOnOption();\n }\n }\n\n /** Adjusts the overlay panel up to fit in the viewport. */\n private _adjustPanelUp(panelHeightBottom: number, bottomSpaceAvailable: number) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);\n\n // Scrolls the panel up by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel up into the viewport.\n this._scrollTop -= distanceBelowViewport;\n this._offsetY -= distanceBelowViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n\n // If the panel is scrolled to the very top, it won't be able to fit the panel\n // by scrolling, so set the offset to 0 to allow the fallback position to take\n // effect.\n if (this._scrollTop <= 0) {\n this._scrollTop = 0;\n this._offsetY = 0;\n this._transformOrigin = `50% bottom 0px`;\n }\n }\n\n /** Adjusts the overlay panel down to fit in the viewport. */\n private _adjustPanelDown(panelHeightTop: number, topSpaceAvailable: number,\n maxScroll: number) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);\n\n // Scrolls the panel down by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel down into the viewport.\n this._scrollTop += distanceAboveViewport;\n this._offsetY += distanceAboveViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n\n // If the panel is scrolled to the very bottom, it won't be able to fit the\n // panel by scrolling, so set the offset to 0 to allow the fallback position\n // to take effect.\n if (this._scrollTop >= maxScroll) {\n this._scrollTop = maxScroll;\n this._offsetY = 0;\n this._transformOrigin = `50% top 0px`;\n return;\n }\n }\n\n /** Sets the transform origin point based on the selected option. */\n private _getOriginBasedOnOption(): string {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;\n return `50% ${originY}px 0px`;\n }\n\n /** Calculates the amount of items in the select. This includes options and group labels. */\n private _getItemCount(): number {\n return this.options.length + this.optionGroups.length;\n }\n\n /** Calculates the height of the select's options. */\n private _getItemHeight(): number {\n return this._triggerFontSize * SELECT_ITEM_HEIGHT_EM;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n this.focus();\n this.open();\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n return this._panelOpen || !this.empty;\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\n/**\n * Returns an exception to be thrown when attempting to change a select's `multiple` option\n * after initialization.\n * @docs-private\n */\nexport function getMatSelectDynamicMultipleError(): Error {\n return Error('Cannot change `multiple` mode of select after initialization.');\n}\n\n/**\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\n * resetting the value.\n * @docs-private\n */\nexport function getMatSelectNonArrayValueError(): Error {\n return Error('Value must be an array in multiple-selection mode.');\n}\n\n/**\n * Returns an exception to be thrown when assigning a non-function value to the comparator\n * used to determine if a value corresponds to an option. Note that whether the function\n * actually takes two values and returns a boolean is not checked.\n */\nexport function getMatSelectNonFunctionValueError(): Error {\n return Error('`compareWith` must be a function.');\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 {\n animate,\n animateChild,\n AnimationTriggerMetadata,\n query,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * The following are all the animations for the mat-select component, with each\n * const containing the metadata for one animation.\n *\n * The values below match the implementation of the AngularJS Material mat-select animation.\n * @docs-private\n */\nexport const matSelectAnimations: {\n readonly transformPanelWrap: AnimationTriggerMetadata;\n readonly transformPanel: AnimationTriggerMetadata;\n readonly fadeInContent: AnimationTriggerMetadata;\n} = {\n /**\n * This animation ensures the select's overlay panel animation (transformPanel) is called when\n * closing the select.\n * This is needed due to https://github.com/angular/angular/issues/23302\n */\n transformPanelWrap: trigger('transformPanelWrap', [\n transition('* => void', query('@transformPanel', [animateChild()],\n {optional: true}))\n ]),\n\n /**\n * This animation transforms the select's overlay panel on and off the page.\n *\n * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it\n * up to 100% on the Y axis, fades in its border, and translates slightly up and to the\n * side to ensure the option text correctly overlaps the trigger text.\n *\n * When the panel is removed from the DOM, it simply fades out linearly.\n */\n transformPanel: trigger('transformPanel', [\n state('void', style({\n transform: 'scaleY(0.8)',\n minWidth: '100%',\n opacity: 0\n })),\n state('showing', style({\n opacity: 1,\n minWidth: 'calc(100% + 32px)', // 32px = 2 * 16px padding\n transform: 'scaleY(1)'\n })),\n state('showing-multiple', style({\n opacity: 1,\n minWidth: 'calc(100% + 64px)', // 64px = 48px padding on the left + 16px padding on the right\n transform: 'scaleY(1)'\n })),\n transition('void => *', animate('120ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => void', animate('100ms 25ms linear', style({opacity: 0})))\n ]),\n\n /**\n * This animation fades in the background color and text content of the\n * select's options. It is time delayed to occur 100ms after the overlay\n * panel has transformed in.\n * @deprecated Not used anymore. To be removed.\n * @breaking-change 8.0.0\n */\n fadeInContent: trigger('fadeInContent', [\n state('showing', style({opacity: 1})),\n transition('void => showing', [\n style({opacity: 0}),\n animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n ])\n};\n\n\n/**\n * @deprecated\n * @breaking-change 8.0.0\n * @docs-private\n */\nexport const transformPanel = matSelectAnimations.transformPanel;\n\n/**\n * @deprecated\n * @breaking-change 8.0.0\n * @docs-private\n */\nexport const fadeInContent = matSelectAnimations.fadeInContent;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n"],"names":["MatFormFieldModule","MatOptionModule","MatCommonModule","OverlayModule","CommonModule","NgModule","Output","Input","ContentChild","ContentChildren","MatOptgroup","MatOption","ViewChild","CdkConnectedOverlay","LiveAnnouncer","Inject","Attribute","NgControl","Self","Optional","MatFormField","FormGroupDirective","NgForm","Directionality","ElementRef","ErrorStateMatcher","NgZone","MAT_OPTION_PARENT_COMPONENT","MatFormFieldControl","ChangeDetectionStrategy","ViewEncapsulation","Component","SELECT_MULTIPLE_PANEL_PADDING_X","_countGroupLabelsBeforeOption","_getOptionScrollPosition","takeUntil","merge","ActiveDescendantKeyManager","isDevMode","take","A","hasModifierKey","ENTER","SPACE","HOME","END","DOWN_ARROW","UP_ARROW","LEFT_ARROW","RIGHT_ARROW","startWith","distinctUntilChanged","SelectionModel","coerceBooleanProperty","EventEmitter","map","filter","switchMap","defer","Subject","tslib_1.__extends","Directive","mixinDisableRipple","mixinTabIndex","mixinDisabled","mixinErrorState","Overlay","overlay","InjectionToken","animate","style","transition","state","trigger","query","animateChild"],"mappings":";;;;;;;;;;;;;AIAA;;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