// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"esri/dijit/PopupTemplate":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/dom-construct ../kernel ../InfoTemplate ../PopupInfo ./PopupRenderer".split(" "),function(k,h,q,v,c,a,x,p){k=k([a,x],{declaredClass:"esri.dijit.PopupTemplate","-chains-":{constructor:"manual"},chartTheme:null,constructor:function(a,g){h.mixin(this,g);this.initialize(a,g)},getTitle:function(a){var g;this.info&&(g=this.titleHasRelatedFields?"":this._getPopupValues(a,null,!0).title);return g||
""},getContent:function(a){return this.info?(new p({template:this,graphic:a,chartTheme:this.chartTheme},v.create("div"))).domNode:""}});q("extend-esri")&&h.setObject("dijit.PopupTemplate",k,c);return k})},"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 dojox/html/entities ./lang ./kernel ./request ./promiseList ./tasks/query ./tasks/QueryTask ./tasks/RelationshipQuery ./tasks/StatisticDefinition ./support/expressionUtils ./layers/support/attributeUtils dojo/i18n!dojo/cldr/nls/number".split(" "),
function(k,h,q,v,c,a,x,p,l,g,w,C,u,z,B,D,G,d,m,t,y){k=k(null,{declaredClass:"esri.PopupInfo",_reExprField:/^\s*expression\//i,_exprPrefix:"expression/",_relatedFieldPrefix:"relationships/",initialize:function(b,e){if(b){h.mixin(this,e);this.info=b;this.title=this.getTitle;this.content=this.getContent;this._exprCache=this._compileExpressions(this.info.expressionInfos);var d=this._fieldLabels={},r=this._fieldsMap={};this.info.fieldInfos&&q.forEach(this.info.fieldInfos,function(n){var f=n.fieldName.toLowerCase(),
b=this._isExpressionField(f)?this.getExpressionInfo(f):null;d[f]=b?b.title:n.label;r[f]=n},this);this.titleHasRelatedFields=!(!this.info.title||-1===this.info.title.indexOf("{"+this._relatedFieldPrefix))}},toJson:function(){return v.fromJson(v.toJson(this.info))},getTitle:function(){},getContent:function(){},getFieldInfo:function(b){var e;q.some(this.info&&this.info.fieldInfos,function(d){d.fieldName===b&&(e=d);return!!e});return e},getExpressionInfo:function(b){if(this._isExpressionField(b)){b=b.replace(this._reExprField,
"");b=b.toLowerCase();var e;q.some(this.info.expressionInfos,function(d){d.name.toLowerCase()===b&&(e=d);return!!e});return e}},hasGeometryOperations:function(){return q.some(this.info.expressionInfos,function(b){return m.hasGeometryOperations(b.expression)})},getComponents:function(b){var e=this.info,d={};e.fieldInfos&&(e=q.filter(e.fieldInfos,function(b){return-1!==b.fieldName.indexOf(this._relatedFieldPrefix)},this))&&0<e.length&&(d.relatedInfo=this._getRelatedRecords({graphic:b,fieldsInfo:e}));
this._needFullResolutionFeature(b)&&(d.fullResolutionFeature=this._getFullResolutionFeature(b));return z(d).then(h.hitch(this,function(r){return this._getPopupValues(b,r.fullResolutionFeature)}))},getAttachments:function(b){var e=b.getSourceLayer();b=b.attributes;if(this.info.showAttachments&&e&&e.hasAttachments&&e.objectIdField&&(b=b&&b[e.objectIdField]))return e.queryAttachmentInfos(b)},_needFullResolutionFeature:function(b){return(b=b.getSourceLayer())?"esriGeometryPoint"!==b.geometryType&&"function"===
typeof b.getMaxAllowableOffset&&0<b.getMaxAllowableOffset()&&this.hasGeometryOperations():!1},_getFullResolutionFeature:function(b){var e=b.getSourceLayer(),d=e.objectIdField;b=(b=b.attributes)&&d&&b[d];if(null==b)return null;var r=new B;r.objectIds=[b];r.maxAllowableOffset=0;r.outFields=[d];return e.queryFeatures(r).then(function(n){return n.features&&n.features[0]})},_isExpressionField:function(b){return this._reExprField.test(b)},_compileExpressions:function(b){var e={};q.forEach(b,function(b){var r=
b.returnType&&b.returnType.toLowerCase();e[b.name]=t.createAttributeCache({valueExpression:b.expression},"number"!==r)});return e},_fetchAttributes:function(b,e){var d=h.clone(b.attributes)||{},r=e&&e.geometry,n=this._exprPrefix,f=this._exprCache;q.forEach(this.info.expressionInfos,function(e){var A=n+e.name;e=(e=f[e.name])?b._getDataValue(e.attributeInfo,e,m,null,r):null;"string"===typeof e&&(e=g.encode(e));d[A]=e});return d},_getPopupValues:function(b,e,d){var r=this.info,n=b.getSourceLayer(),f=
this._fetchAttributes(b,e),A=h.clone(f);e=r.fieldInfos;var F="",a="",m,t,y,g,c,u=n&&n._getDateOpts&&n._getDateOpts().properties,u=u&&u.slice(0),z={dateFormat:{properties:u,formatter:"DateFormat"+this._insertOffset(this._dateFormats.shortDateShortTime)}};if(this._relatedInfo)for(g in this._relatedInfo)if(this._relatedInfo.hasOwnProperty(g)){var p=this._relatedInfo[g],l=this._relatedLayersInfo[g];p&&(q.forEach(p.relatedFeatures,function(n){for(c in n.attributes)if(n.attributes.hasOwnProperty(c)&&"esriRelCardinalityOneToOne"===
l.relation.cardinality){var b=this._toRelatedFieldName([l.relation.id,c]);f[b]=A[b]=n.attributes[c]}},this),q.forEach(p.relatedStatsFeatures,function(n){for(c in n.attributes)if(n.attributes.hasOwnProperty(c)){var b=this._toRelatedFieldName([l.relation.id,c]);f[b]=A[b]=n.attributes[c]}},this))}e&&q.forEach(e,function(f){t=f.fieldName;var b=this._getLayerFieldInfo(n,t);b&&(t=f.fieldName=b.name);A[t]=this._formatValue(A[t],t,z);u&&f.format&&f.format.dateFormat&&(f=q.indexOf(u,t),-1<f&&u.splice(f,1))},
this);if(n){g=n.types;var C=(p=n.typeIdField)&&f[p];for(t in f)if(f.hasOwnProperty(t)&&-1===t.indexOf(this._relatedFieldPrefix)&&(y=f[t],w.isDefined(y))){var x=this._getDomainName(n,b,g,C,t,y);w.isDefined(x)?A[t]=x:t===p&&(x=this._getTypeName(n,b,y),w.isDefined(x)&&(A[t]=x))}}r.title&&(F=this._processFieldsInLinks(this._fixTokens(r.title,n),f),F=h.trim(w.substitute(A,F,z)||""));if(d)return{title:F};r.description&&(a=this._processFieldsInLinks(this._fixTokens(r.description,n),f),a=h.trim(w.substitute(A,
a,z)||""));e&&(m=[],q.forEach(e,function(f){(t=f.fieldName)&&f.visible&&m.push([this._fieldLabels[t.toLowerCase()]||t,w.substitute(A,"${"+t+"}",z)||""])},this));var v,k;r.mediaInfos&&(v=[],q.forEach(r.mediaInfos,function(b){k=0;y=b.value;switch(b.type){case "image":var e=y.sourceURL,e=e&&h.trim(w.substitute(f,this._fixTokens(e,n)));k=!!e;break;case "piechart":case "linechart":case "columnchart":case "barchart":var r,e=y.normalizeField;y.fields=q.map(y.fields,function(f){return(r=this._getLayerFieldInfo(n,
f))?r.name:f},this);e&&(r=this._getLayerFieldInfo(n,e),y.normalizeField=r?r.name:e);k=q.some(y.fields,function(n){return w.isDefined(f[n])||-1!==n.indexOf(this._relatedFieldPrefix)&&this._relatedInfo},this);break;default:return}if(k){b=h.clone(b);y=b.value;var e=b.title?this._processFieldsInLinks(this._fixTokens(b.title,n),f):"",d=b.caption?this._processFieldsInLinks(this._fixTokens(b.caption,n),f):"";b.title=e?h.trim(w.substitute(A,e,z)||""):"";b.caption=d?h.trim(w.substitute(A,d,z)||""):"";if("image"===
b.type)y.sourceURL=w.substitute(f,this._fixTokens(y.sourceURL,n)),y.linkURL&&(y.linkURL=h.trim(w.substitute(f,this._fixTokens(y.linkURL,n))||""));else{var F,a;q.forEach(y.fields,function(n,b){if(-1!==n.indexOf(this._relatedFieldPrefix))a=this._getRelatedChartInfos(n,y,f,z),a instanceof Array?y.fields=a:y.fields[b]=a;else{var e=f[n],e=void 0===e?null:e;F=f[y.normalizeField]||0;e&&F&&(e/=F);y.fields[b]={y:e,tooltip:(this._fieldLabels[n.toLowerCase()]||n)+":\x3cbr/\x3e"+this._formatValue(e,n,z,!!F)}}},
this)}v.push(b)}},this));return{title:F,description:a,hasDescription:!!r.description,fields:m&&m.length?m:null,mediaInfos:v&&v.length?v:null,formatted:A,editSummary:n&&n.getEditSummary?n.getEditSummary(b):""}},_getRelatedChartInfos:function(b,e,d,r){var n,f,A,F,a,m;n=[];m=this._fromRelatedFieldName(b);a=m[0];f=this._relatedInfo[a];a=this._relatedLayersInfo[a];f&&q.forEach(f.relatedFeatures,function(f){f=f.attributes;var a,J;for(J in f)if(f.hasOwnProperty(J)&&J===m[1]){a={};F=f[J];e.normalizeField&&
(A=-1!==e.normalizeField.indexOf(this._relatedFieldPrefix)?f[this._fromRelatedFieldName(e.normalizeField)[1]]:d[e.normalizeField]);F&&A&&(F/=A);if(e.tooltipField)if(-1!==e.tooltipField.indexOf(this._relatedFieldPrefix)){var t=this._fromRelatedFieldName(e.tooltipField)[1],y=w.isDefined(f[t])?f[t]:t;a.tooltip=y+":\x3cbr/\x3e"+this._formatValue(F,t,r,!!A)}else a.tooltip=(this._fieldLabels[b.toLowerCase()]||b)+":\x3cbr/\x3e"+this._formatValue(F,e.tooltipField,r,!!A);else a.tooltip=F;a.y=F;n.push(a)}},
this);return"esriRelCardinalityOneToMany"===a.relation.cardinality||"esriRelCardinalityManyToMany"===a.relation.cardinality?n:n[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,_reEmptyHref:/^href\s*=\s*"\s*"$/i,_reEmptyHrefApos:/^href\s*=\s*'\s*'$/i,_fixTokens:function(b,e){var d=this;return b.replace(/(\{([^\{\r\n]+)\})/g,function(b,n,f){b=
d._getLayerFieldInfo(e,f);return"$"+(b?"{"+b.name+"}":n)})},_encodeAttributes:function(b){b=h.clone(b)||{};var e,d;for(e in b)(d=b[e])&&"string"===typeof d&&(d=encodeURIComponent(d).replace(/\'/g,"\x26apos;"),b[e]=d);return b},_processFieldsInLinks:function(b,e){var d=this._encodeAttributes(e),d=h.hitch(this,this._addValuesToHref,e,d);b&&(b=b.replace(this._reHref,d).replace(this._reHrefApos,d));return b},_addValuesToHref:function(b,e,d,r){r=r&&h.trim(r);d=w.substitute(r&&0===r.indexOf("${")?b:e,d);
this._reEmptyHref.test(d)?d='href\x3d"about:blank"':this._reEmptyHrefApos.test(d)&&(d="href\x3d'about:blank'");return d},_getLayerFieldInfo:function(b,e){return b&&b.getField?b.getField(e):null},_formatValue:function(b,e,d,r){var n=this._fieldsMap[e.toLowerCase()],f=n&&n.format;e=-1!==q.indexOf(d.dateFormat.properties,e);var a="number"===typeof b&&!e&&(!f||!f.dateFormat);if(!w.isDefined(b)||!n||!w.isDefined(f))return a?this._forceLTR(b):b;var A="",n=[],m=f.hasOwnProperty("places")||f.hasOwnProperty("digitSeparator"),
t=f.hasOwnProperty("digitSeparator")?f.digitSeparator:!0;if(m&&!e)A="NumberFormat",n.push("places: "+(w.isDefined(f.places)&&(!r||0<f.places)?Number(f.places):"Infinity")),n.length&&(A+="("+n.join(",")+")");else if(f.dateFormat)A="DateFormat"+this._insertOffset(this._dateFormats[f.dateFormat]||this._dateFormats.shortDateShortTime);else return a?this._forceLTR(b):b;var g=this._applyFormatting(b,A,d);m&&-1<b.constructor.toString().indexOf("Array")&&(g="",q.forEach(b,h.hitch(this,function(f,n){n&&(g+=
" ");g+=this._applyFormatting(f,A,d)})));m&&!t&&y.group&&(g=g.replace(new RegExp("\\"+y.group,"g"),""));e&&(g='\x3cspan class\x3d"esriDateValue"\x3e'+g+"\x3c/span\x3e");return a?this._forceLTR(g):g},_applyFormatting:function(b,e,d){return w.substitute({myKey:b},"${myKey:"+e+"}",d)||""},_forceLTR:function(b){var e=p("ie");return e&&10>=e?b:"\x3cspan class\x3d'esriNumericValue'\x3e"+b+"\x3c/span\x3e"},_insertOffset:function(b){b&&(b=w.isDefined(this.utcOffset)?b.replace(/\)\s*$/,", utcOffset:"+this.utcOffset+
")"):b);return b},_getDomainName:function(b,e,d,r,n,f){return(b=b.getDomain&&b.getDomain(n,{feature:e}))&&b.codedValues?b.getName(f):null},_getTypeName:function(b,e,d){return(b=b.getType&&b.getType(e))&&b.name},_getRelatedRecords:function(b){var e=b.graphic,d;this._relatedLayersInfoPromise||(this._relatedLayersInfoPromise=this._getRelatedLayersInfo(b).then(h.hitch(this,function(b){for(d in b)b.hasOwnProperty(d)&&b[d]&&(this._relatedLayersInfo[d].relatedLayerInfo=b[d])})));return this._relatedLayersInfoPromise.then(h.hitch(this,
function(){return this._queryRelatedLayers(e)})).then(h.hitch(this,function(b){this._setRelatedRecords(e,b);return b}))},_getRelatedLayersInfo:function(b){var e=b.fieldsInfo,a,r,n={};a=b.graphic.getSourceLayer();this._relatedLayersInfo||(this._relatedLayersInfo={});q.forEach(e,function(f){var b,n,e,r;b=this._fromRelatedFieldName(f.fieldName);n=b[0];b=b[1];n&&(!this._relatedLayersInfo[n]&&a&&a.relationships&&(q.some(a.relationships,function(f){if(f.id==n)return r=f,!0}),r&&(this._relatedLayersInfo[n]=
{relation:r,relatedFields:[],outStatistics:[]})),this._relatedLayersInfo[n]&&(this._relatedLayersInfo[n].relatedFields.push(b),f.statisticType&&(e=new d,e.statisticType=f.statisticType,e.onStatisticField=b,e.outStatisticFieldName=b,this._relatedLayersInfo[n].outStatistics.push(e))))},this);for(r in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(r)&&this._relatedLayersInfo[r]&&(b=this._relatedLayersInfo[r].relation,b=a.url.replace(/[0-9]+$/,b.relatedTableId),this._relatedLayersInfo[r].relatedLayerUrl=
b,n[r]=u({url:b,content:{f:"json"},callbackParamName:"callback"}));return l(n)},_queryRelatedLayers:function(b){var e={},d;for(d in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(d)&&(e[d]=this._queryRelatedLayer({graphic:b,relatedInfo:this._relatedLayersInfo[d]}));return l(e)},_queryRelatedLayer:function(b){var e,d,r,n,f,a,m,t,y,g,c,u,z;e=b.graphic;d=e.getSourceLayer();r=d.url.match(/[0-9]+$/g)[0];c=b.relatedInfo;g=c.relatedLayerInfo;u=c.relatedLayerUrl;b=c.relation;q.some(g.relationships,
function(f){if(f.relatedTableId===parseInt(r,10))return n=f,!0},this);n&&(f=new B,q.some(g.fields,function(f){if(f.name===n.keyField)return t=-1!==q.indexOf(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"],f.type)?"number":"string",!0}),n.relationshipTableId&&n.keyFieldInRelationshipTable?(z=new x,this._queryRelatedRecords(e,n).then(h.hitch(this,function(b){var n;(n=b[e.attributes[d.objectIdField]])?(b=q.map(n.features,function(f){return f.attributes[g.objectIdField]},
this),c.outStatistics&&0<c.outStatistics.length&&g.supportsStatistics&&(y=new B,y.objectIds=b,y.outFields=f.outFields,y.outStatistics=c.outStatistics),y&&(a=new D(u),a.execute(y).then(h.hitch(this,function(f){var b=[];b.push(n);b.push(f);z.resolve(b)})))):z.resolve()}))):(m="string"===t?n.keyField+"\x3d'"+e.attributes[b.keyField]+"'":n.keyField+"\x3d"+e.attributes[b.keyField],f.where=m,f.outFields=c.relatedFields,c.outStatistics&&0<c.outStatistics.length&&g.supportsStatistics&&(y=new B,y.where=f.where,
y.outFields=f.outFields,y.outStatistics=c.outStatistics),a=new D(u),m=[],m.push(a.execute(f)),y&&m.push(a.execute(y))));return m?l(m):z?z.promise:void 0},_setRelatedRecords:function(b,e){this._relatedInfo=[];for(var d in e)if(e.hasOwnProperty(d)&&e[d]){var r=e[d];this._relatedInfo[d]={};this._relatedInfo[d].relatedFeatures=r[0].features;w.isDefined(r[1])&&(this._relatedInfo[d].relatedStatsFeatures=r[1].features)}},_handlerErrorResponse:function(b,e){b.reject(e)},_fromRelatedFieldName:function(b){var e=
[];-1!==b.indexOf(this._relatedFieldPrefix)&&(b=b.split("/"),e=b.slice(1));return e},_toRelatedFieldName:function(b){var e="";b&&0<b.length&&(e=this._relatedFieldPrefix+b[0]+"/"+b[1]);return e},_queryRelatedRecords:function(b,e){var d=b.getSourceLayer(),r=new G;r.outFields=["*"];r.relationshipId=e.id;r.objectIds=[b.attributes[d.objectIdField]];return d.queryRelatedFeatures(r)}});a("extend-esri")&&(C.PopupInfo=C.PopupInfoTemplate=k);return k})},"dojox/html/entities":function(){define(["dojo/_base/lang"],
function(k){var h=k.getObject("dojox.html.entities",!0),q=function(c,a){var h,p;if(a._encCache&&a._encCache.regexp&&a._encCache.mapper&&a.length==a._encCache.length)h=a._encCache.mapper,p=a._encCache.regexp;else{h={};p=["["];var l;for(l=0;l<a.length;l++)h[a[l][0]]="\x26"+a[l][1]+";",p.push(a[l][0]);p.push("]");p=new RegExp(p.join(""),"g");a._encCache={mapper:h,regexp:p,length:a.length}}return c=c.replace(p,function(a){return h[a]})},v=function(c,a){var h,p;if(a._decCache&&a._decCache.regexp&&a._decCache.mapper&&
a.length==a._decCache.length)h=a._decCache.mapper,p=a._decCache.regexp;else{h={};p=["("];var l;for(l=0;l<a.length;l++){var g="\x26"+a[l][1]+";";l&&p.push("|");h[g]=a[l][0];p.push(g)}p.push(")");p=new RegExp(p.join(""),"g");a._decCache={mapper:h,regexp:p,length:a.length}}return c=c.replace(p,function(a){return h[a]})};h.html=[["\x26","amp"],['"',"quot"],["\x3c","lt"],["\x3e","gt"],["\u00a0","nbsp"]];h.latin=[["\u00a1","iexcl"],["\u00a2","cent"],["\u00a3","pound"],["\u20ac","euro"],["\u00a4","curren"],
["\u00a5","yen"],["\u00a6","brvbar"],["\u00a7","sect"],["\u00a8","uml"],["\u00a9","copy"],["\u00aa","ordf"],["\u00ab","laquo"],["\u00ac","not"],["\u00ad","shy"],["\u00ae","reg"],["\u00af","macr"],["\u00b0","deg"],["\u00b1","plusmn"],["\u00b2","sup2"],["\u00b3","sup3"],["\u00b4","acute"],["\u00b5","micro"],["\u00b6","para"],["\u00b7","middot"],["\u00b8","cedil"],["\u00b9","sup1"],["\u00ba","ordm"],["\u00bb","raquo"],["\u00bc","frac14"],["\u00bd","frac12"],["\u00be","frac34"],["\u00bf","iquest"],["\u00c0",
"Agrave"],["\u00c1","Aacute"],["\u00c2","Acirc"],["\u00c3","Atilde"],["\u00c4","Auml"],["\u00c5","Aring"],["\u00c6","AElig"],["\u00c7","Ccedil"],["\u00c8","Egrave"],["\u00c9","Eacute"],["\u00ca","Ecirc"],["\u00cb","Euml"],["\u00cc","Igrave"],["\u00cd","Iacute"],["\u00ce","Icirc"],["\u00cf","Iuml"],["\u00d0","ETH"],["\u00d1","Ntilde"],["\u00d2","Ograve"],["\u00d3","Oacute"],["\u00d4","Ocirc"],["\u00d5","Otilde"],["\u00d6","Ouml"],["\u00d7","times"],["\u00d8","Oslash"],["\u00d9","Ugrave"],["\u00da",
"Uacute"],["\u00db","Ucirc"],["\u00dc","Uuml"],["\u00dd","Yacute"],["\u00de","THORN"],["\u00df","szlig"],["\u00e0","agrave"],["\u00e1","aacute"],["\u00e2","acirc"],["\u00e3","atilde"],["\u00e4","auml"],["\u00e5","aring"],["\u00e6","aelig"],["\u00e7","ccedil"],["\u00e8","egrave"],["\u00e9","eacute"],["\u00ea","ecirc"],["\u00eb","euml"],["\u00ec","igrave"],["\u00ed","iacute"],["\u00ee","icirc"],["\u00ef","iuml"],["\u00f0","eth"],["\u00f1","ntilde"],["\u00f2","ograve"],["\u00f3","oacute"],["\u00f4",
"ocirc"],["\u00f5","otilde"],["\u00f6","ouml"],["\u00f7","divide"],["\u00f8","oslash"],["\u00f9","ugrave"],["\u00fa","uacute"],["\u00fb","ucirc"],["\u00fc","uuml"],["\u00fd","yacute"],["\u00fe","thorn"],["\u00ff","yuml"],["\u0192","fnof"],["\u0391","Alpha"],["\u0392","Beta"],["\u0393","Gamma"],["\u0394","Delta"],["\u0395","Epsilon"],["\u0396","Zeta"],["\u0397","Eta"],["\u0398","Theta"],["\u0399","Iota"],["\u039a","Kappa"],["\u039b","Lambda"],["\u039c","Mu"],["\u039d","Nu"],["\u039e","Xi"],["\u039f",
"Omicron"],["\u03a0","Pi"],["\u03a1","Rho"],["\u03a3","Sigma"],["\u03a4","Tau"],["\u03a5","Upsilon"],["\u03a6","Phi"],["\u03a7","Chi"],["\u03a8","Psi"],["\u03a9","Omega"],["\u03b1","alpha"],["\u03b2","beta"],["\u03b3","gamma"],["\u03b4","delta"],["\u03b5","epsilon"],["\u03b6","zeta"],["\u03b7","eta"],["\u03b8","theta"],["\u03b9","iota"],["\u03ba","kappa"],["\u03bb","lambda"],["\u03bc","mu"],["\u03bd","nu"],["\u03be","xi"],["\u03bf","omicron"],["\u03c0","pi"],["\u03c1","rho"],["\u03c2","sigmaf"],["\u03c3",
"sigma"],["\u03c4","tau"],["\u03c5","upsilon"],["\u03c6","phi"],["\u03c7","chi"],["\u03c8","psi"],["\u03c9","omega"],["\u03d1","thetasym"],["\u03d2","upsih"],["\u03d6","piv"],["\u2022","bull"],["\u2026","hellip"],["\u2032","prime"],["\u2033","Prime"],["\u203e","oline"],["\u2044","frasl"],["\u2118","weierp"],["\u2111","image"],["\u211c","real"],["\u2122","trade"],["\u2135","alefsym"],["\u2190","larr"],["\u2191","uarr"],["\u2192","rarr"],["\u2193","darr"],["\u2194","harr"],["\u21b5","crarr"],["\u21d0",
"lArr"],["\u21d1","uArr"],["\u21d2","rArr"],["\u21d3","dArr"],["\u21d4","hArr"],["\u2200","forall"],["\u2202","part"],["\u2203","exist"],["\u2205","empty"],["\u2207","nabla"],["\u2208","isin"],["\u2209","notin"],["\u220b","ni"],["\u220f","prod"],["\u2211","sum"],["\u2212","minus"],["\u2217","lowast"],["\u221a","radic"],["\u221d","prop"],["\u221e","infin"],["\u2220","ang"],["\u2227","and"],["\u2228","or"],["\u2229","cap"],["\u222a","cup"],["\u222b","int"],["\u2234","there4"],["\u223c","sim"],["\u2245",
"cong"],["\u2248","asymp"],["\u2260","ne"],["\u2261","equiv"],["\u2264","le"],["\u2265","ge"],["\u2282","sub"],["\u2283","sup"],["\u2284","nsub"],["\u2286","sube"],["\u2287","supe"],["\u2295","oplus"],["\u2297","otimes"],["\u22a5","perp"],["\u22c5","sdot"],["\u2308","lceil"],["\u2309","rceil"],["\u230a","lfloor"],["\u230b","rfloor"],["\u2329","lang"],["\u232a","rang"],["\u25ca","loz"],["\u2660","spades"],["\u2663","clubs"],["\u2665","hearts"],["\u2666","diams"],["\u0152","OElig"],["\u0153","oelig"],
["\u0160","Scaron"],["\u0161","scaron"],["\u0178","Yuml"],["\u02c6","circ"],["\u02dc","tilde"],["\u2002","ensp"],["\u2003","emsp"],["\u2009","thinsp"],["\u200c","zwnj"],["\u200d","zwj"],["\u200e","lrm"],["\u200f","rlm"],["\u2013","ndash"],["\u2014","mdash"],["\u2018","lsquo"],["\u2019","rsquo"],["\u201a","sbquo"],["\u201c","ldquo"],["\u201d","rdquo"],["\u201e","bdquo"],["\u2020","dagger"],["\u2021","Dagger"],["\u2030","permil"],["\u2039","lsaquo"],["\u203a","rsaquo"]];h.encode=function(c,a){c&&(a?
c=q(c,a):(c=q(c,h.html),c=q(c,h.latin)));return c};h.decode=function(c,a){c&&(a?c=v(c,a):(c=v(c,h.html),c=v(c,h.latin)));return c};return h})},"esri/promiseList":function(){define(["dojo/_base/array","dojo/Deferred","dojo/when"],function(k,h,q){var v=k.forEach;return function(c){function a(a,g){l[g]=a;C.progress([a,g]);0===--u&&C.resolve(l)}var k,p;c instanceof Array?p=c:c&&"object"===typeof c&&(k=c);var l,g=[];if(k){p=[];for(var w in k)Object.hasOwnProperty.call(k,w)&&(g.push(w),p.push(k[w]));l=
{}}else p&&(l=[]);if(!p||!p.length)return(new h).resolve(l);var C=new h;C.promise.always(function(){l=g=null});var u=p.length;v(p,function(c,u){k||g.push(u);q(c,function(c){C.isFulfilled()||a(c,g[u])},function(c){C.isFulfilled()||a(c,g[u])})});return C.promise}})},"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(k,h,q,v,c,a,x,p,l,g,w,C,u){k=k(C,{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,g){this._handler=h.hitch(this,this._handler);this._relationshipQueryHandler=h.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=h.hitch(this,this._executeForIdsHandler);this._countHandler=h.hitch(this,this._countHandler);
this._extentHandler=h.hitch(this,this._extentHandler);this.source=g&&g.source;this.gdbVersion=g&&g.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,g,u,l,d){l=d.assembly;a=this._encode(h.mixin({},this._url.query,{f:"json"},a.toJson(l&&l[0])));var m=this._handler,t=this._errorHandler;this.source&&(l={source:this.source.toJson()},a.layer=c.toJson(l));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return p({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,b){m(a,b,g,u,d.dfd)},error:function(a){t(a,u,d.dfd)}},this.requestOptions)},executeRelationshipQuery:function(a,
g,c){a=this._encode(h.mixin({},this._url.query,{f:"json"},a.toJson()));var u=this._relationshipQueryHandler,d=this._errorHandler;this.gdbVersion&&(a.gdbVersion=this.gdbVersion);var m=new v(l._dfdCanceller);m._pendingDfd=p({url:this._url.path+"/queryRelatedRecords",content:a,callbackParamName:"callback",load:function(d,a){u(d,a,g,c,m)},error:function(a){d(a,c,m)}},this.requestOptions);return m},executeForIds:function(a,g,u,l){var d=l.assembly;a=this._encode(h.mixin({},this._url.query,{f:"json",returnIdsOnly:!0},
a.toJson(d&&d[0])));var m=this._executeForIdsHandler,t=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=c.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return p({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(d,b){m(d,b,g,u,l.dfd)},error:function(d){t(d,u,l.dfd)}},this.requestOptions)},executeForCount:function(a,g,u,l){var d=l.assembly;a=this._encode(h.mixin({},this._url.query,{f:"json",returnIdsOnly:!0,returnCountOnly:!0},a.toJson(d&&
d[0])));var m=this._countHandler,t=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=c.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return p({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(d,b){m(d,b,g,u,l.dfd)},error:function(d){t(d,u,l.dfd)}},this.requestOptions)},executeForExtent:function(a,g,u,l){var d=l.assembly;a=this._encode(h.mixin({},this._url.query,{f:"json",returnExtentOnly:!0,returnCountOnly:!0},a.toJson(d&&d[0])));
var m=this._extentHandler,t=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=c.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return p({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(d,b){m(d,b,g,u,l.dfd)},error:function(d){t(d,u,l.dfd)}},this.requestOptions)},_handler:function(a,g,c,l,d){try{var m=new u(a);this._successHandler([m],"onComplete",c,d)}catch(t){this._errorHandler(t,l,d)}},_relationshipQueryHandler:function(a,g,c,l,
d){try{var m=a.geometryType,t=a.spatialReference,y={};q.forEach(a.relatedRecordGroups,function(b){var d={};d.geometryType=m;d.spatialReference=t;d.features=b.relatedRecords;d=new u(d);if(null!=b.objectId)y[b.objectId]=d;else for(var a in b)b.hasOwnProperty(a)&&"relatedRecords"!==a&&(y[b[a]]=d)});this._successHandler([y],"onExecuteRelationshipQueryComplete",c,d)}catch(b){this._errorHandler(b,l,d)}},_executeForIdsHandler:function(a,g,c,u,d){try{this._successHandler([a.objectIds],"onExecuteForIdsComplete",
c,d)}catch(m){this._errorHandler(m,u,d)}},_countHandler:function(a,g,c,u,d){try{var m,t=a.features,y=a.objectIds;if(y)m=y.length;else{if(t)throw Error("Unable to perform query. Please check your parameters.");m=a.count}this._successHandler([m],"onExecuteForCountComplete",c,d)}catch(b){this._errorHandler(b,u,d)}},_extentHandler:function(a,c,u,l,d){try{a.extent&&(a.extent=new g(a.extent)),this._successHandler([a],"onExecuteForExtentComplete",u,d)}catch(m){this._errorHandler(m,l,d)}}});w._createWrappers(k);
a("extend-esri")&&h.setObject("tasks.QueryTask",k,x);return k})},"esri/tasks/Task":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../deferredUtils ../urlUtils ../Evented".split(" "),function(k,h,q,v,c,a,x,p){k=k(p,{declaredClass:"esri.tasks._Task",_eventMap:{error:["error"],complete:["result"]},constructor:function(a,g){a&&h.isString(a)&&(this._url=x.urlToObject(this.url=a));g&&g.requestOptions&&(this.requestOptions=g.requestOptions);this.normalization=!0;
this._errorHandler=h.hitch(this,this._errorHandler);this.registerConnectEvents()},_useSSL:function(){var a=this._url,g=/^http:/i;this.url&&(this.url=this.url.replace(g,"https:"));a&&a.path&&(a.path=a.path.replace(g,"https:"))},_encode:function(a,g,c){var l,u,p={},w,k;for(w in a)if("declaredClass"!==w&&(l=a[w],u=typeof l,null!==l&&void 0!==l&&"function"!==u))if(h.isArray(l))for(p[w]=[],k=l.length,u=0;u<k;u++)p[w][u]=this._encode(l[u]);else"object"===u?l.toJson&&(u=l.toJson(c&&c[w]),"esri.tasks.FeatureSet"===
l.declaredClass&&u.spatialReference&&(u.sr=u.spatialReference,delete u.spatialReference),p[w]=g?u:q.toJson(u)):p[w]=l;return p},_successHandler:function(c,g,p,h){g&&this[g].apply(this,c);p&&p.apply(null,c);h&&a._resDfd(h,c)},_errorHandler:function(a,g,c){this.onError(a);g&&g(a);c&&c.errback(a)},setNormalization:function(a){this.normalization=a},onError:function(){}});v("extend-esri")&&(c.Task=k);return k})},"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(k,h,q,v,c,a,x,p,l,g,w){k=k(null,{declaredClass:"esri.tasks.FeatureSet",constructor:function(a){if(a){h.mixin(this,a);var c=this.features,l=a.spatialReference,k=g.getGeometryType(a.geometryType),l=this.spatialReference=new p(l);this.geometryType=a.geometryType;a.fields&&(this.fields=a.fields);q.forEach(c,function(a,g){var d=a.geometry&&a.geometry.spatialReference;c[g]=new x(k&&a.geometry?new k(a.geometry):null,a.symbol&&w.fromJson(a.symbol),a.attributes);c[g].geometry&&!d&&c[g].geometry.setSpatialReference(l)});
this._hydrate()}else this.features=[]},displayFieldName:null,geometryType:null,spatialReference:null,fieldAliases:null,toJson:function(c){var u={};this.displayFieldName&&(u.displayFieldName=this.displayFieldName);this.fields&&(u.fields=this.fields);this.spatialReference?u.spatialReference=this.spatialReference.toJson():this.features[0]&&this.features[0].geometry&&(u.spatialReference=this.features[0].geometry.spatialReference.toJson());this.features[0]&&(this.features[0].geometry&&(u.geometryType=
g.getJsonType(this.features[0].geometry)),u.features=l._encodeGraphics(this.features,c));u.geometryType=u.geometryType||this.geometryType;u.exceededTransferLimit=this.exceededTransferLimit;u.transform=this.transform;return a.fixJson(u)},_hydrate:function(){var a=this.transform,c=this.geometryType;if(a&&c)for(var g=this.features,l=a.translate[0],p=a.translate[1],h=a.scale[0],d=a.scale[1],m=function(a,d,b){if("esriGeometryPoint"===a)return function(a){a.x=d(a.x);a.y=b(a.y)};if("esriGeometryPolyline"===
a||"esriGeometryPolygon"===a)return function(a){a=a.rings||a.paths;var e,r,n,f,c,m,g,t;e=0;for(r=a.length;e<r;e++)for(c=a[e],n=0,f=c.length;n<f;n++)m=c[n],0<n?(g+=m[0],t+=m[1]):(g=m[0],t=m[1]),m[0]=d(g),m[1]=b(t)};if("esriGeometryEnvelope"===a)return function(a){a.xmin=d(a.xmin);a.ymin=b(a.ymin);a.xmax=d(a.xmax);a.ymax=b(a.ymax)};if("esriGeometryMultipoint"===a)return function(a){a=a.points;var e,r,n,f,m;e=0;for(r=a.length;e<r;e++)n=a[e],0<e?(f+=n[0],m+=n[1]):(f=n[0],m=n[1]),n[0]=d(f),n[1]=b(m)}}(c,
function(a){return a*h+l},function(a){return p-a*d}),a=0,c=g.length;a<c;a++)g[a].geometry&&m(g[a].geometry);this.transform=null},quantize:function(a){if(!this.geometryType)return this.transform=null,this;var c=a.translate[0],g=a.translate[1],l=a.scale[0],p=a.scale[1],h=this.features,d=function(a,d,m){var b,n,f,e,c,g,t=[];b=0;for(n=a.length;b<n;b++)if(f=a[b],0<b){if(g=d(f[0]),f=m(f[1]),g!==e||f!==c)t.push([g-e,f-c]),e=g,c=f}else e=d(f[0]),c=m(f[1]),t.push([e,c]);return 0<t.length?t:null},m=function(a,
e,c){if("esriGeometryPoint"===a)return function(a){a.x=e(a.x);a.y=c(a.y);return a};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){var b,f,r,m,g;r=a.rings||a.paths;g=[];b=0;for(f=r.length;b<f;b++)m=r[b],(m=d(m,e,c))&&g.push(m);return 0<g.length?(a.rings?a.rings=g:a.paths=g,a):null};if("esriGeometryMultipoint"===a)return function(a){var b;b=d(a.points,e,c);return 0<b.length?(a.points=b,a):null};if("esriGeometryEnvelope"===a)return function(a){return a}}(this.geometryType,
function(a){return Math.round((a-c)/l)},function(a){return Math.round((g-a)/p)}),t,y;t=0;for(y=h.length;t<y;t++)h[t].geometry&&(m(h[t].geometry)||h[t].setGeometry(null));this.transform=a;return this}});v("extend-esri")&&h.setObject("tasks.FeatureSet",k,c);return k})},"esri/tasks/RelationshipQuery":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","../kernel"],function(k,h,q,v,c){k=k(null,{declaredClass:"esri.tasks.RelationshipQuery",definitionExpression:"",relationshipId:null,
returnGeometry:!1,objectIds:null,outSpatialReference:null,outFields:null,toJson:function(){var a={definitionExpression:this.definitionExpression,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision},c=this.objectIds,h=this.outFields,l=this.outSpatialReference;c&&(a.objectIds=c.join(","));h&&(a.outFields=h.join(","));l&&(a.outSR=l.wkid||q.toJson(l.toJson()));a._ts=this._ts;return a}});v("extend-esri")&&
h.setObject("tasks.RelationshipQuery",k,c);return k})},"esri/tasks/StatisticDefinition":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(k,h,q,v){k=k(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}}});q("extend-esri")&&
h.setObject("tasks.StatisticDefinition",k,v);return k})},"esri/dijit/PopupRenderer":function(){define("require dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/kernel dojo/sniff dojo/query dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-style dojox/html/entities dijit/_Widget dijit/_Templated ../kernel ../lang ../urlUtils ./_EventedWidget dojo/i18n!../nls/jsapi dojo/NodeList-dom".split(" "),function(k,h,q,v,c,a,x,p,l,g,w,C,u,z,B,D,G,d,m,t,y){var b=
0,e=y.widgets.popup,A=y.widgets.templatePicker;h=h([t,B,D],{declaredClass:"esri.dijit._PopupRenderer",constructor:function(){this._nls=v.mixin({},e)},templateString:"\x3cdiv class\x3d'esriViewPopup'\x3e\x3cdiv class\x3d'statusSection hidden' dojoAttachPoint\x3d'_status'\x3e\x3c/div\x3e\x3cdiv class\x3d'mainSection'\x3e\x3cdiv class\x3d'header' dojoAttachPoint\x3d'_title'\x3e\x3c/div\x3e\x3cdiv class\x3d'hzLine'\x3e\x3c/div\x3e\x3cdiv dojoAttachPoint\x3d'_description'\x3e\x3c/div\x3e\x3cdiv class\x3d'break'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'attachmentsSection hidden'\x3e\x3cdiv\x3e${_nls.NLS_attach}:\x3c/div\x3e\x3cul dojoAttachPoint\x3d'_attachmentsList'\x3e\x3c/ul\x3e\x3cdiv class\x3d'break'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'mediaSection hidden'\x3e\x3cdiv class\x3d'header' dojoAttachPoint\x3d'_mediaTitle'\x3e\x3c/div\x3e\x3cdiv class\x3d'hzLine'\x3e\x3c/div\x3e\x3cdiv class\x3d'caption' dojoAttachPoint\x3d'_mediaCaption'\x3e\x3c/div\x3e\x3cdiv class\x3d'gallery' dojoAttachPoint\x3d'_gallery'\x3e\x3cdiv class\x3d'mediaHandle prev' dojoAttachPoint\x3d'_prevMedia' dojoAttachEvent\x3d'onclick: _goToPrevMedia'\x3e\x3c/div\x3e\x3cdiv class\x3d'mediaHandle next' dojoAttachPoint\x3d'_nextMedia' dojoAttachEvent\x3d'onclick: _goToNextMedia'\x3e\x3c/div\x3e\x3cul class\x3d'summary'\x3e\x3cli class\x3d'image mediaCount hidden' dojoAttachPoint\x3d'_imageCount'\x3e0\x3c/li\x3e\x3cli class\x3d'image mediaIcon hidden'\x3e\x3c/li\x3e\x3cli class\x3d'chart mediaCount hidden' dojoAttachPoint\x3d'_chartCount'\x3e0\x3c/li\x3e\x3cli class\x3d'chart mediaIcon hidden'\x3e\x3c/li\x3e\x3c/ul\x3e\x3cdiv class\x3d'frame' dojoAttachPoint\x3d'_mediaFrame'\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'editSummarySection hidden' dojoAttachPoint\x3d'_editSummarySection'\x3e\x3cdiv class\x3d'break'\x3e\x3c/div\x3e\x3cdiv class\x3d'break hidden' dojoAttachPoint\x3d'_mediaBreak'\x3e\x3c/div\x3e\x3cdiv class\x3d'editSummary' dojoAttachPoint\x3d'_editSummary'\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e",
showTitle:!0,startup:function(){this.inherited(arguments);this._showStatus(A.loading);this._contentDfd=this.template.getComponents(this.graphic).then(v.hitch(this,this._handleComponentsSuccess)).otherwise(v.hitch(this,this._handleComponentsError))},destroy:function(){this._contentDfd&&this._contentDfd.cancel();this._attachmentsDfd&&this._attachmentsDfd.cancel();this._destroyFrame();this.template=this.graphic=this._nls=this._mediaInfos=this._mediaPtr=this._contentDfd=this._attachmentsDfd=null;this.inherited(arguments)},
_goToPrevMedia:function(){0>this._mediaPtr-1||(this._mediaPtr--,this._updateUI(),this._displayMedia())},_goToNextMedia:function(){this._mediaPtr+1!==this._mediaInfos.length&&(this._mediaPtr++,this._updateUI(),this._displayMedia())},_updateUI:function(){var b=this._mediaInfos,n=b.length,f=this.domNode,d=this._prevMedia,e=this._nextMedia;if(1<n){var m=0,t=0;c.forEach(b,function(a){"image"===a.type?m++:-1!==a.type.indexOf("chart")&&t++});m&&(g.set(this._imageCount,"innerHTML",m),a.query(".summary .image",
f).removeClass("hidden"));t&&(g.set(this._chartCount,"innerHTML",t),a.query(".summary .chart",f).removeClass("hidden"))}else a.query(".summary",f).addClass("hidden"),w.add(d,"hidden"),w.add(e,"hidden");b=this._mediaPtr;0===b?w.add(d,"hidden"):w.remove(d,"hidden");b===n-1?w.add(e,"hidden"):w.remove(e,"hidden");this._destroyFrame()},_displayMedia:function(){var d=this._mediaInfos[this._mediaPtr],n=d.title,f=d.caption,e=a.query(".mediaSection .hzLine",this.domNode)[0];g.set(this._mediaTitle,"innerHTML",
n);w[n?"remove":"add"](this._mediaTitle,"hidden");g.set(this._mediaCaption,"innerHTML",f);w[f?"remove":"add"](this._mediaCaption,"hidden");w[n&&f?"remove":"add"](e,"hidden");this._rid=null;if("image"===d.type)this._showImage(d);else{var m=this,n=["dojox/charting/Chart2D","dojox/charting/action2d/Tooltip"],f=d.value.theme||this.chartTheme;v.isString(f)&&(f=f.replace(/\./gi,"/"),-1===f.indexOf("/")&&(f="dojox/charting/themes/"+f));f||(f="./Rainbow");n.push(f);try{var c=this._rid=b++;k(n,function(a,
f,b){c===m._rid&&(m._rid=null,m._showChart(d.type,d.value,a,f,b))})}catch(O){console.log("PopupRenderer: error loading modules")}}},_preventNewTab:function(a){return(a=a&&v.trim(a).toLowerCase())&&(0===a.indexOf("mailto:")||0===a.indexOf("tel:"))},_showImage:function(b){w.add(this._mediaFrame,"image");var d=u.get(this._gallery,"height"),f=b.value,e;f.linkURL&&(e=C.create("a",{href:f.linkURL,target:this._preventNewTab(f.linkURL)?"":"_blank"},this._mediaFrame));f=b.refreshInterval?this._addURLParameter(f.sourceURL,
"timestamp",Date.now()):f.sourceURL;C.create("img",{className:"esriPopupMediaImage",src:f},e||this._mediaFrame);var r=a.query(".esriPopupMediaImage",this._mediaFrame)[0];this._imageLoadHandle=q.connect(r,"onload",this,function(){this._clearImageHandles();this._imageLoaded(r,d);this._initImageRefresh(b)})},_addURLParameter:function(a,b,f){var d=-1===a.indexOf("?")?"?":"\x26";return a+d+b+"\x3d"+f},_initImageRefresh:function(a){if(a.refreshInterval){var b=6E4*a.refreshInterval;this._imageRefreshHandle=
setTimeout(v.hitch(this,function(){this._destroyFrame();this._showImage(a)}),b)}},_clearImageHandles:function(){q.disconnect(this._imageLoadHandle);this._imageLoadHandle=null;clearTimeout(this._imageRefreshHandle);this._imageRefreshHandle=null},_showChart:function(a,b,f,d,e){w.remove(this._mediaFrame,"image");f=this._chart=new f(C.create("div",{"class":"chart"},this._mediaFrame),{margins:{l:4,t:4,r:4,b:4}});e&&f.setTheme(e);switch(a){case "piechart":f.addPlot("default",{type:"Pie",labels:!1});f.addSeries("Series A",
b.fields);break;case "linechart":f.addPlot("default",{type:"Markers"});f.addAxis("x",{min:0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1});f.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});c.forEach(b.fields,function(a,f){a.x=f+1});f.addSeries("Series A",b.fields);break;case "columnchart":f.addPlot("default",{type:"Columns",gap:3});f.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});f.addSeries("Series A",b.fields);break;case "barchart":f.addPlot("default",{type:"Bars",
gap:3}),f.addAxis("x",{includeZero:!0,fixUpper:"minor",minorLabels:!1}),f.addAxis("y",{vertical:!0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1}),f.addSeries("Series A",b.fields)}this._action=new d(f);f.render()},_destroyFrame:function(){this._rid=null;this._clearImageHandles();this._chart&&(this._chart.destroy(),this._chart=null);this._action&&(this._action.destroy(),this._action=null);g.set(this._mediaFrame,"innerHTML","")},_imageLoaded:function(a,b){var f=a.height;f<b&&u.set(a,"marginTop",
Math.round((b-f)/2)+"px")},_attListHandler:function(a,b){if(a===this._attachmentsDfd){this._attachmentsDfd=null;var f="";b instanceof Error||!b||!b.length||c.forEach(b,function(a){f+="\x3cli\x3e";f+="\x3ca href\x3d'"+m.addProxy(a.url)+"' target\x3d'_blank'\x3e"+(a.name||"[No name]")+"\x3c/a\x3e";f+="\x3c/li\x3e"});g.set(this._attachmentsList,"innerHTML",f||"\x3cli\x3e"+this._nls.NLS_noAttach+"\x3c/li\x3e")}},_supportedURIInfos:[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,label:e.NLS_moreInfo},{pattern:/^\s*(tel:([^\s]+))\s*$/i,
label:"${hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"${hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,appName:"App Studio Player",label:e.NLS_openLinkInApp},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,appName:"Collector",label:e.NLS_openLinkInApp},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,appName:"Explorer",label:e.NLS_openLinkInApp},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,appName:"Navigator",label:e.NLS_openLinkInApp},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,
appName:"Survey123",label:e.NLS_openLinkInApp},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,appName:"Trek2There",label:e.NLS_openLinkInApp},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,appName:"Workforce",label:e.NLS_openLinkInApp},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,appName:"iForm",label:e.NLS_openLinkInApp},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,appName:"FlowFinity",label:e.NLS_openLinkInApp},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,appName:"Laserfische",label:e.NLS_openLinkInApp},
{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,appName:"Microsoft Power BI",label:e.NLS_openLinkInApp}],_findURIInfo:function(a){var b;c.some(this._supportedURIInfos,function(f){f.pattern.test(a)&&(b=f);return!!b});return b},_createLinkIfURI:function(a){var b=this._findURIInfo(a);if(b){var f=a.match(b.pattern);return a.replace(b.pattern,"\x3ca target\x3d'_blank' href\x3d'$1' title\x3d'$1'\x3e"+d.substitute({appName:b.appName,hierPart:f&&f[2]},b.label)+"\x3c/a\x3e")}return a},_showStatus:function(b){g.set(this._status,
"innerHTML",b);w.remove(this._status,"hidden");a.query(".mainSection",this.domNode).addClass("hidden")},_hideStatus:function(){g.set(this._status,"innerHTML","");w.add(this._status,"hidden");a.query(".mainSection",this.domNode).removeClass("hidden")},_handleComponentsSuccess:function(b){if(b){this._hideStatus();var d=this.showTitle?b.title:"",f=b.description,m=b.fields,r=b.mediaInfos,t=this.domNode,u=this._nls,h=this,y=this.template,p=this.graphic;this._prevMedia.title=u.NLS_prevMedia;this._nextMedia.title=
u.NLS_nextMedia;g.set(this._title,"innerHTML",d);d||w.add(this._title,"hidden");!b.hasDescription&&m&&(f="",c.forEach(m,function(a){f+="\x3ctr valign\x3d'top'\x3e";f+="\x3ctd class\x3d'attrName'\x3e"+z.encode(a[0])+"\x3c/td\x3e";f+="\x3ctd class\x3d'attrValue'\x3e"+this._createLinkIfURI(a[1])+"\x3c/td\x3e";f+="\x3c/tr\x3e"},this),f&&(f="\x3ctable class\x3d'attrTable' cellpadding\x3d'0px' cellspacing\x3d'0px'\x3e"+f+"\x3c/table\x3e"));g.set(this._description,"innerHTML",f);f||w.add(this._description,
"hidden");a.query("a",this._description).forEach(function(a){h._preventNewTab(a.href)?"_blank"===a.target&&g.remove(a,"target"):g.set(a,"target","_blank")});d&&f?a.query(".mainSection .hzLine",t).removeClass("hidden"):d||f?a.query(".mainSection .hzLine",t).addClass("hidden"):a.query(".mainSection",t).addClass("hidden");if(d=this._attachmentsDfd=y.getAttachments(p))d.addBoth(v.hitch(this,this._attListHandler,d)),g.set(this._attachmentsList,"innerHTML","\x3cli\x3e"+u.NLS_searching+"...\x3c/li\x3e"),
a.query(".attachmentsSection",t).removeClass("hidden");r&&r.length&&(a.query(".mediaSection",t).removeClass("hidden"),l.setSelectable(this._mediaFrame,!1),this._mediaInfos=r,this._mediaPtr=0,this._updateUI(),this._displayMedia());b.editSummary&&(g.set(this._editSummary,"innerHTML",b.editSummary),r&&r.length&&w.remove(this._mediaBreak,"hidden"),w.remove(this._editSummarySection,"hidden"));this.emit("content-update")}else this._showStatus(e.NLS_noInfo)},_handleComponentsError:function(a){a&&"cancel"===
a.dojoType||(console.log("PopupRenderer: error loading template",a),this._showStatus(e.NLS_noInfo))}});x("extend-esri")&&v.setObject("dijit._PopupRenderer",h,G);return h})},"dijit/_Widget":function(){define("dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/has dojo/_base/kernel dojo/_base/lang dojo/query dojo/ready ./registry ./_WidgetBase ./_OnDijitClickMixin ./_FocusMixin dojo/uacss ./hccss".split(" "),function(k,h,q,v,c,a,x,p,l,g,w,C,u){function z(){}function B(a){return function(c,
d,m,g){return c&&"string"==typeof d&&c[d]==z?c.on(d.substring(2).toLowerCase(),x.hitch(m,g)):a.apply(q,arguments)}}k.around(q,"connect",B);a.connect&&k.around(a,"connect",B);k=v("dijit._Widget",[w,C,u],{onClick:z,onDblClick:z,onKeyDown:z,onKeyPress:z,onKeyUp:z,onMouseDown:z,onMouseMove:z,onMouseOut:z,onMouseOver:z,onMouseLeave:z,onMouseEnter:z,onMouseUp:z,constructor:function(a){this._toConnect={};for(var c in a)this[c]===z&&(this._toConnect[c.replace(/^on/,"").toLowerCase()]=a[c],delete a[c])},postCreate:function(){this.inherited(arguments);
for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},on:function(a,c){return this[this._onMap(a)]===z?q.connect(this.domNode,a.toLowerCase(),this,c):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(c,g){a.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(c,g)},attr:function(a,c){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,
arguments):this.get(a)},getDescendants:function(){a.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?p("[widgetId]",this.containerNode).map(g.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});c("dijit-legacy-requires")&&l(0,function(){require(["dijit/_base"])});return k})},"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),
function(k,h,q,v,c,a,x,p,l,g,w,C,u,z,B,D,G,d,m,t,y,b,e){function A(a){return function(b){p[b?"set":"remove"](this.domNode,a,b);this._set(a,b)}}u.add("dijit-legacy-requires",!z.isAsync);u.add("dojo-bidi",!1);u("dijit-legacy-requires")&&G(0,function(){k(["dijit/_base/manager"])});var r={};v=a("dijit._WidgetBase",[d,y],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:A("lang"),dir:"",_setDirAttr:A("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",
baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",a)},attributeMap:{},_blankGif:v.blankGif||k.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var b=a.prototype,d=a._setterAttrs=[],a=a._onMap={},e;for(e in b.attributeMap)d.push(e);for(e in b)/^on/.test(e)&&(a[e.substring(2).toLowerCase()]=e),/^_set[A-Z](.*)Attr$/.test(e)&&(e=e.charAt(4).toLowerCase()+
e.substr(5,e.length-9),b.attributeMap&&e in b.attributeMap||d.push(e))}},postscript:function(a,b){this.create(a,b)},create:function(a,b){this._introspect();this.srcNodeRef=x.byId(b);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,B.mixin(this,a));this.postMixInProperties();this.id||(this.id=e.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=
this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=t.body(this.ownerDocument);e.add(this);this.buildRendering();var f;if(this.domNode){this._applyAttributes();var d=this.srcNodeRef;d&&d.parentNode&&this.domNode!==d&&(d.parentNode.replaceChild(this.domNode,d),f=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();f&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},b;for(b in this.params||{})a[b]=this._get(b);
h.forEach(this.constructor._setterAttrs,function(b){if(!(b in a)){var f=this._get(b);f&&this.set(b,f)}},this);for(b in a)this.set(b,a[b])},postMixInProperties:function(){},buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(h.map(a,function(a){return a+"Rtl"})));l.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=
!0,h.forEach(this.getChildren(),function(a){a._started||a._destroyed||!B.isFunction(a.startup)||(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function b(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a)}this._beingDestroyed=!0;this.uninitialize();h.forEach(this._connects,B.hitch(this,"disconnect"));h.forEach(this._supportingWidgets,b);this.domNode&&h.forEach(e.findWidgets(this.domNode,
this.containerNode),b);this.destroyRendering(a);e.remove(this.id);this._destroyed=!0},destroyRendering:function(a){this.bgIframe&&(this.bgIframe.destroy(a),delete this.bgIframe);this.domNode&&(a?p.remove(this.domNode,"widgetId"):g.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||g.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){h.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var b=
this.domNode;B.isObject(a)?C.set(b,a):b.style.cssText=b.style.cssText?b.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,b,d){d=3<=arguments.length?d:this.attributeMap[a];h.forEach(B.isArray(d)?d:[d],function(d){var f=this[d.node||d||"domNode"];switch(d.type||"attribute"){case "attribute":B.isFunction(b)&&(b=B.hitch(this,b));d=d.attribute?d.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;f.tagName?p.set(f,d,b):f.set(d,b);break;case "innerText":f.innerHTML="";f.appendChild(this.ownerDocument.createTextNode(b));
break;case "innerHTML":f.innerHTML=b;break;case "class":l.replace(f,b,this[a]);break;case "toggleClass":l.toggle(f,d.className||a,b)}},this)},get:function(a){var b=this._getAttrNames(a);return this[b.g]?this[b.g]():this._get(a)},set:function(a,b){if("object"===typeof a){for(var d in a)this.set(d,a[d]);return this}d=this._getAttrNames(a);var f=this[d.s];if(B.isFunction(f))var e=f.apply(this,Array.prototype.slice.call(arguments,1));else{var f=this.focusNode&&!B.isFunction(this.focusNode)?"focusNode":
"domNode",n=this[f]&&this[f].tagName,c;if((c=n)&&!(c=r[n])){c=this[f];var m={},g;for(g in c)m[g.toLowerCase()]=!0;c=r[n]=m}g=c;d=a in this.attributeMap?this.attributeMap[a]:d.s in this?this[d.s]:g&&d.l in g&&"function"!=typeof b||/^aria-|^data-|^role$/.test(a)?f:null;null!=d&&this._attrToDom(a,b,d);this._set(a,b)}return e||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var d=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});
return b[a]={n:a+"Node",s:"_set"+d+"Attr",g:"_get"+d+"Attr",l:d.toLowerCase()}},_set:function(a,b){var d=this[a];this[a]=b;!this._created||d===b||d!==d&&b!==b||(this._watchCallbacks&&this._watchCallbacks(a,d,b),this.emit("attrmodified-"+a,{detail:{prevValue:d,newValue:b}}))},_get:function(a){return this[a]},emit:function(a,b,d){b=b||{};void 0===b.bubbles&&(b.bubbles=!0);void 0===b.cancelable&&(b.cancelable=!0);b.detail||(b.detail={});b.detail.widget=this;var f,e=this["on"+a];e&&(f=e.apply(this,d?
d:[b]));this._started&&!this._beingDestroyed&&D.emit(this.domNode,a.toLowerCase(),b);return f},on:function(a,b){var d=this._onMap(a);return d?q.after(this,d,b,!0):this.own(D(this.domNode,a,b))[0]},_onMap:function(a){var b=this.constructor,d=b._onMap;if(!d){var d=b._onMap={},e;for(e in b.prototype)/^on/.test(e)&&(d[e.replace(/^on/,"").toLowerCase()]=e)}return d["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?
e.findWidgets(this.containerNode):[]},getParent:function(){return e.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,b,d){return this.own(c.connect(a,b,this,d))[0]},disconnect:function(a){a.remove()},subscribe:function(a,b){return this.own(m.subscribe(a,B.hitch(this,b)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():w.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=C.get(this.domNode,"display")},
placeAt:function(a,b){var d=!a.tagName&&e.byId(a);!d||!d.addChild||b&&"number"!==typeof b?(d=d&&"domNode"in d?d.containerNode&&!/after|before|replace/.test(b||"")?d.containerNode:d.domNode:x.byId(a,this.ownerDocument),g.place(this.domNode,d,b),!this._started&&(this.getParent()||{})._started&&this.startup()):d.addChild(this,b);return this},defer:function(a,b){var d=setTimeout(B.hitch(this,function(){d&&(d=null,this._destroyed||B.hitch(this,a)())}),b||0);return{remove:function(){d&&(clearTimeout(d),
d=null);return null}}}});u("dojo-bidi")&&v.extend(b);return v})},"dijit/Destroyable":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(k,h,q){return q("dijit.Destroyable",null,{destroy:function(h){this._destroyed=!0},own:function(){var q=["destroyRecursive","destroy","remove"];k.forEach(arguments,function(c){function a(){p.remove();k.forEach(l,function(a){a.remove()})}var v,p=h.before(this,"destroy",function(a){c[v](a)}),l=[];c.then?(v="cancel",c.then(a,a)):k.forEach(q,
function(g){"function"===typeof c[g]&&(v||(v=g),l.push(h.after(c,g,a,!0)))})},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),function(k,h,q,v,c,a){k=v("dijit._OnDijitClickMixin",null,{connect:function(c,h,l){return this.inherited(arguments,[c,"ondijitclick"==h?a:h,l])}});k.a11yclick=a;return k})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],
function(k,h,q,v){v.extend(h,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});return q("dijit._FocusMixin",null,{_focusManager:k})})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(k,h,q,v){q(function(){h("highcontrast")&&k.add(v.body(),"dijit_a11y")});return h})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),
function(k,h,q,v,c,a,x){c.add("highcontrast",function(){var a=x.doc.createElement("div");try{a.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+(h.blankGif||k.toUrl("./resources/blank.gif"))+'");';x.body().appendChild(a);var l=v.getComputedStyle(a),g=l.backgroundImage;return l.borderTopColor==l.borderRightColor||g&&("none"==g||"url(invalid-url:)"==g)}catch(w){return console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: "+
w.toString()),!1}finally{8>=c("ie")?a.outerHTML="":x.body().removeChild(a)}});a(function(){c("highcontrast")&&q.add(x.body(),"dj_a11y")});return c})},"dijit/_Templated":function(){define("./_WidgetBase ./_TemplatedMixin ./_WidgetsInTemplateMixin dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/_base/kernel".split(" "),function(k,h,q,v,c,a,x){a.extend(k,{waiRole:"",waiState:""});return c("dijit._Templated",[h,q],{constructor:function(){x.deprecated(this.declaredClass+": dijit._Templated deprecated, use dijit._TemplatedMixin and if necessary dijit._WidgetsInTemplateMixin",
"","2.0")},_processNode:function(a,c){var g=this.inherited(arguments),h=c(a,"waiRole");h&&a.setAttribute("role",h);(h=c(a,"waiState"))&&v.forEach(h.split(/\s*,\s*/),function(c){-1!=c.indexOf("-")&&(c=c.split("-"),a.setAttribute("aria-"+c[0],c[1]))});return g}})})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(k,h,q,v,c,a,x,p){var l=h("dijit._TemplatedMixin",p,{templateString:null,
templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var c=this.declaredClass,g=this;return x.substitute(a,this,function(a,h){"!"==h.charAt(0)&&(a=v.getObject(h.substr(1),!1,g));if("undefined"==typeof a)throw Error(c+" template:"+h);return null==a?"":"!"==h.charAt(0)?a:this._escapeValue(""+a)},this)},_escapeValue:function(a){return a.replace(/["'<>&]/g,function(a){return{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[a]})},buildRendering:function(){if(!this._rendered){this.templateString||
(this.templateString=k(this.templatePath,{sanitize:!0}));var a=l.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),c;if(v.isString(a)){if(c=q.toDom(this._stringRepl(a),this.ownerDocument),1!=c.nodeType)throw Error("Invalid template: "+a);}else c=a.cloneNode(!0);this.domNode=c}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(a){var c=this.containerNode;if(a&&c)for(;a.hasChildNodes();)c.appendChild(a.firstChild)}});
l._templateCache={};l.getCachedTemplate=function(a,c,h){var g=l._templateCache,p=a,k=g[p];if(k){try{if(!k.ownerDocument||k.ownerDocument==(h||document))return k}catch(D){}q.destroy(k)}a=x.trim(a);if(c||a.match(/\$\{([^\}]+)\}/g))return g[p]=a;c=q.toDom(a,h);if(1!=c.nodeType)throw Error("Invalid template: "+a);return g[p]=c};a("ie")&&c(window,"unload",function(){var a=l._templateCache,c;for(c in a){var h=a[c];"object"==typeof h&&q.destroy(h);delete a[c]}});return l})},"dojo/cache":function(){define(["./_base/kernel",
"./text"],function(k){return k.cache})},"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(k,h,q,v,c,a,x,p,l){var g=c.delegate(p,{mouseenter:a.enter,mouseleave:a.leave,keypress:q._keypress}),w;q=v("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);
this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var c=a;;)if(1==c.nodeType&&(this._processTemplateNode(c,function(a,c){return a.getAttribute(c)},this._attach)||this.searchContainerNode)&&c.firstChild)c=c.firstChild;else{if(c==a)break;for(;!c.nextSibling;)if(c=c.parentNode,c==a)return;c=c.nextSibling}},_processTemplateNode:function(a,g,h){var l=!0,p=this.attachScope||this,k=g(a,"dojoAttachPoint")||g(a,"data-dojo-attach-point");if(k)for(var d=k.split(/\s*,\s*/);k=
d.shift();)c.isArray(p[k])?p[k].push(a):p[k]=a,l="containerNode"!=k,this._attachPoints.push(k);if(g=g(a,"dojoAttachEvent")||g(a,"data-dojo-attach-event"))for(k=g.split(/\s*,\s*/),d=c.trim;g=k.shift();)if(g){var m=null;-1!=g.indexOf(":")?(m=g.split(":"),g=d(m[0]),m=d(m[1])):g=d(g);m||(m=g);this._attachEvents.push(h(a,g,c.hitch(p,m)))}return l},_attach:function(a,c,h){c=c.replace(/^on/,"").toLowerCase();c="dijitclick"==c?w||(w=k("./a11yclick")):g[c]||c;return x(a,c,h)},_detachTemplateNodes:function(){var a=
this.attachScope||this;h.forEach(this._attachPoints,function(c){delete a[c]});this._attachPoints=[];h.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});c.extend(l,{dojoAttachEvent:"",dojoAttachPoint:""});return q})},"dijit/_WidgetsInTemplateMixin":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang","dojo/parser"],function(k,h,q,v,c){return q("dijit._WidgetsInTemplateMixin",
null,{_earlyTemplatedStartup:!1,contextRequire:null,_beforeFillContent:function(){if(/dojoType|data-dojo-type/i.test(this.domNode.innerHTML)){var a=this.domNode;this.containerNode&&!this.searchContainerNode&&(this.containerNode.stopParser=!0);c.parse(a,{noStart:!this._earlyTemplatedStartup,template:!0,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,contextRequire:this.contextRequire,scope:"dojo"}).then(v.hitch(this,function(a){this._startupWidgets=a;for(var c=0;c<a.length;c++)this._processTemplateNode(a[c],
function(a,c){return a[c]},function(a,c,h){return c in a?a.connect(a,c,h):a.on(c,h,!0)});this.containerNode&&this.containerNode.stopParser&&delete this.containerNode.stopParser}));if(!this._startupWidgets)throw Error(this.declaredClass+": parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");}},_processTemplateNode:function(a,c,h){return c(a,"dojoType")||c(a,"data-dojo-type")?
!0:this.inherited(arguments)},startup:function(){k.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this._startupWidgets=null;this.inherited(arguments)}})})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),function(k,h,q,v,c,a,x,p,l,g,w,C,u,z,B,D){function G(a){return eval("("+a+")")}function d(a){var b=
a._nameCaseMap,d=a.prototype;if(!b||b._extendCnt<t){var b=a._nameCaseMap={},c;for(c in d)"_"!==c.charAt(0)&&(b[c.toLowerCase()]=c);b._extendCnt=t}return b}function m(a,d){d||(d=k);var b=d._dojoParserCtorMap||(d._dojoParserCtorMap={}),e=a.join();if(!b[e]){for(var c=[],f=0,m=a.length;f<m;f++){var g=a[f];c[c.length]=b[g]=b[g]||q.getObject(g)||~g.indexOf("/")&&d(g)}f=c.shift();b[e]=c.length?f.createSubclass?f.createSubclass(c):f.extend.apply(f,c):f}return b[e]}new Date("X");var t=0;l.after(q,"extend",
function(){t++},!0);var y={_clearCache:function(){t++;_ctorMap={}},_functionFromScript:function(a,d){var b="",c="",e=a.getAttribute(d+"args")||a.getAttribute("args"),f=a.getAttribute("with"),e=(e||"").split(/\s*,\s*/);f&&f.length&&v.forEach(f.split(/\s*,\s*/),function(a){b+="with("+a+"){";c+="}"});return new Function(e,b+a.innerHTML+c)},instantiate:function(a,d,c){d=d||{};c=c||{};var b=(c.scope||h._scopeName)+"Type",e="data-"+(c.scope||h._scopeName)+"-",f=e+"type",m=e+"mixins",g=[];v.forEach(a,function(a){var c=
b in d?d[b]:a.getAttribute(f)||a.getAttribute(b);if(c){var e=a.getAttribute(m),c=e?[c].concat(e.split(/\s*,\s*/)):[c];g.push({node:a,types:c})}});return this._instantiate(g,d,c)},_instantiate:function(a,d,c,r){function b(a){d._started||c.noStart||v.forEach(a,function(a){"function"!==typeof a.startup||a._started||a.startup()});return a}a=v.map(a,function(a){var b=a.ctor||m(a.types,c.contextRequire);if(!b)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(b,
a.node,d,c,a.scripts,a.inherited)},this);return r?g(a).then(b):b(a)},construct:function(a,c,m,g,n,f){function b(a){C&&q.setObject(C,a);for(A=0;A<D.length;A++)l[D[A].advice||"after"](a,D[A].method,q.hitch(a,D[A].func),!0);for(A=0;A<K.length;A++)K[A].call(a);for(A=0;A<L.length;A++)a.watch(L[A].prop,L[A].func);for(A=0;A<M.length;A++)B(a,M[A].event,M[A].func);return a}var e=a&&a.prototype;g=g||{};var r={};g.defaults&&q.mixin(r,g.defaults);f&&q.mixin(r,f);var t;u("dom-attributes-explicit")?t=c.attributes:
u("dom-attributes-specified-flag")?t=v.filter(c.attributes,function(a){return a.specified}):(f=(/^input$|^img$/i.test(c.nodeName)?c:c.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),t=v.map(f.split(/\s+/),function(a){var b=a.toLowerCase();return{name:a,value:"LI"==c.nodeName&&"value"==a||"enctype"==b?c.getAttribute(b):c.getAttributeNode(b).value}}));var y=g.scope||h._scopeName;f="data-"+y+"-";var k={};"dojo"!==y&&(k[f+"props"]=
"data-dojo-props",k[f+"type"]="data-dojo-type",k[f+"mixins"]="data-dojo-mixins",k[y+"type"]="dojotype",k[f+"id"]="data-dojo-id");for(var A=0,x,y=[],C,H;x=t[A++];){var E=x.name,I=E.toLowerCase();x=x.value;switch(k[I]||I){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":H=x;break;case "data-dojo-id":case "jsid":C=x;break;case "data-dojo-attach-point":case "dojoattachpoint":r.dojoAttachPoint=x;break;case "data-dojo-attach-event":case "dojoattachevent":r.dojoAttachEvent=
x;break;case "class":r["class"]=c.className;break;case "style":r.style=c.style&&c.style.cssText;break;default:if(E in e||(E=d(a)[I]||E),E in e)switch(typeof e[E]){case "string":r[E]=x;break;case "number":r[E]=x.length?Number(x):NaN;break;case "boolean":r[E]="false"!=x.toLowerCase();break;case "function":""===x||-1!=x.search(/[^\w\.]+/i)?r[E]=new Function(x):r[E]=q.getObject(x,!1)||new Function(x);y.push(E);break;default:I=e[E],r[E]=I&&"length"in I?x?x.split(/\s*,\s*/):[]:I instanceof Date?""==x?new Date(""):
"now"==x?new Date:w.fromISOString(x):I instanceof p?h.baseUrl+x:G(x)}else r[E]=x}}for(t=0;t<y.length;t++)k=y[t].toLowerCase(),c.removeAttribute(k),c[k]=null;if(H)try{H=G.call(g.propsThis,"{"+H+"}"),q.mixin(r,H)}catch(N){throw Error(N.toString()+" in data-dojo-props\x3d'"+H+"'");}q.mixin(r,m);n||(n=a&&(a._noScript||e._noScript)?[]:z("\x3e script[type^\x3d'dojo/']",c));var D=[],K=[],L=[],M=[];if(n)for(A=0;A<n.length;A++)k=n[A],c.removeChild(k),m=k.getAttribute(f+"event")||k.getAttribute("event"),g=
k.getAttribute(f+"prop"),H=k.getAttribute(f+"method"),y=k.getAttribute(f+"advice"),t=k.getAttribute("type"),k=this._functionFromScript(k,f),m?"dojo/connect"==t?D.push({method:m,func:k}):"dojo/on"==t?M.push({event:m,func:k}):r[m]=k:"dojo/aspect"==t?D.push({method:H,advice:y,func:k}):"dojo/watch"==t?L.push({prop:g,func:k}):K.push(k);a=(n=a.markupFactory||e.markupFactory)?n(r,c,a):new a(r,c);return a.then?a.then(b):b(a)},scan:function(a,d){function b(a){if(!a.inherited){a.inherited={};var d=a.node,c=
b(a.parent),d={dir:d.getAttribute("dir")||c.dir,lang:d.getAttribute("lang")||c.lang,textDir:d.getAttribute(l)||c.textDir},f;for(f in d)d[f]&&(a.inherited[f]=d[f])}return a.inherited}var c=[],e=[],f={},g=(d.scope||h._scopeName)+"Type",t="data-"+(d.scope||h._scopeName)+"-",y=t+"type",l=t+"textdir",t=t+"mixins",p=a.firstChild,q=d.inherited;if(!q){var x=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&x(a.parentNode,b)},q={dir:x(a,"dir"),lang:x(a,"lang"),textDir:x(a,l)},w;for(w in q)q[w]||
delete q[w]}for(var q={inherited:q},z,B;;)if(p)if(1!=p.nodeType)p=p.nextSibling;else if(z&&"script"==p.nodeName.toLowerCase())(E=p.getAttribute("type"))&&/^dojo\/\w/i.test(E)&&z.push(p),p=p.nextSibling;else if(B)p=p.nextSibling;else{var E=p.getAttribute(y)||p.getAttribute(g);w=p.firstChild;if(E||w&&(3!=w.nodeType||w.nextSibling)){B=null;if(E){var D=p.getAttribute(t);z=D?[E].concat(D.split(/\s*,\s*/)):[E];try{B=m(z,d.contextRequire)}catch(K){}B||v.forEach(z,function(a){~a.indexOf("/")&&!f[a]&&(f[a]=
!0,e[e.length]=a)});D=B&&!B.prototype._noScript?[]:null;q={types:z,ctor:B,parent:q,node:p,scripts:D};q.inherited=b(q);c.push(q)}else q={node:p,scripts:z,parent:q};z=D;B=p.stopParser||B&&B.prototype.stopParser&&!d.template;p=w}else p=p.nextSibling}else{if(!q||!q.node)break;p=q.node.nextSibling;B=!1;q=q.parent;z=q.scripts}var G=new C;e.length?(u("dojo-debug-messages")&&console.warn("WARNING: Modules being Auto-Required: "+e.join(", ")),(d.contextRequire||k)(e,function(){G.resolve(v.filter(c,function(a){if(!a.ctor)try{a.ctor=
m(a.types,d.contextRequire)}catch(N){}for(var b=a.parent;b&&!b.types;)b=b.parent;var c=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(c&&c.stopParser&&!d.template);a.instantiate=!b||b.instantiate&&b.instantiateChildren;return a.instantiate}))})):G.resolve(c);return G.promise},_require:function(a,d){var b=G("{"+a.innerHTML+"}"),c=[],e=[],f=new C,m=d&&d.contextRequire||k,g;for(g in b)c.push(g),e.push(b[g]);m(e,function(){for(var a=0;a<c.length;a++)q.setObject(c[a],arguments[a]);f.resolve(arguments)});
return f.promise},_scanAmd:function(a,d){var b=new C,c=b.promise;b.resolve(!0);var e=this;z("script[type\x3d'dojo/require']",a).forEach(function(a){c=c.then(function(){return e._require(a,d)});a.parentNode.removeChild(a)});return c},parse:function(b,d){!b||"string"==typeof b||"nodeType"in b||(d=b,b=d.rootNode);var c=b?a.byId(b):x.body();d=d||{};var e=d.template?{template:!0}:{},m=[],f=this,g=this._scanAmd(c,d).then(function(){return f.scan(c,d)}).then(function(a){return f._instantiate(a,e,d,!0)}).then(function(a){return m=
m.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});q.mixin(m,g);return m}};h.parser=y;c.parseOnLoad&&D(100,y,"parse");return y})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(k,h){var q={};k.setObject("dojo.date.stamp",q);q.fromISOString=function(k,c){q._isoRegExp||(q._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);var a=q._isoRegExp.exec(k),x=null;
if(a){a.shift();a[1]&&a[1]--;a[6]&&(a[6]*=1E3);c&&(c=new Date(c),h.forEach(h.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(a){return c["get"+a]()}),function(c,h){a[h]=a[h]||c}));x=new Date(a[0]||1970,a[1]||0,a[2]||1,a[3]||0,a[4]||0,a[5]||0,a[6]||0);100>a[0]&&x.setFullYear(a[0]||1970);var p=0,l=a[7]&&a[7].charAt(0);"Z"!=l&&(p=60*(a[8]||0)+(Number(a[9])||0),"-"!=l&&(p*=-1));l&&(p-=x.getTimezoneOffset());p&&x.setTime(x.getTime()+6E4*p)}return x};q.toISOString=function(h,
c){var a=function(a){return 10>a?"0"+a:a};c=c||{};var k=[],p=c.zulu?"getUTC":"get",l="";"time"!=c.selector&&(l=h[p+"FullYear"](),l=["0000".substr((l+"").length)+l,a(h[p+"Month"]()+1),a(h[p+"Date"]())].join("-"));k.push(l);if("date"!=c.selector){l=[a(h[p+"Hours"]()),a(h[p+"Minutes"]()),a(h[p+"Seconds"]())].join(":");p=h[p+"Milliseconds"]();c.milliseconds&&(l+="."+(100>p?"0":"")+a(p));if(c.zulu)l+="Z";else if("time"!=c.selector)var p=h.getTimezoneOffset(),g=Math.abs(p),l=l+((0<p?"-":"+")+a(Math.floor(g/
60))+":"+a(g%60));k.push(l)}return k.join("T")};return q})},"esri/dijit/_EventedWidget":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on ../Evented dijit/_WidgetBase".split(" "),function(k,h,q,v,c,a){return k([a,c],{_onMap:function(a){var c=this.constructor._onMap,h;c&&c.FINAL||(delete this.constructor._onMap,c=this.registerConnectEvents(),c.FINAL=!0);a=a.toLowerCase();c[a]?h=this[c[a].method]:(a=this._onCamelCase(a),this[a]&&(h=a));return h},on:function(a,c){var h=this._onMap(a),
g=a.replace(/\-/g,""),k="on"+g in this.domNode;return h||!k?this.inherited(arguments):this.own(v(this.domNode,g,c))[0]},emit:function(a,c,k){var g,p,l,q=a.toLowerCase(),v=this.constructor._onMap||this.registerConnectEvents();p=this[this._onMap(q)];c=c||{};c.target||(c.target=this);p&&v&&v[q]&&(this._onObj2Arr(function(){g=Array.prototype.slice.call(arguments)},v[q].argKeys)(c),l=h.mixin({},arguments),l[2]=g,l[0]=v[q].name.replace(/^on/,""));return this.inherited(l||arguments)}})})},"esri/layers/WMSLayerInfo":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/_base/array","dojo/has","../kernel"],function(k,h,q,v,c){k=k(null,{declaredClass:"esri.layers.WMSLayerInfo",name:null,title:null,description:null,extent:null,legendURL:null,subLayers:[],allExtents:[],spatialReferences:[],queryable:!1,showPopup:!1,constructor:function(a){a&&(this.name=a.name,this.title=a.title,this.description=a.description,this.extent=a.extent,this.legendURL=a.legendURL,this.subLayers=a.subLayers?a.subLayers:[],this.allExtents=a.allExtents?a.allExtents:[],
this.spatialReferences=a.spatialReferences?a.spatialReferences:[],this.queryable=!!a.queryable,this.showPopup=!!a.showPopup)},clone:function(){var a={name:this.name,title:this.title,description:this.description,legendURL:this.legendURL},c;this.extent&&(a.extent=this.extent.getExtent());a.subLayers=[];q.forEach(this.subLayers,function(c){a.subLayers.push(c.clone())});a.allExtents=[];for(c in this.allExtents)c=parseInt(c,10),isNaN(c)||(a.allExtents[c]=this.allExtents[c].getExtent());a.spatialReferences=
[];q.forEach(this.spatialReferences,function(c){a.spatialReferences.push(c)});a.queryable=this.queryable;a.showPopup=this.showPopup;return a}});v("extend-esri")&&h.setObject("layers.WMSLayerInfo",k,c);return k})},"*noref":1}});
define("esri/layers/WMSLayer","require dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/sniff ../config ../graphic ../kernel ../request ../urlUtils ../dijit/PopupTemplate ../SpatialReference ../geometry/Extent ../geometry/Point ./DynamicMapServiceLayer ./WMSLayerInfo dojo/query".split(" "),function(k,h,q,v,c,a,x,p,l,g,w,C,u,z,B,D,G){q=q([D],{declaredClass:"esri.layers.WMSLayer",_CRS_TO_EPSG:{84:4326,83:4269,27:4267},_REVERSED_LAT_LONG_RANGES:[[4001,4999],[2044,2045],[2081,
2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3416,3416],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,
27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]],_WEB_MERCATOR:[102100,3857,102113,900913],_WORLD_MERCATOR:[3395,54004],allExtents:[],version:null,constructor:function(a,c){var d=w.urlToObject(a);d.query&&(d.query.version||d.query.Version||d.query.VERSION)&&(this.version=d.query.version||d.query.Version||d.query.VERSION);this.url=a=this._stripParameters(a,"version service request bbox format height width layers srs crs styles transparent bgcolor exceptions time elevation sld wfs".split(" "));
this._url=w.urlToObject(a);this._getCapabilitiesURL=a;this._initLayer=v.hitch(this,this._initLayer);this._parseCapabilities=v.hitch(this,this._parseCapabilities);this._getCapabilitiesError=v.hitch(this,this._getCapabilitiesError);c?(this.customParameters=c.customParameters,this.customLayerParameters=c.customLayerParameters,this.imageFormat=this._getImageFormat(c.format),this.imageTransparency=!1!==c.transparent,this.visibleLayers=c.visibleLayers?c.visibleLayers:[],this.version=c.version||this.version,
c.resourceInfo?this._readResourceInfo(c.resourceInfo):this._getCapabilities()):(this.imageFormat="image/png",this.imageTransparency=!0,this.visibleLayers=[],this._getCapabilities());this._blankImageURL=k.toUrl("../images/pixel.png");this.extentProcessor=this._createExtentProcessor(0);this._createChildLayer()},setVisibleLayers:function(a){this.visibleLayers=(a=this._checkVisibleLayersList(a))?a:[];this.refresh(!0)},setImageFormat:function(a){this.imageFormat=this._getImageFormat(a);this.refresh(!0)},
setImageTransparency:function(a){this.imageTransparency=a;this.refresh(!0)},setCustomParameters:function(a,c){this.customParameters=a;this.customLayerParameters=c;this.refresh(!0)},refresh:function(){this.inherited(arguments);this._childLayer&&this._childLayer.refresh.apply(this._childLayer,arguments)},getImageUrl:function(a,c,g,h){if(this.visibleLayers&&0!==this.visibleLayers.length){a=this._getImageParams(a,c,g);a=this._mixinCustomLayerParameters(a);c=this.getMapURL;var b;c+=-1===c.indexOf("?")?
"?":"";for(b in a)a.hasOwnProperty(b)&&(c+="?"===c.substring(c.length-1,c.length)?"":"\x26",c+=b+"\x3d"+a[b]);h(w.addProxy(c))}else h(this._blankImageURL)},_setMap:function(a,c,g){var d=this.inherited(arguments);a.wrapAround180?this._childLayer&&(this.suspended&&this._childLayer.suspend(),this._childLayer._setMap(a,d)):this._childLayer=this.extentProcessor=null;return d},_unsetMap:function(a,c){this._childLayer&&this._childLayer._unsetMap(a,this._div);this.inherited(arguments)},onSuspend:function(){this.inherited(arguments);
this._childLayer&&this._childLayer.suspend()},onResume:function(){this.inherited(arguments);this._childLayer&&this._childLayer.resume()},_createChildLayer:function(){this._childLayer=new D(null,{extentProcessor:this._createExtentProcessor(1)});this._childLayer._isChildLayer=!0;this._childLayer.getImageUrl=v.hitch(this,this.getImageUrl);this._childLayer.loaded=!0},_createExtentProcessor:function(a){return v.hitch(this,this._extentProcessor,a)},_extentProcessor:function(a,c){var d=c.extent,g=c.width,
b=0;if(d){var e=d.getWidth()/g,m=d.bisect(),d=m.extents,h=d[a];h&&(g=m.marginLeft/e,b=0===a?g:g+d[0].getWidth()/e,g=Math.ceil(h.getWidth()/e),b=Math.ceil(b));d=h}return{extent:d,width:g,marginLeft:b}},_getImageParams:function(a,g,h){var d=a.spatialReference.wkid;-1===c.indexOf(this.spatialReferences,d)&&a.spatialReference.latestWkid&&(d=a.spatialReference.latestWkid);if(c.some(this._WEB_MERCATOR,function(a){return a==d})){var b=c.filter(this.spatialReferences,function(a){return c.some(this._WEB_MERCATOR,
function(b){return b==a})},this);0===b.length&&(b=c.filter(this.spatialReferences,function(a){return c.some(this._WORLD_MERCATOR,function(b){return b==a})},this));d=0<b.length?b[0]:this._WEB_MERCATOR[0]}this.spatialReferences=c.filter(this.spatialReferences,function(a){return a!==d});this.spatialReferences.unshift(d);var b=a.xmin,e=a.xmax,m=a.ymin;a=a.ymax;var r={SERVICE:"WMS",REQUEST:"GetMap"};r.FORMAT=this.imageFormat;r.TRANSPARENT=this.imageTransparency?"TRUE":"FALSE";r.STYLES="";r.VERSION=this.version;
r.LAYERS=this.visibleLayers?this.visibleLayers.toString():null;r.WIDTH=g;r.HEIGHT=h;this.maxWidth<g&&(r.WIDTH=this.maxWidth);this.maxHeight<h&&(r.HEIGHT=this.maxHeight);g=d?d:NaN;isNaN(g)||("1.3.0"==this.version?r.CRS="EPSG:"+g:r.SRS="EPSG:"+g);"1.3.0"==this.version&&this._useLatLong(g)?r.BBOX=m+","+b+","+a+","+e:r.BBOX=b+","+m+","+e+","+a;return r},_initLayer:function(d,c){this.spatialReference=new u(this.extent.spatialReference);this.initialExtent=new z(this.extent);this.fullExtent=new z(this.extent);
this.visibleLayers=this._checkVisibleLayersList(this.visibleLayers);var h=v.hitch(this,function(){this.loaded=!0;this.onLoad(this);var a=this._loadCallback;a&&(delete this._loadCallback,a(this))});if(a("chrome")){var m=x.defaults.io,b="with-credentials"===m.useCors?w.canUseXhr(this.getMapURL,!0):-1;(m=-1<b?m.corsEnabledServers[b]:null)&&m.withCredentials?g({url:this.getMapURL,handleAs:"text",content:{SERVICE:"WMS",REQUEST:"GetMap"}}).addBoth(function(){h()}):h()}else h()},_readResourceInfo:function(a){a.extent?
a.layerInfos?(this.extent=a.extent,this.allExtents[0]=a.extent,this.layerInfos=a.layerInfos,this.description=a.description?a.description:"",this.copyright=a.copyright?a.copyright:"",this.title=a.title?a.title:"",this.getMapURL=a.getMapURL?a.getMapURL:this._getCapabilitiesURL,this.getFeatureInfoURL=a.getFeatureInfoURL,this.featureInfoFormat=a.featureInfoFormat,this.version=a.version?a.version:"1.3.0",this.maxWidth=a.maxWidth?a.maxWidth:5E3,this.maxHeight=a.maxHeight?a.maxHeight:5E3,this.spatialReferences=
a.spatialReferences?a.spatialReferences:[],this.imageFormat=this._getImageFormat(a.format),this.setScaleRange(a.minScale,a.maxScale),this.customLayerParameters=a.customLayerParameters||this.customLayerParameters,this.customParameters=a.customParameters||this.customParameters,this._initLayer()):this._errorHandler(Error("esri.layers.WMSLayer: unable to find the 'layerInfos' property in resourceInfo")):this._errorHandler(Error("esri.layers.WMSLayer: Unable to find the 'extent' property in resourceInfo."))},
_getCapabilities:function(){var a=this._url.query?this._url.query:{};a.SERVICE="WMS";a.REQUEST="GetCapabilities";this.version&&(a.VERSION=this.version);var a=this._mixinCustomParameters(a),c=this._url.path+"?",h;for(h in a)a.hasOwnProperty(h)&&(c+="?"==c.substring(c.length-1,c.length)?"":"\x26",c+=h+"\x3d"+a[h]);g({url:c,handleAs:"xml",headers:{"Content-Type":null},load:this._parseCapabilities,error:this._getCapabilitiesError},{usePost:!1})},_parseCapabilities:function(a){if(a){var d=this;this.version=
this._getAttributeValue("WMS_Capabilities","version",a,null);this.version||(this.version=this._getAttributeValue("WMT_MS_Capabilities","version",a,"1.3.0"));var g=this._getTag("Service",a);this.title=this._getTagValue("Title",g,"");this.title||(this.title=this._getTagValue("Name",g,""));this.copyright=this._getTagValue("AccessConstraints",g,"");this.description=this._getTagValue("Abstract",g,"");this.maxWidth=parseInt(this._getTagValue("MaxWidth",g,5E3),10);this.maxHeight=parseInt(this._getTagValue("MaxHeight",
g,5E3),10);if(g=this._getTag("Layer",a)){var k=this._getLayerInfo(g),b=0,e=null,g=this._getTag("Capability",a);c.forEach(g.childNodes,function(a){"Layer"==a.nodeName&&(0===b?e=a:(1===b&&k.name&&(k.name="",k.subLayers=[],k.subLayers.push(this._getLayerInfo(e))),k.subLayers.push(this._getLayerInfo(a))),b++)},this);if(k&&(this.layerInfos=k.subLayers,this.layerInfos&&0!==this.layerInfos.length||(this.layerInfos=[k]),this.extent=k.extent,this.extent||(k.extent=new z(this.layerInfos[0].extent.toJson()),
this.extent=k.extent),this.allExtents=k.allExtents,this.allExtents&&this.allExtents.length||(k.allExtents=[],c.forEach(this.layerInfos[0].allExtents,function(a,b){a&&(k.allExtents[b]=new z(a.toJson()))}),this.allExtents=k.allExtents),this.spatialReferences=k.spatialReferences,!this.spatialReferences.length&&0<this.layerInfos.length))for(var l=function(a){var b;for(b=0;b<a.subLayers.length;b++){var c=a.subLayers[b],d=c.spatialReferences;!d.length&&c.subLayers&&0<c.subLayers.length&&(d=l(c));if(d.length)return d}return[]},
g=0;g<this.layerInfos.length;g++){var r=this.layerInfos[g];this.spatialReferences=this.layerInfos[0].spatialReferences;!this.spatialReferences.length&&r.subLayers&&0<r.subLayers.length&&(this.spatialReferences=l(r));if(this.spatialReferences.length)break}g=function(b){return(b=h.query("DCPType",d._getTag(b,a)))&&0<b.length&&(b=h.query("HTTP",b[0]))&&0<b.length&&(b=h.query("Get",b[0]))&&0<b.length&&(b=d._getAttributeValue("OnlineResource","xlink:href",b[0],null))?(b.indexOf("\x26")===b.length-1&&(b=
b.substring(0,b.length-1)),d._stripParameters(b,["service","request"])):null};r=function(b){var f=[];0===h.query("Operation",a).length?c.forEach(h.query("Format",d._getTag(b,a)),function(a){f.push(a.text?a.text:a.textContent)}):c.forEach(h.query("Operation",a),function(a){a.getAttribute("name")===b&&c.forEach(h.query("Format",a),function(a){f.push(a.text?a.text:a.textContent)})});return f};this.getMapURL=g("GetMap")||this._getCapabilitiesURL;this.getMapFormats=r("GetMap");c.some(this.getMapFormats,
function(a){return-1<a.indexOf(this.imageFormat)},this)||(this.imageFormat=this.getMapFormats[0]);if(this.getFeatureInfoURL=g("GetFeatureInfo"))this.getFeatureInfoFormats=r("GetFeatureInfo"),-1<c.indexOf(this.getFeatureInfoFormats,"text/html")?this.featureInfoFormat="text/html":-1<c.indexOf(this.getFeatureInfoFormats,"text/plain")&&(this.featureInfoFormat="text/plain");if(!this.featureInfoFormat){var n=function(a){if(a&&(a.queryable=!1,a.subLayers))for(var b=0;b<a.subLayers.length;b++)n(a.subLayers[b])};
n(k)}this._initLayer()}else this._errorHandler(Error("esri.layers.WMSLayer: Response does not contain any layers."))}else this._errorHandler(Error("GetCapabilities request for "+this._getCapabilitiesURL+" failed. (Response is null.)"))},_getCapabilitiesError:function(a){a&&a.message&&(a.message="GetCapabilities request for "+this._getCapabilitiesURL+" failed. ("+a.message+")");this._errorHandler(a)},_getLayerInfo:function(a){if(!a)return null;var d=new G;d.name="";d.title="";d.description="";d.allExtents=
[];d.spatialReferences=[];d.queryable="1"===a.getAttribute("queryable");d.subLayers=[];var g=this._getTag("LatLonBoundingBox",a);g&&(d.allExtents[0]=this._getExtent(g,4326));var h=this._getTag("EX_GeographicBoundingBox",a),b;h&&(b=new z(0,0,0,0,new u({wkid:4326})),b.xmin=parseFloat(this._getTagValue("westBoundLongitude",h,0)),b.ymin=parseFloat(this._getTagValue("southBoundLatitude",h,0)),b.xmax=parseFloat(this._getTagValue("eastBoundLongitude",h,0)),b.ymax=parseFloat(this._getTagValue("northBoundLatitude",
h,0)),d.allExtents[0]=b);g||h||(b=new z(-180,-90,180,90,new u({wkid:4326})),d.allExtents[0]=b);d.extent=d.allExtents[0];var e=-1<c.indexOf(["1.0.0","1.1.0","1.1.1"],this.version)?"SRS":"CRS";c.forEach(a.childNodes,function(a){if("Name"==a.nodeName)d.name=(a.text?a.text:a.textContent)||"";else if("Title"==a.nodeName)d.title=(a.text?a.text:a.textContent)||"";else if("Abstract"==a.nodeName)d.description=(a.text?a.text:a.textContent)||"";else if("BoundingBox"==a.nodeName){var b=a.getAttribute(e);b&&0===
b.indexOf("EPSG:")?(b=parseInt(b.substring(5),10),0===b||isNaN(b)||(a="1.3.0"==this.version?this._getExtent(a,b,this._useLatLong(b)):this._getExtent(a,b),d.allExtents[b]=a,d.extent||(d.extent=a))):b&&0===b.indexOf("CRS:")?(b=parseInt(b.substring(4),10),0===b||isNaN(b)||(this._CRS_TO_EPSG[b]&&(b=this._CRS_TO_EPSG[b]),d.allExtents[b]=this._getExtent(a,b))):(b=parseInt(b,10),0===b||isNaN(b)||(d.allExtents[b]=this._getExtent(a,b)))}else if(a.nodeName==e)a=(a.text?a.text:a.textContent).split(" "),c.forEach(a,
function(a){a=-1<a.indexOf(":")?parseInt(a.split(":")[1],10):parseInt(a,10);0===a||isNaN(a)||(this._CRS_TO_EPSG[a]&&(a=this._CRS_TO_EPSG[a]),-1==c.indexOf(d.spatialReferences,a)&&d.spatialReferences.push(a))},this);else if("Style"!=a.nodeName||d.legendURL)"Layer"===a.nodeName&&d.subLayers.push(this._getLayerInfo(a));else if(a=this._getTag("LegendURL",a))if(a=this._getTag("OnlineResource",a))d.legendURL=a.getAttribute("xlink:href")},this);d.title=d.title||d.name;return d},_getImageFormat:function(a){switch(a?
a.toLowerCase():""){case "jpg":return"image/jpeg";case "bmp":return"image/bmp";case "gif":return"image/gif";case "svg":return"image/svg+xml";default:return"image/png"}},getImageFormat:function(){switch(this.imageFormat?this.imageFormat.toLowerCase():""){case "image/jpeg":return"jpg";case "image/bmp":return"bmp";case "image/gif":return"gif";case "image/svg+xml":return"svg";default:return"png"}},_getExtent:function(a,c,g){var d;if(a){d=new z;var b=parseFloat(a.getAttribute("minx")),e=parseFloat(a.getAttribute("miny")),
h=parseFloat(a.getAttribute("maxx"));a=parseFloat(a.getAttribute("maxy"));g?(d.xmin=isNaN(e)?-1*Number.MAX_VALUE:e,d.ymin=isNaN(b)?-1*Number.MAX_VALUE:b,d.xmax=isNaN(a)?Number.MAX_VALUE:a,d.ymax=isNaN(h)?Number.MAX_VALUE:h):(d.xmin=isNaN(b)?-1*Number.MAX_VALUE:b,d.ymin=isNaN(e)?-1*Number.MAX_VALUE:e,d.xmax=isNaN(h)?Number.MAX_VALUE:h,d.ymax=isNaN(a)?Number.MAX_VALUE:a);d.spatialReference=new u({wkid:c})}return d},_useLatLong:function(a){var d,c;for(c=0;c<this._REVERSED_LAT_LONG_RANGES.length;c++){var g=
this._REVERSED_LAT_LONG_RANGES[c];if(a>=g[0]&&a<=g[1]){d=!0;break}}return d},_getTag:function(a,c){var d=h.query(a,c);return d&&0<d.length?d[0]:null},_getTagValue:function(a,c,g){return(a=h.query(a,c))&&0<a.length?a[0].text?a[0].text:a[0].textContent:g},_getAttributeValue:function(a,c,g,k){return(a=h.query(a,g))&&0<a.length?a[0].getAttribute(c):k},_checkVisibleLayersList:function(a){if(a&&0<a.length&&this.layerInfos&&0<this.layerInfos.length&&"number"==typeof a[0]){var d=[];c.forEach(a,function(a){a<
this.layerInfos.length&&d.push(this.layerInfos[a].name)},this);a=d}return a},_stripParameters:function(a,g){var d=w.urlToObject(a),h,b=[];for(h in d.query)d.query.hasOwnProperty(h)&&-1===c.indexOf(g,h.toLowerCase())&&b.push(h+"\x3d"+d.query[h]);return d.path+(b.length?"?"+b.join("\x26"):"")},_getPopupGraphic:function(a,g){var d=this.visibleLayers;if(!d||0===d.length)return null;var h=this._popupGraphic;h||(h=new C({title:this.title||"",description:'\x3cdiv style\x3d"position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;"\x3e\x3ciframe src\x3d"{QUERY_URL}" width\x3d"250" height\x3d"147" frameborder\x3d"0" marginwidth\x3d"0" marginheight\x3d"0" style\x3d"position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:url(\''+
k.toUrl("../dijit/images/loading-throb.gif")+"') transparent center no-repeat;\" onload\x3d\"(event.target || event.srcElement).style.background \x3d 'none';\"\x3e\x3c/iframe\x3e\x3c/div\x3e"}),h=this._popupGraphic=new p(null,null,{},h),h._layer=this);var b=function(a){var c=[];if(a&&(a.queryable&&a.showPopup&&a.name&&c.push(a.name),a.subLayers))for(var d=0;d<a.subLayers.length;d++){var e=b(a.subLayers[d]);e.length&&(c=c.concat(e))}return c},e=b({subLayers:this.layerInfos}),e=c.filter(e,function(a){return-1<
c.indexOf(d,a)});if(e.length){var l=this.getFeatureInfoURL,m=this._getImageParams(a.extent,a.width,a.height),m=this._mixinCustomLayerParameters(m);m.REQUEST="GetFeatureInfo";m.INFO_FORMAT=this.featureInfoFormat;m.QUERY_LAYERS=e.join();m.FEATURE_COUNT=25;"1.3.0"===this.version?(m.I=Math.round(g.x),m.J=Math.round(g.y)):(m.X=Math.round(g.x),m.Y=Math.round(g.y));var l=l+(-1===l.indexOf("?")?"?":""),n;for(n in m)m.hasOwnProperty(n)&&(l+="?"===l.substring(l.length-1,l.length)?"":"\x26",l+=n+"\x3d"+m[n]);
h.attributes.QUERY_URL=l;return h}return null},_mixinCustomParameters:function(a){if(this.customParameters)for(var c in this.customParameters)a[c]=encodeURIComponent(this.customParameters[c]);return a},_mixinCustomLayerParameters:function(a){if(this.customLayerParameters||this.customParameters){var c=v.clone(this.customParameters||{});v.mixin(c,this.customLayerParameters||{});for(var d in c)"styles"===d.toLowerCase()&&delete a.STYLES,a[d]=encodeURIComponent(c[d])}return a}});a("extend-esri")&&v.setObject("layers.WMSLayer",
q,l);return q});