// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.7/esri/copyright.txt for details. //>>built define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ./support/spatialReferenceUtils".split(" "),function(b,m,h,e,k,l,d,g){b=function(b){function a(c){c=b.call(this)||this;c.latestWkid=null;c.wkid=null;c.wkt=null;return c}h(a,b);f=a;a.fromJSON=function(c){if(!c)return null;if(c.wkid){if(102100===c.wkid)return f.WebMercator;if(4326===c.wkid)return f.WGS84}var a=new f;a.read(c);return a};a.prototype.normalizeCtorArgs= function(a){return a&&"object"===typeof a?a:(c={},c["string"===typeof a?"wkt":"wkid"]=a,c);var c};Object.defineProperty(a.prototype,"isWGS84",{get:function(){return g.isWGS84(this)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"isWebMercator",{get:function(){return g.isWebMercator(this)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"isGeographic",{get:function(){return g.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "isWrappable",{get:function(){return g.isWrappable(this)},enumerable:!0,configurable:!0});a.prototype.writeWkt=function(a,b){this.wkid||(b.wkt=a)};a.prototype.clone=function(){if(this===f.WGS84)return f.WGS84;if(this===f.WebMercator)return f.WebMercator;var a=new f;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);return a}; a.prototype.equals=function(a){return g.equals(this,a)};a.prototype.toJSON=function(a){return this.write(null,a)};a.GCS_NAD_1927=null;a.WGS84=null;a.WebMercator=null;e([d.property({dependsOn:["wkid"],readOnly:!0})],a.prototype,"isWGS84",null);e([d.property({dependsOn:["wkid"],readOnly:!0})],a.prototype,"isWebMercator",null);e([d.property({dependsOn:["wkid","wkt"],readOnly:!0})],a.prototype,"isGeographic",null);e([d.property({dependsOn:["wkid"],readOnly:!0})],a.prototype,"isWrappable",null);e([d.property({type:Number, json:{write:!0}})],a.prototype,"latestWkid",void 0);e([d.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt?!0:!1}}}}}}})],a.prototype,"wkid",void 0);e([d.property({type:String,json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid?!0:!1}}}}}}})],a.prototype,"wkt",void 0);e([d.writer("wkt"),d.writer("web-scene","wkt")],a.prototype,"writeWkt",null);e([d.property({type:Number,json:{write:!0}})], a.prototype,"vcsWkid",void 0);e([d.property({type:Number,json:{write:!0}})],a.prototype,"latestVcsWkid",void 0);return a=f=e([d.subclass("esri.geometry.SpatialReference")],a);var f}(d.declared(k));b.prototype.toJSON.isDefaultToJSON=!0;b.GCS_NAD_1927=new b({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]]'});b.WGS84=new b(4326);b.WGS84.wkt=l.substitute({Central_Meridian:"0.0"}, g.getInfo(b.WGS84).wkTemplate);b.WebMercator=new b({wkid:102100,latestWkid:3857});Object.freeze&&(Object.freeze(b.GCS_NAD_1927),Object.freeze(b.WGS84),Object.freeze(b.WebMercator));return b});