text: /* */ 
  "format cjs";
  /*!
   * Angular Material Design
   * https://github.com/angular/material
   * @license MIT
   * v1.0.0-rc2-master-fcd199e
   */
  function MenuController(e,t,n,r,o,a){var i,l,s=this;this.nestLevel=parseInt(t.mdNestLevel,10)||0,this.init=function(e,t){t=t||{},i=e,l=n[0].querySelector("[ng-click],[ng-mouseenter]"),this.isInMenuBar=t.isInMenuBar,this.nestedMenus=o.nodesToArray(i[0].querySelectorAll(".md-nested-menu")),this.enableHoverListener(),i.on("$mdInterimElementRemove",function(){s.isOpen=!1})},this.enableHoverListener=function(){r.$on("$mdMenuOpen",function(e,t){i[0].contains(t[0])&&(s.currentlyOpenMenu=t.controller("mdMenu"),s.isAlreadyOpening=!1,s.currentlyOpenMenu.registerContainerProxy(s.triggerContainerProxy.bind(s)))}),r.$on("$mdMenuClose",function(e,t){i[0].contains(t[0])&&(s.currentlyOpenMenu=void 0)});var e,t=angular.element(o.nodesToArray(i[0].querySelectorAll("md-menu-item")));t.on("mouseenter",function(t){if(!s.isAlreadyOpening){var n=t.target.querySelector("md-menu")||o.getClosest(t.target,"MD-MENU");e=a(function(){if(n&&(n=angular.element(n).controller("mdMenu")),s.currentlyOpenMenu&&s.currentlyOpenMenu!=n){var e=s.nestLevel+1;s.currentlyOpenMenu.close(!0,{closeTo:e})}else n&&!n.isOpen&&n.open&&(s.isAlreadyOpening=!0,n.open())},n?100:250);var r=t.currentTarget.querySelector("button:not([disabled])");r&&r.focus()}}),t.on("mouseleave",function(t){e&&(a.cancel(e),e=void 0)})},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),s.isOpen||(s.isOpen=!0,l=l||(t?t.target:n[0]),r.$emit("$mdMenuOpen",n),e.show({scope:r,mdMenuCtrl:s,nestLevel:s.nestLevel,element:i,target:l,preserveElement:s.isInMenuBar||s.nestedMenus.length>0,parent:s.isInMenuBar?n:"body"}))},r.$mdOpenMenu=this.open,r.$watch(function(){return s.isOpen},function(e){e?(l.setAttribute("aria-expanded","true"),n[0].classList.add("md-open"),angular.forEach(s.nestedMenus,function(e){e.classList.remove("md-open")})):(l&&l.setAttribute("aria-expanded","false"),n[0].classList.remove("md-open")),r.$mdMenuIsOpen=s.isOpen}),this.focusMenuContainer=function(){var e=i[0].querySelector("[md-menu-focus-target]");e||(e=i[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return e.destroy()},this.close=function(t,o){if(s.isOpen){s.isOpen=!1;var a=angular.extend({},o,{skipFocus:t});if(r.$emit("$mdMenuClose",n,a),e.hide(null,o),!t){var i=s.restoreFocusTo||n.find("button")[0];i instanceof angular.element&&(i=i[0]),i&&i.focus()}}},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}function MenuDirective(e){function t(t){t.addClass("md-menu");var o=t.children()[0];if(o.hasAttribute("ng-click")||(o=o.querySelector("[ng-click],[ng-mouseenter]")||o),!o||"MD-BUTTON"!=o.nodeName&&"BUTTON"!=o.nodeName||o.hasAttribute("type")||o.setAttribute("type","button"),2!=t.children().length)throw Error(r+"Expected two children elements.");o&&o.setAttribute("aria-haspopup","true");var a=t[0].querySelectorAll("md-menu"),i=parseInt(t[0].getAttribute("md-nest-level"),10)||0;return a&&angular.forEach(e.nodesToArray(a),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("md-nested-menu"),e.setAttribute("md-nest-level",i+1),e.setAttribute("role","menu")}),n}function n(e,t,n,r){var o=r[0],a=void 0!=r[1],i=angular.element('<div class="md-open-menu-container md-whiteframe-z2"></div>'),l=t.children()[1];i.append(l),a&&(t.append(i),i[0].style.display="none"),o.init(i,{isInMenuBar:a}),e.$on("$destroy",function(){o.destroy()["finally"](function(){i.remove()})})}var r="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:t}}function MenuProvider(e){function t(e,t,o,a,i,l,s,u,d){function c(t,n,r){return r.nestLevel?angular.noop:(r.disableParentScroll&&!e.getClosest(r.target,"MD-DIALOG")?r.restoreScroll=e.disableScrollAround(r.element,r.parent):r.disableParentScroll=!1,r.hasBackdrop&&(r.backdrop=e.createBackdrop(t,"md-menu-backdrop md-click-catcher"),d.enter(r.backdrop,r.parent)),function(){r.backdrop&&r.backdrop.remove(),r.disableParentScroll&&r.restoreScroll()})}function m(e,t,n){function r(){return u(t,{addClass:"md-leave"}).start()}function o(){t.removeClass("md-active"),h(t,n),n.alreadyOpen=!1}return n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():r().then(o)}function p(n,r,a){function d(){return a.preserveElement?r[0].style.display="":a.parent.append(r),l(function(e){var t=v(r,a);r.removeClass("md-leave"),u(r,{addClass:"md-active",from:M.toCss(t),to:M.toCss({transform:""})}).start().then(e)})}function m(){if(!a.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");angular.extend(a,{alreadyOpen:!1,isRemoved:!1,target:angular.element(a.target),parent:angular.element(a.parent),menuContentEl:angular.element(r[0].querySelector("md-menu-content"))})}function p(){var e=function(e,t){return s.throttle(function(){if(!a.isRemoved){var n=v(e,t);e.css(M.toCss(n))}})}(r,a);return i.addEventListener("resize",e),i.addEventListener("orientationchange",e),function(){i.removeEventListener("resize",e),i.removeEventListener("orientationchange",e)}}function g(){function t(t){var n;switch(t.keyCode){case o.KEY_CODE.ESCAPE:a.mdMenuCtrl.close(!1,{closeAll:!0}),n=!0;break;case o.KEY_CODE.UP_ARROW:f(t,a.menuContentEl,a,-1)||a.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.DOWN_ARROW:f(t,a.menuContentEl,a,1)||a.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.LEFT_ARROW:a.nestLevel?a.mdMenuCtrl.close():a.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.RIGHT_ARROW:var r=e.getClosest(t.target,"MD-MENU");r&&r!=a.parent[0]?t.target.click():a.mdMenuCtrl.triggerContainerProxy(t),n=!0}n&&(t.preventDefault(),t.stopImmediatePropagation())}function i(e){e.preventDefault(),e.stopPropagation(),n.$apply(function(){a.mdMenuCtrl.close(!0,{closeAll:!0})})}function l(t){function r(){n.$apply(function(){a.mdMenuCtrl.close(!0,{closeAll:!0})})}function o(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)for(var o,a=[n,"data-"+n,"x-"+n],i=0;o=a[i];++i)if(e.hasAttribute(o))return!0;return!1}var i=t.target;do{if(i==a.menuContentEl[0])return;if(o(i,["ng-click","ng-href","ui-sref"])||"BUTTON"==i.nodeName||"MD-BUTTON"==i.nodeName){var l=e.getClosest(i,"MD-MENU");i.hasAttribute("disabled")||l&&l!=a.parent[0]||r();break}}while(i=i.parentNode)}r.addClass("md-clickable"),a.backdrop&&a.backdrop.on("click",i),a.menuContentEl.on("keydown",t),a.menuContentEl[0].addEventListener("click",l,!0);var s=a.menuContentEl[0].querySelector("[md-menu-focus-target]");if(!s){var u=a.menuContentEl[0].firstElementChild;s=u&&(u.querySelector(".md-button:not([disabled])")||u.firstElementChild)}return s&&s.focus(),function(){r.removeClass("md-clickable"),a.backdrop&&a.backdrop.off("click",i),a.menuContentEl.off("keydown",t),a.menuContentEl[0].removeEventListener("click",l,!0)}}return m(a),t.inherit(a.menuContentEl,a.target),a.cleanupResizing=p(),a.hideBackdrop=c(n,r,a),d().then(function(e){return a.alreadyOpen=!0,a.cleanupInteraction=g(),e})}function f(t,n,r,o){for(var a,i=e.getClosest(t.target,"MD-MENU-ITEM"),l=e.nodesToArray(n[0].children),s=l.indexOf(i),u=s+o;u>=0&&u<l.length;u+=o){var d=l[u].querySelector(".md-button");if(a=g(d))break}return a}function g(e){return e&&-1!=e.getAttribute("tabindex")?(e.focus(),a[0].activeElement==e):void 0}function h(e,t){t.preserveElement?n(e).style.display="none":n(e).parentNode===n(t.parent)&&n(t.parent).removeChild(n(e))}function v(t,n){function o(e){e.top=Math.max(Math.min(e.top,v.bottom-u.offsetHeight),v.top),e.left=Math.max(Math.min(e.left,v.right-u.offsetWidth),v.left)}function l(){for(var e=0;e<d.children.length;++e)if("none"!=i.getComputedStyle(d.children[e]).display)return d.children[e]}var s,u=t[0],d=t[0].firstElementChild,c=d.getBoundingClientRect(),m=a[0].body,p=m.getBoundingClientRect(),f=i.getComputedStyle(d),g=n.target[0].querySelector("[md-menu-origin]")||n.target[0],h=g.getBoundingClientRect(),v={left:p.left+r,top:Math.max(p.top,0)+r,bottom:Math.max(p.bottom,Math.max(p.top,0)+p.height)-r,right:p.right-r},M={top:0,left:0,right:0,bottom:0},y={top:0,left:0,right:0,bottom:0},C=n.mdMenuCtrl.positionMode();("target"==C.top||"target"==C.left||"target-right"==C.left)&&(s=l(),s&&(s=s.firstElementChild||s,s=s.querySelector("[md-menu-align-target]")||s,M=s.getBoundingClientRect(),y={top:parseFloat(u.style.top||0),left:parseFloat(u.style.left||0)}));var b={},E="top ";switch(C.top){case"target":b.top=y.top+h.top-M.top;break;case"cascade":b.top=h.top-parseFloat(f.paddingTop)-g.style.top;break;case"bottom":b.top=h.top+h.height;break;default:throw new Error('Invalid target mode "'+C.top+'" specified for md-menu on Y axis.')}switch(C.left){case"target":b.left=y.left+h.left-M.left,E+="left";break;case"target-right":b.left=h.right-c.width+(c.right-M.right),E+="right";break;case"cascade":var k=h.right+c.width<v.right;b.left=k?h.right-g.style.left:h.left-g.style.left-c.width,E+=k?"left":"right";break;case"left":b.left=h.left,E+="left";break;default:throw new Error('Invalid target mode "'+C.left+'" specified for md-menu on X axis.')}var O=n.mdMenuCtrl.offsets();b.top+=O.top,b.left+=O.left,o(b);var $=Math.round(100*Math.min(h.width/u.offsetWidth,1))/100,A=Math.round(100*Math.min(h.height/u.offsetHeight,1))/100;return{top:Math.round(b.top),left:Math.round(b.left),transform:n.alreadyOpen?void 0:e.supplant("scale({0},{1})",[$,A]),transformOrigin:E}}var M=e.dom.animator;return{parent:"body",onShow:p,onRemove:m,hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0}}function n(e){return e instanceof angular.element&&(e=e[0]),e}var r=8;return t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"],e("$mdMenu").setDefaults({methods:["target"],options:t})}goog.provide("ng.material.components.menu"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.menu",["material.core","material.components.backdrop"]),angular.module("material.components.menu").controller("mdMenuCtrl",MenuController),MenuController.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout"],angular.module("material.components.menu").directive("mdMenu",MenuDirective),MenuDirective.$inject=["$mdUtil"],angular.module("material.components.menu").provider("$mdMenu",MenuProvider),MenuProvider.$inject=["$$interimElementProvider"],ng.material.components.menu=angular.module("material.components.menu");