/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.11.3-master-3fe7d76
*/
!function(t,e,i){"use strict";function s(){return{controller:r,template:n,compile:function(t,e){t.addClass("md-virtual-repeat-container").addClass(e.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function n(t){return'
"}function r(t,i,s,n,r){this.$scope=s,this.$element=n,this.$attrs=r,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.$attrs.mdTopIndex?(this.bindTopIndex=i(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),e.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,e.bind(this,function(t){t!==this.topIndex&&this.scrollToIndex(t)}))):this.topIndex=0,this.scroller=n[0].getElementsByClassName("md-virtual-repeat-scroller")[0],this.sizer=this.scroller.getElementsByClassName("md-virtual-repeat-sizer")[0],this.offsetter=this.scroller.getElementsByClassName("md-virtual-repeat-offsetter")[0],t(e.bind(this,this.updateSize)),r.ngHide&&s.$watch(r.ngHide,e.bind(this,function(i){i||t(e.bind(this,this.updateSize))}))}function o(t){return{controller:h,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,i){var s=i.mdVirtualRepeat,n=s.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),r=n[1],o=t(n[2]),h=i.mdExtraName&&t(i.mdExtraName);return function(t,e,i,s,n){s[0].link_(s[1],n,r,o,h)}}}}function h(t,i,s,n,r,o){this.$scope=t,this.$element=i,this.$attrs=s,this.$browser=n,this.$document=r,this.$$rAF=o,this.onDemand=s.hasOwnProperty("mdOnDemand"),this.browserCheckUrlChange=n.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=t.$eval(s.mdItemSize)||null,this.isFirstRender=!0,this.itemsLength=0,this.unwatchItemSize_=e.noop,this.blocks={},this.pooledBlocks=[]}function a(t){if(!e.isFunction(t.getItemAtIndex)||!e.isFunction(t.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=t}e.module("material.components.virtualRepeat",["material.core"]).directive("mdVirtualRepeatContainer",s).directive("mdVirtualRepeat",o);var l=1533917,d=3;r.$inject=["$$rAF","$parse","$scope","$element","$attrs"],r.prototype.register=function(t){this.repeater=t,e.element(this.scroller).on("scroll wheel touchmove touchend",e.bind(this,this.handleScroll_))},r.prototype.isHorizontal=function(){return this.horizontal},r.prototype.getSize=function(){return this.size},r.prototype.setSize_=function(t){this.size=t,this.$element[0].style[this.isHorizontal()?"width":"height"]=t+"px"},r.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.repeater&&this.repeater.containerUpdated())},r.prototype.getScrollSize=function(){return this.scrollSize},r.prototype.sizeScroller_=function(t){var e=this.isHorizontal()?"width":"height",i=this.isHorizontal()?"height":"width";if(l>t)this.sizer.style[e]=t+"px";else{this.sizer.innerHTML="",this.sizer.style[e]="auto",this.sizer.style[i]="auto";var s=Math.floor(t/l),n=document.createElement("div");n.style[e]=l+"px",n.style[i]="1px";for(var r=0;s>r;r++)this.sizer.appendChild(n.cloneNode(!1));n.style[e]=t-s*l+"px",this.sizer.appendChild(n)}},r.prototype.autoShrink_=function(t){var e=Math.max(t,this.autoShrinkMin*this.repeater.getItemSize());this.autoShrink&&e!==this.size&&(e<(this.originalSize||this.size)?(this.originalSize||(this.originalSize=this.size),this.setSize_(e)):this.originalSize&&(this.setSize_(this.originalSize),this.originalSize=null))},r.prototype.setScrollSize=function(t){var e=t+this.offsetSize;this.scrollSize!==e&&(this.sizeScroller_(e),this.autoShrink_(e),this.scrollSize=e)},r.prototype.getScrollOffset=function(){return this.scrollOffset},r.prototype.scrollTo=function(t){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=t,this.handleScroll_()},r.prototype.scrollToIndex=function(t){var e=this.repeater.getItemSize(),i=this.repeater.itemsLength;t>i&&(t=i-1),this.scrollTo(e*t)},r.prototype.resetScroll=function(){this.scrollTo(0)},r.prototype.handleScroll_=function(){var t=this.isHorizontal()?this.scroller.scrollLeft:this.scroller.scrollTop;if(t!==this.scrollOffset){var e=this.repeater.getItemSize();if(e){var i=Math.max(0,Math.floor(t/e)-d),s=this.isHorizontal()?"translateX(":"translateY(";if(s+=i*e+"px)",this.scrollOffset=t,this.offsetter.style.webkitTransform=s,this.offsetter.style.transform=s,this.bindTopIndex){var n=Math.floor(t/e);n!==this.topIndex&&nthis.container.getScrollSize())&&(this.items instanceof a&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items)))):(this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,e.bind(this,function(t){t&&t.length&&this.$$rAF(e.bind(this,this.readItemSize_))})),void(this.$scope.$root.$$phase||this.$scope.$digest()))},h.prototype.getItemSize=function(){return this.itemSize},h.prototype.virtualRepeatUpdate_=function(t,i){var s=t&&t.length||0,n=!1;if(this.items&&s=this.newEndIndex)&&this.poolBlock_(e)},this),this.$browser.$$checkUrlChange=e.noop;var o,h,a=[],l=[];for(o=this.newStartIndex;oi;i++)this.hasOwnProperty(i)||(this[i]=this.model.getItemAtIndex(i));this.length=this.model.getLength()}}(window,window.angular);