// All material copyright ESRI, All Rights Reserved, unless otherwise specified.// See https://js.arcgis.com/4.6/esri/copyright.txt for details.//>>builtdefine("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/JSONSupport ./support/spatialReferenceUtils".split(" "),function(c,n,g,e,d,h,k){c=function(c){functionb(a){a=c.call(this)||this;a.latestWkid=null;a.wkid=null;a.wkt=null;returna}g(b,c);f=b;b.fromJSON=function(a){if(!a)returnnull;if(a.wkid){if(102100===a.wkid)returnf.WebMercator;if(4326===a.wkid)returnf.WGS84}varb=newf;b.read(a);returnb};b.prototype.normalizeCtorArgs=function(a){returna&&"object"===typeofa?a:(b={},b["string"===typeofa?"wkt":"wkid"]=a,b);varb};Object.defineProperty(b.prototype,"isWGS84",{get:function(){return4326===this.wkid},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWebMercator",{get:function(){return-1!==l.indexOf(this.wkid)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isGeographic",{get:function(){returnk.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWrappable",{get:function(){return-1!==m.indexOf(this.wkid)},enumerable:!0,configurable:!0});b.prototype.writeWkt=function(a,b){this.wkid||(b.wkt=a)};b.prototype.clone=function(){if(this===f.WGS84)returnf.WGS84;if(this===f.WebMercator)returnf.WebMercator;vara=newf;null!=this.wkid?(a.wkid=this.wkid,null!=this.latestWkid&&(a.latestWkid=this.latestWkid),null!=this.vcsWkid&&(a.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(a.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(a.wkt=this.wkt);returna};b.prototype.equals=function(a){if(a){if(this===a)return!0;if(null!=this.wkid||null!=a.wkid)returnthis.wkid===a.wkid||this.isWebMercator&&a.isWebMercator||null!=a.latestWkid&&this.wkid===a.latestWkid||null!=this.latestWkid&&a.wkid===this.latestWkid;if(this.wkt&&a.wkt)returnthis.wkt.toUpperCase()===a.wkt.toUpperCase()}return!1};b.prototype.toJSON=function(a){returnthis.write(null,a)};b.GCS_NAD_1927=null;b.WGS84=null;b.WebMercator=null;e([d.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWGS84",null);e([d.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWebMercator",null);e([d.property({dependsOn:["wkid","wkt"],readOnly:!0})],b.prototype,"isGeographic",null);e([d.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWrappable",null);e([d.property({type:Number,json:{write:!0}})],b.prototype,"latestWkid",void0);e([d.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt?!0:!1}}}}}}})],b.prototype,"wkid",void0);e([d.property({type:String,json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid?!0:!1}}}}}}})],b.prototype,"wkt",void0);e([d.writer("wkt")],b.prototype,"writeWkt",null);e([d.property({type:Number,json:{write:!0}})],b.prototype,"vcsWkid",void0);e([d.property({type:Number,json:{write:!0}})],b.prototype,"latestVcsWkid",void0);returnb=f=e([d.subclass("esri.SpatialReference")],b);varf}(d.declared(h));c.prototype.toJSON.isDefaultToJSON=!0;c.GCS_NAD_1927=newc({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'});c.WGS84=newc(4326);c.WebMercator=newc({wkid:102100,latestWkid:3857});Object.freeze&&(Object.freeze(c.GCS_NAD_1927),Object.freeze(c.WGS84),Object.freeze(c.WebMercator));varl=[102113,102100,3857,3785],m=[102113,102100,3857,3785,4326];returnc});