/*! * AngularJS Material Design * https://github.com/angular/material * @license MIT * v1.1.21 */ !function(R,fe,ge){"use strict";function e(e,t){if(t.has("$swipe")){e.warn("You are using the ngTouch module. \nAngularJS Material already has mobile click, tap, and swipe support... \nngTouch is not supported with AngularJS Material!")}}function t(e,t){e.decorator("$$rAF",["$delegate",n]),e.decorator("$q",["$delegate",o]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function n(r){return r.throttle=function(e){var t,n,o,i;return function(){t=arguments,i=this,o=e,n||(n=!0,r(function(){o.apply(i,Array.prototype.slice.call(t)),n=!1}))}},r}function o(e){return e.resolve||(e.resolve=e.when),e}function i(r){return{restrict:"A",link:{pre:function(e,t,n){var o=n.mdAutoFocus||n.mdAutofocus||n.mdSidenavFocus;i(r(o)(e)),o&&e.$watch(o,i);function i(e){fe.isUndefined(e)&&(e=!0),t.toggleClass("md-autofocus",!!e)}}}}}function r(e,d){function s(){return!0}e&&!fe.isArray(e)&&(e=Array.prototype.slice.call(e)),d=!!d;var l=e||[];return{items:function(){return[].concat(l)},count:function(){return l.length},inRange:c,contains:t,indexOf:m,itemAt:function(e){return c(e)?l[e]:null},findBy:function(t,n){return l.filter(function(e){return e[t]===n})},add:function(e,t){if(!e)return-1;fe.isNumber(t)||(t=l.length);return l.splice(t,0,e),m(e)},remove:function(e){t(e)&&l.splice(m(e),1)},first:u,last:p,next:fe.bind(null,n,!1),previous:fe.bind(null,n,!0),hasPrevious:function(e){return!!e&&c(m(e)-1)},hasNext:function(e){return!!e&&c(m(e)+1)}};function c(e){return l.length&&-1").html(t.trim()).contents();return i._compileElement(e,n,o)})},d.prototype._compileElement=function(o,i,r){var a=this,d=this.$compile(i),s={element:i,cleanup:i.remove.bind(i),locals:o,link:function(e){if(o.$scope=e,r.controller){var t=fe.extend({},o,{$element:i}),n=a._createController(r,t,o);i.data("$ngControllerController",n),i.children().data("$ngControllerController",n),s.controller=n}return d(e)}};return s},d.prototype._createController=function(e,t,n){var o;if(!a||("function"==typeof r.preAssignBindingsEnabled?r.preAssignBindingsEnabled():1===fe.version.major&&fe.version.minor<6)){var i=this.$controller(e.controller,t,!0);e.bindToController&&fe.extend(i.instance,n),o=i()}else o=this.$controller(e.controller,t),e.bindToController&&fe.extend(o,n);return e.controllerAs&&(t.$scope[e.controllerAs]=o),fe.isFunction(o.$onInit)&&o.$onInit(),o},d.prototype._fetchContentElement=function(e){var t=e.contentElement,n=null;return n=fe.isString(t)?o(t=document.querySelector(t)):(t=t[0]||t,document.contains(t)?o(t):function(){t.parentNode&&t.parentNode.removeChild(t)}),{element:fe.element(t),restore:n};function o(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}}}function I(e,t,n){this.$timeout=e,this.$mdUtil=t,this.$rootScope=n,this.pointerEvent="MSPointerEvent"in R?"MSPointerDown":"PointerEvent"in R?"pointerdown":null,this.bodyElement=fe.element(document.body),this.isBuffering=!1,this.bufferTimeout=null,this.lastInteractionType=null,this.lastInteractionTime=null,this.inputHandler=this.onInputEvent.bind(this),this.bufferedInputHandler=this.onBufferInputEvent.bind(this),this.inputEventMap={keydown:"keyboard",mousedown:"mouse",mouseenter:"mouse",touchstart:"touch",pointerdown:"pointer",MSPointerDown:"pointer"},this.iePointerMap={2:"touch",3:"touch",4:"mouse"},this.initializeEvents(),this.$rootScope.$on("$destroy",this.deregister.bind(this))}function H(e){return e.replace(h,"").replace(f,function(e,t,n,o){return o?n.toUpperCase():n})}function O(){var e=!!document.querySelector("[md-layouts-disabled]");T.enabled=!e}function P(){return T.enabled=!1,{restrict:"A",priority:"900"}}function L(o){return["$mdUtil","$interpolate","$log",function(e,t,n){return l=e,c=t,m=n,{restrict:"A",compile:function(e,t){var n;return T.enabled&&(U(o,z(o,t,""),j(e,o,t)),i(null,e),n=i),n||fe.noop}}}];function i(e,t){t.addClass(o)}}function F(t){var n=t.split("-");return["$log",function(e){return e.warn(t+"has been deprecated. Please use a `"+n[0]+"-gt-` variant."),fe.noop}]}function B(e,t,n,o){var i,r=n[0].nodeName.toLowerCase();switch(e.replace(v,"")){case"flex":"md-button"!=r&&"fieldset"!=r||(i="<"+r+" "+e+">","https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers","Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",o.warn(l.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",[i,"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"])))}}function U(e,t,n){if(!q(t)){switch(e.replace(v,"")){case"layout":W(t,y)||(t=y[0]);break;case"flex":W(t,$)||isNaN(t)&&(t="");break;case"flex-offset":case"flex-order":t&&!isNaN(+t)||(t="0");break;case"layout-align":var o=function(e){var t,n={main:"start",cross:"stretch"};0!==(e=e||"").indexOf("-")&&0!==e.indexOf(" ")||(e="none"+e);(t=e.toLowerCase().trim().replace(E,"-").split("-")).length&&"space"===t[0]&&(t=[t[0]+"-"+t[1],t[2]]);0'+o+"":""),r=function(){var e=n.find("md-item-template").detach(),t=e.length?e.html():n.html();e.length||n.empty();return""+t+""}(),a=n.html(),d=e.tabindex;return i&&n.attr("md-has-not-found",!0),n.attr("tabindex","-1")," "+(e.mdFloatingLabel?'
'+a+"
":' ')+' '+function(e,t){if(e=e?" "+e:"",s(t))return' ":"")+"
";function s(e){return m(e)!==c}}}}function J(e,c){return{restrict:"AE",compile:function(e,t,l){return function(n,t,e){var o,i,r=n.$mdAutocompleteCtrl,a=r.parent.$new(),d=r.itemName;function s(e,t){a[t]=n[e],n.$watch(e,function(e){c.nextTick(function(){a[t]=e})})}s("$index","$index"),s("item",d),i=o=!1,n.$watch(function(){i||o||(o=!0,n.$$postDigest(function(){i||a.$digest(),o=i=!1}))}),a.$watch(function(){i=!0}),l(a,function(e){t.after(e)})}},terminal:!0,transclude:"element"}}function ee(e,t,n){this.$scope=e,this.$element=t,this.$attrs=n,this.regex=null}function te(n,o){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(e,t){var i=o(t.mdHighlightText),r=n(e.html());return function(e,t,n,o){o.init(i,r)}}}}function ne(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function oe(e){t.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"];var p=.5,h=80;return e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:t});function t(i,a,d,r,s,l,c,m){var u;return{themable:!0,onShow:function(e,t,n,o){if((t=d.extractElementByName(t,"md-bottom-sheet")).attr("tabindex","-1"),t.hasClass("ng-cloak")){m.warn("$mdBottomSheet: using `` will affect the bottom-sheet opening animations.",t[0])}n.isLockedOpen?(n.clickOutsideToClose=!1,n.escapeToClose=!1):n.cleanupGestures=function(o,e){var t=c.register(e,"drag",{horizontal:!1});return e.on("$md.dragstart",n).on("$md.drag",i).on("$md.dragend",r),function(){t(),e.off("$md.dragstart",n),e.off("$md.drag",i),e.off("$md.dragend",r)};function n(){o.css(a.CSS.TRANSITION_DURATION,"0ms")}function i(e){var t=e.pointer.distanceY;t<5&&(t=Math.max(-h,t/2)),o.css(a.CSS.TRANSFORM,"translate3d(0,"+(h+t)+"px,0)")}function r(e){if(0p)){var t=o.prop("offsetHeight")-e.pointer.distanceY,n=Math.min(t/e.pointer.velocityY*.75,500);o.css(a.CSS.TRANSITION_DURATION,n+"ms"),d.nextTick(s.cancel,!0)}else o.css(a.CSS.TRANSITION_DURATION,""),o.css(a.CSS.TRANSFORM,"")}}(t,n.parent);n.disableBackdrop||((u=d.createBackdrop(e,"md-bottom-sheet-backdrop md-opaque"))[0].tabIndex=-1,n.clickOutsideToClose&&u.on("click",function(){d.nextTick(s.cancel,!0)}),r.inherit(u,n.parent),i.enter(u,n.parent,null));r.inherit(t,n.parent),n.disableParentScroll&&(n.restoreScroll=d.disableScrollAround(t,n.parent));return i.enter(t,n.parent,u).then(function(){var e=d.findFocusTarget(t)||fe.element(t[0].querySelector("button")||t[0].querySelector("a")||t[0].querySelector(d.prefixer("ng-click",!0)))||u;n.escapeToClose&&(n.rootElementKeyupCallback=function(e){e.keyCode===a.KEY_CODE.ESCAPE&&d.nextTick(s.cancel,!0)},l.on("keyup",n.rootElementKeyupCallback),e&&e.focus())})},onRemove:function(e,t,n){n.disableBackdrop||i.leave(u);return i.leave(t).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),n.cleanupGestures&&n.cleanupGestures()})},disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0,isLockedOpen:!1}}}function ie(n){return{restrict:"E",link:function(e,t){n(t)}}}function re(o,i,r,a){return{restrict:"EA",replace:!0,transclude:!0,template:function(e,t){{return d(t)?'':''}},link:function(e,t,n){i(t),o.attach(e,t),r.expectWithoutText(t,"aria-label"),d(n)&&fe.isDefined(n.ngDisabled)&&!t.hasClass("_md-nav-button")&&e.$watch(n.ngDisabled,function(e){t.attr("tabindex",e?-1:0)});t.on("click",function(e){!0===n.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),t.hasClass("md-no-focus")||(t.on("focus",function(){a.isUserInvoked()&&"keyboard"!==a.getLastInteractionType()||t.addClass("md-focused")}),t.on("blur",function(){t.removeClass("md-focused")}))}};function d(e){return fe.isDefined(e.href)||fe.isDefined(e.ngHref)||fe.isDefined(e.ngLink)||fe.isDefined(e.uiSref)}}function ae(o){return{restrict:"E",link:function(e,t,n){t.addClass("_md"),o(t)}}}function de(m,u,p,h,f,g){return m=m[0],{restrict:"E",transclude:!0,require:["^?mdInputContainer","?ngModel","?^form"],priority:p.BEFORE_NG_ARIA,template:'
',compile:function(e,t){return t.$set("tabindex",t.tabindex||"0"),t.$set("type","checkbox"),t.$set("role",t.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:function(o,i,r,e){var t,n=e[0],a=e[1]||f.fakeNgModel(),d=e[2];if(n){var s=n.isErrorGetter||function(){return a.$invalid&&(a.$touched||d&&d.$submitted)};n.input=i,o.$watch(s,n.setInvalid)}h(i),i.children().on("focus",function(){i.focus()}),f.parseAttributeBoolean(r.mdIndeterminate)&&(c(),o.$watch(r.mdIndeterminate,c));r.ngChecked&&o.$watch(o.$eval.bind(o,r.ngChecked),function(e){a.$setViewValue(e),a.$render()});function l(t){i[0].hasAttribute("disabled")||o.skipToggle||o.$apply(function(){var e=r.ngChecked&&r.ngClick?r.checked:!a.$viewValue;a.$setViewValue(e,t&&t.type),a.$render()})}function c(e){(t=!1!==e)&&i.attr("aria-checked","mixed"),i.toggleClass("md-indeterminate",t)}(function(e,t,n){r[e]&&o.$watch(r[e],function(e){n[e]&&i.attr(t,n[e])})})("ngDisabled","tabindex",{true:"-1",false:r.tabindex}),u.expectWithText(i,"aria-label"),m.link.pre(o,{on:fe.noop,0:{}},r,[a]),i.on("click",l).on("keypress",function(e){var t,n,o=e.which||e.keyCode;switch(e.preventDefault(),o){case p.KEY_CODE.SPACE:i.addClass("md-focused"),l(e);break;case p.KEY_CODE.ENTER:(n=f.getClosest(e.target,"form"))&&(t=n.querySelector('button[type="submit"]:enabled, input[type="submit"]:enabled'))&&t.click()}}).on("focus",function(){"keyboard"===g.getLastInteractionType()&&i.addClass("md-focused")}).on("blur",function(){i.removeClass("md-focused")}),a.$render=function(){i.toggleClass("md-checked",!!a.$viewValue&&!t)}}}}}}function se(e,t,n,o,i){this.$scope=e,this.$element=t,this.$mdConstant=n,this.$timeout=o,this.$mdUtil=i,this.isEditing=!1,this.parentController=ge,this.enableChipEdit=!1}function le(d,e,t,s){return{restrict:"E",require:["^?mdChips","mdChip"],link:function(e,t,n,o){var i=o.shift(),r=o.shift(),a=fe.element(t[0].querySelector(".md-chip-content"));d(t),i&&(r.init(i),a.on("blur",function(){i.resetSelectedChip(),i.$scope.$applyAsync()}));s(function(){i&&i.shouldFocusLastChip&&i.focusLastChipThenInput()})},controller:"MdChipCtrl"}}function ce(i){return{restrict:"A",require:"^mdChips",scope:!1,link:function(t,e,n,o){e.on("click",function(e){t.$apply(function(){o.removeChip(t.$$replacedScope.$index)})}),i(function(){e.attr({tabindex:"-1","aria-hidden":"true"}),e.find("button").attr("tabindex","-1")})}}}function me(a){return{restrict:"EA",terminal:!0,link:function(e,t,n){var o=e.$parent.$mdChipsCtrl,i=o.parent.$new(!1,o.parent);i.$$replacedScope=e,i.$chip=e.$chip,i.$index=e.$index;var r=(i.$mdChipsCtrl=o).$scope.$eval(n.mdChipTransclude);t.html(r),a(t.contents())(i)},scope:!1}}function ue(e,t,n){this.$element=t,this.$attrs=e,this.$timeout=n,this.selectedItem=null,this.searchText="",this.deRegister=[],this.init()}function pe(n){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],link:function(e,t){t.addClass("_md"),n(t),e.$broadcast("$mdContentLoaded",t),function(t){fe.element(t).on("$md.pressdown",function(e){"t"===e.pointer.type&&(e.$materialScrollFixed||(e.$materialScrollFixed=!0,0===t.scrollTop?t.scrollTop=1:t.scrollHeight===t.scrollTop+t.offsetHeight&&(t.scrollTop-=1)))})}(t[0])}}}function he(e,t){var d=e('')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:be,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1],a=o[2];a.calendarCtrl=i,a.monthCtrl=r,a.arrowIcon=d.cloneNode(!0),e.$watch(function(){return a.offset},function(e){fe.isNumber(e)&&a.generateContent()})}}}function be(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}function ve(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}function Ee(e,t,r){return{restrict:"E",link:function(o,i){i.addClass("_md"),t(i),e(function(){var e,t=i[0].querySelector("md-dialog-content");function n(){i.toggleClass("md-content-overflow",t.scrollHeight>t.clientHeight)}t&&(e=t.getElementsByTagName("img"),n(),fe.element(e).on("load",n)),o.$on("$destroy",function(){r.destroy(i)})})}}}function $e(e){var E,$;return n.$inject=["$mdDialog","$mdConstant"],o.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming","$interpolate","$mdInteraction"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","multiple"],options:o}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css","required"],options:t});function t(){return{template:['',' ','

{{ dialog.title }}

','
','
',"

{{::dialog.mdTextContent}}

","
",' ',' '," ","
"," ",' '," {{ dialog.cancel }}"," ",' '," {{ dialog.ok }}"," "," ","
"].join("").replace(/\s\s+/g,""),controller:n,controllerAs:"dialog",bindToController:!0}}function n(o,i){this.$onInit=function(){var n="prompt"==this.$type;n&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){o.hide(!n||this.result)},this.abort=function(){o.cancel()},this.keypress=function(e){var t=n&&this.required&&!fe.isDefined(this.result);e.keyCode!==i.KEY_CODE.ENTER||t||o.hide(this.result)}}}function o(u,d,p,h,r,s,f,a,l,c,t,m,g){return{hasBackdrop:!0,isolateScope:!0,onCompiling:function(e){e.defaultTheme=t.defaultTheme(),function(t){var e;t.targetEvent&&t.targetEvent.target&&(e=fe.element(t.targetEvent.target));var n=e&&e.controller("mdTheme");if(t.hasTheme=!!n,!t.hasTheme)return;t.themeWatch=n.$shouldWatch;var o=t.theme||n.$mdTheme;o&&(t.scope.theme=o);var i=n.registerChanges(function(e){t.scope.theme=e,t.themeWatch||i()})}(e)},onShow:function(e,t,n,o){fe.element(s[0].body).addClass("md-dialog-is-showing");var i=t.find("md-dialog");if(i.hasClass("ng-cloak")){l.warn("$mdDialog: using `` will affect the dialog opening animations.",t[0])}return function(e){e.origin=fe.extend({element:null,bounds:null,focus:fe.noop},e.origin||{}),e.parent=n(e.parent,a),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin),e.originInteraction=g.getLastInteractionType());function t(e,t){var n=fe.element(e||{});if(n&&n.length){var o=fe.isFunction(n[0].getBoundingClientRect);return fe.extend(t||{},{element:o?n:ge,bounds:o?n[0].getBoundingClientRect():fe.extend({},{top:0,left:0,height:0,width:0},n[0]),focus:fe.bind(n,n.focus)})}}function n(e,t){return fe.isString(e)&&(e=s[0].querySelector(e)),fe.element(e||t)}}(n),function(e,t){var n="alert"===t.$type?"alertdialog":"dialog",o=e.find("md-dialog-content"),i=e.attr("id"),r="dialogContent_"+(i||p.nextUid());e.attr({role:n,tabIndex:"-1"}),0===o.length&&(o=e,i&&(r=i));o.attr("id",r),e.attr("aria-describedby",r),t.ariaLabel?d.expect(e,"aria-label",t.ariaLabel):d.expectAsync(e,"aria-label",function(){if(t.title)return t.title;var e=o.text().split(/\s+/);return 3."),function(){if(n.focusOnOpen){(p.findFocusTarget(t)||t[0].querySelector(".dialog-close, md-dialog-actions button:last-child")||i).focus()}}()})},onShowing:function(e,t,n,o){if(o){var i=o.htmlContent||n.htmlContent||"",r=o.textContent||n.textContent||o.content||n.content||"";if(i&&!c.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(i&&r)throw Error("md-dialog cannot have both `htmlContent` and `textContent`");o.mdHtmlContent=i,o.mdTextContent=r}},onRemove:function(e,t,n){n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),E&&E.parentNode&&E.parentNode.removeChild(E);$&&$.parentNode&&$.parentNode.removeChild($);return n.$destroy?o():function(e,t){return t.reverseAnimate().then(function(){t.contentElement&&t.clearAnimate()})}(0,n).then(o);function o(){fe.element(s[0].body).removeClass("md-dialog-is-showing"),n.contentElement&&n.reverseContainerStretch(),n.cleanupElement(),n.$destroy||"keyboard"!==n.originInteraction||n.origin.focus()}},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){var n,o=m.startSymbol(),i=m.endSymbol(),r=o+(t.themeWatch?"":"::")+"theme"+i;return'
"+(n=e,t.autoWrap&&!/<\/md-dialog>/g.test(n)?""+(n||"")+"":n||"")+"
"}};function b(e,t){var n="fixed"==f.getComputedStyle(s[0].body).position,o=t.backdrop?f.getComputedStyle(t.backdrop[0]):null,i=o?Math.min(s[0].body.clientHeight,Math.ceil(Math.abs(parseInt(o.height,10)))):0,r={top:e.css("top"),height:e.css("height")},a=Math.abs(t.parent[0].getBoundingClientRect().top);return e.css({top:(n?a:0)+"px",height:i?i+"px":"100%"}),function(){e.css(r)}}function v(e,t){if(-1!==t.indexOf(e.nodeName))return!0}}}function ye(e){return{restrict:"E",link:e}}function Ce(o){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(e,t){var n=e.children();o.prefixer().hasAttribute(n,"ng-repeat")?n.addClass("md-fab-action-item"):n.wrap('
')}}}function Me(t,r,a,d,n,o){var i,s=this,e=0;function l(e){"click"==e.type&&function(e){!function(e){return d.getClosest(e,"md-fab-trigger")}(e.target)||s.toggle();!function(e){return d.getClosest(e,"md-fab-actions")}(e.target)||s.close()}(e),"focusout"!=e.type||i||(i=o(function(){s.close()},100,!1)),"focusin"==e.type&&i&&(o.cancel(i),i=null)}function c(){s.currentActionIndex=-1}function m(){0i)throw"md-grid-list: Tile at position "+t+" has a colspan ("+e.col+") that exceeds the column count ("+i+")";var n=0,o=0;for(;o-n",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:function(e,t,n,o){t.attr("role","listitem");var i=r.watchResponsiveAttributes(["md-colspan","md-rowspan"],n,fe.bind(o,o.invalidateLayout));o.invalidateTiles(),e.$on("$destroy",function(){t[0].$$mdDestroyed=!0,i(),o.invalidateLayout()}),fe.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(e,t){e!==t&&o.invalidateTiles()})}}}function xe(){return{template:"
",transclude:!0}}function Ne(t){return{restrict:"E",compile:function(e){return e[0].setAttribute("role","list"),t}}}function Se(u,p,h,f){var g=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(r,o){var e,i,t,n=r[0].querySelectorAll(".md-secondary"),a=r;if(r[0].setAttribute("role","listitem"),o.ngClick||o.ngDblclick||o.ngHref||o.href||o.uiSref||o.ngAttrUiSref)l("button");else if(!r.hasClass("md-no-proxy")){for(var d,s=0;d=g[s];++s)if(i=r[0].querySelector(d)){e=!0;break}e?l("div"):r.addClass("md-no-proxy")}function l(e){if("div"==e)(a=fe.element('
')).append(r.contents()),r.addClass("md-proxy-focus");else{a=fe.element('
');var t=fe.element('');c(r[0],t[0]),t.attr("aria-label")||t.attr("aria-label",u.getText(r)),r.hasClass("md-no-focus")&&t.addClass("md-no-focus"),a.prepend(t),a.children().eq(1).append(r.contents()),r.addClass("_md-button-wrap")}r[0].setAttribute("tabindex","-1"),r.append(a)}function c(t,n,e){var o=h.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","rel","target","ng-attr-ui-sref","ui-sref-opts","download"]);e&&(o=o.concat(h.prefixer(e))),fe.forEach(o,function(e){t.hasAttribute(e)&&(n.setAttribute(e,t.getAttribute(e)),t.removeAttribute(e))})}function m(e){for(var t=e.attributes,n=0;n'),fe.forEach(n,function(e){!function(e,t){if(e&&!function(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"==t||"BUTTON"==t}(e)&&e.hasAttribute("ng-click")){u.expect(e,"aria-label");var n=fe.element('');c(e,n[0],["ng-if","ng-hide","ng-show"]),e.setAttribute("tabindex","-1"),n.append(e),e=n[0]}e&&(!m(e)||!o.ngClick&&function(e){return-1!=g.indexOf(e.nodeName.toLowerCase())}(e))&&fe.element(e).removeClass("md-secondary"),r.addClass("md-with-secondary"),t.append(e)}(e,t)}),a.append(t),function(){for(var e,t,n=["md-switch","md-checkbox"],o=0;t=n[o];++o)if((e=r.find(t)[0])&&!e.hasAttribute("aria-label")){var i=r.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}(),e&&"MD-MENU"===i.nodeName&&function(){var e=fe.element(i),t=e.parent().hasClass("md-secondary-container")||i.parentNode.firstElementChild!==i,n="left";t&&(n="right");e.attr("md-position-mode")||e.attr("md-position-mode",n+" target");var o=e.children().eq(0);m(o[0])||o.attr("ng-click","$mdMenu.open($event)");o.attr("aria-label")||o.attr("aria-label","Open List Menu")}(),function(e,i,t,n){i.addClass("_md");var o=[],r=i[0].firstElementChild,a=i.hasClass("_md-button-wrap")?r.firstElementChild:r,d=a&&m(a),s=i.hasClass("md-no-proxy");r&&r.children&&!d&&!s&&fe.forEach(g,function(e){fe.forEach(r.querySelectorAll(e+":not(.md-secondary)"),function(e){o.push(e)})}),1!=o.length&&!d||(i.addClass("md-clickable"),d||n.attachRipple(e,fe.element(i[0].querySelector(".md-no-style")))),o.length&&fe.forEach(o,function(t){t=fe.element(t),e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,f(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&i.addClass("md-focused"),t.on("blur",function e(){i.removeClass("md-focused"),t.off("blur",e)})})});function l(e){"INPUT"==e.target.nodeName||"TEXTAREA"==e.target.nodeName||e.target.isContentEditable||(e.which||e.keyCode)==p.KEY_CODE.SPACE&&a&&(a.click(),e.preventDefault(),e.stopPropagation())}d||o.length||a&&a.addEventListener("keypress",l);i.off("click"),i.off("keypress"),1==o.length&&a&&i.children().eq(0).on("click",function(t){(function(e){var t=["md-slider"];if(!e.path)return-1!==t.indexOf(e.target.tagName.toLowerCase());for(var n=e.path.indexOf(i.children()[0]),o=0;o or ")},a.$mdMenu={open:this.open,close:this.close},a.$mdOpenMenu=fe.bind(this,function(){return s.warn("mdMenu: The $mdOpenMenu method is deprecated. Please use `$mdMenu.open`."),this.open.apply(this,arguments)})}function He(a){var d="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:function(e){e.addClass("md-menu");var t=e.children()[0],n=a.prefixer();n.hasAttribute(t,"ng-click")||(t=t.querySelector(n.buildSelector(["ng-click","ng-mouseenter"]))||t);var o="MD-BUTTON"===t.nodeName||"BUTTON"===t.nodeName;t&&o&&!t.hasAttribute("type")&&t.setAttribute("type","button");if(!t)throw Error(d+"Expected the menu to have a trigger element.");if(2!==e.children().length)throw Error(d+"Expected two children elements. The second element must have a `md-menu-content` element.");t&&t.setAttribute("aria-haspopup","true");var i=e[0].querySelectorAll("md-menu"),r=parseInt(e[0].getAttribute("md-nest-level"),10)||0;i&&fe.forEach(a.nodesToArray(i),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",r+1)});return s}};function s(e,t,n,o){var i=o[0],r=!!o[1],a=fe.element('
'),d=t.children()[1];t.addClass("_md"),d.hasAttribute("role")||d.setAttribute("role","menu"),a.append(d),t.on("$destroy",function(){a.remove()}),t.append(a),a[0].style.display="none",i.init(a,{isInMenuBar:r})}}function Oe(e){t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate","$log"];var w=8;return e("$mdMenu").setDefaults({methods:["target"],options:t});function t(C,e,s,M,T,o,i,r,l,c){var A=C.prefixer(),m=C.dom.animator;return{parent:"body",onShow:function(a,n,d){(function(){if(!d.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");fe.extend(d,{alreadyOpen:!1,isRemoved:!1,target:fe.element(d.target),parent:fe.element(d.parent),menuContentEl:fe.element(n[0].querySelector("md-menu-content"))})})(),d.menuContentEl[0]?e.inherit(d.menuContentEl,d.target):c.warn("$mdMenu: Menu elements should always contain a `md-menu-content` element,otherwise interactivity features will not work properly.",n);return d.cleanupResizing=function(){var e=function(t,n){return i.throttle(function(){if(!d.isRemoved){var e=h(t,n);t.css(m.toCss(e))}})}(n,d);return T.addEventListener("resize",e),T.addEventListener("orientationchange",e),function(){T.removeEventListener("resize",e),T.removeEventListener("orientationchange",e)}}(),d.hideBackdrop=function(e,t,n){if(n.nestLevel)return fe.noop;n.disableParentScroll&&!C.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=C.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1;n.hasBackdrop&&(n.backdrop=C.createBackdrop(e,"md-menu-backdrop md-click-catcher"),l.enter(n.backdrop,M[0].body));return function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll()}}(a,0,d),function(){return d.parent.append(n),n[0].style.display="",o(function(e){var t=h(n,d);n.removeClass("md-leave"),r(n,{addClass:"md-active",from:m.toCss(t),to:m.toCss({transform:""})}).start().then(e)})}().then(function(e){return d.alreadyOpen=!0,d.cleanupInteraction=function(){if(!d.menuContentEl[0])return fe.noop;d.menuContentEl.on("keydown",i),d.menuContentEl[0].addEventListener("click",r,!0);var e=d.menuContentEl[0].querySelector(A.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!e)for(var t=d.menuContentEl[0].children.length,n=0;n
'),s='';d.html(a),d.attr("tabindex","0"),fe.isDefined(e.mdPreventMenuClose)&&d.attr("md-prevent-menu-close",e.mdPreventMenuClose),o.html(""),o.append(fe.element(s)),o.append(d),o.addClass("md-indent").removeClass(r),l("role","checkbox"===i?"menuitemcheckbox":"menuitemradio",d),t="ng-disabled",n=c.prefixer(t),fe.forEach(n,function(e){if(o[0].hasAttribute(e)){var t=o[0].getAttribute(e);d[0].setAttribute(e,t),o[0].removeAttribute(e)}})}return function(e,t,n,o){var i=o[0],r=o[1];i.init(r)};function l(e,t,n){(n=n||o)instanceof fe.element&&(n=n[0]),n.hasAttribute(e)||n.setAttribute(e,t)}}}}function Fe(i,r){return{restrict:"E",transclude:!0,controller:Be,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",mdNoInkBar:"=?",navBarAriaLabel:"@?"},template:'
',link:function(e,t,n,o){r(t),o.navBarAriaLabel||i.expectAsync(t,"aria-label",fe.noop)}}}function Be(e,t,n,o){this._$timeout=n,this._$scope=t,this._$mdConstant=o,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=e[0],this._inkbar;var i=this,r=this._$scope.$watch(function(){return i._navBarEl.querySelectorAll("._md-nav-button").length},function(e){0'),'"},scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",srefOpts:"=?",name:"@",navItemAriaLabel:"@?"},link:function(n,o,i,r){var a,d,s,l;e(function(){if(d=r[0],s=r[1],l=fe.element(o[0].querySelector("._md-nav-button")),d.name||(d.name=fe.element(o[0].querySelector("._md-nav-button-text")).text().trim()),l.on("keydown",function(e){s.onKeydown(e)}),l.on("focus",function(){s.getFocusedTab()||s.onFocus()}),l.on("click",function(){s.mdSelectedNavItem=d.name,n.$apply()}),d.disabled=m.parseAttributeBoolean(i.disabled,!1),"MutationObserver"in u){var e=o[0],t=new MutationObserver(function(e){m.nextTick(function(){d.disabled=m.parseAttributeBoolean(i[e[0].attributeName],!1)})});t.observe(e,{attributes:!0,attributeFilter:["disabled"]}),a=t.disconnect.bind(t)}else i.$observe("disabled",function(e){d.disabled=m.parseAttributeBoolean(e,!1)});d.navItemAriaLabel||c.expectWithText(l,"aria-label")}),n.$on("destroy",function(){l.off("keydown"),l.off("focus"),l.off("click"),a()})}}}function je(e){this._$element=e,this.mdNavClick,this.mdNavHref,this.mdNavSref,this.srefOpts,this.name,this.navItemAriaLabel,this._selected=!1,this._focused=!1}function qe($,y,d,C,p,e){var M=$.requestAnimationFrame||$.webkitRequestAnimationFrame||fe.noop,h=$.cancelAnimationFrame||$.webkitCancelAnimationFrame||$.webkitCancelRequestAnimationFrame||fe.noop,f="determinate",T="indeterminate",A="_md-progress-circular-disabled",w="md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'',compile:function(e,t){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),fe.isUndefined(t.mdMode)){var n=t.hasOwnProperty("value")?f:T;t.$set("mdMode",n)}else t.$set("mdMode",t.mdMode.trim());return o}};function o(g,s,l){var b,e,t=s[0],a=fe.element(t.querySelector("svg")),v=fe.element(t.querySelector("path")),n=y.startIndeterminate,o=y.endIndeterminate,i=0,E=0;function c(n,e,t,o,i,r){var a=++E,d=C.now(),s=e-n,l=N(g.mdDiameter),c=S(l),m=t||y.easeFn,u=o||y.duration,p=-90*(i||0),h=r||100;function f(e){v.attr("stroke-dashoffset",k(l,c,e,h)),v.attr("transform","rotate("+p+" "+l/2+" "+l/2+")")}e===n?f(e):b=M(function e(){var t=$.Math.max(0,$.Math.min(C.now()-d,u));f(m(t,n,s,u)),a===E&&t
',compile:function(e,t,n){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),o}};function o(e,n,t){var o;m(n);var i=t.hasOwnProperty("disabled"),r=u.dom.animator.toCss,a=fe.element(n[0].querySelector(".md-bar1")),d=fe.element(n[0].querySelector(".md-bar2")),s=fe.element(n[0].querySelector(".md-container"));function l(){var e=(t.mdMode||"").trim();if(e)switch(e){case p:case h:case f:case g:break;default:e=h}return e}function c(e,t){if(!i&&l()){var n=u.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),o=r({transform:n});fe.element(e).css(o)}}n.attr("md-mode",l()).toggleClass(b,i),function(){if(fe.isUndefined(t.mdMode)){var e=fe.isDefined(t.value)?p:h;n.attr("md-mode",e),t.mdMode=e}}(),t.$observe("value",function(e){var t=v(e);n.attr("aria-valuenow",t),l()!=g&&c(d,t)}),t.$observe("mdBufferValue",function(e){c(a,v(e))}),t.$observe("disabled",function(e){i=!0===e||!1===e?!!e:fe.isDefined(e),n.toggleClass(b,i),s.toggleClass(o,!i)}),t.$observe("mdMode",function(e){switch(o&&s.removeClass(o),e){case g:case f:case p:case h:s.addClass(o="md-mode-"+e);break;default:s.addClass(o="md-mode-"+h)}})}function v(e){return Math.max(0,Math.min(e||0,100))}}function We(d,s,l,c){return e.prototype={init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=fe.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return t(this.$element,1)},selectPrevious:function(){return t(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}},{restrict:"E",controller:["$element",e],require:["mdRadioGroup","?ngModel"],link:{pre:function(t,o,e,n){o.addClass("_md"),l(o);var i=n[0],r=n[1]||d.fakeNgModel();function a(){o.hasClass("md-focused")||o.addClass("md-focused")}i.init(r),t.mouseActive=!1,o.attr({role:"radiogroup",tabIndex:o.attr("tabindex")||"0"}).on("keydown",function(e){var t=e.which||e.keyCode;if(t==s.KEY_CODE.ENTER||e.currentTarget==e.target)switch(t){case s.KEY_CODE.LEFT_ARROW:case s.KEY_CODE.UP_ARROW:e.preventDefault(),i.selectPrevious(),a();break;case s.KEY_CODE.RIGHT_ARROW:case s.KEY_CODE.DOWN_ARROW:e.preventDefault(),i.selectNext(),a();break;case s.KEY_CODE.ENTER:var n=fe.element(d.getClosest(o[0],"form"));0
',link:function(t,n,o,i){var r;c(n),function(e){e.attr({id:o.id||"radio_"+l.nextUid(),role:"radio","aria-checked":"false"}),s.expectWithText(e,"aria-label")}(n),o.ngValue?l.nextTick(e,!1):e();function e(){if(!i)throw"RadioButton: No RadioGroupController could be found.";i.add(d),o.$observe("value",d),n.on("click",a).on("$destroy",function(){i.remove(d)})}function a(e){n[0].hasAttribute("disabled")||i.isDisabled()||t.$apply(function(){i.setViewValue(o.value,e&&e.type)})}function d(){var e=i.getViewValue()==o.value;e!==r&&("md-radio-group"!==n[0].parentNode.nodeName.toLowerCase()&&n.parent().toggleClass(m,e),e&&i.setActiveDescendant(n.attr("id")),r=e,n.attr("aria-checked",e).toggleClass(m,e))}}}}function Ye(s,l){return["$mdUtil","$window",function(a,d){return{restrict:"A",multiElement:!0,link:function(o,i,t){var r=o.$on("$md-resize-enable",function(){r();var e=i[0],n=e.nodeType===d.Node.ELEMENT_NODE?d.getComputedStyle(e):{};o.$watch(t[s],function(e){if(!!e===l){a.nextTick(function(){o.$broadcast("$md-resize")});var t={cachedTransitionStyles:n};a.dom.animator.waitTransitionEnd(i,t).then(function(){o.$broadcast("$md-resize")})}})})}}}]}function Ke(o,i,r,a){var d="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",s={find:function(e,t){var n=o.get(e);return n||t?n:(a.error(i.supplant(d,[e||""])),ge)},waitFor:l};return function(e,t){if(fe.isUndefined(e))return s;var n=!0===t,o=s.find(e,n);return!o&&n?s.waitFor(e):!o&&fe.isUndefined(t)?function(e,t){function n(){return!1}function o(){return r.when(i.supplant(d,[t||""]))}return fe.extend({isLockedOpen:n,isOpen:n,toggle:o,open:o,close:o,onClose:fe.noop,then:function(e){return l(t).then(e||fe.noop)}},e)}(s,e):o};function l(e){return o.when(e).catch(a.error)}}function Ge(o,b,v,E,$,y,e,C,M,T,A,w,_){return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed").attr("tabIndex","-1"),t}};function t(i,r,e,t){var a,d,s,l,c,m=null,u=null,p=T.when(!0),n=C(e.mdIsLockedOpen),h=fe.element(w);function f(e){return e.keyCode===v.KEY_CODE.ESCAPE?g(e):T.when(!0)}function g(e){return e.preventDefault(),t.close()}e.mdDisableScrollTarget&&((m=A[0].querySelector(e.mdDisableScrollTarget))?m=fe.element(m):M.warn(b.supplant('mdSidenav: couldn\'t find element matching selector "{selector}". Falling back to parent.',{selector:e.mdDisableScrollTarget}))),m=m||r.parent(),e.hasOwnProperty("mdDisableBackdrop")||(d=b.createBackdrop(i,"md-sidenav-backdrop md-opaque ng-enter")),e.hasOwnProperty("mdDisableCloseEvents")&&(s=!0),r.addClass("_md"),E(r),d&&E.inherit(d,r),r.on("$destroy",function(){d&&d.remove(),t.destroy()}),i.$on("$destroy",function(){d&&d.remove()}),i.$watch(function(){return n(i.$parent,{$media:function(e){return M.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),o(e)},$mdMedia:o})},function(e,t){(i.isLockedOpen=e)===t?r.toggleClass("md-locked-open",!!e):y[e?"addClass":"removeClass"](r,"md-locked-open");d&&d.toggleClass("md-locked-open",!!e)}),i.$watch("isOpen",function(e){var t,n=b.findFocusTarget(r)||b.findFocusTarget(r,"[md-sidenav-focus]")||r,o=r.parent();s||(o[e?"on":"off"]("keydown",f),d&&d[e?"on":"off"]("click",g));t=function(e,t){var n=r[0],o=e[0].scrollTop;if(t&&o){c={top:n.style.top,bottom:n.style.bottom,height:n.style.height};var i={top:o+"px",bottom:"auto",height:e[0].clientHeight+"px"};r.css(i),d.css(i)}if(!t&&c)return function(){n.style.top=c.top,n.style.bottom=c.bottom,n.style.height=c.height,d[0].style.top=null,d[0].style.bottom=null,d[0].style.height=null,c=null}}(o,e),e&&(u=A[0].activeElement,l=$.getLastInteractionType());return function(e){e&&!a?(a=m.css("overflow"),m.css("overflow","hidden")):fe.isDefined(a)&&(m.css("overflow",a),a=ge)}(e),p=T.all([e&&d?y.enter(d,o):d?y.leave(d):T.when(!0),y[e?"removeClass":"addClass"](r,"md-closed")]).then(function(){i.isOpen&&(_(function(){h.triggerHandler("resize")}),n&&n.focus()),t&&t()})}),t.$toggleOpen=function(e){return i.isOpen===e?T.when(!0):(i.isOpen&&t.onCloseCb&&t.onCloseCb(),T(function(t){i.isOpen=e,b.nextTick(function(){p.then(function(e){!i.isOpen&&u&&"keyboard"===l&&(u.focus(),u=null),t(e)})})}))}}}function Xe(t,e,n,o,i){var r=this;r.isOpen=function(){return!!t.isOpen},r.isLockedOpen=function(){return!!t.isLockedOpen},r.onClose=function(e){return r.onCloseCb=e,r},r.open=function(){return r.$toggleOpen(!0)},r.close=function(){return r.$toggleOpen(!1)},r.toggle=function(){return r.$toggleOpen(!t.isOpen)},r.$toggleOpen=function(e){return o.when(t.isOpen=e)};var a=e.mdComponentId,d=a&&-1o?(t=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),c.throttle(i))}e.on("scroll touchmove",function(){t||(t=!0,c.throttle(i),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),n=+m.now()})}(i),i.on("$scrollstart",r),i.on("$scroll",function e(){var t=i.prop("scrollTop");var n=(e.prevScrollTop||0)=o.next.top-o.current.height)return void s(o.current,t+(o.next.top-t-o.current.height))}o.current&&s(o.current,t)}),o={prev:null,current:null,next:null,items:[],add:function(n,e){e.addClass("md-sticky-clone");var t={element:n,clone:e};return o.items.push(t),m.nextTick(function(){i.prepend(t.clone)}),r(),function(){o.items.forEach(function(e,t){e.element[0]===n[0]&&(o.items.splice(t,1),e.clone.remove())}),r()}},refreshElements:t};function t(){var e;o.items.forEach(a),o.items=o.items.sort(function(e,t){return e.topo.items[n].top){e=o.items[n];break}d(e)}function a(e){var t=e.element[0];for(e.top=0,e.left=0,e.right=0;t&&t!==i[0];)e.top+=t.offsetTop,e.left+=t.offsetLeft,t.offsetParent&&(e.right+=t.offsetParent.offsetWidth-t.offsetWidth-t.offsetLeft),t=t.offsetParent;e.height=e.element.prop("offsetHeight");var n=m.floatingScrollbars()?"0":ge;m.bidi(e.clone,"margin-left",e.left,n),m.bidi(e.clone,"margin-right",n,e.right)}function d(e){if(o.current!==e){o.current&&(s(o.current,null),n(o.current,null)),e&&n(e,"active"),o.current=e;var t=o.items.indexOf(e);o.next=o.items[t+1],o.prev=o.items[t-1],n(o.next,"next"),n(o.prev,"prev")}}function n(e,t){e&&e.state!==t&&(e.state&&(e.clone.attr("sticky-prev-state",e.state),e.element.attr("sticky-prev-state",e.state)),e.clone.attr("sticky-state",t),e.element.attr("sticky-state",t),e.state=t)}function s(e,t){e&&(null===t||t===ge?e.translateY&&(e.translateY=null,e.clone.css(l.CSS.TRANSFORM,"")):(e.translateY=t,m.bidi(e.clone,l.CSS.TRANSFORM,"translate3d("+e.left+"px,"+t+"px,0)","translateY("+t+"px)")))}}(o),o.$element.data("$$sticky",i));var r=n||d(t.clone())(e),a=i.add(t,r);e.$on("$destroy",a)}}}function Ze(d,s,l,c,m){return{restrict:"E",replace:!0,transclude:!0,template:'
',link:function(n,o,e,t,i){l(o),o.addClass("_md"),c.prefixer().removeAttribute(o,"ng-repeat");var r=o[0].outerHTML;function a(e){return fe.element(e[0].querySelector(".md-subheader-content"))}e.$set("role","heading"),m.expect(o,"aria-level","2"),i(n,function(e){a(o).append(e)}),o.hasClass("md-no-sticky")||i(n,function(e){var t=s('")(n);c.nextTick(function(){a(t).append(e)}),d(n,o,t)})}}}function Je(e){t.$inject=["$parse"];var r="md"+e,a="$md."+e.toLowerCase();return t;function t(i){return{restrict:"A",link:function(n,e,t){var o=i(t[r]);e.on(a,function(e){var t=e.currentTarget;n.$applyAsync(function(){o(n,{$event:e,$target:{current:t}})})})}}}}function et(e,m,u,p,h,f,g){var n=e[0];return{restrict:"E",priority:u.BEFORE_NG_ARIA,transclude:!0,template:'
',require:["^?mdInputContainer","?ngModel","?^form"],compile:function(e,t){var c=n.compile(e,t).post;return e.addClass("md-dragging"),function(t,n,e,o){o[0];var i=o[1]||m.fakeNgModel(),r=(o[2],null);null!=e.disabled?r=function(){return!0}:e.ngDisabled&&(r=p(e.ngDisabled));var a,d=fe.element(n[0].querySelector(".md-thumb-container")),s=fe.element(n[0].querySelector(".md-container")),l=fe.element(n[0].querySelector(".md-label"));h(function(){n.removeClass("md-dragging")}),c(t,n,e,o),r&&t.$watch(r,function(e){n.attr("tabindex",e?-1:0)}),e.$observe("mdInvert",function(e){var t=m.parseAttributeBoolean(e);t?n.prepend(l):n.prepend(s),n.toggleClass("md-inverted",t)}),f.register(s,"drag"),s.on("$md.dragstart",function(e){if(r&&r(t))return;e.stopPropagation(),n.addClass("md-dragging"),a={width:d.prop("offsetWidth")}}).on("$md.drag",function(e){if(!a)return;e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/a.width,n=i.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),d.css(u.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),a.translate=n}).on("$md.dragend",function(e){if(!a)return;e.stopPropagation(),n.removeClass("md-dragging"),d.css(u.CSS.TRANSFORM,""),(i.$viewValue?a.translate<.5:.5 md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function I(){return p.centerTabs&&!p.shouldPaginate}function H(e){if(-1===e)return-1;var t,n,o=Math.max(p.tabs.length-e,e);for(t=0;t<=o;t++){if((n=p.tabs[e+t])&&!0!==n.scope.disabled)return n.getIndex();if((n=p.tabs[e-t])&&!0!==n.scope.disabled)return n.getIndex()}return e}function O(e,n,o){Object.defineProperty(p,e,{get:function(){return o},set:function(e){var t=o;o=e,n&&n(e,t)}})}function P(){p.maxTabWidth=R(),p.shouldPaginate=function(){var e;if(p.noPagination||!b)return!1;var t=c.prop("clientWidth");return fe.forEach(D().tabs,function(e){t-=e.offsetWidth}),e=t<0,m.msie&&(D().paging.style.width=e?"999999px":ge),e}()}function L(e){var t=0;return fe.forEach(e,function(e){t+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(t)}function R(){var e=D().canvas.clientWidth;return Math.max(0,Math.min(e-1,264))}function F(e,t){var n,o=t?"focusIndex":"selectedIndex",i=p[o];for(n=i+e;p.tabs[n]&&p.tabs[n].scope.disabled;n+=e);n=(i+e+p.tabs.length)%p.tabs.length,p.tabs[n]&&(p[o]=n)}function B(){p.styleTabItemFocus="keyboard"===a.getLastInteractionType();var e=D().tabs[p.focusIndex];e&&e.focus()}function U(e){var t=D();if(fe.isNumber(e)||(e=p.focusIndex),t.tabs[e]&&!p.shouldCenterTabs){var n=t.tabs[e],o=n.offsetLeft,i=n.offsetWidth+o;if(0!==e)if(V()){var r=L(Array.prototype.slice.call(t.tabs,0,e)),a=L(Array.prototype.slice.call(t.tabs,0,e+1));p.offsetLeft=Math.min(p.offsetLeft,W(r)),p.offsetLeft=Math.max(p.offsetLeft,W(a-t.canvas.clientWidth))}else p.offsetLeft=Math.max(p.offsetLeft,W(i-t.canvas.clientWidth+32)),p.offsetLeft=Math.min(p.offsetLeft,W(o));else p.offsetLeft=0}}function j(){p.selectedIndex=H(p.selectedIndex),p.focusIndex=H(p.focusIndex)}function q(){if(!p.dynamicHeight)return c.css("height","");if(!p.tabs.length)return f.push(q);var e=D(),t=e.contents[p.selectedIndex],n=t?t.offsetHeight:0,o=e.wrapper.offsetHeight,i=n+o,r=c.prop("clientHeight");if(r!==i){"bottom"===c.attr("md-align-tabs")&&(r-=o,i-=o,c.attr("md-border-bottom")!==ge&&++r),h=!0;var a={height:r+"px"},d={height:i+"px"};c.css(a),s(c,{from:a,to:d,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){c.css({transition:"none",height:""}),m.nextTick(function(){c.css("transition","")}),h=!1})}}function z(e,t){if(!p.noInkBar){var n=D();if(n.tabs[p.selectedIndex])if(p.tabs.length)if(c.prop("offsetParent")){var o=p.selectedIndex,i=n.paging.offsetWidth,r=n.tabs[o],a=r.offsetLeft,d=i-a-r.offsetWidth;if(p.shouldCenterTabs){var s=L(n.tabs);sp.selectedIndex},shouldRender:function(){return!p.noDisconnect||this.isActive()},hasFocus:function(){return p.styleTabItemFocus&&p.hasFocus&&this.getIndex()===p.focusIndex},id:m.nextUid(),hasContent:!(!e.template||!e.template.trim())},i=fe.extend(o,e);fe.isDefined(t)?p.tabs.splice(t,0,i):p.tabs.push(i);return function(){f.forEach(function(e){m.nextTick(e)}),f=[]}(),function(){var e,t=!1;for(e=0;ee.canvas.clientWidth+p.offsetLeft},p.canPageBack=function(){return 0
'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}function it(s,l){return{require:"^?mdTabs",link:function(e,t,n,o){if(o){var i,r,a=function(){o.updatePagination(),o.updateInkBarStyles()};if("MutationObserver"in l){(i=new MutationObserver(a)).observe(t[0],{childList:!0,subtree:!0,characterData:!0}),r=i.disconnect.bind(i)}else{var d=s.debounce(a,15,null,!1);t.on("DOMSubtreeModified",d),r=t.off.bind(t,"DOMSubtreeModified",d)}e.$on("$destroy",function(){r()})}}}}function rt(a,d){return{restrict:"A",link:function(e,t,n,o){if(!o)return;var i=o.enableDisconnect?e.compileScope.$new():e.compileScope;return t.html(e.template),a(t.contents())(i),d.nextTick(function(){e.$watch("connected",function(e){!1===e?o.enableDisconnect&&d.disconnectScope(i):r()}),e.$on("$destroy",r)});function r(){o.enableDisconnect&&d.reconnectScope(i)}},scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}function at(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function dt(e){n.$inject=["$mdToast","$scope","$log"],o.$inject=["$animate","$mdToast","$mdUtil","$mdMedia","$document"];var m,u="ok";function t(e){m=e}return e("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:o}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","actionKey","actionHint","highlightAction","highlightClass","theme","parent","dismissHint"],options:["$mdToast","$mdTheming",function(e,t){return{template:'
{{ toast.content }} {{ toast.dismissHint }} {{ toast.actionHint }} {{ toast.action }}
',controller:n,theme:t.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",t).addMethod("updateContent",t);function n(t,n,o){this.$onInit=function(){var e=this;e.highlightAction&&(n.highlightClasses=["md-highlight",e.highlightClass]),e.action&&!e.actionKey&&o.warn("Toasts with actions should define an actionKey for accessibility.","Details: https://material.angularjs.org/latest/api/service/$mdToast#mdtoast-simple"),e.actionKey&&!e.actionHint&&(e.actionHint='Press Control-"'+e.actionKey+'" to '),e.dismissHint||(e.dismissHint="Press Escape to dismiss."),n.$watch(function(){return m},function(){e.content=m}),this.resolve=function(){t.hide(u)}}}function o(o,d,s,t,l){var c="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:function(e,i,r){m=r.textContent||r.content;var a=!t("gt-sm");i=s.extractElementByName(i,"md-toast",!0),r.element=i,r.onSwipe=function(e,t){var n=e.type.replace("$md.",""),o=n.replace("swipe","");"down"===o&&-1!==r.position.indexOf("top")&&!a||"up"===o&&(-1!==r.position.indexOf("bottom")||a)||("left"===o||"right"===o)&&a||(i.addClass("md-"+n),s.nextTick(d.cancel))},r.openClass=function(e){return t("gt-xs")?"md-toast-open-"+(-1');i.append(fe.element(n.children[o].childNodes)),n.children[o].appendChild(i[0])}return n.innerHTML}return e||""}}}}function st(f,g,b,e,v){var E=fe.bind(null,b.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(u,p,h){p.addClass("_md"),e(p),b.nextTick(function(){p.addClass("_md-toolbar-transitions")},!1),fe.isDefined(h.mdScrollShrink)&&function(){var n,o,i=fe.noop,r=0,a=0,d=h.mdShrinkSpeedFactor||.5,s=f.throttle(t),l=b.debounce(e,5e3);u.$on("$mdContentLoaded",c),h.$observe("mdScrollShrink",function(e){var t=p.parent().find("md-content");!o&&t.length&&c(null,t);!1===(e=u.$eval(e))?i():i=m()}),h.ngShow&&u.$watch(h.ngShow,e);h.ngHide&&u.$watch(h.ngHide,e);function c(e,t){t&&p.parent()[0]===t.parent()[0]&&(o&&o.off("scroll",s),o=t,i=m())}function t(e){var t=e?e.target.scrollTop:a;l(),r=Math.min(n/d,Math.max(0,r+t-a)),p.css(g.CSS.TRANSFORM,E([-r*d])),o.css(g.CSS.TRANSFORM,E([(n-r)*d])),a=t,b.nextTick(function(){var e=p.hasClass("md-whiteframe-z1");e&&!r?v.removeClass(p,"md-whiteframe-z1"):!e&&r&&v.addClass(p,"md-whiteframe-z1")})}function m(){return o?(o.on("scroll",s),o.attr("scroll-shrink","true"),b.nextTick(e,!1),function(){o.off("scroll",s),o.attr("scroll-shrink","false"),e()}):fe.noop}function e(){var e=-(n=p.prop("offsetHeight"))*d+"px";o.css({"margin-top":e,"margin-bottom":e}),t()}u.$on("$destroy",i)}()}}}function lt(v,E,$,y,C,M,T,A){var w="focus touchstart mouseenter",_="blur touchcancel mouseleave",k={top:{x:T.xPosition.CENTER,y:T.yPosition.ABOVE},right:{x:T.xPosition.OFFSET_END,y:T.yPosition.CENTER},bottom:{x:T.xPosition.CENTER,y:T.yPosition.BELOW},left:{x:T.xPosition.OFFSET_START,y:T.yPosition.CENTER}};return{restrict:"E",priority:210,scope:{mdZIndex:"=?mdZIndex",mdDelay:"=?mdDelay",mdVisible:"=?mdVisible",mdAutohide:"=?mdAutohide",mdDirection:"@?mdDirection"},link:function(a,o,d){var i,e,r,s,l,c="md-tooltip-"+M.nextUid(),m=M.getParentWithPointerEvents(o),u=$.throttle(f),p=!1,h=null;function t(){a.mdZIndex=a.mdZIndex||100,a.mdDelay=a.mdDelay||0,k[a.mdDirection]||(a.mdDirection="bottom")}function n(e){var t=e||C(o.text().trim())(a.$parent);(m.attr("aria-label")||m.attr("aria-labelledby"))&&!m.attr("md-labeled-by-tooltip")||(m.attr("aria-label",t),m.attr("md-labeled-by-tooltip")||m.attr("md-labeled-by-tooltip",c))}function f(){t(),s&&s.panelEl&&s.panelEl.removeClass(i),i="md-origin-"+a.mdDirection,e=k[a.mdDirection],r=T.newPanelPosition().relativeTo(m).addPanelPosition(e.x,e.y),s&&s.panelEl&&(s.panelEl.addClass(i),s.updatePosition(r))}function g(e){g.queued&&g.value===!!e||!g.queued&&a.mdVisible===!!e||(g.value=!!e,g.queued||(e?(g.queued=!0,l=v(function(){a.mdVisible=g.value,g.queued=!1,l=null,a.visibleWatcher||b(a.mdVisible)},a.mdDelay)):M.nextTick(function(){a.mdVisible=!1,a.visibleWatcher||b(!1)})))}function b(e){e?function(){if(!o[0].textContent.trim())throw new Error("Text for the tooltip has not been provided. Please include text within the mdTooltip element.");if(!s){var e=fe.element(document.body),t=T.newPanelAnimation().openFrom(m).closeTo(m).withAnimation({open:"md-show",close:"md-hide"}),n={id:c,attachTo:e,contentElement:o,propagateContainerEvents:!0,panelClass:"md-tooltip",animation:t,position:r,zIndex:a.mdZIndex,focusOnOpen:!1,onDomAdded:function(){s.panelEl.addClass(i)}};s=T.create(n)}s.open().then(function(){s.panelEl.attr("role","tooltip")})}():s&&s.close()}t(),n(),o.detach(),f(),function(){if(m[0]&&"MutationObserver"in E){var e=new MutationObserver(function(e){!function(e){return e.some(function(e){return"disabled"===e.attributeName&&m[0].disabled}),!1}(e)||M.nextTick(function(){g(!1)})});e.observe(m[0],{attributes:!0})}function t(){g(!1)}function n(){h=document.activeElement===m[0]}function o(e){"focus"===e.type&&h?h=!1:a.mdVisible||(m.on(_,i),g(!0),"touchstart"===e.type&&m.one("touchend",function(){M.nextTick(function(){y.one("touchend",i)},!1)}))}function i(){((a.hasOwnProperty("mdAutohide")?a.mdAutohide:d.hasOwnProperty("mdAutohide"))||p||y[0].activeElement!==m[0])&&(l&&(v.cancel(l),g.queued=!1,l=null),m.off(_,i),m.triggerHandler("blur"),g(!1)),p=!1}function r(){p=!0}h=!1,A.register("scroll",t,!0),A.register("blur",n),A.register("resize",u),a.$on("$destroy",function(){A.deregister("scroll",t,!0),A.deregister("blur",n),A.deregister("resize",u),m.off(w,o).off(_,i).off("mousedown",r),i(),e&&e.disconnect()}),m.on("mousedown",r),m.on(w,o)}(),function(){if(o[0]&&"MutationObserver"in E){var e=new MutationObserver(function(e){e.forEach(function(e){"md-visible"!==e.attributeName||a.visibleWatcher||(a.visibleWatcher=a.$watch("mdVisible",b))})});e.observe(o[0],{attributes:!0}),d.hasOwnProperty("mdVisible")&&(a.visibleWatcher=a.$watch("mdVisible",b))}else a.visibleWatcher=a.$watch("mdVisible",b);function t(){a.$destroy()}a.$watch("mdDirection",f),o.one("$destroy",t),m.one("$destroy",t),a.$on("$destroy",function(){g(!1),s&&s.destroy(),e&&e.disconnect(),o.remove()}),-1d.clientHeight+1,a=0
'),o.append(n));function i(e){e.preventDefault()}return n.on("wheel touchmove",i),function(){n.off("wheel touchmove",i),!t.disableScrollMask&&n[0].parentNode&&n[0].parentNode.removeChild(n[0])}}(t,n);return f.disableScrollAround._restoreScroll=function(){--f.disableScrollAround._count<=0&&(delete f.disableScrollAround._viewPortTop,o(),i(),delete f.disableScrollAround._restoreScroll)}},enableScrolling:function(){var e=this.disableScrollAround._restoreScroll;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===ge){var e=fe.element("
").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),s[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(e){var n=e[0]||e;document.addEventListener("click",function e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))},!0);var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!1,!0,R,{},0,0,0,0,!1,!1,!1,!1,0,null),t.$material=!0,t.$focus=!0,n.dispatchEvent(t)},createBackdrop:function(e,t){return n(f.supplant('',[t]))(e)},supplant:function(e,r,t){return t=t||/\{([^{}]*)\}/g,e.replace(t,function(t,e){var n=e.split("."),o=r;try{for(var i in n)n.hasOwnProperty(i)&&(o=o[n[i]])}catch(e){o=t}return"string"==typeof o||"number"==typeof o?o:t})},fakeNgModel:function(){return{$fake:!0,$setTouched:fe.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:fe.noop}},debounce:function(n,o,i,r){var a;return function(){var e=i,t=Array.prototype.slice.call(arguments);d.cancel(a),a=d(function(){a=ge,n.apply(e,t)},o||10,r)}},throttle:function(n,o){var i;return function(){var e=arguments,t=f.now();(!i||o");s[0].body.appendChild(t[0]);for(var n=["sticky","-webkit-sticky"],o=0;o=i&&r<=o&&d()},o.on(u,p),C(o,s),g(d,i+1.5*n,!1)}),e;function d(){if(!i)return i=!0,u&&p&&o.off(u,p),b(o,s),function(e,t){y(e,t),C(e,t)}(o,s),w(l,function(e){c.style[A(e[0])]=""}),e.complete(!0),e}}}}}])),S.$inject=["$$rAF","$log","$window","$interpolate"],fe.module("material.core").provider("$mdAria",function(){var i={showWarnings:!0};return{disableWarnings:function(){i.showWarnings=!1},$get:["$$rAF","$log","$window","$interpolate",function(e,t,n,o){return S.apply(i,arguments)}]}}),fe.module("material.core").provider("$mdCompiler",D),D.$inject=["$compileProvider"],function(){i.$inject=["$$MdGestureHandler","$$rAF","$timeout","$mdUtil"];var r,a,s={},l=6,c=!(n.$inject=["$mdGesture","$$MdGestureHandler","$mdUtil"]),d=!1,m=null,u=!1;function e(){}function i(o,e,n,t){var i=function(){for(var e=document.createElement("div"),t=["","webkit","Moz","MS","ms","o"],n=0;nthis.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){i&&(this.oldTouchAction=e[0].style[i],e[0].style[i]=t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[i]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;i||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(o=this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=p(e),g(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:e.throttle(function(e){this.state.isRunning&&(g(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(g(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function t(e){this.name=e,this.state={}}function n(e,i,n){if(!d){!u&&e.isHijackingClicks&&(document.addEventListener("click",function(e){var t;t=n.isIos?fe.isDefined(e.webkitForce)&&0===e.webkitForce:0===e.clientX&&0===e.clientY;t||e.$material||e.isIonicTap||f(e)?(m=null,"label"===e.target.tagName.toLowerCase()&&(m={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),m=null)},!0),document.addEventListener("mouseup",t,!0),document.addEventListener("mousedown",t,!0),document.addEventListener("focus",t,!0),u=!0);fe.element(document).on("mousedown touchstart pointerdown",function(e){if(r)return;var t=+Date.now();if(a&&!h(e,a)&&t-a.endTime<1500)return;r=p(e),o("start",e)}).on("mousemove touchmove pointermove",function(e){if(!r||!h(e,r))return;g(e,r),o("move",e)}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(e){if(!r||!h(e,r))return;g(e,r),r.endTime=+Date.now(),"pointercancel"!==e.type&&o("end",e);a=r,r=null}).on("$$mdGestureReset",function(){a=r=null})}function t(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||f(e)||"mousedown"===e.type&&(v(e.target)||v(document.activeElement))||(e.preventDefault(),e.stopPropagation())}function o(e,t){var n;for(var o in s)(n=s[o])instanceof i&&("start"===e&&n.cancel(),n[e](t,r))}}function p(e){var t=b(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function h(e,t){return e&&t&&e.type.charAt(0)===t.type}function f(e){return m&&m.x===e.x&&m.y===e.y}function g(e,t){var n=b(e),o=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=i-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=0=this.$mdUtil.now()-t},fe.module("material.core").provider("$$interimElement",function(){return t.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector","$exceptionHandler"],e.$get=t,e;function e(i){e.$inject=["$$interimElement","$injector"];var n=["onHide","onShow","onRemove"],r={},l={presets:{}},o={setDefaults:function(e){return l.optionsFactory=e.options,l.methods=(e.methods||[]).concat(n),o},addPreset:function(e,t){if((t=t||{}).methods=t.methods||[],t.options=t.options||function(){return{}},/^cancel|hide|show$/.test(e))throw new Error("Preset '"+e+"' in "+i+" is reserved!");if(-1 body")),"#comment"==(n=n||h[0]).nodeName&&(n=m[0].body),fe.element(n))}(n,t),t.themable&&g(n),n}(e,a),a.cleanupElement=e.cleanup,s=function(n,o,i){var e=o.onShowing||fe.noop,r=o.onComplete||fe.noop;try{e(o.scope,n,o,i)}catch(e){return u.reject(e)}return u(function(e,t){try{u.when(o.onShow(o.scope,n,o,i)).then(function(){r(o.scope,n,o),function(){var e,t=fe.noop;a.hideDelay&&(e=p(c.hide,a.hideDelay),t=function(){p.cancel(e)}),a.cancelAutoHide=function(){t(),a.cancelAutoHide=ge}}(),e(n)},t)}catch(e){t(e.message)}})}(d,a,e.controller).then(t,o)}).catch(o)})},remove:function(e,t,n){return d?((a=fe.extend(a||{},n||{})).cancelAutoHide&&a.cancelAutoHide(),a.element.triggerHandler("$mdInterimElementRemove"),!0===a.$destroy?l(a.element,a).then(function(){t&&i(e)||o(e)}):(u.when(s).finally(function(){l(a.element,a).then(function(){t?i(e):o(e)},i)}),r.deferred.promise)):u.when(!1);function o(e){r.deferred.resolve(e)}function i(e){r.deferred.reject(e)}}};function l(o,i){var r=i.onRemoving||fe.noop;return u(function(e,t){try{var n=u.when(i.onRemove(i.scope,o,i)||!0);r(o,n),i.$destroy?(e(o),!i.preserveScope&&i.scope&&n.then(function(){i.scope.$destroy()})):n.then(function(){!i.preserveScope&&i.scope&&i.scope.$destroy(),e(o)},t)}catch(e){t(e.message)}})}}}}}),v=/(-gt)?-(sm|md|lg|print)/g,E=/\s+/g,$=["grow","initial","auto","none","noshrink","nogrow"],y=["row","column"],C=["","start","center","end","stretch","space-around","space-between"],M=["","start","center","end","stretch"],T={enabled:!0,breakpoints:[]},p=fe.module("material.core.layout",["ng"]),h=/^((?:x|data)[:\-_])/i,f=/([:\-_]+(.))/g,g=["layout","flex","flex-order","flex-offset","layout-align"],b=["show","hide","layout-padding","layout-margin"],fe.forEach(["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],function(n){fe.forEach(g,function(e){var t=n?e+"-"+n:e;p.directive(H(t),function(r){return["$mdUtil","$interpolate","$log",function(e,t,n){return l=e,c=t,m=n,{restrict:"A",compile:function(e,t){var n;return T.enabled&&(B(r,0,e,m),U(r,z(r,t,""),j(0,r,t)),n=o),n||fe.noop}}}];function o(e,t,n){var o=function(n,o){var i;return function(e){var t=U(o,e||"");fe.isDefined(t)&&(i&&n.removeClass(i),i=t?o+"-"+t.trim().replace(E,"-"):o,n.addClass(i))}}(t,r),i=n.$observe(n.$normalize(r),o);o(z(r,n,"")),e.$on("$destroy",function(){i()})}}(t))}),fe.forEach(b,function(e){var t=n?e+"-"+n:e;p.directive(H(t),L(t))})}),p.provider("$$mdLayout",function(){return{$get:fe.noop,validateAttributeValue:U,validateAttributeUsage:B,disableLayouts:function(e){T.enabled=!0!==e}}}).directive("mdLayoutCss",P).directive("ngCloak",(u="ng-cloak",["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(e){return T.enabled?(e.addClass(u),function(e,t){n(function(){t.removeClass(u)},10,!1)}):fe.noop}}}])).directive("layoutWrap",L("layout-wrap")).directive("layoutNowrap",L("layout-nowrap")).directive("layoutNoWrap",L("layout-no-wrap")).directive("layoutFill",L("layout-fill")).directive("layoutLtMd",F("layout-lt-md")).directive("layoutLtLg",F("layout-lt-lg")).directive("flexLtMd",F("flex-lt-md")).directive("flexLtLg",F("flex-lt-lg")).directive("layoutAlignLtMd",F("layout-align-lt-md")).directive("layoutAlignLtLg",F("layout-align-lt-lg")).directive("flexOrderLtMd",F("flex-order-lt-md")).directive("flexOrderLtLg",F("flex-order-lt-lg")).directive("offsetLtMd",F("flex-offset-lt-md")).directive("offsetLtLg",F("flex-offset-lt-lg")).directive("hideLtMd",F("hide-lt-md")).directive("hideLtLg",F("hide-lt-lg")).directive("showLtMd",F("show-lt-md")).directive("showLtLg",F("show-lt-lg")).config(O),V.$inject=["$timeout"],fe.module("material.core").service("$mdLiveAnnouncer",V),V.prototype.announce=function(e,t){t=t||"polite";var n=this;n._liveElement.textContent="",n._liveElement.setAttribute("aria-live",t),n._$timeout(function(){n._liveElement.textContent=e},n._announceTimeout,!1)},V.prototype._createLiveElement=function(){var e=document.createElement("div");return e.classList.add("md-visually-hidden"),e.setAttribute("role","status"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),document.body.appendChild(e),e},fe.module("material.core.meta",[]).provider("$$mdMeta",function(){var o=fe.element(document.head),i={};function r(e){if(i[e])return!0;var t=document.getElementsByName(e)[0];return!!t&&(i[e]=fe.element(t),!0)}var e={setMeta:function(e,t){if(r(e),i[e])i[e].attr("content",t);else{var n=fe.element('');o.append(n),i[e]=n}return function(){i[e].attr("content",""),i[e].remove(),delete i[e]}},getMeta:function(e){if(!r(e))throw Error("$$mdMeta: could not find a meta tag with the name '"+e+"'");return i[e].attr("content")}};return fe.extend({},e,{$get:function(){return e}})}),Y.$inject=["$log","$q"],fe.module("material.core").factory("$mdComponentRegistry",Y),K.$inject=["$mdInkRipple"],fe.module("material.core").factory("$mdButtonInkRipple",K),G.$inject=["$mdInkRipple"],fe.module("material.core").factory("$mdCheckboxInkRipple",G),X.$inject=["$mdInkRipple"],fe.module("material.core").factory("$mdListInkRipple",X),function(){r.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],fe.module("material.core").provider("$mdInkRipple",function(){var i=!1;return{disableInkRipple:function(){i=!0},$get:["$injector",function(o){return{attach:function(e,t,n){return i||t.controller("mdNoInk")?fe.noop:o.instantiate(r,{$scope:e,$element:t,rippleOptions:n})}}}]}}).directive("mdInkRipple",e).directive("mdNoInk",n).directive("mdNoBar",n).directive("mdNoStretch",n);function e(o,i){return{controller:fe.noop,link:function(e,t,n){n.hasOwnProperty("mdInkRippleCheckbox")?i.attach(e,t):o.attach(e,t)}}}function r(e,t,n,o,i,r,a){this.$window=o,this.$timeout=i,this.$mdUtil=r,this.$mdColorUtil=a,this.$scope=e,this.$element=t,this.options=n,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,r.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(t.controller("mdInkRipple")||{}).createRipple=fe.bind(this,this.createRipple),(t.controller("mdInkRipple")||{}).setColor=fe.bind(this,this.color),this.bindEvents()}function t(e,t){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(fe.bind(e,t),!1))}function n(){return{controller:fe.noop}}r.prototype.color=function(e){var t,n,o=this;return fe.isDefined(e)&&(o._color=o._parseColor(e)),o._color||o._parseColor(o.inkRipple())||o._parseColor((t=o.options&&o.options.colorElement?o.options.colorElement:[],(n=t.length?t[0]:o.$element[0])?o.$window.getComputedStyle(n).color:"rgb(0,0,0)"))},r.prototype.calculateColor=function(){return this.color()},r.prototype._parseColor=function(e,t){t=t||1;var n=this.$mdColorUtil;if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,(.1*t).toString()+")"):0===e.indexOf("rgb")?n.rgbToRgba(e):0===e.indexOf("#")?n.hexToRgba(e):void 0},r.prototype.bindEvents=function(){this.$element.on("mousedown",fe.bind(this,this.handleMousedown)),this.$element.on("mouseup touchend",fe.bind(this,this.handleMouseup)),this.$element.on("mouseleave",fe.bind(this,this.handleMouseup)),this.$element.on("touchmove",fe.bind(this,this.handleTouchmove))},r.prototype.handleMousedown=function(e){if(!this.mousedown)if(e.hasOwnProperty("originalEvent")&&(e=e.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/2);else if(e.srcElement!==this.$element[0]){var t=this.$element[0].getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top;this.createRipple(n,o)}else this.createRipple(e.offsetX,e.offsetY)},r.prototype.handleMouseup=function(){this.$timeout(function(){t(this,this.clearRipples)}.bind(this))},r.prototype.handleTouchmove=function(){t(this,this.deleteRipples)},r.prototype.deleteRipples=function(){for(var e=0;e');return this.$element.append(e),e},r.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},r.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&fe.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},r.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},r.prototype.createRipple=function(e,t){if(this.isRippleAllowed()){var n,o,i,r=this,a=r.$mdColorUtil,d=fe.element('
'),s=this.$element.prop("clientWidth"),l=this.$element.prop("clientHeight"),c=2*Math.max(Math.abs(s-e),e),m=2*Math.max(Math.abs(l-t),t),u=(n=this.options.fitRipple,o=c,i=m,n?Math.max(o,i):Math.sqrt(Math.pow(o,2)+Math.pow(i,2))),p=this.calculateColor();d.css({left:e+"px",top:t+"px",background:"black",width:u+"px",height:u+"px",backgroundColor:a.rgbaToRgb(p),borderColor:a.rgbaToRgb(p)}),this.lastRipple=d,this.clearTimeout(),this.timeout=this.$timeout(function(){r.clearTimeout(),r.mousedown||r.fadeInComplete(d)},157.5,!1),this.options.dimBackground&&this.container.css({backgroundColor:p}),this.container.append(d),this.ripples.push(d),d.addClass("md-ripple-placed"),this.$mdUtil.nextTick(function(){d.addClass("md-ripple-scaled md-ripple-active"),r.$timeout(function(){r.clearRipples()},450,!1)},!1)}},r.prototype.fadeInComplete=function(e){this.lastRipple===e&&(this.timeout||this.mousedown)||this.removeRipple(e)},r.prototype.removeRipple=function(e){var t=this;this.ripples.indexOf(e)<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){t.fadeOutComplete(e)},450,!1))},r.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),Q.$inject=["$mdInkRipple"],fe.module("material.core").factory("$mdTabInkRipple",Q),fe.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100",contrastStrongLightColors:"400 500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A700",contrastStrongLightColors:"600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100 A200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#ffffff",A200:"#000000",A400:"#303030",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A200 A400 A700"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 700"}}),function(E){function e(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}e.$inject=["$mdThemingProvider"],n.$inject=["$mdTheming","$interpolate","$parse","$mdUtil","$q","$log"],o.$inject=["$mdTheming"],t.$inject=["$mdColorPalette","$$mdMetaProvider"],i.$inject=["$injector","$mdTheming"],E.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",n).directive("mdThemable",o).directive("mdThemesDisabled",function(){return C.disableTheming=!0,{restrict:"A",priority:"900"}}).provider("$mdTheming",t).config(e).run(i);var p,s={},l={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},c={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},h="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",f="",m=w("rgba(0,0,0,0.87)"),u=w("rgba(255,255,255,0.87)"),g=w("rgb(255,255,255)"),b=["primary","accent","warn","background"],a="primary",v={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},$={background:{default:"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};b.forEach(function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};v[e]||(v[e]=t),$[e]||($[e]=t)});var y=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],C={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null};function t(e,r){s.$inject=["$rootScope","$mdUtil","$q","$log"];var n,a={},m=!(p={}),u="default";E.extend(p,e);var t=function(e){var t=(e=E.isObject(e)?e:{}).theme||"default",n=e.hue||"800",o=p[e.palette]||p[a[t].colors[e.palette||"primary"].name],i=E.isObject(o[n])?o[n].hex:o[n];return"#"!==i.substr(0,1)&&(i="#"+i),function(e){var t=r.setMeta("theme-color",e),n=r.setMeta("msapplication-navbutton-color",e);return function(){t(),n()}}(i)};return n={definePalette:function(e,t){return t=t||{},p[e]=o(e,t),n},extendPalette:function(e,t){return o(e,E.extend({},p[e]||{},t))},theme:d,configuration:function(){return E.extend({},C,{defaultTheme:u,alwaysWatchTheme:m,registeredStyles:[].concat(C.registeredStyles)})},disableTheming:function(e){C.disableTheming=E.isUndefined(e)||!!e},registerStyles:function(e){C.registeredStyles.push(e)},setNonce:function(e){C.nonce=e},generateThemesOnDemand:function(e){C.generateOnDemand=e},setDefaultTheme:function(e){u=e},alwaysWatchTheme:function(e){m=e},enableBrowserColor:t,$get:s,_LIGHT_DEFAULT_HUES:v,_DARK_DEFAULT_HUES:$,_PALETTES:p,_THEMES:a,_parseRules:M,_rgba:_};function o(e,t){var n=y.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function d(e,t){if(a[e])return a[e];var n="string"==typeof(t=t||"default")?a[t]:t,o=new i(e);return n&&E.forEach(n.colors,function(e,t){o.colors[t]={name:e.name,hues:E.extend({},e.hues)}}),a[e]=o}function i(e){var a=this;function t(e){if((e=0===arguments.length||!!e)!==a.isDark){a.isDark=e,a.foregroundPalette=a.isDark?c:l,a.foregroundShadow=a.isDark?h:f;var t=a.isDark?$:v,r=a.isDark?v:$;return E.forEach(t,function(e,t){var n=a.colors[t],o=r[t];if(n)for(var i in n.hues)n.hues[i]===o[i]&&(n.hues[i]=e[i])}),a}}a.name=e,a.colors={},(a.dark=t)(!1),b.forEach(function(o){var i=(a.isDark?$:v)[o];a[o+"Palette"]=function(t,e){var n=a.colors[o]={name:t,hues:E.extend({},i,e)};return Object.keys(n.hues).forEach(function(e){if(!i[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",a.name).replace("%3",t).replace("%4",Object.keys(i).join(", ")))}),Object.keys(n.hues).map(function(e){return n.hues[e]}).forEach(function(e){if(-1==y.indexOf(e))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",a.name).replace("%3",o).replace("%4",t).replace("%5",y.join(", ")))}),a},a[o+"Color"]=function(){var e=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+o+"Color() has been deprecated. Use $mdThemingProviderTheme."+o+"Palette() instead."),a[o+"Palette"].apply(a,e)}})}function s(n,s,o,l){var i=function(e,t){t===ge&&(t=e,e=ge),e===ge&&(e=n),i.inherit(t,t)};return Object.defineProperty(i,"THEMES",{get:function(){return E.extend({},a)}}),Object.defineProperty(i,"PALETTES",{get:function(){return E.extend({},p)}}),Object.defineProperty(i,"ALWAYS_WATCH",{get:function(){return m}}),i.inherit=function(n,e){var o=e.controller("mdTheme")||n.data("$mdThemeController"),t=n.scope();if(d(o&&o.$mdTheme||("default"===u?"":u)),o){var i=m||o.$shouldWatch||s.parseAttributeBoolean(n.attr("md-theme-watch"));if(i||o.isAsyncTheme){var r=function(){a&&(a(),a=ge)},a=o.registerChanges(function(e){d(e),i||r()});t?t.$on("$destroy",r):n.on("$destroy",r)}}function d(e){if(e){c(e)||l.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e),o&&n.data("$mdThemeController",o)}}},i.registered=c,i.defaultTheme=function(){return u},i.generateTheme=function(e){A(a[e],e,C.nonce)},i.defineTheme=function(e,t){t=t||{};var n=d(e);return t.primary&&n.primaryPalette(t.primary,t.primaryHues),t.accent&&n.accentPalette(t.accent,t.accentHues),t.warn&&n.warnPalette(t.warn,t.warnHues),t.background&&n.backgroundPalette(t.background,t.backgroundHues),t.dark&&n.dark(),this.generateTheme(e),o.resolve(e)},i.setBrowserColor=t,i;function c(e){return e===ge||""===e||i.THEMES[e]!==ge}}}function n(p,h,f,g,b,v){return{priority:101,link:{pre:function(t,e,n){function o(){var e=h(n.mdTheme)(t);return f(e)(t)||e}var i=[],r=h.startSymbol(),a=h.endSymbol(),d=n.mdTheme.trim(),s=d.substr(0,r.length)===r&&d.lastIndexOf(a)===d.length-a.length,l="::"===n.mdTheme.split(r).join("").split(a).join("").trim().substr(0,"::".length),c={isAsyncTheme:E.isFunction(o())||E.isFunction(o().then),registerChanges:function(t,e){return e&&(t=E.bind(e,t)),i.push(t),function(){var e=i.indexOf(t);-1|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)\.md-default-theme((?:\s|>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g,function(e,t,n){return e+", "+t+n})),i.push(e)}),i}var T={};function i(e,t){var n=document.head,o=n?n.firstElementChild:null,i=!C.disableTheming&&e.has("$MD_THEME_CSS")?e.get("$MD_THEME_CSS"):"";if(i+=C.registeredStyles.join(""),o&&0!==i.length){E.forEach(p,function(o,e){var i=o.contrastDefaultColor,r=o.contrastLightColors||[],a=o.contrastStrongLightColors||[],d=o.contrastDarkColors||[];"string"==typeof r&&(r=r.split(" ")),"string"==typeof a&&(a=a.split(" ")),"string"==typeof d&&(d=d.split(" ")),delete o.contrastDefaultColor,delete o.contrastLightColors,delete o.contrastStrongLightColors,delete o.contrastDarkColors,E.forEach(o,function(e,t){if(!E.isObject(e)){var n=w(e);if(!n)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",e).replace("%2",o.name).replace("%3",t));o[t]={hex:o[t],value:n,contrast:"light"===i?-1i.right&&(t.left=n.right-e.width+"px");v.$.scrollContainer.css(t)},!1,p)}function D(){v.input.focus()}function I(){var e=v.scroller.querySelector(".selected");m.activeOption=e?e.id:null}function H(){if(m.hidden||f.enableScrolling(),fe.element(n).off("resize",w),v){fe.forEach(["ul","scroller","scrollContainer","input"],function(e){v.$[e].remove()})}}function O(e){e.preventDefault()}function P(e){e.stopPropagation()}function L(e){U(m.hidden=!0)}function R(){C||m.hidden||v.input.focus(),$=!1,m.hidden=V()}function F(t,n){N(),t?q(t).then(function(e){p.searchText=e,function(t,n){y.forEach(function(e){e(t,n)})}(t,n)}):n&&p.searchText&&q(n).then(function(e){fe.isString(p.searchText)&&e.toString().toLowerCase()===p.searchText.toLowerCase()&&(p.searchText="")}),t!==n&&fe.isFunction(p.itemChange)&&p.itemChange(z(p.selectedItem))}function B(t,n){m.index=p.autoselect?0:-1,t!==n&&(N(),q(p.selectedItem).then(function(e){t!==e&&(p.selectedItem=null,t!==n&&fe.isFunction(p.textChange)&&p.textChange(),Z()?ae():(W(!(m.matches=[])),ne(!0,x.Count)))}))}function U(e){e&&(C=$=!1),v.input.blur()}function j(){return fe.isNumber(p.minLength)?p.minLength:1}function q(e){return a.when(((t=e)&&p.itemText?p.itemText(z(t)):null)||e).then(function(e){return e&&!fe.isString(e)&&r.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e});var t}function z(e){if(!e)return ge;var t={};return m.itemName&&(t[m.itemName]=e),t}function W(e){m.loading!==e&&(m.loading=e),m.hidden=V()}function V(){return!function(){{if(m.isReadonly)return!1;if(!Y())return!1}return Z()&&G()||re()}()}function Y(){return!(m.loading&&!G())&&(!X()&&!!C)}function K(e){return!p.escapeOptions||-1!==p.escapeOptions.toLowerCase().indexOf(e)}function G(){return!!m.matches.length}function X(){return!!m.scope.selectedItem}function Q(){return q(m.matches[m.index])}function Z(){return(p.searchText||"").length>=j()}function J(e){f.nextTick(function(){q(m.matches[e]).then(function(e){var t=v.$.input.controller("ngModel");d.announce(e+" "+m.selectedMessage,"assertive"),t.$setViewValue(e),t.$render()}).finally(function(){p.selectedItem=m.matches[e],W(!1)})},!1)}function ee(){m.index=-1,f.nextTick(I),m.matches=[]}function te(){W(!0),p.searchText="";var e=document.createEvent("CustomEvent");e.initCustomEvent("change",!0,!0,{value:""}),v.input.dispatchEvent(e),v.input.blur(),p.searchText="",v.input.focus()}function ne(e,t){var n=e?"polite":"assertive",o=[];t&x.Selected&&-1!==m.index&&o.push(Q()),t&x.Count&&o.push(a.resolve(function(){switch(m.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+m.matches.length+" matches available."}}())),a.all(o).then(function(e){d.announce(e.join(" "),n)})}function oe(){v.li[0]&&(_===pe?function(){var e=v.li[Math.max(0,m.index)],t=v.scrollContainer.offsetHeight,n=e&&e.offsetTop||0,o=n+e.clientHeight,i=v.scrollContainer.scrollTop;n=j()&&(C||$)&&!X()}function ae(){var e=p.searchText||"",t=e.toLowerCase();!p.noCache&&E[t]?de(E[t]):function(t){var e=p.$parent.$eval(b),n=t.toLowerCase(),o=fe.isArray(e),i=!!e.then;function r(e){E[n]=e,(t||"")===(p.searchText||"")&&de(e)}o?r(e):i&&function(e){if(!e)return;e=a.when(e),M++,W(!0),f.nextTick(function(){e.then(r).finally(function(){0==--M&&W(!1)})},!0,p)}(e)}(e),m.hidden=V()}function de(e){m.matches=e,m.hidden=V(),m.loading&&W(!1),p.selectOnMatch&&function(){var n=p.searchText,e=m.matches,t=e[0];1===e.length&&q(t).then(function(e){var t=n===e;p.matchInsensitive&&!t&&(t=n.toLowerCase()===e.toLowerCase()),t&&J(0)})}(),S(),ne(!0,x.Count)}function se(e,t){g[e]&&p.$parent.$eval(g[e],t||{})}}}(),Z.$inject=["$$mdSvgRegistry"],fe.module("material.components.autocomplete").directive("mdAutocomplete",Z),J.$inject=["$compile","$mdUtil"],fe.module("material.components.autocomplete").directive("mdAutocompleteParentScope",J),ee.$inject=["$scope","$element","$attrs"],fe.module("material.components.autocomplete").controller("MdHighlightCtrl",ee),ee.prototype.init=function(t,n){this.flags=this.$attrs.mdHighlightFlags||"",this.unregisterFn=this.$scope.$watch(function(e){return{term:t(e),contentText:n(e)}}.bind(this),this.onRender.bind(this),!0),this.$element.on("$destroy",this.unregisterFn)},ee.prototype.onRender=function(e,t){var n=e.contentText;null!==this.regex&&e.term===t.term||(this.regex=this.createRegex(e.term,this.flags)),e.term?this.applyRegex(n):this.$element.text(n)},ee.prototype.applyRegex=function(e){var t=this.resolveTokens(e);this.$element.empty(),t.forEach(function(e){if(e.isMatch){var t=fe.element('').text(e.text);this.$element.append(t)}else this.$element.append(document.createTextNode(e))}.bind(this))},ee.prototype.resolveTokens=function(o){var i=[],n=0;return o.replace(this.regex,function(e,t){r(n,t),i.push({text:e,isMatch:!0}),n=t+e.length}),r(n),i;function r(e,t){var n=o.slice(e,t);n&&i.push(n)}},ee.prototype.createRegex=function(e,t){var n="",o="",i=this.sanitizeRegex(e);return 0<=t.indexOf("^")&&(n="^"),0<=t.indexOf("$")&&(o="$"),new RegExp(n+i+o,t.replace(/[$^]/g,""))},ee.prototype.sanitizeRegex=function(e){return e&&e.toString().replace(/[\\^$*+?.()|{}[\]]/g,"\\$&")},te.$inject=["$interpolate","$parse"],fe.module("material.components.autocomplete").directive("mdHighlightText",te),fe.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(a,d,t,s,l,c,m,u){return{restrict:"E",link:function(n,o,e){var i;function r(){var e=parseInt(i.height,10)+Math.abs(parseInt(i.top,10));o.css("height",e+"px")}t.pin&&t.pin(o,s),m(function(){if("fixed"===(i=l.getComputedStyle(u[0].body)).position){var e=d.debounce(function(){i=l.getComputedStyle(u[0].body),r()},60,null,!1);r(),fe.element(l).on("resize",e),n.$on("$destroy",function(){fe.element(l).off("resize",e)})}var t=o.parent();t.length&&("BODY"===t[0].nodeName&&o.css("position","fixed"),"static"===l.getComputedStyle(t[0]).position&&c.warn(" may not work properly in a scrolled, static-positioned parent container."),a.inherit(o,t))})}}}]),ne.$inject=["$mdBottomSheet"],oe.$inject=["$$interimElementProvider"],fe.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",ne).provider("$mdBottomSheet",oe),re.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$mdInteraction"],ie.$inject=["$mdTheming"],fe.module("material.components.button",["material.core"]).directive("mdButton",re).directive("a",ie),ae.$inject=["$mdTheming"],fe.module("material.components.card",["material.core"]).directive("mdCard",ae),de.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$mdInteraction"],fe.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",de),fe.module("material.components.chips",["material.core","material.components.autocomplete"]),se.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],fe.module("material.components.chips").controller("MdChipCtrl",se),se.prototype.init=function(e){this.parentController=e,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("dblclick",this.chipMouseDoubleClick.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},se.prototype.getChipContent=function(){var e=this.$element[0].getElementsByClassName("md-chip-content");return fe.element(e[0])},se.prototype.getContentElement=function(){var e=fe.element(this.getChipContent().children()[0]);return e&&0!==e.length||(e=fe.element(this.getChipContent().contents()[0])),e},se.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},se.prototype.goOutOfEditMode=function(){if(this.isEditing){this.isEditing=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var e=this.getChipIndex(),t=this.getContentElement().text();t?(this.parentController.updateChipContents(e,t),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===e&&this.parentController.focusChip(e)}.bind(this))):this.parentController.removeChipAndFocusInput(e)}},se.prototype.selectNodeContents=function(e){var t,n;document.body.createTextRange?((t=document.body.createTextRange()).moveToElementText(e),t.select()):R.getSelection&&(n=R.getSelection(),(t=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(t))},se.prototype.goInEditMode=function(){this.isEditing=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},se.prototype.chipKeyDown=function(e){this.isEditing||e.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&e.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditing&&e.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(e.preventDefault(),this.goOutOfEditMode()):(e.preventDefault(),this.goInEditMode())},se.prototype.chipMouseDoubleClick=function(){this.enableChipEdit&&!this.isEditing&&this.goInEditMode()},le.$inject=["$mdTheming","$mdUtil","$compile","$timeout"],fe.module("material.components.chips").directive("mdChip",le),ce.$inject=["$timeout"],fe.module("material.components.chips").directive("mdChipRemove",ce),me.$inject=["$compile"],fe.module("material.components.chips").directive("mdChipTransclude",me),function(){e.$inject=["$scope","$attrs","$mdConstant","$log","$element","$timeout","$mdUtil","$mdLiveAnnouncer","$exceptionHandler"];var l=300;function e(e,t,n,o,i,r,a,d,s){this.$timeout=r,this.$mdConstant=n,this.$scope=e,this.parent=e.$parent,this.$mdUtil=a,this.$log=o,this.$mdLiveAnnouncer=d,this.$exceptionHandler=s,this.$element=i,this.$attrs=t,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.autocompleteCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.enableChipEdit=a.parseAttributeBoolean(t.mdEnableChipEdit),this.addOnBlur=a.parseAttributeBoolean(t.mdAddOnBlur),this.inputAriaLabel="Chips input.",this.containerHint="Chips container. Use arrow keys to select chips.",this.containerEmptyHint="Chips container. Enter the text area, then type text, and press enter to add a chip.",this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1,this.wrapperId="",this.contentIds=[],this.ariaTabIndex=null,this.chipAppendDelay=l,this.deRegister=[],this.addedMessage="added",this.removedMessage="removed",this.init()}fe.module("material.components.chips").controller("MdChipsCtrl",e),e.prototype.init=function(){var t=this;this.wrapperId="_md-chips-wrapper-"+this.$mdUtil.nextUid(),this.$element.attr("ng-model")||this.setupStaticChips(),this.deRegister.push(this.$scope.$watchCollection("$mdChipsCtrl.items",function(){t.setupInputAria(),t.setupWrapperAria()})),this.deRegister.push(this.$attrs.$observe("mdChipAppendDelay",function(e){t.chipAppendDelay=parseInt(e)||l}))},e.prototype.$onDestroy=function(){for(var e;e=this.deRegister.pop();)e.call(this)},e.prototype.setupInputAria=function(){var e=this.$element.find("input");e&&(e.attr("role","textbox"),e.attr("aria-multiline",!0),this.inputAriaDescribedBy&&e.attr("aria-describedby",this.inputAriaDescribedBy),this.inputAriaLabelledBy?(e.attr("aria-labelledby",this.inputAriaLabelledBy),e.removeAttr("aria-label")):e.attr("aria-label",this.inputAriaLabel))},e.prototype.setupWrapperAria=function(){var e=this,t=this.$element.find("md-chips-wrap");this.items&&this.items.length?(t.attr("role","listbox"),this.contentIds=this.items.map(function(){return e.wrapperId+"-chip-"+e.$mdUtil.nextUid()}),t.attr("aria-owns",this.contentIds.join(" ")),t.attr("aria-label",this.containerHint)):(t.removeAttr("role"),t.removeAttr("aria-owns"),t.attr("aria-label",this.containerEmptyHint))},e.prototype.setupStaticChips=function(){var e,t,n=this,o=this.$element.find("md-chips-wrap");this.$timeout(function(){for(o.attr("role","list"),t=o[0].children,e=0;e=this.maxChips},e.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached()),this.ngModelCtrl.$validate()},e.prototype.updateNgModel=function(e){e||this.validateModel(),fe.forEach(this.ngModelCtrl.$viewChangeListeners,function(e){try{e()}catch(e){this.$exceptionHandler(e)}})},e.prototype.removeChip=function(e,t){var n=this.items.splice(e,1);this.updateNgModel(),this.ngModelCtrl.$setDirty();var o=fe.isObject(n[0])?"":n[0];this.$mdLiveAnnouncer.announce(o+" "+this.removedMessage,"assertive"),n&&n.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:n[0],$index:e,$event:t})},e.prototype.removeChipAndFocusInput=function(e,t){this.removeChip(e,t),this.autocompleteCtrl?(this.autocompleteCtrl.hidden=!0,this.$mdUtil.nextTick(this.onFocus.bind(this))):this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){if(!this.items.length||-1===e)return this.focusInput();if(e>=this.items.length){if(!this.readonly)return this.onFocus();e=0}e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),this.focusChip(e)},e.prototype.focusLastChipThenInput=function(){var e=this;e.shouldFocusLastChip=!1,e.focusChip(this.items.length-1),e.$timeout(function(){e.focusInput()},e.chipAppendDelay)},e.prototype.focusInput=function(){this.selectChip(-1),this.onFocus()},e.prototype.selectChip=function(e){-1<=e&&e<=this.items.length?(this.selectedChip=e,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[e]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.selectAndFocusChip=function(e){this.selectChip(e),-1!==e&&this.focusChip(e)},e.prototype.focusChip=function(e){var t=this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content');this.ariaTabIndex=e,t.focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$isEmpty=function(e){return!e||0===e.length},e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.setupInputAria(),this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1,this.shouldAddOnBlur()&&(this.appendChip(this.getChipBuffer().trim()),this.resetChipBuffer())},e.prototype.configureInput=function(e){var t=e.controller("ngModel"),n=this;t&&(this.deRegister.push(this.$scope.$watch(function(){return t.$touched},function(e){e&&n.ngModelCtrl.$setTouched()})),this.deRegister.push(this.$scope.$watch(function(){return t.$dirty},function(e){e&&n.ngModelCtrl.$setDirty()})))},e.prototype.configureUserInput=function(e){var t=(this.userInputElement=e).controller("ngModel");t!==this.ngModelCtrl&&(this.userInputNgModelCtrl=t);function n(e,t){o.$evalAsync(fe.bind(i,t,e))}var o=this.$scope,i=this;e.attr({tabindex:0}).on("keydown",function(e){n(e,i.inputKeydown)}).on("focus",function(e){n(e,i.onInputFocus)}).on("blur",function(e){n(e,i.onInputBlur)})},e.prototype.configureAutocomplete=function(e){e&&(this.autocompleteCtrl=e,this.$element.attr("container-empty-hint")||(this.containerEmptyHint="Chips container with autocompletion. Enter the text area, type text to search, and then use the up and down arrow keys to select an option. Press enter to add the selected option as a chip.",this.setupWrapperAria()),e.registerSelectedItemWatcher(fe.bind(this,function(e){if(e){if(this.hasMaxChipsReached())return;this.appendChip(e),this.resetChipBuffer()}})),this.$element.find("input").on("focus",fe.bind(this,this.onInputFocus)).on("blur",fe.bind(this,this.onInputBlur)))},e.prototype.shouldAddOnBlur=function(){this.validateModel();var e=this.getChipBuffer().trim(),t=this.ngModelCtrl.$isEmpty(this.ngModelCtrl.$modelValue)||this.ngModelCtrl.$valid,n=this.autocompleteCtrl&&!this.autocompleteCtrl.hidden;return this.userInputNgModelCtrl&&(t=t&&this.userInputNgModelCtrl.$valid),this.addOnBlur&&!this.requireMatch&&e&&t&&!n},e.prototype.hasFocus=function(){return this.inputHasFocus||0<=this.selectedChip},e.prototype.contentIdFor=function(e){return this.contentIds[e]}}(),function(){o.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],fe.module("material.components.chips").directive("mdChips",o);var e='
',t=' ',n=" {{$chip}}",i=' ';function o(u,p,h,o,f,g){var b={chips:p.processTemplate(e),input:p.processTemplate(t),default:p.processTemplate(n),remove:p.processTemplate(i)};return{template:function(e,t){return t.$mdUserTemplate=e.clone(),b.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:function(e,a){var n=a.$mdUserTemplate;a.$mdUserTemplate=null;var d=t("md-chips>md-chip-template"),s=t(p.prefixer().buildList("md-chip-remove").map(function(e){return"md-chips>*["+e+"]"}).join(","))||b.remove,l=d||b.default,c=t("md-chips>md-autocomplete")||t("md-chips>input")||b.input,m=n.find("md-chip");n[0].querySelector("md-chip-template>*[md-chip-remove]")&&o.warn("invalid placement of md-chip-remove within md-chip-template.");function t(e){if(a.ngModel){var t=n[0].querySelector(e);return t&&t.outerHTML}}return function(e,t,n,o){p.initOptionalProperties(e,a),u(t);var i=o[0];if(d&&(i.enableChipEdit=!1),i.chipContentsTemplate=l,i.chipRemoveTemplate=s,i.chipInputTemplate=c,i.mdCloseIcon=g.mdClose,t.attr({tabindex:-1}).on("focus",function(){i.onFocus()}).on("click",function(){i.readonly||-1!==i.selectedChip||i.onFocus()}),a.ngModel&&(i.configureNgModel(t.controller("ngModel")),n.mdTransformChip&&i.useTransformChipExpression(),n.mdOnAppend&&i.useOnAppendExpression(),n.mdOnAdd&&i.useOnAddExpression(),n.mdOnRemove&&i.useOnRemoveExpression(),n.mdOnSelect&&i.useOnSelectExpression(),c!==b.input&&e.$watch("$mdChipsCtrl.readonly",function(e){e||p.nextTick(function(){if(0===c.indexOf("'},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_mode:"@mdMode",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:e,controllerAs:"calendarCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0];o[1].configureNgModel(i)}}});var m=0,t={day:"month",month:"year"};function e(e,t,n,o,i,r,a,d,s){r(e),this.$element=e,this.$scope=t,this.dateUtil=n,this.$mdUtil=o,this.keyCode=i.KEY_CODE,this.$$rAF=a,this.$mdDateLocale=s,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=m++,this.displayDate=null,this.selectedDate=null,this.firstRenderableDate=null,this.lastRenderableDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,d.tabindex||e.attr("tabindex","-1");var l,c=fe.bind(this,this.handleKeyEvent);(l=e.parent().hasClass("md-datepicker-calendar")?fe.element(document.body):e).on("keydown",c),t.$on("$destroy",function(){l.off("keydown",c)}),1===fe.version.major&&fe.version.minor<=4&&this.$onInit()}e.prototype.$onInit=function(){this._mode&&t.hasOwnProperty(this._mode)?(this.currentView=t[this._mode],this.mode=this._mode):(this.currentView=this._currentView||"month",this.mode=null);var e=this.$mdDateLocale;this.minDate&&this.minDate>e.firstRenderableDate?this.firstRenderableDate=this.minDate:this.firstRenderableDate=e.firstRenderableDate,this.maxDate&&this.maxDate