%PDF- %PDF-
Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/widget/ |
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/widget/loaded-range-min.js |
define("widget/loaded-range",function(){function A(B){this.start=undefined;this.nextPageStart=undefined;this._reachedStart=false;this._reachedEnd=false;this._reachedCapacity=false;this._capacity=B||Infinity}A.prototype.isEmpty=function(){return this.start===undefined};A.prototype.isBeforeStart=function(B){return B<this.start};A.prototype.isAfterNextPageStart=function(B){return B>this.nextPageStart};A.prototype.isLoaded=function(B){return !(this.isEmpty()||this.isBeforeStart(B)||this.isAfterNextPageStart(B))};A.prototype.getAttachmentMethod=function(C,B){return this.isEmpty()?"html":this.isBeforeStart(C)?"prepend":"append"};A.prototype.add=function(G,C,B,E){var F=this.isEmpty();E=E||(G+C);if(F||this.isBeforeStart(G)){this.start=G}if(F||this.isAfterNextPageStart(E)){this.nextPageStart=E}this._reachedStart=this._reachedStart||G<=0;var D=this._reachedEnd=this._reachedEnd||B;if(!D&&this.nextPageStart>=this._capacity){this._reachedCapacity=this._reachedEnd=true}return this};A.prototype.reachedStart=function(){return this._reachedStart};A.prototype.reachedEnd=function(){return this._reachedEnd};A.prototype.reachedCapacity=function(){return this._reachedCapacity};A.prototype.pageBefore=function(B){if(this.reachedStart()){return null}var C=Math.max(0,this.start-B);return{start:C,limit:this.start-C}};A.prototype.pageAfter=function(B){if(this.reachedEnd()){return null}return{start:this.nextPageStart,limit:B}};return A});