text: /*!
   * Angular Material Design
   * https://github.com/angular/material
   * @license MIT
   * v1.0.0-rc5-master-3d65dea
   */
  function SelectDirective(e,t,n,r,o,l){function i(i,a){var d=angular.element("<md-select-value><span></span></md-select-value>");if(d.append('<span class="md-select-icon" aria-hidden="true"></span>'),d.addClass("md-select-value"),d[0].hasAttribute("id")||d.attr("id","select_value_label_"+t.nextUid()),i.find("md-content").length||i.append(angular.element("<md-content>").append(i.contents())),a.mdOnOpen&&(i.find("md-content").prepend(angular.element('<div> <md-progress-circular md-mode="{{progressMode}}" ng-hide="$$loadingAsyncDone"></md-progress-circular></div>')),i.find("md-option").attr("ng-show","$$loadingAsyncDone")),a.name){var c=angular.element('<select class="md-visually-hidden">');c.attr({name:"."+a.name,"ng-model":a.ngModel,"aria-hidden":"true",tabindex:"-1"});var s=i.find("md-option");angular.forEach(s,function(e){var t=angular.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?t.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&t.attr("value",e.getAttribute("value")),c.append(t)}),i.parent().append(c)}var u=angular.isDefined(a.multiple)?"multiple":"",p='<div class="md-select-menu-container"><md-select-menu {0}>{1}</md-select-menu></div>';return p=t.supplant(p,[u,i.html()]),i.empty().append(d),a.tabindex=a.tabindex||"0",function(i,a,d,c){function s(){var e=a.attr("placeholder");!e&&$&&$.label&&(e=$.label.text()),r.expect(a,"aria-label",e)}function u(){S&&(D=D||S.find("md-select-menu").controller("mdSelectMenu"),y.setLabelText(D.selectedLabels()))}function f(){$&&$.setHasValue(D.selectedLabels().length>0||(a[0].validity||{}).badInput)}function m(){S=angular.element(p);var e=S.find("md-select-menu");if(e.data("$ngModelController",M),e.data("$mdSelectController",y),x=i.$new(),n.inherit(S,a),a.attr("md-container-class")){var t=S[0].getAttribute("class")+" "+a.attr("md-container-class");S[0].setAttribute("class",t)}S=o(S)(x),D=S.find("md-select-menu").controller("mdSelectMenu")}function h(e){var t=[32,13,38,40];if(-1!=t.indexOf(e.keyCode))e.preventDefault(),g(e);else if(e.keyCode<=90&&e.keyCode>=31){e.preventDefault();var n=D.optNodeForKeyboardSearch(e);if(!n)return;var r=angular.element(n).controller("mdOption");D.isMultiple||D.deselect(Object.keys(D.selected)[0]),D.select(r.hashKey,r.value),D.refreshViewValue()}}function g(){function t(){M.$setUntouched(),a.off("blur",t)}x.isOpen=!0,b&&(a.on("blur",t),b=!1),e.show({scope:x,preserveScope:!0,skipCompile:!0,element:S,target:a[0],hasBackdrop:!0,loadingAsync:d.mdOnOpen?i.$eval(d.mdOnOpen)||!0:!1})["finally"](function(){x.isOpen=!1,M.$setTouched()})}var v,b=!0,$=c[0],y=c[1],M=c[2],C=c[3],E=a.find("md-select-value"),k=angular.isDefined(d.readonly);if($){var w=$.isErrorGetter||function(){return M.$invalid&&M.$touched};if($.input)throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");$.input=a,$.label||r.expect(a,"aria-label",a.attr("placeholder")),i.$watch(w,$.setInvalid)}var S,x,D;if(m(),n(a),d.name&&C){var A=a.parent()[0].querySelector('select[name=".'+d.name+'"]');t.nextTick(function(){var e=angular.element(A).controller("ngModel");e&&C.$removeControl(e)})}C&&t.nextTick(function(){C.$setPristine()});var O=M.$render;M.$render=function(){O(),u(),f()},d.$observe("placeholder",M.$render),y.setLabelText=function(e){y.setIsPlaceholder(!e);var t=d.placeholder||($&&$.label?$.label.text():"");e=e||t||"";var n=E.children().eq(0);n.html(e)},y.setIsPlaceholder=function(e){e?(E.addClass("md-select-placeholder"),$&&$.label&&$.label.addClass("md-placeholder")):(E.removeClass("md-select-placeholder"),$&&$.label&&$.label.removeClass("md-placeholder"))},k||a.on("focus",function(e){$&&$.element.hasClass("md-input-has-value")&&$.setFocused(!0)}).on("blur",function(e){$&&$.setFocused(!1),f()}),y.triggerClose=function(){l(d.mdOnClose)(i)},i.$$postDigest(function(){s(),u()}),i.$watch(D.selectedLabels,u);var T;d.$observe("ngMultiple",function(e){T&&T();var t=l(e);T=i.$watch(function(){return t(i)},function(e,t){(void 0!==e||void 0!==t)&&(e?a.attr("multiple","multiple"):a.removeAttr("multiple"),S&&(D.setMultiple(e),O=M.$render,M.$render=function(){O(),u(),f()},M.$render()))})}),d.$observe("disabled",function(e){angular.isString(e)&&(e=!0),(void 0===v||v!==e)&&(v=e,e?(a.attr({tabindex:-1,"aria-disabled":"true"}),a.off("click",g),a.off("keydown",h)):(a.attr({tabindex:d.tabindex,"aria-disabled":"false"}),a.on("click",g),a.on("keydown",h)))}),d.disabled||d.ngDisabled||(a.attr({tabindex:d.tabindex,"aria-disabled":"false"}),a.on("click",g),a.on("keydown",h));var R={role:"combobox","aria-expanded":"false"};a[0].hasAttribute("id")||(R.id="select_"+t.nextUid()),a.attr(R),i.$on("$destroy",function(){e.destroy()["finally"](function(){S&&S.remove(),$&&($.setFocused(!1),$.setHasValue(!1),$.input=null)})})}}return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:i,controller:function(){}}}function SelectMenuDirective(e,t,n){function r(e,r,o,l){function i(){r.attr({id:"select_menu_"+t.nextUid(),role:"listbox","aria-multiselectable":c.isMultiple?"true":"false"})}function a(e){(13==e.keyCode||32==e.keyCode)&&d(e)}function d(n){var r=t.getClosest(n.target,"md-option"),o=r&&angular.element(r).data("$mdOptionController");if(r&&o){if(r.hasAttribute("disabled"))return n.stopImmediatePropagation(),!1;var l=c.hashGetter(o.value),i=angular.isDefined(c.selected[l]);e.$apply(function(){c.isMultiple?i?c.deselect(l):c.select(l,o.value):i||(c.deselect(Object.keys(c.selected)[0]),c.select(l,o.value)),c.refreshViewValue()})}}var c=l[0],s=l[1];n(r),r.on("click",d),r.on("keypress",a),s&&c.init(s),i()}function o(n,r,o){function l(){var e=a.ngModel.$modelValue||a.ngModel.$viewValue||[];if(angular.isArray(e)){var t=Object.keys(a.selected),n=e.map(a.hashGetter),r=t.filter(function(e){return-1===n.indexOf(e)});r.forEach(a.deselect),n.forEach(function(t,n){a.select(t,e[n])})}}function i(){var e=a.ngModel.$viewValue||a.ngModel.$modelValue;Object.keys(a.selected).forEach(a.deselect),a.select(a.hashGetter(e),e)}var a=this;a.isMultiple=angular.isDefined(r.multiple),a.selected={},a.options={},n.$watchCollection(function(){return a.options},function(){a.ngModel.$render()});var d,c;a.setMultiple=function(e){function t(e,t){return angular.isArray(e||t||[])}var o=a.ngModel;c=c||o.$isEmpty,a.isMultiple=e,d&&d(),a.isMultiple?(o.$validators["md-multiple"]=t,o.$render=l,n.$watchCollection(r.ngModel,function(e){t(e)&&l(e),a.ngModel.$setPristine()}),o.$isEmpty=function(e){return!e||0===e.length}):(delete o.$validators["md-multiple"],o.$render=i)};var s,u,p,f="",m=300;a.optNodeForKeyboardSearch=function(e){s&&clearTimeout(s),s=setTimeout(function(){s=void 0,f="",p=void 0,u=void 0},m),f+=String.fromCharCode(e.keyCode);var t=new RegExp("^"+f,"i");u||(u=o.find("md-option"),p=new Array(u.length),angular.forEach(u,function(e,t){p[t]=e.textContent.trim()}));for(var n=0;n<p.length;++n)if(t.test(p[n]))return u[n]},a.init=function(t){if(a.ngModel=t,t.$options&&t.$options.trackBy){var r={},o=e(t.$options.trackBy);a.hashGetter=function(e,t){return r.$value=e,o(t||n,r)}}else a.hashGetter=function(e){return angular.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++selectNextId)):e};a.setMultiple(a.isMultiple)},a.selectedLabels=function(){var e=t.nodesToArray(o[0].querySelectorAll("md-option[selected]"));return e.length?e.map(function(e){return e.innerHTML}).join(", "):""},a.select=function(e,t){var n=a.options[e];n&&n.setSelected(!0),a.selected[e]=t},a.deselect=function(e){var t=a.options[e];t&&t.setSelected(!1),delete a.selected[e]},a.addOption=function(e,t){if(angular.isDefined(a.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+t.value+'" found.');a.options[e]=t,angular.isDefined(a.selected[e])&&(a.select(e,t.value),a.refreshViewValue())},a.removeOption=function(e){delete a.options[e]},a.refreshViewValue=function(){var e,t=[];for(var n in a.selected)(e=a.options[n])?t.push(e.value):t.push(a.selected[n]);var r=a.ngModel.$options&&a.ngModel.$options.trackBy,o=a.isMultiple?t:t[0],l=a.ngModel.$modelValue;(r?angular.equals(l,o):l==o)||(a.ngModel.$setViewValue(o),a.ngModel.$render())}}return o.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu","?ngModel"],controller:o,link:{pre:r}}}function OptionDirective(e,t){function n(e,t){return e.append(angular.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",t.tabindex||"0"),r}function r(n,r,o,l){function i(e,t){var r=c.hashGetter(t,n),o=c.hashGetter(e,n);d.hashKey=o,d.value=e,c.removeOption(r,d),c.addOption(o,d)}function a(){var e={role:"option","aria-selected":"false"};r[0].hasAttribute("id")||(e.id="select_option_"+t.nextUid()),r.attr(e)}var d=l[0],c=l[1];angular.isDefined(o.ngValue)?n.$watch(o.ngValue,i):angular.isDefined(o.value)?i(o.value):n.$watch(function(){return r.text()},i),o.$observe("disabled",function(e){e?r.attr("tabindex","-1"):r.attr("tabindex","0")}),n.$$postDigest(function(){o.$observe("selected",function(e){angular.isDefined(e)&&("string"==typeof e&&(e=!0),e?(c.isMultiple||c.deselect(Object.keys(c.selected)[0]),c.select(d.hashKey,d.value)):c.deselect(d.hashKey),c.refreshViewValue())})}),e.attach(n,r),a(),n.$on("$destroy",function(){c.removeOption(d.hashKey,d)})}function o(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}return o.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:o,compile:n}}function OptgroupDirective(){function e(e,t){var n=e.find("label");n.length||(n=angular.element("<label>"),e.prepend(n)),t.label&&n.text(t.label)}return{restrict:"E",compile:e}}function SelectProvider(e){function t(e,t,l,i,a,d,c,s){function u(e,t,n){function r(){return c(t,{addClass:"md-leave"}).start()}function o(){f(n.target,!1),t.attr("opacity",0),t.removeClass("md-active"),h(t,n),m(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}return n=n||{},n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():r().then(o)}function p(n,r,o){function u(e,t,n){return n.parent.append(t),a(function(e,n){try{c(t,{removeClass:"md-leave",duration:0}).start().then(p).then(e)}catch(r){n(r)}})}function p(){return a(function(e){if(o.isRemoved)return a.reject(!1);var t=g(n,r,o);t.container.element.css(b.toCss(t.container.styles)),t.dropDown.element.css(b.toCss(t.dropDown.styles)),d(function(){r.addClass("md-active"),t.dropDown.element.css(b.toCss({transform:""})),h(o.focusedNode),e()})})}function m(e,t,n){return n.disableParentScroll&&!l.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=l.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1,n.hasBackdrop&&(n.backdrop=l.createBackdrop(e,"md-select-backdrop md-click-catcher"),s.enter(n.backdrop,n.parent,null,{duration:0})),function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll(),delete n.restoreScroll}}function h(e){e&&!e.hasAttribute("disabled")&&e.focus()}function $(e,t){var n=r.find("md-select-menu");if(!t.target)throw new Error(l.supplant(v,[t.target]));angular.extend(t,{isRemoved:!1,target:angular.element(t.target),parent:angular.element(t.parent),selectEl:n,contentEl:r.find("md-content"),optionNodes:n[0].getElementsByTagName("md-option")})}function y(){var e=function(e,t,n){return function(){if(!n.isRemoved){var r=g(e,t,n),o=r.container,l=r.dropDown;o.element.css(b.toCss(o.styles)),l.element.css(b.toCss(l.styles))}}}(n,r,o),t=angular.element(i);return t.on("resize",e),t.on("orientationchange",e),function(){t.off("resize",e),t.off("orientationchange",e)}}function M(){o.loadingAsync&&!o.isRemoved&&(n.$$loadingAsyncDone=!1,n.progressMode="indeterminate",a.when(o.loadingAsync).then(function(){n.$$loadingAsyncDone=!0,n.progressMode="",delete o.loadingAsync}).then(function(){d(p)}))}function C(){function n(t){t.preventDefault(),t.stopPropagation(),o.restoreFocus=!1,l.nextTick(e.hide,!0)}function i(n){var r=t.KEY_CODE;switch(n.keyCode){case r.UP_ARROW:return c();case r.DOWN_ARROW:return d();case r.SPACE:case r.ENTER:var i=l.getClosest(n.target,"md-option");i&&(u.triggerHandler({type:"click",target:i}),n.preventDefault()),s(n);break;case r.TAB:case r.ESCAPE:n.stopPropagation(),n.preventDefault(),o.restoreFocus=!0,l.nextTick(e.hide,!0);break;default:if(n.keyCode>=31&&n.keyCode<=90){var a=u.controller("mdSelectMenu").optNodeForKeyboardSearch(n);o.focusedNode=a||o.focusedNode,a&&a.focus()}}}function a(e){var t,n=l.nodesToArray(o.optionNodes),r=n.indexOf(o.focusedNode);do-1===r?r=0:"next"===e&&r<n.length-1?r++:"prev"===e&&r>0&&r--,t=n[r],t.hasAttribute("disabled")&&(t=void 0);while(!t&&r<n.length-1&&r>0);t&&t.focus(),o.focusedNode=t}function d(){a("next")}function c(){a("prev")}function s(t){function n(){var e=!1;if(t&&t.currentTarget.children.length>0){var n=t.currentTarget.children[0],r=n.scrollHeight>n.clientHeight;if(r&&n.children.length>0){var o=t.pageX-t.currentTarget.getBoundingClientRect().left;o>n.querySelector("md-option").offsetWidth&&(e=!0)}}return e}if(!(t&&"mouseup"==t.type&&t.currentTarget!=u[0]||n())){var r=l.getClosest(t.target,"md-option");r&&r.hasAttribute&&!r.hasAttribute("disabled")&&(p.isMultiple||(o.restoreFocus=!0,l.nextTick(function(){e.hide(p.ngModel.$viewValue)},!0)))}}if(!o.isRemoved){var u=o.selectEl,p=u.controller("mdSelectMenu")||{};return r.addClass("md-clickable"),o.backdrop&&o.backdrop.on("click",n),u.on("keydown",i),u.on("mouseup",s),function(){o.backdrop&&o.backdrop.off("click",n),u.off("keydown",i),u.off("mouseup",s),r.removeClass("md-clickable"),o.isRemoved=!0}}}return M(),$(n,o),f(o.target),o.hideBackdrop=m(n,r,o),u(n,r,o).then(function(e){return o.alreadyOpen=!0,o.cleanupInteraction=C(),o.cleanupResizing=y(),e},o.hideBackdrop)}function f(e,t){t=angular.isUndefined(t)?"true":"false",e&&e.attr("aria-expanded",t)}function m(e){var t=e.selectEl.controller("mdSelect");if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n.selectedLabels()),t.triggerClose()}}function h(e,t){e[0].parentNode===t.parent[0]&&t.parent[0].removeChild(e[0])}function g(e,t,a){var d,c,s=t[0],u=a.target[0].firstElementChild,p=a.parent[0],f=a.selectEl[0],m=a.contentEl[0],h=p.getBoundingClientRect(),g=u.getBoundingClientRect(),v=!1,b={left:h.left+SELECT_EDGE_MARGIN,top:SELECT_EDGE_MARGIN,bottom:h.height-SELECT_EDGE_MARGIN,right:h.width-SELECT_EDGE_MARGIN-(l.floatingScrollbars()?16:0)},$={top:g.top-b.top,left:g.left-b.left,right:b.right-(g.left+g.width),bottom:b.bottom-(g.top+g.height)},y=h.width-2*SELECT_EDGE_MARGIN,M=m.scrollHeight>m.offsetHeight,C=f.querySelector("md-option[selected]"),d=f.getElementsByTagName("md-option"),E=f.getElementsByTagName("md-optgroup"),k=n(a.loadingAsync);c=k?m.firstElementChild||m:C?C:E.length?E[0]:d.length?d[0]:m.firstElementChild||m,m.offsetWidth>y?m.style["max-width"]=y+"px":m.style.maxWidth=null,v&&(m.style["min-width"]=g.width+"px"),M&&f.classList.add("md-overflow");var w=c;"MD-OPTGROUP"===(w.tagName||"").toUpperCase()&&(w=d[0]||m.firstElementChild||m,c=w),a.focusedNode=w;var S=f.getBoundingClientRect(),x=o(c);if(c){var D=i.getComputedStyle(c);x.paddingLeft=parseInt(D.paddingLeft,10)||0,x.paddingRight=parseInt(D.paddingRight,10)||0}if(M){var A=m.offsetHeight/2;m.scrollTop=x.top+x.height/2-A,$.top<A?m.scrollTop=Math.min(x.top,m.scrollTop+A-$.top):$.bottom<A&&(m.scrollTop=Math.max(x.top+x.height-S.height,m.scrollTop-A+$.bottom))}var O,T,R,N;v?(O=g.left,T=g.top+g.height,R="50% 0",T+S.height>b.bottom&&(T=g.top-S.height,R="50% 100%")):(O=g.left+x.left-x.paddingLeft+2,T=Math.floor(g.top+g.height/2-x.height/2-x.top+m.scrollTop)+2,R=x.left+g.width/2+"px "+(x.top+x.height/2-m.scrollTop)+"px 0px",N=Math.min(g.width+x.paddingLeft+x.paddingRight,y));var _=s.getBoundingClientRect(),L=Math.round(100*Math.min(g.width/S.width,1))/100,G=Math.round(100*Math.min(g.height/S.height,1))/100;return{container:{element:angular.element(s),styles:{left:Math.floor(r(b.left,O,b.right-_.width)),top:Math.floor(r(b.top,T,b.bottom-_.height)),"min-width":N}},dropDown:{element:angular.element(f),styles:{transformOrigin:R,transform:a.alreadyOpen?"":l.supplant("scale({0},{1})",[L,G])}}}}var v="$mdSelect.show() expected a target element in options.target but got '{0}'!",b=l.dom.animator;return{parent:"body",themable:!0,onShow:p,onRemove:u,hasBackdrop:!0,disableParentScroll:!0}}function n(e){return e&&angular.isFunction(e.then)}function r(e,t,n){return Math.max(e,Math.min(t,n))}function o(e){return e?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}return t.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate"],e("$mdSelect").setDefaults({methods:["target"],options:t})}goog.provide("ng.material.components.select"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core");var SELECT_EDGE_MARGIN=8,selectNextId=0;angular.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",SelectDirective).directive("mdSelectMenu",SelectMenuDirective).directive("mdOption",OptionDirective).directive("mdOptgroup",OptgroupDirective).provider("$mdSelect",SelectProvider),SelectDirective.$inject=["$mdSelect","$mdUtil","$mdTheming","$mdAria","$compile","$parse"],SelectMenuDirective.$inject=["$parse","$mdUtil","$mdTheming"],OptionDirective.$inject=["$mdButtonInkRipple","$mdUtil"],SelectProvider.$inject=["$$interimElementProvider"],ng.material.components.select=angular.module("material.components.select");