blob: 811e301671aa5eb4efb20179406d3199aa496b3a [file] [log] [blame]
{"version":3,"file":"material-select.umd.min.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/material/select/select-errors.ts","../../src/material/select/select.ts","../../src/material/select/select-animations.ts","../../src/material/select/select-module.ts"],"sourcesContent":["/*! *****************************************************************************\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","/**\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 {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\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","/**\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"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","getMatSelectDynamicMultipleError","Error","getMatSelectNonArrayValueError","getMatSelectNonFunctionValueError","MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY","overlay","scrollStrategies","reposition","setPrototypeOf","__proto__","Array","p","hasOwnProperty","matSelectAnimations","transformPanelWrap","trigger","transition","query","animateChild","optional","transformPanel","state","style","transform","minWidth","opacity","animate","fadeInContent","nextUniqueId","exports","SELECT_MULTIPLE_PANEL_PADDING_X","MAT_SELECT_SCROLL_STRATEGY","InjectionToken","MAT_SELECT_SCROLL_STRATEGY_PROVIDER","provide","deps","Overlay","useFactory","MatSelectChange","source","value","MatSelectBase","_elementRef","_defaultErrorStateMatcher","_parentForm","_parentFormGroup","ngControl","_MatSelectMixinBase","mixinDisableRipple","mixinTabIndex","mixinDisabled","mixinErrorState","MatSelectTrigger","type","Directive","args","selector","MatSelect","_super","_viewportRuler","_changeDetectorRef","_ngZone","elementRef","_dir","_parentFormField","tabIndex","scrollStrategyFactory","_liveAnnouncer","_this","call","_panelOpen","_required","_scrollTop","_multiple","_compareWith","o1","o2","_uid","_destroy","Subject","_triggerFontSize","_onChange","_onTouched","_optionIds","_transformOrigin","_panelDoneAnimatingStream","_offsetY","_positions","originX","originY","overlayX","overlayY","_disableOptionCentering","_focused","controlType","ariaLabel","optionSelectionChanges","defer","options","changes","pipe","startWith","switchMap","merge","apply","map","option","onSelectionChange","onStable","asObservable","take","openedChange","EventEmitter","_openedStream","filter","o","_closedStream","selectionChange","valueChange","valueAccessor","_scrollStrategyFactory","_scrollStrategy","parseInt","id","tslib_1.__extends","defineProperty","_placeholder","stateChanges","next","coerceBooleanProperty","_selectionModel","fn","_initializeSelection","_value","newValue","writeValue","_id","ngOnInit","SelectionModel","multiple","distinctUntilChanged","takeUntil","subscribe","panelOpen","emit","overlayDir","offsetX","markForCheck","change","_triggerRect","nativeElement","getBoundingClientRect","ngAfterContentInit","_initKeyManager","onChange","event","added","forEach","select","removed","deselect","_resetOptions","ngDoCheck","updateErrorState","ngOnChanges","ngOnDestroy","complete","toggle","close","open","disabled","length","getComputedStyle","fontSize","_keyManager","withHorizontalOrientation","_calculateOverlayPosition","_highlightCorrectOption","overlayRef","overlayElement","_isRtl","_setSelectionByValue","registerOnChange","registerOnTouched","setDisabledState","isDisabled","selected","empty","selectedOptions","viewValue","reverse","join","_handleKeydown","_handleOpenKeydown","_handleClosedKeydown","keyCode","isArrowKey","DOWN_ARROW","UP_ARROW","LEFT_ARROW","RIGHT_ARROW","isOpenKey","ENTER","SPACE","manager","hasModifierKey","altKey","preventDefault","previouslySelectedOption","HOME","END","setFirstItemActive","setLastItemActive","onKeydown","selectedOption","announce","activeItem","A","ctrlKey","hasDeselectedOptions_1","some","opt","previouslyFocusedIndex","activeItemIndex","shiftKey","_selectViaInteraction","_onFocus","_onBlur","_onAttached","positionChange","_setPseudoCheckboxPaddingSize","detectChanges","_calculateOverlayOffsetX","panel","scrollTop","_getPanelTheme","color","pseudoCheckbox","querySelector","SELECT_PANEL_PADDING_X","offsetWidth","isEmpty","Promise","resolve","then","isArray","clear","currentValue","_selectValue","_sortValues","correspondingOption","setActiveItem","find","error","isDevMode","console","warn","ActiveDescendantKeyManager","withTypeAhead","withVerticalOrientation","withAllowedModifierKeys","tabOut","focus","_scrollActiveOptionIntoView","changedOrDestroyed","_onSelect","isUserInput","_stateChanges","_setOptionIds","wasSelected","isSelected","_propagateChanges","options_1","toArray","sort","a","sortComparator","indexOf","fallbackValue","valueToEmit","activeOptionIndex","labelCount","_countGroupLabelsBeforeOption","optionGroups","_getOptionScrollPosition","_getItemHeight","_getOptionIndex","reduce","result","current","index","undefined","itemHeight","items","_getItemCount","panelHeight","Math","min","scrollContainerHeight","maxScroll","selectedOptionOffset","scrollBuffer","_calculateOverlayScroll","_calculateOverlayOffsetY","_checkOverlayWithinViewport","selectedIndex","optionOffsetFromScrollTop","halfOptionHeight","optimalScrollPosition","max","_getAriaLabel","ariaLabelledby","placeholder","_getAriaLabelledby","_hasFloatingLabel","_labelId","_getAriaActiveDescendant","overlayRect","viewportSize","getViewportSize","isRtl","paddingWidth","first","group","leftOverflow","left","rightOverflow","right","width","round","updatePosition","optionOffsetFromPanelTop","optionHeightAdjustment","height","maxOptionsDisplayed","floor","firstDisplayedIndex","selectedDisplayIndex","partialItemHeight","topSpaceAvailable","top","bottomSpaceAvailable","bottom","panelHeightTop","abs","totalPanelHeight","panelHeightBottom","_adjustPanelUp","_adjustPanelDown","_getOriginBasedOnOption","distanceBelowViewport","distanceAboveViewport","setDescribedByIds","ids","_ariaDescribedby","onContainerClick","Component","exportAs","template","styles","inputs","encapsulation","ViewEncapsulation","None","changeDetection","ChangeDetectionStrategy","OnPush","host","role","[attr.id]","[attr.tabindex]","[attr.aria-label]","[attr.aria-labelledby]","[attr.aria-required]","[attr.aria-disabled]","[attr.aria-invalid]","[attr.aria-owns]","[attr.aria-multiselectable]","[attr.aria-describedby]","[attr.aria-activedescendant]","[class.mat-select-disabled]","[class.mat-select-invalid]","[class.mat-select-required]","[class.mat-select-empty]","class","(keydown)","(focus)","(blur)","animations","providers","MatFormFieldControl","useExisting","MAT_OPTION_PARENT_COMPONENT","NgZone","ErrorStateMatcher","ElementRef","Directionality","decorators","Optional","NgForm","FormGroupDirective","MatFormField","NgControl","Self","String","Attribute","Inject","LiveAnnouncer","propDecorators","ViewChild","CdkConnectedOverlay","static","ContentChildren","MatOption","descendants","MatOptgroup","panelClass","Input","customTrigger","ContentChild","required","disableOptionCentering","compareWith","errorStateMatcher","Output","MatSelectModule","NgModule","imports","CommonModule","OverlayModule","MatOptionModule","MatCommonModule","MatFormFieldModule","declarations"],"mappings":";;;;;;;yxCAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICbnF,QAAgBO,KACd,MAAOC,OAAM,iEASf,QAAgBC,KACd,MAAOD,OAAM,sDAQf,QAAgBE,KACd,MAAOF,OAAM,qCCyGf,QAAgBG,GAA4CC,GAE1D,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,cF5HxC,GAAIX,GAAgB,SAASL,EAAGC,GAI5B,OAHAI,EAAgBE,OAAOU,iBAChBC,uBAA2BC,QAAS,SAAUnB,EAAGC,GAAKD,EAAEkB,UAAYjB,IACvE,SAAUD,EAAGC,GAAK,IAAK,GAAImB,KAAKnB,GAAOA,EAAEoB,eAAeD,KAAIpB,EAAEoB,GAAKnB,EAAEmB,MACpDpB,EAAGC,IGMfqB,GAUXC,mBAAoBC,EAAAA,QAAQ,sBACxBC,EAAAA,WAAW,YAAaC,EAAAA,MAAM,mBAAoBC,EAAAA,iBAC7CC,UAAU,OAYnBC,eAAgBL,EAAAA,QAAQ,kBACtBM,EAAAA,MAAM,OAAQC,EAAAA,OACZC,UAAW,cACXC,SAAU,OACVC,QAAS,KAEXJ,EAAAA,MAAM,UAAWC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