// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/dataProviders/supportClasses/ge/LocalGEBase","dojo/_base/declare dojo/_base/lang dojo/Evented dojo/on esri/graphic esri/tasks/FeatureSet ../AreaDataUtil ../stdGeographies/StdGeographiesUtil dojo/i18n!../../../../../../nls/jsapi".split(" "),function(e,f,g,h,k,l,m,n,d){d=d.geoenrichment.dijit.ReportPlayer.ReportPlayer;return e(g,{metadata:{name:"StdGeographyName",address:"address"},_variables:null,_variableShortToFullNameCache:null,_areaData:null,_cacheData:!1,
_data:null,_initGE:function(a,c,b){this._variables=a||[];this._variableShortToFullNameCache={};this._variables.forEach(function(a){this._variableShortToFullNameCache[-1===a.indexOf(".")?a:a.substr(a.indexOf(".")+1)]=a},this);(a=c&&m.getAreaDataObjectCalculator(c,b))?this._areaData=[a.data].concat(a.comparisonLevels||[]):this._handleError(Error("Can't get infographic calculator"))},getVariables:function(){return this._variables},setVariables:function(a){this._variables=a},getData:function(){if(this._data)return this._data;
var a=new l,c=this._prepareFeatures();a.features=c;a.fields=this._prepareFields(c);this._prepareFieldAliases(a);this._cacheData&&(this._data=a);return a},_prepareFeatures:function(){var a=[];if(!this._areaData)return a;for(var c=0;c<this._areaData.length;c++){var b={AREA_ID:c+""};this._propulateAttributesFromAreaData(b,this._areaData[c]);b.StdGeographyName=String(b.StdGeographyName||"");b.StdGeographyID=String(b.StdGeographyID||"");b.StdGeographyLevel=String(b.StdGeographyLevel||"");if(0===c)b.name=
b.StdGeographyName=d.thisArea;else{if(!b.StdGeographyName&&!b.StdGeographyID&&!b.StdGeographyLevel){console.log("LocalGEBase.js can't add an unidentifiable geography.");continue}b.name=n.getAreaName(b)}a.push(new k(null,null,b))}return a},_propulateAttributesFromAreaData:function(a,c){f.mixin(a,c)},_stringAttrs:{AREA_ID:1,StdGeographyName:1,StdGeographyID:1,StdGeographyLevel:1,name:1},_prepareFields:function(a){var c=[];if(!a.length)return c;a=a[0].attributes;for(var b in a)c.push(this._createField(b,
a));return c},_createField:function(a,c){var b=this._stringAttrs[a]||"string"===typeof c[a];return{name:a,alias:a,type:b?"esriFieldTypeString":"esriFieldTypeDouble",length:b?256:void 0,fullName:this._variableShortToFullNameCache[a],decimals:b?void 0:0,units:b?"other":"double"}},_prepareFieldAliases:function(a){a.fieldAliases={};a.fields.forEach(function(c){a.fieldAliases[c.name]=c.alias})},_handleError:function(a){setTimeout(function(){a&&h.emit(this,"error",a)}.bind(this))},isBusy:function(){return!1},
setOutSR:function(){},setGeoLevels:function(){},setStudyArea:function(){},stop:function(){}})});