Skip to content

Instantly share code, notes, and snippets.

@Raafet Raafet/arb-md.js
Created Mar 20, 2017

Embed
What would you like to do?
/*
Angular Material Design
https://github.com/angular/material
@license MIT
v1.1.0
*/
(function(E,e,I){e.module("ngMaterial","ng ngAnimate ngAria material.core material.core.gestures material.core.layout material.core.theming.palette material.core.theming material.core.animate material.components.autocomplete material.components.backdrop material.components.bottomSheet material.components.button material.components.card material.components.checkbox material.components.chips material.components.colors material.components.content material.components.datepicker material.components.dialog material.components.divider material.components.fabActions material.components.fabShared material.components.fabSpeedDial material.components.fabToolbar material.components.gridList material.components.icon material.components.input material.components.list material.components.menu material.components.menuBar material.components.navBar material.components.panel material.components.progressCircular material.components.progressLinear material.components.radioButton material.components.select material.components.showHide material.components.sidenav material.components.slider material.components.sticky material.components.subheader material.components.swipe material.components.switch material.components.tabs material.components.toast material.components.toolbar material.components.tooltip material.components.virtualRepeat material.components.whiteframe".split(" "));
(function(){function l(d,a){a.has("$swipe")&&d.warn("You are using the ngTouch module. \nAngular Material already has mobile click, tap, and swipe support... \nngTouch is not supported with Angular Material!")}function k(f,a){f.decorator("$$rAF",["$delegate",d]);a.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function d(d){d.throttle=function(a){var c,g,b,h;return function(){c=arguments;h=this;b=a;g||(g=!0,d(function(){b.apply(h,
Array.prototype.slice.call(c));g=!1}))}};return d}e.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.gestures","material.core.theming"]).config(k).run(l);l.$inject=["$log","$injector"];k.$inject=["$provide","$mdThemingProvider"];d.$inject=["$delegate"]})();(function(){function l(){return{restrict:"A",link:k}}function k(d,f,a){d.$watch(a.mdAutoFocus||a.mdAutofocus||a.mdSidenavFocus,function(a){f.toggleClass("md-autofocus",a)})}e.module("material.core").directive("mdAutofocus",
l).directive("mdAutoFocus",l).directive("mdSidenavFocus",l)})();(function(){e.module("material.core").factory("$mdColorUtil",function(){return{rgbaToHex:function(e){e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return(e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"").toUpperCase()},hexToRgba:function(e){var k="#"===e[0]?e.substr(1):e;e=k.length/3;var d=
k.substr(0,e),f=k.substr(e,e),k=k.substr(2*e);1===e&&(d+=d,f+=f,k+=k);return"rgba("+parseInt(d,16)+","+parseInt(f,16)+","+parseInt(k,16)+",0.1)"},rgbToRgba:function(e){return e.replace(")",", 0.1)").replace("(","a(")},rgbaToRgb:function(e){return e?e.replace("rgba","rgb").replace(/,[^\),]+\)/,")"):"rgb(0,0,0)"}}})})();(function(){function l(k,d,f){function a(b){var a=c(g+"-"+b),d=a.charAt(0).toLowerCase()+a.substring(1);return e.isDefined(h.style[b])?b:e.isDefined(h.style[a])?a:e.isDefined(h.style[d])?
d:b}function c(a){return a.replace(b,function(b,a,c,g){return g?c.toUpperCase():c})}var g=k.vendorPrefix;k=/webkit/i.test(g);var b=/([:\-_]+(.))/g,h=document.createElement("div"),m={isInputKey:function(b){return 31<=b.keyCode&&90>=b.keyCode},isNumPadKey:function(b){return 3===b.location&&97<=b.keyCode&&105>=b.keyCode},isNavigationKey:function(b){var a=m.KEY_CODE;return-1!=[a.SPACE,a.ENTER,a.UP_ARROW,a.DOWN_ARROW].indexOf(b.keyCode)},KEY_CODE:{COMMA:188,SEMICOLON:186,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,
PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(k?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(k?" webkitAnimationEnd":""),TRANSFORM:a("transform"),TRANSFORM_ORIGIN:a("transformOrigin"),TRANSITION:a("transition"),TRANSITION_DURATION:a("transitionDuration"),ANIMATION_PLAY_STATE:a("animationPlayState"),ANIMATION_DURATION:a("animationDuration"),ANIMATION_NAME:a("animationName"),ANIMATION_TIMING:a("animationTimingFunction"),
ANIMATION_DIRECTION:a("animationDirection")},MEDIA:{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)",print:"print"},MEDIA_PRIORITY:"xl gt-lg lg gt-md md gt-sm sm gt-xs xs landscape portrait print".split(" ")};
return m}e.module("material.core").factory("$mdConstant",l);l.$inject=["$sniffer","$window","$document"]})();(function(){function l(k,d){function f(b){return p.length&&-1<b&&b<p.length}function a(b){return p.indexOf(b)}function c(b){return b&&-1<a(b)}function g(){return p.length?p[0]:null}function b(){return p.length?p[p.length-1]:null}function h(c,h,k,l){k=k||m;for(h=a(h);;){if(!f(h))return null;h+=c?-1:1;var q=null;f(h)?q=p[h]:d&&(q=c?b():g(),h=a(q));if(null===q||h===l)return null;if(k(q))return q;
e.isUndefined(l)&&(l=h)}}var m=function(){return!0};k&&!e.isArray(k)&&(k=Array.prototype.slice.call(k));d=!!d;var p=k||[];return{items:function(){return[].concat(p)},count:function(){return p.length},inRange:f,contains:c,indexOf:a,itemAt:function(b){return f(b)?p[b]:null},findBy:function(b,a){return p.filter(function(c){return c[b]===a})},add:function(b,c){if(!b)return-1;e.isNumber(c)||(c=p.length);p.splice(c,0,b);return a(b)},remove:function(b){c(b)&&p.splice(a(b),1)},first:g,last:b,next:e.bind(null,
h,!1),previous:e.bind(null,h,!0),hasPrevious:function(b){return b?f(a(b)-1):!1},hasNext:function(b){return b?f(a(b)+1):!1}}}e.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(d){d.iterator=l;return d}])}])})();(function(){function l(k,d,f){function a(a){var g=b[a];e.isUndefined(g)&&(g=k.MEDIA[a]||("("!==a.charAt(0)?"("+a+")":a),g=b[a]=g);a=m[g];e.isUndefined(a)&&((a=h[g])||(a=h[g]=f.matchMedia(g)),a.addListener(c),a=m[a.media]=!!a.matches);return a}
function c(b){d.$evalAsync(function(){m[b.media]=!!b.matches})}function g(b,a){return p[a]||(p[a]=b.$normalize(a))}var b={},h={},m={},p={};a.getResponsiveAttribute=function(a,c){for(var d=0;d<k.MEDIA_PRIORITY.length;d++){var e=k.MEDIA_PRIORITY[d];if(h[b[e]].matches&&(e=g(a,c+"-"+e),a[e]))return a[e]}return a[g(a,c)]};a.getQuery=function(b){return h[b]};a.watchResponsiveAttributes=function(b,a,c){var d=[];b.forEach(function(b){var h=g(a,b);e.isDefined(a[h])&&d.push(a.$observe(h,e.bind(void 0,c,null)));
for(var f in k.MEDIA)h=g(a,b+"-"+f),e.isDefined(a[h])&&d.push(a.$observe(h,e.bind(void 0,c,f)))});return function(){d.forEach(function(b){b()})}};return a}e.module("material.core").factory("$mdMedia",l);l.$inject=["$mdConstant","$rootScope","$window"]})();(function(){function l(k,d){function f(a){a=e.isArray(a)?a:[a];a.forEach(function(b){c.forEach(function(c){a.push(c+"-"+b)})});return a}function a(a){a=e.isArray(a)?a:[a];return f(a).map(function(a){return"["+a+"]"}).join(",")}var c=["data","x"];
return k?d?a(k):f(k):{buildList:f,buildSelector:a,hasAttribute:function(a,b){a=a[0]||a;for(var c=f(b),d=0;d<c.length;d++)if(a.hasAttribute(c[d]))return!0;return!1},removeAttribute:function(a,b){a=a[0]||a;f(b).forEach(function(b){a.removeAttribute(b)})}}}e.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(d){d.prefixer=l;return d}])}])})();(function(){function l(d,f,a,c,g,b,h,m,p,q){function n(a){return a?-1<String(a).indexOf("px")||-1<String(a).indexOf("%")?
a:a+"px":"0"}var l=b.startSymbol(),y=b.endSymbol(),w="{{"===l&&"}}"===y,v=function(a,b,c){var d=!1;a&&a.length&&(a=p.getComputedStyle(a[0]),d=e.isDefined(a[b])&&(c?a[b]==c:!0));return d},t={dom:{},now:E.performance?e.bind(E.performance,E.performance.now):Date.now||function(){return(new Date).getTime()},bidi:function(a,b,c,g){var h=!("rtl"==d[0].dir||"rtl"==d[0].body.dir);if(0==arguments.length)return h?"ltr":"rtl";var f=e.element(a);h&&e.isDefined(c)?f.css(b,n(c)):!h&&e.isDefined(g)&&f.css(b,n(g))},
bidiProperty:function(a,b,c,g){var h=!("rtl"==d[0].dir||"rtl"==d[0].body.dir);a=e.element(a);h&&e.isDefined(b)?(a.css(b,n(g)),a.css(c,"")):!h&&e.isDefined(c)&&(a.css(c,n(g)),a.css(b,""))},clientRect:function(a,b,c){a=a[0]||a;b=b||a.offsetParent||document.body;b=b[0]||b;a=a.getBoundingClientRect();c=c?b.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:a.left-c.left,top:a.top-c.top,width:a.width,height:a.height}},offsetRect:function(a,b){return t.clientRect(a,b,!0)},nodesToArray:function(a){a=
a||[];for(var b=[],c=0;c<a.length;++c)b.push(a.item(c));return b},scrollTop:function(a){a=e.element(a||d[0].body);var b=a[0]==d[0].body?d[0].body:I;return(b?b.scrollTop+b.parentElement.scrollTop:0)||Math.abs(a[0].getBoundingClientRect().top)},findFocusTarget:function(a,b){function c(a,b){var c,d=a[0].querySelectorAll(b);d&&d.length&&d.length&&e.forEach(d,function(a){a=e.element(a);a.hasClass("md-autofocus")&&(c=a)});return c}var d=this.prefixer("md-autofocus",!0),g;g=c(a,b||d);g||b==d||(g=c(a,this.prefixer("md-auto-focus",
!0)))||(g=c(a,d));return g},disableScrollAround:function(a,b,c){function g(a,b){for(var c in b)a.style[c]=b[c]}t.disableScrollAround._count=t.disableScrollAround._count||0;++t.disableScrollAround._count;if(t.disableScrollAround._enableScrolling)return t.disableScrollAround._enableScrolling;var h=d[0].body,f=function(){var a=h.parentNode,b=a.style.cssText||"",c=h.style.cssText||"",d=t.scrollTop(h),e=h.clientWidth;h.scrollHeight>h.clientHeight+1&&(g(h,{position:"fixed",width:"100%",top:-d+"px"}),a.style.overflowY=
"scroll");h.clientWidth<e&&g(h,{overflow:"hidden"});return function(){h.style.cssText=c;a.style.cssText=b;h.scrollTop=d;a.scrollTop=d}}(),m=function(a){function b(a){a.preventDefault()}a=e.element(a||h);var d;c&&c.disableScrollMask?d=a:(a=a[0],d=e.element('<div class="md-scroll-mask"> <div class="md-scroll-mask-bar"></div></div>'),a.appendChild(d[0]));d.on("wheel",b);d.on("touchmove",b);return function(){d.off("wheel");d.off("touchmove");d[0].parentNode.removeChild(d[0]);delete t.disableScrollAround._enableScrolling}}(b);
return t.disableScrollAround._enableScrolling=function(){--t.disableScrollAround._count||(f(),m(),delete t.disableScrollAround._enableScrolling)}},enableScrolling:function(){var a=this.disableScrollAround._enableScrolling;a&&a()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===I){var a=e.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});a.children().css("height","60px");d[0].body.appendChild(a[0]);this.floatingScrollbars.cached=
a[0].offsetWidth==a[0].childNodes[0].offsetWidth;a.remove()}return this.floatingScrollbars.cached},forceFocus:function(a){var b=a[0]||a;document.addEventListener("click",function C(a){a.target===b&&a.$focus&&(b.focus(),a.stopImmediatePropagation(),a.preventDefault(),b.removeEventListener("click",C))},!0);a=document.createEvent("MouseEvents");a.initMouseEvent("click",!1,!0,E,{},0,0,0,0,!1,!1,!1,!1,0,null);a.$material=!0;a.$focus=!0;b.dispatchEvent(a)},createBackdrop:function(b,c){return a(t.supplant('<md-backdrop class="{0}">',
[c]))(b)},supplant:function(a,b,c){c=c||/\{([^\{\}]*)\}/g;return a.replace(c,function(a,c){var d=c.split("."),h=b;try{for(var g in d)d.hasOwnProperty(g)&&(h=h[d[g]])}catch(J){h=a}return"string"===typeof h||"number"===typeof h?h:a})},fakeNgModel:function(){return{$fake:!0,$setTouched:e.noop,$setViewValue:function(a){this.$viewValue=a;this.$render(a);this.$viewChangeListeners.forEach(function(a){a()})},$isEmpty:function(a){return 0===(""+a).length},$parsers:[],$formatters:[],$viewChangeListeners:[],
$render:e.noop}},debounce:function(a,b,c,d){var h;return function(){var g=Array.prototype.slice.call(arguments);f.cancel(h);h=f(function(){h=I;a.apply(c,g)},b||10,d)}},throttle:function(a,b){var c;return function(){var d=arguments,h=t.now();if(!c||h-c>b)a.apply(this,d),c=h}},time:function(a){var b=t.now();a();return t.now()-b},valueOnUse:function(a,b,c){var d=null,h=Array.prototype.slice.call(arguments),g=3<h.length?h.slice(3):[];Object.defineProperty(a,b,{get:function(){null===d&&(d=c.apply(a,g));
return d}})},nextUid:function(){return""+k++},disconnectScope:function(a){if(a&&a.$root!==a&&!a.$$destroyed){var b=a.$parent;a.$$disconnected=!0;b.$$childHead===a&&(b.$$childHead=a.$$nextSibling);b.$$childTail===a&&(b.$$childTail=a.$$prevSibling);a.$$prevSibling&&(a.$$prevSibling.$$nextSibling=a.$$nextSibling);a.$$nextSibling&&(a.$$nextSibling.$$prevSibling=a.$$prevSibling);a.$$nextSibling=a.$$prevSibling=null}},reconnectScope:function(a){if(a&&a.$root!==a&&a.$$disconnected){var b=a.$parent;a.$$disconnected=
!1;a.$$prevSibling=b.$$childTail;b.$$childHead?(b.$$childTail.$$nextSibling=a,b.$$childTail=a):b.$$childHead=b.$$childTail=a}},getClosest:function(a,b,c){if(e.isString(b)){var d=b.toUpperCase();b=function(a){return a.nodeName===d}}a instanceof e.element&&(a=a[0]);c&&(a=a.parentNode);if(!a)return null;do if(b(a))return a;while(a=a.parentNode);return null},elementContains:function(a,b){return(E.Node&&E.Node.prototype&&Node.prototype.contains?e.bind(a,a.contains):e.bind(a,function(c){return a===b||!!(this.compareDocumentPosition(c)&
16)}))(b)},extractElementByName:function(a,b,c,d){function g(a){var d;a:{if(a){d=0;for(var h=a.length;d<h;d++)if(a[d].nodeName.toLowerCase()===b){d=a[d];break a}}d=null}if(!d){if(c){var e;if(a)for(d=0,h=a.length;d<h;d++){var f=a[d];if(!e)for(var m=0,p=f.childNodes.length;m<p;m++)e=e||g([f.childNodes[m]])}a=e}else a=null;d=a}return d}var f=g(a);!f&&d&&h.warn(t.supplant("Unable to find node '{0}' in element '{1}'.",[b,a[0].outerHTML]));return e.element(f||a)},initOptionalProperties:function(a,b,c){c=
c||{};e.forEach(a.$$isolateBindings,function(d,h){if(d.optional&&e.isUndefined(a[h])){var g=e.isDefined(b[d.attrName]);a[h]=e.isDefined(c[h])?c[h]:g}})},nextTick:function(a,b,d){function h(){var a=g.queue,b=g.digest;g.queue=[];g.timeout=null;g.digest=!1;a.forEach(function(a){a.scope&&a.scope.$$destroyed||a.callback()});b&&c.$digest()}var g=t.nextTick,e=g.timeout,m=g.queue||[];m.push({scope:d,callback:a});null==b&&(b=!0);g.digest=g.digest||b;g.queue=m;return e||(g.timeout=f(h,0,!1))},processTemplate:function(a){return w?
a:a&&e.isString(a)?a.replace(/\{\{/g,l).replace(/}}/g,y):a},getParentWithPointerEvents:function(a){for(a=a.parent();v(a,"pointer-events","none");)a=a.parent();return a},getNearestContentElement:function(a){for(a=a.parent()[0];a&&a!==m[0]&&a!==document.body&&"MD-CONTENT"!==a.nodeName.toUpperCase();)a=a.parentNode;return a},checkStickySupport:function(){var a,b=e.element("<div>");d[0].body.appendChild(b[0]);for(var c=["sticky","-webkit-sticky"],h=0;h<c.length;++h)if(b.css({position:c[h],top:0,"z-index":2}),
b.css("position")==c[h]){a=c[h];break}b.remove();return a},parseAttributeBoolean:function(a,b){return""===a||!!a&&(!1===b||"false"!==a&&"0"!==a)},hasComputedStyle:v,isParentFormSubmitted:function(a){return(a=(a=t.getClosest(a,"form"))?e.element(a).controller("form"):null)?a.$submitted:!1},animateScrollTo:function(a,b){function c(){var f;f=t.now()-e;if(1E3<f)f=d+h;else{var m=(f/=1E3)*f;f=d+h*(-2*m*f+3*m)}a.scrollTop=f;(g?f<b:f>b)&&q(c)}var d=a.scrollTop,h=b-d,g=d<b,e=t.now();q(c)}};t.dom.animator=
g(t);return t}var k=0;e.module("material.core").factory("$mdUtil",l);l.$inject="$document $timeout $compile $rootScope $$mdAnimate $interpolate $log $rootElement $window $$rAF".split(" ");e.element.prototype.focus=e.element.prototype.focus||function(){this.length&&this[0].focus();return this};e.element.prototype.blur=e.element.prototype.blur||function(){this.length&&this[0].blur();return this}})();(function(){function l(k,d,f,a){function c(a,b,c){var g=e.element(a)[0]||a,m;if(m=g){if(!(m=g.hasAttribute(b)&&
0!==g.getAttribute(b).length)&&(m=!1,g.hasChildNodes()))for(var p=g.childNodes,k=0;k<p.length;k++){var v=p[k];1===v.nodeType&&v.hasAttribute(b)&&"none"!==(v.currentStyle?v.currentStyle:f.getComputedStyle(v)).display&&(m=!0)}m=!m}m&&(c=e.isString(c)?c.trim():"",c.length?a.attr(b,c):h&&d.warn('ARIA: Attribute "',b,'", required for accessibility, is missing on node:',g))}function g(a,b,d){k(function(){c(a,b,d())})}function b(a){a=a[0]||a;for(var b=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,
!1),c="",d;d=b.nextNode();){var h;a:{for(h=d;h.parentNode&&(h=h.parentNode)!==a;)if(h.getAttribute&&"true"===h.getAttribute("aria-hidden")){h=!0;break a}h=void 0}h||(c+=d.textContent)}return c.trim()||""}var h=this.showWarnings;return{expect:c,expectAsync:g,expectWithText:function(d,h){var e=b(d)||"";-1<e.indexOf(a.startSymbol())?g(d,h,function(){return b(d)}):c(d,h,e)},expectWithoutText:function(d,h){var g=b(d);-1<g.indexOf(a.startSymbol())||g||c(d,h,g)}}}e.module("material.core").provider("$mdAria",
function(){var e=this;e.showWarnings=!0;return{disableWarnings:function(){e.showWarnings=!1},$get:["$$rAF","$log","$window","$interpolate",function(d,f,a,c){return l.apply(e,arguments)}]}});l.$inject=["$$rAF","$log","$window","$interpolate"]})();(function(){function l(k,d,f,a,c){this.compile=function(g){var b=g.templateUrl,h=g.template||"",m=g.controller,p=g.controllerAs,q=e.extend({},g.resolve||{}),n=e.extend({},g.locals||{}),l=g.transformTemplate||e.identity,y=g.bindToController;e.forEach(q,function(a,
b){e.isString(a)?q[b]=f.get(a):q[b]=f.invoke(a)});e.extend(q,n);q.$template=b?d(b).then(function(a){return a}):k.when(h);return k.all(q).then(function(b){var d,h=l(b.$template,g),f=g.element||e.element("<div>").html(h.trim()).contents(),k=a(f);return d={locals:b,element:f,link:function(a){b.$scope=a;if(m){var h=c(m,b,!0);y&&e.extend(h.instance,b);h=h();f.data("$ngControllerController",h);f.children().data("$ngControllerController",h);p&&(a[p]=h);d.controller=h}return k(a)}}})}}e.module("material.core").service("$mdCompiler",
l);l.$inject=["$q","$templateRequest","$injector","$compile","$controller"]})();(function(){function l(){}function k(b,c,d){function f(a){return function(b,c){c.distance<this.state.options.maxDistance&&this.dispatchEvent(b,a,c)}}var m=navigator.userAgent||navigator.vendor||E.opera,p=m.match(/ipad|iphone|ipod/i),m=m.match(/android/i),k=function(){for(var a=document.createElement("div"),b=" webkit Moz MS ms o".split(" "),c=0;c<b.length;c++){var d=b[c],d=d?d+"TouchAction":"touchAction";if(e.isDefined(a.style[d]))return d}}(),
v="undefined"!==typeof E.jQuery&&e.element===E.jQuery,n={handler:function(a,c){var d=new b(a);e.extend(d,c);h[a]=d;return n},register:function(a,b,c){var d=h[b.replace(/^\$md./,"")];if(!d)throw Error("Failed to register element with handler "+b+". Available handlers: "+Object.keys(h).join(", "));return d.registerElement(a,c)},isIos:p,isAndroid:m,isHijackingClicks:(p||m)&&!v&&!q};n.isHijackingClicks&&(n.handler("click",{options:{maxDistance:6},onEnd:f("click")}),n.handler("focus",{options:{maxDistance:6},
onEnd:function(a,b){if(b.distance<this.state.options.maxDistance){var c=a.target,d="INPUT SELECT BUTTON TEXTAREA VIDEO AUDIO".split(" ");"-1"!=c.getAttribute("tabindex")&&!c.hasAttribute("DISABLED")&&(c.hasAttribute("tabindex")||c.hasAttribute("href")||c.isContentEditable||-1!=d.indexOf(c.nodeName))&&(this.dispatchEvent(a,"focus",b),a.target.focus())}}}),n.handler("mouseup",{options:{maxDistance:6},onEnd:f("mouseup")}),n.handler("mousedown",{onStart:function(a){this.dispatchEvent(a,"mousedown")}}));
return n.handler("press",{onStart:function(a,b){this.dispatchEvent(a,"$md.pressdown")},onEnd:function(a,b){this.dispatchEvent(a,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){d.cancel(this.state.timeout)},onStart:function(a,b){if(!this.state.registeredParent)return this.cancel();this.state.pos={x:b.x,y:b.y};this.state.timeout=d(e.bind(this,function(){this.dispatchEvent(a,"$md.hold");this.cancel()}),this.state.options.delay,!1)},onMove:function(a,b){k||"touchmove"!==
a.type||a.preventDefault();var c=this.state.pos.x-b.x,d=this.state.pos.y-b.y;Math.sqrt(c*c+d*d)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(a,b){k&&(this.oldTouchAction=a[0].style[k],a[0].style[k]=!1===b.horizontal?"pan-y":"pan-x")},onCleanup:function(a){this.oldTouchAction&&(a[0].style[k]=this.oldTouchAction)},onStart:function(a){this.state.registeredParent||this.cancel()},
onMove:function(b,c){var d,h;k||"touchmove"!==b.type||b.preventDefault();this.state.dragPointer?this.dispatchDragMove(b):(this.state.options.horizontal?(d=Math.abs(c.distanceX)>this.state.options.minDistance,h=Math.abs(c.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(d=Math.abs(c.distanceY)>this.state.options.minDistance,h=Math.abs(c.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),d?(this.state.dragPointer=a(b),g(b,this.state.dragPointer),
this.dispatchEvent(b,"$md.dragstart",this.state.dragPointer)):h&&this.cancel())},dispatchDragMove:c.throttle(function(a){this.state.isRunning&&(g(a,this.state.dragPointer),this.dispatchEvent(a,"$md.drag",this.state.dragPointer))}),onEnd:function(a,b){this.state.dragPointer&&(g(a,this.state.dragPointer),this.dispatchEvent(a,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(a,b){var c;Math.abs(b.velocityX)>this.state.options.minVelocity&&
Math.abs(b.distanceX)>this.state.options.minDistance?(c="left"==b.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(a,c)):Math.abs(b.velocityY)>this.state.options.minVelocity&&Math.abs(b.distanceY)>this.state.options.minDistance&&(c="up"==b.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(a,c))}})}function d(a){this.name=a;this.state={}}function f(b,d){function f(a){!a.clientX&&!a.clientY||a.$material||a.isIonicTap||n&&n.x==a.x&&n.y==a.y||(a.preventDefault(),a.stopPropagation())}
function k(a){0===a.clientX&&0===a.clientY||a.$material||a.isIonicTap||n&&n.x==a.x&&n.y==a.y?(n=null,"label"==a.target.tagName.toLowerCase()&&(n={x:a.x,y:a.y})):(a.preventDefault(),a.stopPropagation(),n=null)}function q(a,b){var c,g;for(g in h)c=h[g],c instanceof d&&("start"===a&&c.cancel(),c[a](b,m))}document.contains||(document.contains=function(a){return document.body.contains(a)});!u&&b.isHijackingClicks&&(document.addEventListener("click",k,!0),document.addEventListener("mouseup",f,!0),document.addEventListener("mousedown",
f,!0),document.addEventListener("focus",f,!0),u=!0);e.element(document).on("mousedown touchstart pointerdown",function(b){if(!m){var d=+Date.now();p&&!c(b,p)&&1500>d-p.endTime||(m=a(b),q("start",b))}}).on("mousemove touchmove pointermove",function(a){m&&c(a,m)&&(g(a,m),q("move",a))}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(a){m&&c(a,m)&&(g(a,m),m.endTime=+Date.now(),q("end",a),p=m,m=null)}).on("$$mdGestureReset",function(){p=m=null})}function a(a){var c=b(a);
a={startTime:+Date.now(),target:a.target,type:a.type.charAt(0)};a.startX=a.x=c.pageX;a.startY=a.y=c.pageY;return a}function c(a,b){return a&&b&&a.type.charAt(0)===b.type}function g(a,c){var d=b(a),h=c.x=d.pageX,d=c.y=d.pageY;c.distanceX=h-c.startX;c.distanceY=d-c.startY;c.distance=Math.sqrt(c.distanceX*c.distanceX+c.distanceY*c.distanceY);c.directionX=0<c.distanceX?"right":0>c.distanceX?"left":"";c.directionY=0<c.distanceY?"down":0>c.distanceY?"up":"";c.duration=+Date.now()-c.startTime;c.velocityX=
c.distanceX/c.duration;c.velocityY=c.distanceY/c.duration}function b(a){a=a.originalEvent||a;return a.touches&&a.touches[0]||a.changedTouches&&a.changedTouches[0]||a}var h={},m,p,q=!1,n=null,u=!1;e.module("material.core.gestures",[]).provider("$mdGesture",l).factory("$$MdGestureHandler",function(){function a(a,b,c){c=c||m;b=new e.element.Event(b);b.$material=!0;b.pointer=c;b.srcEvent=a;e.extend(b,{clientX:c.x,clientY:c.y,screenX:c.x,screenY:c.y,pageX:c.x,pageY:c.y,ctrlKey:a.ctrlKey,altKey:a.altKey,
shiftKey:a.shiftKey,metaKey:a.metaKey});e.element(c.target).trigger(b)}function b(a,b,c){c=c||m;var d;"click"===b||"mouseup"==b||"mousedown"==b?(d=document.createEvent("MouseEvents"),d.initMouseEvent(b,!0,!0,E,a.detail,c.x,c.y,c.x,c.y,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget||null)):(d=document.createEvent("CustomEvent"),d.initCustomEvent(b,!0,!0,{}));d.$material=!0;d.pointer=c;d.srcEvent=a;c.target.dispatchEvent(d)}d.prototype={options:{},dispatchEvent:"undefined"!==typeof E.jQuery&&
e.element===E.jQuery?a:b,onSetup:e.noop,onCleanup:e.noop,onStart:e.noop,onMove:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(a,b){if(!this.state.isRunning){var c=this.getNearestParent(a.target);this.state={isRunning:!0,options:e.extend({},this.options,c&&c.$mdGesture[this.name]||{}),registeredParent:c};this.onStart(a,b)}},move:function(a,b){if(this.state.isRunning)this.onMove(a,b)},end:function(a,b){this.state.isRunning&&(this.onEnd(a,b),this.state.isRunning=!1)},cancel:function(a,b){this.onCancel(a,
b);this.state={}},getNearestParent:function(a){for(;a;){if((a.$mdGesture||{})[this.name])return a;a=a.parentNode}return null},registerElement:function(a,b){function c(){delete a[0].$mdGesture[d.name];a.off("$destroy",c);d.onCleanup(a,b||{})}var d=this;a[0].$mdGesture=a[0].$mdGesture||{};a[0].$mdGesture[this.name]=b||{};a.on("$destroy",c);d.onSetup(a,b||{});return c}};return d}).run(f);l.prototype={skipClickHijack:function(){return q=!0},$get:["$$MdGestureHandler","$$rAF","$timeout",function(a,b,c){return new k(a,
b,c)}]};k.$inject=["$$MdGestureHandler","$$rAF","$timeout"];f.$inject=["$mdGesture","$$MdGestureHandler"]})();(function(){e.module("material.core").provider("$$interimElement",function(){function l(d){function f(a,b){function h(a,c){var h={};h[d]=l;return b.invoke(a||function(){return c},{},h)}var f,m,k=a(),l={hide:k.hide,cancel:k.cancel,show:function(a){a=a||{};a._options&&(a=a._options);return k.show(e.extend({},m,a))},destroy:function(a){return k.destroy(a)}};f=g.methods||[];m=h(g.optionsFactory,
{});e.forEach(c,function(a,b){l[b]=a});e.forEach(g.presets,function(a,b){function c(a){this._options=e.extend({},d,a)}var d=h(a.optionsFactory,{}),g=(a.methods||[]).concat(f);e.extend(d,{$type:b});e.forEach(g,function(a){c.prototype[a]=function(b){this._options[a]=b;return this}});a.argOption&&(g="show"+b.charAt(0).toUpperCase()+b.slice(1),l[g]=function(a){a=l[b](a);return l.show(a)});l[b]=function(b){return arguments.length&&a.argOption&&!e.isObject(b)&&!e.isArray(b)?(new c)[a.argOption](b):new c(b)}});
return l}var a=["onHide","onShow","onRemove"],c={},g={presets:{}},b={setDefaults:function(c){g.optionsFactory=c.options;g.methods=(c.methods||[]).concat(a);return b},addPreset:function(c,e){e=e||{};e.methods=e.methods||[];e.options=e.options||function(){return{}};if(/^cancel|hide|show$/.test(c))throw Error("Preset '"+c+"' in "+d+" is reserved!");if(-1<e.methods.indexOf("_options"))throw Error("Method '_options' in "+d+" is reserved!");g.presets[c]={methods:e.methods.concat(a),optionsFactory:e.options,
argOption:e.argOption};return b},addMethod:function(a,d){c[a]=d;return b},$get:f};b.addPreset("build",{methods:"controller controllerAs resolve template templateUrl themable transformTemplate parent".split(" ")});f.$inject=["$$interimElement","$injector"];return b}function k(d,f,a,c,g,b,h,m,p,k,n){return function(){function q(n){function q(a){return(a.skipCompile?null:p.compile(a))||f(function(b){b({locals:{},link:function(){return a.element}})})}function v(){var a,b=e.noop;n.hideDelay&&(a=g(l.hide,
n.hideDelay),b=function(){g.cancel(a)});n.cancelAutoHide=function(){b();n.cancelAutoHide=I}}function u(a,b,c){var d=b.onComplete||e.noop;(b.onShowing||e.noop)(b.scope,a,b,c);return f(function(h,g){try{f.when(b.onShow(b.scope,a,b,c)).then(function(){d(b.scope,a,b);v();h(a)},g)}catch(X){g(X.message)}})}function D(b,c){var d=c.onRemoving||e.noop;return a(function(h,g){try{var e=a.when(c.onRemove(c.scope,b,c)||!0);d(b,e);1==c.$destroy?h(b):e.then(function(){!c.preserveScope&&c.scope&&c.scope.$destroy();
h(b)},g)}catch(X){g(X)}})}var C,B,z=f.when(!0);n=function(a){a=a||{};a.template&&(a.template=m.processTemplate(a.template));return e.extend({preserveScope:!1,cancelAutoHide:e.noop,scope:a.scope||c.$new(a.isolateScope),onShow:function(a,b,c){return h.enter(b,c.parent)},onRemove:function(a,b){return b&&h.leave(b)||f.when()}},a)}(n);return C={options:n,deferred:f.defer(),show:function(){return f(function(a,c){function h(a){C.deferred.reject(a);c(a)}n.onCompiling&&n.onCompiling(n);q(n).then(function(c){var g=
n;e.extend(c.locals,g);var f=c.link(g.scope);g.element=f;var m;m=g.parent;m=e.isFunction(m)?m(g.scope,f,g):e.isString(m)?e.element(d[0].querySelector(m)):e.element(m);if(!(m||{}).length){var p;b[0]&&b[0].querySelector&&(p=b[0].querySelector(":not(svg) > body"));p||(p=b[0]);"#comment"==p.nodeName&&(p=d[0].body);m=e.element(p)}g.parent=m;g.themable&&k(f);B=f;z=u(B,n,c.controller).then(a,h)},h)})},remove:function(a,b,c){function d(a){C.deferred.reject(a)}if(!B)return f.when(!1);n=e.extend(n||{},c||{});
n.cancelAutoHide&&n.cancelAutoHide();n.element.triggerHandler("$mdInterimElementRemove");if(!0===n.$destroy)return D(n.element,n).then(function(){b&&d(a)||C.deferred.resolve(a)});f.when(z)["finally"](function(){D(n.element,n).then(function(){b&&d(a)||C.deferred.resolve(a)},d)});return C.deferred.promise}}}var l,w=[];return l={show:function(a){a=a||{};var b=new q(a||{});(!a.skipHide&&w.length?l.cancel():f.when(!0))["finally"](function(){w.push(b);b.show()["catch"](function(a){return a})});return b.deferred.promise},
hide:function(a,b){function c(c){c.remove(a,!1,b||{})["catch"](function(a){return a});return c.deferred.promise}if(!w.length)return f.when(a);b=b||{};if(b.closeAll){var d=f.all(w.reverse().map(c));w=[];return d}if(b.closeTo!==I)return f.all(w.splice(b.closeTo).map(c));d=w.pop();return c(d)},cancel:function(a,b){var c=w.pop();if(!c)return f.when(a);c.remove(a,!0,b||{})["catch"](function(a){return a});return c.deferred.promise["catch"](e.noop)},destroy:function(a){var b=a?null:w.shift(),c=e.element(a).length?
e.element(a)[0].parentNode:null;c&&(a=w.filter(function(a){return a.options.element[0]===c}),0<a.length&&(b=a[0],w.splice(w.indexOf(b),1)));return b?b.remove(!1,!1,{$destroy:!0}):f.when(!1)},$injector_:n}}}l.$get=k;k.$inject="$document $q $$q $rootScope $timeout $rootElement $animate $mdUtil $mdCompiler $mdTheming $injector".split(" ");return l})})();(function(){(function(){var l;function k(){l=!document.querySelector("[md-layouts-disabled]")}function d(){l=!1;return{restrict:"A",priority:"900"}}
function f(a){return["$timeout",function(b){return{restrict:"A",priority:-10,compile:function(c){if(!l)return e.noop;c.addClass(a);return function(c,d){b(function(){d.removeClass(a)},10,!1)}}}}]}function a(a){function b(b,c,d){c=g(c,a,d);var h=d.$observe(d.$normalize(a),c);c(q(a,d,""));b.$on("$destroy",function(){h()})}return["$mdUtil","$interpolate","$log",function(c,d,g){u=c;y=d;w=g;return{restrict:"A",compile:function(c,d){var g;l&&(h(a,d,c,w),m(a,q(a,d,""),p(c,a,d)),g=b);return g||e.noop}}}]}
function c(a){function b(b,c){c.addClass(a)}return["$mdUtil","$interpolate","$log",function(c,d,h){u=c;y=d;w=h;return{restrict:"A",compile:function(c,d){var h;l&&(m(a,q(a,d,""),p(c,a,d)),c.addClass(a),h=b);return h||e.noop}}}]}function g(a,b){var c;return function(d){d=m(b,d||"");e.isDefined(d)&&(c&&a.removeClass(c),c=d?b+"-"+d.replace(t,"-"):b,a.addClass(c))}}function b(a){var b=a.split("-");return["$log",function(c){c.warn(a+"has been deprecated. Please use a `"+b[0]+"-gt-<xxx>` variant.");return e.noop}]}
function h(a,b,c,d){b=c[0].nodeName.toLowerCase();switch(a.replace(v,"")){case "flex":"md-button"!=b&&"fieldset"!=b||d.warn(u.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",["<"+b+" "+a+"></"+b+">","https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"]))}}function m(a,b,c){var d=b;if(!(-1<(b||"").indexOf(y.startSymbol()))){switch(a.replace(v,"")){case "layout":n(b,K)||(b=K[0]);break;case "flex":n(b,A)||isNaN(b)&&(b="");
break;case "flex-offset":case "flex-order":if(!b||isNaN(+b))b="0";break;case "layout-align":a={main:"start",cross:"stretch"};b=b||"";if(0==b.indexOf("-")||0==b.indexOf(" "))b="none"+b;b=b.toLowerCase().trim().replace(t,"-").split("-");b.length&&"space"===b[0]&&(b=[b[0]+"-"+b[1],b[2]]);0<b.length&&(a.main=b[0]||a.main);1<b.length&&(a.cross=b[1]||a.cross);0>D.indexOf(a.main)&&(a.main="start");0>C.indexOf(a.cross)&&(a.cross="stretch");b=u.supplant("{main}-{cross}",a);break;case "layout-padding":case "layout-margin":case "layout-fill":case "layout-wrap":case "layout-nowrap":case "layout-nowrap":b=
""}b!=d&&(c||e.noop)(b)}return b}function p(a,b,c){return function(a){-1<(a||"").indexOf(y.startSymbol())||(c[c.$normalize(b)]=a)}}function q(a,b,c){a=b.$normalize(a);return b[a]?b[a].replace(t,"-"):c||null}function n(a,b,c){a=c&&a?a.replace(t,c):a;var d=!1;a&&b.forEach(function(b){b=c?b.replace(t,c):b;d=d||b===a});return d}var u,y,w,v=/(-gt)?-(sm|md|lg|print)/g,t=/\s+/g,A="grow initial auto none noshrink nogrow".split(" "),K=["row","column"],D=" start center end stretch space-around space-between".split(" "),
C=["","start","center","end","stretch"];l=!0;(function(g){function p(a){return a.replace(n,"").replace(q,function(a,b,c,d){return d?c.toUpperCase():c})}var n=/^((?:x|data)[\:\-_])/i,q=/([\:\-\_]+(.))/g,v=["layout","flex","flex-order","flex-offset","layout-align"],C=["show","hide","layout-padding","layout-margin"];e.forEach(" xs gt-xs sm gt-sm md gt-md lg gt-lg xl print".split(" "),function(b){e.forEach(v,function(c){c=b?c+"-"+b:c;g.directive(p(c),a(c))});e.forEach(C,function(a){a=b?a+"-"+b:a;g.directive(p(a),
c(a))})});g.provider("$$mdLayout",function(){return{$get:e.noop,validateAttributeValue:m,validateAttributeUsage:h,disableLayouts:function(a){l=!0!==a}}}).directive("mdLayoutCss",d).directive("ngCloak",f("ng-cloak")).directive("layoutWrap",c("layout-wrap")).directive("layoutNowrap",c("layout-nowrap")).directive("layoutNoWrap",c("layout-no-wrap")).directive("layoutFill",c("layout-fill")).directive("layoutLtMd",b("layout-lt-md",!0)).directive("layoutLtLg",b("layout-lt-lg",!0)).directive("flexLtMd",b("flex-lt-md",
!0)).directive("flexLtLg",b("flex-lt-lg",!0)).directive("layoutAlignLtMd",b("layout-align-lt-md")).directive("layoutAlignLtLg",b("layout-align-lt-lg")).directive("flexOrderLtMd",b("flex-order-lt-md")).directive("flexOrderLtLg",b("flex-order-lt-lg")).directive("offsetLtMd",b("flex-offset-lt-md")).directive("offsetLtLg",b("flex-offset-lt-lg")).directive("hideLtMd",b("hide-lt-md")).directive("hideLtLg",b("hide-lt-lg")).directive("showLtMd",b("show-lt-md")).directive("showLtLg",b("show-lt-lg")).config(k)})(e.module("material.core.layout",
["ng"]))})()})();(function(){function l(k,d){var f,a=[],c={};return f={notFoundError:function(a,b){k.error((b||"")+"No instance found for handle",a)},getInstances:function(){return a},get:function(c){if(!c||""===c)return null;var b,d,g;b=0;for(d=a.length;b<d;b++)if(g=a[b],g.$$mdHandle===c)return g;return null},register:function(d,b){if(!b)return e.noop;d.$$mdHandle=b;a.push(d);(function(){var a=c[b];a&&(a.forEach(function(a){a.resolve(d)}),delete c[b])})();return function(){var b=a.indexOf(d);-1!==
b&&a.splice(b,1)}},when:function(a){if(a&&""!==a){var b=d.defer(),h=f.get(a);h?b.resolve(h):(c[a]===I&&(c[a]=[]),c[a].push(b));return b.promise}return d.reject("Invalid `md-component-id` value.")}}}e.module("material.core").factory("$mdComponentRegistry",l);l.$inject=["$log","$q"]})();(function(){(function(){function l(k){function d(d){return d.hasClass("md-icon-button")?{isMenuItem:d.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:d.hasClass("md-menu-item"),dimBackground:!0}}return{attach:function(f,
a,c){c=e.extend(d(a),c);return k.attach(f,a,c)}}}e.module("material.core").factory("$mdButtonInkRipple",l);l.$inject=["$mdInkRipple"]})()})();(function(){(function(){function l(k){return{attach:function(d,f,a){return k.attach(d,f,e.extend({center:!0,dimBackground:!1,fitRipple:!0},a))}}}e.module("material.core").factory("$mdCheckboxInkRipple",l);l.$inject=["$mdInkRipple"]})()})();(function(){(function(){function l(k){return{attach:function(d,f,a){return k.attach(d,f,e.extend({center:!1,dimBackground:!0,
outline:!1,rippleSize:"full"},a))}}}e.module("material.core").factory("$mdListInkRipple",l);l.$inject=["$mdInkRipple"]})()})();(function(){function l(a,c){return{controller:e.noop,link:function(d,b,h){h.hasOwnProperty("mdInkRippleCheckbox")?c.attach(d,b):a.attach(d,b)}}}function k(a,c,d,b,h,f,p){this.$window=b;this.$timeout=h;this.$mdUtil=f;this.$mdColorUtil=p;this.$scope=a;this.$element=c;this.options=d;this.mousedown=!1;this.ripples=[];this.lastRipple=this.timeout=null;f.valueOnUse(this,"container",
this.createContainer);this.$element.addClass("md-ink-ripple");(c.controller("mdInkRipple")||{}).createRipple=e.bind(this,this.createRipple);(c.controller("mdInkRipple")||{}).setColor=e.bind(this,this.color);this.bindEvents()}function d(a,c){if(a.mousedown||a.lastRipple)a.mousedown=!1,a.$mdUtil.nextTick(e.bind(a,c),!1)}function f(){return{controller:e.noop}}e.module("material.core").provider("$mdInkRipple",function(){var a=!1;return{disableInkRipple:function(){a=!0},$get:["$injector",function(c){return{attach:function(d,
b,h){return a||b.controller("mdNoInk")?e.noop:c.instantiate(k,{$scope:d,$element:b,rippleOptions:h})}}}]}}).directive("mdInkRipple",l).directive("mdNoInk",f).directive("mdNoBar",f).directive("mdNoStretch",f);l.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"];k.$inject="$scope $element rippleOptions $window $timeout $mdUtil $mdColorUtil".split(" ");k.prototype.color=function(a){function c(){var a=d.options&&d.options.colorElement?d.options.colorElement:[];return(a=a.length?a[0]:d.$element[0])?
d.$window.getComputedStyle(a).color:"rgb(0,0,0)"}var d=this;e.isDefined(a)&&(d._color=d._parseColor(a));return d._color||d._parseColor(d.inkRipple())||d._parseColor(c())};k.prototype.calculateColor=function(){return this.color()};k.prototype._parseColor=function(a,c){c=c||1;var d=this.$mdColorUtil;if(a){if(0===a.indexOf("rgba"))return a.replace(/\d?\.?\d*\s*\)\s*$/,(.1*c).toString()+")");if(0===a.indexOf("rgb"))return d.rgbToRgba(a);if(0===a.indexOf("#"))return d.hexToRgba(a)}};k.prototype.bindEvents=
function(){this.$element.on("mousedown",e.bind(this,this.handleMousedown));this.$element.on("mouseup touchend",e.bind(this,this.handleMouseup));this.$element.on("mouseleave",e.bind(this,this.handleMouseup));this.$element.on("touchmove",e.bind(this,this.handleTouchmove))};k.prototype.handleMousedown=function(a){if(!this.mousedown)if(a.hasOwnProperty("originalEvent")&&(a=a.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/
2);else if(a.srcElement!==this.$element[0]){var c=this.$element[0].getBoundingClientRect();this.createRipple(a.clientX-c.left,a.clientY-c.top)}else this.createRipple(a.offsetX,a.offsetY)};k.prototype.handleMouseup=function(){d(this,this.clearRipples)};k.prototype.handleTouchmove=function(){d(this,this.deleteRipples)};k.prototype.deleteRipples=function(){for(var a=0;a<this.ripples.length;a++)this.ripples[a].remove()};k.prototype.clearRipples=function(){for(var a=0;a<this.ripples.length;a++)this.fadeInComplete(this.ripples[a])};
k.prototype.createContainer=function(){var a=e.element('<div class="md-ripple-container"></div>');this.$element.append(a);return a};k.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)};k.prototype.isRippleAllowed=function(){var a=this.$element[0];do{if(!a.tagName||"BODY"===a.tagName)break;if(a&&e.isFunction(a.hasAttribute)&&(a.hasAttribute("disabled")||"false"===this.inkRipple()||"0"===this.inkRipple()))return!1}while(a=a.parentNode);return!0};
k.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")};k.prototype.createRipple=function(a,c){if(this.isRippleAllowed()){var d=this,b=d.$mdColorUtil,h=e.element('<div class="md-ripple"></div>'),f=this.$element.prop("clientWidth"),p=this.$element.prop("clientHeight"),f=2*Math.max(Math.abs(f-a),a),p=2*Math.max(Math.abs(p-c),c),p=this.options.fitRipple?Math.max(f,p):Math.sqrt(Math.pow(f,2)+Math.pow(p,2)),f=this.calculateColor();h.css({left:a+"px",top:c+"px",background:"black",width:p+
"px",height:p+"px",backgroundColor:b.rgbaToRgb(f),borderColor:b.rgbaToRgb(f)});this.lastRipple=h;this.clearTimeout();this.timeout=this.$timeout(function(){d.clearTimeout();d.mousedown||d.fadeInComplete(h)},157.5,!1);this.options.dimBackground&&this.container.css({backgroundColor:f});this.container.append(h);this.ripples.push(h);h.addClass("md-ripple-placed");this.$mdUtil.nextTick(function(){h.addClass("md-ripple-scaled md-ripple-active");d.$timeout(function(){d.clearRipples()},450,!1)},!1)}};k.prototype.fadeInComplete=
function(a){this.lastRipple===a?this.timeout||this.mousedown||this.removeRipple(a):this.removeRipple(a)};k.prototype.removeRipple=function(a){var c=this;0>this.ripples.indexOf(a)||(this.ripples.splice(this.ripples.indexOf(a),1),a.removeClass("md-ripple-active"),a.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){c.fadeOutComplete(a)},450,!1))};k.prototype.fadeOutComplete=function(a){a.remove();this.lastRipple=null}})();(function(){(function(){function l(k){return{attach:function(d,
f,a){return k.attach(d,f,e.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},a))}}}e.module("material.core").factory("$mdTabInkRipple",l);l.$inject=["$mdInkRipple"]})()})();e.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(){(function(e){function k(a){var b=
!!document.querySelector("[md-themes-disabled]");a.disableTheming(b)}function d(a){function d(a,b){var c=G.filter(function(a){return!b[a]});if(c.length)throw Error("Missing colors %1 in palette %2!".replace("%1",c.join(", ")).replace("%2",a));return b}function h(a){function b(a){a=0===arguments.length?!0:!!a;if(a!==c.isDark){c.isDark=a;c.foregroundPalette=c.isDark?y:l;c.foregroundShadow=c.isDark?w:v;var b=c.isDark?B:z;e.forEach(c.isDark?z:B,function(a,d){var h=c.colors[d],g=b[d];if(h)for(var e in h.hues)h.hues[e]===
g[e]&&(h.hues[e]=a[e])});return c}}var c=this;c.name=a;c.colors={};c.dark=b;b(!1);D.forEach(function(a){var b=(c.isDark?z:B)[a];c[a+"Palette"]=function(d,h){var g=c.colors[a]={name:d,hues:e.extend({},b,h)};Object.keys(g.hues).forEach(function(a){if(!b[a])throw Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",a).replace("%2",c.name).replace("%3",d).replace("%4",Object.keys(b).join(", ")));});Object.keys(g.hues).map(function(a){return g.hues[a]}).forEach(function(b){if(-1==
G.indexOf(b))throw Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",b).replace("%2",c.name).replace("%3",a).replace("%4",d).replace("%5",G.join(", ")));});return c};c[a+"Color"]=function(){var b=Array.prototype.slice.call(arguments);console.warn("$mdThemingProviderTheme."+a+"Color() has been deprecated. Use $mdThemingProviderTheme."+a+"Palette() instead.");return c[a+"Palette"].apply(c,b)}})}function g(a,c){function d(a){return a===I||""===a?!0:h.THEMES[a]!==
I}var h=function(a,b){b===I&&(b=a);h.inherit(b,b)};h.THEMES=e.extend({},f);h.PALETTES=e.extend({},n);h.inherit=function(b,h){function g(){return(p=h.controller("mdTheme")||b.data("$mdThemeController"))&&p.$mdTheme||("default"==q?"":q)}function f(a){if(a){d(a)||c.warn("Attempted to use unregistered theme '"+a+"'. Register it with $mdThemingProvider.theme().");var h=b.data("$mdThemeName");h&&b.removeClass("md-"+h+"-theme");b.addClass("md-"+a+"-theme");b.data("$mdThemeName",a);p&&b.data("$mdThemeController",
p)}}function m(){var a=h.controller("mdTheme");if(!a)return!1;b.on("$destroy",a.registerChanges(function(){f(g())}));return!0}var p=h.controller("mdTheme"),n=b.attr("md-theme-watch"),n=(k||e.isDefined(n))&&"false"!=n;f(g());if(k&&!m()||!k&&n)b.on("$destroy",a.$watch(g,f))};h.registered=d;h.defaultTheme=function(){return q};h.generateTheme=function(a){b(f[a],a,F.nonce)};return h}n={};var f={},m,k=!1,q="default";e.extend(n,a);g.$inject=["$rootScope","$log"];return m={definePalette:function(a,b){b=b||
{};n[a]=d(a,b);return m},extendPalette:function(a,b){return d(a,e.extend({},n[a]||{},b))},theme:function(a,b){if(f[a])return f[a];b=b||"default";var c="string"===typeof b?f[b]:b,d=new h(a);c&&e.forEach(c.colors,function(a,b){d.colors[b]={name:a.name,hues:e.extend({},a.hues)}});return f[a]=d},configuration:function(){return e.extend({},config,{defaultTheme:q,alwaysWatchTheme:k})},disableTheming:function(a){F.disableTheming=e.isUndefined(a)||!!a},registerStyles:function(a){F.registeredStyles.push(a)},
setNonce:function(a){F.nonce=a},generateThemesOnDemand:function(a){F.generateOnDemand=a},setDefaultTheme:function(a){q=a},alwaysWatchTheme:function(a){k=a},$get:g,_LIGHT_DEFAULT_HUES:B,_DARK_DEFAULT_HUES:z,_PALETTES:n,_THEMES:f,_parseRules:c,_rgba:p}}function f(a,b,c){return{priority:100,link:{pre:function(d,h,g){var f=[],m={registerChanges:function(a,b){b&&(a=e.bind(b,a));f.push(a);return function(){var b=f.indexOf(a);-1<b&&f.splice(b,1)}},$setTheme:function(b){a.registered(b)||c.warn("attempted to use unregistered theme '"+
b+"'");m.$mdTheme=b;f.forEach(function(a){a()})}};h.data("$mdThemeController",m);m.$setTheme(b(g.mdTheme)(d));g.$observe("mdTheme",m.$setTheme)}}}}function a(a){return a}function c(a,b,c){h(a,b);c=c.replace(/THEME_NAME/g,a.name);var d=[],g=a.colors[b],f=new RegExp("\\.md-"+a.name+"-theme","g"),m=new RegExp("('|\")?{{\\s*("+b+")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),k=n[g.name];c=c.replace(/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g,
function(b,c,d,h,g){if("foreground"===c)return"shadow"==d?a.foregroundShadow:a.foregroundPalette[d]||a.foregroundPalette["1"];if(0===d.indexOf("hue")||"default"===d)d=a.colors[c].hues[d];return p((n[a.colors[c].name][d]||"")[g?"contrast":"value"],h)});e.forEach(g.hues,function(b,h){var g=c.replace(m,function(a,c,d,h,g){return p(k[b]["color"===h?"value":"contrast"],g)});"default"!==h&&(g=g.replace(f,".md-"+a.name+"-theme.md-"+h));"default"==a.name&&(g=g.replace(/((?:(?:(?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)+) )?)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g,
function(a,b,c,d){return a+", "+b+c+d}));d.push(g)});return d}function g(a,c){var d=document.head,d=d?d.firstElementChild:null,h=!F.disableTheming&&a.has("$MD_THEME_CSS")?a.get("$MD_THEME_CSS"):"",h=h+F.registeredStyles.join("");if(d&&0!==h.length){e.forEach(n,function(a,b){var c=a.contrastDefaultColor,d=a.contrastLightColors||[],h=a.contrastStrongLightColors||[],g=a.contrastDarkColors||[];"string"===typeof d&&(d=d.split(" "));"string"===typeof h&&(h=h.split(" "));"string"===typeof g&&(g=g.split(" "));
delete a.contrastDefaultColor;delete a.contrastLightColors;delete a.contrastStrongLightColors;delete a.contrastDarkColors;e.forEach(a,function(b,f){if(!e.isObject(b)){var p=m(b);if(!p)throw Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",b).replace("%2",a.name).replace("%3",f));a[f]={value:p,contrast:"light"===c?-1<g.indexOf(f)?t:-1<h.indexOf(f)?K:A:-1<d.indexOf(f)?-1<h.indexOf(f)?K:A:t}}})});var d=h.split(/\}(?!(\}|'|"|;))/).filter(function(a){return a&&
a.trim().length}).map(function(a){return a.trim()+"}"}),g=new RegExp("md-("+D.join("|")+")","g");D.forEach(function(a){J[a]=""});d.forEach(function(a){a.match(g);for(var b=0,c;c=D[b];b++)if(-1<a.indexOf(".md-"+c))return J[c]+=a;for(b=0;c=D[b];b++)if(-1<a.indexOf(c))return J[c]+=a;return J[C]+=a});F.generateOnDemand||e.forEach(c.THEMES,function(a){q[a.name]||"default"!==c.defaultTheme()&&"default"===a.name||b(a,a.name,F.nonce)})}}function b(a,b,d){var h=document.head,g=h?h.firstElementChild:null;q[b]||
(D.forEach(function(b){for(b=c(a,b,J[b]);b.length;){var e=b.shift();if(e){var f=document.createElement("style");f.setAttribute("md-theme-style","");d&&f.setAttribute("nonce",d);f.appendChild(document.createTextNode(e));h.insertBefore(f,g)}}}),q[a.name]=!0)}function h(a,b){if(!n[(a.colors[b]||{}).name])throw Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",a.name).replace("%2",b).replace("%3",Object.keys(n).join(", ")));}function m(a){if(e.isArray(a)&&
3==a.length)return a;if(/^rgb/.test(a))return a.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(a,b){return 3==b?parseFloat(a,10):parseInt(a,10)});"#"==a.charAt(0)&&(a=a.substring(1));if(/^([a-fA-F0-9]{3}){1,2}$/g.test(a)){var b=a.length/3,c=a.substr(0,b),d=a.substr(b,b);a=a.substr(2*b);1===b&&(c+=c,d+=d,a+=a);return[parseInt(c,16),parseInt(d,16),parseInt(a,16)]}}function p(a,b){if(!a)return"rgb('0,0,0')";4==a.length&&(a=e.copy(a),b?a.pop():b=a.pop());return b&&("number"==typeof b||"string"==
typeof b&&b.length)?"rgba("+a.join(",")+","+b+")":"rgb("+a.join(",")+")"}e.module("material.core.theming",["material.core.theming.palette"]).directive("mdTheme",f).directive("mdThemable",a).directive("mdThemesDisabled",function(){F.disableTheming=!0;return{restrict:"A",priority:"900"}}).provider("$mdTheming",d).config(k).run(g);k.$inject=["$mdThemingProvider"];var q={},n,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)"},y={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)"},w="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",v="",t=m("rgba(0,0,0,0.87)"),A=m("rgba(255,255,255,0.87)"),K=m("rgb(255,255,255)"),D=["primary","accent","warn","background"],C="primary",B={accent:{"default":"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{"default":"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},z={background:{"default":"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};
D.forEach(function(a){var b={"default":"500","hue-1":"300","hue-2":"800","hue-3":"A100"};B[a]||(B[a]=b);z[a]||(z[a]=b)});var G="50 100 200 300 400 500 600 700 800 900 A100 A200 A400 A700".split(" "),F={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null};d.$inject=["$mdColorPalette"];f.$inject=["$mdTheming","$interpolate","$log"];a.$inject=["$mdTheming"];var J={};g.$inject=["$injector","$mdTheming"]})(E.angular)})();(function(){function l(k,d,f,a,c){var g;return g={translate3d:function(a,
d,g,f){function b(b){return c(a,{to:b||d,addClass:f.transitionOutClass,removeClass:f.transitionInClass}).start()}return c(a,{from:d,to:g,addClass:f.transitionInClass,removeClass:f.transitionOutClass}).start().then(function(){return b})},waitTransitionEnd:function(b,c){var h=3E3;return d(function(d,g){function e(c){c&&c.target!==b[0]||(c&&f.cancel(m),b.off(a.CSS.TRANSITIONEND,e),d())}c=c||{};(function(a){a=a||E.getComputedStyle(b[0]);return"0s"==a.transitionDuration||!a.transition&&!a.transitionProperty})(c.cachedTransitionStyles)&&
(h=0);var m=f(e,c.timeout||h);b.on(a.CSS.TRANSITIONEND,e)})},calculateTransformValues:function(a,c){var b=c.element,d=c.bounds;if(b||d){b?(b=g.clientRect(b))||(b=(b=(b=a?a.parent():null)?b.parent():null)?g.clientRect(b):null):b=g.copyRect(d);var d=g.copyRect(a[0].getBoundingClientRect()),h=g.centerPointFor(d),f=g.centerPointFor(b);return{centerX:f.x-h.x,centerY:f.y-h.y,scaleX:Math.round(100*Math.min(.5,b.width/d.width))/100,scaleY:Math.round(100*Math.min(.5,b.height/d.height))/100}}return{centerX:0,
centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(a,c){return e.bind(null,k.supplant,"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )")(g.calculateTransformValues(a,c))},calculateSlideToOrigin:function(a,c){return e.bind(null,k.supplant,"translate3d( {centerX}px, {centerY}px, 0 )")(g.calculateTransformValues(a,c))},toCss:function(b){function c(a,b,c){e.forEach(b.split(" "),function(a){d[a]=c})}var d={};e.forEach(b,function(b,h){if(!e.isUndefined(b))if(0<="left top right bottom width height x y min-width min-height max-width max-height".indexOf(h))d[h]=
b+"px";else switch(h){case "transition":c(h,a.CSS.TRANSITION,b);break;case "transform":c(h,a.CSS.TRANSFORM,b);break;case "transformOrigin":c(h,a.CSS.TRANSFORM_ORIGIN,b);break;case "font-size":d["font-size"]=b}});return d},toTransformCss:function(b,c,d){var h={};e.forEach(a.CSS.TRANSFORM.split(" "),function(a){h[a]=b});c&&(h.transition=d||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important");return h},copyRect:function(a,c){if(!a)return null;c=c||{};e.forEach("left top right bottom width height".split(" "),
function(b){c[b]=Math.round(a[b])});c.width=c.width||c.right-c.left;c.height=c.height||c.bottom-c.top;return c},clientRect:function(a){return(a=e.element(a)[0].getBoundingClientRect())&&0<a.width&&0<a.height?g.copyRect(a):null},centerPointFor:function(a){return a?{x:Math.round(a.left+a.width/2),y:Math.round(a.top+a.height/2)}:{x:0,y:0}}}}e.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(e,d,f,a){return function(c){return l(c,e,d,f,a)}}])})();(function(){4<=
e.version.minor?e.module("material.core.animate",[]):function(){function l(a){return a.replace(/-[a-z]/g,function(a){return a.charAt(1).toUpperCase()})}var k=e.forEach,d=e.isDefined(document.documentElement.style.WebkitAppearance),f=d?"-webkit-":"",a=(d?"webkitTransitionEnd ":"")+"transitionend",c=(d?"webkitAnimationEnd ":"")+"animationend";e.module("material.core.animate",[]).factory("$$forceReflow",["$document",function(a){return function(){return a[0].body.clientWidth+1}}]).factory("$$AnimateRunner",
["$q","$$rAFMutex",function(a,b){function c(a){this.setHost(a);this._doneCallbacks=[];this._runInAnimationFrame=b();this._state=0}c.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:e.noop,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},
"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._runInAnimationFrame(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(k(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=
0,this._state=2)}};c.all=function(a,b){function c(c){h=h&&c;++d===a.length&&b(h)}var d=0,h=!0;k(a,function(a){a.done(c)})};return c}]).factory("$$rAFMutex",["$$rAF",function(a){return function(){var b=!1;a(function(){b=!0});return function(c){b?c():a(c)}}}]).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(g,b,h,e,p,q,n){function m(a,b){b.addClass&&(p.addClass(a,b.addClass),b.addClass=null);b.removeClass&&(p.removeClass(a,b.removeClass),
b.removeClass=null)}function y(a){function b(a){return d?"Webkit"+a.charAt(0).toUpperCase()+a.substr(1):a}a=D(a);a=g.getComputedStyle(a);var c=w(a[b("transitionDuration")]),h=w(a[b("animationDuration")]),f=w(a[b("transitionDelay")]),e=w(a[b("animationDelay")]),h=h*(parseInt(a[b("animationIterationCount")],10)||1);return{duration:Math.max(h,c),delay:Math.max(e,f),animationDuration:h,transitionDuration:c,animationDelay:e,transitionDelay:f}}function w(a){var b=0;a=(a||"").split(/\s*,\s*/);k(a,function(a){"s"==
a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function v(a){B&&B();z.push(a);B=b(function(){B=null;for(var a=e(),b=0;b<z.length;b++)z[b](a);z.length=0})}function t(a,b){A(a,b);K(a,b)}function A(a,b){b.from&&(a.css(b.from),b.from=null)}function K(a,b){b.to&&(a.css(b.to),b.to=null)}function D(a){for(var b=0;b<a.length;b++)if(1===a[b].nodeType)return a[b]}function C(a,b){var c=D(a),d=l(f+"transition-delay");c.style[d]=b?"-9999s":""}var B,z=[];return function(b,
d){var e=[],p=D(b),u=p&&n.enabled(),B=!1,w=!1;u&&(d.transitionStyle&&e.push([f+"transition",d.transitionStyle]),d.keyframeStyle&&e.push([f+"animation",d.keyframeStyle]),d.delay&&e.push([f+"transition-delay",d.delay+"s"]),d.duration&&e.push([f+"transition-duration",d.duration+"s"]),B=d.keyframeStyle||d.to&&(0<d.duration||d.transitionStyle),w=!!d.addClass||!!d.removeClass,C(b,!0));var z=u&&(B||w);A(b,d);var F=!1,G,Q;return{close:g.close,start:function(){function g(){if(!F)return F=!0,G&&Q&&b.off(G,
Q),m(b,d),t(b,d),k(e,function(a){p.style[l(a[0])]=""}),n.complete(!0),n}var n=new h;v(function(){C(b,!1);if(!z)return g();k(e,function(a){var b=a[1];p.style[l(a[0])]=b});m(b,d);var h=y(b);if(0===h.duration)return g();var n=[];d.easing&&(h.transitionDuration&&n.push([f+"transition-timing-function",d.easing]),h.animationDuration&&n.push([f+"animation-timing-function",d.easing]));d.delay&&h.animationDelay&&n.push([f+"animation-delay",d.delay+"s"]);d.duration&&h.animationDuration&&n.push([f+"animation-duration",
d.duration+"s"]);k(n,function(a){var b=a[1];p.style[l(a[0])]=b;e.push(a)});var v=1E3*h.delay,D=h.duration,n=1E3*D,u=Date.now();G=[];h.transitionDuration&&G.push(a);h.animationDuration&&G.push(c);G=G.join(" ");Q=function(a){a.stopPropagation();var b=a.originalEvent||a;a=b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-u,0)>=v&&b>=D&&g()};b.on(G,Q);K(b,d);q(g,v+1.5*n,!1)});return n}}}}])}()})();e.module("material.components.autocomplete",["material.core","material.components.icon",
"material.components.virtualRepeat"]);(function(){e.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(l,k,d,f,a,c,g,b){return{restrict:"E",link:function(h,m,p){function q(){var a=parseInt(n.height,10)+Math.abs(parseInt(n.top,10));m.css("height",a+"px")}d.pin&&d.pin(m,f);var n;g(function(){n=a.getComputedStyle(b[0].body);if("fixed"===n.position){var d=k.debounce(function(){n=
a.getComputedStyle(b[0].body);q()},60,null,!1);q();e.element(a).on("resize",d);h.$on("$destroy",function(){e.element(a).off("resize",d)})}var g=m.parent();g.length&&("BODY"===g[0].nodeName&&m.css("position","fixed"),"static"===a.getComputedStyle(g[0]).position&&c.warn("<md-backdrop> may not work properly in a scrolled, static-positioned parent container."),l.inherit(m,g))})}}}])})();(function(){function l(d){return{restrict:"E",link:function(e,a){a.addClass("_md");e.$on("$destroy",function(){d.destroy()})}}}
function k(d){function f(a,c,d,b,h,f,k,q){function g(a,b){function g(b){a.css(c.CSS.TRANSITION_DURATION,"0ms")}function e(b){b=b.pointer.distanceY;5>b&&(b=Math.max(-80,b/2));a.css(c.CSS.TRANSFORM,"translate3d(0,"+(80+b)+"px,0)")}function f(b){if(0<b.pointer.distanceY&&(20<b.pointer.distanceY||.5<Math.abs(b.pointer.velocityY))){var g=a.prop("offsetHeight")-b.pointer.distanceY;a.css(c.CSS.TRANSITION_DURATION,Math.min(g/b.pointer.velocityY*.75,500)+"ms");d.nextTick(h.cancel,!0)}else a.css(c.CSS.TRANSITION_DURATION,
""),a.css(c.CSS.TRANSFORM,"")}var m=k.register(b,"drag",{horizontal:!1});b.on("$md.dragstart",g).on("$md.drag",e).on("$md.dragend",f);return{element:a,cleanup:function(){m();b.off("$md.dragstart",g);b.off("$md.drag",e);b.off("$md.dragend",f)}}}var m;return{themable:!0,onShow:function(k,p,n,l){p=d.extractElementByName(p,"md-bottom-sheet");p.attr("tabindex","-1");p.hasClass("ng-cloak")&&q.warn("$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.",p[0]);
if(!n.disableBackdrop){m=d.createBackdrop(k,"md-bottom-sheet-backdrop md-opaque");m[0].tabIndex=-1;if(n.clickOutsideToClose)m.on("click",function(){d.nextTick(h.cancel,!0)});b.inherit(m,n.parent);a.enter(m,n.parent,null)}k=new g(p,n.parent);n.bottomSheet=k;b.inherit(k.element,n.parent);n.disableParentScroll&&(n.restoreScroll=d.disableScrollAround(k.element,n.parent));return a.enter(k.element,n.parent,m).then(function(){var a=d.findFocusTarget(p)||e.element(p[0].querySelector("button")||p[0].querySelector("a")||
p[0].querySelector(d.prefixer("ng-click",!0)))||m;n.escapeToClose&&(n.rootElementKeyupCallback=function(a){a.keyCode===c.KEY_CODE.ESCAPE&&d.nextTick(h.cancel,!0)},f.on("keyup",n.rootElementKeyupCallback),a&&a.focus())})},onRemove:function(b,c,d){var h=d.bottomSheet;d.disableBackdrop||a.leave(m);return a.leave(h.element).then(function(){d.disableParentScroll&&(d.restoreScroll(),delete d.restoreScroll);h.cleanup()})},disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}
f.$inject="$animate $mdConstant $mdUtil $mdTheming $mdBottomSheet $rootElement $mdGesture $log".split(" ");return d("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:f})}e.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",l).provider("$mdBottomSheet",k);l.$inject=["$mdBottomSheet"];k.$inject=["$$interimElementProvider"]})();(function(){function l(d){return{restrict:"E",link:function(e,
a){d(a)}}}function k(d,f,a,c){function g(a){return e.isDefined(a.href)||e.isDefined(a.ngHref)||e.isDefined(a.ngLink)||e.isDefined(a.uiSref)}return{restrict:"EA",replace:!0,transclude:!0,template:function(a,c){return g(c)?'<a class="md-button" ng-transclude></a>':'<button class="md-button" type="'+("undefined"===typeof c.type?"button":c.type)+'" ng-transclude></button>'},link:function(b,h,k){f(h);d.attach(b,h);a.expectWithoutText(h,"aria-label");g(k)&&e.isDefined(k.ngDisabled)&&b.$watch(k.ngDisabled,
function(a){h.attr("tabindex",a?-1:0)});h.on("click",function(a){!0===k.disabled&&(a.preventDefault(),a.stopImmediatePropagation())});h.hasClass("md-no-focus")||(b.mouseActive=!1,h.on("mousedown",function(){b.mouseActive=!0;c(function(){b.mouseActive=!1},100)}).on("focus",function(){!1===b.mouseActive&&h.addClass("md-focused")}).on("blur",function(a){h.removeClass("md-focused")}))}}}e.module("material.components.button",["material.core"]).directive("mdButton",k).directive("a",l);l.$inject=["$mdTheming"];
k.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"]})();(function(){function l(e){return{restrict:"E",link:function(d,f,a){f.addClass("_md");e(f)}}}e.module("material.components.card",["material.core"]).directive("mdCard",l);l.$inject=["$mdTheming"]})();(function(){function l(k,d,f,a,c,g){k=k[0];return{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',
compile:function(b,h){h.$set("tabindex",h.tabindex||"0");h.$set("type","checkbox");h.$set("role",h.type);return{pre:function(a,b){b.on("click",function(a){this.hasAttribute("disabled")&&a.stopImmediatePropagation()})},post:function(b,h,q,n){function m(a){h[0].hasAttribute("disabled")||b.skipToggle||b.$apply(function(){n.$setViewValue(q.ngChecked?q.checked:!n.$viewValue,a&&a.type);n.$render()})}function p(a){(l=!1!==a)&&h.attr("aria-checked","mixed");h.toggleClass("md-indeterminate",l)}var l;n=n||
c.fakeNgModel();a(h);h.children().on("focus",function(){h.focus()});c.parseAttributeBoolean(q.mdIndeterminate)&&(p(),b.$watch(q.mdIndeterminate,p));q.ngChecked&&b.$watch(b.$eval.bind(b,q.ngChecked),n.$setViewValue.bind(n));(function(a,c,d){q[a]&&b.$watch(q[a],function(a){d[a]&&h.attr(c,d[a])})})("ngDisabled","tabindex",{"true":"-1","false":q.tabindex});d.expectWithText(h,"aria-label");k.link.pre(b,{on:e.noop,0:{}},q,[n]);b.mouseActive=!1;h.on("click",m).on("keypress",function(a){var b=a.which||a.keyCode;
if(b===f.KEY_CODE.SPACE||b===f.KEY_CODE.ENTER)a.preventDefault(),h.addClass("md-focused"),m(a)}).on("mousedown",function(){b.mouseActive=!0;g(function(){b.mouseActive=!1},100)}).on("focus",function(){!1===b.mouseActive&&h.addClass("md-focused")}).on("blur",function(){h.removeClass("md-focused")});n.$render=function(){h.toggleClass("md-checked",!!n.$viewValue&&!l)}}}}}}e.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",l);l.$inject="inputDirective $mdAria $mdConstant $mdTheming $mdUtil $timeout".split(" ")})();
e.module("material.components.chips",["material.core","material.components.autocomplete"]);(function(){(function(){function l(a,c,d){function b(b,d){var h=a.PALETTES[b.palette][b.hue],h=d?h.contrast:h.value;return c.supplant("rgba({0}, {1}, {2}, {3})",[h[0],h[1],h[2],h[3]||b.opacity])}function h(a){var c={},d=a.hasOwnProperty("color");e.forEach(a,function(a,h){var e=g(a),f=-1<h.indexOf("background");c[h]=b(e);f&&!d&&(c.color=b(e,!0))});return c}function g(b){b=b.split("-");var d=e.isDefined(a.THEMES[b[0]])?
b.splice(0,1)[0]:a.defaultTheme(),h=1<b.length&&-1!==f.indexOf(b[1]),g=b[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();h&&(g=b[0]+"-"+b.splice(1,1));if(-1===f.indexOf(g)){h=a.THEMES[d].colors[g];if(!h)throw Error(c.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:g}));g=h.name}h=a.THEMES[d].colors;if("hue"===b[1]){var k=parseInt(b.splice(2,1)[0],10);if(1>k||3<k)throw Error(c.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",
{hueNumber:k}));b[1]="hue-"+k;if(!(b[0]in h))throw Error(c.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(h).join(", "),usedTheme:b[0]}));h=h[b[0]].hues[b[1]]}else h=b[1]||h[b[0]in h?b[0]:"primary"].hues["default"];return{theme:d,palette:g,hue:h,opacity:b[2]||1}}f=f||Object.keys(a.PALETTES);return{applyThemeColors:function(a,b){try{b&&a.css(h(b))}catch(n){d.error(n.message)}},getThemeColor:function(a){a=g(a);return b(a)},
hasTheme:function(b){return e.isDefined(a.THEMES[b.split("-")[0]])}}}function k(a,c,g,b){return{restrict:"A",require:["^?mdTheme"],compile:function(h,f){var k=function(){var a=f.mdColors,b=-1<a.indexOf("::"),h=b?!0:d.test(f.mdColors);f.mdColors=a.replace("::","");a=e.isDefined(f.mdColorsWatch);return b||h?!1:a?c.parseAttributeBoolean(f.mdColorsWatch):!0}();return function(c,d,h,f){var m=f[0],p={},n=function(d){"string"!==typeof d&&(d="");h.mdColors||(h.mdColors="{}");var g=b(h.mdColors)(c);m&&Object.keys(g).forEach(function(b){var c=
g[b];a.hasTheme(c)||(g[b]=(d||m.$mdTheme)+"-"+c)});l(g);return g},l=function(a){if(!e.equals(a,p)){var b=Object.keys(p);p.background&&!b.color&&b.push("color");b.forEach(function(a){d.css(a,"")})}p=a},q=e.noop;m&&(q=m.registerChanges(function(b){a.applyThemeColors(d,n(b))}));c.$on("$destroy",function(){q()});try{k?c.$watch(n,e.bind(this,a.applyThemeColors,d),!0):a.applyThemeColors(d,n())}catch(D){g.error(D.message)}}}}}var d=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,f=I;e.module("material.components.colors",
["material.core"]).directive("mdColors",k).service("$mdColors",l);l.$inject=["$mdTheming","$mdUtil","$log"];k.$inject=["$mdColors","$mdUtil","$log","$parse"]})()})();(function(){function l(d){return{restrict:"E",controller:["$scope","$element",function(d,a){this.$scope=d;this.$element=a}],link:function(e,a){a.addClass("_md");d(a);e.$broadcast("$mdContentLoaded",a);k(a[0])}}}function k(d){e.element(d).on("$md.pressdown",function(e){"t"!==e.pointer.type||e.$materialScrollFixed||(e.$materialScrollFixed=
!0,0===d.scrollTop?d.scrollTop=1:d.scrollHeight===d.scrollTop+d.offsetHeight&&--d.scrollTop)})}e.module("material.components.content",["material.core"]).directive("mdContent",l);l.$inject=["$mdTheming"]})();e.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]);(function(){function l(d,f,a){return{restrict:"E",link:function(c,g){g.addClass("_md");f(g);d(function(){function b(){g.toggleClass("md-content-overflow",f.scrollHeight>f.clientHeight)}
var d,f=g[0].querySelector("md-dialog-content");f&&(d=f.getElementsByTagName("img"),b(),e.element(d).on("load",b));c.$on("$destroy",function(){a.destroy(g)})})}}}function k(d){function f(a,c){return{template:'<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css"> <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1"> <h2 class="md-title">{{ dialog.title }}</h2> <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ng-bind-html="::dialog.mdHtmlContent"></div> <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body"> <p>{{::dialog.mdTextContent}}</p> </div> <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container"> <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}"> </md-input-container> </md-dialog-content> <md-dialog-actions> <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary"> {{ dialog.cancel }} </md-button> <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type===\'alert\'"> {{ dialog.ok }} </md-button> </md-dialog-actions></md-dialog>'.replace(/\s\s+/g,
""),controller:function(){var b="prompt"==this.$type;b&&this.initialValue&&(this.result=this.initialValue);this.hide=function(){a.hide(b?this.result:!0)};this.abort=function(){a.cancel()};this.keypress=function(b){b.keyCode===c.KEY_CODE.ENTER&&a.hide(this.result)}},controllerAs:"dialog",bindToController:!0}}function a(a,d,f,k,l,n,u,y,w,v,t){function b(a){function b(a,b){var c=e.element(a||{});if(c&&c.length){var d={top:0,left:0,height:0,width:0},h=e.isFunction(c[0].getBoundingClientRect);return e.extend(b||
{},{element:h?c:I,bounds:h?c[0].getBoundingClientRect():e.extend({},d,c[0]),focus:e.bind(c,c.focus)})}}function c(a,b){e.isString(a)&&(a=n[0].querySelector(a));return e.element(a||b)}a.origin=e.extend({element:null,bounds:null,focus:e.noop},a.origin||{});a.parent=c(a.parent,y);a.closeTo=b(c(a.closeTo));a.openFrom=b(c(a.openFrom));a.targetEvent&&(a.origin=b(a.targetEvent.target,a.origin))}function h(b,c){var d=e.element(u),h=f.debounce(function(){z(b,c)},60),g=[],m=function(){f.nextTick("alert"==c.$type?
a.hide:a.cancel,!0)};if(c.escapeToClose){var p=c.parent,n=function(a){a.keyCode===k.KEY_CODE.ESCAPE&&(a.stopPropagation(),a.preventDefault(),m())};b.on("keydown",n);p.on("keydown",n);g.push(function(){b.off("keydown",n);p.off("keydown",n)})}d.on("resize",h);g.push(function(){d.off("resize",h)});if(c.clickOutsideToClose){var l,q=function(a){l=a.target},C=function(a){l===b[0]&&a.target===b[0]&&(a.stopPropagation(),a.preventDefault(),m())};b.on("mousedown",q);b.on("mouseup",C);g.push(function(){b.off("mousedown",
q);b.off("mouseup",C)})}c.deactivateListeners=function(){g.forEach(function(a){a()});c.deactivateListeners=null}}function m(a,b,c){c.disableParentScroll&&(c.restoreScroll=f.disableScrollAround(b,c.parent));c.hasBackdrop&&(c.backdrop=f.createBackdrop(a,"md-dialog-backdrop md-opaque"),l.enter(c.backdrop,c.parent));c.hideBackdrop=function(a){c.backdrop&&(a?c.backdrop.remove():l.leave(c.backdrop));c.disableParentScroll&&(c.restoreScroll(),delete c.restoreScroll);c.hideBackdrop=null}}function p(a,b){var h=
"alert"===b.$type?"alertdialog":"dialog",e=a.find("md-dialog-content"),k=a.attr("id"),m="dialogContent_"+(k||f.nextUid());a.attr({role:h,tabIndex:"-1"});0===e.length&&(e=a,k&&(m=k));e.attr("id",m);a.attr("aria-describedby",m);b.ariaLabel?d.expect(a,"aria-label",b.ariaLabel):d.expectAsync(a,"aria-label",function(){var a=e.text().split(/\s+/);3<a.length&&(a=a.slice(0,3).concat("..."));return a.join(" ")});c=document.createElement("div");c.classList.add("md-dialog-focus-trap");c.tabIndex=0;g=c.cloneNode(!1);
h=function(){a.focus()};c.addEventListener("focus",h);g.addEventListener("focus",h);a[0].parentNode.insertBefore(c,a[0]);a.after(g)}function q(a,b){function c(a){for(;a.parentNode&&a!==document.body;){for(var b=a.parentNode.children,h=0;h<b.length;h++){var g;if(g=a!==b[h])g=-1!==["SCRIPT","STYLE"].indexOf(b[h].nodeName)?!0:void 0,g=!g;g&&b[h].setAttribute("aria-hidden",d)}c(a=a.parentNode)}}var d=!0;c(a[0]);b.unlockScreenReader=function(){d=!1;c(a[0]);b.unlockScreenReader=null}}function z(a,b){var c=
"fixed"==u.getComputedStyle(n[0].body).position,d=b.backdrop?u.getComputedStyle(b.backdrop[0]):null,d=d?Math.min(n[0].body.clientHeight,Math.ceil(Math.abs(parseInt(d.height,10)))):0,h={top:a.css("top"),height:a.css("height")};a.css({top:(c?f.scrollTop(b.parent):0)+"px",height:d?d+"px":"100%"});return function(){a.css(h)}}function G(a,b){b.parent.append(a);b.reverseContainerStretch=z(a,b);var c=a.find("md-dialog"),d=f.dom.animator,h=d.calculateZoomToOrigin,g={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},
e=d.toTransformCss(h(c,b.openFrom||b.origin)),k=d.toTransformCss("");b.fullscreen&&c.addClass("md-dialog-fullscreen");return d.translate3d(c,e,k,g).then(function(a){b.reverseAnimate=function(){delete b.reverseAnimate;return b.closeTo?(g={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},e=k,k=d.toTransformCss(h(c,b.closeTo)),d.translate3d(c,e,k,g)):a(k=d.toTransformCss(h(c,b.origin)))};b.clearAnimate=function(){delete b.clearAnimate;return d.translate3d(c,k,d.toTransformCss(""),
{})};return!0})}function F(a,b){return b.reverseAnimate().then(function(){b.contentElement&&b.clearAnimate()})}return{hasBackdrop:!0,isolateScope:!0,onCompiling:function(a){if(!a.theme&&(a.theme=t.defaultTheme(),a.targetEvent&&a.targetEvent.target)){var b=e.element(a.targetEvent.target);a.theme=(b.controller("mdTheme")||{}).$mdTheme||a.theme}},onShow:function(a,c,d,g){e.element(n[0].body).addClass("md-dialog-is-showing");d.contentElement&&(g=d.contentElement,e.isString(g)?(g=document.querySelector(g),
d.elementInsertionSibling=g.nextElementSibling,d.elementInsertionParent=g.parentNode):(g=g[0]||g,document.contains(g)&&(d.elementInsertionSibling=g.nextElementSibling,d.elementInsertionParent=g.parentNode)),d.elementInsertionEntry=g,c=e.element(g));g=c.find("md-dialog");g.hasClass("ng-cloak")&&w.warn("$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.",c[0]);b(d);p(g,d);m(a,c,d);h(c,d);return G(c,d).then(function(){q(c,d);c[0].querySelector(".md-actions")&&w.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>.");
if(d.focusOnOpen){var a;(a=f.findFocusTarget(c))||(a=c[0].querySelector(".dialog-close"),a||(a=c[0].querySelectorAll(".md-actions button, md-dialog-actions button"),a=a[a.length-1]),a=e.element(a));a.focus()}})},onShowing:function(a,b,c,d){if(d){d.mdHtmlContent=d.htmlContent||c.htmlContent||"";d.mdTextContent=d.textContent||c.textContent||d.content||c.content||"";if(d.mdHtmlContent&&!v.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(d.mdHtmlContent&&
d.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`");}},onRemove:function(a,b,d){function h(){e.element(n[0].body).removeClass("md-dialog-is-showing");d.contentElement?d.contentElement&&(d.reverseContainerStretch(),d.elementInsertionParent?d.elementInsertionSibling?d.elementInsertionParent.insertBefore(d.elementInsertionEntry,d.elementInsertionSibling):d.elementInsertionParent.appendChild(d.elementInsertionEntry):d.elementInsertionEntry.parentNode.removeChild(d.elementInsertionEntry)):
b.remove();d.$destroy||d.origin.focus()}d.deactivateListeners();d.unlockScreenReader();d.hideBackdrop(d.$destroy);c&&c.parentNode&&c.parentNode.removeChild(c);g&&g.parentNode&&g.parentNode.removeChild(g);return d.$destroy?h():F(b,d).then(h)},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,contentElement:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(a,b){var c;c=b.autoWrap&&!/<\/md-dialog>/g.test(a)?"<md-dialog>"+
(a||"")+"</md-dialog>":a||"";return'<div class="md-dialog-container" tabindex="-1">'+c+"</div>"}}}var c,g;f.$inject=["$mdDialog","$mdConstant"];a.$inject="$mdDialog $mdAria $mdUtil $mdConstant $animate $document $window $rootElement $log $injector $mdTheming".split(" ");return d("$mdDialog").setDefaults({methods:"disableParentScroll hasBackdrop clickOutsideToClose escapeToClose targetEvent closeTo openFrom parent fullscreen contentElement".split(" "),options:a}).addPreset("alert",{methods:"title htmlContent textContent content ariaLabel ok theme css".split(" "),
options:f}).addPreset("confirm",{methods:"title htmlContent textContent content ariaLabel ok cancel theme css".split(" "),options:f}).addPreset("prompt",{methods:"title htmlContent textContent initialValue content placeholder ariaLabel ok cancel theme css".split(" "),options:f})}e.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",l).provider("$mdDialog",k);l.$inject=["$$rAF","$mdTheming","$mdDialog"];k.$inject=["$$interimElementProvider"]})();
(function(){function l(e){return{restrict:"E",link:e}}e.module("material.components.divider",["material.core"]).directive("mdDivider",l);l.$inject=["$mdTheming"]})();(function(){(function(){function l(e){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(d,f){var a=d.children();e.prefixer().hasAttribute(a,"ng-repeat")?a.addClass("md-fab-action-item"):a.wrap('<div class="md-fab-action-item">')}}}e.module("material.components.fabActions",["material.core"]).directive("mdFabActions",
l);l.$inject=["$mdUtil"]})()})();(function(){(function(){function l(k,d,f,a,c,g){function b(a){"click"==a.type&&w(a);"focusout"!=a.type||A||(A=g(function(){v.close()},100,!1));"focusin"==a.type&&A&&(g.cancel(A),A=null)}function h(){0<d[0].scrollHeight?f.addClass(d,"_md-animations-ready").then(function(){d.removeClass("md-animations-waiting")}):10>t&&(g(h,100),t+=1)}function m(){d.on("keydown",n);a.nextTick(function(){e.element(document).on("click touchend",l)})}function p(){d.off("keydown",n);e.element(document).off("click touchend",
l)}function l(b){if(b.target){var c=a.getClosest(b.target,"md-fab-trigger");b=a.getClosest(b.target,"md-fab-actions");c||b||v.close()}}function n(a){switch(a.which){case c.KEY_CODE.ESCAPE:return v.close(),a.preventDefault(),!1;case c.KEY_CODE.LEFT_ARROW:return"left"===v.direction?u(a,1):u(a,-1),!1;case c.KEY_CODE.UP_ARROW:return"down"===v.direction?u(a,-1):u(a,1),!1;case c.KEY_CODE.RIGHT_ARROW:return"left"===v.direction?u(a,-1):u(a,1),!1;case c.KEY_CODE.DOWN_ARROW:return"up"===v.direction?u(a,-1):
u(a,1),!1}}function u(a,b){var c=y();v.currentActionIndex+=b;v.currentActionIndex=Math.min(c.length-1,v.currentActionIndex);v.currentActionIndex=Math.max(0,v.currentActionIndex);c=e.element(c[v.currentActionIndex]).children()[0];e.element(c).attr("tabindex",0);c.focus();a.preventDefault();a.stopImmediatePropagation()}function y(){var a=d.find("md-fab-actions")[0].querySelectorAll(".md-fab-action-item");e.forEach(a,function(a){e.element(e.element(a).children()[0]).attr("tabindex",-1)});return a}function w(b){a.getClosest(b.target,
"md-fab-trigger")&&v.toggle();a.getClosest(b.target,"md-fab-actions")&&v.close()}var v=this;v.open=function(){k.$evalAsync("vm.isOpen = true")};v.close=function(){k.$evalAsync("vm.isOpen = false");d.find("md-fab-trigger")[0].focus()};v.toggle=function(){k.$evalAsync("vm.isOpen = !vm.isOpen")};v.direction=v.direction||"down";v.isOpen=v.isOpen||!1;v.currentActionIndex=-1;d.addClass("md-animations-waiting");(function(){var a=["click","focusin","focusout"];e.forEach(a,function(a){d.on(a,b)});k.$on("$destroy",
function(){e.forEach(a,function(a){d.off(a,b)});p()})})();(function(){k.$watch("vm.direction",function(a,b){f.removeClass(d,"md-"+b);f.addClass(d,"md-"+a);v.currentActionIndex=-1});var a,b;k.$watch("vm.isOpen",function(c){v.currentActionIndex=-1;a&&b||(a=d.find("md-fab-trigger"),b=d.find("md-fab-actions"));c?m():p();var h=c?"md-is-open":"",g=c?"":"md-is-open";a.attr("aria-haspopup",!0);a.attr("aria-expanded",c);b.attr("aria-hidden",!c);f.setClass(d,h,g)})})();var t=0;h();var A}e.module("material.components.fabShared",
["material.core"]).controller("MdFabController",l);l.$inject="$scope $element $animate $mdUtil $mdConstant $timeout".split(" ")})()})();(function(){(function(){function l(d){function f(a){if(!a.hasClass("md-animations-waiting")||a.hasClass("_md-animations-ready")){var c=a[0],d=a.controller("mdFabSpeedDial"),b=c.querySelectorAll(".md-fab-action-item"),h=c.querySelector("md-fab-trigger");a=c.querySelector("._md-css-variables");var f=parseInt(E.getComputedStyle(a).zIndex);e.forEach(b,function(a,c){var d=
a.style;d.transform=d.webkitTransform="";d.transitionDelay="";d.opacity=1;d.zIndex=b.length-c+f});h.style.zIndex=f+b.length+1;d.isOpen||e.forEach(b,function(a,b){var c,g,e=a.style,f=(h.clientHeight-a.clientHeight)/2,k=(h.clientWidth-a.clientWidth)/2;switch(d.direction){case "up":c=a.scrollHeight*(b+1)+f;g="Y";break;case "down":c=-(a.scrollHeight*(b+1)+f);g="Y";break;case "left":c=a.scrollWidth*(b+1)+k;g="X";break;case "right":c=-(a.scrollWidth*(b+1)+k),g="X"}e.transform=e.webkitTransform="translate"+
g+"("+c+"px)"})}}return{addClass:function(a,c,g){a.hasClass("md-fling")?(f(a),d(g,300,!1)):g()},removeClass:function(a,c,g){f(a);d(g,300,!1)}}}function k(d){function f(a){var c=a[0],d=a.controller("mdFabSpeedDial"),b=c.querySelectorAll(".md-fab-action-item");a=c.querySelector("._md-css-variables");var h=parseInt(E.getComputedStyle(a).zIndex);e.forEach(b,function(a,c){var g=a.style,e=65*c;g.opacity=d.isOpen?1:0;g.transform=g.webkitTransform=d.isOpen?"scale(1)":"scale(0)";g.transitionDelay=(d.isOpen?
e:b.length-e)+"ms";g.zIndex=b.length-c+h})}return{addClass:function(a,c,g){f(a);d(g,300,!1)},removeClass:function(a,c,g){f(a);d(g,300,!1)}}}e.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",function(){return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(d,e){e.prepend('<div class="_md-css-variables"></div>')}}}).animation(".md-fling",
l).animation(".md-scale",k).service("mdFabSpeedDialFlingAnimation",l).service("mdFabSpeedDialScaleAnimation",k);l.$inject=["$timeout"];k.$inject=["$timeout"]})()})();(function(){(function(){function l(){function k(d,f,a){if(f){var c=d[0];f=d.controller("mdFabToolbar");a=c.querySelector(".md-fab-toolbar-background");var g=c.querySelector("md-fab-trigger button"),b=c.querySelector("md-toolbar"),h=c.querySelector("md-fab-trigger button md-icon"),k=d.find("md-fab-actions").children();if(g&&a){var p=E.getComputedStyle(g).getPropertyValue("background-color"),
c=c.offsetWidth,l=c/g.offsetWidth*2;a.style.backgroundColor=p;a.style.borderRadius=c+"px";f.isOpen?(b.style.pointerEvents="inherit",a.style.width=g.offsetWidth+"px",a.style.height=g.offsetHeight+"px",a.style.transform="scale("+l+")",a.style.transitionDelay="0ms",h&&(h.style.transitionDelay=".3s"),e.forEach(k,function(a,b){a.style.transitionDelay=25*(k.length-b)+"ms"})):(b.style.pointerEvents="none",a.style.transform="scale(1)",a.style.top="0",d.hasClass("md-right")&&(a.style.left="0",a.style.right=
null),d.hasClass("md-left")&&(a.style.right="0",a.style.left=null),a.style.transitionDelay="200ms",h&&(h.style.transitionDelay="0ms"),e.forEach(k,function(a,b){a.style.transitionDelay=200+25*b+"ms"}))}}}return{addClass:function(d,e,a){k(d,e,a);a()},removeClass:function(d,e,a){k(d,e,a);a()}}}e.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",function(){return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>',
scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,d,f){d.addClass("md-fab-toolbar");d.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}}}).animation(".md-fab-toolbar",l).service("mdFabToolbarAnimation",l)})()})();(function(){function l(a,d,b,h){return{restrict:"E",controller:k,scope:{mdOnLayout:"&"},link:function(c,g,f,k){function m(a){null==a?k.invalidateLayout():h(a)&&
k.invalidateLayout()}function p(a,b,c,d,h){var g={};switch(d){case "fixed":g.height=M({unit:h,span:b,gutter:c});g.paddingBottom="";break;case "ratio":a=J({share:1/a*100*(1/h),gutterShare:1===a?0:(a-1)/a,gutter:c}),g.height="",g.paddingBottom=M({unit:a,span:b,gutter:c})}return g}function n(){return[].filter.call(g.children(),function(a){return"MD-GRID-TILE"==a.tagName&&!a.$$mdDestroyed})}function l(a){return[].map.call(a,function(a){a=e.element(a).controller("mdGridTile");return{row:parseInt(h.getResponsiveAttribute(a.$attrs,
"md-rowspan"),10)||1,col:parseInt(h.getResponsiveAttribute(a.$attrs,"md-colspan"),10)||1}})}function q(){var a=parseInt(h.getResponsiveAttribute(f,"md-cols"),10);if(isNaN(a))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return a}function A(){var a=h.getResponsiveAttribute(f,"md-row-height");if(!a)throw"md-grid-list: md-row-height attribute was not found";switch(K()){case "fixed":return D(a);case "ratio":return a=a.split(":"),parseFloat(a[0])/parseFloat(a[1]);
case "fit":return 0}}function K(){var a=h.getResponsiveAttribute(f,"md-row-height");if(!a)throw"md-grid-list: md-row-height attribute was not found";return"fit"==a?"fit":-1!==a.indexOf(":")?"ratio":"fixed"}function D(a){return/\D$/.test(a)?a:a+"px"}g.addClass("_md");g.attr("role","list");k.layoutDelegate=function(a){var d=n(),k={tileSpans:l(d),colCount:q(),rowMode:K(),rowHeight:A(),gutter:D(h.getResponsiveAttribute(f,"md-gutter")||1)};if(a||!e.equals(k,z))a=b(k.colCount,k.tileSpans,d).map(function(a,
b){return{grid:{element:g,style:p(k.colCount,b,k.gutter,k.rowMode,k.rowHeight)},tiles:a.map(function(a,c){var h=e.element(d[c]),g=a.position,f=a.spans,m=k.colCount,p=k.gutter,n=k.rowMode,l=k.rowHeight,q=1/m*100,m=(m-1)/m,C=J({share:q,gutterShare:m,gutter:p}),C="rtl"!=document.dir&&"rtl"!=document.body.dir?{left:L({unit:C,offset:g.col,gutter:p}),width:M({unit:C,span:f.col,gutter:p}),paddingTop:"",marginTop:"",top:"",height:""}:{right:L({unit:C,offset:g.col,gutter:p}),width:M({unit:C,span:f.col,gutter:p}),
paddingTop:"",marginTop:"",top:"",height:""};switch(n){case "fixed":C.top=L({unit:l,offset:g.row,gutter:p});C.height=M({unit:l,span:f.row,gutter:p});break;case "ratio":n=J({share:q/l,gutterShare:m,gutter:p});C.paddingTop=M({unit:n,span:f.row,gutter:p});C.marginTop=L({unit:n,offset:g.row,gutter:p});break;case "fit":n=J({share:1/b*100,gutterShare:(b-1)/b,gutter:p}),C.top=L({unit:n,offset:g.row,gutter:p}),C.height=M({unit:n,span:f.row,gutter:p})}return{element:h,style:C}})}}).reflow().performance(),
c.mdOnLayout({$event:{performance:a}}),z=k};var C=e.bind(k,k.invalidateLayout),B=function(){for(var a in d.MEDIA)h(a),h.getQuery(d.MEDIA[a]).addListener(C);return h.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],f,m)}();c.$on("$destroy",function(){k.layoutDelegate=e.noop;B();for(var a in d.MEDIA)h.getQuery(d.MEDIA[a]).removeListener(C)});var z,G=a.startSymbol(),F=a.endSymbol(),J=a(G+"share"+F+"% - ("+(G+"gutter"+F)+" * "+(G+"gutterShare"+F)+")"),L=a("calc(("+(G+"unit"+F)+" + "+
(G+"gutter"+F)+") * "+(G+"offset"+F)+")"),M=a("calc(("+(G+"unit"+F)+") * "+(G+"span"+F)+" + ("+(G+"span"+F)+" - 1) * "+(G+"gutter"+F)+")")}}}function k(a){this.tilesInvalidated=this.layoutInvalidated=!1;this.$timeout_=a.nextTick;this.layoutDelegate=e.noop}function d(a){function c(b,c){var h,g,e,k,m,p;k=a.time(function(){g=d(b,c)});return h={layoutInfo:function(){return g},map:function(b){m=a.time(function(){var a=h.layoutInfo();e=b(a.positioning,a.rowCount)});return h},reflow:function(b){p=a.time(function(){(b||
f)(e.grid,e.tiles)});return h},performance:function(){return{tileCount:c.length,layoutTime:k,mapTime:m,reflowTime:p,totalTime:k+m+p}}}}function b(a,b){a.element.css(a.style);b.forEach(function(a){a.element.css(a.style)})}function d(a,b){function c(a,b,c){for(var d=a;d<a+b;d++)g[d]=Math.max(g[d]+c,0)}var d=0,h=0,g=function(){for(var b=[],c=0;c<a;c++)b.push(0);return b}();return{positioning:b.map(function(b,e){if(b.col>a)throw"md-grid-list: Tile at position "+e+" has a colspan ("+b.col+") that exceeds the column count ("+
a+")";for(var f=0,k=0;k-f<b.col;)if(d>=a)d=0,h++,c(0,a,-1);else{var f=g.indexOf(0,d),m;if(!(m=-1===f)){a:{for(k=f+1;k<g.length;k++)if(0!==g[k])break a;k=k===g.length?k:void 0}m=-1===k}m?(d=f=k=0,h++,c(0,a,-1)):d=k+1}c(f,b.col,b.row);d=f+b.col;return{spans:b,position:{col:f,row:h}}}),rowCount:h+Math.max.apply(Math,g)}}var f=b;c.animateWith=function(a){f=e.isFunction(a)?a:b};return c}function f(a){return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},
controller:["$attrs",function(a){this.$attrs=a}],link:function(c,b,d,f){b.attr("role","listitem");var h=a.watchResponsiveAttributes(["md-colspan","md-rowspan"],d,e.bind(f,f.invalidateLayout));f.invalidateTiles();c.$on("$destroy",function(){b[0].$$mdDestroyed=!0;h();f.invalidateLayout()});e.isDefined(c.$parent.$index)&&c.$watch(function(){return c.$parent.$index},function(a,b){a!==b&&f.invalidateTiles()})}}}function a(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}e.module("material.components.gridList",
["material.core"]).directive("mdGridList",l).directive("mdGridTile",f).directive("mdGridTileFooter",a).directive("mdGridTileHeader",a).factory("$mdGridLayout",d);l.$inject=["$interpolate","$mdConstant","$mdGridLayout",