text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.17/esri/copyright.txt for details.
  //>>built
  require({cache:{"esri/PopupInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/i18n dojo/has dojo/Deferred dojo/sniff dojo/promise/all ./lang ./kernel ./request ./tasks/query ./tasks/QueryTask ./tasks/StatisticDefinition dojo/i18n!dojo/cldr/nls/number".split(" "),function(B,y,A,F,E,G,D,l,c,a,d,h,f,e,g,k){B=B(null,{declaredClass:"esri.PopupInfo",initialize:function(b,a){if(b){y.mixin(this,a);this.info=b;this.title=this.getTitle;this.content=this.getContent;
  var e=this._fieldLabels={},c=this._fieldsMap={};b.fieldInfos&&A.forEach(b.fieldInfos,function(b){var a=b.fieldName.toLowerCase();e[a]=b.label;c[a]=b});this._relatedFieldPrefix="relationships/";this.titleHasRelatedFields=!!(b.title&&-1!==b.title.indexOf("{"+this._relatedFieldPrefix))}},toJson:function(){return F.fromJson(F.toJson(this.info))},getTitle:function(){},getContent:function(){},getFieldInfo:function(b){var a;A.some(this.info&&this.info.fieldInfos,function(e){e.fieldName===b&&(a=e);return!!a});
  return a},getComponents:function(b){var a=this.info,e=new D,c,f;a.fieldInfos&&(f=A.filter(a.fieldInfos,function(b){return-1!==b.fieldName.indexOf(this._relatedFieldPrefix)},this));f&&0<f.length&&(c=this._getRelatedRecords({graphic:b,fieldsInfo:f}));c?c.always(y.hitch(this,function(){e.resolve(this._getPopupValues(b))})):e.resolve(this._getPopupValues(b));return e.promise},getAttachments:function(b){var a=b.getLayer();b=b.attributes;if(this.info.showAttachments&&(a&&a.hasAttachments&&a.objectIdField)&&
  (b=b&&b[a.objectIdField]))return a.queryAttachmentInfos(b)},_getPopupValues:function(b,e){var c=this.info,f=b.getLayer(),g=y.clone(b.attributes)||{},d=y.clone(g),k=c.fieldInfos,h="",p="",t,u,v,z,C,l=f&&f._getDateOpts&&f._getDateOpts().properties,l=l&&l.slice(0),H={dateFormat:{properties:l,formatter:"DateFormat"+this._insertOffset(this._dateFormats.shortDateShortTime)}};if(this._relatedInfo)for(z in this._relatedInfo)if(this._relatedInfo.hasOwnProperty(z)){var J=this._relatedInfo[z],B=this._relatedLayersInfo[z];
  J&&(A.forEach(J.relatedFeatures,function(b){for(C in b.attributes)if(b.attributes.hasOwnProperty(C)&&"esriRelCardinalityOneToOne"===B.relation.cardinality){var a=this._toRelatedFieldName([B.relation.id,C]);g[a]=d[a]=b.attributes[C]}},this),A.forEach(J.relatedStatsFeatures,function(b){for(C in b.attributes)if(b.attributes.hasOwnProperty(C)){var a=this._toRelatedFieldName([B.relation.id,C]);g[a]=d[a]=b.attributes[C]}},this))}k&&A.forEach(k,function(b){u=b.fieldName;var a=this._getLayerFieldInfo(f,u);
  a&&(u=b.fieldName=a.name);d[u]=this._formatValue(d[u],u,H);l&&(b.format&&b.format.dateFormat)&&(b=A.indexOf(l,u),-1<b&&l.splice(b,1))},this);if(f){z=f.types;var G=(J=f.typeIdField)&&g[J];for(u in g)if(g.hasOwnProperty(u)&&-1===u.indexOf(this._relatedFieldPrefix)&&(v=g[u],a.isDefined(v))){var D=this._getDomainName(f,b,z,G,u,v);a.isDefined(D)?d[u]=D:u===J&&(D=this._getTypeName(f,b,v),a.isDefined(D)&&(d[u]=D))}}c.title&&(h=this._processFieldsInLinks(this._fixTokens(c.title,f),g),h=y.trim(a.substitute(d,
  h,H)||""));if(e)return{title:h};c.description&&(p=this._processFieldsInLinks(this._fixTokens(c.description,f),g),p=y.trim(a.substitute(d,p,H)||""));k&&(t=[],A.forEach(k,function(b){(u=b.fieldName)&&b.visible&&t.push([b.label||u,a.substitute(d,"${"+u+"}",H)||""])}));var E,F;c.mediaInfos&&(E=[],A.forEach(c.mediaInfos,function(b){F=0;v=b.value;switch(b.type){case "image":var p=v.sourceURL,p=p&&y.trim(a.substitute(g,this._fixTokens(p,f)));F=!!p;break;case "piechart":case "linechart":case "columnchart":case "barchart":var c,
  p=v.normalizeField;v.fields=A.map(v.fields,function(b){return(c=this._getLayerFieldInfo(f,b))?c.name:b},this);p&&(c=this._getLayerFieldInfo(f,p),v.normalizeField=c?c.name:p);F=A.some(v.fields,function(b){return a.isDefined(g[b])||-1!==b.indexOf(this._relatedFieldPrefix)&&this._relatedInfo},this);break;default:return}if(F){b=y.clone(b);v=b.value;var p=b.title?this._processFieldsInLinks(this._fixTokens(b.title,f),g):"",e=b.caption?this._processFieldsInLinks(this._fixTokens(b.caption,f),g):"";b.title=
  p?y.trim(a.substitute(d,p,H)||""):"";b.caption=e?y.trim(a.substitute(d,e,H)||""):"";if("image"===b.type)v.sourceURL=a.substitute(g,this._fixTokens(v.sourceURL,f)),v.linkURL&&(v.linkURL=y.trim(a.substitute(g,this._fixTokens(v.linkURL,f))||""));else{var k,h;A.forEach(v.fields,function(b,a){if(-1!==b.indexOf(this._relatedFieldPrefix))h=this._getRelatedChartInfos(b,v,g,H),h instanceof Array?v.fields=h:v.fields[a]=h;else{var p=g[b],p=void 0===p?null:p;k=g[v.normalizeField]||0;p&&k&&(p/=k);v.fields[a]=
  {y:p,tooltip:(this._fieldLabels[b.toLowerCase()]||b)+":\x3cbr/\x3e"+this._formatValue(p,b,H,!!k)}}},this)}E.push(b)}},this));return{title:h,description:p,hasDescription:!!c.description,fields:t&&t.length?t:null,mediaInfos:E&&E.length?E:null,formatted:d,editSummary:f&&f.getEditSummary?f.getEditSummary(b):""}},_getRelatedChartInfos:function(b,a,c,e){var f,g,d,k,p,h;f=[];h=this._fromRelatedFieldName(b);p=h[0];g=this._relatedInfo[p];p=this._relatedLayersInfo[p];g&&A.forEach(g.relatedFeatures,function(p){p=
  p.attributes;var g,s;for(s in p)if(p.hasOwnProperty(s)&&s===h[1]){g={};k=p[s];a.normalizeField&&(d=-1!==a.normalizeField.indexOf(this._relatedFieldPrefix)?p[this._fromRelatedFieldName(a.normalizeField)[1]]:c[a.normalizeField]);k&&d&&(k/=d);if(a.tooltipField)if(-1!==a.tooltipField.indexOf(this._relatedFieldPrefix)){var C=this._fromRelatedFieldName(a.tooltipField)[1];g.tooltip=p[C]&&"string"===typeof p[C]?p[C]+":\x3cbr/\x3e"+this._formatValue(k,p[C],e,!!d):C+":\x3cbr/\x3e"+this._formatValue(k,C,e,!!d)}else g.tooltip=
  (this._fieldLabels[b.toLowerCase()]||b)+":\x3cbr/\x3e"+this._formatValue(k,a.tooltipField,e,!!d);else g.tooltip=k;g.y=k;f.push(g)}},this);return"esriRelCardinalityOneToMany"===p.relation.cardinality||"esriRelCardinalityManyToMany"===p.relation.cardinality?f:f[0]},_dateFormats:{shortDate:"(datePattern: 'M/d/y', selector: 'date')",shortDateLE:"(datePattern: 'd/M/y', selector: 'date')",longMonthDayYear:"(datePattern: 'MMMM d, y', selector: 'date')",dayShortMonthYear:"(datePattern: 'd MMM y', selector: 'date')",
  longDate:"(datePattern: 'EEEE, MMMM d, y', selector: 'date')",shortDateShortTime:"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')",shortDateLEShortTime:"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')",shortDateShortTime24:"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')",shortDateLEShortTime24:"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')",shortDateLongTime:"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')",
  shortDateLELongTime:"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')",shortDateLongTime24:"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')",shortDateLELongTime24:"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')",longMonthYear:"(datePattern: 'MMMM y', selector: 'date')",shortMonthYear:"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"},_reHref:/href\s*=\s*\"([^\"]+)\"/ig,_reHrefApos:/href\s*=\s*\'([^\']+)\'/ig,
  _fixTokens:function(b,a){var c=this;return b.replace(/(\{([^\{\r\n]+)\})/g,function(b,e,f){b=c._getLayerFieldInfo(a,f);return"$"+(b?"{"+b.name+"}":e)})},_encodeAttributes:function(b){b=y.clone(b)||{};var a,c;for(a in b)if((c=b[a])&&"string"===typeof c)c=encodeURIComponent(c).replace(/\'/g,"\x26apos;"),b[a]=c;return b},_processFieldsInLinks:function(b,a){var c=this._encodeAttributes(a),e=this;b&&(b=b.replace(this._reHref,function(b,f){return e._addValuesToHref(b,f,a,c)}).replace(this._reHrefApos,function(b,
  f){return e._addValuesToHref(b,f,a,c)}));return b},_addValuesToHref:function(b,c,e,f){c=c&&y.trim(c);return a.substitute(c&&0===c.indexOf("${")?e:f,b)},_getLayerFieldInfo:function(b,a){return b&&b.getField?b.getField(a):null},_formatValue:function(b,c,e,f){var g=this._fieldsMap[c.toLowerCase()],d=g&&g.format;c=-1!==A.indexOf(e.dateFormat.properties,c);var h="number"===typeof b&&!c&&(!d||!d.dateFormat);if(!a.isDefined(b)||!g||!a.isDefined(d))return h?this._forceLTR(b):b;var l="",g=[],p=d.hasOwnProperty("places")||
  d.hasOwnProperty("digitSeparator"),t=d.hasOwnProperty("digitSeparator")?d.digitSeparator:!0;if(p&&!c)l="NumberFormat",g.push("places: "+(a.isDefined(d.places)&&(!f||0<d.places)?Number(d.places):"Infinity")),g.length&&(l+="("+g.join(",")+")");else if(d.dateFormat)l="DateFormat"+this._insertOffset(this._dateFormats[d.dateFormat]||this._dateFormats.shortDateShortTime);else return h?this._forceLTR(b):b;var u=this._applyFormatting(b,l,e);p&&-1<b.constructor.toString().indexOf("Array")&&(u="",A.forEach(b,
  y.hitch(this,function(b){u=u+this._applyFormatting(b,l,e)+" "})));p&&!t&&k.group&&(u=u.replace(RegExp("\\"+k.group,"g"),""));return h?this._forceLTR(u):u},_applyFormatting:function(b,c,e){return a.substitute({myKey:b},"${myKey:"+c+"}",e)||""},_forceLTR:function(b){var a=l("ie");return a&&10>=a?b:"\x3cspan class\x3d'esriNumericValue'\x3e"+b+"\x3c/span\x3e"},_insertOffset:function(b){b&&(b=a.isDefined(this.utcOffset)?b.replace(/\)\s*$/,", utcOffset:"+this.utcOffset+")"):b);return b},_getDomainName:function(b,
  a,c,e,f,g){return(b=b.getDomain&&b.getDomain(f,{feature:a}))&&b.codedValues?b.getName(g):null},_getTypeName:function(b,a,c){return(b=b.getType&&b.getType(a))&&b.name},_getRelatedRecords:function(b){var a=b.graphic,c=new D,e;this._relatedLayersInfo?this._queryRelatedLayers(a).then(y.hitch(this,function(b){this._setRelatedRecords(a,b);c.resolve(b)}),y.hitch(this,this._handlerErrorResponse,c)):this._getRelatedLayersInfo(b).then(y.hitch(this,function(b){for(e in b)b.hasOwnProperty(e)&&b[e]&&(this._relatedLayersInfo[e].relatedLayerInfo=
  b[e]);this._queryRelatedLayers(a).then(y.hitch(this,function(b){this._setRelatedRecords(a,b);c.resolve(b)}),y.hitch(this,this._handlerErrorResponse,c))}),y.hitch(this,this._handlerErrorResponse,c));return c.promise},_getRelatedLayersInfo:function(b){var a=b.fieldsInfo,e,f,d={};e=b.graphic.getLayer();this._relatedLayersInfo||(this._relatedLayersInfo={});A.forEach(a,function(b){var a,c,p,f;a=this._fromRelatedFieldName(b.fieldName);c=a[0];a=a[1];c&&(this._relatedLayersInfo[c]||(A.some(e.relationships,
  function(b){if(b.id==c)return f=b,!0}),f&&(this._relatedLayersInfo[c]={relation:f,relatedFields:[],outStatistics:[]})),this._relatedLayersInfo[c]&&(this._relatedLayersInfo[c].relatedFields.push(a),b.statisticType&&(p=new g,p.statisticType=b.statisticType,p.onStatisticField=a,p.outStatisticFieldName=a,this._relatedLayersInfo[c].outStatistics.push(p))))},this);for(f in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(f)&&this._relatedLayersInfo[f]&&(b=this._relatedLayersInfo[f].relation,
  b=e.url.replace(/[0-9]+$/,b.relatedTableId),this._relatedLayersInfo[f].relatedLayerUrl=b,d[f]=h({url:b,content:{f:"json"},callbackParamName:"callback"}));return c(d)},_queryRelatedLayers:function(b){var a={},e;for(e in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(e)&&(a[e]=this._queryRelatedLayer({graphic:b,relatedInfo:this._relatedLayersInfo[e]}));return c(a)},_queryRelatedLayer:function(b){var a,g,d,k,h,q,l,p,t,u;a=b.graphic;g=a.getLayer().url.match(/[0-9]+$/g)[0];p=b.relatedInfo;
  l=p.relatedLayerInfo;t=p.relatedLayerUrl;u=p.relation;A.some(l.relationships,function(b){if(b.relatedTableId===parseInt(g,10))return d=b,!0},this);d&&(b=new f,A.some(l.fields,function(b){if(b.name===d.keyField)return h=-1!==A.indexOf(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"],b.type)?"number":"string",!0}),k="string"===h?d.keyField+"\x3d'"+a.attributes[u.keyField]+"'":d.keyField+"\x3d"+a.attributes[u.keyField],b.where=k,b.outFields=p.relatedFields,
  p.outStatistics&&(0<p.outStatistics.length&&l.supportsStatistics)&&(q=new f,q.where=b.where,q.outFields=b.outFields,q.outStatistics=p.outStatistics),a=new e(t),k=[],k.push(a.execute(b)),q&&k.push(a.execute(q)));return c(k)},_setRelatedRecords:function(b,c){this._relatedInfo=[];for(var e in c)if(c.hasOwnProperty(e)&&c[e]){var f=c[e];this._relatedInfo[e]={};this._relatedInfo[e].relatedFeatures=f[0].features;a.isDefined(f[1])&&(this._relatedInfo[e].relatedStatsFeatures=f[1].features)}},_handlerErrorResponse:function(b,
  a){b.reject(a)},_fromRelatedFieldName:function(b){var a=[];-1!==b.indexOf(this._relatedFieldPrefix)&&(b=b.split("/"),a=b.slice(1));return a},_toRelatedFieldName:function(b){var a="";b&&0<b.length&&(a=this._relatedFieldPrefix+b[0]+"/"+b[1]);return a}});G("extend-esri")&&(d.PopupInfo=d.PopupInfoTemplate=B);return B})},"esri/tasks/QueryTask":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has ../kernel ../request ../deferredUtils ../geometry/Extent ../geometry/normalizeUtils ./Task ./FeatureSet".split(" "),
  function(B,y,A,F,E,G,D,l,c,a,d,h,f){B=B(h,{declaredClass:"esri.tasks.QueryTask",_eventMap:{complete:["featureSet"],"execute-for-count-complete":["count"],"execute-for-ids-complete":["objectIds"],"execute-relationship-query-complete":["featureSets"]},constructor:function(a,c){this._handler=y.hitch(this,this._handler);this._relationshipQueryHandler=y.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=y.hitch(this,this._executeForIdsHandler);this._countHandler=y.hitch(this,this._countHandler);
  this._extentHandler=y.hitch(this,this._extentHandler);this.source=c&&c.source;this.gdbVersion=c&&c.gdbVersion;this.registerConnectEvents()},__msigns:[{n:"execute",c:4,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForIds",c:3,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForCount",c:3,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForExtent",c:3,a:[{i:0,p:["geometry"]}],e:2}],onComplete:function(){},onExecuteRelationshipQueryComplete:function(){},onExecuteForIdsComplete:function(){},onExecuteForCountComplete:function(){},
  onExecuteForExtentComplete:function(){},execute:function(a,c,f,b,d){var h=d.assembly;a=this._encode(y.mixin({},this._url.query,{f:"json"},a.toJson(h&&h[0])));var m=this._handler,r=this._errorHandler;this.source&&(h={source:this.source.toJson()},a.layer=E.toJson(h));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return l({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(b,a){m(b,a,c,f,d.dfd)},error:function(b){r(b,f,d.dfd)},callbackSuffix:b},this.requestOptions)},executeRelationshipQuery:function(a,
  f,d){a=this._encode(y.mixin({},this._url.query,{f:"json"},a.toJson()));var b=this._relationshipQueryHandler,h=this._errorHandler;this.gdbVersion&&(a.gdbVersion=this.gdbVersion);var n=new F(c._dfdCanceller);n._pendingDfd=l({url:this._url.path+"/queryRelatedRecords",content:a,callbackParamName:"callback",load:function(a,c){b(a,c,f,d,n)},error:function(a){h(a,d,n)}},this.requestOptions);return n},executeForIds:function(a,c,f,b){var d=b.assembly;a=this._encode(y.mixin({},this._url.query,{f:"json",returnIdsOnly:!0},
  a.toJson(d&&d[0])));var h=this._executeForIdsHandler,m=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=E.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return l({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,e){h(a,e,c,f,b.dfd)},error:function(a){m(a,f,b.dfd)}},this.requestOptions)},executeForCount:function(a,c,f,b){var d=b.assembly;a=this._encode(y.mixin({},this._url.query,{f:"json",returnIdsOnly:!0,returnCountOnly:!0},a.toJson(d&&
  d[0])));var h=this._countHandler,m=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=E.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return l({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,d){h(a,d,c,f,b.dfd)},error:function(a){m(a,f,b.dfd)}},this.requestOptions)},executeForExtent:function(a,c,f,b){var d=b.assembly;a=this._encode(y.mixin({},this._url.query,{f:"json",returnExtentOnly:!0,returnCountOnly:!0},a.toJson(d&&d[0])));
  var h=this._extentHandler,m=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=E.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return l({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,d){h(a,d,c,f,b.dfd)},error:function(a){m(a,f,b.dfd)}},this.requestOptions)},_handler:function(a,c,d,b,h){try{var n=new f(a);this._successHandler([n],"onComplete",d,h)}catch(m){this._errorHandler(m,b,h)}},_relationshipQueryHandler:function(a,c,d,b,
  h){try{var n=a.geometryType,m=a.spatialReference,l={};A.forEach(a.relatedRecordGroups,function(a){var b={};b.geometryType=n;b.spatialReference=m;b.features=a.relatedRecords;b=new f(b);if(null!=a.objectId)l[a.objectId]=b;else for(var c in a)a.hasOwnProperty(c)&&"relatedRecords"!==c&&(l[a[c]]=b)});this._successHandler([l],"onExecuteRelationshipQueryComplete",d,h)}catch(s){this._errorHandler(s,b,h)}},_executeForIdsHandler:function(a,c,f,b,d){try{this._successHandler([a.objectIds],"onExecuteForIdsComplete",
  f,d)}catch(h){this._errorHandler(h,b,d)}},_countHandler:function(a,c,f,b,d){try{var h,m=a.features,l=a.objectIds;if(l)h=l.length;else{if(m)throw Error("Unable to perform query. Please check your parameters.");h=a.count}this._successHandler([h],"onExecuteForCountComplete",f,d)}catch(s){this._errorHandler(s,b,d)}},_extentHandler:function(c,f,d,b,h){try{c.extent&&(c.extent=new a(c.extent)),this._successHandler([c],"onExecuteForExtentComplete",d,h)}catch(l){this._errorHandler(l,b,h)}}});d._createWrappers(B);
  G("extend-esri")&&y.setObject("tasks.QueryTask",B,D);return B})},"esri/tasks/Task":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../deferredUtils ../urlUtils ../Evented".split(" "),function(B,y,A,F,E,G,D,l){B=B(l,{declaredClass:"esri.tasks._Task",_eventMap:{error:["error"],complete:["result"]},constructor:function(c,a){c&&y.isString(c)&&(this._url=D.urlToObject(this.url=c));a&&a.requestOptions&&(this.requestOptions=a.requestOptions);this.normalization=!0;
  this._errorHandler=y.hitch(this,this._errorHandler);this.registerConnectEvents()},_useSSL:function(){var c=this._url,a=/^http:/i;this.url&&(this.url=this.url.replace(a,"https:"));c&&c.path&&(c.path=c.path.replace(a,"https:"))},_encode:function(c,a,d){var h,f,e={},g,k;for(g in c)if("declaredClass"!==g&&(h=c[g],f=typeof h,null!==h&&void 0!==h&&"function"!==f))if(y.isArray(h)){e[g]=[];k=h.length;for(f=0;f<k;f++)e[g][f]=this._encode(h[f])}else"object"===f?h.toJson&&(f=h.toJson(d&&d[g]),"esri.tasks.FeatureSet"===
  h.declaredClass&&f.spatialReference&&(f.sr=f.spatialReference,delete f.spatialReference),e[g]=a?f:A.toJson(f)):e[g]=h;return e},_successHandler:function(c,a,d,h){a&&this[a].apply(this,c);d&&d.apply(null,c);h&&G._resDfd(h,c)},_errorHandler:function(c,a,d){this.onError(c);a&&a(c);d&&d.errback(c)},setNormalization:function(c){this.normalization=c},onError:function(){}});F("extend-esri")&&(E.Task=B);return B})},"esri/tasks/FeatureSet":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../graphic ../SpatialReference ../graphicsUtils ../geometry/jsonUtils ../symbols/jsonUtils".split(" "),
  function(B,y,A,F,E,G,D,l,c,a,d){B=B(null,{declaredClass:"esri.tasks.FeatureSet",constructor:function(c){if(c){y.mixin(this,c);var f=this.features,e=c.spatialReference,g=a.getGeometryType(c.geometryType),e=this.spatialReference=new l(e);this.geometryType=c.geometryType;c.fields&&(this.fields=c.fields);A.forEach(f,function(a,b){var c=a.geometry&&a.geometry.spatialReference;f[b]=new D(g&&a.geometry?new g(a.geometry):null,a.symbol&&d.fromJson(a.symbol),a.attributes);f[b].geometry&&!c&&f[b].geometry.setSpatialReference(e)});
  this._hydrate()}else this.features=[]},displayFieldName:null,geometryType:null,spatialReference:null,fieldAliases:null,toJson:function(d){var f={};this.displayFieldName&&(f.displayFieldName=this.displayFieldName);this.fields&&(f.fields=this.fields);this.spatialReference?f.spatialReference=this.spatialReference.toJson():this.features[0]&&this.features[0].geometry&&(f.spatialReference=this.features[0].geometry.spatialReference.toJson());this.features[0]&&(this.features[0].geometry&&(f.geometryType=
  a.getJsonType(this.features[0].geometry)),f.features=c._encodeGraphics(this.features,d));f.exceededTransferLimit=this.exceededTransferLimit;f.transform=this.transform;return G.fixJson(f)},_hydrate:function(){var a=this.transform,c=this.geometryType;if(a&&c)for(var d=this.features,g=a.translate[0],k=a.translate[1],b=a.scale[0],l=a.scale[1],n=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=b(a.x);a.y=c(a.y)};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){a=
  a.rings||a.paths;var d,f,e,g,h,k,m,l;d=0;for(f=a.length;d<f;d++){h=a[d];e=0;for(g=h.length;e<g;e++)k=h[e],0<e?(m+=k[0],l+=k[1]):(m=k[0],l=k[1]),k[0]=b(m),k[1]=c(l)}};if("esriGeometryEnvelope"===a)return function(a){a.xmin=b(a.xmin);a.ymin=c(a.ymin);a.xmax=b(a.xmax);a.ymax=c(a.ymax)};if("esriGeometryMultipoint"===a)return function(a){a=a.points;var d,f,e,g,h;d=0;for(f=a.length;d<f;d++)e=a[d],0<d?(g+=e[0],h+=e[1]):(g=e[0],h=e[1]),e[0]=b(g),e[1]=c(h)}}(c,function(a){return a*b+g},function(a){return k-
  a*l}),a=0,c=d.length;a<c;a++)d[a].geometry&&n(d[a].geometry);this.transform=null},quantize:function(a){if(!this.geometryType)return this.transform=null,this;var c=a.translate[0],d=a.translate[1],g=a.scale[0],k=a.scale[1],b=this.features,l=function(a,b,c){var d,f,e,g,h,k,m=[];d=0;for(f=a.length;d<f;d++)if(e=a[d],0<d){if(k=b(e[0]),e=c(e[1]),k!==g||e!==h)m.push([k-g,e-h]),g=k,h=e}else g=b(e[0]),h=c(e[1]),m.push([g,h]);return 0<m.length?m:null},n=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=
  b(a.x);a.y=c(a.y);return a};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){var d,f,e,g,h;e=a.rings||a.paths;h=[];d=0;for(f=e.length;d<f;d++)g=e[d],(g=l(g,b,c))&&h.push(g);return 0<h.length?(a.rings?a.rings=h:a.paths=h,a):null};if("esriGeometryMultipoint"===a)return function(a){var d;d=l(a.points,b,c);return 0<d.length?(a.points=d,a):null};if("esriGeometryEnvelope"===a)return function(a){return a}}(this.geometryType,function(a){return Math.round((a-c)/g)},function(a){return Math.round((d-
  a)/k)}),m,r;m=0;for(r=b.length;m<r;m++)b[m].geometry&&(n(b[m].geometry)||b[m].setGeometry(null));this.transform=a;return this}});F("extend-esri")&&y.setObject("tasks.FeatureSet",B,E);return B})},"esri/tasks/StatisticDefinition":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(B,y,A,F){B=B(null,{declaredClass:"esri.tasks.StatisticDefinition",toJson:function(){return{statisticType:this.statisticType,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,
  maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount}}});A("extend-esri")&&y.setObject("tasks.StatisticDefinition",B,F);return B})},"esri/layers/labelLayerUtils/DynamicLabelClass":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../../kernel ../GraphicsLayer ../../geometry/Extent ../../geometry/Polygon".split(" "),function(B,y,A,F,E,G,D){B=B(E,{declaredClass:"esri.layers.labelLayerUtils.DynamicLabelClass",constructor:function(){this._preparedLabels=
  [];this._placedLabels=[];this._extent=null;this._y1=this._x1=this._y0=this._x0=this._ymax=this._ymin=this._xmax=this._xmin=0;this._scale=1},setMap:function(l,c){this._labelLayer=c;this._xmin=l.extent.xmin;this._xmax=l.extent.xmax;this._ymin=l.extent.ymin;this._ymax=l.extent.ymax;this._scale=(this._xmax-this._xmin)/l.width},_process:function(l){this._preparedLabels=l;this._placedLabels=[];var c;for(l=this._preparedLabels.length-1;0<=l;l--){var a=this._preparedLabels[l],d=Math.min(a.labelWidth,a.labelHeight),
  h=a.labelWidth+0*d,d=a.labelHeight+0*d,f=(c=a.options)&&void 0!==c.lineLabelPlacement?c.lineLabelPlacement:"PlaceAtCenter",e=c&&void 0!==c.lineLabelPosition?c.lineLabelPosition:"Above",g=c&&void 0!==c.pointPriorities?c.pointPriorities:"AboveRight",k=[2,2,1,3,0,2,3,3,2];"AboveLeft"==g?k=[1,2,2,2,0,3,2,3,3]:"AboveCenter"==g?k=[2,1,2,2,0,2,3,3,3]:"AboveRight"==g?k=[2,2,1,3,0,2,3,3,2]:"CenterLeft"==g?k=[2,2,3,1,0,3,2,2,3]:"CenterCenter"==g?k=[0,0,0,0,1,0,0,0,0]:"CenterRight"==g?k=[3,2,2,3,0,1,3,2,2]:
  "BelowLeft"==g?k=[2,3,3,2,0,3,1,2,2]:"BelowCenter"==g?k=[3,3,3,2,0,2,2,1,2]:"BelowRight"==g&&(k=[3,3,2,3,0,2,2,2,1]);var b=c&&void 0!==c.labelRotation?c.labelRotation:!0,g=a.angle*(Math.PI/180);c=c&&void 0!==c.howManyLabels?c.howManyLabels:"OneLabel";if("point"==a.geometry.type)this._generatePointPositions(a,a.geometry.x,a.geometry.y,a.text,g,h,d,a.symbolWidth,a.symbolHeight,k);else if("multipoint"==a.geometry.type){f=a.geometry;for(e=0;e<f.points.length;e++)this._generatePointPositions(a,f.points[e][0],
  f.points[e][1],a.text,g,h,d,a.symbolWidth,a.symbolHeight,k)}else"polyline"==a.geometry.type?this._generateLinePositions(a,a.geometry,a.text,h,d,2*a.symbolHeight+d,f,e,b):"polygon"==a.geometry.type&&this._generatePolygonPositions(a,c,a.geometry,a.text,g,h,d)}return this._placedLabels},_generatePointPositions:function(l,c,a,d,h,f,e,g,k,b){g=(g+f)*this._scale;k=(k+e)*this._scale;var w,n;for(w=1;3>=w;w++)for(n=1;9>=n;n++)if(b[n-1]==w)switch(n){case 1:if(this._findPlace(l,d,c-g,a+k,h,f,e))return;break;
  case 2:if(this._findPlace(l,d,c,a+k,h,f,e))return;break;case 3:if(this._findPlace(l,d,c+g,a+k,h,f,e))return;break;case 4:if(this._findPlace(l,d,c-g,a,h,f,e))return;break;case 5:if(this._findPlace(l,d,c,a,h,f,e))return;break;case 6:if(this._findPlace(l,d,c+g,a,h,f,e))return;break;case 7:if(this._findPlace(l,d,c-g,a-k,h,f,e))return;break;case 8:if(this._findPlace(l,d,c,a-k,h,f,e))return;break;case 9:if(this._findPlace(l,d,c+g,a-k,h,f,e))return}},_generateLinePositions:function(l,c,a,d,h,f,e,g,k){var b=
  d*this._scale*d*this._scale,w,n,m;for(w=0;w<c.paths.length;w++){var r=c.paths[w],s=r.length,q=Math.floor((s-1)/2),x=0!==(s-1)%2?1:-1;"PlaceAtStart"==e&&(q=0,x=1);"PlaceAtEnd"==e&&(q=s-2,x=-1);for(;0<=q&&q<s-1;){for(n=q;n<s;n++){var p=r[q][0],t=r[q][1],u=r[n][0]-p,v=r[n][1]-t;if(u*u+v*v>b){for(var z=Math.atan2(v,u);z>Math.PI/2;)z-=Math.PI;for(;z<-(Math.PI/2);)z+=Math.PI;var C=Math.sin(z),I=Math.cos(z),H=0,y=0;"Above"==g&&(H=f*C*this._scale,y=f*I*this._scale);"Below"==g&&(H=-f*C*this._scale,y=-f*I*
  this._scale);if(1==n-q){if(this._clipLine(p,t,r[n][0],r[n][1])&&(p=this._x1-this._x0,m=this._y1-this._y0,p*p+m*m>b&&(n=Math.atan2(m,p),u=d/2+2*h,t=u*this._scale*Math.cos(n),u=u*this._scale*Math.sin(n),"PlaceAtStart"==e?(p=this._x0+t,m=this._y0+u):"PlaceAtEnd"==e?(p=this._x1-t,m=this._y1-u):(p=this._x0+p/2,m=this._y0+m/2),this._findPlace(l,a,p-H,m+y,k?-n:0,d,h))))return}else{var A=0;for(m=q;m<=n;m++)A=Math.max(A,Math.abs((r[m][1]-t)*I-(r[m][0]-p)*C));if(A<h&&this._findPlace(l,a,p+u/2-H,t+v/2+y,k?-z:
  0,d,h))return}break}}q+=x}}},_generatePolygonPositions:function(l,c,a,d,h,f,e){var g;if("ManyLabels"==c)for(c=0;c<a.rings.length;c++)g=a.rings[c],D.prototype.isClockwise(g)&&(g=this._findCentroid(g,this._xmin,this._ymin,this._xmax,this._ymax),this._findPlace(l,d,g[0],g[1],h,f,e));else{g=this._findCentroidForFeature(a,this._xmin,this._ymin,this._xmax,this._ymax);var k=g[1],b=0;for(c=0;10>c;c++){b+=e/4;g=this._findCentroidForFeature(a,this._xmin,k+(b-e/4),this._xmax,k+(b+e/4));if(this._findPlace(l,
  d,g[0],g[1],h,f,e))break;g=this._findCentroidForFeature(a,this._xmin,k-(b+e/4),this._xmax,k-(b-e/4));if(this._findPlace(l,d,g[0],g[1],h,f,e))break}}},_findCentroid:function(l,c,a,d,h){var f=l.length,e=[0,0],g=0,k=l[0][0],b=l[0][1];k>d&&(k=d);k<c&&(k=c);b>h&&(b=h);b<a&&(b=a);for(var w=1;w<f-1;w++){var n=l[w][0],m=l[w][1],r=l[w+1][0],s=l[w+1][1];n>d&&(n=d);n<c&&(n=c);m>h&&(m=h);m<a&&(m=a);r>d&&(r=d);r<c&&(r=c);s>h&&(s=h);s<a&&(s=a);var q=(n-k)*(s-b)-(r-k)*(m-b);e[0]+=q*(k+n+r);e[1]+=q*(b+m+s);g+=q}e[0]/=
  3*g;e[1]/=3*g;if(isNaN(e[0])||isNaN(e[1]))return e;a=[];this._fillBuffer(l,a,e);e[0]=this._sortBuffer(a,e[0],c,d);return e},_findCentroidForFeature:function(l,c,a,d,h){for(var f,e=0,g=[0,0],k=0;k<l.rings.length;k++){var b=l.rings[k],w=b.length,n=b[0][0],m=b[0][1];n>d&&(n=d);n<c&&(n=c);m>h&&(m=h);m<a&&(m=a);for(f=1;f<w-1;f++){var r=b[f][0],s=b[f][1],q=b[f+1][0],x=b[f+1][1];r>d&&(r=d);r<c&&(r=c);s>h&&(s=h);s<a&&(s=a);q>d&&(q=d);q<c&&(q=c);x>h&&(x=h);x<a&&(x=a);var p=(r-n)*(x-m)-(q-n)*(s-m);g[0]+=p*
  (n+r+q);g[1]+=p*(m+s+x);e+=p}}g[0]/=3*e;g[1]/=3*e;if(isNaN(g[0])||isNaN(g[1]))return g;a=[];for(f=0;f<l.rings.length;f++)this._fillBuffer(l.rings[f],a,g);g[0]=this._sortBuffer(a,g[0],c,d);return g},_fillBuffer:function(l,c,a){for(var d=l.length-1,h=l[0][1]>=l[d][1]?1:-1,f=0;f<=d;f++){var e=f,g=f+1;f==d&&(g=0);var k=l[e][0],e=l[e][1],b=l[g][0],g=l[g][1],w=g>=e?1:-1;if(e<=a[1]&&a[1]<=g||g<=a[1]&&a[1]<=e)a[1]!=e&&a[1]!=g?(c.push((a[1]-e)*(b-k)/(g-e)+k),h=w):a[1]==e&&a[1]!=g?(h!=w&&c.push(k),h=w):a[1]!=
  e&&a[1]==g?(c.push(b),h=w):a[1]==e&&a[1]==g&&(1==h&&c.push(k),c.push(b),h=w)}},_sortBuffer:function(l,c,a,d){var h=l.length;l.sort();if(0<h){for(var f=0,e=c=0;e<h-1;e+=2){var g=Math.abs(l[e+1]-l[e]);!(l[e]<=a&&l[e+1]<=a)&&(!(l[e]>=d&&l[e+1]>=d)&&g>f)&&(f=g,c=e)}h=l[c];l=l[c+1];h>d&&(h=d);h<a&&(h=a);l>d&&(l=d);l<a&&(l=a);c=(h+l)/2}return c},_findPlace:function(l,c,a,d,h,f,e){if(isNaN(a)||isNaN(d))return!1;for(var g=0;g<this._placedLabels.length;g++){var k=this._placedLabels[g].angle,b=this._placedLabels[g].width*
  this._scale,w=this._placedLabels[g].height*this._scale,n=this._placedLabels[g].x-a,m=this._placedLabels[g].y-d;if(0===h&&0===k){if(this._findPlace2(-f*this._scale,-e*this._scale,f*this._scale,e*this._scale,n-b,m-w,n+b,m+w))return!1}else{var r=new G(-f*this._scale,-e*this._scale,f*this._scale,e*this._scale,null),s=0,q=1;0!==h&&(s=Math.sin(h),q=Math.cos(h));var x=n*q-m*s,n=n*s+m*q,k=k-h,s=Math.sin(k),q=Math.cos(k),p=-b*q- -w*s,m=-b*s+-w*q,k=+b*q- -w*s,t=+b*s+-w*q,b=x+p,w=n-m,s=x+k,q=n-t,p=x-p,m=n+m,
  x=x-k,n=n+t,k=new D;k.addRing([[b,w],[s,q],[p,m],[x,n],[b,w]]);if(r.intersects(k))return!1}}for(;h>Math.PI/2;)h-=Math.PI;for(;h<-(Math.PI/2);)h+=Math.PI;g={};g.layer=l;g.text=c;g.angle=h;g.x=a;g.y=d;g.width=f;g.height=e;this._placedLabels.push(g);return!0},_findPlace2:function(l,c,a,d,h,f,e,g){return(l>=h&&l<=e||a>=h&&a<=e||l<=h&&a>=e)&&(c>=f&&c<=g||d>=f&&d<=g||c<=f&&d>=g)?!0:!1},_clipLine:function(l,c,a,d){for(var h=this._code(l,c),f=this._code(a,d);0!==h||0!==f;){if(0!==(h&f))return!1;var e=a-l,
  g=d-c;0!==h?(l<this._xmin?(c+=g*(this._xmin-l)/e,l=this._xmin):l>this._xmax?(c+=g*(this._xmax-l)/e,l=this._xmax):c<this._ymin?(l+=e*(this._ymin-c)/g,c=this._ymin):c>this._ymax&&(l+=e*(this._ymax-c)/g,c=this._ymax),h=this._code(l,c)):(a<this._xmin?(d+=g*(this._xmin-a)/e,a=this._xmin):a>this._xmax?(d+=g*(this._xmax-a)/e,a=this._xmax):d<this._ymin?(a+=e*(this._ymin-d)/g,d=this._ymin):d>this._ymax&&(a+=e*(this._ymax-d)/g,d=this._ymax),f=this._code(a,d))}this._x0=l;this._y0=c;this._x1=a;this._y1=d;return!0},
  _code:function(l,c){var a=0;l<this._xmin&&(a+=8);l>this._xmax&&(a+=4);c<this._ymin&&(a+=2);c>this._ymax&&(a+=1);return a}});A("extend-esri")&&y.setObject("layers.labelLayerUtils.DynamicLabelClass",B,F);return B})},"esri/layers/labelLayerUtils/StaticLabelClass":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../../kernel ../GraphicsLayer ../../geometry/Extent ../../geometry/Point ../../geometry/Polygon".split(" "),function(B,y,A,F,E,G,D,l){return B(E,{declaredClass:"esri.layers.labelLayerUtils.StaticLabel",
  constructor:function(){this._preparedLabels=[];this._placedLabels=[];this._extent=null;this._ymax=this._ymin=this._xmax=this._xmin=0;this._scale=1;this._LINE_STEP_CONST=1.5;this._POLYGON_X_STEP_CONST=1;this._POLYGON_Y_STEP_CONST=0.75;this._OVERRUN=2},setMap:function(c,a){this._labelLayer=a;this._map=c;this._xmin=c.extent.xmin;this._xmax=c.extent.xmax;this._ymin=c.extent.ymin;this._ymax=c.extent.ymax;this._scale=(this._xmax-this._xmin)/c.width},_process:function(c){var a,d,h,f,e,g,k,b,w;this._preparedLabels=
  c;this._placedLabels=[];for(c=this._preparedLabels.length-1;0<=c;c--){a=this._preparedLabels[c];e=a.labelWidth;g=a.labelHeight;b=(k=a.options)&&k.lineLabelPlacement?k.lineLabelPlacement:"PlaceAtCenter";w=k&&k.lineLabelPosition?k.lineLabelPosition:"Above";d=k&&k.labelRotation?k.labelRotation:!0;h=a.angle*(Math.PI/180);f=k&&k.howManyLabels?k.howManyLabels:"OneLabel";var n=[];if("point"===a.geometry.type)this._generatePointPositions(a.geometry.x,a.geometry.y,a.text,h,e,g,a.symbolWidth,a.symbolHeight,
  k,n);else if("multipoint"===a.geometry.type)for(d=0;d<a.geometry.points.length;d++)this._generatePointPositions(a.geometry.points[d][0],a.geometry.points[d][1],a.text,h,e,g,a.symbolWidth,a.symbolHeight,k,n);else if("polyline"===a.geometry.type)if("PlaceAtStart"===b)this._generateLinePositionsPlaceAtStart(a.geometry,!0,a.text,e,g,2*a.symbolHeight+g,b,w,d,n);else if("PlaceAtEnd"===b)this._generateLinePositionsPlaceAtEnd(a.geometry,!0,a.text,e,g,2*a.symbolHeight+g,b,w,d,n);else{k=[];var m=a.geometry.getExtent(),
  r=this._map.extent;if(m.getWidth()<e*this._scale/this._OVERRUN&&m.getHeight()<e*this._scale/this._OVERRUN)continue;else 0.5*m.getWidth()<r.getWidth()&&0.5*m.getHeight()<r.getHeight()?(m=0.1*Math.min(this._map.width,this._map.height)*this._scale,this._generateLinePositionsPlaceAtCenter(a.geometry,!1,m,a.text,e,g,2*a.symbolHeight+g,b,w,d,k)):(m=0.2*Math.min(this._map.width,this._map.height)*this._scale,this._generateLinePositionsPlaceAtCenter(a.geometry,!0,m,a.text,e,g,2*a.symbolHeight+g,b,w,d,k));
  this._postSorting(r,k,n)}else if("polygon"===a.geometry.type){b=[];for(d=0;d<a.geometry.rings.length;d++)w=a.geometry.rings[d],l.prototype.isClockwise(w)&&(k=this._calcRingExtent(w),k.xmax-k.xmin<4*e*this._scale/this._OVERRUN&&k.ymax-k.ymin<4*g*this._scale/this._OVERRUN||b.push(w));b.sort(function(a,b){return b.length-a.length});for(d=0;d<b.length;d++)this._generatePolygonPositionsForManyLabels(b[d],a.geometry.spatialReference,a.text,h,e,g,n)}for(d=0;d<n.length&&!(b=n[d].x,w=n[d].y,void 0!==n[d].angle&&
  (h=n[d].angle),k=this._findPlace(a,a.text,b,w,h,e,g),"OneLabel"===f&&k&&this._labelLayer._isWithinScreenArea(new D(b,w,a.geometry.spatialReference)));d++);}return this._placedLabels},_generatePointPositions:function(c,a,d,h,f,e,g,k,b,l){d=b&&b.pointPriorities?b.pointPriorities:"AboveRight";f=(g+f)*this._scale;e=(k+e)*this._scale;switch(d.toLowerCase()){case "aboveleft":c-=f;a+=e;break;case "abovecenter":a+=e;break;case "aboveright":c+=f;a+=e;break;case "centerleft":c-=f;break;case "centercenter":break;
  case "centerright":c+=f;break;case "belowleft":c-=f;a-=e;break;case "belowcenter":a-=e;break;case "belowright":c+=f;a-=e;break;default:return}l.push({x:c,y:a})},_generateLinePositionsPlaceAtStart:function(c,a,d,h,f,e,g,k,b,l){g=h*this._scale;var n=this._LINE_STEP_CONST*Math.min(this._map.width,this._map.height)*this._scale,m,r,s,q,x,p,t,u;for(m=0;m<c.paths.length;m++){var v=c.paths[m],z=g,C=0;for(r=0;r<v.length-1;r++)s=v[r][0],q=v[r][1],x=v[r+1][0],p=v[r+1][1],t=x-s,u=p-q,t=Math.sqrt(t*t+u*u),C+t>
  z?(C=this._generatePositionsOnLine(c.spatialReference,a,z,n,C,s,q,x,p,d,h,f,e,k,b,l),z=n):C+=t}},_generateLinePositionsPlaceAtEnd:function(c,a,d,h,f,e,g,k,b,l){g=h*this._scale;var n=this._LINE_STEP_CONST*Math.min(this._map.width,this._map.height)*this._scale,m,r,s,q,x,p,t,u;for(m=0;m<c.paths.length;m++){var v=c.paths[m],z=g,C=0;for(r=v.length-2;0<=r;r--)s=v[r+1][0],q=v[r+1][1],x=v[r][0],p=v[r][1],t=x-s,u=p-q,t=Math.sqrt(t*t+u*u),C+t>z?(C=this._generatePositionsOnLine(c.spatialReference,a,z,n,C,s,
  q,x,p,d,h,f,e,k,b,l),z=n):C+=t}},_generateLinePositionsPlaceAtCenter:function(c,a,d,h,f,e,g,k,b,l,n){var m,r,s,q,x,p,t,u;for(k=0;k<c.paths.length;k++){var v=c.paths[k];if(!(2>v.length)){if(2==v.length){q=v[0];m=v[1];s=q[0];q=q[1];v=m[0];p=m[1];x=(v-s)*(v-s)+(p-q)*(p-q);t=Math.atan2(p-q,v-s);p=Math.cos(t);t=Math.sin(t);v=[];u=s;for(var z=q;(u-s)*(u-s)+(z-q)*(z-q)<x;)v.push([u,z]),u+=d/2*p,z+=d/2*t;v.push(m)}var C=0;for(m=0;m<v.length-1;m++)s=v[m][0],q=v[m][1],x=v[m+1][0],p=v[m+1][1],t=x-s,u=p-q,C+=
  Math.sqrt(t*t+u*u);for(m=z=0;m<v.length-1;m++){s=v[m][0];q=v[m][1];x=v[m+1][0];p=v[m+1][1];t=x-s;u=p-q;t=Math.sqrt(t*t+u*u);if(z+t>C/2)break;z+=t}m==v.length-1&&m--;s=v[m][0];q=v[m][1];x=v[m+1][0];p=v[m+1][1];t=x-s;u=p-q;z=C/2-z;t=Math.atan2(u,t);u=s+z*Math.cos(t);t=q+z*Math.sin(t);s=this._angleAndShifts(s,q,x,p,g,b,l);n.push({x:u+s.shiftX,y:t+s.shiftY,angle:s.angle});var C=u,I=t,z=0;for(r=m;r<v.length-1;r++)r==m?(s=C,q=I):(s=v[r][0],q=v[r][1]),x=v[r+1][0],p=v[r+1][1],t=x-s,u=p-q,t=Math.sqrt(t*t+
  u*u),z=z+t>d?this._generatePositionsOnLine(c.spatialReference,a,d,d,z,s,q,x,p,h,f,e,g,b,l,n):z+t;z=0;for(r=m;0<=r;r--)r==m?(s=C,q=I):(s=v[r+1][0],q=v[r+1][1]),x=v[r][0],p=v[r][1],t=x-s,u=p-q,t=Math.sqrt(t*t+u*u),z=z+t>d?this._generatePositionsOnLine(c.spatialReference,a,d,d,z,s,q,x,p,h,f,e,g,b,l,n):z+t}}},_generatePositionsOnLine:function(c,a,d,h,f,e,g,k,b,l,n,m,r,s,q,x){l=Math.atan2(b-g,k-e);n=e;m=g;var p=n,t=m;do if(f=d-f,n+=f*Math.cos(l),m+=f*Math.sin(l),this._belongs(n,m,e,g,k,b))f=this._angleAndShifts(e,
  g,k,b,r,s,q),d=n+f.shiftX,t=m+f.shiftY,a?this._labelLayer._isWithinScreenArea(new G(d,t,d,t,c))&&x.push({x:d,y:t,angle:f.angle}):x.push({x:d,y:t,angle:f.angle}),p=n,t=m,f=0,d=h;else return c=k-p,b-=t,Math.sqrt(c*c+b*b);while(1)},_postSorting:function(c,a,d){if(c&&0<a.length){var h=0.5*(c.xmin+c.xmax);c=0.5*(c.ymin+c.ymax);for(var f=a[0].x,e=a[0].y,g=Math.sqrt((f-h)*(f-h)+(e-c)*(e-c)),k=a[0].angle,b=0;b<a.length;b++){var l=a[b].x,n=a[b].y,m=Math.sqrt((l-h)*(l-h)+(n-c)*(n-c));m<g&&(f=l,e=n,g=m,k=a[b].angle)}d.push({x:f,
  y:e,angle:k})}},_belongs:function(c,a,d,h,f,e){if(f==d&&e==h)return!1;if(f>d){if(c>f||c<d)return!1}else if(c<f||c>d)return!1;if(e>h){if(a>e||a<h)return!1}else if(a<e||a>h)return!1;return!0},_angleAndShifts:function(c,a,d,h,f,e,g){for(c=Math.atan2(h-a,d-c);c>Math.PI/2;)c-=Math.PI;for(;c<-(Math.PI/2);)c+=Math.PI;h=Math.sin(c);var k=Math.cos(c);d=a=0;"Above"==e&&(a=f*h*this._scale,d=f*k*this._scale);"Below"==e&&(a=-f*h*this._scale,d=-f*k*this._scale);f=[];f.angle=g?-c:0;f.shiftX=-a;f.shiftY=d;return f},
  _generatePolygonPositionsForManyLabels:function(c,a,d,h,f,e,g){f=this._findCentroidForRing(c);h=f[0];var k=f[1],b=this._calcRingExtent(c);f=b.xmin;e=b.ymin;var l=b.xmax,b=b.ymax,n=(b-e)/(this._map.height*this._scale);if(!(10<(l-f)/(this._map.width*this._scale)&&10<n)){var m=!0;if(l-f>this._map.width*this._scale||b-e>this._map.height*this._scale)m=!1;var n=this._map.width*this._scale*(m?0.1875:0.5),m=this._map.height*this._scale*(m?0.1875:0.5),r=!0,s=!0,q=0;do{k+=(q%2?-1:1)*q*m;if(this._scanRingByX(d,
  a,c,h,k,f,l,n,g))break;k<e&&(r=!1);k>b&&(s=!1);q++}while(r||s)}},_scanRingByX:function(c,a,d,h,f,e,g,k,b){var l=!0,n=!0,m=0;do{h+=(m%2?-1:1)*m*k;var r=this._movePointInsideRing(d,h,f),s=this._labelLayer._isWithinScreenArea(new G(r,f,r,f,a)),q=this._isPointWithinRing(c,d,r,f);if(s&&q)return b.push({x:r,y:f}),!0;h<e&&(l=!1);h>g&&(n=!1);m++}while(l||n);return!1},_movePointInsideRing:function(c,a,d){for(var h=[],f=c.length-1,e=c[0][1]>=c[f][1]?1:-1,g=0;g<=f;g++){var k=g,b=g+1;g==f&&(b=0);var l=c[k][0],
  k=c[k][1],n=c[b][0],b=c[b][1],m=b>=k?1:-1;if(k<=d&&d<=b||b<=d&&d<=k)d!=k&&d!=b?(h.push((d-k)*(n-l)/(b-k)+l),e=m):d==k&&d!=b?(e!=m&&h.push(l),e=m):d!=k&&d==b?(h.push(n),e=m):d==k&&d==b&&(1==e&&h.push(l),h.push(n),e=m)}h.sort(function(a,b){return a-b});c=h.length;if(0<c){for(g=d=a=0;g<c-1;g+=2)f=Math.abs(h[g+1]-h[g]),f>a&&(a=f,d=g);a=(h[d]+h[d+1])/2}return a},_calcRingExtent:function(c){var a,d;d=new G;for(a=0;a<c.length-1;a++){var h=c[a][0],f=c[a][1];if(void 0===d.xmin||h<d.xmin)d.xmin=h;if(void 0===
  d.ymin||f<d.ymin)d.ymin=f;if(void 0===d.xmax||h>d.xmax)d.xmax=h;if(void 0===d.ymax||f>d.ymax)d.ymax=f}return d},_isPointWithinPolygon:function(c,a,d,h){var f;for(f=0;f<a.rings.length;f++)if(this._isPointWithinRing(c,a.rings[f],d,h))return!0;return!1},_isPointWithinRing:function(c,a,d,h){var f,e,g,k,b=[],l=a.length;for(c=0;c<l-1;c++)if(f=a[c][0],e=a[c][1],g=a[c+1][0],k=a[c+1][1],!(f==g&&e==k)){if(e==k)if(h==e)b.push(f);else continue;f==g?(e<k&&(h>=e&&h<k)&&b.push(f),e>k&&(h<=e&&h>k)&&b.push(f)):(e=
  (g-f)/(k-e)*(h-e)+f,f<g&&(e>=f&&e<g)&&b.push(e),f>g&&(e<=f&&e>g)&&b.push(e))}b.sort(function(a,b){return a-b});for(c=0;c<b.length-1;c++)if(f=b[c],g=b[c+1],d>=f&&d<g)if(c%2)break;else return!0;return!1},_findCentroidForRing:function(c){for(var a=c.length,d=[0,0],h=0,f=c[0][0],e=c[0][1],g=1;g<a-1;g++){var k=c[g][0],b=c[g][1],l=c[g+1][0],n=c[g+1][1],m=(k-f)*(n-e)-(l-f)*(b-e);d[0]+=m*(f+k+l);d[1]+=m*(e+b+n);h+=m}d[0]/=3*h;d[1]/=3*h;return d},_findCentroidForFeature:function(c){for(var a=0,d=[0,0],h=0;h<
  c.rings.length;h++)for(var f=c.rings[h],e=f.length,g=f[0][0],k=f[0][1],b=1;b<e-1;b++){var l=f[b][0],n=f[b][1],m=f[b+1][0],r=f[b+1][1],s=(l-g)*(r-k)-(m-g)*(n-k);d[0]+=s*(g+l+m);d[1]+=s*(k+n+r);a+=s}d[0]/=3*a;d[1]/=3*a;return d},_findPlace:function(c,a,d,h,f,e,g){if(isNaN(d)||isNaN(h))return!1;for(var k=0;k<this._placedLabels.length;k++){var b=this._placedLabels[k].angle,w=this._placedLabels[k].width*this._scale,n=this._placedLabels[k].height*this._scale,m=this._placedLabels[k].x-d,r=this._placedLabels[k].y-
  h;if(0===f&&0===b){if(this._findPlace2(-e*this._scale,-g*this._scale,e*this._scale,g*this._scale,m-w,r-n,m+w,r+n))return!1}else{var s=new G(-e*this._scale,-g*this._scale,e*this._scale,g*this._scale,null),q=0,x=1;0!==f&&(q=Math.sin(f),x=Math.cos(f));var p=m*x-r*q,m=m*q+r*x,b=b-f,q=Math.sin(b),x=Math.cos(b),t=-w*x- -n*q,r=-w*q+-n*x,b=+w*x- -n*q,u=+w*q+-n*x,w=p+t,n=m-r,q=p+b,x=m-u,t=p-t,r=m+r,p=p-b,m=m+u,b=new l;b.addRing([[w,n],[q,x],[t,r],[p,m],[w,n]]);if(s.intersects(b))return!1}}for(;f>Math.PI/2;)f-=
  Math.PI;for(;f<-(Math.PI/2);)f+=Math.PI;k={};k.layer=c;k.text=a;k.angle=f;k.x=d;k.y=h;k.width=e;k.height=g;this._placedLabels.push(k);return!0},_findPlace2:function(c,a,d,h,f,e,g,k){return(c>=f&&c<=g||d>=f&&d<=g||c<=f&&d>=g)&&(a>=e&&a<=k||h>=e&&h<=k||a<=e&&h>=k)?!0:!1}})})},"*noref":1}});
  define("esri/layers/LabelLayer","require dojo/_base/declare dojo/_base/lang dojo/number dojo/i18n!dojo/cldr/nls/number dojo/_base/array dojo/_base/connect dojo/has dojox/gfx/_base ../kernel ../lang ../graphic ../PopupInfo ./labelLayerUtils/DynamicLabelClass ./labelLayerUtils/StaticLabelClass ../symbols/TextSymbol ../symbols/ShieldLabelSymbol ../geometry/Extent ../geometry/Point ../geometry/webMercatorUtils ./GraphicsLayer ./LabelClass ../renderers/SimpleRenderer".split(" "),function(B,y,A,F,E,G,D,
  l,c,a,d,h,f,e,g,k,b,w,n,m,r,s,q){function x(a){return"sizeInfo"===a.type}B=y(r,{declaredClass:"esri.layers.LabelLayer",constructor:function(a){this.id="labels";this.featureLayers=[];this._featureLayerInfos=[];this._preparedLabels=[];this._engineType="STATIC";this._mapEventHandlers=[];a&&(a.id&&(this.id=a.id),a.mode&&(this._engineType="DYNAMIC"===a.mode.toUpperCase()?"DYNAMIC":"STATIC"))},_setMap:function(a){var b=this.inherited(arguments);this._map&&this._mapEventHandlers.push(this._map.on("extent-change",
  A.hitch(this,"refresh")));this.refresh();return b},_unsetMap:function(){var a;for(a=0;a<this._mapEventHandlers.length;a++)D.disconnect(this._mapEventHandlers[a]);this.refresh();this.inherited(arguments)},setAlgorithmType:function(a){this._engineType=a&&"DYNAMIC"===a.toUpperCase()?"DYNAMIC":"STATIC";this.refresh()},addFeatureLayer:function(a,b,c,d){if(!this.getFeatureLayer(a.layerId)){var f=[];f.push(a.on("update-end",A.hitch(this,"refresh")));f.push(a.on("suspend",A.hitch(this,"refresh")));f.push(a.on("resume",
  A.hitch(this,"refresh")));f.push(a.on("edits-complete",A.hitch(this,"refresh")));f.push(a.on("labeling-info-change",A.hitch(this,"refresh")));f.push(a.on("time-extent-change",A.hitch(this,"refresh")));f.push(a.on("show-labels-change",A.hitch(this,"refresh")));this._featureLayerInfos.push({FeatureLayer:a,LabelExpressionInfo:c,LabelingOptions:d,LabelRenderer:b,EventHandlers:f});this.featureLayers.push(a);this.refresh()}},getFeatureLayer:function(a){var b,c;for(b=0;b<this.featureLayers.length;b++)if(c=
  this.featureLayers[b],void 0!==c&&c.id==a)return c;return null},removeFeatureLayer:function(a){var b;a=this.getFeatureLayer(a);if(void 0!==a&&(b=G.indexOf(this.featureLayers,a),-1<b)){this.featureLayers.splice(b,1);for(a=0;a<this._featureLayerInfos[b].EventHandlers.length;a++)D.disconnect(this._featureLayerInfos[b].EventHandlers[a]);this._featureLayerInfos.splice(b,1);this.refresh()}},removeAllFeatureLayers:function(){var a;for(a=0;a<this.featureLayers.length;a++){for(var b=0;b<this._featureLayerInfos[a].EventHandlers.length;b++)D.disconnect(this._featureLayerInfos[a].EventHandlers[b]);
  this.featureLayers=[];this._featureLayerInfos=[]}this.refresh()},getFeatureLayers:function(){return this.featureLayers},getFeatureLayerInfo:function(a){var b,c;for(b=0;b<this.featureLayers.length;b++)if(c=this.featureLayers[b],void 0!==c&&c.id==a)return this._featureLayerInfos[b];return null},refresh:function(a){var b,c,d,f,h,k=[],l,m="DYNAMIC"===this._engineType?new e:new g;if(this._map){m.setMap(this._map,this);this._preparedLabels=[];for(a=0;a<this.featureLayers.length;a++)if(c=this.featureLayers[a],
  c.visible&&c.showLabels&&c.visibleAtMapScale&&!c._suspended)if(b=this._featureLayerInfos[a],h=this._convertOptions(null),b.LabelRenderer){if(k=c.labelingInfo)if(l=k[0])f=this._getLabelExpression(l),h=this._convertOptions(l);d=b.LabelRenderer;b.LabelExpressionInfo&&(f=b.LabelExpressionInfo);b.LabelingOptions&&(h=this._convertOptions(null),void 0!==b.LabelingOptions.pointPriorities&&(k=b.LabelingOptions.pointPriorities,h.pointPriorities="above-center"==k||"AboveCenter"==k||"esriServerPointLabelPlacementAboveCenter"==
  k?"AboveCenter":"above-left"==k||"AboveLeft"==k||"esriServerPointLabelPlacementAboveLeft"==k?"AboveLeft":"above-right"==k||"AboveRight"==k||"esriServerPointLabelPlacementAboveRight"==k?"AboveRight":"below-center"==k||"BelowCenter"==k||"esriServerPointLabelPlacementBelowCenter"==k?"BelowCenter":"below-left"==k||"BelowLeft"==k||"esriServerPointLabelPlacementBelowLeft"==k?"BelowLeft":"below-right"==k||"BelowRight"==k||"esriServerPointLabelPlacementBelowRight"==k?"BelowRight":"center-center"==k||"CenterCenter"==
  k||"esriServerPointLabelPlacementCenterCenter"==k?"CenterCenter":"center-left"==k||"CenterLeft"==k||"esriServerPointLabelPlacementCenterLeft"==k?"CenterLeft":"center-right"==k||"CenterRight"==k||"esriServerPointLabelPlacementCenterRight"==k?"CenterRight":"AboveRight"),void 0!==b.LabelingOptions.lineLabelPlacement&&(h.lineLabelPlacement=b.LabelingOptions.lineLabelPlacement),void 0!==b.LabelingOptions.lineLabelPosition&&(h.lineLabelPosition=b.LabelingOptions.lineLabelPosition),void 0!==b.LabelingOptions.labelRotation&&
  (h.labelRotation=b.LabelingOptions.labelRotation),void 0!==b.LabelingOptions.howManyLabels&&(h.howManyLabels=b.LabelingOptions.howManyLabels));d instanceof s&&(f=this._getLabelExpression(d),d=new q(d.symbol),h=this._convertOptions(d));this._addLabels(c,d,f,h)}else if(k=c.labelingInfo)for(b=k.length-1;0<=b;b--)if(l=k[b])d=new s(l instanceof s?l.toJson():l),f=this._getLabelExpression(l),h=this._convertOptions(l),this._addLabels(c,d,f,h);f=m._process(this._preparedLabels);this.clear();this.drawLabels(this._map,
  f)}},drawLabels:function(a,b){this._scale=(a.extent.xmax-a.extent.xmin)/a.width;var c;for(c=0;c<b.length;c++){var d=b[c],f=d.x,e=d.y,g=d.text,l=d.angle,m=d.layer.labelSymbol;"polyline"==d.layer.geometry.type&&d.layer.options.labelRotation&&m.setAngle(l*(180/Math.PI));m.setText(g);d=f;m instanceof k&&(f=m.getHeight(),l=Math.sin(l),d-=0.25*f*this._scale*l,e-=0.33*f*this._scale);l=new h(new n(d,e,a.extent.spatialReference));l.setSymbol(m);this.add(l)}},_addLabels:function(a,b,c,d){var f,e,g,h;if(this._isWithinScaleRange(b.minScale,
  b.maxScale)&&c&&""!==c){var k=this._map,l=!a.url&&!k.spatialReference.equals(a.spatialReference);for(f=0;f<a.graphics.length;f++)if(e=a.graphics[f],!1!==e.visible){g=e.geometry;if(l){if(!m.canProject(g,k))continue;g=m.project(g,k)}g&&(this._isWhere(b.where,e.attributes)&&this._isWithinScreenArea(g))&&(h=this._buildLabelText(c,e.attributes,a.fields,d),this._addLabel(h,b,a.renderer,e,d,g,k))}}},_isWithinScreenArea:function(a){a="point"===a.type?new w(a.x,a.y,a.x,a.y,a.spatialReference):a.getExtent();
  if(void 0===a)return!1;a=this._intersects(this._map,a);return null===a||0===a.length?!1:!0},_isWithinScaleRange:function(a,b){var c=this._map.getScale();return 0<a&&c>=a||0<b&&c<=b?!1:!0},_isWhere:function(a,b){try{if(!a)return!0;if(a){var c=a.split(" ");if(3===c.length)return this._sqlEquation(b[this._removeQuotes(c[0])],c[1],this._removeQuotes(c[2]));if(7===c.length){var d=this._sqlEquation(b[this._removeQuotes(c[0])],c[1],this._removeQuotes(c[2])),f=c[3],e=this._sqlEquation(b[this._removeQuotes(c[4])],
  c[5],this._removeQuotes(c[6]));switch(f){case "AND":return d&&e;case "OR":return d||e}}}return!1}catch(g){console.log("Error.: can't parse \x3d "+a)}},_sqlEquation:function(a,b,c){switch(b){case "\x3d":return a==c?!0:!1;case "\x3c\x3e":return a!=c?!0:!1;case "\x3e":return a>c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return a<c?!0:!1;case "\x3c\x3d":return a<=c?!0:!1}return!1},_removeQuotes:function(a){var b=a.indexOf('"'),c=a.lastIndexOf('"');if(-1!=b&&-1!=c)return a.substr(1,a.length-
  2);b=a.indexOf("'");c=a.lastIndexOf("'");return-1!=b&&-1!=c?a.substr(1,a.length-2):a},_getSizeInfo:function(a){return a?a.sizeInfo||G.filter(a.visualVariables,x)[0]:null},_addLabel:function(a,d,f,e,g,h,l){var m,n,q,r;if(a&&""!==A.trim(a)&&d){a=a.replace(/\s+/g," ");m=d.getSymbol(e);m instanceof k?(m=new k(m.toJson()),m.setVerticalAlignment("baseline"),m.setHorizontalAlignment("center")):m=m instanceof b?new b(m.toJson()):new k;m.setText(a);d.symbol=m;if(q=this._getProportionalSize(d.sizeInfo,e.attributes))m instanceof
  k?m.setSize(q):m instanceof b&&(m.setWidth(q),m.setHeight(q));r=q=0;if(f){n=f.getSymbol(e);var s=this._getSizeInfo(f),w;s&&(w=f.getSize(e,{sizeInfo:s,resolution:l.getResolutionInMeters()}));if(w&&null!==w)q=r=w;else if(n)if("simplemarkersymbol"==n.type)r=q=n.size;else if("picturemarkersymbol"==n.type)q=n.width,r=n.height;else if("simplelinesymbol"==n.type||"cartographiclinesymbol"==n.type)q=n.width}f={};f.graphic=e;f.options=g;f.geometry=h;f.labelRenderer=d;f.labelSymbol=m;f.labelWidth=m.getWidth()/
  2;f.labelHeight=m.getHeight()/2;f.symbolWidth=c.normalizedLength(q)/2;f.symbolHeight=c.normalizedLength(r)/2;f.text=a;f.angle=m.angle;this._preparedLabels.push(f)}},_buildLabelText:function(a,b,c,e){return a.replace(/{[^}]*}/g,function(a){var g,h=a;for(g=0;g<c.length;g++)if("{"+c[g].name+"}"==a){var h=b[c[g].name],k=c[g].domain;if(k&&A.isObject(k)){if("codedValue"==k.type&&e.useCodedValues){g=h;for(a=0;a<k.codedValues.length;a++)if(k.codedValues[a].code==g){h=k.codedValues[a].name;break}}else"range"==
  k.type&&(k.minValue<=h&&h<=k.maxValue)&&(h=k.name);break}k=c[g].type;if(e.fieldInfos){var l=e.fieldInfos;for(g=0;g<l.length;g++)if("{"+l[g].fieldName+"}"==a){a=l[g].format;if("esriFieldTypeDate"==k)(a="DateFormat"+f.prototype._dateFormats[a.dateFormat?a.dateFormat:"shortDate"])&&(h=d.substitute({myKey:h},"${myKey:"+a+"}"));else if(("esriFieldTypeInteger"==k||"esriFieldTypeSingle"==k||"esriFieldTypeSmallInteger"==k||"esriFieldTypeLong"==k||"esriFieldTypeDouble"==k)&&a)h=F.format(h,{places:a.places}),
  a.digitSeparator||E.group&&(h=h.replace(RegExp("\\"+E.group,"g"),""));break}}break}else h="";return null===h?"":h})},_getLabelExpression:function(a){return a.labelExpressionInfo?a.labelExpressionInfo.value:this._validSyntax(a.labelExpression)?this._convertLabelExpression(a.labelExpression):""},_validSyntax:function(a){return/^(\s*\[[^\]]+\]\s*)+$/i.test(a)},_convertLabelExpression:function(a){return a.replace(RegExp("\\[","g"),"{").replace(RegExp("\\]","g"),"}")},_getProportionalSize:function(a,b){if(!a)return null;
  var c=d.substitute(b,"${"+a.field+"}",{first:!0});return!a.minSize||!a.maxSize||!a.minDataValue||!a.maxDataValue||!c||0>=a.maxDataValue-a.minDataValue?null:(a.maxSize-a.minSize)/(a.maxDataValue-a.minDataValue)*(c-a.minDataValue)+a.minSize},_convertOptions:function(a){var b=!0,c="shortDate",d=null,f=null,e="",g=!0;a&&(a.format&&(c=a.format.dateFormat,d={places:a.format.places,digitSeparator:a.format.digitSeparator}),f=a.fieldInfos,e=a.labelPlacement,null!=a.useCodedValues&&(b=a.useCodedValues));if("always-horizontal"==
  e||"esriServerPolygonPlacementAlwaysHorizontal"==e)g=!1;return{useCodedValues:b,dateFormat:c,numberFormat:d,fieldInfos:f,pointPriorities:"above-center"==e||"esriServerPointLabelPlacementAboveCenter"==e?"AboveCenter":"above-left"==e||"esriServerPointLabelPlacementAboveLeft"==e?"AboveLeft":"above-right"==e||"esriServerPointLabelPlacementAboveRight"==e?"AboveRight":"below-center"==e||"esriServerPointLabelPlacementBelowCenter"==e?"BelowCenter":"below-left"==e||"esriServerPointLabelPlacementBelowLeft"==
  e?"BelowLeft":"below-right"==e||"esriServerPointLabelPlacementBelowRight"==e?"BelowRight":"center-center"==e||"esriServerPointLabelPlacementCenterCenter"==e?"CenterCenter":"center-left"==e||"esriServerPointLabelPlacementCenterLeft"==e?"CenterLeft":"center-right"==e||"esriServerPointLabelPlacementCenterRight"==e?"CenterRight":"AboveRight",lineLabelPlacement:"above-start"==e||"below-start"==e||"center-start"==e?"PlaceAtStart":"above-end"==e||"below-end"==e||"center-end"==e?"PlaceAtEnd":"PlaceAtCenter",
  lineLabelPosition:"above-after"==e||"esriServerLinePlacementAboveAfter"==e||"above-along"==e||"esriServerLinePlacementAboveAlong"==e||"above-before"==e||"esriServerLinePlacementAboveBefore"==e||"above-start"==e||"esriServerLinePlacementAboveStart"==e||"above-end"==e||"esriServerLinePlacementAboveEnd"==e?"Above":"below-after"==e||"esriServerLinePlacementBelowAfter"==e||"below-along"==e||"esriServerLinePlacementBelowAlong"==e||"below-before"==e||"esriServerLinePlacementBelowBefore"==e||"below-start"==
  e||"esriServerLinePlacementBelowStart"==e||"below-end"==e||"esriServerLinePlacementBelowEnd"==e?"Below":"center-after"==e||"esriServerLinePlacementCenterAfter"==e||"center-along"==e||"esriServerLinePlacementCenterAlong"==e||"center-before"==e||"esriServerLinePlacementCenterBefore"==e||"center-start"==e||"esriServerLinePlacementCenterStart"==e||"center-end"==e||"esriServerLinePlacementCenterEnd"==e?"OnLine":"Above",labelRotation:g,howManyLabels:"OneLabel"}}});l("extend-esri")&&A.setObject("layers.LabelLayer",
  B,a);return B});