{"version":3,"file":"menu.es5.js","sources":["../../packages/material/esm5/menu/menu-animations.js","../../packages/material/esm5/menu/menu-errors.js","../../packages/material/esm5/menu/menu-item.js","../../packages/material/esm5/menu/menu-directive.js","../../packages/material/esm5/menu/menu-trigger.js","../../packages/material/esm5/menu/menu-module.js","../../packages/material/esm5/menu/index.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { trigger, state, style, animate, transition, } from '@angular/animations';\n/**\n * Below are all the animations for the mat-menu component.\n * Animation duration and timing values are based on:\n * https://material.io/guidelines/components/menus.html#menus-usage\n */\n/**\n * This animation controls the menu panel's entry and exit from the page.\n *\n * When the menu panel is added to the DOM, it scales in and fades in its border.\n *\n * When the menu panel is removed from the DOM, it simply fades out after a brief\n * delay to display the ripple.\n */\n// TODO(kara): switch to :enter and :leave once Mobile Safari is sorted out.\nexport var /** @type {?} */ transformMenu = trigger('transformMenu', [\n state('void', style({\n opacity: 0,\n // This starts off from 0.01, instead of 0, because there's an issue in the Angular animations\n // as of 4.2, which causes the animation to be skipped if it starts from 0.\n transform: 'scale(0.01, 0.01)'\n })),\n state('enter-start', style({\n opacity: 1,\n transform: 'scale(1, 0.5)'\n })),\n state('enter', style({\n transform: 'scale(1, 1)'\n })),\n transition('void => enter-start', animate('100ms linear')),\n transition('enter-start => enter', animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)')),\n transition('* => void', animate('150ms 50ms linear', style({ opacity: 0 })))\n]);\n/**\n * This animation fades in the background color and content of the menu panel\n * after its containing element is scaled in.\n */\nexport var fadeInItems = trigger('fadeInItems', [\n state('showing', style({ opacity: 1 })),\n transition('void => *', [\n style({ opacity: 0 }),\n animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n]);\n//# sourceMappingURL=menu-animations.js.map","/**\n * Throws an exception for the case when menu trigger doesn't have a valid mat-menu instance\n * \\@docs-private\n * @return {?}\n */\nexport function throwMatMenuMissingError() {\n throw Error(\"mat-menu-trigger: must pass in an mat-menu instance.\\n\\n Example:\\n \\n \");\n}\n/**\n * Throws an exception for the case when menu's x-position value isn't valid.\n * In other words, it doesn't match 'before' or 'after'.\n * \\@docs-private\n * @return {?}\n */\nexport function throwMatMenuInvalidPositionX() {\n throw Error(\"x-position value must be either 'before' or after'.\\n Example: \");\n}\n/**\n * Throws an exception for the case when menu's y-position value isn't valid.\n * In other words, it doesn't match 'above' or 'below'.\n * \\@docs-private\n * @return {?}\n */\nexport function throwMatMenuInvalidPositionY() {\n throw Error(\"y-position value must be either 'above' or below'.\\n Example: \");\n}\n//# sourceMappingURL=menu-errors.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as tslib_1 from \"tslib\";\nimport { ChangeDetectionStrategy, Component, ElementRef, ViewEncapsulation, } from '@angular/core';\nimport { mixinDisabled } from '@angular/material/core';\nimport { Subject } from 'rxjs/Subject';\n/**\n * \\@docs-private\n */\nvar MatMenuItemBase = (function () {\n function MatMenuItemBase() {\n }\n return MatMenuItemBase;\n}());\nexport { MatMenuItemBase };\nexport var /** @type {?} */ _MatMenuItemMixinBase = mixinDisabled(MatMenuItemBase);\n/**\n * This directive is intended to be used inside an mat-menu tag.\n * It exists mostly to set the role attribute.\n */\nvar MatMenuItem = (function (_super) {\n tslib_1.__extends(MatMenuItem, _super);\n /**\n * @param {?} _elementRef\n */\n function MatMenuItem(_elementRef) {\n var _this = _super.call(this) || this;\n _this._elementRef = _elementRef;\n /**\n * Stream that emits when the menu item is hovered.\n */\n _this.hover = new Subject();\n /**\n * Whether the menu item is highlighted.\n */\n _this._highlighted = false;\n /**\n * Whether the menu item acts as a trigger for a sub-menu.\n */\n _this._triggersSubmenu = false;\n return _this;\n }\n /**\n * Focuses the menu item.\n * @return {?}\n */\n MatMenuItem.prototype.focus = function () {\n this._getHostElement().focus();\n };\n /**\n * @return {?}\n */\n MatMenuItem.prototype.ngOnDestroy = function () {\n this.hover.complete();\n };\n /**\n * Used to set the `tabindex`.\n * @return {?}\n */\n MatMenuItem.prototype._getTabIndex = function () {\n return this.disabled ? '-1' : '0';\n };\n /**\n * Returns the host DOM element.\n * @return {?}\n */\n MatMenuItem.prototype._getHostElement = function () {\n return this._elementRef.nativeElement;\n };\n /**\n * Prevents the default element actions if it is disabled.\n * @param {?} event\n * @return {?}\n */\n MatMenuItem.prototype._checkDisabled = function (event) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n /**\n * Emits to the hover stream.\n * @return {?}\n */\n MatMenuItem.prototype._emitHoverEvent = function () {\n if (!this.disabled) {\n this.hover.next(this);\n }\n };\n /**\n * Gets the label to be used when determining whether the option should be focused.\n * @return {?}\n */\n MatMenuItem.prototype.getLabel = function () {\n var /** @type {?} */ element = this._elementRef.nativeElement;\n var /** @type {?} */ output = '';\n if (element.childNodes) {\n var /** @type {?} */ length_1 = element.childNodes.length;\n // Go through all the top-level text nodes and extract their text.\n // We skip anything that's not a text node to prevent the text from\n // being thrown off by something like an icon.\n for (var /** @type {?} */ i = 0; i < length_1; i++) {\n if (element.childNodes[i].nodeType === Node.TEXT_NODE) {\n output += element.childNodes[i].textContent;\n }\n }\n }\n return output.trim();\n };\n MatMenuItem.decorators = [\n { type: Component, args: [{selector: '[mat-menu-item]',\n exportAs: 'matMenuItem',\n inputs: ['disabled'],\n host: {\n 'role': 'menuitem',\n 'class': 'mat-menu-item',\n '[class.mat-menu-item-highlighted]': '_highlighted',\n '[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.disabled]': 'disabled || null',\n '(click)': '_checkDisabled($event)',\n '(mouseenter)': '_emitHoverEvent()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n template: \"
\",\n },] },\n ];\n /**\n * @nocollapse\n */\n MatMenuItem.ctorParameters = function () { return [\n { type: ElementRef, },\n ]; };\n return MatMenuItem;\n}(_MatMenuItemMixinBase));\nexport { MatMenuItem };\nfunction MatMenuItem_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenuItem.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenuItem.ctorParameters;\n /**\n * Stream that emits when the menu item is hovered.\n * @type {?}\n */\n MatMenuItem.prototype.hover;\n /**\n * Whether the menu item is highlighted.\n * @type {?}\n */\n MatMenuItem.prototype._highlighted;\n /**\n * Whether the menu item acts as a trigger for a sub-menu.\n * @type {?}\n */\n MatMenuItem.prototype._triggersSubmenu;\n /** @type {?} */\n MatMenuItem.prototype._elementRef;\n}\n//# sourceMappingURL=menu-item.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { ESCAPE, LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { RxChain, startWith, switchMap, first } from '@angular/cdk/rxjs';\nimport { ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Inject, InjectionToken, Input, Output, TemplateRef, ViewChild, ViewEncapsulation, NgZone, } from '@angular/core';\nimport { merge } from 'rxjs/observable/merge';\nimport { Subscription } from 'rxjs/Subscription';\nimport { fadeInItems, transformMenu } from './menu-animations';\nimport { throwMatMenuInvalidPositionX, throwMatMenuInvalidPositionY } from './menu-errors';\nimport { MatMenuItem } from './menu-item';\n/**\n * Injection token to be used to override the default options for `mat-menu`.\n */\nexport var MAT_MENU_DEFAULT_OPTIONS = new InjectionToken('mat-menu-default-options');\n/**\n * Start elevation for the menu panel.\n * \\@docs-private\n */\nvar MAT_MENU_BASE_ELEVATION = 2;\nvar MatMenu = (function () {\n /**\n * @param {?} _elementRef\n * @param {?} _ngZone\n * @param {?} _defaultOptions\n */\n function MatMenu(_elementRef, _ngZone, _defaultOptions) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n this._defaultOptions = _defaultOptions;\n this._xPosition = this._defaultOptions.xPosition;\n this._yPosition = this._defaultOptions.yPosition;\n /**\n * Subscription to tab events on the menu panel\n */\n this._tabSubscription = Subscription.EMPTY;\n /**\n * Config object to be passed into the menu's ngClass\n */\n this._classList = {};\n /**\n * Current state of the panel animation.\n */\n this._panelAnimationState = 'void';\n /**\n * Whether the menu should overlap its trigger.\n */\n this.overlapTrigger = this._defaultOptions.overlapTrigger;\n /**\n * Event emitted when the menu is closed.\n */\n this.close = new EventEmitter();\n }\n Object.defineProperty(MatMenu.prototype, \"xPosition\", {\n /**\n * Position of the menu in the X axis.\n * @return {?}\n */\n get: function () { return this._xPosition; },\n /**\n * @param {?} value\n * @return {?}\n */\n set: function (value) {\n if (value !== 'before' && value !== 'after') {\n throwMatMenuInvalidPositionX();\n }\n this._xPosition = value;\n this.setPositionClasses();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatMenu.prototype, \"yPosition\", {\n /**\n * Position of the menu in the Y axis.\n * @return {?}\n */\n get: function () { return this._yPosition; },\n /**\n * @param {?} value\n * @return {?}\n */\n set: function (value) {\n if (value !== 'above' && value !== 'below') {\n throwMatMenuInvalidPositionY();\n }\n this._yPosition = value;\n this.setPositionClasses();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatMenu.prototype, \"classList\", {\n /**\n * This method takes classes set on the host mat-menu element and applies them on the\n * menu template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing menu from outside the component.\n * @param {?} classes list of class names\n * @return {?}\n */\n set: function (classes) {\n if (classes && classes.length) {\n this._classList = classes.split(' ').reduce(function (obj, className) {\n obj[className] = true;\n return obj;\n }, {});\n this._elementRef.nativeElement.className = '';\n this.setPositionClasses();\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n MatMenu.prototype.ngAfterContentInit = function () {\n var _this = this;\n this._keyManager = new FocusKeyManager(this.items).withWrap().withTypeAhead();\n this._tabSubscription = this._keyManager.tabOut.subscribe(function () { return _this.close.emit('keydown'); });\n };\n /**\n * @return {?}\n */\n MatMenu.prototype.ngOnDestroy = function () {\n this._tabSubscription.unsubscribe();\n this.close.emit();\n this.close.complete();\n };\n /**\n * Stream that emits whenever the hovered menu item changes.\n * @return {?}\n */\n MatMenu.prototype.hover = function () {\n var _this = this;\n if (this.items) {\n return RxChain.from(this.items.changes)\n .call(startWith, this.items)\n .call(switchMap, function (items) { return merge.apply(void 0, items.map(function (item) { return item.hover; })); })\n .result();\n }\n return RxChain.from(this._ngZone.onStable.asObservable())\n .call(first)\n .call(switchMap, function () { return _this.hover(); })\n .result();\n };\n /**\n * Handle a keyboard event from the menu, delegating to the appropriate action.\n * @param {?} event\n * @return {?}\n */\n MatMenu.prototype._handleKeydown = function (event) {\n switch (event.keyCode) {\n case ESCAPE:\n this.close.emit('keydown');\n event.stopPropagation();\n break;\n case LEFT_ARROW:\n if (this.parentMenu && this.direction === 'ltr') {\n this.close.emit('keydown');\n }\n break;\n case RIGHT_ARROW:\n if (this.parentMenu && this.direction === 'rtl') {\n this.close.emit('keydown');\n }\n break;\n default:\n this._keyManager.onKeydown(event);\n }\n };\n /**\n * Focus the first item in the menu. This method is used by the menu trigger\n * to focus the first item when the menu is opened by the ENTER key.\n * @return {?}\n */\n MatMenu.prototype.focusFirstItem = function () {\n this._keyManager.setFirstItemActive();\n };\n /**\n * It's necessary to set position-based classes to ensure the menu panel animation\n * folds out from the correct direction.\n * @param {?=} posX\n * @param {?=} posY\n * @return {?}\n */\n MatMenu.prototype.setPositionClasses = function (posX, posY) {\n if (posX === void 0) { posX = this.xPosition; }\n if (posY === void 0) { posY = this.yPosition; }\n this._classList['mat-menu-before'] = posX === 'before';\n this._classList['mat-menu-after'] = posX === 'after';\n this._classList['mat-menu-above'] = posY === 'above';\n this._classList['mat-menu-below'] = posY === 'below';\n };\n /**\n * Sets the menu panel elevation.\n * @param {?} depth Number of parent menus that come before the menu.\n * @return {?}\n */\n MatMenu.prototype.setElevation = function (depth) {\n // The elevation starts at the base and increases by one for each level.\n var /** @type {?} */ newElevation = \"mat-elevation-z\" + (MAT_MENU_BASE_ELEVATION + depth);\n var /** @type {?} */ customElevation = Object.keys(this._classList).find(function (c) { return c.startsWith('mat-elevation-z'); });\n if (!customElevation || customElevation === this._previousElevation) {\n if (this._previousElevation) {\n this._classList[this._previousElevation] = false;\n }\n this._classList[newElevation] = true;\n this._previousElevation = newElevation;\n }\n };\n /**\n * Starts the enter animation.\n * @return {?}\n */\n MatMenu.prototype._startAnimation = function () {\n this._panelAnimationState = 'enter-start';\n };\n /**\n * Resets the panel animation to its initial state.\n * @return {?}\n */\n MatMenu.prototype._resetAnimation = function () {\n this._panelAnimationState = 'void';\n };\n /**\n * Callback that is invoked when the panel animation completes.\n * @param {?} event\n * @return {?}\n */\n MatMenu.prototype._onAnimationDone = function (event) {\n // After the initial expansion is done, trigger the second phase of the enter animation.\n if (event.toState === 'enter-start') {\n this._panelAnimationState = 'enter';\n }\n };\n MatMenu.decorators = [\n { type: Component, args: [{selector: 'mat-menu',\n template: \"
\",\n styles: [\".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-menu-panel.mat-menu-after.mat-menu-below{transform-origin:left top}.mat-menu-panel.mat-menu-after.mat-menu-above{transform-origin:left bottom}.mat-menu-panel.mat-menu-before.mat-menu-below{transform-origin:right top}.mat-menu-panel.mat-menu-before.mat-menu-above{transform-origin:right bottom}[dir=rtl] .mat-menu-panel.mat-menu-after.mat-menu-below{transform-origin:right top}[dir=rtl] .mat-menu-panel.mat-menu-after.mat-menu-above{transform-origin:right bottom}[dir=rtl] .mat-menu-panel.mat-menu-before.mat-menu-below{transform-origin:left top}[dir=rtl] .mat-menu-panel.mat-menu-before.mat-menu-above{transform-origin:left bottom}.mat-menu-panel.ng-animating{pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content{padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;position:relative}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item .mat-icon{vertical-align:middle}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:8px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute}\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n animations: [\n transformMenu,\n fadeInItems\n ],\n exportAs: 'matMenu'\n },] },\n ];\n /**\n * @nocollapse\n */\n MatMenu.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: NgZone, },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_DEFAULT_OPTIONS,] },] },\n ]; };\n MatMenu.propDecorators = {\n 'xPosition': [{ type: Input },],\n 'yPosition': [{ type: Input },],\n 'templateRef': [{ type: ViewChild, args: [TemplateRef,] },],\n 'items': [{ type: ContentChildren, args: [MatMenuItem,] },],\n 'overlapTrigger': [{ type: Input },],\n 'classList': [{ type: Input, args: ['class',] },],\n 'close': [{ type: Output },],\n };\n return MatMenu;\n}());\nexport { MatMenu };\nfunction MatMenu_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenu.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenu.ctorParameters;\n /** @type {?} */\n MatMenu.propDecorators;\n /** @type {?} */\n MatMenu.prototype._keyManager;\n /** @type {?} */\n MatMenu.prototype._xPosition;\n /** @type {?} */\n MatMenu.prototype._yPosition;\n /** @type {?} */\n MatMenu.prototype._previousElevation;\n /**\n * Subscription to tab events on the menu panel\n * @type {?}\n */\n MatMenu.prototype._tabSubscription;\n /**\n * Config object to be passed into the menu's ngClass\n * @type {?}\n */\n MatMenu.prototype._classList;\n /**\n * Current state of the panel animation.\n * @type {?}\n */\n MatMenu.prototype._panelAnimationState;\n /**\n * Parent menu of the current menu panel.\n * @type {?}\n */\n MatMenu.prototype.parentMenu;\n /**\n * Layout direction of the menu.\n * @type {?}\n */\n MatMenu.prototype.direction;\n /** @type {?} */\n MatMenu.prototype.templateRef;\n /**\n * List of the items inside of a menu.\n * @type {?}\n */\n MatMenu.prototype.items;\n /**\n * Whether the menu should overlap its trigger.\n * @type {?}\n */\n MatMenu.prototype.overlapTrigger;\n /**\n * Event emitted when the menu is closed.\n * @type {?}\n */\n MatMenu.prototype.close;\n /** @type {?} */\n MatMenu.prototype._elementRef;\n /** @type {?} */\n MatMenu.prototype._ngZone;\n /** @type {?} */\n MatMenu.prototype._defaultOptions;\n}\n//# sourceMappingURL=menu-directive.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { Overlay, OverlayConfig, } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { filter, RxChain } from '@angular/cdk/rxjs';\nimport { Directive, ElementRef, EventEmitter, Inject, InjectionToken, Input, Optional, Output, Self, ViewContainerRef, } from '@angular/core';\nimport { merge } from 'rxjs/observable/merge';\nimport { of as observableOf } from 'rxjs/observable/of';\nimport { Subscription } from 'rxjs/Subscription';\nimport { MatMenu } from './menu-directive';\nimport { throwMatMenuMissingError } from './menu-errors';\nimport { MatMenuItem } from './menu-item';\n/**\n * Injection token that determines the scroll handling while the menu is open.\n */\nexport var MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');\n/**\n * \\@docs-private\n * @param {?} overlay\n * @return {?}\n */\nexport function MAT_MENU_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return function () { return overlay.scrollStrategies.reposition(); };\n}\n/**\n * \\@docs-private\n */\nexport var MAT_MENU_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_MENU_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_MENU_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n/**\n * Default top padding of the menu panel.\n */\nexport var MENU_PANEL_TOP_PADDING = 8;\n/**\n * This directive is intended to be used in conjunction with an mat-menu tag. It is\n * responsible for toggling the display of the provided menu instance.\n */\nvar MatMenuTrigger = (function () {\n /**\n * @param {?} _overlay\n * @param {?} _element\n * @param {?} _viewContainerRef\n * @param {?} _scrollStrategy\n * @param {?} _parentMenu\n * @param {?} _menuItemInstance\n * @param {?} _dir\n */\n function MatMenuTrigger(_overlay, _element, _viewContainerRef, _scrollStrategy, _parentMenu, _menuItemInstance, _dir) {\n this._overlay = _overlay;\n this._element = _element;\n this._viewContainerRef = _viewContainerRef;\n this._scrollStrategy = _scrollStrategy;\n this._parentMenu = _parentMenu;\n this._menuItemInstance = _menuItemInstance;\n this._dir = _dir;\n this._overlayRef = null;\n this._menuOpen = false;\n this._closeSubscription = Subscription.EMPTY;\n this._positionSubscription = Subscription.EMPTY;\n this._hoverSubscription = Subscription.EMPTY;\n this._openedByMouse = false;\n /**\n * Event emitted when the associated menu is opened.\n */\n this.onMenuOpen = new EventEmitter();\n /**\n * Event emitted when the associated menu is closed.\n */\n this.onMenuClose = new EventEmitter();\n if (_menuItemInstance) {\n _menuItemInstance._triggersSubmenu = this.triggersSubmenu();\n }\n }\n Object.defineProperty(MatMenuTrigger.prototype, \"_deprecatedMatMenuTriggerFor\", {\n /**\n * @deprecated\n * @return {?}\n */\n get: function () {\n return this.menu;\n },\n /**\n * @param {?} v\n * @return {?}\n */\n set: function (v) {\n this.menu = v;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n MatMenuTrigger.prototype.ngAfterContentInit = function () {\n var _this = this;\n this._checkMenu();\n this.menu.close.subscribe(function (reason) {\n _this._destroyMenu();\n // If a click closed the menu, we should close the entire chain of nested menus.\n if (reason === 'click' && _this._parentMenu) {\n _this._parentMenu.close.emit(reason);\n }\n });\n if (this.triggersSubmenu()) {\n // Subscribe to changes in the hovered item in order to toggle the panel.\n this._hoverSubscription = filter\n .call(this._parentMenu.hover(), function (active) { return active === _this._menuItemInstance; })\n .subscribe(function () {\n _this._openedByMouse = true;\n _this.openMenu();\n });\n }\n };\n /**\n * @return {?}\n */\n MatMenuTrigger.prototype.ngOnDestroy = function () {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n this._cleanUpSubscriptions();\n };\n Object.defineProperty(MatMenuTrigger.prototype, \"menuOpen\", {\n /**\n * Whether the menu is open.\n * @return {?}\n */\n get: function () {\n return this._menuOpen;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatMenuTrigger.prototype, \"dir\", {\n /**\n * The text direction of the containing app.\n * @return {?}\n */\n get: function () {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Whether the menu triggers a sub-menu or a top-level one.\n * @return {?}\n */\n MatMenuTrigger.prototype.triggersSubmenu = function () {\n return !!(this._menuItemInstance && this._parentMenu);\n };\n /**\n * Toggles the menu between the open and closed states.\n * @return {?}\n */\n MatMenuTrigger.prototype.toggleMenu = function () {\n return this._menuOpen ? this.closeMenu() : this.openMenu();\n };\n /**\n * Opens the menu.\n * @return {?}\n */\n MatMenuTrigger.prototype.openMenu = function () {\n var _this = this;\n if (!this._menuOpen) {\n this._createOverlay().attach(this._portal);\n this._closeSubscription = this._menuClosingActions().subscribe(function () {\n _this.menu.close.emit();\n });\n this._initMenu();\n if (this.menu instanceof MatMenu) {\n this.menu._startAnimation();\n }\n }\n };\n /**\n * Closes the menu.\n * @return {?}\n */\n MatMenuTrigger.prototype.closeMenu = function () {\n this.menu.close.emit();\n };\n /**\n * Focuses the menu trigger.\n * @return {?}\n */\n MatMenuTrigger.prototype.focus = function () {\n this._element.nativeElement.focus();\n };\n /**\n * Closes the menu and does the necessary cleanup.\n * @return {?}\n */\n MatMenuTrigger.prototype._destroyMenu = function () {\n if (this._overlayRef && this.menuOpen) {\n this._resetMenu();\n this._overlayRef.detach();\n this._closeSubscription.unsubscribe();\n if (this.menu instanceof MatMenu) {\n this.menu._resetAnimation();\n }\n }\n };\n /**\n * This method sets the menu state to open and focuses the first item if\n * the menu was opened via the keyboard.\n * @return {?}\n */\n MatMenuTrigger.prototype._initMenu = function () {\n this.menu.parentMenu = this.triggersSubmenu() ? this._parentMenu : undefined;\n this.menu.direction = this.dir;\n this._setMenuElevation();\n this._setIsMenuOpen(true);\n // Should only set focus if opened via the keyboard, so keyboard users can\n // can easily navigate menu items. According to spec, mouse users should not\n // see the focus style.\n if (!this._openedByMouse) {\n this.menu.focusFirstItem();\n }\n };\n /**\n * Updates the menu elevation based on the amount of parent menus that it has.\n * @return {?}\n */\n MatMenuTrigger.prototype._setMenuElevation = function () {\n if (this.menu.setElevation) {\n var /** @type {?} */ depth = 0;\n var /** @type {?} */ parentMenu = this.menu.parentMenu;\n while (parentMenu) {\n depth++;\n parentMenu = parentMenu.parentMenu;\n }\n this.menu.setElevation(depth);\n }\n };\n /**\n * This method resets the menu when it's closed, most importantly restoring\n * focus to the menu trigger if the menu was opened via the keyboard.\n * @return {?}\n */\n MatMenuTrigger.prototype._resetMenu = function () {\n this._setIsMenuOpen(false);\n // Focus only needs to be reset to the host element if the menu was opened\n // by the keyboard and manually shifted to the first menu item.\n if (!this._openedByMouse) {\n this.focus();\n }\n this._openedByMouse = false;\n };\n /**\n * @param {?} isOpen\n * @return {?}\n */\n MatMenuTrigger.prototype._setIsMenuOpen = function (isOpen) {\n this._menuOpen = isOpen;\n this._menuOpen ? this.onMenuOpen.emit() : this.onMenuClose.emit();\n if (this.triggersSubmenu()) {\n this._menuItemInstance._highlighted = isOpen;\n }\n };\n /**\n * This method checks that a valid instance of MatMenu has been passed into\n * matMenuTriggerFor. If not, an exception is thrown.\n * @return {?}\n */\n MatMenuTrigger.prototype._checkMenu = function () {\n if (!this.menu) {\n throwMatMenuMissingError();\n }\n };\n /**\n * This method creates the overlay from the provided menu's template and saves its\n * OverlayRef so that it can be attached to the DOM when openMenu is called.\n * @return {?}\n */\n MatMenuTrigger.prototype._createOverlay = function () {\n if (!this._overlayRef) {\n this._portal = new TemplatePortal(this.menu.templateRef, this._viewContainerRef);\n var /** @type {?} */ config = this._getOverlayConfig();\n this._subscribeToPositions(/** @type {?} */ (config.positionStrategy));\n this._overlayRef = this._overlay.create(config);\n }\n return this._overlayRef;\n };\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @return {?} OverlayConfig\n */\n MatMenuTrigger.prototype._getOverlayConfig = function () {\n return new OverlayConfig({\n positionStrategy: this._getPosition(),\n hasBackdrop: !this.triggersSubmenu(),\n backdropClass: 'cdk-overlay-transparent-backdrop',\n direction: this.dir,\n scrollStrategy: this._scrollStrategy()\n });\n };\n /**\n * Listens to changes in the position of the overlay and sets the correct classes\n * on the menu based on the new position. This ensures the animation origin is always\n * correct, even if a fallback position is used for the overlay.\n * @param {?} position\n * @return {?}\n */\n MatMenuTrigger.prototype._subscribeToPositions = function (position) {\n var _this = this;\n this._positionSubscription = position.onPositionChange.subscribe(function (change) {\n var /** @type {?} */ posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';\n var /** @type {?} */ posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';\n _this.menu.setPositionClasses(posX, posY);\n });\n };\n /**\n * This method builds the position strategy for the overlay, so the menu is properly connected\n * to the trigger.\n * @return {?} ConnectedPositionStrategy\n */\n MatMenuTrigger.prototype._getPosition = function () {\n var _a = this.menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'], originX = _a[0], originFallbackX = _a[1];\n var _b = this.menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'], overlayY = _b[0], overlayFallbackY = _b[1];\n var _c = [overlayY, overlayFallbackY], originY = _c[0], originFallbackY = _c[1];\n var _d = [originX, originFallbackX], overlayX = _d[0], overlayFallbackX = _d[1];\n var /** @type {?} */ offsetY = 0;\n if (this.triggersSubmenu()) {\n // When the menu is a sub-menu, it should always align itself\n // to the edges of the trigger, instead of overlapping it.\n overlayFallbackX = originX = this.menu.xPosition === 'before' ? 'start' : 'end';\n originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';\n // TODO(crisbeto): this should be a function, once the overlay supports it.\n // Right now it will be wrong for the fallback positions.\n offsetY = overlayY === 'bottom' ? MENU_PANEL_TOP_PADDING : -MENU_PANEL_TOP_PADDING;\n }\n else if (!this.menu.overlapTrigger) {\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n }\n return this._overlay.position()\n .connectedTo(this._element, { originX: originX, originY: originY }, { overlayX: overlayX, overlayY: overlayY })\n .withDirection(this.dir)\n .withOffsetY(offsetY)\n .withFallbackPosition({ originX: originFallbackX, originY: originY }, { overlayX: overlayFallbackX, overlayY: overlayY })\n .withFallbackPosition({ originX: originX, originY: originFallbackY }, { overlayX: overlayX, overlayY: overlayFallbackY })\n .withFallbackPosition({ originX: originFallbackX, originY: originFallbackY }, { overlayX: overlayFallbackX, overlayY: overlayFallbackY });\n };\n /**\n * Cleans up the active subscriptions.\n * @return {?}\n */\n MatMenuTrigger.prototype._cleanUpSubscriptions = function () {\n this._closeSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n this._hoverSubscription.unsubscribe();\n };\n /**\n * Returns a stream that emits whenever an action that should close the menu occurs.\n * @return {?}\n */\n MatMenuTrigger.prototype._menuClosingActions = function () {\n var _this = this;\n var /** @type {?} */ backdrop = ((this._overlayRef)).backdropClick();\n var /** @type {?} */ parentClose = this._parentMenu ? this._parentMenu.close : observableOf();\n var /** @type {?} */ hover = this._parentMenu ? RxChain.from(this._parentMenu.hover())\n .call(filter, function (active) { return active !== _this._menuItemInstance; })\n .call(filter, function () { return _this._menuOpen; })\n .result() : observableOf();\n return merge(backdrop, parentClose, hover);\n };\n /**\n * Handles mouse presses on the trigger.\n * @param {?} event\n * @return {?}\n */\n MatMenuTrigger.prototype._handleMousedown = function (event) {\n if (!isFakeMousedownFromScreenReader(event)) {\n this._openedByMouse = true;\n // Since clicking on the trigger won't close the menu if it opens a sub-menu,\n // we should prevent focus from moving onto it via click to avoid the\n // highlight from lingering on the menu item.\n if (this.triggersSubmenu()) {\n event.preventDefault();\n }\n }\n };\n /**\n * Handles key presses on the trigger.\n * @param {?} event\n * @return {?}\n */\n MatMenuTrigger.prototype._handleKeydown = function (event) {\n var /** @type {?} */ keyCode = event.keyCode;\n if (this.triggersSubmenu() && ((keyCode === RIGHT_ARROW && this.dir === 'ltr') ||\n (keyCode === LEFT_ARROW && this.dir === 'rtl'))) {\n this.openMenu();\n }\n };\n /**\n * Handles click events on the trigger.\n * @param {?} event\n * @return {?}\n */\n MatMenuTrigger.prototype._handleClick = function (event) {\n if (this.triggersSubmenu()) {\n // Stop event propagation to avoid closing the parent menu.\n event.stopPropagation();\n this.openMenu();\n }\n else {\n this.toggleMenu();\n }\n };\n MatMenuTrigger.decorators = [\n { type: Directive, args: [{\n selector: \"[mat-menu-trigger-for], [matMenuTriggerFor]\",\n host: {\n 'aria-haspopup': 'true',\n '(mousedown)': '_handleMousedown($event)',\n '(keydown)': '_handleKeydown($event)',\n '(click)': '_handleClick($event)',\n },\n exportAs: 'matMenuTrigger'\n },] },\n ];\n /**\n * @nocollapse\n */\n MatMenuTrigger.ctorParameters = function () { return [\n { type: Overlay, },\n { type: ElementRef, },\n { type: ViewContainerRef, },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_SCROLL_STRATEGY,] },] },\n { type: MatMenu, decorators: [{ type: Optional },] },\n { type: MatMenuItem, decorators: [{ type: Optional }, { type: Self },] },\n { type: Directionality, decorators: [{ type: Optional },] },\n ]; };\n MatMenuTrigger.propDecorators = {\n '_deprecatedMatMenuTriggerFor': [{ type: Input, args: ['mat-menu-trigger-for',] },],\n 'menu': [{ type: Input, args: ['matMenuTriggerFor',] },],\n 'onMenuOpen': [{ type: Output },],\n 'onMenuClose': [{ type: Output },],\n };\n return MatMenuTrigger;\n}());\nexport { MatMenuTrigger };\nfunction MatMenuTrigger_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenuTrigger.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenuTrigger.ctorParameters;\n /** @type {?} */\n MatMenuTrigger.propDecorators;\n /** @type {?} */\n MatMenuTrigger.prototype._portal;\n /** @type {?} */\n MatMenuTrigger.prototype._overlayRef;\n /** @type {?} */\n MatMenuTrigger.prototype._menuOpen;\n /** @type {?} */\n MatMenuTrigger.prototype._closeSubscription;\n /** @type {?} */\n MatMenuTrigger.prototype._positionSubscription;\n /** @type {?} */\n MatMenuTrigger.prototype._hoverSubscription;\n /** @type {?} */\n MatMenuTrigger.prototype._openedByMouse;\n /**\n * References the menu instance that the trigger is associated with.\n * @type {?}\n */\n MatMenuTrigger.prototype.menu;\n /**\n * Event emitted when the associated menu is opened.\n * @type {?}\n */\n MatMenuTrigger.prototype.onMenuOpen;\n /**\n * Event emitted when the associated menu is closed.\n * @type {?}\n */\n MatMenuTrigger.prototype.onMenuClose;\n /** @type {?} */\n MatMenuTrigger.prototype._overlay;\n /** @type {?} */\n MatMenuTrigger.prototype._element;\n /** @type {?} */\n MatMenuTrigger.prototype._viewContainerRef;\n /** @type {?} */\n MatMenuTrigger.prototype._scrollStrategy;\n /** @type {?} */\n MatMenuTrigger.prototype._parentMenu;\n /** @type {?} */\n MatMenuTrigger.prototype._menuItemInstance;\n /** @type {?} */\n MatMenuTrigger.prototype._dir;\n}\n//# sourceMappingURL=menu-trigger.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCommonModule } from '@angular/material/core';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { MatMenu, MAT_MENU_DEFAULT_OPTIONS } from './menu-directive';\nimport { MatMenuItem } from './menu-item';\nimport { MatMenuTrigger, MAT_MENU_SCROLL_STRATEGY_PROVIDER } from './menu-trigger';\nimport { MatRippleModule } from '@angular/material/core';\nvar MatMenuModule = (function () {\n function MatMenuModule() {\n }\n MatMenuModule.decorators = [\n { type: NgModule, args: [{\n imports: [\n OverlayModule,\n CommonModule,\n MatRippleModule,\n MatCommonModule,\n ],\n exports: [MatMenu, MatMenuItem, MatMenuTrigger, MatCommonModule],\n declarations: [MatMenu, MatMenuItem, MatMenuTrigger],\n providers: [\n MAT_MENU_SCROLL_STRATEGY_PROVIDER,\n {\n provide: MAT_MENU_DEFAULT_OPTIONS,\n useValue: {\n overlapTrigger: true,\n xPosition: 'after',\n yPosition: 'below',\n },\n }\n ],\n },] },\n ];\n /**\n * @nocollapse\n */\n MatMenuModule.ctorParameters = function () { return []; };\n return MatMenuModule;\n}());\nexport { MatMenuModule };\nfunction MatMenuModule_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMenuModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMenuModule.ctorParameters;\n}\n//# sourceMappingURL=menu-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MAT_MENU_SCROLL_STRATEGY, fadeInItems, transformMenu, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger } from './public-api';\nexport { MatMenuItemBase as ɵa22, _MatMenuItemMixinBase as ɵb22 } from './menu-item';\nexport { MAT_MENU_SCROLL_STRATEGY_PROVIDER as ɵd22, MAT_MENU_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵc22 } from './menu-trigger';\n//# sourceMappingURL=index.js.map"],"names":["tslib_1.__extends","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA;;;;;;;;;;;;;;AAcA,AAAO,IAAqB,aAAa,GAAG,OAAO,CAAC,eAAe,EAAE;IACjE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;QAChB,OAAO,EAAE,CAAC;;;QAGV,SAAS,EAAE,mBAAmB;KACjC,CAAC,CAAC;IACH,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;QACvB,OAAO,EAAE,CAAC;QACV,SAAS,EAAE,eAAe;KAC7B,CAAC,CAAC;IACH,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;QACjB,SAAS,EAAE,aAAa;KAC3B,CAAC,CAAC;IACH,UAAU,CAAC,qBAAqB,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1D,UAAU,CAAC,sBAAsB,EAAE,OAAO,CAAC,wCAAwC,CAAC,CAAC;IACrF,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,mBAAmB,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/E,C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