');b(o[0],r[0]);if(!r.attr("aria-label")){r.attr("aria-label",t.getText(o))}if(o.hasClass("md-no-focus")){r.addClass("md-no-focus")}f.prepend(r);f.children().eq(1).append(o.contents());o.addClass("_md-button-wrap")}o[0].setAttribute("tabindex","-1");o.append(f)}function g(){var t=e.element('
');e.forEach(u,function(e){y(e,t)});f.append(t)}function y(n,r){if(n&&!_(n)&&n.hasAttribute("ng-click")){t.expect(n,"aria-label");var i=e.element('');b(n,i[0],["ng-if","ng-hide","ng-show"]);n.setAttribute("tabindex","-1");i.append(n);n=i[0]}if(n&&(!w(n)||!s.ngClick&&$(n))){e.element(n).removeClass("md-secondary")}o.addClass("md-with-secondary");r.append(n)}function b(t,n,i){var a=r.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"]);if(i){a=a.concat(r.prefixer(i))}e.forEach(a,function(e){if(t.hasAttribute(e)){n.setAttribute(e,t.getAttribute(e));t.removeAttribute(e)}})}function $(t){return a.indexOf(t.nodeName.toLowerCase())!=-1}function _(t){var e=t.nodeName.toUpperCase();return e=="MD-BUTTON"||e=="BUTTON"}function w(t){var e=t.attributes;for(var n=0;n
');var a={};function o(){return{definePreset:s,getAllPresets:u,clearPresets:c,$get:l()}}function s(t,e){if(!t||!e){throw new Error("mdPanelProvider: The panel preset definition is "+"malformed. The name and preset object are required.")}else if(a.hasOwnProperty(t)){throw new Error("mdPanelProvider: The panel preset you have requested "+"has already been defined.")}delete e.id;delete e.position;delete e.animation;a[t]=e}function u(){return e.copy(a)}function c(){a={}}function l(){return["$rootElement","$rootScope","$injector","$window",function(t,e,n,r){return new f(a,t,e,n,r)}]}function f(n,r,i,a,o){this._defaultConfigOptions={bindToController:true,clickOutsideToClose:false,disableParentScroll:false,escapeToClose:false,focusOnOpen:true,fullscreen:false,hasBackdrop:false,propagateContainerEvents:false,transformTemplate:e.bind(this,this._wrapTemplate),trapFocus:false,zIndex:t};this._config={};this._presets=n;this._$rootElement=r;this._$rootScope=i;this._$injector=a;this._$window=o;this._$mdUtil=this._$injector.get("$mdUtil");this._trackedPanels={};this._groups=Object.create(null);this.animation=p.animation;this.xPosition=h.xPosition;this.yPosition=h.yPosition;this.interceptorTypes=d.interceptorTypes;this.closeReasons=d.closeReasons;this.absPosition=h.absPosition}f.prototype.create=function(t,n){if(typeof t==="string"){t=this._getPresetByName(t)}else if(typeof t==="object"&&(e.isUndefined(n)||!n)){n=t;t={}}t=t||{};n=n||{};if(e.isDefined(n.id)&&this._trackedPanels[n.id]){var r=this._trackedPanels[n.id];e.extend(r.config,n);return r}this._config=e.extend({id:n.id||"panel_"+this._$mdUtil.nextUid(),scope:this._$rootScope.$new(true),attachTo:this._$rootElement},this._defaultConfigOptions,n,t);var i=new d(this._config,this._$injector);this._trackedPanels[n.id]=i;if(this._config.groupName){if(e.isString(this._config.groupName)){this._config.groupName=[this._config.groupName]}e.forEach(this._config.groupName,function(t){i.addToGroup(t)})}this._config.scope.$on("$destroy",e.bind(i,i.detach));return i};f.prototype.open=function(t,e){var n=this.create(t,e);return n.open().then(function(){return n})};f.prototype._getPresetByName=function(t){if(!this._presets[t]){throw new Error("mdPanel: The panel preset configuration that you "+"requested does not exist. Use the $mdPanelProvider to create a "+"preset before requesting one.")}return this._presets[t]};f.prototype.newPanelPosition=function(){return new h(this._$injector)};f.prototype.newPanelAnimation=function(){return new p(this._$injector)};f.prototype.newPanelGroup=function(t,e){if(!this._groups[t]){e=e||{};var n={panels:[],openPanels:[],maxOpen:e.maxOpen>0?e.maxOpen:Infinity};this._groups[t]=n}return this._groups[t]};f.prototype.setGroupMaxOpen=function(t,e){if(this._groups[t]){this._groups[t].maxOpen=e}else{throw new Error("mdPanel: Group does not exist yet. Call newPanelGroup().")}};f.prototype._openCountExceedsMaxOpen=function(t){if(this._groups[t]){var e=this._groups[t];return e.maxOpen>0&&e.openPanels.length>e.maxOpen}return false};f.prototype._closeFirstOpenedPanel=function(t){this._groups[t].openPanels[0].close()};f.prototype._wrapTemplate=function(t){
+var e=t||"";return""+'
');t.addClass("md-panel").css("left","-9999px");n.append(t);return n};function d(t,e){this._$q=e.get("$q");this._$mdCompiler=e.get("$mdCompiler");this._$mdConstant=e.get("$mdConstant");this._$mdUtil=e.get("$mdUtil");this._$mdTheming=e.get("$mdTheming");this._$rootScope=e.get("$rootScope");this._$animate=e.get("$animate");this._$mdPanel=e.get("$mdPanel");this._$log=e.get("$log");this._$window=e.get("$window");this._$$rAF=e.get("$$rAF");this.id=t.id;this.config=t;this.panelContainer;this.panelEl;this.isAttached=false;this._removeListeners=[];this._topFocusTrap;this._bottomFocusTrap;this._backdropRef;this._restoreScroll=null;this._interceptors=Object.create(null);this._compilerCleanup=null;this._restoreCache={styles:"",classes:""}}d.interceptorTypes={CLOSE:"onClose"};d.prototype.open=function(){var t=this;return this._$q(function(n,r){var i=t._done(n,t);var a=t._simpleBind(t.show,t);var o=function(){if(t.config.groupName){e.forEach(t.config.groupName,function(e){if(t._$mdPanel._openCountExceedsMaxOpen(e)){t._$mdPanel._closeFirstOpenedPanel(e)}})}};t.attach().then(a).then(o).then(i).catch(r)})};d.prototype.close=function(t){var n=this;return this._$q(function(r,i){n._callInterceptors(d.interceptorTypes.CLOSE).then(function(){var a=n._done(r,n);var o=n._simpleBind(n.detach,n);var s=n.config["onCloseSuccess"]||e.noop;s=e.bind(n,s,n,t);n.hide().then(o).then(a).then(s).catch(i)},i)})};d.prototype.attach=function(){if(this.isAttached&&this.panelEl){return this._$q.when(this)}var t=this;return this._$q(function(n,r){var i=t._done(n,t);var a=t.config["onDomAdded"]||e.noop;var o=function(e){t.isAttached=true;t._addEventListeners();return e};t._$q.all([t._createBackdrop(),t._createPanel().then(o).catch(r)]).then(a).then(i).catch(r)})};d.prototype.detach=function(){if(!this.isAttached){return this._$q.when(this)}var t=this;var n=t.config["onDomRemoved"]||e.noop;var r=function(){t._removeEventListeners();if(t._topFocusTrap&&t._topFocusTrap.parentNode){t._topFocusTrap.parentNode.removeChild(t._topFocusTrap)}if(t._bottomFocusTrap&&t._bottomFocusTrap.parentNode){t._bottomFocusTrap.parentNode.removeChild(t._bottomFocusTrap)}if(t._restoreCache.classes){t.panelEl[0].className=t._restoreCache.classes}t.panelEl[0].style.cssText=t._restoreCache.styles||"";t._compilerCleanup();t.panelContainer.remove();t.isAttached=false;return t._$q.when(t)};if(this._restoreScroll){this._restoreScroll();this._restoreScroll=null}return this._$q(function(e,i){var a=t._done(e,t);t._$q.all([r(),t._backdropRef?t._backdropRef.detach():true]).then(n).then(a).catch(i)})};d.prototype.destroy=function(){var t=this;if(this.config.groupName){e.forEach(this.config.groupName,function(e){t.removeFromGroup(e)})}this.config.scope.$destroy();this.config.locals=null;this._interceptors=null};d.prototype.show=function(){if(!this.panelContainer){return this._$q(function(t,e){e("mdPanel: Panel does not exist yet. Call open() or attach().")})}if(!this.panelContainer.hasClass(r)){return this._$q.when(this)}var t=this;var n=function(){t.panelContainer.removeClass(r);return t._animateOpen()};return this._$q(function(r,i){var a=t._done(r,t);var o=t.config["onOpenComplete"]||e.noop;var s=function(){if(t.config.groupName){e.forEach(t.config.groupName,function(e){t._$mdPanel._groups[e].openPanels.push(t)})}};t._$q.all([t._backdropRef?t._backdropRef.show():t,n().then(function(){t._focusOnOpen()},i)]).then(o).then(s).then(a).catch(i)})};d.prototype.hide=function(){if(!this.panelContainer){return this._$q(function(t,e){e("mdPanel: Panel does not exist yet. Call open() or attach().")})}if(this.panelContainer.hasClass(r)){return this._$q.when(this)}var t=this;return this._$q(function(n,i){var a=t._done(n,t);var o=t.config["onRemoving"]||e.noop;var s=function(){t.panelContainer.addClass(r)};var u=function(){if(t.config.groupName){var n,r;e.forEach(t.config.groupName,function(e){e=t._$mdPanel._groups[e];r=e.openPanels.indexOf(t);if(r>-1){e.openPanels.splice(r,1)}})}};var c=function(){var e=t.config["origin"];if(e){m(e).focus()}};t._$q.all([t._backdropRef?t._backdropRef.hide():t,t._animateClose().then(o).then(s).then(u).then(c).catch(i)]).then(a,i)})};d.prototype.addClass=function(t,e){this._$log.warn("mdPanel: The addClass method is in the process of being deprecated. "+"Full deprecation is scheduled for the Angular Material 1.2 release. "+"To achieve the same results, use the panelContainer or panelEl "+"JQLite elements that are referenced in MdPanelRef.");if(!this.panelContainer){throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().")}if(!e&&!this.panelContainer.hasClass(t)){this.panelContainer.addClass(t)}else if(e&&!this.panelEl.hasClass(t)){this.panelEl.addClass(t)}};d.prototype.removeClass=function(t,e){this._$log.warn("mdPanel: The removeClass method is in the process of being deprecated. "+"Full deprecation is scheduled for the Angular Material 1.2 release. "+"To achieve the same results, use the panelContainer or panelEl "+"JQLite elements that are referenced in MdPanelRef.");if(!this.panelContainer){throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().")}if(!e&&this.panelContainer.hasClass(t)){this.panelContainer.removeClass(t)}else if(e&&this.panelEl.hasClass(t)){this.panelEl.removeClass(t)}};d.prototype.toggleClass=function(t,e){this._$log.warn("mdPanel: The toggleClass method is in the process of being deprecated. "+"Full deprecation is scheduled for the Angular Material 1.2 release. "+"To achieve the same results, use the panelContainer or panelEl "+"JQLite elements that are referenced in MdPanelRef.");if(!this.panelContainer){throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().")}if(!e){this.panelContainer.toggleClass(t)}else{this.panelEl.toggleClass(t)}};d.prototype._compile=function(){var t=this;return t._$mdCompiler.compile(t.config).then(function(n){var r=t.config;if(r.contentElement){var i=n.element;t._restoreCache.styles=i[0].style.cssText;t._restoreCache.classes=i[0].className;t.panelContainer=t._$mdPanel._wrapContentElement(i);t.panelEl=i}else{t.panelContainer=n.link(r["scope"]);t.panelEl=e.element(t.panelContainer[0].querySelector(".md-panel"))}t._compilerCleanup=n.cleanup;m(t.config["attachTo"]).append(t.panelContainer);return t})};d.prototype._createPanel=function(){var t=this;return this._$q(function(e,n){if(!t.config.locals){t.config.locals={}}t.config.locals.mdPanelRef=t;t._compile().then(function(){if(t.config["disableParentScroll"]){t._restoreScroll=t._$mdUtil.disableScrollAround(null,t.panelContainer,{disableScrollMask:true})}if(t.config["panelClass"]){t.panelEl.addClass(t.config["panelClass"])}if(t.config["propagateContainerEvents"]){t.panelContainer.css("pointer-events","none")}if(t._$animate.pin){t._$animate.pin(t.panelContainer,m(t.config["attachTo"]))}t._configureTrapFocus();t._addStyles().then(function(){e(t)},n)},n)})};d.prototype._addStyles=function(){var t=this;return this._$q(function(e){t.panelContainer.css("z-index",t.config["zIndex"]);t.panelEl.css("z-index",t.config["zIndex"]+1);var n=function(){t._setTheming();t.panelEl.css("left","");t.panelContainer.addClass(r);e(t)};if(t.config["fullscreen"]){t.panelEl.addClass("_md-panel-fullscreen");n();return}var i=t.config["position"];if(!i){n();return}t._$rootScope["$$postDigest"](function(){t._updatePosition(true);t._setTheming();e(t)})})};d.prototype._setTheming=function(){this._$mdTheming(this.panelEl);this._$mdTheming(this.panelContainer)};d.prototype.updatePosition=function(t){if(!this.panelContainer){throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().")}this.config["position"]=t;this._updatePosition()};d.prototype._updatePosition=function(t){var e=this.config["position"];if(e){e._setPanelPosition(this.panelEl);if(t){this.panelContainer.addClass(r)}this.panelEl.css(h.absPosition.TOP,e.getTop());this.panelEl.css(h.absPosition.BOTTOM,e.getBottom());this.panelEl.css(h.absPosition.LEFT,e.getLeft());this.panelEl.css(h.absPosition.RIGHT,e.getRight())}};d.prototype._focusOnOpen=function(){if(this.config["focusOnOpen"]){var t=this;this._$rootScope["$$postDigest"](function(){var e=t._$mdUtil.findFocusTarget(t.panelEl)||t.panelEl;e.focus()})}};d.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var t=this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"});if(this.config.animation){t.duration(this.config.animation._rawDuration)}var e={animation:t,attachTo:this.config.attachTo,focusOnOpen:false,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(e)}if(!this._backdropRef.isAttached){return this._backdropRef.attach()}}};d.prototype._addEventListeners=function(){this._configureEscapeToClose();this._configureClickOutsideToClose();this._configureScrollListener()};d.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(t){t()});this._removeListeners=[]};d.prototype._configureEscapeToClose=function(){if(this.config["escapeToClose"]){var t=m(this.config["attachTo"]);var e=this;var n=function(t){if(t.keyCode===e._$mdConstant.KEY_CODE.ESCAPE){t.stopPropagation();t.preventDefault();e.close(d.closeReasons.ESCAPE)}};this.panelContainer.on("keydown",n);t.on("keydown",n);this._removeListeners.push(function(){e.panelContainer.off("keydown",n);t.off("keydown",n)})}};d.prototype._configureClickOutsideToClose=function(){if(this.config["clickOutsideToClose"]){var t=this.config["propagateContainerEvents"]?e.element(document.body):this.panelContainer;var n;var r=function(t){n=t.target};var i=this;var a=function(e){if(i.config["propagateContainerEvents"]){if(n!==i.panelEl[0]&&!i.panelEl[0].contains(n)){i.close()}}else if(n===t[0]&&e.target===t[0]){e.stopPropagation();e.preventDefault();i.close(d.closeReasons.CLICK_OUTSIDE)}};t.on("mousedown",r);t.on("mouseup",a);this._removeListeners.push(function(){t.off("mousedown",r);t.off("mouseup",a)})}};d.prototype._configureScrollListener=function(){if(!this.config["disableParentScroll"]){var t=e.bind(this,this._updatePosition);var n=this._$$rAF.throttle(t);var r=this;var i=function(){n()};this._$window.addEventListener("scroll",i,true);this._removeListeners.push(function(){r._$window.removeEventListener("scroll",i,true)})}};d.prototype._configureTrapFocus=function(){this.panelEl.attr("tabIndex","-1");if(this.config["trapFocus"]){var t=this.panelEl;this._topFocusTrap=i.clone()[0];this._bottomFocusTrap=i.clone()[0];var e=function(){t.focus()};this._topFocusTrap.addEventListener("focus",e);this._bottomFocusTrap.addEventListener("focus",e);this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",e);this._bottomFocusTrap.removeEventListener("focus",e)},this));t[0].parentNode.insertBefore(this._topFocusTrap,t[0]);t.after(this._bottomFocusTrap)}};d.prototype.updateAnimation=function(t){this.config["animation"]=t;if(this._backdropRef){this._backdropRef.config.animation.duration(t._rawDuration)}};d.prototype._animateOpen=function(){this.panelContainer.addClass("md-panel-is-showing");var t=this.config["animation"];if(!t){this.panelContainer.addClass("_md-panel-shown");return this._$q.when(this)}var e=this;return this._$q(function(n){var r=e._done(n,e);var i=function(){e._$log.warn("mdPanel: MdPanel Animations failed. "+"Showing panel without animating.");r()};t.animateOpen(e.panelEl).then(r,i)})};d.prototype._animateClose=function(){var t=this.config["animation"];if(!t){this.panelContainer.removeClass("md-panel-is-showing");this.panelContainer.removeClass("_md-panel-shown");return this._$q.when(this)}var e=this;return this._$q(function(n){var r=function(){e.panelContainer.removeClass("md-panel-is-showing");n(e)};var i=function(){e._$log.warn("mdPanel: MdPanel Animations failed. "+"Hiding panel without animating.");r()};t.animateClose(e.panelEl).then(r,i)})};d.prototype.registerInterceptor=function(t,n){var r=null;if(!e.isString(t)){r="Interceptor type must be a string, instead got "+typeof t}else if(!e.isFunction(n)){r="Interceptor callback must be a function, instead got "+typeof n}if(r){throw new Error("MdPanel: "+r)}var i=this._interceptors[t]=this._interceptors[t]||[];if(i.indexOf(n)===-1){i.push(n)}return this};d.prototype.removeInterceptor=function(t,e){var n=this._interceptors[t]?this._interceptors[t].indexOf(e):-1;if(n>-1){this._interceptors[t].splice(n,1)}return this};d.prototype.removeAllInterceptors=function(t){if(t){this._interceptors[t]=[]}else{this._interceptors=Object.create(null)}return this};d.prototype._callInterceptors=function(t){var n=this;var r=n._$q;var i=n._interceptors&&n._interceptors[t]||[];return i.reduceRight(function(t,i){var a=i&&e.isFunction(i.then);var o=a?i:null;return t.then(function(){if(!o){try{o=i(n)}catch(t){o=r.reject(t)}}return o})},r.resolve(n))};d.prototype._simpleBind=function(t,e){return function(n){return t.apply(e,n)}};d.prototype._done=function(t,e){return function(){t(e)}};d.prototype.addToGroup=function(t){if(!this._$mdPanel._groups[t]){this._$mdPanel.newPanelGroup(t)}var e=this._$mdPanel._groups[t];var n=e.panels.indexOf(this);if(n<0){e.panels.push(this)}};d.prototype.removeFromGroup=function(t){if(!this._$mdPanel._groups[t]){throw new Error("mdPanel: The group "+t+" does not exist.")}var e=this._$mdPanel._groups[t];var n=e.panels.indexOf(this);if(n>-1){e.panels.splice(n,1)}};d.closeReasons={CLICK_OUTSIDE:"clickOutsideToClose",ESCAPE:"escapeToClose"};function h(t){this._$window=t.get("$window");this._isRTL=t.get("$mdUtil").bidi()==="rtl";this._$mdConstant=t.get("$mdConstant");this._absolute=false;this._relativeToEl;this._top="";this._bottom="";this._left="";this._right="";this._translateX=[];this._translateY=[];this._positions=[];this._actualPosition}h.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"};h.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"};h.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"};h.viewportMargin=8;h.prototype.absolute=function(){this._absolute=true;return this};h.prototype._setPosition=function(t,n){if(t===h.absPosition.RIGHT||t===h.absPosition.LEFT){this._left=this._right=""}else if(t===h.absPosition.BOTTOM||t===h.absPosition.TOP){this._top=this._bottom=""}else{var r=Object.keys(h.absPosition).join().toLowerCase();throw new Error("mdPanel: Position must be one of "+r+".")}this["_"+t]=e.isString(n)?n:"0";return this};h.prototype.top=function(t){return this._setPosition(h.absPosition.TOP,t)};h.prototype.bottom=function(t){return this._setPosition(h.absPosition.BOTTOM,t)};h.prototype.start=function(t){var e=this._isRTL?h.absPosition.RIGHT:h.absPosition.LEFT;return this._setPosition(e,t)};h.prototype.end=function(t){var e=this._isRTL?h.absPosition.LEFT:h.absPosition.RIGHT;return this._setPosition(e,t)};h.prototype.left=function(t){return this._setPosition(h.absPosition.LEFT,t)};h.prototype.right=function(t){return this._setPosition(h.absPosition.RIGHT,t)};h.prototype.centerHorizontally=function(){this._left="50%";this._right="";this._translateX=["-50%"];return this};h.prototype.centerVertically=function(){this._top="50%";this._bottom="";this._translateY=["-50%"];return this};h.prototype.center=function(){return this.centerHorizontally().centerVertically()};h.prototype.relativeTo=function(t){this._absolute=false;this._relativeToEl=m(t);return this};h.prototype.addPanelPosition=function(t,e){if(!this._relativeToEl){throw new Error("mdPanel: addPanelPosition can only be used with "+"relative positioning. Set relativeTo first.")}this._validateXPosition(t);this._validateYPosition(e);this._positions.push({x:t,y:e});return this};h.prototype._validateYPosition=function(t){if(t==null){return}var e=Object.keys(h.yPosition);var n=[];for(var r,i=0;r=e[i];i++){var a=h.yPosition[r];n.push(a);if(a===t){return}}throw new Error("mdPanel: Panel y position only accepts the following "+"values:\n"+n.join(" | "))};h.prototype._validateXPosition=function(t){if(t==null){return}var e=Object.keys(h.xPosition);var n=[];for(var r,i=0;r=e[i];i++){var a=h.xPosition[r];n.push(a);if(a===t){return}}throw new Error("mdPanel: Panel x Position only accepts the following "+"values:\n"+n.join(" | "))};h.prototype.withOffsetX=function(t){this._translateX.push(t);return this};h.prototype.withOffsetY=function(t){this._translateY.push(t);return this};h.prototype.getTop=function(){return this._top};h.prototype.getBottom=function(){return this._bottom};h.prototype.getLeft=function(){return this._left};h.prototype.getRight=function(){return this._right};h.prototype.getTransform=function(){var t=this._reduceTranslateValues("translateX",this._translateX);var e=this._reduceTranslateValues("translateY",this._translateY);return(t+" "+e).trim()};h.prototype._setTransform=function(t){return t.css(this._$mdConstant.CSS.TRANSFORM,this.getTransform())};h.prototype._isOnscreen=function(t){var e=parseInt(this.getLeft());var n=parseInt(this.getTop());if(this._translateX.length||this._translateY.length){var r=this._$mdConstant.CSS.TRANSFORM;var i=v(t,r);e+=i.x;n+=i.y}var a=e+t[0].offsetWidth;var o=n+t[0].offsetHeight;return e>=0&&n>=0&&o<=this._$window.innerHeight&&a<=this._$window.innerWidth};h.prototype.getActualPosition=function(){return this._actualPosition};h.prototype._reduceTranslateValues=function(t,n){return n.map(function(n){var r=e.isFunction(n)?n(this):n;return t+"("+r+")"},this).join(" ")};h.prototype._setPanelPosition=function(t){t.removeClass("_md-panel-position-adjusted");if(this._absolute){this._setTransform(t);return}if(this._actualPosition){this._calculatePanelPosition(t,this._actualPosition);this._setTransform(t);this._constrainToViewport(t);return}for(var e=0;e
o){this._top=i-(a-o+e)+"px"}}if(this.getLeft()){var s=parseInt(this.getLeft());var u=t[0].offsetWidth+s;var c=this._$window.innerWidth;if(sc){this._left=s-(u-c+e)+"px"}}t.toggleClass("_md-panel-position-adjusted",this._top!==n||this._left!==r)};h.prototype._reverseXPosition=function(t){if(t===h.xPosition.CENTER){return}var e="start";var n="end";return t.indexOf(e)>-1?t.replace(e,n):t.replace(n,e)};h.prototype._bidi=function(t){return this._isRTL?this._reverseXPosition(t):t};h.prototype._calculatePanelPosition=function(t,e){var n=t[0].getBoundingClientRect();var r=n.width;var i=n.height;var a=this._relativeToEl[0].getBoundingClientRect();var o=a.left;var s=a.right;var u=a.width;switch(this._bidi(e.x)){case h.xPosition.OFFSET_START:this._left=o-r+"px";break;case h.xPosition.ALIGN_END:this._left=s-r+"px";break;case h.xPosition.CENTER:var c=o+.5*u-.5*r;this._left=c+"px";break;case h.xPosition.ALIGN_START:this._left=o+"px";break;case h.xPosition.OFFSET_END:this._left=s+"px";break}var l=a.top;var f=a.bottom;var d=a.height;switch(e.y){case h.yPosition.ABOVE:this._top=l-i+"px";break;case h.yPosition.ALIGN_BOTTOMS:this._top=f-i+"px";break;case h.yPosition.CENTER:var p=l+.5*d-.5*i;this._top=p+"px";break;case h.yPosition.ALIGN_TOPS:this._top=l+"px";break;case h.yPosition.BELOW:this._top=f+"px";break}};function p(t){this._$mdUtil=t.get("$mdUtil");this._openFrom;this._closeTo;this._animationClass="";this._openDuration;this._closeDuration;this._rawDuration}p.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"};p.prototype.openFrom=function(t){t=t.target?t.target:t;this._openFrom=this._getPanelAnimationTarget(t);if(!this._closeTo){this._closeTo=this._openFrom}return this};p.prototype.closeTo=function(t){this._closeTo=this._getPanelAnimationTarget(t);return this};p.prototype.duration=function(t){if(t){if(e.isNumber(t)){this._openDuration=this._closeDuration=n(t)}else if(e.isObject(t)){this._openDuration=n(t.open);this._closeDuration=n(t.close)}}this._rawDuration=t;return this;function n(t){if(e.isNumber(t))return t/1e3}};p.prototype._getPanelAnimationTarget=function(t){if(e.isDefined(t.top)||e.isDefined(t.left)){return{element:n,bounds:{top:t.top||0,left:t.left||0}}}else{return this._getBoundingClientRect(m(t))}};p.prototype.withAnimation=function(t){this._animationClass=t;return this};p.prototype.animateOpen=function(t){var n=this._$mdUtil.dom.animator;this._fixBounds(t);var r={};var i=t[0].style.transform||"";var a=n.toTransformCss(i);var o=n.toTransformCss(i);switch(this._animationClass){case p.animation.SLIDE:t.css("opacity","1");r={transitionInClass:"_md-panel-animate-enter"};var s=n.calculateSlideToOrigin(t,this._openFrom)||"";a=n.toTransformCss(s+" "+i);break;case p.animation.SCALE:r={transitionInClass:"_md-panel-animate-enter"};var u=n.calculateZoomToOrigin(t,this._openFrom)||"";a=n.toTransformCss(u+" "+i);break;case p.animation.FADE:r={transitionInClass:"_md-panel-animate-enter"};break;default:if(e.isString(this._animationClass)){r={transitionInClass:this._animationClass}}else{r={transitionInClass:this._animationClass["open"],transitionOutClass:this._animationClass["close"]}}}r.duration=this._openDuration;return n.translate3d(t,a,o,r)};p.prototype.animateClose=function(t){var n=this._$mdUtil.dom.animator;var r={};var i=t[0].style.transform||"";var a=n.toTransformCss(i);var o=n.toTransformCss(i);switch(this._animationClass){case p.animation.SLIDE:t.css("opacity","1");r={transitionInClass:"_md-panel-animate-leave"};var s=n.calculateSlideToOrigin(t,this._closeTo)||"";o=n.toTransformCss(s+" "+i);break;case p.animation.SCALE:r={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var u=n.calculateZoomToOrigin(t,this._closeTo)||"";o=n.toTransformCss(u+" "+i);break;case p.animation.FADE:r={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:if(e.isString(this._animationClass)){r={transitionOutClass:this._animationClass}}else{r={transitionInClass:this._animationClass["close"],transitionOutClass:this._animationClass["open"]}}}r.duration=this._closeDuration;return n.translate3d(t,a,o,r)};p.prototype._fixBounds=function(t){var e=t[0].offsetWidth;var n=t[0].offsetHeight;if(this._openFrom&&this._openFrom.bounds.height==null){this._openFrom.bounds.height=n}if(this._openFrom&&this._openFrom.bounds.width==null){this._openFrom.bounds.width=e}if(this._closeTo&&this._closeTo.bounds.height==null){this._closeTo.bounds.height=n}if(this._closeTo&&this._closeTo.bounds.width==null){this._closeTo.bounds.width=e}};p.prototype._getBoundingClientRect=function(t){if(t instanceof e.element){return{element:t,bounds:t[0].getBoundingClientRect()}}};function m(t){var n=e.isString(t)?document.querySelector(t):t;return e.element(n)}function v(t,e){var n=getComputedStyle(t[0]||t)[e];var r=n.indexOf("(");var i=n.lastIndexOf(")");var a={x:0,y:0};if(r>-1&&i>-1){var o=n.substring(r+1,i).split(", ").slice(-2);a.x=parseInt(o[0]);a.y=parseInt(o[1])}return a}})();(function(){"use strict";e.module("material.components.menuBar",["material.core","material.components.icon","material.components.menu"])})();(function(){"use strict";e.module("material.components.menu",["material.core","material.components.backdrop"])})();(function(){"use strict";r.$inject=["$element","$scope","$timeout","$mdConstant"];i.$inject=["$mdAria","$$rAF"];a.$inject=["$element"];t.$inject=["$mdAria","$mdTheming"];e.module("material.components.navBar",["material.core"]).controller("MdNavBarController",r).directive("mdNavBar",t).controller("MdNavItemController",a).directive("mdNavItem",i);function t(t,n){return{restrict:"E",transclude:true,controller:r,controllerAs:"ctrl",bindToController:true,scope:{mdSelectedNavItem:"=?",mdNoInkBar:"=?",navBarAriaLabel:"@?"},template:'",link:function(r,i,a,o){n(i);if(!o.navBarAriaLabel){t.expectAsync(i,"aria-label",e.noop)}}}}function r(t,e,n,r){this._$timeout=n;this._$scope=e;this._$mdConstant=r;this.mdSelectedNavItem;this.navBarAriaLabel;this._navBarEl=t[0];this._inkbar;var i=this;var a=this._$scope.$watch(function(){return i._navBarEl.querySelectorAll("._md-nav-button").length},function(t){if(t>0){i._initTabs();a()}})}r.prototype._initTabs=function(){this._inkbar=e.element(this._navBarEl.querySelector("md-nav-ink-bar"));var t=this;this._$timeout(function(){t._updateTabs(t.mdSelectedNavItem,n)});this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,n){t._$timeout(function(){t._updateTabs(e,n)})})};r.prototype._updateTabs=function(t,e){var n=this;var r=this._getTabs();if(!r)return;var i=-1;var a=-1;var o=this._getTabByName(t);var s=this._getTabByName(e);if(s){s.setSelected(false);i=r.indexOf(s)}if(o){o.setSelected(true);a=r.indexOf(o)}this._$timeout(function(){n._updateInkBarStyles(o,a,i)})};r.prototype._updateInkBarStyles=function(t,e,n){this._inkbar.toggleClass("_md-left",en);this._inkbar.css({display:e<0?"none":""});if(t){var r=t.getButtonEl();var i=r.offsetLeft;this._inkbar.css({left:i+"px",width:r.offsetWidth+"px"})}};r.prototype._getTabs=function(){var t=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")).map(function(t){return e.element(t).controller("mdNavItem")});return t.indexOf(n)?t:null};r.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})};r.prototype._getSelectedTab=function(){return this._findTab(function(t){return t.isSelected()})};r.prototype.getFocusedTab=function(){return this._findTab(function(t){return t.hasFocus()})};r.prototype._findTab=function(t){var e=this._getTabs();for(var n=0;n0){this._moveFocus(r,n[i-1])}break;case e.DOWN_ARROW:case e.RIGHT_ARROW:if(i1){throw Error("Must not specify more than one of the md-nav-click, md-nav-href, "+"or md-nav-sref attributes per nav-item directive.")}if(n){o='ng-click="ctrl.mdNavClick()"'}else if(r){o='ng-href="{{ctrl.mdNavHref}}"'}else if(i){o='ui-sref="{{ctrl.mdNavSref}}"'}s=a?'ui-sref-opts="{{ctrl.srefOpts}}" ':"";if(o){u=""+'"+''+""}return""+''+(u||"")+""},scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",srefOpts:"=?",name:"@"},link:function(r,i,a,o){n(function(){var n=o[0];var a=o[1];var s=e.element(i[0].querySelector("._md-nav-button"));if(!n.name){n.name=e.element(i[0].querySelector("._md-nav-button-text")).text().trim()}s.on("click",function(){a.mdSelectedNavItem=n.name;r.$apply()});t.expectWithText(i,"aria-label")})}}}function a(t){this._$element=t;this.mdNavClick;this.mdNavHref;this.mdNavSref;this.srefOpts;this.name;this._selected=false;this._focused=false}a.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}};a.prototype.getName=function(){return this.name};a.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")};a.prototype.setSelected=function(t){this._selected=t};a.prototype.isSelected=function(){return this._selected};a.prototype.setFocused=function(t){this._focused=t;if(t){this.getButtonEl().focus()}};a.prototype.hasFocus=function(){return this._focused}})();(function(){"use strict";e.module("material.components.progressCircular",["material.core"])})();(function(){"use strict";e.module("material.components.showHide",["material.core"]).directive("ngShow",t("ngShow",true)).directive("ngHide",t("ngHide",false));function t(t,e){return["$mdUtil","$window",function(n,r){return{restrict:"A",multiElement:true,link:function(i,a,o){var s=i.$on("$md-resize-enable",function(){s();var u=a[0];var c=u.nodeType===r.Node.ELEMENT_NODE?r.getComputedStyle(u):{};i.$watch(o[t],function(t){if(!!t===e){n.nextTick(function(){i.$broadcast("$md-resize")});var r={cachedTransitionStyles:c};n.dom.animator.waitTransitionEnd(a,r).then(function(){i.$broadcast("$md-resize")})}})})}}}]}})();(function(){"use strict";t.$inject=["$mdTheming","$mdUtil","$log"];e.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",t);function t(t,n,r){var i="determinate";var a="indeterminate";var o="buffer";var s="query";var u="_md-progress-linear-disabled";return{restrict:"E",template:'",compile:c};function c(t,e,n){t.attr("aria-valuemin",0);t.attr("aria-valuemax",100);t.attr("role","progressbar");return l}function l(r,c,l){t(c);var d;var h=l.hasOwnProperty("disabled");var p=n.dom.animator.toCss;var m=e.element(c[0].querySelector(".md-bar1"));var v=e.element(c[0].querySelector(".md-bar2"));var g=e.element(c[0].querySelector(".md-container"));c.attr("md-mode",$()).toggleClass(u,h);b();y();function y(){l.$observe("value",function(t){var e=f(t);c.attr("aria-valuenow",e);if($()!=s)_(v,e)});l.$observe("mdBufferValue",function(t){_(m,f(t))});l.$observe("disabled",function(t){if(t===true||t===false){h=!!t}else{h=e.isDefined(t)}c.toggleClass(u,h);g.toggleClass(d,!h)});l.$observe("mdMode",function(t){if(d)g.removeClass(d);switch(t){case s:case o:case i:case a:g.addClass(d="md-mode-"+t);break;default:g.addClass(d="md-mode-"+a);break}})}function b(){if(e.isUndefined(l.mdMode)){var t=e.isDefined(l.value);var n=t?i:a;var r="Auto-adding the missing md-mode='{0}' to the ProgressLinear element";c.attr("md-mode",n);l.mdMode=n}}function $(){var t=(l.mdMode||"").trim();if(t){switch(t){case i:case a:case o:case s:break;default:t=a;break}}return t}function _(t,r){if(h||!$())return;var i=n.supplant("translateX({0}%) scale({1},1)",[(r-100)/2,r/100]);var a=p({transform:i});e.element(t).css(a)}}function f(t){return Math.max(0,Math.min(t||0,100))}}})();(function(){"use strict";o.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$parse","$sce","$injector"];s.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"];u.$inject=["$mdButtonInkRipple","$mdUtil"];f.$inject=["$$interimElementProvider"];var r=8;var i=0;var a=e.element('');
+e.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",o).directive("mdSelectMenu",s).directive("mdOption",u).directive("mdOptgroup",c).directive("mdSelectHeader",l).provider("$mdSelect",f);function o(t,r,i,a,o,s,u,c){var l=i.KEY_CODE;var f=[l.SPACE,l.ENTER,l.UP_ARROW,l.DOWN_ARROW];return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:d,controller:function(){}};function d(c,l){var f=e.element("");f.append('');f.addClass("md-select-value");if(!f[0].hasAttribute("id")){f.attr("id","select_value_label_"+r.nextUid())}if(!c.find("md-content").length){c.append(e.element("").append(c.contents()))}if(l.mdOnOpen){c.find("md-content").prepend(e.element(""+' '+"
"));c.find("md-option").attr("ng-show","$$loadingAsyncDone")}if(l.name){var d=e.element('",require:["^^mdCalendar","mdCalendarYear"],controller:r,controllerAs:"yearCtrl",bindToController:true,link:function(t,e,n,r){var i=r[0];var a=r[1];a.initialize(i)}}}function r(t,e,n,r,i){this.$element=t;this.$scope=e;this.$animate=n;this.$q=r;this.dateUtil=i;this.calendarScroller=t[0].querySelector(".md-virtual-repeat-scroller");this.isInitialized=false;this.isMonthTransitionInProgress=false;var a=this;this.cellClickHandler=function(){a.calendarCtrl.setCurrentView("month",i.getTimestampFromNode(this))}}r.prototype.initialize=function(t){this.items={length:this.dateUtil.getYearDistance(t.firstRenderableDate,t.lastRenderableDate)+1};this.calendarCtrl=t;this.attachScopeListeners();t.updateVirtualRepeat();t.ngModelCtrl&&t.ngModelCtrl.$render()};r.prototype.getFocusedYearIndex=function(){var t=this.calendarCtrl;return this.dateUtil.getYearDistance(t.firstRenderableDate,t.displayDate||t.selectedDate||t.today)};r.prototype.changeDate=function(t){if(!this.isInitialized){this.calendarCtrl.hideVerticalScrollbar(this);this.isInitialized=true;return this.$q.when()}else if(this.dateUtil.isValidDate(t)&&!this.isMonthTransitionInProgress){var e=this;var n=this.animateDateChange(t);e.isMonthTransitionInProgress=true;e.calendarCtrl.displayDate=t;return n.then(function(){e.isMonthTransitionInProgress=false})}};r.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var n=this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=n*t}return this.$q.when()};r.prototype.handleKeyEvent=function(t,e){var n=this.calendarCtrl;var r=n.displayDate;if(e==="select"){this.changeDate(r).then(function(){n.setCurrentView("month",r);n.focus(r)})}else{var i=null;var a=this.dateUtil;switch(e){case"move-right":i=a.incrementMonths(r,1);break;case"move-left":i=a.incrementMonths(r,-1);break;case"move-row-down":i=a.incrementMonths(r,6);break;case"move-row-up":i=a.incrementMonths(r,-6);break}if(i){var o=n.minDate?a.getFirstDateOfMonth(n.minDate):null;var s=n.maxDate?a.getFirstDateOfMonth(n.maxDate):null;i=a.getFirstDateOfMonth(this.dateUtil.clampDate(i,o,s));this.changeDate(i).then(function(){n.focus(i)})}}};r.prototype.attachScopeListeners=function(){var t=this;t.$scope.$on("md-calendar-parent-changed",function(e,n){t.changeDate(n)});t.$scope.$on("md-calendar-parent-action",e.bind(t,t.handleKeyEvent))}})()})();(function(){"use strict";(function(){"use strict";n.$inject=["$element","$$mdDateUtil","$mdDateLocale"];e.module("material.components.datepicker").directive("mdCalendarYearBody",t);function t(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:n,controllerAs:"mdYearBodyCtrl",bindToController:true,link:function(t,n,r,i){var a=i[0];var o=i[1];var s=i[2];s.calendarCtrl=a;s.yearCtrl=o;t.$watch(function(){return s.offset},function(t){if(e.isNumber(t)){s.generateContent()}})}}}function n(t,e,n){this.$element=t;this.dateUtil=e;this.dateLocale=n;this.calendarCtrl=null;this.yearCtrl=null;this.offset=null;this.focusAfterAppend=null}n.prototype.generateContent=function(){var t=this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForYear(t));if(this.focusAfterAppend){this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS);this.focusAfterAppend.focus();this.focusAfterAppend=null}};n.prototype.buildMonthCell=function(t,e){var n=this.calendarCtrl;var r=this.yearCtrl;var i=this.buildBlankCell();var a=new Date(t,e,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(a));i.id=n.getDateId(a,"year");i.setAttribute("data-timestamp",a.getTime());if(this.dateUtil.isSameMonthAndYear(a,n.today)){i.classList.add(n.TODAY_CLASS)}if(this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameMonthAndYear(a,n.selectedDate)){i.classList.add(n.SELECTED_DATE_CLASS);i.setAttribute("aria-selected","true")}var o=this.dateLocale.shortMonths[e];if(this.dateUtil.isMonthWithinRange(a,n.minDate,n.maxDate)){var s=document.createElement("span");s.classList.add("md-calendar-date-selection-indicator");s.textContent=o;i.appendChild(s);i.addEventListener("click",r.cellClickHandler);if(n.displayDate&&this.dateUtil.isSameMonthAndYear(a,n.displayDate)){this.focusAfterAppend=i}}else{i.classList.add("md-calendar-date-disabled");i.textContent=o}return i};n.prototype.buildBlankCell=function(){var t=document.createElement("td");t.tabIndex=-1;t.classList.add("md-calendar-date");t.setAttribute("role","gridcell");t.setAttribute("tabindex","-1");return t};n.prototype.buildCalendarForYear=function(t){var e=t.getFullYear();var n=document.createDocumentFragment();var r,i;var a=document.createElement("tr");var o=document.createElement("td");o.className="md-calendar-month-label";o.textContent=e;a.appendChild(o);for(i=0;i<6;i++){a.appendChild(this.buildMonthCell(e,i))}n.appendChild(a);var s=document.createElement("tr");s.appendChild(this.buildBlankCell());for(i=6;i<12;i++){s.appendChild(this.buildMonthCell(e,i))}n.appendChild(s);return n}})()})();(function(){"use strict";(function(){"use strict";e.module("material.components.datepicker").config(["$provide",function(t){function e(){this.months=null;this.shortMonths=null;this.days=null;this.shortDays=null;this.dates=null;this.firstDayOfWeek=0;this.formatDate=null;this.parseDate=null;this.monthHeaderFormatter=null;this.weekNumberFormatter=null;this.longDateFormatter=null;this.msgCalendar="";this.msgOpenCalendar=""}e.prototype.$get=function(t,e){function n(t,n){if(!t){return""}var r=t.toLocaleTimeString();var i=t;if(t.getHours()===0&&(r.indexOf("11:")!==-1||r.indexOf("23:")!==-1)){i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),1,0,0)}return e("date")(i,"M/d/yyyy",n)}function r(t){return new Date(t)}function i(t){t=t.trim();var e=/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;return e.test(t)}function a(t){return v.shortMonths[t.getMonth()]+" "+t.getFullYear()}function o(t){return v.months[t.getMonth()]+" "+t.getFullYear()}function s(t){return"Week "+t}function u(t){return[v.days[t.getDay()],v.months[t.getMonth()],v.dates[t.getDate()],t.getFullYear()].join(" ")}var c=t.DATETIME_FORMATS.SHORTDAY.map(function(t){return t.substring(0,1)});var l=Array(32);for(var f=1;f<=31;f++){l[f]=f}var d="Calendar";var h="Open calendar";var p=new Date(1880,0,1);var m=new Date(p.getFullYear()+250,0,1);var v={months:this.months||t.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||t.DATETIME_FORMATS.SHORTMONTH,days:this.days||t.DATETIME_FORMATS.DAY,shortDays:this.shortDays||c,dates:this.dates||l,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||n,parseDate:this.parseDate||r,isDateComplete:this.isDateComplete||i,monthHeaderFormatter:this.monthHeaderFormatter||a,monthFormatter:this.monthFormatter||o,weekNumberFormatter:this.weekNumberFormatter||s,longDateFormatter:this.longDateFormatter||u,msgCalendar:this.msgCalendar||d,msgOpenCalendar:this.msgOpenCalendar||h,firstRenderableDate:this.firstRenderableDate||p,lastRenderableDate:this.lastRenderableDate||m};return v};e.prototype.$get.$inject=["$locale","$filter"];t.provider("$mdDateLocale",new e)}])})()})();(function(){"use strict";(function(){"use strict";e.module("material.components.datepicker").factory("$$mdDateUtil",function(){return{getFirstDateOfMonth:t,getNumberOfDaysInMonth:n,getDateInNextMonth:r,getDateInPreviousMonth:i,isInNextMonth:s,isInPreviousMonth:u,getDateMidpoint:c,isSameMonthAndYear:a,getWeekOfMonth:l,incrementDays:f,incrementMonths:d,getLastDateOfMonth:p,isSameDay:o,getMonthDistance:h,isValidDate:m,setDateTimeToMidnight:v,createDateAtMidnight:g,isDateWithinRange:y,incrementYears:b,getYearDistance:$,clampDate:_,getTimestampFromNode:w,isMonthWithinRange:x};function t(t){return new Date(t.getFullYear(),t.getMonth(),1)}function n(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function r(t){return new Date(t.getFullYear(),t.getMonth()+1,1)}function i(t){return new Date(t.getFullYear(),t.getMonth()-1,1)}function a(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function o(t,e){return t.getDate()==e.getDate()&&a(t,e)}function s(t,e){var n=r(t);return a(n,e)}function u(t,e){var n=i(t);return a(e,n)}function c(t,e){return g((t.getTime()+e.getTime())/2)}function l(e){var n=t(e);return Math.floor((n.getDay()+e.getDate()-1)/7)}function f(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function d(t,e){var r=new Date(t.getFullYear(),t.getMonth()+e,1);var i=n(r);if(i