// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(g,e,h,u,v,w,r){function n(a,b){const d=t,f=d.length,c=[];let l,p=a;a=0<=a?a:0;b=0=d}isMaxScaleEdge(a){const {lastRange:b}=this,d=b.maxScale;return a<=(k.RecommendedScales[b.id]||b.minScale)&& a>=d}findScaleRange(a){const b=this.ranges;let d;if(a>=b[0].maxScale)return b[0];if(a<=b[b.length-1].minScale)return b[b.length-1];for(let f=0;f=c.maxScale&&a<=c.minScale){d=c;break}}return d}findScaleRangeByIndex(a){return this.ranges[this._clampScaleRangeIndex(a)]}scaleToRangeIndex(a){return this.ranges.indexOf(this.findScaleRange(a))}clampScale(a){return Math.min(this.minScale,Math.max(this.maxScale,a))}clampMinScale(a){return 0===a?this.minScale:this.clampScale(a)}clampMaxScale(a){return this.clampScale(a)}contains(a){const b= this.ranges;let d=!1;for(let f=0;f=c&&a<=l){d=!0;break}}return d}_clampScaleRangeIndex(a){if(0>=a)return 0;const b=this.ranges.length-1;return a>b?b:Math.floor(a)}};e.RecommendedScales=Object.freeze({world:147914382,continent:5E7,countriesBig:25E6,countriesSmall:12E6,statesProvinces:6E6,stateProvince:3E6,counties:15E5,county:75E4,metropolitanArea:32E4,cities:16E4,city:8E4,town:4E4,neighborhood:2E4,streets:1E4,street:5E3,buildings:2500,building:1250, smallBuilding:800,rooms:400,room:100});g.__decorate([h.property()],e.prototype,"firstRange",null);g.__decorate([h.property()],e.prototype,"lastRange",null);g.__decorate([h.property()],e.prototype,"length",null);g.__decorate([h.property()],e.prototype,"maxScale",null);g.__decorate([h.property()],e.prototype,"minScale",null);g.__decorate([h.property({constructOnly:!0})],e.prototype,"ranges",void 0);return e=k=g.__decorate([r.subclass("esri.widgets.ScaleRangeSlider.ScaleRanges")],e)});