/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v0.10.0 */ !function(e,t,n){"use strict";function r(e){function n(e){e.addClass("md-menu");var t=e.children()[0];if(t.hasAttribute("ng-click")||(t=t.querySelector("[ng-click]")),t&&t.setAttribute("aria-haspopup","true"),2!=e.children().length)throw Error("Invalid HTML for md-menu. Expected two children elements.");return r}function r(e,n,r,o){var i=t.element('
'),a=n.children()[1];i.append(a),o.init(i),e.$on("$destroy",function(){o.isOpen&&(i.remove(),o.close())})}return{restrict:"E",require:"mdMenu",controller:"mdMenuCtrl",scope:!0,compile:n}}function o(e,t,n,r){var o,i,a=this;this.init=function(e){o=e,i=n[0].querySelector("[ng-click]")},this.open=function(){a.isOpen=!0,i.setAttribute("aria-expanded","true"),e.show({mdMenuCtrl:a,element:o,target:n[0]})},r.$mdOpenMenu=this.open,this.close=function(t){a.isOpen=!1,i.setAttribute("aria-expanded","false"),e.hide(),t||n.children()[0].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