PageSourceSearch

https://www.literaturportal-bayern.de/media/arcgis_js_api/library/3.15/3.15/init.js

js literaturportal-bayern.de collected 2026-10-02 06:58:56 UTC 967,516 bytes, 1,852 lines download raw bytes

1// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2// See http://js.arcgis.com/3.15/esri/copyright.txt for details.
3
4//>>built
5(function(b,l){var e,p=function(){},m=function(a){for(var c in a)return 0;return 1},n={}.toString,q=function(a){return"[object Function]"==n.call(a)},k=function(a){return"[object String]"==n.call(a)},g=function(a){return"[object Array]"==n.call(a)},a=function(a,c){if(a)for(var b=0;b<a.length;)c(a[b++])},f=function(a,c){for(var b in c)a[b]=c[b];return a},d=function(a,c){return f(Error(a),{src:"dojoLoader",info:c})},c=1,h=function(){return"_"+c++},r=function(a,c,b){return La(a,c,b,0,r)},t=this,v=t.document,
6u=v&&v.createElement("DiV"),s=r.has=function(a){return q(y[a])?y[a]=y[a](t,v,u):y[a]},y=s.cache=l.hasCache;s.add=function(a,c,b,d){(void 0===y[a]||d)&&(y[a]=c);return b&&s(a)};s.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);s("host-webworker")&&(f(l.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,"dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1}),l.loaderPatch={injectUrl:function(a,c){try{importScripts(a),c()}catch(b){console.info("failed to load resource ("+
7a+")"),console.error(b)}}});for(var A in b.has)s.add(A,b.has[A],0,1);var w=0,F=[],x=0,C=p,I=p,O;r.isXdUrl=p;r.initSyncLoader=function(a,c,b){x||(x=a,C=c,I=b);return{sync:"sync",requested:1,arrived:2,nonmodule:3,executing:4,executed:5,syncExecStack:F,modules:z,execQ:Q,getModule:V,injectModule:pa,setArrived:ba,signal:D,finishExec:ga,execModule:ha,dojoRequirePlugin:x,getLegacyMode:function(){return w},guardCheckComplete:ia}};var P=location.protocol,K=location.host;r.isXdUrl=function(a){return/^\./.test(a)?
8!1:/^\/\//.test(a)?!0:(a=a.match(/^([^\/\:]+\:)\/+([^\/]+)/))&&(a[1]!=P||K&&a[2]!=K)};s.add("dojo-force-activex-xhr",!v.addEventListener&&"file:"==window.location.protocol);s.add("native-xhr","undefined"!=typeof XMLHttpRequest);if(s("native-xhr")&&!s("dojo-force-activex-xhr"))O=function(){return new XMLHttpRequest};else{var S=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],B;for(e=0;3>e;)try{if(B=S[e++],new ActiveXObject(B))break}catch(G){}O=function(){return new ActiveXObject(B)}}r.getXhr=
9O;s.add("dojo-gettext-api",1);r.getText=function(a,c,b){var f=O();f.open("GET",qa(a),!1);f.send(null);if(200==f.status||!location.host&&!f.status)b&&b(f.responseText,c);else throw d("xhrFailed",f.status);return f.responseText};var M=new Function("return eval(arguments[0]);");r.eval=function(a,c){return M(a+"\r\n//# sourceURL\x3d"+c)};var E={},D=r.signal=function(c,b){var d=E[c];a(d&&d.slice(0),function(a){a.apply(null,g(b)?b:[b])})},N=r.on=function(a,c){var b=E[a]||(E[a]=[]);b.push(c);return{remove:function(){for(var a=
100;a<b.length;a++)if(b[a]===c){b.splice(a,1);break}}}},da=[],Y={},$=[],L={},J=r.map={},T=[],z={},H="",W={},U={},ea={},X=0,ra=function(a){var c,b,d,f;for(c in U)b=U[c],(d=c.match(/^url\:(.+)/))?W["url:"+Ma(d[1],a)]=b:"*now"==c?f=b:"*noref"!=c&&(d=ja(c,a,!0),W[d.mid]=W["url:"+d.url]=b);f&&f(Ba(a));U={}},Na=function(a){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(a){return"\\"+a})},Ca=function(a,c){c.splice(0,c.length);for(var b in a)c.push([b,a[b],RegExp("^"+Na(b)+"(/|$)"),b.length]);c.sort(function(a,
11c){return c[3]-a[3]});return c},$a=function(c,b){a(c,function(a){b.push([k(a[0])?RegExp("^"+Na(a[0])+"$"):a[0],a[1]])})},Oa=function(a){var c=a.name;c||(c=a,a={name:c});a=f({main:"main"},a);a.location=a.location?a.location:c;a.packageMap&&(J[c]=a.packageMap);a.main.indexOf("./")||(a.main=a.main.substring(2));L[c]=a},Pa=[],ka=function(c,b,d){for(var h in c){"waitSeconds"==h&&(r.waitms=1E3*(c[h]||0));"cacheBust"==h&&(H=c[h]?k(c[h])?c[h]:(new Date).getTime()+"":"");if("baseUrl"==h||"combo"==h)r[h]=c[h];
12if("async"==h){var g=c[h];r.legacyMode=w=k(g)&&/sync|legacyAsync/.test(g)?g:!g?"sync":!1;r.async=!w}c[h]!==y&&(r.rawConfig[h]=c[h],"has"!=h&&s.add("config-"+h,c[h],0,b))}r.baseUrl||(r.baseUrl="./");/\/$/.test(r.baseUrl)||(r.baseUrl+="/");for(h in c.has)s.add(h,c.has[h],0,b);a(c.packages,Oa);for(var n in c.packagePaths)a(c.packagePaths[n],function(a){var c=n+"/"+a;k(a)&&(a={name:a});a.location=c;Oa(a)});Ca(f(J,c.map),T);a(T,function(a){a[1]=Ca(a[1],[]);"*"==a[0]&&(T.star=a)});Ca(f(Y,c.paths),$);$a(c.aliases,
13da);if(b)Pa.push({config:c.config});else for(h in c.config)b=V(h,d),b.config=f(b.config||{},c.config[h]);c.cache&&(ra(),U=c.cache,c.cache["*noref"]&&ra());D("config",[c,r.rawConfig])};s("dojo-cdn");var sa=v.getElementsByTagName("script");e=0;for(var Z,ca,ta,la;e<sa.length;){Z=sa[e++];if((ta=Z.getAttribute("src"))&&(la=ta.match(/(((.*)\/)|^)dojo\.js(\W|$)/i)))ca=la[3]||"",l.baseUrl=l.baseUrl||ca,X=Z;if(ta=Z.getAttribute("data-dojo-config")||Z.getAttribute("djConfig"))ea=r.eval("({ "+ta+" })","data-dojo-config"),
14X=Z}r.rawConfig={};ka(l,1);s("dojo-cdn")&&((L.dojo.location=ca)&&(ca+="/"),L.dijit.location=ca+"../dijit/",L.dojox.location=ca+"../dojox/");ka(b,1);ka(ea,1);var ma=function(c){ia(function(){a(c.deps,pa)})},La=function(a,c,b,s,n){var e;
14if(k(a)){if((e=V(a,s,!0))&&e.executed)return e.result;throw d("undefinedModule",a);}g(a)||(ka(a,0,s),a=c,c=b);if(g(a))if(a.length){b="require*"+h();for(var q,m=[],t=0;t<a.length;)q=a[t++],m.push(V(q,s));e=f(ua("",b,0,""),{injected:2,deps:m,def:c||p,require:s?s.require:
15r,gc:1});z[e.mid]=e;ma(e);var x=na&&"sync"!=w;ia(function(){ha(e,x)});e.executed||Q.push(e);fa()}else c&&c();return n},Ba=function(a){if(!a)return r;var c=a.require;c||(c=function(b,d,f){return La(b,d,f,a,c)},a.require=f(c,r),c.module=a,c.toUrl=function(c){return Ma(c,a)},c.toAbsMid=function(c){return Da(c,a)},s("dojo-undef-api")&&(c.undef=function(c){r.undef(c,a)}),c.syncLoadNls=function(c){c=ja(c,a);var b=z[c.mid];if(!b||!b.executed)if(aa=W[c.mid]||W["url:"+c.url])va(aa),b=z[c.mid];return b&&b.executed&&
16b.result});return c},Q=[],wa=[],R={},ab=function(a){a.injected=1;R[a.mid]=1;a.url&&(R[a.url]=a.pack||1);Qa()},ba=function(a){a.injected=2;delete R[a.mid];a.url&&delete R[a.url];m(R)&&(xa(),"xd"==w&&(w="sync"))},bb=r.idle=function(){return!wa.length&&m(R)&&!Q.length&&!na},Ea=function(a,c){if(c)for(var b=0;b<c.length;b++)if(c[b][2].test(a))return c[b];return 0},Ra=function(a){var c=[],b,d;for(a=a.replace(/\\/g,"/").split("/");a.length;)b=a.shift(),".."==b&&c.length&&".."!=d?(c.pop(),d=c[c.length-1]):
17"."!=b&&c.push(d=b);return c.join("/")},ua=function(a,c,b,d){var f=r.isXdUrl(d);return{pid:a,mid:c,pack:b,url:d,executed:0,def:0,isXd:f,isAmd:!!(f||L[a]&&L[a].isAmd)}},Sa=function(c,b,f,h,g,r,n,e,k){var m,t,x,l;l=/^\./.test(c);if(/(^\/)|(\:)|(\.js$)/.test(c)||l&&!b)return ua(0,c,0,c);c=Ra(l?b.mid+"/../"+c:c);if(/^\./.test(c))throw d("irrationalPath",c);b&&(x=Ea(b.mid,r));(x=(x=x||r.star)&&Ea(c,x[1]))&&(c=x[1]+c.substring(x[3]));b=(la=c.match(/^([^\/]+)(\/(.+))?$/))?la[1]:"";(m=f[b])?c=b+"/"+(t=la[3]||
18m.main):b="";var u=0;a(e,function(a){var b=c.match(a[0]);b&&0<b.length&&(u=q(a[1])?c.replace(a[0],a[1]):a[1])});if(u)return Sa(u,0,f,h,g,r,n,e,k);if(f=h[c])return k?ua(f.pid,f.mid,f.pack,f.url):h[c];h=(x=Ea(c,n))?x[1]+c.substring(x[3]):b?m.location+"/"+t:s("config-tlmSiblingOfDojo")?"../"+c:c;/(^\/)|(\:)/.test(h)||(h=g+h);return ua(b,c,m,Ra(h+".js"))},ja=function(a,c,b){return Sa(a,c,L,z,r.baseUrl,b?[]:T,b?[]:$,b?[]:da)},Ta=function(a,c,b){return a.normalize?a.normalize(c,function(a){return Da(a,
19b)}):Da(c,b)},Ua=0,V=function(a,c,b){var d,f;(d=a.match(/^(.+?)\!(.*)$/))?(f=V(d[1],c,b),"sync"==w&&!f.executed&&(pa(f),2===f.injected&&!f.executed&&ia(function(){ha(f)}),f.executed?ya(f):Q.unshift(f)),5===f.executed&&!f.load&&ya(f),f.load?(d=Ta(f,d[2],c),a=f.mid+"!"+(f.dynamic?++Ua+"!":"")+d):(d=d[2],a=f.mid+"!"+ ++Ua+"!waitingForPlugin"),a={plugin:f,mid:a,req:Ba(c),prid:d}):a=ja(a,c);return z[a.mid]||!b&&(z[a.mid]=a)},Da=r.toAbsMid=function(a,c){return ja(a,c).mid},Ma=r.toUrl=function(a,c){var b=
20ja(a+"/x",c),f=b.url;return qa(0===b.pid?a:f.substring(0,f.length-5))},Va={injected:2,executed:5,def:3,result:3},Fa=function(a){return z[a]=f({mid:a},Va)},cb=Fa("require"),db=Fa("exports"),eb=Fa("module"),za={},Ga=0,ya=function(a){var c=a.result;a.dynamic=c.dynamic;a.normalize=c.normalize;a.load=c.load;return a},fb=function(c){var b={};a(c.loadQ,function(a){var d=Ta(c,a.prid,a.req.module),h=c.dynamic?a.mid.replace(/waitingForPlugin$/,d):c.mid+"!"+d,d=f(f({},a),{mid:h,prid:d,injected:0});z[h]||Wa(z[h]=
21d);b[a.mid]=z[h];ba(a);delete z[a.mid]});c.loadQ=0;var d=function(a){for(var c=a.deps||[],d=0;d<c.length;d++)(a=b[c[d].mid])&&(c[d]=a)},h;for(h in z)d(z[h]);a(Q,d)},ga=function(c){r.trace("loader-finish-exec",[c.mid]);c.executed=5;c.defOrder=Ga++;a(c.provides,function(a){a()});c.loadQ&&(ya(c),fb(c));for(e=0;e<Q.length;)Q[e]===c?Q.splice(e,1):e++;/^require\*/.test(c.mid)&&delete z[c.mid]},gb=[],ha=function(a,c){if(4===a.executed)return r.trace("loader-circular-dependency",[gb.concat(a.mid).join("-\x3e")]),
22!a.def||c?za:a.cjs&&a.cjs.exports;if(!a.executed){if(!a.def)return za;var b=a.mid,f=a.deps||[],h,g=[],n=0;for(a.executed=4;h=f[n++];){h=h===cb?Ba(a):h===db?a.cjs.exports:h===eb?a.cjs:ha(h,c);if(h===za)return a.executed=0,r.trace("loader-exec-module",["abort",b]),za;g.push(h)}r.trace("loader-run-factory",[a.mid]);var b=a.def,e;F.unshift(a);if(s("config-dojo-loader-catches"))try{e=q(b)?b.apply(null,g):b}catch(k){D("error",a.result=d("factoryThrew",[a,k]))}else e=q(b)?b.apply(null,g):b;a.result=void 0===
23e&&a.cjs?a.cjs.exports:e;F.shift(a);ga(a)}return a.result},na=0,ia=function(a){try{na++,a()}finally{na--}bb()&&D("idle",[])},fa=function(){na||ia(function(){C();for(var a,c,b=0;b<Q.length;)a=Ga,c=Q[b],ha(c),a!=Ga?(C(),b=0):b++})};s("dojo-undef-api")&&(r.undef=function(a,c){var b=V(a,c);ba(b);f(b,{def:0,executed:0,injected:0,node:0})});void 0===s("dojo-loader-eval-hint-url")&&s.add("dojo-loader-eval-hint-url",1);var qa="function"==typeof b.fixupUrl?b.fixupUrl:function(a){a+="";return a+(H?(/\?/.test(a)?
24"\x26":"?")+H:"")},Wa=function(a){var c=a.plugin;5===c.executed&&!c.load&&ya(c);var b=function(c){a.result=c;ba(a);ga(a);fa()};c.load?c.load(a.prid,a.req,b):c.loadQ?c.loadQ.push(a):(c.loadQ=[a],Q.unshift(c),pa(c))},aa=0,oa=0,Ha=0,va=function(a,c){s("config-stripStrict")&&(a=a.replace(/"use strict"/g,""));Ha=1;if(s("config-dojo-loader-catches"))try{a===aa?aa.call(null):r.eval(a,s("dojo-loader-eval-hint-url")?c.url:c.mid)}catch(b){D("error",d("evalModuleThrew",c))}else a===aa?aa.call(null):r.eval(a,
25s("dojo-loader-eval-hint-url")?c.url:c.mid);Ha=0},pa=function(c){var b=c.mid,h=c.url;if(!c.executed&&!c.injected&&!(R[b]||c.url&&(c.pack&&R[c.url]===c.pack||1==R[c.url]))
25)if(ab(c),c.plugin)Wa(c);else{var g=function(){Xa(c);if(2!==c.injected){if(s("dojo-enforceDefine")){D("error",d("noDefine",c));return}ba(c);f(c,Va);r.trace("loader-define-nonmodule",[c.url])}w?!F.length&&fa():fa()};if(aa=W[b]||W["url:"+c.url])r.trace("loader-inject",["cache",c.mid,h]),va(aa,c),g();else{if(w)if(c.isXd)"sync"==w&&(w=
26"xd");else if(!(c.isAmd&&"sync"!=w)){var n=function(d){if("sync"==w){F.unshift(c);va(d,c);F.shift();Xa(c);c.cjs||(ba(c),ga(c));if(c.finish){d=b+"*finish";var f=c.finish;delete c.finish;Ia(d,["dojo",("dojo/require!"+f.join(",")).replace(/\./g,"/")],function(c){a(f,function(a){c.require(a)})});Q.unshift(V(d))}g()}else(d=I(c,d))?(va(d,c),g()):(oa=c,r.injectUrl(qa(h),g,c),oa=0)};r.trace("loader-inject",["xhr",c.mid,h,"sync"!=w]);if(s("config-dojo-loader-catches"))try{r.getText(h,"sync"!=w,n)}catch(e){D("error",
27d("xhrInjectFailed",[c,e]))}else r.getText(h,"sync"!=w,n);return}r.trace("loader-inject",["script",c.mid,h]);oa=c;r.injectUrl(qa(h),g,c);oa=0}}},Ja=function(a,c,b){r.trace("loader-define-module",[a.mid,c]);var h=a.mid;if(2===a.injected)return D("error",d("multipleDefine",a)),a;f(a,{deps:c,def:b,cjs:{id:a.mid,uri:a.url,exports:a.result={},setExports:function(c){a.cjs.exports=c},config:function(){return a.config}}});for(var g=0;c[g];g++)c[g]=V(c[g],a);w&&!R[h]&&(ma(a),Q.push(a),fa());ba(a);!q(b)&&!c.length&&
28(a.result=b,ga(a));return a},Xa=function(c,b){for(var d=[],f,h;wa.length;)h=wa.shift(),b&&(h[0]=b.shift()),f=h[0]&&V(h[0])||c,d.push([f,h[1],h[2]]);ra(c);a(d,function(a){ma(Ja.apply(null,a))})},Aa=0,xa=p,Qa=p,xa=function(){Aa&&clearTimeout(Aa);Aa=0},Qa=function(){xa();r.waitms&&(Aa=t.setTimeout(function(){xa();D("error",d("timeout",R))},r.waitms))};s.add("ie-event-behavior",v.attachEvent&&"undefined"===typeof Windows&&("undefined"===typeof opera||"[object Opera]"!=opera.toString()));var Ka=function(a,
29c,b,d){if(s("ie-event-behavior"))return a.attachEvent(b,d),function(){a.detachEvent(b,d)};a.addEventListener(c,d,!1);return function(){a.removeEventListener(c,d,!1)}},hb=Ka(window,"load","onload",function(){r.pageLoaded=1;"complete"!=v.readyState&&(v.readyState="complete");hb()}),sa=v.getElementsByTagName("script");for(e=0;!X;)if(!/^dojo/.test((Z=sa[e++])&&Z.type))X=Z;r.injectUrl=function(a,c,b){b=b.node=v.createElement("script");var f=Ka(b,"load","onreadystatechange",function(a){a=a||window.event;
30var b=a.target||a.srcElement;if("load"===a.type||/complete|loaded/.test(b.readyState))f(),h(),c&&c()}),h=Ka(b,"error","onerror",function(c){f();h();D("error",d("scriptError",[a,c]))});b.type="text/javascript";b.charset="utf-8";b.src=a;X.parentNode.insertBefore(b,X);return b};r.log=function(){try{for(var a=0;a<arguments.length;a++)console.log(arguments[a])}catch(c){}};r.trace=p;var Ia=function(a,c,b){var f=arguments.length,h=["require","exports","module"],g=[0,a,c];1==f?g=[0,q(a)?h:[],a]:2==f&&k(a)?
31g=[a,q(c)?h:[],c]:3==f&&(g=[a,c,b]);r.trace("loader-define",g.slice(0,2));if((f=g[0]&&V(g[0]))&&!R[f.mid])ma(Ja(f,g[1],g[2]));else if(!s("ie-event-behavior")||Ha)wa.push(g);else{f=f||oa;if(!f)for(a in R)if((h=z[a])&&h.node&&"interactive"===h.node.readyState){f=h;break}f?(ra(f),ma(Ja(f,g[1],g[2]))):D("error",d("ieDefineFailed",g[0]));fa()}};Ia.amd={vendor:"dojotoolkit.org"};f(f(r,l.loaderPatch),b.loaderPatch);N("error",function(a){try{if(console.error(a),a instanceof Error){for(var c in a)console.log(c+
32":",a[c]);console.log(".")}}catch(b){}});f(r,{uid:h,cache:W,packs:L});if(t.define)D("error",d("defineAlreadyDefined",0));else{t.define=Ia;t.require=r;a(Pa,function(a){ka(a)});var Ya=ea.deps||b.deps||l.deps,Za=ea.callback||b.callback||l.callback;r.boot=Ya||Za?[Ya||[],Za]:0}})(this.dojoConfig||this.djConfig||this.require||{},{async:0,baseUrl:(location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "www.literaturportal-bayern.de/media/arcgis_js_api/library/3.15/3.15/dojo",hasCache:{"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-has-api":1,"dojo-loader":1,"dojo-undef-api":0,
33dom:1,"extend-esri":1,"host-browser":1},packages:[{location:"../dojox",name:"dojox"},{location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dijit",name:"dijit"},{location:"../xstyle",name:"xstyle"},{location:"../esri",name:"esri"},{location:".",name:"dojo"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../put-selector",main:"put",name:"put-selector"}]});
34require({cache:{"dojo/request/default":function(){define(["exports","require","../has"],function(b,l,e){var p=e("config-requestProvider");p||(p="./xhr");b.getPlatformDefaultId=function(){return"./xhr"};b.load=function(b,n,e,k){l(["platform"==b?"./xhr":p],function(b){e(b)})}})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(b,l,e,p,m,n,q,k,g){var a=e.mixin,f={},d=f._Line=function(a,c){this.start=a;this.end=
35c};d.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var c=f.Animation=function(c){a(this,c);e.isArray(this.curve)&&(this.curve=new d(this.curve[0],this.curve[1]))};c.prototype=new p;e.extend(c,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var a=this._percent,c=this.easing;return c?c(a):a},_fire:function(a,c){var b=c||[];if(this[a])if(l.debugAtAllCosts)this[a].apply(this,b);else try{this[a].apply(this,b)}catch(d){console.error("exception in animation handler for:",
36a),console.error(d)}return this},play:function(a,c){this._delayTimer&&this._clearTimer();if(c)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);var b=a||this.delay,d=e.hitch(this,"_play",c);if(0<b)return this._delayTimer=setTimeout(d,b),this;d();return this},_play:function(a){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);
37this._active=!0;this._paused=!1;a=this.curve.getValue(this._getStep());this._percent||(this._startRepeatCount||(this._startRepeatCount=this.repeat),this._fire("onBegin",[a]));this._fire("onPlay",[a]);this._cycle();return this},pause:function(){this._delayTimer&&this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(a,c){this._stopTimer();this._active=this._paused=!0;this._percent=
38a;c&&this.play();return this},stop:function(a){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();a&&(this._percent=1);this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},destroy:function(){this.stop()},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var a=(new Date).valueOf(),a=0===this.duration?1:(a-this._startTime)/this.duration;1<=a&&(a=1);this._percent=
39a;this.easing&&(a=this.easing(a));this._fire("onAnimate",[this.curve.getValue(a)]);1>this._percent?this._startTimer():(this._active=!1,0<this.repeat?(this.repeat--,this.play(null,!0)):-1==this.repeat?this.play(null,!0):this._startRepeatCount&&(this.repeat=this._startRepeatCount,this._startRepeatCount=0),this._percent=0,this._fire("onEnd",[this.node]),!this.repeat&&this._stopTimer())}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var h=0,r=null,t={run:function(){}};
40e.extend(c,{_startTimer:function(){this._timer||(this._timer=n.after(t,"run",e.hitch(this,"_cycle"),!0),h++);r||(r=setInterval(e.hitch(t,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,h--);0>=h&&(clearInterval(r),r=null,h=0)}});var v=q("ie")?function(a){var c=a.style;!c.width.length&&"auto"==g.get(a,"width")&&(c.width="auto")}:function(){};f._fade=function(c){c.node=k.byId(c.node);var b=a({properties:{}},c);c=b.properties.opacity={};c.start=!("start"in
41b)?function(){return+g.get(b.node,"opacity")||0}:b.start;c.end=b.end;c=f.animateProperty(b);n.after(c,"beforeBegin",e.partial(v,b.node),!0);return c};f.fadeIn=function(c){return f._fade(a({end:1},c))};f.fadeOut=function(c){return f._fade(a({end:0},c))};f._defaultEasing=function(a){return 0.5+Math.sin((a+1.5)*Math.PI)/2};var u=function(a){this._properties=a;for(var c in a){var b=a[c];b.start instanceof m&&(b.tempColor=new m)}};u.prototype.getValue=function(a){var c={},b;for(b in this._properties){var d=
42this._properties[b],f=d.start;f instanceof m?c[b]=m.blendColors(f,d.end,a,d.tempColor).toCss():e.isArray(f)||(c[b]=(d.end-f)*a+f+("opacity"!=b?d.units||"px":0))}return c};f.animateProperty=function(d){var f=d.node=k.byId(d.node);d.easing||(d.easing=b._defaultEasing);d=new c(d);n.after(d,"beforeBegin",e.hitch(d,function(){var c={},b;for(b in this.properties){if("width"==b||"height"==b)this.node.display="block";var d=this.properties[b];e.isFunction(d)&&(d=d(f));d=c[b]=a({},e.isObject(d)?d:{end:d});
43e.isFunction(d.start)&&(d.start=d.start(f));e.isFunction(d.end)&&(d.end=d.end(f));var h=0<=b.toLowerCase().indexOf("color"),r=function(a,c){var b={height:a.offsetHeight,width:a.offsetWidth}[c];if(void 0!==b)return b;b=g.get(a,c);return"opacity"==c?+b:h?b:parseFloat(b)};"end"in d?"start"in d||(d.start=r(f,b)):d.end=r(f,b);h?(d.start=new m(d.start),d.end=new m(d.end)):d.start="opacity"==b?+d.start:parseFloat(d.start)}this.curve=new u(c)}),!0);n.after(d,"onAnimate",e.hitch(g,"set",d.node),!0);return d};
44f.anim=function(a,b,d,h,g,r){return f.animateProperty({node:a,duration:d||c.prototype.duration,properties:b,easing:h,onEnd:g}).play(r||0)};a(b,f);b._Animation=c;return f})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(b,l,e,p){var m={fieldToObject:function(b){var e=null;if(b=l.byId(b)){var k=b.name,g=(b.type||"").toLowerCase();if(k&&g&&!b.disabled)if("radio"==g||"checkbox"==g)b.checked&&(e=b.value);else if(b.multiple){e=[];for(b=[b.firstChild];b.length;)for(k=
45b.pop();k;k=k.nextSibling)if(1==k.nodeType&&"option"==k.tagName.toLowerCase())k.selected&&e.push(k.value);else{k.nextSibling&&b.push(k.nextSibling);k.firstChild&&b.push(k.firstChild);break}}else e=b.value}return e},toObject:function(e){var q={};e=l.byId(e).elements;for(var k=0,g=e.length;k<g;++k){var a=e[k],f=a.name,d=(a.type||"").toLowerCase();if(f&&d&&0>"file|submit|image|reset|button".indexOf(d)&&!a.disabled){var c=q,h=f,a=m.fieldToObject(a);if(null!==a){var r=c[h];"string"==typeof r?c[h]=[r,a]:
46b.isArray(r)?r.push(a):c[h]=a}"image"==d&&(q[f+".x"]=q[f+".y"]=q[f].x=q[f].y=0)}}return q},toQuery:function(b){return e.objectToQuery(m.toObject(b))},toJson:function(b,e){return p.stringify(m.toObject(b),null,e?4:0)}};return m})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./_base/xhr ./json module".split(" "),function(b,l,e,p,m,n,q,k,g){e.add("dojo-preload-i18n-Api",1);
46var a=b.i18n={},f=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,d=function(a,
47c,b,d){var f=[b+d];c=c.split("-");for(var h="",g=0;g<c.length;g++)if(h+=(h?"-":"")+c[g],!a||a[h])f.push(b+h+"/"+d),f.specificity=h;return f},c={},h=function(a,c,d){d=d?d.toLowerCase():b.locale;a=a.replace(/\./g,"/");c=c.replace(/\./g,"/");return/root/i.test(d)?a+"/nls/"+c:a+"/nls/"+d+"/"+c},r=b.getL10nName=function(a,c,b){return g.id+"!"+h(a,c,b)},t=function(a,b,f,h,g,r){a([b],function(e){var k=n.clone(e.root||e.ROOT),m=d(!e._v1x&&e,g,f,h);a(m,function(){for(var a=1;a<m.length;a++)k=n.mixin(n.clone(k),
48arguments[a]);c[b+"/"+g]=k;k.$locale=m.specificity;r()})})},v=function(a){var c=m.extraLocale||[],c=n.isArray(c)?c:[c];c.push(a);return c},u=function(a,d,h){if(e("dojo-preload-i18n-Api")){var g=a.split("*"),r="preload"==g[1];r&&(c[a]||(c[a]=1,F(g[2],k.parse(g[3]),1,d)),h(1));if(!(g=r))A&&w.push([a,d,h]),g=A;if(g)return}a=f.exec(a);var m=a[1]+"/",s=a[5]||a[4],q=m+s,g=(a=a[5]&&a[4])||b.locale||"",l=q+"/"+g;a=a?[g]:v(g);var u=a.length,y=function(){--u||h(n.delegate(c[l]))};p.forEach(a,function(a){var b=
49q+"/"+a;e("dojo-preload-i18n-Api")&&x(b);c[b]?y():t(d,q,m,s,a,y)})};if(e("dojo-unit-tests"))var s=a.unitTests=[];e("dojo-preload-i18n-Api");var y=a.normalizeLocale=function(a){a=a?a.toLowerCase():b.locale;return"root"==a?"ROOT":a},A=0,w=[],F=a._preloadLocalizations=function(a,d,f,h){function g(a,c){h.isXdUrl(l.toUrl(a+".js"))||f?h([a],c):O([a],c,h)}function r(a,c){for(var b=a.split("-");b.length;){if(c(b.join("-")))return;b.pop()}c("ROOT")}function e(){for(--A;!A&&w.length;)u.apply(null,w.shift())}
50function k(b){b=y(b);r(b,function(f){if(0<=p.indexOf(d,f)){var k=a.replace(/\./g,"/")+"_"+f;A++;g(k,function(a){for(var d in a){var g=a[d],k=d.match(/(.+)\/([^\/]+)$/),m;if(k){m=k[2];k=k[1]+"/";g._localized=g._localized||{};var s;if("ROOT"===f){var t=s=g._localized;delete g._localized;t.root=g;c[l.toAbsMid(d)]=t}else s=g._localized,c[l.toAbsMid(k+m+"/"+f)]=g;f!==b&&function(a,d,f,g){var k=[],m=[];r(b,function(c){g[c]&&(k.push(l.toAbsMid(a+c+"/"+d)),m.push(l.toAbsMid(a+d+"/"+c)))});k.length?(A++,h(k,
51function(){for(var h=0;h<k.length;h++)f=n.mixin(n.clone(f),arguments[h]),c[m[h]]=f;c[l.toAbsMid(a+d+"/"+b)]=n.clone(f);e()})):c[l.toAbsMid(a+d+"/"+b)]=f}(k,m,g,s)}}e()});return!0}return!1})}h=h||l;k();p.forEach(b.config.extraLocale,k)},x=function(){},C={},I=new Function("__bundle","__checkForLegacyModules","__mid","__amdValue","var define \x3d function(mid, factory){define.called \x3d 1; __amdValue.result \x3d factory || mid;},\t   require \x3d function(){define.called \x3d 1;};try{define.called \x3d 0;eval(__bundle);if(define.called\x3d\x3d1)return __amdValue;if((__checkForLegacyModules \x3d __checkForLegacyModules(__mid)))return __checkForLegacyModules;}catch(e){}try{return eval('('+__bundle+')');}catch(e){return e;}"),
52O=function(a,b,d){var f=[];p.forEach(a,function(a){function b(d){d=I(d,x,a,C);d===C?f.push(c[h]=C.result):(d instanceof Error&&(console.error("failed to evaluate i18n bundle; url\x3d"+h,d),d={}),f.push(c[h]=/nls\/[^\/]+\/[^\/]+$/.test(h)?d:{root:d,_v1x:1}))}var h=d.toUrl(a+".js");if(c[h])f.push(c[h]);else{var g=d.syncLoadNls(a);if(g)f.push(g);else if(q)q.get({url:h,sync:!0,load:b,error:function(){f.push(c[h]={})}});else try{d.getText(h,!0,b)}catch(r){f.push(c[h]={})}}});b&&b.apply(null,f)},x=function(a){for(var d,
53f=a.split("/"),h=b.global[f[0]],g=1;h&&g<f.length-1;h=h[f[g++]]);h&&((d=h[f[g]])||(d=h[f[g].replace(/-/g,"_")]),d&&(c[a]=d));return d};a.getLocalization=function(a,c,b){var d;a=h(a,c,b);u(a,!l.isXdUrl(l.toUrl(a+".js"))?function(a,c){O(a,c,l)}:l,function(a){d=a});return d};e("dojo-unit-tests")&&s.push(function(a){a.register("tests.i18n.unit",function(a){var c;c=I("{prop:1}",x,"nonsense",C);a.is({prop:1},c);a.is(void 0,c[1]);c=I("({prop:1})",x,"nonsense",C);a.is({prop:1},c);a.is(void 0,c[1]);c=I("{'prop-x':1}",
54x,"nonsense",C);a.is({"prop-x":1},c);a.is(void 0,c[1]);c=I("({'prop-x':1})",x,"nonsense",C);a.is({"prop-x":1},c);a.is(void 0,c[1]);c=I("define({'prop-x':1})",x,"nonsense",C);a.is(C,c);a.is({"prop-x":1},C.result);c=I("define('some/module', {'prop-x':1})",x,"nonsense",C);a.is(C,c);a.is({"prop-x":1},C.result);c=I("this is total nonsense and should throw an error",x,"nonsense",C);a.is(c instanceof Error,!0)})});
54return n.mixin(a,{dynamic:!0,normalize:function(a,c){return/^\./.test(a)?c(a):a},load:u,cache:c,
55getL10nName:r})})},"dojo/promise/tracer":function(){define(["../_base/lang","./Promise","../Evented"],function(b,l,e){function p(b){setTimeout(function(){n.apply(m,b)},0)}var m=new e,n=m.emit;m.emit=null;l.prototype.trace=function(){var e=b._toArray(arguments);this.then(function(b){p(["resolved",b].concat(e))},function(b){p(["rejected",b].concat(e))},function(b){p(["progress",b].concat(e))});return this};l.prototype.traceRejected=function(){var e=b._toArray(arguments);this.otherwise(function(b){p(["rejected",
56b].concat(e))});return this};return m})},"dojo/errors/RequestError":function(){define(["./create"],function(b){return b("RequestError",function(b,e){this.response=e})})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(b,l,e,p,m,n,q,k){b.byId=l.byId;b.isDescendant=l.isDescendant;b.setSelectable=l.setSelectable;b.getAttr=p.get;b.setAttr=p.set;b.hasAttr=p.has;b.removeAttr=p.remove;b.getNodeProp=
57p.getNodeProp;b.attr=function(b,a,f){return 2==arguments.length?p["string"==typeof a?"get":"set"](b,a):p.set(b,a,f)};b.hasClass=n.contains;b.addClass=n.add;b.removeClass=n.remove;b.toggleClass=n.toggle;b.replaceClass=n.replace;b._toDom=b.toDom=q.toDom;b.place=q.place;b.create=q.create;b.empty=function(b){q.empty(b)};b._destroyElement=b.destroy=function(b){q.destroy(b)};b._getPadExtents=b.getPadExtents=k.getPadExtents;b._getBorderExtents=b.getBorderExtents=k.getBorderExtents;b._getPadBorderExtents=
58b.getPadBorderExtents=k.getPadBorderExtents;b._getMarginExtents=b.getMarginExtents=k.getMarginExtents;b._getMarginSize=b.getMarginSize=k.getMarginSize;b._getMarginBox=b.getMarginBox=k.getMarginBox;b.setMarginBox=k.setMarginBox;b._getContentBox=b.getContentBox=k.getContentBox;b.setContentSize=k.setContentSize;b._isBodyLtr=b.isBodyLtr=k.isBodyLtr;b._docScroll=b.docScroll=k.docScroll;b._getIeDocumentElementOffset=b.getIeDocumentElementOffset=k.getIeDocumentElementOffset;b._fixIeBiDiScrollLeft=b.fixIeBiDiScrollLeft=
59k.fixIeBiDiScrollLeft;b.position=k.position;b.marginBox=function(b,a){return a?k.setMarginBox(b,a):k.getMarginBox(b)};b.contentBox=function(b,a){return a?k.setContentSize(b,a):k.getContentBox(b)};b.coords=function(g,a){b.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");g=l.byId(g);var f=e.getComputedStyle(g),f=k.getMarginBox(g,f),d=k.position(g,a);f.x=d.x;f.y=d.y;return f};b.getProp=m.get;b.setProp=m.set;b.prop=function(b,a,f){return 2==arguments.length?m["string"==typeof a?
60"get":"set"](b,a):m.set(b,a,f)};b.getStyle=e.get;b.setStyle=e.set;b.getComputedStyle=e.getComputedStyle;b.__toPixelValue=b.toPixelValue=e.toPixelValue;b.style=function(b,a,f){switch(arguments.length){case 1:return e.get(b);case 2:return e["string"==typeof a?"get":"set"](b,a)}return e.set(b,a,f)};return b})},"dojo/_base/kernel":function(){define(["../has","./config","require","module"],function(b,l,e,p){var m,n;m=function(){return this}();var q={},k={},g={config:l,global:m,dijit:q,dojox:k},q={dojo:["dojo",
61g],dijit:["dijit",q],dojox:["dojox",k]};p=e.map&&e.map[p.id.match(/[^\/]+/)[0]];for(n in p)q[n]?q[n][0]=p[n]:q[n]=[p[n],{}];for(n in q)p=q[n],p[1]._scopeName=p[0],l.noGlobals||(m[p[0]]=p[1]);g.scopeMap=q;g.baseUrl=g.config.baseUrl=e.baseUrl;g.isAsync=e.async;g.locale=l.locale;m="$Rev: f4fef70 $".match(/[0-9a-f]{7,}/);g.version={major:1,minor:10,patch:4,flag:"",revision:m?m[0]:NaN,toString:function(){var a=g.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+")"}};Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(g);
62g.exit=function(){};"undefined"!=typeof console||(console={});p="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var a;for(m=0;a=p[m++];)console[a]||function(){var b=a+"";console[b]="log"in console?function(){var a=Array.prototype.slice.call(arguments);a.unshift(b+":");console.log(a.join(" "))}:function(){};console[b]._fake=!0}();b.add("dojo-debug-messages",!!l.isDebug);g.deprecated=g.experimental=function(){};b("dojo-debug-messages")&&
63(g.deprecated=function(a,b,c){a="DEPRECATED: "+a;b&&(a+=" "+b);c&&(a+=" -- will be removed in version: "+c);console.warn(a)},g.experimental=function(a,b){var c="EXPERIMENTAL: "+a+" -- APIs subject to change without notice.";b&&(c+=" "+b);console.warn(c)});if(l.modulePaths){g.deprecated("dojo.modulePaths","use paths configuration");b={};for(n in l.modulePaths)b[n.replace(/\./g,"/")]=l.modulePaths[n];e({paths:b})}g.moduleUrl=function(a,b){g.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var c=
64null;a&&(c=e.toUrl(a.replace(/\./g,"/")+(b?"/"+b:"")+"/*.*").replace(/\/\*\.\*/,"")+(b?"":"/"));return c};g._hasResource={};return g})},"dojo/io-query":function(){define(["./_base/lang"],function(b){var l={};return{objectToQuery:function(e){var p=encodeURIComponent,m=[],n;for(n in e){var q=e[n];if(q!=l[n]){var k=p(n)+"\x3d";if(b.isArray(q))for(var g=0,a=q.length;g<a;++g)m.push(k+p(q[g]));else m.push(k+p(q))}}return m.join("\x26")},queryToObject:function(e){var l=decodeURIComponent;e=e.split("\x26");
65for(var m={},n,q,k=0,g=e.length;k<g;++k)if(q=e[k],q.length){var a=q.indexOf("\x3d");0>a?(n=l(q),q=""):(n=l(q.slice(0,a)),q=l(q.slice(a+1)));"string"==typeof m[n]&&(m[n]=[m[n]]);b.isArray(m[n])?m[n].push(q):m[n]=q}return m}}})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(b,l,e,p,m,n,q){var k=function(){},g=Object.freeze||function(){},a=b.Deferred=function(b){function d(a){if(r)throw Error("This deferred has already been resolved");
66h=a;r=!0;c()}function c(){for(var a;!a&&y;){var c=y;y=y.next;if(a=c.progress==k)r=!1;var b=u?c.error:c.resolved;m("config-useDeferredInstrumentation")&&u&&l.instrumentRejected&&l.instrumentRejected(h,!!b);if(b)try{var d=b(h);d&&"function"===typeof d.then?d.then(n.hitch(c.deferred,"resolve"),n.hitch(c.deferred,"reject"),n.hitch(c.deferred,"progress")):(b=a&&void 0===d,a&&!b&&(u=d instanceof Error),c.deferred[b&&u?"reject":"resolve"](b?h:d)
66)}catch(f){c.deferred.reject(f)}else u?c.deferred.reject(h):
67c.deferred.resolve(h)}}var h,r,t,q,u,s,y,A=this.promise=new e;this.isResolved=A.isResolved=function(){return 0==q};this.isRejected=A.isRejected=function(){return 1==q};this.isFulfilled=A.isFulfilled=function(){return 0<=q};this.isCanceled=A.isCanceled=function(){return t};this.resolve=this.callback=function(a){this.fired=q=0;this.results=[a,null];d(a)};this.reject=this.errback=function(a){u=!0;this.fired=q=1;m("config-useDeferredInstrumentation")&&l.instrumentRejected&&l.instrumentRejected(a,!!y);
68d(a);this.results=[null,a]};this.progress=function(a){for(var c=y;c;){var b=c.progress;b&&b(a);c=c.next}};this.addCallbacks=function(a,c){this.then(a,c,k);return this};A.then=this.then=function(b,d,f){var h=f==k?this:new a(A.cancel);b={resolved:b,error:d,progress:f,deferred:h};y?s=s.next=b:y=s=b;r&&c();return h.promise};var w=this;A.cancel=this.cancel=function(){if(!r){var a=b&&b(w);r||(a instanceof Error||(a=new p(a)),a.log=!1,w.reject(a))}t=!0};g(A)};n.extend(a,{addCallback:function(a){return this.addCallbacks(n.hitch.apply(b,
69arguments))},addErrback:function(a){return this.addCallbacks(null,n.hitch.apply(b,arguments))},addBoth:function(a){var d=n.hitch.apply(b,arguments);return this.addCallbacks(d,d)},fired:-1});a.when=b.when=q;return a})},"dojo/NodeList-dom":function(){define("./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),function(b,l,e,p,m,n,q,k,g){function a(a){return function(c,b,d){return 2==arguments.length?a["string"==typeof b?"get":
70"set"](c,b):a.set(c,b,d)}}var f=function(a){return 1==a.length&&"string"==typeof a[0]},d=function(a){var c=a.parentNode;c&&c.removeChild(a)},c=l.NodeList,h=c._adaptWithCondition,r=c._adaptAsForEach,t=c._adaptAsMap;p.extend(c,{_normalize:function(a,c){var d=!0===a.parse;if("string"==typeof a.template){var f=a.templateFunc||b.string&&b.string.substitute;a=f?f(a.template,a):a}f=typeof a;"string"==f||"number"==f?(a=n.toDom(a,c&&c.ownerDocument),a=11==a.nodeType?p._toArray(a.childNodes):[a]):p.isArrayLike(a)?
71p.isArray(a)||(a=p._toArray(a)):a=[a];d&&(a._runParse=!0);return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,c,d,f){if(!(1!=c.nodeType&&"only"==d))for(var h,g=a.length,r=g-1;0<=r;r--){var e=f?this._cloneNode(a[r]):a[r];if(a._runParse&&b.parser&&b.parser.parse){h||(h=c.ownerDocument.createElement("div"));h.appendChild(e);b.parser.parse(h);for(e=h.firstChild;h.firstChild;)h.removeChild(h.firstChild)}r==g-1?n.place(e,c,d):c.parentNode.insertBefore(e,c);c=e}},position:t(q.position),
72attr:h(a(k),f),style:h(a(g),f),addClass:r(m.add),removeClass:r(m.remove),toggleClass:r(m.toggle),replaceClass:r(m.replace),empty:r(n.empty),removeAttr:r(k.remove),marginBox:t(q.getMarginBox),place:function(a,c){var b=l(a)[0];return this.forEach(function(a){n.place(a,b,c)})},orphan:function(a){return(a?l._filterResult(this,a):this).forEach(d)},adopt:function(a,c){return l(a).place(this[0],c)._stash(this)},query:function(a){if(!a)return this;var b=new c;this.map(function(c){l(a,c).forEach(function(a){void 0!==
73a&&b.push(a)})});return b._stash(this)},filter:function(a){var c=arguments,b=this,d=0;if("string"==typeof a){b=l._filterResult(this,c[0]);if(1==c.length)return b._stash(this);d=1}return this._wrap(e.filter(b,c[d],c[d+1]),this)},addContent:function(a,c){a=this._normalize(a,this[0]);for(var b=0,d;d=this[b];b++)a.length?this._place(a,d,c,0<b):n.empty(d);return this}});return c})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),
74function(b,l,e,p,m,n,q,k){function g(a,c){var b=function(b,d){if("string"==typeof d&&(d=e.byId(d),!d))return new c([]);var f="string"==typeof b?a(b,d):b?b.end&&b.on?b:[b]:[];return f.end&&f.on?f:new c(f)};b.matches=a.match||function(a,c,d){return 0<b.filter([a],c,d).length};b.filter=a.filter||function(a,c,d){return b(c,d).filter(function(c){return-1<m.indexOf(a,c)})};if("function"!=typeof a){var d=a.search;a=function(a,c){return d(c||document,a)}}return b}l.add("array-extensible",function(){return 1==
75n.delegate([],{length:1}).length&&!l("bug-for-in-skips-shadowed")});var a=Array.prototype,f=a.slice,d=a.concat,c=m.forEach,h=function(a,c,d){c=[0].concat(f.call(c,0));d=d||b.global;return function(b){c[0]=b;return a.apply(d,c)}},r=function(a){var c=this instanceof t&&l("array-extensible");
75"number"==typeof a&&(a=Array(a));var b=a&&"length"in a?a:arguments;if(c||!b.sort){for(var d=c?this:[],f=d.length=b.length,h=0;h<f;h++)d[h]=b[h];if(c)return d;b=d}n._mixin(b,v);b._NodeListCtor=function(a){return t(a)};
76return b},t=r,v=t.prototype=l("array-extensible")?[]:{};t._wrap=v._wrap=function(a,c,b){a=new (b||this._NodeListCtor||t)(a);return c?a._stash(c):a};t._adaptAsMap=function(a,c){return function(){return this.map(h(a,arguments,c))}};t._adaptAsForEach=function(a,c){return function(){this.forEach(h(a,arguments,c));return this}};t._adaptAsFilter=function(a,c){return function(){return this.filter(h(a,arguments,c))}};t._adaptWithCondition=function(a,c,d){return function(){var f=arguments,g=h(a,f,d);if(c.call(d||
77b.global,f))return this.map(g);this.forEach(g);return this}};c(["slice","splice"],function(c){var b=a[c];v[c]=function(){return this._wrap(b.apply(this,arguments),"slice"==c?this:null)}});c(["indexOf","lastIndexOf","every","some"],function(a){var c=m[a];v[a]=function(){return c.apply(b,[this].concat(f.call(arguments,0)))}});n.extend(r,{constructor:t,_NodeListCtor:t,toString:function(){return this.join(",")},_stash:function(a){this._parent=a;return this},on:function(a,c){var b=this.map(function(b){return p(b,
78a,c)});b.remove=function(){for(var a=0;a<b.length;a++)b[a].remove()};return b},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(a){var c=f.call(this,0),b=m.map(arguments,function(a){return f.call(a,0)});return this._wrap(d.apply(c,b),this)},map:function(a,c){return this._wrap(m.map(this,a,c),this)},forEach:function(a,b){c(this,a,b);return this},filter:function(a){var c=arguments,b=this,d=0;if("string"==typeof a){b=u._filterResult(this,c[0]);if(1==c.length)return b._stash(this);
79d=1}return this._wrap(m.filter(b,c[d],c[d+1]),this)},instantiate:function(a,c){var b=n.isFunction(a)?a:n.getObject(a);c=c||{};return this.forEach(function(a){new b(c,a)})},at:function(){var a=new this._NodeListCtor(0);c(arguments,function(c){0>c&&(c=this.length+c);this[c]&&a.push(this[c])},this);return a._stash(this)}});var u=g(k,r);b.query=g(k,function(a){return r(a)});u.load=function(a,c,b){q.load(a,c,function(a){b(g(a,r))})};b._filterQueryResult=u._filterResult=function(a,c,b){return new r(u.filter(a,
80c,b))};b.NodeList=u.NodeList=r;return u})},"dojo/has":function(){define(["require","module"],function(b,l){var e=b.has||function(){};if(!e("dojo-has-api")){var p="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document,m=function(){return this}(),n=p&&document,q=n&&n.createElement("DiV"),k=l.config&&l.config()||{},e=function(b){return"function"==typeof k[b]?k[b]=k[b](m,n,q):k[b]};e.cache=k;e.add=function(b,a,f,d){("undefined"==
81typeof k[b]||d)&&(k[b]=a);return f&&e(b)}}e.add("dom-addeventlistener",!!document.addEventListener);e.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints);e.add("touch-events","ontouchstart"in document);e.add("pointer-events","onpointerdown"in document);e.add("MSPointer","msMaxTouchPoints"in navigator);e.add("device-width",screen.availWidth||innerWidth);p=document.createElement("form");e.add("dom-attributes-explicit",0==
82p.attributes.length);e.add("dom-attributes-specified-flag",0<p.attributes.length&&40>p.attributes.length);e.clearElement=function(b){b.innerHTML="";return b};e.normalize=function(b,a){var f=b.match(/[\?:]|[^:\?]*/g),d=0,c=function(a){var b=f[d++];if(":"==b)return 0;if("?"==f[d++]){if(!a&&e(b))return c();c(!0);return c(a)}return b||0};return(b=c())&&a(b)};e.load=function(b,a,f){b?a([b],f):f()};return e})},"dojo/_base/loader":function(){define("./kernel ../has require module ../json ./lang ./array".split(" "),
83function(b,l,e,p,m,n,q){var k=function(a){return a.replace(/\./g,"/")},g=/\/\/>>built/,a=[],f=[],d=function(b,d,h){a.push(h);q.forEach(b.split(","),function(a){a=K(a,d.module);f.push(a);S(a)});c()},c=function(){var c,b;for(b in O)if(c=O[b],void 0===c.noReqPluginCheck&&(c.noReqPluginCheck=/loadInit\!/.test(b)||/require\!/.test(b)?1:0),!c.executed&&!c.noReqPluginCheck&&c.injected==A)return;N(function(){var c=a;a=[];q.forEach(c,function(a){a(1)})})},h=function(a,c,d){var f=/\(|\)/g,h=1;for(f.lastIndex=
84c;(c=f.exec(a))&&!(h=")"==c[0]?h-1:h+1,0==h););
84if(0!=h)throw"unmatched paren around character "+f.lastIndex+" in: "+a;return[b.trim(a.substring(d,f.lastIndex))+";\n",f.lastIndex]},r=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,t=/(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg,v=/(^|\s)(require|define)\s*\(/m,u=function(a,c){var b,d,f,g=[],e=[];b=[];for(c=c||a.replace(r,function(a){t.lastIndex=v.lastIndex=0;return t.test(a)||v.test(a)?"":a});b=t.exec(c);)d=
85t.lastIndex,f=d-b[0].length,d=h(c,d,f),"loadInit"==b[2]?g.push(d[0]):e.push(d[0]),t.lastIndex=d[1];b=g.concat(e);return b.length||!v.test(c)?[a.replace(/(^|\s)dojo\.loadInit\s*\(/g,"\n0 \x26\x26 dojo.loadInit("),b.join(""),b]:0},s=e.initSyncLoader(d,c,function(a,c){var b,d,f=[],h=[];if(g.test(c)||!(b=u(c)))return 0;d=a.mid+"-*loadInit";for(var e in K("dojo",a).result.scopeMap)f.push(e),h.push('"'+e+'"');return"// xdomain rewrite of "+a.mid+"\ndefine('"+d+"',{\n\tnames:"+m.stringify(f)+",\n\tdef:function("+
86f.join(",")+"){"+b[1]+"}});\n\ndefine("+m.stringify(f.concat(["dojo/loadInit!"+d]))+", function("+f.join(",")+"){\n"+b[0]+"});"}),y=s.sync,A=s.requested,w=s.arrived,F=s.nonmodule,x=s.executing,C=s.executed,I=s.syncExecStack,O=s.modules,P=s.execQ,K=s.getModule,S=s.injectModule,B=s.setArrived,G=s.signal,M=s.finishExec,E=s.execModule,D=s.getLegacyMode,N=s.guardCheckComplete,d=s.dojoRequirePlugin;b.provide=function(a){var c=I[0],b=n.mixin(K(k(a),e.module),{executed:x,result:n.getObject(a,!0)});B(b);c&&
87(c.provides||(c.provides=[])).push(function(){b.result=n.getObject(a);delete b.provides;b.executed!==C&&M(b)});return b.result};l.add("config-publishRequireResult",1,0,0);b.require=function(a,c){var b=function(a,c){var b=K(k(a),e.module);if(I.length&&I[0].finish)I[0].finish.push(a);else{if(b.executed)return b.result;c&&(b.result=F);var d=D();S(b);d=D();b.executed!==C&&b.injected===w&&s.guardCheckComplete(function(){E(b)});if(b.executed)return b.result;d==y?b.cjs?P.unshift(b):I.length&&(I[0].finish=
88[a]):P.push(b)}}(a,c);l("config-publishRequireResult")&&(!n.exists(a)&&void 0!==b)&&n.setObject(a,b);return b};b.loadInit=function(a){a()};b.registerModulePath=function(a,c){var b={};b[a.replace(/\./g,"/")]=c;e({paths:b})};b.platformRequire=function(a){a=(a.common||[]).concat(a[b._name]||a["default"]||[]);for(var c;a.length;)n.isArray(c=a.shift())?b.require.apply(b,c):b.require(c)};b.requireIf=b.requireAfterIf=function(a,c,d){a&&b.require(c,d)};b.requireLocalization=function(a,c,b){e(["../i18n"],
89function(d){d.getLocalization(a,c,b)})};return{extractLegacyApiApplications:u,require:d,loadInit:function(a,c,f){c([a],function(a){c(a.names,function(){for(var h="",g=[],e=0;e<arguments.length;e++)h+="var "+a.names[e]+"\x3d arguments["+e+"]; ",g.push(arguments[e]);eval(h);var r=c.module,n=[],m,h={provide:function(a){a=k(a);a=K(a,r);a!==r&&B(a)},require:function(a,c){a=k(a);c&&(K(a,r).result=F);n.push(a)},requireLocalization:function(a,c,d){m||(m=["dojo/i18n"]);d=(d||b.locale).toLowerCase();a=k(a)+
90"/nls/"+(/root/i.test(d)?"":d+"/")+k(c);K(a,r).isXd&&m.push("dojo/i18n!"+a)},loadInit:function(a){a()}},e={},t;try{for(t in h)e[t]=b[t],b[t]=h[t];a.def.apply(null,g)}catch(q){G("error",[{src:p.id,id:"failedDojoLoadInit"},q])}finally{for(t in h)b[t]=e[t]}m&&(n=n.concat(m));n.length?d(n.join(","),c,f):f()})})}}})},"dojo/json":function(){define(["./has"],function(b){var l="undefined"!=typeof JSON;b.add("json-parse",l);b.add("json-stringify",l&&'{"a":1}'==JSON.stringify({a:0},function(b,e){return e||
911}));if(b("json-stringify"))return JSON;var e=function(b){return('"'+b.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:b("json-parse")?JSON.parse:function(b,e){if(e&&!/^([\s\[\{]*(?:"(?:\\.|[^"])*"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(b))throw new SyntaxError("Invalid characters in JSON");return eval("("+b+")")},stringify:function(b,m,n){function q(b,
92a,f){m&&(b=m(f,b));var d;d=typeof b;if("number"==d)return isFinite(b)?b+"":"null";if("boolean"==d)return b+"";if(null===b)return"null";if("string"==typeof b)return e(b);if("function"==d||"undefined"==d)return k;if("function"==typeof b.toJSON)return q(b.toJSON(f),a,f);if(b instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(a,c,d){a=b["getUTC"+c]()+(d?1:0);return 10>a?"0"+a:a});if(b.valueOf()!==b)return q(b.valueOf(),a,f);var c=n?a+n:
93"",h=n?" ":"",r=n?"\n":"";if(b instanceof Array){var h=b.length,t=[];for(f=0;f<h;
93f++)d=q(b[f],c,f),"string"!=typeof d&&(d="null"),t.push(r+c+d);return"["+t.join(",")+r+a+"]"}t=[];for(f in b){var l;if(b.hasOwnProperty(f)){if("number"==typeof f)l='"'+f+'"';else if("string"==typeof f)l=e(f);else continue;d=q(b[f],c,f);"string"==typeof d&&t.push(r+c+l+":"+h+d)}}return"{"+t.join(",")+r+a+"}"}var k;"string"==typeof m&&(n=m,m=null);return q(b,"","")}}})},"dojo/_base/declare":function(){define(["./kernel",
94"../has","./lang"],function(b,l,e){function p(a,c){throw Error("declare"+(c?" "+c:"")+": "+a);}function m(a,c,b){var d,f,h,e,r,g,k,n=this._inherited=this._inherited||{};"string"==typeof a&&(d=a,a=c,c=b);b=0;e=a.callee;(d=d||e.nom)||p("can't deduce a name to call inherited()",this.declaredClass);r=this.constructor._meta;h=r.bases;k=n.p;if(d!=x){if(n.c!==e&&(k=0,g=h[0],r=g._meta,r.hidden[d]!==e)){(f=r.chains)&&"string"==typeof f[d]&&p("calling chained method with inherited: "+d,this.declaredClass);
95do if(r=g._meta,f=g.prototype,r&&(f[d]===e&&f.hasOwnProperty(d)||r.hidden[d]===e))break;while(g=h[++k]);k=g?k:-1}if(g=h[++k])if(f=g.prototype,g._meta&&f.hasOwnProperty(d))b=f[d];else{e=y[d];do if(f=g.prototype,(b=f[d])&&(g._meta?f.hasOwnProperty(d):b!==e))break;while(g=h[++k])}b=g&&b||y[d]}else{if(n.c!==e&&(k=0,(r=h[0]._meta)&&r.ctor!==e)){f=r.chains;for((!f||"manual"!==f.constructor)&&p("calling chained constructor with inherited",this.declaredClass);(g=h[++k])&&!((r=g._meta)&&r.ctor===e););k=g?
96k:-1}for(;(g=h[++k])&&!(b=(r=g._meta)?r.ctor:g););b=g&&b}n.c=b;n.p=k;if(b)return!0===c?b:b.apply(this,c||a)}function n(a,c){return"string"==typeof a?this.__inherited(a,c,!0):this.__inherited(a,!0)}function q(a,c,b){var d=this.getInherited(a,c);if(d)return d.apply(this,b||c||a)}function k(a){for(var c=this.constructor._meta.bases,b=0,d=c.length;b<d;++b)if(c[b]===a)return!0;return this instanceof a}function g(a,c){for(var b in c)b!=x&&c.hasOwnProperty(b)&&(a[b]=c[b]);if(l("bug-for-in-skips-shadowed"))for(var d=
97e._extraNames,f=d.length;f;)b=d[--f],b!=x&&c.hasOwnProperty(b)&&(a[b]=c[b])}function a(a){u.safeMixin(this.prototype,a);return this}function f(a,c){a instanceof Array||"function"==typeof a||(c=a,a=void 0);c=c||{};a=a||[];return u([this].concat(a),c)}function d(a,c){return function(){var b=arguments,d=b,f=b[0],h,e;e=a.length;var g;if(!(this instanceof b.callee))return v(b);if(c&&(f&&f.preamble||this.preamble)){g=Array(a.length);g[0]=b;for(h=0;;){if(f=b[0])(f=f.preamble)&&(b=f.apply(this,b)||b);f=a[h].prototype;
98(f=f.hasOwnProperty("preamble")&&f.preamble)&&(b=f.apply(this,b)||b);if(++h==e)break;g[h]=b}}for(h=e-1;0<=h;--h)f=a[h],(f=(e=f._meta)?e.ctor:f)&&f.apply(this,g?g[h]:b);(f=this.postscript)&&f.apply(this,d)}}function c(a,c){return function(){var b=arguments,d=b,f=b[0];if(!(this instanceof b.callee))return v(b);c&&(f&&(f=f.preamble)&&(d=f.apply(this,d)||d),(f=this.preamble)&&f.apply(this,d));a&&a.apply(this,b);(f=this.postscript)&&f.apply(this,b)}}function h(a){return function(){var c=arguments,b=0,
99d,f;if(!(this instanceof c.callee))return v(c);for(;d=a[b];++b)if(d=(f=d._meta)?f.ctor:d){d.apply(this,c);break}(d=this.postscript)&&d.apply(this,c)}}function r(a,c,b){return function(){var d,f,h=0,e=1;b&&(h=c.length-1,e=-1);for(;d=c[h];h+=e)f=d._meta,(d=(f?f.hidden:d.prototype)[a])&&d.apply(this,arguments)}}function t(a){w.prototype=a.prototype;a=new w;w.prototype=null;return a}function v(a){var c=a.callee,b=t(c);c.apply(b,a);return b}function u(b,q,l){"string"!=typeof b&&(l=q,q=b,b="");l=l||{};
100var v,w,B,G,M,E,D,N=1,da=q;if("[object Array]"==A.call(q)){N=b;B=[];G=[{cls:0,refs:[]}];E={};for(var Y=1,$=q.length,L=0,J,T,z,H;L<$;++L){(J=q[L])?"[object Function]"!=A.call(J)&&p("mixin #"+L+" is not a callable constructor.",N):p("mixin #"+L+" is unknown. Did you use dojo.require to pull it in?",N);T=J._meta?J._meta.bases:[J];z=0;for(J=T.length-1;0<=J;--J)H=T[J].prototype,H.hasOwnProperty("declaredClass")||(H.declaredClass="uniqName_"+F++),H=H.declaredClass,E.hasOwnProperty(H)||(E[H]={count:0,refs:[],
101cls:T[J]},++Y),H=E[H],z&&z!==H&&(H.refs.push(z),++z.count),z=H;++z.count;G[0].refs.push(z)}for(;G.length;){z=G.pop();B.push(z.cls);for(--Y;w=z.refs,1==w.length;){z=w[0];if(!z||--z.count){z=0;break}B.push(z.cls);--Y}if(z){L=0;for($=w.length;L<$;++L)z=w[L],--z.count||G.push(z)}}Y&&p("can't build consistent linearization",N);J=q[0];B[0]=J?J._meta&&J===B[B.length-J._meta.bases.length]?J._meta.bases.length:1:0;E=B;B=E[0];N=E.length-B;q=E[N]}else E=[0],q?"[object Function]"==A.call(q)?(B=q._meta,E=E.concat(B?
102B.bases:q)):p("base class is not a callable constructor.",b):null!==q&&p("unknown base class. Did you use dojo.require to pull it in?",b);if(q)for(w=N-1;;--w){v=t(q);if(!w)break;B=E[w];(B._meta?g:s)(v,B.prototype);G=new Function;G.superclass=q;G.prototype=v;q=v.constructor=G}else v={};u.safeMixin(v,l);B=l.constructor;B!==y.constructor&&(B.nom=x,v.constructor=B);for(w=N-1;w;--w)(B=E[w]._meta)&&B.chains&&(D=s(D||{},B.chains));v["-chains-"]&&(D=s(D||{},v["-chains-"]));B=!D||!D.hasOwnProperty(x);E[0]=
103G=D&&"manual"===D.constructor?h(E):1==E.length?c(l.constructor,B):d(E,B);G._meta={bases:E,hidden:l,chains:D,parents:da,ctor:l.constructor};G.superclass=q&&q.prototype;G.extend=a;G.createSubclass=f;G.prototype=v;v.constructor=G;v.getInherited=n;v.isInstanceOf=k;v.inherited=C;v.__inherited=m;b&&(v.declaredClass=b,e.setObject(b,G));if(D)for(M in D)v[M]&&("string"==typeof D[M]&&M!=x)&&(B=v[M]=r(M,E,"after"===D[M]),B.nom=M);return G}var s=e.mixin,y=Object.prototype,A=y.toString,w=new Function,F=0,x="constructor",
104C=b.config.isDebug?q:m;b.safeMixin=u.safeMixin=function(a,c){var b,d;for(b in c)if(d=c[b],(d!==y[b]||!(b in y))&&b!=x)"[object Function]"==A.call(d)&&
104(d.nom=b),a[b]=d;if(l("bug-for-in-skips-shadowed"))for(var f=e._extraNames,h=f.length;h;)if(b=f[--h],d=c[b],(d!==y[b]||!(b in y))&&b!=x)"[object Function]"==A.call(d)&&(d.nom=b),a[b]=d;return a};return b.declare=u})},"dojo/dom":function(){define(["./sniff","./_base/window"],function(b,l){if(7>=b("ie"))try{document.execCommand("BackgroundImageCache",
105!1,!0)}catch(e){}var p={};b("ie")?p.byId=function(b,e){if("string"!=typeof b)return b;var k=e||l.doc,g=b&&k.getElementById(b);if(g&&(g.attributes.id.value==b||g.id==b))return g;k=k.all[b];if(!k||k.nodeName)k=[k];for(var a=0;g=k[a++];)if(g.attributes&&g.attributes.id&&g.attributes.id.value==b||g.id==b)return g}:p.byId=function(b,e){return("string"==typeof b?(e||l.doc).getElementById(b):b)||null};p.isDescendant=function(b,e){try{b=p.byId(b);for(e=p.byId(e);b;){if(b==e)return!0;b=b.parentNode}}catch(k){}return!1};
106b.add("css-user-select",function(b,e,k){if(!k)return!1;b=k.style;e=["Khtml","O","Moz","Webkit"];k=e.length;var g="userSelect";do if("undefined"!==typeof b[g])return g;while(k--&&(g=e[k]+"UserSelect"));return!1});var m=b("css-user-select");p.setSelectable=m?function(b,e){p.byId(b).style[m]=e?"":"none"}:function(b,e){b=p.byId(b);var k=b.getElementsByTagName("*"),g=k.length;if(e)for(b.removeAttribute("unselectable");g--;)k[g].removeAttribute("unselectable");else for(b.setAttribute("unselectable","on");g--;)k[g].setAttribute("unselectable",
107"on")};return p})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "),function(b){return b})},"dojo/selector/acme":function(){define(["../dom","../sniff","../_base/array","../_base/lang","../_base/window"],function(b,l,e,p,m){var n=p.trim,q=e.forEach,k="BackCompat"==m.doc.compatMode,g=!1,a=function(){return!0},f=function(a){a=0<="\x3e~+".indexOf(a.slice(-1))?
108a+" * ":a+" ";for(var c=function(c,b){return n(a.slice(c,b))},b=[],d=-1,f=-1,h=-1,e=-1,r=-1,k=-1,m=-1,t,q="",l="",p,u=0,x=a.length,s=null,v=null,y=function(){0<=k&&(s.id=c(k,u).replace(/\\/g,""),k=-1);if(0<=m){var a=m==u?null:c(m,u);s[0>"\x3e~+".indexOf(a)?"tag":"oper"]=a;m=-1}0<=r&&(s.classes.push(c(r+1,u).replace(/\\/g,"")),r=-1)};q=l,l=a.charAt(u),u<x;u++)if("\\"!=q)if(s||(p=u,s={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return g?this.otag:this.tag}},
109m=u),t)l==t&&(t=null);else if("'"==l||'"'==l)t=l;else if(0<=d)if("]"==l){v.attr?v.matchFor=c(h||d+1,u):v.attr=c(d+1,u);if((d=v.matchFor)&&('"'==d.charAt(0)||"'"==d.charAt(0)))v.matchFor=d.slice(1,-1);v.matchFor&&(v.matchFor=v.matchFor.replace(/\\/g,""));s.attrs.push(v);v=null;d=h=-1}else"\x3d"==l&&(h=0<="|~^$*".indexOf(q)?q:"",v.type=h+l,v.attr=c(d+1,u-h.length),h=u+1);else 0<=f?")"==l&&(0<=e&&(v.value=c(f+1,u)),e=f=-1):"#"==l?(y(),k=u+1):"."==l?(y(),r=u):":"==l?(y(),e=u):"["==l?(y(),d=u,v={}):"("==
110l?(0<=e&&(v={name:c(e+1,u),value:null},s.pseudos.push(v)),f=u):" "==l&&q!=l&&(y(),0<=e&&s.pseudos.push({name:c(e+1,u)}),s.loops=s.pseudos.length||s.attrs.length||s.classes.length,s.oquery=s.query=c(p,u),s.otag=s.tag=s.oper?null:s.tag||"*",s.tag&&(s.tag=s.tag.toUpperCase()),b.length&&b[b.length-1].oper&&(s.infixOper=b.pop(),s.query=s.infixOper.query+" "+s.query),b.push(s),s=null);return b},d=function(a,c){return!a?c:!c?a:function(){return a.apply(window,arguments)&&c.apply(window,arguments)}},c=function(a,
111c){var b=c||[];a&&b.push(a);return b},h=function(a){return 1==a.nodeType},r=function(a,c){return!a?"":"class"==c?a.className||"":"for"==c?a.htmlFor||"":"style"==c?a.style.cssText||"":(g?a.getAttribute(c):a.getAttribute(c,2))||""},t={"*\x3d":function(a,c){return function(b){return 0<=r(b,a).indexOf(c)}},"^\x3d":function(a,c){return function(b){return 0==r(b,a).indexOf(c)}},"$\x3d":function(a,c){return function(b){b=" "+r(b,a);var d=b.lastIndexOf(c);return-1<d&&d==b.length-c.length}},"~\x3d":function(a,
112c){var b=" "+c+" ";return function(c){return 0<=(" "+r(c,a)+" ").indexOf(b)}},"|\x3d":function(a,c){var b=c+"-";return function(d){d=r(d,a);return d==c||0==d.indexOf(b)}},"\x3d":function(a,c){return function(b){return r(b,a)==c}}},v="undefined"==typeof m.doc.firstChild.nextElementSibling,u=!v?"nextElementSibling":"nextSibling",s=!v?"previousElementSibling":"previousSibling",y=v?h:a,A=function(a){for(;a=a[s];)if(y(a))return!1;return!0},w=function(a){for(;a=a[u];)if(y(a))return!1;return!0},F=function(a){var c=
113a.parentNode,c=7!=c.nodeType?c:c.nextSibling,b=0,d=c.children||c.childNodes,f=a._i||a.getAttribute("_i")||-1,h=c._l||("undefined"!==typeof c.getAttribute?c.getAttribute("_l"):-1);if(!d)return-1;d=d.length;if(h==d&&0<=f&&0<=h)return f;l("ie")&&"undefined"!==typeof c.setAttribute?c.setAttribute("_l",d):c._l=d;f=-1;for(c=c.firstElementChild||c.firstChild;c;c=c[u])y(c)&&(l("ie")?c.setAttribute("_i",++b):c._i=++b,a===c&&(f=b));return f},x=function(a){return!(F(a)%2)},C=function(a){return F(a)%2},I={checked:function(a,
114c){return function(a){return!!("checked"in a?a.checked:a.selected)}},disabled:function(a,c){return function(a){return a.disabled}},enabled:function(a,c){return function(a){return!a.disabled}},"first-child":function(){return A},"last-child":function(){return w},"only-child":function(a,c){return function(a){return A(a)&&w(a)}},empty:function(a,c){return function(a){var c=a.childNodes;for(a=a.childNodes.length-1;0<=a;a--){var b=c[a].nodeType;if(1===b||3==b)return!1}return!0}},contains:function(a,c){var b=
115c.charAt(0);if('"'==b||"'"==b)c=c.slice(1,-1);return function(a){return 0<=a.innerHTML.indexOf(c)}},not:function(a,c){var b=f(c)[0],d={el:1};"*"!=b.tag&&(d.tag=1);b.classes.length||(d.classes=1);var h=P(b,d);return function(a){return!h(a)}},"nth-child":function(a,c){var b=parseInt;if("odd"==c)return C;if("even"==c)return x;if(-1!=c.indexOf("n")){var d=c.split("n",2),f=d[0]?"-"==d[0]?-1:b(d[0]):1,h=d[1]?b(d[1]):0,e=0,g=-1;0<f?0>h?h=h%f&&f+h%f:0<h&&(h>=f&&(e=h-h%f),h%=f):0>f&&(f*=-1,0<h&&(g=h,h%=f));
116if(0<f)return function(a){a=F(a);return a>=e&&(0>g||a<=g)&&a%f==h};c=h}var r=b(c);return function(a){return F(a)==r}}},O=9>l("ie")||9==l("ie")&&l("quirks")?function(a){var c=a.toLowerCase();"class"==c&&(a="className");return function(b){return g?b.getAttribute(a):b[a]||b[c]}}:function(a){return function(c){return c&&c.getAttribute&&c.hasAttribute(a)}},P=function(c,b){if(!c)return a;b=b||{};var f=null;"el"in b||(f=d(f,h));"tag"in b||"*"!=c.tag&&(f=d(f,function(a){return a&&(g?a.tagName:a.tagName.toUpperCase())==
117c.getTag()}));"classes"in b||q(c.classes,function(a,c,b){var h=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");f=d(f,function(a){return h.test(a.className)});f.count=c}
117);"pseudos"in b||q(c.pseudos,function(a){var c=a.name;I[c]&&(f=d(f,I[c](c,a.value)))});"attrs"in b||q(c.attrs,function(a){var c,b=a.attr;a.type&&t[a.type]?c=t[a.type](b,a.matchFor):b.length&&(c=O(b));c&&(f=d(f,c))});"id"in b||c.id&&(f=d(f,function(a){return!!a&&a.id==c.id}));f||"default"in b||(f=a);return f},K=function(a){return function(c,b,d){for(;c=
118c[u];)if(!v||h(c)){(!d||U(c,d))&&a(c)&&b.push(c);break}return b}},S=function(a){return function(c,b,d){for(c=c[u];c;){if(y(c)){if(d&&!U(c,d))break;a(c)&&b.push(c)}c=c[u]}return b}},B=function(c){c=c||a;return function(a,b,d){for(var f=0,h=a.children||a.childNodes;a=h[f++];)y(a)&&((!d||U(a,d))&&c(a,f))&&b.push(a);return b}},G={},M=function(d){var f=G[d.query];if(f)return f;var h=d.infixOper,h=h?h.oper:"",e=P(d,{el:1}),g="*"==d.tag,r=m.doc.getElementsByClassName;if(h)r={el:1},g&&(r.tag=1),e=P(d,r),
119"+"==h?f=K(e):"~"==h?f=S(e):"\x3e"==h&&(f=B(e));else if(d.id)e=!d.loops&&g?a:P(d,{el:1,id:1}),f=function(a,f){var h=b.byId(d.id,a.ownerDocument||a);if(h&&e(h)){if(9==a.nodeType)return c(h,f);for(var g=h.parentNode;g&&g!=a;)g=g.parentNode;if(g)return c(h,f)}};else if(r&&/\{\s*\[native code\]\s*\}/.test(String(r))&&d.classes.length&&!k)var e=P(d,{el:1,classes:1,id:1}),t=d.classes.join(" "),f=function(a,b,d){b=c(0,b);for(var f,h=0,g=a.getElementsByClassName(t);f=g[h++];)e(f,a)&&U(f,d)&&b.push(f);return b};
120else!g&&!d.loops?f=function(a,b,f){b=c(0,b);for(var h=0,e=d.getTag(),e=e?a.getElementsByTagName(e):[];a=e[h++];)U(a,f)&&b.push(a);return b}:(e=P(d,{el:1,tag:1,id:1}),f=function(a,b,f){b=c(0,b);for(var h,g=0,r=(h=d.getTag())?a.getElementsByTagName(h):[];h=r[g++];)e(h,a)&&U(h,f)&&b.push(h);return b});return G[d.query]=f},E={},D={},N=function(a){var b=f(n(a));if(1==b.length){var d=M(b[0]);return function(a){if(a=d(a,[]))a.nozip=!0;return a}}return function(a){a=c(a);for(var d,f,h=b.length,e,g,r=0;r<
121h;r++){g=[];d=b[r];f=a.length-1;0<f&&(e={},g.nozip=!0);f=M(d);for(var k=0;d=a[k];k++)f(d,g,e);if(!g.length)break;a=g}return g}},da=l("ie")?"commentStrip":"nozip",Y=!!m.doc.querySelectorAll,$=/\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g,L=function(a,c,b,d){return b?(c?c+" ":"")+b+(d?" "+d:""):a},J=/([^[]*)([^\]]*])?/g,T=function(a,c,b){return c.replace($,L)+(b||"")},z=function(a,c){a=a.replace(J,T);if(Y){var b=D[a];if(b&&!c)return b}if(b=E[a])return b;var b=a.charAt(0),d=-1==a.indexOf(" ");0<=a.indexOf("#")&&
122d&&(c=!0);if(Y&&!c&&-1=="\x3e~+".indexOf(b)&&(!l("ie")||-1==a.indexOf(":"))&&!(k&&0<=a.indexOf("."))&&-1==a.indexOf(":contains")&&-1==a.indexOf(":checked")&&-1==a.indexOf("|\x3d")){var f=0<="\x3e~+".indexOf(a.charAt(a.length-1))?a+" *":a;return D[a]=function(c){try{if(!(9==c.nodeType||d))throw"";var b=c.querySelectorAll(f);b[da]=!0;return b}catch(h){return z(a,!0)(c)}}}var h=a.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);return E[a]=2>h.length?N(a):function(a){for(var c=0,b=[],d;d=
123h[c++];)b=b.concat(N(d)(a));return b}},H=0,W=l("ie")?function(a){return g?a.getAttribute("_uid")||a.setAttribute("_uid",++H)||H:a.uniqueID}:function(a){return a._uid||(a._uid=++H)},U=function(a,c){if(!c)return 1;var b=W(a);return!c[b]?c[b]=1:0},ea=function(a){if(a&&a.nozip)return a;if(!a||!a.length)return[];if(2>a.length)return[a[0]];var c=[];H++;var b,d;if(l("ie")&&g){var f=H+"";for(b=0;b<a.length;b++)if((d=a[b])&&d.getAttribute("_zipIdx")!=f)c.push(d),d.setAttribute("_zipIdx",f)}else if(l("ie")&&
124a.commentStrip)try{for(b=0;b<a.length;b++)(d=a[b])&&h(d)&&c.push(d)}catch(e){}else for(b=0;b<a.length;b++)if((d=a[b])&&d._zipIdx!=H)c.push(d),d._zipIdx=H;return c},X=function(a,c){c=c||m.doc;g="div"===(c.ownerDocument||c).createElement("div").tagName;var b=z(a)(c);return b&&b.nozip?b:ea(b)};X.filter=function(a,c,d){for(var h=[],g=f(c),g=1==g.length&&!/[^\w#\.]/.test(c)?P(g[0]):function(a){return-1!=e.indexOf(X(c,b.byId(d)),a)},r=0,k;k=a[r];r++)g(k)&&h.push(k);return h};return X})},"dojo/errors/RequestTimeoutError":function(){define(["./create",
125"./RequestError"],function(b,l){return b("RequestTimeoutError",null,l,{dojoType:"timeout"})})},"dojo/dom-style":function(){define(["./sniff","./dom"],function(b,l){function e(c,d,e){d=d.toLowerCase();if(b("ie")||b("trident")){if("auto"==e){if("height"==d)return c.offsetHeight;if("width"==d)return c.offsetWidth}if("fontweight"==d)switch(e){case 700:return"bold";default:return"normal"}}d in a||(a[d]=f.test(d));return a[d]?n(c,e):e}var p,m={};p=b("webkit")?function(a){var b;if(1==a.nodeType){var d=a.ownerDocument.defaultView;
126b=d.getComputedStyle(a,null);!b&&a.style&&(a.style.display="",b=d.getComputedStyle(a,null))}return b||{}}:b("ie")&&(9>b("ie")||b("quirks"))?function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){return 1==a.nodeType?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};m.getComputedStyle=p;var n;n=b("ie")?function(a,b){if(!b)return 0;if("medium"==b)return 4;if(b.slice&&"px"==b.slice(-2))return parseFloat(b);var d=a.style,f=a.runtimeStyle,e=d.left,g=f.left;f.left=a.currentStyle.left;
127try{d.left=b,b=d.pixelLeft}catch(k){b=0}d.left=e;f.left=g;return b}:function(a,b){return parseFloat(b)||0};m.toPixelValue=n;var q=function(a,b){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(d){return b?{}:null}},k=9>b("ie")||10>b("ie")&&b("quirks")?function(a){try{return q(a).Opacity/100}catch(b){return 1}}:function(a){return p(a).opacity},g=9>b("ie")||10>b("ie")&&b("quirks")?function(a,b){""===b&&(b=1);var d=100*b;
1271===b?(a.style.zoom="",q(a)&&(a.style.filter=a.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,
128""))):(a.style.zoom=1,q(a)?q(a,1).Opacity=d:a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+d+")",q(a,1).Enabled=!0);if("tr"==a.tagName.toLowerCase())for(d=a.firstChild;d;d=d.nextSibling)"td"==d.tagName.toLowerCase()&&g(d,b);return b}:function(a,b){return a.style.opacity=b},a={left:!0,top:!0},f=/margin|padding|width|height|max|min|offset/,d={cssFloat:1,styleFloat:1,"float":1};m.get=function(a,b){var f=l.byId(a),g=arguments.length;if(2==g&&"opacity"==b)return k(f);b=d[b]?"cssFloat"in
129f.style?"cssFloat":"styleFloat":b;var n=m.getComputedStyle(f);return 1==g?n:e(f,b,n[b]||f.style[b])};m.set=function(a,b,f){var e=l.byId(a),k=arguments.length,n="opacity"==b;b=d[b]?"cssFloat"in e.style?"cssFloat":"styleFloat":b;if(3==k)return n?g(e,f):e.style[b]=f;for(var q in b)m.set(a,q,b[q]);return m.getComputedStyle(e)};return m})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(b,l,e,p){function m(a,b,d,c,h,e){e=e||"px";a=a.style;isNaN(b)||(a.left=
130b+e);isNaN(d)||(a.top=d+e);0<=c&&(a.width=c+e);0<=h&&(a.height=h+e)}function n(a){return"button"==a.tagName.toLowerCase()||"input"==a.tagName.toLowerCase()&&"button"==(a.getAttribute("type")||"").toLowerCase()}function q(a){return"border-box"==k.boxModel||"table"==a.tagName.toLowerCase()||n(a)}var k={boxModel:"content-box"};b("ie")&&(k.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");k.getPadExtents=function(a,b){a=e.byId(a);var d=b||p.getComputedStyle(a),c=p.toPixelValue,h=
131c(a,d.paddingLeft),g=c(a,d.paddingTop),k=c(a,d.paddingRight),d=c(a,d.paddingBottom);return{l:h,t:g,r:k,b:d,w:h+k,h:g+d}};k.getBorderExtents=function(a,b){a=e.byId(a);var d=p.toPixelValue,c=b||p.getComputedStyle(a),h="none"!=c.borderLeftStyle?d(a,c.borderLeftWidth):0,g="none"!=c.borderTopStyle?d(a,c.borderTopWidth):0,k="none"!=c.borderRightStyle?d(a,c.borderRightWidth):0,d="none"!=c.borderBottomStyle?d(a,c.borderBottomWidth):0;return{l:h,t:g,r:k,b:d,w:h+k,h:g+d}};k.getPadBorderExtents=function(a,b){a=
132e.byId(a);var d=b||p.getComputedStyle(a),c=k.getPadExtents(a,d),d=k.getBorderExtents(a,d);return{l:c.l+d.l,t:c.t+d.t,r:c.r+d.r,b:c.b+d.b,w:c.w+d.w,h:c.h+d.h}};k.getMarginExtents=function(a,b){a=e.byId(a);var d=b||p.getComputedStyle(a),c=p.toPixelValue,h=c(a,d.marginLeft),g=c(a,d.marginTop),k=c(a,d.marginRight),d=c(a,d.marginBottom);return{l:h,t:g,r:k,b:d,w:h+k,h:g+d}};k.getMarginBox=function(a,f){a=e.byId(a);var d=f||p.getComputedStyle(a),c=k.getMarginExtents(a,d),h=a.offsetLeft-c.l,g=a.offsetTop-
133c.t,m=a.parentNode,n=p.toPixelValue;if(b("mozilla")){var l=parseFloat(d.left),d=parseFloat(d.top);!isNaN(l)&&!isNaN(d)?(h=l,g=d):m&&m.style&&(m=p.getComputedStyle(m),"visible"!=m.overflow&&(h+="none"!=m.borderLeftStyle?n(a,m.borderLeftWidth):0,g+="none"!=m.borderTopStyle?n(a,m.borderTopWidth):0))}else if((b("opera")||8==b("ie")&&!b("quirks"))&&m)m=p.getComputedStyle(m),h-="none"!=m.borderLeftStyle?n(a,m.borderLeftWidth):0,g-="none"!=m.borderTopStyle?n(a,m.borderTopWidth):0;return{l:h,t:g,w:a.offsetWidth+
134c.w,h:a.offsetHeight+c.h}};k.getContentBox=function(a,f){a=e.byId(a);var d=f||p.getComputedStyle(a),c=a.clientWidth,h=k.getPadExtents(a,d),g=k.getBorderExtents(a,d);c?(d=a.clientHeight,g.w=g.h=0):(c=a.offsetWidth,d=a.offsetHeight);b("opera")&&(h.l+=g.l,h.t+=g.t);return{l:h.l,t:h.t,w:c-h.w-g.w,h:d-h.h-g.h}};k.setContentSize=function(a,b,d){a=e.byId(a);var c=b.w;b=b.h;q(a)&&(d=k.getPadBorderExtents(a,d),0<=c&&(c+=d.w),0<=b&&(b+=d.h));m(a,NaN,NaN,c,b)};var g={l:0,t:0,w:0,h:0};k.setMarginBox=function(a,
135f,d){a=e.byId(a);var c=d||p.getComputedStyle(a);d=f.w;var h=f.h,r=q(a)?g:k.getPadBorderExtents(a,c),c=k.getMarginExtents(a,c);if(b("webkit")&&n(a)){var l=a.style;0<=d&&!l.width&&(l.width="4px");0<=h&&!l.height&&(l.height="4px")}0<=d&&(d=Math.max(d-r.w-c.w,0));0<=h&&(h=Math.max(h-r.h-c.h,0));m(a,f.l,f.t,d,h)};k.isBodyLtr=function(a){a=a||l.doc;return"ltr"==(l.body(a).dir||a.documentElement.dir||"ltr").toLowerCase()};k.docScroll=function(a){a=a||l.doc;var f=l.doc.parentWindow||l.doc.defaultView;return"pageXOffset"in
136f?{x:f.pageXOffset,y:f.pageYOffset}:(f=b("quirks")?l.body(a):a.documentElement)&&{x:k.fixIeBiDiScrollLeft(f.scrollLeft||0,a),y:f.scrollTop||0}};b("ie")&&(k.getIeDocumentElementOffset=function(a){a=a||l.doc;a=a.documentElement;if(8>b("ie")){var f=a.getBoundingClientRect(),d=f.left,f=f.top;7>b("ie")&&(d+=a.clientLeft,f+=a.clientTop);return{x:0>d?0:d,y:0>f?0:f}}return{x:0,y:0}});k.fixIeBiDiScrollLeft=function(a,f){f=f||l.doc;var d=b("ie");if(d&&!k.isBodyLtr(f)){var c=b("quirks"),h=c?l.body(f):f.documentElement,
137e=l.global;6==d&&(!c&&e.frameElement&&h.scrollHeight>h.clientHeight)&&(a+=h.clientLeft);return 8>d||c?a+h.clientWidth-h.scrollWidth:-a}return a};k.position=function(a,f){a=e.byId(a);var d=l.body(a.ownerDocument),c=a.getBoundingClientRect(),c={x:c.left,y:c.top,w:c.right-c.left,h:c.bottom-c.top};if(9>b("ie")){var h=k.getIeDocumentElementOffset(a.ownerDocument);c.x-=h.x+(b("quirks")?d.clientLeft+d.offsetLeft:0);c.y-=h.y+(b("quirks")?d.clientTop+d.offsetTop:0)}f&&(d=k.docScroll(a.ownerDocument),c.x+=
138d.x,c.y+=d.y);return c};k.getMarginSize=function(a,b){a=e.byId(a);var d=k.getMarginExtents(a,b||p.getComputedStyle(a)),c=a.getBoundingClientRect();
138return{w:c.right-c.left+d.w,h:c.bottom-c.top+d.h}};k.normalizeEvent=function(a){"layerX"in a||(a.layerX=a.offsetX,a.layerY=a.offsetY);if(!b("dom-addeventlistener")){var f=a.target,f=f&&f.ownerDocument||document,d=b("quirks")?f.body:f.documentElement,c=k.getIeDocumentElementOffset(f);a.pageX=a.clientX+k.fixIeBiDiScrollLeft(d.scrollLeft||0,f)-c.x;a.pageY=
139a.clientY+(d.scrollTop||0)-c.y}};return k})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(b,l,e,p,m,n,q,k){function g(a){var b="";a=a.childNodes;for(var d=0,f;f=a[d];d++)8!=f.nodeType&&(b=1==f.nodeType?b+g(f):b+f.nodeValue);return b}var a={},f=0,d=l._scopeName+"attrid";e.add("dom-textContent",function(a,b,d){return"textContent"in d});b.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",
140readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};b.get=function(a,d){a=m.byId(a);var f=d.toLowerCase(),f=b.names[f]||d;return"textContent"==f&&!e("dom-textContent")?g(a):a[f]};b.set=function(c,h,g){c=m.byId(c);if(2==arguments.length&&"string"!=typeof h){for(var l in h)b.set(c,l,h[l]);return c}l=h.toLowerCase();l=b.names[l]||h;if("style"==l&&"string"!=typeof g)return n.set(c,g),c;if("innerHTML"==l)return e("ie")&&c.tagName.toLowerCase()in
141{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(q.empty(c),c.appendChild(q.toDom(g,c.ownerDocument))):c[l]=g,c;if("textContent"==l&&!e("dom-textContent"))return q.empty(c),c.appendChild(c.ownerDocument.createTextNode(g)),c;if(p.isFunction(g)){var v=c[d];v||(v=f++,c[d]=v);a[v]||(a[v]={});var u=a[v][l];if(u)k.disconnect(u);else try{delete c[l]}catch(s){}g?a[v][l]=k.connect(c,l,g):c[l]=null;return c}c[l]=g;return c}})},"dojo/when":function(){define(["./Deferred","./promise/Promise"],
142function(b,l){return function(e,p,m,n){var q=e&&"function"===typeof e.then,k=q&&e instanceof l;if(q)k||(q=new b(e.cancel),e.then(q.resolve,q.reject,q.progress),e=q.promise);else return 1<arguments.length?p?p(e):e:(new b).resolve(e);return p||m||n?e.then(p,m,n):e}})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(b,l,e,p,m,n){function q(a,b){var d=a.getAttributeNode&&a.getAttributeNode(b);return!!d&&d.specified}var k={innerHTML:1,textContent:1,
143className:1,htmlFor:l("ie"),value:1},g={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};b.has=function(a,b){var d=b.toLowerCase();return k[n.names[d]||b]||q(p.byId(a),g[d]||b)};b.get=function(a,b){a=p.byId(a);var d=b.toLowerCase(),c=n.names[d]||b,h=a[c];if(k[c]&&"undefined"!=typeof h)return h;if("textContent"==c)return n.get(a,c);if("href"!=c&&("boolean"==typeof h||e.isFunction(h)))return h;d=g[d]||b;return q(a,d)?a.getAttribute(d):null};b.set=function(a,f,d){a=p.byId(a);
144if(2==arguments.length){for(var c in f)b.set(a,c,f[c]);return a}c=f.toLowerCase();var h=n.names[c]||f,r=k[h];if("style"==h&&"string"!=typeof d)return m.set(a,d),a;if(r||"boolean"==typeof d||e.isFunction(d))return n.set(a,f,d);a.setAttribute(g[c]||f,d);return a};b.remove=function(a,b){p.byId(a).removeAttribute(g[b.toLowerCase()]||b)};b.getNodeProp=function(a,b){a=p.byId(a);var d=b.toLowerCase(),c=n.names[d]||b;if(c in a&&"href"!=c)return a[c];d=g[d]||b;return q(a,d)?a.getAttribute(d):null}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),
145function(b,l,e,p,m,n){function q(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)}function k(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(b){}for(var c;c=a.lastChild;)a.removeChild(c)}var g={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},a=/<\s*([\w\:]+)/,f={},d=0,c="__"+l._scopeName+"ToDomId",h;for(h in g)g.hasOwnProperty(h)&&
146(l=g[h],l.pre="option"==h?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+l.join("\x3e\x3c")+"\x3e",l.post="\x3c/"+l.reverse().join("\x3e\x3c/")+"\x3e");var r;8>=e("ie")&&(r=function(a){a.__dojo_html5_tested="yes";var b=t("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!==b.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,function(b){a.createElement(b)});
147v(b)});b.toDom=function(b,h){h=h||p.doc;var k=h[c];k||(h[c]=k=++d+"",f[k]=h.createElement("div"));8>=e("ie")&&!h.__dojo_html5_tested&&h.body&&r(h);b+="";var m=b.match(a),l=m?m[1].toLowerCase():"",k=f[k];if(m&&g[l]){m=g[l];k.innerHTML=m.pre+b+m.post;for(m=m.length;m;--m)k=k.firstChild}else k.innerHTML=b;if(1==k.childNodes.length)return k.removeChild(k.firstChild);for(l=h.createDocumentFragment();m=k.firstChild;)l.appendChild(m);return l};b.place=function(a,c,d){c=m.byId(c);"string"==typeof a&&(a=/^\s*</.test(a)?
148b.toDom(a,c.ownerDocument):m.byId(a));if("number"==typeof d){var f=c.childNodes;!f.length||f.length<=d?c.appendChild(a):q(a,f[0>d?0:d])}else switch(d){case "before":q(a,c);break;case "after":d=a;(f=c.parentNode)&&(f.lastChild==c?f.appendChild(d):f.insertBefore(d,c.nextSibling));break;case "replace":c.parentNode.replaceChild(a,c);break;case "only":b.empty(c);c.appendChild(a);break;case "first":if(c.firstChild){q(a,c.firstChild);break}default:c.appendChild(a)}return a};var t=b.create=function(a,c,d,
149f){var h=p.doc;d&&(d=m.byId(d),h=d.ownerDocument);"string"==typeof a&&(a=h.createElement(a));c&&n.set(a,c);d&&b.place(a,d,f);return a};b.empty=function(a){k(m.byId(a))};
149var v=b.destroy=function(a){if(a=m.byId(a)){var b=a;a=a.parentNode;b.firstChild&&k(b);a&&(e("ie")&&a.canHaveChildren&&"removeNode"in b?b.removeNode(!1):a.removeChild(b))}}})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(b,l,e,p,m){function n(a,c){var d=a.xhr;a.status=
150a.xhr.status;try{a.text=d.responseText}catch(f){}"xml"===a.options.handleAs&&(a.data=d.responseXML);if(!c)try{e(a)}catch(h){c=h}c?this.reject(c):p.checkStatus(d.status)?this.resolve(a):(c=new b("Unable to load "+a.url+" status: "+d.status,a),this.reject(c))}function q(a){return this.xhr.getResponseHeader(a)}function k(e,t,v){var A=m("native-formdata")&&t&&t.data&&t.data instanceof FormData,w=p.parseArgs(e,p.deepCreate(r,t),A);e=w.url;t=w.options;var F,x=p.deferred(w,c,a,f,n,function(){F&&F()}),C=
151w.xhr=k._create();if(!C)return x.cancel(new b("XHR was not created")),v?x:x.promise;w.getHeader=q;d&&(F=d(C,x,w));var I=t.data,O=!t.sync,P=t.method;try{C.open(P,e,O,t.user||h,t.password||h);t.withCredentials&&(C.withCredentials=t.withCredentials);m("native-response-type")&&t.handleAs in g&&(C.responseType=g[t.handleAs]);var K=t.headers;e=A?!1:"application/x-www-form-urlencoded";if(K)for(var S in K)"content-type"===S.toLowerCase()?e=K[S]:K[S]&&C.setRequestHeader(S,K[S]);e&&!1!==e&&C.setRequestHeader("Content-Type",
152e);(!K||!("X-Requested-With"in K))&&C.setRequestHeader("X-Requested-With","XMLHttpRequest");p.notify&&p.notify.emit("send",w,x.promise.cancel);C.send(I)}catch(B){x.reject(B)}l(x);C=null;return v?x:x.promise}m.add("native-xhr",function(){return"undefined"!==typeof XMLHttpRequest});m.add("dojo-force-activex-xhr",function(){return m("activex")&&!document.addEventListener&&"file:"===window.location.protocol});m.add("native-xhr2",function(){if(m("native-xhr")){var a=new XMLHttpRequest;return"undefined"!==
153typeof a.addEventListener&&("undefined"===typeof opera||"undefined"!==typeof a.upload)}});m.add("native-formdata",function(){return"undefined"!==typeof FormData});m.add("native-response-type",function(){return m("native-xhr")&&"undefined"!==typeof(new XMLHttpRequest).responseType});m.add("native-xhr2-blob",function(){if(m("native-response-type")){var a=new XMLHttpRequest;a.open("GET","/",!0);a.responseType="blob";var b=a.responseType;a.abort();return"blob"===b}});var g={blob:m("native-xhr2-blob")?
154"blob":"arraybuffer",document:"document",arraybuffer:"arraybuffer"},a,f,d,c;m("native-xhr2")?(a=function(a){return!this.isFulfilled()},c=function(a,b){b.xhr.abort()},d=function(a,c,d){function f(a){c.handleResponse(d)}function h(a){a=new b("Unable to load "+d.url+" status: "+a.target.status,d);c.handleResponse(d,a)}function e(a){a.lengthComputable?(d.loaded=a.loaded,d.total=a.total,c.progress(d)):3===d.xhr.readyState&&(d.loaded="loaded"in a?a.loaded:a.position,c.progress(d))}a.addEventListener("load",
155f,!1);a.addEventListener("error",h,!1);a.addEventListener("progress",e,!1);return function(){a.removeEventListener("load",f,!1);a.removeEventListener("error",h,!1);a.removeEventListener("progress",e,!1);a=null}}):(a=function(a){return a.xhr.readyState},f=function(a){return 4===a.xhr.readyState},c=function(a,b){var c=b.xhr,d=typeof c.abort;("function"===d||"object"===d||"unknown"===d)&&c.abort()});var h,r={data:null,query:null,sync:!1,method:"GET"};k._create=function(){throw Error("XMLHTTP not available");
156};if(m("native-xhr")&&!m("dojo-force-activex-xhr"))k._create=function(){return new XMLHttpRequest};else if(m("activex"))try{new ActiveXObject("Msxml2.XMLHTTP"),k._create=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(t){try{new ActiveXObject("Microsoft.XMLHTTP"),k._create=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(v){}}p.addCommonMethods(k);return k})},"dojo/text":function(){define(["./_base/kernel","require","./has","./request"],function(b,l,e,p){var m;m=function(a,
157b,d){p(a,{sync:!!b,headers:{"X-Requested-With":null}}).then(d)};var n={},q=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var b=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}else a="";return a},k={},g={};b.cache=function(a,b,d){var c;"string"==typeof a?/\//.test(a)?(c=a,d=b):c=l.toUrl(a.replace(/\./g,"/")+(b?"/"+b:"")):(c=a+"",d=b);a=void 0!=d&&"string"!=typeof d?d.value:d;d=d&&d.sanitize;if("string"==typeof a)return n[c]=a,d?q(a):a;if(null===
158a)return delete n[c],null;c in n||m(c,!0,function(a){n[c]=a});return d?q(n[c]):n[c]};return{dynamic:!0,normalize:function(a,b){var d=a.split("!"),c=d[0];return(/^\./.test(c)?b(c):c)+(d[1]?"!"+d[1]:"")},load:function(a,b,d){a=a.split("!");var c=1<a.length,h=a[0],e=b.toUrl(a[0]);a="url:"+e;var l=k,p=function(a){d(c?q(a):a)};
158h in n?l=n[h]:b.cache&&a in b.cache?l=b.cache[a]:e in n&&(l=n[e]);if(l===k)if(g[e])g[e].push(p);else{var u=g[e]=[p];m(e,!b.async,function(a){n[h]=n[e]=a;for(var b=0;b<u.length;)u[b++](a);
159delete g[e]})}else p(l)}}})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(b,l){return b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:l("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,
160NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:l("mac")&&!l("air")?l("safari")?91:224:17}})},"dojo/domReady":function(){define(["./has"],function(b){function l(a){g.push(a);k&&e()}function e(){if(!a){for(a=!0;g.length;)try{g.shift()(m)}catch(b){console.error(b,
161"in domReady callback",b.stack)}a=!1;l._onQEmpty()}}var p=function(){return this}
161(),m=document,n={loaded:1,complete:1},q="string"!=typeof m.readyState,k=!!n[m.readyState],g=[],a;l.load=function(a,b,c){l(c)};l._Q=g;l._onQEmpty=function(){};q&&(m.readyState="loading");if(!k){var f=[],d=function(a){a=a||p.event;k||"readystatechange"==a.type&&!n[m.readyState]||(q&&(m.readyState="complete"),k=1,e())},c=function(a,b){a.addEventListener(b,d,!1);g.push(function(){a.removeEventListener(b,d,!1)})};if(!b("dom-addeventlistener")){var c=
162function(a,b){b="on"+b;a.attachEvent(b,d);g.push(function(){a.detachEvent(b,d)})},h=m.createElement("div");try{h.doScroll&&null===p.frameElement&&f.push(function(){try{return h.doScroll("left"),1}catch(a){}})}catch(r){}}c(m,"DOMContentLoaded");c(p,"load");"onreadystatechange"in m?c(m,"readystatechange"):q||f.push(function(){return n[m.readyState]});if(f.length){var t=function(){if(!k){for(var a=f.length;a--;)if(f[a]()){d("poller");return}setTimeout(t,30)}};t()}}return l})},"dojo/_base/lang":function(){define(["./kernel",
163"../has","../sniff"],function(b,l){l.add("bug-for-in-skips-shadowed",function(){for(var a in{toString:1})return 0;return 1});var e=l("bug-for-in-skips-shadowed")?"hasOwnProperty valueOf isPrototypeOf propertyIsEnumerable toLocaleString toString constructor".split(" "):[],p=e.length,m=function(a,f,d){d||(d=a[0]&&b.scopeMap[a[0]]?b.scopeMap[a.shift()][1]:b.global);try{for(var c=0;c<a.length;c++){var h=a[c];if(!(h in d))if(f)d[h]={};else return;d=d[h]}return d}catch(e){}},n=Object.prototype.toString,
164q=function(a,b,d){return(d||[]).concat(Array.prototype.slice.call(a,b||0))},k=/\{([^\}]+)\}/g,g={_extraNames:e,_mixin:function(a,b,d){var c,h,g,k={};for(c in b)if(h=b[c],!(c in a)||a[c]!==h&&(!(c in k)||k[c]!==h))a[c]=d?d(h):h;if(l("bug-for-in-skips-shadowed")&&b)for(g=0;g<p;++g)if(c=e[g],h=b[c],!(c in a)||a[c]!==h&&(!(c in k)||k[c]!==h))a[c]=d?d(h):h;return a},mixin:function(a,b){a||(a={});for(var d=1,c=arguments.length;d<c;d++)g._mixin(a,arguments[d]);return a},setObject:function(a,b,d){var c=a.split(".");
165a=c.pop();return(d=m(c,!0,d))&&a?d[a]=b:void 0},getObject:function(a,b,d){return m(a?a.split("."):[],b,d)},exists:function(a,b){return void 0!==g.getObject(a,!1,b)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:function(a){return a&&(a instanceof Array||"array"==typeof a)},isFunction:function(a){return"[object Function]"===n.call(a)},isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||g.isArray(a)||g.isFunction(a))},isArrayLike:function(a){return a&&
166void 0!==a&&!g.isString(a)&&!g.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(g.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!g.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))},extend:function(a,b){for(var d=1,c=arguments.length;d<c;d++)g._mixin(a.prototype,arguments[d]);return a},_hitchArgs:function(a,f){var d=g._toArray(arguments,2),c=g.isString(f);return function(){var h=g._toArray(arguments),e=c?(a||b.global)[f]:f;return e&&e.apply(a||this,d.concat(h))}},
167hitch:function(a,f){if(2<arguments.length)return g._hitchArgs.apply(b,arguments);f||(f=a,a=null);if(g.isString(f)){a=a||b.global;if(!a[f])throw['lang.hitch: scope["',f,'"] is null (scope\x3d"',a,'")'].join("");return function(){return a[f].apply(a,arguments||[])}}return!a?f:function(){return f.apply(a,arguments||[])}},delegate:function(){function a(){}return function(b,d){a.prototype=b;var c=new a;a.prototype=null;d&&g._mixin(c,d);return c}}(),_toArray:l("ie")?function(){function a(a,b,c){c=c||[];
168for(b=b||0;b<a.length;b++)c.push(a[b]);return c}return function(b){return(b.item?a:q).apply(this,arguments)}}():q,partial:function(a){return g.hitch.apply(b,[null].concat(g._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||g.isFunction(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return RegExp(a);var b,d,c;if(g.isArray(a)){b=[];d=0;for(c=a.length;d<c;++d)d in a&&b.push(g.clone(a[d]))}else b=
169a.constructor?new a.constructor:{};return g._mixin(b,a,g.clone)},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(a,b,d){return a.replace(d||k,g.isFunction(b)?b:function(a,d){return g.getObject(d,!1,b)})}};g.mixin(b,g);return g})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise".split(" "),function(b,
170l,e,p,m,n,q,k){function g(a){return f(a)}function a(a){return a.data||a.text}b.deepCopy=function(a,c){for(var f in c){var e=a[f],g=c[f];e!==g&&(e&&"object"===typeof e&&g&&"object"===typeof g?b.deepCopy(e,g):a[f]=g)}return a};b.deepCreate=function(a,c){c=c||{};var f=q.delegate(a),e,g;for(e in a)(g=a[e])&&"object"===typeof g&&(f[e]=b.deepCreate(g,c[e]));return b.deepCopy(f,c)};var f=Object.freeze||function(a){return a};b.deferred=function(d,c,h,m,n,v){var u=new p(function(a){c&&c(u,d);return!a||!(a instanceof
171l)&&!(a instanceof e)?new e("Request canceled",d):a});u.response=d;u.isValid=h;u.isReady=m;u.handleResponse=n;h=u.then(g).otherwise(function(a){a.response=d;throw a;});b.notify&&h.then(q.hitch(b.notify,"emit","load"),q.hitch(b.notify,"emit","error"));m=h.then(a);n=new k;for(var s in m)m.hasOwnProperty(s)&&(n[s]=m[s]);n.response=h;f(n);v&&u.then(function(a){v.call(u,a)},function(a){v.call(u,d,a)});u.promise=n;u.then=n.then;return u};b.addCommonMethods=function(a,b){n.forEach(b||["GET","POST","PUT",
172"DELETE"],function(b){a[("DELETE"===b?"DEL":b).toLowerCase()]=function(c,f){f=q.delegate(f||{});f.method=b;return a(c,f)}})};b.parseArgs=function(a,b,f){var e=b.data,g=b.query;e&&!f&&"object"===typeof e&&(b.data=m.objectToQuery(e));g?("object"===typeof g&&(g=m.objectToQuery(g)),b.preventCache&&(g+=(g?"\x26":"")+"request.preventCache\x3d"+ +new Date)):b.preventCache&&(g="request.preventCache\x3d"+ +new Date);a&&g&&(a+=(~a.indexOf("?")?"\x26":"?")+g);return{url:a,options:b,getHeader:function(a){return null}}};
173b.checkStatus=function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||!a}})},"dojo/Evented":function(){define(["./aspect","./on"],function(b,l){function e(){}var p=b.after;e.prototype={on:function(b,e){return l.parse(this,b,e,function(b,k){return p(b,"on"+k,e,!0)})},emit:function(b,e){var q=[this];q.push.apply(q,arguments);return l.emit.apply(l,q)}};return e})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(b,l,e,p,m){function n(b,e){var g=function(a,
174f){return l(a,b,function(b){if(e)return e(b,f);if(!p.isDescendant(b.relatedTarget,a))return f.call(this,b)})};g.bubble=function(a){return n(b,function(b,d){var c=a(b.target),h=b.relatedTarget;if(c&&c!=(h&&1==h.nodeType&&a(h)))return d.call(c,b)})};return g}e.add("dom-quirks",m.doc&&"BackCompat"==m.doc.compatMode);e.add("events-mouseenter",m.doc&&"onmouseenter"in m.doc.createElement("div"));e.add("events-mousewheel",m.doc&&"onmousewheel"in m.doc);m=e("dom-quirks")&&e("ie")||!e("dom-addeventlistener")?
175{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(b,e){return b.button&e},isLeft:function(b){return b.button&1},isMiddle:function(b){return b.button&4},isRight:function(b){return b.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(b,e){return b.button==e},isLeft:function(b){return 0==b.button},isMiddle:function(b){return 1==b.button},isRight:function(b){return 2==b.button}};b.mouseButtons=m;b=e("events-mousewheel")?"mousewheel":function(b,e){return l(b,"DOMMouseScroll",function(b){b.wheelDelta=-b.detail;
176e.call(this,b)})};return{_eventHandler:n,enter:n("mouseover"),leave:n("mouseout"),wheel:b,isLeft:m.isLeft,isMiddle:m.isMiddle,isRight:m.isRight}})},"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),function(b,l,e,p,m,n,q,k,g,a,f,d,c,h,r,t){b._xhrObj=r._create;var v=b.config;b.objectToQuery=p.objectToQuery;b.queryToObject=p.queryToObject;b.fieldToObject=
177n.fieldToObject;b.formToObject=n.toObject;b.formToQuery=n.toQuery;b.formToJson=n.toJson;b._blockAsync=!1;l.add("native-xhr2-blob",function(){if(l("native-xhr2")){var a=new XMLHttpRequest;a.open("GET","/",!0);a.responseType="blob";var b=a.responseType;a.abort();return"blob"===b}});var u=b._contentHandlers=b.contentHandlers={text:function(a){return a.responseText},json:function(a){return g.fromJson(a.responseText||null)},"json-comment-filtered":function(a){k.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}\x26\x26\nUse djConfig.useCommentedJson\x3dtrue to turn off this message.");
178a=a.responseText;var b=a.indexOf("/*"),c=a.lastIndexOf("*/");if(-1==b||-1==c)throw Error("JSON was not comment filtered");return g.fromJson(a.substring(b+2,c))},javascript:function(a){return b.eval(a.responseText)},xml:function(a){var b=a.responseXML;b&&(l("dom-qsa2.1")&&!b.querySelectorAll&&l("dom-parser"))&&(b=(new DOMParser).parseFromString(a.responseText,"application/xml"));if(l("ie")&&(!b||!b.documentElement)){var c=function(a){return"MSXML"+a+".DOMDocument"},c=["Microsoft.XMLDOM",c(6),c(4),
179c(3),c(2)];f.some(c,function(c){try{var d=new ActiveXObject(c);d.async=!1;d.loadXML(a.responseText);b=d}catch(f){return!1}return!0})}return b},"json-comment-optional":function(a){return a.responseText&&/^[^{\[]*\/\*/.test(a.responseText)?u["json-comment-filtered"](a):u.json(a)}};l("native-xhr2")&&(u.arraybuffer=u.blob=u.document=function(a,b){return"blob"===b.args.handleAs&&!l("native-xhr2-blob")?new Blob([a.response],{type:a.getResponseHeader("Content-Type")}):a.response});b._ioSetArgs=function(c,
180d,f,h){var e={args:c,url:c.url},g=null;if(c.form){var g=m.byId(c.form),k=g.getAttributeNode("action");e.url=e.url||(k?k.value:null);g=n.toObject(g)}k=[{}];g&&k.push(g);c.content&&k.push(c.content);c.preventCache&&k.push({"dojo.preventCache":(new Date).valueOf()});e.query=p.objectToQuery(a.mixin.apply(null,k));e.handleAs=c.handleAs||"text";var l=new q(function(a){a.canceled=!0;d&&d(a);var b=a.ioArgs.error;b||(b=Error("request cancelled"),b.dojoType="cancel",a.ioArgs.error=b);return b});l.addCallback(f);
181var r=c.load;r&&a.isFunction(r)&&l.addCallback(function(a){return r.call(c,a,e)});var t=c.error;t&&a.isFunction(t)&&l.addErrback(function(a){return t.call(c,a,e)});var s=c.handle;s&&a.isFunction(s)&&l.addBoth(function(a){return s.call(c,a,e)});l.addErrback(function(a){return h(a,l)});v.ioPublish&&(b.publish&&!1!==e.args.ioPublish)&&(l.addCallbacks(function(a){b.publish("/dojo/io/load",[l,a]);return a},function(a){b.publish("/dojo/io/error",[l,a]);return a}),l.addBoth(function(a){b.publish("/dojo/io/done",
182[l,a]);return a}));l.ioArgs=e;return l};var s=function(a){a=u[a.ioArgs.handleAs](a.ioArgs.xhr,a.ioArgs);return void 0===a?null:a},y=function(a,b){b.ioArgs.args.failOk||console.error(a);return a},A=function(a){0>=w&&(w=0,v.ioPublish&&(b.publish&&(!a||a&&!1!==a.ioArgs.args.ioPublish))&&b.publish("/dojo/io/stop"))},w=0;c.after(h,"_onAction",function(){w-=1});c.after(h,"_onInFlight",A);b._ioCancelAll=h.cancelAll;b._ioNotifyStart=function(a){v.ioPublish&&(b.publish&&!1!==a.ioArgs.args.ioPublish)&&(w||
183b.publish("/dojo/io/start"),w+=1,b.publish("/dojo/io/send",[a]))};b._ioWatch=function(b,c,d,f){b.ioArgs.options=b.ioArgs.args;a.mixin(b,{response:b.ioArgs,isValid:function(a){return c(b)},isReady:function(a){return d(b)},handleResponse:function(a){return f(b)}});h(b);A(b)};b._ioAddQueryToUrl=function(a){a.query.length&&(a.url+=(-1==a.url.indexOf("?")?"?":"\x26")+a.query,a.query=null)};b.xhr=function(a,c,d){var f,h=b._ioSetArgs(c,function(a){f&&f.cancel()},s,y),e=h.ioArgs;"postData"in c?e.query=c.postData:
184"putData"in c?e.query=c.putData:"rawBody"in c?e.query=c.rawBody:(2<arguments.length&&!d||-1==="POST|PUT".indexOf(a.toUpperCase()))&&b._ioAddQueryToUrl(e);var g;l("native-xhr2")&&(g={arraybuffer:1,blob:1,document:1});g=l("native-xhr2")&&g[c.handleAs]?c.handleAs:"text";"blob"===g&&!l("native-xhr2-blob")&&(g="arraybuffer");g={method:a,handleAs:g,responseType:c.responseType,timeout:c.timeout,withCredentials:c.withCredentials,ioArgs:e};"undefined"!==typeof c.headers&&(g.headers=c.headers);"undefined"!==
185typeof c.contentType&&(g.headers||(g.headers={}),g.headers["Content-Type"]=c.contentType);"undefined"!==typeof e.query&&(g.data=e.query);"undefined"!==typeof c.sync&&(g.sync=c.sync);b._ioNotifyStart(h);try{f=r(e.url,g,!0)}catch(k){return h.cancel(),h}h.ioArgs.xhr=f.response.xhr;f.then(function(){h.resolve(h)}).otherwise(function(a){e.error=a;a.response&&(a.status=a.response.status,a.responseText=a.response.text,a.xhr=a.response.xhr);h.reject(a)});return h};b.xhrGet=function(a){return b.xhr("GET",
186a)};b.rawXhrPost=b.xhrPost=function(a){return b.xhr("POST",a,!0)};b.rawXhrPut=b.xhrPut=function(a){return b.xhr("PUT",a,!0)};b.xhrDelete=function(a){return b.xhr("DELETE",a)};b._isDocumentOk=function(a){return t.checkStatus(a.status)};b._getText=function(a){var c;b.xhrGet({url:a,sync:!0,load:function(a){c=a}});return c};a.mixin(b.xhr,{_xhrObj:b._xhrObj,fieldToObject:n.fieldToObject,formToObject:n.toObject,objectToQuery:p.objectToQuery,formToQuery:n.toQuery,formToJson:n.toJson,queryToObject:p.queryToObject,
187contentHandlers:u,_ioSetArgs:b._ioSetArgs,_ioCancelAll:b._ioCancelAll,_ioNotifyStart:b._ioNotifyStart,_ioWatch:b._ioWatch,_ioAddQueryToUrl:b._ioAddQueryToUrl,_isDocumentOk:b._isDocumentOk,_getText:b._getText,get:b.xhrGet,post:b.xhrPost,put:b.xhrPut,del:b.xhrDelete});return b.xhr})},"dojo/topic":function(){define(["./Evented"],function(b){var l=new b;return{publish:function(b,p){return l.emit.apply(l,arguments)},subscribe:function(b,p){return l.on.apply(l,arguments)}}})},"dojo/loadInit":function(){define(["./_base/loader"],
188function(b){return{dynamic:0,normalize:function(b){return b},load:b.loadInit}})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(b,l,e){var p=window,m={addOnWindowUnload:function(m,q){b.windowUnloaded||e(p,"unload",b.windowUnloaded=function(){});e(p,"unload",l.hitch(m,q))},addOnUnload:function(b,m){e(p,"beforeunload",l.hitch(b,m))}};b.addOnWindowUnload=m.addOnWindowUnload;b.addOnUnload=m.addOnUnload;return m})},"dojo/require":function(){define(["./_base/loader"],function(b){return{dynamic:0,
189normalize:function(b){return b},load:b.require}})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise","./promise/instrumentation"],function(b,l,e,p,m){var n=Object.freeze||function(){},q=function(a,b,h,e,g){2===b&&(f.instrumentRejected&&0===a.length)&&f.instrumentRejected(h,!1,e,g);for(g=0;g<a.length;g++)k(a[g],b,h,e)},k=function(b,c,h,e){var k=b[c],m=b.deferred;if(k)try{var l=k(h);if(0===c)"undefined"!==typeof l&&a(m,c,l);else{if(l&&"function"===
190typeof l.then){b.cancel=l.cancel;l.then(g(m,1),g(m,2),g(m,0));return}a(m,1,l)}}catch(n){a(m,2,n)}else a(m,c,h);2===c&&f.instrumentRejected&&f.instrumentRejected(h,!!k,e,m.promise)},g=function(b,c){return function(f){a(b,c,f)}},a=function(a,b,f){if(!a.isCanceled())switch(b){case 0:a.progress(f);break;case 1:a.resolve(f);break;case 2:a.reject(f)}},f=function(a){var b=this.promise=new p,h=this,g,m,l,u=!1,s=[];Error.captureStackTrace&&(Error.captureStackTrace(h,f),Error.captureStackTrace(b,f));this.isResolved=
191b.isResolved=function(){return 1===g};this.isRejected=b.isRejected=function(){return 2===g};this.isFulfilled=b.isFulfilled=function(){return!!g};this.isCanceled=b.isCanceled=function(){return u};this.progress=function(a,d){if(g){if(!0===d)throw Error("This deferred has already been fulfilled.");return b}q(s,0,a,null,h);return b};this.resolve=function(a,d){if(g){if(!0===d)throw Error("This deferred has already been fulfilled.");return b}q(s,g=1,m=a,null,h);s=null;return b};var y=this.reject=function(a,
192d){if(g){if(!0===d)throw Error("This deferred has already been fulfilled.");return b}Error.captureStackTrace&&Error.captureStackTrace(l={},y);q(s,g=2,m=a,l,h);s=null;return b};this.then=b.then=function(a,d,e){var h=[e,a,d];h.cancel=b.cancel;h.deferred=new f(function(a){return h.cancel&&h.cancel(a)});g&&!s?k(h,g,m,l):s.push(h);return h.deferred.promise};this.cancel=b.cancel=function(b,c){if(g){if(!0===c)throw Error("This deferred has already been fulfilled.");}else{if(a){var f=a(b);b="undefined"===
193typeof f?b:f}u=!0;if(g){if(2===g&&m===b)return b}else return"undefined"===typeof b&&(b=new e),y(b),b}};n(b)};f.prototype.toString=function(){return"[object Deferred]"};m&&m(f);return f})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(b,l,e){l=l.NodeList;var p=l.prototype;p.connect=l._adaptAsForEach(function(){return b.connect.apply(this,arguments)});p.coords=l._adaptAsMap(b.coords);l.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");
194e.forEach(l.events,function(b){var e="on"+b;p[e]=function(b,k){return this.connect(e,b,k)}});return b.NodeList=l})},"dojo/request":function(){define(["./request/default!"],function(b){return b})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(b,l,e,p){var m=b.Color=function(b){b&&this.setColor(b)};m.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,
195128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:p.transparentColor||[0,0,0,0]};l.extend(m,{r:255,g:255,b:255,a:1,_set:function(b,e,k,g){this.r=b;this.g=e;this.b=k;this.a=g},setColor:function(b){l.isString(b)?m.fromString(b,this):l.isArray(b)?m.fromArray(b,this):(this._set(b.r,b.g,b.b,b.a),b instanceof m||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},
196toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+e.map(["r","g","b"],function(b){b=this[b].toString(16);return 2>b.length?"0"+b:b},this).join("")},toCss:function(b){var e=this.r+", "+this.g+", "+this.b;return(b?"rgba("+e+", "+this.a:"rgb("+e)+")"},toString:function(){return this.toCss(!0)}});m.blendColors=b.blendColors=function(b,l,k,g){var a=g||new m;e.forEach(["r","g","b","a"],function(f){a[f]=b[f]+(l[f]-b[f])*k;"a"!=f&&(a[f]=Math.round(a[f]))});return a.sanitize()};
197m.fromRgb=b.colorFromRgb=function(b,e){var k=b.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return k&&m.fromArray(k[1].split(/\s*,\s*/),e)};m.fromHex=b.colorFromHex=function(b,l){var k=l||new m,g=4==b.length?4:8,a=(1<<g)-1;b=Number("0x"+b.substr(1));if(isNaN(b))return null;e.forEach(["b","g","r"],function(f){var d=b&a;b>>=g;k[f]=4==g?17*d:d});k.a=1;return k};m.fromArray=b.colorFromArray=function(b,e){var k=e||new m;k._set(Number(b[0]),Number(b[1]),Number(b[2]),Number(b[3]));isNaN(k.a)&&(k.a=1);
198return k.sanitize()};m.fromString=b.colorFromString=function(b,e){var k=m.named[b];return k&&m.fromArray(k,e)||m.fromRgb(b,e)||m.fromHex(b,e)};return m})},"dojo/promise/instrumentation":function(){define(["./tracer","../has","../_base/lang","../_base/array"],function(b,l,e,p){function m(a,b,f){var e="";a&&a.stack&&(e+=a.stack);b&&b.stack&&(e+="\n    ----------------------------------------\n    rejected"+b.stack.split("\n").slice(1).join("\n").replace(/^\s+/," "));f&&f.stack&&(e+="\n    ----------------------------------------\n"+
199f.stack);console.error(a,e)}function n(a,b,f,e){b||m(a,f,e)}
199function q(b,c,e,l){p.some(g,function(a){if(a.error===b)return c&&(a.handled=!0),!0})||g.push({error:b,rejection:e,handled:c,deferred:l,timestamp:(new Date).getTime()});a||(a=setTimeout(k,f))}function k(){var b=(new Date).getTime(),c=b-f;g=p.filter(g,function(a){return a.timestamp<c?(a.handled||m(a.error,a.rejection,a.deferred),!1):!0});a=g.length?setTimeout(k,g[0].timestamp+f-b):!1}l.add("config-useDeferredInstrumentation","report-unhandled-rejections");
200var g=[],a=!1,f=1E3;return function(a){var c=l("config-useDeferredInstrumentation");if(c){b.on("resolved",e.hitch(console,"log","resolved"));b.on("rejected",e.hitch(console,"log","rejected"));b.on("progress",e.hitch(console,"log","progress"));var h=[];"string"===typeof c&&(h=c.split(","),c=h.shift());if("report-rejections"===c)a.instrumentRejected=n;else if("report-unhandled-rejections"===c||!0===c||1===c)a.instrumentRejected=q,f=parseInt(h[0],10)||f;else throw Error("Unsupported instrumentation usage \x3c"+
201c+"\x3e");}}})},"dojo/selector/_loader":function(){define(["../has","require"],function(b,l){var e=document.createElement("div");b.add("dom-qsa2.1",!!e.querySelectorAll);b.add("dom-qsa3",function(){try{return e.innerHTML="\x3cp class\x3d'TEST'\x3e\x3c/p\x3e",1==e.querySelectorAll(".TEST:empty").length}catch(b){}});var p;return{load:function(e,n,q,k){k=l;e="default"==e?b("config-selectorEngine")||"css3":e;e="css2"==e||"lite"==e?"./lite":"css2.1"==e?b("dom-qsa2.1")?"./lite":"./acme":"css3"==e?b("dom-qsa3")?
202"./lite":"./acme":"acme"==e?"./acme":(k=n)&&e;if("?"==e.charAt(e.length-1)){e=e.substring(0,e.length-1);var g=!0}if(g&&(b("dom-compliant-qsa")||p))return q(p);k([e],function(a){"./lite"!=e&&(p=a);q(a)})}}})},"dojo/promise/Promise":function(){define(["../_base/lang"],function(b){function l(){throw new TypeError("abstract");}return b.extend(function(){},{then:function(b,p,m){l()},cancel:function(b,p){l()},isResolved:function(){l()},isRejected:function(){l()},isFulfilled:function(){l()},isCanceled:function(){l()},
203always:function(b){return this.then(b,b)},otherwise:function(b){return this.then(null,b)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../_base/window ../has!host-browser?dom-addeventlistener?:../on:".split(" "),function(b,l,e,p,m,n){function q(){for(var b=+new Date,d=0,c;d<a.length&&(c=a[d]);d++){var e=c.response,
204m=e.options;if(c.isCanceled&&c.isCanceled()||c.isValid&&!c.isValid(e))a.splice(d--,1),k._onAction&&k._onAction();else if(c.isReady&&c.isReady(e))a.splice(d--,1),c.handleResponse(e),k._onAction&&k._onAction();else if(c.startTime&&c.startTime+(m.timeout||0)<b)a.splice(d--,1),c.cancel(new l("Timeout exceeded",e)),k._onAction&&k._onAction()}k._onInFlight&&k._onInFlight(c);a.length||(clearInterval(g),g=null)}function k(b){b.response.options.timeout&&(b.startTime=+new Date);b.isFulfilled()||(a.push(b),
205g||(g=setInterval(q,50)),b.response.options.sync&&q())}var g=null,a=[];k.cancelAll=function(){try{p.forEach(a,function(a){try{a.cancel(new e("All requests canceled."))}catch(b){}})}catch(b){}};m&&(n&&m.doc.attachEvent)&&n(m.global,"unload",function(){k.cancelAll()});return k})},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect","./_base/kernel","./sniff"],function(b,l,e){function p(a,b,c,f,l){if(f=b.match(/(.*):(.*)/))return b=f[2],f=f[1],k.selector(f,b).call(l,a,c);e("touch")&&(g.test(b)&&
206(c=F(c)),!e("event-orientationchange")&&"orientationchange"==b&&(b="resize",a=window,c=F(c)));h&&(c=h(c));if(a.addEventListener){var m=b in d,n=m?d[b]:b;a.addEventListener(n,c,m);return{remove:function(){a.removeEventListener(n,c,m)}}}if(u&&a.attachEvent)return u(a,"on"+b,c);throw Error("Target must be an event emitter");}function m(){this.cancelable=!1;this.defaultPrevented=!0}function n(){this.bubbles=!1}var q=window.ScriptEngineMajorVersion;e.add("jscript",q&&q()+ScriptEngineMinorVersion()/10);
207e.add("event-orientationchange",e("touch")&&!e("android"));e.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&!!window.Event.prototype.stopImmediatePropagation);e.add("event-focusin",function(a,b,c){return"onfocusin"in c});e("touch")&&e.add("touch-can-modify-event-delegate",function(){var a=function(){};a.prototype=document.createEvent("MouseEvents");try{var b=new a;b.target=null;return null===b.target}catch(c){return!1}});var k=function(a,b,c,d){return"function"==typeof a.on&&
208"function"!=typeof b&&!a.nodeType?a.on(b,c):k.parse(a,b,c,p,d,this)};k.pausable=function(a,b,c,d){var f;a=k(a,b,function(){if(!f)return c.apply(this,arguments)},d);a.pause=function(){f=!0};a.resume=function(){f=!1};return a};k.once=function(a,b,c,d){var f=k(a,b,function(){f.remove();return c.apply(this,arguments)});return f};k.parse=function(a,b,c,d,f,e){if(b.call)return b.call(e,a,c);if(b instanceof Array)h=b;else if(-1<b.indexOf(","))var h=b.split(/\s*,\s*/);if(h){var g=[];b=0;for(var l;l=h[b++];)g.push(k.parse(a,
209l,c,d,f,e));g.remove=function(){for(var a=0;a<g.length;a++)g[a].remove()};return g}return d(a,b,c,f,e)};var g=/^touch/;k.matches=function(a,b,c,d,f){f=f&&f.matches?f:l.query;d=!1!==d;1!=a.nodeType&&(a=a.parentNode);for(;!f.matches(a,b,c);
209)if(a==c||!1===d||!(a=a.parentNode)||1!=a.nodeType)return!1;return a};k.selector=function(a,b,c){return function(d,f){function e(b){return k.matches(b,a,d,c,h)}var h="function"==typeof a?{matches:a}:this,g=b.bubble;return g?k(d,g(e),f):k(d,b,function(a){var b=e(a.target);
210if(b)return f.call(b,a)})}};var a=[].slice,f=k.emit=function(b,c,d){var f=a.call(arguments,2),e="on"+c;if("parentNode"in b){var h=f[0]={},g;for(g in d)h[g]=d[g];h.preventDefault=m;h.stopPropagation=n;h.target=b;h.type=c;d=h}do b[e]&&b[e].apply(b,f);while(d&&d.bubbles&&(b=b.parentNode));return d&&d.cancelable&&d},d=e("event-focusin")?{}:{focusin:"focus",focusout:"blur"};if(!e("event-stopimmediatepropagation"))var c=function(){this.modified=this.immediatelyStopped=!0},h=function(a){return function(b){if(!b.immediatelyStopped)return b.stopImmediatePropagation=
211c,a.apply(this,arguments)}};if(e("dom-addeventlistener"))k.emit=function(a,b,c){if(a.dispatchEvent&&document.createEvent){var d=(a.ownerDocument||document).createEvent("HTMLEvents");d.initEvent(b,!!c.bubbles,!!c.cancelable);for(var e in c)e in d||(d[e]=c[e]);return a.dispatchEvent(d)&&d}return f.apply(k,arguments)};else{k._fixEvent=function(a,b){a||(a=(b&&(b.ownerDocument||b.document||b).parentWindow||window).event);if(!a)return a;try{r&&(a.type==r.type&&a.srcElement==r.target)&&(a=r)}catch(c){}if(!a.target)switch(a.target=
212a.srcElement,a.currentTarget=b||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=s,a.preventDefault=y),a.type){case "keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99);a.charCode=d;d=a;d.keyChar=d.charCode?String.fromCharCode(d.charCode):"";d.charOrCode=d.keyChar||d.keyCode}return a};var r,t=function(a){this.handle=a};t.prototype.remove=function(){delete _dojoIEListeners_[this.handle]};
213var v=function(a){return function(b){b=k._fixEvent(b,this);var c=a.call(this,b);b.modified&&(r||setTimeout(function(){r=null}),r=b);return c}},u=function(a,c,d){d=v(d);if(((a.ownerDocument?a.ownerDocument.parentWindow:a.parentWindow||a.window||window)!=top||5.8>e("jscript"))&&!e("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var f=a[c];if(!f||!f.listeners){var h=f,f=Function("event","var callee \x3d arguments.callee; for(var i \x3d 0; i\x3ccallee.listeners.length; i++){var listener \x3d _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");
214f.listeners=[];a[c]=f;f.global=this;h&&f.listeners.push(_dojoIEListeners_.push(h)-1)}f.listeners.push(a=f.global._dojoIEListeners_.push(d)-1);return new t(a)}return b.after(a,c,d,!0)},s=function(){this.cancelBubble=!0},y=k._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0;this.returnValue=!1;this.modified=!0}}if(e("touch"))var A=function(){},w=window.orientation,F=function(a){return function(b){var c=b.corrected;if(!c){var d=
215b.type;try{delete b.type}catch(f){}if(b.type){if(e("touch-can-modify-event-delegate"))A.prototype=b,c=new A;else{var c={},h;for(h in b)c[h]=b[h]}c.preventDefault=function(){b.preventDefault()};c.stopPropagation=function(){b.stopPropagation()}}else c=b,c.type=d;b.corrected=c;if("resize"==d){if(w==window.orientation)return null;w=window.orientation;c.type="orientationchange";return a.call(this,c)}"rotation"in c||(c.rotation=0,c.scale=1);var d=c.changedTouches[0],g;for(g in d)delete c[g],c[g]=d[g]}return a.call(this,
216c)}};return k})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(b,l,e){b._name="browser";l.mixin(b,{isBrowser:!0,isFF:e("ff"),isIE:e("ie"),isKhtml:e("khtml"),isWebKit:e("webkit"),isMozilla:e("mozilla"),isMoz:e("mozilla"),isOpera:e("opera"),isSafari:e("safari"),isChrome:e("chrome"),isMac:e("mac"),isIos:e("ios"),isAndroid:e("android"),isWii:e("wii"),isQuirks:e("quirks"),isAir:e("air")});return e})},"dojo/errors/create":function(){define(["../_base/lang"],function(b){return function(l,
217e,p,m){p=p||Error;var n=function(b){if(p===Error){Error.captureStackTrace&&Error.captureStackTrace(this,n);var k=Error.call(this,b),g;for(g in k)k.hasOwnProperty(g)&&(this[g]=k[g]);this.message=b;this.stack=k.stack}else p.apply(this,arguments);e&&e.apply(this,arguments)};n.prototype=b.delegate(p.prototype,m);n.prototype.name=l;return n.prototype.constructor=n}})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(b,l,e){function p(a){return q[a]=new Function("item","index",
218"array",a)}function m(a){var b=!a;return function(d,c,e){var g=0,k=d&&d.length||0,l;k&&"string"==typeof d&&(d=d.split(""));"string"==typeof c&&(c=q[c]||p(c));if(e)for(;g<k;++g){if(l=!c.call(e,d[g],g,d),a^l)return!l}else for(;g<k;++g)if(l=!c(d[g],g,d),a^l)return!l;return b}}function n(a){var b=1,d=0,c=0;a||(b=d=c=-1);return function(e,l,m,n){if(n&&0<b)return g.lastIndexOf(e,l,m);n=e&&e.length||0;var p=a?n+c:d;m===k?m=a?d:n+c:0>m?(m=n+m,0>m&&(m=d)):m=m>=n?n+c:m;for(n&&"string"==typeof e&&(e=e.split(""));m!=
219p;m+=b)if(e[m]==l)return m;return-1}}var q={},k,g={every:m(!1),some:m(!0),indexOf:n(!0),lastIndexOf:n(!1),forEac
219h:function(a,b,d){var c=0,e=a&&a.length||0;e&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=q[b]||p(b));if(d)for(;c<e;++c)b.call(d,a[c],c,a);else for(;c<e;++c)b(a[c],c,a)},map:function(a,b,d,c){var e=0,g=a&&a.length||0;c=new (c||Array)(g);g&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=q[b]||p(b));if(d)for(;e<g;++e)c[e]=b.call(d,a[e],e,a);else for(;e<g;++e)c[e]=
220b(a[e],e,a);return c},filter:function(a,b,d){var c=0,e=a&&a.length||0,g=[],k;e&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=q[b]||p(b));if(d)for(;c<e;++c)k=a[c],b.call(d,k,c,a)&&g.push(k);else for(;c<e;++c)k=a[c],b(k,c,a)&&g.push(k);return g},clearCache:function(){q={}}};e.mixin(b,g);return g})},"dojo/_base/json":function(){define(["./kernel","../json"],function(b,l){b.fromJson=function(b){return eval("("+b+")")};b._escapeString=l.stringify;b.toJsonIndentStr="\t";b.toJson=function(e,
221p){return l.stringify(e,function(b,e){if(e){var l=e.__json__||e.json;if("function"==typeof l)return l.call(e)}return e},p&&b.toJsonIndentStr)};return b})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(b,l,e){var p={global:b.global,doc:b.global.document||null,body:function(e){e=e||b.doc;return e.body||e.getElementsByTagName("body")[0]},setContext:function(e,l){b.global=p.global=e;b.doc=p.doc=l},withGlobal:function(e,l,q,k){var g=b.global;try{return b.global=p.global=
222e,p.withDoc.call(null,e.document,l,q,k)}finally{b.global=p.global=g}},withDoc:function(l,n,q,k){var g=p.doc,a=e("quirks"),f=e("ie"),d,c,h;try{b.doc=p.doc=l;b.isQuirks=e.add("quirks","BackCompat"==b.doc.compatMode,!0,!0);if(e("ie")&&(h=l.parentWindow)&&h.navigator)d=parseFloat(h.navigator.appVersion.split("MSIE ")[1])||void 0,(c=l.documentMode)&&(5!=c&&Math.floor(d)!=c)&&(d=c),b.isIE=e.add("ie",d,!0,!0);q&&"string"==typeof n&&(n=q[n]);return n.apply(q,k||[])}finally{b.doc=p.doc=g,b.isQuirks=e.add("quirks",
223a,!0,!0),b.isIE=e.add("ie",f,!0,!0)}}};l.mixin(b,p);return p})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(b,l,e){function p(b){if("string"==typeof b||b instanceof String){if(b&&!n.test(b))return q[0]=b,q;b=b.split(n);b.length&&!b[0]&&b.shift();b.length&&!b[b.length-1]&&b.pop();return b}return!b?[]:l.filter(b,function(a){return a})}var m,n=/\s+/,q=[""],k={};return m={contains:function(b,a){return 0<=(" "+e.byId(b).className+" ").indexOf(" "+a+" ")},add:function(b,
224a){b=e.byId(b);a=p(a);var f=b.className,d,f=f?" "+f+" ":" ";d=f.length;for(var c=0,h=a.length,k;c<h;++c)(k=a[c])&&0>f.indexOf(" "+k+" ")&&(f+=k+" ");d<f.length&&(b.className=f.substr(1,f.length-2))},remove:function(g,a){g=e.byId(g);var f;if(void 0!==a){a=p(a);f=" "+g.className+" ";for(var d=0,c=a.length;d<c;++d)f=f.replace(" "+a[d]+" "," ");f=b.trim(f)}else f="";g.className!=f&&(g.className=f)},replace:function(b,a,f){b=e.byId(b);k.className=b.className;m.remove(k,f);m.add(k,a);b.className!==k.className&&
225(b.className=k.className)},toggle:function(b,a,f){b=e.byId(b);if(void 0===f){a=p(a);for(var d=0,c=a.length,h;d<c;++d)h=a[d],m[m.contains(b,h)?"remove":"add"](b,h)}else m[f?"add":"remove"](b,a);return f}}})},"dojo/_base/config":function(){define(["../has","require"],function(b,l){var e={},p=l.rawConfig,m;for(m in p)e[m]=p[m];if(!e.locale&&"undefined"!=typeof navigator&&(p=navigator.language||navigator.userLanguage))e.locale=p.toLowerCase();return e})},"dojo/main":function(){define("./_base/kernel ./has require ./sniff ./_base/lang ./_base/array ./_base/config ./ready ./_base/declare ./_base/connect ./_base/Deferred ./_base/json ./_base/Color ./has!dojo-firebug?./_firebug/firebug ./_base/browser ./_base/loader".split(" "),
226function(b,l,e,p,m,n,q,k){q.isDebug&&e(["./_firebug/firebug"]);var g=q.require;g&&(g=n.map(m.isArray(g)?g:[g],function(a){return a.replace(/\./g,"/")}),b.isAsync?e(g):k(1,function(){e(g)}));return b})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(b,l,e,p){if(l._fixEvent){var m=l._fixEvent;l._fixEvent=function(b,e){(b=m(b,e))&&p.normalizeEvent(b);return b}}var n={fix:function(b,e){return l._fixEvent?l._fixEvent(b,e):b},stop:function(b){e("dom-addeventlistener")||
227b&&b.preventDefault?(b.preventDefault(),b.stopPropagation()):(b=b||window.event,b.cancelBubble=!0,l._preventDefault.call(b))}};b.fixEvent=n.fix;b.stopEvent=n.stop;return n})},"dojo/sniff":function(){define(["./has"],function(b){var l=navigator,e=l.userAgent,l=l.appVersion,p=parseFloat(l);b.add("air",0<=e.indexOf("AdobeAIR"));b.add("msapp",parseFloat(e.split("MSAppHost/")[1])||void 0);b.add("khtml",0<=l.indexOf("Konqueror")?p:void 0);b.add("webkit",parseFloat(e.split("WebKit/")[1])||void 0);b.add("chrome",
228parseFloat(e.split("Chrome/")[1])||void 0);b.add("safari",0<=l.indexOf("Safari")&&!b("chrome")?parseFloat(l.split("Version/")[1]):void 0);b.add("mac",0<=l.indexOf("Macintosh"));b.add("quirks","BackCompat"==document.compatMode);if(e.match(/(iPhone|iPod|iPad)/)){var m=RegExp.$1.replace(/P/,"p"),n=e.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(n.replace(/_/,".").replace(/_/g,""));b.add(m,n);b.add("ios",n)}b.add("android",parseFloat(e.split("Android ")[1])||void 0);b.add("bb",(0<=e.indexOf("BlackBerry")||
2290<=e.indexOf("BB10"))&&parseFloat(e.split("Version/")[1])||void 0);b.add("trident",parseFloat(l.split("Trident/")[1])||void 0);b.add("svg","undefined"!==typeof SVGAngle);b("webkit")||(0<=e.indexOf("Opera")&&b.add("opera",9.8<=p?parseFloat(e.split("Version/")[1])||p:p),0<=e.indexOf("Gecko")&&(!b("khtml")&&!b
229("webkit")&&!b("trident"))&&b.add("mozilla",p),b("mozilla")&&b.add("ff",parseFloat(e.split("Firefox/")[1]||e.split("Minefield/")[1])||void 0),document.all&&!b("opera")&&(e=parseFloat(l.split("MSIE ")[1])||
230void 0,(l=document.documentMode)&&(5!=l&&Math.floor(e)!=l)&&(e=l),b.add("ie",e)),b.add("wii","undefined"!=typeof opera&&opera.wiiremote));return b})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../selector/_loader"],function(b,l,e,p){function m(b){var d=a[b.options.handleAs];b.data=d?d(b):b.data||b.text;return b}p.add("activex","undefined"!==typeof ActiveXObject);p.add("dom-parser",function(a){return"DOMParser"in a});var n;if(p("activex")){var q=
231["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"],k;n=function(a){function b(a){try{var d=new ActiveXObject(a);d.async=!1;d.loadXML(g);c=d;k=a}catch(f){return!1}return!0}var c=a.data,g=a.text;c&&(p("dom-qsa2.1")&&!c.querySelectorAll&&p("dom-parser"))&&(c=(new DOMParser).parseFromString(g,"application/xml"));if(!c||!c.documentElement)(!k||!b(k))&&e.some(q,b);return c}}var g=function(a){return!p("native-xhr2-blob")&&"blob"===a.options.handleAs&&"undefined"!==
232typeof Blob?new Blob([a.xhr.response],{type:a.xhr.getResponseHeader("Content-Type")}):a.xhr.response},a={javascript:function(a){return l.eval(a.text||"")},json:function(a){return b.parse(a.text||null)},xml:n,blob:g,arraybuffer:g,document:g};m.register=function(b,d){a[b]=d};return m})},"dojo/aspect":function(){define([],function(){function b(b,e,a,f){var d=b[e],c="around"==e,h;if(c){var l=a(function(){return d.advice(this,arguments)});h={remove:function(){l&&(l=b=a=null)},advice:function(a,b){return l?
233l.apply(a,b):d.advice(a,b)}}}else h={remove:function(){if(h.advice){var c=h.previous,d=h.next;!d&&!c?delete b[e]:(c?c.next=d:b[e]=d,d&&(d.previous=c));b=a=h.advice=null}},id:p++,advice:a,receiveArguments:f};if(d&&!c)if("after"==e){for(;d.next&&(d=d.next););d.next=h;h.previous=d}else"before"==e&&(b[e]=h,h.next=d,d.previous=h);else b[e]=h;return h}function l(k){return function(g,a,f,d){var c=g[a],h;if(!c||c.target!=g)g[a]=h=function(){for(var a=p,b=arguments,c=h.before;c;)c.advice&&(b=c.advice.apply(this,
234b)||b),c=c.next;if(h.around)var d=h.around.advice(this,b);for(c=h.after;c&&c.id<a;){if(c.advice)if(c.receiveArguments)var f=c.advice.apply(this,b),d=f===e?d:f;else d=c.advice.call(this,d,b);c=c.next}return d},c&&(h.around={advice:function(a,b){return c.apply(a,b)}}),h.target=g;g=b(h||c,k,f,d);f=null;return g}}var e,p=0,m=l("after"),n=l("before"),q=l("around");return{before:n,around:q,after:m}})},"dojo/ready":function(){define(["./_base/kernel","./has","require","./domReady","./_base/lang"],function(b,
235l,e,p,m){var n=0,q=[],k=0;l=function(){n=1;b._postLoad=b.config.afterOnLoad=!0;g()};var g=function(){if(!k){for(k=1;n&&(!p||0==p._Q.length)&&(e.idle?e.idle():1)&&q.length;){var a=q.shift();try{a()}catch(b){if(b.info=b.message,e.signal)e.signal("error",b);else throw b;}}k=0}};e.on&&e.on("idle",g);p&&(p._onQEmpty=g);var a=b.ready=b.addOnLoad=function(a,c,e){var f=m._toArray(arguments);"number"!=typeof a?(e=c,c=a,a=1E3):f.shift();e=e?m.hitch.apply(b,f):function(){c()};e.priority=a;for(f=0;f<q.length&&
236a>=q[f].priority;f++);q.splice(f,0,e);g()},f=b.config.addOnLoad;if(f)a[m.isArray(f)?"apply":"call"](b,f);b.config.parseOnLoad&&!b.isAsync&&a(99,function(){b.parser||(b.deprecated("Add explicit require(['dojo/parser']);","","2.0"),e(["dojo/parser"]))});p?p(l):l();return a})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),function(b,l,e,p,m,n,q,k){function g(a,c,d,e,f){e=k.hitch(d,e);if(!a||!a.addEventListener&&!a.attachEvent)return p.after(a||
237b.global,c,e,!0);"string"==typeof c&&"on"==c.substring(0,2)&&(c=c.substring(2));a||(a=b.global);if(!f)switch(c){case "keypress":c=h;break;case "mouseenter":c=n.enter;break;case "mouseleave":c=n.leave}return l(a,c,e,f)}function a(a){a.keyChar=a.charCode?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode}q.add("events-keypress-typed",function(){var a={charCode:0};
237try{a=document.createEvent("KeyboardEvent"),(a.initKeyboardEvent||a.initKeyEvent).call(a,"keypress",!0,!0,null,!1,!1,!1,
238!1,9,3)}catch(b){}return 0==a.charCode&&!q("opera")});var f={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},d=q("mac")?"metaKey":"ctrlKey",c=function(b,c){var d=k.mixin({},b,c);a(d);d.preventDefault=function(){b.preventDefault()};d.stopPropagation=function(){b.stopPropagation()};return d},h;h=q("events-keypress-typed")?function(a,b){var d=l(a,"keydown",function(a){var d=a.keyCode,e=13!=d&&32!=d&&(27!=d||!q("ie"))&&(48>d||90<d)&&(96>d||111<d)&&(186>
239d||192<d)&&(219>d||222<d)&&229!=d;if(e||a.ctrlKey){e=e?0:d;if(a.ctrlKey){if(3==d||13==d)return b.call(a.currentTarget,a);e=95<e&&106>e?e-48:!a.shiftKey&&65<=e&&90>=e?e+32:f[e]||e}d=c(a,{type:"keypress",faux:!0,charCode:e});b.call(a.currentTarget,d);if(q("ie"))try{a.keyCode=d.keyCode}catch(g){}}}),e=l(a,"keypress",function(a){var d=a.charCode;a=c(a,{charCode:32<=d?d:0,faux:!0});return b.call(this,a)});return{remove:function(){d.remove();e.remove()}}}:q("opera")?function(a,b){return l(a,"keypress",
240function(a){var d=a.which;3==d&&(d=99);d=32>d&&!a.shiftKey?0:d;a.ctrlKey&&(!a.shiftKey&&65<=d&&90>=d)&&(d+=32);return b.call(this,c(a,{charCode:d}))})}:function(b,c){return l(b,"keypress",function(b){a(b);return c.call(this,b)})};var r={_keypress:h,connect:function(a,b,c,d,e){var f=arguments,h=[],k=0;h.push("string"==typeof f[0]?null:f[k++],f[k++]);var l=f[k+1];h.push("string"==typeof l||"function"==typeof l?f[k++]:null,f[k++]);for(l=f.length;k<l;k++)h.push(f[k]);return g.apply(this,h)},disconnect:function(a){a&&
241a.remove()},subscribe:function(a,b,c){return e.subscribe(a,k.hitch(b,c))},publish:function(a,b){return e.publish.apply(e,[a].concat(b))},connectPublisher:function(a,b,c){var d=function(){r.publish(a,arguments)};return c?r.connect(b,c,d):r.connect(b,d)},isCopyKey:function(a){return a[d]}};r.unsubscribe=r.disconnect;k.mixin(b,r);return r})},"dojo/errors/CancelError":function(){define(["./create"],function(b){return b("CancelError",null,null,{dojoType:"cancel"})})},"*noref":1}});
242(function(){var b=this.require;b({cache:{}});!b.async&&b(["dojo"]);b.boot&&b.apply(null,b.boot)})();
243
244//>>built
245require({cache:{"esri/layers/FeatureEditResult":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(p,n,a,e){p=p(null,{declaredClass:"esri.layers.FeatureEditResult",constructor:function(a){a&&n.isObject(a)&&(this.objectId=a.objectId,this.success=a.success,a.success||(a=a.error,this.error=Error(),this.error.code=a.code,this.error.message=a.description))}});a("extend-esri")&&n.setObject("layers.FeatureEditResult",p,e);return p})},"esri/layers/TimeReference":function(){define(["dojo/_base/declare",
246"dojo/_base/lang","dojo/has","../kernel"],function(p,n,a,e){p=p(null,{declaredClass:"esri.layers.TimeReference",constructor:function(a){a&&n.mixin(this,a)}});a("extend-esri")&&n.setObject("layers.TimeReference",p,e);return p})},"esri/arcgis/OAuthInfo":function(){define(["../kernel","../lang","dojo/_base/declare","dojo/_base/lang","dojo/has"],function(p,n,a,e,l){a=a(null,{declaredClass:"esri.arcgis.OAuthInfo",constructor:function(a){e.mixin(this,{expiration:20160,minTimeUntilExpiration:30,portalUrl:"https://www.arcgis.com",
247authNamespace:"/",forceLogin:!1,popup:!1,popupCallbackUrl:"oauth-callback.html",popupWindowFeatures:"height\x3d480,width\x3d800,location,resizable,scrollbars,status"},a)},_oAuthCred:null,toJson:function(){return n.fixJson({appId:this.appId,expiration:this.expiration,locale:this.locale,minTimeUntilExpiration:this.minTimeUntilExpiration,portalUrl:this.portalUrl,authNamespace:this.authNamespace,forceLogin:this.forceLogin,popup:this.popup,popupCallbackUrl:this.popupCallbackUrl,popupWindowFeatures:this.popupWindowFeatures})}});
248l("extend-esri")&&e.setObject("arcgis.OAuthInfo",a,p);return a})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main".split(" "),function(p,n,a,e,l,h,q,g,d,c,b){g=p("dijit.form.TextBox"+(q("dojo-bidi")?"_NoBidi":""),[g,d],{templateString:c,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',
249_buttonInputDisabled:q("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>q("ie")&&this.defer(function(){try{var b=a.getComputedStyle(this.domNode);
249if(b){var c=b.fontFamily;
250if(c){var d=this.domNode.getElementsByTagName("INPUT");if(d)for(b=0;b<d.length;b++)d[b].style.fontFamily=c}}}catch(s){}})},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);this._phspan||(this._attachPoints.push("_phspan"),this._phspan=n.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after"),this.own(h(this._phspan,"mousedown",function(a){a.preventDefault()}),h(this._phspan,"touchend, pointerup, MSPointerUp",l.hitch(this,function(){this.focus()}))));this._phspan.innerHTML=
251"";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(a));this._updatePlaceHolder()},_onInput:function(a){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},_setValueAttr:function(a,b,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){e.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.",
252"","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){e.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),this._updatePlaceHolder(),q("mozilla")&&this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.inherited(arguments),this._updatePlaceHolder())}});
2539>q("ie")&&(g.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},b._setSelectionRange=d._setSelectionRange=function(a,b,c){a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",b),a.moveEnd("character",c-b),a.select())});q("dojo-bidi")&&(g=p("dijit.form.TextBox",g,{_setPlaceHolderAttr:function(a){this.inherited(arguments);this.applyTextDir(this._phspan)}}));
254return g})},"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(p,n,a,e,l,h,q,g,d,c,b,f,m){p=p(f,{declaredClass:"esri.tasks.QueryTask",_eventMap:{complete:["featureSet"],"execute-for-count-complete":["count"],"execute-for-ids-complete":["objectIds"],"execute-relationship-query-complete":["featureSets"]},
255constructor:function(a,b){this._handler=n.hitch(this,this._handler);this._relationshipQueryHandler=n.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=n.hitch(this,this._executeForIdsHandler);this._countHandler=n.hitch(this,this._countHandler);this._extentHandler=n.hitch(this,this._extentHandler);this.source=b&&b.source;this.gdbVersion=b&&b.gdbVersion;this.registerConnectEvents()},__msigns:[{n:"execute",c:4,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForIds",c:3,a:[{i:0,p:["geometry"]}],
256e: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,b,c,d,f){var m=f.assembly;a=this._encode(n.mixin({},this._url.query,{f:"json"},a.toJson(m&&m[0])));var v=this._handler,e=this._errorHandler;this.source&&(m={source:this.source.toJson()},
257a.layer=l.toJson(m));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return g({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,d){v(a,d,b,c,f.dfd)},error:function(a){e(a,c,f.dfd)},callbackSuffix:d},this.requestOptions)},executeRelationshipQuery:function(a,b,c){a=this._encode(n.mixin({},this._url.query,{f:"json"},a.toJson()));var r=this._relationshipQueryHandler,f=this._errorHandler;this.gdbVersion&&(a.gdbVersion=this.gdbVersion);var m=new e(d._dfdCanceller);m._pendingDfd=
258g({url:this._url.path+"/queryRelatedRecords",content:a,callbackParamName:"callback",load:function(a,d){r(a,d,b,c,m)},error:function(a){f(a,c,m)}},this.requestOptions);return m},executeForIds:function(a,b,c,d){var f=d.assembly;a=this._encode(n.mixin({},this._url.query,{f:"json",returnIdsOnly:!0},a.toJson(f&&f[0])));var m=this._executeForIdsHandler,v=this._errorHandler;this.source&&(f={source:this.source.toJson()},a.layer=l.toJson(f));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return g({url:this._url.path+
259"/query",content:a,callbackParamName:"callback",load:function(a,f){m(a,f,b,c,d.dfd)},error:function(a){v(a,c,d.dfd)}},this.requestOptions)},executeForCount:function(a,b,c,d){var f=d.assembly;a=this._encode(n.mixin({},this._url.query,{f:"json",returnIdsOnly:!0,returnCountOnly:!0},a.toJson(f&&f[0])));var m=this._countHandler,v=this._errorHandler;this.source&&(f={source:this.source.toJson()},a.layer=l.toJson(f));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return g({url:this._url.path+"/query",content:a,
260callbackParamName:"callback",load:function(a,f){m(a,f,b,c,d.dfd)},error:function(a){v(a,c,d.dfd)}},this.requestOptions)},executeForExtent:function(a,b,c,d){var f=d.assembly;a=this._encode(n.mixin({},this._url.query,{f:"json",returnExtentOnly:!0,returnCountOnly:!0},a.toJson(f&&f[0])));var m=this._extentHandler,v=this._errorHandler;this.source&&(f={source:this.source.toJson()},a.layer=l.toJson(f));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return g({url:this._url.path+"/query",content:a,callbackParamName:"callback",
261load:function(a,f){m(a,f,b,c,d.dfd)},error:function(a){v(a,c,d.dfd)}},this.requestOptions)},_handler:function(a,b,c,d,f){try{var g=new m(a);this._successHandler([g],"onComplete",c,f)}catch(v){this._errorHandler(v,d,f)}},_relationshipQueryHandler:function(b,c,d,r,f){try{var g=b.geometryType,v=b.spatialReference,e={};a.forEach(b.relatedRecordGroups,function(a){var b={};b.geometryType=g;b.spatialReference=v;b.features=a.relatedRecords;b=new m(b);if(null!=a.objectId)e[a.objectId]=b;else for(var c in a)a.hasOwnProperty(c)&&
262"relatedRecords"!==c&&(e[a[c]]=b)});this._successHandler([e],"onExecuteRelationshipQueryComplete",d,f)}catch(h){this._errorHandler(h,r,f)}},_executeForIdsHandler:function(a,b,c,d,f){try{this._successHandler([a.objectIds],"onExecuteForIdsComplete",c,f)}catch(m){this._errorHandler(m,d,f)}},_countHandler:function(a,b,c,d,f){try{var m,g=a.features,e=a.objectIds;if(e)m=e.length;else{if(g)throw Error("Unable to perform query. Please check your parameters.");m=a.count}this._successHandler([m],"onExecuteForCountComplete",
263c,f)}catch(h){this._errorHandler(h,d,f)}},_extentHandler:function(a,b,d,r,f){try{a.extent&&(a.extent=new c(a.extent)),this._successHandler([a],"onExecuteForExtentComplete",d,f)}catch(m){this._errorHandler(m,r,f)}}});b._createWrappers(p);h("extend-esri")&&n.setObject("tasks.QueryTask",p,q);return p})},"esri/symbols/Font":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang".split(" "),function(p,n,a,e,l,h){p=p(null,{declaredClass:"esri.symbol.Font",constructor:function(h,
264g,d,c,b){h?n.isObject(h)?n.mixin(this,h):(this.size=h,parseFloat(this.size)==this.size&&(this.size+="px"),void 0!==g&&(this.style=g),void 0!==d&&(this.variant=d),void 0!==c&&(this.weight=c),void 0!==b&&(this.family=b)):n.mixin(this,e.defaultFont);parseFloat(this.size)==this.size&&(this.size+="pt");9>a("ie")&&(this.size&&n.isString(this.size)&&-1<this.size.indexOf("em"))&&(this.size=e.pt2px(12*parseFloat(this.size))+"px");this.size=this._convert2PxSize(this.size)},setSize:function(a){this.size=this._convert2PxSize(a);
265return this},_convert2PxSize:function(a){var g;
265parseFloat(a)==a?g=a:n.isString(a)&&(-1<a.indexOf("pt")?g=e.pt2px(parseFloat(a)):-1<a.indexOf("px")?g=parseFloat(a):-1<a.indexOf("em")?g=e.pt2px(12*parseFloat(a)):-1<a.indexOf("%")&&(g=e.pt2px(0.12*parseFloat(a))));return g},setStyle:function(a){this.style=a;return this},setVariant:function(a){this.variant=a;return this},setWeight:function(a){this.weight=a;return this},setFamily:function(a){this.family=a;return this},setDecoration:function(a){this.decoration=
266a;return this},toJson:function(){return h.fixJson({size:e.px2pt(this.size),style:this.style,variant:this.variant,decoration:this.decoration,weight:this.weight,family:this.family})}});n.mixin(p,{STYLE_NORMAL:"normal",STYLE_ITALIC:"italic",STYLE_OBLIQUE:"oblique",VARIANT_NORMAL:"normal",VARIANT_SMALLCAPS:"small-caps",WEIGHT_NORMAL:"normal",WEIGHT_BOLD:"bold",WEIGHT_BOLDER:"bolder",WEIGHT_LIGHTER:"lighter"});a("extend-esri")&&n.setObject("symbol.Font",p,l);return p})},"esri/sniff":function(){define(["dojo/_base/sniff",
267"./kernel"],function(p,n){var a=p("ff"),e=p("ie"),l=void 0===e&&7<=p("trident"),h=p("webkit"),q=p("opera"),g=p("chrome"),d=p("safari"),c=navigator.userAgent,b;(b=c.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i))&&p.add("esri-iphone",parseFloat(b[2].replace("_",".")));(b=c.match(/Android\s+(\d+\.\d+)/i))&&p.add("esri-android",parseFloat(b[1]));(b=c.match(/Fennec\/(\d+\.\d+)/i))&&p.add("esri-fennec",parseFloat(b[1]));0<=c.indexOf("BlackBerry")&&0<=c.indexOf("WebKit")&&p.add("esri-blackberry",1);p.add("esri-touch",
268p("esri-iphone")||p("esri-android")||p("esri-blackberry")||6<=p("esri-fennec")||(a||h)&&document.createTouch?!0:!1);(b=c.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i))&&p.add("esri-mobile",b);p.add("esri-pointer",navigator.pointerEnabled||navigator.msPointerEnabled);n._getDOMAccessor=function(b){var c="";a?c="Moz":h?c="Webkit":e?c="ms":q&&(c="O");return c+b.charAt(0).toUpperCase()+b.substr(1)};p.add("esri-phonegap",!!window.cordova);p.add("esri-cors",p("esri-phonegap")||
269window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest);p.add("esri-file-upload",window.FormData&&window.FileList?!0:!1);p.add("esri-workers",window.Worker?!0:!1);p.add("esri-transforms",l||9<=e||3.5<=a||4<=g||3.1<=d||10.5<=q||3.2<=p("esri-iphone")||2.1<=p("esri-android"));p.add("esri-transitions",l||10<=e||4<=a||4<=g||3.1<=d||10.5<=q||3.2<=p("esri-iphone")||2.1<=p("esri-android"));p.add("esri-transforms3d",l||10<=a||12<=g||4<=d||3.2<=p("esri-iphone")||3<=p("esri-android"));p.add("esri-url-encodes-apostrophe",
270function(){var a=window.document.createElement("a");a.href="?'";return-1<a.href.indexOf("?%27")});3>p("esri-android")&&(p.add("esri-transforms",!1,!1,!0),p.add("esri-transitions",!1,!1,!0),p.add("esri-transforms3d",!1,!1,!0));n._css=function(b){var c=p("esri-transforms3d");if(void 0!==b&&null!==b)c=b;else if(c&&(g||d&&!p("esri-iphone")))c=!1;var t=c?"translate3d(":"translate(",s=c?g?",-1px)":",0px)":")",k=c?"scale3d(":"scale(",r=c?",1)":")",u=c?"rotate3d(0,0,1,":"rotate(",x=c?"matrix3d(":"matrix(",
271v=c?",0,0,":",",l=c?",0,0,0,0,1,0,":",",w=c?",0,1)":")";return{names:{transition:h&&"-webkit-transition"||a&&"MozTransition"||q&&"OTransition"||e&&"msTransition"||"transition",transform:h&&"-webkit-transform"||a&&"MozTransform"||q&&"OTransform"||e&&"msTransform"||"transform",transformName:h&&"-webkit-transform"||a&&"-moz-transform"||q&&"-o-transform"||e&&"-ms-transform"||"transform",origin:h&&"-webkit-transform-origin"||a&&"MozTransformOrigin"||q&&"OTransformOrigin"||e&&"msTransformOrigin"||"transformOrigin",
272endEvent:h&&"webkitTransitionEnd"||a&&"transitionend"||q&&"oTransitionEnd"||e&&"MSTransitionEnd"||"transitionend"},translate:function(a,b){return t+a+"px,"+b+"px"+s},scale:function(a){return k+a+","+a+r},rotate:function(a){return u+a+"deg)"},matrix:function(b){return x+b.xx+","+b.xy+v+b.yx+","+b.yy+l+b.dx.toFixed(10)+(a?"px,":",")+b.dy.toFixed(10)+(a?"px":"")+w},getScaleFromMatrix:function(a){if(!a)return 1;a=a.toLowerCase();var b=-1<a.indexOf("matrix3d")?"matrix3d(":"matrix(";return Number(a.substring(b.length,
273a.indexOf(",")))}}};p("extend-esri")&&(n.isiPhone=p("esri-iphone"),n.isAndroid=p("esri-android"),n.isFennec=p("esri-fennec"),n.isBlackBerry=p("esri-blackberry"),n.isTouchEnabled=p("esri-touch"),n.isPointerEnabled=p("esri-pointer"),n._hasCors=p("esri-cors"),n._hasFileUpload=p("esri-file-upload"),n._hasTransforms=p("esri-transforms"),n._hasTransitions=p("esri-transitions"),n._has3DTransforms=p("esri-transforms3d"));return p})},"dijit/_base/scroll":function(){define(["dojo/window","../main"],function(p,
274n){n.scrollIntoView=function(a,e){p.scrollIntoView(a,e)}})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(p,n,a,e,l,h,q,g){var d=n("dijit._TemplatedMixin",g,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var b=this.declaredClass,d=this;return q.substitute(a,this,function(a,c){"!"==c.charAt(0)&&(a=e.getObject(c.substr(1),
275!1,d));if("undefined"==typeof a)throw Error(b+" template:"+c);return null==a?"":"!"==c.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=p(this.templatePath,{sanitize:!0}));var c=d.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),
276b;if(e.isString(c)){if(b=a.toDom(this._stringRepl(c),this.ownerDocument),1!=b.nodeType)throw Error("Invalid template: "+c);}else b=c.cloneNode(!0);this.domNode=b}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)}});d._templateCache={};d.getCachedTemplate=function(c,b,f){var m=d._templateCache,t=c,s=m[t];if(s){try{if(!s.ownerDocument||s.ownerDocument==
277(f||document))return s}catch(k){}a.destroy(s)}c=q.trim(c);if(b||c.match(/\$\{([^\}]+)\}/g))return m[t]=c;b=a.toDom(c,f);
277if(1!=b.nodeType)throw Error("Invalid template: "+c);return m[t]=b};h("ie")&&l(window,"unload",function(){var c=d._templateCache,b;for(b in c){var f=c[b];"object"==typeof f&&a.destroy(f);delete c[b]}});return d})},"esri/dijit/Attribution":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/kernel dojo/has dojo/query dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/dom-class dojo/dom-geometry ../kernel ../lang ../SpatialReference ../geometry/webMercatorUtils ../geometry/Extent".split(" "),
278function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u){p=p(null,{declaredClass:"esri.dijit.Attribution",itemDelimiter:" | ",listClass:"esriAttributionList",itemClass:"esriAttributionItem",lastItemClass:"esriAttributionLastItem",delimiterClass:"esriAttributionDelim",constructor:function(a,b){try{n.mixin(this,a);this._attributions={};this._pendingDfds={};this._activeLayers=[];this._sharedLayers=[];var c=this.domNode=g.byId(b),k=this.map,r="\x3cspan class\x3d'"+this.listClass+"'\x3e\x3c/span\x3e";c&&(d.set(c,
279"innerHTML",r),this.listNode=l.query(".esriAttributionList",c)[0],this.itemNodes={});this._eventConnections=[e.connect(k,"onLayerAdd",this,this._onLayerAdd),e.connect(k,"onLayerRemove",this,this._onLayerRemove),e.connect(k,"onLayerSuspend",this,this._onLayerSuspend),e.connect(k,"onLayerResume",this,this._onLayerResume),e.connect(k,"onExtentChange",this,this._onExtentChange)];if(k.loaded){var f=k.layerIds.concat(k.graphicsLayerIds),m,s,u=f.length;for(s=0;s<u;s++)m=k.getLayer(f[s]),m.loaded&&this._onLayerAdd(m)}}catch(t){}},
280startup:function(){},destroy:function(){a.forEach(this._eventConnections,e.disconnect);c.destroy(this.listNode);this.map=this.domNode=this._eventConnections=this.listNode=this._attributions=this._pendingDfds=this.itemNodes=this._activeLayers=this._lastItem=this._sharedLayers=null},_onLayerAdd:function(a){try{var b=this._attributions,c=a.id;if(!s.isDefined(b[c])&&a.showAttribution)if(a.hasAttributionData){var d=a.getAttributionData();this._pendingDfds[c]=1;b[c]=d;d.addBoth(n.partial(this._onAttributionLoad,
281this,a))}else b[c]=a.copyright||a.copyrightText||"",b[c]?(a.suspended||this._activeLayers.push(c),this._createNode(c)):this._onLayerRemove(a)}catch(k){}},_onAttributionLoad:function(a,b,c){var d=a._attributions,k=a._pendingDfds,r=b.id;if(k&&k[r]){delete k[r];if(!c||c instanceof Error)c="";d[r]=c?a._createIndexByLevel(c,-1!==b.declaredClass.toLowerCase().indexOf("vetiledlayer")):b.copyright||b.copyrightText||"";d[r]?(b.suspended||a._activeLayers.push(r),a._createNode(r)):a._onLayerRemove(b)}},_onLayerRemove:function(b){try{var d=
282b.id,k=this.itemNodes,r,f=-1;this._onLayerSuspend(b);delete this._attributions[d];delete this._pendingDfds[d];r=this._getGroupIndex(d);-1!==r&&(f=a.indexOf(this._sharedLayers[r],d),-1!==f&&(this._sharedLayers[r].splice(f,1),1>=this._sharedLayers[r].length&&this._sharedLayers.splice(r,1)));k[d]&&-1===f&&c.destroy(k[d]);delete k[d];this._updateLastItem()}catch(m){}},_onLayerSuspend:function(b){try{var c=b.id;if(this._attributions[c]){var d=a.indexOf(this._activeLayers,c),k=this.itemNodes[c];-1!==d&&
283this._activeLayers.splice(d,1);k&&this._toggleItem(k,!1,this._getGroupIndex(c))}}catch(r){}},_onLayerResume:function(b){try{var c=b.id,k=this._attributions[c],r=this.itemNodes[c];if(k&&(-1===a.indexOf(this._activeLayers,c)&&this._activeLayers.push(c),r)){var f=n.isString(k)?k:this._getContributorsList(k,this.map.extent,this.map.getLevel());n.isString(k)||d.set(r,"innerHTML",f?f+this._getDelimiter():"");f&&this._toggleItem(r,!0,this._getGroupIndex(c))}}catch(m){}},_onExtentChange:function(a,b,c,k){try{var r=
284this._activeLayers,f=this._attributions,m=this.itemNodes,s,u,t,g,e=r.length||0;for(g=0;g<e;g++)if(u=r[g],t=f[u],(s=m[u])&&!n.isString(t)){var h=this._getContributorsList(t,a,k?k.level:-1);d.set(s,"innerHTML",h?h+this._getDelimiter():"");this._toggleItem(s,!!h,-1)}}catch(l){}this._adjustCursorStyle()},_createNode:function(a){if(this.domNode){var b=this._checkShareInfo(a),d=b&&b.sharedWith,d=d&&this.itemNodes[d],k=this.map,r=this._attributions[a],r=n.isString(r)?r:this._getContributorsList(r,k.extent,
285k.getLevel()),k=!!r&&!k.getLayer(a).suspended;d?(this.itemNodes[a]=d,this._toggleItem(d,k,b.index)):(a=this.itemNodes[a]=c.create("span",{"class":this.itemClass,innerHTML:r?r+this._getDelimiter():"",style:{display:k?"inline":"none"}},this.listNode),k&&this._setLastItem(a));this._adjustCursorStyle()}}
285,_checkShareInfo:function(b){var c=this._attributions,d,k,r=-1,f=c[b],m;if(f&&n.isString(f)){for(k in c)if(d=c[k],k!==b&&d&&n.isString(d)&&d.length===f.length&&d.toLowerCase()===f.toLowerCase()){m=k;break}c=
286this._sharedLayers;d=c.length;if(m){for(k=0;k<d;k++)if(f=c[k],-1!==a.indexOf(f,m)){r=k;f.push(b);break}-1===r&&(r=c.push([m,b])-1)}}return-1<r?{index:r,sharedWith:m}:null},_getGroupIndex:function(b){var c=this._sharedLayers,d,k=c.length,r=-1;for(d=0;d<k;d++)if(-1!==a.indexOf(c[d],b)){r=d;break}return r},_getDelimiter:function(){var a=this.itemDelimiter;return a?"\x3cspan class\x3d'"+this.delimiterClass+"'\x3e"+a+"\x3c/span\x3e":""},_toggleItem:function(c,d,k){if(-1<k&&!d){k=this._sharedLayers[k];
287var r,f=k.length,m=this._activeLayers;for(r=0;r<f;r++)if(-1!==a.indexOf(m,k[r]))return}b.set(c,"display",d?"inline":"none");this._updateLastItem()},_updateLastItem:function(){var a=this.listNode.childNodes,c;c=a.length;var d;if(c)for(c-=1;0<=c;c--)if(d=a[c],"none"!==b.get(d,"display")){this._setLastItem(d);break}this._adjustCursorStyle()},_setLastItem:function(a){var b=this.itemClass,c=this.lastItemClass;this._lastItem&&f.replace(this._lastItem,b,c);a&&(f.replace(a,c,b),this._lastItem=a)},_createIndexByLevel:function(a,
288b){var c=a.contributors,d,f,m,t,g=c?c.length:0,e,h,l=new k(4326),q={},n;for(t=0;t<g;t++){d=c[t];h=(f=d.coverageAreas)?f.length:0;for(e=0;e<h;e++){m=f[e];n=m.bbox;n={extent:r.geographicToWebMercator(new u(n[1],n[0],n[3],n[2],l)),attribution:d.attribution||"",zoomMin:m.zoomMin-(b&&m.zoomMin?1:0),zoomMax:m.zoomMax-(b&&m.zoomMax?1:0),score:s.isDefined(m.score)?m.score:100,objectId:t};for(m=n.zoomMin;m<=n.zoomMax;m++)q[m]=q[m]||[],q[m].push(n)}}return q},_getContributorsList:function(a,b,c){var d="";if(b&&
289s.isDefined(c)&&-1<c){a=a[c];c=b.getCenter().normalize();for(var k=a?a.length:0,r=[],f={},d=0;d<k;d++)b=a[d],!f[b.objectId]&&b.extent.contains(c)&&(f[b.objectId]=1,r.push(b));r.sort(function(a,b){return b.score-a.score||a.objectId-b.objectId});k=r.length;for(d=0;d<k;d++)r[d]=r[d].attribution;d=r.join(", ")}return d},_adjustCursorStyle:function(){var a=m.position(this.listNode.parentNode,!0).h;f.contains(this.listNode.parentNode,"esriAttributionOpen")?(f.remove(this.listNode.parentNode,"esriAttributionOpen"),
290a>m.position(this.listNode.parentNode,!0).h?(b.set(this.listNode.parentNode,"cursor","pointer"),f.add(this.listNode.parentNode,"esriAttributionOpen")):b.set(this.listNode.parentNode,"cursor","default")):(f.add(this.listNode.parentNode,"esriAttributionOpen"),a<m.position(this.listNode.parentNode,!0).h?b.set(this.listNode.parentNode,"cursor","pointer"):b.set(this.listNode.parentNode,"cursor","default"),f.remove(this.listNode.parentNode,"esriAttributionOpen"))}});h("extend-esri")&&n.setObject("dijit.Attribution",
291p,t);return p})},"esri/layers/HeatmapManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/_base/array require ../kernel ../sniff ../geometry/Point ../geometry/webMercatorUtils ./MapImage ../renderers/HeatmapRenderer ../tasks/query dojo/_base/fx".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m){function t(){}function s(a){var b=a.layer;return{geometry:a.geometry,attributes:a.attributes,getLayer:function(){return b}}}p=p(null,{declaredClass:"esri.layers.HeatmapManager",heatmapRenderer:null,
292sourceLayer:null,imageLayer:null,useTiles:!0,useWorker:!1,map:null,constructor:function(a){this.sourceLayer=a;this._hndls=[]},initialize:function(a){this.map=a;var c=this.sourceLayer,d=c.renderer;c.setDrawMode(!1);this.imageLayer=a._getMapImageLyr();var f=this;this.heatmapRenderer=d instanceof b?d:(d.getRendererInfoByZoom(a.getZoom())||d.getRendererInfoByScale(a.getScale())).renderer;this._setupDraw=this._setupDraw.bind(this);this.recalculateHeatmap=this.recalculateHeatmap.bind(this);this._removeRenderer=
293this._removeRenderer.bind(this);this._handleRendererChange=this._handleRendererChange.bind(this);this._rendererChangeHandle=this.sourceLayer.on("renderer-change",this._handleRendererChange);this._handleOpacityChange=this._handleOpacityChange.bind(this);this._reprojectFeature=this._reprojectFeature.bind(this);l(["../workers/heatmapCalculator"],function(a){f._calculator=new a(n.mixin({width:f.map.width,height:f.map.height},f._getOptions()));f._setupRenderer();f.heatmapRenderer.getStats=a.calculateStats;
294f.heatmapRenderer.getHistogramData=a.getHistogramData})},destroy:function(){this._removeHandlers();this._rendererChangeHandle&&this._rendererChangeHandle.remove();this._rendererChangeHandle=this.sourceLayer=this.imageLayer=this.map=this.heatmapRenderer=this._hndls=null},_handleRendererChange:function(a){var c=a.renderer,d=c instanceof b;this.heatmapRenderer?d?this.heatmapRenderer=c:this._removeRenderer(a):d&&(this.heatmapRenderer=c,this.sourceLayer&&this.map&&this._setupRenderer())},_handleOpacityChange:function(a){a=
295a.opacity;var b=this._getImageBySourceId(this.sourceLayer.id);b&&b.setOpacity(a)},_setupRenderer:function(){var b=this._hndls,c=this.sourceLayer,d=this.map,f=this;c._originalDraw=c._draw;c._draw=t;c._div.clear();clearTimeout(this._resetTimer);this._resetTimer=setTimeout(this._resetGraphics.bind(this),250);b.push(c.on("update-end",this._setupDraw));b.push(c.on("suspend",function(a){(a=f._getImageBySourceId(f.sourceLayer.id))&&a.hide()}));b.push(c.on("resume",function(a){(a=f._getImageBySourceId(f.sourceLayer.id))&&
296a.show()}));b.push(a.after(c,"redraw",this._setupDraw));b.push(d.on("layer-remove",function(a){a.layer==c&&((a=f._getImageBySourceId(f.sourceLayer.id))&&f.imageLayer.removeImage(a),f._removeRenderer({target:c}))}));c._collection&&b.push(c.on("graphic-add",function(a){f._reprojectFeature
296(a.graphic);f._setupDraw()}));1!==c.mode&&(b.push(d.on("resize, pan-end",this._setupDraw)),b.push(d.on("zoom-end",this._setupDraw)));b.push(c.on("opacity-change",this._handleOpacityChange));this.imageLayer.suspended&&
297this.imageLayer.resume();c.graphics&&c.graphics.length&&(c.graphics[0].geometry&&!d.spatialReference.equals(c.graphics[0].geometry.spatialReference)&&e.forEach(c.graphics,function(a){this._reprojectFeature(a)}.bind(this)),this._setupDraw())},_setupDraw:function(){if(!this._drawTimer){var a=this;this._drawTimer=setTimeout(function(){clearTimeout(a._drawTimer);a._drawTimer=null;a.sourceLayer._getRenderer().isInstanceOf(b)&&a.recalculateHeatmap()},16)}},_removeRenderer:function(a){var b=a.target;b._draw=
298b._originalDraw;delete b._originalDraw;b.setDrawMode(!0);this._removeHandlers();this._hndls=[];var c=this._getImageBySourceId(this.sourceLayer.id);c&&this.imageLayer.removeImage(c);clearTimeout(this._drawTimer);clearTimeout(this._resetTimer);this._drawTimer=this._resetTimer=null;b.renderer!=a.renderer&&b.renderer.getRendererInfo?this.heatmapRenderer=null:(b.redraw(),this.destroy())},recalculateHeatmap:function(){this._calculator?this._doMainCalculation():this._calculatorClient&&this._doWorkerCalculation()},
299_reprojectFeature:function(a){if(a&&a.geometry){var b=a.geometry,c=this.map.spatialReference;c.equals(b.spatialReference)||(b=d.project(b,c),null==b?console.log("Unable to reproject features to map's spatial reference. Please convert feature geometry before adding to layer"):a.geometry=b)}},_doWorkerCalculation:function(){},_doMainCalculation:function(){var a=this.sourceLayer,b=this.map,d=this.heatmapRenderer,m=this.map.extent,t=this.map.width,g=this.map.height,e=this._calculator,h=this,l=function(f){f=
300h._getScreenPoints(f.features,b,a);f=e.calculateImageData(n.mixin({screenPoints:f,mapinfo:{extent:[m.xmin,m.ymin,m.xmax,m.ymax],resolution:b.getResolution()},width:t,height:g},h._getOptions()));f=d.getSymbol(s({geometry:b.extent,attributes:{size:[t,g],imageData:f},layer:a}));f=new c({extent:b.extent,href:f.url,opacity:0,sourceId:a.id});h._swapMapImages(f,h._getImageBySourceId(a.id));a.suspended&&f.hide()},q={geometry:b.extent,timeExtent:a.useMapTime?b.timeExtent:void 0,spatialRelationship:f.SPATIAL_REL_INTERSECTS};
301null!=a._canDoClientSideQuery(q)?a.queryFeatures(q,l):l({features:a.graphics})},_getScreenPoints:function(a,b,c){var d=[],f=a.length,m=0,s=0,t,h=new g(b.extent.xmin,b.extent.ymax,b.spatialReference),l=b.toScreen(h),q=l.x,l=l.y,n=b.getResolution(),C;for((s=b.extent.getCacheValue("_parts"))&&(C=e.map(s,function(a){return c._intersects(b,a.extent)[0]}));f--;)s=a[f],s.geometry&&(t={x:Math.ceil((s.geometry.x-h.x)/n+q),y:Math.floor((h.y-s.geometry.y)/n-l),attributes:s.attributes},C&&(s=1<C.length&&t.x<
302-C[0]?C[1]:C[0],t.x+=s),d[m++]=t);return d},_getImageBySourceId:function(a){var b=this.imageLayer.getImages(),b=e.filter(b,function(b){return b.sourceId==a});if(b.length)return b[b.length-1]},_swapMapImages:function(a,b){function c(){d.removeImage(b)}var d=this.imageLayer,f=this.sourceLayer.opacity||1;d.addImage(a);m.anim(a._node,{opacity:f},null,null,function(){a.opacity=f});null!=b&&m.anim(b._node,{opacity:0},null,null,c)},_removeHandlers:function(){if(null!=this._hndls)for(var a=this._hndls.length;a--;)this._hndls[a].remove()},
303_getOptions:function(){var a=this.heatmapRenderer;return{blurRadius:a.blurRadius,gradient:a.gradient,maxPixelIntensity:a.maxPixelIntensity,minPixelIntensity:a.minPixelIntensity,field:a.field,fieldOffset:a.fieldOffset}},_resetGraphics:function(){clearTimeout(this._resetTimer);this._resetTimer=null;for(var a=this.sourceLayer.graphics,b=a.length,c;b--;)c=a[b],c._shape=c._offsets=void 0}});q("extend-esri")&&n.setObject("layers.HeatmapManager",p,h);return p})},"dijit/_Templated":function(){define("./_WidgetBase ./_TemplatedMixin ./_WidgetsInTemplateMixin dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/_base/kernel".split(" "),
304function(p,n,a,e,l,h,q){h.extend(p,{waiRole:"",waiState:""});return l("dijit._Templated",[n,a],{widgetsInTemplate:!1,constructor:function(){q.deprecated(this.declaredClass+": dijit._Templated deprecated, use dijit._TemplatedMixin and if necessary dijit._WidgetsInTemplateMixin","","2.0")},_processNode:function(a,d){var c=this.inherited(arguments),b=d(a,"waiRole");b&&a.setAttribute("role",b);(b=d(a,"waiState"))&&e.forEach(b.split(/\s*,\s*/),function(b){-1!=b.indexOf("-")&&(b=b.split("-"),a.setAttribute("aria-"+
305b[0],b[1]))});return c}})})},"esri/ImageSpatialReference":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ./kernel ./lang ./SpatialReference".split(" "),function(p,n,a,e,l,h){p=p(h,{declaredClass:"esri.ImageSpatialReference",constructor:function(a){a&&(n.isObject(a)&&n.mixin(this,a),this.url||console.error("ImageSpatialReference: must provide image service URL."))},icsid:null,ics:null,_isWebMercator:function(){return!1},_isWrappable:function(){return!1},equals:function(a){var g=!1;
306a&&(this.icsid&&a.icsid?g=this.icsid===a.icsid:this.ics&&a.ics&&(g=this.ics===a.ics));return g},toJson:function(a){var g=null,d=l.isDefined;a=d(a)?a:!0;d(this.icsid)?g={icsid:this.icsid}:d(this.ics)&&(g={ics:this.ics});d(this.url)&&(d(g)&&a)&&(g.url=this.url);return g}});a("extend-esri")&&(e.ImageSpatialReference=p);return p})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),
307function(p,n,a,e,l,h,q,g,d,c,b,f){n=n("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);p.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(a){this.watch(a,h.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()}
307,_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",
308!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(c){b=b.concat(p.map(b,function(a){return a+c}),"dijit"+c)}var b=this.baseClass.split(" ");
309this.isLeftToRight()||a("Rtl");var c="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(c);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var c=this.stateNode||this.domNode,d={};p.forEach(c.className.split(" "),function(a){d[a]=!0});"_stateClasses"in this&&p.forEach(this._stateClasses,function(a){delete d[a]});p.forEach(b,
310function(a){d[a]=!0});var r=[],f;for(f in d)r.push(f);c.className=r.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,b,c){function d(c){e.toggle(a,b+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":case "MSPointerOver":case "pointerover":e.toggle(a,b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":e.toggle(a,b+"Hover",!1);d(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":d(!0);
311break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":d(!1);break;case "focus":case "focusin":e.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":e.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});g(function(){function m(b,c,d){if(!d||!a.isDescendant(d,c))for(;c&&c!=d;c=c.parentNode)if(c._cssState){var m=f.getEnclosingWidget(c);m&&(c==m.domNode?m._cssMouseEvent(b):m._subnodeCssMouseEvent(c,c._cssState,b))}}var t=c.body(),s;q(t,
312d.over,function(a){m(a,a.target,a.relatedTarget)});q(t,d.out,function(a){m(a,a.target,a.relatedTarget)});q(t,b.press,function(a){s=a.target;m(a,s)});q(t,b.release,function(a){m(a,s);s=null});q(t,"focusin, focusout",function(a){var b=a.target;if(b._cssState&&!b.getAttribute("widgetId")){var c=f.getEnclosingWidget(b);c&&c._subnodeCssMouseEvent(b,b._cssState,a)}})});return n})},"esri/layers/agscommon":function(){define("./ArcGISMapServiceLayer ./LayerInfo ./TimeInfo ./LayerTimeOptions ./TimeReference ./Field ./Domain ./RangeDomain ./CodedValueDomain ./InheritedDomain ./LayerSource ./LayerMapSource ./LayerDataSource ./DataSource ./TableDataSource ./QueryDataSource ./JoinDataSource ./RasterDataSource ./DynamicLayerInfo ./LayerDrawingOptions ../geometry ../utils".split(" "),
313function(){return{}})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-style dojo/on dojo/window ./_Widget ./_TemplatedMixin ./BackgroundIframe ./Viewport ./main".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f){var m=p("dijit.DialogUnderlay",[g,d],{templateString:"\x3cdiv class\x3d'dijitDialogUnderlayWrapper'\x3e\x3cdiv class\x3d'dijitDialogUnderlay' tabIndex\x3d'-1' data-dojo-attach-point\x3d'node'\x3e\x3c/div\x3e\x3c/div\x3e",dialogId:"",
314"class":"",_modalConnects:[],_setDialogIdAttr:function(a){e.set(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+a;this._set("class",a)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.own(h(this.domNode,"keydown",n.hitch(this,"_onKeyDown")));this.inherited(arguments)},layout:function(){var a=this.node.style,b=this.domNode.style;b.display="none";var c=q.getBox(this.ownerDocument);b.top=c.t+"px";
315b.left=c.l+"px";a.width=c.w+"px";a.height=c.h+"px";b.display="block"},show:function(){this.domNode.style.display="block";this.open=!0;this.layout();
315this.bgIframe=new c(this.domNode);var a=q.get(this.ownerDocument);this._modalConnects=[b.on("resize",n.hitch(this,"layout")),h(a,"scroll",n.hitch(this,"layout"))]},hide:function(){this.bgIframe.destroy();delete this.bgIframe;for(this.domNode.style.display="none";this._modalConnects.length;)this._modalConnects.pop().remove();this.open=!1},destroy:function(){for(;this._modalConnects.length;)this._modalConnects.pop().remove();
316this.inherited(arguments)},_onKeyDown:function(){}});m.show=function(a,b){var c=m._singleton;!c||c._destroyed?c=f._underlay=m._singleton=new m(a):a&&c.set(a);l.set(c.domNode,"zIndex",b);c.open||c.show()};m.hide=function(){var a=m._singleton;a&&!a._destroyed&&a.hide()};return m})},"esri/layers/gfxSniff":function(){define(["dojo/has","dojox/gfx"],function(p,n){p.add("esri-svg",function(){return-1!==n.renderer.toLowerCase().indexOf("svg")});return p})},"esri/TimeExtent":function(){define(["dojo/_base/declare",
317"dojo/_base/lang","dojo/has","./kernel"],function(p,n,a,e){var l=p(null,{declaredClass:"esri.TimeExtent",constructor:function(a){if(1<arguments.length)this._create(arguments[0],arguments[1]);else if(a)if(n.isArray(a)){var e=a[0],g=a[1];this.startTime=null===e||"null"===e?null:new Date(e);this.endTime=null===g||"null"===g?null:new Date(g)}else a instanceof Date&&this._create(a,null)},offset:function(a,e){var g=new l,d=this.startTime,c=this.endTime;d&&(g.startTime=this._getOffsettedDate(d,a,e));c&&
318(g.endTime=this._getOffsettedDate(c,a,e));return g},intersection:function(a){return this._intersection(this,a)},toJson:function(){var a=[],e=this.startTime;a.push(e?e.getTime():"null");e=this.endTime;a.push(e?e.getTime():"null");return a},_create:function(a,e){this.startTime=a?new Date(a.getTime()):null;this.endTime=e?new Date(e.getTime()):null},_refData:{esriTimeUnitsMilliseconds:{getter:"getUTCMilliseconds",setter:"setUTCMilliseconds",multiplier:1},esriTimeUnitsSeconds:{getter:"getUTCSeconds",setter:"setUTCSeconds",
319multiplier:1},esriTimeUnitsMinutes:{getter:"getUTCMinutes",setter:"setUTCMinutes",multiplier:1},esriTimeUnitsHours:{getter:"getUTCHours",setter:"setUTCHours",multiplier:1},esriTimeUnitsDays:{getter:"getUTCDate",setter:"setUTCDate",multiplier:1},esriTimeUnitsWeeks:{getter:"getUTCDate",setter:"setUTCDate",multiplier:7},esriTimeUnitsMonths:{getter:"getUTCMonth",setter:"setUTCMonth",multiplier:1},esriTimeUnitsYears:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:1},esriTimeUnitsDecades:{getter:"getUTCFullYear",
320setter:"setUTCFullYear",multiplier:10},esriTimeUnitsCenturies:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:100}},_intersection:function(a,e){if(a&&e){var g=a.startTime,d=a.endTime,c=e.startTime,b=e.endTime,g=g?g.getTime():-Infinity,c=c?c.getTime():-Infinity,d=d?d.getTime():Infinity,b=b?b.getTime():Infinity,f,m;c>=g&&c<=d?f=c:g>=c&&g<=b&&(f=g);d>=c&&d<=b?m=d:b>=g&&b<=d&&(m=b);if(!isNaN(f)&&!isNaN(m))return g=new l,g.startTime=-Infinity===f?null:new Date(f),g.endTime=Infinity===m?null:
321new Date(m),g}return null},_getOffsettedDate:function(a,e,g){var d=this._refData;a=new Date(a.getTime());e&&g&&(d=d[g],a[d.setter](a[d.getter]()+e*d.multiplier));return a}});a("extend-esri")&&(e.TimeExtent=l);return l})},"esri/OAuthSignInHandler":function(){define("./Credential ./domUtils ./lang ./urlUtils dijit/Dialog dijit/registry dojo/_base/config dojo/_base/Deferred dojo/_base/kernel dojo/dom-attr dojo/i18n!esri/nls/jsapi dojo/io-query dojo/sniff dojo/json dijit/form/Button dojo/query".split(" "),
322function(p,n,a,e,l,h,q,g,d,c,b,f,m,t){return{_oAuthDfd:null,_oAuthIntervalId:0,_oAuthDialogContent:"\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e${oAuthInfo}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e${invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e${lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e${lblCancel}\x3c/button\x3e\x3c/div\x3e",
323setOAuthRedirectionHandler:function(a){this._oAuthRedirectFunc=a},oAuthSignIn:function(a,d,f,m){var e=this._oAuthDfd=new g;e.resUrl_=a;e.sinfo_=d;e.oinfo_=f;var t=!m||!1!==m.oAuthPopupConfirmation;if(!f.popup||!t)return this._doOAuthSignIn(a,d,f),e;this._nls||(this._nls=b.identity);this.oAuthDialog||(this.oAuthDialog=this._createOAuthDialog());a=this.oAuthDialog;d=m&&m.error;m=m&&m.token;n.hide(a.errMsg_);d&&(403==d.code&&m)&&(c.set(a.errMsg_,"innerHTML",this._nls.forbidden),n.show(a.errMsg_));a.show();
324return e},setOAuthResponseHash:function(a){var b=this._oAuthDfd;this._oAuthDfd=null;if(b&&a)if(clearInterval(this._oAuthIntervalId),"#"===a.charAt(0)&&(a=a.substring(1)),a=f.queryToObject(a),a.error)a=Error("access_de
324nied"===a.error?"ABORTED":"OAuth: "+a.error+" - "+a.error_description),a.code="IdentityManagerBase.2",a.log=q.isDebug,b.errback(a);else{var c=b.oinfo_._oAuthCred,d=new p({userId:a.username,server:b.sinfo_.server,token:a.access_token,expires:(new Date).getTime()+1E3*Number(a.expires_in),
325ssl:"true"===a.ssl,_oAuthCred:c});c.storage=a.persist?window.localStorage:window.sessionStorage;c.token=d.token;c.expires=d.expires;c.userId=d.userId;c.ssl=d.ssl;c.save();b.callback(d)}},_createOAuthDialog:function(){var b=this._nls,c=a.substitute(b,this._oAuthDialogContent),f=new l({title:b.title,content:c,"class":"esriOAuthSignInDialog",style:"min-width: 18em;",esriIdMgr_:this,execute_:function(){var a=f.esriIdMgr_._oAuthDfd;f.hide_();f.esriIdMgr_._doOAuthSignIn(a.resUrl_,a.sinfo_,a.oinfo_)},cancel_:function(){var a=
326f.esriIdMgr_._oAuthDfd;f.esriIdMgr_._oAuthDfd=null;f.hide_();var b=Error("ABORTED");b.code="IdentityManager.2";b.log=q.isDebug;a.errback(b)},hide_:function(){n.hide(f.errMsg_);f.hide();l._DialogLevelManager.hide(f)}}),b=f.domNode;f.btnSubmit_=h.byNode(d.query(".esriIdSubmit",b)[0]);f.btnCancel_=h.byNode(d.query(".esriIdCancel",b)[0]);f.errMsg_=d.query(".esriErrorMsg",b)[0];f.connect(f.btnSubmit_,"onClick",f.execute_);f.connect(f.btnCancel_,"onClick",f.onCancel);f.connect(f,"onCancel",f.cancel_);return f},
327_doOAuthSignIn:function(a,b,c){var d=this,g={client_id:c.appId,response_type:"token",state:t.stringify({portalUrl:c.portalUrl}),expiration:c.expiration,locale:c.locale,force_login:c.forceLogin,redirect_uri:c.popup?e.getAbsoluteUrl(c.popupCallbackUrl):window.location.href.replace(/#.*$/,"")},h=c.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",l=h+"?"+f.objectToQuery(g);if(c.popup){var w;7===m("ie")?(w=window.open(c.popupCallbackUrl,"esriJSAPIOAuth",c.popupWindowFeatures),w.location=
328l):w=window.open(l,"esriJSAPIOAuth",c.popupWindowFeatures);w?(w.focus(),this._oAuthDfd.oAuthWin_=w,this._oAuthIntervalId=setInterval(function(){if(w.closed){clearInterval(d._oAuthIntervalId);var a=d._oAuthDfd;if(a){var b=Error("ABORTED");b.code="IdentityManager.2";b.log=q.isDebug;a.errback(b)}}},500)):(a=Error("ABORTED"),a.code="IdentityManager.2",a.log=q.isDebug,this._oAuthDfd.errback(a))}else this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:g,authorizeUrl:h,resourceUrl:a,serverInfo:b,
329oAuthInfo:c}):window.location=l}}})},"esri/Credential":function(){define(["dojo/_base/declare","dojo/has","./kernel","./IdentityManagerBase"],function(p,n,a,e){p=p(e.Credential,{});n("extend-esri")&&(a.Credential=p);return p})},"esri/symbols/FillSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ./Symbol ./SimpleLineSymbol".split(" "),function(p,n,a,e,l,h){p=p(l,{declaredClass:"esri.symbol.FillSymbol",constructor:function(a){a&&(n.isObject(a)&&a.outline)&&(this.outline=
330new h(a.outline))},setOutline:function(a){this.outline=a;return this},toJson:function(){var a=this.inherited("toJson",arguments);this.outline&&(a.outline=this.outline.toJson());return a}});a("extend-esri")&&n.setObject("symbol.FillSymbol",p,e);return p})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(p,n,a,e,l,h,q){function g(c,b,d,m){var g=h.getEffectiveBox(c.ownerDocument);(!c.parentNode||
331"body"!=String(c.parentNode.tagName).toLowerCase())&&l.body(c.ownerDocument).appendChild(c);var s=null;p.some(b,function(a){var b=a.corner,k=a.pos,r=0,e={w:{L:g.l+g.w-k.x,R:k.x-g.l,M:g.w}[b.charAt(1)],h:{T:g.t+g.h-k.y,B:k.y-g.t,M:g.h}[b.charAt(0)]},h=c.style;h.left=h.right="auto";d&&(r=d(c,a.aroundCorner,b,e,m),r="undefined"==typeof r?0:r);var l=c.style,q=l.display,p=l.visibility;"none"==l.display&&(l.visibility="hidden",l.display="");h=n.position(c);l.display=q;l.visibility=p;q={L:k.x,R:k.x-h.w,
332M:Math.max(g.l,Math.min(g.l+g.w,k.x+(h.w>>1))-h.w)}[b.charAt(1)];p={T:k.y,B:k.y-h.h,M:Math.max(g.t,Math.min(g.t+g.h,k.y+(h.h>>1))-h.h)}[b.charAt(0)];k=Math.max(g.l,q);l=Math.max(g.t,p);q=Math.min(g.l+g.w,q+h.w);p=Math.min(g.t+g.h,p+h.h);q-=k;p-=l;r+=h.w-q+(h.h-p);if(null==s||r<s.overflow)s={corner:b,aroundCorner:a.aroundCorner,x:k,y:l,w:q,h:p,overflow:r,spaceAvailable:e};return!r});s.overflow&&d&&d(c,s.aroundCorner,s.corner,s.spaceAvailable,m);b=s.y;var k=s.x,r=l.body(c.ownerDocument);/relative|absolute/.test(a.get(r,
333"position"))&&(b-=a.get(r,"marginTop"),k-=a.get(r,"marginLeft"));r=c.style;r.top=b+"px";r.left=k+"px";r.right="auto";return s}var d={TL:"BR",TR:"BL",BL:"TR",BR:"TL"};return q.place={at:function(a,b,f,m,e){f=p.map(f,function(a){var c={corner:a,aroundCorner:d[a],pos:{x:b.x,y:b.y}};m&&(c.pos.x+="L"==a.charAt(1)?m.x:-m.x,c.pos.y+="T"==a.charAt(0)?m.y:-m.y);return c});return g(a,f,e)},around:function(c,b,d,m,t){function s(a,b){D.push({aroundCorner:a,corner:b,pos:{x:{L:w,R:w+B,M:w+(B>>1)}[a.charAt(1)],
334y:{T:y,B:y+G,M:y+(G>>1)}[a.charAt(0)]}})}var k;if("string"==typeof b||"offsetWidth"in b||"ownerSVGElement"in b){if(k=n.position(b,!0),/^(above|below)/.test(d[0])){var r=n.getBorderExtents(b),u=b.firstChild?n.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0},h=n.getBorderExtents(c),l=c.firstChild?n.getBorderExtents(c.firstChild):{t:0,l:0,b:0,r:0};k.y+=Math.min(r.t+u.t,h.t+l.t);k.h-=Math.min(r.t+u.t,h.t+l.t)+Math.min(r.b+u.b,h.b+l.b)}}else k=b;if(b.parentNode){r="absolute"==a.getComputedStyle(b).position;
335for(b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){u=n.position(b,!0);h=a.getComputedStyle(b);/relative|absolute/.test(h.position)&&(r=!1);if(!r&&/hidden|auto|scroll/.test(h.overflow)){var l=Math.min(k.y+k.h,u.y+u.h),q=Math.min(k.x+k.w,u.x+u.w);k.x=Math.max(k.x,u.x);k.y=Math.max(k.y,u.y);k.h=l-k.y;k.w=q-k.x}"absolute"==h.position&&(r=!0);b=b.parentNode}}var w=k.x,y=k.y,B="w"in k?k.w:k.w=k.width,G="h"in k?k.h:(e.deprecated("place.around: dijit/place.__Rectangle: { x:"+w+", y:"+y+", height:"+
336k.height+", width:"+B+" } has been deprecated.  Please use { x:"+w+", y:"+y+", h:"+k.height+", w:"+B+" }","","2.0"),k.h=k.height),D=[];p.forEach(d,function(a){var b=m;switch(a){case "above-centered":s("TM","BM");break;case "below-centered":s("BM","TM");break;case "after-centered":b=!b;case "before-centered":s(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":s(b?"TL":"TR",b?"TR":"TL");s(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":s(b?"BL":"BR",b?"TL":"TR");s(b?"BR":
337"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":s(b?"TL":"TR",b?"BL":"BR");s(b?"TR":"TL",b?"BR":"BL");break;default:s(a.aroundCorner,a.corner)}});c=g(c,D,t,{w:B,h:G});c.aroundNodePos=k;return c}}})},"esri/_coremap":function(){define("require module dojo/_base/kernel dojo/_base/declare dojo/_base/connect dojo/_base/Deferred dojo/_base/lang dojo/_base/array dojo/_base/event dojo/_base/unload dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/sniff dijit/registry dojox/gfx/matrix ./kernel ./config ./basemaps ./lang ./Evented ./fx ./deferredUtils ./tileUtils ./PluginTarget ./geometry/Point ./geometry/ScreenPoint ./geometry/Extent ./geometry/Rect ./geometry/mathUtils ./geometry/scaleUtils ./geometry/screenUtils ./geometry/webMercatorUtils ./layers/GraphicsLayer ./layers/TileInfo ./layers/LOD ./layers/ArcGISTiledMapServiceLayer ./layers/MapImageLayer ./layers/OpenStreetMapLayer ./dijit/Popup ./plugins/popupManager dojo/uacss".split(" "),
338function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y,B,G,D,A,C,E,I,H,L,J,F,K,M,N,T,O,U,Y,R,ba){function Q(a,b){var c=a.lods;c.sort(function(a,b){return a.scale>b.scale?-1:a.scale<b.scale?1:0});
338var d=[],c=g.filter(c,function(a){if(-1===S(d,a.scale))return d.push(a.scale),!0}),k=b.lods=[],f;g.forEach(c,function(a,b){f=k[b]=new O(a);f.level=b});b.tileInfo=new T(aa(a,{lods:k}))}var P,ca=K.toMapPoint,Z=K.toScreenPoint,X=l.connect,W=l.disconnect,V=q.hitch,$=k.set,S=g.indexOf,aa=q.mixin,fa=0,da=z.defaults.map,
339la=da.layerNamePrefix,ga=da.graphicsLayerNamePrefix,ma=RegExp("^"+la+"(\\d+)$"),ja=RegExp("^"+ga+"(\\d+)$"),ha=function(){};e=e([B,C],{declaredClass:"esri._CoreMap",resizeDelay:300,invalidExtent:"Map does not have a valid extent.",invalidGeometry:"Geometry (wkid: ${geometry}) cannot be converted to spatial reference of the map (wkid: ${map})",unknownBasemap:'Unable to find basemap definition for: "${basemapName}". Try one of these: ${list}',invalidBasemap:'Unable to add basemap: "${basemapName}".',
340unknownLayerType:'Unknown basemap layer type: "${type}" found in basemap definition for: "${basemapName}".',visible:!0,_eventMap:{"basemap-change":!0,"extent-change":["extent","delta","levelChange","lod"],"layer-add":["layer"],"layer-add-result":["layer","error"],"layer-remove":["layer"],"layer-reorder":["layer","index"],"layer-resume":["layer"],"layer-suspend":["layer"],"layers-add-result":["layers"],"layers-removed":!0,"layers-reordered":["layerIds"],load:["map"],pan:["extent","delta"],"pan-end":["extent",
341"delta"],"pan-start":["extent","screenPoint"],reposition:["x","y"],resize:["extent","width","height"],scale:["matrix","immediate"],"time-extent-change":["timeExtent"],"before-unload":["map"],unload:["map"],"update-end":["error"],"update-start":!0,zoom:["extent","zoomFactor","anchor"],"zoom-end":["extent","zoomFactor","anchor","level"],"zoom-start":["extent","zoomFactor","anchor","level"],click:!0,"dbl-click":!0,"key-down":!0,"key-up":!0,"mouse-down":!0,"mouse-drag":!0,"mouse-drag-end":!0,"mouse-drag-start":!0,
342"mouse-move":!0,"mouse-out":!0,"mouse-over":!0,"mouse-up":!0,"mouse-wheel":!0,"basic-tap":!0,"double-tap":!0,"pinch-end":!0,"pinch-move":!0,"pinch-start":!0,"processed-double-tap":!0,"processed-tap":!0,"swipe-end":!0,"swipe-move":!0,"swipe-start":!0,tap:!0,"two-finger-tap":!0},constructor:function(a,d){var k=this;this.registerConnectEvents();aa(this,{_internalLayerIds:[],_layers:[],_layerDivs:[],_layerSize:0,_connects:[],_zoomAnimDiv:null,_zoomAnim:null,_layersDiv:null,_firstLayerId:null,_delta:null,
343_cursor:null,_ratioW:1,_ratioH:1,_params:null,cursor:null,layerIds:[],graphicsLayerIds:[],graphics:null,_labels:null,loaded:!1,__panning:!1,__zooming:!1,__container:null,root:null,__LOD:null,__tileInfo:null,__visibleRect:null,__visibleDelta:null,_rids:[]});var r=this.container=b.byId(a),g=this.id=f.get(r,"id")||u.getUniqueId(this.declaredClass);m.add(r,"map");var e=s.getContentBox(r),h=m.add,l=t.create;this.position=new I(0,0);this._reposition();var v=this.width=0<e.w?e.w:da.width,q=this.height=0<
344e.h?e.h:da.height,x=this.root=l("div",{id:g+"_root",style:{width:v+"px",height:q+"px",direction:"ltr"}});h(x,"esriMapContainer");e=this.__container=l("div",{id:g+"_container"},x);$(e,"position","absolute");h(e,"esriMapContainer");r.appendChild(x);r=this._params=aa({slider:!0,nav:!1,zoom:-1,minZoom:-1,maxZoom:-1,scale:-1,minScale:0,maxScale:0,showInfoWindowOnClick:!0,displayGraphicsOnPan:!0,wrapAround180:!0,fitExtent:!1,optimizePanAnimation:!0},d||{});this.wrapAround180=r.wrapAround180;this.optimizePanAnimation=
345r.optimizePanAnimation;y.isDefined(r.resizeDelay)&&(this.resizeDelay=r.resizeDelay);r.lods&&(Q({rows:512,cols:512,dpi:96,format:"JPEG",compressionQuality:75,origin:{x:-180,y:90},spatialReference:{wkid:4326},lods:r.lods},r),this.__tileInfo=r.tileInfo);this.extent=r.extent;this._extentUtil({mapCenter:r.center,targetLevel:r.zoom,targetScale:r.scale});this.__visibleRect=new L(0,0,v,q);this.__visibleDelta=new L(0,0,v,q);g=this._layersDiv=l("div",{id:g+"_layers"});h(g,"esriMapLayers");e.appendChild(g);
346this._zoomAnimDiv=l("div",{style:{position:"absolute"}});r.infoWindow?this.infoWindow=r.infoWindow:(h=this.infoWindow=new ba(r.popupOptions,l("div")),h.startup(),h._ootb=!0,$(h.domNode,"zIndex",40));r.showLabels&&(p(["./layers/LabelLayer"],function(a){P=a;k._createLabelLayer()}),this.on("load",function(){k._createLabelLayer()}));this.addPlugin(this._getAbsMid("./plugins/popupManager"),{enabled:r.showInfoWindowOnClick});this._zoomStartHandler=V(this,this._zoomStartHandler);this._zoomingHandler=V(this,
347this._zoomingHandler);this._zoomEndHandler=V(this,this._zoomEndHandler);this._panningHandler=V(this,this._panningHandler);this._panEndHandler=V(this,this._panEndHandler);this._endTranslate=V(this,this._endTranslate);this._timedResize=V(this,this._timedResize);this._execResize=V(this,this._execResize);this.resize=V(this,this.resize);c.addOnWindowUnload(this,this.destroy)},_getAbsMid:function(a){return p.toAbsMid?p.toAbsMid(a):n.id.replace(/\/[^\/]*$/ig,"/")+a},_cleanUp:function(){var a=this.infoWindow;
348a&&(a._ootb&&a.destroy?a.destroy():a.unsetMap(this),delete this.infoWindow);W(this._tsTimeExtentChange_connect);this.removePlugin("./plugins/popupManager");t.destroy(this.root);this.root=null},_addLayer:function(a,b,c){if(a.id){var d=a.id.match(a instanceof N?ja:ma);d&&d[1]&&(d=Number(d[1]),fa<=d&&(fa=d+1))}
348var k=a.id||(a instanceof N?ga:la)+fa++;a.id=k;this._layers[k]=a;var f,r;if(b===this.layerIds||b===this.graphicsLayerIds)f=this._layerSize,this._layerSize++;a._isRefLayer="top"===c;c=!y.isDefined(c)||
3490>c||c>b.length||"top"===c?b.length:c;0===f&&(this._firstLayerId=k);if(!a._isRefLayer)for(;(r=this.getLayer(b[c-1]))&&r._isRefLayer;)c--;b.splice(c,0,k);var m=V(this,this._addLayerHandler),s=this;c=this._connects;d=function(){a.loaded?s._onLoadFix?(s._onLoadFix=!1,setTimeout(function(){m(a)},0)):m(a):(s["_"+k+"_addtoken_load"]=X(a,"onLoad",s,"_addLayerHandler"),s["_"+k+"_addtoken_err"]=X(a,"onError",s,function(c){m(a,c,b)}))};this.loaded||0===f||a.loaded&&-1===S(this.graphicsLayerIds,k)?d():c.push(X(this,
350"onLoad",d));return a},_addLayerHandler:function(a,b,c){var d=this.id,k=a.id,f=S(a instanceof N?this.graphicsLayerIds:this.layerIds,k),r=f,m=!1,s=this._params;W(this["_"+k+"_addtoken_load"]);W(this["_"+k+"_addtoken_err"]);if(b)delete this._layers[k],-1!==f&&(c.splice(f,1),this.onLayerAddResult(a,b));else{-1===f&&(f=S(this._internalLayerIds,k),r=20+f,m=!0);if(k===this._firstLayerId){b=a.spatialReference;if((c=this.extent&&this.extent.spatialReference)&&!c.equals(b)&&(a.tileInfo||!a.url))c=null;c=this.spatialReference=
351c||b;this.wrapAround180=this.wrapAround180&&c&&c._isWrappable()?!0:!1;a.tileInfo&&(this.__tileInfo?(b=this.__tileInfo.lods,this.__tileInfo=aa({},a.tileInfo),this.__tileInfo.lods=b):(Q(aa({},a.tileInfo),s),this.__tileInfo=s.tileInfo));if(this.wrapAround180){b=this.__tileInfo;c=c._getInfo();if(!b||Math.abs(c.origin[0]-b.origin.x)>c.dx)this.wrapAround180=!1;this.wrapAround180&&b&&A._addFrameInfo(b,c)}s.units=a.units;if((b=this.__tileInfo&&this.__tileInfo.lods)&&b.length){c=s.minScale;var f=s.maxScale,
352g=-1,u=-1,e=!1,t=!1,h;for(h=0;h<b.length;h++)0<c&&(!e&&c>=b[h].scale)&&(g=b[h].level,e=!0),0<f&&(!t&&f>=b[h].scale)&&(u=0<h?b[h-1].level:-1,t=!0);-1===s.minZoom&&(s.minZoom=0===c?b[0].level:g);-1===s.maxZoom&&(s.maxZoom=0===f?b[b.length-1].level:u);for(h=0;h<b.length;h++)s.minZoom===b[h].level&&(s.minScale=b[h].scale),s.maxZoom===b[h].level&&(s.maxScale=b[h].scale)}else s.minZoom=s.maxZoom=s.zoom=-1}a instanceof N?(this._gc||(this._gc=new N._GraphicsContainer,this._gc._setMap(this,this._layersDiv).id=
353d+"_gc"),r=a._setMap(this,this._gc._surface),r.id=d+"_"+k,this._layerDivs[k]=r,this._reorderLayers(this.graphicsLayerIds)):(r=a._setMap(this,this._layersDiv,r,this.__LOD),r.id=d+"_"+k,this._layerDivs[k]=r,this._reorderLayers(this.layerIds),!m&&-1!==a.declaredClass.indexOf("VETiledLayer")&&this._onBingLayerAdd(a));k===this._firstLayerId&&(this.graphics=new N({id:d+"_graphics",displayOnPan:s.displayGraphicsOnPan}),this._addLayer(this.graphics,this._internalLayerIds,20));if(a===this.graphics){c=this._layers[this._firstLayerId];
354d=s.zoom;r=s.scale;b=s.center;c=c.initialExtent||c.fullExtent;this._firstLayerId=null;this.extent&&(this.extent=this._convertGeometry(this,this.extent));!this.extent&&c&&(b&&(b=this._convertGeometry(c,b)),b&&(c=c.centerAt(b)));if(b=this.extent||c&&new H(c.toJson()))-1<d?b=this.__getExtentForLevel(d,null,b).extent:0<r&&(b=F.getExtentForScale(this,r,b));if(!b){console.log("Map: "+this.invalidExtent);return}s=this._fixExtent(b,s.fitExtent);this.extent=s.extent;this.__LOD=s.lod;this.__setExtent(this.extent);
355this.loaded=!0;this.attr("data-loaded","");this.infoWindow.setMap(this);this.onLoad(this)}m||(this.onLayerAdd(a),this.onLayerAddResult(a));W(this[k+"_addLayerHandler_connect"])}},_convertGeometry:function(a,b){var c=a&&a.spatialReference,d=b&&b.spatialReference;c&&(d&&!c.equals(d))&&(c._canProject(d)?c.isWebMercator()?b=M.geographicToWebMercator(b):4326===c.wkid&&(b=M.webMercatorToGeographic(b,!0)):(console.log("Map: "+y.substitute({geometry:d.wkid||d.wkt,map:c.wkid||c.wkt},this.invalidGeometry)),
356b=null));return b},_reorderLayers:function(a){var b=this.onLayerReorder,c=t.place,d=this._layerDivs,k=this._layers,f=this._gc?this._gc._surface.getEventSource():null;if(a===this.graphicsLayerIds)g.forEach(a,function(a,r){var m=d[a];m&&(c(m.getEventSource(),f,r),b(k[a],r))});else{var m=this.graphics,s=m?m.id:null,u=this._layersDiv,e;g.forEach(a,function(a,f){e=d[a];a!==s&&e&&(c(e,u,f),b(k[a],f))});this._mapImageLyr&&this._placeMapImageLyr();f&&(f=9>r("ie")?f.parentNode:f,c(f,f.parentNode,a.length))}this.onLayersReordered([].concat(a))},
357_zoomStartHandler:function(){this.__zoomStart(this._zoomAnimDiv.startingExtent,this._zoomAnimDiv.anchor)},_zoomingHandler:function(a){var b=parseFloat(a.left),c=parseFloat(a.top);a=new H(b,c-parseFloat(a.height),b+parseFloat(a.width),c,this.spatialReference);b=this.extent.getWidth()/a.getWidth();this.__zoom(a,b,this._zoomAnimDiv.anchor)},_zoomEndHandler:function(){var a=this._zoomAnimDiv,b=a.extent,c=this.extent.getWidth()/b.getWidth(),d=a.anchor,k=a.newLod,f=a.levelChange;a.extent=a.anchor=a.levelChange=
358a.startingExtent=a.newLod=this._delta=this._zoomAnim=null;this.__zoomEnd(b,c,d,k,f)}
358,_panningHandler:function(a){if(isNaN(parseFloat(a.left))||isNaN(parseFloat(a.top))){var b=Math.round,c=this._panAnim.node;a.left=-1*(this._delta.x-b(this.width/2))+"px";a.top=-1*(this._delta.y-b(this.height/2))+"px";k.set(c,"left",a.left);k.set(c,"top",a.top)}a=new I(parseFloat(a.left),parseFloat(a.top));b=this.toMap(a);this.onPan(this.extent.offset(this.extent.xmin-b.x,this.extent.ymax-b.y),a)},_panEndHandler:function(a){this.__panning=
359!1;var b=Math.round;a=new I(-b(parseFloat(a.style.left)),-b(parseFloat(a.style.top)));var b=a.x,c=a.y,d=this.__visibleRect,k=this.__visibleDelta;d.x+=-b;d.y+=-c;k.x+=-b;k.y+=-c;$(this._zoomAnimDiv,{left:"0px",top:"0px"});var d=this.extent,k=this._ratioW,f=this._ratioH,d=new H(d.xmin+b/k,d.ymin-c/f,d.xmax+b/k,d.ymax-c/f,this.spatialReference);a.setX(-a.x);a.setY(-a.y);this._delta=this._panAnim=null;this._updateExtent(d);this.onPanEnd(d,a);this._fireExtChg([d,a,!1,this.__LOD])},_fixExtent:function(a,
360b){for(var c=this._reshapeExtent(a),d=1.25;!0===b&&(c.extent.getWidth()<a.getWidth()||c.extent.getHeight()<a.getHeight())&&0<c.lod.level&&3>=d;)c=this._reshapeExtent(a.expand(d)),d+=0.25;return c},_getFrameWidth:function(){var a=-1,b=this.spatialReference._getInfo();this.__LOD?(b=this.__LOD._frameInfo)&&(a=b[3]):b&&(a=Math.round(2*b.valid[1]/(this.extent.getWidth()/this.width)));return a},_fixAspectRatio:function(a){var b=a.getWidth(),c=a.getHeight(),d=b/c,k=this.width/this.height,f=0,r=0;this.width>
361this.height?b>c?k>d?f=c*k-b:r=b/k-c:f=c*k-b:this.width<this.height?b<c?k>d?f=c*k-b:r=b/k-c:r=b/k-c:b<c?f=c-b:b>c&&(r=b/k-c);f&&(a.xmin-=f/2,a.xmax+=f/2);r&&(a.ymin-=r/2,a.ymax+=r/2);return a},_reshapeExtent:function(a){a=this._fixAspectRatio(a);return this._getAdjustedExtent(a)},_getAdjustedExtent:function(a){if(this.__tileInfo)return A.getCandidateTileInfo(this,this.__tileInfo,a);var b=F.getScale(this,a),c=this.getMinScale(),d=this.getMaxScale(),k=!d||b>=d;c&&!(b<=c)?a=F.getExtentForScale(this,c,
362a):k||(a=F.getExtentForScale(this,d,a));return{extent:a}},_onBingLayerAdd:function(a){this["__"+a.id+"_vis_connect"]=l.connect(a,"onVisibilityChange",this,"_toggleBingLogo");this._toggleBingLogo(a.visible)},_onBingLayerRemove:function(a){l.disconnect(this["__"+a.id+"_vis_connect"]);delete this["__"+a.id+"_vis_connect"];var b=g.some(this.layerIds,function(b){return(a=this._layers[b])&&a.visible&&-1!==a.declaredClass.indexOf("VETiledLayer")},this);this._toggleBingLogo(b)},_toggleBingLogo:function(a){a&&
363!this._bingLogo?(a={left:this._mapParams&&this._mapParams.nav?"25px":""},6===r("ie")&&(a.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled\x3d'true', sizingMethod\x3d'crop', src\x3d'"+p.toUrl("./images/map/bing-logo-lg.png")+"')"),a=this._bingLogo=t.create("div",{style:a},this.root),m.add(a,"bingLogo-lg")):!a&&this._bingLogo&&(t.destroy(this._bingLogo),delete this._bingLogo)},__panStart:function(a,b){var c=this._zoomAnim,d=this._panAnim;if(c&&c._active)c.stop(),c._fire("onEnd",[c.node]);
364else if(d&&d._active){d.stop();this._panAnim=null;var d=d.curve.getValue(d._getStep()),c=Math.round(parseFloat(d.left)),d=Math.round(parseFloat(d.top)),k=this.navigationManager._dragOrigin;this.__pan(c,d);k&&(k.x-=c,k.y-=d);return}this.__panning=!0;this.onPanStart(this.extent,new I(a,b))},__pan:function(a,b){var c=this.extent,d=this._ratioW,k=this._ratioH;this.onPan(new H(c.xmin-a/d,c.ymin+b/k,c.xmax-a/d,c.ymax+b/k,this.spatialReference),new I(a,b))},__panEnd:function(a,b){var c=this.__visibleRect,
365d=this.__visibleDelta;c.x+=a;c.y+=b;d.x+=a;d.y+=b;var c=new I(a,b),d=this.extent,k=this._ratioW,f=this._ratioH,d=new H(d.xmin-a/k,d.ymin+b/f,d.xmax-a/k,d.ymax+b/f,this.spatialReference);this.__panning=!1;this._updateExtent(d);this.onPanEnd(d,c);this._fireExtChg([d,c,!1,this.__LOD])},__zoomStart:function(a,b){this.__zooming=!0;this.onZoomStart(a,1,b,this.__LOD?this.__LOD.level:null)},__zoom:function(a,b,c){this.onZoom(a,b,c)},__zoomEnd:function(a,b,c,d,k){$(this._layersDiv,{left:"0px",top:"0px"});
366this._delta=new I(0,0);this.__visibleRect.x=this.__visibleRect.y=0;a=new H(a);this.__LOD=d;this._ratioW=this.width/a.getWidth();this._ratioH=this.height/a.getHeight();var f=this._delta;this._delta=null;this.__zooming=!1;this._updateExtent(a,k);this.onZoomEnd(a,b,c,d?d.level:null);this._fireExtChg([a,f,k,d])},_extentUtil:function(a,b,c,d,k){var f=new h,r,m,s,g,u,e,t,l,v,x,w=this.width,n=this.height,A,p,C;a&&(r=a.numLevels,m=a.targetLevel,A=y.isDefined(m),s=a.factor,g=a.mapAnchor,u=a.screenAnchor,e=
367a.mapCenter,p=a.levelOrFactor,t=a.targetScale,l=y.isDefined(t)&&0<t);b&&(v=b.dx,x=b.dy,e=b.mapCenter);q.isArray(e)&&(e=new E(e));var z=this._panAnim;b=(a=this._stopAnim())?a.divExtent:this.extent;var B=this.__tileInfo,G=this._params;if(!this.loaded){if(c)b&&(c=this._convertGeometry(b,c)),c&&(this.extent=c,G.zoom=G.scale=-1,G.center=null);else if(e||A||l){if(e)if(b){if(e=this._convertGeometry(b,e))this.extent=b.centerAt(e),G.center=null}else G.center=e;A&&-1<m?(G.zoom=m,G.scale=-1):l&&(G.scale=t,G.zoom=
368-1)}f.resolve();return f}if(e&&(e=this._convertGeometry(this,e),!e)||g&&(g=this._convertGeometry(this,g),!g)||c&&(c=this._convertGeometry(this,c),!c))return f.reject(),f;z&&(g&&u)&&(g=ca(this.extent,w,n,u));a&&(g&&u)&&(g=ca(a.divExtent,w,n,u));A&&(B?(r=this.getMinZoom(),A=this.getMaxZoom(),m<r?m=r:m>A&&(m=A),r=m-(a?a.level:this.getLevel())):(r=0<m?-1:1,C=p?m:null));if(!c)if(y.isDefined(r))B?(w=a?a.level:this.getLevel(),n=this.__getExtentForLevel(w+r,e,b).extent):(n=(a?a.end:this.extent).expand(C||
369(0<r?0.5*r:2*-r)),C&&e&&(n=n.centerAt(e))),n&&(e?c=n:(w=g||b.getCenter(),v=b.ymax-(n.getHeight()-b.getHeight())*(w.y-b.ymax)/b.getHeight(),w=b.xmin-(n.getWidth()-b.getWidth())*(w.x-b.xmin)/b.getWidth(),c=new H(w,v-n.getHeight(),w+n.getWidth(),v,this.spatialReference)));else if(l)c=F.getExtentForScale(this,t,b);else if(y.isDefined(s))c=b.expand(s);else if(v||x)a?(c=a.end,g=c.getCenter(),C=Z(c,w,n,g),C.x+=v,C.y+=x,C=ca(c,w,n,C),c=c.offset(C.x-g.x,C.y-g.y)):(v=new I(w/2+v,n/2+x),x=ca(b,w,n,v),n=b.getWidth(),
370v=b.getHeight(),w=x.x-n/2,x=x.y-v/2,c=new H(w,x,w+n,x+v,this.spatialReference));c||(e?(b=a?a.end:b,n=b.getWidth(),v=b.getHeight(),w=e.x-n/2,x=e.y-v/2,c=new H(w,x,w+n,x+v,this.spatialReference)):a&&(c=a.end));c?(this._extentDfd&&-1===this._extentDfd.fired&&(this._extentDfd.then(null,ha),this._extentDfd.reject()),this._extentDfd=f,this.__setExtent(c,null,u,d,a,k)):f.reject();return f},__setExtent:function(a,b,c,d,k,f){try{if(this._firstLayerId)this.extent=a;else{var m=!0,s=this.spatialReference,g=k?
371k.divExtent:this.extent,e=this._fixExtent(a,d||!1);a=e.extent;var u=a.getWidth(),t=a.getHeight(),h=Math.round;
371if(g)var l=h(1E6*g.getWidth()),v=h(1E6*u),q=h(1E6*g.getHeight()),x=h(1E6*t),m=l!==v||q!==x;var w,n,A=k&&k.rect,p=k&&k.divExtent;if(da.zoomDuration&&m&&g){p=p||new H(g);A=A||{left:g.xmin,top:g.ymax,width:g.getWidth(),height:g.getHeight()};n={left:a.xmin,top:a.ymax,width:u,height:t};var C=new E(a.xmin,a.ymax,s),y=new E(a.xmin,a.ymin,s),z=new E(this.extent.xmin,this.extent.ymax,s),B=new E(this.extent.xmin,
372this.extent.ymin,s);w=J.getLineIntersection(z,C,B,y,s);!w&&!k&&(m=!1)}this._ratioW=this.width/u;this._ratioH=this.height/t;var D=this._zoomAnimDiv;if(m)if($(this._layersDiv,{left:"0px",top:"0px"}),b=new I(0,0),this.__visibleRect.x=this.__visibleRect.y=0,A&&n){this._delta=b;D.id="_zAD";D.startingExtent=p;D.extent=a;D.levelChange=m;D.newLod=e.lod;D.anchor=c?c:!w&&k?k.anchor:Z(this.extent,this.width,this.height,w);var aa=this.extent.getWidth()/a.getWidth();r("chrome")&&1024<(1>aa?1/aa:aa)?(this.__zoomStart(p,
373D.anchor),this.__zoom(p,1,D.anchor),this._fireOnScale(1,D.anchor,!0),this.__zoomEnd(a,aa,D.anchor,e.lod,m)):(this._zoomAnim=G.resize({node:D,start:A,end:n,duration:da.zoomDuration,rate:da.zoomRate,beforeBegin:!k?this._zoomStartHandler:null,onAnimate:this._zoomingHandler,onEnd:this._zoomEndHandler}).play(),this._fireOnScale(aa,D.anchor,f))}else this._updateExtent(a,m),this._fireExtChg([this.extent,b,m,this.__LOD=e.lod]);else if(!this.__panning)if(!1===this.loaded||f)this._updateExtent(a,m),this._fireExtChg([this.extent,
374b,m,this.__LOD=e.lod]);else{this.__panning=!0;A=(new L(0,0,this.width,this.height,this.spatialReference)).getCenter();A.x=h(A.x);A.y=h(A.y);var K=this._delta=this.toScreen(a.getCenter()),F=Math.abs(A.x-K.x),N=Math.abs(A.y-K.y);this.optimizePanAnimation&&(F>2*this.width||N>2*this.height)?(this.__panStart(0,0),this.__pan(0,0),this.__visibleRect.x=this.__visibleRect.y=this.__visibleDelta.x=this.__visibleDelta.y=0,this.__panning=!1,this._delta=null,this._updateExtent(a,!1),this.onPanEnd(this.extent,new I(0,
3750)),this._fireExtChg([this.extent,new I(0,0),!0,this.__LOD])):(this.onPanStart(this.extent,new I(0,0)),this._panAnim=G.slideTo({node:D,left:A.x-K.x,top:A.y-K.y,duration:da.panDuration,rate:da.panRate,onAnimate:this._panningHandler,onEnd:this._panEndHandler}),this._panAnim.play())}}}catch(M){console.log(M.stack),console.error(M)}},_fireOnScale:function(a,b,c){if("css-transforms"===this.navigationMode){var d=this.__visibleDelta;this.onScale(x.scaleAt(a,{x:-1*(this.width/2-(b.x-d.x)),y:-1*(this.height/
3762-(b.y-d.y))}),c)}},_stopAnim:function(){var a=this._zoomAnim,b=this._panAnim;if(a&&a._active){a.stop();var b=a.curve.getValue(a._getStep()),c=parseFloat(b.left),d=parseFloat(b.top),a=a.node;return{anchor:a.anchor,start:a.startingExtent,end:a.extent,level:a.newLod&&a.newLod.level,rect:b,divExtent:new H(c,d-parseFloat(b.height),c+parseFloat(b.width),d,this.spatialReference)}}b&&b._active&&(b.stop(),b._fire("onEnd",[b.node]))},__getExtentForLevel:function(a,b,c){var d=this.__tileInfo,d=d&&d.lods;a=
377y.isDefined(a)?a:0;c=c||this.extent;b=b||c&&c.getCenter();if(d){if(b){c=this.getMinZoom();var k=this.getMaxZoom();a>k&&(a=k);a<c&&(a=c);a=d[a];d=this.width*a.resolution/2;c=this.height*a.resolution/2;return{extent:new H(b.x-d,b.y-c,b.x+d,b.y+c,b.spatialReference),lod:a}}}else if(c)return{extent:c.expand(!a||1>a?1:a).centerAt(b)};console.log("Map: "+this.invalidExtent)},_jobs:0,_incr:function(){1===++this._jobs&&(this.updating=!0,this.attr("data-updating",""),this.onUpdateStart())},_decr:function(){var a=
378--this._jobs;a?0>a&&(this._jobs=0):(this.updating=!1,this.attr("data-updating"),this.onUpdateEnd())},_fireEvent:function(a,b){this[a]&&this[a].apply(this,b)},_updateExtent:function(a,b){this.extent=a;b&&this._setClipRect();var c=this.spatialReference;c&&(c.isWebMercator()?this.geographicExtent=M.webMercatorToGeographic(this._getAvailExtent(),!0):4326===c.wkid&&(this.geographicExtent=new H(this._getAvailExtent().toJson())))},_fireExtChg:function(a){this.attr("data-zoom",this.getZoom());this.attr("data-scale",
379this.getScale());this._fireEvent("onExtentChange",a);if(a=this._extentDfd)delete this._extentDfd,a.resolve()},attr:function(a,b){var c=this.container;c&&(null==b?c.removeAttribute(a):c.setAttribute(a,b));return this}
379,onUpdateStart:function(){},onUpdateEnd:function(){},onLoad:function(){this._setClipRect()},onBeforeUnload:function(){},onUnload:function(){},onExtentChange:function(a,b,c){},onTimeExtentChange:function(){},onLayerAdd:function(){},onLayerAddResult:function(){},onLayersAddResult:function(){},
380onLayerRemove:function(){},onLayersRemoved:function(){},onLayerReorder:function(){},onLayersReordered:function(){},onLayerSuspend:function(){},onLayerResume:function(){},onPanStart:function(){},onPan:function(){},onPanEnd:function(){},onScale:function(){},onZoomStart:function(){},onZoom:function(){},onZoomEnd:function(){},onResize:function(){this._setClipRect()},onReposition:function(){},destroy:function(){this._destroyed||(this.onBeforeUnload(this),this.removeAllLayers(),this._cleanUp(),clearTimeout(this._resizeT),
381this._gc&&this._gc._cleanUp(),this._destroyed=!0,this.onUnload(this))},setCursor:function(a){$(this.__container,"cursor",this.cursor=a)},setMapCursor:function(a){this.setCursor(this._cursor=a)},resetMapCursor:function(){this.setCursor(this._cursor)},setInfoWindow:function(a){var b=this.infoWindow;b&&b.unsetMap(this);this.infoWindow=a;this.loaded&&a&&a.setMap(this)},setInfoWindowOnClick:function(a){this._params.showInfoWindowOnClick=a;this.popupManager&&this.popupManager.set("enabled",a)},getInfoWindowAnchor:function(a){return this.infoWindow&&
382this.infoWindow._getAnchor&&this.infoWindow._getAnchor(a)||"upperright"},toScreen:function(a,b){return Z(this.extent,this.width,this.height,a,b)},toMap:function(a){return ca(this.extent,this.width,this.height,a)},addLayer:function(a,b){a&&!this.getLayer(a.id)&&this._addLayer(a,a instanceof N?this.graphicsLayerIds:this.layerIds,b);return a},addLayers:function(a){var b=[],c=a.length,d,k,f=a.length;d=l.connect(this,"onLayerAddResult",function(k,f){-1!==g.indexOf(a,k)&&(c--,b.push({layer:k,success:!f,
383error:f}),c||(l.disconnect(d),this.onLayersAddResult(b)))});for(k=0;k<f;k++)this.addLayer(a[k]);return this},removeLayer:function(a,b){var c=a.id,d=a instanceof N?this.graphicsLayerIds:this.layerIds,k=S(d,c);0<=k&&(d.splice(k,1),a instanceof N?(W(this["_gl_"+a.id+"_click_connect"]),a.loaded&&a._unsetMap(this,this._gc._surface)):a.loaded&&(a._unsetMap(this,this._layersDiv),-1!==a.declaredClass.indexOf("VETiledLayer")&&this._onBingLayerRemove(a)),delete this._layers[c],delete this._layerDivs[c],b||
384this._reorderLayers(d),this.onLayerRemove(a))},removeAllLayers:function(){var a=this.layerIds,b;for(b=a.length-1;0<=b;b--)this.removeLayer(this._layers[a[b]],1);a=this.graphicsLayerIds;for(b=a.length-1;0<=b;b--)this.removeLayer(this._layers[a[b]],1);this.onLayersRemoved()},reorderLayer:function(b,c){q.isString(b)&&(a.deprecated(this.declaredClass+": Map.reorderLayer(/*String*/ id, /*Number*/ index) deprecated. Use Map.reorderLayer(/*Layer*/ layer, /*Number*/ index).",null,"v2.0"),b=this.getLayer(b));
385var d=b.id,k,f=b instanceof N?this.graphicsLayerIds:this.layerIds;0>c?c=0:c>=f.length&&(c=f.length-1);k=S(f,d);-1===k||k===c||(f.splice(k,1),f.splice(c,0,d),this._reorderLayers(f))},getLayer:function(a){return this._layers[a]},setExtent:function(a,b){a=new H(a.toJson());var c=a.getWidth(),d=a.getHeight();return 0===c&&0===d?this.centerAt(new E({x:a.xmin,y:a.ymin,spatialReference:a.spatialReference&&a.spatialReference.toJson()})):this._extentUtil(null,null,a,b)},centerAt:function(a){return this._extentUtil(null,
386{mapCenter:a})},centerAndZoom:function(a,b){return this._extentUtil({targetLevel:b,mapCenter:a,levelOrFactor:!0})},getScale:function(){return this.__LOD?this.__LOD.scale:F.getScale(this)},getResolution:function(){return this.__LOD?this.__LOD.resolution:this.extent?this.extent.getWidth()/this.width:0},getResolutionInMeters:function(){return this.getResolution()*F.getUnitValueForSR(this.spatialReference)},getMinScale:function(){return this._params.minScale},getMaxScale:function(){return this._params.maxScale},
387setScale:function(a){return this._extentUtil({targetScale:a})},getLayersVisibleAtScale:function(a){var b=[];(a=a||this.getScale())&&g.forEach(this.layerIds.concat(this.graphicsLayerIds),function(c){c=this.getLayer(c);c.isVisibleAtScale(a)&&b.push(c)},this);return b},getNumLevels:function(){var a=this.getMinZoom(),b=this.getMaxZoom();return a===b&&0>a?0:b-a+1},getLevel:function(){return this.__LOD?this.__LOD.level:-1}
387,setLevel:function(a){if(-1<a)return this._extentUtil({targetLevel:a})},getZoom:function(){return this.getLevel()},
388setZoom:function(a){return this.setLevel(a)},getMinZoom:function(){return this._params.minZoom},getMaxZoom:function(){return this._params.maxZoom},setBasemap:function(a){var b;q.isObject(a)?(b=a,a=b.title):b=w&&w[a];if(b){this._basemapDfd&&-1===this._basemapDfd.fired&&this._basemapDfd.cancel();var c=[],d=[],k=0;g.forEach(b.baseMapLayers||b.layers,function(b){var f,r={id:b.id,displayLevels:b.displayLevels,opacity:y.isDefined(b.opacity)?b.opacity:null,visible:y.isDefined(b.visibility)?b.visibility:
389null};if(b.type)switch(b.type){case "OpenStreetMap":f=new R(r);break;default:console.log("Map.setBasemap: "+y.substitute({basemapName:a,type:b.type},this.unknownLayerType))}else{f=b.url;if("https:"===window.location.protocol&&(-1!==f.search(/^http\:\/\/server\.arcgisonline\.com/i)||-1!==f.search(/^http\:\/\/services\.arcgisonline\.com/i)||-1!==f.search(/^http\:\/\/.+\.arcgis\.com/i)))f=f.replace(/http:/i,"https:");f=new U(f,r)}f&&(c.push(f),d.push(b),b.isReference||k++)},this);if(!c.length||!k)console.log("Map.setBasemap: "+
390y.substitute({basemapName:a},this.invalidBasemap));else{var f={basemapName:a,infos:d,layers:c};if(this.loaded){var r=this,m=new h(D._dfdCanceller),s=function(a){m._pendingLayers--;a=g.indexOf(f.layers,this);if(-1<a&&(a=m._layerEvents[a]))l.disconnect(a[0]),l.disconnect(a[1]);0>=m._pendingLayers&&(delete m._layerEvents,delete r._basemapDfd,0>m.fired&&m.callback(f))};this._basemapDfd=m;m._pendingLayers=0;m._layerEvents={};g.forEach(c,function(a,b){a&&(m._pendingLayers++,a.loaded?s(a):m._layerEvents[b]=
391[l.connect(a,"onLoad",a,s),l.connect(a,"onError",a,s)])});m.addCallback(V(this,this._basemapLoaded))}else this._basemapLoaded(f)}}else{b=[];for(var e in w)b.push(e);console.log("Map.setBasemap: "+y.substitute({basemapName:a,list:b.join(",")},this.unknownBasemap))}},_basemapLoaded:function(a){var b=a.layers,c=a.infos,d=0,k=!0,f;this.loaded&&(g.forEach(b,function(a,b){a.loaded&&(c[b].isReference||d++)}),k=d);k&&(this.basemapLayerIds&&(f={basemapName:this._basemap,infos:w&&w[this._basemap]&&w[this._basemap].baseMapLayers},
392f.basemapName||(g.forEach(this.basemapLayerIds,function(a){if(this.getLayer(a)instanceof R)return f.basemapName="osm",f.infos=w&&w.osm&&w.osm.baseMapLayers,!1},this),f.basemapName||(f=null))),this._removeBasemap(),this._basemap=a.basemapName,this.basemapLayerIds=this._addBasemap(b,c),this.attr("data-basemap",this.getBasemap()),this.emit("basemap-change",{current:a,previous:f}))},_addBasemap:function(a,b){var c=[],d=[],k=0;g.forEach(a,function(a,f){b[f].isReference?c.push(a):(this.addLayer(a,k++),
393d.push(a.id))},this);c.length&&g.forEach(c,function(a){a.attr("data-reference",!0);this.addLayer(a,"top");d.push(a.id)},this);return d},_removeBasemap:function(){var a=this.basemapLayerIds,b;a&&a.length&&g.forEach(a,function(a){(b=this.getLayer(a))&&this.removeLayer(b)},this)},getBasemap:function(){return this._basemap||""},translate:function(a,b){a=a||0;b=b||0;if(!this._txTimer){this._tx=this._ty=0;var c=this.toScreen(this.extent.getCenter());
393this.__panStart(c.x,c.y)}this._tx+=a;this._ty+=b;this.__pan(this._tx,
394this._ty);clearTimeout(this._txTimer);this._txTimer=setTimeout(this._endTranslate,150)},_endTranslate:function(){clearTimeout(this._txTimer);this._txTimer=null;var a=this._tx,b=this._ty;this._tx=this._ty=0;this.__panEnd(a,b)},setTimeExtent:function(a){a=(this.timeExtent=a)?new a.constructor(a.toJson()):null;this.onTimeExtentChange(a)},setTimeSlider:function(a){this.timeSlider&&(W(this._tsTimeExtentChange_connect),this.timeSlider=this._tsTimeExtentChange_connect=null);a&&(this.timeSlider=a,this.setTimeExtent(a.getCurrentTimeExtent()),
395this._tsTimeExtentChange_connect=X(a,"onTimeExtentChange",this,"setTimeExtent"))},setVisibility:function(a){if(this.visible!==a){this.visible=a;a||(this._display=this.container.style.display);this.container.style.display=a?this._display:"none";if(this.autoResize){var b=a?"resume":"pause";this._rszSignal[b]();this._oriSignal[b]()}a&&this.resize()}return this},resize:function(a){clearTimeout(this._resizeT);this._destroyed||(!0===a?this._execResize():this._resizeT=setTimeout(this._execResize,this.resizeDelay))},
396_timedResize:function(){this._resizeT||this._execResize()},_execResize:function(){clearTimeout(this._resizeT);this._resizeT=null;this.reposition();this._resize();this.autoResize&&this._startResizeTimer()},_resize:function(){var a=this.width,b=this.height,c=k.get(this.container,"display"),d=s.getContentBox(this.container);if(!("none"===c||0>=d.w||0>=d.h||a===d.w&&b===d.h)){if(c=this._zoomAnim||this._panAnim)c.stop(),c._fire("onEnd",[c.node]);$(this.root,{width:(this.width=d.w)+"px",height:(this.height=
397d.h)+"px"});d=this.width;c=this.height;this.attribution&&this.attribution.domNode&&k.set(this.attribution.domNode,"maxWidth",Math.floor(d*this._mapParams.attributionWidth)+"px");this.__visibleRect.update(this.__visibleRect.x,this.__visibleRect.y,d,c);this.__visibleDelta.update(this.__visibleDelta.x,this.__visibleDelta.y,d,c);var f=new L(this.extent),a=(new L(f.x,f.y,f.width*(d/a),f.height*(c/b),this.spatialReference)).getExtent();this.onResize(a,d,c);this._extentUtil(null,null,a,null,!0)}},reposition:function(){var a=
398this.position,b=a.x,c=a.y;this._reposition();a=this.position;if(b!==a.x||c!==a.y)this.onReposition(a.x,a.y)},_reposition:function(){var a=s.position(this.container,!0),b=s.getPadBorderExtents(this.container);this.position.update(a.x+b.l,a.y+b.t)},_setClipRect:function(){delete this._clip;var a=7>=r("ie")||void 0===r("ie")&&7<=r("trident")?"rect(auto,auto,auto,auto)":"auto";if(this.wrapAround180){var b=this.width,c=this.height,d=this._getFrameWidth(),k=b-d;0<k&&(a=k/2,a="rect(0px,"+(a+d)+"px,"+c+"px,"+
399a+"px)",c=this.extent.getWidth(),b=c*(d/b),this._clip=[(c-b)/2,b])}$(this.__container,"clip",a)},_getAvailExtent:function(){var a=this.extent,b=this._clip;if(b){if(!a._clip){var c=new L(a);c.width=b[1];c.x+=b[0];a._clip=c.getExtent()}return a._clip}return a},_fixedPan:function(a,b){return this._extentUtil(null,{dx:a,dy:b})},panUp:function(){return this._fixedPan(0,-0.75*this.height)},panUpperRight:function(){return this._fixedPan(0.75*this.width,-0.75*this.height)},panRight:function(){return this._fixedPan(0.75*
400this.width,0)},panLowerRight:function(){return this._fixedPan(0.75*this.width,0.75*this.height)},panDown:function(){return this._fixedPan(0,0.75*this.height)},panLowerLeft:function(){return this._fixedPan(-0.75*this.width,0.75*this.height)},panLeft:function(){return this._fixedPan(-0.75*this.width,0)},panUpperLeft:function(){return this._fixedPan(-0.75*this.width,-0.75*this.height)},enableSnapping:function(a){a=a||{};if("esri.SnappingManager"===a.declaredClass)this.snappingManager=a;else{var b=fa++,
401c=this;this._rids&&this._rids.push(b);p(["./SnappingManager"],function(d){var k=c._rids?g.indexOf(c._rids,b):-1;-1!==k&&(c._rids.splice(k,1),c.snappingManager=new d(q.mixin({map:c},a)))})}return this.snappingManager},disableSnapping:function(){this.snappingManager&&this.snappingManager.destroy();this.snappingManager=null},_createLabelLayer:function(){function a(){b._labels.removeAllFeatureLayers();g.forEach(b.graphicsLayerIds,function(a){a=b.getLayer(a);"function"===typeof a.applyEdits&&b._labels.addFeatureLayer(a)})}
402var b=this;!this._labels&&(P&&this.loaded)&&(this._labels=new P({id:"_internal_LabelLayer"}),this._labels._setMap(this,this._gc._surface),a(),this.on("layers-reordered",a))},_getMapImageLyr:function(){this.loaded&&!this._mapImageLyr&&(this._mapImageLyr=new Y,this._mapImageLyr._setMap(this,this._layersDiv),this._placeMapImageLyr());return this._mapImageLyr},_placeMapImageLyr:function(){for(var a=this.layerIds,b=this._layerDivs,c=!1,d,k,f=a.length-1;0<=f;f--)if(d=a[f],k=this.getLayer(d),d=b[d],k&&d&&
403!k._isReference){t.place(this._mapImageLyr._div,d,"after");c=!0;break}c||t.place(this._mapImageLyr._div,this._layersDiv,"first")}});r("extend-esri")&&(v._CoreMap=e);return e})},"dijit/_HasDropDown":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on dojo/touch ./registry ./focus ./popup ./_FocusMixin".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k){return p("dijit._HasDropDown",
404k,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:-1,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(a){!this.disabled&&!this.readOnly&&("MSPointerDown"!=a.type&&"pointerdown"!=a.type&&a.preventDefault(),this.own(b.once(this.ownerDocument,f.release,c.hitch(this,"_onDropDownMouseUp"))),this.toggleDropDown())},_onDropDownMouseUp:function(a){var b=this.dropDown,c=!1;if(a&&this._opened){var d=
405h.position(this._buttonNode,!0);if(!(a.pageX>=d.x&&a.pageX<=d.x+d.w)||!(a.pageY>=d.y&&a.pageY<=d.y+d.h)){for(d=a.target;d&&!c;)l.contains(d,"dijitPopup")?c=!0:d=d.parentNode;if(c){d=a.target;if(b.onItemClick){for(var k;d&&!(k=m.byNode(d));)d=d.parentNode;if(k&&k.onClick&&k.getParent)k.getParent().onItemClick(k,a)}return}}}
405if(this._opened){if(b.focus&&(!1!==b.autoFocus||"mouseup"==a.type&&!this.hovering))this._focusDropDownTimer=this.defer(function(){b.focus();delete this._focusDropDownTimer})}else this.focus&&
406this.defer("focus")},_onDropDownClick:function(a){this._stopClickEvents&&(a.stopPropagation(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||
407"Down";l.add(this._arrowWrapperNode||this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);var a=this.focusNode||this.domNode;this.own(b(this._buttonNode,f.press,c.hitch(this,"_onDropDownMouseDown")),b(this._buttonNode,"click",c.hitch(this,"_onDropDownClick")),b(a,"keydown",c.hitch(this,"_onKey")),b(a,"keyup",c.hitch(this,"_onKeyUp")))},destroy:function(){this._opened&&this.closeDropDown(!0);this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),
408delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&!this.readOnly){var b=this.dropDown,c=a.target;if(b&&(this._opened&&b.handleKey)&&!1===b.handleKey(a))a.stopPropagation(),a.preventDefault();else if(b&&this._opened&&a.keyCode==d.ESCAPE)this.closeDropDown(),a.stopPropagation(),a.preventDefault();else if(!this._opened&&(a.keyCode==d.DOWN_ARROW||(a.keyCode==d.ENTER||a.keyCode==d.SPACE&&(!this._searchTimer||a.ctrlKey||a.altKey||a.metaKey))&&("input"!==(c.tagName||
409"").toLowerCase()||c.type&&"text"!==c.type.toLowerCase())))this._toggleOnKeyUp=!0,a.stopPropagation(),a.preventDefault()}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var a=this.dropDown;a&&a.focus&&this.defer(c.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(!1);this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},loadAndOpenDropDown:function(){var a=new n,b=c.hitch(this,function(){this.openDropDown();
410a.resolve(this.dropDown)});this.isLoaded()?b():this.loadDropDown(b);return a},toggleDropDown:function(){!this.disabled&&!this.readOnly&&(this._opened?this.closeDropDown(!0):this.loadAndOpenDropDown())},openDropDown:function(){var a=this.dropDown,b=a.domNode,d=this._aroundNode||this.domNode,k=this,f=s.open({parent:this,popup:a,around:d,orient:this.dropDownPosition,maxHeight:this.maxHeight,onExecute:function(){k.closeDropDown(!0)},onCancel:function(){k.closeDropDown(!0)},onClose:function(){e.set(k._popupStateNode,
411"popupActive",!1);l.remove(k._popupStateNode,"dijitHasDropDownOpen");k._set("_opened",!1)}});if(this.forceWidth||this.autoWidth&&d.offsetWidth>a._popupWrapper.offsetWidth){var d=d.offsetWidth-a._popupWrapper.offsetWidth,m={w:a.domNode.offsetWidth+d};c.isFunction(a.resize)?a.resize(m):h.setMarginBox(b,m);"R"==f.corner[1]&&(a._popupWrapper.style.left=a._popupWrapper.style.left.replace("px","")-d+"px")}e.set(this._popupStateNode,"popupActive","true");l.add(this._popupStateNode,"dijitHasDropDownOpen");
412this._set("_opened",!0);this._popupStateNode.setAttribute("aria-expanded","true");this._popupStateNode.setAttribute("aria-owns",a.id);"presentation"!==b.getAttribute("role")&&!b.getAttribute("aria-labelledby")&&b.setAttribute("aria-labelledby",this.id);return f},closeDropDown:function(a){this._focusDropDownTimer&&(this._focusDropDownTimer.remove(),delete this._focusDropDownTimer);this._opened&&(this._popupStateNode.setAttribute("aria-expanded","false"),a&&this.focus&&this.focus(),s.close(this.dropDown),
413this._opened=!1)}})})},"esri/layers/OnDemandMode":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/has ../kernel ../geometry/Point ../tasks/query ./RenderMode ./GridLayout".split(" "),function(p,n,a,e,l,h,q,g,d,c){p=p([d],{declaredClass:"esri.layers._OnDemandMode",constructor:function(b){this.featureLayer=b;this._featureMap={};this._queryErrorHandler=a.hitch(this,this._queryErrorHandler)},initialize:function(a){this.inherited(arguments);var d=this.featureLayer,
414m=d._srInfo;this._gridLayer=new c(new q(m?m.valid[0]:a.extent.xmin,m?m.valid[1]:a.extent.ymax,a.spatialReference),{width:d._tileWidth,height:d._tileHeight},{width:a.width,height:a.height},m);this._cellMap={};this._gridLayer.setResolution(a.extent)},startup:function(){this._ioQueue=[];this.featureLayer.suspended||(this._zoomHandler(),this._enableConnectors())},propertyChangeHandler:function(a){this._init&&(2>a?this._zoomHandler():console.log("FeatureLayer: layer in on-demand mode does not support time definitions. Layer id \x3d "+
415this.featureLayer.id+", Layer URL \x3d "+this.featureLayer.url))},destroy:function(){this._disableConnectors();this.inherited(arguments)},drawFeature:function(a){var c=this._gridLayer,d=a.geometry,g=[];if(d)for(var g=c.getCellsInExtent("point"===d.type?{xmin:d.x,ymin:d.y,xmax:d.x,ymax:d.y}:d.getExtent(),!1).cells,c=this._cellMap,s,k=a.attributes[this.featureLayer.objectIdField],r,e,h,d=0;d<g.length;d++)s=g[d],r=s.latticeID,e=s.row,h=s.col,r?s=c[r]=c[r]||s:(c[e]=c[e]||{},s=c[e][h]=c[e][h]||s),s.features=
416s.features||[],s.features.push(a),this._addFeatureIIf(k,a),this._incRefCount(k)},suspend:function(){this._init&&this._disableConnectors()},resume:function(){this._init&&(this._enableConnectors(),this._zoomHandler())},refresh:function(){this._zoomHandler()},_enableConnectors:function(){var a=this.map;this._zoomConnect=n.connect(a,"onZoomEnd",this,this._zoomHandler);this._panConnect=n.connect(a,"onPanEnd",this,this._panHandler);this._resizeConnect=n.connect(a,"onResize",this,this._panHandler)},_disableConnectors:function(){n.disconnect(this._zoomConnect);
417n.disconnect(this._panConnect);n.disconnect(this._resizeConnect)},_zoomHandler:function(){this._processIOQueue(!0);var a=this.featureLayer,c=this.map;a.suspended||(a._fireUpdateStart(),this._clearIIf(),(a=a._trackManager)&&a.clearTracks(),this._cellMap={},this._gridLayer.setResolution(c.extent),this._sendRequest())},_panHandler:function(a){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&a)},_getRequestId:function(a,c){return("_"+a.name+a.layerId+a._ulid+"_"+c.resolution+
418"_"+(c.latticeID||c.row+"_"+c.col)).replace(/[^a-zA-Z0-9\_]+/g,"_")},_sendRequest:function(a){this._exceeds=!1;var c=this.featureLayer,d=this.map;a=a||d.extent;d=this._gridLayer.getCellsInExtent(a,c.latticeTiling).cells;if(!c.isEditable())var t=this._cellMap,d=e.filter(d,function(a){if
418(a.lattice){if(t[a.latticeID])return!1}else if(t[a.row]&&t[a.row][a.col])return!1;return!0});var s=c.getOutFields(),k=c.getDefinitionExpression(),r=c._getOffsettedTE(c._mapTimeExtent),u=c.supportsAdvancedQueries?c.getOrderByFields():
419null,h=c._usePatch,l=this._ioQueue,q,w=this,n=this._drawFeatures,p,G,D;this._pending=this._pending||0;for(q=0;q<d.length;q++){p=d[q];G=new g;G.geometry=p.extent||p.lattice;G.outFields=s;G.where=k;c.latticeTiling&&p.extent&&(G.spatialRelationship=g.SPATIAL_REL_CONTAINS);G.returnGeometry=!0;G.timeExtent=r;c._ts&&(G._ts=(new Date).getTime());G.orderByFields=u;G.multipatchOption=c.multipatchOption;G.maxAllowableOffset=c._maxOffset;G.quantizationParameters=c._quantizationParameters;D=null;if(h&&(D=this._getRequestId(c,
420p),this._isPending(D)))continue;this._pending++;l.push(c._task.execute(G,function(){var a=p;return function(b){n.apply(w,[b,a])}}.call(this),this._queryErrorHandler,D))}this._removeOldCells(a);this._endCheck()},_drawFeatures:function(a,c){this._exceeds=this._exceeds||a.exceededTransferLimit;this._finalizeIO();var d=this.map.extent,g=c.extent,s=c.row,k=c.col,r=this.featureLayer.objectIdField,e=a.features,h=this._gridLayer,l=this._cellMap,q=c.latticeID,w=q?l[q]:l[s]&&l[s][k];if(c.resolution!=h._resolution||
421(q?q!==h.getLatticeID(d):!h.intersects(g,d)))w&&this._removeCell(s,k,q);else if(w)this._updateCell(w,e);else{c.features=e;q?l[q]=c:(l[s]=l[s]||{},l[s][k]=c);g=e.length;for(d=0;d<g;d++)s=e[d],k=s.attributes[r],this._addFeatureIIf(k,s),this._incRefCount(k)}this._endCheck()},_queryErrorHandler:function(a){this._finalizeIO();this.featureLayer._errorHandler(a);this._endCheck(!0)},_finalizeIO:function(){this._purgeRequests();this._pending--},_endCheck:function(a){if(0===this._pending){this._processIOQueue();
422var c=this.featureLayer,d=c._trackManager;d&&(d.clearTracks(),d.addFeatures(c.graphics),c._ager&&e.forEach(c.graphics,function(a){a._shape&&c._repaint(a)}),d.moveLatestToFront(),d.drawTracks());this.featureLayer._fireUpdateEnd(a&&Error("FeatureLayer: an error occurred while updating the layer"),this._exceeds?{queryLimitExceeded:!0}:null);if(this._exceeds)c.onQueryLimitExceeded()}},_processIOQueue:function(a){this._ioQueue=e.filter(this._ioQueue,function(a){return-1<a.fired?!1:!0});a&&e.forEach(this._ioQueue,
423this._cancelPendingRequest)},_removeOldCells:function(a){var c=this._cellMap,d=this._gridLayer,g,s;for(g in c)if(c[g]){var k=c[g],r=k.latticeID,e=0,h=0;if(r)e++,r!==d.getLatticeID(a)&&(this._removeCell(null,null,r),h++);else for(s in k)k[s]&&(e++,d.intersects(k[s].extent,a)||(this._removeCell(g,s),h++));h===e&&delete c[g]}},_updateCell:function(a,c){var d=this.featureLayer,g=d.objectIdField,d=d._selectedFeatures,s,k=c.length;a.features=a.features||[];for(s=0;s<k;s++){var r=c[s],e=r.attributes[g],
424h=this._addFeatureIIf(e,r);h===r?(this._incRefCount(e),a.features.push(h)):e in d||(h.setGeometry(r.geometry),h.setAttributes(r.attributes))}},_removeCell:function(a,c,d){var g=this._cellMap,s=this.featureLayer,k=s.objectIdField,r=d?g[d]:g[a]&&g[a][c];if(r){d?delete g[d]:delete g[a][c];a=r.features;for(c=0;c<a.length;c++)d=a[c].attributes[k],this._decRefCount(d),d in s._selectedFeatures||this._removeFeatureIIf(d)}}});l("extend-esri")&&a.setObject("layers._OnDemandMode",p,h);return p})},"esri/layers/SelectionMode":function(){define(["dojo/_base/declare",
425"dojo/_base/lang","dojo/has","../kernel","./RenderMode"],function(p,n,a,e,l){p=p([l],{declaredClass:"esri.layers._SelectionMode",constructor:function(a){this.featureLayer=a;this._featureMap={}},propertyChangeHandler:function(a){this._init&&0===a&&this._applyTimeFilter()},resume:function(){this.propertyChangeHandler(0)}});a("extend-esri")&&n.setObject("layers._SelectionMode",p,e);return p})},"esri/dijit/_EventedWidget":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on ../Evented dijit/_WidgetBase".split(" "),
426function(p,n,a,e,l,h){return p([h,l],{_onMap:function(a){var g=this.constructor._onMap,d;if(!g||!g.FINAL)delete this.constructor._onMap,g=this.registerConnectEvents(),g.FINAL=!0;a=a.toLowerCase();g[a]?d=this[g[a].method]:(a=this._onCamelCase(a),this[a]&&(d=a));return d},on:function(a,g){var d=this._onMap(a),c=a.replace(/\-/g,""),b="on"+c in this.domNode;return d||!b?this.inherited(arguments):this.own(e(this.domNode,c,g))[0]},emit:function(a,g,d){var c,b,f,m=a.toLowerCase(),e=this.constructor._onMap||
427this.registerConnectEvents();b=this[this._onMap(m)];g=g||{};g.target||(g.target=this);b&&(e&&e[m])&&(this._onObj2Arr(function(){c=Array.prototype.slice.call(arguments)},e[m].argKeys)(g),f=n.mixin({},arguments),f[2]=c,f[0]=e[m].name.replace(/^on/,""));return this.inherited(f||arguments)}})})},"esri/layerUtils":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","./kernel"],function(p,n,a,e,l){var h={_serializeLayerDefinitions:function(e){var g=[],d=!1,c=/[:;]/;if(e&&
428(n.forEach(e,function(a,b){a&&(g.push([b,a]),!d&&c.test(a)&&(d=!0))}),0<g.length)){var b;d?(b={}
428,n.forEach(g,function(a){b[a[0]]=a[1]}),b=a.toJson(b)):(b=[],n.forEach(g,function(a){b.push(a[0]+":"+a[1])}),b=b.join(";"));return b}return null},_serializeTimeOptions:function(e,g){if(e){var d=[];n.forEach(e,function(c,b){if(c){var f=c.toJson();g&&-1!==n.indexOf(g,b)&&(f.useTime=!1);d.push('"'+b+'":'+a.toJson(f))}});if(d.length)return"{"+d.join(",")+"}"}},_getVisibleLayers:function(a,g){var d=[],c,b,f;
429if(!a)return d;if(g){d=g.concat();for(f=0;f<a.length;f++)c=a[f],b=n.indexOf(a,c.id),c.subLayerIds&&-1<b&&(d.splice(b,1),d=d.concat(c.subLayerIds))}else d=this._getDefaultVisibleLayers(a);return d},_getDefaultVisibleLayers:function(a){var g=[],d;if(!a)return g;for(d=0;d<a.length;d++)0<=a[d].parentLayerId&&-1===n.indexOf(g,a[d].parentLayerId)&&n.some(a,function(c){return c.id===a[d].parentLayerId})||a[d].defaultVisibility&&g.push(a[d].id);return g},_getLayersForScale:function(a,g){var d=[];if(0<a&&
430g){var c;for(c=0;c<g.length;c++)if(!(0<=g[c].parentLayerId&&-1===n.indexOf(d,g[c].parentLayerId)&&n.some(g,function(a){return a.id===g[c].parentLayerId}))&&0<=g[c].id){var b=!0,f=g[c].maxScale,m=g[c].minScale;if(0<f||0<m)0<f&&0<m?b=f<=a&&a<=m:0<f?b=f<=a:0<m&&(b=a<=m);b&&d.push(g[c].id)}}return d}};e("extend-esri")&&p.mixin(l,h);return h})},"dijit/focus":function(){define("dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/Evented dojo/_base/lang dojo/on dojo/domReady dojo/sniff dojo/Stateful dojo/_base/window dojo/window ./a11y ./registry ./main".split(" "),
431function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r){var u,x,v=new (n([f,q],{curNode:null,activeStack:[],constructor:function(){var b=g.hitch(this,function(b){a.isDescendant(this.curNode,b)&&this.set("curNode",null);a.isDescendant(this.prevNode,b)&&this.set("prevNode",null)});p.before(h,"empty",b);p.before(h,"destroy",b)},registerIframe:function(a){return this.registerWin(a.contentWindow,a)},registerWin:function(a,c){var k=this,f=a.document&&a.document.body;if(f){var r=b("pointer-events")?"pointerdown":b("MSPointer")?
432"MSPointerDown":b("touch-events")?"mousedown, touchstart":"mousedown",m=d(a.document,r,function(a){if(!a||!(a.target&&null==a.target.parentNode))k._onTouchNode(c||a.target,"mouse")}),g=d(f,"focusin",function(a){if(a.target.tagName){var b=a.target.tagName.toLowerCase();"#document"==b||"body"==b||(s.isFocusable(a.target)?k._onFocusNode(c||a.target):k._onTouchNode(c||a.target))}}),e=d(f,"focusout",function(a){k._onBlurNode(c||a.target)});return{remove:function(){m.remove();g.remove();e.remove();f=m=
433g=e=null}}}},_onBlurNode:function(a){a=(new Date).getTime();a<u+100||(this._clearFocusTimer&&clearTimeout(this._clearFocusTimer),this._clearFocusTimer=setTimeout(g.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null)}),0),this._clearActiveWidgetsTimer&&clearTimeout(this._clearActiveWidgetsTimer),a<x+100||(this._clearActiveWidgetsTimer=setTimeout(g.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([])}),0)))},_onTouchNode:function(a,b){x=(new Date).getTime();
434this._clearActiveWidgetsTimer&&(clearTimeout(this._clearActiveWidgetsTimer),delete this._clearActiveWidgetsTimer);l.contains(a,"dijitPopup")&&(a=a.firstChild);var c=[];try{for(;a;){var d=e.get(a,"dijitPopupParent");if(d)a=k.byId(d).domNode;else if(a.tagName&&"body"==a.tagName.toLowerCase()){if(a===m.body())break;a=t.get(a.ownerDocument).frameElement}else{var f=a.getAttribute&&a.getAttribute("widgetId"),r=f&&k.byId(f);r&&!("mouse"==b&&r.get("disabled"))&&c.unshift(f);a=a.parentNode}}}catch(s){}this._setStack(c,
435b)},_onFocusNode:function(a){a&&9!=a.nodeType&&(u=(new Date).getTime(),this._clearFocusTimer&&(clearTimeout(this._clearFocusTimer),delete this._clearFocusTimer),this._onTouchNode(a),a!=this.curNode&&(this.set("prevNode",this.curNode),this.set("curNode",a)))},_setStack:function(a,b){var c=this.activeStack,d=c.length-1,f=a.length-1;if(a[f]!=c[d]){this.set("activeStack",a);var r;for(r=d;0<=r&&c[r]!=a[r];r--)if(d=k.byId(c[r]))d._hasBeenBlurred=!0,d.set("focused",!1),d._focusManager==this&&d._onBlur(b),
436this.emit("widget-blur",d,b);for(r++;r<=f;r++)if(d=k.byId(a[r]))d.set("focused",!0),d._focusManager==this&&d._onFocus(b),this.emit
436("widget-focus",d,b)}},focus:function(a){if(a)try{a.focus()}catch(b){}}}));c(function(){var a=v.registerWin(t.get(document));b("ie")&&d(window,"unload",function(){a&&(a.remove(),a=null)})});r.focus=function(a){v.focus(a)};for(var z in v)/^_/.test(z)||(r.focus[z]="function"==typeof v[z]?g.hitch(v,z):v[z]);v.watch(function(a,b,c){r.focus[a]=c});return v})},"dijit/hccss":function(){define(["dojo/dom-class",
437"dojo/hccss","dojo/domReady","dojo/_base/window"],function(p,n,a,e){a(function(){n("highcontrast")&&p.add(e.body(),"dijit_a11y")});return n})},"esri/arcgis/utils":function(){define("require dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/Deferred dojo/_base/json dojo/_base/url dojo/on dojo/DeferredList dojo/dom-construct dojo/sniff ../kernel ../config ../lang ../request ../SpatialReference ../map ../urlUtils ../geometry/ScreenPoint ../geometry/Extent ../geometry/webMercatorUtils ../symbols/jsonUtils ../renderers/jsonUtils ../dijit/PopupTemplate ../dijit/Popup ../tasks/query ../tasks/GeometryService ../layers/ArcGISTiledMapServiceLayer ../layers/FeatureLayer dojo/i18n!../nls/jsapi".split(" "),
438function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y,B,G,D,A,C,E,I){function H(a){return s({url:ea.arcgisUrl+"/"+a.itemId+"/data",content:{f:"json"},callbackParamName:"callback"},{disableIdentityLookup:!0,_preLookup:!0})}function L(a,b){var c={f:"json"};b&&(c.token=b);return s({url:a,content:c,callbackParamName:"callback"},{disableIdentityLookup:!0})}function J(a){a.itemProperties.layerDefinition&&(a.layerDefinition?(a.layerDefinition.drawingInfo||(a.layerDefinition.drawingInfo=a.itemProperties.layerDefinition.drawingInfo),
439t.isDefined(a.layerDefinition.definitionExpression)||(a.layerDefinition.definitionExpression=a.itemProperties.layerDefinition.definitionExpression),t.isDefined(a.layerDefinition.minScale)||(a.layerDefinition.minScale=a.itemProperties.layerDefinition.minScale),t.isDefined(a.layerDefinition.maxScale)||(a.layerDefinition.maxScale=a.itemProperties.layerDefinition.maxScale)):a.layerDefinition=a.itemProperties.layerDefinition);a.itemProperties.popupInfo&&(!a.popupInfo&&!a.disablePopup)&&(a.popupInfo=a.itemProperties.popupInfo);
440t.isDefined(a.itemProperties.showLabels)&&!t.isDefined(a.showLabels)&&(a.showLabels=a.itemProperties.showLabels);t.isDefined(a.itemProperties.showLegend)&&!t.isDefined(a.showLegend)&&(a.showLegend=a.itemProperties.showLegend);t.isDefined(a.itemProperties.refreshInterval)&&!t.isDefined(a.refreshInterval)&&(a.refreshInterval=a.itemProperties.refreshInterval)}function F(a){J(a);a.itemProperties.layerDefinition&&a.layerDefinition&&(!t.isDefined(a.layerDefinition.maximumTrackPoints)&&t.isDefined(a.itemProperties.layerDefinition.maximumTrackPoints)&&
441(a.layerDefinition.maximumTrackPoints=a.itemProperties.layerDefinition.maximumTrackPoints),!a.layerDefinition.definitionGeometry&&a.itemProperties.layerDefinition.definitionGeometry&&(a.layerDefinition.definitionGeometry=a.itemProperties.layerDefinition.definitionGeometry));a.itemProperties.purgeOptions&&!a.purgeOptions&&(a.purgeOptions=a.itemProperties.purgeOptions)}function K(b,c){var k=new l,f=b.itemData,r=[],m=[];a.forEach(f.operationalLayers,function(a){if(a.itemId&&!a.type){var b=a.url.toLowerCase();
442-1<b.indexOf("/featureserver")||-1<b.indexOf("/mapserver/")?(m.push(a),r.push(H(a))):-1<b.indexOf("/mapserver")&&-1===b.indexOf("/mapserver/")&&(!a.layers||!t.isDefined(a.minScale)&&!t.isDefined(a.maxScale))?(m.push(a),r.push(H(a))):-1<b.indexOf("/imageserver")&&!t.isDefined(a.minScale)&&!t.isDefined(a.maxScale)?(m.push(a),r.push(H(a))):-1<b.indexOf("/streamserver")&&(m.push(a),r.push(H(a)))}});f.baseMap&&f.baseMap.baseMapLayers&&a.forEach(f.baseMap.baseMapLayers,function(a){a.itemId&&"VectorTileLayer"!==
443a.layerType&&(m.push(a),r.push(H(a)))});if(0<r.length){var s={};(new d(r)).addCallback(function(c){a.forEach(m,function(b,d){var k=c[d][1];if(k&&!(k instanceof Error)&&(s[b.itemId]=k,!b.type)){var f=b.url.toLowerCase();if((-1<f.indexOf("/featureserver")||-1<f.indexOf("/mapserver/"))&&k.layers)a.forEach(k.layers,function(a){if(f.match("/featureserver/"+a.id+"$")=="/featureserver/"+a.id||f.match("/mapserver/"+a.id+"$")=="/mapserver/"+a.id)b.itemProperties=a,J(b)});else if(-1<f.indexOf("/streamserver"))b.itemProperties=
444k,F(b);else if(-1<f.indexOf("/mapserver"))k.layers&&!b.layers&&(b.layers=k.layers),t.isDefined(k.minScale)&&!t.isDefined(b.minScale)&&(b.minScale=k.minScale),t.isDefined(k.maxScale)&&!t.isDefined(b.maxScale)&&(b.maxScale=k.maxScale),t.isDefined(k.refreshInterval)&&!t.isDefined(b.refreshInterval)&&(b.refreshInterval=k.refreshInterval),k.visibleLayers&&!b.visibleLayers&&(b.visibleLayers=k.visibleLayers);else if(-1<f.indexOf("/imageserver")&&(t.isDefined(k.minScale)&&!t.isDefined(b.minScale)&&(b.minScale=
445k.minScale),t.isDefined(k.maxScale)&&!t.isDefined(b.maxScale)&&(b.maxScale=k.maxScale),t.isDefined(k.refreshInterval)&&!t.isDefined(b.refreshInterval)&&(b.refreshInterval=k.refreshInterval),k.popupInfo&&(!b.popupInfo&&!b.disablePopup)&&(b.popupInfo=k.popupInfo),k.renderingRule&&!b.renderingRule&&(b.renderingRule=k.renderingRule,k.renderingRule.functionName&&(b.renderingRule.rasterFu
445nction=k.renderingRule.functionName)),k.bandIds&&!b.bandIds&&(b.bandIds=k.bandIds),k.mosaicRule&&!b.mosaicRule&&(b.mosaicRule=
446k.mosaicRule),k.format&&!b.format&&(b.format=k.format),t.isDefined(k.compressionQuality)&&!t.isDefined(b.compressionQuality)&&(b.compressionQuality=k.compressionQuality),k.layerDefinition&&k.layerDefinition.definitionExpression&&(!t.isDefined(b.layerDefinition)||!t.isDefined(b.layerDefinition.definitionExpression))))b.layerDefinition=b.layerDefinition||{},b.layerDefinition.definitionExpression=k.layerDefinition.definitionExpression}});b.relatedItemsData=s;k.callback(b)})}else k.callback(b);return k}
447function M(a,b){var c=new l,d=a.itemData,k=d.baseMap.baseMapLayers[0];if("BingMapsAerial"===k.type||"BingMapsRoad"===k.type||"BingMapsHybrid"===k.type)if(k.portalUrl&&f.id)delete b.bingMapsKey,f.id.checkSignInStatus(u.urlToObject(ea.arcgisUrl).path).then(n.hitch(null,function(a,b,c,d,f){L(k.portalUrl,f.token).then(n.hitch(null,T,a,b,c,d),n.hitch(null,O,a,b,c,d))},a,b,d,c),n.hitch(null,function(a,b,c,d,f){L(k.portalUrl).then(n.hitch(null,T,a,b,c,d),n.hitch(null,O,a,b,c,d))},a,b,d,c));else if(b.bingMapsKey){var r=
448new ia({bingMapsKey:b.bingMapsKey,mapStyle:ia.MAP_STYLE_AERIAL});e.connect(r,"onLoad",n.hitch(this,function(){c.callback([a,b])}));e.connect(r,"onError",function(f){delete b.bingMapsKey;a.itemData=U(d);k=a.itemData.baseMap.baseMapLayers[0];k.errors=[];k.errors.push({message:"The owner of the application has not provided a valid Bing Key for the Bing Map it includes. Switching to Esri layers."});c.callback([a,b])})}else a.itemData=U(d),k=a.itemData.baseMap.baseMapLayers[0],k.errors=[],k.errors.push({message:"The owner of the application has not provided a Bing Key for the Bing Map it includes. Switching to Esri layers."}),
449c.callback([a,b]);else c.callback([a,b]);return c}function N(a){var c=new l,d,k;a=a.itemData;var f=a.baseMap&&a.baseMap.baseMapLayers;if(b("ie")||Ja&&!Ja.supported())for(a=0;a<f.length;a++){var r=f[a];if(!r.isReference){"VectorTileLayer"===r.layerType&&(d=r.itemId,k=a);break}}d?Ia(d,!1).addBoth(function(a){var b=/^https?:\/\/basemaps(dev)?\.arcgis\.com\/arcgis\/rest\/services\/World_Basemap\/VectorTileServer/i;a&&(a.item&&b.test(a.item.url))&&(f[k]={id:"FB_"+r.id,layerType:"ArcGISTiledMapServiceLayer",
450opacity:"opacity"in r?r.opacity:1,visibility:"visibility"in r?r.visibility:!0,url:"http://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer"});c.resolve()}):c.resolve();return c}function T(a,b,c,d,k){k.bingKey?(b.bingMapsKey=k.bingKey,k=new ia({bingMapsKey:b.bingMapsKey,mapStyle:ia.MAP_STYLE_AERIAL}),e.connect(k,"onLoad",n.hitch(this,function(){d.callback([a,b])})),e.connect(k,"onError",function(k){delete b.bingMapsKey;a.itemData=U(c);k=a.itemData.baseMap.baseMapLayers[0];
451k.errors=[];k.errors.push({message:"The owner of the map has not provided a valid Bing Key for the Bing Map it includes. Switching to Esri layers."});d.callback([a,b])})):O(a,b,c,d)}function O(a,b,c,d){delete b.bingMapsKey;a.itemData=U(c);c=a.itemData.baseMap.baseMapLayers[0];c.errors=[];c.errors.push({message:"The owner of the map has not provided a Bing Key for the Bing Map it includes. Switching to Esri layers."});d.callback([a,b])}function U(a){a.baseMap="BingMapsAerial"===a.baseMap.baseMapLayers[0].type?
452{title:"Imagery",baseMapLayers:[{id:"World_Imagery_2017",visibility:!0,opacity:1,url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"}]}:"BingMapsRoad"===a.baseMap.baseMapLayers[0].type?{title:"Streets",baseMapLayers:[{id:"World_Street_Map_8421",opacity:1,visibility:!0,url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"}]}:{title:"Imagery with Labels",baseMapLayers:[{id:"World_Imagery_6611",opacity:1,visibility:!0,url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},
453{id:"World_Boundaries_and_Places_1145",isReference:!0,opacity:1,visibility:!0,url:"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer"}]};return a}function Y(b,c,d,k){var f=b.dynamicLayerInfos||b.layerInfos,r=c.layers;if(r&&f)if(k.usePopupManager){var m;a.forEach(f,function(a){var b=a.id;if(!a.subLayerIds)for(a=0;a<r.length;a++){var c=r[a];if(c.id===b&&c.popupInfo){m||(m={});m[b]={infoTemplate:new d(c.popupInfo),layerUrl:c.layerUrl};break}}});m&&
454b.setInfoTemplates(m)}else{var s=[],g=[],e=[],u=[],h=[],l=[];a.forEach(f,function(c){var d=c.id;if(!c.subLayerIds&&-1!==a.indexOf(b.visibleLayers,d))for(c=0;c<r.length;c++){var k=r[c];if(k.id===d){g.push(d);s.push(k.popupInfo);e.push(k.layerUrl||"");k.layerDefinition&&k.layerDefinition.definitionExpression?u.push(k.layerDefinition.definitionExpression):u.push("");h.push(t.isDefined(k.minScale)?k.minScale:null);l.push(t.isDefined(k.maxScale)?k.maxScale:null);break}}});s.length&&(b.__popups=s,b.__popupIds=
455g,b.__popupUrls=e,b.__popupWhereClauses=u,b.__popupMinScales=h,b.__popupMaxScales=l,b.__resourceInfo=c.resourceInfo)}}function R(a){if(!a)return!1;var b=(new q(ea.arcgisUrl)).authority;return-1!==a.indexOf(".arcgis.com/")||-1!==a.indexOf(b)}function ba(a){return!a?!1:-1!==a.indexOf("/services.arcgisonline.com/")||-1!==a.indexOf("/server.arcgisonline.com/")}
455function Q(a){if("https:"===location.protocol&&(R(a)||ba(a)))a=a.replace("http:","https:");return a}function P(b,c,d){var k=[],f;b.displayLevels||
456(k=a.map(b.resourceInfo.tileInfo.lods,function(a){return a.level}));b.exclusionAreas&&(f=n.clone(b.exclusionAreas),f=a.map(f,function(a){a.geometry=new v(a.geometry);return a}));k=new C(Q(b.url),{resourceInfo:b.resourceInfo,opacity:b.opacity,visible:b.visibility,displayLevels:b.displayLevels||k,id:b.id,minScale:b.minScale,maxScale:b.maxScale,refreshInterval:b.refreshInterval,exclusionAreas:f});d.ignorePopups||Y(k,b,c,d);return k}function ca(a,b){if(!a||!b||0===b.length)return[];var c=","+b+",",d=
457[],k,f=",";for(k=0;k<a.length;k++)if(null!==a[k].subLayerIds){if(-1===c.indexOf(","+a[k].id+",")||-1<f.indexOf(","+a[k].id+","))f+=a[k].subLayerIds.toString()+","}else-1<c.indexOf(","+a[k].id+",")&&-1===f.indexOf(","+a[k].id+",")&&d.push(a[k].id);return d}function Z(b,c,d){var k=new eb;k.format="png24";b.resourceInfo&&(b.resourceInfo.supportedImageFormatTypes&&-1<b.resourceInfo.supportedImageFormatTypes.indexOf("PNG32"))&&(k.format="png32");var k=new Ya(Q(b.url),{resourceInfo:b.resourceInfo,opacity:b.opacity,
458visible:b.visibility,id:b.id,imageParameters:k,minScale:b.minScale,maxScale:b.maxScale,refreshInterval:b.refreshInterval}),f=b.visibleLayers;if(!b.visibleLayers){var r="";a.forEach(k.layerInfos,function(a){a.defaultVisibility&&(r+=(0<r.length?",":"")+a.id)});f=r}if(b.layers&&0<b.layers.length){var m=[],s=[],g,e=[],u,h;a.forEach(b.layers,function(c){c.layerDefinition&&c.layerDefinition.definitionExpression&&(m[c.id]=c.layerDefinition.definitionExpression);if(c.layerDefinition&&c.layerDefinition.source){g=
459null;h=c.layerDefinition.source;if("mapLayer"===h.type){var d=a.filter(b.resourceInfo.layers,function(a){return a.id===h.mapLayerId});d.length&&(g=n.mixin(d[0],c))}else g=n.mixin({},c);g&&(g.source=h,delete g.popupInfo,g=new cb(g),b.visibleLayers&&(d="string"==typeof b.visibleLayers?b.visibleLayers.split(","):b.visibleLayers,-1<a.indexOf(d,c.id)?g.defaultVisibility=!0:g.defaultVisibility=!1),s.push(g))}c.layerDefinition&&(c.layerDefinition.source&&c.layerDefinition.drawingInfo)&&(u=new ib(c.layerDefinition.drawingInfo),
460e[c.id]=u)},this);0<m.length&&k.setLayerDefinitions(m);0<s.length?(k.setDynamicLayerInfos(s,!0),0<e.length&&k.setLayerDrawingOptions(e,!0)):(f=ca(k.layerInfos,f),k.setVisibleLayers(f))}else f=ca(k.layerInfos,f),k.setVisibleLayers(f);d.ignorePopups||Y(k,b,c,d);return k}function X(a,b,c){var d=new fb;d.bandIds=a.bandIds;null!=a.format&&(d.format=a.format,null!=a.compressionQuality&&(d.compressionQuality=a.compressionQuality));if(a.renderingRule&&a.renderingRule.rasterFunction){var k=new kb(a.renderingRule);
461d.renderingRule=k}a.mosaicRule&&(k=new jb(a.mosaicRule),d.mosaicRule=k);t.isDefined(a.noData)&&(d.noData=a.noData);t.isDefined(a.noDataInterpretation)&&(d.noDataInterpretation=a.noDataInterpretation);t.isDefined(a.interpolation)&&(d.interpolation=a.interpolation);k=a.layerType?"ArcGISImageServiceVectorLayer"===a.layerType:!1;t.isDefined(a.layerType)||(k=a.resourceInfo.hasMultidimensions&&("esriImageServiceDataTypeVector-UV"===a.resourceInfo.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===
462a.resourceInfo.serviceDataType));d={resourceInfo:a.resourceInfo,opacity:a.opacity,visible:a.visibility,id:a.id,imageServiceParameters:d,minScale:a.minScale,maxScale:a.maxScale,refreshInterval:a.refreshInterval};d=k?new $a(Q(a.url),d):new Za(Q(a.url),d);a.layerDefinition&&(a.layerDefinition.drawingInfo&&a.layerDefinition.drawingInfo.renderer&&(k=y.fromJson(a.layerDefinition.drawingInfo.renderer),d.setRenderer(k)),a.layerDefinition.definitionExpression&&d.setDefinitionExpression(a.layerDefinition.definitionExpression,
463!0));!c.ignorePopups&&a.popupInfo&&d.setInfoTemplate(new b(a.popupInfo));return d}function W(b,c,d){var f=[102113,102100,3857],r=d||new k(c[0].layerObject.fullExtent.spatialReference),m=new k(b.resourceInfo.fullExtent.spatialReference);return r.wkt==m.wkt&&(r.wkid==m.wkid||t.isDefined(r.latestWkid)&&r.latestWkid==m.wkid||t.isDefined(m.latestWkid)&&r.wkid==m.latestWkid||t.isDefined(r.latestWkid)&&r.latestWkid==m.latestWkid)||r.wkid&&m.wkid&&a.some(f,function(a){return a===m.wkid})&&a.some(f,function(a){return a===
464r.wkid})?!0:!1}function V(a,b,c){if(!b[0].layerObject.tileInfo)return!1;a=a.resourceInfo.tileInfo;b=b[0].layerObject.tileInfo;c=c.width>c.height?c.width:c.height;for(var d=!1,k=!1,f=0;f<a.lods.length;f++){for(var r=a.lods[f].scale/a.dpi,m=0;m<b.lods.length;m++){var s=b.lods[m].scale/b.dpi;if(Math.abs(s-r)/s<1/c)if(d){k=!0;break}else d=!0}if(k)break}return k||d&&(1===a.lods.length||1===b.lods.length)?!0:!1}function $(b,c,d,r,m,s){var l,q=d._clazz;if("OpenStreetMap"===b.type)l=new lb({id:b.id,opacity:b.opacity,
465visible:null!==b.visibility&&void 0!==b.visibility?b.visibility:!0});else if("WMS"===b.type){var x=[],A=[];a.forEach(b.layers,function(a){A.push(new mb({name:a.name,title:a.title,legendURL:a.legendURL}));x.push(a.name)},this);b.visibleLayers&&(x=b.visibleLayers);r={extent:new v(b.extent[0][0],b.extent[0][1],b.extent[1][0],b.extent[1][1],new k({wkid:4326})),layerInfos:A,version:b.version,maxWidth:b.maxWidth,maxHeight:b.maxHeight,getMapURL:b.mapUrl,spatialReferences:b.spatialReferences,title:b.title,
466copyright:b.copyright,minScale:b.minScale||0,maxScale:b.maxScale||0,format:b.format};l=new nb(b.url,{id:b.id,visibleLayers:x,format:"png",transparent:b.baseMapLayer?!1:!0,opacity:b.opacity,visible:null!==b.visibility?b.visibility:!0,resourceInfo:r,refreshInterval:b.refreshInterval});l.spatialReference.wkid=r.spatialReferences[0]}else if("KML"===b.type){d=b.url;
466if(f.id&&(q=f.id.findCredential(u.urlToObject(ea.arcgisUrl).path))){var p=ea.arcgisUrl.substring(ea.arcgisUrl.indexOf("//")+2,ea.arcgisUrl.indexOf("/",
467ea.arcgisUrl.indexOf("//")+3)),C=p.split("."),C=C[C.length-2]+"."+C[C.length-1];c=d.indexOf(C);-1<c&&(d="https://"+p+d.substring(c+C.length),d+="?token\x3d"+q.token)}l=new gb(d,{id:b.id,visible:null!==b.visibility?b.visibility:!0,outSR:r,refreshInterval:b.refreshInterval});e.connect(l,"onLoad",function(){(b.opacity||0===b.opacity)&&l.setOpacity(b.opacity);t.isDefined(b.minScale)&&t.isDefined(b.maxScale)&&l.setScaleRange(b.minScale,b.maxScale);b.visibleFolders&&a.forEach(l.folders,function(c){-1<a.indexOf(b.visibleFolders,
468c.id)?l.setFolderVisibility(c,!0):l.setFolderVisibility(c,!1)},this)})}else"WebTiledLayer"===b.type?(l=new ob(b.templateUrl,{id:b.id,visible:null!==b.visibility?b.visibility:!0,opacity:b.opacity,copyright:b.copyright,fullExtent:b.fullExtent&&new v(b.fullExtent),initialExtent:b.fullExtent&&new v(b.fullExtent),subDomains:b.subDomains,tileInfo:b.tileInfo?new pb(b.tileInfo):null,refreshInterval:b.refreshInterval}),e.connect(l,"onLoad",function(){(t.isDefined(b.minScale)||t.isDefined(b.maxScale))&&l.setScaleRange(b.minScale,
469b.maxScale)})):"GeoRSS"===b.type?(l=new db(b.url,{id:b.id,opacity:b.opacity,outSpatialReference:r,refreshInterval:b.refreshInterval}),e.connect(l,"onLoad",function(){!1===b.visibility&&l.hide();t.isDefined(b.minScale)&&t.isDefined(b.maxScale)&&l.setScaleRange(b.minScale,b.maxScale);var c=l.getFeatureLayers();a.forEach(c,function(a){b.pointSymbol&&"esriGeometryPoint"===a.geometryType?(a.renderer.symbol=w.fromJson(b.pointSymbol),1===c.length&&(l.pointSymbol=w.fromJson(b.pointSymbol))):b.lineSymbol&&
470"esriGeometryPolyline"===a.geometryType?(a.renderer.symbol=w.fromJson(b.lineSymbol),1===c.length&&(l.polylineSymbol=w.fromJson(b.lineSymbol))):b.polygonSymbol&&"esriGeometryPolygon"===a.geometryType&&(a.renderer.symbol=w.fromJson(b.polygonSymbol),1===c.length&&(l.polygonSymbol=w.fromJson(b.polygonSymbol)))})})):"CSV"==b.type&&b.url?(r={layerDefinition:b.layerDefinition,columnDelimiter:b.columnDelimiter,id:b.id?b.id:null,visible:null!==b.visibility?b.visibility:!0,opacity:b.opacity,refreshInterval:b.refreshInterval},
471b.locationInfo&&(r.latitudeFieldName=b.locationInfo.latitudeFieldName,r.longitudeFieldName=b.locationInfo.longitudeFieldName),d.ignorePopups||(r.infoTemplate=new B(b.popupInfo?b.popupInfo:ab.generateDefaultPopupInfo(b))),l=new bb(b.url,r)):"VectorTileLayer"===b.layerType&&b.styleUrl?l=new qb(b.styleUrl,{id:b.id,minScale:b.minScale,maxScale:b.maxScale,opacity:b.opacity,visible:b.visibility}):b.layerDefinition&&!b.url?(r=h.fromJson(h.toJson(b)),delete r.id,delete r.opacity,delete r.visibility,l=new E(r,
472{id:b.id,opacity:b.opacity,visible:b.visibility,outFields:["*"],autoGeneralize:!0}),!d.ignorePopups&&r.popupInfo&&l.setInfoTemplate(new q(r.popupInfo)),da(l)):"BingMapsAerial"===b.type||"BingMapsRoad"===b.type||"BingMapsHybrid"===b.type?d.bingMapsKey?(r=ia.MAP_STYLE_AERIAL_WITH_LABELS,"BingMapsAerial"===b.type?r=ia.MAP_STYLE_AERIAL:"BingMapsRoad"===b.type&&(r=ia.MAP_STYLE_ROAD),l=new ia({bingMapsKey:d.bingMapsKey,mapStyle:r,opacity:b.opacity,id:b.id}),e.connect(l,"onError",n.hitch(this,function(a){a.errors=
473a.errors||[];a.errors.push({message:"This application does not have a valid Bing Key for the Bing layer that is included in this map. [type:"+a.type+"]"})},b))):(b.errors=b.errors||[],b.errors.push({message:"This application does not provide a Bing Key for the Bing layer that is included in this map. [type:"+b.type+"]"})):b.resourceInfo&&b.resourceInfo.mapName?l=!0===b.resourceInfo.singleFusedMapCache&&(b.baseMapLayer||W(b,c,r)&&V(b,m,s))?P(b,q,d):Z(b,q,d):b.resourceInfo&&b.resourceInfo.pixelSizeX?
474l=!0===b.resourceInfo.singleFusedMapCache&&(b.baseMapLayer||W(b,c,r)&&V(b,m,s))?P(b,q,d):X(b,q,d):b.resourceInfo&&"Feature Layer"===b.resourceInfo.type?(b.capabilities&&(b.resourceInfo.capabilities=b.capabilities),l=new E(Q(b.url),{resourceInfo:b.resourceInfo,opacity:b.opacity,visible:b.visibility,id:b.id,mode:R(b.url)?E.MODE_AUTO:t.isDefined(b.mode)?b.mode:E.MODE_ONDEMAND,editable:!1===d.editable?!1:void 0,outFields:["*"],autoGeneralize:!0,refreshInterval:b.refreshInterval}),!d.ignorePopups&&b.popupInfo&&
475l.setInfoTemplate(new q(b.popupInfo)),b.layerDefinition&&(b.layerDefinition.drawingInfo&&b.layerDefinition.drawingInfo.renderer&&(r=y.fromJson(b.layerDefinition.drawingInfo.renderer),r.isMaxInclusive=!0,l.setRenderer(r)),b.layerDefinition.drawingInfo&&b.layerDefinition.drawingInfo.labelingInfo&&(r=a.map(b.layerDefinition.drawingInfo.labelingInfo,function(a){return new hb(a)}),l.setLabelingInfo(r)),b.layerDefinition.definitionExpression&&l.setDefinitionExpression(b.layerDefinition.definitionExpression),
476t.isDefined(b.layerDefinition.minScale)&&l.setMinScale(b.layerDefinition.minScale),t.isDefined(b.layerDefinition.maxScale)&&l.setMaxScale(b.layerDefinition.maxScale)),da(l)):b.resourceInfo&&b.resourceInfo.streamUrls&&(r={resourceInfo:b.resourceInfo,opacity:b.opacity,visible:b.visibility,id:b.id},b.layerDefinition&&(C=b.layerDefinition.drawingInfo,b.layerDefinition.definitionGeometry&&(p=p||{},p.geometry=b.layerDefinition.definitionGeometry),t.isDefined(b.layerDefinition.definitionExpression)&&(p=
477p||{},p.where=b.layerDefinition.definitionExpression),t.isDefined(b.layerDefinition.maximumTrackPoints)&&(r.maximumTrackPoints=b.layerDefinition.maximumTrackPoints)),p&&(r.filter=p),b.purgeOptions&&(r.purgeOptions=b.purgeOptions),l=new rb(Q(b.url),r),C&&C.renderer&&(r=C.renderer,l.setRenderer(y.fromJson(r))),!d.ignorePopups&&b.popupInfo&&l.setInfoTemplate(new q(b.popupInfo)),b.layerDefinition&&(t.isDefined(b.layerDefinition.minScale)&&l.setMinScale(b.layerDefinition.minScale),t.isDefined(b.layerDefinition.maxScale)&&
478l.setMaxScale(b.layerDefinition.maxScale)),g.once(l,"error",function(a){b.errors.push({message:"Error loading stream layer. Check websocket url"})}));l&&(l.arcgisProps={title:b.title},b.baseMapLayer&&(b.isReference?(l.attr("data-reference",!0),l._basemapGalleryLayerType="reference"):l._basemapGalleryLayerType="basemap"));return l}function S(b,c,d,k,f){a.forEach(b,function(a,r){if(a.url&&!a.type){if(0===r||b[0].layerObject)a.layerObject=$(a,b,c,d,k,f)}else a.layerObject=$(a,b,c,d,k,f)});var r=a.filter(b,
479function(a){return!a.isReference}),m=a.filter(b,function(a){return!!a.isReference});return b=r.concat(m)}function aa(a){var b=null;a=a[0];a.url&&!a.type?a.resourceInfo.spatialReference&&(b=new k,a.resourceInfo.spatialReference.wkid&&(b.wkid=a.resourceInfo.spatialReference.wkid),a.resourceInfo.spatialReference.wkt&&(b.wkt=a.resourceInfo.spatialReference.wkt)):a.type&&(-1<a.type.indexOf("BingMaps")||"OpenStreetMap"==a.type?b=new k({wkid:102100}):"WMS"==a.type&&(b=new k({wkid:a.spatialReferences[0]})));
480return b}function fa(b,c,d,k,f,r,m,s){a.forEach(c,function(a){a.url&&!a.type&&(a.resourceInfo=b[a.deferredsPos][1],delete a.deferredsPos)});r=r||aa(c);c=S(c,d,r,m,s);f.callback(c);return f}function da(a){!window.CanvasRenderingContext2D&&(a.renderer&&"esri.renderer.HeatmapRenderer"===a.renderer.declaredClass)&&a.setRenderer(y.fromJson({type:"simple",symbol
480:{color:[77,77,77,255],size:6,angle:0,xoffset:0,yoffset:0,type:"esriSMS",style:"esriSMSCircle",outline:{color:[255,255,255,255],width:0.75,type:"esriSLS",
481style:"esriSLSSolid"}}}))}function la(a,b){var c=Q(a);return s({url:c,content:{f:"json"},callbackParamName:"callback",error:function(a,d){a.message=a.message?a.message+(" [url:"+c+"]"):"[url:"+c+"]";b.push(a);m.defaults.io.errorHandler(a,d)}})}function ga(a){var b=ea.arcgisUrl+"/"+a.itemId+"/data";return s({url:b,content:{f:"json"},callbackParamName:"callback",error:function(c,d){c.message=c.message?c.message+(" [url:"+b+"]"):"[url:"+b+"]";a.errors=a.errors||[];a.errors.push(c);m.defaults.io.errorHandler(c,
482d)}})}function ma(b,c,d){var k=new l;if((!d.featureCollection||!d.featureCollection.layers)&&!d.layers)return console.log("Invalid Feature Collection item data [item id: "+b.itemId+"]: ",d),b.errors=b.errors||[],b.errors.push({message:"Invalid Feature Collection item data. [item id: "+b.itemId+"]"}),k.errback(),k;d.layers&&(d.featureCollection={layers:d.layers},delete d.layers,t.isDefined(d.showLegend)&&(d.featureCollection.showLegend=d.showLegend,delete d.showLegend));ja(b,d.featureCollection,c).then(function(c){d.featureCollection=
483c;b.featureCollection&&b.featureCollection.layers?a.forEach(d.featureCollection.layers,function(a,c){var d=b.featureCollection.layers[c];if(!d.poupInfo&&!d.layerDefinition)d.popupInfo=a.popupInfo,d.layerDefinition=a.layerDefinition;else if(d.layerDefinition){if(t.isDefined(d.layerDefinition.minScale)&&t.isDefined(d.layerDefinition.maxScale)&&(d.layerDefinition.minScale!==a.layerDefinition.minScale||d.layerDefinition.maxScale!==a.layerDefinition.maxScale))delete a.layerDefinition.minscale,delete a.layerDefinition.maxScale;
484d.layerDefinition.drawingInfo&&h.toJson(d.layerDefinition.drawingInfo)!==h.toJson(a.layerDefinition.drawingInfo)&&delete a.layerDefinition.drawingInfo;d.layerDefinition.showLegend!==a.layerDefinition.showLegend&&delete a.layerDefinition.showLegend;d.layerDefinition=n.mixin(d.layerDefinition,a.layerDefinition)}else d.layerDefinition=a.layerDefinition;d.featureSet=a.featureSet;d.nextObjectId=a.nextObjectId}):(b.featureCollection=b.featureCollection||{},b.featureCollection=n.mixin(b.featureCollection,
485d.featureCollection));k.callback(b)});return k}function ja(b,c,k){var f=new l;p(["./csv"],function(r){var m=[];a.forEach(c.layers,function(a){a.featureSet&&(a.featureSet.features&&a.featureSet.features.length&&a.featureSet.features[0].geometry&&a.featureSet.features[0].geometry.spatialReference)&&(a.deferredsPos=m.length,m.push(r.projectFeatureCollection(a,k,a.featureSet.features[0].geometry.spatialReference)))});(new d(m)).addCallback(function(){a.forEach(c.layers,function(a){t.isDefined(a.deferredsPos)&&
486(m[a.deferredsPos].results&&m[a.deferredsPos].results.length?a=m[a.deferredsPos].results[0]:(console.log("Errors projecting feature collection. ["+b.title+" - "+a.layerDefinition.name+"]"),a.errors=a.errors||[],a.errors.push({message:"Errors projecting feature collection. ["+b.title+" - "+a.layerDefinition.name+"]"})),delete a.deferredsPos)});f.callback(c)})});return f}function ha(b,c,k,f,r){var m=new l,s=new l,e=[],u;a.forEach(b.operationalLayers,function(a){a.itemId&&"Feature Collection"==a.type&&
487e.push(ga(a).then(n.hitch(null,ma,a,k)))});0===e.length?na(b,c,k,f,s,r):(u=new d(e),u.addCallback(function(a){na(b,c,k,f,s,r)}));s.then(function(b){e=[];a.forEach(b,function(a){a=a.layerObject;if(a instanceof E&&!a.loaded&&!a.loadError){var b=new l;g.once(a,"load, error",function(){b.callback(a)});e.push(b)}});if(e.length){var c=new l;u=new d(e);u.addCallback(function(){c.callback(b)});return c.promise}return b}).then(function(b){var c=[];a.forEach(b,function(a){if(a.layerObject instanceof E){var b=
488a.layerObject;b.loaded&&(b.labelingInfo&&(a.showLabels||b._collection))&&c.push(b)}});c.length?p(["../layers/LabelLayer"],function(d){var k=new d;a.forEach(c,function(a){k.addFeatureLayer(a)});b.push({layerObject:k});m.callback(b)}):m.callback(b)});return m}function na(b,c,k,f,r,m){var s=[],g=[],e=[];a.forEach(b.operationalLayers,function(b,c){if(b.featureCollection&&b.featureCollection.layers){var d=b.featureCollection.layers.length;a.forEach(b.featureCollection.layers,function(k,f){var r=!0;b.visibleLayers&&
489-1==a.indexOf(b.visibleLayers,f)&&(r=!1);k.visibility=b.visibility&&r;k.opacity=b.opacity;k.id=(b.id||"operational"+c)+"_"+f;
489b.title&&(k.title=1===d||!k.layerDefinition.name||b.title===k.layerDefinition.name?b.title:b.title+" - "+k.layerDefinition.name);e.push(k)},this)}else e.push(b)});a.forEach(b.baseMap.baseMapLayers,function(a,b){a.baseMapLayer=!0;a.id=a.id||"base"+b;s.push(a)});a.forEach(e,function(a,b){a.id=a.id||"operational"+b;s.push(a)});a.forEach(s,function(a){a.url&&!a.type&&(a.deferredsPos=
490g.length,a.errors=a.errors||[],g.push(la(a.url,a.errors)))});0===g.length?(k=k||aa(s),s=S(s,c,k,f,m),r.callback(s)):(new d(g)).addCallback(function(a){fa(a,s,c,g,r,k,f,m)});return r}function oa(b,c,d,k){var f=b.minScale,r=b.maxScale;if(10.1>=d.version&&c)for(b=c.length-1;0<=b;b--){if(c[b].id==k)if(0==f&&0<c[b].minScale?f=c[b].minScale:0<f&&0==c[b].minScale?f=d.minScale:0<f&&0<c[b].minScale&&(f=Math.min(f,c[b].minScale)),r=Math.max(d.maxScale||0,c[b].maxScale||0),d.setScaleRange(f,r),-1<c[b].parentLayerId)k=
491c[b].parentLayerId;else break}else 10.1<d.version&&(a.forEach(b.layerInfos,function(a){a.id==k&&(0==f&&0<a.minScale?f=a.minScale:0<f&&0==a.minScale||0<f&&0<a.minScale&&(f=Math.min(f,a.minScale)),r=Math.max(r||0,a.maxScale||0))}),d.setScaleRange(f,r))}function pa(b,c,d,k){var f=b.url,r=b.__popupIds,m=b.__popupUrls,s=b.__popupWhereClauses,g=b.__popupMinScales,u=b.__popupMaxScales,h=b.__resourceInfo,l=[];a.forEach(b.__popups,function(k,v){if(k){var q,x=[];a.forEach(k.fieldInfos,function(a){"shape"!==
492a.fieldName.toLowerCase()&&x.push(a.fieldName)});if(b.dynamicLayerInfos&&0<b.dynamicLayerInfos.length){var n=a.filter(b.dynamicLayerInfos,function(a){return r[v]==a.id})[0].source;
492q=new E(f+"/dynamicLayer",{id:b.id+"_"+r[v],source:n,outFields:x,mode:E.MODE_SELECTION,infoTemplate:k&&new d(k),drawMode:!1,visible:b.visible,autoGeneralize:!0});var w=function(a,d){0<s[a].length&&d.setDefinitionExpression(s[a]);if(!t.isDefined(g[a])&&!t.isDefined(u[a]))oa(b,c||h.layers,d,r[a]);else if(t.isDefined(b.minScale)||
493t.isDefined(b.maxScale)){var k=b.minScale,f=b.maxScale;0==k&&0<g[a]?k=g[a]:0<k&&0==g[a]||0<k&&0<g[a]&&(k=Math.min(k,g[a]));f=Math.max(f||0,u[a]||0);d.setScaleRange(k,f)}else d.setScaleRange(g[a],u[a])};q.loaded?w(v,q):e.connect(q,"onLoad",function(a){w(v,q)})}else{var p=null,A=f+"/"+r[v];if(m[v].length)A=m[v];else if(c)for(n=0;n<c.length;n++)if(c[n].id===r[v]){p=c[n];break}q=new E(Q(A),{id:b.id+"_"+r[v],outFields:x,mode:E.MODE_SELECTION,infoTemplate:k&&new d(k),drawMode:!1,visible:b.visible,resourceInfo:p,
494autoGeneralize:!0});q.loaded?(0<s[v].length&&q.setDefinitionExpression(s[v]),oa(b,c||h.layers,q,r[v])):e.connect(q,"onLoad",function(a){0<s[v].length&&q.setDefinitionExpression(s[v]);oa(b,c||h.layers,a,r[v])})}l.push(q)}});0<l.length&&(e.connect(b,"onVisibilityChange",n.hitch(this,function(b,c){a.forEach(b,function(a){c?a.show():a.hide()})},l)),e.connect(k,"onLayerRemove",n.hitch(this,function(b,c,d){b.id===d.id&&a.forEach(c,function(a){k.removeLayer(a)})},b,l)));delete b.__popups;delete b.__popupIds;
495delete b.__popupUrls;delete b.__popupWhereClauses;delete b.__popupMinScales;delete b.__popupMaxScales;delete b.__resourceInfo;return l}function Sa(a){return s({url:Q(a.url+"/layers"),content:{f:"json"},callbackParamName:"callback",error:function(){}})}function Ta(b,c,k){var f=[];a.forEach(b,function(a){var b=a.__popups;b&&(1<b.length&&10<=a.version)&&(a.__deferredsPos=f.length,f.push(Sa(a)))});var r=[];0<f.length?(new d(f)).addCallback(function(d){a.forEach(b,function(a){a.__popups&&0<a.__popups.length&&
496(a.__deferredsPos||0===a.__deferredsPos?(r=r.concat(pa(a,d[a.__deferredsPos][1].layers,k,c)),delete a.__deferredsPos):r=r.concat(pa(a,null,k,c)))});c.addLayers(r)}):(a.forEach(b,function(a){a.__popups&&0<a.__popups.length&&(r=r.concat(pa(a,null,k,c)))}),c.addLayers(r))}function Ua(b){a.forEach(b,function(b){var c=b.layer;c.toJson&&(b=c.toJson(),b.featureSet&&(c.name&&-1<c.name.indexOf("Text"))&&a.forEach(b.featureSet.features,function(a,b){if(a.attributes.TEXT){var d=c.graphics[b];d.symbol.setText(a.attributes.TEXT);
497a.symbol.horizontalAlignment&&(d.symbol.align=a.symbol.horizontalAlignment);d.setSymbol(d.symbol);d.setAttributes(a.attributes)}},this))})}function Ra(b){var c=6;a.forEach(b,function(b){if(b=b.renderer)"esri.renderer.SimpleRenderer"===b.declaredClass?((b=b.symbol)&&b.xoffset&&(c=Math.max(c,Math.abs(b.xoffset))),b&&b.yoffset&&(c=Math.max(c,Math.abs(b.yoffset)))):("esri.renderer.UniqueValueRenderer"===b.declaredClass||"esri.renderer.ClassBreaksRenderer"===b.declaredClass)&&a.forEach(b.infos,function(a){(a=
498a.symbol)&&a.xoffset&&(c=Math.max(c,Math.abs(a.xoffset)));a&&a.yoffset&&(c=Math.max(c,Math.abs(a.yoffset)))})});return c}function Ha(b){var c=this,d=c.infoWindow,k=b.graphic;if(c.loaded){d.hide();d.clearFeatures();var f=[];a.forEach(c.graphicsLayerIds,function(a){if((a=c.getLayer(a))&&a instanceof E&&a.loaded&&a.visible)a.clearSelection(),a.infoTemplate&&!a.suspended&&f.push(a)});a.forEach(c.layerIds,function(a){(a=c.getLayer(a))&&(-1!==a.declaredClass.indexOf("ArcGISImageServiceLayer")&&a.loaded&&
499a.visible&&a.infoTemplate)&&f.push(a)});k=k&&k.getInfoTemplate()?k:null;if(f.length||k){var r=Ra(f),m=b.screenPoint,s=c.toMap(new x(m.x-r,m.y+r)),r=c.toMap(new x(m.x+r,m.y-r)),s=new v(s.x,s.y,r.x,r.y,c.spatialReference),g=new D;g.geometry=s;g.timeExtent=c.timeExtent;var e=!0,s=a.map(f,function(a){var c;-1!==a.declaredClass.indexOf("ArcGISImageServiceLayer")?(g.geometry=b.mapPoint,e=!1,c=a.queryVisibleRasters(g,{rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0}),c.addCallback(function(){return a.getVisibleRasters()})):
500(c=a.selectFeatures(g),c.addCallback(function(){return a.getSelectedFeatures()}));return c});k&&(r=new l,r.callback([k]),s.splice(0,0,r));if(!a.some(s,function(a){return-1===a.fired})){var u=k?1:0;a.forEach(f,function(a){u=-1!==a.declaredClass.indexOf("ArcGISImageServiceLayer")?u+a.getVisibleRasters().length:u+a.getSelectedFeatures().length});if(!u)return}d.setFeatures(s);d.show(b.mapPoint,{closestFirst:e})}}}
500function sb(a,b){var d=b.mapOptions||{},k;d.infoWindow||(k=new G({visibleWhenEmpty:!1},c.create("div")),
501d.infoWindow=k);!t.isDefined(d.showInfoWindowOnClick)&&!b.usePopupManager&&(d.showInfoWindowOnClick=!1);d=new r(a,d);e.connect(d,"onLayersAddResult",Ua);return d}function ka(b,c,d,k,f,r){var m,s,g,u;k.map?(m=k.map,s=k.clickEventHandle,g=k.clickEventListener,u=k.errors):(m=sb(k,f),!f.ignorePopups&&(!f.disableClickBehavior&&!f.usePopupManager)&&(s=e.connect(m,"onClick",Ha),g=Ha));m.addLayers(b);!f.ignorePopups&&!f.usePopupManager&&Ta(b,m,f._clazz);var h=u||[];a.forEach(c,function(a){a.errors&&(h=h.concat(a.errors))},
502this);m.loaded?r.callback({map:m,itemInfo:d,errors:h,clickEventHandle:s,clickEventListener:g}):e.connect(m,"onLoad",function(){r.callback({map:m,itemInfo:d,errors:h,clickEventHandle:s,clickEventListener:g})})}function qa(b,c,d,k,f){var r=[];a.forEach(f,function(b){n.isArray(b.layerObject)?a.forEach(b.layerObject,function(a){r.push(a)}):r.push(b.layerObject)});if("BingMapsAerial"===f[0].type||"BingMapsRoad"===f[0].type||"BingMapsHybrid"===f[0].type)var m=setInterval(function(){if(f[0].layerObject&&
503f[0].layerObject.loaded)clearInterval(m),Va(b,c,d,k,f,r);else if(f[0].errors){clearInterval(m);var a="";f[0].errors&&f[0].errors.length&&(a=" ("+f[0].errors[0].message+")");k.errback(Error(I.arcgis.utils.baseLayerError+a))}},10);else if(!r[0]&&f[0].baseMapLayer){var s="";f[0].errors&&f[0].errors.length&&(s=" ("+f[0].errors[0].message+")");k.errback(Error(I.arcgis.utils.baseLayerError+s))}else Va(b,c,d,k,f,r)}function Va(b,c,d,f,r,s){try{var g=d.mapOptions||{};d.mapOptions=g;var e=b.item;s=a.filter(s,
504t.isDefined);if(e)if(e.extent&&e.extent.length)if(g.extent)ka(s,r,b,c,d,f);else{var u=new v(e.extent[0][0],e.extent[0][1],e.extent[1][0],e.extent[1][1],new k({wkid:4326})),h=s[0].spatialReference;4326===h.wkid?(g.extent=u,ka(s,r,b,c,d,f)):102100===h.wkid||102113===h.wkid||3857===h.wkid?(u.xmin=Math.max(u.xmin,-180),u.xmax=Math.min(u.xmax,180),u.ymin=Math.max(u.ymin,-89.99),u.ymax=Math.min(u.ymax,89.99),g.extent=z.geographicToWebMercator(u),ka(s,r,b,c,d,f)):d.geometryServiceURL||m.defaults.geometryService?
505(d.geometryServiceURL?new A(d.geometryServiceURL):m.defaults.geometryService).project([u],h,function(a){a=a[0];g.extent=g.extent||a;ka(s,r,b,c,d,f)},function(){ka(s,r,b,c,d,f)}):f.errback(Error(I.arcgis.utils.geometryServiceError))}else ka(s,r,b,c,d,f);else ka(s,r,b,c,d,f)}catch(l){f.errback(l)}}function tb(b){var c=[];a.forEach(b.operationalLayers,function(a){a.featureCollection?c.push({featureCollection:a.featureCollection,visibility:a.visibility,title:a.title}):a.layerObject&&c.push({layer:a.layerObject,
506visibility:a.visibility,title:a.title})});return c}function Wa(b){var c=[];b=b.baseMap.baseMapLayers.concat(b.operationalLayers);a.forEach(b,function(b){var d={};if(b.featureCollection&&"CSV"!==b.type)!0===b.featureCollection.showLegend&&a.forEach(b.featureCollection.layers,function(a){!1!==a.showLegend&&(d={layer:a.layerObject,title:b.title,defaultSymbol:a.renderer&&a.renderer.defaultSymbol&&a.renderer.defaultLabel?!0:!1},1<b.featureCollection.layers.length&&(d.title+=" - "+a.layerDefinition.name),
507c.push(d))});else if(b.baseMapLayer&&!0===b.showLegend&&b.layerObject||!b.baseMapLayer&&!1!==b.showLegend&&b.layerObject&&!(b.layerObject instanceof E&&b.layerObject.mode===E.MODE_SELECTION)){var k=b.layerObject.renderer,f=b.layerObject.declaredClass,k=!k||k&&k.defaultSymbol&&k.defaultLabel?!0:!1;if(10.1>b.layerObject.version&&("esri.layers.ArcGISDynamicMapServiceLayer"===f||"esri.layers.ArcGISTiledMapServiceLayer"===f)||"esri.layers.ArcGISImageServiceLayer"===f)k=!0;d={layer:b.layerObject,title:b.title,
508defaultSymbol:k};b.layers&&(f=a.map(a.filter(b.layers,function(a){return!1===a.showLegend}),function(a){return a.id}),f.length&&(d.hideLayers=f));c.push(d)}});return c}function ub(c,d){function k(b,c){a.forEach(b,function(a,b){switch(a){case ra:Ya=c[b];break;case sa:Za=c[b];break;case ta:$a=c[b];break;case Ka:ab=c[b];break;case ua:bb=c[b];break;case La:cb=c[b];break;case va:db=c[b];break;case Ma:eb=c[b];break;case wa:fb=c[b];break;case xa:gb=c[b];break;case ya:hb=c[b];break;case Na:ib=c[b];break;
509case za:jb=c[b];break;case Aa:lb=c[b];break;case Ba:kb=c[b];break;case Ca:rb=c[b];break;case Oa:pb=c[b];break;case Pa:Ja=c[b];break;case Da:qb=c[b];break;case Ea:ia=c[b];break;case Fa:ob=c[b];break;case Ga:nb=c[b];break;case Qa:mb=c[b]}})}var f=new l,r=c.itemData,m=[];r.baseMap&&r.baseMap.baseMapLayers&&(m=m.concat(r.baseMap.baseMapLayers));r.operationalLayers&&(m=m.concat(r.operationalLayers));for(var r=a.map(m,function(a){return a&&a.layerType}),s=[],g=[],m=!1,e=0;e<r.length;e++){switch(r[e]){case "ArcGISFeatureLayer":-1===
510a.indexOf(s,ya)&&s.push(ya);break;case "ArcGISImageServiceLayer":case "ArcGISTiledImageServiceLayer":-1===a.indexOf(s,sa)&&(s.push(sa),g.pu
510sh(wa),g.push(za),g.push(Ba));break;case "ArcGISImageServiceVectorLayer":-1===a.indexOf(s,ta)&&(s.push(ta),g.push(wa),g.push(za),g.push(Ba));break;case "ArcGISMapServiceLayer":case "ArcGISTiledMapServiceLayer":-1===a.indexOf(s,ra)&&(s.push(ra),g.push(La),g.push(Ma),g.push(Na));break;case "ArcGISStreamLayer":-1===a.indexOf(s,Ca)&&s.push(Ca);break;case "BingMapsAerial":case "BingMapsHybrid":case "BingMapsRoad":-1===
511a.indexOf(s,Ea)&&s.push(Ea);break;case "CSV":-1===a.indexOf(s,ua)&&(s.push(ua),g.push(Ka));break;case "GeoRSS":-1===a.indexOf(s,va)&&s.push(va);break;case "KML":-1===a.indexOf(s,xa)&&s.push(xa);break;case "OpenStreetMap":-1===a.indexOf(s,Aa)&&s.push(Aa);break;case "VectorTileLayer":-1===a.indexOf(s,Da)&&(s.push(Da),b("ie")||g.push(Pa));break;case "WebTiledLayer":-1===a.indexOf(s,Fa)&&(s.push(Fa),g.push(Oa));break;case "WMS":-1===a.indexOf(s,Ga)&&(s.push(Ga),g.push(Qa));break;default:m=!0}if(m)break}m&&
512(s=vb,g=wb);s.length?p(s,function(){k(s,arguments);g.length?p(g,function(){k(g,arguments);f.resolve()}):f.resolve()}):f.resolve();return f}function Xa(b,c,d,k){var f=k.itemData,r=c.layerMixins,m=r&&r.length;if(m){var s=function(a){for(var b=0;b<m;b++){var c=r[b];if(c.mixin)if(c.hasOwnProperty("id")){if(a.id===c.id){n.mixin(a,c.mixin);break}}else if(a.url===c.url){n.mixin(a,c.mixin);break}}};a.forEach(f.baseMap&&f.baseMap.baseMapLayers,s);a.forEach(f.operationalLayers,s)}ub(k,c).then(function(){return N(k,
513c)}).then(function(){return M(k,c)}).then(function(c){var k=c[0],f=c[1];if(!k.itemData.operationalLayers||0===k.itemData.operationalLayers.length)K(k,f).addCallback(function(a){ha(a.itemData,f).addCallback(n.hitch(null,qa,a,b,f,d))});else{var r=new l,m=k.itemData.baseMap.baseMapLayers.slice(),s=a.filter(k.itemData.baseMap.baseMapLayers,function(a){return!a.isReference});c={item:k.item,itemData:{baseMap:{baseMapLayers:s}}};k.itemData.baseMap.baseMapLayers=a.filter(k.itemData.baseMap.baseMapLayers,
514function(a){return a.isReference});K(c,f).addCallback(function(a){ha(a.itemData,f).addCallback(n.hitch(null,qa,a,b,f,r))});r.then(function(a){K(k,f).addCallback(function(b){ha(b.itemData,f,a.map.spatialReference,s,a.map).addCallback(function(c){b.itemData.baseMap.baseMapLayers=m;qa(b,a,f,d,c)})})},n.hitch(d,d.errback))}})}function Ia(a,b){"undefined"===typeof b&&(b=!0);ea._arcgisUrl&&0<ea._arcgisUrl.length&&(ea.arcgisUrl=ea._arcgisUrl);var c=ea.arcgisUrl+"/"+a,d={},k=new l;s({url:c,content:{f:"json"},
515callbackParamName:"callback",load:function(a){d.item=a;b?s({url:c+"/data",content:{f:"json"},callbackParamName:"callback",load:function(a){d.itemData=a;k.callback(d)},error:function(a){k.errback(a)}}):k.callback(d)},error:function(a){k.errback(a)}});return k}var ea,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,lb,kb,rb,pb,Ja,qb,ia,ob,nb,mb,ra="../layers/ArcGISDynamicMapServiceLayer",sa="../layers/ArcGISImageServiceLayer",ta="../layers/ArcGISImageServiceVectorLayer",Ka="./csv",ua="../layers/CSVLayer",La=
516"../layers/DynamicLayerInfo",va="../layers/GeoRSSLayer",Ma="../layers/ImageParameters",wa="../layers/ImageServiceParameters",xa="../layers/KMLLayer",ya="../layers/LabelClass",Na="../layers/LayerDrawingOptions",za="../layers/MosaicRule",Aa="../layers/OpenStreetMapLayer",Ba="../layers/RasterFunction",Ca="../layers/StreamLayer",Oa="../layers/TileInfo",Pa="../layers/vector-tile",Da="../layers/VectorTileLayer",Ea="../virtualearth/VETiledLayer",Fa="../layers/WebTiledLayer",Ga="../layers/WMSLayer",Qa="../layers/WMSLayerInfo",
517vb=[ra,sa,ta,ua,va,xa,ya,Aa,Ca,Da,Ea,Fa,Ga],wb=[Ka,La,Ma,wa,Na,za,Ba,Oa,Pa,Qa];ea={arcgisUrl:location.protocol+"//www.arcgis.com/sharing/rest/content/items",getItem:Ia,createMap:function(a,b,c){var d=new l;c=c||{};var k=c.infoTemplateClass;c._clazz=k&&(n.isObject(k)?k:n.getObject(k))||B;n.isString(a)?Ia(a).addCallback(n.hitch(null,Xa,b,c,d)).addErrback(n.hitch(d,d.errback)):Xa(b,c,d,a);return d},getLayerList:function(a){return a&&a.itemInfo&&a.itemInfo.itemData?tb(a.itemInfo.itemData):[]},getLegendLayers:function(a){return a&&
518a.itemInfo&&a.itemInfo.itemData?Wa(a.itemInfo.itemData):[]},_arcgisUrl:null,_getItemProps:K,_getItemData:H,_getBingKey:L,_portalUrlResponse:T,_portalUrlFailure:O,_processFSItemProperties:J,_processSSItemProperties:F,_getLayers:ha,_preBuildLayerObjects:fa,_buildLayerObjects:S,_preCreateMap:qa,_getMapSR:aa,_createMap:ka,_addSelectionLayers:Ta,_createSelectionFeatureLayers:pa,_getServiceInfo:la,_getFeatureCollectionItem:ga,_mergeFeatureCollectionItem:ma,_projectFeatureCollection:ja,_getLayersInfo:Sa,
519_initLayer:$,_loadAsCached:P,_loadAsDynamic:Z,_processPopups:Y,_onLayersAddResult:Ua,_sameSpatialReferenceAsBasemap:W,_sameTilingSchemeAs
519Basemap:V,_showPopup:Ha,_calculateClickTolerance:Ra,_getVisibleFeatureLayers:ca,_updateLayerScaleInfo:oa,_checkUrl:Q,_isHostedService:R,_isAgolService:ba,_getLegendLayers:Wa};n.setObject("arcgis.utils",ea,f);return ea})},"esri/graphic":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ./kernel ./domUtils ./lang ./InfoTemplate ./geometry/jsonUtils ./symbols/jsonUtils".split(" "),
520function(p,n,a,e,l,h,q,g,d){p=p(null,{declaredClass:"esri.Graphic",constructor:function(a,b,f,m){a&&!a.declaredClass?(this.geometry=a.geometry?g.fromJson(a.geometry):null,this.symbol=a.symbol?d.fromJson(a.symbol):null,this.attributes=a.attributes||null,this.infoTemplate=a.infoTemplate?new q(a.infoTemplate):null):(this.geometry=a,this.symbol=b,this.attributes=f,this.infoTemplate=m)},_shape:null,_graphicsLayer:null,_visible:!0,visible:!0,getDojoShape:function(){return this._shape},getShapes:function(){var a=
521[];this._shape&&a.push(this._shape);this._bgShape&&a.push(this._bgShape);return a},getNode:function(){var a=this._shape&&this._shape.getNode();return a&&a.nodeType?a:null},getNodes:function(){var a=this.getShapes(),b,d,m=a.length,g=[];for(d=0;d<m;d++)(b=a[d]&&a[d].getNode())&&b.nodeType&&g.push(b);return g},getLayer:function(){return this._layer},draw:function(){var a=this._graphicsLayer;a&&a._draw(this,!0);return this},setGeometry:function(a){this.geometry=a;if(a=this._graphicsLayer)a._updateExtent(this),
522a._draw(this,!0);return this}
522,setSymbol:function(a,b){var d=this._graphicsLayer,m=this._shape;this.symbol=a;d&&(b&&m&&d._removeShape(this),d._draw(this,!0));return this},setAttributes:function(a){this.attributes=a;return this},setInfoTemplate:function(a){this.infoTemplate=a;return this},getInfoTemplate:function(){return this._getEffInfoTemplate()},_getEffInfoTemplate:function(){var a=this.getLayer();return this.infoTemplate||a&&a.infoTemplate},getTitle:function(){var a=this.getInfoTemplate(),b=a&&
523a.title;if(n.isFunction(b))b=b.call(a,this);else if(n.isString(b))var d=(a=this.getLayer())&&a._getDateOpts,b=h.substitute(this.attributes,b,{first:!0,dateFormat:d&&d.call(a)});return b},getContent:function(){var a=this.getInfoTemplate(),b=a&&a.content;if(n.isFunction(b))b=b.call(a,this);else if(n.isString(b))var d=(a=this.getLayer())&&a._getDateOpts,b=h.substitute(this.attributes,b,{dateFormat:d&&d.call(a)});return b},attr:function(a,b){var d=this.getNodes(),m,g=d.length;for(m=0;m<g;m++)null==b?
524d[m].removeAttribute(a):d[m].setAttribute(a,b);return this},show:function(){this.visible=this._visible=!0;var a,b,d;if(this.getShapes().length){a=this.getNodes();d=a.length;this.attr("data-hidden");for(b=0;b<d;b++)l.show(a[b])}else this._graphicsLayer&&this._graphicsLayer._draw(this,!0);return this},hide:function(){this.visible=this._visible=!1;var a=this._graphicsLayer,b,d;if(a)if("canvas-2d"===a.surfaceType)a._removeShape(this);else if(a=this.getNodes(),d=a.length){this.attr("data-hidden","");for(b=
5250;b<d;b++)l.hide(a[b])}return this},toJson:function(){var a={};this.geometry&&(a.geometry=this.geometry.toJson());this.attributes&&(a.attributes=n.mixin({},this.attributes));this.symbol&&(a.symbol=this.symbol.toJson());this.infoTemplate&&(a.infoTemplate=this.infoTemplate.toJson());return a}});p.prototype.getShape=p.prototype.getDojoShape;a("extend-esri")&&(e.Graphic=p);return p})},"esri/PluginTarget":function(){define("require dojo/aspect dojo/_base/array dojo/_base/lang dojo/Deferred dojo/when".split(" "),
526function(p,n,a,e,l,h){function q(){n.after(this.constructor._meta,"ctor",this._pluginsHandler,!0);this._plugins={}}q.prototype={addPlugin:function(a,d){var c=this,b=this._plugins,f=new l;try{p([a],function(m){a in b?f.resolve({id:b[a].declaredId||a.replace(/\//g,".")}):(b[a]=m,h(m.add(c,d),function(){var b={id:m.declaredId||a.replace(/\//g,".")};c.emit("plugin-add",b);f.resolve(b)},function(a){f.reject(a)}))})}catch(m){f.reject(m)}return f.promise},removePlugin:function(a){if(a in this._plugins){var d=
527this._plugins[a];d.remove(this);delete this._plugins[a];this.emit("plugin-remove",{id:d.declaredId||a.replace(/\//g,".")})}},_pluginsHandler:function(){var g=this;a.some(arguments,function(a){if(a&&a.plugins&&a.plugins instanceof Array){a=a.plugins;var c,b,f;for(f=0;f<a.length;f++)c=a[f],b=c instanceof Object?c.id:c,g.addPlugin(b,c.options);return!0}})}};return q})},"esri/layers/GraphicsLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/dom dojox/gfx dojox/gfx/matrix ./gfxSniff!esri-svg?dojox/gfx/filters ./layer ../kernel ../lang ../sniff ../Color ../domUtils ../symbols/MarkerSymbol ../symbols/SimpleMarkerSymbol ../geometry/Point ../geometry/ScreenPoint ../geometry/Extent ../geometry/mathUtils ../geometry/screenUtils ../PluginTarget ./gfxSniff!esri-svg?dojox/gfx/svgext".split(" "),
528function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y,B,G){var D,A=-1!==d.renderer.toLowerCase().indexOf("svg"),C=-1!==d.renderer.toLowerCase().indexOf("canvas"),E=9>s("ie"),I=s("esri-touch");u=p(null,{declaredClass:"esri.layers._GraphicsContainer",_setMap:function(a,b){var c,k=this._connects=[];this._map=a;C?(c=h.create("div",{style:"overflow: visible; position: absolute;"},b),this._surface={getEventSource:function(){return c}},k.push(n.connect(c,"onmousedown",this,this._canvasDownHandler)),k.push(n.connect(c,
529"onmouseup",this,this._canvasUpHandler)),k.push(n.connect(c,"onclick",this,this._canvasClickHandler)),D.prototype._canvas=!0):(c=(this._surface=d.createSurface(b,a.width,a.height)).getEventSource(),q.set(c=E?c.parentNode:c,{overflow:"visible",position:"absolute"}));k.push(n.connect(a,"onResize",this,"_onResizeHandler"));return c},_onResizeHandler:function(a,b,c){a=this._surface.getEventSource();var d=this._map,k;E&&q.set(a=a.parentNode,{width:b+"px",height:c+"px",clip:"rect(0px "+b+"px "+c+"px 0px)"});
530l.set(a,"width",b);l.set(a,"height",c);this._surface.declaredClass||e.forEach(a.childNodes,function(a){l.set(a,"width",b);l.set(a,"height",c)});d.loaded&&(d.graphics.suspended||(d.graphics._resized=!0),e.forEach(d.graphicsLayerIds,function(a){k=d.getLayer(a);k.suspended||(k._resized=!0);k._updateSVGFilters(null,null,b,c)}))},_cleanUp:function(){e.forEach(this._connects,n.disconnect,n);this._map=this._surface=null},_processEvent:function(a){var b=this._map;a.screenPoint=new z(a.pageX-b.position.x,
531a.pageY-b.position.y);a.mapPoint=b.toMap(a.screenPoint)},_canvasDownHandler:function(a){this._processEvent(a);
531this._downPt=a.screenPoint.x+","+a.screenPoint.y},_canvasUpHandler:function(a){this._processEvent(a);this._upPt=a.screenPoint.x+","+a.screenPoint.y},_tolerance:15,_isPrimaryMatch:function(a,b,c,d){if(!a.visible||!b)return!1;var k=b.getTransformedBoundingBox(),f;return k?(f=new w(k[0].x,k[0].y,k[2].x,k[2].y),delete f.spatialReference,I?f.intersects(c):f.contains(d)):e.some(b.children||[],function(a){k=
532a.getTransformedBoundingBox();f=new w(k[0].x,k[0].y,k[2].x,k[2].y);delete f.spatialReference;return I?f.intersects(c):f.contains(d)})},_canvasClickHandler:function(a){if(this._downPt&&this._upPt&&this._downPt===this._upPt){this._processEvent(a);var b=this._map,c=e.map(b.graphicsLayerIds,function(a){return b.getLayer(a)});c.push(b.graphics);c.reverse();var c=e.filter(c,function(a){return a.loaded&&a._mouseEvents&&!a.suspended&&(!t.isDefined(a.opacity)||0<a.opacity)}),d=a.screenPoint,k=this._tolerance,
533f=d.x-k,r=d.y+k,m=d.x+k,k=d.y-k,s=new w(f,k,m,r),f=b.toMap(new z(f,r)),m=b.toMap(new z(m,k)),r=f.spatialReference._getInfo(),g=new w(w.prototype._normalizeX(f.x,r).x,f.y,w.prototype._normalizeX(m.x,r).x,m.y,f.spatialReference),u;delete s.spatialReference;e.some(c,function(a){a=e.filter(a.graphics,function(a){return this._isPrimaryMatch(a,a.getDojoShape(),s,d)||!(!a._bgShape||!this._isPrimaryMatch(a,a._bgShape,s,d))},this);a.reverse();if(0<a.length){var b;e.some(a,function(a){return a.geometry&&g.intersects(a.geometry)?
534(b=a,!0):!1});if(b)return u=b,!0}return!1},this);if(u&&(c=u.getLayer()))a.graphic=u,c.onClick(a)}}});D=p(f,{declaredClass:"esri.layers._GraphicsLayer",managedSuspension:!0,surfaceType:C?"canvas-2d":d.renderer,_eventMap:{"graphic-add":["graphic"],"graphic-remove":["graphic"],"renderer-change":["renderer"]},constructor:function(b,c){if(b&&(a.isString(b)||a.isObject(b)&&(b.layerDefinition||b.query)))b=c;this._params=a.mixin({displayOnPan:!0,drawMode:!0,styling:!0},b||{});var d=this._params.dataAttributes;
535"string"===typeof d&&(d=[d]);this.styling=A?this._params.styling:!0;this.dataAttributes=d;this.infoTemplate=b&&b.infoTemplate;this.graphics=[];this._draw=a.hitch(this,this._draw);this._refresh=a.hitch(this,this._refresh);this.registerConnectEvents()},getNode:function(){return this._div&&this._div.getEventSource()},setDrawMode:function(a){this._params.drawMode=a},renderer:null,_setMap:function(b,c){this.inherited(arguments);this._map=b;this._wrap=b.wrapAround180;this._srInfo=b.spatialReference._getInfo();
536this._svgFilters={};this._canvas?(c=d.createSurface(c.getEventSource(),b.width,b.height),q.set(c.rawNode,"position","absolute"),this._div=c.createGroup(),this._renderProto=this._div.constructor.prototype._render,this._div._render=a.hitch(this,this._canvasRender)):this._div=c.createGroup();this._bgGroup=this._div.createGroup();this._div.getEventSource().id=this.id+"_layer";var k=this.opacity;t.isDefined(k)&&1>k&&this.setOpacity(k,!0);return this._div},_unsetMap:function(a,b){e.forEach(this.graphics,
537function(a){a._shape=null});this._canvas?(b=this._div.getParent(),b._parent={},h.destroy(b.rawNode),b.destroy()):(this._div.clear(),b.remove(this._div),h.destroy(this._div.getEventSource()));this._map=this._div=this._svgFilters=null;clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors();this.inherited(arguments)},_onZoomStartHandler:function(){r.hide(this._div.getEventSource())},_onExtentChangeHandler:function(a,b,c,d){clearTimeout(this._wakeTimer);this._wakeTimer=null;c?
538(a=this._map.__visibleRect,b=this._div,this._evalSDRenderer(),this._refresh(!0),this._updateTransform(b,a.x,a.y,!0),this._renderProto&&b.surface.pendingRender?this._dirty=!0:this.suspended||r.show(b.getEventSource())):this._resized&&(this._refresh(!1),this._resized=!1);if(0<this.graphics.length)this.onUpdate()},_canvasRender:function(){var a=this._div;this._dirty&&(delete this._dirty,this.suspended||r.show(a.getEventSource()));return this._renderProto.apply(a,arguments)},_refresh:function(a){var b=
539this.graphics,c=b.length,d,k=this._draw;for(d=0;d<c;d++)k(b[d],a)},refresh:function(){this._refresh(!0)},redraw:function(){this._refresh(!0)},_onPanHandler:function(a,b){this._panDx=b.x;this._panDy=b.y;var c=this._map.__visibleRect;this._updateTransform(this._div,c.x+b.x,c.y+b.y)},_onPanEndUpdateHandler:function(a,b){var c=this._map.__visibleRect;!this._params._child&&(b.x!==this._panDx||b.y!==this._panDy)?this._updateTransform(this._div,c.x,c.y,!0):this._updateSVGFilters(-c.x,-c.y);this._refresh(!1);
540if(this.graphics.length)this.onUpdate()},_onPanStartHandler:function(){r.hide(this._div.getEventSource())},_onPanEndHandler:function(){var a=this._map.__visibleRect,b=this._div;this._updateTransform(b,a.x,a.y,!0);this._refresh(!1);this._renderProto&&b.surface.pendingRender?this._dirty=!0:r.show(b.getEventSource());if(this.graphics.length)this.onUpdate()},_updateTransform:function(a,b,d,k){a.setTransform(c.translate({x:b,y:d}));k&&this._updateSVGFilters(-b,-d)},onSuspend:function(){this.inherited(arguments);
541r.hide(this._div.getEventSource());clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors()},onResume:function(b){this.inherited(arguments);b.firstOccurrence&&this._evalSDRenderer();this._enableDrawConnectors();this._wakeTimer=this._wakeTimer||setTimeout(a.hitch(this,function(){this.suspended||this._onExtentChangeHandler(null,null,!0)}),0)},_enableDrawConnectors:function(){var a=this._map,b=n.connect;this._disableDrawConnectors();this._params.displayOnPan?(this._params._child||
542(this._onPanHandler_connect=b(a,"onPan",this,"_onPanHandler")),this._onPanEndHandler_connect=b(a,"onPanEnd",this,"_onPanEndUpdateHandler")):(this._onPanStartHandler_connect=b(a,"onPanStart",this,"_onPanStartHandler"),this._onPanEndHandler_connect=b(a,"onPanEnd",this,"_onPanEndHandler"));this._onZoomStartHandler_connect=b(a,"onZoomStart",this,"_onZoomStartHandler");this._onExtentChangeHandler_connect=b(a,"onExtentChange",this,"_onExtentChangeHandler")},_disableDrawConnectors:function(){var a=n.disconnect;
543a(this._onExtentChangeHandler_connect);a(this._onZoomStartHandler_connect);a(this._onPanHandler_connect);a(this._onPanStartHandler_connect);a(this._onPanEndHandler_connect);this._onExtentChangeHandler_connect=this._onZoomStartHandler_connect=this._onPanHandler_connect=this._onPanStartHandler_connect=this._onPanEndHandler_connect=null},_updateExtent:function(a){var b=a.geometry;if(b){if(!(a._extent=b.getExtent())){var c,d;if("esri.geometry.Point"===b.declaredClass)c=b.x,d=b.y;else if("esri.geometry.Multipoint"===
544b.declaredClass)c=b.points[0][0],d=b.points[0][1];else{a._extent=null;return}a._extent=new w(c,d,c,d,b.spatialReference)}}else a._extent=null},_intersects:function(a,b,c){var d=a.spatialReference,k=b.spatialReference,f=d&&k&&!d.equals(k)&&d._canProject(k)&&4326===k.wkid;if(this._wrap&&!c){c=[];var d=a._getFrameWidth(),r=this._srInfo,m=a._clip?a._getAvailExtent():a.extent,s,g,u,h,l=[];s=b._partwise;f&&(m=a.geographicExtent,r=k._getInfo());a=m._getParts(r);if(s&&s.length){b=[];k=0;for(f=s.length;k<
545f;k++)b=b.concat(s[k]._getParts(r))}else b=b._getParts(r);k=0;for(f=b.length;k<f;k++){u=b[k];r=0;for(m=a.length;r<m;r++)if(h=a[r],h.extent.intersects(u.extent)){s=0;for(g=u.frameIds.length;s<g;s++)c.push((h.frameIds[0]-u.frameIds[s])*d)}}k=0;for(f=c.length;k<f;k++)s=c[k],e.indexOf(c,s)===k&&l.push(s);return l.length?l:null}return(f?a.geographicExtent:a.extent).intersects(b)?[0]:null},_defaultMarker:{type:"simplemarkersymbol",style:"square",size:1,xoffset:0,yoffset:0,angle:0},_draw:function(a,b){if(this._params.drawMode&&
546this._map&&!this.suspended)try{var c=a._extent,d,k,f=!A||this.styling,r=A&&this.dataAttributes,m=a.getDojoShape(),s;if(a.visible&&c&&(d=this._intersects(this._map,c,a.geometry._originOnly))&&(k=f?this._getSymbol(a):this._defaultMarker)){if(!a._offsets||a._offsets.join(",")!==d.join(",")?a._offsets=d:s=!0,!m||b||!s){var g=a.geometry.type,c={graphic:a},e=a._bgShape,u=f&&!a.symbol?this._getRenderer(a):null,h=u&&u.backgroundFillSymbol;if("point"===g)this._isInvalidShape(k,m)&&this._removeShape(a),a._shape=
547this._drawPoint(this._div,a.geometry,k,a.getDojoShape(),d,u,a),f&&this._symbolizePoint(a.getDojoShape(),k,u,a);else if("multipoint"===g)this._drawMarkers(a,k,d,u),f&&this._symbolizeMarkers(a,k,u);else{var l,g=k,t,v;f&&(g=(l="simplemarkersymbol"===k.type||"picturemarkersymbol"===k.type||"textsymbol"===k.type?k:null)?h:k);g&&g===h&&(t=this._bgGroup);e&&!t&&this._removeBgShape(a);g&&(!t&&this._isInvalidShape(g,a._shape)&&this._removeShape(a,!1),v=this._drawShape(a,d,t||this._div,t?e:a.getDojoShape()),
548f&&this._symbolizeShape(v,g,u,!!h,a),a[t?"_bgShape":"_shape"]=v);if(l){this._isInvalidShape(l,a._shape)&&this._removeShape(a,!1);var q=a.geometry.getCentroid();(v=q&&this._drawPoint(this._div,q,l,a._shape,d,u,a))&&this._symbolizePoint(v,l,u,a);a._shape=v}}C||(a._bgShape&&this._initNode(a,a._bgShape,a._bgShape!==e,c,r),a._shape&&this._initNode(a,a._shape,a._shape!==m,c,r));c.node=a.getNode();this.onGraphicDraw(c)}}else m&&this._removeShape(a)}catch(x){this._errorHandler(x,a)}},_initNode:function(a,
549b,c,d,k){if(b=b&&b.getNode())b.e_graphic=a,this._addDataAttrs(a,k,b),c&&
549(d.node=b,this.onGraphicNodeAdd(d))},_removeShape:function(a,b){var c=a.getDojoShape(),d=c&&c.getNode();c&&(c.removeShape(),c.destroy());a._shape=a._offsets=null;!1!==b&&this._removeBgShape(a);if(d&&(d.e_graphic=null,!C))this.onGraphicNodeRemove({graphic:a,node:d})},_removeBgShape:function(a){var b=a._bgShape,c=b&&b.getNode();b&&(b.removeShape(),b.destroy(),a._bgShape=null);if(c&&(c.e_graphic=null,!C))this.onGraphicNodeRemove({graphic:a,
550node:c})},_addDataAttrs:function(a,b,c){var d=a.attributes,k,f=b?b.length:0,r=this._getRenderer(a);if(c&&d){for(k=0;k<f;k++)(c=b[k])&&a.attr("data-"+c,d[c]);!this.styling&&r&&(r.getBreakIndex?(b=r.getBreakIndex(a),a.attr("data-class-break",-1!==b?b:null)):r.getUniqueValueInfo&&(b=r.getUniqueValueInfo(a),a.attr("data-unique-value",b?b.value:null)))}},_drawShape:function(a,b,c,d){a=a.geometry;var k=a.type,f=this._map,r=f.extent,m=f.width,s=f.height,f=f.__visibleRect,g=[],e,u;e="extent"===k;if("rect"===
551k||e)g={x:0,y:0,spatialReference:a.spatialReference},g.x=e?a.xmin:a.x,g.y=e?a.ymax:a.y,k=B.toScreenPoint(r,m,s,g),g.x=e?a.xmax:a.x+a.width,g.y=e?a.ymin:a.y+a.height,a=B.toScreenPoint(r,m,s,g),b={x:k.x-f.x+b[0],y:k.y-f.y,width:Math.abs(a.x-k.x),height:Math.abs(a.y-k.y)},0===b.width&&(b.width=1),0===b.height&&(b.height=1),d=this._drawRect(c,d,b);else if("polyline"===k||"polygon"===k){e=0;for(u=b.length;e<u;e++)g=g.concat(B._toScreenPath(r,m,s,a,-f.x+b[e],-f.y));d=this._drawPath(c,d,g);this._rendererLimits&&
552("polyline"===k?this._clipPolyline(d,a):this._clipPolygon(d,a))}return d},_drawRect:function(a,b,c){return b?b.setShape(c):a.createRect(c)},_drawImage:function(a,b,c){return b?b.setShape(c):a.createImage(c)},_drawCircle:function(a,b,c){return b?b.setShape(c):a.createCircle(c)},_drawPath:function(){return E?function(a,b,c,k){c=k?c:c.join(" ");if(b)return b.setShape(c);b=a.createObject(k?d.Path:d.EsriPath,c);a._overrideSize(b.getEventSource());return b}:function(a,b,c,d){c=d?c:c.join(" ");return b?
553b.setShape(c):a.createPath(c)}}(),_drawText:function(a,b,c){return b?b.setShape(c):a.createText(c)},_evalSDRenderer:function(a){var b=this._map,c=this.renderer,d,k=this._rndForScale;b&&(b.loaded&&c&&c.getRendererInfo)&&(d="zoom"===c.rangeType?c.getRendererInfoByZoom(b.getZoom()):c.getRendererInfoByScale(b.getScale()));this._rndForScale=d&&d.renderer;!a&&this._rndForScale!=k&&this.emit("renderer-change",{renderer:this._rndForScale})},_getRenderer:function(a){var b=this._rndForScale||this.renderer;
554a&&(b&&b.getObservationRenderer)&&(b=b.getObservationRenderer(a));return b},_getSymbol:function(a){var b=this._getRenderer();return a.symbol||b&&b.getSymbol(a)},_getVariable:function(a,b,c){var d;a&&(d=(a=a.getVisualVariablesForType(b,c))&&a[0]);return d},_applyOpacity:function(a,b,c,d){b=b.getOpacity(d,{opacityInfo:c});null!=b&&(a=new k(a),a.a=b);return a},_symbolizeShape:function(b,c,d,k,f){var r=c.getStroke(),m=c.getFill(),s=c.type,g,e,u=this._getVariable(d,"sizeInfo",!1),h=this._getVariable(d,
555"colorInfo",!1),l=this._getVariable(d,"opacityInfo",!1),t=-1!==s.indexOf("linesymbol");c=t?"none"!==c.style:c.outline&&"none"!==c.outline.style;var v=t?null:this._getVariable(d,"sizeInfo","outline"),u=(u=k?v:v||u)?d.getSize(f,{sizeInfo:u,resolution:this._map.getResolutionInMeters(),scale:this._map.getScale()}):null;k&&(h=l=null);if((h||l)&&"picturefillsymbol"!==s)t?(g=r&&r.color,h&&(g=d.getColor(f,{colorInfo:h})||g),g&&l&&(g=this._applyOpacity(g,d,l,f))):m&&m.toCss&&(e=m,h&&(e=d.getColor(f,{colorInfo:h})||
556e),e&&l&&(e=this._applyOpacity(e,d,l,f)));b.setStroke(!c||null==u&&!g?r:a.mixin({},r,null!=u?{width:u}:null,g&&{color:g})).setFill(e||m)},_smsToPath:function(){return E?function(a,b,c,d,k,f,r,m,s){switch(b){case a.STYLE_SQUARE:return["M",k+","+r,"L",f+","+r,f+","+m,k+","+m,"X","E"];case a.STYLE_CROSS:return["M",c+","+r,"L",c+","+m,"M",k+","+d,"L",f+","+d,"E"];case a.STYLE_X:return["M",k+","+r,"L",f+","+m,"M",k+","+m,"L",f+","+r,"E"];case a.STYLE_DIAMOND:return["M",c+","+r,"L",f+","+d,c+","+m,k+","+
557d,"X","E"];case a.STYLE_TARGET:return["M",k+","+r,"L",f+","+r,f+","+m,k+","+m,k+","+r,"M",k-s+","+d,"L",k+","+d,"M",c+","+(r-s),"L",c+","+r,"M",f+s+","+d,"L",f+","+d,"M",c+","+(m+s),"L",c+","+m,"E"]}}:function(a,b,c,d,k,f,r,m,s){switch(b){case a.STYLE_SQUARE:return["M",k+","+r,f+","+r,f+","+m,k+","+m,"Z"];case a.STYLE_CROSS:return["M",c+","+r,c+","+m,"M",k+","+d,f+","+d];case a.STYLE_X:return["M",k+","+r,f+","+m,"M",k+","+m,f+","+r];case a.STYLE_DIAMOND:return["M",c+","+r,f+","+d,c+","+m,k+","+d,
558"Z"];case a.STYLE_TARGET:return["M",k+","+r,f+","+r,f+","+m,k+","+m,k+","+r,"M",k-s+","+d,k+","+d,"M",c+","+(r-s),c+","+r,"M",f+s+","+d,f+","+d,"M",c+","+(m+s),c+","+m]}}}(),_pathStyles:{square:1,cross:1,x:1,diamond:1,target:1}
558,_typeMaps:{picturemarkersymbol:"image",picturefillsymbol:"path",simplefillsymbol:"path",simplelinesymbol:"path",cartographiclinesymbol:"path",textsymbol:"text"},_isInvalidShape:function(a,b){var c=b&&b.shape&&b.shape.type,d=a&&a.type,k=a&&a.style;"rect"===c&&(c="path");d&&
559(k=this._typeMaps[d]||k);this._pathStyles[k]&&(k="path");return"shieldlabelsymbol"===d?!0:!(!c||!(k&&c!==k))},_drawPoint:function(a,b,d,k,f,r,m){var s=d.type,g=this._map,e=g.__visibleRect,u=B.toScreenPoint(g.extent,g.width,g.height,b).offset(-e.x+f[0],-e.y),e=u.x,h=u.y,l;b=[];var t,v=this._getVariable(r,"rotationInfo",!1),v=v?r.getRotationAngle(m,{rotationInfo:v}):null,q=this._getVariable(r,"sizeInfo",!1),g=q?r.getSize(m,{sizeInfo:q,shape:d.style,resolution:g.getResolutionInMeters(),scale:g.getScale()}):
560null;v&&b.push(c.rotategAt(v,u));if(0!==d.xoffset||0!==d.yoffset)t=c.translate(d.xoffset,-d.yoffset),b.push(t);0!==d.angle&&b.push(c.rotategAt(d.angle,u));if("simplemarkersymbol"===s)switch(l=d.style,r=Math.round,g=null!=g?g:d.size,l){case x.STYLE_SQUARE:case x.STYLE_CROSS:case x.STYLE_X:case x.STYLE_DIAMOND:d=isNaN(g)?16:g/2;l=this._drawPath(a,k,this._smsToPath(x,l,e,h,r(e-d),r(e+d),r(h-d),r(h+d)));break;case x.STYLE_TARGET:m=d._targetWidth/2;u=d._targetHeight/2;l=this._drawPath(a,k,this._smsToPath(x,
561l,e,h,r(e-m),r(e+m),r(h-u),r(h+u),d._spikeSize));break;case x.STYLE_PATH:l=this._drawPath(a,k,d.path,!0);d=l.getBoundingBox();a=this._getScaleMatrix(d,g);(1!==a.xx||1!==a.yy)&&b.push(c.scaleAt(a.xx,a.yy,u));b.push(c.translate(-(d.x+d.width/2)+e,-(d.y+d.height/2)+h));break;default:d=isNaN(g)?16:g/2,l=this._drawCircle(a,k,{cx:e,cy:h,r:d})}else if("shieldlabelsymbol"===s)l=d.width,u=d.height,k=a.createGroup(),l=a.createImage({x:e-l/2,y:h-u/2,width:l,height:u,src:d.url}),k.add(l),null!=d.font&&(h+=0.2*
562d.getHeight(),a=a.createText({type:"text",text:d.text,x:e,y:h,align:"middle",decoration:d.decoration,rotated:d.rotated,kerning:d.kerning}),a.setFont(d.font),a.setFill(d.color),k.add(a)),l=k;else if("picturemarkersymbol"===s){if(null==g?(l=d.width,u=d.height):(u=g,l=u*(d.width/d.height),t&&(null!=t.dx&&(t.dx=l*(t.dx/d.width)),null!=t.dy&&(t.dy=u*(t.dy/d.height)))),l=this._drawImage(a,k,{x:e-l/2,y:h-u/2,width:l,height:u,src:d.url}),A&&(a=l.getNode()))d=(d=this._getVariable(r,"opacityInfo",!1))?r.getOpacity(m,
563{opacityInfo:d}):null,null!=d?a.setAttribute("opacity",d):a.setAttribute("opacity",1)}else"textsymbol"===s&&(r=d.font,null!=g&&r&&(r=new r.constructor(r.toJson()),r.setSize(g)),l=this._drawText(a,k,{type:"text",text:d.text,x:e,y:h,align:d.getSVGAlign(),decoration:d.decoration||r&&r.decoration,rotated:d.rotated,kerning:d.kerning}),r&&l.setFont(r),A&&(a=l.getNode(),e=d.getSVGBaseline(),h=d.getSVGBaselineShift(),a&&(a.setAttribute("dominant-baseline",e),h&&a.setAttribute("baseline-shift",h),this._applyHalo(l,
564d.haloColor,d.haloSize))));l.setTransform(c.multiply(b));l._wrapOffsets=f;return l},_applyHalo:function(a,b,c){var d=b&&c?this._getHaloId(b,c):null;a.setFilter(b&&c?s("webkit")||s("ff")?this._getDilateFilter(b,c,d):this._getOffsetFilter(b,c,d):null)},_getDilateFilter:function(a,c,d){var k=this._getSVGFilter(d);
564k||(k=this._createSVGFilter({id:d},[b.feMorphology({operator:"dilate",radius:c,result:"dilated"}),b.feFlood({"flood-color":a.toCss(!0)}),b.feComposite({in2:"dilated",operator:"in",result:"composite"}),
565b.feMerge("composite","SourceGraphic")]));return k},_getOffsetFilter:function(a,c,d){var k=this._getSVGFilter(d);if(!k){a=a.toCss(!0);var k=this._offsetPrimitives,f,r=k.length,m=[],s=[];for(f=0;f<r;f++){var g=k[f],e="offset"+g.dir,u="composite"+g.dir;s.push(u);m.push(b.feOffset({dx:g.dx*c,dy:g.dy*c,"in":"SourceAlpha",result:e}),b.feFlood({"flood-color":a}),b.feComposite({in2:e,operator:"in",result:u}))}s.push("SourceGraphic");m.push(b.feMerge.apply(b.feMerge,s));k=this._createSVGFilter({id:d},m)}return k},
566_offsetPrimitives:[{dir:"L",dx:-1,dy:0},{dir:"TL",dx:-1,dy:-1},{dir:"T",dx:0,dy:-1},{dir:"TR",dx:1,dy:-1},{dir:"R",dx:1,dy:0},{dir:"BR",dx:1,dy:1},{dir:"B",dx:0,dy:1},{dir:"BL",dx:-1,dy:1}],_getHaloId:function(a,b){return"halo_"+this._map.id+"_"+this.id+"_"+a.r+"_"+a.g+"_"+a.b+"_"+a.a+"_"+b},_getSVGFilter:function(a){return this._svgFilters[a]},_createSVGFilter:function(a,c){var d=b.createFilter(a,c),k=this._map,f=k.__visibleRect;d.x=-f.x;d.y=-f.y;d.width=k.width;d.height=k.height;return this._svgFilters[a.id]=
567d},_updateSVGFilters:function(a,b,c,d){var k=this._svgFilters,f,r,m;for(r in k)if(f=k[r]){if(m=g.byId(r))null!=a&&m.setAttribute("x",a),null!=b&&m.setAttribute("y",b),null!=c&&m.setAttribute("width",c),null!=d&&m.setAttribute("height",d);null!=a&&(f.x=a);null!=b&&(f.y=b);null!=c&&(f.width=c);null!=d&&(f.height=d)}},_getScaleMatrix:function(a,b){var c=a.width/a.height,d=1,k=1;isNaN(b)||(1<c?(d=b/a.width,k=b/c/a.height):(k=b/a.height,d=b*c/a.width));return{xx:d,yy:k}},_symbolizePoint:function(b,c,d,
568k){var f=c.type,r=c.style;if(!("shieldlabelsymbol"===f||"picturemarkersymbol"===f)){var m=c.getStroke();c=c.getFill();var r=r===x.STYLE_X||r===x.STYLE_CROSS,s=m&&m.color,g=r?s:c;if(d){var e=this._getVariable(d,"colorInfo",!1),u=this._getVariable(d,"opacityInfo",!1);e&&(g=d.getColor(k,{colorInfo:e})||g);g&&u&&(g=this._applyOpacity(g,d,u,k));g&&(r?g!==s&&(m=m?a.mixin({},m):{},m.color=g):g!==c&&(c=g))}"textsymbol"===f?b.setFill(c):"simplemarkersymbol"===f&&b.setFill(c).setStroke(m)}},_drawMarkers:function(a,
569b,c,d){var k=a.geometry,f=k.points,r=a.getDojoShape()||this._div.createGroup(),m,s,g=f.length,e=[],u=0,l,h=c?c.length:0;r.children[0]&&this._isInvalidShape(b,r.children[0])&&r.clear();for(s=0;s<g;s++){m=f[s];for(l=0;l<h;l++)e[0]=c[l],this._drawPoint(r,{x:m[0],y:m[1],spatialReference:k.spatialReference},b,r.children[u++],e,d,a)}b=r.children.length;if(g*c.length<b)for(s=b-1;s>=g*c.length;s--)r.children[s].removeShape();a._shape=r},_symbolizeMarkers:function(a,b,c){var d=a.getDojoShape().children,k,
570f=d.length;for(k=0;k<f;k++)this._symbolizePoint(d[k],b,c,a)},_errorHandler:function(a,b){a.message=b?"Unable to draw graphic (geometry:"+(b.geometry?b.geometry.declaredClass:null)+", symbol:"+(b.symbol?b.symbol.declaredClass:null)+"): "+a.message:"Unable to draw graphic (null): "+a.message;this.inherited(arguments)},_rendererLimits:function(){var a,b,c;s("ff")?(a=16125,b=-32250,c=32250):E?(a=1E5,b=-1E5,c=1E5):s("chrome")&&6>s("chrome")&&(a=8150,b=-1E4,c=1E4);if(a)return{clipLimit:a,rangeMin:b,rangeMax:c,
571clipBBox:[-a,-a,a,a],clipSegments:[[[-a,-a],[a,-a]],[[a,-a],[a,a]],[[a,a],[-a,a]],[[-a,a],[-a,-a]]]}}(),_clipPolyline:function(a,b){var c=this._getCorners(a,b),d=c.br,k=this._rendererLimits,f=k.rangeMin,r=k.rangeMax,m=k.clipBBox,s=k.clipSegments,k=this._isPointWithinRange,g=this._isPointWithinBBox,u=this._getClipperIntersection,l=this._getPlaneIndex;if(!k(c.tl,f,r)||!k(d,f,r)){E&&this._createSegments(a);var h=[];e.forEach(a.segments,function(a){a=a.args;var b=a.length,c=[],d;for(d=0;d<b;d+=2){var k=
572[a[d],a[d+1]],f=[a[d+2],a[d+3]],r=g(k,m),e=g(f,m);if(r^e){if(e=u([k,f],s))r?(d?c.push(e[1]):c.push(k,e[1]),h.push(c),c=[]):c.push(e[1],f)}else r?d?c.push(f):c.push(k,f):(e=l(k,m),r=l(f,m),-1===e||(-1===r||e===r)||(k=u([k,f],s,!0),0<k.length&&(k[e]||(e=k[e[0]]?e[0]:e[1]),k[r]||(r=k[r[0]]?r[0]:r[1]),f=k[e],k=k[r],f&&c.push(f),k&&(c.push(k),h.push(c),c=[]))))}h.push(c)});a.setShape(this._getPathStringFromPaths(h))}},_clipPolygon:function(b,c){var d=this._getCorners(b,c),k=d.br,f=this._rendererLimits,
573r=f.clipLimit,m=f.rangeMin,s=f.rangeMax,g=f.clipBBox,u=f.clipSegments,f=this._isPointWithinRange,l=this._isPointWithinBBox,h=this._getClipperIntersection,t=this._getPlaneIndex,v=y._pointLineDistance;if(!f(d.tl,m,s)||!f(k,m,s))E&&this._createSegments(b),d=e.map(b.segments,function(b){var c=b.args,d=c.length,k=[];b=[];var f;for(f=0;f<d;f+=2){var m=[c[f],c[f+1]],s=[c[f+2],c[f+3]];if(f===d-2){k.push(m);break}var q=l(m,g),x=l(s,g);k.push(m);
573if(q^x){if(x=h([m,s],u))m=x[1],m[q?"inOut":"outIn"]=!0,k.push(m),
574b.push([q?"INOUT":"OUTIN",k.length-1,x[0]])}else if(!q){var q=t(m,g),n=t(s,g);-1===q||(-1===n||q===n)||(x=h([m,s],u,!0),0<x.length?(x[q]||(q=x[q[0]]?q[0]:q[1]),x[n]||(n=x[n[0]]?n[0]:n[1]),m=x[q],s=x[n],m&&(m.outIn=!0,k.push(m),b.push(["OUTIN",k.length-1,q])),s&&(s.inOut=!0,k.push(s),b.push(["INOUT",k.length-1,n]))):a.isArray(q)&&a.isArray(n)&&(x=q.concat(n),x.sort(),"0123"===x.join("")&&(x=[],3===q[0]+q[1]?x.push([r,-r],[-r,r]):x.push([-r,-r],[r,r]),q=v(x[0],[m,s]),m=v(x[1],[m,s]),k.push(q<m?x[0]:
575x[1]))))}}var w=g[0],p=g[1],A=g[2],C=g[3];e.forEach(k,function(a){a[0]<w&&(a[1]>=p&&a[1]<=C?a[0]=w:(a[0]=w,a[1]=a[1]<p?p:C))});e.forEach(k,function(a){a[1]<p&&(a[0]>=w&&a[0]<=A?a[1]=p:(a[1]=p,a[0]=a[0]<w?w:A))});e.forEach(k,function(a){a[0]>A&&(a[1]>=p&&a[1]<=C?a[0]=A:(a[0]=A,a[1]=a[1]<p?p:C))});e.forEach(k,function(a){a[1]>C&&(a[0]>=w&&a[0]<=A?a[1]=C:(a[1]=C,a[0]=a[0]<w?w:A))});c=0;d=b.length;if(0<d){do{s=b[c];f=b[(c+1)%d];if(s[2]===f[2]&&"INOUT"===s[0]&&"OUTIN"===f[0])if(m=s[1],f=f[1],m<f)for(m+=
5761;m<f;m++)k[m][2]=!0;else if(m>f){for(m+=1;m<k.length;m++)k[m][2]=!0;for(m=0;m<f;m++)k[m][2]=!0}c=(c+1)%d}while(0!==c)}d=k[0];c=k[k.length-1];d[2]&&(c[2]=!0,e.some(b,function(b){return 1===b[1]?(k.splice(k.length-1,0,a.clone(k[1])),!0):!1}));k=e.filter(k,function(a){return a[2]?!1:!0});for(c=0;c<k.length-1;c++)if(d=k[c],(f=k[c+1])&&!(d[0]!==f[0]||d[1]!==f[1]))f.outIn?d.outIn=!0:f.inOut&&(d.inOut=!0),k.splice(c+1,1);d=Math.abs;b=[];for(c=0;c<k.length-1;c++){s=k[c];m=s[0];s=s[1];q=d(m)===r;x=d(s)===
577r;f=k[c+1];n=f[0];f=f[1];var y=d(n)===r,z=d(f)===r;q&&z?b.push([c+1,[m,f]]):x&&y&&b.push([c+1,[n,s]])}for(c=b.length-1;0<=c;c--)f=b[c],m=k[f[0]-1],d=k[f[0]],!m.outIn&&(!m.inOut&&!d.outIn&&!d.inOut)&&k.splice(f[0],0,f[1]);d=k[0];c=k[k.length-1];(d[0]!==c[0]||d[1]!==c[1])&&k.push(d);return k}),b.setShape(this._getPathStringFromPaths(d))},_getCorners:function(a,b){if(E){var c=this._map,d=b.getExtent(),k=d.spatialReference,f=c.toScreen(new v(d.xmin,d.ymax,k)),c=c.toScreen(new v(d.xmax,d.ymin,k));return{tl:f,
578br:c}}f=a.getTransformedBoundingBox();return{tl:f[0],br:f[2]}},_createSegments:function(a){a.shape.path=a.vmlPath;a.segmented=!1;a._confirmSegmented();var b=a.segments;1<b.length&&(a.segments=e.filter(b,function(a,b,c){b=c[b+1];return"M"===a.action&&b&&"L"===b.action?(a.args=a.args.concat(b.args),!0):!1}))},_getPathStringFromPaths:function(a){E?(a=e.map(a,function(a){return"m "+e.map(a,function(a,b){return(1===b?"l ":"")+a.join(",")}).join(" ")}),a.push("e")):a=e.map(a,function(a){return"M "+e.map(a,
579function(a){return a.join(",")}).join(" ")});return a.join(" ")},_isPointWithinBBox:function(a,b){var c=b[1],d=b[2],k=b[3],f=a[0],r=a[1];return f>b[0]&&f<d&&r>c&&r<k?!0:!1},_isPointWithinRange:function(a,b,c){var d=a.x;a=a.y;return d<b||a<b||d>c||a>c?!1:!0},_getClipperIntersection:function(a,b,c){var d,k=y._getLineIntersection2,f=Math.round,r={length:0};for(d=0;4>d;d++){var m=k(a,b[d]);if(m)if(m[0]=f(m[0]),m[1]=f(m[1]),c)r[d]=m,r.length++;else return[d,m]}return c?r:null},_getPlaneIndex:function(a,
580b){var c=a[0],d=a[1],k=b[0],f=b[1],r=b[2],m=b[3];return c<=k?d>=f&&d<=m?3:d<f?[0,3]:[2,3]:d<=f?c>=k&&c<=r?0:c<k?[3,0]:[1,0]:c>=r?d>=f&&d<=m?1:d<f?[0,1]:[2,1]:d>=m?c>=k&&c<=r?2:c<k?[3,2]:[1,2]:-1},onGraphicAdd:function(){},onGraphicRemove:function(){},onGraphicNodeAdd:function(){},onGraphicNodeRemove:function(){},onGraphicDraw:function(){},onGraphicsClear:function(){},onRendererChange:function(){},onOpacityChange:function(){},setInfoTemplate:function(a){this.infoTemplate=a},add:function(a,b){if(a._graphicsLayer===
581this)return a;b||this.graphics.push(a);a._graphicsLayer=this;a._layer=this;this._updateExtent(a);this._draw(a);if(!b)this.onGraphicAdd(a);return a},remove:function(a,b){if(!b){var c;if(-1===(c=e.indexOf(this.graphics,a)))return null;a=this.graphics.splice(c,1)[0]}a.getDojoShape()&&this._removeShape(a);a._shape=a._graphicsLayer=null;this.onGraphicRemove(a);return a},clear:function(a,b){for(var c=this.graphics;0<c.length;)this.remove(c[0]);if(!b)this.onGraphicsClear()},_setIEOpacity:function(a,b){var c=
582a&&a.getNode();if(c){var d=a.strokeStyle,k=c.stroke;d&&k&&(k.opacity=d.color.a*b);d=a.fillStyle;k=c.fill;
582d&&k&&("tile"===k.type?q.set(c,"opacity",b):k.opacity=d.a*b)}},setOpacity:function(a,b){if(b||this.opacity!=a){var c=this._div;c&&(E?(e.forEach(this.graphics,function(b){this._setIEOpacity(b._shape,a);this._setIEOpacity(b._bgShape,a)},this),c._esriIeOpacity=a,this._bgGroup._esriIeOpacity=a):this._canvas?q.set(c.getEventSource(),"opacity",a):c.getEventSource().setAttribute("opacity",a));this.opacity=
583a;if(!b)this.onOpacityChange(a)}},setRenderer:function(a){this.renderer=a;this._evalSDRenderer(!0);this.emit("renderer-change",{renderer:this._rndForScale||a})}});p=p([D,G],{declaredClass:"esri.layers.GraphicsLayer",constructor:function(){this.enableMouseEvents=a.hitch(this,this.enableMouseEvents);this.disableMouseEvents=a.hitch(this,this.disableMouseEvents);this._processEvent=a.hitch(this,this._processEvent);this._initLayer()},_initLayer:function(){this.loaded=!0;this.onLoad(this)},_setMap:function(){var a=
584this.inherited("_setMap",arguments);this.enableMouseEvents();return a},_unsetMap:function(){this.disableMouseEvents();this.inherited("_unsetMap",arguments)},_processEvent:function(a){var b=this._map,c=a.target,d;a.screenPoint=new z(a.pageX-b.position.x,a.pageY-b.position.y);for(a.mapPoint=b.toMap(a.screenPoint);c&&!(d=c.e_graphic);)c=c.parentNode;if(d)return a.graphic=d,a},_onMouseOverHandler:function(a){if(this._processEvent(a))this.onMouseOver(a)},_onMouseMoveHandler:function(a){if(this._processEvent(a))this.onMouseMove(a)},
585_onMouseDragHandler:function(a){if(this._processEvent(a))this.onMouseDrag(a)},_onMouseOutHandler:function(a){if(this._processEvent(a))this.onMouseOut(a)},_onMouseDownHandler:function(a){this._downGr=this._downPt=null;this._processEvent(a)&&(n.disconnect(this._onmousemove_connect),n.disconnect(this._onmousedrag_connect),this._onmousedrag_connect=n.connect(this._div.getEventSource(),"onmousemove",this,"_onMouseDragHandler"),this._downGr=a.graphic,this._downPt=a.screenPoint.x+","+a.screenPoint.y,this.onMouseDown(a))},
586_onMouseUpHandler:function(a){this._upGr=this._upPt=null;this._processEvent(a)&&(n.disconnect(this._onmousedrag_connect),n.disconnect(this._onmousemove_connect),this._onmousemove_connect=n.connect(this._div.getEventSource(),"onmousemove",this,"_onMouseMoveHandler"),this._upGr=a.graphic,this._upPt=a.screenPoint.x+","+a.screenPoint.y,this.onMouseUp(a))},_onClickHandler:function(a){if(this._processEvent(a)){var b=this._downGr,c=this._upGr;b&&(c&&b===c&&this._downPt===this._upPt)&&(E&&(m._ieGraphic=a.graphic),
587this.onClick(a))}},_onDblClickHandler:function(a){if(this._processEvent(a))this.onDblClick(a)},onMouseOver:function(){},onMouseMove:function(){},onMouseDrag:function(){},onMouseOut:function(){},onMouseDown:function(){},onMouseUp:function(){},onClick:function(){},onDblClick:function(){},enableMouseEvents:function(){if(!this._mouseEvents){var a=n.connect,b=this._div.getEventSource();C||(this._onmouseover_connect=a(b,"onmouseover",this,"_onMouseOverHandler"),this._onmousemove_connect=a(b,"onmousemove",
588this,"_onMouseMoveHandler"),this._onmouseout_connect=a(b,"onmouseout",this,"_onMouseOutHandler"),this._onmousedown_connect=a(b,"onmousedown",this,"_onMouseDownHandler"),this._onmouseup_connect=a(b,"onmouseup",this,"_onMouseUpHandler"),this._onclick_connect=a(b,"onclick",this,"_onClickHandler"),this._ondblclick_connect=a(b,"ondblclick",this,"_onDblClickHandler"));this._mouseEvents=!0}},disableMouseEvents:function(){if(this._mouseEvents){var a=n.disconnect;a(this._onmouseover_connect);a(this._onmousemove_connect);
589a(this._onmousedrag_connect);a(this._onmouseout_connect);a(this._onmousedown_connect);a(this._onmouseup_connect);a(this._onclick_connect);a(this._ondblclick_connect);this._mouseEvents=!1}}});p._GraphicsContainer=u;p._GraphicsLayer=D;s("extend-esri")&&(a.setObject("layers.GraphicsLayer",p,m),a.setObject("layers._GraphicsContainer",u,m),a.setObject("layers._GraphicsLayer",D,m));return p})},"esri/tasks/query":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/has ../kernel ../geometry/jsonUtils ./SpatialRelationship dojo/has!extend-esri?./QueryTask dojo/has!extend-esri?./RelationshipQuery dojo/has!extend-esri?./StatisticDefinition".split(" "),
590function(p,n,a,e,l,h,q,g){var d=p(null,{declaredClass:"esri.tasks.Query",constructor:function(){this.spatialRelationship=d.SPATIAL_REL_INTERSECTS},text:null,where:"",geometry:null,groupByFieldsForStatistics:null,objectIds:null,returnGeometry:!1,returnDistinctValues:!1,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,pixelSize:null,distance:null,units:null,resultOffset:null,resultRecordCount:null,quantizationParameters:null,_units:{meters:"esriSRUnit_Meter",
591kilometers:"esriSRUnit_Kilometer",feet:"esriSRUnit_Foot",miles:"esriSRUnit_StatuteMile","nautical-miles":"esriSRUnit_NauticalMile","us-nautical-miles":"esriSRUnit_USNauticalMile"},toJson:function(c){var b={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision},f=c&&c.geometry||this.geometry,m=this.objectIds,g=this.outFields,s=this.outSpatialReference,k=this.groupBy
591FieldsForStatistics,
592r=this.orderByFields,u=this.outStatistics;c=this.distance;f&&(b.geometry=f,b.geometryType=q.getJsonType(f),b.inSR=f.spatialReference.wkid||e.toJson(f.spatialReference.toJson()));m&&(b.objectIds=m.join(","));g&&(b.outFields=g.join(","));this.returnDistinctValues&&(b.returnDistinctValues=!0);k&&(b.groupByFieldsForStatistics=k.join(","));r&&(b.orderByFields=r.join(","));if(u){var l=[];a.forEach(u,function(a){l.push(a.toJson())});b.outStatistics=e.toJson(l)}s?b.outSR=s.wkid||e.toJson(s.toJson()):f&&(b.outSR=
593f.spatialReference.wkid||e.toJson(f.spatialReference.toJson()));f=this.timeExtent;b.time=f?f.toJson().join(","):null;if((f=this.relationParam)&&this.spatialRelationship===d.SPATIAL_REL_RELATION)b.relationParam=f;c&&(b.distance=this.distance,this.hasOwnProperty("units")?b.units=this._units[this.units]||this._units.meters:(console.warn("esri/tasks/query::no distance unit provided, defaulting to meters"),b.units=this._units.meters));this.hasOwnProperty("start")&&(b.resultOffset=this.start,b.resultRecordCount=
59410,""===b.where&&(b.where="1\x3d1"));this.hasOwnProperty("num")&&(b.resultRecordCount=this.num);b.pixelSize=this.pixelSize?e.toJson(this.pixelSize.toJson()):null;b.multipatchOption=this.multipatchOption;this.quantizationParameters&&(b.quantizationParameters=e.toJson(this.quantizationParameters));b._ts=this._ts;return b}});n.mixin(d,g);l("extend-esri")&&n.setObject("tasks.Query",d,h);return d})},"esri/layers/ArcGISDynamicMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/sniff dojo/io-query ../kernel ../config ../request ../urlUtils ../layerUtils ../geometry/scaleUtils ./DynamicMapServiceLayer ./ArcGISMapServiceLayer ./TimeInfo ./LayerTimeOptions ./ImageParameters ./DynamicLayerInfo ./LayerMapSource".split(" "),
595function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x){p=p([m,t],{declaredClass:"esri.layers.ArcGISDynamicMapServiceLayer",_eventMap:{"visible-layers-change":["visibleLayers"]},constructor:function(a,b,c){a=b&&b.imageParameters;var d=n.hitch;if(a){var k=a.layerDefinitions;k&&this.setLayerDefinitions(k);a.layerOption===r.LAYER_OPTION_SHOW&&(this.visibleLayers=[].concat(a.layerIds),this.onVisibleLayersChange(this.visibleLayers))}this._setIsPNG32=d(this,this._setIsPNG32);this.dpi=a&&a.dpi||96;this.imageFormat=
596a&&a.format||"png8";this.imageTransparency=a&&!1===a.transparent?!1:!0;this._setIsPNG32();this.gdbVersion=b&&b.gdbVersion;this._params.gdbVersion=this.gdbVersion;n.mixin(this._params,this._url.query,{dpi:this.dpi,transparent:this.imageTransparency,format:this.imageFormat},a?a.toJson():{});this.getImageUrl=d(this,this.getImageUrl);this._initLayer=d(this,this._initLayer);this._load=d(this,this._load);this.useMapImage=b?b.useMapImage:!1;this._loadCallback=b&&b.loadCallback;(b=b&&b.resourceInfo)?this._initLayer(b):
597(void 0===c||!1===c)&&this._load();this.registerConnectEvents()},disableClientCaching:!1,layerDefinitions:null,_initLayer:function(a,b){this.inherited(arguments);a.timeInfo&&(this.timeInfo=new s(a.timeInfo));this.loaded=!0;this.onLoad(this);var c=this._loadCallback;c&&(delete this._loadCallback,c(this))},getImageUrl:function(a,b,k,f){var r=this._url.path+"/export?",m=this._params,s=a.spatialReference.wkid||e.toJson(a.spatialReference.toJson()),u=this._errorHandler;delete m._ts;n.mixin(m,{bbox:a.xmin+
598","+a.ymin+","+a.xmax+","+a.ymax,bboxSR:s,imageSR:s,size:b+","+k},this.disableClientCaching?{_ts:(new Date).getTime()}:{});m.layerDefs&&(a=m.layerDefs,delete m.layerDefs,n.mixin(m,{layerDefs:a}));var l=m.token=this._getToken();a=c.addProxy(r+h.objectToQuery(n.mixin({},m,{f:"image"})));a.length>g.defaults.io.postLength||this.useMapImage?this._jsonRequest=d({url:r,content:n.mixin(m,{f:"json"}),callbackParamName:"callback",load:function(a){a=a.href;l&&(a+=-1===a.indexOf("?")?"?token\x3d"+l:"\x26token\x3d"+
599l);f(c.addProxy(a))},error:u}):f(a)},_setIsPNG32:function(){var a=this.imageFormat.toLowerCase(),b=l("ie");this.isPNG32=b&&6===b&&("png32"===a||"png24"===a)&&this.imageTransparency},_setTime:function(c){var d=this.timeInfo;c=this._params.time=c?c.toJson().join(","):null;if(10.02>this.version&&d)if(c)this._params.layerTimeOptions=b._serializeTimeOptions(this.layerTimeOptions);else{var f=this.layerInfos;if(f){var r=this.layerTimeOptions,m=r?r.slice(0):[],s=[];a.forEach(f,function(a){a.subLayerIds||
600s.push(a.id)});
600s.length&&(a.forEach(s,function(a){if(!m[a]){var b=new k;b.useTime=!1;m[a]=b}}),this._params.layerTimeOptions=b._serializeTimeOptions(m,s))}}10.02<=this.version&&d&&(!c&&!d.hasLiveData)&&(this._params.time="null,null")},setDPI:function(a,b){this.dpi=this._params.dpi=a;b||this.refresh(!0)},setImageFormat:function(a,b){this.imageFormat=this._params.format=a;this._setIsPNG32();b||this.refresh(!0)},setImageTransparency:function(a,b){this.imageTransparency=this._params.transparent=a;this._setIsPNG32();
601b||this.refresh(!0)},setVisibleLayers:function(a,b){this.visibleLayers=a;this._params.layers=r.LAYER_OPTION_SHOW+":"+(a.length?a.join():"-1");this._updateDynamicLayers();b||this.refresh(!0);this.onVisibleLayersChange(this.visibleLayers)},onVisibleLayersChange:function(){},setDefaultVisibleLayers:function(a){this.visibleLayers=this._defaultVisibleLayers;this._params.layers=null;this._updateDynamicLayers();a||this.refresh(!0);this.onVisibleLayersChange(this.visibleLayers)},setLayerDefinitions:function(a,
602c){this.layerDefinitions=a;this._params.layerDefs=b._serializeLayerDefinitions(a);this._updateDynamicLayers();c||this.refresh(!0)},setDefaultLayerDefinitions:function(a){this.layerDefinitions=this._params.layerDefs=null;this._updateDynamicLayers();a||this.refresh(!0)},setDisableClientCaching:function(a){this.disableClientCaching=a},setLayerTimeOptions:function(a,c){this.layerTimeOptions=a;this._params.layerTimeOptions=b._serializeTimeOptions(a);this._updateDynamicLayers();c||this.refresh(!0)},refresh:function(a){if(a)this.inherited(arguments);
603else{var b=this.disableClientCaching;this.disableClientCaching=!0;this.inherited(arguments);this.disableClientCaching=b}},setLayerDrawingOptions:function(a,b){this.layerDrawingOptions=a;this._updateDynamicLayers();b||this.refresh(!0)},setDynamicLayerInfos:function(a,c){a&&0<a.length?(this.dynamicLayerInfos=a,this.visibleLayers=b._getDefaultVisibleLayers(a),this.onVisibleLayersChange(this.visibleLayers)):this.dynamicLayerInfos=this.layerDrawingOptions=null;this._updateDynamicLayers();c||this.refresh(!0)},
604createDynamicLayerInfosFromLayerInfos:function(){var b=[],c;a.forEach(this.layerInfos,function(a){c=new u(a.toJson());c.source=new x({mapLayerId:a.id});b.push(c)});return b},_onDynamicLayersChange:function(){},_updateDynamicLayers:function(){if(this.dynamicLayerInfos&&0<this.dynamicLayerInfos.length||this.layerDrawingOptions&&0<this.layerDrawingOptions.length){if(!this.dynamicLayerInfos||0===this.dynamicLayerInfos.length)this.dynamicLayerInfos=this.createDynamicLayerInfosFromLayerInfos();var c;c=
605this.dynamicLayerInfos;var d=[],k=this._map&&f.getScale(this._map),r=this.visibleLayers,m=k?b._getLayersForScale(k,c):r;a.forEach(c,function(b){if(!b.subLayerIds){var c,k=b.id;if(-1!==a.indexOf(r,k)&&-1!==a.indexOf(m,k)){c={id:k,name:b.name};c.source=b.source&&b.source.toJson();var f;this.layerDefinitions&&this.layerDefinitions[k]&&(f=this.layerDefinitions[k]);f&&(c.definitionExpression=f);var s;this.layerDrawingOptions&&this.layerDrawingOptions[k]&&(s=this.layerDrawingOptions[k]);s&&(c.drawingInfo=
606s.toJson());var g;this.layerTimeOptions&&this.layerTimeOptions[k]&&(g=this.layerTimeOptions[k]);g&&(c.layerTimeOptions=g.toJson());c.minScale=b.minScale||0;c.maxScale=b.maxScale||0;d.push(c)}}},this);c=e.toJson(d);if(!this._params.dynamicLayers||this._params.dynamicLayers.length!==c.length||this._params.dynamicLayers!==c)this._params.dynamicLayers=c,this._onDynamicLayersChange(this._params.dynamicLayers)}else this._params.dynamicLayers?(this._params.dynamicLayers=null,this._onDynamicLayersChange(null)):
607this._params.dynamicLayers=null},_onExtentChangeHandler:function(a,b,c){c&&this._updateDynamicLayers();this.inherited(arguments)},_setMap:function(a,b,c){this._map=a;this._updateDynamicLayers();return this.inherited(arguments)},onGDBVersionChange:function(){},setGDBVersion:function(a,b){this.gdbVersion=a;this._params.gdbVersion=a;this.onGDBVersionChange();b||this.refresh(!0)},exportMapImage:function(a,b){var c=g.defaults.map,c=n.mixin({size:c.width+","+c.height},this._params,a?a.toJson(this.normalization):
608{},{f:"json"});delete c._ts;if(c.layerDefs){var d=c.layerDefs;delete c.layerDefs;
608n.mixin(c,{layerDefs:d})}this._exportMapImage(this._url.path+"/export",c,b)}});l("extend-esri")&&n.setObject("layers.ArcGISDynamicMapServiceLayer",p,q);return p})},"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(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,
609k){function r(a){return eval("("+a+")")}function u(a){var b=a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt<v){var b=a._nameCaseMap={},d;for(d in c)"_"!==d.charAt(0)&&(b[d.toLowerCase()]=d);b._extendCnt=v}return b}function x(b,c){var d=b.join();if(!z[d]){for(var k=[],f=0,r=b.length;f<r;f++){var m=b[f];k[k.length]=z[m]=z[m]||a.getObject(m)||~m.indexOf("/")&&(c?c(m):p(m))}f=k.shift();z[d]=k.length?f.createSubclass?f.createSubclass(k):f.extend.apply(f,k):f}return z[d]}new Date("X");var v=0;d.after(a,
610"extend",function(){v++},!0);var z={},w={_clearCache:function(){v++;z={}},_functionFromScript:function(a,b){var c="",d="",k=a.getAttribute(b+"args")||a.getAttribute("args"),f=a.getAttribute("with"),k=(k||"").split(/\s*,\s*/);f&&f.length&&e.forEach(f.split(/\s*,\s*/),function(a){c+="with("+a+"){";d+="}"});return new Function(k,c+a.innerHTML+d)},instantiate:function(a,b,c){b=b||{};c=c||{};var d=(c.scope||n._scopeName)+"Type",k="data-"+(c.scope||n._scopeName)+"-",f=k+"type",r=k+"mixins",m=[];e.forEach(a,
611function(a){var c=d in b?b[d]:a.getAttribute(f)||a.getAttribute(d);if(c){var k=a.getAttribute(r),c=k?[c].concat(k.split(/\s*,\s*/)):[c];m.push({node:a,types:c})}});return this._instantiate(m,b,c)},_instantiate:function(a,b,d,k){function f(a){!b._started&&!d.noStart&&e.forEach(a,function(a){"function"===typeof a.startup&&!a._started&&a.startup()});return a}a=e.map(a,function(a){var c=a.ctor||x(a.types,d.contextRequire);if(!c)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(c,
612a.node,b,d,a.scripts,a.inherited)},this);return k?c(a).then(f):f(a)},construct:function(c,k,f,l,h,q){function v(b){N&&a.setObject(N,b);for(K=0;K<R.length;K++)d[R[K].advice||"after"](b,R[K].method,a.hitch(b,R[K].func),!0);for(K=0;K<ba.length;K++)ba[K].call(b);for(K=0;K<Q.length;K++)b.watch(Q[K].prop,Q[K].func);for(K=0;K<P.length;K++)s(b,P[K].event,P[K].func);return b}var x=c&&c.prototype;l=l||{};var w={};l.defaults&&a.mixin(w,l.defaults);q&&a.mixin(w,q);var p;m("dom-attributes-explicit")?p=k.attributes:
613m("dom-attributes-specified-flag")?p=e.filter(k.attributes,function(a){return a.specified}):(q=(/^input$|^img$/i.test(k.nodeName)?k:k.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),p=e.map(q.split(/\s+/),function(a){var b=a.toLowerCase();return{name:a,value:"LI"==k.nodeName&&"value"==a||"enctype"==b?k.getAttribute(b):k.getAttributeNode(b).value}}));var z=l.scope||n._scopeName;q="data-"+z+"-";var F={};"dojo"!==z&&(F[q+"props"]=
614"data-dojo-props",F[q+"type"]="data-dojo-type",F[q+"mixins"]="data-dojo-mixins",F[z+"type"]="dojoType",F[q+"id"]="data-dojo-id");for(var K=0,M,z=[],N,T;M=p[K++];){var O=M.name,U=O.toLowerCase();M=M.value;switch(F[U]||U){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":T=M;break;case "data-dojo-id":case "jsid":N=M;break;case "data-dojo-attach-point":case "dojoattachpoint":w.dojoAttachPoint=M;break;case "data-dojo-attach-event":case "dojoattachevent":w.dojoAttachEvent=
615M;break;case "class":w["class"]=k.className;break;case "style":w.style=k.style&&k.style.cssText;break;default:if(O in x||(O=u(c)[U]||O),O in x)switch(typeof x[O]){case "string":w[O]=M;break;case "number":w[O]=M.length?Number(M):NaN;break;case "boolean":w[O]="false"!=M.toLowerCase();break;case "function":""===M||-1!=M.search(/[^\w\.]+/i)?w[O]=new Function(M):w[O]=a.getObject(M,!1)||new Function(M);z.push(O);break;default:U=x[O],w[O]=U&&"length"in U?M?M.split(/\s*,\s*/):[]:U instanceof Date?""==M?new Date(""):
616"now"==M?new Date:b.fromISOString(M):U instanceof g?n.baseUrl+M:r(M)}else w[O]=M}}for(p=0;p<z.length;p++)F=z[p].toLowerCase(),k.removeAttribute(F),k[F]=null;if(T)try{T=r.call(l.propsThis,"{"+T+"}"),a.mixin(w,T)}catch(Y){throw Error(Y.toString()+" in data-dojo-props\x3d'"+T+"'");}a.mixin(w,f);h||(h=c&&(c._noScript||x._noScript)?[]:t("\x3e script[type^\x3d'dojo/']",k));var R=[],ba=[],Q=[],P=[];if(h)for(K=0;K<h.length;K++)F=h[K],k.removeChild(F),f=F.getAttribute(q+"event")||F.getAttribute("event"),l=
617F.getAttribute(q+"prop"),T=F.getAttribute(q+"method"),z=F.getAttribute(q+"advice"),p=F.getAttribute("type"),F=this._functionFromScript(F,q),f?"dojo/connect"==p?R.push({method:f,func:F}):"dojo/on"==p?P.push({event:f,func:F}):w[f]=F:"dojo/aspect"==p?R.push({method:T,advice:z,func:F}):"dojo/watch"==p?Q.push({prop:l,func:F}):ba.push(F);c=(h=c.markupFactory||x.markupFactory)?h(w,k,c):new c(w,k);return c.then?c.then(v):v(c)},scan:function(a,b){function c(a){if(!a.inherited){a.inherited={};var b=a.node,
618d=c(a.parent),b={dir:b.getAttribute("dir")||d.dir,lang:b.getAttribute("lang")||d.lang,textDir:b.getAttribute(l)||d.textDir},k;for(k in b)b[k]&&(a.inherited[k]=b[k])}return a.inherited}var d=[],k=[],r={},s=(b.scope||n._scopeName)+"Type",g="data-"+(b.scope||n._scopeName)+"-",u=g+"type",l=g+"textdir",g=g+"mixins",h=a.firstChild,t=b.inherited;
618if(!t){var q=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&q(a.parentNode,b)},t={dir:q(a,"dir"),lang:q(a,"lang"),textDir:q(a,l)},v;for(v in t)t[v]||
619delete t[v]}for(var t={inherited:t},w,z;;)if(h)if(1!=h.nodeType)h=h.nextSibling;else if(w&&"script"==h.nodeName.toLowerCase())(O=h.getAttribute("type"))&&/^dojo\/\w/i.test(O)&&w.push(h),h=h.nextSibling;else if(z)h=h.nextSibling;else{var O=h.getAttribute(u)||h.getAttribute(s);v=h.firstChild;if(!O&&(!v||3==v.nodeType&&!v.nextSibling))h=h.nextSibling;else{z=null;if(O){var U=h.getAttribute(g);w=U?[O].concat(U.split(/\s*,\s*/)):[O];try{z=x(w,b.contextRequire)}catch(Y){}z||e.forEach(w,function(a){~a.indexOf("/")&&
620!r[a]&&(r[a]=!0,k[k.length]=a)});U=z&&!z.prototype._noScript?[]:null;t={types:w,ctor:z,parent:t,node:h,scripts:U};t.inherited=c(t);d.push(t)}else t={node:h,scripts:w,parent:t};w=U;z=h.stopParser||z&&z.prototype.stopParser&&!b.template;h=v}}else{if(!t||!t.node)break;h=t.node.nextSibling;z=!1;t=t.parent;w=t.scripts}var R=new f;k.length?(m("dojo-debug-messages")&&console.warn("WARNING: Modules being Auto-Required: "+k.join(", ")),(b.contextRequire||p)(k,function(){R.resolve(e.filter(d,function(a){if(!a.ctor)try{a.ctor=
621x(a.types,b.contextRequire)}catch(c){}for(var d=a.parent;d&&!d.types;)d=d.parent;var k=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(k&&k.stopParser&&!b.template);a.instantiate=!d||d.instantiate&&d.instantiateChildren;return a.instantiate}))})):R.resolve(d);return R.promise},_require:function(b,c){var d=r("{"+b.innerHTML+"}"),k=[],m=[],s=new f,g=c&&c.contextRequire||p,e;for(e in d)k.push(e),m.push(d[e]);g(m,function(){for(var b=0;b<k.length;b++)a.setObject(k[b],arguments[b]);s.resolve(arguments)});
622return s.promise},_scanAmd:function(a,b){var c=new f,d=c.promise;c.resolve(!0);var k=this;t("script[type\x3d'dojo/require']",a).forEach(function(a){d=d.then(function(){return k._require(a,b)});a.parentNode.removeChild(a)});return d},parse:function(b,c){var d;!c&&b&&b.rootNode?(c=b,d=c.rootNode):b&&a.isObject(b)&&!("nodeType"in b)?c=b:d=b;d=d?h.byId(d):q.body();c=c||{};var k=c.template?{template:!0}:{},f=[],r=this,m=this._scanAmd(d,c).then(function(){return r.scan(d,c)}).then(function(a){return r._instantiate(a,
623k,c,!0)}).then(function(a){return f=f.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});a.mixin(f,m);return f}};n.parser=w;l.parseOnLoad&&k(100,w,"parse");return w})},"esri/plugins/popupManager":function(){define(["../PopupManager"],function(p){return{add:function(n,a){n.popupManager||(n.popupManager=new p(a),n.popupManager.setMap(n))},remove:function(n){var a=n.popupManager;a&&(a.unsetMap(),n.popupManager=void 0)}}})},"esri/layers/MapImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/has ../kernel ../domUtils ../geometry/Extent".split(" "),
624function(p,n,a,e,l,h,q){p=p(null,{declaredClass:"esri.layers.MapImage",constructor:function(a){n.mixin(this,a);this.extent=new q(this.extent)},visible:!0,opacity:1,getLayer:function(){return this._layer},getNode:function(){return this._node},show:function(){if(!this.visible){this.visible=!0;var a=this._node,d=this._layer,c;if(a){if(c=d&&d._div)d.suspended||d._setPos(a,c._left,c._top),(d._active||c).appendChild(a);h.show(a)}}},hide:function(){if(this.visible){this.visible=!1;var a=this._node;a&&(h.hide(a),
625a.parentNode&&a.parentNode.removeChild(a))}},setOpacity:function(g){var d=this._node;this.opacity=g;d&&a.set(d,"opacity",g)}});e("extend-esri")&&n.setObject("layers.MapImage",p,l);return p})},"esri/symbols/Symbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../Color".split(" "),function(p,n,a,e,l,h){p=p(null,{declaredClass:"esri.symbol.Symbol",color:new h([0,0,0,1]),type:null,constructor:function(a){if(a&&n.isObject(a)&&(n.mixin(this,a),this.color&&l.isDefined(this.color[0])&&
626(this.color=h.toDojoColor(this.color)),(a=this.type)&&0===a.indexOf("esri")))this.t
626ype={esriSMS:"simplemarkersymbol",esriPMS:"picturemarkersymbol",esriSLS:"simplelinesymbol",esriCLS:"cartographiclinesymbol",esriSFS:"simplefillsymbol",esriPFS:"picturefillsymbol",esriTS:"textsymbol",esriSHD:"shieldlabelsymbol"}[a]},setColor:function(a){this.color=a;return this},toJson:function(){return{color:h.toJsonColor(this.color)}}});a("extend-esri")&&n.setObject("symbol.Symbol",p,e);return p})},"esri/symbol":function(){define("./symbols/Symbol ./symbols/MarkerSymbol ./symbols/SimpleMarkerSymbol ./symbols/PictureMarkerSymbol ./symbols/LineSymbol ./symbols/SimpleLineSymbol ./symbols/CartographicLineSymbol ./symbols/FillSymbol ./symbols/SimpleFillSymbol ./symbols/PictureFillSymbol ./symbols/Font ./symbols/TextSymbol ./symbols/jsonUtils".split(" "),
627function(p,n,a,e,l,h,q,g,d,c,b,f,m){return{Symbol:p,MarkerSymbol:n,SimpleMarkerSymbol:a,PictureMarkerSymbol:e,LineSymbol:l,SimpleLineSymbol:h,CartographicLineSymbol:q,FillSymbol:g,SimpleFillSymbol:d,PictureFillSymbol:c,Font:b,TextSymbol:f,jsonUtils:m}})},"dijit/form/ToggleButton":function(){define(["dojo/_base/declare","dojo/_base/kernel","./Button","./_ToggleButtonMixin"],function(p,n,a,e){return p("dijit.form.ToggleButton",[a,e],{baseClass:"dijitToggleButton",setChecked:function(a){n.deprecated("setChecked("+
628a+") is deprecated. Use set('checked',"+a+") instead.","","2.0");this.set("checked",a)}})})},"esri/SpatialReference":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ./kernel ./lang".split(" "),function(p,n,a,e,l,h){var q=[-2.0037508342788905E7,2.0037508342788905E7],g=[-2.0037508342787E7,2.0037508342787E7];p=p(null,{declaredClass:"esri.SpatialReference",constructor:function(d){d&&(a.isObject(d)?a.mixin(this,d):a.isString(d)?this.wkt=d:this.wkid=d)},wkid:null,wkt:null,
629_info:{102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:q,origin:g,dx:1E-5},102100:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
630valid:q,origin:g,dx:1E-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:q,origin:g,dx:1E-5},3857:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
631valid:q,origin:g,dx:1E-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",${Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],UNIT["Degrees",111319.491]]',
632valid:[-180,180],origin:[-180,180],dx:1E-5}},_isWebMercator:function(){return-1!==n.indexOf([102113,102100,3857,3785],this.wkid)},_isWrappable:function(){return-1!==n.indexOf([102113,102100,3857,3785,4326],this.wkid)},_getInfo:function(){return this.wkid?this._info[this.wkid]:null},_canProject:function(a){var c=!1;a&&(c=this.isWebMercator()&&4326===a.wkid||a.isWebMercator()&&4326===this.wkid);return c},isWebMercator:function(){return this._isWebMercator()},equals:function(a){var c=!1;a&&(this===a&&
633(c=!0),this.wkid||a.wkid?c=this.wkid===a.wkid||this.isWebMercator()&&a.isWebMercator()||this.wkid===a.latestWkid||a.wkid===this.latestWkid:this.wkt&&a.wkt&&(c=this.wkt.toUpperCase()===a.wkt.toUpperCase()));return c},toJson:function(){var a=null,c=h.isDefined;c(this.wkid)?a={wkid:this.wkid}:c(this.wkt)&&(a={wkt:this.wkt});a&&c(this.latestWkid)&&(a.latestWkid=this.latestWkid);return a}});e("extend-esri")&&(l.SpatialReference=p);return p})},"esri/layers/LabelClass":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../lang ../symbols/TextSymbol ../symbols/ShieldLabelSymbol".split(" "),
634function(p,n,a,e,l,h,q,g){p=p(null,{declaredClass:"esri.layers.LabelClass",labelPlacement:null,labelExpression:null,format:null,fieldInfos:null,useCodedValues:null,symbol:null,maxScale:0,minScale:0,where:null,sizeInfo:null,_labelPlacementLookup:{"above-center":"esriServerPointLabelPlacementAboveCenter","above-left":"esriServerPointLabelPlacementAboveLeft","above-right":"esriServerPointLabelPlacementAboveRight","below-center":"esriServerPointLabelPlacementBelowCenter","below-left":"esriServerPointLabelPlacementBelowLeft",
635"below-right":"esriServerPointLabelPlacementBelowRight","center-center":"esriServerPointLabelPlacementCenterCenter","center-left":"esriServerPointLabelPlacementCenterLeft","center-right":"esriServerPointLabelPlacementCenterRight","above-after":"esriServerLinePlacementAboveAfter","above-along":"esriServerLinePlacementAboveAlong","above-before":"esriServerLinePlacementAboveBefore","above-start":"esriServerLinePlacementAboveStart","above-end":"esriServerLinePlacementAboveEnd","below-after":"esriServerLinePlacementBelowAfter",
636"below-along":"esriServerLinePlacementBelowAlong","below-before":"esriServerLinePlacementBelowBefore","below-start":"esriServerLinePlacementBelowStart","below-end":"esriServerLinePlacementBelowEnd","center-after":"esriServerLinePlacementCenterAfter","center-along":"esriServerLinePlacementCenterAlong","center-before":"esriServerLinePlacementCenterBefore","center-start":"esriServerLinePlacementCenterStart","center-end":"esriServerLinePlacementCenterEnd","always-horizontal":"esriServerPolygonPlacementAlwaysHorizontal"},
637constructor:function(a){if(a&&(n.mixin(this,a),this._labelPlacementLookup.hasOwnProperty(this.labelPlacement)||(this.labelPlacement=h.valueOf(this._labelPlacementLookup,a.labelPlacement)),a.format&&(this.format=a.format),a.fieldInfos&&(this.fieldInfos=a.fieldInfos),a.symbol&&(this.symbol="esriSHD"===a.symbol.type?new g(a.symbol):new q(a.symbol)),a=this.sizeInfo))a.minSize&&(a.minSize=e.pt2px(a.minSize)),a.maxSize&&(a.maxSize=e.pt2px(a.maxSize))},getSymbol:function(){return this.symbol},toJson:function(){var a=
638this.sizeInfo;a&&(a=n.mixin({},a),a.minSize&&(a.minSize=e.px2pt(a.minSize)),a.maxSize&&(a.maxSize=e.px2pt(a.maxSize)));a={labelExpression:this.labelExpression,labelExpressionInfo:this.labelExpressionInfo&&n.clone(this.labelExpressionInfo),format:this.format,fieldInfos:this.fieldInfos,useCodedValues:this.useCodedValues,maxScale:this.maxScale,minScale:this.minScale,where:this.where,sizeInfo:a,labelPlacement:this._labelPlacementLookup.hasOwnProperty(this.labelPlacement)?this._labelPlacementLookup[this.labelPlacement]:
639this.labelPlacement,symbol:this.symbol&&this.symbol.toJson()};return h.fixJson(a)}});a("extend-esri")&&n.setObject("layers.LabelClass",p,l);return p})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(p,n){var a={};p.setObject("dojo.date.stamp",a);a.fromISOString=function(e,l){a._isoRegExp||(a._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);var h=a._isoRegExp.exec(e),q=null;if(h){h.shift();h[1]&&
640h[1]--;h[6]&&(h[6]*=1E3);l&&(l=new Date(l),n.forEach(n.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(a){return l["get"+a]()}),function(a,b){h[b]=h[b]||a}));q=new Date(h[0]||1970,h[1]||0,h[2]||1,h[3]||0,h[4]||0,h[5]||0,h[6]||0);100>h[0]&&q.setFullYear(h[0]||1970);var g=0,d=h[7]&&h[7].charAt(0);"Z"!=d&&(g=60*(h[8]||0)+(Number(h[9])||0),"-"!=d&&(g*=-1));d&&(g-=q.getTimezoneOffset());g&&q.setTime(q.getTime()+6E4*g)}return q};a.toISOString=function(a,l){var h=function(a){return 10>
641a?"0"+a:a};l=l||{};var q=[],g=l.zulu?"getUTC":"get",d="";"time"!=l.selector&&(d=a[g+"FullYear"](),d=["0000".substr((d+"").length)+d,h(a[g+"Month"]()+1),h(a[g+"Date"]())].join("-"));q.push(d);if("date"!=l.selector){d=[h(a[g+"Hours"]()),h(a[g+"Minutes"]()),h(a[g+"Seconds"]())].join(":");g=a[g+"Milliseconds"]();l.milliseconds&&(d+="."+(100>g?"0":"")+h(g));if(l.zulu)d+="Z";else if("time"!=l.selector)var g=a.getTimezoneOffset(),c=Math.abs(g),d=d+((0<g?"-":"+")+h(Math.floor(c/60))+":"+h(c%60));q.push(d)}return q.join("T")};
642return a})},"esri/layers/GridLayout":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../SpatialReference ../geometry/Extent ../geometry/Polyline".split(" "),function(p,n,a,e,l,h,q,g){p=p(null,{declaredClass:"esri.layers._GridLayout",constructor:function(a,c,b,f){this.origin=a;this.cellWidth=c.width;this.cellHeight=c.height;this.mapWidth=b.width;this.mapHeight=b.height;this.srInfo=f},setResolution:function(a){this._resolution=(a.xmax-a.xmin)/this.mapWidth;
643this.srInfo&&(a=Math.round(2*this.srInfo.valid[1]/this._resolution),a=Math.round(a/this.cellWidth),this._frameStats=[a,0,a-1])},getCellCoordinates:function(a){var c=this._resolution,b=this.origin;return{row:Math.floor((b.y-a.y)/(this.cellHeight*c)),col:Math.floor((a.x-b.x)/(this.cellWidth*c))}},normalize:function(a){var c=this._frameStats;if(c){var b=c[0],f=c[1],c=c[2];a<f?(a%=b,a=a<f?a+b:a):a>c&&(a%=b)}return a},intersects:function(d,c){var b=this.srInfo;return b?a.some(c._getParts(b),function(a){return d.intersects(a.extent)}):
644d.intersects(c)},getCellExtent:function(a,c){var b=this._resolution,f=this.origin,m=this.cellWidth,g=this.cellHeight;return new q(c*m*b+f.x,f.y-(a+1)*g*b,(c+1)*m*b+f.x,f.y-a*g*b,new h(f.spatialReference.toJson()))},getLatticeID:function(a){var c=this.getCellCoordinates({x:a.xmin,y:a.ymax}),b=this.getCellCoordinates({x:a.xmax,y:a.ymin});a=c.row;var f=b.row,c=this.normalize(c.col),b=this.normalize(b.col);return a+"_"+f+"_"+c+"_"+b},sorter:function(a,c){return a<c?-1:1},getCellsInExtent:function(a,c){var b=
645this.getCellCoordinates({x:a.xmin,y:a.ymax}),f=this.getCellCoordinates({x:a.xmax,y:a.ymin}),m=b.row,e=f.row,b=b.col,f=f.col,s=[],k,r,u,h=[],l=[],q,n,p,B=[];for(k=m;k<=e;k++)for(r=b;r<=f;r++)u=this.normalize(r),a=this.getCellExtent(k,u),s.push({row:k,col:u,extent:a,resolution:this._resolution}),c&&(h.push(a.xmin,a.xmax),l.push(a.ymin,a.ymax));b=this.normalize(b);f=this.normalize(f);h.sort(this.sorter);l.sort(this.sorter);r=h.length;for(k=r-1;0<=k;k--)k<r-1&&h[k]===h[k+1]&&h.splice(k,1);r=l.length;
646for(k=r-1;0<=k;k--)k<r-1&&l[k]===l[k+1]&&l.splice(k,1);if(h.length&&l.length){u=h[0];q=h[h.length-1];n=l[0];p=l[l.length-1];r=h.length;for(k=0;k<r;k++)B.push([[h[k],p],[h[k],n]]);r=l.length;for(k=0;k<r;k++)B.push([[u,l[k]],[q,l[k]]]);k=new g({paths:B,spatialReference:this.origin.spatialReference.toJson()});s.push({latticeID:m+"_"+e+"_"+b+"_"+f,lattice:k,resolution:this._resolution})}return{minRow:m,maxRow:e,minCol:b,maxCol:f,cells:s}}});e("extend-esri")&&n.setObject("layers._GridLayout",p,l);return p})},
647"esri/layers/FeatureTemplate":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../graphic".split(" "),function(p,n,a,e,l,h){p=p(null,{declaredClass:"esri.layers.FeatureTemplate",constructor:function(a){a&&n.isObject(a)&&(this.name=a.name,this.description=a.description,this.drawingTool=a.drawingTool,a=a.prototype,this.prototype=new h(a.geometry,null,a.attributes))},toJson:function(){return l.fixJson({name:this.name,description:this.description,drawingTool:this.drawingTool,
648prototype:this.prototype&&this.prototype.toJson()})}});n.mixin(p,{TOOL_AUTO_COMPLETE_POLYGON:"esriFeatureEditToolAutoCompletePolygon",TOOL_CIRCLE:"esriFeatureEditToolCircle",TOOL_ELLIPSE:"esriFeatureEditToolEllipse",TOOL_FREEHAND:"esriFeatureEditToolFreehand",TOOL_LINE:"esriFeatureEditToolLine",TOOL_NONE:"esriFeatureEditToolNone",TOOL_POINT:"esriFeatureEditToolPoint",TOOL_POLYGON:"esriFeatureEditToolPolygon",TOOL_RECTANGLE:"esriFeatureEditToolRectangle",TOOL_ARROW:"esriFeatureEditToolArrow",TOOL_TRIANGLE:"esriFeatureEditToolTriangle",
649TOOL_LEFT_ARROW:"esriFeatureEditToolLeftArrow",TOOL_RIGHT_ARROW:"esriFeatureEditToolRightArrow",TOOL_UP_ARROW:"esriFeatureEditToolUpArrow",TOOL_DOWN_ARROW:"esriFeatureEditToolDownArrow"});a("extend-esri")&&n.setObject("layers.FeatureTemplate",p,e);return p})},"dojox/gfx/_base":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/Color dojo/_base/sniff dojo/_base/window dojo/_base/array dojo/dom dojo/dom-construct dojo/dom-geometry".split(" "),function(p,n,a,e,l,h,q,g,d){var c=n.getObject("dojox.gfx",
650!0),b=c._base={};c._hasClass=function(a,b){var c=a.getAttribute("className");return c&&0<=(" "+c+" ").indexOf(" "+b+" ")};c._addClass=function(a,b){var c=a.getAttribute("className")||"";if(!c||0>(" "+c+" ").indexOf(" "+b+" "))a.setAttribute("className",c+(c?" ":"")+b)};c._removeClass=function(a,b){var c=a.getAttribute("className");c&&a.setAttribute("className",c.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)"),"$1$2"))};b._getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,
651"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},b,c;e("ie")&&(c=l.doc.documentElement.style.fontSize||"",c||(l.doc.documentElement.style.fontSize="100%"));var d=g.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},l.body());for(b in a)d.style.fontSize=b,a[b]=16*Math.round(12*d.offsetHeight/16)/12/1E3;e("ie")&&(l.doc.documentElement.style.fontSize=c);l.body().removeChild(d);
652return a};var f=null;
652b._getCachedFontMeasurements=function(a){if(a||!f)f=b._getFontMeasurements();return f};var m=null,t={};b._getTextBox=function(a,b,c){var f,s,e=arguments.length,h;m||(m=g.create("div",{style:{position:"absolute",top:"-10000px",left:"0",visibility:"hidden"}},l.body()));f=m;f.className="";s=f.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(1<e&&b)for(h in b)h in t||(s[h]=b[h]);2<e&&c&&(f.className=c);f.innerHTML=a;f.getBoundingClientRect?(s=f.getBoundingClientRect(),
653s={l:s.left,t:s.top,w:s.width||s.right-s.left,h:s.height||s.bottom-s.top}):s=d.getMarginBox(f);f.innerHTML="";return s};b._computeTextLocation=function(a,b,c,d){var f={};switch(a.align){case "end":f.x=a.x-b;break;case "middle":f.x=a.x-b/2;break;default:f.x=a.x}f.y=a.y-c*(d?0.75:1);return f};b._computeTextBoundingBox=function(a){if(!c._base._isRendered(a))return{x:0,y:0,width:0,height:0};var d;d=a.getShape();var f=a.getFont()||c.defaultFont;a=a.getTextWidth();f=c.normalizedLength(f.size);d=b._computeTextLocation(d,
654a,f,!0);return{x:d.x,y:d.y,width:a,height:f}};b._isRendered=function(a){for(a=a.parent;a&&a.getParent;)a=a.parent;return null!==a};var s=0;b._getUniqueId=function(){var a;do a=p._scopeName+"xUnique"+ ++s;while(q.byId(a));return a};b._fixMsTouchAction=function(a){a=a.rawNode;"undefined"!=typeof a.style.msTouchAction&&(a.style.msTouchAction="none")};n.mixin(c,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",
655cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,
656x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var a={};return function(b){var d=a[b];if(d)return new d;d=a[b]=new Function;d.prototype=c["default"+b];return new d}}(),normalizeColor:function(b){return b instanceof
657a?b:new a(b)},normalizeParameters:function(a,b){var c;if(b){var d={};for(c in a)c in b&&!(c in d)&&(a[c]=b[c])}return a},makeParameters:function(a,b){var c=null;if(!b)return n.delegate(a);var d={};for(c in a)c in d||(d[c]=n.clone(c in b?b[c]:a[c]));return d},formatNumber:function(a,b){var c=a.toString();if(0<=c.indexOf("e"))c=a.toFixed(4);else{var d=c.indexOf(".");0<=d&&5<c.length-d&&(c=a.toFixed(4))}return 0>a?c:b?" "+c:c},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+
658a.size+" "+a.family},splitFontString:function(a){var b=c.getDefault("Font");a=a.split(/\s+/);if(!(5>a.length)){b.style=a[0];b.variant=a[1];b.weight=a[2];var d=a[3].indexOf("/");b.size=0>d?a[3]:a[3].substring(0,d);var f=4;0>d&&("/"==a[4]?f=6:"/"==a[4].charAt(0)&&(f=5));f<a.length&&(b.family=a.slice(f).join(" "))}return b},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return c._base._getCachedFontMeasurements()["12pt"]/12},pt2px:function(a){return a*c.px_in_pt()},px2pt:function(a){return a/
659c.px_in_pt()},normalizedLength:function(a){if(0===a.length)return 0;if(2<a.length){var b=c.px_in_pt(),d=parseFloat(a);switch(a.slice(-2)){case "px":return d;case "pt":return d*b;case "in":return 72*d*b;case "pc":return 12*d*b;case "mm":return d*c.mm_in_pt*b;case "cm":return d*c.cm_in_pt*b}}return parseFloat(a)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,equalSources:function(a,b){return a&&b&&a===
660b},switchTo:function(a){var b="string"==typeof a?c[a]:a;
660b&&(h.forEach("Group Rect Ellipse Circle Line Polyline Image Text Path TextPath EsriPath Surface createSurface fixTarget".split(" "),function(a){c[a]=b[a]}),"string"==typeof a?c.renderer=a:h.some(["svg","vml","canvas","canvasWithEvents","silverlight"],function(a){return c.renderer=c[a]&&c[a].Surface===c.Surface?a:null}))}});return c})},"esri/IdentityManagerBase":function(){define("dojo/_base/declare dojo/_base/config dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/_base/url dojo/sniff dojo/cookie dojo/io-query dojo/regexp ./kernel ./config ./lang ./ServerInfo ./urlUtils ./deferredUtils ./request ./Evented ./OAuthCredential ./arcgis/OAuthInfo".split(" "),
661function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z){var w={},y=function(a){var b=(new q(a.owningSystemUrl)).host;a=(new q(a.server)).host;var c=/.+\.arcgis\.com$/i;return c.test(b)&&c.test(a)},B=function(a,b){return!(!y(a)||!b||!e.some(b,function(b){return b.test(a.server)}))},G,D=p(x,{declaredClass:"esri.IdentityManagerBase",constructor:function(){this._portalConfig=a.getObject("esriGeowConfig");this.serverInfos=[];this.oAuthInfos=[];this.credentials=[];this._soReqs=[];this._xoReqs=[];this._portals=
662[];this._getOAuthHash()},defaultTokenValidity:60,tokenValidity:null,signInPage:null,useSignInPage:!0,normalizeWebTierAuth:!1,_busy:null,_oAuthHash:null,_gwTokenUrl:"/sharing/generateToken",_agsRest:"/rest/services",_agsPortal:/\/sharing(\/|$)/i,_agsAdmin:/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i,_adminSvcs:/\/admin\/services(\/|$)/i,_agolSuffix:".arcgis.com",_gwDomains:[{regex:/https?:\/\/www\.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/dev\.arcgis\.com/i,
663tokenServiceUrl:"https://dev.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*dev[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://devext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*qa[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://qaext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"}],_legacyFed:[],_regexSDirUrl:/http.+\/rest\/services\/?/ig,_regexServerType:/(\/(MapServer|GeocodeServer|GPServer|GeometryServer|ImageServer|NAServer|FeatureServer|GeoDataServer|GlobeServer|MobileServer|GeoenrichmentServer|VectorTileServer)).*/ig,
664_gwUser:/http.+\/users\/([^\/]+)\/?.*/i,_gwItem:/http.+\/items\/([^\/]+)\/?.*/i,_gwGroup:/http.+\/groups\/([^\/]+)\/?.*/i,_errorCodes:[499,498,403,401],_rePortalTokenSvc:/\/sharing(\/rest)?\/generatetoken/i,_publicUrls:[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],registerServers:function(a){var b=this.serverInfos;b?(a=e.filter(a,function(a){return!this.findServerInfo(a.server)},this),this.serverInfos=b.concat(a)):this.serverInfos=a;e.forEach(a,function(a){a.owningSystemUrl&&
665this._portals.push(a.owningSystemUrl);if(a.hasPortal){this._portals.push(a.server);var b=m.defaults.io.corsEnabledServers,c=this._getOrigin(a.tokenServiceUrl);k.canUseXhr(a.server)||b.push(a.server.replace(/^https?:\/\//i,""));k.canUseXhr(c)||b.push(c.replace(/^https?:\/\//i,""))}},this)},registerOAuthInfos:function(a){var b=this.oAuthInfos;b?(a=e.filter(a,function(a){return!this.findOAuthInfo(a.portalUrl)},this),this.oAuthInfos=b.concat(a)):this.oAuthInfos=a},registerToken:function(b){var c=this._sanitizeUrl(b.server),
666d=this.findServerInfo(c),k=!0,f;d||(d=new s,d.server=this._getServerInstanceRoot(c),d.tokenServiceUrl=this._getTokenSvcUrl(c),d.hasPortal=!0,this.registerServers([d]));(f=this.findCredential(c,b.userId))?(a.mixin(f,b),k=!1):(f=new G({userId:b.userId,server:d.server,token:b.token,expires:b.expires,ssl:b.ssl,scope:this._isServerRsrc(c)?"server":"portal"}),f.resources=[c],this.credentials.push(f));f.onTokenChange(!1);k||f.refreshServerTokens()},toJson:function(){return t.fixJson({serverInfos:e.map(this.serverInfos,
667function(a){return a.toJson()}),oAuthInfos:e.map(this.oAuthInfos,function(a){return a.toJson()}),credentials:e.map(this.credentials,function(a){return a.toJson()})})},initialize:function(b){if(b){a.isString(b)&&(b=h.fromJson(b));var c=b.serverInfos,d=b.oAuthInfos;b=b.credentials;if(c){var k=[];e.forEach(c,function(a){a.server&&a.tokenServiceUrl&&k.push(a.declaredClass?a:new s(a))});k.length&&this.registerServers(k)}if(d){var f=[];e.forEach(d,function(a){a.appId&&f.push(a.declaredClass?a:new z(a))});
668f.length&&this.registerOAuthInfos(f)}b&&e.forEach(b,function(a){a.userId&&(a.server&&a.token&&a.expires&&a.expires>(new Date).getTime())&&(a=a.declaredClass?a:new G(a),a.onTokenChange(),this.credentials.push(a))},this)}},findServerInfo:function(a){var b;a=this._sanitizeUrl(a);e.some(this.serverInfos,function(c){this._hasSameServerInstance(c.server,a)&&(b=c);return!!b},this);return b},findOAuthInfo:function(a){var b;a=this._sanitizeUrl(a);e.some(this.oAuthInfos,function(c){this._hasSameServerInstance(c.portalUrl,
669a)&&(b=c);return!!b},this);return b},findCredential:function(a,b){var c,d;a=this._sanitizeUrl(a);
669d=this._isServerRsrc(a)?"server":"portal";b?e.some(this.credentials,function(k){this._hasSameServerInstance(k.server,a)&&(b===k.userId&&k.scope===d)&&(c=k);return!!c},this):e.some(this.credentials,function(b){this._hasSameServerInstance(b.server,a)&&(-1!==this._getIdenticalSvcIdx(a,b)&&b.scope===d)&&(c=b);return!!c},this);return c},getCredential:function(b,c){var d,k,f=!0;t.isDefined(c)&&(a.isObject(c)?
670(d=!!c.token,k=c.error,f=!1!==c.prompt):d=c);b=this._sanitizeUrl(b);var m=new l(r._dfdCanceller),g=this._isAdminResource(b),e=d&&this._doPortalSignIn(b)?this._getEsriAuthCookie():null;d=d?this.findCredential(b):null;if(e||d)return f=Error("You are currently signed in as: '"+(e&&e.email||d&&d.userId)+"'. You do not have access to this resource: "+b),f.code="IdentityManagerBase.1",f.httpCode=k&&k.httpCode,f.messageCode=k?k.messageCode:null,f.subcode=k?k.subcode:null,f.details=k?k.details:null,f.log=
671n.isDebug,m.errback(f),m;if(k=this._findCredential(b,c))return m.callback(k),m;if(k=this.findServerInfo(b))!k.hasServer&&this._isServerRsrc(b)&&(k._restInfoDfd=this._getTokenSvcUrl(b,!0),k.hasServer=!0);else{e=this._getTokenSvcUrl(b);if(!e)return f=Error("Unknown resource - could not find token service endpoint."),f.code="IdentityManagerBase.2",f.log=n.isDebug,m.errback(f),m;k=new s;k.server=this._getServerInstanceRoot(b);a.isString(e)?(k.tokenServiceUrl=e,f&&!this._findOAuthInfo(b)&&(k._selfDfd=
672this._getPortalSelf(e.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),b)),k.hasPortal=!0):(k._restInfoDfd=e,k.hasServer=!0);this.registerServers([k])}return this._enqueue(b,k,c,m,g)},getResourceName:function(a){return this._isRESTService(a)?a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(a)&&a.replace(this._gwUser,"$1")||this._gwItem.test(a)&&a.replace(this._gwItem,"$1")||this._gwGroup.test(a)&&a.replace(this._gwGroup,"$1")||""},generateToken:function(b,
673c,d){var r,m,s,g,e,h,l=this._rePortalTokenSvc.test(b.tokenServiceUrl),t=new q(window.location.href.toLowerCase()),v=this._getEsriAuthCookie(),x,p=!c;g=b.shortLivedTokenValidity;var y;c&&(y=f.id.tokenValidity||g||f.id.defaultTokenValidity,y>g&&(y=g));d&&(r=d.isAdmin,m=d.serverUrl,s=d.token,h=d.ssl,b.customParameters=d.customParameters);if(r)g=b.adminTokenServiceUrl;else{g=b.tokenServiceUrl;e=new q(g.toLowerCase());v&&(x=(x=v.auth_tier)&&x.toLowerCase());if(("web"===x||b.webTierAuth)&&d&&d.serverUrl&&
674!h&&"http"===t.scheme&&(k.hasSameOrigin(t.uri,g,!0)||"https"===e.scheme&&t.host===e.host&&"7080"===t.port&&"7443"===e.port))g=g.replace(/^https:/i,"http:").replace(/:7443/i,":7080");p&&l&&(g=g.replace(/\/rest/i,""))}r=a.mixin({url:g,content:a.mixin({request:"getToken",username:c&&c.username,password:c&&c.password,serverUrl:m,token:s,expiration:y,referer:r||l?window.location.host:null,client:r?"referer":null,f:"json"},b.customParameters),handleAs:"json",callbackParamName:p?"callback":void 0},d&&d.ioArgs);
675d={usePost:!p,disableIdentityLookup:!0,useProxy:this._useProxy(b,d)};l||(r.withCredentials=!1);l=u(r,d);l.addCallback(function(a){if(!a||!a.token)return a=Error("Unable to generate token"),a.code="IdentityManagerBase.3",a.log=n.isDebug,a;var d=b.server;w[d]||(w[d]={});c&&(w[d][c.username]=c.password);a.validity=y;return a});l.addErrback(function(a){});return l},isBusy:function(){return!!this._busy},checkSignInStatus:function(a){return this.getCredential(a,{prompt:!1})},setRedirectionHandler:function(a){this._redirectFunc=
676a},setProtocolErrorHandler:function(a){this._protocolFunc=a},signIn:function(){},oAuthSignIn:function(){},onCredentialCreate:function(){},onCredentialsDestroy:function(){},destroyCredentials:function(){if(this.credentials){var a=this.credentials.slice();e.forEach(a,function(a){a.destroy()})}this.onCredentialsDestroy()},_getOAuthHash:function(){var a=window.location.hash;if(a){"#"===a.charAt(0)&&(a=a.substring(1));var a=c.queryToObject(a),b=!1;a.access_token&&a.expires_in&&a.state&&a.hasOwnProperty("username")?
677(a.state=h.fromJson(a.state),this._oAuthHash=a,b=!0):a.error&&a.error_description&&(console.log("IdentityManager OAuth Error: ",a.error," - ",a.error_description),"access_de
677nied"===a.error&&(b=!0));if(b&&(!g("ie")||8<g("ie")))window.location.hash=""}},_findCredential:function(a,b){var c=-1,d,k,f,r,m=b&&b.token;d=b&&b.resource;var s=this._isServerRsrc(a)?"server":"portal",g=e.filter(this.credentials,function(b){return this._hasSameServerInstance(b.server,a)&&b.scope===s},this);a=d||a;if(g.length)if(1===
678g.length)if(d=g[0],f=(k=(r=this.findServerInfo(d.server))&&r.owningSystemUrl)&&this.findCredential(k,d.userId),c=this._getIdenticalSvcIdx(a,d),m)-1!==c&&(d.resources.splice(c,1),this._removeResource(a,f));else return-1===c&&d.resources.push(a),this._addResource(a,f),d;else{var h,l;e.some(g,function(b){l=this._getIdenticalSvcIdx(a,b);return-1!==l?(h=b,f=(k=(r=this.findServerInfo(h.server))&&r.owningSystemUrl)&&this.findCredential(k,h.userId),c=l,!0):!1},this);if(m)h&&(h.resources.splice(c,1),this._removeResource(a,
679f));else if(h)return this._addResource(a,f),h}},_findOAuthInfo:function(a){var b=this.findOAuthInfo(a);b||e.some(this.oAuthInfos,function(c){this._isIdProvider(c.portalUrl,a)&&(b=c);return!!b},this);return b},_addResource:function(a,b){b&&-1===this._getIdenticalSvcIdx(a,b)&&b.resources.push(a)},_removeResource:function(a,b){var c=-1;b&&(c=this._getIdenticalSvcIdx(a,b),-1<c&&b.resources.splice(c,1))},_useProxy:function(a,b){return b&&b.isAdmin&&!k.hasSameOrigin(a.adminTokenServiceUrl,window.location.href)||
680!this._isPortalDomain(a.tokenServiceUrl)&&10.1==a.currentVersion&&!k.hasSameOrigin(a.tokenServiceUrl,window.location.href)},_getOrigin:function(a){a=new q(a);return a.scheme+"://"+a.host+(t.isDefined(a.port)?":"+a.port:"")},_getServerInstanceRoot:function(a){var b=a.toLowerCase(),c=b.indexOf(this._agsRest);-1===c&&this._isAdminResource(a)&&(c=b.indexOf("/admin"));-1===c&&(c=b.indexOf("/sharing"));-1===c&&"/"===b.substr(-1)&&(c=b.length-1);return-1<c?a.substring(0,c):a},_hasSameServerInstance:function(a,
681b){a=a.toLowerCase();b=this._getServerInstanceRoot(b).toLowerCase();a=a.substr(a.indexOf(":"));b=b.substr(b.indexOf(":"));return a===b},_sanitizeUrl:function(b){b=k.fixUrl(a.trim(b));var c=(m.defaults.io.proxyUrl||"").toLowerCase(),d=c?b.toLowerCase().indexOf(c+"?"):-1;-1!==d&&(b=b.substring(d+c.length+1));return k.urlToObject(b).path},_isRESTService:function(a){return-1<a.indexOf(this._agsRest)},_isAdminResource:function(a){return this._agsAdmin.test(a)||this._adminSvcs.test(a)},_isServerRsrc:function(a){return this._isRESTService(a)||
682this._isAdminResource(a)},_isIdenticalService:function(a,b){var c;if(this._isRESTService(a)&&this._isRESTService(b)){var d=this._getSuffix(a).toLowerCase(),k=this._getSuffix(b).toLowerCase();c=d===k;c||(c=/(.*)\/(MapServer|FeatureServer).*/ig,c=d.replace(c,"$1")===k.replace(c,"$1"))}else this._isAdminResource(a)&&this._isAdminResource(b)?c=!0:!this._isServerRsrc(a)&&(!this._isServerRsrc(b)&&this._isPortalDomain(a))&&(c=!0);return c},_isPortalDomain:function(b){b=b.toLowerCase();var c=(new q(b)).authority,
683d=this._portalConfig,k=-1!==c.indexOf(this._agolSuffix);!k&&d&&(k=this._hasSameServerInstance(this._getServerInstanceRoot(d.restBaseUrl),b));if(!k){if(!this._arcgisUrl&&(d=a.getObject("esri.arcgis.utils.arcgisUrl")))this._arcgisUrl=(new q(d)).authority;this._arcgisUrl&&(k=this._arcgisUrl.toLowerCase()===c)}k||(k=e.some(this._portals,function(a){return this._hasSameServerInstance(a,b)},this));return k=k||this._agsPortal.test(b)},_isIdProvider:function(a,b){var c=-1,d=-1;e.forEach(this._gwDomains,function(k,
684f){-1===c&&k.regex.test(a)&&(c=f);-1===d&&k.regex.test(b)&&(d=f)});var k=!1;if(-1<c&&-1<d)if(0===c||4===c){if(0===d||4===d)k=!0}else if(1===c){if(1===d||2===d)k=!0}else 2===c?2===d&&(k=!0):3===c&&3===d&&(k=!0);if(!k){var f=this.findServerInfo(b),r=f&&f.owningSystemUrl;r&&(y(f)&&this._isPortalDomain(r)&&this._isIdProvider(a,r))&&(k=!0)}return k},_isPublic:function(a){a=this._sanitizeUrl(a);return e.some(this._publicUrls,function(b){return b.test(a)})},_getIdenticalSvcIdx:function(a,b){var c=-1;e.some(b.resources,
685function(b,d){return this._isIdenticalService(a,b)?(c=d,!0):!1},this);return c},_getSuffix:function(a){return a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")},_getTokenSvcUrl:function(a){var b,c;if((b=this._isRESTService(a))||this._isAdminResource(a))return c=a.toLowerCase().indexOf(b?this._agsRest:"/admin/"),b=
685a.substring(0,c)+"/admin/generateToken",a=a.substring(0,c)+"/rest/info",c=u({url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}),c.adminUrl_=b,c;if(this._isPortalDomain(a)){var d=
686"";e.some(this._gwDomains,function(b){b.regex.test(a)&&(d=b.tokenServiceUrl);return!!d});d||e.some(this._portals,function(b){this._hasSameServerInstance(b,a)&&(d=b+this._gwTokenUrl);return!!d},this);d||(c=a.toLowerCase().indexOf("/sharing"),-1!==c&&(d=a.substring(0,c)+this._gwTokenUrl));d||(d=this._getOrigin(a)+this._gwTokenUrl);d&&(b=(new q(a)).port,/^http:\/\//i.test(a)&&"7080"===b&&(d=d.replace(/:7080/i,":7443")),d=d.replace(/http:/i,"https:"));return d}if(-1!==a.toLowerCase().indexOf("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"},
687_getPortalSelf:function(a,b){"https:"===window.location.protocol?a=a.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(b)&&(a=a.replace(/^https:/i,"http:").replace(/:7443/i,":7080"));return u({url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback"},{crossOrigin:!1,disableIdentityLookup:!0})},_hasPortalSession:function(){return!!this._getEsriAuthCookie()},_getEsriAuthCookie:function(){var a;if(d.isSupported()){var b=this._getAllCookies("esri_auth"),c;for(c=0;c<b.length;c++){var k=
688h.fromJson(b[c]);if(k.portalApp){a=k;break}}}return a},_getAllCookies:function(a){var c=[],d=document.cookie.match(RegExp("(?:^|; )"+b.escapeString(a)+"\x3d([^;]*)","g"));if(d)for(a=0;a<d.length;a++){var k=d[a],f=k.indexOf("\x3d");-1<f&&(k=k.substring(f+1),c.push(decodeURIComponent(k)))}return c},_doPortalSignIn:function(a){if(d.isSupported()){var b=this._getEsriAuthCookie(),c=this._portalConfig,f=window.location.href,r=this.findServerInfo(a);if(this.useSignInPage&&(c||this._isPortalDomain(f)||b)&&
689(r?r.hasPortal||r.owningSystemUrl&&this._isPortalDomain(r.owningSystemUrl):this._isPortalDomain(a))&&(this._isIdProvider(f,a)||c&&(this._hasSameServerInstance(this._getServerInstanceRoot(c.restBaseUrl),a)||this._isIdProvider(c.restBaseUrl,a))||k.hasSameOrigin(f,a,!0)))return!0}return!1},_checkProtocol:function(b,c,d,f){var r=!0;f=f?c.adminTokenServiceUrl:c.tokenServiceUrl;if(0===a.trim(f).toLowerCase().indexOf("https:")&&0!==window.location.href.toLowerCase().indexOf("https:")&&(!m.defaults.io.useCors||
690!k.canUseXhr(f)&&!k.canUseXhr(k.getProxyUrl(!0).path)))r=this._protocolFunc?!!this._protocolFunc({resourceUrl:b,serverInfo:c}):!1,r||(b=Error("Aborted the Sign-In process to avoid sending password over insecure connection."),b.code="IdentityManagerBase.4",b.log=n.isDebug,console.log(b.message),d(b));return r},_enqueue:function(a,b,c,d,k,f){d||(d=new l(r._dfdCanceller));d.resUrl_=a;d.sinfo_=b;d.options_=c;d.admin_=k;d.refresh_=f;this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(a),
691this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(d)):this._xoReqs.push(d):this._doSignIn(d);return d},_doSignIn:function(b){this._busy=b;var c=this,d=function(a){var d=b.options_&&b.options_.resource,k=b.resUrl_,f=b.refresh_,r=!1;-1===e.indexOf(c.credentials,a)&&(f&&-1!==e.indexOf(c.credentials,f)?(f.userId=a.userId,f.token=a.token,f.expires=a.expires,f.validity=a.validity,f.ssl=a.ssl,f.creationTime=a.creationTime,r=!0,a=f):c.credentials.push(a));
692a.resources||(a.resources=[]);a.resources.push(d||k);a.scope=c._isServerRsrc(k)?"server":"portal";a.onTokenChange();var d=c._soReqs,m={};c._soReqs=[];e.forEach(d,function(b){if(!this._isIdenticalService(k,b.resUrl_)){var c=this._getSuffix(b.resUrl_);m[c]||(m[c]=!0,a.resources.push(b.resUrl_))}},c);b.callback(a);e.forEach(d,function(b){b.callback(a)});c._busy=b.resUrl_=b.sinfo_=b.refresh_=null;if(!r)c.onCredentialCreate({credential:a});c._soReqs.length&&c._doSignIn(c._soReqs.shift());c._xoReqs.length&&
693c._doSignIn(c._xoReqs.shift())},k=function(a){b.errback(a);c._busy=b.resUrl_=b.sinfo_=b.refresh_=null;c._soReqs.length&&c._doSignIn(c._soReqs.shift());c._xoReqs.length&&c._doSignIn(c._xoReqs.shift())}
693,f=function(a,f,r,m){var s=b.sinfo_,g=!b.options_||!1!==b.options_.prompt;c._doPortalSignIn(b.resUrl_)?(f=c._getEsriAuthCookie(),a=c._portalConfig,f?d(new G({userId:f.email,server:s.server,token:f.token,expires:null})):g?(g="",f=window.location.href,g=c.signInPage?c.signInPage:a?a.baseUrl+a.signin:c._isIdProvider(f,
694b.resUrl_)?c._getOrigin(f)+"/home/signin.html":s.tokenServiceUrl.replace(c._rePortalTokenSvc,"")+"/home/signin.html",g=g.replace(/http:/i,"https:"),a&&!1===a.useSSL&&(g=g.replace(/https:/i,"http:")),0===f.toLowerCase().replace("https","http").indexOf(g.toLowerCase().replace("https","http"))?(s=Error("Cannot redirect to Sign-In page from within Sign-In page. URL of the resource that triggered this workflow: "+b.resUrl_),s.code="IdentityManagerBase.5",s.log=n.isDebug,k(s)):c._redirectFunc?c._redirectFunc({signInPage:g,
695returnUrlParamName:"returnUrl",returnUrl:f,resourceUrl:b.resUrl_,serverInfo:s}):window.location=g+"?returnUrl\x3d"+window.escape(f)):(s=Error("User is not signed in."),s.code="IdentityManagerBase.6",s.log=n.isDebug,k(s))):a?d(new G({userId:a,server:s.server,token:r,expires:t.isDefined(m)?Number(m):null,ssl:!!f})):h?(a=h._oAuthCred,a||(f=new v(h,window.localStorage),r=new v(h,window.sessionStorage),f.isValid()&&r.isValid()?f.expires>r.expires?(a=f,r.destroy()):(a=r,f.destroy()):a=f.isValid()?f:r,h._oAuthCred=
696a),a.isValid()?d(new G({userId:a.userId,server:s.server,token:a.token,expires:a.expires,ssl:a.ssl,_oAuthCred:a})):c._oAuthHash&&c._oAuthHash.state.portalUrl===h.portalUrl?(g=c._oAuthHash,s=new G({userId:g.username,server:s.server,token:g.access_token,expires:(new Date).getTime()+1E3*Number(g.expires_in),ssl:"true"===g.ssl,oAuthState:g.state,_oAuthCred:a}),a.storage=g.persist?window.localStorage:window.sessionStorage,a.token=s.token,a.expires=s.expires,a.userId=s.userId,a.ssl=s.ssl,a.save(),c._oAuthHash=
697null,d(s)):g?b._pendingDfd=c.oAuthSignIn(b.resUrl_,s,h,b.options_).addCallbacks(d,k):(s=Error("User is not signed in."),s.code="IdentityManagerBase.6",s.log=n.isDebug,k(s))):g?c._checkProtocol(b.resUrl_,s,k,b.admin_)&&(g=b.options_,b.admin_&&(g=g||{},g.isAdmin=!0),b._pendingDfd=c.signIn(b.resUrl_,s,g).addCallbacks(d,k)):(s=Error("User is not signed in."),s.code="IdentityManagerBase.6",s.log=n.isDebug,k(s))},r=function(){var a=b.sinfo_,f=a.owningSystemUrl,r=b.options_,m,s,g;r&&(m=r.token,s=r.error);
698g=c._findCredential(f,{token:m,resource:b.resUrl_});!g&&y(a)&&e.some(c.credentials,function(a){this._isIdProvider(f,a.server)&&(g=a);return!!g},c);g?(r=c.findCredential(b.resUrl_,g.userId))?d(r):B(a,c._legacyFed)?(r=g.toJson(),r.server=a.server,r.resources=null,d(new G(r))):(b._pendingDfd=c.generateToken(c.findServerInfo(g.server),null,{serverUrl:b.resUrl_,token:g.token,ssl:g.ssl})).addCallbacks(function(c){d(new G({userId:g.userId,server:a.server,token:c.token,expires:t.isDefined(c.expires)?Number(c.expires):
699null,ssl:!!c.ssl,isAdmin:b.admin_,validity:c.validity}))},k):(c._busy=null,m&&(b.options_.token=null),(b._pendingDfd=c.getCredential(f.replace(/\/?$/,"/sharing"),{resource:b.resUrl_,token:m,error:s})).addCallbacks(function(a){c._enqueue(b.resUrl_,b.sinfo_,b.options_,b,b.admin_)},function(a){k(a)}))},m=b.sinfo_.owningSystemUrl,s=this._isServerRsrc(b.resUrl_),g=b.sinfo_._restInfoDfd,h=this._findOAuthInfo(b.resUrl_);g?g.addCallbacks(function(d){var k=b.sinfo_;k.adminTokenServiceUrl=k._restInfoDfd.adminUrl_;
700k._restInfoDfd=null;k.tokenServiceUrl=a.getObject("authInfo.tokenServicesUrl",!1,d)||a.getObject("authInfo.tokenServiceUrl",!1,d)||a.getObject("tokenServiceUrl",!1,d);k.shortLivedTokenValidity=a.getObject("authInfo.shortLivedTokenValidity",!1,d);k.currentVersion=d.currentVersion;k.owningTenant=d.owningTenant;(d=k.owningSystemUrl=d.owningSystemUrl)&&c._portals.push(d);s&&d?r():f()},function(){b.sinfo_._restInfoDfd=null;var a=Error("Unknown resource - could not find token service endpoint.");a.code=
701"IdentityManagerBase.2";a.log=n.isDebug;k(a)}):s&&m?r():b.sinfo_._selfDfd?(m=function(a){b.sinfo_._selfDfd=null;var d=a&&a.user&&a.user.username,k=a&&a.allSSL;b.sinfo_.webTierAuth=!!d;d&&c.normalizeWebTierAuth?(b.sinfo_._tokenDfd=c.generateToken(b.sinfo_,null,{ssl:k}),a=function(a){b.sinfo_._tokenDfd=null;f(d,k,a&&a.token,a&&a.expires)},b.sinfo_._tokenDfd.then(a,a)):f(d,k)}
701,b.sinfo_._selfDfd.then(m,m)):f()}});G=p(x,{declaredClass:"esri.Credential",tokenRefreshBuffer:2,constructor:function(b){a.mixin(this,
702b);this.resources=this.resources||[];t.isDefined(this.creationTime)||(this.creationTime=(new Date).getTime())},_oAuthCred:null,refreshToken:function(){var a=this,b=this.resources&&this.resources[0],c=f.id.findServerInfo(this.server),d=c&&c.owningSystemUrl,k=!!d&&"server"===this.scope,r=k&&B(c,f.id._legacyFed),m=k&&f.id.findServerInfo(d),s,g=(s=c.webTierAuth)&&f.id.normalizeWebTierAuth,h=w[this.server],h=h&&h[this.userId],l={username:this.userId,password:h},u;if(!s||g)if(k&&!m&&e.some(f.id.serverInfos,
703function(a){f.id._isIdProvider(d,a.server)&&(m=a);return!!m}),s=m&&f.id.findCredential(m.server,this.userId),!k||s)if(r)s.refreshToken();else{if(k)u={serverUrl:b,token:s&&s.token,ssl:s&&s.ssl};else if(g)l=null,u={ssl:this.ssl};else if(h)this.isAdmin&&(u={isAdmin:!0});else{var q;b&&(b=f.id._sanitizeUrl(b),this._enqueued=1,q=f.id._enqueue(b,c,null,null,this.isAdmin,this),q.addCallback(function(){a._enqueued=0;a.refreshServerTokens()}).addErrback(function(){a._enqueued=0}));return q}return f.id.generateToken(k?
704m:c,k?null:l,u).addCallback(function(b){a.token=b.token;a.expires=t.isDefined(b.expires)?Number(b.expires):null;a.creationTime=(new Date).getTime();a.validity=b.validity;a.onTokenChange();a.refreshServerTokens()}).addErrback(function(){})}},refreshServerTokens:function(){"portal"===this.scope&&e.forEach(f.id.credentials,function(a){var b=f.id.findServerInfo(a.server),c=b&&b.owningSystemUrl;if(a!==this&&a.userId===this.userId&&c&&"server"===a.scope&&(f.id._hasSameServerInstance(this.server,c)||f.id._isIdProvider(c,
705this.server)))B(b,f.id._legacyFed)?(a.token=this.token,a.expires=this.expires,a.creationTime=this.creationTime,a.validity=this.validity,a.onTokenChange()):a.refreshToken()},this)},onTokenChange:function(a){clearTimeout(this._refreshTimer);var b=this.server&&f.id.findServerInfo(this.server),c=(b=b&&b.owningSystemUrl)&&f.id.findServerInfo(b);!1!==a&&((!b||"portal"===this.scope||c&&c.webTierAuth&&!f.id.normalizeWebTierAuth)&&(t.isDefined(this.expires)||t.isDefined(this.validity)))&&this._startRefreshTimer()},
706onDestroy:function(){},destroy:function(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null;this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);var a=e.indexOf(f.id.credentials,this);-1<a&&f.id.credentials.splice(a,1);this.onTokenChange();this.onDestroy()},toJson:function(){return this._toJson()},_toJson:function(){var a=t.fixJson({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,
707isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),b=this.resources;b&&0<b.length&&(a.resources=b);return a},_startRefreshTimer:function(){clearTimeout(this._refreshTimer);
707var b=6E4*this.tokenRefreshBuffer,c=(this.validity?this.creationTime+6E4*this.validity:this.expires)-(new Date).getTime();0>c&&(c=0);this._refreshTimer=setTimeout(a.hitch(this,this.refreshToken),c>b?c-b:c)}});D.Credential=G;g("extend-esri")&&(f.IdentityManagerBase=D);return D})},"esri/layers/TableDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource".split(" "),
708function(p,n,a,e,l,h){p=p(h,{declaredClass:"esri.layers.TableDataSource",toJson:function(){return l.fixJson({type:"table",workspaceId:this.workspaceId,dataSourceName:this.dataSourceName,gdbVersion:this.gdbVersion})}});a("extend-esri")&&n.setObject("layers.TableDataSource",p,e);return p})},"dojo/Stateful":function(){define(["./_base/declare","./_base/lang","./_base/array","./when"],function(p,n,a,e){return p("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(a){var e=this._attrPairNames;
709return e[a]?e[a]:e[a]={s:"_"+a+"Setter",g:"_"+a+"Getter"}},postscript:function(a){a&&this.set(a)},_get:function(a,e){return"function"===typeof this[e.g]?this[e.g]():this[a]},get:function(a){return this._get(a,this._getAttrNames(a))},set:function(a,h){if("object"===typeof a){for(var q in a)a.hasOwnProperty(q)&&"_watchCallbacks"!=q&&this.set(q,a[q]);return this}q=this._getAttrNames(a);var g=this._get(a,q);q=this[q.s];var d;"function"===typeof q?d=q.apply(this,Array.prototype.slice.call(arguments,1)):
710this[a]=h;if(this._watchCallbacks){var c=this;e(d,function(){c._watchCallbacks(a,g,h)})}return this},_changeAttrValue:function(a,e){var q=this.get(a);this[a]=e;this._watchCallbacks&&this._watchCallbacks(a,q,e);return this},watch:function(e,h){var q=this._watchCallbacks;if(!q)var g=this,q=this._watchCallbacks=function(a,c,d,e){var s=function(k){if(k){k=k.slice();for(var r=0,s=k.length;r<s;r++)k[r].call(g,a,c,d)}};s(q["_"+a]);e||s(q["*"])};!h&&"function"===typeof e?(h=e,e="*"):e="_"+e;var d=q[e];"object"!==
711typeof d&&(d=q[e]=[]);d.push(h);var c={};c.unwatch=c.remove=function(){var b=a.indexOf(d,h);-1<b&&d.splice(b,1)};return c}})})},"dijit/form/ComboButton":function(){define("dojo/_base/declare dojo/keys ../focus ./DropDownButton dojo/text!./templates/ComboButton.html ../a11yclick".split(" "),function(p,n,a,e,l){return p("dijit.form.ComboButton",e,{templateString:l,_setIdAttr:"",_setTabIndexAttr:["focusNode","titleNode"],_setTitleAttr:"titleNode",optionsTitle:"",baseClass:"dijitComboButton",cssStateNodes:{buttonNode:"dijitButtonNode",
712titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyDown:function(e){if(e.keyCode==n[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"])a.focus(this._popupStateNode),e.stopPropagation(),e.preventDefault()},_onArrowKeyDown:function(e){if(e.keyCode==n[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"])a.focus(this.titleNode),e.stopPropagation(),e.preventDefault()},focus:function(e){this.disabled||a.focus("start"==e?this.titleNode:this._popupStateNode)}})})},
713"dojox/xml/parser":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(p){p.getObject("xml.parser",!0,dojox);dojox.xml.parser.parse=function(n,a){var e=p.doc,l;a=a||"text/xml";if(n&&p.trim(n)&&"DOMParser"in p.global){l=(new DOMParser).parseFromString(n,a);e=l.documentElement;if("parsererror"==e.nodeName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"==e.namespaceURI){var h=e.getElementsByTagNameNS("http://www.mozilla.org/newlayout/xml/parsererror.xml",
714"sourcetext")[0];h&&(h=h.firstChild.data);throw Error("Error parsing text "+e.firstChild.data+" \n"+h);}return l}if("ActiveXObject"in p.global){e=function(a){return"MSXML"+a+".DOMDocument"};e=["Microsoft.XMLDOM",e(6),e(4),e(3),e(2)];p.some(e,function(a){try{l=new ActiveXObject(a)}catch(d){return!1}return!0});if(n&&l&&(l.async=!1,l.loadXML(n),e=l.parseError,0!==e.errorCode))throw Error("Line: "+e.line+"\nCol: "+e.linepos+"\nReason: "+e.reason+"\nError Code: "+e.errorCode+"\nSource: "+e.srcText);if(l)return l}else if(e.implementation&&
715e.implementation.createDocument){if(n&&p.trim(n)&&e.createElement){h=e.createElement("xml");h.innerHTML=n;var q=e.implementation.createDocument("foo","",null);p.forEach(h.childNodes,function(a){q.importNode(a,!0)});return q}return e.implementation.createDocument("","",null)}return null};dojox.xml.parser.textContent=function(n,a){if(1<arguments.length)return dojox.xml.parser.replaceChildren(n,(n.ownerDocument||p.doc).createTextNode(a)),a;if(void 0!==n.textContent)return n.textContent;var e="";n&&p.forEach(n.childNodes,
716function(a){switch(a.nodeType){case 1:case 5:e+=dojox.xml.parser.textContent(a);break;case 3:case 2:case 4:e+=a.nodeValue}});return e};dojox.xml.parser.replaceChildren=function(n,a){var e=[];p.isIE&&p.forEach(n.childNodes,function(a){e.push(a)});dojox.xml.parser.removeChildren(n);p.forEach(e,p.destroy);p.isArray(a)?p.forEach(a,function(a){n.appendChild(a)}):n.appendChild(a)};dojox.xml.parser.removeChildren=function(n){for(var a=n.childNodes.length;n.hasChildNodes();)n.removeChild(n.firstChild);return a};
717dojox.xml.parser.innerXML=function(n){return n.innerXML?n.innerXML:n.xml?n.xml:"undefined"!=typeof XMLSerializer?(new XMLSerializer).serializeToString(n):null};return dojox.xml.parser})},"esri/geometry/normalizeUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/_base/Deferred dojo/has ../kernel ../config ../deferredUtils ./Polyline ./Polygon ./webMercatorUtils ./jsonUtils".split(" "),function(p,n,a,e,l,h,q,g,d,c,b){function f(a,b){return Math.ceil((a-b)/(2*b))}function m(a,b){var c=a.paths||
718a.rings,d,k,f=c.length,r;for(d=0;d<f;d++){r=c[d].length;for(k=0;k<r;k++){var m=a.getPoint(d,k);a.setPoint(d,k,m.offset(b,0))}}return a}function t(a,b){if(!(a instanceof g||a instanceof d))throw console.error("_straightLineDensify: the input geometry is neither polyline nor polygon"),Error("_straightLineDensify: the input geometry is neither polyline nor polygon");var c=a instanceof g,k=[],f;p.forEach(c?a.paths:a.rings,function(a){k.push(f=[]);f.push([a[0][0],a[0][1]]);var c,d,r,m,s,g,e,h,l,u,t,q;
719for(s=0;s<a.length-1;s++){c=a[s][0];d=a[s][1];r=a[s+1][0];m=a[s+1][1];e=Math.sqrt((r-c)*(r-c)+(m-d)*(m-d));h=(m-d)/e;l=(r-c)/e;u=e/b;if(1<u){for(g=1;g<=u-1;g++)q=g*b,t=l*q+c,q=h*q+d,f.push([t,q]);g=(e+Math.floor(u-1)*b)/2;t=l*g+c;q=h*g+d;f.push([t,q])}f.push([r,m])}});return c?new g({paths:k,spatialReference:a.spatialReference}):new d({rings:k,spatialReference:a.spatialReference})}function s(a,b,d){b&&(a=t(a,1E6),a=c.webMercatorToGeographic(a,!0));d&&(a=m(a,d));return a}function k(a,b,c){var d=a.x||
720a[0],k;d>b?(k=f(d,b),a.x?a=a.offset(k*-2*b,0):a[0]=d+k*-2*b):d<c&&(k=f(d,c),a.x?a=a.offset(k*-2*c,0):a[0]=d+k*-2*c);return a}function r(a,b){var c=-1;
720p.forEach(b.cutIndexes,function(d,k){var r=b.geometries[k];p.forEach(r.rings||r.paths,function(a,b){p.some(a,function(c){if(!(180>c[0])){c=0;var d,k=a.length,m;for(d=0;d<k;d++)m=a[d][0],c=m>c?m:c;c=Number(c.toFixed(9));c=-360*f(c,180);k=a.length;for(d=0;d<k;d++)m=r.getPoint(b,d),r.setPoint(b,d,m.offset(c,0))}return!0})});d===c?r.rings?p.forEach(r.rings,
721function(b){a[d]=a[d].addRing(b)}):p.forEach(r.paths,function(b){a[d]=a[d].addPath(b)}):(c=d,a[d]=r)});return a}function u(e,l,u,t){var q=new a;q.addCallbacks(u,t);l=l||h.defaults.geometryService;var v=[],n=[],x,w,z,J,F,K,M,N,T=0;p.forEach(e,function(a){if(a)if(x||(x=a.spatialReference,w=x._getInfo(),J=(z=x._isWebMercator())?2.0037508342788905E7:180,F=z?-2.0037508342788905E7:-180,K=z?102100:4326,M=new g({paths:[[[J,F],[J,J]]],spatialReference:{wkid:K}}),N=new g({paths:[[[F,F],[F,J]]],spatialReference:{wkid:K}})),
722w){var c=b.fromJson(a.toJson()),r=a.getExtent();"point"===a.type?v.push(k(c,J,F)):"multipoint"===a.type?(c.points=p.map(c.points,function(a){return k(a,J,F)}),v.push(c)):"extent"===a.type?(c=r._normalize(null,null,w),v.push(c.rings?new d(c):c)):r?(a=f(r.xmin,F)*2*J,c=0===a?c:m(c,a),r=r.offset(a,0),r.intersects(M)&&r.xmax!==J?(T=r.xmax>T?r.xmax:T,c=s(c,z),n.push(c),v.push("cut")):r.intersects(N)&&r.xmin!==F?(T=r.xmax*2*J>T?r.xmax*2*J:T,c=s(c,z,360),n.push(c),v.push("cut")):v.push(c)):v.push(c)}else v.push(a);
723else v.push(a)});u=new g;t=f(T,J);for(var O=-90,U=t;0<t;){var Y=-180+360*t;u.addPath([[Y,O],[Y,-1*O]]);O*=-1;t--}0<n.length&&0<U?l?l.cut(n,u,function(a){n=r(n,a);var b=[];p.forEach(v,function(a,d){if("cut"===a){var k=n.shift();e[d].rings&&1<e[d].rings.length&&k.rings.length>=e[d].rings.length?(v[d]="simplify",b.push(k)):v[d]=!0===z?c.geographicToWebMercator(k):k}});0<b.length?l.simplify(b,function(a){p.forEach(v,function(b,d){"simplify"===b&&(v[d]=!0===z?c.geographicToWebMercator(a.shift()):a.shift())});
724q.callback(v)},function(a){q.errback(a)}):q.callback(v)},function(a){q.errback(a)}):q.errback(Error("esri.geometry.normalizeCentralMeridian: 'geometryService' argument is missing.")):(p.forEach(v,function(a,b){if("cut"===a){var d=n.shift();v[b]=!0===z?c.geographicToWebMercator(d):d}}),q.callback(v));return q}function x(a,b,c,d){var k=!1,f;n.isObject(a)&&a&&(n.isArray(a)?a.length&&((f=a[0]&&a[0].declaredClass)&&-1!==f.indexOf("Graphic")?(a=p.map(a,function(a){return a.geometry}),k=a.length?!0:!1):
725f&&-1!==f.indexOf("esri.geometry.")&&(k=!0)):(f=a.declaredClass)&&-1!==f.indexOf("FeatureSet")?(a=p.map(a.features||[],function(a){return a.geometry}),k=a.length?!0:!1):f&&-1!==f.indexOf("esri.geometry.")&&(k=!0));k&&b.push({index:c,property:d,value:a})}function v(a,b){var c=[];p.forEach(b,function(b){var d=b.i,k=a[d];b=b.p;var f;if(n.isObject(k)&&k)if(b)if("*"===b[0])for(f in k)k.hasOwnProperty(f)&&x(k[f],c,d,f);else p.forEach(b,function(a){x(n.getObject(a,!1,k),c,d,a)});else x(k,c,d)});return c}
726function z(a,b){var c=0,d={};p.forEach(b,function(b){var k=b.index,f=b.property,r=b.value,m=r.length||1,s=a.slice(c,c+m);n.isArray(r)||(s=s[0]);c+=m;delete b.value;f?(d[k]=d[k]||{},d[k][f]=s):d[k]=s});return d}var w={normalizeCentralMeridian:u,_foldCutResults:r,_prepareGeometryForCut:s,_offsetMagnitude:f,_pointNormalization:k,_updatePolyGeometry:m,_straightLineDensify:t,_createWrappers:function(b){var c=n.isObject(b)?b.prototype:n.getObject(b+".prototype");p.forEach(c.__msigns,function(b){var d=c[b.n];
727c[b.n]=function(){var c=this,k=[],f,r=new a(q._dfdCanceller);b.f&&q._fixDfd(r);for(f=0;f<b.c;f++)k[f]=arguments[f];var m={dfd:r};k.push(m);var s,g=[],e;c.normalization&&!c._isTable&&(s=v(k,b.a),p.forEach(s,function(a){g=g.concat(a.value)}),g.length&&(e=u(g)));e?(r._pendingDfd=e,e.addCallbacks(function(a){r.canceled||(m.assembly=z(a,s),r._pendingDfd=d.apply(c,k))},function(a){var d=c.declaredClass;d&&-1!==d.indexOf("FeatureLayer")?c._resolve([a],null,k[b.e],r,!0):c._errorHandler(a,k[b.e],r)})):r._pendingDfd=
728d.apply(c,k);return r}})},_disassemble:v,_addToBucket:x,_reassemble:z};e("extend-esri")&&n.mixin(n.getObject("geometry",!0,l),w);return w})},"esri/geometry/Extent":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ./Point ./webMercatorUtils ./mathUtils ../srUtils".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f){var m={type:"extent",xmin:0,ymin:0,xmax:0,ymax:0},t=p(g,{declaredClass:"esri.geometry.Extent",constructor:function(b,
729c,d,g,e){a.mixin(this,m);
729a.isObject(b)?(a.mixin(this,b),this.spatialReference&&(this.spatialReference=f.createSpatialReference(this.spatialReference))):this.update(b,c,d,g,e);this.verifySR()},getWidth:function(){return Math.abs(this.xmax-this.xmin)},getHeight:function(){return Math.abs(this.ymax-this.ymin)},getCenter:function(){return new d((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2,this.spatialReference)},centerAt:function(a){var b=this.getCenter(),c=a.x-b.x;a=a.y-b.y;return new t(this.xmin+
730c,this.ymin+a,this.xmax+c,this.ymax+a,this.spatialReference)},update:function(a,b,c,d,f){this.xmin=a;this.ymin=b;this.xmax=c;this.ymax=d;this.spatialReference=f;this.clearCache();return this},offset:function(a,b){return new t(this.xmin+a,this.ymin+b,this.xmax+a,this.ymax+b,this.spatialReference)},expand:function(a){var b=(1-a)/2;a=this.getWidth()*b;b*=this.getHeight();return new t(this.xmin+a,this.ymin+b,this.xmax-a,this.ymax-b,this.spatialReference)},intersects:function(a){if(!a)return!1;var b=a.type,
731d=this.spatialReference,f=a.spatialReference;d&&(f&&!d.equals(f)&&d._canProject(f))&&(a=d.isWebMercator()?c.geographicToWebMercator(a):c.webMercatorToGeographic(a,!0));switch(b){case "point":return this.contains(a);case "multipoint":return this._intersectsMultipoint(a);case "extent":return this._intersectsExtent(a);case "polygon":return this._intersectsPolygon(a);case "polyline":return this._intersectsPolyline(a)}},normalize:function(){var b=this._normalize(!1,!0);a.isArray(b)||(b=[b]);return b},
732shiftCentralMeridian:function(){return this._normalize(!0)},_intersectsMultipoint:function(a){var b=a.points.length,c;for(c=0;c<b;c++)if(this.contains(a.getPoint(c)))return!0;return!1},_intersectsExtent:function(a){var b,c,d,f,m=!1;this.xmin<=a.xmin?(b=a.xmin,this.xmax<b?m=!0:d=Math.min(this.xmax,a.xmax)-b):(b=this.xmin,a.xmax<b?m=!0:d=Math.min(this.xmax,a.xmax)-b);this.ymin<=a.ymin?(c=a.ymin,this.ymax<c?m=!0:f=Math.min(this.ymax,a.ymax)-c):(c=this.ymin,a.ymax<c?m=!0:f=Math.min(this.ymax,a.ymax)-
733c);return m?null:new t(b,c,b+d,c+f,this.spatialReference)},_intersectsPolygon:function(a){var b=[this.xmin,this.ymax],c=[this.xmax,this.ymax],f=[this.xmin,this.ymin],m=[this.xmax,this.ymin],g=[b,c,f,m],b=[[f,b],[b,c],[c,m],[m,f]],f=a.rings,m=f.length,e,h=new d(0,0,this.spatialReference);e=g.length;for(c=0;c<e;c++)if(h.update(g[c][0],g[c][1]),a.contains(h))return!0;h.setSpatialReference(a.spatialReference);for(var l,t,c=0;c<m;c++)if(g=f[c],e=g.length){l=g[0];h.update(l[0],l[1]);if(this.contains(h))return!0;
734for(a=1;a<e;a++){t=g[a];h.update(t[0],t[1]);if(this.contains(h)||this._intersectsLine([l,t],b))return!0;l=t}}return!1},_intersectsPolyline:function(a){var b=[[[this.xmin,this.ymin],[this.xmin,this.ymax]],[[this.xmin,this.ymax],[this.xmax,this.ymax]],[[this.xmax,this.ymax],[this.xmax,this.ymin]],[[this.xmax,this.ymin],[this.xmin,this.ymin]]],c,f=a.paths,m=f.length,g,e,h,l,t=new d(0,0,a.spatialReference);for(a=0;a<m;a++)if(g=f[a],e=g.length){h=g[0];t.update(h[0],h[1]);if(this.contains(t))return!0;for(c=
7351;c<e;c++){l=g[c];t.update(l[0],l[1]);if(this.contains(t)||this._intersectsLine([h,l],b))return!0;h=l}}return!1},_intersectsLine:function(a,c){var d=b._getLineIntersection2,f,m=c.length;for(f=0;f<m;f++)if(d(a,c[f]))return!0;return!1},contains:function(a){if(!a)return!1;var b=a.type;if("point"===b){var c=this.spatialReference,f=a.spatialReference,b=a.x;a=a.y;c&&(f&&!c.equals(f)&&c._canProject(f))&&(a=c.isWebMercator()?d.lngLatToXY(b,a):d.xyToLngLat(b,a,!0),b=a[0],a=a[1]);return b>=this.xmin&&b<=this.xmax&&
736a>=this.ymin&&a<=this.ymax}return"extent"===b?this._containsExtent(a):!1},_containsExtent:function(a){var b=a.xmin,c=a.ymin,f=a.xmax,m=a.ymax,g=a.spatialReference;a=new d(b,c,g);b=new d(b,m,g);m=new d(f,m,g);c=new d(f,c,g);return this.contains(a)&&this.contains(b)&&this.contains(m)&&this.contains(c)?!0:!1},union:function(a){return new t(Math.min(this.xmin,a.xmin),Math.min(this.ymin,a.ymin),Math.max(this.xmax,a.xmax),Math.max(this.ymax,a.ymax),this.spatialReference)},getExtent:function(){var a=this.spatialReference;
737return new t(this.xmin,this.ymin,this.xmax,this.ymax,a&&new q(a.toJson()))},_shiftCM:function(a){var b=this.getCacheValue("_shifted");if(!b){var b=new t(this.toJson()),d=b.spatialReference;if(a=a||d._getInfo()){var f=this._getCM(a);if(f){var m=d._isWebMercator()?c.webMercatorToGeographic(f):f;b.xmin-=f.x;b.xmax-=f.x;d._isWebMercator()||(m.x=this._normalizeX(m.x,a).x);b.setSpatialReference(new q(h.substitute({Central_Meridian:m.x},4326===d.wkid?a.altTemplate:a.wkTemplate)))}}this.setCacheValue("_shifted",
738b)}return b},_getCM:function(a){var b,c=a.valid[0];
738a=a.valid[1];var d=this.xmin,f=this.xmax;if(!(d>=c&&d<=a)||!(f>=c&&f<=a))b=this.getCenter();return b},_normalize:function(a,b,c){var d=new t(this.toJson()),f=d.spatialReference;if(f&&(c=c||f._getInfo())){var m=n.map(this._getParts(c),function(a){return a.extent});return 2<m.length?a?this._shiftCM(c):d.update(c.valid[0],d.ymin,c.valid[1],d.ymax,f):2===m.length?a?this._shiftCM(c):b?m:{rings:n.map(m,function(a){return[[a.xmin,a.ymin],[a.xmin,a.ymax],
739[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]}),spatialReference:f}:m[0]||d}return d},_getParts:function(a){var b=this.getCacheValue("_parts");if(!b){var b=[],c=this.xmin,d=this.xmax,f=this.ymin,m=this.ymax,g=this.spatialReference,e=this.getWidth(),h=c,l=d,q=0,n=0,p,C;a=a||g._getInfo();p=a.valid[0];C=a.valid[1];n=this._normalizeX(c,a);c=n.x;q=n.frameId;n=this._normalizeX(d,a);d=n.x;n=n.frameId;a=c===d&&0<e;if(e>2*C){e=new t(h<l?c:d,f,C,m,g);c=new t(p,f,h<l?d:c,m,g);C=new t(0,f,C,m,g);f=new t(p,
740f,0,m,g);g=[];p=[];e.contains(C)&&g.push(q);e.contains(f)&&p.push(q);c.contains(C)&&g.push(n);c.contains(f)&&p.push(n);for(m=q+1;m<n;m++)g.push(m),p.push(m);b.push({extent:e,frameIds:[q]},{extent:c,frameIds:[n]},{extent:C,frameIds:g},{extent:f,frameIds:p})}else c>d||a?b.push({extent:new t(c,f,C,m,g),frameIds:[q]},{extent:new t(p,f,d,m,g),frameIds:[n]}):b.push({extent:new t(c,f,d,m,g),frameIds:[q]});this.setCacheValue("_parts",b)}return b},_normalizeX:function(a,b){var c=0,d=b.valid[0],f=b.valid[1],
741m=2*f;a>f?(c=Math.ceil(Math.abs(a-f)/m),a-=c*m):a<d&&(c=Math.ceil(Math.abs(a-d)/m),a+=c*m,c=-c);return{x:a,frameId:c}},toJson:function(){var a={xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax},b=this.spatialReference;b&&(a.spatialReference=b.toJson());return a}});t.defaultProps=m;e("extend-esri")&&(a.setObject("geometry.Extent",t,l),l.geometry.defaultExtent=m);return t})},"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/has dojo/keys dojo/_base/lang dojo/on ../main".split(" "),
742function(p,n,a,e,l,h,q,g){var d=n("dijit.form._TextBoxMixin"+(e("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,b,d){var m;void 0!==a&&(m=this.filter(a),"string"!=typeof d&&(d=null!==m&&("number"!=typeof m||!isNaN(m))?this.filter(this.format(m,this.constraints)):"",0!=this.compare(m,this.filter(this.parse(d,
743this.constraints)))&&(d=null)));if(null!=d&&("number"!=typeof d||!isNaN(d))&&this.textbox.value!=d)this.textbox.value=d,this._set("displayedValue",this.get("displayedValue"));this.inherited(arguments,[m,b])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=typeof a&&(a=String(a));this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},
744format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},onInput:function(){},__skipInputEvent:!1,_onInput:function(a){this._processInput(a);this.intermediateChanges&&this.defer(function(){this._handleOnChange(this.get("value"),!1)})},_processInput:function(a){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);
745this.own(q(this.textbox,"keydown, keypress, paste, cut, input, compositionend",h.hitch(this,function(a){var b;if("keydown"==a.type){b=a.keyCode;switch(b){case l.SHIFT:case l.ALT:case l.CTRL:case l.META:case l.CAPS_LOCK:case l.NUM_LOCK:case l.SCROLL_LOCK:return}if(!a.ctrlKey&&!a.metaKey&&!a.altKey){switch(b){case l.NUMPAD_0:case l.NUMPAD_1:case l.NUMPAD_2:case l.NUMPAD_3:case l.NUMPAD_4:case l.NUMPAD_5:case l.NUMPAD_6:case l.NUMPAD_7:case l.NUMPAD_8:case l.NUMPAD_9:case l.NUMPAD_MULTIPLY:case l.NUMPAD_PLUS:case l.NUMPAD_ENTER:case l.NUMPAD_MINUS:case l.NUMPAD_PERIOD:case l.NUMPAD_DIVIDE:return}if(65<=
746b&&90>=b||48<=b&&57>=b||b==l.SPACE)return;b=!1;for(var d in l)if(l[d]===a.keyCode){b=!0;break}if(!b)return}}
746(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&&90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==l.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}if("input"==a.type){if(this.__skipInputEvent){this.__skipInputEvent=
747!1;return}}else this.__skipInputEvent=!0;var m={faux:!0},g;for(g in a)/^(layer[XY]|returnValue|keyLocation)$/.test(g)||(d=a[g],"function"!=typeof d&&"undefined"!=typeof d&&(m[g]=d));h.mixin(m,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){m._wasConsumed=!0;a.preventDefault()},stopPropagation:function(){a.stopPropagation()}});!1===this.onInput(m)&&(m.preventDefault(),m.stopPropagation());m._wasConsumed||this.defer(function(){this._onInput(m)})})),q(this.domNode,"keypress",function(a){a.stopPropagation()}))},
748_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=h.trim(a));
748this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=
749this.textbox.selectionEnd},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=q.once(this.domNode,"mouseup, touchend",h.hitch(this,function(a){this._isTextSelected()||d.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value=
750"";this.inherited(arguments)}});e("dojo-bidi")&&(d=n("dijit.form._TextBoxMixin",d,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));d._setSelectionRange=g._setSelectionRange=function(a,b,d){a.setSelectionRange&&a.setSelectionRange(b,d)};d.selectInputText=g.selectInputText=function(c,b,
751f){c=a.byId(c);isNaN(b)&&(b=0);isNaN(f)&&(f=c.value?c.value.length:0);try{c.focus(),d._setSelectionRange(c,b,f)}catch(m){}};return d})},"esri/layers/ArcGISTiledMapServiceLayer":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/has dojo/io-query ../kernel ../urlUtils ../SpatialReference ./TiledMapServiceLayer ./ArcGISMapServiceLayer ./TileInfo ./TimeInfo ./TileMap".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s){n=n([b,f],{declaredClass:"esri.layers.ArcGISTiledMapServiceLayer",
752_agolAttrs:"Canvas/World_Dark_Gray_Base Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Base Canvas/World_Light_Gray_Reference Elevation/World_Hillshade Ocean/World_Ocean_Base Ocean/World_Ocean_Reference Ocean_Basemap Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Transportation World_Imagery World_Street_Map World_Topo_Map".split(" "),_isReference:!1,_referenceLayers:"Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Reference Ocean/World_Ocean_Reference Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Reference_Overlay Reference/World_Transportation".split(" "),
753constructor:function(b,c){c&&(c.roundrobin&&(p.deprecated(this.declaredClass+" : Constructor option 'roundrobin' deprecated. Use option 'tileServers'."),c.tileServers=c.roundrobin),this._setTileServers(c.tileServers),this._loadCallback=c.loadCallback);this._params=a.mixin({},this._url.query);if(e.some(["servicesdev.arcgisonline.com/arcgis/rest/services","servicesdevext.arcgisonline.com/arcgis/rest/services","services.arcgisonline.com/arcgis/rest/services","servicesqa.arcgisonline.com/arcgis/rest/services"],
754function(a){return-1<b.toLowerCase().indexOf(a.toLowerCase())})){if(this.resampling=!(c&&!1===c.resampling))this.tileMap=new s(this)}else this.resampling=c&&null!=c.resampling?c.resampling:void 0;this._initLayer=a.hitch(this,this._initLayer);var d=c&&c.resourceInfo;d?this._initLayer(d):(this._load=a.hitch(this,this._load),this._load())},_TILE_FORMATS:{PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"},_setTileServers:function(a){if(a&&0<a.length){this.tileServers=a;var b,
755c=a.length;for(b=0;b<c;b++)a[b]=d.urlToObject(a[b]).path}},_initLayer:function(a,b){this.inherited(arguments);this.resourceInfo=l.toJson(a);this.tileInfo=new m(a.tileInfo);this.resampling=null==this.resampling?!!a.resampling:this.resampling;!this.spatialReference&&this.tileInfo.spatialReference&&(this.spatialReference=new c(this.tileInfo.spatialReference.toJson()));this.isPNG32="PNG24"===this.tileInfo.format||"PNG32"===this.tileInfo.format;a.timeInfo&&(this.timeInfo=new t(a.timeInfo));var d=this._url.path,
756f=this._loadCallback,s="file:"===window.location.protocol?"http:":window.location.protocol,g=d.match(/^https?\:\/\/(server|services)\.arcgisonline\.com\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i),g=g&&g[2];if(!this.tileServers)if(a.tileServers)this._setTileServers(a.tileServers);else{var e=-1!==d.search(/^https?\:\/\/server\.arcgisonline\.com/i),h=-1!==d.search(/^https?\:\/\/services\.arcgisonline\.com/i);if(e||h)this._setTileServers([d,d.replace(e?/server\.arcgisonline/i:/services\.arcgisonline/i,
757e?"services.arcgisonline":"server.arcgisonline")])}if(g){g=g.toLowerCase();for(d=0;d<this._agolAttrs.length;d++)if(e=this._agolAttrs[d],e.toLowerCase()===g){this.hasAttributionData=!0;this.attributionDataUrl=this.attributionDataUrl||s+"//static.arcgis.com/attribution/"+e;break}for(d=0;d<this._referenceLayers.length;d++)if(e=this._referenceLayers[d],e.toLowerCase()===g){this._isReference=!0;break}}this.loaded=!0;this.onLoad(this);f&&(delete this._loadCallback,f(this))},getTileUrl:function(a,b,c){var f=
758this.tileServers,m=this._getToken(),s=this._url.query;a=(f?f[b%f.length]:this._url.path)+"/tile/"+a+"/"+b+"/"+c;this.resampling&&!this.tileMap&&(a+="?blankTile\x3dfalse");s&&(a=this.resampling&&!this.tileMap?a+("\x26"+q.objectToQuery(s)):a+("?"+q.objectToQuery(s)));if(m&&(!s||!s.token))a+=(-1===a.indexOf("?")?"?":"\x26")+"token\x3d"+m;a=this.addTimestampToURL(a);return d.addProxy(a)}});h("extend-esri")&&a.setObject("layers.ArcGISTiledMapServiceLayer",n,g);return n})},"esri/geometry/Geometry":function(){define(["dojo/_base/declare",
759"dojo/_base/lang","dojo/has","../kernel","../SpatialReference"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.geometry.Geometry",spatialReference:null,type:null,cache:void 0,setSpatialReference:function(a){this.spatialReference=a;return this},verifySR:function(){this.spatialReference||this.setSpatialReference(new l(4326))},getExtent:function(){return null},clearCache:function(){this.cache=void 0},getCacheValue:function(a){return this.cache&&this.cache[a]},setCacheValue:function(a,e){this.cache||
760(this.cache={});this.cache[a]=e}});a("extend-esri")&&n.setObject("geometry.Geometry",p,e);return p})},"dijit/_base/window":function(){define(["dojo/window","../main"],function(p,n){n.getDocumentWindow=function(a){return p.get(a)}})},"esri/geometry":function(){define("./units ./SpatialReference ./geometry/Geometry ./geometry/Point ./geometry/ScreenPoint ./geometry/Multipoint ./geometry/Polyline ./geometry/Polygon ./geometry/Extent ./geometry/Rect ./geometry/geodesicUtils ./geometry/jsonUtils ./geometry/mathUtils ./geometry/normalizeUtils ./geometry/scaleUtils ./geometry/screenUtils ./geometry/webMercatorUtils".split(" "),
761function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r){return{units:p,SpatialReference:n,Geometry:a,Point:e,ScreenPoint:l,Multipoint:h,Polyline:q,Polygon:g,Extent:d,Rect:c,geodesicUtils:b,jsonUtils:f,mathUtils:m,normalizeUtils:t,scaleUtils:s,screenUtils:k,webMercatorUtils:r}})},"esri/geometry/webMercatorUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/has ../kernel ../SpatialReference ./Point".split(" "),function(p,n,a,e,l,h){function q(a,b,d,m){if("point"===a.type){var g=b(a.x,a.y,m);return new a.constructor(g[0],
762g[1],new l(d))}if("extent"===a.type){var g=b(a.xmin,a.ymin,m),s=b(a.xmax,a.ymax,m);return new a.constructor(g[0],g[1],s[0],s[1],new l(d))}if("polyline"===a.type||"polygon"===a.type){var g="polyline"===a.type,k=[],r;p.forEach(g?a.paths:a.rings,function(a){k.push(r=[]);p.forEach(a,function(a){r.push(b(a[0],a[1],m))})});return g?new a.constructor({paths:k,spatialReference:new l(d)}):new a.constructor({rings:k,spatialReference:new l(d)})}if("multipoint"===a.type){var e=[];p.forEach(a.points,function(a){e.push(b(a[0],
763a[1],m))});return new a.constructor({points:e,spatialReference:new l(d)})}}function g(a,b){var d=a&&(null!=a.wkid?a:a.spatialReference),m=b&&(null!=b.wkid?b:b.spatialReference);
763return!d||!m?!1:m.equals(d)?!0:m._canProject(d)}var d={canProject:g,project:function(a,b){var d=a&&a.spatialReference,m=b&&(null!=b.wkid?b:b.spatialReference);d&&m?d.equals(m)?a=new a.constructor(a.toJson()):g(d,m)?m.isWebMercator()?a=q(a,h.lngLatToXY,{wkid:102100}):4326===m.wkid&&(a=q(a,h.xyToLngLat,{wkid:4326})):a=null:a=
764null;return a},lngLatToXY:h.lngLatToXY,xyToLngLat:h.xyToLngLat,geographicToWebMercator:function(a){return q(a,h.lngLatToXY,{wkid:102100})},webMercatorToGeographic:function(a,b){return q(a,h.xyToLngLat,{wkid:4326},b)}};a("extend-esri")&&n.mixin(n.getObject("geometry",!0,e),d);return d})},"esri/layers/LayerSource":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(p,n,a,e){p=p(null,{declaredClass:"esri.layers.LayerSource",type:null,constructor:function(a){a&&
765n.mixin(this,a)},toJson:function(){}});a("extend-esri")&&n.setObject("layers.LayerSource",p,e);return p})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),function(p,n,a,e,l,h,q){l.add("highcontrast",function(){var a=q.doc.createElement("div");a.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+(n.blankGif||p.toUrl("./resources/blank.gif"))+'");';
766q.body().appendChild(a);var d=e.getComputedStyle(a),c=d.backgroundImage,d=d.borderTopColor==d.borderRightColor||c&&("none"==c||"url(invalid-url:)"==c);8>=l("ie")?a.outerHTML="":q.body().removeChild(a);return d});h(function(){l("highcontrast")&&a.add(q.body(),"dj_a11y")});return l})},"esri/layers/MapImageLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/dom-style ../kernel ../config ../sniff ../domUtils ../geometry/Point ../geometry/webMercatorUtils ./layer".split(" "),
767function(p,n,a,e,l,h,q,g,d,c,b,f,m){var t=p([m],{declaredClass:"esri.layers.MapImageLayer","-chains-":{constructor:"manual"},constructor:function(b){this.inherited(arguments,[null,b]);this._mapImages=[];var c=a.hitch;this._panStart=c(this,this._panStart);this._pan=c(this,this._pan);this._extentChange=c(this,this._extentChange);this._zoom=c(this,this._zoom);this._zoomStart=c(this,this._zoomStart);this._scale=c(this,this._scale);this._resize=c(this,this._resize);n.connect(this,"onSuspend",this,this._onSuspend);
768n.connect(this,"onResume",this,this._onResume);this.loaded=!0;this.onLoad(this)},opacity:1,addImage:function(a){var b=this._mapImages.push(a),b=b-1;a._idx=b;a._layer=this;this._div&&this._createImage(a,b)},removeImage:function(a){if(a){var b=a._idx,c=this._mapImages;if(c[b]===a){delete c[b];if(b=a._node)this._clearEvents(b),b.e_idx=b.e_bl=b.e_tr=b.e_l=b.e_t=b.e_w=b.e_h=null,b.parentNode&&(b.parentNode.removeChild(b),l.destroy(b));a._node=a._idx=a._layer=null}}},removeAllImages:function(){var a=this._mapImages,
769b,c=a.length;for(b=0;b<c;b++){var d=a[b];d&&this.removeImage(d)}this._mapImages=[]},getImages:function(){var a=this._mapImages,b=[],c,d=a.length;for(c=0;c<d;c++)a[c]&&b.push(a[c]);return b},setOpacity:function(a){this.opacity!=a&&(this._opacityChanged(this.opacity=a),this.onOpacityChange())},onOpacityChange:function(){},_opacityChanged:function(a){var b=this._div,c,f;if(b)if(!d("ie")||8<d("ie"))h.set(b,"opacity",a);else{f=b.childNodes;c=f.length;for(b=0;b<c;b++)h.set(f[b],"opacity",a)}},_createImage:function(a,
770b){var c=l.create("img");h.set(c,{position:"absolute"});1>a.opacity?h.set(c,"opacity",a.opacity):8>=d("ie")&&h.set(c,"opacity",this.opacity);a.rotation&&!(9>d("ie"))&&h.set(c,q._css.names.transform,q._css.rotate(360-a.rotation));a._node=c;c.e_idx=b;c.e_layer=this;c.e_load=n.connect(c,"onload",t.prototype._imageLoaded);c.e_error=n.connect(c,"onerror",t.prototype._imageError);c.e_abort=n.connect(c,"onabort",t.prototype._imageError);c.src=a.href},_imageLoaded:function(a,b){var c=b||a.target||a.currentTarget,
771d=c.e_layer,f=d._mapImages[c.e_idx],m=d._map;m&&(m.__zooming||m.__panning||!d._sr)?d._standby.push(c):(d._clearEvents(c),f&&f._node===c&&m&&d._attach(f))},_imageError:function(a){a=a.target||a.currentTarget;var b=a.e_layer,c=b._mapImages[a.e_idx];b._clearEvents(a);c&&(c._node=null)},_clearEvents:function(a){var b=n.disconnect;b(a.e_load);b(a.e_error);b(a.e_abort);a.e_load=a.e_error=a.e_abort=a.e_layer=null},_attach:function(a){var c=a.extent,d=c.spatialReference,m=this._sr,g=this._div,e=a._node,h=
772new b({x:c.xmin,y:c.ymin,spatialReference:d}),c=new b({x:c.xmax,y:c.ymax,spatialReference:d});m.equals(d)||(m.isWebMercator()&&4326===d.wkid?(h=f.geographicToWebMercator(h),c=f.geographicToWebMercator(c)):d.isWebMercator()&&4326===m.wkid&&(h=f.webMercatorToGeographic(h),c=f.webMercatorToGeographic(c)));e.e_bl=h;e.e_tr=c;a.visible&&(this._setPos(e,g._left,g._top),(this._active||g).appendChild(e))},_setPos:function(a,b,c){var d=a.e_bl,f=a.e_tr,m=this._map,d=m.toScreen(d),f=m.toScreen(f);b=d.x-b;c=f.y-
773c;var g=Math.abs(f.x-d.x),d=Math.abs(d.y-f.y),f={width:g+"px",height:d+"px"},e=this._mapImages[a.e_idx];"css-transforms"===m.navigationMode?f[q._css.names.transform]=q._css.translate(b,c)+(e.rotation?" "+q._css.rotate(360-e.rotation):""):(f.left=b+"px",f.top=c+"px");h.set(a,f);a.e_l=b;a.e_t=c;a.e_w=g;a.e_h=d},managedSuspension:!0,_setMap:function(a,b){this.inherited(arguments);var f=this._div=l.create("div",null,b),m=q._css.names,g={position:"absolute"},e=a.__visibleDelta;if(!d("ie")||8<d("ie"))g.opacity=
774this.opacity;"css-transforms"===a.navigationMode?(g[m.transform]=q._css.translate(e.x,e.y),h.set(f,g),f._left=e.x,f._top=e.y,g={position:"absolute",width:a.width+"px",height:a.height+"px",overflow:"visible"},this._active=l.create("div",null,f),h.set(this._active,g),this._passive=l.create("div",null,f),h.set(this._passive,g)):(f._left=0,f._top=0,h.set(f,g));this._standby=[];m=this._mapImages;e=m.length;for(g=0;g<e;g++){var t=m[g];t._node||this._createImage(t,t._idx)}c.hide(f);return f},_unsetMap:function(a,
775b){this._disconnect();var c=this._div;if(c){var d=this._mapImages,f,m=d.length;for(f=0;f<m;f++){var g=d[f];if(g){var e=g._node;e&&(this._clearEvents(e),e.e_idx=e.e_bl=e.e_tr=e.e_l=e.e_t=e.e_w=e.e_h=null);g._node=null}}b.removeChild(c);l.destroy(c)}this._map=this._div=this._sr=this._active=this._passive=this._standby=null;this.inherited(arguments)},_onSuspend:function(){this._disconnect();c.hide(this._div)},_onResume:function(a){a.firstOccurrence&&(this._sr=this._map.spatialReference,this._processStandbyList());
776a=this._map;var b=this._div,d=a.__visibleDelta;
776"css-transforms"===a.navigationMode&&(b._left=d.x,b._top=d.y,h.set(b,q._css.names.transform,q._css.translate(b._left,b._top)));this._redraw("css-transforms"===a.navigationMode);this._connect(a);c.show(b)},_connect:function(a){if(!this._connections){var b=n.connect,c="css-transforms"===a.navigationMode;this._connections=[b(a,"onPanStart",this._panStart),b(a,"onPan",this._pan),b(a,"onExtentChange",this._extentChange),c&&b(a,"onZoomStart",this._zoomStart),
777c?b(a,"onScale",this._scale):b(a,"onZoom",this._zoom),c&&b(a,"onResize",this._resize)]}},_disconnect:function(){this._connections&&(e.forEach(this._connections,n.disconnect),this._connections=null)},_panStart:function(){this._panL=this._div._left;this._panT=this._div._top},_pan:function(a,b){var c=this._div;c._left=this._panL+b.x;c._top=this._panT+b.y;"css-transforms"===this._map.navigationMode?h.set(c,q._css.names.transform,q._css.translate(c._left,c._top)):h.set(c,{left:c._left+"px",top:c._top+
778"px"})},_extentChange:function(a,b,c){c?this._redraw("css-transforms"===this._map.navigationMode):b&&this._pan(a,b);this._processStandbyList()},_processStandbyList:function(){var a,b=this._standby;if(b&&b.length)for(a=b.length-1;0<=a;a--)this._imageLoaded(null,b[a]),b.splice(a,1)},_redraw:function(a){if(a){a=this._passive;var b=q._css.names;h.set(a,b.transition,"none");this._moveImages(a,this._active);h.set(a,b.transform,"none")}a=this._active||this._div;var b=this._div._left,c=this._div._top,d,f=
779a.childNodes.length,m;for(d=0;d<f;d++)m=a.childNodes[d],this._setPos(m,b,c)},_zoom:function(a,b,c){a=this._div;var d=a._left,f=a._top,m,g=a.childNodes.length,e;for(m=0;m<g;m++){e=a.childNodes[m];var l=e.e_w*b,t=e.e_h*b,q=(c.x-d-e.e_l)*(l-e.e_w)/e.e_w,n=(c.y-f-e.e_t)*(t-e.e_h)/e.e_h,q=isNaN(q)?0:q,n=isNaN(n)?0:n;h.set(e,{left:e.e_l-q+"px",top:e.e_t-n+"px",width:l+"px",height:t+"px"})}},_zoomStart:function(){this._moveImages(this._active,this._passive)},_moveImages:function(a,b){var c=a.childNodes,
780d;d=c.length;if(0<d)for(d-=1;0<=d;d--)b.appendChild(c[d])},_scale:function(a,b){var c=q._css.names,d=this._passive;h.set(d,c.transition,b?"none":c.transformName+" "+g.defaults.map.zoomDuration+"ms ease");q._css.matrix(a);h.set(d,c.transform,q._css.matrix(a))},_resize:function(a,b,c){h.set(this._active,{width:b+"px",height:c+"px"});h.set(this._passive,{width:b+"px",height:c+"px"})}});d("extend-esri")&&a.setObject("layers.MapImageLayer",t,q);return t})},"esri/geometry/jsonUtils":function(){define("dojo/_base/lang dojo/has ../kernel ./Point ./Polyline ./Polygon ./Multipoint ./Extent".split(" "),
781function(p,n,a,e,l,h,q,g){var d={fromJson:function(a){if(void 0!==a.x&&void 0!==a.y)return new e(a);if(void 0!==a.paths)return new l(a);if(void 0!==a.rings)return new h(a);if(void 0!==a.points)return new q(a);if(void 0!==a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax)return new g(a)},getJsonType:function(a){return a instanceof e?"esriGeometryPoint":a instanceof l?"esriGeometryPolyline":a instanceof h?"esriGeometryPolygon":a instanceof g?"esriGeometryEnvelope":a instanceof q?"esriGeometryMultipoint":
782null},getGeometryType:function(a){return"esriGeometryPoint"===a?e:"esriGeometryPolyline"===a?l:"esriGeometryPolygon"===a?h:"esriGeometryEnvelope"===a?g:"esriGeometryMultipoint"===a?q:null}};n("extend-esri")&&p.mixin(p.getObject("geometry",!0,a),d);return d})},"esri/geometry/screenUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/sniff ../kernel ./Point ./ScreenPoint ./Polyline ./Polygon ./Multipoint ./Extent".split(" "),function(p,n,a,e,l,h,q,g,d,c){var b=function(){return 9>a("ie")?
783function(a,b,c,d,f,g,e,h,l){var q=[],n=Math.round,p,G=e.length,D,A,C,E,I,H;for(p=0;p<G;p++)if(D=e[p],E=h?h(D[0][0],D[0][1],l):D[0],1<(C=D.length)){I=n((E[0]-a)*c+f);H=n((b-E[1])*d+g);E=h?h(D[1][0],D[1][1],l):D[1];A=n((E[0]-a)*c+f);E=n((b-E[1])*d+g);q.push("M",I+","+H,"L",A+","+E);for(A=2;A<C;A++)E=h?h(D[A][0],D[A][1],l):D[A],I=n((E[0]-a)*c+f),H=n((b-E[1])*d+g),q.push(I+","+H)}else I=n((E[0]-a)*c+f),H=n((b-E[1])*d+g),q.push("M",I+","+H);return q}:function(a,b,c,d,f,g,e,h,l){var q=[],n,p,G,D,A,C,E=
784Math.round;n=0;for(G=e?e.length:0;n<G;n++){A=e[n];q.push("M");p=0;for(D=A?A.length:0;p<D;p++)C=h?h(A[p][0],A[p][1],l):A[p],q.push(E((C[0]-a)*c+f)+","+E((b-C[1])*d+g))}return q}}(),f={toScreenPoint:function(a,b,c,d,f){var g=a.spatialReference,e=d.spatialReference,q=d.x;d=d.y;g&&(e&&!g.equals(e)&&g._canProject(e))&&(g=g.isWebMercator()?l.lngLatToXY(q,d):l.xyToLngLat(q,d,!0),q=g[0],d=g[1]);
784q=(q-a.xmin)*(b/a.getWidth());d=(a.ymax-d)*(c/a.getHeight());f||(q=Math.round(q),d=Math.round(d));return new h(q,
785d)},toScreenGeometry:function(a,b,f,k){var r=a.xmin,e=a.ymax,h=b/a.getWidth(),n=f/a.getHeight(),z=p.forEach,w=Math.round;if(k instanceof l)return new l(w((k.x-r)*h),w((e-k.y)*n));if(k instanceof d){a=new d;var y=a.points;z(k.points,function(a,b){y[b]=[w((a[0]-r)*h),w((e-a[1])*n)]});return a}if(k instanceof c)return new c(w((k.xmin-r)*h),w((e-k.ymin)*n),w((k.xmax-r)*h),w((e-k.ymax)*h));if(k instanceof q){a=new q;var B=a.paths,G;z(k.paths,function(a,b){G=B[b]=[];z(a,function(a,b){G[b]=[w((a[0]-r)*h),
786w((e-a[1])*n)]})});return a}if(k instanceof g){a=new g;var D=a.rings,A;z(k.rings,function(a,b){A=D[b]=[];z(a,function(a,b){A[b]=[w((a[0]-r)*h),w((e-a[1])*n)]})});return a}},_toScreenPath:function(a,c,d,f,r,g){var e=f instanceof q,h=a.spatialReference,n=f.spatialReference,p,y;h&&(n&&!h.equals(n)&&h._canProject(n))&&(h.isWebMercator()?p=l.lngLatToXY:(p=l.xyToLngLat,y=!0));return b(a.xmin,a.ymax,c/a.getWidth(),d/a.getHeight(),r,g,e?f.paths:f.rings,p,y)},toMapPoint:function(a,b,c,d){return new l(a.xmin+
787d.x/(b/a.getWidth()),a.ymax-d.y/(c/a.getHeight()),a.spatialReference)},toMapGeometry:function(a,b,f,k){var r=a.xmin,e=a.ymax,h=a.spatialReference,n=b/a.getWidth(),z=f/a.getHeight(),w=p.forEach;if(k instanceof l)return new l(r+k.x/n,e-k.y/z,h);if(k instanceof d){a=new d(h);var y=a.points;w(k.points,function(a,b){y[b]=[r+a[0]/n,e-a[1]/z]});return a}if(k instanceof c)return new c(r+k.xmin/n,e-k.ymin/z,r+k.xmax/n,e-k.ymax/z,h);if(k instanceof q){a=new q(h);var B=a.paths,G;w(k.paths,function(a,b){G=B[b]=
788[];w(a,function(a,b){G[b]=[r+a[0]/n,e-a[1]/z]})});return a}if(k instanceof g){a=new g(h);var D=a.rings,A;w(k.rings,function(a,b){A=D[b]=[];w(a,function(a,b){A[b]=[r+a[0]/n,e-a[1]/z]})});return a}}};a("extend-esri")&&n.mixin(n.getObject("geometry",!0,e),f);return f})},"dijit/main":function(){define(["dojo/_base/kernel"],function(p){return p.dijit})},"esri/layers/TimeInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../TimeExtent ./TimeReference ./LayerTimeOptions".split(" "),
789function(p,n,a,e,l,h,q){p=p(null,{declaredClass:"esri.layers.TimeInfo",constructor:function(a){null!==a&&(n.mixin(this,a),a.exportOptions&&(this.exportOptions=new q(a.exportOptions)),this.timeExtent=null,a.timeExtent&&2===a.timeExtent.length&&(this.timeExtent=new l(a.timeExtent)),this.timeReference=new h(a.timeReference))}});n.mixin(p,{UNIT_CENTURIES:"esriTimeUnitsCenturies",UNIT_DAYS:"esriTimeUnitsDays",UNIT_DECADES:"esriTimeUnitsDecades",UNIT_HOURS:"esriTimeUnitsHours",UNIT_MILLISECONDS:"esriTimeUnitsMilliseconds",
790UNIT_MINUTES:"esriTimeUnitsMinutes",UNIT_MONTHS:"esriTimeUnitsMonths",UNIT_SECONDS:"esriTimeUnitsSeconds",UNIT_UNKNOWN:"esriTimeUnitsUnknown",UNIT_WEEKS:"esriTimeUnitsWeeks",UNIT_YEARS:"esriTimeUnitsYears"});a("extend-esri")&&n.setObject("layers.TimeInfo",p,e);return p})},"esri/layers/LOD":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.layers.LOD",constructor:function(a){n.mixin(this,a)},toJson:function(){return l.fixJson({level:this.level,
791levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})}});a("extend-esri")&&n.setObject("layers.LOD",p,e);return p})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),function(p,n,a,e,l,h){p=e("dijit._OnDijitClickMixin",null,{connect:function(a,g,d){return this.inherited(arguments,[a,"ondijitclick"==g?h:g,d])}});p.a11yclick=h;return p})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),
792function(p,n,a,e,l,h){var q={};p.setObject("dojo.dnd.autoscroll",q);q.getViewport=h.getBox;q.V_TRIGGER_AUTOSCROLL=32;q.H_TRIGGER_AUTOSCROLL=32;q.V_AUTOSCROLL_VALUE=16;q.H_AUTOSCROLL_VALUE=16;var g,d=a.doc,c=Infinity,b=Infinity;q.autoScrollStart=function(f){d=f;g=h.getBox(d);f=a.body(d).parentNode;c=Math.max(f.scrollHeight-g.h,0);b=Math.max(f.scrollWidth-g.w,0)};q.autoScroll=function(f){var m=g||h.getBox(d),e=a.body(d).parentNode,s=0,k=0;f.clientX<q.H_TRIGGER_AUTOSCROLL?s=-q.H_AUTOSCROLL_VALUE:f.clientX>
793m.w-q.H_TRIGGER_AUTOSCROLL&&(s=Math.min(q.H_AUTOSCROLL_VALUE,b-e.scrollLeft));
793f.clientY<q.V_TRIGGER_AUTOSCROLL?k=-q.V_AUTOSCROLL_VALUE:f.clientY>m.h-q.V_TRIGGER_AUTOSCROLL&&(k=Math.min(q.V_AUTOSCROLL_VALUE,c-e.scrollTop));window.scrollBy(s,k)};q._validNodes={div:1,p:1,td:1};q._validOverflow={auto:1,scroll:1};q.autoScrollNodes=function(b){for(var c,d,g,k,r,h,p=0,v=0,z=b.target;z;){if(1==z.nodeType&&z.tagName.toLowerCase()in q._validNodes){g=l.getComputedStyle(z);k=g.overflow.toLowerCase()in q._validOverflow;
794r=g.overflowX.toLowerCase()in q._validOverflow;h=g.overflowY.toLowerCase()in q._validOverflow;if(k||r||h)c=e.getContentBox(z,g),d=e.position(z,!0);if(k||r){g=Math.min(q.H_TRIGGER_AUTOSCROLL,c.w/2);r=b.pageX-d.x;if(n("webkit")||n("opera"))r+=a.body().scrollLeft;p=0;0<r&&r<c.w&&(r<g?p=-g:r>c.w-g&&(p=g),z.scrollLeft+=p)}if(k||h){k=Math.min(q.V_TRIGGER_AUTOSCROLL,c.h/2);h=b.pageY-d.y;if(n("webkit")||n("opera"))h+=a.body().scrollTop;v=0;0<h&&h<c.h&&(h<k?v=-k:h>c.h-k&&(v=k),z.scrollTop+=v)}if(p||v)return}try{z=
795z.parentNode}catch(w){z=null}}q.autoScroll(b)};return q})},"esri/symbols/jsonUtils":function(){define("dojo/_base/lang dojo/has ../kernel ./SimpleMarkerSymbol ./PictureMarkerSymbol ./SimpleLineSymbol ./CartographicLineSymbol ./SimpleFillSymbol ./PictureFillSymbol ./TextSymbol".split(" "),function(p,n,a,e,l,h,q,g,d,c){var b={fromJson:function(a){var b=null;switch(a.type){case "esriSMS":b=new e(a);break;case "esriPMS":b=new l(a);break;case "esriTS":b=new c(a);break;case "esriSLS":b=void 0!==a.cap?new q(a):
796new h(a);break;case "esriCLS":b=new q(a);break;case "esriSFS":b=new g(a);break;case "esriPFS":b=new d(a)}return b},getShapeDescriptors:function(a){return a&&a.getShapeDescriptors?a.getShapeDescriptors():{defaultShape:null,fill:null,stroke:null}}};n("extend-esri")&&p.mixin(p.getObject("symbol",!0,a),b);return b})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare","./Moveable"],function(p,n){var a=n.prototype.onMove;return p("dojo.dnd.TimedMoveable",n,{timeout:40,constructor:function(a,
797l){l||(l={});l.timeout&&("number"==typeof l.timeout&&0<=l.timeout)&&(this.timeout=l.timeout)},onMoveStop:function(e){e._timer&&(clearTimeout(e._timer),a.call(this,e,e._leftTop));n.prototype.onMoveStop.apply(this,arguments)},onMove:function(e,l){e._leftTop=l;if(!e._timer){var h=this;e._timer=setTimeout(function(){e._timer=null;a.call(h,e,e._leftTop)},this.timeout)}}})})},"esri/geometry/geodesicUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/has ../kernel ../SpatialReference ./Point ./Polyline ./Polygon".split(" "),
798function(p,n,a,e,l,h,q,g){function d(a){var b=Math.PI/180,c=Math.sin(a.y*b),c=0.9933056200098026*(c/(1-0.006694379990197414*c*c)-6.111035746609262*Math.log((1-0.0818191908429643*c)/(1+0.0818191908429643*c)));return new h(6378137*a.x*b,3189068.5*c)}function c(a,b,c,d){var f=1/298.257223563,m=Math.sin(c);c=Math.cos(c);a=(1-f)*Math.tan(a);var g=1/Math.sqrt(1+a*a),e=a*g,t=Math.atan2(a,c);a=g*m*g*m;for(var q=1-a,n=2.7233160610754688E11*q/4.040829998466145E13,p=1+n/16384*(4096+n*(-768+n*(320-175*n))),A=
799n/1024*(256+n*(-128+n*(74-47*n))),n=d/(6356752.31424518*p),C=2*Math.PI,E,I,H,L;1E-12<Math.abs(n-C);)H=Math.cos(2*t+n),E=Math.sin(n),I=Math.cos(n),L=A*E*(H+A/4*(I*(-1+2*H*H)-A/6*H*(-3+4*E*E)*(-3+4*H*H))),C=n,n=d/(6356752.31424518*p)+L;d=e*E-g*I*c;d=Math.atan2(e*I+g*E*c,(1-f)*Math.sqrt(a+d*d));m=Math.atan2(E*m,g*I-e*E*c);c=f/16*q*(4+f*(4-3*q));f=m-(1-c)*f*Math.sqrt(a)*(n+c*E*(H+c*I*(-1+2*H*H)));return new h((b+f)/(Math.PI/180),d/(Math.PI/180),new l({wkid:4326}))}function b(a,b,c,d){var f=1/298.257223563,
800m=d-b,g=Math.atan((1-f)*Math.tan(a)),e=Math.atan((1-f)*Math.tan(c)),h=Math.sin(g),g=Math.cos(g),l=Math.sin(e),e=Math.cos(e),t=m,q,n=1E3,p,E,I,H,L,J,F;do{I=Math.sin(t);H=Math.cos(t);E=Math.sqrt(e*I*e*I+(g*l-h*e*H)*(g*l-h*e*H));if(0===E)return 0;H=h*l+g*e*H;L=Math.atan2(E,H);J=g*e*I/E;p=1-J*J;I=H-2*h*l/p;isNaN(I)&&(I=0);F=f/16*p*(4+f*(4-3*p));q=t;t=m+(1-F)*f*J*(L+F*E*(I+F*H*(-1+2*I*I)))}while(1E-12<Math.abs(t-q)&&0<--n);if(0===n)return h=6371009*Math.acos(Math.sin(a)*Math.sin(c)+Math.cos(a)*Math.cos(c)*
801Math.cos(d-b)),l=d-b,g=Math.sin(l)*Math.cos(c),a=Math.cos(a)*Math.sin(c)-Math.sin(a)*Math.cos(c)*Math.cos(l),{azimuth:Math.atan2(g,a),geodesicDistance:h};a=2.7233160610754688E11*p/4.040829998466145E13;c=a/1024*(256+a*(-128+a*(74-47*a)));a=6356752.31424518*(1+a/16384*(4096+a*(-768+a*(320-175*a))))*(L-c*E*(I+c/4*(H*(-1+2*I*I)-c/6*I*(-3+4*E*E)*(-3+4*I*I))));c=Math.atan2(e*Math.sin(t),g*l-h*e*Math.cos(t));h=Math.atan2(g*Math.sin(t),g*l*Math.cos(t)-h*e);return{azimuth:c,geodesicDistance:a,reverseAzimuth:h}}
802function f(a,d){var f=Math.PI/180;637.100877151506>d&&(d=637.100877151506);if(!(a instanceof q||a instanceof g))throw console.error("_geodesicDensify: the input geometry is neither polyline nor polygon"),Error("_geodesicDensify: the input geometry is neither polyline nor polygon");var m=a instanceof q,e=[],h;p.forEach(m?a.paths:a.rings,function(a){e.push(h=[]);h.push([a[0][0],a[0][1]]);var m,g,s,l,t,q;m=a[0][0]*f;
802g=a[0][1]*f;for(t=0;t<a.length-1;t++)if(s=a[t+1][0]*f,l=a[t+1][1]*f,!(m===s&&g===l)){l=
803b(g,m,l,s);s=l.azimuth;l=l.geodesicDistance;var u=l/d;if(1<u){for(q=1;q<=u-1;q++){var n=c(g,m,s,q*d);h.push([n.x,n.y])}q=c(g,m,s,(l+Math.floor(u-1)*d)/2);h.push([q.x,q.y])}g=c(g,m,s,l);h.push([g.x,g.y]);m=g.x*f;g=g.y*f}});return m?new q({paths:e,spatialReference:a.spatialReference}):new g({rings:e,spatialReference:a.spatialReference})}var m={esriMiles:1,esriKilometers:1.609344,esriFeet:5280,esriMeters:1609.34,esriYards:1760,esriNauticalMiles:0.869,esriCentimeters:160934,esriDecimeters:16093.4,esriInches:63360,
804esriMillimeters:1609340,esriAcres:1,esriAres:40.4685642,esriSquareKilometers:0.00404685642,esriSquareMiles:0.0015625,esriSquareFeet:43560,esriSquareMeters:4046.85642,esriHectares:0.404685642,esriSquareYards:4840,esriSquareInches:6272640,esriSquareMillimeters:4046856420,esriSquareCentimeters:4.04685642E7,esriSquareDecimeters:404685.642},t={geodesicDensify:f,geodesicLengths:function(a,c){var d=Math.PI/180,f=[];p.forEach(a,function(a,g){var e=0;p.forEach(a.paths,function(a,c){var f=0,k,m,g,s,h;for(k=
8051;k<a.length;k++)m=a[k-1][0]*d,g=a[k][0]*d,s=a[k-1][1]*d,h=a[k][1]*d,s===h&&m===g||(m=b(s,m,h,g),f+=m.geodesicDistance/1609.344);e+=f});e*=m[c];f.push(e)});return f},geodesicAreas:function(a,b){var c=[];p.forEach(a,function(a,b){var d=f(a,1E4);c.push(d)});var g=[],e,l;p.forEach(c,function(a,c){var f=0;p.forEach(a.rings,function(a,b){e=d(new h(a[0][0],a[0][1]));l=d(new h(a[a.length-1][0],a[a.length-1][1]));var c=l.x*e.y-e.x*l.y,k;for(k=0;k<a.length-1;k++)e=d(new h(a[k+1][0],a[k+1][1])),l=d(new h(a[k][0],
806a[k][1])),c+=l.x*e.y-e.x*l.y;f+=c/4046.87});f*=m[b];g.push(f/-2)});return g},_unitsDictionary:m,_toEqualAreaPoint:d,_directGeodeticSolver:c,_inverseGeodeticSolver:b};a("extend-esri")&&n.mixin(n.getObject("geometry",!0,e),t);return t})},"dojo/cookie":function(){define(["./_base/kernel","./regexp"],function(p,n){p.cookie=function(a,e,l){var h=document.cookie,q;if(1==arguments.length)q=(q=h.match(RegExp("(?:^|; )"+n.escapeString(a)+"\x3d([^;]*)")))?decodeURIComponent(q[1]):void 0;else{l=l||{};h=l.expires;
807if("number"==typeof h){var g=new Date;g.setTime(g.getTime()+864E5*h);h=l.expires=g}h&&h.toUTCString&&(l.expires=h.toUTCString());e=encodeURIComponent(e);var h=a+"\x3d"+e,d;for(d in l)h+="; "+d,g=l[d],!0!==g&&(h+="\x3d"+g);document.cookie=h}return q};p.cookie.isSupported=function(){"cookieEnabled"in navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};
808return p.cookie})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(p){return p.cache})},"esri/layers/RenderMode":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has dojo/io/script ../kernel".split(" "),function(p,n,a,e,l,h,q){n=n(null,{declaredClass:"esri.layers._RenderMode",constructor:function(){this._prefix="jsonp_"+(p._scopeName||"dojo")+"IoScript"},initialize:function(a){this.map=a;this._init=!0},startup:function(){},propertyChangeHandler:function(a){},
809destroy:function(){this._init=!1},drawFeature:function(a){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(a){(a=this._featureMap[a])&&a._count++},_decRefCount:function(a){(a=this._featureMap[a])&&a._count--},_getFeature:function(a){return this._featureMap[a]},_addFeatureIIf:function(a,d){var c=this._featureMap,b=c[a],f=this.featureLayer;b||(c[a]=d,f._add(d),d._count=0);return b||d},_removeFeatureIIf:function(a){var d=this._featureMap[a],c=this.featureLayer;if(d){if(d._count)return;
810delete this._featureMap[a];c._remove(d)}return d},_clearIIf:function(){var a;a=this.featureLayer;var d=a.graphics,c=a._selectedFeatures,b=a.objectIdField;for(a=d.length-1;0<=a;a--){var f=d[a],m=f.attributes[b];m in c?f._count=1:(f._count=0,this._removeFeatureIIf(m))}},_isPending:function(a){return h[this._prefix+a]?!0:!1},_cancelPendingRequest:function(a,d){if(a=a||h[this._prefix+d])try{a.cancel(),h._val
810idCheck(a)}catch(c){}},_purgeRequests:function(){h._validCheck(null)},_toggleVisibility:function(a){var d=
811this.featureLayer,c=d.graphics,b=a?"show":"hide",f,m=c.length;a=a&&d._ager;for(f=0;f<m;f++){var e=c[f];e[b]();a&&d._repaint(e)}},_applyTimeFilter:function(a){var d=this.featureLayer;if(d.timeInfo&&!d.suspended){a||d._fireUpdateStart();var c=d._trackManager;c&&c.clearTracks();var b=d.getTimeDefinition(),f=d._getOffsettedTE(d._mapTimeExtent);f?(f=d._getTimeOverlap(b,f))?(b=d._filterByTime(d.graphics,f.startTime,f.endTime),c&&c.addFeatures(b.match),e.forEach(b.match,function(a){var b=a._shape;a.visible||
812(a.show(),(b=a._shape)&&b._moveToFront());d._ager&&b&&d._repaint(a)}),e.forEach(b.noMatch,function(a){a.visible&&a.hide()})):this._toggleVisibility(!1):(c&&c.addFeatures(d.graphics),this._toggleVisibility(!0));c&&(c.moveLatestToFront(),c.drawTracks());a||d._fireUpdateEnd()}}});l("extend-esri")&&a.setObject("layers._RenderMode",n,q);return n})},"dijit/_base/popup":function(){define(["dojo/dom-class","dojo/_base/window","../popup","../BackgroundIframe"],function(p,n,a){var e=a._createWrapper;a._createWrapper=
813function(a){a.declaredClass||(a={_popupWrapper:a.parentNode&&p.contains(a.parentNode,"dijitPopup")?a.parentNode:null,domNode:a,destroy:function(){},ownerDocument:a.ownerDocument,ownerDocumentBody:n.body(a.ownerDocument)});return e.call(this,a)};var l=a.open;a.open=function(a){if(a.orient&&"string"!=typeof a.orient&&!("length"in a.orient)){var e=[],g;for(g in a.orient)e.push({aroundCorner:g,corner:a.orient[g]});a.orient=e}return l.call(this,a)};return a})},"esri/layers/ArcGISMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../request ../SpatialReference ../geometry/Extent ./LayerInfo".split(" "),
814function(p,n,a,e,l,h,q,g,d,c){p=p(null,{declaredClass:"esri.layers.ArcGISMapServiceLayer",infoTemplates:null,constructor:function(a,c){this.layerInfos=[];c&&(this.infoTemplates=c.infoTemplates||null);var d=this._params={},g=this._url.query?this._url.query.token:null;g&&(d.token=g)},setInfoTemplates:function(a){this.infoTemplates=a},_load:function(){q({url:this._url.path,content:n.mixin({f:"json"},this._params),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler})},spatialReference:null,
815initialExtent:null,fullExtent:null,description:null,units:null,_initLayer:function(b,f){try{this._findCredential();(this.credential&&this.credential.ssl||b&&b._ssl)&&this._useSSL();this.description=b.description;this.copyright=b.copyrightText;this.spatialReference=b.spatialReference&&new g(b.spatialReference);this.initialExtent=b.initialExtent&&new d(b.initialExtent);this.fullExtent=b.fullExtent&&new d(b.fullExtent);this.units=b.units;this.maxRecordCount=b.maxRecordCount;this.maxImageHeight=b.maxImageHeight;
816this.maxImageWidth=b.maxImageWidth;this.supportsDynamicLayers=b.supportsDynamicLayers;var m=this.layerInfos=[],e=b.layers,s=this._defaultVisibleLayers=[];a.forEach(e,function(a,b){m[b]=new c(a);a.defaultVisibility&&s.push(a.id)});this.visibleLayers||(this.visibleLayers=s);this.version=b.currentVersion;this.version||(this.version="capabilities"in b||"tables"in b?10:"supportedImageFormatTypes"in b?9.31:9.3);this.capabilities=b.capabilities;h.isDefined(b.minScale)&&!this._hasMin&&this.setMinScale(b.minScale);
817h.isDefined(b.maxScale)&&!this._hasMax&&this.setMaxScale(b.maxScale)}catch(k){this._errorHandler(k)}}});e("extend-esri")&&n.setObject("layers.ArcGISMapServiceLayer",p,l);return p})},"esri/layers/Domain":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.layers.Domain",constructor:function(a){a&&n.isObject(a)&&(this.name=a.name,this.type=a.type)},toJson:function(){return l.fixJson({name:this.name,type:this.type})}});
818a("extend-esri")&&n.setObject("layers.Domain",p,e);return p})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(p,n,a){var e=p.some;return function(l){var h,q;l instanceof Array?q=l:l&&"object"===typeof l&&(h=l);var g,d=[];if(h){q=[];for(var c in h)Object.hasOwnProperty.call(h,c)&&(d.push(c),q.push(h[c]));g={}}else q&&(g=[]);if(!q||!q.length)return(new n).resolve(g);var b=new n;b.promise.always(function(){g=d=null});var f=q.length;e(q,function(c,e){h||d.push(e);
819a(c,function(a){b.isFulfilled()||(g[d[e]]=a,0===--f&&b.resolve(g))},b.reject);return b.isFulfilled()});return b.promise}})},"esri/geometry/mathUtils":function(){define(["dojo/_base/lang","dojo/has","../kernel","./Point"],function(p,n,a,e){function l(a,c,b){return a instanceof e?new e(a.x+b*(c.x-a.x),a.y+b*(c.y-a.y)):[a[0]+b*(c[0]-a[0]),a[1]+b*(c[1]-a[1])]}function h(a,c){return 1E-8>Math.abs(a-c)}function q(a,c,b,f){var m,g=h(a[0],c[0])?1E10:(a[1]-c[1])/(a[0]-c[0]),e=h(b[0],f[0])?1E10:(b[1]-f[1])/
820(b[0]-f[0]),k=a[1]-g*a[0],r=b[1]-e*b[0];
820if(h(g,e)){if(h(k,r)){if(h(a[0],c[0]))if(Math.min(a[1],c[1])<Math.max(b[1],f[1])||Math.max(a[1],c[1])>Math.min(b[1],f[1]))a=(a[1]+c[1]+b[1]+f[1]-Math.min(a[1],c[1],b[1],f[1])-Math.max(a[1],c[1],b[1],f[1]))/2,m=(a-k)/g;else return null;else if(Math.min(a[0],c[0])<Math.max(b[0],f[0])||Math.max(a[0],c[0])>Math.min(b[0],f[0]))m=(a[0]+c[0]+b[0]+f[0]-Math.min(a[0],c[0],b[0],f[0])-Math.max(a[0],c[0],b[0],f[0]))/2,a=g*m+k;else return null;return[m,a]}return null}h(g,
8211E10)?(m=a[0],a=e*m+r):h(e,1E10)?(m=b[0],a=g*m+k):(m=-(k-r)/(g-e),a=a[1]===c[1]?a[1]:b[1]===f[1]?b[1]:g*m+k);return[m,a]}var g={getLength:function(a,c){var b=c.x-a.x,f=c.y-a.y;return Math.sqrt(b*b+f*f)},_getLength:function(a,c){var b=c[0]-a[0],f=c[1]-a[1];return Math.sqrt(b*b+f*f)},getPointOnLine:l,getMidpoint:function(a,c){return l(a,c,0.5)},_equals:h,_getLineIntersection:q,getLineIntersection:function(a,c,b,f,m){(a=q([a.x,a.y],[c.x,c.y],[b.x,b.y],[f.x,f.y]))&&(a=new e(a[0],a[1],m));return a},_getLineIntersection2:function(a,
822c){var b=a[0],f=a[1],m=c[0],g=c[1],e=b[0],b=b[1],k=f[0],f=f[1],r=m[0],h=m[1],m=g[0]-r,r=e-r,l=k-e,g=g[1]-h,h=b-h,q=f-b,n=g*l-m*q;if(0===n)return!1;m=(m*h-g*r)/n;r=(l*h-q*r)/n;return 0<=m&&1>=m&&0<=r&&1>=r?[e+m*(k-e),b+m*(f-b)]:!1},_pointLineDistance:function(a,c){var b=c[0],f=c[1],m=b[0],g=b[1],b=a[0],e=a[1],k=f[0]-m,r=f[1]-g,h=b-m,l=e-g,f=Math.sqrt,q=Math.pow,n=f(q(k,2)+q(r,2)),h=(h*k+l*r)/(n*n),g=g+h*r;return f(q(b-(m+h*k),2)+q(e-g,2))}};n("extend-esri")&&p.mixin(p.getObject("geometry",!0,a),g);
823return g})},"esri/MouseEvents":function(){define("dojo/_base/declare dojo/_base/html dojo/_base/lang dojo/_base/sniff dojo/_base/connect dojo/_base/event ./kernel ./Evented ./geometry/Point ./geometry/ScreenPoint".split(" "),function(p,n,a,e,l,h,q,g,d,c){var b=l.connect,f=l.disconnect;p=p([g],{declaredClass:"esri.MouseEvents",doubleClickDuration:300,minWheelValue:1,maxWheelValue:1,mozWheelDivisor:-1!==e("mac")?1:3,wheelDivisor:2>e("chrome")?360:120,preventPageScroll:!0,map:null,constructor:function(c,
824d){this.node=c;a.mixin(this,d);var f=function(a){h.stop(a);return!1};e("mozilla")&&n.style(c,"MozUserSelect","none");this._handles=[b(c,"onselectstart",f),b(c,"ondragstart",f),b(c,"onmouseenter",this,this._onMouseEnterHandler),b(c,"onmouseleave",this,this._onMouseLeaveHandler),b(c,"onmousedown",this,this._onMouseDownHandler),b(c,"onclick",this,this._onClickHandler),b(c,"ondblclick",this,this._onDblClickHandler)];this._onMouseMoveHandler_connect=b(c,"onmousemove",this,this._onMouseMoveHandler);this._onMouseUpHandler_connect=
825b(c,"onmouseup",this,this._onMouseUpHandler);this._fireClickEvent=a.hitch(this,this._fireClickEvent);this._initialDuration=this.doubleClickDuration;this.preventPageScroll=(f=this.map)?f.isScrollWheelZoom||f.isScrollWheelPan:this.preventPageScroll;this.enableMouseWheel(!1)},_fire:function(a,b){if(!this._preventClick||!("onClick"===a||"onDblClick"===a)){if(this[a])this[a](b);if(this.map&&this.map[a])this.map[a](b)}},_processEvent:function(a){a=h.fix(a,a.target);var b=this.map,f=b&&b.position;f&&("DOMMouseScroll"===
826a.type&&3>e("ff")?a.screenPoint=new c(window.scrollX+a.screenX-f.x,window.scrollY+a.screenY-f.y):a.screenPoint=new c(a.pageX-f.x,a.pageY-f.y),a.mapPoint=b.extent?b.toMap(a.screenPoint):new d);a.numPoints=0;return a},_onMouseEnterHandler:function(a){f(this._onKeyDown_connect);f(this._onKeyUp_connect);this._onKeyDown_connect=b(document,"onkeydown",this,this._onKeyDownHandler);this._onKeyUp_connect=b(document,"onkeyup",this,this._onKeyUpHandler);this._fire("onMouseOver",this._processEvent(a))},_onMouseLeaveHandler:function(a){f(this._onKeyDown_connect);
827f(this._onKeyUp_connect);this._onKeyDown_connect=this._onKeyUp_connect=null;this._fire("onMouseOut",this._processEvent(a))},_onMouseMoveHandler:function(a){this._dragEnd?this._dragEnd=!1:this._fire("onMouseMove",this._processEvent(a))},_onMouseDownHandler:function(a){f(this._onMouseMoveHandler_connect);this._onMouseMoveHandler_connect=null;this.node.setCapture&&this.node.setCapture(!1);f(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=b(document,"onmousemove",this,this._onMouseDragHandler);
828this._startX=a.pageX;this._startY=a.pageY;this._fire("onMouseDown",this._processEvent(a))},_onMouseUpHandler:function(a){var c=this.node;c.releaseCapture&&c.releaseCapture();f(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=null;f(this._onMouseMoveHandler_connect);this._onMouseMoveHandler_connect=b(c,"onmousemove",this,this._onMouseMoveHandler);this._fire("onMouseUp",this._processEvent(a))},_onMouseDragHandler:function(a){f(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=
829b(document,"onmousemove",this,this._onMouseDraggingHandler);f(this._onMouseUpHandler_connect);
829this._onMouseUpHandler_connect=b(document,"onmouseup",this,this._onDragMouseUpHandler);this._docLeaveConnect=b(document,"onmouseout",this,this._onDocMouseOut);this._fire("onMouseDragStart",this._processEvent(a))},_onMouseDraggingHandler:function(a){h.stop(a);this._fire("onMouseDrag",this._processEvent(a))},_onDragMouseUpHandler:function(a){var c=this.node;c.releaseCapture&&c.releaseCapture();this._dragEnd=
830!0;f(this._docLeaveConnect);f(this._onMouseDragHandler_connect);f(this._onMouseUpHandler_connect);this._docLeaveConnect=this._onMouseDragHandler_connect=null;this._onMouseMoveHandler_connect=b(c,"onmousemove",this,this._onMouseMoveHandler);this._onMouseUpHandler_connect=b(c,"onmouseup",this,this._onMouseUpHandler);a=this._processEvent(a);this._fire("onMouseDragEnd",a);this._fire("onMouseUp",a)},_onDocMouseOut:function(a){var b=9>e("ie")?a.toElement:a.relatedTarget,c=b&&b.nodeName.toLowerCase();(!b||
831e("chrome")&&"html"===c)&&this._onDragMouseUpHandler(a)},_onClickHandler:function(a){a=this._processEvent(a);if(!(a.pageX!==this._startX||a.pageY!==this._startY)){clearTimeout(this._clickTimer);var b={},c="movementX"in a,d;for(d in a)if(!c||"webkitMovementX"!==d&&"webkitMovementY"!==d)b[d]=a[d];this._clickEvent=b;this._clickTimer=setTimeout(this._fireClickEvent,this.doubleClickDuration)}},_fireClickEvent:function(){clearTimeout(this._clickTimer);9>e("ie")&&(this._clickEvent.graphic=q._ieGraphic,delete q._ieGraphic);
832this._fire("onClick",this._clickEvent)},_onDblClickHandler:function(a){clearTimeout(this._clickTimer);this._fire("onDblClick",this._processEvent(a))},_onMouseWheelHandler:function(a){var b=this.map;(b?b.isScrollWheelZoom||b.isScrollWheelPan:this.preventPageScroll)&&h.stop(a);var b=e("ff")||e("mozilla")?-a.detail/this.mozWheelDivisor:a.wheelDelta/this.wheelDivisor,c=Math.abs(b),c=c<=this.minWheelValue?this.minWheelValue:this.maxWheelValue;a.value=0>b?-c:c;this._fire("onMouseWheel",this._processEvent(a))},
833_onKeyDownHandler:function(a){this._fire("onKeyDown",a)},_onKeyUpHandler:function(a){this._fire("onKeyUp",a)},enableMouseWheel:function(a){f(this._scrollHandle);this._scrollHandle=b(this.node,e("ff")||e("mozilla")?a?"MozMousePixelScroll":"DOMMouseScroll":"onmousewheel",this,this._onMouseWheelHandler)},setImmediateClick:function(a){this.doubleClickDuration=a?0:this._initialDuration},preventClickEvents:function(a){this._preventClick=a},destroy:function(){var a=this._handles.concat([this._onMouseMoveHandler_connect,
834this._onMouseUpHandler_connect,this._onMouseDragHandler_connect,this._scrollHandle,this._onKeyDown_connect,this._onKeyUp_connect,this._docLeaveConnect]),b;for(b=0;b<a.length;b++)f(a[b]);clearTimeout(this._clickTimer);this.node=this.map=this._handles=this._clickEvent=this._onMouseMoveHandler_connect=this._onMouseUpHandler_connect=this._onMouseDragHandler_connect=this._scrollHandle=this._onKeyDown_connect=this._onKeyUp_connect=this._docLeaveConnect=null}});e("extend-esri")&&(q.MouseEvents=p);return p})},
835"dojo/_base/url":function(){define(["./kernel"],function(p){var n=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,a=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,e=function(){for(var l=arguments,h=[l[0]],q=1;q<l.length;q++)if(l[q]){var g=new e(l[q]+""),h=new e(h[0]+"");if(""==g.path&&!g.scheme&&!g.authority&&!g.query)null!=g.fragment&&(h.fragment=g.fragment),g=h;else if(!g.scheme&&(g.scheme=h.scheme,!g.authority&&(g.authority=h.authority,"/"!=g.path.charAt(0)))){for(var h=
836(h.path.substring(0,h.path.lastIndexOf("/")+1)+g.path).split("/"),d=0;d<h.length;d++)"."==h[d]?d==h.length-1?h[d]="":(h.splice(d,1),d--):0<d&&(!(1==d&&""==h[0])&&".."==h[d]&&".."!=h[d-1])&&(d==h.length-1?(h.splice(d,1),h[d-1]=""):(h.splice(d-1,2),d-=2));g.path=h.join("/")}h=[];g.scheme&&h.push(g.scheme,":");g.authority&&h.push("//",g.authority);h.push(g.path);g.query&&h.push("?",g.query);g.fragment&&h.push("#",g.fragment)}this.uri=h.join("");l=this.uri.match(n);this.scheme=l[2]||(l[1]?"":null);this.authority=
837l[4]||(l[3]?"":null);this.path=l[5];this.query=l[7]||(l[6]?"":null);this.fragment=l[9]||(l[8]?"":null);null!=this.authority&&(l=this.authority.match(a),this.user=l[3]||null,this.password=l[4]||null,this.host=l[6]||l[7],this.port=l[9]||null)};e.prototype.toString=function(){return this.uri};return p._Url=e})},"esri/layers/DynamicMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/dom-construct dojo/dom-style dojox/xml/parser dojox/gfx/matrix ../kernel ../config ../sniff ../request ../domUtils ./layer ./MapImage".split(" "),
838function(p,n,a,e,l,h,q,g,d,c,b,f,m,t){var s=d.defaults.map.zoomDuration;p=p(m,{declaredClass:"esri.layers.DynamicMapServiceLayer",_eventMap:{"map-image-export":["mapImage"]},constructor:function(b,c){this.useMapTime=c&&c.hasOwnProperty("useMapTime")?!!c.useMapTime:!0;var d=a.hitch;this._exportMapImageHandler=d(this,this._exportMapImageHandler);this._imgSrcFunc=d(this,this._imgSrcFunc);this._divAlphaImageFunc=d(this,this._divAlphaImageFunc);
838this._tileLoadHandler=d(this,this._tileLoadHandler);this._tileErrorHandler=
839d(this,this._tileErrorHandler);this.registerConnectEvents()},opacity:1,isPNG32:!1,_setMap:function(a,b,d){this.inherited(arguments);this._map=a;var f=this._div=e.create("div",null,b),m=g._css.names,s={position:"absolute",width:a.width+"px",height:a.height+"px",overflow:"visible",opacity:this.opacity},h=c("ie"),q=n.connect,t=a.__visibleDelta;8===h&&delete s.opacity;"css-transforms"===a.navigationMode?(s[m.transform]=g._css.translate(t.x,t.y),l.set(f,s),this._left=t.x,this._top=t.y):(s.left="0px",s.top=
840"0px",l.set(f,s),this._left=this._top=0);l.set(f,s);this._onResizeHandler_connect=q(a,"onResize",this,"_onResizeHandler");this._opacityChangeHandler_connect=q(this,"onOpacityChange",this,"_opacityChangeHandler");this._img_loading=null;this._dragOrigin={x:0,y:0};this.evaluateSuspension();if(this.suspended&&!a.loaded)var p=n.connect(a,"onLoad",this,function(){n.disconnect(p);p=null;this.evaluateSuspension()});return f},_unsetMap:function(a,b){e.destroy(this._div);this._map=this._div=null;var c=n.disconnect;
841c(this._onResizeHandler_connect);c(this._opacityChangeHandler_connect);this._onResizeHandler_connect=this._opacityChangeHandler_connect=null;this._fireUpdateEnd();this._toggleTime();clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors();this.inherited(arguments)},_onResizeHandler:function(a,b,c){l.set(this._div,{width:b+"px",height:c+"px"});this._onExtentChangeHandler(a)},onSuspend:function(){this.inherited(arguments);this._fireUpdateEnd();this._toggleTime();f.hide(this._div);
842clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors()},onResume:function(){this.inherited(arguments);var b=this._map;this._toggleTime();"css-transforms"===b.navigationMode&&(b=b.__visibleDelta,this._left=b.x,this._top=b.y,l.set(this._div,g._css.names.transform,g._css.translate(this._left,this._top)));this._enableDrawConnectors();this._wakeTimer=this._wakeTimer||setTimeout(a.hitch(this,function(){this.suspended||this._onExtentChangeHandler(this._map.extent,null,!0)}),0)},
843_enableDrawConnectors:function(){var a=n.connect,b=this._map;b&&(this._onPanHandler_connect=a(b,"onPan",this,"_onPanHandler"),this._onExtentChangeHandler_connect=a(b,"onExtentChange",this,"_onExtentChangeHandler"),"css-transforms"===b.navigationMode?this._onScaleHandler_connect=a(b,"onScale",this,this._onScaleHandler):this._onZoomHandler_connect=a(b,"onZoom",this,"_onZoomHandler"))},_disableDrawConnectors:function(){var a=n.disconnect;a(this._onPanHandler_connect);a(this._onExtentChangeHandler_connect);
844a(this._onZoomHandler_connect);a(this._onScaleHandler_connect);this._onPanHandler_connect=this._onExtentChangeHandler_connect=this._onZoomHandler_connect=this._onScaleHandler_connect=null},_toggleTime:function(){var a=this._map;this.timeInfo&&this.useMapTime&&a&&!this.suspended?(this._timeConnect||(this._timeConnect=n.connect(a,"onTimeExtentChange",this,this._onTimeExtentChangeHandler)),this._setTime(a.timeExtent)):(n.disconnect(this._timeConnect),this._timeConnect=null,this._setTime(null))},_setTime:function(a){this._params&&
845(this._params.time=a?a.toJson().join(","):null)},_onPanHandler:function(a,b){this._panDx=b.x;this._panDy=b.y;var c=this._dragOrigin,d=this._map.__visibleDelta,f=this._img;f&&("css-transforms"===this._map.navigationMode?(this._left=d.x+b.x,this._top=d.y+b.y,l.set(this._div,g._css.names.transform,g._css.translate(this._left,this._top))):l.set(f,{left:c.x+b.x+"px",top:c.y+b.y+"px"}))},_onExtentChangeHandler:function(a,b,d){if(!this.suspended){clearTimeout(this._wakeTimer);this._wakeTimer=null;var f=
846this._map,m=this._img,h=m&&m.style,t=this._dragOrigin;if(b&&!d&&m&&(b.x!==this._panDx||b.y!==this._panDy))"css-transforms"===f.navigationMode?(b=f.__visibleDelta,this._left=b.x,this._top=b.y,l.set(this._div,g._css.names.transform,g._css.translate(this._left,this._top))):l.set(m,{left:t.x+b.x+"px",top:t.y+b.y+"px"});m?(t.x=parseInt(h.left,10),t.y=parseInt(h.top,10)):t.x=t.y=0;"css-transforms"===f.navigationMode&&(d&&m)&&(l.set(m,g._css.names.transition,"none"),m._multiply=m._multiply?q.multiply(m._matrix,
847m._multiply):m._matrix);this._fireUpdateStart();if(d=this._img_loading)if(n.disconnect(d._onload_connect),n.disconnect(d._onerror_connect),n.disconnect(d._onabort_connect),e.destroy(d),this._img_loading=null,d=this._jsonRequest){try{d.cancel()}catch(p){}this._jsonRequest=null}10<=this.version&&f.wrapAround180&&(a=a._normalize(!0));if(this.isPNG32)m=this._img_loading=e.create("div"),m.id=f.id+"_"+this.id+"_"+(new Date).getTime(),l.set(m,{position:"absolute",left:"0px",top:"0px",width:f.width+"px",
848height:f.height+"px"}),m=m.appendChild(e.create("div")),l.set(m,{opacity:0,width:f.width+"px",height:f.height+"px"}),this.getImageUrl(a,f.width,f.height,this._divAlphaImageFunc);else{d=this._img_loading=e.create("img");b=g._css.names;var B=c("ie"),G={position:"absolute",width:f.width+"px",height:f.height+"px"};8===B&&(G.opacity=this.opacity);"css-transforms"===f.navigationMode?(G[b.transform]=g._css.translate(-this._left,-this._top),d._tdx=-this._left,d._tdy=-this._top,G[b.transition]=b.transformName+
849" "+s+"ms ease"):(G.left="0px",G.top="0px");d.id=f.id+"_"+this.id+"_"+(new Date).getTime();l.set(d,G);d._onload_connect=n.connect(d,"onload",this,"_onLoadHandler");d._onerror_connect=n.connect(d,"onerror",this,"_onErrorHandler");d._onabort_connect=n.connect(d,"onabort",this,"_onErrorHandler");this._startRect={left:t.x,top:t.y,width:m?parseInt(h.width,10):f.width,height:m?parseInt(h.height,10):f.height,zoom:h&&h.zoom?parseFloat(h.zoom):1};this.getImageUrl(a,f.width,f.height,this._imgSrcFunc)}}},_onTimeExtentChangeHandler:function(a){this.suspended||
850(this._setTime(a),this.refresh(!0))},getImageUrl:function(a,b,c,d){},_imgSrcFunc:function(a){this._img_loading.src=a},_divAlphaImageFunc:function(a){l.set(this._img_loading,"filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'"+a+"', sizingMethod\x3d'scale')");this._onLoadHandler({currentTarget:this._img_loading})},_onLoadHandler:function(a){a=a.currentTarget;var b=n.disconnect,c=this._map;b(a._onload_connect);b(a._onerror_connect);b(a._onabort_connect);!c||c.__panning||c.__zooming?
851e.destroy(a):(h.removeChildren(this._div),this._img=a,this._startRect={left:0,top:0,width:c.width,height:c.height,zoom:1},this._div.appendChild(a),this.suspended||f.show(this._div),a._onload_connect=a._onerror_connect=a._onabort_connect=this._img_loading=null,a=this._dragOrigin,a.x=a.y=0,this.onUpdate());this._fireUpdateEnd()},_onErrorHandler:function(a){a=a.currentTarget;var b=n.disconnect;l.set(a,"visibility","hidden");b(a._onload_connect);b(a._onerror_connect);b(a._onabort_connect);a._onload_connect=
852a._onerror_connect=a._onabort_connect=null;a=Error("Unable to load image: "+a.src);this.onError(a);this._fireUpdateEnd(a)},setUseMapTime:function(a,b){this.useMapTime=a;this._toggleTime();b||this.refresh(!0)},refresh:function(){this._map&&this._onExtentChangeHandler(this._map.extent)},_onScaleHandler:function(a,b){var c={},d=g._css.names,f=this._img;if(f){l.set(f,d.transition,b?"none":d.transformName+" "+s+"ms ease");f._matrix=a;a=f._multiply?q.multiply(a,f._multiply):a;if(f._tdx||f._tdy)a=q.multiply(a,
853{xx:1,xy:0,yx:0,yy:1,dx:f._tdx,dy:f._tdy});c[d.transform]=g._css.matrix(a);l.set(f,c)}},_onZoomHandler:function(a,b,d){a=this._startRect;var f=a.width*b,m=a.height*b,g=this._img,e=c("ie");g&&(e&&8>e?l.set(g,{left:a.left-(f-a.width)*(d.x-a.left)/a.width+"px",top:a.top-(m-a.height)*(d.y-a.top)/a.height+"px",zoom:b*a.zoom}):l.set(g,{left:a.left-(f-a.width)*(d.x-a.left)/a.width+"px",top:a.top-(m-a.height)*(d.y-a.top)/a.height+"px",width:f+"px",height:m+"px"}))},_exportMapImage:function(a,c,f){var m=this._exportMapImageHandler;
854c.token=this._getToken();b({url:a,content:c,callbackParamName:"callback",load:function(a,b){m(a,b,f)},error:d.defaults.io.errorHandler})},_exportMapImageHandler:function(a,b,c){a=new t(a);this.onMapImageExport(a);c&&c(a)},onMapImageExport:function(){},setOpacity:function(a){if(this.opacity!=a)this.onOpacityChange(this.opacity=a)},onOpacityChange:function(){},_opacityChangeHandler:function(a){var b=8===c("ie")?this._img:this._div;l.set(b,"opacity",a)}});c("extend-esri")&&a.setObject("layers.DynamicMapServiceLayer",
855p,g);return p})},"esri/lang":function(){define("dojo/_base/array dojo/_base/json dojo/_base/kernel dojo/_base/lang dojo/date dojo/has dojo/number dojo/date/locale ./kernel".split(" "),function(p,n,a,e,l,h,q,g,d){function c(b,c,d){return[e.isString(b)?b.split(""):b,c||a.global,e.isString(d)?new Function("item","index","array",d):d]}function b(a){return void 0!==a&&null!==a}
855function f(a,c,d){var f=d.match(/([^\(]+)(\([^\)]+\))?/i),k=e.trim(f[1]);d=c[a];var f=n.fromJson((f[2]?e.trim(f[2]):"()").replace(/^\(/,
856"({").replace(/\)$/,"})")),m=f.utcOffset;if(-1===p.indexOf(t,k))k=e.getObject(k),e.isFunction(k)&&(d=k(d,a,c,f));else if("number"===typeof d||"string"===typeof d&&d&&!isNaN(Number(d)))switch(d=Number(d),k){case "NumberFormat":return q.format(d,f);case "DateString":a=new Date(d);if(f.local||f.systemLocale)return f.systemLocale?a.toLocaleDateString()+(f.hideTime?"":" "+a.toLocaleTimeString()):a.toDateString()+(f.hideTime?"":" "+a.toTimeString());a=a.toUTCString();f.hideTime&&(a=a.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,
857""));return a;case "DateFormat":return a=new Date(d),b(m)&&(a=l.add(a,"minute",a.getTimezoneOffset()-m)),g.format(a,f)}return b(d)?d:""}function m(a,b){var c;if(b)for(c in a)a.hasOwnProperty(c)&&(void 0===a[c]?delete a[c]:a[c]instanceof Object&&m(a[c],!0));else for(c in a)a.hasOwnProperty(c)&&void 0===a[c]&&delete a[c];return a}var t=["NumberFormat","DateString","DateFormat"],s=/<\/?[^>]+>/g,k={valueOf:function(a,b){for(var c in a)if(a[c]==b)return c;return null},stripTags:function(a){if(a){var b=
858typeof a;if("string"===b)a=a.replace(s,"");else if("object"===b)for(var c in a)(b=a[c])&&"string"===typeof b&&(b=b.replace(s,"")),a[c]=b}return a},substitute:function(a,c,d){var k,m,g;b(d)&&(e.isObject(d)?(k=d.first,m=d.dateFormat,g=d.numberFormat):k=d);if(!c||"${*}"===c){c=[];for(var s in a){d=a[s];if(m&&-1!==p.indexOf(m.properties||"",s))d=f(s,a,m.formatter||"DateString");else if(g&&-1!==p.indexOf(g.properties||"",s))d=f(s,a,g.formatter||"NumberFormat");c.push(s+" \x3d "+(b(d)?d:"")+"\x3cbr/\x3e");
859if(k)break}return c.join("")}return e.replace(c,e.hitch({obj:a},function(a,c){var d=c.split(":");return 1<d.length?(c=d[0],d.shift(),f(c,this.obj,d.join(":"))):m&&-1!==p.indexOf(m.properties||"",c)?f(c,this.obj,m.formatter||"DateString"):g&&-1!==p.indexOf(g.properties||"",c)?f(c,this.obj,g.formatter||"NumberFormat"):b(this.obj[c])?this.obj[c]:""}),/\$\{([^\}]+)\}/g)},filter:function(a,b,d){b=c(a,d,b);d={};var f;a=b[0];for(f in a)b[2].call(b[f],a[f],f,a)&&(d[f]=a[f]);return d},isDefined:b,fixJson:m};
860h("extend-esri")&&(e.mixin(d,k),d._isDefined=b,d._getParts=c,d._sanitize=m);return k})},"esri/renderers/jsonUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../Color ../symbols/jsonUtils ./SimpleRenderer ./UniqueValueRenderer ./ClassBreaksRenderer ./VectorFieldRenderer ./DotDensityRenderer ./ScaleDependentRenderer ./TimeClassBreaksAger ./TimeRampAger ./TemporalRenderer ./HeatmapRenderer".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r){var u={fromJson:function(a){var f;
861switch(a.type||""){case "simple":f=new g(a);break;case "uniqueValue":f=new d(a);break;case "classBreaks":f=new c(a);break;case "vectorField":f=new b(a);break;case "scaleDependent":f=this._scaleDependentFromJson(a);break;case "dotDensity":f=this._dotDensityFromJson(a);break;case "temporal":f=this._temporalFromJson(a);break;case "heatmap":f=this._heatmapFromJson(a)}return f},_scaleDependentFromJson:function(a){var b={},c=a.minScale;b.rendererInfos=p.map(a.rendererInfos,function(a){var b=a.maxScale;
862a={minScale:c,maxScale:b,renderer:a.renderer&&this.fromJson(a.renderer)};c=b;return a},this);return new m(b)},_dotDensityFromJson:function(a){a.backgroundColor&&n.isArray(a.backgroundColor)&&(a.backgroundColor=h.toDojoColor(a.backgroundColor));0<a.dotSize&&(a.dotSize=e.pt2px(a.dotSize));a.fields&&p.forEach(a.fields,function(a){a&&n.isArray(a.color)&&(a.color=h.toDojoColor(a.color))});a.legendOptions&&(a.legendOptions.backgroundColor&&n.isArray(a.legendOptions.backgroundColor)&&(a.legendOptions.backgroundColor=
863h.toDojoColor(a.legendOptions.backgroundColor)),a.legendOptions.outline&&(a.legendOptions.outline=q.fromJson(a.legendOptions.outline)));a.outline&&(a.outline=q.fromJson(a.outline));return new f(a)},_temporalFromJson:function(a){var b,c,d;a=a||{};b=this.fromJson(a.observationRenderer);c=a.latestObservationRenderer?this.fromJson(a.latestObservationRenderer):null;d=a.trackRenderer?this.fromJson(a.trackRenderer):null;a=this._agerFromJson(a.observationAger);return new k(b,c,d,a)},_agerFromJson:function(a){var b;
864a=a||{};a.colorRange||a.sizeRange||a.alphaRange?b=this._timeRampFromJson(a):a.agerClassBreakInfos&&(b=this._timeClassBreaksFromJson(a));return b},_timeRampFromJson:function(a){var b,c,d;a.colorRange&&1<a.colorRange.length&&(b=[h.toDojoColor(a.colorRange[0]),h.toDojoColor(a.colorRange[1])]);a.sizeRange&&1<a.sizeRange.length&&(c=[a.sizeRange[0],a.sizeRange[1]]);a.alphaRange&&1<a.alphaRange.length&&(d=[a.alphaRange[0]/255,a.alphaRange[1]/255]);return new s(b,c,d)},_timeClassBreaksFromJson:function(a){var b=
865a.agerClassBreakInfos,c,d,f=[],k;c=t.UNIT_DAYS;switch(a.timeUnits){case "esriTimeUnitsSeconds":c=t.UNIT_SECONDS;break;case "esriTimeUnitsMilliseconds":c=t.UNIT_MILLISECONDS;break;case "esriTimeUnitsHours":c=t.UNIT_HOURS;break;case "esriTimeUnitsMinutes":c=t.UNIT_MINUTES;break;case "esriTimeUnitsMonths":c=t.UNIT_MONTHS;break;case "esriTimeUnitsWeeks":c=t.UNIT_WEEKS;break;case "esriTimeUnitsYears":c=t.UNIT_YEARS}for(k=0;k<b.length;k+=1)a=b[k],d={minAge:0,maxAge:a.oldestAge||Infinity},a.color&&(d.color=
866h.toDojoColor(a.color)),a.alpha&&(d.alpha=a.alpha/255),d.size=a.size,f[k]=d;return new t(f,c)},_heatmapFromJson:function(a){var b=a.colorStops;b&&b instanceof Array&&p.forEach(b,function(a){a.color=h.toDojoColor(a.color)});return new r(a)}};a("extend-esri")&&n.mixin(n.getObject("renderer",!0,l),u);return u})},"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(" "),
867function(p,n,a,e,l,h,q,g,d,c,b){p=p(null,{declaredClass:"esri.tasks.FeatureSet",constructor:function(d){if(d){n.mixin(this,d);var m=this.features,e=d.spatialReference,s=c.getGeometryType(d.geometryType),e=this.spatialReference=new g(e);this.geometryType=d.geometryType;d.fields&&(this.fields=d.fields);a.forEach(m,function(a,c){var d=a.geometry&&a.geometry.spatialReference;m[c]=new q(s&&a.geometry?new s(a.geometry):null,a.symbol&&b.fromJson(a.symbol),a.attributes);m[c].geometry&&!d&&m[c].geometry.setSpatialReference(e)});
868this._hydrate()}else this.features=[]},displayFieldName:null,geometryType:null,spatialReference:null,fieldAliases:null,toJson:function(a){var b={};this.displayFieldName&&(b.displayFieldName=this.displayFieldName);this.fields&&(b.fields=this.fields);this.spatialReference?b.spatialReference=this.spatialReference.toJson():this.features[0]&&this.features[0].geometry&&(b.spatialReference=this.features[0].geometry.spatialReference.toJson());this.features[0]&&(this.features[0].geometry&&(b.geometryType=
869c.getJsonType(this.features[0].geometry)),b.features=d._encodeGraphics(this.features,a));b.exceededTransferLimit=this.exceededTransferLimit;b.transform=this.transform;return h.fixJson(b)},_hydrate:function(){var a=this.transform,b=this.geometryType;if(a&&b)for(var c=this.features,d=a.translate[0],k=a.translate[1],g=a.scale[0],e=a.scale[1],h=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=
870a.rings||a.paths;var d,f,k,m,g,e,r,s;d=0;for(f=a.length;d<f;d++){g=a[d];k=0;for(m=g.length;k<m;k++)e=g[k],0<k?(r+=e[0],s+=e[1]):(r=e[0],s=e[1]),e[0]=b(r),e[1]=c(s)}};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,k,m,g;d=0;for(f=a.length;d<f;d++)k=a[d],0<d?(m+=k[0],g+=k[1]):(m=k[0],g=k[1]),k[0]=b(m),k[1]=c(g)}}(b,function(a){return a*g+d},function(a){return k-
871a*e}),a=0,b=c.length;a<b;a++)c[a].geometry&&h(c[a].geometry);this.transform=null}
871,quantize:function(a){if(!this.geometryType)return this.transform=null,this;var b=a.translate[0],c=a.translate[1],d=a.scale[0],k=a.scale[1],g=this.features,e=function(a,b,c){var d,f,k,m,g,e,r=[];d=0;for(f=a.length;d<f;d++)if(k=a[d],0<d){if(e=b(k[0]),k=c(k[1]),e!==m||k!==g)r.push([e-m,k-g]),m=e,g=k}else m=b(k[0]),g=c(k[1]),r.push([m,g]);return 0<r.length?r:null},h=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=
872b(a.x);a.y=c(a.y);return a};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){var d,f,k,m,g;k=a.rings||a.paths;g=[];d=0;for(f=k.length;d<f;d++)m=k[d],(m=e(m,b,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 d;d=e(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-b)/d)},function(a){return Math.round((c-
873a)/k)}),l,q;l=0;for(q=g.length;l<q;l++)g[l].geometry&&(h(g[l].geometry)||g[l].setGeometry(null));this.transform=a;return this}});e("extend-esri")&&n.setObject("tasks.FeatureSet",p,l);return p})},"esri/renderers/Renderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has dojox/gfx/_base ../kernel ../Color".split(" "),function(p,n,a,e,l,h,q){var g=Math.PI;p=p(null,{declaredClass:"esri.renderer.Renderer",constructor:function(a){this._ipDataCache={};if(a&&!a.declaredClass){this.rotationInfo=
874a.rotationInfo;if(!this.rotationInfo){var c=a.rotationType,b=a.rotationExpression;if(c||b)this.rotationInfo={type:c,expression:b}}this.setRotationInfo(this.rotationInfo);this.setSizeInfo(this._readSizeInfo(a.sizeInfo));this.setColorInfo(this._readColorInfo(a.colorInfo));this.setOpacityInfo(this._readOpacityInfo(a.transparencyInfo));this.setVisualVariables(this._readVariables(a.visualVariables));this.setAuthoringInfo(a.authoringInfo)}this.getSymbol=n.hitch(this,this.getSymbol)},getSymbol:function(a){},
875_readSizeInfo:function(a){if(a){var c=a.minSize,b=a.maxSize;c&&"number"===typeof c&&(a.minSize=l.pt2px(c));b&&"number"===typeof b&&(a.maxSize=l.pt2px(b))}return a},_readColorInfo:function(d){d&&(a.forEach(d.colors,function(a,b){n.isArray(a)&&(d.colors[b]=q.toDojoColor(a))}),a.forEach(d.stops,function(a,b){a.color&&n.isArray(a.color)&&(d.stops[b].color=q.toDojoColor(a.color))}));return d},_readOpacityInfo:function(d){var c;d&&(c=n.mixin({},d),c.transparencyValues&&(c.opacityValues=a.map(c.transparencyValues,
876function(a){return 1-a/100}),delete c.transparencyValues),c.stops&&(c.stops=a.map(c.stops,function(a){a=n.mixin({},a);a.opacity=1-a.transparency/100;delete a.transparency;return a})));return c},_readVariables:function(d){d&&(d=a.map(d,function(a){"sizeInfo"===a.type?a=this._readSizeInfo(a):"colorInfo"===a.type?a=this._readColorInfo(a):"transparencyInfo"===a.type&&(a=this._readOpacityInfo(a),a.type="opacityInfo");return a},this));return d},setAuthoringInfo:function(a){this.authoringInfo=a},setRotationInfo:function(a){if(a=
877this.rotationInfo="string"===typeof a?{field:a}:a){if(a.expression&&!n.isFunction(a.expression)&&!a.field){var c=a.expression.match(this.rotationRE);c&&c[1]&&(a.field=c[1])}a.rotationType=a.type}return this},rotationRE:/^\[([^\]]+)\]$/i,getRotationAngle:function(a,c){var b=this._getVarInfo(c&&c.rotationInfo,"rotationInfo").variable,f="arithmetic"===this._getRotationType(b),b=b.field,m=a.attributes,g=0;b&&(n.isFunction(b)?g=b.apply(this,arguments):m&&(g=m[b]||0),g=(g+(f?-90:0))*(f?-1:1));return g},
878_getRotationType:function(a){return a&&("rotationInfo"===a.type?a.rotationType:a.type)},setVisualVariables:function(d){var c=this._ipDataCache;a.forEach(this.visualVariables,function(a,d){c.hasOwnProperty(d)&&(c[d]=null)},this);this.visualVariables=d;a.some(d,function(a){return!!a.target})&&d.sort(function(a,c){return a.target===c.target?0:a.target?1:-1});a.forEach(d,function(a,d){"colorInfo"===a.type?c[d]=this._processColorInfo(a):"opacityInfo"===a.type?c[d]=this._processOpacityInfo(a):"sizeInfo"===
879a.type&&(c[d]=this._processSizeInfo(a))},this);return this},getVisualVariableValues:function(d){var c=this.visualVariables,b;c&&(b=a.map(c,function(a){var b;switch(a.type){case "sizeInfo":b=this.getSize(d,{sizeInfo:a});break;case "colorInfo":b=this.getColor(d,{colorInfo:a});break;case "opacityInfo":b=this.getOpacity(d,{opacityInfo:a});break;case "rotationInfo":b=this.getRotationAngle(d,{rotationInfo:a})}return{variable:a,value:b}},this));return b},hasVisualVariables:function(a,c){return a?!!this.getVisualVariablesForType(a,
880c):!(!this.getVisualVariablesForType("sizeInfo",c)&&!this.getVisualVariablesForType("colorInfo",c)&&!this.getVisualVariablesForType("opacityInfo",c)&&!this.getVisualVariablesForType("rotationInfo",c))},getVisualVariablesForType:function(d,c){var b=this.visualVariables,f;!c&&this[d]?("rotationInfo"===d&&(this[d].rotationType=this[d].type),f=[this[d]]):b&&(f=a.filter(b,function(a){return a.type===d&&("string"===typeof c?a.target===c:!1===c?!a.target:!0)}))&&0===f.length&&(f=void 0);return f},setSizeInfo:function(a){this.sizeInfo=
881this.proportionalSymbolInfo=a;this._ipDataCache.sizeInfo=this._processSizeInfo(a);return this},_processSizeInfo:function(a){return a&&{root:this._interpolateData(a),minSize:this._interpolateData(a.minSize),maxSize:this._interpolateData(a.maxSize)}},_getVarInfo:function(d,c){var b;d&&d.type===c?(b=a.indexOf(this.visualVariables,d),d=this.visualVariables[b]):(b=c,d=this[c]);return{variable:d,cacheKey:b}},setProportionalSymbolInfo:function(a){this.setSizeInfo(a);return this},getSize:function(a,c){var b=
882this._getVarInfo(c&&c.sizeInfo,"sizeInfo"),f=b.variable,b=this._ipDataCache[b.cacheKey],m=null;if(f)var g=f.minSize,m=f.maxSize,g="object"===typeof g&&g?this._getSize(a,g,b&&b.minSize,c):g,m="object"===typeof m&&m?this._getSize(a,m,b&&b.maxSize,c):m,m=this._getSize(a,f,b&&b.root,c,[g,m]);return m},_getSize:function(a,c,b,f,m){var e=a.attributes,s=c.field,k=c.expression,r=c.stops,h=0,l="number"===typeof a,q=l?a:null;if(s||k){var p=f&&f.scale,w=m?m[0]:c.minSize,y=m?m[1]:c.maxSize,B=c.minDataValue,G=
883c.maxDataValue,D=c.valueUnit||"unknown",A=c.valueRepresentation,C=c.scaleBy,E=c.normalizationField,I=e?parseFloat(e[E]):void 0,H=f&&f.shape;k?q="view.scale"===k.toLowerCase()?p:null:"number"!==typeof q&&(n.isFunction(s)?q=s.apply(this,arguments):e&&(q=e[s]));if(null==q||E&&!l&&(isNaN(I)||0===I))return null;!isNaN(I)&&!l&&(q/=I);if(r)y=this._lookupData(q,b),q=y[0],w=y[1],q===w?h=r[q].size:(q=r[q].size,r=r[w].size,h=q+(r-q)*y[2]);else if(null!=w&&null!=y&&null!=B&&null!=G)q<=B?h=w:q>=G?h=y:(r=(q-B)/
884(G-B),"area"===C&&H?(w=(q="circle"===H)?g*Math.pow(w/2,2):w*w,y=q?g*Math.pow(y/2,2):y*y,r=w+r*(y-w),h=q?2*Math.sqrt(r/g):Math.sqrt(r)):h=w+r*(y-w));else if("unknown"===D)null!=w&&null!=B&&(w&&B?(r=q/B,h="circle"===H?2*Math.sqrt(r*Math.pow(w/2,2)):"square"===
884H||"diamond"===H||"image"===H?Math.sqrt(r*Math.pow(w,2)):r*w):h=q+(w||B),h=h<w?w:h,null!=y&&h>y&&(h=y));else{r=(f&&f.resolution?f.resolution:1)*this._meterIn[D];if("area"===A)h=Math.sqrt(q/g)/r,h*=2;else if(h=q/r,"radius"===A||"distance"===A)h*=
8852;null!=w&&h<w&&(h=w);null!=y&&h>y&&(h=y)}}else h=r&&r[0]&&r[0].size,null==h&&(h=c.minSize);return h=isNaN(h)?0:h},getSizeRangeAtScale:function(a,c){var b,f=this._getVarInfo(a,"sizeInfo"),m=this._ipDataCache[f.cacheKey],g={scale:c};if((a=f.variable)&&c){var e=a.minSize,f=a.maxSize,e="object"===typeof e&&e?this._getSize({},e,m&&m.minSize,g):e,m="object"===typeof f&&f?this._getSize({},f,m&&m.maxSize,g):f;if(null!=e||null!=m)b={minSize:e,maxSize:m}}return b},setColorInfo:function(a){this.colorInfo=a;
886this._ipDataCache.colorInfo=this._processColorInfo(a);return this},_processColorInfo:function(d){d&&(a.forEach(d.colors,function(a,b){n.isArray(a)&&(d.colors[b]=new q(a))}),a.forEach(d.stops,function(a,b){a.color&&n.isArray(a.color)&&(d.stops[b].color=new q(a.color))}));return this._interpolateData(d)},getColor:function(a,c){var b=this._getVarInfo(c&&c.colorInfo,"colorInfo");return this._getColorComponent(a,b.variable,this._ipDataCache[b.cacheKey])},setOpacityInfo:function(a){this.opacityInfo=a;this._ipDataCache.opacityInfo=
887this._processOpacityInfo(a);return this},_processOpacityInfo:function(a){return this._interpolateData(a)},getOpacity:function(a,c){var b=this._getVarInfo(c&&c.opacityInfo,"opacityInfo");return this._getColorComponent(a,b.variable,this._ipDataCache[b.cacheKey],!0)},_getColorComponent:function(a,c,b,f,m){var g=a.attributes,e=c&&c.field,k="number"===typeof a,r=k?a:null,h;if(e){var l=c.normalizationField,q=g?parseFloat(g[l]):void 0;"number"!==typeof r&&(n.isFunction(e)?r=e.apply(this,arguments):g&&(r=
888g[e]));if(null!=r&&(!l||k||!isNaN(q)&&0!==q))!isNaN(q)&&!k&&(r/=q),h=f?this._getOpacity(r,c,b):this._getColor(r,c,b)}else c&&(g=c.stops,f?(h=g&&g[0]&&g[0].opacity,null==h&&(h=c.opacityValues&&c.opacityValues[0])):h=g&&g[0]&&g[0].color||c.colors&&c.colors[0]);m&&(m.data=r,m.value=h);return m||h},_interpolateData:function(d){var c;if(d)if(d.colors||d.opacityValues){var b=(d.colors||d.opacityValues).length,f=d.minDataValue,m=(d.maxDataValue-f)/(b-1);c=[];for(d=0;d<b;d++)c[d]=f+d*m}else d.stops&&(c=a.map(d.stops,
889function(a){return a.value}));return c},_getOpacity:function(a,c,b){a=this._lookupData(a,b);var f;c=c||this.opacityInfo;a&&(b=a[0],f=a[1],b===f?f=this._getOpacValue(c,b):(b=this._getOpacValue(c,b),c=this._getOpacValue(c,f),f=b+(c-b)*a[2]));return f},_getOpacValue:function(a,c){return a.opacityValues?a.opacityValues[c]:a.stops[c].opacity},_getColor:function(a,c,b){a=this._lookupData(a,b);var f;c=c||this.colorInfo;a&&(f=a[0],b=a[1],f=f===b?this._getColorObj(c,f):q.blendColors(this._getColorObj(c,f),
890this._getColorObj(c,b),a[2]));return f},_getColorObj:function(a,c){return a.colors?a.colors[c]:a.stops[c].color},_lookupData:function(d,c){var b;if(c){var f=0,m=c.length-1;a.some(c,function(a,b){if(d<a)return m=b,!0;f=b;return!1});b=[f,m,(d-c[f])/(c[m]-c[f])]}return b},_meterIn:{inches:39.3701,feet:3.28084,yards:1.09361,miles:6.21371E-4,"nautical-miles":5.39957E-4,millimeters:1E3,centimeters:100,decimeters:10,meters:1,kilometers:0.0010,"decimal-degrees":180/20015077},_writeSizeInfo:function(a){if(a){a=
891n.mixin({},a);var c=a.minSize,b=a.maxSize;c&&(a.minSize="number"===typeof c?l.px2pt(c):n.clone(c));b&&(a.maxSize="number"===typeof b?l.px2pt(b):n.clone(b));if(c=a.legendOptions)if(a.legendOptions=n.mixin({},c),c=c.customValues)a.legendOptions.customValues=c.slice(0)}return a},_writeColorInfo:function(d){d&&(d=n.mixin({},d),d.colors&&(d.colors=a.map(d.colors,function(a){return q.toJsonColor(a)})),d.stops&&(d.stops=a.map(d.stops,function(a){a=n.mixin({},a);a.color&&(a.color=q.toJsonColor(a.color));
892return a})));return d},_writeOpacityInfo:function(d){var c;d&&(c=n.mixin({},d),c.opacityValues&&(c.transparencyValues=a.map(c.opacityValues,function(a){return 100*(1-a)}),delete c.opacityValues),c.stops&&(c.stops=a.map(c.stops,function(a){a=n.mixin({},a);a.transparency=100*(1-a.opacity);delete a.opacity;return a})));return c},toJson:function(){var d=this.visualVariables,c=n.clone(this.authoringInfo),b=this.getVisualVariablesForType("rotationInfo",!1),f=(b=b&&b[0])&&b.field,f=b&&(b.expression||f&&
893(n.isFunction(f)?f:"["+f+"]"));d&&(d=a.map(d,function(a){"sizeInfo"===a.type?a=this._writeSizeInfo(a):"colorInfo"===a.type?a=this._writeColorInfo(a):"opacityInfo"===a.type?(a=this._writeOpacityInfo(a),a.type="transparencyInfo"):"rotationInfo"===a.type&&(a=n.mixin({},a));return a},this));c&&a.forEach(c.visualVariables,function(a){"opacityInfo"===a.type&&(a.type="transparencyInfo")});return{rotationType:f&&(this._getRotationType(b)||"geographic"),rotationExpression:f,colorInfo:this._writeColorInfo(this.colorInfo),
894transparencyInfo:this._writeOpacityInfo(this.opacityInfo),sizeInfo:this._writeSizeInfo(this.sizeInfo),visualVariables:d,authoringInfo:c}}});e("extend-esri")&&n.setObject("renderer.Renderer",p,h);return p})},"esri/symbols/CartographicLineSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./SimpleLineSymbol".split(" "),function(p,n,a,e,l,h,q,g){var d={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",
895STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none",STYLE_INSIDE_FRAME:"insideframe",STYLE_SHORTDASH:"shortdash",STYLE_SHORTDOT:"shortdot",STYLE_SHORTDASHDOT:"shortdashdot",STYLE_SHORTDASHDOTDOT:"shortdashdotdot",STYLE_LONGDASH:"longdash",STYLE_LONGDASHDOT:"longdashdot",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"},c={color:[0,0,0,1],style:d.STYLE_SOLID,width:1,cap:d.CAP_BUTT,join:d.JOIN_MITER,miterLimit:10};p=p(g,{declaredClass:"esri.symbol.CartographicLineSymbol",
896type:"cartographiclinesymbol",_caps:{butt:"esriLCSButt",round:"esriLCSRound",square:"esriLCSSquare"},_joins:{miter:"esriLJSMiter",round:"esriLJSRound",bevel:"esriLJSBevel"},constructor:function(b,d,m,g,e,k){b?n.isString(b)?(this.style=b,d&&(this.color=d
896),void 0!==m&&(this.width=m),g&&(this.cap=g),e&&(this.join=e),void 0!==k&&(this.miterLimit=k)):(this.cap=q.valueOf(this._caps,b.cap),this.join=q.valueOf(this._joins,b.join),this.width=l.pt2px(b.width),this.miterLimit=l.pt2px(b.miterLimit)):(n.mixin(this,
897c),this.color=new a(this.color),this.width=l.pt2px(this.width),this.miterLimit=l.pt2px(this.miterLimit))},setCap:function(a){this.cap=a;return this},setJoin:function(a){this.join=a;return this},setMiterLimit:function(a){this.miterLimit=a;return this},getStroke:function(){return n.mixin(this.inherited("getStroke",arguments),{cap:this.cap,join:this.join===d.JOIN_MITER?this.miterLimit:this.join})},getFill:function(){return null},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -15,0 L 15,0 E"},
898fill:null,stroke:this.getStroke()}},toJson:function(){var a=l.px2pt(this.miterLimit),a=isNaN(a)?void 0:a;return q.fixJson(n.mixin(this.inherited("toJson",arguments),{type:"esriCLS",cap:this._caps[this.cap],join:this._joins[this.join],miterLimit:a}))}});n.mixin(p,d);p.defaultProps=c;e("extend-esri")&&(n.setObject("symbol.CartographicLineSymbol",p,h),h.symbol.defaultCartographicLineSymbol=c);return p})},"esri/geometry/Multipoint":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../SpatialReference ./Geometry ./Point ./Extent ../srUtils".split(" "),
899function(p,n,a,e,l,h,q,g,d){var c={type:"multipoint",points:null};p=p(h,{declaredClass:"esri.geometry.Multipoint",constructor:function(a){n.mixin(this,c);this.points=[];a&&(a.points?n.mixin(this,a):this.spatialReference=a,this.spatialReference&&(this.spatialReference=d.createSpatialReference(this.spatialReference)));this.verifySR()},addPoint:function(a){this.clearCache();n.isArray(a)?this.points.push(a):this.points.push([a.x,a.y]);return this},removePoint:function(a){if(this._validateInputs(a))return this.clearCache(),
900new q(this.points.splice(a,1)[0],this.spatialReference)},getExtent:function(){var a=this.getCacheValue("_extent");if(a)return new g(a);var a=this.points,c=a.length;if(c){var d=a[0],e,h,k=e=d[0],r=h=d[1],l=Math.min,q=Math.max,n=this.spatialReference,p,w;for(w=0;w<c;w++)d=a[w],p=d[0],d=d[1],k=l(k,p),r=l(r,d),e=q(e,p),h=q(h,d);a={xmin:k,ymin:r,xmax:e,ymax:h,spatialReference:n?n.toJson():null};this.setCacheValue("_extent",a);return new g(a)}},_validateInputs:function(a){return null===a||0>a||a>=this.points.length?
901!1:!0},getPoint:function(a){if(this._validateInputs(a))return a=this.points[a],new q(a[0],a[1],this.spatialReference)},setPoint:function(a,c){if(this._validateInputs(a))return this.clearCache(),this.points[a]=[c.x,c.y],this},toJson:function(){var a={points:n.clone(this.points)},c=this.spatialReference;c&&(a.spatialReference=c.toJson());return a}});p.defaultProps=c;a("extend-esri")&&(n.setObject("geometry.Multipoint",p,e),e.geometry.defaultMultipoint=c);return p})},"esri/deferredUtils":function(){define(["dojo/_base/lang",
902"dojo/has","./kernel"],function(p,n,a){var e={_dfdCanceller:function(a){a.canceled=!0;var e=a._pendingDfd;-1===a.fired&&(e&&-1===e.fired)&&e.cancel();a._pendingDfd=null},_fixDfd:function(a){var e=a.then;a.then=function(a,g,d){if(a){var c=a;a=function(a){return a&&a._argsArray?c.apply(null,a):c(a)}}return e.call(this,a,g,d)};return a},_resDfd:function(a,e,q){var g=e.length;1===g?q?a.errback(e[0]):a.callback(e[0]):1<g?(e._argsArray=!0,a.callback(e)):a.callback()}};n("extend-esri")&&p.mixin(a,e);return e})},
903"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./domReady","./sniff","./_base/window"],function(p,n,a,e,l){var h=l.doc.documentElement;l=e("ie");var q=e("opera"),g=Math.floor,d=e("ff"),c=p.boxModel.replace(/-/,""),q={dj_quirks:e("quirks"),dj_opera:q,dj_khtml:e("khtml"),dj_webkit:e("webkit"),dj_safari:e("safari"),dj_chrome:e("chrome"),dj_gecko:e("mozilla"),dj_ios:e("ios"),dj_android:e("android")};l&&(q.dj_ie=!0,q["dj_ie"+g(l)]=!0,q.dj_iequirks=e("quirks"));d&&(q["dj_ff"+g(d)]=!0);
904q["dj_"+c]=!0;var b="",f;for(f in q)q[f]&&(b+=f+" ");h.className=n.trim(h.className+" "+b);a(function(){if(!p.isBodyLtr()){var a="dj_rtl dijitRtl "+b.replace(/ /g,"-rtl ");h.className=n.trim(h.className+" "+a+"dj_rtl dijitRtl "+b.replace(/ /g,"-rtl "))}});return e})},"esri/layers/RasterDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource".split(" "),function(p,n,a,e,l,h){p=p(h,{declaredClass:"esri.layers.RasterDataSource",toJson:function(){return l.fixJson({type:"raster",
905workspaceId:this.workspaceId,dataSourceName:this.dataSourceName})}});a("extend-esri")&&n.setObject("layers.RasterDataSource",p,e);return p})},"esri/request":function(){define("require dojo/_base/array dojo/_base/config dojo/_base/Deferred dojo/_base/lang dojo/_base/url dojo/_base/xhr dojo/io/script dojo/io/iframe dojo/dom-construct dojo/io-query ./kernel ./config ./sniff ./lang ./urlUtils ./deferredUtils".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r){function u(a){a=new h(a);return(a.host+
906(a.port?":"+a.port:"")).toLowerCase()}function x(m,r,h,p){var u=!1,w=!1,v;s.isDefined(r)&&(l.isObject(r)?(u=!!r.useProxy,w=!!r.usePost,v=r.crossOrigin):u=!!r);m=l.mixin({},m);m._ssl&&(m.url=m.url.replace(/^http:/i,"https:"));r=m.content;var x=m.url,y=h&&m.form,z=D;v=s.isDefined(v)?v:z.useCors;m.load=function(b){var c;b&&(b.error?(c=l.mixin(Error(),b.error),c.log=a.isDebug):"error"===b.status&&(c=l.mixin(Error(),b),c.log=a.isDebug),c&&!s.isDefined(c.httpCode)&&(c.httpCode=c.code));return c||b};m.error=
907function(b,c){c&&c.xhr&&c.xhr.abort();b instanceof Error||(b=l.mixin(Error(),b));b.log=a.isDebug;z.errorHandler(b,c);return b};m._token&&(m.content=m.content||{},m.content.token=m._token);var B=0,A;r&&x&&(A=b.objectToQuery(r),B=A.length+x.length+1,t("esri-url-encodes-apostrophe")&&(B=A.replace(/'/g,"%27").length+x.length+1));m.timeout=s.isDefined(m.timeout)?m.timeout:z.timeout;m.handleAs=m.handleAs||"json";try{var Y,R,ba=v&&k.canUseXhr(m.url)&&!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(m.url),
908Q=k.hasSameOrigin(m.url,window.location.href)||ba,P=w||h||B>z.postLength?!0:!1,ca=!Q&&-1!==m.handleAs.indexOf("json")&&m.callbackParamName&&!h?!0:!1,Z=k.getProxyRule(m.url)||z.alwaysUseProxy||u||(!ca||P)&&!Q?!0:!1;h&&(!t("esri-file-upload")&&!Z&&ba)&&(Z=!0);if(Z)if(Y=k.getProxyUrl(x,v),R=Y.path,Y._xo&&(ba=!0),!P&&R.length+1+B>z.postLength&&(P=!0),m.url=R+"?"+x,P)m.content=l.mixin(Y.query||{},r);else{var X=b.objectToQuery(l.mixin(Y.query||{},r));X&&(m.url+="?"+X);m.content=null}if(ca&&!P)return!s.isDefined(m.isAsync)&&
9094>t("ff")&&(m.isAsync=!0),g.get(G?G(m):m);var W=m.headers;if(ba&&(!W||!W.hasOwnProperty("X-Requested-With")))W=m.headers=W||{},W["X-Requested-With"]=null;if(h){var V=m.callbackParamName||"callback.html",$=m.callbackElementName||"textarea",S,aa,fa,da,la=y.elements?y.elements.length:0,ga;if(r=m.content)for(S in r)if(fa=r[S],s.isDefined(fa)){aa=null;for(da=0;da<la;da++)if(ga=y.elements[da],ga.name===S){aa=ga;break}aa?aa.value=fa:p?y.append(S,fa):y.appendChild(c.create("input",{type:"hidden",name:S,value:fa}))}if(t("esri-file-upload"))n.forEach(y.elements,
910function(a){a.name===V&&y.removeChild(a)}),m.contentType=!1,m.postData=p?y:new FormData(y),delete m.form;else{y.enctype="multipart/form-data";9>t("ie")&&(y.encoding="multipart/form-data");y.method="post";n.some(y.elements,function(a){return a.name===V})||y.appendChild(c.create("input",{type:"hidden",name:V,value:$}));
910if(-1!==x.toLowerCase().indexOf("addattachment")||-1!==x.toLowerCase().indexOf("updateattachment"))m.url=x+(-1===x.indexOf("?")?"?":"\x26")+V+"\x3d"+$,Z&&(m.url=R+"?"+m.url);delete m.content}}if(ba&&
911!m.hasOwnProperty("withCredentials")&&"with-credentials"===D.useCors){p=Z?R:x;var ma=k.canUseXhr(p,!0),ja=-1<ma?D.corsEnabledServers[ma]:null;if(ja&&ja.hasOwnProperty("withCredentials"))ja.withCredentials&&(m.withCredentials=!0);else if(f.id){var ha=f.id.findServerInfo(p);ha&&ha.webTierAuth&&(m.withCredentials=!0)}}m=G?G(m):m;if(P){if(h&&!t("esri-file-upload"))return d.send(m);!Z&&t("safari")&&(m.url+=(-1===m.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+C++);return q.post(m)}return q.get(m)}catch(na){return h=
912new e,h.errback(m.error(na)),h}}function v(a){var b=D.corsStatus,c=k.canUseXhr(a,!0);-1<c&&D.corsEnabledServers.splice(c,1);b[u(a)]=1;return c}function z(a){var b=D.corsStatus;if(D.corsDetection&&D.useCors)try{var c=u(a);t("esri-cors")&&(a&&-1!==a.toLowerCase().indexOf("/rest/services")&&!k.hasSameOrigin(a,window.location.href)&&!k.canUseXhr(a)&&!b[c])&&(b[c]=-1,q.get({url:a.substring(0,a.toLowerCase().indexOf("/rest/")+6)+"info",content:{f:"json"},failOk:!0,handleAs:"json",headers:{"X-Requested-With":null}}).then(function(d){d?
913(b[c]=2,k.canUseXhr(a)||D.corsEnabledServers.push(c)):b[c]=1},function(a){b[c]=1}))}catch(d){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}}function w(a){G=a}function y(b,c){function d(k){k._pendingDfd=x(b,c,O,G);if(!k._pendingDfd){k.ioArgs=k._pendingDfd&&k._pendingDfd.ioArgs;var m=Error("Deferred object is missing");m.log=a.isDebug;b._usrDfd=null;k.errback(m);k._pendingDfd=null;return k}k._pendingDfd.addCallback(function(a){k.ioArgs=k._pendingDfd&&k._pendingDfd.ioArgs;
914b._usrDfd=null;k.callback(a);k._pendingDfd=null}).addErrback(function(a){var d,m,g;a&&(d=a.code,m=a.subcode,g=(g=a.messageCode)&&g.toUpperCase());if(a&&403==d&&(4==m||a.message&&-1<a.message.toLowerCase().indexOf("ssl")&&-1===a.message.toLowerCase().indexOf("permission"))){if(!b._ssl){b._ssl=b._sslFromServer=!0;b._usrDfd=k;y(b,c);return}}else if(a&&415==a.status){if(v(b.url),!b._err415){b._err415=1;b._usrDfd=k;y(b,c);return}}else if(f.id&&-1!==n.indexOf(f.id._errorCodes,d)&&!f.id._isPublic(b.url)&&
915!h&&(403!=d||-1===n.indexOf(A,g)&&(!s.isDefined(m)||2==m&&b._token))){k._pendingDfd=f.id.getCredential(b.url,{token:b._token,error:a});k._pendingDfd.addCallback(function(a){b._token=a.token;b._usrDfd=k;b._credential=a;b._ssl=b._sslFromServer||a.ssl;y(b,c)}).addErrback(function(a){b._usrDfd=null;k.errback(a);k._pendingDfd=null});return}k.ioArgs=k._pendingDfd&&k._pendingDfd.ioArgs;b._usrDfd=null;k.errback(a);k._pendingDfd=null})}b.url=k.fixUrl(b.url);"file:"!==window.location.protocol&&(b.url=k.getAbsoluteUrl(b.url));
916c=c||{};var m,g=b.form,h=c.disableIdentityLookup,l=c._preLookup,w=!1;if(t("esri-workers")&&!1!==D.useWorkers)if(!0===c.useWorkers||!0===D.useWorkers)w=!0;else if(c.workerOptions){var C=c.workerOptions;if(C.callback||C.worker&&C.worker.worker instanceof Worker)w=!0}var G=g&&g.append,O=g&&(g.elements?n.some(g.elements,function(a){return"file"===a.type}):G),U=-1!==b.url.toLowerCase().indexOf("token\x3d")||b.content&&b.content.token||O&&n.some(g.elements,function(a){return"token"===a.name})?1:0;z(b.url);
917if(b._usrDfd)m=b._usrDfd;else{m=new e(r._dfdCanceller);m.addCallback(function(a){if((/\/sharing\/rest\/accounts\/self/i.test(b.url)||/\/sharing\/rest\/portals\/self/i.test(b.url))&&!U&&!b._token&&a.user&&a.user.username){D.webTierAuthServers.push(u(b.url));a=D.corsEnabledServers;var c=k.canUseXhr(b.url,!0),d={host:u(b.url),withCredentials:!0};if(-1===c)a.push(d);else{var m=a[c];"object"===typeof m?m.withCredentials=!0:a.splice(c,1,d)}}if(a=b._credential)if(c=(c=f.id.findServerInfo(a.server))&&c.owningSystemUrl)c=
918c.replace(/\/?$/,"/sharing"),(a=f.id.findCredential(c,a.userId))&&-1===f.id._getIdenticalSvcIdx(c,a)&&a.resources.splice(0,0,c)});m.addBoth(function(a){delete b._credential;if(a&&(!t("ie")||!a.nodeType))a._ssl=b._ssl});var Y=b.load,R=b.error;Y&&m.addCallback(function(a){var b=m._pendingDfd,b=b&&b.ioArgs;return Y.call(b&&b.args,a,b)});R&&m.addErrback(function(a){var b=m._pendingDfd,b=b&&b.ioArgs;return R.call(b&&b.args,a,b)})}if(f.id&&!U&&!b._token&&!f.id._isPublic(b.url)&&(!h||l))if(g=f.id.findCredential(b.url))b._token=
919g.token,b._ssl=g.ssl;w?c.workerOptions&&c.workerOptions.worker?(B||(B=q),q=c.workerOptions.worker,d(m)):p(["./workers/RequestClient"],function(a){B||(B=q);
919if(c.workerOptions){var b=c.workerOptions;q=a.getClient(b.callback,b.cbFunction)}else q=a.getClient();d(m)}):(B&&(q=B,B=null),d(m));return m}var B=null,G,D=m.defaults.io,A=["COM_0056","COM_0057"],C=0;y._request=x;y._disableCors=v;y._detectCors=z;y.setRequestPreCallback=w;t("extend-esri")&&(f.request=y,f._request=x,f._disableCors=v,f._detectCors=
920z,f.setRequestPreCallback=w);return y})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(p,n){var a=/[&<>'"\/]/g,e={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},l={};n.setObject("dojo.string",l);l.escape=function(h){return!h?"":h.replace(a,function(a){return e[a]})};l.rep=function(a,e){if(0>=e||!a)return"";for(var g=[];;){e&1&&g.push(a);if(!(e>>=1))break;a+=a}return g.join("")};l.pad=function(a,e,g,d){g||(g="0");a=
921String(a);e=l.rep(g,Math.ceil((e-a.length)/g.length));return d?a+e:e+a};l.substitute=function(a,e,g,d){d=d||p.global;g=g?n.hitch(d,g):function(a){return a};return a.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(a,b,f){a=n.getObject(b,!1,e);f&&(a=n.getObject(f,!1,d).call(d,a,b));return g(a,b).toString()})};l.trim=String.prototype.trim?n.trim:function(a){a=a.replace(/^\s+/,"");for(var e=a.length-1;0<=e;e--)if(/\S/.test(a.charAt(e))){a=a.substring(0,e+1);break}return a};return l})},"esri/layers/InheritedDomain":function(){define(["dojo/_base/declare",
922"dojo/_base/lang","dojo/has","../kernel","./Domain"],function(p,n,a,e,l){p=p([l],{declaredClass:"esri.layers.InheritedDomain"});a("extend-esri")&&n.setObject("layers.InheritedDomain",p,e);return p})},"dijit/Tooltip":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/fx dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff ./_base/manager ./place ./_Widget ./_TemplatedMixin ./BackgroundIframe dojo/text!./templates/Tooltip.html ./main".split(" "),
923function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u){function x(){}var v=n("dijit._MasterTooltip",[t,s],{duration:f.defaultDuration,templateString:r,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);
923this.bgIframe=new k(this.domNode);this.fadeIn=a.fadeIn({node:this.domNode,duration:this.duration,onEnd:g.hitch(this,"_onShow")});this.fadeOut=a.fadeOut({node:this.domNode,duration:this.duration,onEnd:g.hitch(this,"_onHide")})},show:function(a,b,c,d,f,k,e){if(!this.aroundNode||!(this.aroundNode===
924b&&this.containerNode.innerHTML==a))if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;f&&this.set("textDir",f);this.containerNode.align=d?"right":"left";var r=m.around(this.domNode,b,c&&c.length?c:z.defaultPosition,!d,g.hitch(this,"orient")),h=r.aroundNodePos;"M"==r.corner.charAt(0)&&"M"==r.aroundCorner.charAt(0)?(this.connectorNode.style.top=h.y+(h.h-this.connectorNode.offsetHeight>>1)-r.y+"px",this.connectorNode.style.left=""):"M"==r.corner.charAt(1)&&
925"M"==r.aroundCorner.charAt(1)?this.connectorNode.style.left=h.x+(h.w-this.connectorNode.offsetWidth>>1)-r.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");q.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b;this.onMouseEnter=k||x;this.onMouseLeave=e||x}},orient:function(a,c,d,f,k){this.connectorNode.style.top="";var m=f.h;f=f.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove",
926"BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[c+"-"+d];this.domNode.style.width="auto";var g=h.position(this.domNode);if(b("ie")||b("trident"))g.w+=2;var e=Math.min(Math.max(f,1),g.w);h.setMarginBox(this.domNode,{w:e});"B"==d.charAt(0)&&"B"==c.charAt(0)?(a=h.position(a),c=
927this.connectorNode.offsetHeight,a.h>m?(this.connectorNode.style.top=m-(k.h+c>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(k.h/2-c/2,0),a.h-c)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,g.w-f)},_onShow:function(){b("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=
928!1,this.aroundNode=null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=x},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});b("dojo-bidi")&&v.extend({_setAutoTextDir:function(a){this.applyTextDir(a);p.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=
929this.textDir}});u.showTooltip=function(a,b,c,d,f,k,m){c&&(c=p.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));z._masterTT||(u._masterTT=z._masterTT=new v);return z._masterTT.show(a,b,c,d,f,k,m)};u.hideTooltip=function(a){return z._masterTT&&z._masterTT.hide(a)};var z=n("dijit.Tooltip",t,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(a){p.forEach(this._connections||[],function(a){p.forEach(a,function(a){a.remove()})},
930this);this._connectIds=p.filter(g.isArrayLike(a)?a:a?[a]:[],function(a){return e.byId(a,this.ownerDocument)},this);this._connections=p.map(this._connectIds,function(a){a=e.byId(a,this.ownerDocument);var b=this.selector,f=b?function(a){return c.selector(b,a)}:function(a){return a},k=this;return[c(a,f(d.enter),function(){k._onHover(this)}),c(a,f("focusin"),function(){k._onHover(this)}),c(a,f(d.leave),g.hitch(k,"_onUnHover")),c(a,f("focusout"),g.hitch(k,"set","state","DORMANT"))]},this);this._set("connectId",
931a)},addTarget:function(a){a=a.id||a;-1==p.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=p.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);l.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;p.forEach(g.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||
932this.domNode.innerHTML}
932,state:"DORMANT",_setStateAttr:function(a){if(!(this.state==a||"SHOW TIMER"==a&&"SHOWING"==this.state||"HIDE TIMER"==a&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(a){case "DORMANT":this._connectNode&&(z.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state",
933"SHOWING")},this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT");return}z.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,g.hitch(this,"set","state","SHOWING"),g.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",a)}},_onHover:function(a){this._connectNode&&
934a!=this._connectNode&&this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOW TIMER")},_onUnHover:function(a){this.set("state","HIDE TIMER")},open:function(a){this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");p.forEach(this._connections||[],function(a){p.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});
935z._MasterTooltip=v;z.show=u.showTooltip;z.hide=u.hideTooltip;z.defaultPosition=["after-centered","before-centered"];return z})},"esri/symbols/PictureMarkerSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang ../urlUtils ./MarkerSymbol".split(" "),function(p,n,a,e,l,h,q,g){var d={url:"",width:12,height:12,angle:0,xoffset:0,yoffset:0};p=p(g,{declaredClass:"esri.symbol.PictureMarkerSymbol",type:"picturemarkersymbol",constructor:function(c,b,f){c?
936n.isString(c)?(this.url=c,b&&(this.width=b),f&&(this.height=f)):(this.width=e.pt2px(c.width),this.height=e.pt2px(c.height),b=c.imageData,!(9>a("ie"))&&b&&(f=this.url,this.url="data:"+(c.contentType||"image")+";base64,"+b,this.imageData=f)):(n.mixin(this,d),this.width=e.pt2px(this.width),this.height=e.pt2px(this.height))},getStroke:function(){return null},getFill:function(){return null},setWidth:function(a){this.width=a;return this},setHeight:function(a){this.height=a;return this},setUrl:function(a){a!==
937this.url&&(delete this.imageData,delete this.contentType);this.url=a;return this},getShapeDescriptors:function(){return{defaultShape:{type:"image",x:-Math.round(this.width/2),y:-Math.round(this.height/2),width:this.width,height:this.height,src:this.url||""},fill:null,stroke:null}},toJson:function(){var a=this.url,b=this.imageData;if(0===a.indexOf("data:"))var d=a,a=b,b=d.indexOf(";base64,")+8,b=d.substr(b);if(n.isString(a)&&(0===a.indexOf("/")||0===a.indexOf("//")||0===a.indexOf("./")||0===a.indexOf("../")))a=
938q.getAbsoluteUrl(a);var d=e.px2pt(this.width),d=isNaN(d)?void 0:d,m=e.px2pt(this.height),m=isNaN(m)?void 0:m,a=h.fixJson(n.mixin(this.inherited("toJson",arguments),{type:"esriPMS",url:a,imageData:b,contentType:this.contentType,width:d,height:m}));delete a.color;delete a.size;a.imageData||delete a.imageData;return a}});p.defaultProps=d;a("extend-esri")&&(n.setObject("symbol.PictureMarkerSymbol",p,l),l.symbol.defaultPictureMarkerSymbol=d);return p})},"esri/layers/LayerMapSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./LayerSource".split(" "),
939function(p,n,a,e,l,h){p=p(h,{declaredClass:"esri.layers.LayerMapSource",type:"mapLayer",toJson:function(){return l.fixJson({type:"mapLayer",mapLayerId:this.mapLayerId,gdbVersion:this.gdbVersion})}});a("extend-esri")&&n.setObject("layers.LayerMapSource",p,e);return p})},"dijit/form/DropDownButton":function(){define("dojo/_base/declare dojo/_base/lang dojo/query ../registry ../popup ./Button ../_Container ../_HasDropDown dojo/text!./templates/DropDownButton.html ../a11yclick".split(" "),function(p,
940n,a,e,l,h,q,g,d){return p("dijit.form.DropDownButton",[h,q,g],{baseClass:"dijitDropDownButton",templateString:d,_fillContent:function(){if(this.srcNodeRef){var c=a("*",this.srcNodeRef);this.inherited(arguments,[c[0]]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var c=a("[widgetId]",this.dropDownContainer)[0];c&&(this.dropDown=e.byNode(c));delete this.dropDownContainer}this.dropDown&&l.hide(this.dropDown);this.inherited(arguments)}},
941isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(a){var b=this.dropDown,d=b.on("load",n.hitch(this,function(){d.remove();a()}));b.refresh()},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}})})},"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on ./_FormWidgetMixin".split(" "),function(p,n,a,e,l,h){return p("dijit.form._FormValueMixin",h,{readOnly:!1,_setReadOnlyAttr:function(a){n.set(this.focusNode,
942"readOnly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(a,g){this._handleOnChange(a,g)},_handleOnChange:function(a,g){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)}})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),
943function(p,n,a,e,l,h,q,g,d,c){return n("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(b){this._set("disabled",b);a.set(this.focusNode,"disabled",b);this.valueNode&&a.set(this.valueNode,"disabled",b);this.focusNode.setAttribute("aria-disabled",b?"true":"false");b?(this._set("hovering",!1),this._set("active",
944!1),b="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",p.forEach(l.isArray(b)?b:[b],function(a){a=this[a];g("webkit")||c.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)}
944,_onFocus:function(a){if("mouse"==a&&this.isFocusable())var c=this.own(q(this.focusNode,"focus",function(){e.remove();c.remove()}))[0],m=g("pointer-events")?"pointerup":
945g("MSPointer")?"MSPointerUp":g("touch-events")?"touchend, mouseup":"mouseup",e=this.own(q(this.ownerDocumentBody,m,l.hitch(this,function(a){e.remove();c.remove();this.focused&&("touchend"==a.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){d.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=e.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},
946compare:function(a,c){return"number"==typeof a&&"number"==typeof c?isNaN(a)&&isNaN(c)?0:a-c:a>c?1:a<c?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,c){if(void 0==this._lastValueReported&&(null===c||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||0!=this.compare(a,this._lastValueReported);if((this.intermediateChanges||c||void 0===c)&&this._pendingOnChange)this._lastValueReported=
947a,this._pendingOnChange=!1,this._onChangeActive&&(this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(a)}))},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/a11yclick":function(){define(["dojo/keys","dojo/mouse","dojo/on","dojo/touch"],function(p,
948n,a,e){function l(a){if((a.keyCode===p.ENTER||a.keyCode===p.SPACE)&&!/input|button|textarea/i.test(a.target.nodeName))for(a=a.target;a;a=a.parentNode)if(a.dojoClick)return!0}var h;a(document,"keydown",function(a){l(a)?(h=a.target,a.preventDefault()):h=null});a(document,"keyup",function(g){l(g)&&g.target==h&&(h=null,a.emit(g.target,"click",{cancelable:!0,bubbles:!0,ctrlKey:g.ctrlKey,shiftKey:g.shiftKey,metaKey:g.metaKey,altKey:g.altKey,_origType:g.type}))});var q=function(g,d){g.dojoClick=!0;return a(g,
949"click",d)};q.click=q;q.press=function(g,d){var c=a(g,e.press,function(a){("mousedown"!=a.type||n.isLeft(a))&&d(a)}),b=a(g,"keydown",function(a){(a.keyCode===p.ENTER||a.keyCode===p.SPACE)&&d(a)});return{remove:function(){c.remove();b.remove()}}};q.release=function(g,d){var c=a(g,e.release,function(a){("mouseup"!=a.type||n.isLeft(a))&&d(a)}),b=a(g,"keyup",function(a){(a.keyCode===p.ENTER||a.keyCode===p.SPACE)&&d(a)});return{remove:function(){c.remove();b.remove()}}};q.move=e.move;return q})},"esri/geometry/Polyline":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ./Point ./Extent ../srUtils".split(" "),
950function(p,n,a,e,l,h,q,g,d,c,b){var f={type:"polyline",paths:null};p=p(g,{declaredClass:"esri.geometry.Polyline",constructor:function(c){a.mixin(this,f);this.paths=[];this._path=0;c&&(a.isArray(c)?this.paths=a.isArray(c[0][0])?c:[c]:c.paths?a.mixin(this,c):this.spatialReference=c,this.spatialReference&&(this.spatialReference=b.createSpatialReference(this.spatialReference)));this.verifySR()},addPath:function(b){this.clearCache();this._path=this.paths.length;this.paths[this._path]=[];a.isArray(b[0])?
951n.forEach(b,this._addPointArr,this):n.forEach(b,this._addPoint,this);return this},_addPointArr:function(a){this.paths[this._path].push(a)},_addPoint:function(a){this.paths[this._path].push([a.x,a.y])},_insertPoints:function(a,b){this.clearCache();this._path=b;this.paths[this._path]||(this.paths[this._path]=[]);n.forEach(a,this._addPoint,this)},_validateInputs:function(a,b){return null!==a&&void 0!==a&&(0>a||a>=this.paths.length)||null!==b&&void 0!==a&&(0>b||b>=this.paths[a].length)?!1:!0},getPoint:function(a,
952b){if(this._validateInputs(a,b))return new d(this.paths[a][b],this.spatialReference)},setPoint:function(a,b,c){if(this._validateInputs(a,b))return this.clearCache(),this.paths[a][b]=[c.x,c.y],this}
952,insertPoint:function(a,b,c){if(this._validateInputs(a)&&h.isDefined(b)&&0<=b&&b<=this.paths[a].length)return this.clearCache(),this.paths[a].splice(b,0,[c.x,c.y]),this},removePath:function(a){if(this._validateInputs(a,null)){this.clearCache();a=this.paths.splice(a,1)[0];var b,c=a.length,f=this.spatialReference;
953for(b=0;b<c;b++)a[b]=new d(a[b],f);return a}},removePoint:function(a,b){if(this._validateInputs(a,b))return this.clearCache(),new d(this.paths[a].splice(b,1)[0],this.spatialReference)},getExtent:function(){var a;a=this.getCacheValue("_extent");var b=this.getCacheValue("_partwise");if(a)return a=new c(a),a._partwise=b,a;a=this.paths;var d=a.length;if(d&&a[0].length){var f,g,e,h,l,q,n,p,B=h=a[0][0][0],G=l=a[0][0][1],D=Math.min,A=Math.max,C=this.spatialReference,b=[],E,I,H,L;for(q=0;q<d;q++){f=a[q];
954E=I=f[0]&&f[0][0];H=L=f[0]&&f[0][1];p=f.length;for(n=0;n<p;n++)g=f[n],e=g[0],g=g[1],B=D(B,e),G=D(G,g),h=A(h,e),l=A(l,g),E=D(E,e),H=D(H,g),I=A(I,e),L=A(L,g);b.push(new c({xmin:E,ymin:H,xmax:I,ymax:L,spatialReference:C?C.toJson():null}))}a={xmin:B,ymin:G,xmax:h,ymax:l,spatialReference:C?C.toJson():null};b=1<b.length?b:null;this.setCacheValue("_extent",a);this.setCacheValue("_partwise",b);a=new c(a);a._partwise=b;return a}},toJson:function(){var b={paths:a.clone(this.paths)},c=this.spatialReference;
955c&&(b.spatialReference=c.toJson());return b}});p.defaultProps=f;e("extend-esri")&&(a.setObject("geometry.Polyline",p,l),l.geometry.defaultPolyline=f);return p})},"esri/layers/agsdynamic":function(){define(["./agscommon","./ArcGISDynamicMapServiceLayer","../_time"],function(){return{}})},"esri/renderers/VectorFieldRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/_base/array ../kernel ../lang ../Color ./Renderer ./ClassBreaksRenderer ../symbols/SimpleMarkerSymbol ../symbols/PictureMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/jsonUtils require".split(" "),
956function(p,n,a,e,l,h,q,g,d,c,b,f,m,t){var s=p(g,{declaredClass:"esri.renderer.VectorFieldRenderer",iconFolderPath:"../images/symbol/sfs/",constructor:function(a){h.isDefined(a)||(a={});a.attributeField=a.attributeField||"Magnitude";a.rotationInfo=a.rotationInfo||this._getRotationInfo(a);p.safeMixin(this,a);this.style=this.style||s.STYLE_SINGLE_ARROW;this.singleArrowSymbol&&(this.singleArrowSymbol=this.singleArrowSymbol.declaredClass?this.singleArrowSymbol:m.fromJson(this.singleArrowSymbol));this.renderer=
957new d(this._getDefaultSymbol(),a.attributeField);this._updateRenderer(this.style);this.flowRepresentation=this.flowRepresentation||this.FLOW_FROM},getSymbol:function(a){return this.renderer&&this.renderer.getSymbol(a)},setVisualVariables:function(a){a=e.filter(a,function(a){if("sizeInfo"===a.type)return h.isDefined(this._updateSizeInfo(a))},this);this.inherited(arguments);return this},setSizeInfo:function(a){this._updateSizeInfo(a);this.inherited(arguments);return this},setProportionalSymbolInfo:function(a){this.setSizeInfo(a);
958return this},setColorInfo:function(a){return this},_updateRenderer:function(a){return!h.isDefined(this.renderer)?Error("Invalid Renderer!"):a===s.STYLE_SINGLE_ARROW?this._createSingleArrowRenderer():a===s.STYLE_BEAUFORT_KN?this._createBeaufortKnotsRenderer():a===s.STYLE_BEAUFORT_METER?this._createBeaufortMeterRenderer():a===s.STYLE_BEAUFORT_FEET?this._createBeaufortFeetRenderer():a===s.STYLE_BEAUFORT_MILE?this._createBeaufortMilesRenderer():a===s.STYLE_BEAUFORT_KM?this._createBeaufortKilometersRenderer():
959a===s.STYLE_OCEAN_CURRENT_M?this._createCurrentMeterRenderer():a===s.STYLE_OCEAN_CURRENT_KN?this._createCurrentKnotsRenderer():a===s.STYLE_SCALAR?this._createSimpleScalarRenderer():a===s.STYLE_WIND_BARBS?this._createWindBarbsRenderer():this._createClassifiedArrowRenderer()},_updateSizeInfo:function(a){return a&&h.isDefined(a.minSize)&&h.isDefined(a.maxSize)&&h.isDefined(a.minDataValue)&&h.isDefined(a.maxDataValue)?(this.style===s.STYLE_WIND_BARBS&&(a.minSize=a.maxSize),a.field=a.field||"Magnitude",
960a.type="sizeInfo",a):null},_createClassifiedArrowRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new q([56,168,0]));var a=[0,1E-6,3.5,7,10.5,14];if(h.isDefined(this.minDataValue)&&h.isDefined(this.maxDataValue)){var b=(this.maxDataValue-this.minDataValue)/5,a=[],c,d;d=this.minDataValue;for(c=0;6>c;c++)a[c]=d,d+=b}this._addBreaks(a,[[56,168,0],[139,309,0],[255,255,0],[255,128,0],[255,0,0]])},_createSingleArrowRenderer:function(){this.renderer.defaultSymbol=this.singleArrowSymbol||
961this._getDefaultSymbol()},_createBeaufortMeterRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new q([214,47,39]));this._addBreaks([0,0.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7],[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createBeaufortKnotsRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new q([214,47,39]));this._addBreaks([0,
9621,3,6,10,16,21,27,33,40,47,55,63],[[40,146,199],[89,162,186],[129,179,171],[160,194,155],[191,212,138],[218,230,119],[250,250,100],[252,213,83],[252,179,102],[250,141,52],[247,110,42],[240,71,29]])},_createBeaufortFeetRenderer:function(){var a=[0,0.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];e.forEach(a,function(b,c){a[c]*=3.28084});this.renderer.defaultSymbol=this._getDefaultSymbol(new q([214,47,39]));this._addBreaks(a,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],
963[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createBeaufortMilesRenderer:function(){var a=[0,0.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];e.forEach(a,function(b,c){a[c]*=2.23694});this.renderer.defaultSymbol=this._getDefaultSymbol(new q([214,47,39]));this._addBreaks(a,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createBeaufortKilometersRenderer:function(){var a=
964[0,0.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];e.forEach(a,function(b,c){a[c]*=3.6});this.renderer.defaultSymbol=this._getDefaultSymbol(new q([214,47,39]));this._addBreaks(a,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createCurrentMeterRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new q([177,177,177]));this._addBreaks([0,0.5,1,1.5,2],[[78,
96526,153],[179,27,26],[202,128,26],[177,177,177]])},_createCurrentKnotsRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new q([177,177,177]));this._addBreaks([0,0.25,0.5,1,1.5,2,2.5,3,3.5,4],[[0,0,0],[0,37,100],[78,26,153],[151,0,100],[179,27,26],[177,78,26],[202,128,26],[177,179,52],[177,177,177]])},_createSimpleScalarRenderer:function(){this.renderer.defaultSymbol=new b({url:t.toUrl(this.iconFolderPath+"scalar.png"),height:20,width:20,type:"esriPMS",angle:0})},_createWindBarbsRenderer:function(){var a=
966[],d,m;
966for(d=0;150>=d;d+=5)a.push(d);m="M20 20 M5 20 A15 15 0 1 0 35 20 A15 15 0 1 0 5 20 M20 20 M10 20 A10 10 0 1 0 30 20 A10 10 0 1 0 10 20;M25 0 L25 40 M25 35 L17.5 37.5;M25 0 L25 40 L10 45 L25 40;M25 0 L25 40 L10 45 L25 40 M25 35 L17.5 37.5;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L17.5 32.5;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5;M25 0 L25 40 L10 40 L25 35;M25 0 L25 40 L10 40 L25 35 M25 30 L17.5 32.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 
966L25 30 M25 25 L10 30 L25 25 M25 20 L10 25;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L17.5 17.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20 L25 15 M25 10 L17.5 12.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L17.5 27.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L17.5 22.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L17.5 17.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L10 15;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L10 15 M25 10 M25 5 L17.5 7.5".split(";");
967var g=new b({url:t.toUrl(this.iconFolderPath+"windbarb.png"),height:20,width:20,type:"esriPMS",angle:0});this.renderer.defaultSymbol=g;for(d=0;d<a.length-1;d++)0==d?this.renderer.addBreak({minValue:a[d],maxValue:a[d+1],symbol:g}):this.renderer.addBreak({minValue:a[d],maxValue:a[d+1],symbol:(new c).setPath(m[d]).setOutline((new f).setWidth(1.5)).setSize(20).setColor(new q([0,0,0,255]))})},_getDefaultSymbol:function(a){return(new c).setPath("M14,32 14,18 9,23 16,3 22,23 17,18 17,32 z").setOutline((new f).setWidth(0)).setSize(20).setColor(a||
968new q([0,92,230]))},_getRotationInfo:function(a){var b=a&&a.flowRepresentation||s.FLOW_FROM,c=a&&a.rotationField||"Direction",d=s.FLOW_FROM;return{field:function(a){a=a.attributes[c];return b===d?a:a+180},type:"geographic"}},_addBreaks:function(a,b){if(!h.isDefined(this.renderer))return Error("Invalid Renderer!");if(!a||!b||!a.length||!b.length||!(a.length>=b.length))return Error("AddBreaks: Input arguments break values and colors not valid");var c;for(c=0;c<b.length;c++)this.renderer.addBreak({minValue:a[c],
969maxValue:a[c+1],symbol:this._getDefaultSymbol(new q(b[c]))})},toJson:function(){var a=n.mixin(this.inherited(arguments),{type:"vectorField",style:this.style,attributeField:this.attributeField,flowRepresentation:this.flowRepresentation});this.renderer&&(this.renderer.defaultSymbol&&this.style===s.STYLE_SINGLE_ARROW)&&(a.singleArrowSymbol=this.renderer.defaultSymbol.toJson());return h.fixJson(a)}});n.mixin(s,{STYLE_WIND_BARBS:"wind_speed",STYLE_SINGLE_ARROW:"single_arrow",STYLE_CLASSIFIED_ARROW:"classified_arrow",
970STYLE_BEAUFORT_KN:"beaufort_kn",STYLE_BEAUFORT_METER:"beaufort_m",STYLE_BEAUFORT_MILE:"beaufort_mi",STYLE_BEAUFORT_FEET:"beaufort_ft",STYLE_BEAUFORT_KM:"beaufort_km",STYLE_OCEAN_CURRENT_M:"ocean_current_m",STYLE_OCEAN_CURRENT_KN:"ocean_current_kn",STYLE_SCALAR:"simple_scalar"},{FLOW_FROM:"flow_from",FLOW_TO:"flow_to"});a("extend-esri")&&n.setObject("renderer.VectorFieldRenderer",s,l);return s})},"esri/layers/graphics":function(){define(["./GraphicsLayer","../graphic","../renderer"],function(){return{}})},
971"dojo/date":function(){define(["./has","./_base/lang"],function(p,n){var a={getDaysInMonth:function(e){var l=e.getMonth();return 1==l&&a.isLeapYear(e)?29:[31,28,31,30,31,30,31,31,30,31,30,31][l]},isLeapYear:function(a){a=a.getFullYear();return!(a%400)||!(a%4)&&!!(a%100)},getTimezoneName:function(a){var l=a.toString(),h="",q=l.indexOf("(");if(-1<q)h=l.substring(++q,l.indexOf(")"));else if(q=/([A-Z\/]+) \d{4}$/,l=l.match(q))h=l[1];else if(l=a.toLocaleString(),q=/ ([A-Z\/]+)$/,l=l.match(q))h=l[1];return"AM"==
972h||"PM"==h?"":h},compare:function(a,l,h){a=new Date(+a);l=new Date(+(l||new Date));"date"==h?(a.setHours(0,0,0,0),l.setHours(0,0,0,0)):"time"==h&&(a.setFullYear(0,0,0),l.setFullYear(0,0,0));return a>l?1:a<l?-1:0},add:function(a,l,h){var q=new Date(+a),g=!1,d="Date";switch(l){case "day":break;case "weekday":var c;(l=h%5)?c=parseInt(h/5):(l=0<h?5:-5,c=0<h?(h-5)/5:(h+5)/5);var b=a.getDay(),f=0;6==b&&0<h?f=1:0==b&&0>h&&(f=-1);b+=l;
972if(0==b||6==b)f=0<h?2:-2;h=7*c+l+f;break;case "year":d="FullYear";g=!0;
973break;case "week":h*=7;break;case "quarter":h*=3;case "month":g=!0;d="Month";break;default:d="UTC"+l.charAt(0).toUpperCase()+l.substring(1)+"s"}if(d)q["set"+d](q["get"+d]()+h);g&&q.getDate()<a.getDate()&&q.setDate(0);return q},difference:function(e,l,h){l=l||new Date;h=h||"day";var q=l.getFullYear()-e.getFullYear(),g=1;switch(h){case "quarter":e=e.getMonth();l=l.getMonth();e=Math.floor(e/3)+1;l=Math.floor(l/3)+1;g=l+4*q-e;break;case "weekday":q=Math.round(a.difference(e,l,"day"));h=parseInt(a.difference(e,
974l,"week"));g=q%7;if(0==g)q=5*h;else{var d=0,c=e.getDay();l=l.getDay();h=parseInt(q/7);g=q%7;e=new Date(e);e.setDate(e.getDate()+7*h);e=e.getDay();if(0<q)switch(!0){case 6==c:d=-1;break;case 0==c:d=0;break;case 6==l:d=-1;break;case 0==l:d=-2;break;case 5<e+g:d=-2}else if(0>q)switch(!0){case 6==c:d=0;break;case 0==c:d=1;break;case 6==l:d=2;break;case 0==l:d=1;break;case 0>e+g:d=2}q=q+d-2*h}g=q;break;case "year":g=q;break;case "month":g=l.getMonth()-e.getMonth()+12*q;break;case "week":g=parseInt(a.difference(e,
975l,"day")/7);break;case "day":g/=24;case "hour":g/=60;case "minute":g/=60;case "second":g/=1E3;case "millisecond":g*=l.getTime()-e.getTime()}return Math.round(g)}};n.mixin(n.getObject("dojo.date",!0),a);return a})},"esri/symbols/SimpleLineSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./LineSymbol".split(" "),function(p,n,a,e,l,h,q,g){var d={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",
976STYLE_NULL:"none",STYLE_SHORTDASH:"shortdash",STYLE_SHORTDOT:"shortdot",STYLE_SHORTDASHDOT:"shortdashdot",STYLE_SHORTDASHDOTDOT:"shortdashdotdot",STYLE_LONGDASH:"longdash",STYLE_LONGDASHDOT:"longdashdot"},c={color:[0,0,0,1],style:d.STYLE_SOLID,width:1};p=p(g,{declaredClass:"esri.symbol.SimpleLineSymbol",type:"simplelinesymbol",_styles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot",dashdot:"esriSLSDashDot",longdashdotdot:"esriSLSDashDotDot",none:"esriSLSNull",insideframe:"esriSLSInsideFrame",
977shortdash:"esriSLSShortDash",shortdot:"esriSLSShortDot",shortdashdot:"esriSLSShortDashDot",shortdashdotdot:"esriSLSShortDashDotDot",longdash:"esriSLSLongDash",longdashdot:"esriSLSLongDashDot"},constructor:function(b,f,m){b?n.isString(b)?(this.style=b,f&&(this.color=f),m&&(this.width=m)):this.style=q.valueOf(this._styles,b.style)||d.STYLE_SOLID:(n.mixin(this,c),this.color=new a(this.color),this.width=l.pt2px(this.width))},setStyle:function(a){this.style=a;return this},getStroke:function(){return this.style===
978d.STYLE_NULL||0===this.width?null:{color:this.color,style:this.style,width:this.width}},getFill:function(){return null},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -15,0 L 15,0 E"},fill:null,stroke:this.getStroke()}},toJson:function(){return q.fixJson(n.mixin(this.inherited("toJson",arguments),{type:"esriSLS",style:this._styles[this.style]}))}});n.mixin(p,d);p.defaultProps=c;e("extend-esri")&&(n.setObject("symbol.SimpleLineSymbol",p,h),h.symbol.defaultSimpleLineSymbol=
979c);return p})},"esri/layers/OpenStreetMapLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../urlUtils ../SpatialReference ../geometry/Extent ./TiledMapServiceLayer ./TileInfo".split(" "),function(p,n,a,e,l,h,q,g,d){p=p(g,{declaredClass:"esri.layers.OpenStreetMapLayer",constructor:function(a){this.spatialReference=new h({wkid:102100});this.tileInfo=new d({rows:256,cols:256,dpi:96,format:"PNG8",compressionQuality:0,origin:{x:-2.0037508342787E7,y:2.0037508342787E7},spatialReference:{wkid:102100},
980lods:[{level:0,scale:5.91657527591555E8,resolution:156543.033928},{level:1,scale:2.95828763795777E8,resolution:78271.5169639999},{level:2,scale:1.47914381897889E8,resolution:39135.7584820001},{level:3,scale:7.3957190948944E7,resolution:19567.8792409999},{level:4,scale:3.6978595474472E7,resolution:9783.93962049996},{level:5,scale:1.8489297737236E7,resolution:4891.96981024998},{level:6,scale:9244648.868618,resolution:2445.98490512499},{level:7,scale:4622324.434309,resolution:1222.99245256249},{level:8,
981scale:2311162.217155,resolution:611.49622628138},{level:9,scale:1155581.108577,resolution:305.748113140558}
981,{level:10,scale:577790.554289,resolution:152.874056570411},{level:11,scale:288895.277144,resolution:76.4370282850732},{level:12,scale:144447.638572,resolution:38.2185141425366},{level:13,scale:72223.819286,resolution:19.1092570712683},{level:14,scale:36111.909643,resolution:9.55462853563415},{level:15,scale:18055.954822,resolution:4.77731426794937},{level:16,scale:9027.977411,resolution:2.38865713397468},
982{level:17,scale:4513.988705,resolution:1.19432856685505},{level:18,scale:2256.994353,resolution:0.597164283559817},{level:19,scale:1128.497176,resolution:0.298582141647617}]});this.fullExtent=new q({xmin:-2.003750834E7,ymin:-2.003750834E7,xmax:2.003750834E7,ymax:2.003750834E7,spatialReference:{wkid:102100}});this.initialExtent=new q({xmin:-2.003750834E7,ymin:-2.003750834E7,xmax:2.003750834E7,ymax:2.003750834E7,spatialReference:{wkid:102100}});this.tileServers=a&&a.tileServers||["http://a.tile.openstreetmap.org",
983"http://b.tile.openstreetmap.org","http://c.tile.openstreetmap.org"];this.serversLength=this.tileServers.length;this._displayLevels=a?a.displayLevels:null;this.copyright=a&&a.copyright||"Map data \x26copy; OpenStreetMap contributors, CC-BY-SA";this.loaded=!0;this.onLoad(this);(a=a&&a.loadCallback)&&a(this)},getTileUrl:function(a,b,d){a=this.tileServers[b%this.serversLength]+"/"+a+"/"+d+"/"+b+".png";a=this.addTimestampToURL(a);return l.addProxy(a)}});a("extend-esri")&&n.setObject("layers.OpenStreetMapLayer",
984p,e);return p})},"esri/geometry/Rect":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../SpatialReference ./Geometry ./Point ./Extent ../srUtils".split(" "),function(p,n,a,e,l,h,q,g,d,c){function b(a){return new d(parseFloat(a.x),parseFloat(a.y)-parseFloat(a.height),parseFloat(a.x)+parseFloat(a.width),parseFloat(a.y),a.spatialReference)}var f=p(q,{declaredClass:"esri.geometry.Rect",constructor:function(a,b,d,f,g){n.mixin(this,e.defaultRect);n.isObject(a)&&
985"extent"===a.type&&(b=a.ymax,d=a.getWidth(),f=a.getHeight(),g=a.spatialReference,a=a.xmin);n.isObject(a)?(n.mixin(this,a),this.spatialReference&&(this.spatialReference=c.createSpatialReference(this.spatialReference))):(this.x=a,this.y=b,this.width=d,this.height=f,this.spatialReference=g);this.verifySR()},getCenter:function(){return new g(this.x+this.width/2,this.y+this.height/2,this.spatialReference)},offset:function(a,b){return new f(this.x+a,this.y+b,this.width,this.height,this.spatialReference)},
986intersects:function(a){return a.x+a.width<=this.x||a.y+a.height<=this.y||a.y>=this.y+this.height||a.x>=this.x+this.width?!1:!0},getExtent:function(){return b(this)},update:function(a,b,c,d,f){this.x=a;this.y=b;this.width=c;this.height=d;this.spatialReference=f;this.clearCache();return this}});a("extend-esri")&&(n.setObject("geometry.Rect",f,l),l.geometry._rectToExtent=b,l.geometry._extentToRect=function(a){return new f(a)});return f})},"dijit/Destroyable":function(){define(["dojo/_base/array","dojo/aspect",
987"dojo/_base/declare"],function(p,n,a){return a("dijit.Destroyable",null,{destroy:function(a){this._destroyed=!0},own:function(){var a=["destroyRecursive","destroy","remove"];p.forEach(arguments,function(l){function h(){g.remove();p.forEach(d,function(a){a.remove()})}var q,g=n.before(this,"destroy",function(a){l[q](a)}),d=[];l.then?(q="cancel",l.then(h,h)):p.forEach(a,function(a){"function"===typeof l[a]&&(q||(q=a),d.push(n.after(l,a,h,!0)))})},this);return arguments}})})},"esri/MapNavigationManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/event dojo/mouse dojo/keys ./kernel ./MouseEvents ./TouchEvents ./PointerEvents ./config ./sniff ./lang ./fx ./graphic ./tileUtils ./geometry/ScreenPoint ./geometry/Extent ./geometry/Rect ./geometry/mathUtils ./symbols/SimpleFillSymbol".split(" "),
988function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w){var y=e.connect,B=e.disconnect,G=m("chrome"),D=m("safari"),A=[q.NUMPAD_PLUS,61,187,q.NUMPAD_MINUS,173,189,q.UP_ARROW,q.NUMPAD_8,q.RIGHT_ARROW,q.NUMPAD_6,q.DOWN_ARROW,q.NUMPAD_2,q.LEFT_ARROW,q.NUMPAD_4,q.PAGE_UP,q.NUMPAD_9,q.PAGE_DOWN,q.NUMPAD_3,q.END,q.NUMPAD_1,q.HOME,q.NUMPAD_7];p=p(null,{declaredClass:"esri.MapNavigationManager",eventModel:"",constructor:function(a,g){this.map=a;n.mixin(this,g);var e=a.__container;m("esri-pointer")?(this.pointerEvents=
989new b(e,{map:a}),this.eventModel="pointer"):m("esri-touch")?(m("ios")||(this.mouseEvents=new d(e,{map:a})),this.touchEvents=new c(e,{map:a,mouseEvents:this.mouseEvents}),this.eventModel="touch"):(this.mouseEvents=new d(e,{map:a}),this.eventModel="mouse");this._zoomRect=new k(null,new w(f.defaults.map.zoomSymbol));this._keyDx=this._keyDy=0;
989this._adjustPinch=n.hitch(this,this._adjustPinch);this._adjustPinchEnd=n.hitch(this,this._adjustPinchEnd)},_panInit:function(a){var b=this.mouseEvents;h.isLeft(a)&&
990(this.map.isPan&&!a.shiftKey)&&(this._dragOrigin=new u(0,0),n.mixin(this._dragOrigin,a.screenPoint),this._panStartHandle=y(b,"onMouseDragStart",this,this._panStart),this._panHandle=y(b,"onMouseDrag",this,this._pan),this._panEndHandle=y(b,"onMouseUp",this,this._panEnd),(G||D)&&a.preventDefault())},_panStart:function(a){this.map.setCursor("move");this.map.__panStart(a.screenPoint.x,a.screenPoint.y)},_pan:function(a){this.map.__pan(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y)},
991_panEnd:function(a){B(this._panStartHandle);B(this._panHandle);B(this._panEndHandle);this._panStartHandle=this._panHandle=this._panEndHandle=null;var b=this.map;b.__panning&&(b.__panEnd(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y),b.resetMapCursor())},_zoomInit:function(a){var b=this.map,c=this.pointerEvents||this.mouseEvents;if((h.isLeft(a)||a.pointerType)&&b.isRubberBandZoom&&a.shiftKey)b.setCursor("crosshair"),this._dragOrigin=n.mixin({},a.screenPoint),this._zoomDir=a.ctrlKey||
992a.metaKey?-1:1,this.pointerEvents?(this._zoomHandle=y(c,"onSwipeMove",this,this._zoom),this._zoomEndHandle=y(c,"onSwipeEnd",this,this._zoomEnd)):(this._zoomHandle=y(c,"onMouseDrag",this,this._zoom),this._zoomEndHandle=y(c,"onMouseUp",this,this._zoomEnd)),G&&a.preventDefault()},_zoom:function(a){var b=this.map,c=this._normalizeRect(a).offset(b.__visibleRect.x,b.__visibleRect.y);a=b.graphics;var d=this._zoomRect;d.geometry||b.setCursor("crosshair");d.geometry&&a.remove(d,!0);var f=b.toMap(new u(c.x,
993c.y)),c=b.toMap(new u(c.x+c.width,c.y+c.height)),c=new v(f.x,f.y,c.x-f.x,f.y-c.y,b.spatialReference);c._originOnly=!0;d.setGeometry(c);a.add(d,!0)},_zoomEnd:function(a){var b=this._zoomRect,c=this.map,d=c.extent,f=c.spatialReference;B(this._zoomHandle);B(this._zoomEndHandle);this._zoomHandle=this._zoomEndHandle=null;if(c._canZoom(this._zoomDir)&&b.getDojoShape()){c.graphics.remove(b);b.geometry=null;a=this._normalizeRect(a);a.x+=c.__visibleRect.x;a.y+=c.__visibleRect.y;if(-1===this._zoomDir){var k=
994d.getWidth();a=(k*c.width/a.width-k)/2;f=new x(d.xmin-a,d.ymin-a,d.xmax+a,d.ymax+a,f)}else d=c.toMap({x:a.x,y:a.y+a.height}),a=c.toMap({x:a.x+a.width,y:a.y}),f=new x(d.x,d.y,a.x,a.y,f);c._extentUtil(null,null,f)}b.getDojoShape()&&c.graphics.remove(b,!0);this._zoomDir=0;c.resetMapCursor()},_wheelZoom:function(a,b){var c=this.map;if(!b){if(c.smartNavigation&&!a.shiftKey&&!c._isPanningOrZooming()){c.disableScrollWheelZoom();this._setScrollWheelPan(!0);this._wheelPan(a);return}var d=a.timeStamp;if(!t.isDefined(d)||
9950>=d)d=(new Date).getTime();if(100>(this._mwts?d-this._mwts:d))return;this._mwts=d}c._canZoom(a.value)&&c._extentUtil({numLevels:a.value,mapAnchor:a.mapPoint,screenAnchor:a.screenPoint})},_wheelPan:function(a){var b=this.map;if(a.shiftKey&&!b._isPanningOrZooming())this._setScrollWheelPan(!1),b.enableScrollWheelZoom(),this._wheelZoom(a);else{var c=0,d=0;m("ff")?a.axis===a.HORIZONTAL_AXIS?c=-a.detail:d=-a.detail:(c=a.wheelDeltaX,d=a.wheelDeltaY);b.translate(c,d)}},_setScrollWheelPan:function(a){this.map.isScrollWheelPan=
996a;this.mouseEvents.enableMouseWheel(a);B(this._mwMacHandle);this._mwMacHandle=null;a&&(this._mwMacHandle=y(this.mouseEvents,"onMouseWheel",this,this._wheelPan))},_recenter:function(a){a.shiftKey&&!this.map._isPanningOrZooming()&&this.map.centerAt(a.mapPoint)},_recenterZoom:function(a){a.shiftKey&&!this.map._isPanningOrZooming()&&(a.value=a.ctrlKey||a.metaKey?-1:1,this._wheelZoom(a,!0))},_dblClickZoom:function(a){this.map._isPanningOrZooming()||(a.value=1,this._wheelZoom(a,!0))},_twoFingerTap:function(a){this.map._isPanningOrZooming()||
997(a.value=-1,this._wheelZoom(a,!0))},_keyDown:function(b){var c=b.keyCode,d=this.map;if(-1!==a.indexOf(A,c)){if(c===q.NUMPAD_PLUS||61===c||187===c)d._extentUtil({numLevels:1});else if(c===q.NUMPAD_MINUS||173===c||189===c)d._extentUtil({numLevels:-1});else{d.__panning||d.__panStart(0,0);switch(c){case q.UP_ARROW:case q.NUMPAD_8:this._keyDy+=10;break;case q.RIGHT_ARROW:case q.NUMPAD_6:this._keyDx-=10;break;case q.DOWN_ARROW:case q.NUMPAD_2:this._keyDy-=10;break;case q.LEFT_ARROW:case q.NUMPAD_4:this._keyDx+=
99810;break;case q.PAGE_UP:case q.NUMPAD_9:this._keyDx-=10;this._keyDy+=10;break;case q.PAGE_DOWN:case q.NUMPAD_3:this._keyDx-=10;this._keyDy-=10;break;case q.END:case q.NUMPAD_1:this._keyDx+=10;this._keyDy-=10;break;case q.HOME:case q.NUMPAD_7:this._keyDx+=10;this._keyDy+=10;break;default:return}d.__pan(this._keyDx,this._keyDy)}l.stop(b)}},_keyEnd:function(a){var b=this.map;b.__panning&&a.keyCode!==q.SHIFT&&(b.__panEnd(this._keyDx,this._keyDy),this._keyDx=this._keyDy=0)},_swipeInit:function(a){var b=
999this.map,b=b._zoomAnim||b._panAnim;
999if(a.shiftKey)return!1;b&&b._active&&(b.stop(),b._fire("onEnd",[b.node]));this._dragOrigin=new u(0,0);n.mixin(this._dragOrigin,a.screenPoint);B(this._swipeHandle);B(this._swipeEndHandle);this._swipeHandle=y(this.touchEvents||this.pointerEvents,"onSwipeMove",this,this._swipe);this._swipeEndHandle=y(this.touchEvents||this.pointerEvents,"onSwipeEnd",this,this._swipeEnd)},_swipe:function(a){var b=this.map;b.__panning?(this._panX=a.screenPoint.x,this._panY=a.screenPoint.y,
1000b.__pan(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y)):(b.setCursor("move"),b.__panStart(a.screenPoint.x,a.screenPoint.y))},_swipeEnd:function(a){B(this._swipeHandle);B(this._swipeEndHandle);this._swipeHandle=this._swipeEndHandle=null;var b=this.map;b.__panning&&(b.resetMapCursor(),b.__panEnd(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y))},_pinchInit:function(a){var b=this.map,c=b._zoomAnim||b._panAnim;c&&c._active?(c.stop(),c._fire("onEnd",[c.node])):
1001b.__panning&&(a.screenPoint=new u(this._panX,this._panY),a.mapPoint=b.toMap(a.screenPoint),this._swipeEnd(a));B(this._pinchHandle);B(this._pinchEndHandle);this._pinchHandle=y(this.touchEvents||this.pointerEvents,"onPinchMove",this,this._pinch);this._pinchEndHandle=y(this.touchEvents||this.pointerEvents,"onPinchEnd",this,this._pinchEnd)},_pinch:function(a){var b=this.map;a.screenPoints&&(this.currLength=z.getLength(a.screenPoints[0],a.screenPoints[1]),b.__zooming?(a=this.currLength/this._length,this._zoomStartExtent=
1002this.__scaleExtent(b.extent,a,this._dragOrigin),b.__zoom(this._zoomStartExtent,a,this._dragOrigin)):(this._dragOrigin=new u((a.screenPoints[0].x+a.screenPoints[1].x)/2,(a.screenPoints[0].y+a.screenPoints[1].y)/2),this._length=this.currLength,b.__zoomStart(b.extent,this._dragOrigin)),b._fireOnScale(this.currLength/this._length,this._dragOrigin,!0))},_pinchEnd:function(a){a=this.map;B(this._pinchHandle);B(this._pinchEndHandle);this._pinchHandle=this._pinchEndHandle=null;if(a.__zooming&&null===a._zoomAnim){var b=
1003this.currLength/this._length,c=a.extent.getWidth();this._zoomAnimAnchor=a.toMap(this._dragOrigin);this._zoomStartExtent=this.__scaleExtent(a.extent,1/b,this._zoomAnimAnchor);if(a.__tileInfo){var d=r.getCandidateTileInfo(a,a.__tileInfo,this._zoomStartExtent),k=a.__getExtentForLevel(d.lod.level,this._zoomAnimAnchor),m=a.getMinZoom(),g=a.getMaxZoom(),e=k.extent,k=k.lod,h=c/e.getWidth(),l=d.lod.level;1>b?h>b&&l--:h<b&&l++;l<m?l=m:l>g&&(l=g);l!==d.lod.level&&(k=a.__getExtentForLevel(l,this._zoomAnimAnchor),
1004e=k.extent,k=k.lod);this._zoomEndExtent=e;this._zoomEndLod=k;a._zoomAnim=s.animateRange({range:{start:c/this._zoomStartExtent.getWidth(),end:h},duration:f.defaults.map.zoomDuration,rate:f.defaults.map.zoomRate,onAnimate:this._adjustPinch,onEnd:this._adjustPinchEnd});a._zoomAnim.play();a._fireOnScale(a.extent.getWidth()/this._zoomEndExtent.getWidth(),this._dragOrigin)}else this._zoomEndExtent=this._zoomStartExtent,a._fireOnScale(a.extent.getWidth()/this._zoomEndExtent.getWidth(),this._dragOrigin),
1005this._adjustPinchEnd()}},_adjustPinch:function(a){var b=this.__scaleExtent(this.map.extent,a,this._zoomAnimAnchor);this.map.__zoom(b,a,this._dragOrigin)},_adjustPinchEnd:function(){var a=this.map,b=a.extent.getWidth()/this._zoomEndExtent.getWidth(),c=this.__scaleExtent(a.extent,1/b,this._zoomAnimAnchor),d=this._dragOrigin,f=this._zoomEndLod;this._zoomStartExtent=this._zoomEndExtent=this._zoomEndLod=this._dragOrigin=a._zoomAnim=this._zoomAnimAnchor=null;a.__zoomEnd(c,b,d,f,!0)},__scaleExtent:function(a,
1006b,c){c=c||a.getCenter();b=a.expand(b);var d=a.xmin-(b.getWidth()-a.getWidth())*(c.x-a.xmin)/a.getWidth();c=a.ymax-(b.getHeight()-a.getHeight())*(c.y-a.ymax)/a.getHeight();return new x(d,c-b.getHeight(),d+b.getWidth(),c,a.spatialReference)},_normalizeRect:function(a){a=a.screenPoint;var b=this._dragOrigin.x,c=this._dragOrigin.y;a=new v((a.x<b?a.x:b)-this.map.__visibleRect.x,(a.y<c?a.y:c)-this.map.__visibleRect.y,Math.abs(a.x-b),Math.abs(a.y-c));delete a.spatialReference;0===a.width&&(a.width=1);0===
1007a.height&&(a.height=1);return a},setImmediateClick:function(a){switch(this.eventModel){case "mouse":this.mouseEvents.setImmediateClick(a);break;case "touch":this.touchEvents.setImmediateTap(a);this.mouseEvents&&this.mouseEvents.setImmediateClick(a);break;case "pointer":this.pointerEvents.setImmediateTap(a)}},enablePan:function(){this.disablePan();switch(this.eventModel){case "mouse":this._panInitHandle=y(this.mouseEvents,"onMouseDown",this,this._panInit);break;case "touch":this._panInitHandle=y(this.mouseEvents,
1008"onMouseDown",this,this._panInit);this._swipeInitHandle=y(this.touchEvents,"onSwipeStart",this,this._swipeInit);break;case "pointer":this._swipeInitHandle=y(this.pointerEvents,"onSwipeStart",this,this._swipeInit)}},disablePan:function(){B(this._panInitHandle);this._panInitHandle=null;B(this._swipeInitHandle);this._swipeInitHandle=null},enableRubberBandZoom:function(){this.disableRubberBandZoom();this._zoomInitHandle=this.pointerEvents?y(this.pointerEvents,"onSwipeStart",this,this._zoomInit):y(this.mouseEvents,
1009"onMouseDown",this,this._zoomInit)},disableRubberBandZoom:function(){B(this._zoomInitHandle);this._zoomInitHandle=null},enablePinchZoom:function(){this.disablePinchZoom();if("touch"===this.eventModel||"pointer"===this.eventModel)this._pinchInitHandle=y(this.touchEvents||this.pointerEvents,"onPinchStart",this,this._pinchInit)},disablePinchZoom:function(){B(this._pinchInitHandle);this._pinchInitHandle=null},enableScrollWheelZoom:function(){this.disableScrollWheelZoom();this._wheelHandle=y(this.mouseEvents||
1010this.pointerEvents,"onMouseWheel",this,this._wheelZoom)},disableScrollWheelZoom:function(){B(this._wheelHandle);this._wheelHandle=null},enableDoubleClickZoom:function(){this.disableDoubleClickZoom();switch(this.eventModel){case "mouse":this._dblClickHandle=y(this.mouseEvents,"onDblClick",this,this._dblClickZoom);break;case "touch":this._dblClickHandle=y(this.mouseEvents,"onDblClick",this,this._dblClickZoom);this._dblTapHandle=y(this.touchEvents,"onDoubleTap",this,this._dblClickZoom);this._zoomOutHandle=
1011y(this.touchEvents,"onTwoFingerTap",this,this._twoFingerTap);break;case "pointer":this._dblTapHandle=y(this.pointerEvents,"onDoubleTap",this,this._dblClickZoom),this._zoomOutHandle=y(this.pointerEvents,"onTwoFingerTap",this,this._twoFingerTap)}},disableDoubleClickZoom:function(){B(this._dblClickHandle);B(this._zoomOutHandle);this._dblTapHandle&&B(this._dblTapHandle);this._dblClickHandle=this._zoomOutHandle=this._dblTapHandle=null},enableShiftDoubleClickZoom:function(){this.disableShiftDoubleClickZoom();
1012this._sDblClickHandle=y(this.pointerEvents||this.mouseEvents,"onDblClick",this,this._recenterZoom)},disableShiftDoubleClickZoom:function(){B(this._sDblClickHandle);this._sDblClickHandle=null},enableClickRecenter:function(){this.disableClickRecenter();this._recenterHandle=y(this.pointerEvents||this.mouseEvents,"onClick",this,this._recenter)},disableClickRecenter:function(){B(this._recenterHandle);this._recenterHandle=null},enableKeyboardNavigation:function(){this.disableKeyboardNavigation();this._keyHandle=
1013y(this.pointerEvents||this.mouseEvents,"onKeyDown",this,this._keyDown);this._keyEndHandle=y(this.pointerEvents||this.mouseEvents,"onKeyUp",this,this._keyEnd)},disableKeyboardNavigation:function(){B(this._keyHandle);B(this._keyEndHandle);this._keyHandle=this._keyEndHandle=null},enableNavigation:function(){var a=this.map;a&&a.loaded&&(a.enableDoubleClickZoom(),a.enableClickRecenter(),a.enablePan(),a.enableRubberBandZoom(),this.enablePinchZoom(),a.enableKeyboardNavigation(),a.smartNavigation?this._setScrollWheelPan(!0):
1014a.enableScrollWheelZoom())},disableNavigation:function(){var a=this.map;a&&a.loaded&&(a.disableDoubleClickZoom(),a.disableClickRecenter(),a.disablePan(),a.disableRubberBandZoom(),this.disablePinchZoom(),a.disableKeyboardNavigation(),a.disableScrollWheelZoom(),a.smartNavigation&&this._setScrollWheelPan(!1))},destroy:function(){this.touchEvents&&this.touchEvents.destroy();this.mouseEvents&&this.mouseEvents.destroy();this.pointerEvents&&this.pointerEvents.destroy();var a,b=[this._panInitHandle,this._panStartHandle,
1015this._panHandle,this._panEndHandle,this._zoomInitHandle,this._zoomHandle,this._zoomEndHandle,this._wheelHandle,this._mwMacHandle,this._dblClickHandle,this._zoomOutHandle,this._recenterHandle,this._sDblClickHandle,this._dblTapHandle,this._keyHandle,this._keyEndHandle,this._swipeInitHandle,this._swipeHandle,this._swipeEndHandle,this._pinchInitHandle,this._pinchHandle,this._pinchEndHandle];for(a=0;a<b.length;a++)B(b[a]);this.map=this.touchEvents=this.mouseEvents=this.eventModel=this.pointerEvents=this._zoomRect=
1016this._dragOrigin=this._panInitHandle=this._panStartHandle=this._panHandle=this._panEndHandle=this._zoomInitHandle=this._zoomHandle=this._zoomEndHandle=this._wheelHandle=this._mwMacHandle=this._dblClickHandle=this._zoomOutHandle=this._recenterHandle=this._sDblClickHandle=this._dblTapHandle=this._keyHandle=this._keyEndHandle=this._swipeInitHandle=this._swipeHandle=this._swipeEndHandle=this._pinchInitHandle=this._pinchHandle=this._pinchEndHandle=null}});m("extend-esri")&&(g.MapNavigationManager=p);return p})},
1017"dijit/WidgetSet":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","./registry"],function(p,n,a,e){var l=n("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0}
1017,add:function(a){if(this._hash[a.id])throw Error("Tried to register widget with id\x3d\x3d"+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){this._hash[a]&&(delete this._hash[a],this.length--)},forEach:function(e,l){l=l||a.global;var g=0,d;for(d in this._hash)e.call(l,
1018this._hash[d],g++,this._hash);return this},filter:function(e,q){q=q||a.global;var g=new l,d=0,c;for(c in this._hash){var b=this._hash[c];e.call(q,b,d++,this._hash)&&g.add(b)}return g},byId:function(a){return this._hash[a]},byClass:function(a){var e=new l,g,d;for(g in this._hash)d=this._hash[g],d.declaredClass==a&&e.add(d);return e},toArray:function(){var a=[],e;for(e in this._hash)a.push(this._hash[e]);return a},map:function(a,e){return p.map(this.toArray(),a,e)},every:function(e,l){l=l||a.global;
1019var g=0,d;for(d in this._hash)if(!e.call(l,this._hash[d],g++,this._hash))return!1;return!0},some:function(e,l){l=l||a.global;var g=0,d;for(d in this._hash)if(e.call(l,this._hash[d],g++,this._hash))return!0;return!1}});p.forEach("forEach filter byClass map every some".split(" "),function(a){e[a]=l.prototype[a]});return l})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/query ../registry ../Viewport ./utils".split(" "),
1020function(p,n,a,e,l,h,q,g,d,c){return n("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isLayoutContainer:!0,startup:function(){if(!this._started){var a=this.getParent();this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(d.on("resize",h.hitch(this,"resize")))}},_checkIfSingleChild:function(){if(this.doLayout){var b=[],c=!1;q("\x3e *",this.containerNode).some(function(a){var d=
1021g.byNode(a);d&&d.resize?b.push(d):!/script|link|style/i.test(a.nodeName)&&a.offsetHeight&&(c=!0)});this._singleChild=1==b.length&&!c?b[0]:null;a.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)}},resize:function(a,c){this._resizeCalled=!0;this._scheduleLayout(a,c)},_scheduleLayout:function(a,c){this._isShown()?this._layout(a,c):(this._needLayout=!0,this._changeSize=a,this._resultSize=c)},_layout:function(a,d){delete this._needLayout;!this._wasShown&&!1!==this.open&&this._onShow();
1022a&&e.setMarginBox(this.domNode,a);var m=this.containerNode;if(m===this.domNode){var g=d||{};h.mixin(g,a||{});if(!("h"in g)||!("w"in g))g=h.mixin(e.getMarginBox(m),g);this._contentBox=c.marginBox2contentBox(m,g)}else this._contentBox=e.getContentBox(m);this._layoutChildren()},_layoutChildren:function(){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||e.getContentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else for(var a=this.getChildren(),
1023c,d=0;c=a[d++];)c.resize&&c.resize()},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var b=this.domNode,c=this.domNode.parentNode;return"none"!=b.style.display&&"hidden"!=b.style.visibility&&!a.contains(b,"dijitHidden")&&c&&c.style&&"none"!=c.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),
1024function(p,n,a,e,l,h,q,g,d,c,b,f){return n("dojo.dnd.Moveable",[h],{handle:"",delay:0,skip:!1,constructor:function(c,f){this.node=e.byId(c);f||(f={});this.handle=f.handle?e.byId(f.handle):null;this.handle||(this.handle=this.node);this.delay=0<f.delay?f.delay:0;this.skip=f.skip;this.mover=f.mover?f.mover:b;this.events=[q(this.handle,d.press,a.hitch(this,"onMouseDown")),q(this.handle,"dragstart",a.hitch(this,"onSelectStart")),q(this.handle,"selectstart",a.hitch(this,"onSelectStart"))]},markupFactory:function(a,
1025b,c){return new c(b,a)},destroy:function(){p.forEach(this.events,function(a){a.remove()});this.events=this.node=this.handle=null},onMouseDown:function(b){if(!this.skip||!c.isFormElement(b)){if(this.delay)this.events.push(q(this.handle,d.move,a.hitch(this,"onMouseMove")),q(this.handle,d.release,a.hitch(this,"onMouseUp"))),this._lastX=b.pageX,this._lastY=b.pageY;else this.onDragDetected(b);b.stopPropagation();b.preventDefault()}}
1025,onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>this.delay||
1026Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(a){if(!this.skip||!c.isFormElement(a))a.stopPropagation(),a.preventDefault()},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){g.publish("/dnd/move/start",a);l.add(f.body(),"dojoMove");l.add(this.node,"dojoMoveItem")},
1027onMoveStop:function(a){g.publish("/dnd/move/stop",a);l.remove(f.body(),"dojoMove");l.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},onMoved:function(){}})})},"dijit/TooltipDialog":function(){define("dojo/_base/declare dojo/dom-class dojo/has dojo/keys dojo/_base/lang dojo/on ./focus ./layout/ContentPane ./_DialogMixin ./form/_FormMixin ./_TemplatedMixin dojo/text!./templates/TooltipDialog.html ./main".split(" "),
1028function(p,n,a,e,l,h,q,g,d,c,b,f,m){p=p("dijit.TooltipDialog",[g,b,c,d],{title:"",doLayout:!1,autofocus:!0,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:f,_setTitleAttr:"containerNode",postCreate:function(){this.inherited(arguments);this.own(h(this.domNode,"keydown",l.hitch(this,"_onKey")))},orient:function(a,b,c){a={"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft",
1029"TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft","BR-TL":"dijitTooltipBelow dijitTooltipABLeft","BL-TR":"dijitTooltipBelow dijitTooltipABRight","TL-BR":"dijitTooltipAbove dijitTooltipABRight","TR-BL":"dijitTooltipAbove dijitTooltipABLeft"}[b+"-"+c];n.replace(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems();
1030q.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);var b=a.aroundNodePos;"M"==a.corner.charAt(0)&&"M"==a.aroundCorner.charAt(0)?(this.connectorNode.style.top=b.y+(b.h-this.connectorNode.offsetHeight>>1)-a.y+"px",this.connectorNode.style.left=""):"M"==a.corner.charAt(1)&&"M"==a.aroundCorner.charAt(1)&&(this.connectorNode.style.left=b.x+(b.w-this.connectorNode.offsetWidth>>1)-a.x+"px");this._onShow()},onClose:function(){this.onHide()},_onKey:function(a){if(a.keyCode==
1031e.ESCAPE)this.defer("onCancel"),a.stopPropagation(),a.preventDefault();else if(a.keyCode==e.TAB){var b=a.target;this._getFocusItems();this._firstFocusItem==this._lastFocusItem?(a.stopPropagation(),a.preventDefault()):b==this._firstFocusItem&&a.shiftKey?(q.focus(this._lastFocusItem),a.stopPropagation(),a.preventDefault()):b==this._lastFocusItem&&!a.shiftKey?(q.focus(this._firstFocusItem),a.stopPropagation(),a.preventDefault()):a.stopPropagation()}}});a("dojo-bidi")&&p.extend({_setTitleAttr:function(a){this.containerNode.title=
1032this.textDir&&this.enforceTextDirWithUcc?this.enforceTextDirWithUcc(null,a):a;this._set("title",a)},_setTextDirAttr:function(a){if(!this._created||this.textDir!=a)this._set("textDir",a),this.textDir&&this.title&&(this.containerNode.title=this.enforceTextDirWithUcc(null,this.title))}});return p})},"esri/renderers/TimeRampAger":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has ../kernel ../symbols/jsonUtils ../Color ./SymbolAger".split(" "),function(p,n,a,e,l,h,q,g){p=
1033p(g,{declaredClass:"esri.renderer.TimeRampAger",constructor:function(a,c,b){this.colorRange=a;this.sizeRange=c;this.alphaRange=b},getAgedSymbol:function(d,c){var b=c.getLayer(),f=c.attributes;d=h.fromJson(d.toJson());var m=b._map.timeExtent,g=m.startTime,m=m.endTime;if(!g||!m)return d;g=g.getTime();m=m.getTime();b=new Date(f[b._startTimeField]);b=b.getTime();b<g&&(b=g);g=m===g?1:(b-g)/(m-g);if(b=this.sizeRange)f=b[0],m=b[1],b=Math.abs(m-f)*g,this._setSymbolSize(d,f<m?f+b:f-b);if(b=this.colorRange){var m=
1034b[0],e=b[1],k=Math.round,f=new a,r=m.r,l=e.r,b=Math.abs(l-r)*g;f.r=k(r<l?r+b:r-b);r=m.g;l=e.g;b=Math.abs(l-r)*g;f.g=k(r<l?r+b:r-b);r=m.b;l=e.b;b=Math.abs(l-r)*g;f.b=k(r<l?r+b:r-b);m=m.a;e=e.a;b=Math.abs(e-m)*g;f.a=m<e?m+b:m-b;d.setColor(f)}f=d.color;if((b=this.alphaRange)&&f)m=b[0],e=b[1],b=Math.abs(e-m)*g,f.a=m<e?m+b:m-b;return d},toJson:function(){var a={};this.sizeRange&&(a.sizeRange=this.sizeRange);this.colorRange&&(a.colorRange=[q.toJsonColor(this.colorRange[0]),q.toJsonColor(this.colorRange[1])]);
1035this.alphaRange&&(a.alphaRange=[Math.round(255*this.alphaRange[0]),Math.round(255*this.alphaRange[1])]);return a}});e("extend-esri")&&n.setObject("renderer.TimeRampAger",p,l);return p})},"dijit/typematic":function(){define("dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/on dojo/sniff ./main".split(" "),function(p,n,a,e,l,h){var q=h.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(0>this._currentTimeout?
1036this._initialDelay:1<this._subsequentDelay?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);this._timer=setTimeout(a.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(g,d,c,b,f,m,e,h){if(f!=this._obj){this.stop();this._initialDelay=e||500;this._subsequentDelay=m||0.9;this._minDelay=h||10;this._obj=f;this._node=c;this._count=this._currentTimeout=-1;this._callback=a.hitch(d,b);this._evt={faux:!0};for(var k in g)"layerX"!=k&&"layerY"!=
1037k&&(d=g[k],"function"!=typeof d&&"undefined"!=typeof d&&(this._evt[k]=d));this._fireEventAndReload()}},stop:function(){this._timer&&(clearTimeout(this._timer),this._timer=null);this._obj&&(this._callback(-1,this._node,this._evt),this._obj=null)},addKeyListener:function(g,d,c,b,f,m,h){var l="keyCode"in d?"keyCode":"charCode"in d?"charCode":"charOrCode",k=[e(g,"keyCode"in d?"keydown":"charCode"in d?"keypress":n._keypress,a.hitch(this,function(a){a[l]==d[l]&&(void 0===d.ctrlKey||d.ctrlKey==a.ctrlKey)&&
1038(void 0===d.altKey||d.altKey==a.altKey)&&(void 0===d.metaKey||d.metaKey==(a.metaKey||!1))&&(void 0===d.shiftKey||d.shiftKey==a.shiftKey)?(a.stopPropagation(),a.preventDefault(),q.trigger(a,c,g,b,d,f,m,h)):q._obj==d&&q.stop()})),e(g,"keyup",a.hitch(this,function(){q._obj==d&&q.stop()}))];return{remove:function(){p.forEach(k,function(a){a.remove()})}}},addMouseListener:function(g,d,c,b,f,m){var h=[e(g,"mousedown",a.hitch(this,function(a){a.preventDefault();q.trigger(a,d,g,c,g,b,f,m)})),e(g,"mouseup",
1039a.hitch(this,function(a){this._obj&&a.preventDefault();q.stop()})),e(g,"mouseout",a.hitch(this,function(a){this._obj&&a.preventDefault();q.stop()})),e(g,"dblclick",a.hitch(this,function(e){e.preventDefault();9>l("ie")&&(q.trigger(e,d,g,c,g,b,f,m),setTimeout(a.hitch(this,q.stop),50))}))];return{remove:function(){p.forEach(h,function(a){a.remove()})}}},addListener:function(a,d,c,b,f,m,e,h){var k=[this.addKeyListener(d,c,b,f,m,e,h),this.addMouseListener(a,b,f,m,e,h)];return{remove:function(){p.forEach(k,
1040function(a){a.remove()})}}}};return q})},"dojox/gfx":function(){define(["dojo/_base/lang","./gfx/_base","./gfx/renderer!"],function(p,n,a){n.switchTo(a);return n})},"esri/WKIDUnitConversion":function(){define(["dojo/has","./kernel"],function(p,n){var a,e={values:[1,0.3048,0.3048006096012192,0.3047972654,0.9143917962,0.201166195164,0.9143984146160287,0.3047994715386762,20.11676512155263,20.11678249437587,0.9143985307444408,0.91439523,0.3047997101815088,20.116756,5E4,15E4],2066:5,2136:12,2155:2,2157:0,
10412158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:13,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,
10423496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,
10433600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,
10443682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,
10455457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6210:0,6211:0,6316:0,6391:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,2239
10451:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,
104624100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25E3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,
104731171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53034:0,53048:0,53049:0,54034:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:14,102069:15,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,
1048102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,
1049103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,
1050103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,
1051103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103695:2};for(a=2E3;2046>a;a++)e[a]=0;for(a=2056;2066>a;a++)e[a]=0;for(a=2067;2136>a;a++)e[a]=0;for(a=2137;2155>a;a++)e[a]=0;for(a=2161;2171>a;a++)e[a]=0;for(a=2172;2194>a;a++)e[a]=0;for(a=2195;2199>a;a++)e[a]=
10520;for(a=2200;2204>a;a++)e[a]=0;for(a=2205;2218>a;a++)e[a]=0;for(a=2222;2225>a;a++)e[a]=1;for(a=2225;2251>a;a++)e[a]=2;for(a=2251;2254>a;a++)e[a]=1;for(a=2257;2265>a;a++)e[a]=2;for(a=2274;2280>a;a++)e[a]=2;for(a=2280;2283>a;a++)e[a]=1;for(a=2283;2290>a;a++)e[a]=2;for(a=2290;2293>a;a++)e[a]=0;for(a=2308;2314>a;a++)e[a]=0;for(a=2315;2463>a;a++)e[a]=0;for(a=2523;2867>a;a++)e[a]=0;for(a=2867;2870>a;a++)e[a]=1;for(a=2870;2889>a;a++)e[a]=2;for(a=2891;2896>a;a++)e[a]=2;for(a=2896;2899>a;a++)e[a]=1;for(a=
10532902;2909>a;a++)e[a]=2;for(a=2915;2921>a;a++)e[a]=2;for(a=2921;2924>a;a++)e[a]=1;for(a=2924;2931>a;a++)e[a]=2;for(a=2931;2963>a;a++)e[a]=0;for(a=2964;2969>a;a++)e[a]=2;for(a=2969;2974>a;a++)e[a]=0;for(a=2975;2992>a;a++)e[a]=0;for(a=2995;3052>a;a++)e[a]=0;for(a=3054;3080>a;a++)e[a]=0;for(a=3081;3089>a;a++)e[a]=0;for(a=3092;3102>a;a++)e[a]=0;for(a=3106;3139>a;a++)e[a]=0;for(a=3146;3152>a;a++)e[a]=0;for(a=3153;3167>a;a++)e[a]=0;for(a=3168;3173>a;a++)e[a]=0;for(a=3174;3204>a;a++)e[a]=0;for(a=3294;3359>
1054a;a++)e[a]=0;for(a=3367;3404>a;a++)e[a]=0;for(a=3408;3417>a;a++)e[a]=0;for(a=3417;3439>a;a++)e[a]=2;for(a=3441;3447>a;a++)e[a]=2;for(a=3447;3451>a;a++)e[a]=0;for(a=3451;3460>a;a++)e[a]=2;for(a=3460;3479>a;a++)e[a]=0;for(a=3554;3560>a;a++)e[a]=0;for(a=3560;3571>a;a++)e[a]=2;for(a=3571;3582>a;a++)e[a]=0;for(a=3594;3598>a;a++)e[a]=0;for(a=3601;3605>a;a++)e[a]=0;for(a=3637;3640>a;a++)e[a]=0;for(a=3665;3668>a;a++)e[a]=0;for(a=3693;3696>a;a++)e[a]=0;for(a=3701;3728>a;a++)e[a]=0;for(a=3728;3740>a;a++)e[a]=
10552;for(a=3740;3752>a;a++)e[a]=0;for(a=3753;3761>a;a++)e[a]=2;for(a=3761;3774>a;a++)e[a]=0;for(a=3775;3778>a;a++)e[a]=0;for(a=3779;3782>a;a++)e[a]=0;for(a=3783;3786>a;a++)e[a]=0;for(a=3788;3792>a;a++)e[a]=0;for(a=3797;3803>a;a++)e[a]=0;
1055for(a=3814;3817>a;a++)e[a]=0;for(a=3825;3830>a;a++)e[a]=0;for(a=3832;3842>a;a++)e[a]=0;for(a=3844;3853>a;a++)e[a]=0;for(a=3873;3886>a;a++)e[a]=0;for(a=3890;3894>a;a++)e[a]=0;for(a=3907;3913>a;a++)e[a]=0;for(a=3942;3951>a;a++)e[a]=0;for(a=3968;3971>a;a++)e[a]=0;for(a=
10563973;3977>a;a++)e[a]=0;for(a=3986;3990>a;a++)e[a]=0;for(a=3994;3998>a;a++)e[a]=0;for(a=4048;4052>a;a++)e[a]=0;for(a=4056;4064>a;a++)e[a]=0;for(a=4093;4097>a;a++)e[a]=0;for(a=4399;4414>a;a++)e[a]=2;for(a=4418;4434>a;a++)e[a]=2;for(a=4455;4458>a;a++)e[a]=2;for(a=4484;4490>a;a++)e[a]=0;for(a=4491;4555>a;a++)e[a]=0;for(a=4568;4590>a;a++)e[a]=0;for(a=4652;4657>a;a++)e[a]=0;for(a=4766;4801>a;a++)e[a]=0;for(a=5014;5017>a;a++)e[a]=0;for(a=5069;5073>a;a++)e[a]=0;for(a=5105;5131>a;a++)e[a]=0;for(a=5173;5189>
1057a;a++)e[a]=0;for(a=5253;5260>a;a++)e[a]=0;for(a=5269;5276>a;a++)e[a]=0;for(a=5292;5312>a;a++)e[a]=0;for(a=5329;5332>a;a++)e[a]=0;for(a=5343;5350>a;a++)e[a]=0;for(a=5355;5358>a;a++)e[a]=0;for(a=5387;5390>a;a++)e[a]=0;for(a=5459;5464>a;a++)e[a]=0;for(a=5479;5483>a;a++)e[a]=0;for(a=5518;5521>a;a++)e[a]=0;for(a=5530;5540>a;a++)e[a]=0;for(a=5550;5553>a;a++)e[a]=0;for(a=5562;5584>a;a++)e[a]=0;for(a=5623;5626>a;a++)e[a]=2;for(a=5631;5640>a;a++)e[a]=0;for(a=5649;5654>a;a++)e[a]=0;for(a=5663;5681>a;a++)e[a]=
10580;for(a=5682;5686>a;a++)e[a]=0;for(a=5875;5878>a;a++)e[a]=0;for(a=5921;5941>a;a++)e[a]=0;for(a=6050;6126>a;a++)e[a]=0;for(a=6244;6276>a;a++)e[a]=0;for(a=6328;6349>a;a++)e[a]=0;for(a=6350;6355>a;a++)e[a]=0;for(a=20002;20033>a;a++)e[a]=0;for(a=20062;20093>a;a++)e[a]=0;for(a=20135;20139>a;a++)e[a]=0;for(a=20248;20259>a;a++)e[a]=0;for(a=20348;20359>a;a++)e[a]=0;for(a=20436;20441>a;a++)e[a]=0;for(a=20822;20825>a;a++)e[a]=0;for(a=20934;20937>a;a++)e[a]=0;for(a=21035;21038>a;a++)e[a]=0;for(a=21095;21098>
1059a;a++)e[a]=0;for(a=21148;21151>a;a++)e[a]=0;for(a=21413;21424>a;a++)e[a]=0;for(a=21473;21484>a;a++)e[a]=0;for(a=21780;21783>a;a++)e[a]=0;for(a=21891;21895>a;a++)e[a]=0;for(a=21896;21900>a;a++)e[a]=0;for(a=22171;22178>a;a++)e[a]=0;for(a=22181;22188>a;a++)e[a]=0;for(a=22191;22198>a;a++)e[a]=0;for(a=22234;22237>a;a++)e[a]=0;for(a=22521;22526>a;a++)e[a]=0;for(a=22991;22995>a;a++)e[a]=0;for(a=23028;23039>a;a++)e[a]=0;for(a=23830;23854>a;a++)e[a]=0;for(a=23866;23873>a;a++)e[a]=0;for(a=23877;23885>a;a++)e[a]=
10600;for(a=23886;23895>a;a++)e[a]=0;for(a=23946;23949>a;a++)e[a]=0;for(a=24311;24314>a;a++)e[a]=0;for(a=24342;24348>a;a++)e[a]=0;for(a=24370;24375>a;a++)e[a]=10;for(a=24375;24382>a;a++)e[a]=0;for(a=24718;24722>a;a++)e[a]=0;for(a=24817;24822>a;a++)e[a]=0;for(a=24877;24883>a;a++)e[a]=0;for(a=24891;24894>a;a++)e[a]=0;for(a=25391;25396>a;a++)e[a]=0;for(a=25828;25839>a;a++)e[a]=0;for(a=26191;26196>a;a++)e[a]=0;for(a=26391;26394>a;a++)e[a]=0;for(a=26701;26723>a;a++)e[a]=0;for(a=26729;26800>a;a++)e[a]=2;for(a=
106126801;26804>a;a++)e[a]=2;for(a=26811;26814>a;a++)e[a]=2;for(a=26847;26871>a;a++)e[a]=2;for(a=26891;26900>a;a++)e[a]=0;for(a=26901;26924>a;a++)e[a]=0;for(a=26929;26947>a;a++)e[a]=0;for(a=26948;26999>a;a++)e[a]=0;for(a=27037;27041>a;a++)e[a]=0;for(a=27205;27233>a;a++)e[a]=0;for(a=27258;27261>a;a++)e[a]=0;for(a=27391;27399>a;a++)e[a]=0;for(a=27561;27565>a;a++)e[a]=0;for(a=27571;27575>a;a++)e[a]=0;for(a=27581;27585>a;a++)e[a]=0;for(a=27591;27595>a;a++)e[a]=0;for(a=28191;28194>a;a++)e[a]=0;for(a=28348;28359>
1062a;a++)e[a]=0;for(a=28402;28433>a;a++)e[a]=0;for(a=28462;28493>a;a++)e[a]=0;for(a=29118;29123>a;a++)e[a]=0;for(a=29168;29173>a;a++)e[a]=0;for(a=29177;29186>a;a++)e[a]=0;for(a=29187;29196>a;a++)e[a]=0;for(a=29900;29904>a;a++)e[a]=0;for(a=30161;30180>a;a++)e[a]=0;for(a=30491;30495>a;a++)e[a]=0;for(a=30729;30733>a;a++)e[a]=0;for(a=31251;31260>a;a++)e[a]=0;for(a=31265;31269>a;a++)e[a]=0;for(a=31275;31280>a;a++)e[a]=0;for(a=31281;31298>a;a++)e[a]=0;for(a=31461;31470>a;a++)e[a]=0;for(a=31491;31496>a;a++)e[a]=
10630;for(a=31917;31923>a;a++)e[a]=0;for(a=31965;32001>a;a++)e[a]=0;for(a=32001;32004>a;a++)e[a]=2;for(a=32005;32032>a;a++)e[a]=2;for(a=32033;32061>a;a++)e[a]=2;for(a=32064;32068>a;a++)e[a]=2;for(a=32074;32078>a;a++)e[a]=2;for(a=32081;32087>a;a++)e[a]=0;for(a=32107;32131>a;a++)e[a]=0;for(a=32133;32159>a;a++)e[a]=0;for(a=32164;32168>a;a++)e[a]=2;for(a=32180;32200>a;a++)e[a]=0;for(a=32201;32261>a;a++)e[a]=0;for(a=32301;32361>a;a++)e[a]=0;for(a=32601;32663>a;a++)e[a]=0;for(a=32664;32668>a;a++)e[a]=2;for(a=
106432701;32762>a;a++)e[a]=0;for(a=53001;53005>a;a++)e[a]=0;for(a=53008;53020>a;a++)e[a]=0;for(a=53021;53033>a;a++)e[a]=0;for(a=53042;53047>a;a++)e[a]=0;for(a=54001;54005>a;a++)e[a]=0;for(a=54008;54020>a;a++)e[a]=0;for(a=54021;54033>a;a++)e[a]=0;for(a=54042;54047>a;a++)e[a]=0;for(a=54048;54054>a;a++)e[a]=0;for(a=102001;102041>a;a++)e[a]=0;for(a=102042;102064>a;a++)e[a]=0;for(a=102065;102068>a;a++)e[a]=0;for(a=102070;102118>a;a++)e[a]=0;for(a=102122;102217>a;a++)e[a]=0;for(a=102221;102378>a;a++)e[a]=0;
1065for(a=102382;102389>a;a++)e[a]=0;for(a=102389;102399>a;a++)e[a]=2;for(a=102401;102445>a;a++)e[a]=0;for(a=102445;102448>a;a++)e[a]=2;for(a=102450;102453>a;a++)e[a]=0;for(a=102461;102469>a;a++)e[a]=2;for(a=102469;102497>a;a++)e[a]=0;for(a=102500;102520>a;a++)e[a]=1;for(a=102520;102525>a;a++)e[a]=0;for(a=102525;102530>a;a++)e[a]=2;for(a=102530;102550>a;a++)e[a]=0;for(a=102570;102589>a;a++)e[a]=0;for(a=102590;102599>a;a++)e[a]=0;for(a=102601;102604>a;a++)e[a]=0;for(a=102605;102629>a;a++)e[a]=0;for(a=
1066102629;102647>a;a++)e[a]=2;for(a=102648;102701>a;a++)e[a]=2;for(a=102701;102704>a;a++)e[a]=0;for(a=102707;102731>a;a++)e[a]=2;for(a=102733;102759>a;a++)e[a]=2;for(a=102767;102799>a;a++)e[a]=0;for(a=102962;102970>a;a++)e[a]=0;for(a=102971;102974>a;a++)e[a]=0;for(a=102975;102990>a;a++)e[a]=0;for(a=102990;102993>a;a++)e[a]=1;for(a=102997;103003>a;a++)e[a]=0;for(a=103003;103009>a;a++)e[a]=2;for(a=103009;103012>a;a++)e[a]=0;for(a=103012;103015>a;a++)e[a]=2;for(a=103019;103022>a;a++)e[a]=0;for(a=103022;103025>
1067a;a++)e[a]=2;for(a=103029;103032>a;a++)e[a]=0;for(a=103032;103035>a;a++)e[a]=2;for(a=103065;103069>a;a++)e[a]=0;for(a=103074;103077>a;a++)e[a]=0;for(a=103077;103080>a;a++)e[a]=1;for(a=103080;103083>a;a++)e[a]=0;for(a=103083;103086>a;a++)e[a]=2;for(a=103090;103094>a;a++)e[a]=0;for(a=103097;103100>a;a++)e[a]=0;for(a=103100;103103>a;a++)e[a]=2;for(a=103107;103110>a;a++)e[a]=0;for(a=103110;103113>a;a++)e[a]=2;for(a=103113;103117>a;a++)e[a]=0;for(a=103117;103121>a;a++)e[a]=2;for(a=103153;103158>a;a++)e[a]=
10680;for(a=103158;103163>a;a++)e[a]=2;for(a=103163;103166>a;a++)e[a]=0;for(a=103166;103169>a;a++)e[a]=1;for(a=103169;103172>a;a++)e[a]=2;for(a=103186;103189>a;a++)e[a]=0;for(a=103189;103192>a;a++)e[a]=2;for(a=103192;103196>a;a++)e[a]=0;for(a=103196;103200>a;a++)e[a]=2;for(a=103200;103225>a;a++)e[a]=0;for(a=103225;103228>a;a++)e[a]=1;for(a=103232;103238>a;a++)e[a]=0;for(a=103238;103244>a;a++)e[a]=2;for(a=103244;103247>a;a++)e[a]=0;for(a=103247;103250>a;a++)e[a]=2;for(a=103254;103257>a;a++)e[a]=0;for(a=
1069103257;103260>a;a++)e[a]=2;for(a=103264;103267>a;a++)e[a]=0;for(a=103267;103270>
1069a;a++)e[a]=2;for(a=103300;103376>a;a++)e[a]=0;for(a=103381;103384>a;a++)e[a]=0;for(a=103384;103387>a;a++)e[a]=1;for(a=103387;103390>a;a++)e[a]=0;for(a=103390;103393>a;a++)e[a]=2;for(a=103397;103400>a;a++)e[a]=0;for(a=103400;103472>a;a++)e[a]=2;for(a=103476;103479>a;a++)e[a]=0;for(a=103479;103482>a;a++)e[a]=2;for(a=103486;103489>a;a++)e[a]=0;for(a=103489;103492>a;a++)e[a]=2;for(a=103492;103496>a;a++)e[a]=0;for(a=103496;103500>
1070a;a++)e[a]=2;for(a=103528;103544>a;a++)e[a]=0;for(a=103544;103549>a;a++)e[a]=2;for(a=103549;103552>a;a++)e[a]=0;for(a=103552;103555>a;a++)e[a]=1;for(a=103555;103558>a;a++)e[a]=2;for(a=103558;103561>a;a++)e[a]=0;for(a=103571;103574>a;a++)e[a]=0;for(a=103574;103577>a;a++)e[a]=2;for(a=103577;103581>a;a++)e[a]=0;for(a=103581;103584>a;a++)e[a]=2;for(a=103600;103695>a;a++)e[a]=0;for(a=103700;103794>a;a++)e[a]=2;for(a=103794;103872>a;a++)e[a]=0;for(a=103900;103972>a;a++)e[a]=2;p("extend-esri")&&(n.WKIDUnitConversion=
1071e);return e})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(p,n){var a={};p.setObject("dojo.cldr.supplemental",a);a.getFirstDayOfWeek=function(e){e={bd:5,mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,
1072pr:0,py:0,sg:0,sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[a._region(e)];return void 0===e?1:e};a._region=function(a){a=n.normalizeLocale(a);a=a.split("-");var l=a[1];l?4==l.length&&(l=a[2]):l={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",
1073fa:"ir",ff:"sn",fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb",ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",ik:"us","in":"id",is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",
1074mn:"mn",mo:"ro",mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no",no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",qu:"pe",rm:"ch",rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",
1075ur:"pk",uz:"uz",ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id",ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",bbc:"id",bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",
1076crk:"ca",csb:"pl",dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf",ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",gez:"et",gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",
1077khq:"ml",kht:"in",kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru",kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",lif:"np",lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer
1077:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",
1078nds:"de","new":"np",niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph",pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",saf:"gh",sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",
1079teo:"ug",tet:"tl",tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv",twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",wal:"et",war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[a[0]];return l};a.getWeekend=function(e){var l=a._region(e);e={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[l];l={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,
1080iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[l];void 0===e&&(e=6);void 0===l&&(l=0);return{start:e,end:l}};return a})},"esri/layers/CodedValueDomain":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ./Domain".split(" "),function(p,n,a,e,l,h,q){p=p([q],{declaredClass:"esri.layers.CodedValueDomain",constructor:function(a){a&&n.isObject(a)&&(this.codedValues=a.codedValues)},getName:function(g){var d;a.some(this.codedValues,function(a){a.code==g&&(d=a.name);
1081return!!d});return d},toJson:function(){var a=this.inherited(arguments);a.codedValues=n.clone(this.codedValues);return h.fixJson(a)}});e("extend-esri")&&n.setObject("layers.CodedValueDomain",p,l);return p})},"esri/renderers/DotDensityRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/has dojox/gfx/_base ../kernel ../lang ../Color ./Renderer ../symbols/PictureFillSymbol ../geometry/ScreenPoint ../geometry/Point".split(" "),function(p,n,a,e,l,h,
1082q,g,d,c,b,f,m){p=p(c,{declaredClass:"esri.renderer.DotDensityRenderer",constructor:function(a){this.dotSize=a.dotSize||3;this.dotValue=a.dotValue;this.fields=a.fields;this.outline=a.outline;this.backgroundColor=a.backgroundColor;this.exactCount=a.exactCount||!0;this.dotShape=a.dotShape||"square";this.legendOptions=a.legendOptions;this._exactCountMinArea=1E4;this._currentMapScale=this._map=this._canvas=null;this._symbolMap={};this._currentGraphic=this._currentResolution=this._objectIdField=null;this._supportsCanvas=
1083window.CanvasRenderingContext2D?!0:!1;window.CanvasRenderingContext2D||console.log("The DotDensityRenderer requires a Canvas enabled Browser.  IE8 and less does not support Canvas.")},getSymbol:function(a){var c,d;this._currentGraphic=a;if(!this._supportsCanvas)return null;this._map||(this._map=a.getLayer()._map,this._objectIdField=a.getLayer().objectIdField,this._currentMapScale=this._map.getScale(),this._currentResolution=this._map.extent.getWidth()/this._map.width,this._map.on("zoom-end",n.hitch(this,
1084function(a){this._currentMapScale=this._map.getScale();this._currentResolution=a.extent.getWidth()/this._map.width;this._symbolMap[this._currentMapScale]={}})));if(this._symbolMap[this._currentMapScale]&&this._symbolMap[this._currentMapScale][a.attributes[this._objectIdField]])return c=this._symbolMap[this._currentMapScale][a.attributes[this._objectIdField]],d=this._getShapeProperties(a),c.setOffset(d.dx,d.dy),c;c=this._generateFieldsCount(this.fields,a.attributes,this.dotValue);d=this._getShapeProperties(a);
1085c=new b(this._generateImageSrc(d.width,d.height,c,d.minXY,d.maxXY),this.outline,d.width,d.height);c.setOffset(d.dx,d.dy);this._symbolMap[this._currentMapScale]||(this._symbolMap[this._currentMapScale]={});return this._symbolMap[this._currentMapScale][a.attributes[this._objectIdField]]=c},_generateFieldsCount:function(a,b,c){var d,f;for(f=a.length-1;0<=f;f--)d=b[a[f].name]/c,a[f].numPoints=Math.round(d);return a},_getShapeProperties:function(a){var b,c,d,f;b=a.geometry.getExtent();b.contains(this._map.extent)&&
1086(b=this._map.extent);
1086d=Math.ceil(b.getWidth()/this._currentResolution);f=Math.ceil(b.getHeight()/this._currentResolution);c=this._map.toScreen(new m(b.xmin,b.ymin,b.spatialReference));b=this._map.toScreen(new m(b.xmax,b.ymax,b.spatialReference));a=a.getLayer().getNode().getCTM();return{minXY:c,maxXY:b,dx:(c.x-a.e)%d,dy:(b.y-a.f)%f,width:d,height:f}},_generateImageSrc:function(a,b,c,d,f,m){var g=this.dotSize,e,h,l;this._canvas?(this._canvas.width=a,this._canvas.height=b):this._canvas=this._initCanvas(a,
1087b);e=this._canvas.getContext("2d");if(m=m||this.backgroundColor)e.fillStyle=m.toCss(!0),e.fillRect(0,0,a,b),e.fill();for(m=c.length-1;0<=m;m--){e.fillStyle=c[m].color.toCss(!0);for(h=c[m].numPoints-1;0<=h;h--)l=this._getRandomPoint(a,b,d,f),"square"===this.dotShape?e.fillRect(l.x,l.y,g,g):"circle"===this.dotShape&&(e.beginPath(),e.arc(l.x,l.y,g/2,0,2*Math.PI,!0)),e.fill()}return this._canvas.toDataURL()},_initCanvas:function(a,b){var c=e.create("canvas",{id:"canvas",width:a+"px",height:b+"px",style:"position: absolute; left: -10000px; top: 0px;"},
1088null);document.body.appendChild(c);return c},_getRandomInt:function(a,b){return Math.floor(Math.random()*(b-a+1)+a)},_getRandomPoint:function(a,b,c,d){var m={},g=this.outline&&this.outline.width?this.outline.width:0;if(!0===this.exactCount&&a*b>this._exactCountMinArea){do m.x=this._getRandomInt(c.x,d.x),m.y=this._getRandomInt(d.y,c.y),a=new f(m.x,m.y),a=this._checkPointShapeBounds(a,this.dotSize+g,this._currentGraphic.geometry),!0===a&&(m.x-=c.x,m.y-=d.y);while(!1===a)}else m.x=this._getRandomInt(0,
1089a),m.y=this._getRandomInt(0,b);return m},_checkPointShapeBounds:function(a,b,c){var d=null,d=!1,f=!0,m=0;do{switch(m){case 1:a.x+=b;break;case 2:a.y+=b;break;case 3:a.x-=b}d=this._map.toMap(a);d=c.contains(d);!1===d&&(f=!1);m+=1}while(3>=m&&!0===f);return d},setDotSize:function(a){0<a&&(this.dotSize=a)},setDotValue:function(a){0<a&&(this.dotValue=a)},setOutline:function(a){this.outline=a},setBackgroundColor:function(a){this.backgroundColor=a},toJson:function(){var b=n.mixin(this.inherited(arguments),
1090{type:"dotDensity",backgroundColor:d.toJsonColor(this.backgroundColor),dotShape:this.dotShape,dotSize:0<this.dotSize?h.px2pt(this.dotSize):0,dotValue:this.dotValue,fields:a.map(this.fields,function(a){return g.fixJson({color:d.toJsonColor(a.color),name:a.name})}),legendOptions:this.legendOptions&&g.fixJson({backgroundColor:d.toJsonColor(this.legendOptions.backgroundColor),dotCoverage:this.legendOptions.dotCoverage,outline:this.legendOptions.outline&&this.legendOptions.outline.toJson(),valueUnit:this.legendOptions.valueUnit}),
1091outline:this.outline&&this.outline.toJson()});return g.fixJson(b)}});l("extend-esri")&&n.setObject("renderer.DotDensityRenderer",p,q);return p})},"esri/layers/TileInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../SpatialReference ../geometry/Point ./LOD".split(" "),function(p,n,a,e,l,h,q,g,d){p=p(null,{declaredClass:"esri.layers.TileInfo",constructor:function(c){n.mixin(this,c);this.width=this.cols;this.height=this.rows;c=this.spatialReference;
1092var b=this.origin;c&&(c=this.spatialReference=new q(c.toJson?c.toJson():c));b&&(this.origin=new g(b.toJson?b.toJson():b),!b.spatialReference&&c&&this.origin.setSpatialReference(new q(c.toJson())));this.lods=a.map(this.lods,function(a){return new d(a)})},toJson:function(){return h.fixJson({rows:this.rows,cols:this.cols,dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin&&this.origin.toJson(),spatialReference:this.spatialReference&&this.spatialReference.toJson(),
1093lods:this.lods&&a.map(this.lods,function(a){return a.toJson()})})}});e("extend-esri")&&n.setObject("layers.TileInfo",p,l);return p})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),function(p,n,a,e,l,h,q,g,d,c,b){function f(a,b){a.canDelete&&r._remove(a.id,b.options.frameDoc,!0)}function m(a){y&&y.length&&(l.forEach(y,function(a){r._remove(a.id,a.frameDoc);a.frameDoc=null}),
1094y=[]);return a.options.jsonp?!a.data:!0}function t(a){return!!this.scriptLoaded}function s(a){return(a=a.options.checkString)&&eval("typeof("+a+') !\x3d\x3d "undefined"')}function k(a,b){if(this.canDelete){var c=this.response.options;y.push({id:this.id,frameDoc:c.ioArgs?c.ioArgs.frameDoc:c.frameDoc});
1094c.ioArgs&&(c.ioArgs.frameDoc=null);c.frameDoc=null}b?this.reject(b):this.resolve(a)}function r(b,c,d){var g=a.parseArgs(b,a.deepCopy({},c));b=g.url;c=g.options;var e=a.deferred(g,f,m,c.jsonp?null:c.checkString?
1095s:t,k);h.mixin(e,{id:u+x++,canDelete:!1});c.jsonp&&(RegExp("[?\x26]"+c.jsonp+"\x3d").test(b)||(b+=(~b.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+u+"_callbacks."+e.id),e.canDelete=!0,w[e.id]=function(a){g.data=a;e.handleResponse(g)});a.notify&&a.notify.emit("send",g,e.promise.cancel);if(!c.canAttach||c.canAttach(e)){var l=r._attach(e.id,b,c.frameDoc);if(!c.jsonp&&!c.checkString)var p=q(l,v,function(a){if("load"===a.type||z.test(l.readyState))p.remove(),e.scriptLoaded=a})}q.once(l,
1096"error",function(a){e.reject(a);r._remove(e.id,c.frameDoc,!0)});n(e);return d?e:e.promise}c.add("script-readystatechange",function(a,b){return"undefined"!==typeof b.createElement("script").onreadystatechange&&("undefined"===typeof a.opera||"[object Opera]"!==a.opera.toString())});var u=p.id.replace(/[\/\.\-]/g,"_"),x=0,v=c("script-readystatechange")?"readystatechange":"load",z=/complete|loaded/,w=e.global[u+"_callbacks"]={},y=[];r.get=r;r._attach=function(a,c,d){d=d||b.doc;var f=d.createElement("script");
1097f.type="text/javascript";f.src=c;f.id=a;f.async=!0;f.charset="utf-8";return d.getElementsByTagName("head")[0].appendChild(f)};r._remove=function(a,b,c){d.destroy(g.byId(a,b));w[a]&&(c?w[a]=function(){delete w[a]}:delete w[a])};r._callbacksProperty=u+"_callbacks";return r})},"dijit/_base/manager":function(){define(["dojo/_base/array","dojo/_base/config","dojo/_base/lang","../registry","../main"],function(p,n,a,e,l){var h={};p.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),
1098function(a){h[a]=e[a]});a.mixin(h,{defaultDuration:n.defaultDuration||200});a.mixin(l,h);return l})},"dijit/popup":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on ./place ./BackgroundIframe ./Viewport ./main".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k){function r(){this._popupWrapper&&(h.destroy(this._popupWrapper),delete this._popupWrapper)}a=a(null,{_stack:[],
1099_beginZIndex:1E3,_idGen:1,_repositionAll:function(){if(this._firstAroundNode){var a=this._firstAroundPosition,c=q.position(this._firstAroundNode,!0),d=c.x-a.x,a=c.y-a.y;if(d||a){this._firstAroundPosition=c;for(c=0;c<this._stack.length;c++){var f=this._stack[c].wrapper.style;f.top=parseFloat(f.top)+a+"px";"auto"==f.right?f.left=parseFloat(f.left)+d+"px":f.right=parseFloat(f.right)-d+"px"}}this._aroundMoveListener=setTimeout(b.hitch(this,"_repositionAll"),d||a?10:50)}},_createWrapper:function(a){var b=
1100a._popupWrapper,c=a.domNode;b||(b=h.create("div",{"class":"dijitPopup",style:{display:"none"},role:"region","aria-label":a["aria-label"]||a.label||a.name||a.id},a.ownerDocumentBody),b.appendChild(c),c=c.style,c.display="",c.visibility="",c.position="",c.top="0px",a._popupWrapper=b,n.after(a,"destroy",r,!0),"ontouchend"in document&&f(b,"touchend",function(a){/^(input|button|textarea)$/i.test(a.target.tagName)||a.preventDefault()}));return b},moveOffScreen:function(a){var b=this._createWrapper(a);a=
1101q.isBodyLtr(a.ownerDocument);var c={visibility:"hidden",top:"-9999px",display:""};c[a?"left":"right"]="-9999px";c[a?"right":"left"]="auto";g.set(b,c);return b},hide:function(a){var b=this._createWrapper(a);g.set(b,{display:"none",height:"auto",overflow:"visible",border:""});a=a.domNode;"_originalStyle"in a&&(a.style.cssText=a._originalStyle)},getTopPopup:function(){for(var a=this._stack,b=a.length-1;0<b&&a[b].parent===a[b-1].widget;b--);return a[b]},open:function(a){for(var k=this._stack,r=a.popup,
1102h=r.domNode,n=a.orient||["below","below-alt","above","above-alt"],p=a.parent?a.parent.isLeftToRight():q.isBodyLtr(r.ownerDocument),B=a.around,G=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;k.length&&(!a.parent||!e.isDescendant(a.parent.domNode,k[k.length-1].widget.domNode));)this.close(k[k.length-1].widget);var D=this.moveOffScreen(r);r.startup&&!r._started&&r.startup();var A,C=q.position(h);if("maxHeight"in a&&-1!=a.maxHeight)A=a.maxHeight||Infinity;else{A=s.getEffectiveBox(this.ownerDocument);
1103var E=B?q.position(B,!1):{y:a.y-(a.padding||0),h:2*(a.padding||0)};A=Math.floor(Math.max(E.y,A.h-(E.y+E.h)))}C.h>A&&(C=g.getComputedStyle(h),g.set(D,{overflowY:"scroll",height:A+"px",border:C.borderLeftWidth+" "+C.borderLeftStyle+" "+C.borderLeftColor}),h._originalStyle=h.style.cssText,h.style.border="none");l.set(D,{id:G,style:{zIndex:this._beginZIndex+k.length},"class":"dijitPopup "+(r.baseClass||r["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});0==k.length&&B&&(this._firstAroundNode=
1104B,this._firstAroundPosition=q.position(B,!0),this._aroundMoveListener=setTimeout(b.hitch(this,"_repositionAll"),50));
1104d("config-bgIframe")&&!r.bgIframe&&(r.bgIframe=new t(D));G=r.orient?b.hitch(r,"orient"):null;n=B?m.around(D,B,n,p,G):m.at(D,a,"R"==n?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding,G);D.style.visibility="visible";h.style.visibility="visible";h=[];h.push(f(D,"keydown",b.hitch(this,function(b){if(b.keyCode==c.ESCAPE&&a.onCancel)b.stopPropagation(),b.preventDefault(),a.onCancel();
1105else if(b.keyCode==c.TAB&&(b.stopPropagation(),b.preventDefault(),(b=this.getTopPopup())&&b.onCancel))b.onCancel()})));r.onCancel&&a.onCancel&&h.push(r.on("cancel",a.onCancel));h.push(r.on(r.onExecute?"execute":"change",b.hitch(this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()})));k.push({widget:r,wrapper:D,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:h});if(r.onOpen)r.onOpen(n);return n},close:function(a){for(var b=this._stack;a&&p.some(b,
1106function(b){return b.widget==a})||!a&&b.length;){var c=b.pop(),d=c.widget,f=c.onClose;d.bgIframe&&(d.bgIframe.destroy(),delete d.bgIframe);if(d.onClose)d.onClose();for(var k;k=c.handlers.pop();)k.remove();d&&d.domNode&&this.hide(d);f&&f()}0==b.length&&this._aroundMoveListener&&(clearTimeout(this._aroundMoveListener),this._firstAroundNode=this._firstAroundPosition=this._aroundMoveListener=null)}});return k.popup=new a})},"esri/symbols/TextSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../lang ../Color ./Symbol ./Font".split(" "),
1107function(p,n,a,e,l,h,q,g,d){var c={type:"textsymbol",x:0,y:0,text:"",rotated:!1,kerning:!0,color:[0,0,0,1],font:e.defaultFont,angle:0,xoffset:0,yoffset:0,horizontalAlignment:"center"},b={start:"left",middle:"center",end:"right"},f={left:"start",center:"middle",right:"end",justify:"start"},m={top:"text-before-edge",middle:"central",baseline:"alphabetic",bottom:"text-after-edge"},t=document.createElement("canvas");p=p(g,{declaredClass:"esri.symbol.TextSymbol",angle:0,xoffset:0,yoffset:0,constructor:function(a,
1108b,f){n.mixin(this,c);this.font=new d(this.font);this.color=new q(this.color);a&&(n.isObject(a)?(n.mixin(this,a),this.color&&h.isDefined(this.color[0])&&(this.color=q.toDojoColor(this.color)),this.type="textsymbol",this.font=new d(this.font),this.xoffset=e.pt2px(this.xoffset),this.yoffset=e.pt2px(this.yoffset),this.angle&&(this.angle*=-1),this.haloSize&&(this.haloSize=e.pt2px(this.haloSize)),this.haloColor&&(this.haloColor=q.toDojoColor(this.haloColor))):(this.text=a,b&&(this.font=b),f&&(this.color=
1109f)));this.setAlign(this.align||this.getSVGAlign())},setFont:function(a){this.font=a;return this},setSize:function(a){this.font.size=a;return this},setAngle:function(a){this.angle=a;return this},setOffset:function(a,b){this.xoffset=a;this.yoffset=b;return this},setHaloColor:function(a){this.haloColor=a;return this},setHaloSize:function(a){this.haloSize=a;return this},setAlign:function(a){this.align=a;this.setHorizontalAlignment(a&&b[a.toLowerCase()]||"center");return this},setHorizontalAlignment:function(a){this.horizontalAlignment=
1110a;return this},getSVGAlign:function(){var a=this.horizontalAlignment;return a=a&&f[a.toLowerCase()]||"middle"},setVerticalAlignment:function(a){this.verticalAlignment=a;return this},getSVGBaseline:function(){var a=this.verticalAlignment;return a&&m[a.toLowerCase()]||"alphabetic"},getSVGBaselineShift:function(){return"bottom"===this.verticalAlignment?"super":null},setDecoration:function(a){this.decoration=a;this.font||this.setFont(new d);this.font.setDecoration(a);return this},setRotated:function(a){this.rotated=
1111a;return this},setKerning:function(a){this.kerning=a;return this},setText:function(a){this.text=a;return this},getStroke:function(){return null},getFill:function(){return this.color},getWidth:function(){var a=t&&t.getContext&&t.getContext("2d");if(a){var b=this.font;a.font=(b.style?b.style:e.defaultFont.style)+" "+(b.weight?b.weight:e.defaultFont.weight)+" "+(b.size?b.size:e.defaultFont.size)+"px "+(b.family?b.family:e.defaultFont.family);return a.measureText(this.text).width}var a=this.getHeight(),
1112b=0,c,d;for(c=0;c<this.text.length;c++)d=this.text.charAt(c),b=d==d.toUpperCase()?b+0.7*a:b+0.5*a;return b},getHeight:function(){return e.normalizedLength(this.font.size)},getShapeDescriptors:function(){var a=this.font,b;a&&(b={}
1112,a.size&&(b.size=a.size),a.style&&(b.style=a.style),a.variant&&(b.variant=a.variant),a.decoration&&(b.decoration=a.decoration),a.weight&&(b.weight=a.weight),a.family&&(b.family=a.family));return{defaultShape:{type:"text",text:this.text,x:0,y:this.getHeight()/4,align:"middle",
1113decoration:this.decoration||a&&a.decoration,rotated:this.rotated,kerning:this.kerning},font:b,fill:this.getFill(),stroke:this.getStroke()}},toJson:function(){var a=e.px2pt(this.xoffset),b=e.px2pt(this.yoffset),c=e.px2pt(this.haloSize),a=isNaN(a)?void 0:a,b=isNaN(b)?void 0:b,c=isNaN(c)?void 0:c;return h.fixJson(n.mixin(this.inherited("toJson",arguments),{type:"esriTS",backgroundColor:this.backgroundColor,borderLineColor:this.borderLineColor,borderLineSize:this.borderLineSize,haloSize:c,haloColor:this.haloColor&&
1114q.toJsonColor(this.haloColor),verticalAlignment:this.verticalAlignment,horizontalAlignment:this.horizontalAlignment,rightToLeft:this.rightToLeft,width:this.width,angle:this.angle&&-1*this.angle,xoffset:a,yoffset:b,text:this.text,rotated:this.rotated,kerning:this.kerning,font:this.font.toJson()}))}});n.mixin(p,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});p.defaultProps=
1115c;a("extend-esri")&&(n.setObject("symbol.TextSymbol",p,l),l.symbol.defaultTextSymbol=c);return p})},"esri/tasks/StatisticDefinition":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(p,n,a,e){p=p(null,{declaredClass:"esri.tasks.StatisticDefinition",toJson:function(){return{statisticType:this.statisticType,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,
1116maxVertexCount:this.maxVertexCount}}});a("extend-esri")&&n.setObject("tasks.StatisticDefinition",p,e);return p})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m){return n("dojo.dnd.Mover",[d],{constructor:function(d,f,k){function g(a){a.preventDefault();a.stopPropagation()}this.node=h.byId(d);this.marginBox={l:f.pageX,
1117t:f.pageY};this.mouseButton=f.button;f=this.host=k;d=d.ownerDocument;this.events=[c(d,b.move,a.hitch(this,"onFirstMove")),c(d,b.move,a.hitch(this,"onMouseMove")),c(d,b.release,a.hitch(this,"onMouseUp")),c(d,"dragstart",g),c(d.body,"selectstart",g)];m.autoScrollStart(d);if(f&&f.onMoveStart)f.onMoveStart(this)},onMouseMove:function(a){m.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);a.preventDefault();a.stopPropagation()},onMouseUp:function(a){(e("webkit")&&
1118e("mac")&&2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();a.preventDefault();a.stopPropagation()},onFirstMove:function(a){var b=this.node.style,c,d=this.host;switch(b.position){case "relative":case "absolute":c=Math.round(parseFloat(b.left))||0;b=Math.round(parseFloat(b.top))||0;break;default:b.position="absolute";b=q.getMarginBox(this.node);c=l.doc.body;var f=g.getComputedStyle(c),m=q.getMarginBox(c,f),f=q.getContentBox(c,f);c=b.l-(f.l-m.l);b=b.t-(f.t-m.t)}this.marginBox.l=
1119c-this.marginBox.l;this.marginBox.t=b-this.marginBox.t;if(d&&d.onFirstMove)d.onFirstMove(this,a);this.events.shift().remove()},destroy:function(){p.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"esri/fx":function(){define("dojo/_base/connect dojo/_base/fx dojo/_base/lang dojo/dom dojo/dom-geometry dojo/dom-style dojo/fx dojo/has ./kernel".split(" "),function(p,n,a,e,l,h,q,g,d){var c={animateRange:function(b){var c=
1120b.range;return new n.Animation(a.mixin({curve:new n._Line(c.start,c.end)},b))},resize:function(b){var c=b.node=e.byId(b.node),d=b.start,g=b.end;d||(d=l.getMarginBox(c),c=l.getPadBorderExtents(c),d=b.start={left:d.l+c.l,top:d.t+c.t,width:d.w-c.w,height:d.h-c.h});g||(g=b.anchor?b.anchor:{x:d.left,y:d.top},c=b.size,g=b.end={left:d.left-(c.width-d.width)*(g.x-d.left)/d.width,top:d.top-(c.height-d.height)*(g.y-d.top)/d.height,width:c.width,height:c.height});return n.animateProperty(a.mixin({properties:{left:{start:d.left,
1121end:g.left},top:{start:d.top,end:g.top},width:{start:d.width,end:g.width},height:{start:d.height,end:g.height}}},b))},slideTo:function(b){var c=b.node=e.byId(b.node),d=h.getComputedStyle,g=null,s=null,k=function(){return function(){var a="absolute"==c.style.position?"absolute":"relative";g="absolute"==a?c.offsetTop:parseInt(d(c).top)||0;s="absolute"==a?c.offsetLeft:parseInt(d(c).left)||0;"absolute"!=a&&"relative"!=a&&(a=l.position(c,!0),g=a.y,s=a.x,c.style.position="absolute",c.style.top=g+"px",c.style.left=
1122s+"px")}}();k();b=n.animateProperty(a.mixin({properties:{top:{start:g,end:b.top||0},left:{start:s,end:b.left||0}}},b));p.connect(b,"beforeBegin",b,k);return b},flash:function(b){b=a.mixin({end:"#f00",duration:500,count:1},b);b.duration/=2*b.count;var c=e.byId(b.node),d=b.start;d||(d=h.getComputedStyle(c).backgroundColor);var g=b.end,l=[],k=b.count,c={node:c,duration:b.duration};for(b=0;b<k;b++)l.push(n.animateProperty(a.mixin({properties:{backgroundColor:{start:d,end:g}}},c))),l.push(n.animateProperty(a.mixin({properties:{backgroundColor:{start:g,
1123end:d}}},c)));return q.chain(l)}};g("extend-esri")&&a.mixin(a.getObject("fx",!0,d),c);return c})},"esri/Color":function(){define(["dojo/_base/declare","dojo/_base/Color","dojo/has","./kernel"],function(p,n,a,e){p=p([n],{declaredClass:"esri.Color"});p.toJsonColor=function(a){return a&&[a.r,a.g,a.b,1<a.a?a.a:Math.round(255*a.a)]};p.toDojoColor=function(a){return a&&new n([a[0],a[1],a[2],a[3]/255])};var l,h="named blendColors fromRgb fromHex fromArray fromString".split(" ");for(l=0;l<h.length;l++)p[h[l]]=
1124n[h[l]];a("extend-esri")&&(e.Color=p);return p})},"esri/renderer":function(){define("./renderers/Renderer ./renderers/SimpleRenderer ./renderers/UniqueValueRenderer ./renderers/ClassBreaksRenderer ./renderers/TemporalRenderer ./renderers/SymbolAger ./renderers/TimeClassBreaksAger ./renderers/TimeRampAger ./renderers/jsonUtils".split(" "),function(p,n,a,e,l,h,q,g,d){return{Renderer:p,SimpleRenderer:n,UniqueValueRenderer:a,ClassBreaksRenderer:e,TemporalRenderer:l,SymbolAger:h,TimeClassBreaksAger:q,
1125TimeRampAger:g,jsonUtils:d}})}
1125,"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(p,n,a,e,l,h,q,g){g.add("config-bgIframe",g("ie")&&!/IEMobile\/10\.0/.test(navigator.userAgent)||g("trident")&&/Windows NT 6.[01]/.test(navigator.userAgent));var d=new function(){var c=[];this.pop=function(){var b;c.length?(b=c.pop(),b.style.display=""):(9>g("ie")?(b="\x3ciframe src\x3d'"+(a.dojoBlankHtmlUrl||
1126p.toUrl("dojo/resources/blank.html")||'javascript:""')+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e",b=document.createElement(b)):(b=e.create("iframe"),b.src='javascript:""',b.className="dijitBackgroundIframe",b.setAttribute("role","presentation"),l.set(b,"opacity",0.1)),b.tabIndex=-1);return b};this.push=function(a){a.style.display="none";c.push(a)}};n.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(g("config-bgIframe")){var b=
1127this.iframe=d.pop();a.appendChild(b);7>g("ie")||g("quirks")?(this.resize(a),this._conn=q(a,"resize",h.hitch(this,"resize",a))):l.set(b,{width:"100%",height:"100%"})}};h.extend(n.BackgroundIframe,{resize:function(a){this.iframe&&l.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),d.push(this.iframe),delete this.iframe)}});return n.BackgroundIframe})},
1128"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html ../a11yclick".split(" "),function(p,n,a,e,l,h,q,g,d,c){e("dijit-legacy-requires")&&q(0,function(){p(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});q=n("dijit.form.Button"+(e("dojo-bidi")?"_NoBidi":""),[g,d],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",
1129type:"class"},baseClass:"dijitButton",templateString:c,_setValueAttr:"valueNode",_setNameAttr:function(a){this.valueNode&&this.valueNode.setAttribute("name",a)},_fillContent:function(a){if(a&&(!this.params||!("label"in this.params)))if(a=h.trim(a.innerHTML))this.label=a},_setShowLabelAttr:function(b){this.containerNode&&a.toggle(this.containerNode,"dijitDisplayNone",!b);this._set("showLabel",b)},setLabel:function(a){l.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.",
1130"","2.0");this.set("label",a)},_setLabelAttr:function(a){this.inherited(arguments);!this.showLabel&&!("title"in this.params)&&(this.titleNode.title=h.trim(this.containerNode.innerText||this.containerNode.textContent||""))}});e("dojo-bidi")&&(q=n("dijit.form.Button",q,{_setLabelAttr:function(a){this.inherited(arguments);this.titleNode.title&&this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this._setLabelAttr(this.label))}}));
1131return q})},"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(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y){function B(a){return function(b){g[b?
1132"set":"remove"](this.domNode,a,b);this._set(a,b)}}m.add("dijit-legacy-requires",!t.isAsync);m.add("dojo-bidi",!1);m("dijit-legacy-requires")&&r(0,function(){p(["dijit/_base/manager"])});var G={};e=h("dijit._WidgetBase",[u,z],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:B("lang"),dir:"",_setDirAttr:B("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",
1133a)},attributeMap:{},_blankGif:e.blankGif||p.toUrl("dojo/resources/blank.gif"),_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var b=a.prototype,c=a._setterAttrs=[],a=a._onMap={},d;for(d in b.attributeMap)c.push(d);for(d in b)/^on/.test(d)&&(a[d.substring(2).toLowerCase()]=d),/^_set[A-Z](.*)Attr$/.test(d)&&(d=d.charAt(4).toLowerCase()+d.substr(5,d.length-9),(!b.attributeMap||!(d in b.attributeMap))&&c.push(d))}},postscript:function(a,b){this.create(a,b)},create:function(a,b){this._introspect();
1134this.srcNodeRef=q.byId(b);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,s.mixin(this,a));this.postMixInProperties();this.id||(this.id=y.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=v.body(this.ownerDocument);y.add(this);this.buildRendering();
1135var c;if(this.domNode){this._applyAttributes();var d=this.srcNodeRef;d&&(d.parentNode&&this.domNode!==d)&&(d.parentNode.replaceChild(this.domNode,d),c=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();c&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},b;for(b in this.params||{})a[b]=this._get(b);
1135n.forEach(this.constructor._setterAttrs,function(b){if(!(b in a)){var c=this._get(b);c&&this.set(b,c)}},this);for(b in a)this.set(b,a[b])},postMixInProperties:function(){},
1136buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(n.map(a,function(a){return a+"Rtl"})));d.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=!0,n.forEach(this.getChildren(),function(a){!a._started&&(!a._destroyed&&s.isFunction(a.startup))&&(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=
1137!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function b(c){c.destroyRecursive?c.destroyRecursive(a):c.destroy&&c.destroy(a)}this._beingDestroyed=!0;this.uninitialize();n.forEach(this._connects,s.hitch(this,"disconnect"));n.forEach(this._supportingWidgets,b);this.domNode&&n.forEach(y.findWidgets(this.domNode,this.containerNode),b);this.destroyRendering(a);y.remove(this.id);this._destroyed=!0},destroyRendering:function(a){this.bgIframe&&(this.bgIframe.destroy(a),delete this.bgIframe);
1138this.domNode&&(a?g.remove(this.domNode,"widgetId"):c.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||c.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){n.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var b=this.domNode;s.isObject(a)?f.set(b,a):b.style.cssText=b.style.cssText?b.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,b,c){c=3<=
1139arguments.length?c:this.attributeMap[a];n.forEach(s.isArray(c)?c:[c],function(c){var f=this[c.node||c||"domNode"];switch(c.type||"attribute"){case "attribute":s.isFunction(b)&&(b=s.hitch(this,b));c=c.attribute?c.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;f.tagName?g.set(f,c,b):f.set(c,b);break;case "innerText":f.innerHTML="";f.appendChild(this.ownerDocument.createTextNode(b));break;case "innerHTML":f.innerHTML=b;break;case "class":d.replace(f,b,this[a])}},this)},get:function(a){var b=
1140this._getAttrNames(a);return this[b.g]?this[b.g]():this._get(a)},set:function(a,b){if("object"===typeof a){for(var c in a)this.set(c,a[c]);return this}c=this._getAttrNames(a);var d=this[c.s];if(s.isFunction(d))var f=d.apply(this,Array.prototype.slice.call(arguments,1));else{var d=this.focusNode&&!s.isFunction(this.focusNode)?"focusNode":"domNode",k=this[d]&&this[d].tagName,g;if(g=k)if(!(g=G[k])){g=this[d];var m={},e;for(e in g)m[e.toLowerCase()]=!0;g=G[k]=m}e=g;c=a in this.attributeMap?this.attributeMap[a]:
1141c.s in this?this[c.s]:e&&c.l in e&&"function"!=typeof b||/^aria-|^data-|^role$/.test(a)?d:null;null!=c&&this._attrToDom(a,b,c);this._set(a,b)}return f||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var c=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"+c+"Attr",g:"_get"+c+"Attr",l:c.toLowerCase()}},_set:function(a,b){var c=this[a];this[a]=b;if(this._created&&!(c===b||c!==c&&b!==
1142b))this._watchCallbacks&&this._watchCallbacks(a,c,b),this.emit("attrmodified-"+a,{detail:{prevValue:c,newValue:b}})},_get:function(a){return this[a]},emit:function(a,b,c){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 d,f=this["on"+a];f&&(d=f.apply(this,c?c:[b]));this._started&&!this._beingDestroyed&&k.emit(this.domNode,a.toLowerCase(),b);return d},on:function(b,c){var d=this._onMap(b);return d?a.after(this,d,c,
1143!0):this.own(k(this.domNode,b,c))[0]},_onMap:function(a){var b=this.constructor,c=b._onMap;if(!c){var c=b._onMap={},d;for(d in b.prototype)/^on/.test(d)&&(c[d.replace(/^on/,"").toLowerCase()]=d)}return c["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?y.findWidgets(this.containerNode):[]},getParent:function(){return y.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,
1144b,c){return this.own(l.connect(a,b,this,c))[0]},disconnect:function(a){a.remove()},subscribe:function(a,b){return this.own(x.subscribe(a,s.hitch(this,b)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():b.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=f.get(this.domNode,"display")},placeAt:function(a,b){var d=!a.tagName&&y.byId(a);d&&d.addChild&&(!b||"number"===typeof b)?d.addChild(this,b):(d=d&&"domNode"in
1145d?d.containerNode&&!/after|before|replace/.test(b||"")?d.containerNode:d.domNode:q.byId(a,this.ownerDocument),c.place(this.domNode,d,b),!this._started&&(this.getParent()||{})._started&&this.startup());return this},defer:function(a,b){var c=setTimeout(s.hitch(this,function(){c&&(c=null,this._destroyed||s.hitch(this,a)())}),b||0);return{remove:function(){c&&(clearTimeout(c),c=null);return null}}}});m("dojo-bidi")&&e.extend(w);return e})},"esri/geometry/ScreenPoint":function(){define(["dojo/_base/declare",
1146"dojo/_base/lang","dojo/has","../kernel","./Point"],function(p,n,a,e,l){p=p(l,{declaredClass:"esri.geometry.ScreenPoint",verifySR:function(){}});a("extend-esri")&&n.setObject("geometry.ScreenPoint",p,e);return p})},"esri/layers/LayerTimeOptions":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.layers.LayerTimeOptions",constructor:function(a){a&&n.mixin(this,a)},toJson:function(){return l.fixJson({timeDataCumulative:this.timeDataCumulative,
1147timeOffset:this.timeOffset,timeOffsetUnits:this.timeOffsetUnits,useTime:this.useTime})}});a("extend-esri")&&n.setObject("layers.LayerTimeOptions",p,e);return p})},"esri/layers/TrackManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../graphic ../geometry/Polyline ./GraphicsLayer".split(" "),function(p,n,a,e,l,h,q,g){p=p(null,{declaredClass:"esri.layers._TrackManager",constructor:function(a){this.layer=a;this.trackMap={};this.trackLineMap={}},initialize:function(a){this.map=
1148a;var c=this.layer,b=c._getRenderer(),b=b&&b.trackRenderer;if("esriGeometryPoint"===c.geometryType){var f=this.container=new g._GraphicsLayer({id:c.id+"_tracks",_child:!0});f.loaded=!0;f.onLoad(f);f._setMap(a,c._div);f.setRenderer(b)}},addFeatures:function(d){var c=this.trackMap,b=this.layer,f=b._trackIdField,g=[];a.forEach(d,function(b){var d=b.attributes[f];(c[d]=c[d]||[]).push(b);-1===a.indexOf(g,d)&&g.push(d)});var e=b._startTimeField,h=b.objectIdField,k=function(a,b){var c=a.attributes[e],d=
1149b.attributes[e];return c===d?a.attributes[h]<b.attributes[h]?-1:1:c<d?-1:1};a.forEach(g,function(a){c[a].sort(k)})},trimTracks:function(d){function c(a){for(a=b[a]||[];a.length>f;)g.push(a.shift())}var b=this.trackMap,f=this.layer.maximumTrackPoints||0,g=[],e;if(!f)return g;
1149if(d)a.forEach(d,function(a){c(a)});else for(e in b)b.hasOwnProperty(e)&&c(e);return g},drawTracks:function(d){function c(a){var c=g[a],d,k,n;k=b.trackLineMap[a];f.remove(k);delete b.trackLineMap[a];if(!c||2>c.length)return!1;
1150k=[];for(d=c.length-1;0<=d;d--)(n=c[d].geometry)&&k.push([n.x,n.y]);c={};c[l]=a;1<k.length&&(k=new h(new q({paths:[k],spatialReference:e}),null,c),f.add(k),b.trackLineMap[a]=k)}var b=this,f=this.container,g,e,l,k;if(f)if(g=this.trackMap,e=this.map.spatialReference,l=this.layer._trackIdField,d)a.forEach(d,function(a){c(a)});else for(k in g)g.hasOwnProperty(k)&&c(k)},refreshTracks:function(d){function c(a){var c,d;b.drawTracks([a]);if(e&&e.latestObservationRenderer){a=f[a]||[];c=a.length;for(d=0;d<
1151c;d++)g._repaint(a[d],null,!0)}}var b=this,f=this.trackMap,g=this.layer,e=g._getRenderer(),h;if(d)a.forEach(d,function(a){c(a)});else for(h in f)f.hasOwnProperty(h)&&c(h);this.moveLatestToFront()},moveLatestToFront:function(d){a.forEach(this.getLatestObservations(d),function(a){var b=a._shape;b&&b._moveToFront();this._repaint(a,null,!0)},this.layer)},getLatestObservations:function(d){function c(a){a=g[a];return a[a.length-1]}var b=[],f=this.layer._getRenderer(),g=this.trackMap,e;if(!f.latestObservationRenderer)return b;
1152if(d)a.forEach(d,function(a){b.push(c(a))});else for(e in g)g.hasOwnProperty(e)&&b.push(c(e));return b},clearTracks:function(d){var c=this.getLatestObservations(d),b=this.container,f;d?a.forEach(d,function(a){delete this.trackMap[a];b&&(f=this.trackLineMap[a],b.remove(f),delete this.trackLineMap[a])},this):(this.trackMap={},this.trackLineMap={},b&&b.clear());a.forEach(c,function(a){this._repaint(a,null,!0)},this.layer)},isLatestObservation:function(a){var c=this.trackMap[a.attributes[this.layer._trackIdField]];
1153return c?c[c.length-1]===a:!1},destroy:function(){var a=this.container;a&&(a.clear(),a._unsetMap(this.map,this.layer._div));this.map=this.layer=this.trackMap=this.container=null}});e("extend-esri")&&n.setObject("layers._TrackManager",p,l);return p})},"esri/IdentityManagerDialog":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/config dojo/_base/Deferred dojo/_base/lang dojo/has dojo/dom-attr dojo/keys dijit/registry dijit/Dialog ./kernel ./lang ./domUtils ./Credential ./IdentityManagerBase dojo/i18n!./nls/jsapi dojo/query dijit/form/Button dijit/form/ValidationTextBox".split(" "),
1154function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k){n=n([s],{declaredClass:"esri.IdentityManager",_eventMap:{"dialog-cancel":["info"]},constructor:function(a){l.mixin(this,a);this.registerConnectEvents()},_dialogContent:"\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e${info}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e${invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3ctable style\x3d'width: 100%;'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e${lblUser}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"text\", \"class\":\"esriIdUser\", required:true, trim:true, style:\"width: 100%;\", autocapitalize:\"none\", autocorrect:\"off\", spellcheck:false' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e${lblPwd}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"password\", \"class\":\"esriIdPwd\", required:true, style:\"width: 100%;\"' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e${lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e${lblCancel}\x3c/button\x3e\x3c/div\x3e",
1155onDialogCreate:function(){},onDialogCancel:function(){},signIn:function(b,c,d){this._nls||(this._nls=k.identity);this._loginDialog||(this._loginDialog=this.dialog=this._createLoginDialog(),this.onDialogCreate());var f=this._loginDialog,g=d&&d.error,h=d&&d.token,l=new e(function(){f.onCancel()});if(f.open)return b=Error("BUSY"),b.code="IdentityManager.1",b.log=a.isDebug,l.errback(b),l;m.hide(f.errMsg_);g&&(403==g.code&&h)&&(q.set(f.errMsg_,"innerHTML",this._nls.forbidden),m.show(f.errMsg_));f.dfd_=
1156l;f.serverInfo_=c;f.resUrl_=b;f.admin_=d&&d.isAdmin;q.set(f.resLink_,{title:b,innerHTML:"("+(this.getResourceName(b)||this._nls.lblItem)+")"});q.set(f.serverLink_,{title:c.server,innerHTML:(-1!==c.server.toLowerCase().indexOf("arcgis.com")?"ArcGIS Online":c.server)+" "});f.txtPwd_.set("value","");f.show();return l},_createLoginDialog:function(){var k=this._nls,e=f.substitute(k,this._dialogContent),e=f.substitute({resource:"\x3cspan class\x3d'resLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e",
1157server:"\x3cspan class\x3d'serverLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e"},e),h=new c({title:k.title,content:e,"class":"esriSignInDialog",style:"width: 18em;",esriIdMgr_:this,keypressed_:function(a){a.charOrCode===g.ENTER&&this.execute_()},execute_:function(){var a=this.txtUser_.get("value"),d=this.txtPwd_.get("value"),g=this.dfd_,e=this;if(a&&d){this.btnSubmit_.set("label",k.lblSigning);var h=b.id.findCredential(e.resUrl_,a),l=function(b){e.btnSubmit_.set("label",k.lblOk);e.btnSubmit_.set("disabled",
1158!1);m.hide(e.errMsg_);e.hide();c._DialogLevelManager.hide(e);var d=e.serverInfo_;e.dfd_=e.serverInfo_=e.generateDfd_=e.resUrl_=null;var l,s,q=h,n;b&&(l=b.token,s=f.isDefined(b.expires)?Number(b.expires):null,n=!!b.ssl,q?(q.userId=a,q.token=l,q.expires=s,q.validity=b.validity,q.ssl=n,q.creationTime=(new Date).getTime()):q=new t({userId:a,server:d.server,token:l,expires:s,ssl:n,isAdmin:e.admin_,validity:b.validity}));g.callback(q)};h&&!h._enqueued?l():(e.btnSubmit_.set("disabled",!0),e.generateDfd_=
1159b.id.generateToken(this.serverInfo_,{username:a,password:d},{isAdmin:this.admin_}).addCallback(l).addErrback(function(a){e.btnSubmit_.set("disabled",!1);e.generateDfd_=null;e.btnSubmit_.set("label",k.lblOk);q.set(e.errMsg_,"innerHTML",a&&a.code?k.invalidUser:k.noAuthService);m.show(e.errMsg_)}))}},cancel_:function(){h.generateDfd_&&h.generateDfd_.cancel();var b=h.dfd_,d=h.resUrl_,f=h.serverInfo_;h.btnSubmit_.set("disabled",!1);h.dfd_=h.serverInfo_=h.generateDfd_=h.resUrl_=null;m.hide(h.errMsg_);c._DialogLevelManager.hide(h);
1160h.esriIdMgr_.onDialogCancel({resourceUrl:d,serverInfo:f});d=Error("ABORTED");
1160d.code="IdentityManager.2";d.log=a.isDebug;b.errback(d)}}),e=h.domNode;h.txtUser_=d.byNode(p.query(".esriIdUser",e)[0]);h.txtPwd_=d.byNode(p.query(".esriIdPwd",e)[0]);h.btnSubmit_=d.byNode(p.query(".esriIdSubmit",e)[0]);h.btnCancel_=d.byNode(p.query(".esriIdCancel",e)[0]);h.resLink_=p.query(".resLink",e)[0];h.serverLink_=p.query(".serverLink",e)[0];h.errMsg_=p.query(".esriErrorMsg",e)[0];h.connect(h.txtUser_,"onKeyPress",
1161h.keypressed_);h.connect(h.txtPwd_,"onKeyPress",h.keypressed_);h.connect(h.btnSubmit_,"onClick",h.execute_);h.connect(h.btnCancel_,"onClick",h.onCancel);h.connect(h,"onCancel",h.cancel_);return h}});h("extend-esri")&&(b.IdentityManagerDialog=b.IdentityManager=n);return n})},"esri/renderers/TemporalRenderer":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","./Renderer"],function(p,n,a,e,l){p=p(l,{declaredClass:"esri.renderer.TemporalRenderer",constructor:function(a,
1162e,g,d){this.observationRenderer=a;this.latestObservationRenderer=e;this.trackRenderer=g;this.observationAger=d},getSymbol:function(a){var e=a.getLayer(),g=this.getObservationRenderer(a),d=g&&g.getSymbol(a),c=this.observationAger;e.timeInfo&&(e._map.timeExtent&&g===this.observationRenderer&&c&&d)&&(d=c.getAgedSymbol(d,a));return d},getObservationRenderer:function(a){return 0===a.getLayer()._getKind(a)?this.observationRenderer:this.latestObservationRenderer||this.observationRenderer},toJson:function(){var a=
1163{type:"temporal"};a.observationRenderer=this.observationRenderer.toJson();this.latestObservationRenderer&&(a.latestObservationRenderer=this.latestObservationRenderer.toJson());this.trackRenderer&&(a.trackRenderer=this.trackRenderer.toJson());this.observationAger&&(a.observationAger=this.observationAger.toJson());return a}});a("extend-esri")&&n.setObject("renderer.TemporalRenderer",p,e);return p})},"dijit/_base/sniff":function(){define(["dojo/uacss"],function(){})},"dojo/request/iframe":function(){define("module require ./watch ./util ./handlers ../_base/lang ../io-query ../query ../has ../dom ../dom-construct ../_base/window ../NodeList-dom".split(" "),
1164function(p,n,a,e,l,h,q,g,d,c,b,f){function m(a){return!this.isFulfilled()}function t(a){return!!this._finished}function s(a,b){if(!b)try{var c=a.options,d=r.doc(r._frame),f=c.handleAs;if("html"!==f){if("xml"===f)if("html"===d.documentElement.tagName.toLowerCase()){g("a",d.documentElement).orphan();var k=d.documentElement.innerText,k=k.replace(/>\s+</g,"\x3e\x3c");a.text=h.trim(k)}else a.data=d;else a.text=d.getElementsByTagName("textarea")[0].value;l(a)}else a.data=d}catch(e){b=e}b?this.reject(b):
1165this._finished?this.resolve(a):this.reject(Error("Invalid dojo/request/iframe request state"))}function k(a){this._callNext()}function r(b,c,d){var f=e.parseArgs(b,e.deepCreate(v,c),!0);b=f.url;c=f.options;if("GET"!==c.method&&"POST"!==c.method)throw Error(c.method+" not supported by dojo/request/iframe");r._frame||(r._frame=r.create(r._iframeName,x+"();"));b=e.deferred(f,null,m,t,s,k);b._callNext=function(){this._calledNext||(this._calledNext=!0,r._currentDfd=null,r._fireNextRequest())};b._legacy=
1166d;r._dfdQueue.push(b);r._fireNextRequest();a(b);return d?b:b.promise}var u=p.id.replace(/[\/\.\-]/g,"_"),x=u+"_onload";f.global[x]||(f.global[x]=function(){var a=r._currentDfd;if(a){var d=c.byId(a.response.options.form)||a._tmpForm;if(d){for(var f=a._contentToClean,k=0;k<f.length;k++)for(var g=f[k],e=0;e<d.childNodes.length;e++){var m=d.childNodes[e];if(m.name===g){b.destroy(m);break}}a._originalAction&&d.setAttribute("action",a._originalAction);a._originalMethod&&(d.setAttribute("method",a._originalMethod),
1167d.method=a._originalMethod);a._originalTarget&&(d.setAttribute("target",a._originalTarget),d.target=a._originalTarget)}a._tmpForm&&(b.destroy(a._tmpForm),delete a._tmpForm);a._finished=!0}else r._fireNextRequest()});var v={method:"POST"};r.create=function(a,c,k){if(f.global[a])return f.global[a];if(f.global.frames[a])return f.global.frames[a];k||(d("config-useXDomain")&&!d("config-dojoBlankHtmlUrl")&&console.warn("dojo/request/iframe: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set dojoConfig.dojoBlankHtmlUrl to the path on your domain to blank.html"),
1168k=d("config-dojoBlankHtmlUrl")||n.toUrl("dojo/resources/blank.html"));c=b.place('\x3ciframe id\x3d"'+a+'" name\x3d"'+a+'" src\x3d"'+k+'" onload\x3d"'+c+'" style\x3d"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden"\x3e',f.body());return f.global[a]=c};
1168r.doc=function(a){if(a.contentDocument)return a.contentDocument;var b=a.name;if(b){var c=f.doc.getElementsByTagName("iframe");if(a.document&&c[b].contentWindow&&c[b].contentWindow.document)return c[b].contentWindow.document;
1169if(f.doc.frames[b]&&f.doc.frames[b].document)return f.doc.frames[b].document}return null};r.setSrc=function(a,b,c){a=f.global.frames[a.name];a.contentWindow&&(a=a.contentWindow);try{c?a.location.replace(b):a.location=b}catch(d){console.log("dojo/request/iframe.setSrc: ",d)}};r._iframeName=u+"_IoIframe";r._notifyStart=function(){};r._dfdQueue=[];r._currentDfd=null;r._fireNextRequest=function(){var a;try{if(!r._currentDfd&&r._dfdQueue.length){do a=r._currentDfd=r._dfdQueue.shift();while(a&&(a.canceled||
1170a.isCanceled&&a.isCanceled())&&r._dfdQueue.length);if(!a||a.canceled||a.isCanceled&&a.isCanceled())r._currentDfd=null;else{var d=a.response,k=d.options,g=a._contentToClean=[],m=c.byId(k.form),l=e.notify,s=k.data||null,n;!a._legacy&&"POST"===k.method&&!m?m=a._tmpForm=b.create("form",{name:u+"_form",style:{position:"absolute",top:"-1000px",left:"-1000px"}},f.body()):"GET"===k.method&&(m&&-1<d.url.indexOf("?"))&&(n=d.url.slice(d.url.indexOf("?")+1),s=h.mixin(q.queryToObject(n),s));if(m){if(!a._legacy){var p=
1171m;do p=p.parentNode;while(p&&p!==f.doc.documentElement);p||(m.style.position="absolute",m.style.left="-1000px",m.style.top="-1000px",f.body().appendChild(m));m.name||(m.name=u+"_form")}if(s){var p=function(a,c){b.create("input",{type:"hidden",name:a,value:c},m);g.push(a)},t;for(t in s){var v=s[t];if(h.isArray(v)&&1<v.length)for(n=0;n<v.length;n++)p(t,v[n]);else m[t]?m[t].value=v:p(t,v)}}var x=m.getAttributeNode("action"),J=m.getAttributeNode("method"),F=m.getAttributeNode("target");d.url&&(a._originalAction=
1172x?x.value:null,x?x.value=d.url:m.setAttribute("action",d.url));if(a._legacy){if(!J||!J.value)J?J.value=k.method:m.setAttribute("method",k.method)}else a._originalMethod=J?J.value:null,J?J.value=k.method:m.setAttribute("method",k.method);a._originalTarget=F?F.value:null;F?F.value=r._iframeName:m.setAttribute("target",r._iframeName);m.target=r._iframeName;l&&l.emit("send",d,a.promise.cancel);r._notifyStart(d);m.submit()}else k="",d.options.data&&(k=d.options.data,"string"!==typeof k&&(k=q.objectToQuery(k))),
1173p=d.url+(-1<d.url.indexOf("?")?"\x26":"?")+k,l&&l.emit("send",d,a.promise.cancel),r._notifyStart(d),r.setSrc(r._frame,p,!0)}}}catch(K){a.reject(K)}};e.addCommonMethods(r,["GET","POST"]);return r})},"dojox/collections/_base":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array"],function(p,n,a){p=n.getObject("dojox.collections",!0);p.DictionaryEntry=function(a,l){this.key=a;this.value=l;this.valueOf=function(){return this.value};this.toString=function(){return String(this.value)}};
1174p.Iterator=function(e){var l=0;this.element=e[l]||null;this.atEnd=function(){return l>=e.length};this.get=function(){return this.atEnd()?null:this.element=e[l++]};this.map=function(h,l){return a.map(e,h,l)};this.reset=function(){l=0;this.element=e[l]}};p.DictionaryIterator=function(e){var l=[],h={},q;for(q in e)h[q]||l.push(e[q]);var g=0;this.element=l[g]||null;this.atEnd=function(){return g>=l.length};this.get=function(){return this.atEnd()?null:this.element=l[g++]};this.map=function(d,c){return a.map(l,
1175d,c)};this.reset=function(){g=0;this.element=l[g]}};return p})},"esri/layers/SnapshotMode":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../SpatialReference ../tasks/query ./RenderMode".split(" "),function(p,n,a,e,l,h,q){p=p([q],{declaredClass:"esri.layers._SnapshotMode",constructor:function(a){this.featureLayer=a;this.pagination=a.queryPagination;this._featureMap={};this._drawFeatures=n.hitch(this,this._drawFeatures);this._queryErrorHandler=n.hitch(this,this._queryErrorHandler)},
1176startup:function(){this.pagination=this.pagination&&null!=this.featureLayer.maxRecordCount;this.featureLayer._collection?this._applyTimeFilter():this._fetchAll()},propertyChangeHandler:function(a){this._init&&(a?this.featureLayer._collection?console.log("FeatureLayer: layer created by value (from a feature collection) does not support definition expressions and time definitions. Layer id \x3d "+this.featureLayer.id):this._fetchAll():this._applyTimeFilter())},drawFeature:function(a){var d=a.attributes[this.featureLayer.objectIdField];
1177this._addFeatureIIf(d,a);this._incRefCount(d)},resume:function(){this.propertyChangeHandler(0)},refresh:function(){var a=this.featureLayer;a._collection?(a._fireUpdateStart(),a._refresh(!0),a._fireUpdateEnd()):this._fetchAll()},_getRequestId:function(a){return("_"+a.name+a.layerId+a._ulid).replace(/[^a-zA-Z0-9\_]+/g,"_")},_fetchAll:function(){var a=this.featureLayer;!a._collection&&!a.suspended&&(a._fireUpdateStart(),this._clearIIf(),this._sendRequest())},_sendRequest:function(a){var d=this.map,c=
1178this.featureLayer,b=c.getDefinitionExpression(),f=new h;f.outFields=c.getOutFields();f.where=b||"1\x3d1";f.returnGeometry=!0;f.outSpatialReference=new l(d.spatialReference.toJson());f.timeExtent=c.getTimeDefinition();f.maxAllowableOffset=c._maxOffset;f.quantizationParameters=c._quantizationParameters;c._ts&&(f._ts=(new Date).getTime());f.orderByFields=c.supportsAdvancedQueries?c.getOrderByFields():null;f.multipatchOption=c.multipatchOption;this.pagination&&(this._start=f.start=null==a?0:a,f.num=c.maxRecordCount);
1179var e;c._usePatch&&(e=this._getRequestId(c),this._cancelPendingRequest(null,e));c._task.execute(f,this._drawFeatures,this._queryErrorHandler,e)},_drawFeatures:function(a){this._purgeRequests();var d=a.features,c=this.featureLayer,b=c.objectIdField,f,e=d.length,h=a.exceededTransferLimit&&!c._collection,l=c._selectedFeatures,k=c.mode===c.constructor.MODE_AUTO,r,q,n;for(f=0;f<e;f++)q=d[f],n=q.attributes[b],r=this._addFeatureIIf(n,q),this._incRefCount(n),k&&(r!==q&&l[n])&&(r.setGeometry(q.geometry),r.setAttributes(q.attributes));
1180this._applyTimeFilter(!0);if(!this.pagination||!h)c._fireUpdateEnd(null,a.exceededTransferLimit?{queryLimitExceeded:!0}:null);h&&(this.pagination&&this._sendRequest(this._start+c.maxRecordCount),c.onQueryLimitExceeded())},_queryErrorHandler:function(a){this._purgeRequests();var d=this.featureLayer;d._errorHandler(a);d._fireUpdateEnd(a)}});a("extend-esri")&&n.setObject("layers._SnapshotMode",p,e);return p})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(p,n){var a={};n.setObject("dojo.regexp",
1181a);a.escapeString=function(a,l){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(a){return l&&-1!=l.indexOf(a)?a:"\\"+a})};a.buildGroupRE=function(e,l,h){if(!(e instanceof Array))return l(e);for(var q=[],g=0;g<e.length;g++)q.push(l(e[g]));return a.group(q.join("|"),h)};a.group=function(a,l){return"("+(l?"?:":"")+a+")"};return a})},"esri/_time":function(){define(["./TimeExtent"],function(){return{}})},"esri/layers/LayerDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./LayerSource ./TableDataSource ./QueryDataSource ./JoinDataSource ./RasterDataSource".split(" "),
1182function(p,n,a,e,l,h,q,g,d,c){p=p(h,{declaredClass:"esri.layers.LayerDataSource",type:"dataLayer",constructor:function(a){if
1182(a&&a.dataSource){switch(a.dataSource.type){case "table":a=new q(a.dataSource);break;case "queryTable":a=new g(a.dataSource);break;case "joinTable":a=new d(a.dataSource);break;case "raster":a=new c(a.dataSource);break;default:a=a.dataSource}this.dataSource=a}},toJson:function(){var a={type:"dataLayer",dataSource:this.dataSource&&this.dataSource.toJson()};return l.fixJson(a)}});
1183a("extend-esri")&&n.setObject("layers.LayerDataSource",p,e);return p})},"esri/layers/LayerDrawingOptions":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../renderers/jsonUtils ./LabelClass".split(" "),function(p,n,a,e,l,h,q,g){p=p(null,{declaredClass:"esri.layers.LayerDrawingOptions",constructor:function(d){if(d&&(n.mixin(this,d),d.renderer&&(this.renderer=q.fromJson(d.renderer)),d.labelingInfo&&0<d.labelingInfo.length)){this.labelingInfo=[];var c;
1184a.forEach(d.labelingInfo,function(a){c=new g(a);this.labelingInfo.push(c)},this)}},toJson:function(){var d={renderer:this.renderer&&this.renderer.toJson(),transparency:this.transparency,scaleSymbols:this.scaleSymbols,showLabels:this.showLabels};this.labelingInfo&&0<this.labelingInfo.length&&(d.labelingInfo=[],a.forEach(this.labelingInfo,function(a){d.labelingInfo.push(a.toJson())}));return h.fixJson(d)}});e("extend-esri")&&n.setObject("layers.LayerDrawingOptions",p,l);return p})},"esri/renderers/UniqueValueRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../symbols/jsonUtils ./Renderer".split(" "),
1185function(p,n,a,e,l,h,q,g){p=p(g,{declaredClass:"esri.renderer.UniqueValueRenderer",constructor:function(a,c,b,f,e){this.values=[];this._symbols={};this.infos=[];a&&!a.declaredClass?(c=a,this.defaultSymbol=(a=c.defaultSymbol)&&(a.declaredClass?a:q.fromJson(a)),this.attributeField=c.field1,this.attributeField2=c.field2,this.attributeField3=c.field3,this.fieldDelimiter=c.fieldDelimiter,this.defaultLabel=c.defaultLabel,c.backgroundFillSymbol&&(this.backgroundFillSymbol=q.fromJson(c.backgroundFillSymbol)),
1186n.forEach(c.uniqueValueInfos,this._addValueInfo,this)):(this.defaultSymbol=a,this.attributeField=c,this.attributeField2=b,this.attributeField3=f,this.fieldDelimiter=e);this._multiple=!!this.attributeField2},addValue:function(d,c){var b=a.isObject(d)?d:{value:d,symbol:c};this._addValueInfo(b)},removeValue:function(a){var c=n.indexOf(this.values,a);-1!==c&&(this.values.splice(c,1),delete this._symbols[a],this.infos.splice(c,1))},getUniqueValueInfo:function(d){var c=this.attributeField,b=d.attributes,
1187f,e;this._multiple?(d=this.attributeField2,f=this.attributeField3,e=[],c&&e.push(b[c]),d&&e.push(b[d]),f&&e.push(b[f]),c=e.join(this.fieldDelimiter||"")):c=a.isFunction(c)?c(d):b[c];return this._symbols[c]},getSymbol:function(a){return(a=this.getUniqueValueInfo(a))&&a.symbol||this.defaultSymbol},_addValueInfo:function(a){var c=a.value;this.values.push(c);this.infos.push(a);var b=a.symbol;b&&!b.declaredClass&&(a.symbol=q.fromJson(b));this._symbols[c]=a},toJson:function(){var d=h.fixJson,c;c={type:"uniqueValue",
1188field1:this.attributeField,field2:this.attributeField2,field3:this.attributeField3,fieldDelimiter:this.fieldDelimiter,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.toJson(),defaultLabel:this.defaultLabel,uniqueValueInfos:n.map(this.infos||[],function(b){b=a.mixin({},b);b.symbol=b.symbol&&b.symbol.toJson();b.value+="";return d(b)})};this.backgroundFillSymbol&&(c.backgroundFillSymbol=this.backgroundFillSymbol.toJson());c=a.mixin(this.inherited(arguments),c);return d(c)}});e("extend-esri")&&a.setObject("renderer.UniqueValueRenderer",
1189p,l);return p})},"dijit/form/_FormMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),function(p,n,a,e,l,h){return n("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(a){var e=[];p.forEach(a||this.getChildren(),function(a){"value"in a?e.push(a):e=e.concat(this._getDescendantFormWidgets(a.getChildren()))},this);return e},reset:function(){p.forEach(this._getDescendantFormWidgets(),function(a){a.reset&&
1190a.reset()})},validate:function(){var a=!1;return p.every(p.map(this._getDescendantFormWidgets(),function(e){e._hasBeenBlurred=!0;var d=e.disabled||!e.validate||e.validate();!d&&!a&&(h.scrollIntoView(e.containerNode||e.domNode),e.focus(),a=!0);return d}),function(a){return a})},setValues:function(e){a.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",e)},_setValueAttr:function(a){var g={};p.forEach(this._getDescendantFormWidgets(),
1191function(a){a.name&&(g[a.name]||(g[a.name]=[])).push(a)});for(var d in g)if(g.hasOwnProperty(d)){var c=g[d],b=e.getObject(d,!1,a);void 0!==b&&(b=[].concat(b),"boolean"==typeof c[0].checked?p.forEach(c,function(a){a.set("value",-1!=p.indexOf(b,a._get("value")))}
1191):c[0].multiple?c[0].set("value",b):p.forEach(c,function(a,c){a.set("value",b[c])}))}},getValues:function(){a.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a=
1192{};p.forEach(this._getDescendantFormWidgets(),function(g){var d=g.name;if(d&&!g.disabled){var c=g.get("value");"boolean"==typeof g.checked?/Radio/.test(g.declaredClass)?!1!==c?e.setObject(d,c,a):(c=e.getObject(d,!1,a),void 0===c&&e.setObject(d,null,a)):(g=e.getObject(d,!1,a),g||(g=[],e.setObject(d,g,a)),!1!==c&&g.push(c)):(g=e.getObject(d,!1,a),"undefined"!=typeof g?e.isArray(g)?g.push(c):e.setObject(d,[g,c],a):e.setObject(d,c,a))}});return a},isValid:function(){return""==this.state},onValidStateChange:function(){},
1193_getState:function(){var a=p.map(this._descendants,function(a){return a.get("state")||""});return 0<=p.indexOf(a,"Error")?"Error":0<=p.indexOf(a,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(a){this._descendants=this._getDescendantFormWidgets();p.forEach(this._descendants,function(a){a._started||a.startup()});a||this._onChildChange()},_onChildChange:function(a){(!a||"state"==a||"disabled"==a)&&this._set("state",this._getState());if(!a||"value"==a||"disabled"==
1194a||"checked"==a)this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;this._set("value",this.get("value"))},10)},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var a=this;this.own(l(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(e){e.target!=a.domNode&&
1195a._onChildChange(e.type.replace("attrmodified-",""))}));this.watch("state",function(a,d,c){this.onValidStateChange(""==c)})},destroy:function(){this.inherited(arguments)}})})},"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(p,n,a,e,l,h,q,g,d){var c=l.delegate(g,{mouseenter:h.enter,mouseleave:h.leave,keypress:a._keypress}),b;a=e("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=
1196[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var b=a;;)if(1==b.nodeType&&(this._processTemplateNode(b,function(a,b){return a.getAttribute(b)},this._attach)||this.searchContainerNode)&&b.firstChild)b=b.firstChild;else{if(b==a)break;for(;!b.nextSibling;)if(b=b.parentNode,b==a)return;b=b.nextSibling}},_processTemplateNode:function(a,
1197b,c){var d=!0,k=this.attachScope||this,e=b(a,"dojoAttachPoint")||b(a,"data-dojo-attach-point");if(e)for(var g=e.split(/\s*,\s*/);e=g.shift();)l.isArray(k[e])?k[e].push(a):k[e]=a,d="containerNode"!=e,this._attachPoints.push(e);if(b=b(a,"dojoAttachEvent")||b(a,"data-dojo-attach-event")){e=b.split(/\s*,\s*/);for(g=l.trim;b=e.shift();)if(b){var h=null;-1!=b.indexOf(":")?(h=b.split(":"),b=g(h[0]),h=g(h[1])):b=g(b);h||(h=b);this._attachEvents.push(c(a,b,l.hitch(k,h)))}}return d},_attach:function(a,d,e){d=
1198d.replace(/^on/,"").toLowerCase();d="dijitclick"==d?b||(b=p("./a11yclick")):c[d]||d;return q(a,d,e)},_detachTemplateNodes:function(){var a=this.attachScope||this;n.forEach(this._attachPoints,function(b){delete a[b]});this._attachPoints=[];n.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});l.extend(d,{dojoAttachEvent:"",dojoAttachPoint:""});return a})},"esri/ServerInfo":function(){define(["dojo/_base/declare",
1199"dojo/_base/lang","dojo/has","./kernel","./lang"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.ServerInfo",constructor:function(a){n.mixin(this,a)},toJson:function(){return l.fixJson({server:this.server,tokenServiceUrl:this.tokenServiceUrl,adminTokenServiceUrl:this.adminTokenServiceUrl,shortLivedTokenValidity:this.shortLivedTokenValidity,owningSystemUrl:this.owningSystemUrl,owningTenant:this.owningTenant,currentVersion:this.currentVersion,hasPortal:this.hasPortal,hasServer:this.hasServer,webTierAuth:this.webTierAuth})}});
1200a("extend-esri")&&(e.ServerInfo=p);return p})},"esri/Evented":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Evented dojo/has ./kernel".split(" "),function(p,n,a,e,l,h){p=p([e],{declaredClass:"esri.Evented",registerConnectEvents:function(){var a=this.constructor,e=this.constructor._meta.parents,d=[{}],c={}
1200,b,f,m=function(a,b){n.isArray(a)||(a=[a]);for(var c=0;c<a.length;c++){var d=a[c];d._meta&&d._meta.parents&&m(d._meta.parents,b);d.prototype._eventMap&&b.push(n.mixin({},
1201d.prototype._eventMap))}return b};if(!a._onMap){m(e,d);d.push(this._eventMap);e=n.mixin.apply(this,d);for(b in this)/^on\w/.test(b)&&n.isFunction(this[b])&&(d=this._hyphenLower(b).toLowerCase(),e[d]||(c[d]={method:b}));for(f in e)b=this._onCamelCase(f),c[f]={method:b,argKeys:e[f]};a._onMap=c;return a._onMap}},on:function(e,g){if(-1<e.indexOf(",")){for(var d=e.split(/\s*,\s*/),c=d.length,b=[];c--;)b.push(this.on(d[c],g));b.remove=function(){for(var a=0;a<b.length;a++)b[a].remove()};return b}var d=
1202this.constructor._onMap||this.registerConnectEvents(),c="string"==typeof e&&e.toLowerCase(),f=this._onCamelCase(c),m=d&&d[c];return(f=m&&m.method||this[f]&&n.isFunction(this[f])&&f)?m&&n.isArray(m.argKeys)?(d=this._onArr2Obj(g,d[c].argKeys),a.after(this,f,d,!0)):a.after(this,f,function(a){a=a||{};a.target||(a.target=this);g.call(this,a)},!0):this.inherited(arguments)},emit:function(a,e){var d,c,b,f,m=a.toLowerCase();f=this._onCamelCase(a);var h=this.constructor._onMap||this.registerConnectEvents();
1203f=(b=h&&h[m]&&h[m].method||n.isFunction(this[f])&&f)&&this[b];b&&(h&&h[m])&&this._onObj2Arr(function(){c=Array.prototype.slice.call(arguments)},h[m].argKeys)(e);e=e||{};e.target||(e.target=this);f&&(d=c&&c.length?c:[e],d=f.apply(this,d));this.inherited(arguments,[a,e]);return d},_onObj2Arr:function(a,e){if(e){var d=this;return function(c){var b,f=[],m=e.length;for(b=0;b<m;b++)f[b]=c[e[b]];a.apply(d,f)}}return a},_onArr2Obj:function(a,e){if(e){var d=this;return function(){var c,b={},f=arguments.length;
1204for(c=0;c<f;c++)b[e[c]]=arguments[c];b.target||(b.target=d);a.call(d,b)}}return a},_hyphenLower:function(a){return a.replace(/^on/,"").replace(/[A-Z](?=[a-z])/g,function(a,d){return(d?"-":"")+a.toLowerCase()})},_onCamelCase:function(a){return"on"+a.substr(0,1).toUpperCase()+a.substr(1).replace(/\-([a-z])/g,function(a,d){return d.toUpperCase()})}});l("extend-esri")&&(h.Evented=p);return p})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/i18n!../nls/loading dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when".split(" "),
1205function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r){return c("dijit.layout.ContentPane",[a,e,l],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:p._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",
1206isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(a,b,c){var d=new c(a,b);return!d.href&&d._contentSetter&&d._contentSetter.parseDeferred&&!d._contentSetter.parseDeferred.isFulfilled()?d._contentSetter.parseDeferred.then(function(){return d}):d},create:function(a,b){if((!a||!a.template)&&b&&!("href"in a)&&!("content"in a)){b=f.byId(b);for(var c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);
1207a=n.delegate(a,{content:c})}this.inherited(arguments,[a,b])},postMixInProperties:function(){this.inherited(arguments);var a=k.getLocalization("dijit","loading",this.lang);this.loadingMessage=h.substitute(this.loadingMessage,a);this.errorMessage=h.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&d.forEach(this._contentSetter.parseResults,
1208function(a){!a._started&&(!a._destroyed&&n.isFunction(a.startup))&&(a.startup(),a._started=!0)},this)},_startChildren:function(){d.forEach(this.getChildren(),function(a){!a._started&&(!a._destroyed&&n.isFunction(a.startup))&&(a.startup(),a._started=!0)});this._contentSetter&&d.forEach(this._contentSetter.parseResults,function(a){!a._started&&(!a._destroyed&&n.isFunction(a.startup))&&(a.startup(),a._started=!0)},this)},setHref:function(a){p.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.",
1209"","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new b(n.hitch(this,"cancel"));this.onLoadDeferred.then(n.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){p.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href",
1210"");this.cancel();this.onLoadDeferred=new b(n.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(n.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||
1211this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new b(n.hitch(this,"cancel"));this.onLoadDeferred.then(n.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};
1212n.isObject(this.ioArgs)&&n.mixin(b,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||s.get)(b),d;c.then(function(b){d=b;
1212try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(c){a._onError("Content",c)}},function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return d});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(b){console.error("Error "+this.widgetId+
1213" running custom onLoad code: "+b.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var b=this._contentSetter;d.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});b&&(d.forEach(b.parseResults,function(b){b._destroyed||(b.destroyRecursive?
1214b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0)}),delete b.parseResults);a||t.empty(this.containerNode);delete this._singleChild},_setContent:function(a,b){this.destroyDescendants();var c=this._contentSetter;c&&c instanceof q._ContentSetter||(c=this._contentSetter=new q._ContentSetter({node:this.containerNode,_onError:n.hitch(this,this._onError),onContentError:n.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(b){console.error("Fatal "+this.id+
1215" could not change content due to "+b.message,b)}})}));var d=n.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),d=c.set(n.isObject(a)&&a.domNode?a.domNode:a,d),f=this;return r(d&&d.then?d:c.parseDeferred,function(){delete f._contentSetterParams;b||(f._started&&(f._startChildren(),f._scheduleLayout()),f._onLoadHandler(a))})},
1216_onError:function(a,b,c){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"esri/PopupBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Color dojo/_base/Deferred dojo/has ./kernel ./graphic ./geometry/Point ./geometry/jsonUtils ./geometry/mathUtils ./geometry/webMercatorUtils ./symbols/SimpleMarkerSymbol ./symbols/SimpleLineSymbol ./symbols/CartographicLineSymbol ./symbols/SimpleFillSymbol ./tasks/query ./Evented dojo/has!extend-esri?./PopupInfo".split(" "),
1217function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u){function x(a){return"sizeInfo"===a.type}p=p(u,{declaredClass:"esri.PopupBase",_featureLayers:{},_updateEndHandles:[],_evtMap:{"set-features":!0,"clear-features":!0,"selection-change":!0,"dfd-complete":!0},onSetFeatures:function(){},onClearFeatures:function(){},onSelectionChange:function(){},onDfdComplete:function(){},initialize:function(){this.count=0;this.selectedIndex=-1;this.on("clear-features",n.hitch(this,this._resetUpdateEndListeners));this.on("dfd-complete",
1218n.hitch(this,this._processFeatures));this.on("set-features",n.hitch(this,this._processFeatures))},cleanup:function(){this.features=this.deferreds=null;this._resetUpdateEndListeners()},setFeatures:function(b){if(b&&b.length){this.clearFeatures();var c,d;b[0]instanceof l?d=b:c=b;c?this._updateFeatures(null,c):(this.deferreds=d,d=d.slice(0),a.forEach(d,function(a){a.addBoth(n.hitch(this,this._updateFeatures,a))},this))}},clearFeatures:function(){this.features=this.deferreds=this._marked=null;this.count=
12190;var a=this.selectedIndex;this.selectedIndex=-1;if(-1<a)this.onSelectionChange();this.onClearFeatures()},getSelectedFeature:function(){var a=this.features;if(a)return a[this.selectedIndex]},select:function(a){0>a||a>=this.count||(this.selectedIndex=a,this.onSelectionChange())},enableHighlight:function(a){this._highlighted=a.graphics.add(new g(new d(0,0,a.spatialReference)));this._highlighted.hide();this.markerSymbol||(a=this.markerSymbol=new m,a.setStyle(m.STYLE_TARGET),a._setDim(16,16,0),a.setOutline(new s(t.STYLE_SOLID,
1220new e([0,255,255]),2,s.CAP_ROUND,s.JOIN_ROUND)),a.setColor(new e([0,0,0,0])));this.lineSymbol||(this.lineSymbol=new t(t.STYLE_SOLID,new e([0,255,255]),2));this.fillSymbol||(this.fillSymbol=new k(k.STYLE_NULL,new t(t.STYLE_SOLID,new e([0,255,255]),2),new e([0,0,0,0])))},disableHighlight:function(a){var b=this._highlighted;b&&(b.hide(),a.graphics.remove(b),delete this._highlighted);this.markerSymbol=this.lineSymbol=this.fillSymbol=null},showHighlight:function(){var a=this.features&&this.features[this.selectedIndex];
1221this._highlighted&&(a&&a.geometry)&&this._highlighted.show()},hideHighlight:function(){this._highlighted&&this._highlighted.hide()},updateHighlight:function(a,b){var d=b.geometry,f=this._highlighted;if(!d||!f)f&&f.hide();else{f.hide();!f._graphicsLayer&&a&&a.graphics.add(f);f.setGeometry(c.fromJson(d.toJson()));var k;switch(d.type){case "point":case "multipoint":var e=b.getLayer(),d=b.symbol||e&&e._getSymbol(b);if(e&&d){var g,m,h=0,r=0,l=0;k=!b.symbol?e._getRenderer(b):null;if(e=this._getSizeInfo(k))g=
1222m=k.getSize(b,{sizeInfo:e,shape:d.style,resolution:a&&a.getResolutionInMeters&&a.getResolutionInMeters()});else switch(d.type){case "simplemarkersymbol":g=m=d.size||0;break;case "picturemarkersymbol":g=d.width||0,m=d.height||0}h=d.xoffset||0;r=d.yoffset||0;l=d.angle||0;k=this.markerSymbol;k.setOffset(0,0);k.setAngle(0);g&&m&&k._setDim(g+1,m+1,0);k.setOffset(h,r);k.setAngle(l)}break;case "polyline":k=this.lineSymbol;break;case "polygon":k=this.fillSymbol}f.setSymbol(k)}},showClosestFirst:function(a){var c=
1223this.features;if(c&&c.length){if(1<c.length){var d,k=Infinity,e=-1,g,m=b.getLength,h,r=a.spatialReference,l,s;a=a.normalize();for(d=c.length-1;0<=d;d--)if(g=c[d].geometry){l=g.spatialReference;h=0;try{s="point"===g.type?g:g.getExtent().getCenter(),s=s.normalize(),r&&(l&&!r.equals(l)&&r._canProject(l))&&(s=r.isWebMercator()?f.geographicToWebMercator(s):f.webMercatorToGeographic(s)),h=m(a,s)}catch(n){}0<h&&h<k&&(k=h,e=d)}0<e&&(c.splice(0,0,c.splice(e,1)[0]),this.select(0))}}else this.deferreds&&(this._marked=
1224a)},_unbind:function(b){b=a.indexOf(this.deferreds,b);
1224if(-1!==b)return this.deferreds.splice(b,1),!this.deferreds.length?(this.deferreds=null,2):1},_fireComplete:function(a){var b=this._marked;b&&(this._marked=null,this.showClosestFirst(b));this.onDfdComplete(a)},_updateFeatures:function(b,c){if(b){if(this.deferreds){var d=this._unbind(b);if(d)if(c&&c instanceof Error){if(this._fireComplete(c),2===d)this.onSetFeatures()}else if(c&&c.length)if(this.features){var f=a.filter(c,function(b){return-1===
1225a.indexOf(this.features,b)},this);this.features=this.features.concat(f);this.count=this.features.length;this._fireComplete();if(2===d)this.onSetFeatures()}else{this.features=c;this.count=c.length;this.selectedIndex=0;this._fireComplete();if(2===d)this.onSetFeatures();this.select(0)}else if(this._fireComplete(),2===d)this.onSetFeatures()}}else this.features=c,this.count=c.length,this.selectedIndex=0,this.onSetFeatures(),this.select(0)},_getSizeInfo:function(b){return b?b.sizeInfo||a.filter(b.visualVariables,
1226x)[0]:null},_resetUpdateEndListeners:function(){this._featureLayers={};a.forEach(this._updateEndHandles,function(a){a.remove()});this._updateEndHandles=[]},_processFeatures:function(){a.forEach(this.features,function(a){if((a=a.getLayer())&&!this._featureLayers[a.id]&&(1===a.currentMode||0===a.currentMode&&6===a.mode)&&a.objectIdField&&a.hasXYFootprint&&a.queryFeatures&&("esriGeometryPolygon"===a.geometryType||"esriGeometryPolyline"===a.geometryType||a.hasXYFootprint()))this._featureLayers[a.id]=
1227a,a=a.on("update-end",n.hitch(this,this._fLyrUpdateEndHandler)),this._updateEndHandles.push(a)},this)},_fLyrUpdateEndHandler:function(b){if(!b.error){var c=this,d=b.target,f=d.getSelectedFeatures(),k=0===d.currentMode&&6===d.mode,e={},g=[];a.forEach(this.features,function(a){if(a.getLayer()===d){var b=a.attributes[d.objectIdField];e[b]=a;g.push(b)}});g.length&&(b=new r,b.objectIds=g,d.queryFeatures(b,function(b){a.forEach(b.features,function(b){var c=e[b.attributes[d.objectIdField]],g=!1;c.geometry!==
1228b.geometry?(c.setGeometry(b.geometry),g=!0):k&&(f&&-1!==a.indexOf(f,b))&&(g=!0);g&&(this._highlighted&&c===this.getSelectedFeature())&&this._highlighted.setGeometry(b.geometry)},c)}))}}});h("extend-esri")&&(q.PopupBase=p);return p})},"esri/TouchEvents":function(){define("dojo/_base/declare dojo/_base/html dojo/_base/lang dojo/_base/sniff dojo/dom ./kernel ./Evented ./geometry/Point ./geometry/ScreenPoint".split(" "),function(p,n,a,e,l,h,q,g,d){p=p([q],{declaredClass:"esri.TouchEvents",tapRadius:8,
1229doubleTapRadius:10,tapStartTolerance:50,doubleTapDuration:300,map:null,constructor:function(c,b){this.node=c;a.mixin(this,b);n.setSelectable(c,!1);this._touchStart=a.hitch(this,this._touchStart);this._touchMove=a.hitch(this,this._touchMove);this._touchEnd=a.hitch(this,this._touchEnd);this._touchCancel=a.hitch(this,this._touchCancel);c.addEventListener("touchstart",this._touchStart,!1);c.addEventListener("touchmove",this._touchMove,!1);c.addEventListener("touchend",this._touchEnd,!1);c.addEventListener("touchcancel",
1230this._touchCancel,!1);this.map&&e("ios")&&(this._mouseOver=a.hitch(this,this._mouseOver),this._mouseOut=a.hitch(this,this._mouseOut),this._mouseDown=a.hitch(this,this._mouseDown),this._mouseUp=a.hitch(this,this._mouseUp),this._mouseClick=a.hitch(this,this._mouseClick),c.addEventListener("mouseover",this._mouseOver,!1),c.addEventListener("mouseout",this._mouseOut,!1),c.addEventListener("mousedown",this._mouseDown,!1),c.addEventListener("mouseup",this._mouseUp,!1),c.addEventListener("click",this._mouseClick,
1231!1));this._numTouches=0;this._nodeTouches=[];this._touches={};this._touchIds=[];this._taps=[];this._immediate=!1},_touchStart:function(a){var b=this._touches,d,g=a.changedTouches.length,h,l,k,r,n=(new Date).getTime();if(!e("android")||!e("safari")||!(1===a.targetTouches.length&&a.touches.length===a.targetTouches.length&&a.targetTouches.length===a.changedTouches.length&&0===a.changedTouches[0].identifier&&b[a.changedTouches[0].identifier])){this._addTouch(a);for(d=0;d<g;d++)h=a.changedTouches[d],l=
1232b[h.identifier]={},l.startX=h.pageX,l.startY=h.pageY,l.startTS=n,-1===this._touchIds.indexOf(h.identifier)&&this._touchIds.push(h.identifier);this._swipeActive&&(k=this._nodeTouches[0]);this._pinchActive&&(r=this._nodeTouches[1]);1===this._numTouches?this._swipeActive?(this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,k))):this._pinchActive&&(this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(a,[k,r]))):2===this._numTouches?this._swipeActive&&(k&&(l=b[this._touchIds[0]],
1233l.startX=k.pageX,l.startY=k.pageY,l.moved=!1),this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,k))):this._swipeActive?(this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,k))):this._pinchActive&&(this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(a,[k,r])))}},_touchMove:function(a){a.preventDefault();this._updateTouch(a);var b=this._touches,d,g=a.changedTouches.length,h,l,k,r;if(!e("android")||!e("safari")||!(1===a.targetTouches.length&&a.touches.length===
1234a.targetTouches.length&&a.targetTouches.length===a.changedTouches.length&&0===a.changedTouches[0].identifier&&b[a.changedTouches[0].identifier]&&1<this._touchIds.length)){for(d=0;d<g;d++)if(h=a.changedTouches[d],l=b[h.identifier]){k=Math.abs(h.pageX-l.startX);h=Math.abs(h.pageY-l.startY);if(!l.moved&&(k>=this.tapRadius||h>=this.tapRadius))l.moved=l.absMoved=!0;r=r?r:l.moved}1===this._numTouches?(d=a.changedTouches[0],this._swipeActive?this._fire("onSwipeMove",this._processTouchEvent(a,d)):r&&(this._swipeActive=
1235!0,this._fire("onSwipeStart",this._processTouchEvent(a,d)))):2===this._numTouches&&(d=this._nodeTouches[0],g=this._nodeTouches[1],this._pinchActive?this._fire("onPinchMove",this._processTouchEvent(a,[d,g])):r&&(r=b[d.identifier],l=b[g.identifier],b=Math.abs(r.startX-l.startX),r=Math.abs(r.startY-l.startY),b=Math.sqrt(b*b+r*r),r=Math.abs(d.pageX-g.pageX),l=Math.abs(d.pageY-g.pageY),r=Math.sqrt(r*r+l*l),Math.abs(r-b)>=2*this.tapRadius&&(this._pinchActive=!0,this._fire("onPinchStart",this._processTouchEvent(a,
1236[d,g])))))}},_touchEnd:function(a){this._removeTouch(a);var b=this._touches,d=a.changedTouches,e,g=d.length,h,k,r=(new Date).getTime(),l=this._touchIds;for(e=0;e<g;e++)if(k=b[d[e].identifier])k.absMoved&&(h=!0),k.pageX=d[e].pageX,k.pageY=d[e].pageY,k.endTS=r;if(0===this._numTouches)if(this._touches={},this._touchIds=[],this._swipeActive)this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,d[0]));else if(this._pinchActive)this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(a,
1237d));else{if(!h){g=Infinity;h=-Infinity;var r=Infinity,n=-Infinity,q=this.tapStartTolerance,p=[],w=!0;for(e=0;e<l.length;e++)k=b[l[e]],p.push(k),k.startTS<g&&(g=k.startTS),k.startTS>h&&(h=k.startTS),k.endTS<r&&(r=k.endTS),k.endTS>n&&(n=k.endTS),delete b[l[e]];if(1===p.length&&d[0]&&(b=Math.abs(d[0].pageX-p[0].startX),d=Math.abs(d[0].pageY-p[0].startY),b>=this.tapRadius||d>=this.tapRadius))w=!1;w&&(Math.abs(h-g)<=q&&Math.abs(n-r)<=q)&&this._basicTap(a,p)}}else 1===this._numTouches&&this._pinchActive&&
1238(e=this._nodeTouches[0],k=b[e.identifier],k.startX=e.pageX,k.startY=e.pageY,this._pinchActive=k.moved=!1,this._fire("onPinchEnd",this._processTouchEvent(a,[d[0],e])))},_touchCancel:function(a){this._numTouches&&this._touchEnd(a)},_basicTap:function(a,b){var d=(new Date).getTime(),e=this;a=this._processTouchEvent(a,b);this._taps.push({touchInfos:b,ts:d,event:a});2<this._taps.length&&this._taps.shift();this._fire("onBasicTap",a);clearTimeout(this._tapTimer);this._immediate?this._analyzeTap(!0):this._tapTimer=
1239setTimeout(function(){var a=e;e=null;clearTimeout(a._tapTimer);a._analyzeTap()},2===this._taps.length?this.doubleTapDuration/2:this.doubleTapDuration)},_analyzeTap:function(a){var b=this._taps,d=b[0],e=b[1],g=d.touchInfos,h=e&&e.touchInfos;
1239b.length&&(a||(this._taps=[]),d&&e?g.length===h.length?e.ts-d.ts<=this.doubleTapDuration?(1===g.length?(a=Math.abs(g[0].startX-h[0].startX),g=Math.abs(g[0].startY-h[0].startY),g=a<=this.doubleTapRadius&&g<=this.doubleTapRadius):g=!0,g?this._processedDoubleTap(b):
1240this._processedTap(e)):this._processedTap(e):this._processedTap(e):this._processedTap(d||e))},_processedTap:function(a){var b=a.event;this._fire("onProcessedTap",b);1===a.touchInfos.length?this._fire("onTap",this._fixEvent(b)):2===a.touchInfos.length&&this._fire("onTwoFingerTap",b)},_processedDoubleTap:function(a){var b=1===a[1].touchInfos.length,d;b&&(d=[this._fixEvent(a[0].event),this._fixEvent(a[1].event)],d[1].relatedEvents=d);a=[a[0].event,a[1].event];a[1].relatedEvents=a;this._fire("onProcessedDoubleTap",
1241a[1]);b&&(this._fire("onDoubleTap",d[1]),this._fire("onDblClick",d[1]))},_addTouch:function(a){var b=a.changedTouches,d=this._nodeTouches,e,g,h;this._numTouches+=b.length;for(a=0;a<b.length;a++){g=d.length;h=!1;for(e=0;e<g&&!(h=d[e].identifier===b[a].identifier);e++);h?this._numTouches--:d.push(b[a])}for(a=d.length-1;0<=a;a--)l.isDescendant(d[a].target,document.body)||(d.splice(a,1),this._numTouches--);0>this._numTouches&&(this._numTouches=0)},_removeTouch:function(a){var b=[],d=[],e=a.changedTouches,
1242g=this._nodeTouches;this._numTouches-=e.length;0>this._numTouches&&(this._numTouches=0);for(a=0;a<e.length;a++)b.push(e[a].identifier);for(a=g.length-1;0<=a;a--)-1!==b.indexOf(g[a].identifier)&&d.push(g.splice(a,1)[0]);return d},_updateTouch:function(a){var b=[],d,e=a.changedTouches,g=this._nodeTouches;for(a=0;a<e.length;a++)b.push(e[a].identifier);for(a=0;a<g.length;a++)d=b.indexOf(g[a].identifier),-1!==d&&g.splice(a,1,e[d])},_mouseOver:function(a){this._fire("onMouseOver",this._processMouseEvent(a))},
1243_mouseOut:function(a){this._fire("onMouseOut",this._processMouseEvent(a))},_mouseDown:function(a){this._fire("onMouseDown",this._processMouseEvent(a))},_mouseUp:function(a){this._fire("onMouseUp",this._processMouseEvent(a))},_mouseClick:function(a){this._fire("onClick",this._processMouseEvent(a))},_fire:function(a,b){if("onDblClick"===a&&this.mouseEvents){this.mouseEvents.preventClickEvents(!0);var d=this;setTimeout(function(){d.mouseEvents.preventClickEvents(!1)},350)}if(this[a])this[a](b);if(this.map&&
1244this.map[a])this.map[a](b)},_fixEvent:function(a){var b={},d;for(d in a)b[d]=a[d];this.map&&(b.screenPoint=b.screenPoints[0],b.mapPoint=b.mapPoints[0]);return b},_processTouchEvent:function(c,b){var f=this.map,e=f&&f.position,h=0;if(e&&b)if(a.isArray(b)){var l,k;c.screenPoints=[];c.mapPoints=[];for(l=0;l<b.length;l++)b[l]?(k=new d(b[l].pageX-e.x,b[l].pageY-e.y),c.screenPoints.push(k),c.mapPoints.push(f.extent?f.toMap(k):new g)):h++}else c.screenPoint=new d(b.pageX-e.x,b.pageY-e.y),c.mapPoint=f.extent?
1245f.toMap(c.screenPoint):new g;c.numPoints=b?a.isArray(b)?b.length-h:1:0;return c},_processMouseEvent:function(a){var b=this.map,f=b&&b.position;f&&(a.screenPoint=new d(a.pageX-f.x,a.pageY-f.y),a.mapPoint=b.extent?b.toMap(a.screenPoint):new g);return a},setImmediateTap:function(a){this._immediate=a},destroy:function(){var a=this.node;a.removeEventListener("touchstart",this._touchStart,!1);a.removeEventListener("touchmove",this._touchMove,!1);a.removeEventListener("touchend",this._touchEnd,!1);a.removeEventListener("touchcancel",
1246this._touchCancel,!1);this.map&&(a.removeEventListener("mouseover",this._mouseOver,!1),a.removeEventListener("mouseout",this._mouseOut,!1),a.removeEventListener("mousedown",this._mouseDown,!1),a.removeEventListener("mouseup",this._mouseUp,!1),a.removeEventListener("click",this._mouseClick,!1));n.setSelectable(a,!0);clearTimeout(this._tapTimer);this.node=this.map=this._numTouches=this._nodeTouches=this._touches=this._touchIds=this._taps=null}});e("extend-esri")&&(h.TouchEvents=p);return p})},"esri/tasks/GeometryService":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/_base/Deferred dojo/has ../kernel ../request ../deferredUtils ./Task ../geometry/Extent ../geometry/Polyline ../geometry/Polygon ../geometry/Multipoint ../geometry/jsonUtils".split(" "),
1247function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s){p=p(c,{declaredClass:"esri.tasks.GeometryService",_eventMap:{"areas-and-lengths-complete":["result"],"auto-complete-complete":["geometries"],"buffer-complete":["geometries"],"convex-hull-complete":["geometry"],"cut-complete":["result"],"densify-complete":["geometries"],"difference-complete":["geometries"],"distance-complete":["distance"],"generalize-complete":["geometries"],"intersect-complete":["geometries"],"label-points-complete":["geometries"],"lengths-complete":["result"],
1248"offset-complete":["geometries"],"project-complete":["geometries"],"relation-complete":["relations"],"reshape-complete":["geometry"],"simplify-complete":["geometries"],"trim-extend-complete":["geometries"],"union-complete":["geometry"]}
1248,constructor:function(a){a=n.hitch;this._projectHandler=a(this,this._projectHandler);this._simplifyHandler=a(this,this._simplifyHandler);this._bufferHandler=a(this,this._bufferHandler);this._areasAndLengthsHandler=a(this,this._areasAndLengthsHandler);this._lengthsHandler=
1249a(this,this._lengthsHandler);this._labelPointsHandler=a(this,this._labelPointsHandler);this._relationHandler=a(this,this._relationHandler);this._convexHullHandler=a(this,this._convexHullHandler);this._unionHandler=a(this,this._unionHandler);this._autoCompleteHandler=a(this,this._autoCompleteHandler);this._reshapeHandler=a(this,this._reshapeHandler);this._cutHandler=a(this,this._cutHandler);this._intersectHandler=a(this,this._intersectHandler);this._differenceHandler=a(this,this._differenceHandler);
1250this._trimExtendHandler=a(this,this._trimExtendHandler);this._densifyHandler=a(this,this._densifyHandler);this._generalizeHandler=a(this,this._densifyHandler);this._offsetHandler=a(this,this._offsetHandler);this._distanceHandler=a(this,this._distanceHandler);this._toGeoCoordinateHandler=a(this,this._toGeoCoordinateHandler);this._fromGeoCoordinateHandler=a(this,this._fromGeoCoordinateHandler);this.registerConnectEvents()},_encodeGeometries:function(a){var b=[],c,d=a.length;for(c=0;c<d;c++)b.push(a[c].toJson());
1251return{geometryType:s.getJsonType(a[0]),geometries:b}},_decodeGeometries:function(b,c,d){var f=s.getGeometryType(c);b=b.geometries;var e=[],g={spatialReference:d.toJson()},m=n.mixin;a.forEach(b,function(a,b){e[b]=new f(m(a,g))});return e},_toProjectGeometry:function(a){var c=a.spatialReference.toJson();return a instanceof b?new m({rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]],spatialReference:c}):new f({paths:[[].concat(a.points)],spatialReference:c})},
1252_fromProjectedGeometry:function(a,c,d){return"esriGeometryEnvelope"===c?(a=a.rings[0],new b(a[0][0],a[0][1],a[2][0],a[2][1],d)):new t({points:a.paths[0],spatialReference:d.toJson()})},project:function(a,b,c,f){var m=n.mixin({},this._url.query,{f:"json"}),h;a.geometries?(f=c,c=b,b=a.outSR,h=a.geometries[0],m=n.mixin(m,a.toJson())):(h=a[0],m=n.mixin(m,{outSR:b.wkid||e.toJson(b.toJson()),inSR:h.spatialReference.wkid||e.toJson(h.spatialReference.toJson()),geometries:e.toJson(this._encodeGeometries(a))}));
1253var q=s.getJsonType(h),p=this._projectHandler,t=this._errorHandler,G=new l(d._dfdCanceller);G._pendingDfd=g({url:this._url.path+"/project",content:m,callbackParamName:"callback",load:function(a,d){p(a,d,q,b,c,f,G)},error:function(a){t(a,f,G)}});return G},_projectHandler:function(a,b,c,d,f,e,g){try{var m=this._decodeGeometries(a,c,d);this._successHandler([m],"onProjectComplete",f,g)}catch(h){this._errorHandler(h,e,g)}},onProjectComplete:function(){},simplify:function(a,b,c){var f=a[0].spatialReference,
1254m=n.mixin({},this._url.query,{f:"json",sr:f.wkid?f.wkid:e.toJson(f.toJson()),geometries:e.toJson(this._encodeGeometries(a))}),h=s.getJsonType(a[0]),q=this._simplifyHandler,p=this._errorHandler,t=new l(d._dfdCanceller);t._pendingDfd=g({url:this._url.path+"/simplify",content:m,callbackParamName:"callback",load:function(a,d){q(a,d,h,f,b,c,t)},error:function(a){p(a,c,t)}});return t},_simplifyHandler:function(a,b,c,d,f,e,g){try{var m=this._decodeGeometries(a,c,d);this._successHandler([m],"onSimplifyComplete",
1255f,g)}catch(h){this._errorHandler(h,e,g)}},onSimplifyComplete:function(){},convexHull:function(a,b,c){var f=a[0].spatialReference;a=n.mixin({},this._url.query,{f:"json",sr:e.toJson(f.toJson()),geometries:e.toJson(this._encodeGeometries(a))});var m=this._convexHullHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/convexHull",content:a,callbackParamName:"callback",load:function(a,d){m(a,d,f,b,c,s)},error:function(a){h(a,c,s)}});return s},_convexHullHandler:function(a,
1256b,c,d,f,e){try{var g=s.fromJson(a.geometry).setSpatialReference(c);this._successHandler([g],"onConvexHullComplete",d,e)}catch(m){this._errorHandler(m,f,e)}},onConvexHullComplete:function(){},union:function(a,b,c){var f=a[0].spatialReference;a=n.mixin({},this._url.query,{f:"json",sr:e.toJson(f.toJson()),geometries:e.toJson(this._encodeGeometries(a))});var m=this._unionHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/union",content:a,callbackParamName:"callback",
1257load:function(a,d){m(a,d,f,b,c,s)},error:function(a){h(a,c,s)}});return s},_unionHandler:function(a,b,c,d,f,e){try{var g=s.fromJson(a.geometry).setSpatialReference(c);this._successHandler([g],"onUnionComplete",d,e)}catch(m){this._errorHandler(m,f,e)}},onUnionComplete:function(){},autoComplete:function(a,b,c,f){var m=a[0].spatialReference;a=n.mixin({},this._url.query,{f:"json",sr:e.toJson(m.toJson()),polygons:e.toJson(this._encodeGeometries(a).geometries),polylines:e.toJson(this._encodeGeometries(b).geometries)});
1258var h=this._autoCompleteHandler,s=this._errorHandler,q=new l(d._dfdCanceller);q._pendingDfd=g({url:this._url.path+"/autoComplete",content:a,callbackParamName:"callback",load:function(a,b){h(a,b,m,c,f,q)},error:function(a){s(a,f,q)}});return q},_autoCompleteHandler:function(a,b,c,d,f,e){try{var g=a.geometries;a=[];var h,l=g.length;for(h=0;h<l;h++)a[h]=new m({spatialReference:c,rings:g[h].rings});this._successHandler([a],"onAutoCompleteComplete",d,e)}catch(s){this._errorHandler(s,f,e)}},onAutoCompleteComplete:function(){},
1259reshape:function(a,b,c,f){var m=a.spatialReference;a=n.mixin({},this._url.query,{f:"json",sr:e.toJson(m.toJson()),target:e.toJson({geometryType:s.getJsonType(a),geometry:a.toJson()}),reshaper:e.toJson(b.toJson())});
1259var h=this._reshapeHandler,q=this._errorHandler,p=new l(d._dfdCanceller);p._pendingDfd=g({url:this._url.path+"/reshape",content:a,callbackParamName:"callback",load:function(a,b){h(a,b,m,c,f,p)},error:function(a){q(a,f,p)}});return p},_reshapeHandler:function(a,b,c,d,f,e){try{var g=s.fromJson(a.geometry).setSpatialReference(c);
1260this._successHandler([g],"onReshapeComplete",d,e)}catch(m){this._errorHandler(m,f,e)}},onReshapeComplete:function(){},cut:function(b,c,f,m){var h=b[0].spatialReference,q=a.map(b,function(a){return a.toJson()});b=n.mixin({},this._url.query,{f:"json",sr:e.toJson(h.toJson()),target:e.toJson({geometryType:s.getJsonType(b[0]),geometries:q}),cutter:e.toJson(c.toJson())});var p=this._cutHandler,t=this._errorHandler,B=new l(d._dfdCanceller);B._pendingDfd=g({url:this._url.path+"/cut",content:b,callbackParamName:"callback",
1261load:function(a,b){p(a,b,h,f,m,B)},error:function(a){t(a,m,B)}});return B},_cutHandler:function(b,c,d,f,e,g){try{var m=b.geometries,h={};h.cutIndexes=b.cutIndexes;h.geometries=[];a.forEach(m,function(a){h.geometries.push(s.fromJson(a).setSpatialReference(d))});this._successHandler([h],"onCutComplete",f,g)}catch(l){this._errorHandler(l,e,g)}},onCutComplete:function(){},intersect:function(a,b,c,f){var m=a[0].spatialReference;a=n.mixin({},this._url.query,{f:"json",sr:e.toJson(m.toJson()),geometries:e.toJson(this._encodeGeometries(a)),
1262geometry:e.toJson({geometryType:s.getJsonType(b),geometry:b.toJson()})});var h=this._intersectHandler,q=this._errorHandler,p=new l(d._dfdCanceller);p._pendingDfd=g({url:this._url.path+"/intersect",content:a,callbackParamName:"callback",load:function(a,b){h(a,b,m,c,f,p)},error:function(a){q(a,f,p)}});return p},_intersectHandler:function(b,c,d,f,e,g){try{var m=[];a.forEach(b.geometries,function(a){m.push(s.fromJson(a).setSpatialReference(d))});this._successHandler([m],"onIntersectComplete",f,g)}catch(h){this._errorHandler(h,
1263e,g)}},onIntersectComplete:function(){},difference:function(a,b,c,f){var m=a[0].spatialReference;a=n.mixin({},this._url.query,{f:"json",sr:e.toJson(m.toJson()),geometries:e.toJson(this._encodeGeometries(a)),geometry:e.toJson({geometryType:s.getJsonType(b),geometry:b.toJson()})});var h=this._differenceHandler,q=this._errorHandler,p=new l(d._dfdCanceller);p._pendingDfd=g({url:this._url.path+"/difference",content:a,callbackParamName:"callback",load:function(a,b){h(a,b,m,c,f,p)},error:function(a){q(a,
1264f,p)}});return p},_differenceHandler:function(b,c,d,f,e,g){try{var m=[];a.forEach(b.geometries,function(a){m.push(s.fromJson(a).setSpatialReference(d))});this._successHandler([m],"onDifferenceComplete",f,g)}catch(h){this._errorHandler(h,e,g)}},onDifferenceComplete:function(){},buffer:function(a,b,c){var f=n.mixin({},this._url.query,{f:"json"},a.toJson()),e=a.outSpatialReference||a.geometries[0].spatialReference,m=this._bufferHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+
1265"/buffer",content:f,callbackParamName:"callback",load:function(a,d){m(a,d,e,b,c,s)},error:function(a){h(a,c,s)}});return s},_bufferHandler:function(a,b,c,d,f,e){try{var g=a.geometries;a=[];var h,l=g.length;for(h=0;h<l;h++)a[h]=new m({spatialReference:c,rings:g[h].rings});this._successHandler([a],"onBufferComplete",d,e)}catch(s){this._errorHandler(s,f,e)}},onBufferComplete:function(){},areasAndLengths:function(a,b,c){a=n.mixin({},this._url.query,{f:"json"},a.toJson());var f=this._areasAndLengthsHandler,
1266e=this._errorHandler,m=new l(d._dfdCanceller);m._pendingDfd=g({url:this._url.path+"/areasAndLengths",content:a,callbackParamName:"callback",load:function(a,d){f(a,d,b,c,m)},error:function(a){e(a,c,m)}});return m},_areasAndLengthsHandler:function(a,b,c,d,f){try{this._successHandler([a],"onAreasAndLengthsComplete",c,f)}catch(e){this._errorHandler(e,d,f)}},onAreasAndLengthsComplete:function(){},lengths:function(a,b,c){a=n.mixin({},this._url.query,{f:"json"},a.toJson());var f=this._lengthsHandler,e=this._errorHandler,
1267m=new l(d._dfdCanceller);m._pendingDfd=g({url:this._url.path+"/lengths",content:a,callbackParamName:"callback",load:function(a,d){f(a,d,b,c,m)},error:function(a){e(a,c,m)}});return m},_lengthsHandler:function(a,b,c,d,f){try{this._successHandler([a],"onLengthsComplete",c,f)}catch(e){this._errorHandler(e,d,f)}},onLengthsComplete:function(){},labelPoints:function(b,c,f){var m=a.map(b,function(a){return a.toJson()}),h=b[0].spatialReference,m=n.mixin({},this._url.query,{f:"json",sr:h.wkid?h.wkid:e.toJson(h.toJson()),
1268polygons:e.toJson(m)}
1268),s=this._labelPointsHandler,q=this._errorHandler,p=new l(d._dfdCanceller);p._pendingDfd=g({url:this._url.path+"/labelPoints",content:m,callbackParamName:"callback",load:function(a,d){s(a,d,b,h,c,f,p)},error:function(a){q(a,f,p)}});return p},_labelPointsHandler:function(b,c,d,f,e,g,m){try{var h=[];a.forEach(b.labelPoints,function(a){h.push(s.fromJson(a).setSpatialReference(f))});this._successHandler([h],"onLabelPointsComplete",e,m)}catch(l){this._errorHandler(l,g,m)}},onLabelPointsComplete:function(){},
1269relation:function(a,b,c){a=n.mixin({},this._url.query,{f:"json"},a.toJson());var f=this._relationHandler,e=this._errorHandler,m=new l(d._dfdCanceller);m._pendingDfd=g({url:this._url.path+"/relation",content:a,callbackParamName:"callback",load:function(a,d){f(a,d,b,c,m)},error:function(a){e(a,c,m)}});return m},_relationHandler:function(a,b,c,d,f){try{this._successHandler([a.relations],"onRelationComplete",c,f)}catch(e){this._errorHandler(e,d,f)}},onRelationComplete:function(){},trimExtend:function(a,
1270b,c){var f=n.mixin({},this._url.query,{f:"json"},a.toJson()),e=a.sr,m=this._trimExtendHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/trimExtend",content:f,callbackParamName:"callback",load:function(a,d){m(a,d,e,b,c,s)},error:function(a){h(a,c,s)}});return s},_trimExtendHandler:function(a,b,c,d,e,g){try{var m=a.geometries;a=[];var h,l=m.length;for(h=0;h<l;h++)a[h]=new f({spatialReference:c,paths:m[h].paths});this._successHandler([a],"onTrimExtendComplete",
1271d,g)}catch(s){this._errorHandler(s,e,g)}},onTrimExtendComplete:function(){},densify:function(a,b,c){var f=n.mixin({},this._url.query,{f:"json"},a.toJson()),e=a.geometries[0].spatialReference,m=this._densifyHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/densify",content:f,callbackParamName:"callback",load:function(a,d){m(a,d,e,b,c,s)},error:function(a){h(a,c,s)}});return s},_densifyHandler:function(b,c,d,f,e,g){try{var m=[];a.forEach(b.geometries,function(a){m.push(s.fromJson(a).setSpatialReference(d))});
1272this._successHandler([m],"onDensifyComplete",f,g)}catch(h){this._errorHandler(h,e,g)}},onDensifyComplete:function(){},generalize:function(a,b,c){var f=n.mixin({},this._url.query,{f:"json"},a.toJson()),e=a.geometries[0].spatialReference,m=this._generalizeHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/generalize",content:f,callbackParamName:"callback",load:function(a,d){m(a,d,e,b,c,s)},error:function(a){h(a,c,s)}});return s},_generalizeHandler:function(b,
1273c,d,f,e,g){try{var m=[];a.forEach(b.geometries,function(a){m.push(s.fromJson(a).setSpatialReference(d))});this._successHandler([m],"onGeneralizeComplete",f,g)}catch(h){this._errorHandler(h,e,g)}},onGeneralizeComplete:function(){},offset:function(a,b,c){var f=n.mixin({},this._url.query,{f:"json"},a.toJson()),e=a.geometries[0].spatialReference,m=this._offsetHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/offset",content:f,callbackParamName:"callback",load:function(a,
1274d){m(a,d,e,b,c,s)},error:function(a){h(a,c,s)}});return s},_offsetHandler:function(b,c,d,f,e,g){try{var m=[];a.forEach(b.geometries,function(a){m.push(s.fromJson(a).setSpatialReference(d))});this._successHandler([m],"onOffsetComplete",f,g)}catch(h){this._errorHandler(h,e,g)}},onOffsetComplete:function(){},distance:function(a,b,c){var f=n.mixin({},this._url.query,{f:"json"},a.toJson()),e=a.geometry1.spatialReference,m=this._distanceHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=
1275g({url:this._url.path+"/distance",content:f,callbackParamName:"callback",load:function(a,d){m(a,d,e,b,c,s)},error:function(a){h(a,c,s)}});return s},_distanceHandler:function(a,b,c,d,f,e){try{a=a&&a.distance,this._successHandler([a],"onDistanceComplete",d,e)}catch(g){this._errorHandler(g,f,e)}},onDistanceComplete:function(){},toGeoCoordinateString:function(a,b,c){var f={};n.isObject(a.sr)?f.sr=a.sr.wkid||e.toJson(a.sr.toJson()):f.sr=a.sr;f.coordinates=e.toJson(a.coordinates);f.conversionType=a.conversionType||
1276"MGRS";f.conversionMode=a.conversionMode;f.numOfDigits=a.numOfDigits;f.rounding=a.rounding;f.addSpaces=a.addSpaces;a=n.mixin({},this._url.query,{f:"json"},f);var m=this._toGeoCoordinateHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/toGeoCoordinateString",content:a,callbackParamName:"callback",load:function(a,d){m(a,d,b,c,s)},error:function(a){h(a,c,s)}});return s},_toGeoCoordinateHandler:function(a,b,c,d,f){try{this._successHandler([a.strings],"onToGeoCoordinateStringComplete",
1277c,f)}catch(e){this._errorHandler(e,d,f)}},onToGeoCoordinateStringComplete:function(){},fromGeoCoordinateString:function(a,b,c){var f={};n.isObject(a.sr)?f.sr=a.sr.wkid||e.toJson(a.sr.toJson()):f.sr=a.sr;f.strings=e.toJson(a.strings);f.conversionType=a.conversionType||"MGRS";f.conversionMode=a.conversionMode;a=n.mixin({},this._url.query,{f:"json"},f);var m=this._fromGeoCoordinateHandler,h=this._errorHandler,s=new l(d._dfdCanceller);s._pendingDfd=g({url:this._url.path+"/fromGeoCoordinateString",content:a,
1278callbackParamName:"callback",load:function(a,d){m(a,d,b,c,s)},error:function(a){h(a,c,s)}});return s},_fromGeoCoordinateHandler:function(a,b,c,d,f){try{this._successHandler([a.coordinates],"onToGeoCoordinateStringComplete",c,f)}catch(e){this._errorHandler(e,d,f)}},onFromGeoCoordinateStringComplete:function(){}});
1278n.mixin(p,{UNIT_METER:9001,UNIT_GERMAN_METER:9031,UNIT_FOOT:9002,UNIT_SURVEY_FOOT:9003,UNIT_CLARKE_FOOT:9005,UNIT_FATHOM:9014,UNIT_NAUTICAL_MILE:9030,UNIT_SURVEY_CHAIN:9033,UNIT_SURVEY_LINK:9034,
1279UNIT_SURVEY_MILE:9035,UNIT_KILOMETER:9036,UNIT_CLARKE_YARD:9037,UNIT_CLARKE_CHAIN:9038,UNIT_CLARKE_LINK:9039,UNIT_SEARS_YARD:9040,UNIT_SEARS_FOOT:9041,UNIT_SEARS_CHAIN:9042,UNIT_SEARS_LINK:9043,UNIT_BENOIT_1895A_YARD:9050,UNIT_BENOIT_1895A_FOOT:9051,UNIT_BENOIT_1895A_CHAIN:9052,UNIT_BENOIT_1895A_LINK:9053,UNIT_BENOIT_1895B_YARD:9060,UNIT_BENOIT_1895B_FOOT:9061,UNIT_BENOIT_1895B_CHAIN:9062,UNIT_BENOIT_1895B_LINK:9063,UNIT_INDIAN_FOOT:9080,UNIT_INDIAN_1937_FOOT:9081,UNIT_INDIAN_1962_FOOT:9082,UNIT_INDIAN_1975_FOOT:9083,
1280UNIT_INDIAN_YARD:9084,UNIT_INDIAN_1937_YARD:9085,UNIT_INDIAN_1962_YARD:9086,UNIT_INDIAN_1975_YARD:9087,UNIT_FOOT_1865:9070,UNIT_RADIAN:9101,UNIT_DEGREE:9102,UNIT_ARCMINUTE:9103,UNIT_ARCSECOND:9104,UNIT_GRAD:9105,UNIT_GON:9106,UNIT_MICRORADIAN:9109,UNIT_ARCMINUTE_CENTESIMAL:9112,UNIT_ARCSECOND_CENTESIMAL:9113,UNIT_MIL6400:9114,UNIT_BRITISH_1936_FOOT:9095,UNIT_GOLDCOAST_FOOT:9094,UNIT_INTERNATIONAL_CHAIN:109003,UNIT_INTERNATIONAL_LINK:109004,UNIT_INTERNATIONAL_YARD:109001,UNIT_STATUTE_MILE:9093,UNIT_SURVEY_YARD:109002,
1281UNIT_50KILOMETER_LENGTH:109030,UNIT_150KILOMETER_LENGTH:109031,UNIT_DECIMETER:109005,UNIT_CENTIMETER:109006,UNIT_MILLIMETER:109007,UNIT_INTERNATIONAL_INCH:109008,UNIT_US_SURVEY_INCH:109009,UNIT_INTERNATIONAL_ROD:109010,UNIT_US_SURVEY_ROD:109011,UNIT_US_NAUTICAL_MILE:109012,UNIT_UK_NAUTICAL_MILE:109013,UNIT_SQUARE_INCHES:"esriSquareInches",UNIT_SQUARE_FEET:"esriSquareFeet",UNIT_SQUARE_YARDS:"esriSquareYards",UNIT_ACRES:"esriAcres",UNIT_SQUARE_MILES:"esriSquareMiles",UNIT_SQUARE_MILLIMETERS:"esriSquareMillimeters",
1282UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});h("extend-esri")&&n.setObject("tasks.GeometryService",p,q);return p})},"esri/layers/FeatureType":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../symbols/jsonUtils ./RangeDomain ./CodedValueDomain ./InheritedDomain ./FeatureTemplate".split(" "),
1283function(p,n,a,e,l,h,q,g,d,c,b){p=p(null,{declaredClass:"esri.layers.FeatureType",constructor:function(a){if(a&&n.isObject(a)){this.id=a.id;this.name=a.name;var e=a.symbol;e&&(this.symbol=q.fromJson(e));var e=a.domains,h,l=this.domains={};for(h in e)if(e.hasOwnProperty(h)){var k=e[h];switch(k.type){case "range":l[h]=new g(k);break;case "codedValue":l[h]=new d(k);break;case "inherited":l[h]=new c(k)}}if(h=a.templates){e=this.templates=[];for(a=0;a<h.length;a++)e.push(new b(h[a]))}}},toJson:function(){var b=
1284{id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()},c,d=this.domains,e=this.templates,g=h.fixJson;if(d){var l=b.domains={};for(c in d)d.hasOwnProperty(c)&&(l[c]=d[c]&&d[c].toJson());g(l)}e&&(b.templates=a.map(e,function(a){return a.toJson()}));return g(b)}});e("extend-esri")&&n.setObject("layers.FeatureType",p,l);return p})},"dijit/layout/utils":function(){define(["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],function(p,n,a,e,l){function h(e,
1285d){var c=e.resize?e.resize(d):a.setMarginBox(e.domNode,d);c?l.mixin(e,c):(l.mixin(e,a.getMarginBox(e.domNode)),l.mixin(e,d))}var q={marginBox2contentBox:function(g,d){var c=e.getComputedStyle(g),b=a.getMarginExtents(g,c),f=a.getPadBorderExtents(g,c);return{l:e.toPixelValue(g,c.paddingLeft),t:e.toPixelValue(g,c.paddingTop),w:d.w-(b.w+f.w),h:d.h-(b.h+f.h)}},layoutChildren:function(a,d,c,b,f){d=l.mixin({},d);n.add(a,"dijitLayoutContainer");c=p.filter(c,function(a){return"center"!=a.region&&"client"!=
1286a.layoutAlign}).concat(p.filter(c,function(a){return"center"==a.region||"client"==a.layoutAlign}));p.forEach(c,function(a){var c=a.domNode,e=a.region||a.layoutAlign;if(!e)throw Error("No region setting for "+a.id);var g=c.style;g.left=d.l+"px";g.top=d.t+"px";g.position="absolute";n.add(c,"dijitAlign"+(e.substring(0,1).toUpperCase()+e.substring(1)));c={};b&&b==a.id&&(c["top"==a.region||"bottom"==a.region?"h":"w"]=f);"leading"==e&&(e=a.isLeftToRight()?"left":"right");"trailing"==e&&(e=a.isLeftToRight()?
1287"right":"left");"top"==e||"bottom"==e?(c.w=d.w,h(a,c),d.h-=a.h,"top"==e?d.t+=a.h:g.top=d.t+d.h+"px"):"left"==e||"right"==e?(c.h=d.h,h(a,c),d.w-=a.w,"left"==e?d.l+=a.w:g.left=d.l+d.w+"px"):("client"==e||"center"==e)&&h(a,d)})}};l.setObject("dijit.layout.utils",q);return q})},"esri/symbols/SimpleMarkerSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./MarkerSymbol ./SimpleLineSymbol".split(" "),function(p,n,a,e,l,h,q,g,d){var c=
1288{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_PATH:"path",STYLE_TARGET:"target"},b={style:c.STYLE_CIRCLE,color:[255,255,255,0.25],size:12,angle:0,xoffset:0,yoffset:0};p=p(g,{declaredClass:"esri.symbol.SimpleMarkerSymbol",type:"simplemarkersymbol",_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond",path:"esriSMSPath"},constructor:function(f,e,g,h){f?n.isString(f)?(this.style=f,
1289e&&(this.size=e),g&&(this.outline=g),h&&(this.color=h)):(this.style=q.valueOf(this._styles,this.style),f.outline&&(this.outline=new d(f.outline))):(n.mixin(this,b),this.size=l.pt2px(this.size),this.outline=new d(this.outline),this.color=new a(this.color));this.style||(this.style=c.STYLE_CIRCLE)},setStyle:function(a){this.style=a;return this},setPath:function(a){this.path=a;this.setStyle(c.STYLE_PATH);return this},setOutline:function(a){this.outline=a;return this},getStroke:function(){return this.outline&&
1290this.outline.getStroke()},getFill:function(){return this.color},_setDim:function(a,b,c){this._targetWidth=a;this._targetHeight=b;this._spikeSize=c},getShapeDescriptors:function(){var a,d,e,g=this.style,k=(this.size||l.pt2px(b.size))/2,h=0-k,n=0+k,q=0-k,p=0+k;switch(g){case c.STYLE_CIRCLE:a={type:"circle",cx:0,cy:0,r:k};d=this.getFill();if(e=this.getStroke())e.style=e.style||"Solid";break;case c.STYLE_CROSS:a={type:"path",path:"M "+h+",0 L "+n+",0 M 0,"+q+" L 0,"+p+" E"};d=null;e=this.getStroke();
1291break;case c.STYLE_DIAMOND:a={type:"path",path:"M "+h+",0 L 0,"+q+" L "+n+",0 L 0,"+p+" L "+h+",0 E"};d=this.getFill();e=this.getStroke();break;case c.STYLE_SQUARE:a={type:"path",path:"M "+h+","+p+" L "+h+","+q+" L "+n+","+q+" L "+n+","+p+" L "+h+","+p+" E"};d=this.getFill();e=this.getStroke();break;case c.STYLE_X:a={type:"path",path:"M "+h+","+p+" L "+n+","+q+" M "+h+","+q+" L "+n+","+p+" E"};d=null;e=this.getStroke();break;case c.STYLE_PATH:a={type:"path",path:this.path||""},d=this.getFill(),e=
1292this.getStroke()}return{defaultShape:a,fill:d,stroke:e}},toJson:function(){var a=n.mixin(this.inherited("toJson",arguments),{type:"esriSMS",
1292style:this._styles[this.style]}),b=this.outline;b&&(a.outline=b.toJson());a.path=this.path;return q.fixJson(a)}});n.mixin(p,c);p.defaultProps=b;e("extend-esri")&&(n.setObject("symbol.SimpleMarkerSymbol",p,h),h.symbol.defaultSimpleMarkerSymbol=b);return p})},"esri/tasks/Task":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../deferredUtils ../urlUtils ../Evented".split(" "),
1293function(p,n,a,e,l,h,q,g){p=p(g,{declaredClass:"esri.tasks._Task",_eventMap:{error:["error"],complete:["result"]},constructor:function(a,c){a&&n.isString(a)&&(this._url=q.urlToObject(this.url=a));c&&c.requestOptions&&(this.requestOptions=c.requestOptions);this.normalization=!0;this._errorHandler=n.hitch(this,this._errorHandler);this.registerConnectEvents()},_useSSL:function(){var a=this._url,c=/^http:/i;this.url&&(this.url=this.url.replace(c,"https:"));a&&a.path&&(a.path=a.path.replace(c,"https:"))},
1294_encode:function(d,c,b){var f,e,g={},h,k;for(h in d)if("declaredClass"!==h&&(f=d[h],e=typeof f,null!==f&&void 0!==f&&"function"!==e))if(n.isArray(f)){g[h]=[];k=f.length;for(e=0;e<k;e++)g[h][e]=this._encode(f[e])}else"object"===e?f.toJson&&(e=f.toJson(b&&b[h]),"esri.tasks.FeatureSet"===f.declaredClass&&e.spatialReference&&(e.sr=e.spatialReference,delete e.spatialReference),g[h]=c?e:a.toJson(e)):g[h]=f;return g},_successHandler:function(a,c,b,f){c&&this[c].apply(this,a);b&&b.apply(null,a);f&&h._resDfd(f,
1295a)},_errorHandler:function(a,c,b){this.onError(a);c&&c(a);b&&b.errback(a)},setNormalization:function(a){this.normalization=a},onError:function(){}});e("extend-esri")&&(l.Task=p);return p})},"esri/tasks/RelationshipQuery":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","../kernel"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.tasks.RelationshipQuery",definitionExpression:"",relationshipId:null,returnGeometry:!1,objectIds:null,outSpatialReference:null,outFields:null,
1296toJson:function(){var e={definitionExpression:this.definitionExpression,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision},l=this.objectIds,g=this.outFields,d=this.outSpatialReference;l&&(e.objectIds=l.join(","));g&&(e.outFields=g.join(","));d&&(e.outSR=d.wkid||a.toJson(d.toJson()));e._ts=this._ts;return e}});e("extend-esri")&&n.setObject("tasks.RelationshipQuery",p,l);return p})},"esri/symbols/LineSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ./Symbol".split(" "),
1297function(p,n,a,e,l,h){p=p(h,{declaredClass:"esri.symbol.LineSymbol",constructor:function(a){n.isObject(a)?this.width=e.pt2px(this.width):this.width=12},setWidth:function(a){this.width=a;return this},toJson:function(){var a=e.px2pt(this.width),a=isNaN(a)?void 0:a;
1297return n.mixin(this.inherited("toJson",arguments),{width:a})}});a("extend-esri")&&n.setObject("symbol.LineSymbol",p,l);return p})},"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 ../urlUtils ./_EventedWidget dojo/i18n!../nls/jsapi dojo/NodeList-dom".split(" "),
1298function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v){var z=0;n=n([x,s,k],{declaredClass:"esri.dijit._PopupRenderer",constructor:function(){this._nls=e.mixin({},v.widgets.popup)},templateString:"\x3cdiv class\x3d'esriViewPopup'\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",
1299showTitle:!0,startup:function(){this.inherited(arguments);this.template.getComponents(this.graphic).then(e.hitch(this,this._handleComponentsSuccess),e.hitch(this,this._handleComponentsError))},destroy:function(){this._dfd&&this._dfd.cancel();this._destroyFrame();this.template=this.graphic=this._nls=this._mediaInfos=this._mediaPtr=this._dfd=null;this.inherited(arguments)},_goToPrevMedia:function(){0>this._mediaPtr-1||(this._mediaPtr--,this._updateUI(),this._displayMedia())},_goToNextMedia:function(){this._mediaPtr+
13001!==this._mediaInfos.length&&(this._mediaPtr++,this._updateUI(),this._displayMedia())},_updateUI:function(){var a=this._mediaInfos,d=a.length,f=this.domNode,e=this._prevMedia,g=this._nextMedia;if(1<d){var k=0,m=0;l.forEach(a,function(a){"image"===a.type?k++:-1!==a.type.indexOf("chart")&&m++});k&&(c.set(this._imageCount,"innerHTML",k),h.query(".summary .image",f).removeClass("hidden"));m&&(c.set(this._chartCount,"innerHTML",m),h.query(".summary .chart",f).removeClass("hidden"))}else h.query(".summary",
1301f).addClass("hidden"),b.add(e,"hidden"),b.add(g,"hidden");a=this._mediaPtr;0===a?b.add(e,"hidden"):b.remove(e,"hidden");a===d-1?b.add(g,"hidden"):b.remove(g,"hidden");this._destroyFrame()},_displayMedia:function(){var a=this._mediaInfos[this._mediaPtr],d=a.title,f=a.caption,g=h.query(".mediaSection .hzLine",this.domNode)[0];c.set(this._mediaTitle,"innerHTML",d);b[d?"remove":"add"](this._mediaTitle,"hidden");c.set(this._mediaCaption,"innerHTML",f);b[f?"remove":"add"](this._mediaCaption,"hidden");b[d&&
1302f?"remove":"add"](g,"hidden");this._rid=null;if("image"===a.type)this._showImage(a.value);else{var k=this,d=["dojox/charting/Chart2D","dojox/charting/action2d/Tooltip"],f=a.value.theme||this.chartTheme;e.isString(f)&&(f=f.replace(/\./gi,"/"),-1===f.indexOf("/")&&(f="dojox/charting/themes/"+f));f||(f="./Rainbow");d.push(f);try{var m=this._rid=z++;p(d,function(b,c,d){m===k._rid&&(k._rid=null,k._showChart(a.type,a.value,b,c,d))})}catch(l){console.log("PopupRenderer: error loading modules")}}},_preventNewTab:function(a){return(a=
1303a&&e.trim(a).toLowerCase())&&(0===a.indexOf("mailto:")||0===a.indexOf("tel:"))},_showImage:function(c){b.add(this._mediaFrame,"image");var d=m.get(this._gallery,"height"),e;c.linkURL&&(e=f.create("a",{href:c.linkURL,target:this._preventNewTab(c.linkURL)?"":"_blank"},this._mediaFrame));f.create("img",{className:"esriPopupMediaImage",src:c.sourceURL},e||this._mediaFrame);var g=h.query(".esriPopupMediaImage",this._mediaFrame)[0],k=this,l;l=a.connect(g,"onload",function(){a.disconnect(l);l=null;k._imageLoaded(g,
1304d)})},_showChart:function(a,c,d,e,g){b.remove(this._mediaFrame,"image");d=this._chart=new d(f.create("div",{"class":"chart"},this._mediaFrame),{margins:{l:4,t:4,r:4,b:4}});g&&d.setTheme(g);switch(a){case "piechart":d.addPlot("default",{type:"Pie",labels:!1});d.addSeries("Series A",c.fields);break;case "linechart":d.addPlot("default",{type:"Markers"});d.addAxis("x",{min:0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1});d.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});l.forEach(c.fields,
1305function(a,b){a.x=b+1});d.addSeries("Series A",c.fields);break;
1305case "columnchart":d.addPlot("default",{type:"Columns",gap:3});d.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});d.addSeries("Series A",c.fields);break;case "barchart":d.addPlot("default",{type:"Bars",gap:3}),d.addAxis("x",{includeZero:!0,fixUpper:"minor",minorLabels:!1}),d.addAxis("y",{vertical:!0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1}),d.addSeries("Series A",c.fields)}this._action=new e(d);d.render()},
1306_destroyFrame:function(){this._rid=null;this._chart&&(this._chart.destroy(),this._chart=null);this._action&&(this._action.destroy(),this._action=null);c.set(this._mediaFrame,"innerHTML","")},_imageLoaded:function(a,b){var c=a.height;c<b&&(c=Math.round((b-c)/2),m.set(a,"marginTop",c+"px"))},_attListHandler:function(a,b){if(a===this._dfd){this._dfd=null;var d="";!(b instanceof Error)&&(b&&b.length)&&l.forEach(b,function(a){d+="\x3cli\x3e";d+="\x3ca href\x3d'"+u.addProxy(a.url)+"' target\x3d'_blank'\x3e"+
1307(a.name||"[No name]")+"\x3c/a\x3e";d+="\x3c/li\x3e"});c.set(this._attachmentsList,"innerHTML",d||"\x3cli\x3e"+this._nls.NLS_noAttach+"\x3c/li\x3e")}},_handleComponentsSuccess:function(a){if(a){var f=this.showTitle?a.title:"",g=a.description,k=a.fields,m=a.mediaInfos,r=this.domNode,s=this._nls,n=this,q=this.template,p=this.graphic;this._prevMedia.title=s.NLS_prevMedia;this._nextMedia.title=s.NLS_nextMedia;c.set(this._title,"innerHTML",f);f||b.add(this._title,"hidden");!a.hasDescription&&k&&(g="",l.forEach(k,
1308function(a){g+="\x3ctr valign\x3d'top'\x3e";g+="\x3ctd class\x3d'attrName'\x3e"+t.encode(a[0])+"\x3c/td\x3e";g+="\x3ctd class\x3d'attrValue'\x3e"+a[1].replace(/^\s*(https?:\/\/[^\s]+)\s*$/i,"\x3ca target\x3d'_blank' href\x3d'$1' title\x3d'$1'\x3e"+s.NLS_moreInfo+"\x3c/a\x3e")+"\x3c/td\x3e";g+="\x3c/tr\x3e"}),g&&(g="\x3ctable class\x3d'attrTable' cellpadding\x3d'0px' cellspacing\x3d'0px'\x3e"+g+"\x3c/table\x3e"));c.set(this._description,"innerHTML",g);g||b.add(this._description,"hidden");h.query("a",
1309this._description).forEach(function(a){n._preventNewTab(a.href)?"_blank"===a.target&&c.remove(a,"target"):c.set(a,"target","_blank")});f&&g?h.query(".mainSection .hzLine",r).removeClass("hidden"):f||g?h.query(".mainSection .hzLine",r).addClass("hidden"):h.query(".mainSection",r).addClass("hidden");if(f=this._dfd=q.getAttachments(p))f.addBoth(e.hitch(this,this._attListHandler,f)),c.set(this._attachmentsList,"innerHTML","\x3cli\x3e"+s.NLS_searching+"...\x3c/li\x3e"),h.query(".attachmentsSection",r).removeClass("hidden");
1310m&&m.length&&(h.query(".mediaSection",r).removeClass("hidden"),d.setSelectable(this._mediaFrame,!1),this._mediaInfos=m,this._mediaPtr=0,this._updateUI(),this._displayMedia());a.editSummary&&(c.set(this._editSummary,"innerHTML",a.editSummary),m&&m.length&&b.remove(this._mediaBreak,"hidden"),b.remove(this._editSummarySection,"hidden"))}},_handleComponentsError:function(a){console.log("PopupRenderer: error loading template",a)}});q("extend-esri")&&e.setObject("dijit._PopupRenderer",n,r);return n})},
1311"esri/graphicsUtils":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","./kernel","./geometry/Extent"],function(p,n,a,e,l){var h={graphicsExtent:function(a){var e=a[0].geometry,d=e.getExtent(),c,b,f=a.length;null===d&&(d=new l(e.x,e.y,e.x,e.y,e.spatialReference));for(b=1;b<f;b++)c=(e=a[b].geometry).getExtent(),null===c&&(c=new l(e.x,e.y,e.x,e.y,e.spatialReference)),d=d.union(c);return 0>d.getWidth()&&0>d.getHeight()?null:d},getGeometries:function(a){return n.map(a,function(a){return a.geometry})},
1312_encodeGraphics:function(a,e){var d=[],c,b,f;n.forEach(a,function(a,h){c=a.toJson();b={};c.geometry&&(f=e&&e[h],b.geometry=f&&f.toJson()||c.geometry);c.attributes&&(b.attributes=c.attributes);d[h]=b});return d}};a("extend-esri")&&p.mixin(e,h);return h})},"esri/IdentityManager":function(){define(["./IdentityManagerDialog","./kernel","./OAuthSignInHandler","dojo/_base/declare"],function(p,n,a,e){p=new p;n.id=e.safeMixin(p,a);return n.id})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],
1313function(p,n){var a=p.matrix={},e={};a._degToRad=function(a){return e[a]||(e[a]=Math.PI*a/180)};a._radToDeg=function(a){return 180*(a/Math.PI)};a.Matrix2D=function(e){if(e)if("number"==typeof e)this.xx=this.yy=e;else if(e instanceof Array){if(0<e.length){for(var h=a.normalize(e[0]),q=1;q<e.length;++q){var g=h,d=a.normalize(e[q]),h=new a.Matrix2D;h.xx=g.xx*d.xx+g.xy*d.yx;h.xy=g.xx*d.xy+g.xy*d.yy;h.yx=g.yx*d.xx+g.yy*d.yx;h.yy=g.yx*d.xy+g.yy*d.yy;h.dx=g.xx*d.dx+g.xy*d.dy+g.dx;h.dy=g.yx*d.dx+g.yy*d.dy+
1314g.dy}n.mixin(this,h)}}else n.mixin(this,e)};n.extend(a.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});
1314n.mixin(a,{identity:new a.Matrix2D,flipX:new a.Matrix2D({xx:-1}),flipY:new a.Matrix2D({yy:-1}),flipXY:new a.Matrix2D({xx:-1,yy:-1}),translate:function(e,h){return 1<arguments.length?new a.Matrix2D({dx:e,dy:h}):new a.Matrix2D({dx:e.x,dy:e.y})},scale:function(e,h){return 1<arguments.length?new a.Matrix2D({xx:e,yy:h}):"number"==typeof e?new a.Matrix2D({xx:e,yy:e}):new a.Matrix2D({xx:e.x,yy:e.y})},rotate:function(e){var h=
1315Math.cos(e);e=Math.sin(e);return new a.Matrix2D({xx:h,xy:-e,yx:e,yy:h})},rotateg:function(e){return a.rotate(a._degToRad(e))},skewX:function(e){return new a.Matrix2D({xy:Math.tan(e)})},skewXg:function(e){return a.skewX(a._degToRad(e))},skewY:function(e){return new a.Matrix2D({yx:Math.tan(e)})},skewYg:function(e){return a.skewY(a._degToRad(e))},reflect:function(e,h){1==arguments.length&&(h=e.y,e=e.x);var n=e*e,g=h*h,d=n+g,c=2*e*h/d;return new a.Matrix2D({xx:2*n/d-1,xy:c,yx:c,yy:2*g/d-1})},project:function(e,
1316h){1==arguments.length&&(h=e.y,e=e.x);var n=e*e,g=h*h,d=n+g,c=e*h/d;return new a.Matrix2D({xx:n/d,xy:c,yx:c,yy:g/d})},normalize:function(e){return e instanceof a.Matrix2D?e:new a.Matrix2D(e)},isIdentity:function(a){return 1==a.xx&&0==a.xy&&0==a.yx&&1==a.yy&&0==a.dx&&0==a.dy},clone:function(e){var h=new a.Matrix2D,n;for(n in e)"number"==typeof e[n]&&("number"==typeof h[n]&&h[n]!=e[n])&&(h[n]=e[n]);return h},invert:function(e){e=a.normalize(e);var h=e.xx*e.yy-e.xy*e.yx;return e=new a.Matrix2D({xx:e.yy/
1317h,xy:-e.xy/h,yx:-e.yx/h,yy:e.xx/h,dx:(e.xy*e.dy-e.yy*e.dx)/h,dy:(e.yx*e.dx-e.xx*e.dy)/h})},_multiplyPoint:function(a,e,n){return{x:a.xx*e+a.xy*n+a.dx,y:a.yx*e+a.yy*n+a.dy}},multiplyPoint:function(e,h,n){e=a.normalize(e);return"number"==typeof h&&"number"==typeof n?a._multiplyPoint(e,h,n):a._multiplyPoint(e,h.x,h.y)},multiplyRectangle:function(e,h){var n=a.normalize(e);h=h||{x:0,y:0,width:0,height:0};if(a.isIdentity(n))return{x:h.x,y:h.y,width:h.width,height:h.height};var g=a.multiplyPoint(n,h.x,h.y),
1318d=a.multiplyPoint(n,h.x,h.y+h.height),c=a.multiplyPoint(n,h.x+h.width,h.y),b=a.multiplyPoint(n,h.x+h.width,h.y+h.height),n=Math.min(g.x,d.x,c.x,b.x),f=Math.min(g.y,d.y,c.y,b.y),m=Math.max(g.x,d.x,c.x,b.x),g=Math.max(g.y,d.y,c.y,b.y);return{x:n,y:f,width:m-n,height:g-f}},multiply:function(e){for(var h=a.normalize(e),n=1;n<arguments.length;++n){var g=h,d=a.normalize(arguments[n]),h=new a.Matrix2D;h.xx=g.xx*d.xx+g.xy*d.yx;h.xy=g.xx*d.xy+g.xy*d.yy;h.yx=g.yx*d.xx+g.yy*d.yx;h.yy=g.yx*d.xy+g.yy*d.yy;h.dx=
1319g.xx*d.dx+g.xy*d.dy+g.dx;h.dy=g.yx*d.dx+g.yy*d.dy+g.dy}return h},_sandwich:function(e,h,n){return a.multiply(a.translate(h,n),e,a.translate(-h,-n))},scaleAt:function(e,h,n,g){switch(arguments.length){case 4:return a._sandwich(a.scale(e,h),n,g);case 3:return"number"==typeof n?a._sandwich(a.scale(e),h,n):a._sandwich(a.scale(e,h),n.x,n.y)}return a._sandwich(a.scale(e),h.x,h.y)},rotateAt:function(e,h,n){return 2<arguments.length?a._sandwich(a.rotate(e),h,n):a._sandwich(a.rotate(e),h.x,h.y)},rotategAt:function(e,
1320h,n){return 2<arguments.length?a._sandwich(a.rotateg(e),h,n):a._sandwich(a.rotateg(e),h.x,h.y)},skewXAt:function(e,h,n){return 2<arguments.length?a._sandwich(a.skewX(e),h,n):a._sandwich(a.skewX(e),h.x,h.y)},skewXgAt:function(e,h,n){return 2<arguments.length?a._sandwich(a.skewXg(e),h,n):a._sandwich(a.skewXg(e),h.x,h.y)},skewYAt:function(e,h,n){return 2<arguments.length?a._sandwich(a.skewY(e),h,n):a._sandwich(a.skewY(e),h.x,h.y)},skewYgAt:function(e,h,n){return 2<arguments.length?a._sandwich(a.skewYg(e),
1321h,n):a._sandwich(a.skewYg(e),h.x,h.y)}});p.Matrix2D=a.Matrix2D;return a})},"esri/layers/QueryDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource ../SpatialReference".split(" "),function(p,n,a,e,l,h,q){p=p(h,{declaredClass:"esri.layers.QueryDataSource",constructor:function(a){a&&(a.oidFields&&n.isString(a.oidFields)&&(this.oidFields=a.oidFields.split(",")),a.spatialReference&&(this.spatialReference=new q(a.spatialReference)))},toJson:function(){var a=
1322{type:"queryTable",workspaceId:this.workspaceId,query:this.query,oidFields:this.oidFields&&this.oidFields.join(),spatialReference:this.spatialReference&&this.spatialReference.toJson()};if(this.geometryType){var d;d="point"===this.geometryType.toLowerCase()?"esriGeometryPoint":"multipoint"===this.geometryType.toLowerCase()?"esriGeometryMultipoint":"polyline"===this.geometryType.toLowerCase()?"esriGeometryPolyline":"polygon"===this.geometryType.toLowerCase()?"esriGeometryPolygon":this.geometryType;
1323a.geometryType=d}return l.fixJson(a)}});a("extend-esri")&&n.setObject("layers.QueryDataSource",p,e);return p})},"esri/tasks/SpatialRelationship":function(){define(["dojo/_base/lang","dojo/has","../kernel"],function(p,n,a){var e={SPATIAL_REL_INTERSECTS:"esriSpatialRelIntersects",SPATIAL_REL_CONTAINS:"esriSpatialRelContains",SPATIAL_REL_CROSSES:"esriSpatialRelCrosses",SPATIAL_REL_ENVELOPEINTERSECTS:"esriSpatialRelEnvelopeIntersects",SPATIAL_REL_INDEXINTERSECTS:"esriSpatialRelIndexIntersects",SPATIAL_REL_OVERLAPS:"esriSpatialRelOverlaps",
1324SPATIAL_REL_TOUCHES:"esriSpatialRelTouches",SPATIAL_REL_WITHIN:"esriSpatialRelWithin",SPATIAL_REL_RELATION:"esriSpatialRelRelation"};n("extend-esri")&&p.setObject("tasks._SpatialRelationship",e,a);return e})},"esri/PointerEvents":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ./kernel ./Evented ./geometry/Point ./geometry/ScreenPoint".split(" "),function(p,n,a,e,l,h,q,g){p=p([h],{declaredClass:"esri.PointerEvents",tapRadius:8,clickRadius:2,doubleTapRadius:10,tapStartTolerance:50,
1325doubleTapDuration:300,minWheelValue:1,maxWheelValue:1,mozWheelDivisor:-1!==e("mac")?1:3,wheelDivisor:120,preventPageScroll:!0,_dragging:!1,constructor:function(a,c){this.node=a;
1325n.mixin(this,c);void 0!==a.style.msTouchAction?a.style.msTouchAction="none":void 0!==a.style.touchAction&&(a.style.touchAction="none");var b=navigator.msPointerEnabled,f=function(a){a.preventDefault()};a.addEventListener("selectstart",f,!1);a.addEventListener("dragstart",f,!1);this._pointerDown=n.hitch(this,this._pointerDown);
1326this._pointerMove=n.hitch(this,this._pointerMove);this._pointerUp=n.hitch(this,this._pointerUp);this._pointerCancel=n.hitch(this,this._pointerCancel);a.addEventListener(b?"MSPointerDown":"pointerdown",this._pointerDown,!1);a.addEventListener(b?"MSPointerMove":"pointermove",this._pointerMove,!1);a.addEventListener(b?"MSPointerUp":"pointerup",this._pointerUp,!1);a.addEventListener(b?"MSPointerCancel":"pointercancel",this._pointerCancel,!1);this.map&&(this._mouseOver=n.hitch(this,this._mouseOver),this._mouseOut=
1327n.hitch(this,this._mouseOut),this._mouseLeave=n.hitch(this,this._mouseLeave),this._mouseDown=n.hitch(this,this._mouseDown),this._mouseUp=n.hitch(this,this._mouseUp),this._mouseClick=n.hitch(this,this._mouseClick),this._mouseWheel=n.hitch(this,this._mouseWheel),this._mouseMove=n.hitch(this,this._mouseMove),this._mouseEnter=n.hitch(this,this._mouseEnter),this._onKeyDown=n.hitch(this,this._onKeyDown),this._onKeyUp=n.hitch(this,this._onKeyUp),a.addEventListener("mouseover",this._mouseOver,!1),a.addEventListener("mouseout",
1328this._mouseOut,!1),a.addEventListener("mouseleave",this._mouseLeave,!1),a.addEventListener("mousedown",this._mouseDown,!1),a.addEventListener("mouseup",this._mouseUp,!1),a.addEventListener("click",this._mouseClick,!1),a.addEventListener("mousewheel",this._mouseWheel,!1),a.addEventListener("mousemove",this._mouseMove,!1),a.addEventListener("mouseenter",this._mouseEnter,!1));this._numTouches=0;this._touches={};this._touchIds=[];this._taps=[];this._immediate=!1},_pointerDown:function(d){if(-1<a.indexOf(this._touchIds,
1329d.pointerId))this._pointerUp(d);else{var c=this._touches,b=d.target,f=d.pointerId,e=this._touchIds,g,h=(new Date).getTime();g=c[f]={};g.pointerId=f;g.startX=g.pageX=d.pageX;g.startY=g.pageY=d.pageY;g.startTS=h;e.push(f);this._numTouches++;b.setPointerCapture?b.setPointerCapture(f):b.msSetPointerCapture&&b.msSetPointerCapture(f);b=c[e[0]];c=c[e[1]];1!==this._numTouches&&(2===this._numTouches?this._swipeActive&&(b&&(b.startX=b.pageX,b.startY=b.pageY,b.moved=!1),this._swipeActive=!1,this._fire("onSwipeEnd",
1330this._processTouchEvent(d,b))):this._swipeActive?(this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(d,b))):this._pinchActive&&(this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(d,[b,c]))))}},_pointerMove:function(a){var c=this._touches,b=this._touchIds,f,e,g;if((f=c[a.pointerId])&&!(f.pageX===a.pageX&&f.pageY===a.pageY)){f.pageX=a.pageX;f.pageY=a.pageY;e=Math.abs(f.pageX-f.startX);g=Math.abs(f.pageY-f.startY);if(!f.moved&&(e>=this.tapRadius||g>=this.tapRadius))f.moved=
1331f.absMoved=!0;if(1===this._numTouches)this._swipeActive?this._fire("onSwipeMove",this._processTouchEvent(a,a)):f.moved&&(this._swipeActive=!0,this._fire("onSwipeStart",this._processTouchEvent(a,a)));else if(2===this._numTouches)if(f=c[b[0]],c=c[b[1]],this._pinchActive)this._fire("onPinchMove",this._processTouchEvent(a,[f,c]));else if(f.moved||c.moved)b=Math.abs(f.startX-c.startX),e=Math.abs(f.startY-c.startY),b=Math.sqrt(b*b+e*e),e=Math.abs(f.pageX-c.pageX),g=Math.abs(f.pageY-c.pageY),e=Math.sqrt(e*
1332e+g*g),Math.abs(e-b)>=2*this.tapRadius&&(this._pinchActive=!0,this._fire("onPinchStart",this._processTouchEvent(a,[f,c])))}},_pointerUp:function(d){var c=this._touches,b,f=this.node,e=d.target,g=d.pointerId,h=this._touchIds,k=h.slice(0),r=a.map(k,function(a){return c[a]}),l=(new Date).getTime();if(b=c[g])if(b.pageX=d.pageX,b.pageY=d.pageY,b.endTS=l,this._numTouches--,e.releasePointerCapture?e.releasePointerCapture(g):e.msReleasePointerCapture&&e.msReleasePointerCapture(g),0===this._numTouches)if(this._touches=
1333{},this._touchIds=[],this._swipeActive)this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(d,d));else if(this._pinchActive)this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(d,d));else{if(!b.absMoved){var e=Infinity,g=-Infinity,h=Infinity,l=-Infinity,n=this.tapStartTolerance,p;for(p=0;p<k.length;p++)b=r[p],b.startTS<e&&(e=b.startTS),b.startTS>g&&(g=b.startTS),b.endTS<h&&(h=b.endTS),b.endTS>l&&(l=b.endTS);Math.abs(g-e)<=n&&Math.abs(l-h)<=n&&this._basicTap(d,r)}}else 1===
1334this._numTouches&&this._pinchActive&&(h.splice(a.indexOf(h,d.pointerId),1),delete c[d.pointerId],b=c[h[0]],b.startX=b.pageX,b.startY=b.pageY,b.moved=!1,document.msElementsFromPoint&&(k=document.msElementsFromPoint(b.pageX,b.pageY),a.some(k,function(a){return a===f})||(this._touches={},this._touchIds=[],this._numTouches=0)),this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(d,[d,b])))},_pointerCancel:function(a){this._numTouches&&this._pointerUp(a)},_basicTap:function(a,c){var b=
1335(new Date).getTime(),f=this,e=this._immediate;a=this._processTouchEvent(a,c);this._taps.push({touchInfos:c,ts:b,event:a});2<this._taps.length&&this._taps.shift();this._fire("onBasicTap",a);clearTimeout(this._tapTimer);b=2===this._taps.length?this.doubleTapDuration/2:this.doubleTapDuration;this._tapTimer=setTimeout(function(){var a=f;f=null;clearTimeout(a._tapTimer);a._analyzeTap(e)},e?0:b)},_analyzeTap:function(a){var c=this._taps,b=c[0],f=c[1],e=b.touchInfos,g=f&&f.touchInfos;c.length&&(a||(this._taps=
1336[]),b&&f?e.length===g.length?f.ts-b.ts<=this.doubleTapDuration?(1===e.length?(a=Math.abs(e[0].startX-g[0].startX),e=Math.abs(e[0].startY-g[0].startY),e=a<=this.doubleTapRadius&&e<=this.doubleTapRadius):e=!0,e?this._processedDoubleTap(c):this._processedTa
1336p(f)):this._processedTap(f):this._processedTap(f):this._processedTap(b||f))},_processedTap:function(a){var c=a.event;this._fire("onProcessedTap",c);1===a.touchInfos.length?this._fire("onTap",this._fixEvent(c)):2===a.touchInfos.length&&this._fire("onTwoFingerTap",
1337c)},_processedDoubleTap:function(a){var c=1===a[1].touchInfos.length,b;c&&(b=[this._fixEvent(a[0].event),this._fixEvent(a[1].event)],b[1].relatedEvents=b);a=[a[0].event,a[1].event];a[1].relatedEvents=a;this._fire("onProcessedDoubleTap",a[1]);c&&(this._fire("onDoubleTap",b[1]),this._fire("onDblClick",b[1]))},_mouseOver:function(a){this._fire("onMouseOver",this._processMouseEvent(a))},_mouseMove:function(a){this._dragging?this._fire("onMouseDrag",this._processMouseEvent(a)):this._fire("onMouseMove",
1338this._processMouseEvent(a))},_mouseOut:function(a){this._fire("onMouseOut",this._processMouseEvent(a))},_mouseLeave:function(a){document.removeEventListener("keydown",this._onKeyDown,!1);document.removeEventListener("keyup",this._onKeyUp,!1);this._fire("onMouseOut",this._processMouseEvent(event))},_mouseDown:function(a){this._downX=a.pageX;this._downY=a.pageY;this._fire("onMouseDown",this._processMouseEvent(a));0===a.button&&(this._dragging=!0,this._fire("onMouseDragStart",this._processMouseEvent(a)))},
1339_mouseUp:function(a){this._dragging&&(this._dragging=!1,this._fire("onMouseDragEnd",this._processMouseEvent(a)));this._fire("onMouseUp",this._processMouseEvent(a))},_mouseClick:function(a){Math.abs(a.pageX-this._downX)<=this.clickRadius&&Math.abs(a.pageY-this._downY)<=this.clickRadius&&this._fire("onClick",this._processMouseEvent(a))},_mouseWheel:function(a){var c=this.map;(c?c.isScrollWheelZoom||c.isScrollWheelPan:this.preventPageScroll)&&a.preventDefault();var c=a.wheelDelta?a.wheelDelta/this.wheelDivisor:
1340-a.detail/this.mozWheelDivisor,b=Math.abs(c),b=b<=this.minWheelValue?this.minWheelValue:this.maxWheelValue;a.value=0>c?-b:b;this._fire("onMouseWheel",this._processMouseEvent(a))},_mouseEnter:function(a){document.removeEventListener("keydown",this._onKeyDown,!1);document.removeEventListener("keyup",this._onKeyUp,!1);document.addEventListener("keydown",this._onKeyDown,!1);document.addEventListener("keyup",this._onKeyUp,!1);this._fire("onMouseEnter",this._processMouseEvent(a))},_onKeyDown:function(a){this._fire("onKeyDown",
1341a)},_onKeyUp:function(a){this._fire("onKeyUp",a)},_fire:function(a,c){if(this[a])this[a](c);if(this.map&&this.map[a])this.map[a](c)},_fixEvent:function(a){var c={},b;for(b in a)c[b]=a[b];c.preventDefault=function(){a.preventDefault()};c.stopPropagation=function(){a.stopPropagation()};this.map&&(c.screenPoint=c.screenPoints[0],c.mapPoint=c.mapPoints[0]);return c},_processTouchEvent:function(a,c){var b=this.map,f=b&&b.position,e=0;if(f&&c)if(n.isArray(c)){var h,l;a.screenPoints=[];a.mapPoints=[];for(h=
13420;h<c.length;h++)c[h]?(l=new g(c[h].pageX-f.x,c[h].pageY-f.y),a.screenPoints.push(l),a.mapPoints.push(b.extent?b.toMap(l):new q)):e++}else a.screenPoint=new g(c.pageX-f.x,c.pageY-f.y),a.mapPoint=b.extent?b.toMap(a.screenPoint):new q;a.numPoints=c?n.isArray(c)?c.length-e:1:0;return a},_processMouseEvent:function(a){var c=this.map,b=c&&c.position;b&&(a.screenPoint=new g(a.pageX-b.x,a.pageY-b.y),a.mapPoint=c.extent?c.toMap(a.screenPoint):new q);return a},setImmediateTap:function(a){this._immediate=a},
1343destroy:function(){var a=this.node;a.removeEventListener("MSPointerDown",this._pointerDown,!1);a.removeEventListener("MSPointerMove",this._pointerMove,!1);a.removeEventListener("MSPointerUp",this._pointerUp,!1);a.removeEventListener("MSPointerCancel",this._pointerCancel,!1);this.map&&(a.removeEventListener("mouseover",this._mouseOver,!1),a.removeEventListener("mousemove",this._mouseMove,!1),a.removeEventListener("mouseout",this._mouseOut,!1),a.removeEventListener("mouseleave",this._mouseLeave,!1),
1344a.removeEventListener("mousedown",this._mouseDown,!1),a.removeEventListener("mouseup",this._mouseUp,!1),a.removeEventListener("click",this._mouseClick,!1),a.removeEventListener("mouseenter",this._mouseEnter,!1));clearTimeout(this._tapTimer);this.node=this.map=this._numTouches=this._touches=this._touchIds=this._taps=null}});e("extend-esri")&&(l.PointerEvents=p);return p})},"esri/layers/JoinDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource ./LayerMapSource ./TableDataSource ./QueryDataSource ./RasterDataSource".split(" "),
1345function(p,n,a,e,l,h,q,g,d,c){var b=p(h,{declaredClass:"esri.layers.JoinDataSource",constructor:function(a){a&&(a.leftTableSource&&(this.leftTableSource=this._createLayerSource(a.leftTableSource)),a.rightTableSource&&(this.rightTableSource=this._createLayerSource(a.rightTableSource)))},_createLayerSource:function(a){var e;if("mapLayer"===a.type)e=new q(a);else{e={type:"dataLayer"};var h;
1345switch(a.dataSource.type){case "table":h=new g(a.dataSource);break;case "queryTable":h=new d(a.dataSource);break;
1346case "joinTable":h=new b(a.dataSource);break;case "raster":h=new c(a.dataSource);break;default:h=a.dataSource}e.dataSource=h;e.toJson=function(){var a={type:"dataLayer",dataSource:h.toJson()};return l.fixJson(a)}}return e},toJson:function(){var a={type:"joinTable",leftTableSource:this.leftTableSource&&this.leftTableSource.toJson(),rightTableSource:this.rightTableSource&&this.rightTableSource.toJson(),leftTableKey:this.leftTableKey,rightTableKey:this.rightTableKey},b;b="left-outer-join"===this.joinType.toLowerCase()?
1347"esriLeftOuterJoin":"left-inner-join"===this.joinType.toLowerCase()?"esriLeftInnerJoin":this.joinType;a.joinType=b;return l.fixJson(a)}});a("extend-esri")&&n.setObject("layers.JoinDataSource",b,e);return b})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],function(p,n,a,e){return n("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(e,
1348h){var n=this.containerNode;if(0<h){for(n=n.firstChild;0<h;)1==n.nodeType&&h--,n=n.nextSibling;n?h="before":(n=this.containerNode,h="last")}a.place(e.domNode,n,h);this._started&&!e._started&&e.startup()},removeChild:function(a){"number"==typeof a&&(a=this.getChildren()[a]);a&&(a=a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},hasChildren:function(){return 0<this.getChildren().length},_getSiblingOfChild:function(a,h){e.deprecated(this.declaredClass+"::_getSiblingOfChild() is deprecated. Use _KeyNavMixin::_getNext() instead.",
1349"","2.0");var n=this.getChildren(),g=p.indexOf(n,a);return n[g+h]},getIndexOfChild:function(a){return p.indexOf(this.getChildren(),a)}})})},"esri/layers/LayerInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.layers.LayerInfo",constructor:function(a){n.mixin(this,a)},toJson:function(){return l.fixJson({defaultVisibility:this.defaultVisibility,id:this.id,maxScale:this.maxScale,minScale:this.minScale,name:this.name,
1350parentLayerId:this.parentLayerId,subLayerIds:this.subLayerIds})}});a("extend-esri")&&n.setObject("layers.LayerInfo",p,e);return p})},"esri/symbols/PictureFillSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang ../urlUtils ./FillSymbol".split(" "),function(p,n,a,e,l,h,q,g){var d={xoffset:0,yoffset:0,width:12,height:12};p=p(g,{declaredClass:"esri.symbol.PictureFillSymbol",type:"picturefillsymbol",xscale:1,yscale:1,xoffset:0,yoffset:0,constructor:function(c,
1351b,f,g){c?n.isString(c)?(this.url=c,void 0!==b&&(this.outline=b),void 0!==f&&(this.width=f),void 0!==g&&(this.height=g)):(this.xoffset=e.pt2px(c.xoffset),this.yoffset=e.pt2px(c.yoffset),this.width=e.pt2px(c.width),this.height=e.pt2px(c.height),b=c.imageData,!(9>a("ie"))&&b&&(f=this.url,this.url="data:"+(c.contentType||"image")+";base64,"+b,this.imageData=f)):(n.mixin(this,d),this.width=e.pt2px(this.width),this.height=e.pt2px(this.height))},setWidth:function(a){this.width=a;return this},setHeight:function(a){this.height=
1352a;return this},setOffset:function(a,b){this.xoffset=a;this.yoffset=b;return this},setUrl:function(a){a!==this.url&&(delete this.imageData,delete this.contentType);this.url=a;return this},setXScale:function(a){this.xscale=a;return this},setYScale:function(a){this.yscale=a;return this},getStroke:function(){return this.outline&&this.outline.getStroke()}
1352,getFill:function(){return n.mixin({},e.defaultPattern,{src:this.url,width:this.width*this.xscale,height:this.height*this.yscale,x:this.xoffset,y:this.yoffset})},
1353getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 E"},fill:this.getFill(),stroke:this.getStroke()}},toJson:function(){var a=this.url,b=this.imageData;if(0===a.indexOf("data:"))var d=a,a=b,b=d.indexOf(";base64,")+8,b=d.substr(b);if(n.isString(a)&&(0===a.indexOf("/")||0===a.indexOf("//")||0===a.indexOf("./")||0===a.indexOf("../")))a=q.getAbsoluteUrl(a);var d=e.px2pt(this.width),d=isNaN(d)?void 0:d,g=e.px2pt(this.height),g=isNaN(g)?void 0:
1354g,l=e.px2pt(this.xoffset),l=isNaN(l)?void 0:l,s=e.px2pt(this.yoffset),s=isNaN(s)?void 0:s,a=h.fixJson(n.mixin(this.inherited("toJson",arguments),{type:"esriPFS",url:a,imageData:b,contentType:this.contentType,width:d,height:g,xoffset:l,yoffset:s,xscale:this.xscale,yscale:this.yscale}));a.imageData||delete a.imageData;return a}});p.defaultProps=d;a("extend-esri")&&(n.setObject("symbol.PictureFillSymbol",p,l),l.symbol.defaultPictureFillSymbol=d);return p})},"dojo/html":function(){define("./_base/kernel ./_base/lang ./_base/array ./_base/declare ./dom ./dom-construct ./parser".split(" "),
1355function(p,n,a,e,l,h,q){var g=0,d={_secureForInnerHtml:function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")},_emptyNode:h.empty,_setNodeContent:function(a,b){h.empty(a);if(b)if("string"==typeof b&&(b=h.toDom(b,a.ownerDocument)),!b.nodeType&&n.isArrayLike(b))for(var d=b.length,e=0;e<b.length;e=d==b.length?e+1:0)h.place(b[e],a,"last");else h.place(b,a,"last");return a},_ContentSetter:e("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,
1356parseContent:!1,parserScope:p._scopeName,startup:!0,constructor:function(a,b){n.mixin(this,a||{});b=this.node=l.byId(this.node||b);this.id||(this.id=["Setter",b?b.id||b.tagName:"",g++].join("_"))},set:function(a,b){void 0!==a&&(this.content=a);b&&this._mixin(b);this.onBegin();this.setContent();var d=this.onEnd();return d&&d.then?d:this.node},setContent:function(){var a=this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=d._setNodeContent(a,this.content)}catch(b){var f=
1357this.onContentError(b);try{a.innerHTML=f}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e)}}this.node=a},empty:function(){this.parseDeferred&&(this.parseDeferred.isResolved()||this.parseDeferred.cancel(),delete this.parseDeferred);this.parseResults&&this.parseResults.length&&(a.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);h.empty(this.node)},onBegin:function(){var a=this.content;if(n.isString(a)&&
1358(this.cleanContent&&(a=d._secureForInnerHtml(a)),this.extractContent)){var b=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+a},onExecError:function(a){return"Error occurred executing scripts: "+a},
1359_mixin:function(a){var b={},d;for(d in a)d in b||(this[d]=a[d])},_parse:function(){var c=this.node;try{var b={};a.forEach(["dir","lang","textDir"],function(a){this[a]&&(b[a]=this[a])},this);var d=this;this.parseDeferred=q.parse({rootNode:c,noStart:!this.startup,inherited:b,scope:this.parserScope}).then(function(a){return d.parseResults=a},function(a){d._onError("Content",a,"Error parsing in _ContentSetter#"+this.id)})}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}},
1360_onError:function(a,b,f){a=this["on"+a+"Error"].call(this,b);f?console.error(f,b):a&&d._setNodeContent(this.node,a,!0)}}),set:function(a,b,f){void 0==b&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),b="");return f?(new d._ContentSetter(n.mixin(f,{content:b,node:a}))).set():d._setNodeContent(a,b,!0)}};n.setObject("dojo.html",d);return d})},"esri/layers/DataSource":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(p,n,a,e){p=p(null,
1361{declaredClass:"esri.layers.DataSource",constructor:function(a){a&&n.mixin(this,a)},toJson:function(){}});a("extend-esri")&&n.setObject("layers.DataSource",p,e);return p})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),function(p,n,a,e,l,h,q){var g;return g=p("dijit.form.ValidationTextBox",l,{templateString:q,required:!1,promptMessage:"",
1362invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(a,c){c!=g.prototype[a]&&
1362(n.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+a+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",c))},_setRegExpGenAttr:function(a){this._deprecateRegExp("regExpGen",a);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(a){this._deprecateRegExp("regExp",
1363a)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(a,c){return RegExp("^(?:"+this._computeRegexp(c)+")"+(this.required?"":"?")+"$").test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||void 0!==this.parse(a,c))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,this.get("constraints"))},_isEmpty:function(a){return(this.trim?/^\s*$/:/^$/).test(a)},getErrorMessage:function(){var a=
1364"$_unset_$"==this.invalidMessage?this.messages.invalidMessage:!this.invalidMessage?this.promptMessage:this.invalidMessage,c="$_unset_$"==this.missingMessage?this.messages.missingMessage:!this.missingMessage?a:this.missingMessage;return this.required&&this._isEmpty(this.textbox.value)?c:a},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(a){var c="",b=this.disabled||this.isValid(a);b&&(this._maskValidSubsetError=!0);var f=this._isEmpty(this.textbox.value),
1365e=!b&&a&&this._isValidSubset();this._set("state",b?"":((!this._hasBeenBlurred||a)&&f||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&a)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=a&&e,c=this.getErrorMessage(a)):"Incomplete"==this.state?(c=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):f&&(c=this.getPromptMessage(a));this.set("message",c);return b},displayMessage:function(a){a&&
1366this.focused?h.show(a,this.domNode,this.tooltipPosition,!this.isLeftToRight()):h.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(d){this.constraints=a.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(a){!a.locale&&this.lang&&(a.locale=this.lang);this._set("constraints",a);this._refreshState()},_setPatternAttr:function(a){this._set("pattern",
1367a);this._refreshState()},_computeRegexp:function(a){var c=this.pattern;"function"==typeof c&&(c=c.call(this,a));if(c!=this._lastRegExp){var b="";this._lastRegExp=c;".*"!=c&&c.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":b+=a;break;case ")":b+="|$)";break;default:b+="(?:"+a+"|$)"}});try{"".search(b)}catch(f){b=this.pattern,console.warn("RegExp error in "+this.declaredClass+": "+this.pattern)}this._partialre=
1368"^(?:"+b+")$"}return c},postMixInProperties:function(){this.inherited(arguments);this.messages=e.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);this.focusNode.setAttribute("aria-required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=
1369!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},destroy:function(){h.hide(this.domNode);this.inherited(arguments)}})})},"dijit/selection":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/sniff dojo/_base/window dijit/focus".split(" "),function(p,n,a,e,l,h){var q=function(d){var c=d.document;this.getType=function(){if(c.getSelection){var a="text",f;try{f=d.getSelection()}catch(e){}f&&1==f.rangeCount&&(f=f.getRangeAt(0),f.startContainer==
1370f.endContainer&&(1==f.endOffset-f.startOffset&&3!=f.startContainer.nodeType)&&(a="control"));return a}return c.selection.type.toLowerCase()};
1370this.getSelectedText=function(){if(c.getSelection){var a=d.getSelection();return a?a.toString():""}return"control"==this.getType()?null:c.selection.createRange().text};this.getSelectedHtml=function(){if(c.getSelection){var a=d.getSelection();if(a&&a.rangeCount){var f,e="";for(f=0;f<a.rangeCount;f++){var g=a.getRangeAt(f).cloneContents(),h=c.createElement("div");
1371h.appendChild(g);e+=h.innerHTML}return e}return null}return"control"==this.getType()?null:c.selection.createRange().htmlText};this.getSelectedElement=function(){if("control"==this.getType()){if(c.getSelection){var a=d.getSelection();return a.anchorNode.childNodes[a.anchorOffset]}if((a=c.selection.createRange())&&a.item)return c.selection.createRange().item(0)}return null};this.getParentElement=function(){if("control"==this.getType()){var a=this.getSelectedElement();if(a)return a.parentNode}else if(c.getSelection){if(a=
1372c.getSelection()){for(a=a.anchorNode;a&&1!=a.nodeType;)a=a.parentNode;return a}}else return a=c.selection.createRange(),a.collapse(!0),a.parentElement();return null};this.hasAncestorElement=function(a){return null!=this.getAncestorElement.apply(this,arguments)};this.getAncestorElement=function(a){var c=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(c,arguments)};this.isTag=function(a,c){if(a&&a.tagName)for(var d=a.tagName.toLowerCase(),e=0;e<c.length;e++){var g=String(c[e]).toLowerCase();
1373if(d==g)return g}return""};this.getParentOfType=function(a,c){for(;a;){if(this.isTag(a,c).length)return a;a=a.parentNode}return null};this.collapse=function(a){if(c.getSelection){var f=d.getSelection();f.removeAllRanges?a?f.collapseToStart():f.collapseToEnd():f.collapse(a)}else f=c.selection.createRange(),f.collapse(a),f.select()};this.remove=function(){var a=c.selection;c.getSelection?(a=d.getSelection(),a.deleteFromDocument()):"none"!=a.type.toLowerCase()&&a.clear();return a};this.selectElementChildren=
1374function(a,f){var g;a=n.byId(a);if(c.getSelection){var h=d.getSelection();e("opera")?(g=h.rangeCount?h.getRangeAt(0):c.createRange(),g.setStart(a,0),g.setEnd(a,3==a.nodeType?a.length:a.childNodes.length),h.addRange(g)):h.selectAllChildren(a)}else if(g=a.ownerDocument.body.createTextRange(),g.moveToElementText(a),!f)try{g.select()}catch(l){}};this.selectElement=function(a,d){var g;a=n.byId(a);if(c.getSelection){var h=c.getSelection();g=c.createRange();h.removeAllRanges&&(e("opera")&&h.getRangeAt(0)&&
1375(g=h.getRangeAt(0)),g.selectNode(a),h.removeAllRanges(),h.addRange(g))}else try{h=a.tagName?a.tagName.toLowerCase():"",g="img"===h||"table"===h?l.body(c).createControlRange():l.body(c).createRange(),g.addElement(a),d||g.select()}catch(s){this.selectElementChildren(a,d)}};this.inSelection=function(a){if(a){var f,e;if(c.getSelection){var g=d.getSelection();g&&0<g.rangeCount&&(e=g.getRangeAt(0));if(e&&e.compareBoundaryPoints&&c.createRange)try{if(f=c.createRange(),f.setStart(a,0),1===e.compareBoundaryPoints(e.START_TO_END,
1376f))return!0}catch(h){}}else{e=c.selection.createRange();try{f=a.ownerDocument.body.createTextRange(),f.moveToElementText(a)}catch(k){}if(e&&f&&1===e.compareEndPoints("EndToStart",f))return!0}}return!1};this.getBookmark=function(){var a,f,e=c.selection,g=h.curNode;
1376if(c.getSelection){if(e=d.getSelection())if(e.isCollapsed){if(a=g?g.tagName:"")if(a=a.toLowerCase(),"textarea"==a||"input"==a&&(!g.type||"text"==g.type.toLowerCase()))return e={start:g.selectionStart,end:g.selectionEnd,node:g,pRange:!0},
1377{isCollapsed:e.end<=e.start,mark:e};a={isCollapsed:!0};e.rangeCount&&(a.mark=e.getRangeAt(0).cloneRange())}else f=e.getRangeAt(0),a={isCollapsed:!1,mark:f.cloneRange()}}else if(e){a=g?g.tagName:"";a=a.toLowerCase();if(g&&a&&("button"==a||"textarea"==a||"input"==a)){if(e.type&&"none"==e.type.toLowerCase())return{isCollapsed:!0,mark:null};f=e.createRange();return{isCollapsed:f.text&&f.text.length?!1:!0,mark:{range:f,pRange:!0}}}a={};try{f=e.createRange(),a.isCollapsed=!("Text"==e.type?f.htmlText.length:
1378f.length)}catch(l){return a.isCollapsed=!0,a}if("CONTROL"==e.type.toUpperCase())if(f.length){a.mark=[];e=0;for(g=f.length;e<g;)a.mark.push(f.item(e++))}else a.isCollapsed=!0,a.mark=null;else a.mark=f.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a};this.moveToBookmark=function(b){if(b=b.mark)if(c.getSelection){var f=d.getSelection();f&&f.removeAllRanges?b.pRange?(f=b.node,f.selectionStart=b.start,f.selectionEnd=b.end):(f.removeAllRanges(),f.addRange(b)):
1379console.warn("No idea how to restore selection for this browser!")}else if(c.selection&&b){var e;b.pRange?e=b.range:a.isArray(b)?(e=c.body.createControlRange(),p.forEach(b,function(a){e.addElement(a)})):(e=c.body.createTextRange(),e.moveToBookmark(b));e.select()}};this.isCollapsed=function(){return this.getBookmark().isCollapsed}},g=new q(window);g.SelectionManager=q;return g})},"dijit/_base":function(){define("./main ./a11y ./WidgetSet ./_base/focus ./_base/manager ./_base/place ./_base/popup ./_base/scroll ./_base/sniff ./_base/typematic ./_base/wai ./_base/window".split(" "),
1380function(p){return p._base})},"dijit/_base/typematic":function(){define(["../typematic"],function(){})},"esri/symbols/ShieldLabelSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang ../urlUtils ./MarkerSymbol ./Font".split(" "),function(p,n,a,e,l,h,q,g,d){var c={url:"",width:12,height:12,angle:0,xoffset:0,yoffset:0};p=p(g,{declaredClass:"esri.symbol.ShieldLabelSymbol",type:"shieldlabelsymbol",color:[255,255,255,1],width:32,height:32,font:e.defaultFont,
1381constructor:function(b,d,g,h,l){b?n.isString(b)?(this.url=b,d&&(this.color=d),g&&(this.width=g),h&&(this.height=h),void 0!==l&&(this.font=l)):(this.width=e.pt2px(b.width),this.height=e.pt2px(b.height),d=b.imageData,!(9>a("ie"))&&d&&(g=this.url,this.url="data:"+(b.contentType||"image")+";base64,"+d,this.imageData=g)):n.mixin(this,c)},getStroke:function(){return null},getFill:function(){return this.color},setWidth:function(a){this.width=a;return this},setHeight:function(a){this.height=a;return this},
1382setUrl:function(a){a!==this.url&&(delete this.imageData,delete this.contentType);this.url=a;return this},setFont:function(a){this.font=a;return this},setText:function(a){this.text=a;return this},getWidth:function(){return this.width},getHeight:function(){return this.height},getShapeDescriptors:function(){return{defaultShape:{type:"image",x:-Math.round(this.width/2),y:-Math.round(this.height/2),width:this.width,height:this.height,src:this.url||""},fill:null,stroke:null}},toJson:function(){var a=this.url,
1383c=this.imageData;if(0===a.indexOf("data:"))var g=a,a=c,c=g.indexOf(";base64,")+8,c=g.substr(c);var a=q.getAbsoluteUrl(a),g=e.px2pt(this.width),g=isNaN(g)?void 0:g,l=e.px2pt(this.height),l=isNaN(l)?void 0:l,a=h.fixJson(n.mixin(this.inherited("toJson",arguments),{type:"esriSHD",url:a,imageData:c,contentType:this.contentType,width:g,height:l}));this.font?(c=new d(this.font),a.font=c.toJson()):a.font=null;delete a.size;a.imageData||delete a.imageData;return a}});p.defaultProps=c;a("extend-esri")&&(n.setObject("symbol.ShieldLabelSymbol",
1384p,l),l.symbol.defaultShieldLabelSymbol=c);return p})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),function(p,n,a,e,l,h,q){n.add("rtl-adjust-position-for-verticalScrollBar",function(d,c){var b=a.body(c),f=q.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},b,"last"),e=q.create("div",{style:{overflow:"hidden",
1385direction:"ltr"}},f,"last"),g=0!=l.position(e).x;f.removeChild(e);b.removeChild(f);return g});n.add("position-fixed-support",function(d,c){var b=a.body(c),f=q.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},b,"last"),e=q.create("span",{style:{position:"fixed",left:"0",top:"0"}},f,"last"),g=l.position(e).x!=l.position(f).x;f.removeChild(e);b.removeChild(f);return g});var g={getBox:function(d){d=d||a.doc;var c="BackCompat"==d.compatMode?a.body(d):d.documentElement,
1386b=l.docScroll(d);if(n("touch")){var f=g.get(d);d=f.innerWidth||c.clientWidth;
1386c=f.innerHeight||c.clientHeight}else d=c.clientWidth,c=c.clientHeight;return{l:b.x,t:b.y,w:d,h:c}},get:function(a){if(n("ie")&&g!==document.parentWindow){a.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var c=a._parentWindow;a._parentWindow=null;return c}return a.parentWindow||a.defaultView},scrollIntoView:function(d,c){try{d=e.byId(d);var b=d.ownerDocument||a.doc,f=a.body(b),g=b.documentElement||
1387f.parentNode,p=n("ie"),s=n("webkit");if(!(d==f||d==g))if(!n("mozilla")&&(!p&&!s&&!n("opera")&&!n("trident"))&&"scrollIntoView"in d)d.scrollIntoView(!1);else{var k="BackCompat"==b.compatMode,r=Math.min(f.clientWidth||g.clientWidth,g.clientWidth||f.clientWidth),q=Math.min(f.clientHeight||g.clientHeight,g.clientHeight||f.clientHeight),b=s||k?f:g,x=c||l.position(d),v=d.parentNode,s=function(a){return 6>=p||7==p&&k?!1:n("position-fixed-support")&&"fixed"==h.get(a,"position").toLowerCase()},z=this,w=function(a,
1388b,c){"BODY"==a.tagName||"HTML"==a.tagName?z.get(a.ownerDocument).scrollBy(b,c):(b&&(a.scrollLeft+=b),c&&(a.scrollTop+=c))};if(!s(d))for(;v;){v==f&&(v=b);var y=l.position(v),B=s(v),G="rtl"==h.getComputedStyle(v).direction.toLowerCase();if(v==b){y.w=r;y.h=q;if(b==g&&(p||n("trident"))&&G)y.x+=b.offsetWidth-y.w;if(0>y.x||!p||9<=p||n("trident"))y.x=0;if(0>y.y||!p||9<=p||n("trident"))y.y=0}else{var D=l.getPadBorderExtents(v);y.w-=D.w;y.h-=D.h;y.x+=D.l;y.y+=D.t;var A=v.clientWidth,C=y.w-A;0<A&&0<C&&(G&&
1389n("rtl-adjust-position-for-verticalScrollBar")&&(y.x+=C),y.w=A);A=v.clientHeight;C=y.h-A;0<A&&0<C&&(y.h=A)}B&&(0>y.y&&(y.h+=y.y,y.y=0),0>y.x&&(y.w+=y.x,y.x=0),y.y+y.h>q&&(y.h=q-y.y),y.x+y.w>r&&(y.w=r-y.x));var E=x.x-y.x,I=x.y-y.y,H=E+x.w-y.w,L=I+x.h-y.h,J,F;if(0<H*E&&(v.scrollLeft||v==b||v.scrollWidth>v.offsetHeight)){J=Math[0>E?"max":"min"](E,H);if(G&&(8==p&&!k||9<=p||n("trident")))J=-J;F=v.scrollLeft;w(v,J,0);J=v.scrollLeft-F;x.x-=J}if(0<L*I&&(v.scrollTop||v==b||v.scrollHeight>v.offsetHeight))J=
1390Math.ceil(Math[0>I?"max":"min"](I,L)),F=v.scrollTop,w(v,0,J),J=v.scrollTop-F,x.y-=J;v=v!=b&&!B&&v.parentNode}}}catch(K){console.error("scrollIntoView: "+K),d.scrollIntoView(!1)}}};p.setObject("dojo.window",g);return g})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(p,n,a,e,l){var h={};p.setObject("dojo.number",h);h.format=function(a,d){d=p.mixin({},d||{});var c=n.normalizeLocale(d.locale),c=n.getLocalization("dojo.cldr","number",
1391c);d.customs=c;c=d.pattern||c[(d.type||"decimal")+"Format"];return isNaN(a)||Infinity==Math.abs(a)?null:h._applyPattern(a,c,d)};h._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;h._applyPattern=function(a,d,c){c=c||{};var b=c.customs.group,f=c.customs.decimal;d=d.split(";");var e=d[0];d=d[0>a?1:0]||"-"+e;if(-1!=d.indexOf("%"))a*=100;else if(-1!=d.indexOf("\u2030"))a*=1E3;else if(-1!=d.indexOf("\u00a4"))b=c.customs.currencyGroup||b,f=c.customs.currencyDecimal||f,d=d.replace(/\u00a4{1,3}/,function(a){return c[["symbol",
1392"currency","displayName"][a.length-1]]||c.currency||""});else if(-1!=d.indexOf("E"))throw Error("exponential notation not supported");var l=h._numberPatternRE,e=e.match(l);if(!e)throw Error("unable to find a number expression in pattern: "+d);!1===c.fractional&&(c.places=0);return d.replace(l,h._formatAbsolute(a,e[0],{decimal:f,group:b,places:c.places,round:c.round}))};h.round=function(a,d,c){c=10/(c||10);return(c*+a).toFixed(d)/c};if(0==(0.9).toFixed()){var q=h.round;h.round=function(a,d,c){var b=
1393Math.pow(10,-d||0),f=Math.abs(a);if(!a||f>=b)b=0;else if(f/=b,0.5>f||0.95<=f)b=0;return q(a,d,c)+(0<a?b:-b)}}h._formatAbsolute=function(a,d,c){c=c||{};!0===c.places&&(c.places=0);Infinity===c.places&&(c.places=6);d=d.split(".");var b="string"==typeof c.places&&c.places.indexOf(","),f=c.places;b?f=c.places.substring(b+1):0<=f||(f=(d[1]||[]).length);0>c.round||(a=h.round(a,f,c.round));a=String(Math.abs(a)).split(".");var m=a[1]||"";d[1]||c.places?(b&&(c.places=c.places.substring(0,b)),b=void 0!==c.places?
1394c.places:d[1]&&d[1].lastIndexOf("0")+1,b>m.length&&(a[1]=e.pad(m,b,"0",!0)),f<m.length&&(a[1]=m.substr(0,f))):a[1]&&a.pop();f=d[0].replace(",","");b=f.indexOf("0");-1!=b&&(b=f.length-b,b>
1394a[0].length&&(a[0]=e.pad(a[0],b)),-1==f.indexOf("#")&&(a[0]=a[0].substr(a[0].length-b)));var f=d[0].lastIndexOf(","),l,n;-1!=f&&(l=d[0].length-f-1,d=d[0].substr(0,f),f=d.lastIndexOf(","),-1!=f&&(n=d.length-f-1));d=[];for(f=a[0];f;)b=f.length-l,d.push(0<b?f.substr(b):f),f=0<b?f.slice(0,b):"",n&&(l=n,delete n);a[0]=
1395d.reverse().join(c.group||",");return a.join(c.decimal||".")};h.regexp=function(a){return h._parseInfo(a).regexp};h._parseInfo=function(a){a=a||{};var d=n.normalizeLocale(a.locale),d=n.getLocalization("dojo.cldr","number",d),c=a.pattern||d[(a.type||"decimal")+"Format"],b=d.group,f=d.decimal,e=1;if(-1!=c.indexOf("%"))e/=100;else if(-1!=c.indexOf("\u2030"))e/=1E3;else{var p=-1!=c.indexOf("\u00a4");p&&(b=d.currencyGroup||b,f=d.currencyDecimal||f)}d=c.split(";");1==d.length&&d.push("-"+d[0]);d=l.buildGroupRE(d,
1396function(c){c="(?:"+l.escapeString(c,".")+")";return c.replace(h._numberPatternRE,function(c){var d={signed:!1,separator:a.strict?b:[b,""],fractional:a.fractional,decimal:f,exponent:!1};c=c.split(".");var l=a.places;1==c.length&&1!=e&&(c[1]="###");1==c.length||0===l?d.fractional=!1:(void 0===l&&(l=a.pattern?c[1].lastIndexOf("0")+1:Infinity),l&&void 0==a.fractional&&(d.fractional=!0),!a.places&&l<c[1].length&&(l+=","+c[1].length),d.places=l);c=c[0].split(",");1<c.length&&(d.groupSize=c.pop().length,
13971<c.length&&(d.groupSize2=c.pop().length));return"("+h._realNumberRegexp(d)+")"})},!0);p&&(d=d.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(b,c,d,f){b=l.escapeString(a[["symbol","currency","displayName"][d.length-1]]||a.currency||"");c=c?"[\\s\\xa0]":"";f=f?"[\\s\\xa0]":"";return!a.strict?(c&&(c+="*"),f&&(f+="*"),"(?:"+c+b+f+")?"):c+b+f}));return{regexp:d.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:b,decimal:f,factor:e}};h.parse=function(a,d){var c=h._parseInfo(d),b=RegExp("^"+c.regexp+"$").exec(a);
1398if(!b)return NaN;var f=b[1];if(!b[1]){if(!b[2])return NaN;f=b[2];c.factor*=-1}f=f.replace(RegExp("["+c.group+"\\s\\xa0]","g"),"").replace(c.decimal,".");return f*c.factor};h._realNumberRegexp=function(a){a=a||{};"places"in a||(a.places=Infinity);"string"!=typeof a.decimal&&(a.decimal=".");if(!("fractional"in a)||/^0/.test(a.places))a.fractional=[!0,!1];"exponent"in a||(a.exponent=[!0,!1]);"eSigned"in a||(a.eSigned=[!0,!1]);var d=h._integerRegexp(a),c=l.buildGroupRE(a.fractional,function(b){var c=
1399"";b&&0!==a.places&&(c="\\"+a.decimal,c=Infinity==a.places?"(?:"+c+"\\d+)?":c+("\\d{"+a.places+"}"));return c},!0),b=l.buildGroupRE(a.exponent,function(b){return b?"([eE]"+h._integerRegexp({signed:a.eSigned})+")":""}),d=d+c;c&&(d="(?:(?:"+d+")|(?:"+c+"))");return d+b};h._integerRegexp=function(a){a=a||{};"signed"in a||(a.signed=[!0,!1]);"separator"in a?"groupSize"in a||(a.groupSize=3):a.separator="";var d=l.buildGroupRE(a.signed,function(a){return a?"[-+]":""},!0),c=l.buildGroupRE(a.separator,function(b){if(!b)return"(?:\\d+)";
1400b=l.escapeString(b);" "==b?b="\\s":"\u00a0"==b&&(b="\\s\\xa0");var c=a.groupSize,d=a.groupSize2;return d?(b="(?:0|[1-9]\\d{0,"+(d-1)+"}(?:["+b+"]\\d{"+d+"})*["+b+"]\\d{"+c+"})",0<c-d?"(?:"+b+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":b):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+b+"]\\d{"+c+"})*)"},!0);return d+c};return h})},"esri/geometry/Polygon":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ./Point ./Extent ./mathUtils ../srUtils".split(" "),
1401function(p,n,a,e,l,h,q,g,d,c,b,f){var m={type:"polygon",rings:null},t=p(g,{declaredClass:"esri.geometry.Polygon",constructor:function(b){a.mixin(this,m);this.rings=[];this._ring=0;b&&(a.isArray(b)?this.rings=a.isArray(b[0][0])?b:[b]:b.rings?a.mixin(this,b):this.spatialReference=b,this.spatialReference&&(this.spatialReference=f.createSpatialReference(this.spatialReference)));this.verifySR()},addRing:function(b){this.clearCache();this._ring=this.rings.length;this.rings[this._ring]=[];a.isArray(b[0])?
1402n.forEach(b,this._addPointArr,this):n.forEach(b,this._addPoint,this);return this},_addPointArr:function(a){this.rings[this._ring].push(a)},_addPoint:function(a){this.rings[this._ring].push([a.x,a.y])},_insertPoints:function(a,b){this.clearCache();this._ring=b;this.rings[this._ring]||(this.rings[this._ring]=[]);
1402n.forEach(a,this._addPoint,this)},_validateInputs:function(a,b){return null!==a&&void 0!==a&&(0>a||a>=this.rings.length)||null!==b&&void 0!==a&&(0>b||b>=this.rings[a].length)?!1:!0},getPoint:function(a,
1403b){if(this._validateInputs(a,b))return new d(this.rings[a][b],this.spatialReference)},setPoint:function(a,b,c){if(this._validateInputs(a,b))return this.clearCache(),this.rings[a][b]=[c.x,c.y],this},insertPoint:function(a,b,c){if(this._validateInputs(a)&&h.isDefined(b)&&0<=b&&b<=this.rings[a].length)return this.clearCache(),this.rings[a].splice(b,0,[c.x,c.y]),this},removeRing:function(a){if(this._validateInputs(a,null)){this.clearCache();a=this.rings.splice(a,1)[0];var b,c=a.length,f=this.spatialReference;
1404for(b=0;b<c;b++)a[b]=new d(a[b],f);return a}},removePoint:function(a,b){if(this._validateInputs(a,b))return this.clearCache(),new d(this.rings[a].splice(b,1)[0],this.spatialReference)},getExtent:function(){var a;a=this.getCacheValue("_extent");var b=this.getCacheValue("_partwise");if(a)return a=new c(a),a._partwise=b,a;a=this.rings;var d=a.length;if(d&&a[0].length){var f,e,g,h,m,l,n,p,q=h=a[0][0][0],t=m=a[0][0][1],C=Math.min,E=Math.max,I=this.spatialReference,b=[],H,L,J,F;for(l=0;l<d;l++){f=a[l];
1405H=L=f[0]&&f[0][0];J=F=f[0]&&f[0][1];p=f.length;for(n=0;n<p;n++)e=f[n],g=e[0],e=e[1],q=C(q,g),t=C(t,e),h=E(h,g),m=E(m,e),H=C(H,g),J=C(J,e),L=E(L,g),F=E(F,e);b.push(new c({xmin:H,ymin:J,xmax:L,ymax:F,spatialReference:I?I.toJson():null}))}a={xmin:q,ymin:t,xmax:h,ymax:m,spatialReference:I?I.toJson():null};b=1<b.length?b:null;this.setCacheValue("_extent",a);this.setCacheValue("_partwise",b);a=new c(a);a._partwise=b;return a}},contains:function(a){var b=this.rings,c,f=!1,e,g,h,m,l,n,p=b.length;c=this.spatialReference;
1406e=a.spatialReference;var q=a.x;a=a.y;c&&(e&&!c.equals(e)&&c._canProject(e))&&(a=c.isWebMercator()?d.lngLatToXY(q,a):d.xyToLngLat(q,a,!0),q=a[0],a=a[1]);for(n=0;n<p;n++){c=b[n];h=c.length;for(l=m=0;l<h;l++)if(m++,m===h&&(m=0),e=c[l],g=c[m],(e[1]<a&&g[1]>=a||g[1]<a&&e[1]>=a)&&e[0]+(a-e[1])/(g[1]-e[1])*(g[0]-e[0])<q)f=!f}return f},getCentroid:function(){var a=this.getCacheValue("_centroid");if(void 0!==a)return a;var a=this.rings,b,c,f,e=[],g,h;n.forEach(a,function(a){b=c=f=0;n.forEach(a,function(d,
1407e){e<a.length-1&&(g=a[e+1],h=d[0]*g[1]-g[0]*d[1],b+=(d[0]+g[0])*h,c+=(d[1]+g[1])*h,f+=h)});0<f&&(f*=-1);f&&e.push([b,c,f/2])});e.sort(function(a,b){return a[2]-b[2]});b=c=void 0;if(e[0])a=6*e[0][2],b=e[0][0]/a,c=e[0][1]/a;else if(a=a[0]&&a[0].length?this._getLineCentroid(a[0]):null)b=a.x,c=a.y;a=isNaN(b)||isNaN(c)?null:new d(b,c,this.spatialReference);this.setCacheValue("_centroid",a);return a},_getLineCentroid:function(a){var c,d=0,f=0,e=0,g,h,m={x:0,y:0},l={x:0,y:0},n,p=a.length,q;for(n=0;n<p-1;n++)g=
1408a[n],h=a[n+1],g&&h&&(m.x=g[0],m.y=g[1],l.x=h[0],l.y=h[1],c=b.getLength(m,l),0<c&&(d+=c,g=b.getMidpoint(g,h),f+=c*g[0],e+=c*g[1]));0<d?q={x:f/d,y:e/d}:a[0]&&(q={x:a[0][0],y:a[0][1]});return q},isClockwise:function(b){var c=0,d,f=b.length,e=a.isArray(b[0])?function(a,b){return a[0]*b[1]-b[0]*a[1]}:function(a,b){return a.x*b.y-b.x*a.y};for(d=0;d<f;d++)c+=e(b[d],b[(d+1)%f]);return 0>=c/2},isSelfIntersecting:function(a){a=a||this;var c,d,f,e,g,h,m,l=a.rings.length,n;for(f=0;f<l;f++){for(c=0;c<a.rings[f].length-
14091;c++){g=[[a.rings[f][c][0],a.rings[f][c][1]],[a.rings[f][c+1][0],a.rings[f][c+1][1]]];for(d=f+1;d<l;d++)for(e=0;e<a.rings[d].length-1;e++)if(h=[[a.rings[d][e][0],a.rings[d][e][1]],[a.rings[d][e+1][0],a.rings[d][e+1][1]]],(m=b._getLineIntersection2(g,h))&&!(m[0]===g[0][0]&&m[1]===g[0][1]||m[0]===h[0][0]&&m[1]===h[0][1]||m[0]===g[1][0]&&m[1]===g[1][1]||m[0]===h[1][0]&&m[1]===h[1][1]))return!0}e=a.rings[f].length;if(!(4>=e))for(c=0;c<e-3;c++){n=e-1;0===c&&(n=e-2);g=[[a.rings[f][c][0],a.rings[f][c][1]],
1410[a.rings[f][c+1][0],a.rings[f][c+1][1]]];for(d=c+2;d<n;d++)if(h=[[a.rings[f][d][0],a.rings[f][d][1]],[a.rings[f][d+1][0],a.rings[f][d+1][1]]],(m=b._getLineIntersection2(g,h))&&!(m[0]===g[0][0]&&m[1]===g[0][1]||m[0]===h[0][0]&&m[1]===h[0][1]||m[0]===g[1][0]&&m[1]===g[1][1]||m[0]===h[1][0]&&m[1]===h[1][1]))return!0}}return!1},toJson:function(){var b={rings:a.clone(this.rings)},c=this.spatialReference;
1410c&&(b.spatialReference=c.toJson());return b}});t.defaultProps=m;t.createEllipse=function(a){var b=a.center.x,
1411c=a.center.y,d=a.longAxis,f=a.shortAxis,e=a.numberOfPoints,g=a.map,h,m,l;a=[];var n=2*Math.PI/e;for(m=0;m<e;m++)h=Math.cos(m*n),l=Math.sin(m*n),h=g.toMap({x:d*h+b,y:f*l+c}),a.push(h);a.push(a[0]);b=new t(g.spatialReference);b.addRing(a);return b};t.createCircle=function(a){return t.createEllipse({center:a.center,longAxis:a.r,shortAxis:a.r,numberOfPoints:a.numberOfPoints,map:a.map})};t.fromExtent=function(a){var b=a.normalize();a=a.spatialReference;return new t({rings:n.map(b,function(a){return[[a.xmin,
1412a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]}),spatialReference:a?a.toJson():null})};e("extend-esri")&&(a.setObject("geometry.Polygon",t,l),l.geometry.defaultPolygon=m,l.geometry.createEllipse=t.createEllipse,l.geometry.createCircle=t.createCircle,l.geometry.isClockwise=t.prototype.isClockwise,l.geometry.polygonSelfIntersecting=t.prototype.isSelfIntersecting);return t})},"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(" "),
1413function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k){p=p(null,{declaredClass:"esri.PopupInfo",initialize:function(b,c){if(b){n.mixin(this,c);this.info=b;this.title=this.getTitle;this.content=this.getContent;var d=this._fieldLabels={},f=this._fieldsMap={};b.fieldInfos&&a.forEach(b.fieldInfos,function(a){var b=a.fieldName.toLowerCase();d[b]=a.label;f[b]=a});this._relatedFieldPrefix="relationships/";this.titleHasRelatedFields=!!(b.title&&-1!==b.title.indexOf("{"+this._relatedFieldPrefix))}},toJson:function(){return e.fromJson(e.toJson(this.info))},
1414getTitle:function(){},getContent:function(){},getFieldInfo:function(b){var c;a.some(this.info&&this.info.fieldInfos,function(a){a.fieldName===b&&(c=a);return!!c});return c},getComponents:function(b){var c=this.info,d=new q,f,e;c.fieldInfos&&(e=a.filter(c.fieldInfos,function(a){return-1!==a.fieldName.indexOf(this._relatedFieldPrefix)},this));e&&0<e.length&&(f=this._getRelatedRecords({graphic:b,fieldsInfo:e}));f?f.always(n.hitch(this,function(){d.resolve(this._getPopupValues(b))})):d.resolve(this._getPopupValues(b));
1415return d.promise},getAttachments:function(a){var b=a.getLayer();a=a.attributes;if(this.info.showAttachments&&(b&&b.hasAttachments&&b.objectIdField)&&(a=a&&a[b.objectIdField]))return b.queryAttachmentInfos(a)},_getPopupValues:function(b,d){var f=this.info,e=b.getLayer(),g=n.clone(b.attributes)||{},k=n.clone(g),h=f.fieldInfos,m="",l="",p,q,s,t,I,H=e&&e._getDateOpts&&e._getDateOpts().properties,H=H&&H.slice(0),L={dateFormat:{properties:H,formatter:"DateFormat"+this._insertOffset(this._dateFormats.shortDateShortTime)}};
1416if(this._relatedInfo)for(t in this._relatedInfo)if(this._relatedInfo.hasOwnProperty(t)){var J=this._relatedInfo[t],F=this._relatedLayersInfo[t];J&&(a.forEach(J.relatedFeatures,function(a){for(I in a.attributes)if(a.attributes.hasOwnProperty(I)&&"esriRelCardinalityOneToOne"===F.relation.cardinality){var b=this._toRelatedFieldName([F.relation.id,I]);g[b]=k[b]=a.attributes[I]}},this),a.forEach(J.relatedStatsFeatures,function(a){for(I in a.attributes)if(a.attributes.hasOwnProperty(I)){var b=this._toRelatedFieldName([F.relation.id,
1417I]);g[b]=k[b]=a.attributes[I]}},this))}h&&a.forEach(h,function(b){q=b.fieldName;var c=this._getLayerFieldInfo(e,q);c&&(q=b.fieldName=c.name);k[q]=this._formatValue(k[q],q,L);H&&(b.format&&b.format.dateFormat)&&(b=a.indexOf(H,q),-1<b&&H.splice(b,1))},this);if(e){t=e.types;var K=(J=e.typeIdField)&&g[J];for(q in g)if(g.hasOwnProperty(q)&&-1===q.indexOf(this._relatedFieldPrefix)&&(s=g[q],c.isDefined(s))){var M=this._getDomainName(e,b,t,K,q,s);c.isDefined(M)?k[q]=M:q===J&&(M=this._getTypeName(e,b,s),c.isDefined(M)&&
1418(k[q]=M))}}f.title&&(m=this._processFieldsInLinks(this._fixTokens(f.title,e),g),m=n.trim(c.substitute(k,m,L)||""));if(d)return{title:m};f.description&&(l=this._processFieldsInLinks(this._fixTokens(f.description,e),g),l=n.trim(c.substitute(k,l,L)||""));h&&(p=[],a.forEach(h,function(a){(q=a.fieldName)&&a.visible&&p.push([a.label||q,c.substitute(k,"${"+q+"}",L)||""])}));var N,T;f.mediaInfos&&(N=[],a.forEach(f.mediaInfos,function(b){T=0;s=b.value;switch(b.type){case "image":var d=s.sourceURL,d=d&&n.trim(c.substitute(g,
1419this._fixTokens(d,e)));T=!!d;break;case "piechart":case "linechart":case "columnchart":case "barchart":var f,d=s.normalizeField;s.fields=a.map(s.fields,function(a){return(f=this._getLayerFieldInfo(e,a))?f.name:a},this);d&&(f=this._getLayerFieldInfo(e,d),s.normalizeField=f?f.name:d);T=a.some(s.fields,function(a){return c.isDefined(g[a])||-1!==a.indexOf(this._relatedFieldPrefix)&&this._relatedInfo},this);break;default:return}if(T){b=n.clone(b);s=b.value;var d=b.title?this._processFieldsInLinks(this._fixTokens(b.title,
1420e),g):"",h=b.caption?this._processFieldsInLinks(this._fixTokens(b.caption,e),g):"";b.title=d?n.trim(c.substitute(k,d,L)||""):"";b.caption=h?n.trim(c.substitute(k,h,L)||""):"";if("image"===b.type)s.sourceURL=c.substitute(g,this._fixTokens(s.sourceURL,e)),s.linkURL&&(s.linkURL=n.trim(c.substitute(g,this._fixTokens(s.linkURL,e))||""));else{var m,l;a.forEach(s.fields,function(a,b){if(-1!==a.indexOf(this._relatedFieldPrefix))l=this._getRelatedChartInfos(a,s,g,L),l instanceof Array?s.fields=l:s.fields[b]=
1421l;
1421else{var c=g[a],c=void 0===c?null:c;m=g[s.normalizeField]||0;c&&m&&(c/=m);s.fields[b]={y:c,tooltip:(this._fieldLabels[a.toLowerCase()]||a)+":\x3cbr/\x3e"+this._formatValue(c,a,L,!!m)}}},this)}N.push(b)}},this));return{title:m,description:l,hasDescription:!!f.description,fields:p&&p.length?p:null,mediaInfos:N&&N.length?N:null,formatted:k,editSummary:e&&e.getEditSummary?e.getEditSummary(b):""}},_getRelatedChartInfos:function(b,c,d,f){var e,g,k,h,m,l;e=[];l=this._fromRelatedFieldName(b);m=l[0];g=this._relatedInfo[m];
1422m=this._relatedLayersInfo[m];g&&a.forEach(g.relatedFeatures,function(a){a=a.attributes;var g,m;for(m in a)if(a.hasOwnProperty(m)&&m===l[1]){g={};h=a[m];c.normalizeField&&(k=-1!==c.normalizeField.indexOf(this._relatedFieldPrefix)?a[this._fromRelatedFieldName(c.normalizeField)[1]]:d[c.normalizeField]);h&&k&&(h/=k);if(c.tooltipField)if(-1!==c.tooltipField.indexOf(this._relatedFieldPrefix)){var n=this._fromRelatedFieldName(c.tooltipField)[1];g.tooltip=a[n]&&"string"===typeof a[n]?a[n]+":\x3cbr/\x3e"+
1423this._formatValue(h,a[n],f,!!k):n+":\x3cbr/\x3e"+this._formatValue(h,n,f,!!k)}else g.tooltip=(this._fieldLabels[b.toLowerCase()]||b)+":\x3cbr/\x3e"+this._formatValue(h,c.tooltipField,f,!!k);else g.tooltip=h;g.y=h;e.push(g)}},this);return"esriRelCardinalityOneToMany"===m.relation.cardinality||"esriRelCardinalityManyToMany"===m.relation.cardinality?e:e[0]},_dateFormats:{shortDate:"(datePattern: 'M/d/y', selector: 'date')",shortDateLE:"(datePattern: 'd/M/y', selector: 'date')",longMonthDayYear:"(datePattern: 'MMMM d, y', selector: 'date')",
1424dayShortMonthYear:"(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')",
1425shortDateLongTime:"(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')",
1426year:"(datePattern: 'y', selector: 'date')"},_reHref:/href\s*=\s*\"([^\"]+)\"/ig,_reHrefApos:/href\s*=\s*\'([^\']+)\'/ig,_fixTokens:function(a,b){var c=this;return a.replace(/(\{([^\{\r\n]+)\})/g,function(a,d,f){a=c._getLayerFieldInfo(b,f);return"$"+(a?"{"+a.name+"}":d)})},_encodeAttributes:function(a){a=n.clone(a)||{};var b,c;for(b in a)if((c=a[b])&&"string"===typeof c)c=encodeURIComponent(c).replace(/\'/g,"\x26apos;"),a[b]=c;return a},_processFieldsInLinks:function(a,b){var c=this._encodeAttributes(b),
1427d=this;a&&(a=a.replace(this._reHref,function(a,f){return d._addValuesToHref(a,f,b,c)}).replace(this._reHrefApos,function(a,f){return d._addValuesToHref(a,f,b,c)}));return a},_addValuesToHref:function(a,b,d,f){b=b&&n.trim(b);return c.substitute(b&&0===b.indexOf("${")?d:f,a)},_getLayerFieldInfo:function(a,b){return a&&a.getField?a.getField(b):null},_formatValue:function(b,d,f,e){var g=this._fieldsMap[d.toLowerCase()],h=g&&g.format;d=-1!==a.indexOf(f.dateFormat.properties,d);var m="number"===typeof b&&
1428!d&&(!h||!h.dateFormat);if(!c.isDefined(b)||!g||!c.isDefined(h))return m?this._forceLTR(b):b;var l="",g=[],p=h.hasOwnProperty("places")||h.hasOwnProperty("digitSeparator"),q=h.hasOwnProperty("digitSeparator")?h.digitSeparator:!0;if(p&&!d)l="NumberFormat",g.push("places: "+(c.isDefined(h.places)&&(!e||0<h.places)?Number(h.places):"Infinity")),g.length&&(l+="("+g.join(",")+")");else if(h.dateFormat)l="DateFormat"+this._insertOffset(this._dateFormats[h.dateFormat]||this._dateFormats.shortDateShortTime);
1429else return m?this._forceLTR(b):b;var s=this._applyFormatting(b,l,f);p&&-1<b.constructor.toString().indexOf("Array")&&(s="",a.forEach(b,n.hitch(this,function(a){s=s+this._applyFormatting(a,l,f)+" "})));p&&!q&&k.group&&(s=s.replace(RegExp("\\"+k.group,"g"),""));return m?this._forceLTR(s):s},_applyFormatting:function(a,b,d){return c.substitute({myKey:a},"${myKey:"+b+"}",d)||""},_forceLTR:function(a){var b=g("ie");return b&&10>=b?a:"\x3cspan class\x3d'esriNumericValue'\x3e"+a+"\x3c/span\x3e"},_insertOffset:function(a){a&&
1430(a=c.isDefined(this.utcOffset)?a.replace(/\)\s*$/,", utcOffset:"+this.utcOffset+")"):a);return a},_getDomainName:function(a,b,c,d,f,e){return(a=a.getDomain&&a.getDomain(f,{feature:b}))&&a.codedValues?a.getName(e):null},_getTypeName:function(a,b,c){return(a=a.getType&&a.getType(b))&&a.name},_getRelatedRecords:function(a){var b=a.graphic,c=new q,d;this._relatedLayersInfo?this._queryRelatedLayers(b).then(n.hitch(this,function(a){this._setRelatedRecords(b,a);c.resolve(a)}),n.hitch(this,this._handlerErrorResponse,
1431c)):this._getRelatedLayersInfo(a).then(n.hitch(this,function(a){for(d in a)a.hasOwnProperty(d)&&a[d]&&(this._relatedLayersInfo[d].relatedLayerInfo=a[d]);this._queryRelatedLayers(b).then(n.hitch(this,function(a){this._setRelatedRecords(b,a);c.resolve(a)}),n.hitch(this,this._handlerErrorResponse,c))}),n.hitch(this,this._handlerErrorResponse,c));return c.promise},_getRelatedLayersInfo:function(b){var c=b.fieldsInfo,e,g,k={};e=b.graphic.getLayer();this._relatedLayersInfo||(this._relatedLayersInfo={});
1432a.forEach(c,function(b){var c,d,f,g;c=this._fromRelatedFieldName(b.fieldName);d=c[0];c=c[1];d&&(this._relatedLayersInfo[d]||(a.some(e.relationships,function(a){if(a.id==d)return g=a,!0}),g&&(this._relatedLayersInfo[d]={relation:g,relatedFields:[],outStatistics:[]})),this._relatedLayersInfo[d]&&(this._relatedLayersInfo[d].relatedFields.push(c),b.statisticType&&(f=new s,f.statisticType=b.statisticType,f.onStatisticField=c,f.outStatisticFieldName=c,this._relatedLayersInfo[d].outStatistics.push(f))))},
1433this);for(g in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(g)&&this._relatedLayersInfo[g]&&(b=this._relatedLayersInfo[g].relation,b=e.url.replace(/[0-9]+$/,b.relatedTableId),this._relatedLayersInfo[g].relatedLayerUrl=b,k[g]=f({url:b,content:{f:"json"},callbackParamName:"callback"}));return d(k)},_queryRelatedLayers:function(a){var b={},c;for(c in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(c)&&(b[c]=this._queryRelatedLayer({graphic:a,relatedInfo:this._relatedLayersInfo[c]}));
1434return d(b)},_queryRelatedLayer:function(b){var c,f,e,g,k,h,l,n,p,q;c=b.graphic;f=c.getLayer().url.match(/[0-9]+$/g)[0];n=b.relatedInfo;l=n.relatedLayerInfo;p=n.relatedLayerUrl;q=n.relation;a.some(l.relationships,function(a){if(a.relatedTableId===parseInt(f,10))return e=a,!0},this);e&&(b=new m,a.some(l.fields,function(b){if(b.name===e.keyField)return k=-1!==a.indexOf(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"],b.type)?"number":"string",!0}),g="string"===
1435k?e.keyField+"\x3d'"+c.attributes[q.keyField]+"'":e.keyField+"\x3d"+c.attributes[q.keyField],b.where=g,b.outFields=n.relatedFields,n.outStatistics&&(0<n.outStatistics.length&&l.supportsStatistics)&&(h=new m,h.where=b.where,h.outFields=b.outFields,h.outStatistics=n.outStatistics),c=new t(p),g=[],g.push(c.execute(b)),h&&g.push(c.execute(h)));return d(g)},_setRelatedRecords:function(a,b){this._relatedInfo=[];for(var d in b)if(b.hasOwnProperty(d)&&b[d]){var f=b[d];this._relatedInfo[d]={};this._relatedInfo[d].relatedFeatures=
1436f[0].features;c.isDefined(f[1])&&(this._relatedInfo[d].relatedStatsFeatures=f[1].features)}},_handlerErrorResponse:function(a,b){a.reject(b)},_fromRelatedFieldName:function(a){var b=[];-1!==a.indexOf(this._relatedFieldPrefix)&&(a=a.split("/"),b=a.slice(1));return b},_toRelatedFieldName:function(a){var b="";a&&0<a.length&&(b=this._relatedFieldPrefix+a[0]+"/"+a[1]);return b}});h("extend-esri")&&(b.PopupInfo=b.PopupInfoTemplate=p);return p})},"dijit/_WidgetsInTemplateMixin":function(){define(["dojo/_base/array",
1437"dojo/aspect","dojo/_base/declare","dojo/_base/lang","dojo/parser"],function(p,n,a,e,l){return a("dijit._WidgetsInTemplateMixin",null,{_earlyTemplatedStartup:!1,widgetsInTemplate:!0,contextRequire:null,_beforeFillContent:function(){if(this.widgetsInTemplate){var a=this.domNode;this.containerNode&&!this.searchContainerNode&&(this.containerNode.stopParser=!0);l.parse(a,{noStart:!this._earlyTemplatedStartup,template:!0,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,contextRequire:this.contextRequire,
1438scope:"dojo"}).then(e.hitch(this,function(a){this._startupWidgets=a;for(var e=0;e<a.length;e++)this._processTemplateNode(a[e],function(a,c){return a[c]},function(a,c,b){return c in a?a.connect(a,c,b):a.on(c,b,!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.");
1439}},_processTemplateNode:function(a,e,g){return e(a,"dojoType")||e(a,"data-dojo-type")?!0:this.inherited(arguments)},startup:function(){p.forEach(this._startupWidgets,function(a){a&&(!a._started&&a.startup)&&a.startup()});this._startupWidgets=null;this.inherited(arguments)}})})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(p,n,a,e){e.extend(n,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},
1440_onBlur:function(){this.onBlur()}});return a("dijit._FocusMixin",null,{_focusManager:p})})},"esri/basemaps":function(){define(["require","dojo/has","./kernel","dojo/i18n!./nls/jsapi"],function(p,n,a,e){p={streets:{title:e.basemaps.streets,thumbnailUrl:p.toUrl("./images/basemap/streets.jpg"),itemId:"d8855ee4d3d74413babfb0f41203b168",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"}]},satellite:{title:e.basemaps.satellite,thumbnailUrl:p.toUrl("./images/basemap/satellite.jpg"),
1441itemId:"86de95d4e0244cba80f0fa2c9403a7b2",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"}]},hybrid:{title:e.basemaps.hybrid,thumbnailUrl:p.toUrl("./images/basemap/hybrid.jpg"),itemId:"413fd05bbd7342f5991d5ec96f4f8b18",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",isReference:!0}]},terrain:{title:e.basemaps.terrain,
1442thumbnailUrl:p.toUrl("./images/basemap/terrain.jpg"),itemId:"aab054ab883c4a4094c72e949566ad40",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"},{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",isReference:!0}]},topo:{title:e.basemaps.topo,thumbnailUrl:p.toUrl("./images/basemap/topo.jpg"),itemId:"6e03e8c26aad4b9c92a87c1063ddb0e3",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"}]},
1443gray:{title:e.basemaps.gray,thumbnailUrl:p.toUrl("./images/basemap/gray.jpg"),itemId:"8b3b470883a744aeb60e5fff0a319ce7",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"},{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",isReference:!0}]},"dark-gray":{title:e.basemaps["dark-gray"],thumbnailUrl:p.toUrl("./images/basemap/dark-gray.jpg"),itemId:"da65bacab5bd4defb576f839b6b28098",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer"},
1444{url:"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",isReference:!0}]},oceans:{title:e.basemaps.oceans,thumbnailUrl:p.toUrl("./images/basemap/oceans.jpg"),itemId:"48b8cec7ebf04b5fbdcaf70d09daff21",baseMapLayers:[{url:"http://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"},{url:"http://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",isReference:!0}]},"national-geographic":{title:e.basemaps["national-geographic"],
1445thumbnailUrl:p.toUrl("./images/basemap/national-geographic.jpg"),itemId:"509e2d6b034246d692a461724ae2d62c",baseMapLayers:[{url:"http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer"}]},osm:{title:e.basemaps.osm,thumbnailUrl:p.toUrl("./images/basemap/osm.jpg"),itemId:"5d2bfa736f8448b3a1708e1f6be23eed",baseMapLayers:[{type:"OpenStreetMap"}]}};n("extend-esri")&&(a.basemaps=p);return p})},"esri/InfoWindowBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/Deferred dojo/dom-construct dojo/has dijit/registry ./kernel ./lang ./geometry/ScreenPoint".split(" "),
1446function(p,n,a,e,l,h,q,g,d,c,b){p=p(null,{declaredClass:"esri.InfoWindowBase",constructor:function(){var a=n.hitch;this.__set_title=a(this,this.__set_title);this.__err_title=a(this,this.__err_title);this.__set_content=a(this,this.__set_content);this.__err_content=a(this,this.__err_content)},setMap:function(a){this.map=a},unsetMap:function(a){delete this.map},setTitle:function(){},setContent:function(){},show:function(){},hide:function(){},resize:function(){},onShow:function(){},onHide:function(){},
1447place:function(a,b){c.isDefined(a)?n.isObject(a)?h.place(a,b,"only"):b.innerHTML=a:b.innerHTML=""},startupDijits:function(a){this._processDijits(a)},destroyDijits:function(a){this._processDijits(a,!0)},_processDijits:function(b,c){if(b&&1===b.children.length){var d=b.children[0];if(d){var e=g.byNode(d),d=e?[e]:g.findWidgets(d);
1447a.forEach(d,function(a){if(c){if(a._started&&!a._destroyed)try{a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy()}catch(b){console.debug("An error occurred when destroying a widget embedded within InfoWindow: "+
1448b.message)}}else if(!a._started)try{a.startup()}catch(d){console.debug("An error occurred when starting a widget embedded within InfoWindow: "+d.message)}})}}},__registerMapListeners:function(){this.__unregisterMapListeners();var a=this.map;this.__handles=[e.connect(a,"onPan",this,this.__onMapPan),e.connect(a,"onZoomStart",this,this.__onMapZmStart),e.connect(a,"onExtentChange",this,this.__onMapExtChg)]},__unregisterMapListeners:function(){var b=this.__handles;b&&(a.forEach(b,e.disconnect,e),this.__handles=
1449null)},__onMapPan:function(a,b){this.move(b,!0)},__onMapZmStart:function(){this.__mcoords=this.mapCoords||this.map.toMap(new b(this.coords));this.hide(null,!0)},__onMapExtChg:function(a,b,c){a=this.map;var d=this.mapCoords;d?this.show(d,null,!0):(b=c?a.toScreen(this.__mcoords):this.coords.offset(b&&b.x||0,b&&b.y||0),this.show(b,null,!0))},__setValue:function(a,b){this[a].innerHTML="";var d="_dfd"+a,e=this[d];e&&-1===e.fired&&(e.cancel(),this[d]=null);c.isDefined(b)&&(b instanceof l?(this[d]=b,b.addCallbacks(this["__set"+
1450a],this["__err"+a])):this.__render(a,b))},__set_title:function(a){this._dfd_title=null;this.__render("_title",a)},__err_title:function(a){this._dfd_title=null},__set_content:function(a){this._dfd_content=null;this.__render("_content",a)},__err_content:function(a){this._dfd_content=null},__render:function(a,b){var c=this[a];this.place(b,c);this.isShowing&&(this.startupDijits(c),"_title"===a&&this._adjustContentArea&&this._adjustContentArea())}});q("extend-esri")&&(d.InfoWindowBase=p);return p})},"esri/layers/TileMap":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/io-query ../request ../urlUtils".split(" "),
1451function(p,n,a,e,l,h,q){return p(null,{declaredClass:"esri.layers.TileMap",constructor:function(a){this.layer=a;this._tileMaps={}},getTile:function(a,d,c,b,e){a={id:b,level:a,row:d,col:c};d=this._getResamplingBudget();0<d?this._process({tile:a,requestedTile:a,callback:e,resamplingBudget:d}):(e||this.callback).call(this,a,a)},statusOf:function(a,d,c){var b=this._getResamplingBudget();a={level:a,row:d,col:c};if(0===b)return 1;for(;0<=b;){d=this._tileToTileMap(a);if(!this._tileMaps[d.uid])return-1;d=
1452this._tileMaps[d.uid];if(!d.promise.isFulfilled())return-1;if(this._isTileAvailable(a,d))return 1;a=this._parentTile(a);if(!a)break;b--}return 0},style:function(a,d){if(!(a.level===d.level&&a.row===d.row&&a.col===d.col)){for(var c=this.layer.tileInfo,b=c.lods,e=c.cols,c=c.rows,h,l,n=b.length-1;!h||!l;)!h&&b[n].level===a.level&&(h=b[n]),!l&&b[n].level===d.level&&(l=b[n]),n--;b=Math.round(h.resolution/l.resolution);return{width:e*b+"px",height:c*b+"px",margin:"-"+d.row%b*c+"px 0 0 -"+d.col%b*e+"px",
1453"will-change":"transform"}}},_process:function(a){var d=a.tile,c=this._tileToTileMap(d),b=this._parentTile(d);this._getTileMap(c).then(n.hitch(this,function(e){c=e;this._isTileAvailable(d,c)?(a.callback||this.callback).call(this,d,a.requestedTile):0<a.resamplingBudget&&b?(a.resamplingBudget--,a.tile=b,this._process(a)):(a.callback||this.callback).call(this,a.requestedTile,a.requestedTile)}),n.hitch(this,function(){(a.callback||this.callback).call(this,a.requestedTile,a.requestedTile)}))},_getTileMap:function(a){var d,
1454c,b,f,m=null;this._tileMaps[a.uid]?(a=this._tileMaps[a.uid],d=a.promise):(this._tileMaps[a.uid]=a,c=new e,h({url:this._getTileMapUrl(a.level,a.row,a.col),handleAs:"json",callbackParamName:"callback",timeout:3E3,load:function(d){n.mixin(a,d);if(a.data&&0<a.data.length){f=a.data.length;if(1===f)m=a.data[0];else{m=a.data[0];for(b=1;b<f;b++)if(a.data[b]!==m){m=null;break}}null!==m&&(delete a.data,a.value=m)}c.resolve(a)},error:function(a){c.reject()}}),d=a.promise=c.promise);return d},_parentTile:function(e){var d=
1455this.layer.tileInfo.lods,c,b,f=null;a.some(d,function(a,d){return e.level===a.level?(c=a,b=d,!0):!1});0<b&&(d=d[b-1],f={id:e.id,level:d.level,row:Math.floor(e.row*c.resolution/d.resolution+0.01),col:Math.floor(e.col*c.resolution/d.resolution+0.01)});return f},_tileToTileMap:function(a){var d=8*Math.floor(a.row/8),c=8*Math.floor(a.col/8);return{uid:a.level+"_"+d+"_"+c,level:a.level,row:d,col:c}},_isTileAvailable:function(a,d){var c,b;d.valid?void 0!==d.value?c=d.value:(c=d.location.left,b=d.location.top,
1456c=(a.row-b)*d.location.width+(a.col-c),c=c<d.data.length?d.data[c]:0):c=0;return c},_getTileMapUrl:function(a,d,c){var b=this.layer,e=b.tileServers,h=b._getToken(),n=b._url.query;a=(e?e[d%e.length]:b._url.path)+"/tilemap/"+a+"/"+d+"/"+c+"/8/8";n&&(a+="?"+l.objectToQuery(n));if(h&&(!n||!n.token))a+=(-1===a.indexOf("?")?"?":"\x26")+"token\x3d"+h;a=b.addTimestampToURL(a);return q.addProxy(a)},_getResamplingBudget:function(){var a=this.layer,d=0;if(a.resampling&&(d=a._resamplingTolerance,null===d||void 0===
1457d))d=a.tileInfo.lods.length;return d}})})},"dojox/collections/ArrayList":function(){define(["dojo/_base/kernel","dojo/_base/array","./_base"],function(p,n,a){a.ArrayList=function(e){var l=[];e&&(l=l.concat(e));this.count=l.length;this.add=function(a){l.push(a);this.count=l.length};
1457this.addRange=function(a){if(a.getIterator)for(a=a.getIterator();!a.atEnd();)this.add(a.get());else for(var e=0;e<a.length;e++)l.push(a[e]);this.count=l.length};this.clear=function(){l.splice(0,l.length);this.count=0};this.clone=
1458function(){return new a.ArrayList(l)};this.contains=function(a){for(var e=0;e<l.length;e++)if(l[e]==a)return!0;return!1};this.forEach=function(a,e){p.forEach(l,a,e)};this.getIterator=function(){return new a.Iterator(l)};this.indexOf=function(a){for(var e=0;e<l.length;e++)if(l[e]==a)return e;return-1};this.insert=function(a,e){l.splice(a,0,e);this.count=l.length};this.item=function(a){return l[a]};this.remove=function(a){a=this.indexOf(a);0<=a&&l.splice(a,1);this.count=l.length};this.removeAt=function(a){l.splice(a,
14591);this.count=l.length};this.reverse=function(){l.reverse()};this.sort=function(a){a?l.sort(a):l.sort()};this.setByIndex=function(a,e){l[a]=e;this.count=l.length};this.toArray=function(){return[].concat(l)};this.toString=function(a){return l.join(a||",")}};return a.ArrayList})},"dojo/fx/Toggler":function(){define(["../_base/lang","../_base/declare","../_base/fx","../aspect"],function(p,n,a,e){return n("dojo.fx.Toggler",null,{node:null,showFunc:a.fadeIn,hideFunc:a.fadeOut,showDuration:200,hideDuration:200,
1460constructor:function(a){p.mixin(this,a);this.node=a.node;this._showArgs=p.mixin({},a);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=p.mixin({},a);this._hideArgs.node=this.node;this._hideArgs.duration=this.hideDuration;this.hideAnim=this.hideFunc(this._hideArgs);e.after(this.showAnim,"beforeBegin",p.hitch(this.hideAnim,"stop",!0),!0);e.after(this.hideAnim,"beforeBegin",p.hitch(this.showAnim,"stop",!0),!0)},show:function(a){return this.showAnim.play(a||
14610)},hide:function(a){return this.hideAnim.play(a||0)}})})},"esri/units":function(){define(["dojo/has","./kernel"],function(p,n){var a={CENTIMETERS:"esriCentimeters",DECIMAL_DEGREES:"esriDecimalDegrees",DEGREE_MINUTE_SECONDS:"esriDegreeMinuteSeconds",DECIMETERS:"esriDecimeters",FEET:"esriFeet",INCHES:"esriInches",KILOMETERS:"esriKilometers",METERS:"esriMeters",MILES:"esriMiles",MILLIMETERS:"esriMillimeters",NAUTICAL_MILES:"esriNauticalMiles",POINTS:"esriPoints",UNKNOWN:"esriUnknownUnits",YARDS:"esriYards",
1462ACRES:"esriAcres",ARES:"esriAres",SQUARE_KILOMETERS:"esriSquareKilometers",SQUARE_MILES:"esriSquareMiles",SQUARE_FEET:"esriSquareFeet",SQUARE_METERS:"esriSquareMeters",HECTARES:"esriHectares",SQUARE_YARDS:"esriSquareYards",SQUARE_INCHES:"esriSquareInches",SQUARE_MILLIMETERS:"esriSquareMillimeters",SQUARE_CENTIMETERS:"esriSquareCentimeters",SQUARE_DECIMETERS:"esriSquareDecimeters",SQUARE_NAUTICAL_MILES:"esriSquareNauticalMiles",METERS_PER_SECOND:"esriMetersPerSecond",KILOMETERS_PER_HOUR:"esriKilometersPerHour",
1463KNOTS:"esriKnots",FEET_PER_SECOND:"esriFeetPerSecond",MILES_PER_HOUR:"esriMilesPerHour",RADIANS:"esriDURadians"};p("extend-esri")&&(n.Units=a);return a})},"esri/renderers/ClassBreaksRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../symbols/jsonUtils ./Renderer".split(" "),function(p,n,a,e,l,h,q,g){p=p(g,{declaredClass:"esri.renderer.ClassBreaksRenderer",constructor:function(a,c){this.breaks=[];this._symbols={};this.infos=[];this.isMaxInclusive=
1464!0;if(a&&!a.declaredClass){var b=a;this.attributeField=b.field;this.defaultSymbol=(a=b.defaultSymbol)&&(a.declaredClass?a:q.fromJson(a));this.backgroundFillSymbol=(a=b.backgroundFillSymbol)&&(a.declaredClass?a:q.fromJson(a));this._copy(["defaultLabel","classificationMethod:rest","normalizationType:rest","normalizationField","normalizationTotal"],b,this);var e=b.minValue;(b=b.classBreakInfos)&&(b[0]&&h.isDefined(b[0].classMaxValue))&&n.forEach(b,function(a){var b=a.classMaxValue;a.minValue=e;e=a.maxValue=
1465b},this);n.forEach(b,this._addBreakInfo,this)}else this.defaultSymbol=a,this.attributeField=c},addBreak:function(d,c,b){d=a.isObject(d)?d:{minValue:d,maxValue:c,symbol:b};this._addBreakInfo(d)},removeBreak:function(a,c){var b,e=this.breaks,g,h=e.length,l=this._symbols;for(g=0;g<h;g++)if(b=e[g],b[0]==a&&b[1]==c){e.splice(g,1);delete l[a+"-"+c];this.infos.splice(g,1);break}},clearBreaks:function(){this.breaks=[];this._symbols={};this.infos=[]},getBreakIndex:function(d){var c=this.attributeField,b=d.attributes,
1466e=this.breaks,g=e.length,h=this.isMaxInclusive;if(a.isFunction(c))d=c(d);else{d=parseFloat(b[c]);var c=this.normalizationType,l;if(c)if(l=parseFloat(this.normalizationTotal),b=parseFloat(b[this.normalizationField]),"log"===c)d=Math.log(d)*Math.LOG10E;else if("percent-of-total"===c&&!isNaN(l))d=100*(d/l);else if("field"===c)if(!isNaN(d)&&!isNaN(b))d/=b;else return-1}for(b=0;b<g;b++)if(c=e[b],c[0]<=d&&(h?d<=c[1]:d<c[1]))return b;return-1},getBreakInfo:function(a){a=this.getBreakIndex(a);return-1!==
1467a?this.infos[a]:null},getSymbol:function(a){return(a=this.breaks[this.getBreakIndex(a)])?this._symbols[a[0]+"-"+a[1]]:this.defaultSymbol},setMaxInclusive:function(a){this.isMaxInclusive=a},_normalizationTypeEnums:[["field","esriNormalizeByField"],["log","esriNormalizeByLog"],["percent-of-total","esriNormalizeByPercentOfTotal"]],_classificationMethodEnums:[["natural-breaks","esriClassifyNaturalBreaks"],["equal-interval","esriClassifyEqualInterval"],["quantile","esriClassifyQuantile"],["standard-deviation",
1468"esriClassifyStandardDeviation"],["geometrical-interval","esriClassifyGeometricalInterval"]],_copy:function(a,c,b){n.forEac
1468h(a,function(a){var d=a.split(":"),e,g,k;1<d.length&&(a=d[0],e=this["_"+a+"Enums"],"rest"===d[1]?(g="1",k="0"):"sdk"===d[1]&&(g="0",k="1"));d=c[a];if(void 0!==d&&(b[a]=d,e&&g)){var h,l=e.length;for(h=0;h<l;h++)if(e[h][g]===d){b[a]=e[h][k];break}}},this)},_addBreakInfo:function(a){var c=a.minValue,b=a.maxValue;this.breaks.push([c,b]);this.infos.push(a);var e=a.symbol;e&&!e.declaredClass&&
1469(a.symbol=q.fromJson(e));this._symbols[c+"-"+b]=a.symbol},toJson:function(){var d=this.infos||[],c=h.fixJson,b=d[0]&&d[0].minValue,e=this.backgroundFillSymbol,d=a.mixin(this.inherited(arguments),{type:"classBreaks",field:this.attributeField,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.toJson(),backgroundFillSymbol:e&&e.toJson(),minValue:-Infinity===b?-Number.MAX_VALUE:b,classBreakInfos:n.map(d,function(b){b=a.mixin({},b);b.symbol=b.symbol&&b.symbol.toJson();b.classMaxValue=Infinity===b.maxValue?
1470Number.MAX_VALUE:b.maxValue;delete b.minValue;delete b.maxValue;return c(b)})});this._copy(["defaultLabel","classificationMethod:sdk","normalizationType:sdk","normalizationField","normalizationTotal"],this,d);d.hasOwnProperty("normalizationType")&&!d.normalizationType&&delete d.normalizationType;d.hasOwnProperty("classificationMethod")&&!d.classificationMethod&&delete d.classificationMethod;return c(d)}});e("extend-esri")&&a.setObject("renderer.ClassBreaksRenderer",p,l);return p})},"esri/renderers/TimeClassBreaksAger":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has dojo/date ../kernel ../lang ../symbols/jsonUtils ../Color ./SymbolAger".split(" "),
1471function(p,n,a,e,l,h,q,g,d,c){var b=p(c,{declaredClass:"esri.renderer.TimeClassBreaksAger",constructor:function(a,b){this.infos=a;this.timeUnits=b||"day";a.sort(function(a,b){return a.minAge<b.minAge?-1:a.minAge>b.minAge?1:0})},getAgedSymbol:function(a,b){var c=b.getLayer(),d=b.attributes,e=q.isDefined;a=g.fromJson(a.toJson());var h=c._map.timeExtent.endTime;if(!h)return a;var p=l.difference(new Date(d[c._startTimeField]),h,this.timeUnits);n.some(this.infos,function(b){if(p>=b.minAge&&p<=b.maxAge){var c=
1472b.color,d=b.size;b=b.alpha;c&&a.setColor(c);e(d)&&this._setSymbolSize(a,d);e(b)&&a.color&&(a.color.a=b);return!0}},this);return a},toJson:function(){var a={agerClassBreakInfos:[]},b,c,e;a.timeUnits=this._getRestUnits(this.timeUnits);for(b=0;b<this.infos.length;b+=1)c=this.infos[b],e={},e.oldestAge=Infinity===c.maxAge?null:c.maxAge,e.size=c.size,c.color&&(e.color=d.toJsonColor(c.color)),c.alpha&&(e.alpha=Math.round(255*c.alpha)),a.agerClassBreakInfos[b]=e;return a},_getRestUnits:function(a){var c=
1473"esriTimeUnitsDays";switch(a){case b.UNIT_SECONDS:c="esriTimeUnitsSeconds";break;case b.UNIT_MILLISECONDS:c="esriTimeUnitsMilliseconds";break;case b.UNIT_HOURS:c="esriTimeUnitsHours";break;case b.UNIT_MINUTES:c="esriTimeUnitsMinutes";break;case b.UNIT_MONTHS:c="esriTimeUnitsMonths";break;case b.UNIT_WEEKS:c="esriTimeUnitsWeeks";break;case b.UNIT_YEARS:c="esriTimeUnitsYears"}return c}});a.mixin(b,{UNIT_DAYS:"day",UNIT_HOURS:"hour",UNIT_MILLISECONDS:"millisecond",UNIT_MINUTES:"minute",UNIT_MONTHS:"month",
1474UNIT_SECONDS:"second",UNIT_WEEKS:"week",UNIT_YEARS:"year"});e("extend-esri")&&a.setObject("renderer.TimeClassBreaksAger",b,h);return b})},"esri/layers/ImageParameters":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../lang ../layerUtils".split(" "),function(p,n,a,e,l,h,q,g){n=n(null,{declaredClass:"esri.layers.ImageParameters",constructor:function(){this.layerDefinitions=[]},bbox:null,extent:null,width:null,height:null,dpi:null,format:null,
1475imageSpatialReference:null,layerOption:null,layerIds:null,transparent:null,timeExtent:null,layerTimeOptions:null,toJson:function(a){this.bbox&&p.deprecated(this.declaredClass+" : Property 'bbox' deprecated. Use property 'extent'.");var c=this.bbox||this.extent,c=c&&a&&c._normalize(!0);a=this.layerOption;var b=c?c.spatialReference.wkid||e.toJson(c.spatialReference.toJson()):null,f=this.imageSpatialReference,c={dpi:this.dpi,format:this.format,transparent:this.transparent,size:null!==this.width&&null!==
1476this.height?this.width+","+this.height:null,bbox:c?c.xmin+","+c.ymin+","+c.xmax+","+c.ymax:null,bboxSR:b,layers:a?a+":"+this.layerIds.join(","):null,imageSR:f?f.wkid||e.toJson(f.toJson()):b};c.layerDefs=g._serializeLayerDefinitions(this.layerDefinitions);a=this.timeExtent;c.time=a?a.toJson().join(","):null;c.layerTimeOptions=g._serializeTimeOptions(this.layerTimeOptions);
1476return q.filter(c,function(a){if(null!==a)return!0})}});a.mixin(n,{LAYER_OPTION_SHOW:"show",LAYER_OPTION_HIDE:"hide",LAYER_OPTION_INCLUDE:"include",
1477LAYER_OPTION_EXCLUDE:"exclude"});l("extend-esri")&&a.setObject("layers.ImageParameters",n,h);return n})},"dojox/gfx/renderer":function(){define(["./_base","dojo/_base/lang","dojo/_base/sniff","dojo/_base/window","dojo/_base/config"],function(p,n,a,e,l){var h=null;a.add("vml",function(a,e,d){d.innerHTML='\x3cv:shape adj\x3d"1"/\x3e';a="adj"in d.firstChild;d.innerHTML="";return a});return{load:function(q,g,d){function c(){g(["dojox/gfx/"+b],function(a){p.renderer=b;h=a;d(a)})}if(h&&"force"!=q)d(h);
1478else{var b=l.forceGfxRenderer;q=!b&&(n.isString(l.gfxRenderer)?l.gfxRenderer:"svg,vml,canvas,silverlight").split(",");for(var f,m;!b&&q.length;)switch(q.shift()){case "svg":"SVGAngle"in e.global&&(b="svg");break;case "vml":a("vml")&&(b="vml");break;case "silverlight":try{a("ie")?(f=new ActiveXObject("AgControl.AgControl"))&&f.IsVersionSupported("1.0")&&(m=!0):navigator.plugins["Silverlight Plug-In"]&&(m=!0)}catch(t){m=!1}finally{f=null}m&&(b="silverlight");break;case "canvas":e.global.CanvasRenderingContext2D&&
1479(b="canvas")}"canvas"===b&&!1!==l.canvasEvents&&(b="canvasWithEvents");l.isDebug&&console.log("gfx renderer \x3d "+b);"svg"==b&&"undefined"!=typeof window.svgweb?window.svgweb.addOnLoad(c):c()}}}})},"esri/dijit/PopupTemplate":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/dom-construct ../kernel ../InfoTemplate ../PopupInfo ./PopupRenderer".split(" "),function(p,n,a,e,l,h,q,g){p=p([h,q],{declaredClass:"esri.dijit.PopupTemplate","-chains-":{constructor:"manual"},chartTheme:null,
1480constructor:function(a,c){n.mixin(this,c);this.initialize(a,c)},getTitle:function(a){var c;this.info&&(c=this.titleHasRelatedFields?"":this._getPopupValues(a,!0).title);return c||""},getContent:function(a){return this.info?(new g({template:this,graphic:a,chartTheme:this.chartTheme},e.create("div"))).domNode:""}});a("extend-esri")&&n.setObject("dijit.PopupTemplate",p,l);return p})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/has","../registry"],function(p,n,a,
1481e){var l=p("dijit.form._ButtonMixin"+(a("dojo-bidi")?"_NoBidi":""),null,{label:"",type:"button",__onClick:function(a){a.stopPropagation();a.preventDefault();this.disabled||this.valueNode.click(a);return!1},_onClick:function(a){if(this.disabled)return a.stopPropagation(),a.preventDefault(),!1;!1===this.onClick(a)&&a.preventDefault();var l=a.defaultPrevented;if(!l&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var g=this.domNode;g.parentNode;g=g.parentNode){var d=e.byNode(g);if(d&&
1482"function"==typeof d._onSubmit){d._onSubmit(a);a.preventDefault();l=!0;break}}return!l},postCreate:function(){this.inherited(arguments);n.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(a){this._set("label",a);(this.containerNode||this.focusNode).innerHTML=a}});a("dojo-bidi")&&(l=p("dijit.form._ButtonMixin",l,{_setLabelAttr:function(){this.inherited(arguments);this.applyTextDir(this.containerNode||this.focusNode)}}));return l})},"esri/domUtils":function(){define(["./kernel",
1483"dojo/_base/connect","dojo/_base/lang","dojo/dom-style","dojo/has"],function(p,n,a,e,l){var h={show:function(a){if(a=h.getNode(a))a.style.display="block"},getNode:function(a){return a&&a.domNode||a},hide:function(a){if(a=h.getNode(a))a.style.display="none"},toggle:function(a){if(a=h.getNode(a))a.style.display="none"===a.style.display?"block":"none"},documentBox:8>=l("ie")?{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:{w:window.innerWidth,h:window.innerHeight},setScrollable:function(a){if(a=
1484this.getNode(a)){var g=0,d=0,c=0,b=0,f=0,h=0;return[n.connect(a,"ontouchstart",function(e){g=e.touches[0].screenX;d=e.touches[0].screenY;c=a.scrollWidth;b=a.scrollHeight;f=a.clientWidth;h=a.clientHeight}),n.connect(a,"ontouchmove",function(l){l.preventDefault();var n=a.firstChild;n instanceof Text&&(n=a.childNodes[1]);var k=n._currentX||0,r=n._currentY||0,k=k+(l.touches[0].screenX-g);0<k?k=0:0>k&&Math.abs(k)+f>c&&(k=-1*(c-f));n._currentX=k;r+=l.touches[0].screenY-d;0<r?r=0:0>r&&Math.abs(r)+h>b&&(r=
1485-1*(b-h));n._currentY=r;e.set(n,{"-webkit-transition-property":"-webkit-transform","-webkit-transform":"translate("+k+"px, "+r+"px)"});g=l.touches[0].screenX;d=l.touches[0].screenY})]}}};l("extend-esri")&&a.mixin(p,h);return h})},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(p,n,a){var e={},l={}
1485,h={length:0,add:function(a){if(l[a.id])throw Error("Tried to register widget with id\x3d\x3d"+a.id+" but that id is already registered");l[a.id]=a;this.length++},
1486remove:function(a){l[a]&&(delete l[a],this.length--)},byId:function(a){return"string"==typeof a?l[a]:a},byNode:function(a){return l[a.getAttribute("widgetId")]},toArray:function(){var a=[],e;for(e in l)a.push(l[e]);return a},getUniqueId:function(h){var g;do g=h+"_"+(h in e?++e[h]:e[h]=0);while(l[g]);return"dijit"==a._scopeName?g:a._scopeName+"_"+g},findWidgets:function(a,e){function d(a){for(a=a.firstChild;a;a=a.nextSibling)if(1==a.nodeType){var f=a.getAttribute("widgetId");f?(f=l[f])&&c.push(f):
1487a!==e&&d(a)}}var c=[];d(a);return c},_destroyAll:function(){a._curFocus=null;a._prevFocus=null;a._activeStack=[];p.forEach(h.findWidgets(n.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})},getEnclosingWidget:function(a){for(;a;){var e=1==a.nodeType&&a.getAttribute("widgetId");if(e)return l[e];a=a.parentNode}return null},_hash:l};return a.registry=h})},"esri/main":function(){define(["./kernel","dojo/i18n!./nls/jsapi","./config","./sniff"],function(p,
1488n){p.bundle=n;return p})},"esri/renderers/HeatmapRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct ../sniff ../kernel ../lang ../symbols/PictureMarkerSymbol ../Color ./Renderer".split(" "),function(p,n,a,e,l,h,q,g,d,c){p=p([c],{declaredClass:"esri.renderer.HeatmapRenderer",colors:null,blurRadius:10,maxPixelIntensity:100,minPixelIntensity:0,field:null,fieldOffset:null,colorStops:null,constructor:function(a){(this._supportsCanvas=window.CanvasRenderingContext2D?
1489!0:!1)?("string"==typeof a&&(a=JSON.parse(a)),n.mixin(this,a),this._canvas=null,!this.colors&&!this.colorStops&&(this.colorStops=[{ratio:0,color:"rgba(255, 140, 0, 0)"},{ratio:0.75,color:"rgba(255, 140, 0, 1)"},{ratio:0.9,color:"rgba(255, 0,   0, 1)"}]),this.gradient=this._generateGradient(this.colorStops||this.colors)):console.log("The HeatmapRenderer requires a Canvas enabled Browser.  IE8 and less does not support Canvas.")},getSymbol:function(a){if(!this._supportsCanvas)return!1;var c=a.attributes.imageData;
1490a=a.attributes.size;if(!a)return null;var d=this._getContext(a[0],a[1]),e=d.getImageData(0,0,a[0],a[1]);window.ArrayBuffer&&c instanceof ArrayBuffer?c=window.Uint8ClampedArray?new Uint8ClampedArray(c):new Uint8Array(c):c.BYTES_PER_ELEMENT&&1!==c.BYTES_PER_ELEMENT&&(c=window.Uint8ClampedArray?new Uint8ClampedArray(c.buffer):new Uint8Array(c.buffer));if(window.CanvasPixelArray&&e.data instanceof window.CanvasPixelArray)for(var h=e.data,k=h.length;k--;)h[k]=c[k];else e.data.set(c);d.putImageData(e,0,
14910);return new g(d.canvas.toDataURL(),a[0],a[1])},setColors:function(a){if(a&&(a instanceof Array||a.colors))this.gradient=this._generateGradient(a.colors||a),this.colors=a;return this},setColorStops:function(a){if(a&&(a instanceof Array||a.colorStops))this.gradient=this._generateGradient(a.colorStops||a),this.colorStops=a;return this},setMaxPixelIntensity:function(a){this.maxPixelIntensity=a;return this},setMinPixelIntensity:function(a){this.minPixelIntensity=a;return this},setField:function(a){this.field=
1492a;return this},setFieldOffset:function(a){this.fieldOffset=a;return this},setBlurRadius:function(a){this.blurRadius=a;return this},getStats:function(){},getHistogramData:function(){},toJson:function(){var b=n.mixin(this.inherited(arguments),{type:"heatmap",blurRadius:this.blurRadius,colorStops:this._colorsToStops(this.colorStops||this.colors),maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity,field:this.field});null!=this.fieldOffset&&(b.fieldOffset=this.fieldOffset);
1493a.forEach(b.colorStops,function(a){a.color=d.toJsonColor(a.color)});return q.fixJson(b)},_getContext:function(a,c){this._canvas?(this._canvas.width=a,this._canvas.height=c):this._canvas=this._initCanvas(a,c);return this._canvas.getContext("2d")},_initCanvas:function(a,c){var d=e.create("canvas",{id:"hm_canvas-"+Math.floor(1E3*Math.random()),style:"position: absolute; left: -10000px; top: 0px;"},null);d.width=a;d.height=c;document.body.appendChild(d);return d},_generateGradient:function(a,c){c||(c=
1494512);for(var d=this._colorsToStops(a),e=this._getContext(1,c||512),g=e.createLinearGradient(0,0,0,c),k=0,h;k<d.length;k++)h=d[k],g.addColorStop(h.ratio,h.color.toCss(!0));e.fillStyle=g;e.fillRect(0,0,1,c);return e.getImageData(0,0,1,c).data},_colorsToStops:function(b){var c=[];if(!b[0])return c;if(null!=b[0].ratio)c=a.map(b,function(a){return{ratio:a.ratio,color:this._toColor(a.color)}},this);else if(null!=b[0].value){var d=Infinity,c=-Infinity,e=0,g;for(g=0;g<b.length;g++){var k=b[g].value;k<d&&
1495(d=k);k>c&&(c=k)}e=c-d;this.maxPixelIntensity=c;this.minPixelIntensity=d;c=a.map(b,function(a){var b=a.value;a=this._toColor(a.color);return{value:b,ratio:(b-d)/e,color:a}},this)}else var h=b.length-1,c=a.map(b,function(a,b){return{color:this._toColor(a),ratio:b/h}},this);return c},_toColor:function(a){!a.toRgba&&!a.declaredClass&&(a=new d(a));return a}});l("extend-esri")&&n.setObject("renderer.HeatmapRenderer",p,h);return p})},"dojo/io/script":function(){define("../_base/connect ../_base/kernel ../_base/lang ../sniff ../_base/window ../_base/xhr ../dom ../dom-construct ../request/script ../aspect".split(" "),
1496function(p,n,a,e,l,h,q,g,d,c){n.deprecated("dojo/io/script","Use dojo/request/script.","2.0");var b={get:function(a){var e,g=this._makeScriptDeferred(a,function(a){e&&e.cancel()}),l=g.ioArgs;h._ioAddQueryToUrl(l);h._ioNotifyStart(g);e=d.get(l.url,{timeout:a.timeout,jsonp:l.jsonp,checkString:a.checkString,ioArgs:l,frameDoc:a.frameDoc,canAttach:function(a){l.requestId=a.id;l.scriptId=a.scriptId;l.canDelete=a.canDelete;return b._canAttach(l)}},!0);c.around(e,"isValid",function(a){return function(c){b._validCheck(g);
1497return a.call(this,c)}});e.then(function(){g.resolve(g)}).otherwise(function(a){g.ioArgs.error=a;g.reject(a)});return g},attach:d._attach,remove:d._remove,_makeScriptDeferred:function(a,c){var e=h._ioSetArgs(a,c||this._deferredCancel,this._deferredOk,this._deferredError),g=e.ioArgs;g.id=n._scopeName+"IoScript"+(a.callbackSuffix||this._counter++);g.canDelete=!1;g.jsonp=a.callbackParamName||a.jsonp;g.jsonp&&(g.query=g.query||"",0<g.query.length&&(g.query+="\x26"),g.query+=g.jsonp+"\x3d"+(a.frameDoc?
1498"parent.":"")+n._scopeName+".io.script.jsonp_"+g.id+"._jsonpCallback",g.frameDoc=a.frameDoc,g.canDelete=!0,e._jsonpCallback=this._jsonpCallback,this["jsonp_"+g.id]=e);e.addBoth(function(a){g.canDelete&&(a instanceof Error?b["jsonp_"+g.id]._jsonpCallback=function(){delete b["jsonp_"+g.id];if(g.requestId)n.global[d._callbacksProperty][g.requestId]()}:b._addDeadScript(g))});return e},_deferredCancel:function(a){a.canceled=!0},_deferredOk:function(a){a=a.ioArgs;return a.json||a.scriptLoaded||a}
1498,_deferredError:function(a,
1499b){console.log("dojo.io.script error",a);return a},_deadScripts:[],_counter:1,_addDeadScript:function(a){b._deadScripts.push({id:a.id,frameDoc:a.frameDoc});a.frameDoc=null},_validCheck:function(a){if((a=b._deadScripts)&&0<a.length){for(var c=0;c<a.length;c++)b.remove(a[c].id,a[c].frameDoc),delete b["jsonp_"+a[c].id],a[c].frameDoc=null;b._deadScripts=[]}return!0},_ioCheck:function(a){a=a.ioArgs;return a.json||a.scriptLoaded&&!a.args.checkString?!0:(a=a.args.checkString)&&eval("typeof("+a+") !\x3d 'undefined'")},
1500_resHandle:function(a){b._ioCheck(a)?a.callback(a):a.errback(Error("inconceivable dojo.io.script._resHandle error"))},_canAttach:function(){return!0},_jsonpCallback:function(a){this.ioArgs.json=a;if(this.ioArgs.requestId)n.global[d._callbacksProperty][this.ioArgs.requestId](a)}};a.setObject("dojo.io.script",b);return b})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),function(p,
1501n,a,e,l,h,q,g,d){function c(a,b,c,d){return d.replace(/([a-z])\1*/ig,function(f){var g,h,l=f.charAt(0);f=f.length;var n=["abbr","wide","narrow"];switch(l){case "G":g=b[4>f?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":g=a.getFullYear();switch(f){case 1:break;case 2:if(!c.fullYear){g=String(g);g=g.substr(g.length-2);break}default:h=!0}break;case "Q":case "q":g=Math.ceil((a.getMonth()+1)/3);h=!0;break;case "M":case "L":g=a.getMonth();3>f?(g+=1,h=!0):(l=["months","L"==l?"standAlone":"format",
1502n[f-3]].join("-"),g=b[l][g]);break;case "w":g=m._getWeekOfYear(a,0);h=!0;break;case "d":g=a.getDate();h=!0;break;case "D":g=m._getDayOfYear(a);h=!0;break;case "e":case "c":if(g=a.getDay(),2>f){g=(g-e.getFirstDayOfWeek(c.locale)+8)%7;break}case "E":g=a.getDay();3>f?(g+=1,h=!0):(l=["days","c"==l?"standAlone":"format",n[f-3]].join("-"),g=b[l][g]);break;case "a":l=12>a.getHours()?"am":"pm";g=c[l]||b["dayPeriods-format-wide-"+l];break;case "h":case "H":case "K":case "k":h=a.getHours();switch(l){case "h":g=
1503h%12||12;break;case "H":g=h;break;case "K":g=h%12;break;case "k":g=h||24}h=!0;break;case "m":g=a.getMinutes();h=!0;break;case "s":g=a.getSeconds();h=!0;break;case "S":g=Math.round(a.getMilliseconds()*Math.pow(10,f-3));h=!0;break;case "v":case "z":if(g=m._getZone(a,!0,c))break;f=4;case "Z":l=m._getZone(a,!1,c);l=[0>=l?"+":"-",q.pad(Math.floor(Math.abs(l)/60),2),q.pad(Math.abs(l)%60,2)];4==f&&(l.splice(0,0,"GMT"),l.splice(3,0,":"));g=l.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+
1504d);}h&&(g=q.pad(g,f));return g})}function b(a,b,c,d){var e=function(a){return a};b=b||e;c=c||e;d=d||e;var f=a.match(/(''|[^'])+/g),g="'"==a.charAt(0);n.forEach(f,function(a,d){a?(f[d]=(g?c:b)(a.replace(/''/g,"'")),g=!g):f[d]=""});return d(f.join(""))}function f(a,b,c,d){d=h.escapeString(d);c.strict||(d=d.replace(" a"," ?a"));return d.replace(/([a-z])\1*/ig,function(d){var e;e=d.charAt(0);var f=d.length,g="",h="";c.strict?(1<f&&(g="0{"+(f-1)+"}"),2<f&&(h="0{"+(f-2)+"}")):(g="0?",h="0{0,2}");switch(e){case "y":e=
1505"\\d{2,4}";break;case "M":case "L":e=2<f?"\\S+?":"1[0-2]|"+g+"[1-9]";break;case "D":e="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+g+"[1-9][0-9]|"+h+"[1-9]";break;case "d":e="3[01]|[12]\\d|"+g+"[1-9]";break;case "w":e="[1-4][0-9]|5[0-3]|"+g+"[1-9]";break;case "E":case "e":case "c":e=".+?";break;case "h":e="1[0-2]|"+g+"[1-9]";break;case "k":e="1[01]|"+g+"\\d";break;case "H":e="1\\d|2[0-3]|"+g+"\\d";break;case "K":e="1\\d|2[0-4]|"+g+"[1-9]";break;case "m":case "s":e="[0-5]\\d";break;case "S":e="\\d{"+f+"}";
1506break;case "a":f=c.am||b["dayPeriods-format-wide-am"];g=c.pm||b["dayPeriods-format-wide-pm"];e=f+"|"+g;c.strict||(f!=f.toLowerCase()&&(e+="|"+f.toLowerCase()),g!=g.toLowerCase()&&(e+="|"+g.toLowerCase()),-1!=e.indexOf(".")&&(e+="|"+e.replace(/\./g,"")));e=e.replace(/\./g,"\\.");break;default:e=".*"}a&&a.push(d);return"("+e+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var m={};p.setObject(d.id.replace(/\//g,"."),m);m._getZone=function(b,c,d){return c?a.getTimezoneName(b):b.getTimezoneOffset()};m.format=
1507function(a,d){d=d||{};var e=l.normalizeLocale(d.locale),f=d.formatLength||"short",e=m._getGregorianBundle(e),g=[],h=p.hitch(this,c,a,e,d);if("year"==d.selector)return b(e["dateFormatItem-yyyy"]||"yyyy",h);var n;"date"!=d.selector&&(n=d.timePattern||e["timeFormat-"+f])&&g.push(b(n,h));"time"!=d.selector&&(n=d.datePattern||e["dateFormat-"+f])&&g.push(b(n,h));return 1==g.length?g[0]:e["dateTimeFormat-"+f].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(a,b){return g[b]})};m.regexp=function(a){return m._parseInfo(a).regexp};
1508m._parseInfo=function(a){a=a||{};var c=l.normalizeLocale(a.locale),c=m._getGregorianBundle(c),d=a.formatLength||"short",e=a.datePattern||c["dateFormat-"+d],g=a.timePattern||c["timeFormat-"+d],d="date"==a.selector?e:"time"==a.selector?g:c["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(a,b){return[g,e][b]}),h=[];return{regexp:b(d,p.hitch(this,f,h,c,a)),tokens:h,bundle:c}};m.parse=function(b,c){var d=/[\u200E\u200F\u202A\u202E]/g,e=m._parseInfo(c),f=e.tokens,g=e.bundle,d=RegExp("^"+e.regexp.replace(d,
1509"")+"$",e.strict?"":"i").exec(b&&b.replace(d,""));if(!d)return null;var h=["abbr","wide","narrow"],l=[1970,0,1,0,0,0,0],p="",d=n.every(d,function(a,b){if(!b)return!0;var d=f[b-1],e=d.length,d=d.charAt(0);switch(d){case "y":if(2!=e&&c.strict)l[0]=a;else if(100>a)a=Number(a),d=""+(new Date).getFullYear(),e=100*d.substring(0,2),d=Math.min(Number(d.substring(2,4))+20,99),l[0]=a<d?e+a:e-100+a;else{if(c.strict)return!1;l[0]=a}break;case "M":case "L":if(2<e){if(e=g["months-"+("L"==d?"standAlone":"format")+
1510"-"+h[e-3]].concat(),c.strict||(a=a.replace(".","").toLowerCase(),e=n.map(e,function(a){return a.replace(".","").toLowerCase()})),a=n.indexOf(e,a),-1==a)return!1}else a--;l[1]=a;break;case "E":case "e":case "c":e=g["days-"+("c"==d?"standAlone":"format")+"-"+h[e-3]].concat();c.strict||(a=a.toLowerCase(),e=n.map(e,function(a){return a.toLowerCase()}));a=n.indexOf(e,a);if(-1==a)return!1;break;case "D":l[1]=0;case "d":l[2]=a;break;case "a":e=c.am||g["dayPeriods-format-wide-am"];d=c.pm||g["dayPeriods-format-wide-pm"];
1511if(!c.strict){var m=/\./g;a=a.replace(m,"").toLowerCase();e=e.replace(m,"").toLowerCase();d=d.replace(m,"").toLowerCase()}if(c.strict&&a!=e&&a!=d)return!1;p=a==d?"p":a==e?"a":"";break;case "K":24==a&&(a=0);case "h":case "H":case "k":if(23<a)return!1;l[3]=a;break;case "m":l[4]=a;break;case "s":l[5]=a;break;case "S":l[6]=a}return!0}),e=+l[3];"p"===p&&12>e?l[3]=e+12:"a"===p&&12==e&&(l[3]=0);e=new Date(l[0],l[1],l[2],l[3],l[4],l[5],l[6]);c.strict&&e.setFullYear(l[0]);var q=f.join(""),t=-1!=q.indexOf("d"),
1512q=-1!=q.indexOf("M");if(!d||q&&e.getMonth()>l[1]||t&&e.getDate()>l[2])return null;if(q&&e.getMonth()<l[1]||t&&e.getDate()<l[2])e=a.add(e,"hour",1);return e};var t=[];m.addCustomFormats=function(a,b){t.push({pkg:a,name:b})};m._getGregorianBundle=function(a){var b={};n.forEach(t,function(c){c=l.getLocalization(c.pkg,c.name,a);b=p.mixin(b,c)},this);return b};m.addCustomFormats(d.id.replace(/\/date\/locale$/,".cldr"),"gregorian");m.getNames=function(a,b,c,d){var e;d=m._getGregorianBundle(d);a=[a,c,b];
1513"standAlone"==c&&(c=a.join("-"),e=d[c],1==e[0]&&(e=void 0));a[1]="format";return(e||d[a.join("-")]).concat()};m.isWeekend=function(a,b){var c=e.getWeekend(b),d=(a||new Date).getDay();c.end<c.start&&(c.end+=7,d<c.start&&(d+=7));return d>=c.start&&d<=c.end};m._getDayOfYear=function(b){return a.difference(new Date(b.getFullYear(),0,1,b.getHours()),b)+1};m._getWeekOfYear=function(a,b){1==arguments.length&&(b=0);var c=(new Date(a.getFullYear(),0,1)).getDay(),d=Math.floor((m._getDayOfYear(a)+(c-b+7)%7-
15141)/7);c==b&&d++;return d};return m})},"esri/renderers/SymbolAger":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(p,n,a,e){p=p(null,{declaredClass:"esri.renderer.SymbolAger",getAgedSymbol:function(a,e){},_setSymbolSize:function(a,e){switch(a.type){case "simplemarkersymbol":a.setSize(e);break;case "picturemarkersymbol":a.setWidth(e);a.setHeight(e);break;case "simplelinesymbol":case "cartographiclinesymbol":a.setWidth(e);break;case "simplefillsymbol":case "picturefillsymbol":a.outline&&
1515a.outline.setWidth(e)}}});a("extend-esri")&&n.setObject("renderer.SymbolAger",p,e);return p})},"dijit/_base/wai":function(){define(["dojo/dom-attr","dojo/_base/lang","../main","../hccss"],function(p,n,a){n.mixin(a,{hasWaiRole:function(a,l){var h=this.getWaiRole(a);return l?-1<h.indexOf(l):0<h.length},getWaiRole:function(a){return n.trim((p.get(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,l){p.set(a,"role",l)},removeWaiRole:function(a,l){var h=p.get(a,"role");h&&(l?(h=n.trim((" "+
1516h+" ").replace(" "+l+" "," ")),p.set(a,"role",h)):a.removeAttribute("role"))},hasWaiState:function(a,l){return a.hasAttribute?a.hasAttribute("aria-"+l):!!a.getAttribute("aria-"+l)},getWaiState:function(a,l){return a.getAttribute("aria-"+l)||""},setWaiState:function(a,l,h){a.setAttribute("aria-"+l,h)},removeWaiState:function(a,l){a.removeAttribute("aria-"+l)}});return a})},"esri/config":function(){define(["dojo/_base/config","dojo/topic","dojo/has","./kernel"],function(p,n,a,e){var l={defaults:{screenDPI:96,
1517geometryService:null,kmlService:null,map:{width:400,height:400,layerNamePrefix:"layer",graphicsLayerNamePrefix:"graphicsLayer",slider:{left:"30px",top:"30px",width:null,height:"200px"},sliderLabel:{tick:5,labels:null,style:"width:2em; font-family:Verdana; font-size:75%;"},sliderChangeImmediate:!0,zoomSymbol:{color:[0,0,0,64],outline:{color:[255,0,0,255],width:1.25,style:"esriSLSSolid"},style:"esriSFSSolid"},zoomDuration:500,zoomRate:25,panDuration:350,panRate:25,logoLink:"http://www.esri.com"},autoSpatialIndexing:window.Worker&&
1518!1,io:{errorHandler:function(a,e){n.publish("esri.Error",[a])},proxyUrl:null,alwaysUseProxy:!1,useCors:"with-credentials",corsEnabledServers:"server.arcgisonline.com services.arcgisonline.com www.arcgis.com tiles.arcgis.com tiles1.arcgis.com tiles2.arcgis.com tiles3.arcgis.com tiles4.arcgis.com basemaps.arcgis.com elevation3d.arcgis.com services.arcgis.com services1.arcgis.com services2.arcgis.com services3.arcgis.com services4.arcgis.com services5.arcgis.com services6.arcgis.com services7.arcgis.com static.arcgis.com utility.arcgisonline.com geocode.arcgis.com geoenrich.arcgis.com qaext.arcgis.com tilesqa.arcgis.com servicesqa.arcgis.com servicesqa1.arcgis.com servicesqa2.arcgis.com servicesqa3.arcgis.com geocodeqa.arcgis.com geoenrichqa.arcgis.com dev.arcgis.com devext.arcgis.com staticdev.arcgis.com tilesdevext.arcgis.com elevation3ddev.arcgis.com servicesdev.arcgis.com servicesdev1.arcgis.com servicesdev2.arcgis.com servicesdev3.arcgis.com geocodedev.arcgis.com geoenrichdev.arcgis.com".split(" "),
1519corsDetection:window.cordova?!1:!0,corsStatus:{},webTierAuthServers:[],proxyRules:[],postLength:2E3,timeout:6E4,useWorkers:"on-request",maxRequestWorkers:5}}};a("extend-esri")&&(e.config=l);p.noGlobals||(window.esriConfig=l);return l})},"esri/utils":function(){define("./domUtils ./lang ./urlUtils ./request ./tileUtils ./graphicsUtils ./deferredUtils ./layerUtils ./geometry/normalizeUtils".split(" "),function(){return{}})},"esri/kernel":function(){define(["dojo/_base/kernel","dojo/_base/config","dojo/has"],
1520function(p,n,a){var e=window.location,l=e.pathname,l={version:"3.15",_appBaseUrl:e.protocol+"//"+e.host+l.substring(0,l.lastIndexOf(l.split("/")[l.split("/").length-1]))};n.noGlobals||(window.esri=l);
1520p.isAsync||a.add("extend-esri",1);(l.dijit=l.dijit||{})._arcgisUrl=("file:"===e.protocol?"http:":e.protocol)+"//www.arcgis.com/sharing/rest";return l})},"esri/layers/StreamMode":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../SpatialReference ../tasks/query ../tasks/QueryTask ../geometry/jsonUtils ./RenderMode".split(" "),
1521function(p,n,a,e,l,h,q,g,d,c){p=p([c],{declaredClass:"esri.layers._StreamMode",constructor:function(a,c){this.featureLayer=a;this._featureMap={};this._setRefreshRate();this._drawBuffer={adds:[],updates:[]};this._timeoutId=null;this._flushDrawBuffer=n.hitch(this,this._flushDrawBuffer);this._featuresByTime={};this._lastEndTimeCheck=null;this._maxFeatureAge=0;a.purgeOptions&&(a.purgeOptions.age&&"number"===typeof a.purgeOptions.age)&&(this._maxFeatureAge=1E3*Math.ceil(60*a.purgeOptions.age));this._drawFeatures=
1522n.hitch(this,this._drawFeatures);this._queryErrorHandler=n.hitch(this,this._queryErrorHandler)},startup:function(){},propertyChangeHandler:function(a){this._init&&(0===a?this._applyTimeFilter():3===a?this._redrawAllTracks():console.debug("StreamLayer: Stream Layer only supports changing map time or maximumTrackPoints. Layer id \x3d "+this.featureLayer.id))},drawFeature:function(a){var c=this.featureLayer,d=c.objectIdField;this._timeoutId||(this._timeoutId=setTimeout(this._flushDrawBuffer,this._refreshRate));
1523c._joinField&&this._getFeature(a.attributes[d])?this._drawBuffer.updates.push({oid:a.attributes[d],updates:a}):this._drawBuffer.adds.push(a)},resume:function(){this.propertyChangeHandler(0)},refresh:function(){var a=this.featureLayer;a&&(!a._relatedUrl&&!a._keepLatestUrl?(a._fireUpdateStart(),a.clear(),a._fireUpdateEnd()):(a._fireUpdateStart(),a._refreshing=!0,a.disconnect(),a.clear(),a._relatedQueried=!1,a._keepLatestQueried=!1,a.connect()))},_drawFeatures:function(a,c){this._purgeRequests();var d=
1524this.featureLayer;d._create(a.features||[]);d._fireUpdateEnd(null,c)},_applyTimeFilter:function(a){this.inherited(arguments);this._redrawAllTracks()},_removeFeatures:function(b){var c=this.featureLayer,d=c.objectIdField;b&&a.forEach(b,function(a){a=a.attributes[d];c._unSelectFeatureIIf(a,this);this._decRefCount(a);this._removeFeatureIIf(a)},this)},_addFeatures:function(b){var c=this.featureLayer,d=c._endTimeField,e=c._startTimeField,g,h,l,n=[],p=[],q=[];g=c._trackManager;h=c.objectIdField;if(g)for(l in b=
1525g.addFeatures(b),b)b.hasOwnProperty(l)&&(n.push(l),b[l].adds&&(p=p.concat(b[l].adds)),b[l].deletes&&(q=q.concat(b[l].deletes)));else p=b;a.forEach(p,function(a){var b=a.attributes[h],c;c=d&&a.attributes[d];!c&&this._maxFeatureAge&&(c=e&&a.attributes[e]?a.attributes[e]+this._maxFeatureAge:Date.now()+this._maxFeatureAge);c&&(c=1E3*Math.ceil(c/1E3),this._featuresByTime[c]?this._featuresByTime[c].push(b):this._featuresByTime[c]=[b]);this._addFeatureIIf(b,a);this._incRefCount(b)},this);q.length&&this._removeFeatures(q);
1526g&&g.refreshTracks(n)},_updateFeatures:function(b){var c=this.featureLayer,d,e,g=[];d=c._trackManager;e=c._trackIdField;a.forEach(b,function(a){var b=a.updates;a=this._getFeature(a.oid);var h;if(a){b.geometry&&a.setGeometry(b.geometry);b=b.attributes||{};for(h in b)b.hasOwnProperty(h)&&(a.attributes[h]=b[h]);a.visible=this._checkFeatureTimeIntersects(a);d&&a.attributes[e]?g.push(a.attributes[e]):c._repaint(a,null,!0)}},this);g.length&&d.refreshTracks(g)},_redrawAllTracks:function(){var a=this.featureLayer._trackManager,
1527c;if(a&&(c=a.trimTracks())&&0<c.length)this._removeFeatures(c),a.refreshTracks()},_flushDrawBuffer:function(){clearTimeout(this._timeoutId);var a=this._drawBuffer,c=a.adds.splice(0,a.adds.length),d=a.updates.splice(0,a.updates.length),a=this.featureLayer;if(!a)return!1;a.updating||a._fireUpdateStart();this._addFeatures(c);this._updateFeatures(d);if((c=this._getExpiredFeatures())&&c.length)this._removeFeatures(c),a._trackManager&&a._trackManager.removeFeatures(c);a._purge();a._fireUpdateEnd();this._timeoutId=
1528null},_clearDrawBuffer:function(){var a=this._timeoutId,c=this._drawBuffer,d=c.adds,c=c.updates;a&&clearTimeout(a);d.splice(0,d.length);c.splice(0,c.length);this._timeoutId=null},_clearTimeBin:function(){this._featuresByTime={};this._lastEndTimeCheck=1E3*Math.ceil(Date.now()/1E3)},_clearFeatureMap:function(){this._featureMap={}},_setRefreshRate:function(a){a=a||0===a?a:200;0>a&&(a=200);this._refreshRate=a},_checkFeatureTimeIntersects:function(a){var c=this.featureLayer,d=c.getMap(),d=d?d.timeExtent:
1529null;
1529return!d||!c.timeInfo||!c.timeInfo.startTimeField&&!c.timeInfo.endTimeField?!0:0<c._filterByTime([a],d.startTime,d.endTime).match.length},_getRequestId:function(a){return("_"+a.name+a.layerId+a._ulid).replace(/[^a-zA-Z0-9\_]+/g,"_")},_fetchArchive:function(a){var c=this.featureLayer,e,l,n,k,p;c._fireUpdateStart();if(a&&this.map){e=new g(a);l=new q;a=this.map;n=c.getFilter()||{};k=n.where||"1\x3d1";p=n.geometry?d.fromJson(n.geometry):null;n=n.outFields?n.outFields.split(","):["*"];l.geometry=
1530p;l.where=k;l.outFields=n;l.returnGeometry=!0;l.outSpatialReference=new h(a.spatialReference.toJson());c._usePatch&&(a=this._getRequestId(c),this._cancelPendingRequest(null,a));var u=0,x=this,v=null,z=function(a){u++;e.execute(l).then(function(b){a(null,b)},function(b){a(b)})},w=function(a,b){a?2<=u||!c._relatedUrl?x._queryErrorHandler(Error("Could not get features from related feature service")):(v={relatedFeatureWarning:"Querying related feature service using the current filter failed. All related features are displayed, and the filter is appled to the stream service only"},
1531l.where="1\x3d1",z(w)):x._drawFeatures(b,v)};z(w)}else return this._fireUpdateEnd({error:"Archive data cannot be fetched if no feature service url is provided or if the layer is not added to a map"}),!1},_queryErrorHandler:function(a){this._purgeRequests();var c=this.featureLayer;c._errorHandler(a);c._fireUpdateEnd(a)},_getExpiredFeatures:function(){var b,c,d,e=[],g=[];if(!this.featureLayer._endTimeField&&!this._maxFeatureAge)return g;b=1E3*Math.floor(this._lastEndTimeCheck/1E3);this._lastEndTimeCheck=
1532c=1E3*Math.ceil(Date.now()/1E3);if(b&&b!==c)for(d=this._featuresByTime;b<=c;b+=1E3)d[b]&&(e=e.concat(d[b]),delete d[b]);a.forEach(e,function(a){(a=this._getFeature(a))&&g.push(a)},this);return g}});e("extend-esri")&&n.setObject("layers._StreamMode",p,l);return p})},"dojox/html/entities":function(){define(["dojo/_base/lang"],function(p){var n=p.getObject("dojox.html.entities",!0),a=function(a,e){var n,g;if(e._encCache&&e._encCache.regexp&&e._encCache.mapper&&e.length==e._encCache.length)n=e._encCache.mapper,
1533g=e._encCache.regexp;else{n={};g=["["];var d;for(d=0;d<e.length;d++)n[e[d][0]]="\x26"+e[d][1]+";",g.push(e[d][0]);g.push("]");g=RegExp(g.join(""),"g");e._encCache={mapper:n,regexp:g,length:e.length}}return a=a.replace(g,function(a){return n[a]})},e=function(a,e){var n,g;if(e._decCache&&e._decCache.regexp&&e._decCache.mapper&&e.length==e._decCache.length)n=e._decCache.mapper,g=e._decCache.regexp;else{n={};g=["("];var d;for(d=0;d<e.length;d++){var c="\x26"+e[d][1]+";";d&&g.push("|");n[c]=e[d][0];g.push(c)}g.push(")");
1534g=RegExp(g.join(""),"g");e._decCache={mapper:n,regexp:g,length:e.length}}return a=a.replace(g,function(a){return n[a]})};n.html=[["\x26","amp"],['"',"quot"],["\x3c","lt"],["\x3e","gt"],["\u00a0","nbsp"]];n.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"],
1535["\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",
1536"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",
1537"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","oslas
1537h"],["\u00f9","ugrave"],["\u00fa","uacute"],["\u00fb","ucirc"],["\u00fc","uuml"],["\u00fd","yacute"],["\u00fe",
1538"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",
1539"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"],
1540["\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"],
1541["\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",
1542"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",
1543"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"]];n.encode=function(e,h){e&&(h?e=a(e,h):(e=a(e,n.html),e=a(e,n.latin)));return e};n.decode=function(a,h){a&&(h?a=e(a,h):(a=e(a,n.html),a=e(a,n.latin)));return a};return n})},"esri/symbols/SimpleFillSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./FillSymbol ./SimpleLineSymbol require".split(" "),
1544function(p,n,a,e,l,h,q,g,d,c){var b={STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forwarddiagonal",STYLE_BACKWARD_DIAGONAL:"backwarddiagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonalcross",STYLE_FORWARDDIAGONAL:"forwarddiagonal",STYLE_BACKWARDDIAGONAL:"backwarddiagonal",STYLE_DIAGONALCROSS:"diagonalcross"},f={style:b.STYLE_SOLID,color:[0,0,0,0.25]};p=p(g,{declaredClass:"esri.symbol.SimpleFillSymbol",type:"simplefillsymbol",
1545_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical",forwarddiagonal:"esriSFSForwardDiagonal",backwarddiagonal:"esriSFSBackwardDiagonal",cross:"esriSFSCross",diagonalcross:"esriSFSDiagonalCross"},constructor:function(b,c,e){b?n.isString(b)?(this.style=b,void 0!==c&&(this.outline=c),void 0!==e&&(this.color=e)):this.style=q.valueOf(this._styles,b.style):(n.mixin(this,f),this.outline=new d(this.outline),this.color=new a(this.color))},setStyle:function(a){this.style=
1546a;return this},getStroke:function(){return this.outline&&this.outline.getStroke()},getFill:function(){var a=this.style;return a===b.STYLE_NULL?null:a===b.STYLE_SOLID?this.color:n.mixin({}
1546,l.defaultPattern,{src:c.toUrl("../images/symbol/sfs/"+a+".png"),width:10,height:10})},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 E"},fill:this.getFill(),stroke:this.getStroke()}},toJson:function(){return q.fixJson(n.mixin(this.inherited("toJson",
1547arguments),{type:"esriSFS",style:this._styles[this.style]}))}});n.mixin(p,b);p.defaultProps=f;e("extend-esri")&&(n.setObject("symbol.SimpleFillSymbol",p,h),h.symbol.defaultSimpleFillSymbol=f);return p})},"esri/layers/DynamicLayerInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./LayerInfo ./LayerMapSource ./LayerDataSource".split(" "),function(p,n,a,e,l,h,q,g){p=p(h,{declaredClass:"esri.layers.DynamicLayerInfo",defaultVisibility:!0,parentLayerId:-1,maxScale:0,
1548minScale:0,constructor:function(a){a&&(a.source?a="mapLayer"===a.source.type?new q(a.source):new g(a.source):(a=new q,a.mapLayerId=this.id),this.source=a)},toJson:function(){var a=this.inherited(arguments);a.source=this.source&&this.source.toJson();return l.fixJson(a)}});a("extend-esri")&&n.setObject("layers.DynamicLayerInfo",p,e);return p})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),
1549function(p,n,a,e,l,h,q,g){n("dijit-legacy-requires")&&e(0,function(){require(["dijit/form/_FormValueWidget"])});return p("dijit.form._FormWidget",[l,q,h,g],{setDisabled:function(d){a.deprecated("setDisabled("+d+") is deprecated. Use set('disabled',"+d+") instead.","","2.0");this.set("disabled",d)},setValue:function(d){a.deprecated("dijit.form._FormWidget:setValue("+d+") is deprecated.  Use set('value',"+d+") instead.","","2.0");this.set("value",d)},getValue:function(){a.deprecated(this.declaredClass+
1550"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name&&!n("msapp")?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dojo/DeferredList":function(){define(["./_base/kernel","./_base/Deferred","./_base/array"],function(p,n,a){p.DeferredList=function(e,l,h,p,g){var d=[];n.call(this);var c=this;0===e.length&&!l&&this.resolve([0,[]]);var b=0;a.forEach(e,function(a,g){function n(a,
1551f){d[g]=[a,f];b++;b===e.length&&c.resolve(d)}a.then(function(a){l?c.resolve([g,a]):n(!0,a)},function(a){h?c.reject(a):n(!1,a);if(p)return null;throw a;})})};p.DeferredList.prototype=new n;p.DeferredList.prototype.gatherResults=function(e){e=new p.DeferredList(e,!1,!0,!1);e.addCallback(function(e){var h=[];a.forEach(e,function(a){h.push(a[1])});return h});return e};return p.DeferredList})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(p,n,a,e){var l=
1552a.getObject("dojo.dnd",!0);l.getCopyKeyState=function(a){return a[p("mac")?"metaKey":"ctrlKey"]};l._uniqueId=0;l.getUniqueId=function(){var a;do a=n._scopeName+"Unique"+ ++l._uniqueId;while(e.byId(a));return a};l._empty={};l.isFormElement=function(a){a=a.target;3==a.nodeType&&(a=a.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+a.tagName.toLowerCase()+" ")};return l})},"dijit/Viewport":function(){define(["dojo/Evented","dojo/on","dojo/domReady","dojo/sniff","dojo/window"],
1553function(p,n,a,e,l){var h=new p,q;a(function(){var a=l.getBox();h._rlh=n(window,"resize",function(){var c=l.getBox();a.h==c.h&&a.w==c.w||(a=c,h.emit("resize"))});if(8==e("ie")){var d=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=d&&(d=screen.deviceXDPI,h.emit("resize"))},500)}e("ios")&&(n(document,"focusin",function(a){q=a.target}),n(document,"focusout",function(a){q=null}))});h.getEffectiveBox=function(a){a=l.getBox(a);var d=q&&q.tagName&&q.tagName.toLowerCase();if(e("ios")&&q&&!q.readOnly&&
1554("textarea"==d||"input"==d&&/^(color|email|number|password|search|tel|text|url)$/.test(q.type)))a.h*=0==orientation||180==orientation?0.66:0.4,d=q.getBoundingClientRect(),a.h=Math.max(a.h,d.top+d.height);return a};return h})},"esri/geometry/scaleUtils":function(){define("dojo/_base/lang dojo/has ../kernel ../config ../lang ../WKIDUnitConversion".split(" "),function(p,n,a,e,l,h){function q(a,e,f){return a&&e?a.getWidth()/e*(f||c)*d*b.screenDPI:0}function g(a,e,g,h,l){return a.expand(h*e/(((l?g:f.values[f[g]])||
1555c)*d*b.screenDPI)/a.getWidth())}
1555var d=39.37,c=6370997*Math.PI/180,b=e.defaults,f=h,m={getUnitValueForSR:function(a){return this.getUnitValue(a)||c},getUnitValue:function(a){var b,c,d;a&&("object"===typeof a?(b=a.wkid,c=a.wkt):"number"===typeof a?b=a:"string"===typeof a&&(c=a));b?d=f.values[f[b]]:c&&-1!==c.search(/^PROJCS/i)&&(a=/UNIT\[([^\]]+)\]\]$/i.exec(c))&&a[1]&&(d=parseFloat(a[1].split(",")[1]));return d},getScale:function(a,b,c){var d,e,f;1<arguments.length&&l.isDefined(b)&&!b.declaredClass?
1556(d=a,e=b,b=null,f=m.getUnitValue(c)):(d=b||a.extent,e=a.width,f=m.getUnitValue(d&&d.spatialReference));return q(d,e,f)},getExtentForScale:function(a,b,c){return g(c||a.extent,a.width,m.getUnitValue(a.spatialReference),b,!0)}};n("extend-esri")&&(p.mixin(p.getObject("geometry",!0,a),m),a.geometry._getScale=q,a.geometry._getExtentForScale=g);return m})},"dojo/io/iframe":function(){define("../_base/config ../_base/json ../_base/kernel ../_base/lang ../_base/xhr ../sniff ../_base/window ../dom ../dom-construct ../query require ../aspect ../request/iframe".split(" "),
1557function(p,n,a,e,l,h,q,g,d,c,b,f,m){a.deprecated("dojo/io/iframe","Use dojo/request/iframe.","2.0");h=m._iframeName;
1557h=h.substring(0,h.lastIndexOf("_"));var t=e.delegate(m,{create:function(){return t._frame=m.create.apply(m,arguments)},get:null,post:null,send:function(b){var c,d=l._ioSetArgs(b,function(a){c&&c.cancel()},function(b){var d=null;b=b.ioArgs;try{var e=b.handleAs;"xml"===e||"html"===e?d=c.response.data:(d=c.response.text,"json"===e?d=n.fromJson(d):"javascript"===e&&(d=a.eval(d)))}catch(f){d=
1558f}return d},function(a,b){b.ioArgs._hasError=!0;return a}),e=d.ioArgs,h="GET",q=g.byId(b.form);b.method&&("POST"===b.method.toUpperCase()&&q)&&(h="POST");b={method:h,handleAs:"json"===b.handleAs||"javascript"===b.handleAs?"text":b.handleAs,form:b.form,query:q?null:b.content,data:q?b.content:null,timeout:b.timeout,ioArgs:e};b.method&&(b.method=b.method.toUpperCase());if(p.ioPublish&&a.publish&&!1!==e.args.ioPublish)var t=f.after(m,"_notifyStart",function(a){a.options.ioArgs===e&&(t.remove(),l._ioNotifyStart(d))},
1559!0);c=m(e.url,b,!0);e._callNext=c._callNext;c.then(function(){d.resolve(d)}).otherwise(function(a){d.ioArgs.error=a;d.reject(a)});return d},_iframeOnload:q.global[h+"_onload"]});e.setObject("dojo.io.iframe",t);return t})},"esri/tileUtils":function(){define(["dojo/_base/array","dojo/has","./kernel","./geometry/Point","./geometry/Extent"],function(p,n,a,e,l){var h={_addFrameInfo:function(a,e){var d,c,b=2*e.origin[1],f=e.origin[0],h=a.origin.x,l=a.width,n;p.forEach(a.lods,function(a){d=Math.round(b/
1560a.resolution);c=Math.ceil(d/l);n=Math.floor((f-h)/(l*a.resolution));a._frameInfo||(a._frameInfo=[c,n,n+c-1,d])})},getContainingTileCoords:function(a,e,d){var c=a.origin;d=d.resolution;return{row:Math.floor((c.y-e.y)/(a.height*d)),col:Math.floor((e.x-c.x)/(a.width*d))}},getCandidateTileInfo:function(a,g,d){var c;c=a.width;for(var b=a.height,f=d.xmax-d.xmin,h=d.ymax-d.ymin,n=a.__tileInfo===g,p=n?a.getMinZoom():-1,n=n?a.getMaxZoom():-1,k=-1,r=g.lods,u=Math.abs,x,v,z,n=-1<n?n:r.length-1,p=-1<p?p:0;p<=
1561n;p++)if(v=r[p])if(z=f>h?u(h-b*v.resolution):u(f-c*v.resolution),0>k||z<=k)x=v,k=z;else break;c=x;x=c.resolution;b=(d.xmin+d.xmax)/2;f=(d.ymin+d.ymax)/2;h=a.width/2*x;x*=a.height/2;b=new l(b-h,f-x,b+h,f+x,d.spatialReference);d=new e(b.xmin,b.ymax,d.spatialReference);n=c.resolution;h=g.width;f=g.height;g=g.origin;a=a.__visibleDelta;x=Math.floor;r=h*n;u=f*n;n=x((g.y-d.y)/u);k=x((d.x-g.x)/r);p=g.y-n*u;g=x(Math.abs((d.x-(g.x+k*r))*h/r))+a.x;a=x(Math.abs((d.y-p)*f/u))+a.y;return{tile:{point:d,coords:{row:n,
1562col:k},offsets:{x:g,y:a}},lod:c,extent:b}},getTileExtent:function(a,e,d,c){var b=a.origin;e=a.lods[e].resolution;var f=a.width,h=a.height;return new l(c*e*f+b.x,b.y-(d+1)*e*h,(c+1)*e*f+b.x,b.y-d*e*h,a.spatialReference)}};n("extend-esri")&&(a.TileUtils=h);return h})},"esri/renderers/SimpleRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../symbols/jsonUtils ./Renderer".split(" "),function(p,n,a,e,l,h,q){p=p(q,{declaredClass:"esri.renderer.SimpleRenderer",constructor:function(a){if(a&&
1563!a.declaredClass){var d=a;this.symbol=(a=d.symbol)&&(a.declaredClass?a:h.fromJson(a));this.label=d.label;this.description=d.description}else this.symbol=a},getSymbol:function(a){return this.symbol},toJson:function(){var a=n.mixin(this.inherited(arguments),{type:"simple",label:this.label,description:this.description,symbol:this.symbol&&this.symbol.toJson()});return l.fixJson(a)}});a("extend-esri")&&n.setObject("renderer.SimpleRenderer",p,e);return p})},"esri/symbols/MarkerSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ./Symbol".split(" "),
1564function(p,n,a,e,l,h){p=p(h,{declaredClass:"esri.symbol.MarkerSymbol",angle:0,xoffset:0,yoffset:0,size:12,constructor:function(a){a&&n.isObject(a)&&(this.size="auto"===this.size?this.size:e.pt2px(this.size),this.xoffset=e.pt2px(this.xoffset),this.yoffset=e.pt2px(this.yoffset),this.angle&&(this.angle*=-1))},setAngle:function(a){this.angle=a;return this},setSize:function(a){this.size=a;return this},setOffset:function(a,e){this.xoffset=a;this.yoffset=e;return this},toJson:function(){var a=e.px2pt(this.size),
1565a=isNaN(a)?void 0:a,g=e.px2pt(this.xoffset),g=isNaN(g)?void 0:g,d=e.px2pt(this.yoffset),d=isNaN(d)?void 0:d;
1565return n.mixin(this.inherited("toJson",arguments),{size:"auto"===this.size?this.size:a,angle:this.angle&&-1*this.angle,xoffset:g,yoffset:d})}});a("extend-esri")&&n.setObject("symbol.MarkerSymbol",p,l);return p})},"dijit/_base/place":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/window","../place","../main"],function(p,n,a,e,l){var h={getViewport:function(){return a.getBox()}};
1566h.placeOnScreen=e.at;h.placeOnScreenAroundElement=function(a,g,d,c){var b;if(n.isArray(d))b=d;else{b=[];for(var f in d)b.push({aroundCorner:f,corner:d[f]})}return e.around(a,g,b,!0,c)};h.placeOnScreenAroundNode=h.placeOnScreenAroundElement;h.placeOnScreenAroundRectangle=h.placeOnScreenAroundElement;h.getPopupAroundAlignment=function(a,e){var d={};p.forEach(a,function(a){var b=e;switch(a){case "after":d[e?"BR":"BL"]=e?"BL":"BR";break;case "before":d[e?"BL":"BR"]=e?"BR":"BL";break;case "below-alt":b=
1567!b;case "below":d[b?"BL":"BR"]=b?"TL":"TR";d[b?"BR":"BL"]=b?"TR":"TL";break;case "above-alt":b=!b;default:d[b?"TL":"TR"]=b?"BL":"BR",d[b?"TR":"TL"]=b?"BR":"BL"}});return d};n.mixin(l,h);return l})},"esri/layers/RangeDomain":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./Domain".split(" "),function(p,n,a,e,l,h){p=p([h],{declaredClass:"esri.layers.RangeDomain",constructor:function(a){a&&n.isObject(a)&&(this.minValue=a.range[0],this.maxValue=a.range[1])},toJson:function(){var a=
1568this.inherited(arguments);a.range=[this.minValue,this.maxValue];return l.fixJson(a)}});a("extend-esri")&&n.setObject("layers.RangeDomain",p,e);return p})},"esri/layers/Field":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ./RangeDomain ./CodedValueDomain".split(" "),function(p,n,a,e,l,h){p=p(null,{declaredClass:"esri.layers.Field",constructor:function(a){if(a&&n.isObject(a)&&(this.name=a.name,this.type=a.type,this.alias=a.alias,this.length=a.length,this.editable=a.editable,
1569this.nullable=a.nullable,(a=a.domain)&&n.isObject(a)))switch(a.type){case "range":this.domain=new l(a);break;case "codedValue":this.domain=new h(a)}}});a("extend-esri")&&n.setObject("layers.Field",p,e);return p})},"esri/OAuthCredential":function(){define(["./kernel","dojo/_base/declare","dojo/has","dojo/json"],function(p,n,a,e){n=n(null,{declaredClass:"esri.OAuthCredential",oAuthInfo:null,storage:null,expires:null,ssl:null,token:null,userId:null,constructor:function(a,e){this.oAuthInfo=a;this.storage=
1570e;this._init()},isValid:function(){var a=!1;if(this.oAuthInfo&&this.token&&this.userId){var e=(new Date).getTime();this.expires>e&&(this.expires-e)/1E3>60*this.oAuthInfo.minTimeUntilExpiration&&(a=!0)}return a},save:function(){if(this.storage){var a=this._load(),h=this.oAuthInfo;if(h&&h.authNamespace&&h.portalUrl){var n=a[h.authNamespace];n||(n=a[h.authNamespace]={});n[h.portalUrl]={expires:this.expires,ssl:this.ssl,token:this.token,userId:this.userId};try{this.storage.setItem("esriJSAPIOAuth",e.stringify(a))}catch(g){console.log(g)}}}},
1571destroy:function(){var a=this._load(),h=this.oAuthInfo;if(h&&h.authNamespace&&h.portalUrl&&this.storage){var n=a[h.authNamespace];if(n){delete n[h.portalUrl];try{this.storage.setItem("esriJSAPIOAuth",e.stringify(a))}catch(g){console.log(g)}}}h&&(this.oAuthInfo=h._oAuthCred=null)},_init:function(){var a=this._load(),e=this.oAuthInfo;if(e&&(e.authNamespace&&e.portalUrl)&&(a=a[e.authNamespace]))if(a=a[e.portalUrl])this.expires=a.expires,this.ssl=a.ssl,this.token=a.token,this.userId=a.userId},_load:function(){var a=
1572{};if(this.storage){var h=this.storage.getItem("esriJSAPIOAuth");if(h)try{a=e.parse(h)}catch(n){console.log(n)}}return a}});a("extend-esri")&&(p.OAuthCredential=n);return n})},"esri/geometry/Point":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ../srUtils".split(" "),function(p,n,a,e,l,h,q,g){function d(a,c){89.99999<c?c=89.99999:-89.99999>c&&(c=-89.99999);var d=c*t;return[a*t*b,b/2*Math.log((1+Math.sin(d))/(1-Math.sin(d)))]}function c(a,
1573c,d){a=a/b*m;if(d)return c=f/2-2*Math.atan(Math.exp(-1*c/b)),[a,c*m];d=a-360*Math.floor((a+180)/360);c=f/2-2*Math.atan(Math.exp(-1*c/b));return[d,c*m]}var b=6378137,f=3.141592653589793,m=57.29577951308232,t=0.017453292519943,s={type:"point",x:0,y:0};p=p(q,{declaredClass:"esri.geometry.Point",constructor:function(a,b,c){n.mixin(this,s);n.isArray(a)?(this.x=a[0],this.y=a[1],this.spatialReference=b):n.isObject(a)?(n.mixin(this,a),l.isDefined(this.latitude)&&(this.y=this.latitude),l.isDefined(this.longitude)&&
1574(this.x=this.longitude),this.spatialReference&&(this.spatialReference=g.createSpatialReference(this.spatialReference))):(this.x=a,this.y=b,this.spatialReference=c);this.verifySR()},offset:function(a,b){return new this.constructor(this.x+a,this.y+b,this.spatialReference)},setX:function(a){this.x=a;this.clearCache();return this},setY:function(a){this.y=a;this.clearCache();return this},setLongitude:function(a){var b=this.spatialReference;b&&(b._isWebMercator()?this.setX(d(a,this.y)[0]):4326===b.wkid&&
1575this.setX(a));return this},setLatitude:function(a){var b=this.spatialReference;b&&(b._isWebMercator()?this.setY(d(this.x,a)[1]):4326===b.wkid&&this.setY(a));return this},getLongitude:function(){var a=this.spatialReference,b;a&&(a._isWebMercator()?b=c(this.x,this.y)[0]:4326===a.wkid&&(b=this.x));return b},getLatitude:function(){var a=this.spatialReference,b;a&&(a._isWebMercator()?b=c(this.x,this.y)[1]:4326===a.wkid&&(b=this.y));return b},update:function(a,b){this.x=a;this.y=b;this.clearCache();return this},
1576normalize:function(){var a=this.x,b=this.spatialReference;if(b){var c=b._getInfo();if(c){var d=c.valid[0],e=c.valid[1],c=2*e;a>e?(d=Math.ceil(Math.abs(a-e)/c),a-=d*c):a<d&&(d=Math.ceil(Math.abs(a-d)/c),a+=d*c)}}return new this.constructor(a,this.y,b)},toJson:function(){var a={x:this.x,y:this.y},b=this.spatialReference;b&&(a.spatialReference=b.toJson());return a}});p.lngLatToXY=d;p.xyToLngLat=c;p.defaultProps=s;a("extend-esri")&&(n.setObject("geometry.Point",p,e),e.geometry.defaultPoint=s);return p})},
1577"esri/renderers/ScaleDependentRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ./Renderer".split(" "),function(p,n,a,e,l,h,q){p=p(q,{declaredClass:"esri.renderer.ScaleDependentRenderer",constructor:function(a){this.setRendererInfos(a&&a.rendererInfos||[])},setRendererInfos:function(a){this.rendererInfos=a;this._setRangeType();return this},getSymbol:function(a){var d=this.getRendererInfo(a);return d&&d.renderer&&d.renderer.getSymbol(a)},getRendererInfo:function(a){a=
1578a.getLayer().getMap();return"zoom"===this.rangeType?this.getRendererInfoByZoom(a.getZoom()):this.getRendererInfoByScale(a.getScale())},getRendererInfoByZoom:function(a){var d,c=this.rendererInfos,b,e=0;do d=c[e],a>=d.minZoom&&a<=d.maxZoom&&(b=d),e++;while(!b&&e<c.length);return b},getRendererInfoByScale:function(a){var d,c=this.rendererInfos,b,e=0,h,l,n,k;do d=c[e],h=d.minScale,l=d.maxScale,n=!h,k=!l,!n&&a<=h&&(n=!0),!k&&a>=l&&(k=!0),n&&k&&(b=d),e++;while(!b&&e<c.length);return b},addRendererInfo:function(a){var d,
1579c=0,b,e=this.rendererInfos,h=a.hasOwnProperty("minZoom")?"minZoom":"minScale",l=e.length;do{b=e[c];if(l===c||a[h]<b[h])e.splice(c,0,a),this._setRangeType(),d=!0;c++}while(!d&&c<l);return this},_setRangeType:function(){var a=this.rendererInfos;if(a=a&&a[0])this.rangeType=a.hasOwnProperty("minZoom")?"zoom":a.hasOwnProperty("minScale")?"scale":""},toJson:function(){if("zoom"===this.rangeType)return null;var e=this.rendererInfos||[],d=e[0]&&e[0].minScale,e=a.mixin(this.inherited(arguments),{type:"scaleDependent",
1580minScale:0<d?d:0,rendererInfos:n.map(e,function(a){return h.fixJson({maxScale:0<a.maxScale?a.maxScale:0,renderer:a.renderer&&a.renderer.toJson()})})});return h.fixJson(e)}});e("extend-esri")&&a.setObject("renderer.ScaleDependentRenderer",p,l);return p})},"dijit/Dialog":function(){define("require dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/ready dojo/sniff dojo/window dojo/dnd/Moveable dojo/dnd/TimedMoveable ./focus ./_base/manager ./_Widget ./_TemplatedMixin ./_CssStateMixin ./form/_FormMixin ./_DialogMixin ./DialogUnderlay ./layout/ContentPane ./layout/utils dojo/text!./templates/Dialog.html ./a11yclick dojo/i18n!./nls/common".split(" "),
1581function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y,B,G,D,A,C,E,I){var H=new l;H.resolve(!0);z=e("dijit._DialogBase"+(k("dojo-bidi")?"_NoBidi":""),[y,G,D,B],{templateString:I,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!1,duration:z.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,draggable:!0,_setDraggableAttr:function(a){this._set("draggable",a)},maxRatio:0.9,closable:!0,
1582_setClosableAttr:function(a){this.closeButtonNode.style.display=a?"":"none";this._set("closable",a)},postMixInProperties:function(){var a=b.getLocalization("dijit","common");m.mixin(this,a);this.inherited(arguments)},postCreate:function(){d.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);a.after(this,"onExecute",m.hitch(this,"hide"),!0);a.after(this,"onCancel",m.hitch(this,"hide"),!0);this._modalconnects=[]},onLoad:function(){this.resize();
1583this._position();this.autofocus&&J.isTop(this)&&(this._getFocusItems(),v.focus(this._firstFocusItem));this.inherited(arguments)},focus:function(){this._getFocusItems();v.focus(this._firstFocusItem)},_endDrag:function(){var a=g.position(this.domNode),b=r.getBox(this.ownerDocument);a.y=Math.min(Math.max(a.y,0),b.h-a.h);
1583a.x=Math.min(Math.max(a.x,0),b.w-a.w);this._relativePosition=a;this._position()},_setup:function(){var b=this.domNode;this.titleBar&&this.draggable?(this._moveable=new (6==k("ie")?x:
1584u)(b,{handle:this.titleBar}),a.after(this._moveable,"onMoveStop",m.hitch(this,"_endDrag"),!0)):q.add(b,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":n.map(this["class"].split(/\s/),function(a){return a+"_underlay"}).join(" "),_onKeyDown:m.hitch(this,"_onKey"),ownerDocument:this.ownerDocument}},_size:function(){this.resize()},_position:function(){if(!q.contains(this.ownerDocumentBody,"dojoMove")){var a=this.domNode,b=r.getBox(this.ownerDocument),c=this._relativePosition,e=c?null:
1585g.position(a);d.set(a,{left:Math.floor(b.l+(c?c.x:(b.w-e.w)/2))+"px",top:Math.floor(b.t+(c?c.y:(b.h-e.h)/2))+"px"})}},_onKey:function(a){if(a.keyCode==f.TAB){this._getFocusItems();var b=a.target;this._firstFocusItem==this._lastFocusItem?(a.stopPropagation(),a.preventDefault()):b==this._firstFocusItem&&a.shiftKey?(v.focus(this._lastFocusItem),a.stopPropagation(),a.preventDefault()):b==this._lastFocusItem&&!a.shiftKey&&(v.focus(this._firstFocusItem),a.stopPropagation(),a.preventDefault())}else this.closable&&
1586a.keyCode==f.ESCAPE&&(this.onCancel(),a.stopPropagation(),a.preventDefault())},show:function(){if(this.open)return H.promise;this._started||this.startup();this._alreadyInitialized||(this._setup(),this._alreadyInitialized=!0);this._fadeOutDeferred&&(this._fadeOutDeferred.cancel(),J.hide(this));var a=r.get(this.ownerDocument);this._modalconnects.push(t(a,"scroll",m.hitch(this,"resize",null)));this._modalconnects.push(t(this.domNode,"keydown",m.hitch(this,"_onKey")));d.set(this.domNode,{opacity:0,display:""});
1587this._set("open",!0);this._onShow();this.resize();this._position();var b;this._fadeInDeferred=new l(m.hitch(this,function(){b.stop();delete this._fadeInDeferred}));a=this._fadeInDeferred.promise;b=c.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:m.hitch(this,function(){J.show(this,this.underlayAttrs)}),onEnd:m.hitch(this,function(){this.autofocus&&J.isTop(this)&&(this._getFocusItems(),v.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();
1588return a},hide:function(){if(!this._alreadyInitialized||!this.open)return H.promise;this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new l(m.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));this._fadeOutDeferred.then(m.hitch(this,"onHide"));var b=this._fadeOutDeferred.promise;a=c.fadeOut({node:this.domNode,duration:this.duration,onEnd:m.hitch(this,function(){this.domNode.style.display="none";J.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();
1589this._scrollConnected&&(this._scrollConnected=!1);for(var d;d=this._modalconnects.pop();)d.remove();this._relativePosition&&delete this._relativePosition;this._set("open",!1);return b},resize:function(a){if("none"!=this.domNode.style.display){this._checkIfSingleChild();if(!a){this._shrunk&&(this._singleChild&&"undefined"!=typeof this._singleChildOriginalStyle&&(this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle,delete this._singleChildOriginalStyle),n.forEach([this.domNode,this.containerNode,
1590this.titleBar,this.actionBarNode],function(a){a&&d.set(a,{position:"static",width:"auto",height:"auto"})}),this.domNode.style.position="absolute");var b=r.getBox(this.ownerDocument);b.w*=this.maxRatio;b.h*=this.maxRatio;var c=g.position(this.domNode);c.w>=b.w||c.h>=b.h?(a={w:Math.min(c.w,b.w),h:Math.min(c.h,b.h)},this._shrunk=!0):this._shrunk=!1}if(a){g.setMarginBox(this.domNode,a);b=[];this.titleBar&&b.push({domNode:this.titleBar,region:"top"});this.actionBarNode&&b.push({domNode:this.actionBarNode,
1591region:"bottom"});c={domNode:this.containerNode,region:"center"};b.push(c);var e=E.marginBox2contentBox(this.domNode,a);E.layoutChildren(this.domNode,e,b);this._singleChild?(b=E.marginBox2contentBox(this.containerNode,c),this._singleChild.resize({w:b.w,h:b.h})):(this.containerNode.style.overflow="auto",this._layoutChildren())}else this._layoutChildren();!k("touch")&&!a&&this._position()}}
1591,_layoutChildren:function(){n.forEach(this.getChildren(),function(a){a.resize&&a.resize()})},destroy:function(){this._fadeInDeferred&&
1592this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var a;a=this._modalconnects.pop();)a.remove();J.hide(this);this.inherited(arguments)}});k("dojo-bidi")&&(z=e("dijit._DialogBase",z,{_setTitleAttr:function(a){this._set("title",a);this.titleNode.innerHTML=a;this.applyTextDir(this.titleNode)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this.set("title",this.title))}}));var L=e("dijit.Dialog",
1593[C,z],{});L._DialogBase=z;var J=L._DialogLevelManager={_beginZIndex:950,show:function(a,b){F[F.length-1].focus=v.curNode;var c=F[F.length-1].dialog?F[F.length-1].zIndex+2:L._DialogLevelManager._beginZIndex;d.set(a.domNode,"zIndex",c);A.show(b,c-1);F.push({dialog:a,underlayAttrs:b,zIndex:c})},hide:function(a){if(F[F.length-1].dialog==a){F.pop();var b=F[F.length-1];1==F.length?A.hide():A.show(b.underlayAttrs,b.zIndex-1);if(a.refocus){a=b.focus;if(b.dialog&&(!a||!h.isDescendant(a,b.dialog.domNode)))b.dialog._getFocusItems(),
1594a=b.dialog._firstFocusItem;if(a)try{a.focus()}catch(c){}}}else b=n.indexOf(n.map(F,function(a){return a.dialog}),a),-1!=b&&F.splice(b,1)},isTop:function(a){return F[F.length-1].dialog==a}},F=L._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];v.watch("curNode",function(a,b,c){a=F[F.length-1].dialog;if(c&&a&&!a._fadeOutDeferred&&c.ownerDocument==a.ownerDocument){do if(c==a.domNode||q.contains(c,"dijitPopup"))return;while(c=c.parentNode);a.focus()}});k("dijit-legacy-requires")&&s(0,function(){p(["dijit/TooltipDialog"])});
1595return L})},"dijit/_base/focus":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/topic dojo/_base/window ../focus ../selection ../main".split(" "),function(p,n,a,e,l,h,q,g){h.focus=function(a){if(a){var c="node"in a?a.node:a,b=a.bookmark;a=a.openedForWindow;var e=b?b.isCollapsed:!1;if(c){var m="iframe"==c.tagName.toLowerCase()?c.contentWindow:c;if(m&&m.focus)try{m.focus()}catch(n){}h._onFocusNode(c)}if(b&&l.withGlobal(a||l.global,g.isCollapsed)&&!e){a&&a.focus();try{l.withGlobal(a||
1596l.global,g.moveToBookmark,null,[b])}catch(p){}}}};h.watch("curNode",function(a,c,b){g._curFocus=b;g._prevFocus=c;b&&e.publish("focusNode",b)});h.watch("activeStack",function(a,c,b){g._activeStack=b});h.on("widget-blur",function(a,c){e.publish("widgetBlur",a,c)});h.on("widget-focus",function(a,c){e.publish("widgetFocus",a,c)});a.mixin(g,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return g.getBookmark().isCollapsed},getBookmark:function(){return(l.global==window?q:new q.SelectionManager(l.global)).getBookmark()},
1597moveToBookmark:function(a){return(l.global==window?q:new q.SelectionManager(l.global)).moveToBookmark(a)},getFocus:function(a,c){var b=!h.curNode||a&&n.isDescendant(h.curNode,a.domNode)?g._prevFocus:h.curNode;return{node:b,bookmark:b&&b==h.curNode&&l.withGlobal(c||l.global,g.getBookmark),openedForWindow:c}},_activeStack:[],registerIframe:function(a){return h.registerIframe(a)},unregisterIframe:function(a){a&&a.remove()},registerWin:function(a,c){return h.registerWin(a,c)},unregisterWin:function(a){a&&
1598a.remove()}});return g})},"dijit/a11y":function(){define("dojo/_base/array dojo/dom dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/sniff ./main".split(" "),function(p,n,a,e,l,h,q){var g={_isElementShown:function(d){var c=e.get(d);return"hidden"!=c.visibility&&"collapsed"!=c.visibility&&"none"!=c.display&&"hidden"!=a.get(d,"type")},hasDefaultTabStop:function(d){switch(d.nodeName.toLowerCase()){case "a":return a.has(d,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;
1599case "iframe":var c;try{var b=d.contentDocument;if("designMode"in b&&"on"==b.designMode)return!0;c=b.body}catch(e){try{c=d.contentWindow.document.body}catch(g){return!1}}return c&&("true"==c.contentEditable||c.firstChild&&"true"==c.firstChild.contentEditable);default:return"true"==d.contentEditable}},effectiveTabIndex:function(d){return a.get(d,"disabled")?void 0:a.has(d,"tabIndex")?+a.get(d,"tabIndex"):g.hasDefaultTabStop(d)?0:void 0},isTabNavigable:function(a){return 0<=g.effectiveTabIndex(a)},
1600isFocusable:function(a){return-1<=g.effectiveTabIndex(a)},_getTabNavigable:function(d){function c(a){return a&&"input"==a.tagName.toLowerCase()&&a.type&&"radio"==a.type.toLowerCase()&&a.name&&a.name.toLowerCase()}var b,e,l,n,p,k,r={},q=g._isElementShown,x=g.effectiveTabIndex,v=function(d){for(d=d.firstChild;d;d=d.nextSibling)if(!(1!=d.nodeType||9>=h("ie")&&"HTML"!==d.scopeName||!q(d))){var g=x(d);if(0<=g){if(0==g)b||(b=d),e=d;else if(0<g){if(!l||g<n)n=g,l=d;if(!p||g>=k)k=g,p=d}g=c(d);a.get(d,"checked")&&
1601g&&(r[g]=d)}"SELECT"!=d.nodeName.toUpperCase()&&v(d)}};q(d)&&v(d);return{first:r[c(b)]||b,last:r[c(e)]||e,lowest:r[c(l)]||l,highest:r[c(p)]||p}},getFirstInTabbingOrder:function(a,c){var b=g._getTabNavigable(n.byId(a,c));return b.lowest?b.lowest:b.first},getLastInTabbingOrder:function(a,c){var b=g._getTabNavigable(n.byId(a,c));return b.last?b.last:b.highest}};l.mixin(q,g);return g})},"esri/srUtils":function(){define(["./SpatialReference","./ImageSpatialReference","./kernel","./sniff","dojo/_base/lang"],
1602function(p,n,a,e,l){function h(a){var d=!1;if(a&&(a.ics||a.icsid))d=!0;return d}var q={isICS:h,createSpatialReference:function(a){var d=null;a&&(d=h(a)?new n(a):new p(a));return d}};e("extend-esri")&&l.mixin(a,q);return q})},"dijit/form/_ToggleButtonMixin":function(){define(["dojo/_base/declare","dojo/dom-attr"],function(p,n){return p("dijit.form._ToggleButtonMixin",null,{checked:!1,_aria_attr:"aria-pressed",_onClick:function(a){var e=this.checked;this._set("checked",!e);var l=this.inherited(arguments);
1603this.set("checked",l?this.checked:e);return l},_setCheckedAttr:function(a,e){this._set("checked",a);var l=this.focusNode||this.domNode;this._created&&n.get(l,"checked")!=!!a&&n.set(l,"checked",!!a);l.setAttribute(this._aria_attr,String(a));this._handleOnChange(a,e)},postCreate:function(){this.inherited(arguments);var a=this.focusNode||this.domNode;this.checked&&a.setAttribute("checked","checked");void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.checked)},reset:function(){this._hasBeenBlurred=
1604!1;this.set("checked",this.params.checked||!1)}})})},"esri/map":function(){define("require dojo/_base/kernel dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/event dojo/on dojo/aspect dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dijit/registry ./kernel ./config ./sniff ./lang ./_coremap ./MapNavigationManager dojo/i18n!./nls/jsapi".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y){var B={up:"panUp",right:"panRight",
1605down:"panDown",left:"panLeft"},G={upperRight:"panUpperRight",lowerRight:"panLowerRight",lowerLeft:"panLowerLeft",upperLeft:"panUpperLeft"},D=e.connect,A=e.disconnect,C=m.create,E=s.set,I=l.hitch,H=t.getMarginBox,L=n.deprecated,J=l.mixin,F=0;n=a(z,{declaredClass:"esri.Map",constructor:function(a,b){J(this,{_slider:null,_navDiv:null,_mapParams:J({attributionWidth:0.45,slider:!0,nav:!1,logo:!0,sliderStyle:"small",sliderPosition:"top-left",sliderOrientation:"vertical",autoResize:!0},b||{})});J(this,{isDoubleClickZoom:!1,
1606isShiftDoubleClickZoom:!1,isClickRecenter:!1,isScrollWheelZoom:!1,isPan:!1,isRubberBandZoom:!1,isKeyboardNavigation:!1,isPanArrows:!1,isZoomSlider:!1});l.isFunction(r._css)&&(r._css=r._css(this._mapParams.force3DTransforms),this.force3DTransforms=this._mapParams.force3DTransforms);var c=x("esri-transforms")&&x("esri-transitions");this.navigationMode=this._mapParams.navigationMode||c&&"css-transforms"||"classic";"css-transforms"===this.navigationMode&&!c&&(this.navigationMode="classic");this.fadeOnZoom=
1607v.isDefined(this._mapParams.fadeOnZoom)?this._mapParams.fadeOnZoom:"css-transforms"===this.navigationMode;"css-transforms"!==this.navigationMode&&(this.fadeOnZoom=!1);this.setMapCursor("default");this.smartNavigation=b&&b.smartNavigation;if(!v.isDefined(this.smartNavigation)&&x("mac")&&!x("esri-touch")&&!x("esri-pointer")&&!(3.5>=x("ff"))){var e=navigator.userAgent.match(/Mac\s+OS\s+X\s+([\d]+)(\.|\_)([\d]+)\D/i);e&&(v.isDefined(e[1])&&v.isDefined(e[3]))&&(c=parseInt(e[1],10),e=parseInt(e[3],10),
1608this.smartNavigation=10<c||10===c&&6<=e)}this.showAttribution=v.isDefined(this._mapParams.showAttribution)?this._mapParams.showAttribution:!0;this._onLoadHandler_connect=D(this,"onLoad",this,"_onLoadInitNavsHandler");var f=C("div",{"class":"esriControlsBR"+(this._mapParams.nav?" withPanArrows":"")},this.root);if(this.showAttribution)if(c=l.getObject("esri.dijit.Attribution",!1))this._initAttribution(c,f);else{var k=F++,m=this;this._rids&&this._rids.push(k);p(["./dijit/Attribution"],function(a){var b=
1609m._rids?h.indexOf(m._rids,k):-1;-1!==b&&(m._rids.splice(b,1),m._initAttribution(a,f))})}this._mapParams.logo&&(c={},6===x("ie")&&(c.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled\x3d'true', sizingMethod\x3d'crop', src\x3d'"+p.toUrl("./images/map/logo-med.png")+"')"),this._ogol=C("div",{style:c},f),this._setLogoSize(),this._onMapResizeLogo_connect=D(this,"onResize",this,"_setLogoSize"),x("esri-touch")||(this._ogol_connect=D(this._ogol,"onclick",this,"_openLogoLink")));this.navigationManager=
1610new w(this);b&&b.basemap&&(this._onLoadFix=!0,this.setBasemap(b.basemap),this._onLoadFix=!1);if(this.autoResize=this._mapParams.autoResize)c=this._getEnclosingResizableWidget(this.container)||window,e=this.resize,this._rszSignal=g.pausable(c,"resize",e),this._oriSignal=g.pausable(window,"orientationchange",e),d.after(c,"resize",e,!0),this._startResizeTimer()},_startResizeTimer:function(){clearTimeout(this._persistentTimer);this._persistentTimer=setTimeout(this._timedResize,2*this.resizeDelay)},_getEnclosingResizableWidget:function(a){var b=
1611k.getEnclosingWidget(a);return!b?b:b.resize?b:this._getEnclosingResizableWidget(a.parentNode)}
1611,_setLogoSize:function(){this._ogol&&(25E4>this.root.clientWidth*this.root.clientHeight?(f.remove(this._ogol,"logo-med"),f.add(this._ogol,"logo-sm")):(f.remove(this._ogol,"logo-sm"),f.add(this._ogol,"logo-med")))},_initAttribution:function(a,b){var c=C("span",{"class":"esriAttribution"},b,"first");E(c,"maxWidth",Math.floor(this.width*this._mapParams.attributionWidth)+"px");this._connects.push(D(c,"onclick",
1612function(){f.contains(this,"esriAttributionOpen")?f.remove(this,"esriAttributionOpen"):this.scrollWidth>this.clientWidth&&f.add(this,"esriAttributionOpen")}));this.attribution=new a({map:this},c)},_cleanUp:function(){this.disableMapNavigation();this.navigationManager.destroy();var a=this._slider;a&&(a.destroy&&!a._destroyed)&&a.destroy();var a=this._navDiv,b=this.attribution;a&&m.destroy(a);b&&b.destroy();this._connects.push(this._slider_connect,this._ogol_connect,this._rszSignal,this._oriSignal);
1613h.forEach(this._connects,A);clearInterval(this._persistentTimer);this.attribution=this.navigationManager=this._rids=this._connects=this._slider_connect=this._ogol_connect=this._rszSignal=this._oriSignal=this._persistentTimer=null;this.inherited("_cleanUp",arguments)},_isPanningOrZooming:function(){return this.__panning||this.__zooming},_canZoom:function(a){var b=this.getLevel();return!this.__tileInfo||!(b===this.getMinZoom()&&0>a||b===this.getMaxZoom()&&0<a)},_onLoadInitNavsHandler:function(){this.enableMapNavigation();
1614this._createNav();if("small"===this._mapParams.sliderStyle||!this._createSlider)this._createSimpleSlider();else if(this._mapParams.slider){var a=-1!==this._getSliderClass(!0).indexOf("Horizontal"),a=[a?"dijit.form.HorizontalSlider":"dijit.form.VerticalSlider",a?"dijit.form.HorizontalRule":"dijit.form.VerticalRule",a?"dijit.form.HorizontalRuleLabels":"dijit.form.VerticalRuleLabels"];if(h.some(a,function(a){return!l.getObject(a,!1)})){var a=h.map(a,function(a){return a.replace(/\./g,"/")}),b=F++,c=
1615this;this._rids&&this._rids.push(b);p(a,function(){var a=c._rids?h.indexOf(c._rids,b):-1;-1!==a&&(c._rids.splice(a,1),c._createSlider.apply(c,arguments))})}else a=h.map(a,function(a){return l.getObject(a,!1)}),this._createSlider.apply(this,a)}A(this._onLoadHandler_connect)},_createNav:function(){if(this._mapParams.nav){var a,b,c,d=f.add,e=this.id;this._navDiv=C("div",{id:e+"_navdiv"},this.root);d(this._navDiv,"navDiv");var g=this.width/2,h=this.height/2,k;for(c in B)b=B[c],a=C("div",{id:e+"_pan_"+
1616c},this._navDiv),d(a,"fixedPan "+b),"up"===c||"down"===c?(k=parseInt(H(a).w,10)/2,E(a,{left:g-k+"px",zIndex:30})):(k=parseInt(H(a).h,10)/2,E(a,{top:h-k+"px",zIndex:30})),this._connects.push(D(a,"onclick",I(this,this[b])));this._onMapResizeNavHandler_connect=D(this,"onResize",this,"_onMapResizeNavHandler");for(c in G)b=G[c],a=C("div",{id:e+"_pan_"+c,style:{zIndex:30}},this._navDiv),d(a,"fixedPan "+b),this._connects.push(D(a,"onclick",I(this,this[b])));this.isPanArrows=!0}},_onMapResizeNavHandler:function(a,
1617b,d){a=this.id;b/=2;d/=2;var e=c.byId,f,g,h;for(f in B)g=e(a+"_pan_"+f),"up"===f||"down"===f?(h=parseInt(H(g).w,10)/2,E(g,"left",b-h+"px")):(h=parseInt(H(g).h,10)/2,E(g,"top",d-h+"px"))},_createSimpleSlider:function(){if(this._mapParams.slider){var a=this._slider=C("div",{id:this.id+"_zoom_slider","class":this._getSliderClass(),style:{zIndex:30}}),b=x("esri-touch")&&!x("ff")?"touchstart":x("esri-pointer")?navigator.msPointerEnabled?"MSPointerDown":"pointerdown":"onclick",d=C("div",{"class":"esriSimpleSliderIncrementButton"},
1618a),e=C("div",{"class":"esriSimpleSliderDecrementButton"},a);this._addZoomButtonTooltips(d,e);this._incButton=d;this._decButton=e;this._simpleSliderZoomHandler(null,null,null,this.getLevel());d.innerHTML="\x3cspan\x3e+\x3c/span\x3e";e.innerHTML="\x3cspan\x3e\x26ndash;\x3c/span\x3e";8>x("ie")&&f.add(e,"dj_ie67Fix");this._connects.push(D(d,b,this,this._simpleSliderChangeHandler));this._connects.push(D(e,b,this,this._simpleSliderChangeHandler));"touchstart"==b&&(this._connects.push(D(d,"onclick",this,
1619this._simpleSliderChangeHandler)),this._connects.push(D(e,"onclick",this,this._simpleSliderChangeHandler)));(-1<this.getMaxZoom()||-1<this.getMinZoom())&&this._connects.push(D(this,"onZoomEnd",this,this._simpleSliderZoomHandler));10>x("ie")&&c.setSelectable(a,!1);this.root.appendChild(a);this.isZoomSlider=!0}},_simpleSliderChangeHandler:function(a){q.stop(a);a=-1!==a.currentTarget.className.indexOf("IncrementButton")?!0:!1;this._extentUtil({numLevels:a?1:-1})},_simpleSliderZoomHandler:function(a,
1620b,c,d){var e;a=this._incButton;b=this._decButton;-1<d&&d===this.getMaxZoom()?e=a:-1<d&&d===this.getMinZoom()&&(e=b);e?(f.add(e,"esriSimpleSliderDisabledButton"),f.remove(e===a?b:a,"esriSimpleSliderDisabledButton")):(f.remove(a,"esriSimpleSliderDisabledButton"),f.remove(b,"esriSimpleSliderDisabledButton"))},_getSliderClass:function(a){a=a?"Large":"Simple";var b=this._mapParams.sliderOrientation,c=this._mapParams.sliderPosition||"",b=b&&"horizontal"===b.toLowerCase()?"esri"+a+"SliderHorizontal":"esri"+
1621a+"SliderVertical";if(c)switch(c.toLowerCase()){case "top-left":c="esri"+a+"SliderTL";break;case "top-right":c="esri"+a+"SliderTR";break;case "bottom-left":c="esri"+a+"SliderBL";break;case "bottom-right":c="esri"+a+"SliderBR"}return"esri"+a+"Slider "+b+" "+c}
1621,_addZoomButtonTooltips:function(a,c){var d=y.widgets.zoomSlider;b.set(a,"title",d.zoomIn);b.set(c,"title",d.zoomOut)},_createSlider:function(a,b,c){if(this._mapParams.slider){var d=C("div",{id:this.id+"_zoom_slider"},this.root),e=u.defaults.map,
1622f=this._getSliderClass(!0),g=-1!==f.indexOf("Horizontal"),k=this.getNumLevels();if(0<k){var l,m,n=this._mapParams.sliderLabels,p=!!n,r=!1!==n;if(r){var q=g?"bottomDecoration":"rightDecoration";if(!n){n=[];for(e=0;e<k;e++)n[e]=""}h.forEach([{"class":"esriLargeSliderTicks",container:q,count:k,dijitClass:b},{"class":p&&"esriLargeSliderLabels",container:q,count:k,labels:n,dijitClass:c}],function(a){var c=C("div"),e=a.dijitClass;delete a.dijitClass;d.appendChild(c);e===b?l=new e(a,c):m=new e(a,c)})}a=
1623this._slider=new a({id:d.id,"class":f,minimum:this.getMinZoom(),maximum:this.getMaxZoom(),discreteValues:k,value:this.getLevel(),clickSelect:!0,intermediateChanges:!0,style:"z-index:30;"},d);a.startup();r&&(l.startup(),m.startup());this._slider_connect=D(a,"onChange",this,"_onSliderChangeHandler");this._connects.push(D(this,"onExtentChange",this,"_onExtentChangeSliderHandler"));this._connects.push(D(a._movable,"onFirstMove",this,"_onSliderMoveStartHandler"))}else{a=this._slider=new a({id:d.id,"class":f,
1624minimum:0,maximum:2,discreteValues:3,value:1,clickSelect:!0,intermediateChanges:e.sliderChangeImmediate,style:"height:50px; z-index:30;"},d);c=a.domNode.firstChild.childNodes;for(e=1;3>=e;e++)E(c[e],"visibility","hidden");a.startup();this._slider_connect=D(a,"onChange",this,"_onDynSliderChangeHandler");this._connects.push(D(this,"onExtentChange",this,"_onExtentChangeDynSliderHandler"))}e=a.incrementButton;c=a.decrementButton;g?this._addZoomButtonTooltips(e,c):this._addZoomButtonTooltips(c,e);e.style.outline=
1625"none";c.style.outline="none";a.sliderHandle.style.outline="none";a._onKeyPress=function(){};if(g=a._movable){var s=g.onMouseDown;g.onMouseDown=function(a){9>x("ie")&&1!==a.button||s.apply(this,arguments)}}this.isZoomSlider=!0}},_onSliderMoveStartHandler:function(){A(this._slider_connect);A(this._slidermovestop_connect);this._slider_connect=D(this._slider,"onChange",this,"_onSliderChangeDragHandler");this._slidermovestop_connect=D(this._slider._movable,"onMoveStop",this,"_onSliderMoveEndHandler")},
1626_onSliderChangeDragHandler:function(a){this._extentUtil({targetLevel:a})},_onSliderMoveEndHandler:function(){A(this._slider_connect);A(this._slidermovestop_connect)},_onSliderChangeHandler:function(a){this.setLevel(a)},_updateSliderValue:function(a,b){A(this._slider_connect);var c=this._slider,d=c._onChangeActive;c._onChangeActive=!1;c.set("value",a);c._onChangeActive=d;this._slider_connect=D(c,"onChange",this,b)},_onExtentChangeSliderHandler:function(a,b,c,d){A(this._slidermovestop_connect);this._updateSliderValue(d.level,
1627"_onSliderChangeHandler")},_onDynSliderChangeHandler:function(a){this._extentUtil({numLevels:0<a?1:-1})},_onExtentChangeDynSliderHandler:function(){this._updateSliderValue(1,"_onDynSliderChangeHandler")},_openLogoLink:function(a){window.open(u.defaults.map.logoLink,"_blank");q.stop(a)},enableMapNavigation:function(){this.navigationManager.enableNavigation()},disableMapNavigation:function(){this.navigationManager.disableNavigation()},enableDoubleClickZoom:function(){this.isDoubleClickZoom||(this.navigationManager.enableDoubleClickZoom(),
1628this.isDoubleClickZoom=!0)},disableDoubleClickZoom:function(){this.isDoubleClickZoom&&(this.navigationManager.disableDoubleClickZoom(),this.isDoubleClickZoom=!1)},enableShiftDoubleClickZoom:function(){this.isShiftDoubleClickZoom||(L(this.declaredClass+": Map.(enable/disable)ShiftDoubleClickZoom deprecated. Shift-Double-Click zoom behavior will not be supported.",null,"v2.0"),this.navigationManager.enableShiftDoubleClickZoom(),this.isShiftDoubleClickZoom=!0)},disableShiftDoubleClickZoom:function(){this.isShiftDoubleClickZoom&&
1629(L(this.declaredClass+": Map.(enable/disable)ShiftDoubleClickZoom deprecated. Shift-Double-Click zoom behavior will not be supported.",null,"v2.0"),this.navigationManager.disableShiftDoubleClickZoom(),this.isShiftDoubleClickZoom=!1)},enableClickRecenter:function(){this.isClickRecenter||(this.navigationManager.enableClickRecenter(),this.isClickRecenter=!0)},disableClickRecenter:function(){this.isClickRecenter&&(this.navigationManager.disableClickRecenter(),this.isClickRecenter=!1)},enablePan:function(){this.isPan||
1630(this.navigationManager.enablePan(),this.isPan=!0)},disablePan:function(){this.isPan&&(this.navigationManager.disablePan(),this.isPan=!1)},enableRubberBandZoom:function(){this.isRubberBandZoom||(this.navigationManager.enableRubberBandZoom(),this.isRubberBandZoom=!0)},disableRubberBandZoom:function(){this.isRubberBandZoom&&(this.navigationManager.disableRubberBandZoom(),this.isRubberBandZoom=!1)},enableKeyboardNavigation:function(){this.isKeyboardNavigation||(this.navigationManager.enableKeyboardNavigation(),
1631this.isKeyboardNavigation=!0)},disableKeyboardNavigation:function(){this.isKeyboardNavigation&&(this.navigationManager.disableKeyboardNavigation(),this.isKeyboardNavigation=!1)},enableScrollWheelZoom:function(){this.isScrollWheelZoom||(this.navigationManager.enableScrollWheelZoom(),this.isScrollWheelZoom=!0)},disableScrollWheelZoom:function(){this.isScrollWheelZoom&&(this.navigationManager.disableScrollWheelZoom(),this.isScrollWheelZoom=!1)},showPanArrows:function(){this._navDiv&&(this._navDiv.style.display=
1632"block",this.isPanArrows=!0)},hidePanArrows:function(){this._navDiv&&(this._navDiv.style.display="none",this.isPanArrows=!1)},showZoomSlider:function(){this._slider&&(E(this._slider.domNode||this._slider,"visibility","visible"),this.isZoomSlider=!0)},hideZoomSlider:function(){this._slider&&(E(this._slider.domNode||this._slider,"visibility","hidden"),this.isZoomSlider=!1)}});x("extend-esri")&&(r.Map=n);return n})},"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(" "),
1633function(p,n,a,e,l,h,q,g,d,c,b,f,m){function t(){}function s(b){return function(c,d,e,f){return c&&"string"==typeof d&&c[d]==t?c.on(d.substring(2).toLowerCase(),q.hitch(e,f)):b.apply(a,arguments)}}p.around(a,"connect",s);h.connect&&p.around(h,"connect",s);p=e("dijit._Widget",[b,f,m],{onClick:t,onDblClick:t,onKeyDown:t,onKeyPress:t,onKeyUp:t,onMouseDown:t,onMouseMove:t,onMouseOut:t,onMouseOver:t,onMouseLeave:t,onMouseEnter:t,onMouseUp:t,constructor:function(a){this._toConnect={};for(var b in a)this[b]===
1634t&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]=a[b],delete a[b])},postCreate:function(){this.inherited(arguments);for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},on:function(b,c){return this[this._onMap(b)]===t?a.connect(this.domNode,b.toLowerCase(),this,c):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){h.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.",
1635"","2.0");this.set(a,b)},attr:function(a,b){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,arguments):this.get(a)},getDescendants:function(){h.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?g("[widgetId]",this.containerNode).map(c.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});l("dijit-legacy-requires")&&d(0,function(){require(["dijit/_base"])});
1636return p})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),function(p,n,a,e,l,h,q,g,d,c){function b(a,b,c){return s&&c?function(a,b){return h(a,c,b)}:r?function(c,d){var e=h(c,b,function(a){d.call(this,a);A=(new Date).getTime()}),f=h(c,a,function(a){(!A||(new Date).getTime()>A+1E3)&&d.call(this,a)});return{remove:function(){e.remove();f.remove()}}}:function(b,c){return h(b,a,c)}}function f(a){do if(void 0!==
1637a.dojoClick)return a;while(a=a.parentNode)}function m(b,d,g){var k=f(b.target);if(x=!b.target.disabled&&k&&k.dojoClick)if(z=(v="useTarget"==x)?k:b.target,v&&b.preventDefault(),w=b.changedTouches?b.changedTouches[0].pageX-c.global.pageXOffset:b.clientX,y=b.changedTouches?b.changedTouches[0].pageY-c.global.pageYOffset:b.clientY,B=("object"==typeof x?x.x:"number"==typeof x?x:0)||4,G=("object"==typeof x?x.y:"number"==typeof x?x:0)||4,!u){u=!0;var l=function(b){x=v?a.isDescendant(c.doc.elementFromPoint(b.changedTouches?
1638b.changedTouches[0].pageX-c.global.pageXOffset:b.clientX,b.changedTouches?b.changedTouches[0].pageY-c.global.pageYOffset:b.clientY),z):x&&(b.changedTouches?b.changedTouches[0].target:b.target)==z&&Math.abs((b.changedTouches?b.changedTouches[0].pageX-c.global.pageXOffset:b.clientX)-w)<=B&&Math.abs((b.changedTouches?b.changedTouches[0].pageY-c.global.pageYOffset:b.clientY)-y)<=G};
1638c.doc.addEventListener(d,function(a){l(a);v&&a.preventDefault()},!0);c.doc.addEventListener(g,function(b){l(b);if(x){D=(new Date).getTime();
1639var c=v?z:b.target;"LABEL"===c.tagName&&(c=a.byId(c.getAttribute("for"))||c);var d=b.changedTouches?b.changedTouches[0]:b,e=document.createEvent("MouseEvents");e._dojo_click=!0;e.initMouseEvent("click",!0,!0,b.view,b.detail,d.screenX,d.screenY,d.clientX,d.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,null);setTimeout(function(){h.emit(c,"click",e);D=(new Date).getTime()},0)}},!0);b=function(a){c.doc.addEventListener(a,function(b){!b._dojo_click&&((new Date).getTime()<=D+1E3&&!("INPUT"==b.target.tagName&&
1640e.contains(b.target,"dijitOffScreen")))&&(b.stopPropagation(),b.stopImmediatePropagation&&b.stopImmediatePropagation(),"click"==a&&(("INPUT"!=b.target.tagName||"radio"==b.target.type||"checkbox"==b.target.type)&&"TEXTAREA"!=b.target.tagName&&"AUDIO"!=b.target.tagName&&"VIDEO"!=b.target.tagName)&&b.preventDefault())},!0)};b("click");b("mousedown");b("mouseup")}}var t=5>q("ios"),s=q("pointer-events")||q("MSPointer"),k=function(){var a={},b;for(b in{down:1,move:1,up:1,cancel:1,over:1,out:1})a[b]=q("MSPointer")?
1641"MSPointer"+b.charAt(0).toUpperCase()+b.slice(1):"pointer"+b;return a}(),r=q("touch-events"),u,x,v=!1,z,w,y,B,G,D,A,C;s?d(function(){c.doc.addEventListener(k.down,function(a){m(a,k.move,k.up)},!0)}):r&&d(function(){function a(b){var c=l.delegate(b,{bubbles:!0});6<=q("ios")&&(c.touches=b.touches,c.altKey=b.altKey,c.changedTouches=b.changedTouches,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shift
1641Key=b.shiftKey,c.targetTouches=b.targetTouches);return c}C=c.body();c.doc.addEventListener("touchstart",function(a){A=
1642(new Date).getTime();var b=C;C=a.target;h.emit(b,"dojotouchout",{relatedTarget:C,bubbles:!0});h.emit(C,"dojotouchover",{relatedTarget:b,bubbles:!0});m(a,"touchmove","touchend")},!0);h(c.doc,"touchmove",function(b){A=(new Date).getTime();var d=c.doc.elementFromPoint(b.pageX-(t?0:c.global.pageXOffset),b.pageY-(t?0:c.global.pageYOffset));d&&(C!==d&&(h.emit(C,"dojotouchout",{relatedTarget:d,bubbles:!0}),h.emit(d,"dojotouchover",{relatedTarget:C,bubbles:!0}),C=d),h.emit(d,"dojotouchmove",a(b))||b.preventDefault())});
1643h(c.doc,"touchend",function(b){A=(new Date).getTime();var d=c.doc.elementFromPoint(b.pageX-(t?0:c.global.pageXOffset),b.pageY-(t?0:c.global.pageYOffset))||c.body();h.emit(d,"dojotouchend",a(b))})});n={press:b("mousedown","touchstart",k.down),move:b("mousemove","dojotouchmove",k.move),release:b("mouseup","dojotouchend",k.up),cancel:b(g.leave,"touchcancel",s?k.cancel:null),over:b("mouseover","dojotouchover",k.over),out:b("mouseout","dojotouchout",k.out),enter:g._eventHandler(b("mouseover","dojotouchover",
1644k.over)),leave:g._eventHandler(b("mouseout","dojotouchout",k.out))};return p.touch=n})},"esri/dijit/Popup":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/kernel dojo/has dojo/window dojo/Stateful dojo/query dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dijit/registry ../kernel ../lang ../domUtils ../geometry/Polyline ../geometry/Polygon ../InfoWindowBase ../PopupBase dojo/i18n!../nls/jsapi dojo/NodeList-dom dojo/has!extend-esri?./PopupTemplate dojo/has!extend-esri?./PopupRenderer".split(" "),
1645function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y,B){p=p([w,y,g],{declaredClass:"esri.dijit.Popup",offsetX:3,offsetY:3,zoomFactor:4,marginLeft:25,marginTop:25,highlight:!0,pagingControls:!0,pagingInfo:!0,keepHighlightOnHide:!1,popupWindow:!0,titleInBody:!0,anchor:"auto",visibleWhenEmpty:!0,hideDelay:1E3,location:null,constructor:function(a,d){this.initialize();n.mixin(this,a);this.domNode=c.byId(d);var g=this._nls=n.mixin({},B.widgets.popup),k=this.domNode;f.add(k,"esriPopup");(this._isRTL=!t.isBodyLtr())&&
1646s.set(k,"direction","rtl");b.set(k,"innerHTML","\x3cdiv class\x3d'esriPopupWrapper' style\x3d'position: absolute;'\x3e\x3cdiv class\x3d'sizer'\x3e\x3cdiv class\x3d'titlePane'\x3e\x3cdiv class\x3d'spinner hidden' title\x3d'"+g.NLS_searching+"...'\x3e\x3c/div\x3e\x3cdiv class\x3d'title'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton prev hidden' title\x3d'"+g.NLS_prevFeature+"'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton next hidden' title\x3d'"+g.NLS_nextFeature+"'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton maximize' title\x3d'"+
1647g.NLS_maximize+"'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton close' title\x3d'"+g.NLS_close+"'\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'sizer content'\x3e\x3cdiv class\x3d'contentPane'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'sizer'\x3e\x3cdiv class\x3d'actionsPane'\x3e\x3cdiv class\x3d'actionList hidden'\x3e\x3ca title\x3d"+g.NLS_zoomTo+" class\x3d'action zoomTo' href\x3d'javascript:void(0);'\x3e\x3cspan\x3e"+g.NLS_zoomTo+"\x3c/span\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'pointer hidden'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'outerPointer hidden'\x3e\x3c/div\x3e");
1648this._sizers=l.query(".sizer",k);g=l.query(".titlePane",k)[0];c.setSelectable(g,!1);this._title=l.query(".title",g)[0];this._prevFeatureButton=l.query(".prev",g)[0];this._nextFeatureButton=l.query(".next",g)[0];this._maxButton=l.query(".maximize",g)[0];this._spinner=l.query(".spinner",g)[0];this._contentPane=l.query(".contentPane",k)[0];this._positioner=l.query(".esriPopupWrapper",k)[0];this._pointer=l.query(".pointer",k)[0];this._outerPointer=l.query(".outerPointer",k)[0];this._actionList=l.query(".actionsPane .actionList",
1649k)[0];this._eventConnections=[e.connect(l.query(".close",g)[0],"onclick",this,this.hide),e.connect(this._prevFeatureButton,"onclick",this,this.selectPrevious),e.connect(this._nextFeatureButton,"onclick",this,this.selectNext),e.connect(this._maxButton,"onclick",this,this._toggleSize),e.connect(l.query(".zoomTo",this._actionList)[0],"onclick",this,this._zoomToFeature),e.connect(this,"onClearFeatures",this,this._featuresCleared),e.connect(this,"onSelectionChange",this,this._featureSelected),e.connect(this,
1650"onDfdComplete",this,this._updateUI)];h("esri-touch")&&(k=x.setScrollable(this._contentPane),this._eventConnections.push(k[0],k[1]));this._toggleVisibility(!1)},onMaximize:function(){},onRestore:function(){},setMap:function(a){this.inherited(arguments);m.place(this.domNode,a.root);this.highlight&&this.enableHighlight(a);this._maxHeight=s.get(this._contentPane,"maxHeight")},unsetMap:function(){this.disableHighlight(this.map);this.inherited(arguments)}
1650,setTitle:function(a){if(this.popupWindow){if(!u.isDefined(a)||
1651""===a)a="\x26nbsp;";this.destroyDijits(this._title);this.place(a,this._title);this.isShowing&&(this.startupDijits(this._title),this.reposition())}},setContent:function(a){if(this.popupWindow){if(!u.isDefined(a)||""===a)a="\x26nbsp;";this.destroyDijits(this._contentPane);this.place(a,this._contentPane);this.isShowing&&(this.startupDijits(this._contentPane),this.reposition())}},show:function(a,b){if(this.popupWindow)if(this._delayHide=!1,a){var c=this.map,d;a.spatialReference?(this.location=a,d=c.toScreen(a)):
1652(this.location=c.toMap(a),d=a);var e=c._getFrameWidth();if(-1!==e&&(d.x%=e,0>d.x&&(d.x+=e),c.width>e))for(c=(c.width-e)/2;d.x<c;)d.x+=e;this._maximized?this.restore():this._setPosition(d);b&&b.closestFirst&&this.showClosestFirst(this.location);this.isShowing||(this._toggleVisibility(!0),this._followMap(),this.startupDijits(this._title),this.startupDijits(this._contentPane),this.reposition(),this.showHighlight(),this.onShow())}else this._toggleVisibility(!0)},hide:function(){this.isShowing&&(this._toggleVisibility(!1),
1653this._unfollowMap(),this.keepHighlightOnHide||this.hideHighlight(),this.onHide())},resize:function(a,b){this.popupWindow&&(this._sizers.style({width:a+"px"}),s.set(this._contentPane,"maxHeight",b+"px"),this._maxHeight=b,this.isShowing&&this.reposition())},reposition:function(){this.popupWindow&&this.map&&(this.location&&!this._maximized&&this.isShowing)&&this._setPosition(this.map.toScreen(this.location))},maximize:function(){var a=this.map;if(a&&!this._maximized&&this.popupWindow){this._maximized=
1654!0;var c=this._maxButton;f.remove(c,"maximize");f.add(c,"restore");b.set(c,"title",this._nls.NLS_restore);var c=this.marginLeft,d=this.marginTop,e=a.width-2*c,a=a.height-2*d;s.set(this.domNode,{left:this._isRTL?null:c+"px",right:this._isRTL?c+"px":null,top:d+"px",bottom:null});s.set(this._positioner,{left:null,right:null,top:null,bottom:null});this._savedWidth=s.get(this._sizers[0],"width");this._savedHeight=s.get(this._contentPane,"maxHeight");this._sizers.style({width:e+"px"});s.set(this._contentPane,
1655{maxHeight:a-65+"px",height:a-65+"px"});this._showPointer("");this._unfollowMap();f.add(this.domNode,"esriPopupMaximized");this.onMaximize()}},restore:function(){if(this.map&&this._maximized&&this.popupWindow){this._maximized=!1;var a=this._maxButton;f.remove(a,"restore");f.add(a,"maximize");b.set(a,"title",this._nls.NLS_maximize);s.set(this._contentPane,"height",null);this.resize(this._savedWidth,this._savedHeight);this._savedWidth=this._savedHeight=null;this.show(this.location);this._followMap();
1656f.remove(this.domNode,"esriPopupMaximized");this.onRestore()}},startup:function(){},destroy:function(){this.map&&this.unsetMap();this.cleanup();this.isShowing&&this.hide();this.destroyDijits(this._title);this.destroyDijits(this._content);a.forEach(this._eventConnections,e.disconnect);m.destroy(this.domNode);this._sizers=this._contentPane=this._actionList=this._positioner=this._pointer=this._outerPointer=this._title=this._prevFeatureButton=this._nextFeatureButton=this._spinner=this._eventConnections=
1657this._pagerScope=this._targetLocation=this._nls=this._maxButton=null},selectNext:function(){this.select(this.selectedIndex+1)},selectPrevious:function(){this.select(this.selectedIndex-1)},setFeatures:function(){this.inherited(arguments);this._updateUI()},postscript:null,_highlightSetter:function(a){var b=this.highlight,c=this.map;this.highlight=a;if(c&&a!==b)if(a){if(this.enableHighlight(c),a=this.features&&this.features[this.selectedIndex])this.updateHighlight(c,a),this.showHighlight()}else this.disableHighlight(c)},
1658_pagingControlsSetter:function(a){var b=this.pagingControls,c=this.map;this.pagingControls=a;c&&a!==b&&this._updatePagingControls()},_pagingInfoSetter:function(a){var b=this.pagingInfo,c=this.map;this.pagingInfo=a;c&&(a!==b&&this.features&&this.features.length)&&this._updatePagingInfo()},_popupWindowSetter:function(a){var b=this.popupWindow,c=this.map;this.popupWindow=a;c&&a!==b&&(a?(this._updateUI(),this._updateWindow()):(this.hide(),this.showHighlight()))},_anchorSetter:function(a){var b=this.anchor;
1659this.anchor=a;this.map&&a!==b&&this.reposition()},_featuresCleared:function(){this.setTitle("\x26nbsp;");this.setContent("\x26nbsp;");this._setPagerCallbacks(this);this._updateUI();this.hideHighlight()},_featureSelected:function(){this._updateUI();this._updateWindow()},_updateWindow:function(){var a=this.selectedIndex;if(0<=a){var b=this.features[a].getContent(),c;
1659!this.titleInBody&&b&&n.isString(b.id)&&(c=k.byId(b.id))&&(c.set&&/_PopupRenderer/.test(c.declaredClass))&&c.set("showTitle",!1);this.setContent(b);
1660this.updateHighlight(this.map,this.features[a]);this.showHighlight()}},_toggleVisibility:function(a){this._setVisibility(a);this.isShowing=a},_setVisibility:function(a){s.set(this.domNode,"visibility",a?"visible":"hidden");f.toggle(this.domNode,"esriPopupVisible",a)},_waitAndHide:function(a){var b=this;this._delayHide=!0;setTimeout(function(){b._delayHide&&(b._delayHide=!1,b.hide())},a)},_followMap:function(){this._unfollowMap();var a=this.map;this._handles=[e.connect(a,"onPanStart",this,this._onPanStart),
1661e.connect(a,"onPan",this,this._onPan),e.connect(a,"onZoomStart",this,this._onZoomStart),e.connect(a,"onExtentChange",this,this._onExtentChange)]},_unfollowMap:function(){var b=this._handles;b&&(a.forEach(b,e.disconnect),this._handles=null)},_onPanStart:function(){var a=this.domNode.style;this._panOrigin={left:a.left,top:a.top,right:a.right,bottom:a.bottom}},_onPan:function(a,b){var c=this._panOrigin,d=b.x,e=b.y,f=c.left,g=c.top,h=c.right,c=c.bottom;f&&(f=parseFloat(f)+d+"px");g&&(g=parseFloat(g)+
1662e+"px");h&&(h=parseFloat(h)-d+"px");c&&(c=parseFloat(c)-e+"px");s.set(this.domNode,{left:f,top:g,right:h,bottom:c})},_onZoomStart:function(){this._setVisibility(!1)},_onExtentChange:function(a,b,c){c&&(this._setVisibility(!0),this.show(this._targetLocation||this.location));this._targetLocation=null},_toggleSize:function(){this._maximized?this.restore():this.maximize()},_setPosition:function(a){var b=a.x,c=a.y;a=this.offsetX||0;var d=this.offsetY||0,e=0,f=0,g=t.position(this.map.container,!0),h=g.w,
1663k=g.h,l="Left",m="bottom",n=t.getContentBox(this._positioner),p=n.w/2,r=n.h/2,w=s.get(this._sizers[0],"height")+this._maxHeight+s.get(this._sizers[2],"height"),u=w/2,y=0,v=0,x=b,B=c,z=this.anchor.toLowerCase();if("auto"===z){if(z=q.getBox)z=z(),y=Math.max(z.l,g.x),h=Math.min(z.l+z.w,g.x+g.w),v=Math.max(z.t,g.y),k=Math.min(z.t+z.h,g.y+g.h),x+=g.x,B+=g.y;g=B-v>=w;w=k-B>=w;z=h-x>=n.w;n=x-y>=n.w;B-v>u&&k-B>=u&&(z?(m="",l="Left"):n&&(m="",l="Right"));l&&m&&(x-y>p&&h-x>=p)&&(g?(l="",m="bottom"):w&&(l="",
1664m="top"));l&&m&&(z&&g?(l="Left",m="bottom"):z&&w?(l="Left",m="top"):n&&w?(l="Right",m="top"):n&&g&&(l="Right",m="bottom"))}else m=l="",-1!==z.indexOf("top")?m="bottom":-1!==z.indexOf("bottom")&&(m="top"),-1!==z.indexOf("left")?l="Right":-1!==z.indexOf("right")&&(l="Left");u=m+l;switch(u){case "top":case "bottom":f=14;break;case "Left":case "Right":e=13;break;case "topLeft":case "topRight":case "bottomLeft":case "bottomRight":f=14,e=-16}s.set(this.domNode,{left:b+"px",top:c+"px",right:null,bottom:null});
1665b={left:null,right:null,top:null,bottom:null};l?b[l.toLowerCase()]=e+a+"px":b.left=-p+"px";m?b[m]=f+d+"px":b.top=-r+"px";s.set(this._positioner,b);this._showPointer(u)},_showPointer:function(a){f.remove(this._pointer,"top bottom right left topLeft topRight bottomRight bottomLeft hidden".split(" "));f.remove(this._outerPointer,["right","left","hidden"]);"Right"===a||"Left"===a?(a=a.toLowerCase(),f.add(this._outerPointer,a)):f.add(this._pointer,a)},_setPagerCallbacks:function(a,b,c){if(this.pagingControls&&
1666!(a===this&&(!this._pagerScope||this._pagerScope===this))&&a!==this._pagerScope){this._pagerScope=a;a===this&&(b=this.selectPrevious,c=this.selectNext);var d=this._eventConnections;e.disconnect(d[1]);e.disconnect(d[2]);b&&(d[1]=e.connect(this._prevFeatureButton,"onclick",a,b));c&&(d[2]=e.connect(this._nextFeatureButton,"onclick",a,c))}},_getLocation:function(b){var c=this.map,d,e,f=0,g;if(b=b&&b.geometry)switch(b.type){case "point":d=b;break;case "multipoint":d=b.getPoint(0);e=b.getExtent();break;
1667case "polyline":d=b.getPoint(0,0);e=b.getExtent();-1!==c._getFrameWidth()&&(a.forEach(b.paths,function(a){a=(new v({paths:[a,c.spatialReference]})).getExtent();var b=Math.abs(a.ymax-a.ymin),d=Math.abs(a.xmax-a.xmin),b=d>b?d:b;b>f&&(f=b,g=a)}),g.spatialReference=e.spatialReference,e=g);break;case "polygon":d=b.getPoint(0,0),e=b.getExtent(),-1!==c._getFrameWidth()&&(a.forEach(b.rings,function(a){a=(new z({rings:[a,c.spatialReference]})).getExtent();var b=Math.abs(a.ymax-a.ymin),d=Math.abs(a.xmax-a.xmin),
1668b=d>b?d:b;b>f&&(f=b,g=a)}),g.spatialReference=e.spatialReference,e=g)}return[d,e]},_zoomToFeature:function(a){a.preventDefault();var b=this.features,c=this.selectedIndex;a=this.map;if(b){c=this._getLocation(b[c]);b=c[0];c=c[1];b||(b=this.location);if(!c||!c.intersects(this.location))this.location=b;if(c&&c.getWidth()&&c.getHeight())a.setExtent(c,!0);else{var d=a.getNumLevels(),c=a.getLevel(),e=a.getMaxZoom(),f=this.zoomFactor||1;0<d?c!==e&&(d=c+f,d>e&&(d=e),a.navigationManager._wheelZoom({value:d-
1669c,mapPoint:b},!0)):a.navigationManager._wheelZoom({value:2*(1/Math.pow(2,f)),mapPoint:b},!0)}}},_updatePagingControls:function(){var a=this._prevFeatureButton,b=this._nextFeatureButton,c=this.selectedIndex,d=this.features?this.features.length:0;this.pagingControls&&1<d?(0===c?f.add(a,"hidden"):f.remove(a,"hidden"),c===d-1?f.add(b,"hidden"):f.remove(b,"hidden")):(f.add(a,"hidden"),f.add(b,"hidden"))},_updatePagingInfo:function(){var a=this.features?this.features.length:0,b=this._nls,c="\x26nbsp;";
1670this.pagingInfo&&(1<a&&b.NLS_pagingInfo)&&(c=u.substitute({index:this.selectedIndex+1,total:a},b.NLS_pagingInfo));if(a&&(b=this.getSelectedFeature(),a=b.getInfoTemplate(),b=b.getTitle(),(!a||/esri\.InfoTemplate/.test(a.declaredClass)||!this.titleInBody)&&b))c=b+("\x26nbsp;"===c?"":" "+c);this.setTitle(c)},_updateUI:function(){if(this.popupWindow){var a=this.features,b=this.deferreds,c=a?a.length:0,d=this._spinner,e=this._actionList,g=this._nls;this._updatePagingControls();this._updatePagingInfo();
1671c?f.remove(e,"hidden"):f.add(e,"hidden");b&&b.length?a?f.remove(d,"hidden"):this.setContent("\x3cdiv style\x3d'text-align: center;'\x3e"+g.NLS_searching+"...\x3c/div\x3e"):(f.add(d,"hidden"),c||(this.setContent("\x3cdiv style\x3d'text-align: center;'\x3e"+g.NLS_noInfo+".\x3c/div\x3e"),this.visibleWhenEmpty||this._waitAndHide(this.hideDelay)))}}});h("extend-esri")&&n.setObject("dijit.Popup",p,r);return p})},"esri/PopupManager":function(){define("./geometry/Extent ./geometry/ScreenPoint ./kernel ./layerUtils ./tasks/query dijit/registry dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/_base/lang dojo/has dojo/on dojo/promise/all dojo/Stateful require".split(" "),
1672function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s){var k;g=g(t,{declaredClass:"esri.PopupManager",enabled:!1,map:null,_mapClickHandle:null,_featureLayersCache:{}
1672,constructor:function(a){this._mapClickHandler=c.hitch(this,this._mapClickHandler)},setMap:function(a){if(this.map)if(a!==this.map)this.unsetMap();else return;this.map=a;this._setupClickHandler()},unsetMap:function(){this.map&&(this.map=null);this._mapClickHandle&&(this._mapClickHandle.remove(),this._mapClickHandle=null)},getMapLayer:function(a){var b;
1673if(a&&(b=a.getLayer()))if(a=b.id,this._featureLayersCache[a]){var c=a.lastIndexOf("_");-1<c&&(a=a.substring(0,c),b=this.map.getLayer(a))}return b},_enabledSetter:function(a){this.enabled=a;this._setupClickHandler()},_setupClickHandler:function(){this._mapClickHandle&&(this._mapClickHandle.remove(),this._mapClickHandle=null);this.enabled&&this.map&&(this._mapClickHandle=this.map.on("click",this._mapClickHandler))},_mapClickHandler:function(a){var b=this.map.infoWindow,c=a.graphic;b&&this.map.loaded&&
1674(b.clearFeatures&&b.setFeatures?this._showPopup(a):c&&c.getInfoTemplate()&&this._showInfoWindow(c,a.mapPoint))},_showPopup:function(a){var b=this.map,c=b.infoWindow,e=this,f=[],g=[b.graphics].concat(q.map(b.graphicsLayerIds,b.getLayer,b));q.forEach(g,function(a){a&&(a.loaded&&a.infoTemplate&&!a.suspended)&&f.push(a)});var h=[];q.forEach(b.layerIds,function(a){(a=b.getLayer(a))&&(a.loaded&&!a.suspended)&&(e._isImageServiceLayer(a)&&a.infoTemplate?f.push(a):("esri.layers.ArcGISDynamicMapServiceLayer"===
1675a.declaredClass||"esri.layers.ArcGISTiledMapServiceLayer"===a.declaredClass)&&a.infoTemplates&&h.push(a))});this._getSubLayerFeatureLayers(h).then(function(g){f=f.concat(g);g=null;a.graphic&&(a.graphic.getInfoTemplate()&&!e._isImageServiceLayer(a.graphic._layer))&&(g=a.graphic);if(f.length||g){var h=e._calculateClickTolerance(f),k=a.screenPoint,m=b.toMap(new n(k.x-h,k.y+h)),h=b.toMap(new n(k.x+h,k.y-h)),s=new p(m.x,m.y,h.x,h.y,b.spatialReference);if(s=s.intersects(b.extent)){var t=new l,w=!!g,y=!0,
1676m=q.map(f,function(c){var f;t.timeExtent=c.useMapTime?b.timeExtent:null;if(e._isImageServiceLayer(c))t.geometry=a.mapPoint,y=!1,f=c.queryVisibleRasters(t,{rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0}),f.addCallback(function(){var a=c.getVisibleRasters();w=w||0<a.length;return a});else if(e._featureLayersCache[c.id]||"function"===typeof c.queryFeatures&&(0===c.currentMode||1===c.currentMode))t.geometry=s,f=c.queryFeatures(t),f.addCallback(function(a){a=a.features;w=w||0<a.length;
1677return a});else{f=new d;var g=q.filter(c.graphics,function(a){return a&&a.visible&&s.intersects(a.geometry)});w=w||0<g.length;f.resolve(g)}return f});g&&(h=new d,h.resolve([g]),m.unshift(h));!q.some(m,function(a){return!a.isFulfilled()})&&!w?(c.hide(),c.clearFeatures()):(c.setFeatures(m),c.show(a.mapPoint,{closestFirst:y}))}}})},_getSubLayerFeatureLayers:function(a,b){var c=b||new d,g=[],h=a.length,l=Math.floor(this.map.extent.getWidth()/this.map.width),n=this.map.getScale(),p=!1,t=this,D=0;a:for(;D<
1678h;D++){var A=a[D],C=A.dynamicLayerInfos||A.layerInfos;if(C){var E=null;if(A._params&&(A._params.layers||A._params.dynamicLayers))E=A.visibleLayers;for(var E=e._getVisibleLayers(C,E),I=e._getLayersForScale(n,C),H=C.length,L=0;L<H;L++){var J=C[L],F=J.id,K=A.infoTemplates[F];if(!J.subLayerIds&&K&&K.infoTemplate&&-1<q.indexOf(E,F)&&-1<q.indexOf(I,F)){if(!k){p=!0;break a}var M=A.id+"_"+F,N=this._featureLayersCache[M];if(!N||!N.loadError)N||((N=K.layerUrl)||(N=J.source?this._getLayerUrl(A.url,"/dynamicLayer"):
1679this._getLayerUrl(A.url,F)),N=new k(N,{id:M,drawMode:!1,mode:k.MODE_SELECTION,outFields:this._getOutFields(K.infoTemplate),resourceInfo:K.resourceInfo,source:J.source}),this._featureLayersCache[M]=N),N.setDefinitionExpression(A.layerDefinitions&&A.layerDefinitions[F]),N.setGDBVersion(A.gdbVersion),N.setInfoTemplate(K.infoTemplate),N.setMaxAllowableOffset(l),N.setUseMapTime(!!A.useMapTime),A.layerDrawingOptions&&(A.layerDrawingOptions[F]&&A.layerDrawingOptions[F].renderer)&&N.setRenderer(A.layerDrawingOptions[F].renderer),
1680g.push(N)}}}}if(p){var T=new d;s(["./layers/FeatureLayer"],function(a){k=a;T.resolve()});T.then(function(){t._getSubLayerFeatureLayers(a,c)})}else{var O=[];
1680q.forEach(g,function(a){if(!a.loaded){var b=new d;f.once(a,"load, error",function(){b.resolve()});O.push(b.promise)}});O.length?m(O).then(function(){g=q.filter(g,function(a){return!a.loadError&&a.isVisibleAtScale(n)});c.resolve(g)}):(g=q.filter(g,function(a){return a.isVisibleAtScale(n)}),c.resolve(g))}return c.promise},_getLayerUrl:function(a,
1681b){var c=a.indexOf("?");return-1===c?a+"/"+b:a.substring(0,c)+"/"+b+a.substring(c)},_getOutFields:function(a){var b;a.info&&"esri.dijit.PopupTemplate"===a.declaredClass?(b=[],q.forEach(a.info.fieldInfos,function(a){var c=a.fieldName&&a.fieldName.toLowerCase();c&&("shape"!==c&&0!==c.indexOf("relationships/"))&&b.push(a.fieldName)})):b=["*"];return b},_calculateClickTolerance:function(a){var b=6,c,d;q.forEach(a,function(a){if(c=a.renderer)"esri.renderer.SimpleRenderer"===c.declaredClass?((d=c.symbol)&&
1682d.xoffset&&(b=Math.max(b,Math.abs(d.xoffset))),d&&d.yoffset&&(b=Math.max(b,Math.abs(d.yoffset)))):("esri.renderer.UniqueValueRenderer"===c.declaredClass||"esri.renderer.ClassBreaksRenderer"===c.declaredClass)&&q.forEach(c.infos,function(a){(d=a.symbol)&&d.xoffset&&(b=Math.max(b,Math.abs(d.xoffset)));d&&d.yoffset&&(b=Math.max(b,Math.abs(d.yoffset)))})});return b},_showInfoWindow:function(a,b){var d=this.map.infoWindow,e=a.geometry,e=e&&"point"===e.type?e:b,f=a.getContent();d.setTitle(a.getTitle());
1683if(f&&c.isString(f.id)){var g=h.byId(f.id);g&&(g.set&&/_PopupRenderer/.test(g.declaredClass))&&g.set("showTitle",!1)}d.setContent(f);d.show(e)},_isImageServiceLayer:function(a){return"esri.layers.ArcGISImageServiceLayer"===a.declaredClass||"esri.layers.ArcGISImageServiceVectorLayer"===a.declaredClass}});b("extend-esri")&&(a.PopupManager=g);return g})},"esri/layers/agstiled":function(){define(["./agscommon","./ArcGISTiledMapServiceLayer"],function(){return{}})},"dojo/fx":function(){define("./_base/lang ./Evented ./_base/kernel ./_base/array ./aspect ./_base/fx ./dom ./dom-style ./dom-geometry ./ready require".split(" "),
1684function(p,n,a,e,l,h,q,g,d,c,b){a.isAsync||c(0,function(){b(["./fx/Toggler"])});a=a.fx={};c={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}};var f=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;e.forEach(this._animations,function(a){this.duration+=a.duration;a.delay&&(this.duration+=a.delay)},this)};f.prototype=new n;p.extend(f,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){this._onAnimateCtx.remove();
1685this._onEndCtx.remove();this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=l.after(this._current,"onAnimate",p.hitch(this,"_onAnimate"),!0),this._onEndCtx=l.after(this._current,"onEnd",p.hitch(this,"_onEnd"),!0),this._current.play(0,!0))},play:function(a,b){this._current||(this._current=this._animations[this._index=0]);if(!b&&"playing"==this._current.status())return this;var c=l.after(this._current,
1686"beforeBegin",p.hitch(this,function(){this._fire("beforeBegin")}),!0),d=l.after(this._current,"onBegin",p.hitch(this,function(a){this._fire("onBegin",arguments)}),!0),e=l.after(this._current,"onPlay",p.hitch(this,function(a){this._fire("onPlay",arguments);c.remove();d.remove();e.remove()}));this._onAnimateCtx&&this._onAnimateCtx.remove();this._onAnimateCtx=l.after(this._current,"onAnimate",p.hitch(this,"_onAnimate"),!0);this._onEndCtx&&this._onEndCtx.remove();this._onEndCtx=l.after(this._current,
1687"onEnd",p.hitch(this,"_onEnd"),!0);this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=l.after(this._current,"onPause",p.hitch(this,function(b){this._fire("onPause",arguments);a.remove()}),!0);this._current.pause()}return this},gotoPercent:function(a,b){this.pause();var c=this.duration*a;this._current=null;e.some(this._animations,function(a,b){if(c<=a.duration)return this._current=a,this._index=b,!0;c-=a.duration;return!1},this);this._current&&this._current.gotoPercent(c/
1688this._current.duration);b&&this.play();return this}
1688,stop:function(a){if(this._current){if(a){for(;this._index+1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var b=l.after(this._current,"onStop",p.hitch(this,function(a){this._fire("onStop",arguments);b.remove()}),!0);this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this.stop();this._onAnimateCtx&&
1689this._onAnimateCtx.remove();this._onEndCtx&&this._onEndCtx.remove()}});p.extend(f,c);a.chain=function(a){return new f(a)};var m=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;e.forEach(a,function(a){var b=a.duration;a.delay&&(b+=a.delay);this.duration<b&&(this.duration=b);this._connects.push(l.after(a,"onEnd",p.hitch(this,"_onEnd"),!0))},this);this._pseudoAnimation=new h.Animation({curve:[0,1],duration:this.duration});var b=this;e.forEach("beforeBegin onBegin onPlay onAnimate onPause onStop onEnd".split(" "),
1690function(a){b._connects.push(l.after(b._pseudoAnimation,a,function(){b._fire(a,arguments)},!0))})};p.extend(m,{_doAction:function(a,b){e.forEach(this._animations,function(c){c[a].apply(c,b)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a,b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",
1691arguments);this._call("pause",arguments);return this},gotoPercent:function(a,b){var c=this.duration*a;e.forEach(this._animations,function(a){a.gotoPercent(a.duration<c?1:c/a.duration,b)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){this.stop();e.forEach(this._connects,function(a){a.remove()})}});p.extend(m,c);a.combine=function(a){return new m(a)};
1692a.wipeIn=function(a){var b=a.node=q.byId(a.node),c=b.style,d;a=h.animateProperty(p.mixin({properties:{height:{start:function(){d=c.overflow;c.overflow="hidden";if("hidden"==c.visibility||"none"==c.display)return c.height="1px",c.display="",c.visibility="",1;var a=g.get(b,"height");return Math.max(a,1)},end:function(){return b.scrollHeight}}}},a));var e=function(){c.height="auto";c.overflow=d};l.after(a,"onStop",e,!0);l.after(a,"onEnd",e,!0);return a};a.wipeOut=function(a){var b=(a.node=q.byId(a.node)).style,
1693c;a=h.animateProperty(p.mixin({properties:{height:{end:1}}},a));l.after(a,"beforeBegin",function(){c=b.overflow;b.overflow="hidden";b.display=""},!0);var d=function(){b.overflow=c;b.height="auto";b.display="none"};l.after(a,"onStop",d,!0);l.after(a,"onEnd",d,!0);return a};a.slideTo=function(a){var b=null,c=null,e=function(a){return function(){var e=g.getComputedStyle(a),f=e.position;b="absolute"==f?a.offsetTop:parseInt(e.top)||0;c="absolute"==f?a.offsetLeft:parseInt(e.left)||0;"absolute"!=f&&"relative"!=
1694f&&(e=d.position(a,!0),b=e.y,c=e.x,a.style.position="absolute",a.style.top=b+"px",a.style.left=c+"px")}}(a.node=q.byId(a.node));e();
1694a=h.animateProperty(p.mixin({properties:{top:a.top||0,left:a.left||0}},a));l.after(a,"beforeBegin",e,!0);return a};return a})},"esri/InfoTemplate":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","./kernel","./lang"],function(p,n,a,e,l){p=p(null,{declaredClass:"esri.InfoTemplate",constructor:function(a,e){a&&n.isObject(a)&&!n.isFunction(a)?n.mixin(this,
1695a):(this.title=a||"${*}",this.content=e||"${*}")},setTitle:function(a){this.title=a;return this},setContent:function(a){this.content=a;return this},toJson:function(){return l.fixJson({title:this.title,content:this.content})}});a("extend-esri")&&(e.InfoTemplate=p);return p})},"esri/layers/FeatureLayer":function(){define("require module dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/json dojo/_base/Deferred dojo/date/locale dojo/sniff dojo/io-query dojo/dom-construct dojo/i18n dojo/when dojo/promise/all ../kernel ../lang ../request ../config ../deferredUtils ../SpatialReference ../symbols/SimpleMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleFillSymbol ../symbols/jsonUtils ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/jsonUtils ../tasks/QueryTask ../tasks/query ../tasks/FeatureSet ../tasks/StatisticDefinition ../geometry/Extent ../geometry/jsonUtils ../geometry/normalizeUtils ../geometry/scaleUtils ./GraphicsLayer ./Field ./TimeInfo ./FeatureType ./FeatureTemplate ./FeatureEditResult ./LabelClass ./SnapshotMode ./OnDemandMode ./SelectionMode ./StreamMode ./TrackManager ./HeatmapManager dojo/i18n!../nls/jsapi dojo/has!extend-esri?./agscommon".split(" "),
1696function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z,w,y,B,G,D,A,C,E,I,H,L,J,F,K,M,N,T,O,U,Y,R,ba,Q,P,ca,Z,X,W,V){var $=x.defaults,S=a(N,{declaredClass:"esri.layers.FeatureLayer",invalidParams:"query contains one or more unsupported parameters",reHostedFS:/https?:\/\/services.*\.arcgis\.com/i,maxPointCountForAuto:4E3,maxRecordCountForAuto:2E3,maxVertexCountForAuto:25E4,generalizeForScale:4E3,_eventMap:{"add-attachment-complete":["result"],"before-apply-edits":["adds","updates","deletes"],"delete-attachments-complete":["results"],
1697"edits-complete":["adds","updates","deletes"],"query-attachment-infos-complete":["results"],"query-count-complete":["count"],"query-features-complete":["featureSet"],"query-ids-complete":["objectIds"],"query-related-features-complete":["featureSets"],"selection-complete":["features","method"],"update-end":["error","info"]},constructor:function(a,b){this._preventInit||this._initFeatureLayer(a,b)},_initFeatureLayer:function(a,b){this.i18n=V;b=b||{};this.showLabels=null!=b.showLabels?b.showLabels:!0;
1698this._outFields=b.outFields;this._defnExpr=b.definitionExpression;this._loadCallback=b.loadCallback;var c=b._usePatch;this._usePatch=null===c||void 0===c?!0:c;this._trackIdField=b.trackIdField;this.objectIdField=b.objectIdField;this._maxOffset=null!=b.maxAllowableOffset?b.maxAllowableOffset:this.maxAllowableOffset;this.quantize=null!=b.quantize?b.quantize:!0;this._optEditable=b.editable;this._optAutoGen=b.autoGeneralize;this.editSummaryCallback=b.editSummaryCallback;this.userId=b.userId;this.userIsAdmin=
1699b.userIsAdmin;this.useMapTime=b.hasOwnProperty("useMapTime")?!!b.useMapTime:!0;this.source=b.source;this.gdbVersion=b.gdbVersion;this.orderByFields=b.orderByFields;this.maxPointCountForAuto=null!=b.maxPointCountForAuto?b.maxPointCountForAuto:this.maxPointCountForAuto;this.maxRecordCountForAuto=null!=b.maxRecordCountForAuto?b.maxRecordCountForAuto:this.maxRecordCountForAuto;this.maxVertexCountForAuto=null!=b.maxVertexCountForAuto?b.maxVertexCountForAuto:this.maxVertexCountForAuto;this.generalizeForScale=
1700null!=b.generalizeForScale?b.generalizeForScale:this.generalizeForScale;this.queryPagination=null!=b.queryPagination?b.queryPagination:this.url?this.reHostedFS.test(this.url):!1;this.multipatchOption=b.multipatchOption;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var d=S,c=this.mode=r.isDefined(b.mode)?b.mode:d.MODE_ONDEMAND;this._isStream&&(this.mode=c=d.MODE_STREAM);switch(c){case d.MODE_SNAPSHOT:this.currentMode=
1701d.MODE_SNAPSHOT;this._mode=new Q(this);this._isSnapshot=!0;break;case d.MODE_ONDEMAND:case d.MODE_AUTO:this.currentMode=d.MODE_ONDEMAND;this._tileWidth=b.tileWidth||512;this._tileHeight=b.tileHeight||512;this._mode=new P(this);this.latticeTiling=b.latticeTiling;break;case d.MODE_SELECTION:this.currentMode=d.MODE_SELECTION;this._mode=new ca(this);this._isSelOnly=!0;break;case d.MODE_STREAM:this.currentMode=d.MODE_STREAM,this._mode=new Z(this),this._isStream=!0}this._initLayer=l.hitch(this,this._initLayer);
1702this._selectHandler=l.hitch(this,this._selectHandler);this._editable=!1;if(l.isObject(a)&&a.layerDefinition)return this._collection=!0,this.mode=this._isStream?d.MODE_STREAM:d.MODE_SNAPSHOT,this._initLayer(a),this;this._task=new E(this.url,{source:this.source,gdbVersion:this.gdbVersion});c=this._url.path;this._fserver=!1;-1!==c.search(/\/FeatureServer\//i)&&(this._fserver=!0);this.mode===d.MODE_AUTO&&this.reHostedFS.test(this.url)&&this._queryLimit();
1702(d=b.resourceInfo)?this._initLayer(d):(this.source&&
1703(d={source:this.source.toJson()},this._url.query=l.mixin(this._url.query,{layer:q.toJson(d)})),this.gdbVersion&&(this._url.query=l.mixin(this._url.query,{gdbVersion:this.gdbVersion})),u({url:c,content:l.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler}));this.registerConnectEvents()},_initLayer:function(a,b){if(a||b){this._json=a;this._findCredential();if(this.credential&&this.credential.ssl||a&&a._ssl)this._useSSL(),this._task._useSSL();
1704this.version=a.currentVersion;this.version||(this.version="capabilities"in a||"drawingInfo"in a||"hasAttachments"in a||"htmlPopupType"in a||"relationships"in a||"timeInfo"in a||"typeIdField"in a||"types"in a?10:9.3);this._collection&&(this._isStream||(this.currentMode=S.MODE_SNAPSHOT,this._mode=new Q(this)),this._isSnapshot=!0,this._featureSet=a.featureSet,this._nextId=a.nextObjectId,a=a.layerDefinition);this.geometryType=a.geometryType;"string"!==typeof this.multipatchOption&&"esriGeometryMultiPatch"===
1705this.geometryType&&(this.multipatchOption="xyFootprint");if(a.hasOwnProperty("capabilities")){var d=this.capabilities=a.capabilities;d&&-1!==d.toLowerCase().indexOf("editing")?this._editable=!0:this._editable=!1}else this._collection||(this._editable=this._fserver);r.isDefined(this._optEditable)?(this._editable=this._optEditable,delete this._optEditable):"esriGeometryMultiPatch"===this.geometryType&&(this._editable=!1);this._json=q.toJson(this._json);if(this.isEditable())this._setMaxOffset(null);
1706else if(this.mode!==S.MODE_SNAPSHOT&&("esriGeometryPolyline"===this.geometryType||"esriGeometryPolygon"===this.geometryType||this.hasXYFootprint()))this._autoGeneralize=r.isDefined(this._optAutoGen)?this._optAutoGen:this.mode===S.MODE_ONDEMAND||this.mode===S.MODE_AUTO,delete this._optAutoGen;var d=a.effectiveMinScale||a.minScale,e=a.effectiveMaxScale||a.maxScale;!this._hasMin&&d&&this.setMinScale(d);!this._hasMax&&e&&this.setMaxScale(e);this.layerId=a.id;this.name=a.name;this.description=a.description;
1707this.copyright=a.copyrightText;this.type=a.type;this.displayField=a.displayField;this.defaultDefinitionExpression=a.definitionExpression;this.fullExtent=new J(a.extent);this.initialExtent=new J(this.fullExtent.toJson());this.fullExtent.spatialReference&&(this.spatialReference=new z(this.fullExtent.spatialReference.toJson()));this.defaultVisibility=a.defaultVisibility;if("esriGeometryPoint"===this.geometryType||"esriGeometryMultipoint"===this.geometryType)this.latticeTiling=!1;this.hasM=a.hasM||!1;
1708this.hasZ=a.hasZ||!1;this.indexedFields=a.indexedFields;this.maxRecordCount=a.maxRecordCount;this.canModifyLayer=a.canModifyLayer;this.supportsStatistics=a.supportsStatistics;this.supportsAdvancedQueries=this._collection?!1:a.supportsAdvancedQueries;this.supportsCalculate=a.supportsCalculate;this.supportsAttachmentsByUploadId=a.supportsAttachmentsByUploadId;this.supportsCoordinatesQuantization=a.supportsCoordinatesQuantization;this.quantize=this.quantize&&this.supportsCoordinatesQuantization;this.hasLabels=
1709a.hasLabels;this.canScaleSymbols=a.canScaleSymbols;this.supportsRollbackOnFailureParameter=this.supportsRollbackOnFailure=a.supportsRollbackOnFailure;this.syncCanReturnChanges=a.syncCanReturnChanges;this.isDataVersioned=a.isDataVersioned;this.editFieldsInfo=a.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=a.ownershipBasedAccessControlForFeatures;this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures&&(this.creatorField=this.editFieldsInfo.creatorField);this.relationships=a.relationships;
1710this.allowGeometryUpdates=r.isDefined(a.allowGeometryUpdates)?a.allowGeometryUpdates:!0;this.advancedQueryCapabilities=a.advancedQueryCapabilities||{supportsStatistics:this.supportsStatistics,supportsOrderBy:this.supportsAdvancedQueries,supportsDistinct:this.supportsAdvancedQueries};this._setMaxOffset(this._maxOffset,!0);this._isTable="Table"===this.type;for(var f=this.fields=[],e=a.fields,d=0;d<e.length;d++)f.push(new T(e[d]));if(!this.objectIdField){this.objectIdField=a.objectIdField;if(!this.objectIdField){e=
1711a.fields;for(d=0;d<e.length;d++)if(f=e[d],"esriFieldTypeOID"===f.type){this.objectIdField=f.name;break}}!this.objectIdField&&!this._isStream&&console.debug("esri.layers.FeatureLayer: "+r.substitute({url:this.url},"objectIdField is not set [url: ${url}]"))}if(!r.isDefined(this._nextId)){e=this.objectIdField;f=-1;if(this._collection&&e)for(var g=(d=this._featureSet)&&d.features,k=g?g.length:0,m,d=0;d<k;d++)m=(m=g[d].attributes)&&m[e],m>f&&(f=m);this._nextId=f+1}this.globalIdField=a.globalIdField;if(d=
1712this.typeIdField=a.typeIdField)if(d=!this._getField(d)&&this._getField(d,!0))this.t
1712ypeIdField=d.name;this.visibilityField=a.visibilityField;if(e=a.defaultSymbol)this.defaultSymbol=G.fromJson(e);var n=this.types=[],p=a.types,s,t,f=(d=this.editFieldsInfo)&&d.creatorField,g=d&&d.editorField;m=f||g;k=[];if(p)for(d=0;d<p.length;d++)s=new U(p[d]),t=s.templates,m&&(t&&t.length)&&(k=k.concat(t)),n.push(s);p=a.templates;s=this.templates=[];if(p)for(d=0;d<p.length;d++)n=new Y(p[d]),m&&k.push(n),s.push(n);for(d=
17130;d<k.length;d++)if(m=l.getObject("prototype.attributes",!1,k[d]))f&&delete m[f],g&&delete m[g];if(d=a.timeInfo)this.timeInfo=new O(d),this._startTimeField=d.startTimeField,this._endTimeField=d.endTimeField,this._startTimeField&&this._endTimeField&&(this._twoTimeFields=!0),this._trackIdField?d.trackIdField=this._trackIdField:this._trackIdField=d.trackIdField;this.hasAttachments=!this._collection&&a.hasAttachments?!0:!1;this.htmlPopupType=a.htmlPopupType;var d=a.drawingInfo,u;if((f=d&&d.labelingInfo)&&
1714!this.labelingInfo)this.labelingInfo=h.map(f,function(a){return new ba(a)}),this._fixLabelExpr();if(!this.renderer)if(d&&d.renderer){if(u=d.renderer,this.setRenderer(C.fromJson(u)),"classBreaks"===u.type&&this.renderer.setMaxInclusive(!0),!this._collection){var v=u.type,e=[];u=this.renderer;switch(v){case "simple":e.push(u.symbol);break;case "uniqueValue":case "classBreaks":e.push(u.defaultSymbol),e=e.concat(h.map(u.infos,function(a){return a.symbol}))}var e=h.filter(e,r.isDefined),x=this._url.path+
1715"/images/",E=this._getToken();h.forEach(e,function(a){var b=a.url;b&&(-1===b.search(/https?\:/)&&-1===b.indexOf("data:")&&(a.url=x+b),E&&-1!==a.url.search(/https?\:/)&&(a.url+="?token\x3d"+E))})}}else if(e)p=this.types,0<p.length?(u=new A(this.defaultSymbol,this.typeIdField),h.forEach(p,function(a){u.addValue(a.id,a.symbol)})):u=new D(this.defaultSymbol),this.setRenderer(u);else if(!this._isTable){switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":v=new w;break;case "esriGeometryPolyline":v=
1716new y;break;case "esriGeometryPolygon":v=new B;break;default:this.hasXYFootprint()&&(v=new B)}this.setRenderer(v?new D(v):null)}v=d&&d.transparency||0;!this.hasOwnProperty("opacity")&&0<v&&(this.opacity=1-v/100);if((c("ie")||7<=c("trident")||c("safari"))&&this.isEditable()&&10.02>this.version)this._ts=!0;this.statistics=a.statistics;this._fixRendererFields();this._checkFields();this._updateCaps();var F=function(){this.currentMode!==S.MODE_SNAPSHOT&&(this.queryPagination=!1);null!=this._maxOffset&&
1717!this._isFractionalOffsetAllowed()&&this._setMaxOffset(this._maxOffset);this.loaded=!0;this.onLoad(this);var a=this._loadCallback;a&&(delete this._loadCallback,a(this))};this._collection?(v=this._featureSet,this._featureSet=null,this._mode._drawFeatures(new H(v)),this._fcAdded=!0,F.call(this)):this._forceIdentity(this._limitPromise?function(){var a=this;this._limitPromise.then(function(b){a._checkMode(b)});this._limitPromise.always(function(){a._limitPromise=null;F.call(a)})}:F)}},setShowLabels:function(a){this.showLabels=
1718a;this.onShowLabelsChange()},onShowLabelsChange:function(){},onRendererChange:function(a){this.inherited(arguments);var b=this._map;this._ager=!(!a||!a.observationAger||!a.observationRenderer);a&&"colors"in a&&"blurRadius"in a&&"maxPixelIntensity"in a?"esriGeometryPoint"==this.geometryType&&(!this._heatmapManager&&b)&&(this._heatmapManager=new W(this),this._heatmapManager.initialize(b)):this.renderer&&this.renderer.getRendererInfo?h.some(this.renderer.rendererInfos,function(a){return a.renderer&&
1719"colors"in a.renderer&&"blurRadius"in a.renderer})||(this._heatmapManager=null):this._heatmapManager=null;if(a){var c=[],b=h.filter([a,a.observationRenderer,a.latestObservationRenderer,a.trackRenderer],r.isDefined),d=function(a){return null!=a&&"function"!=typeof a&&a};h.forEach(b,function(a){var b=d(a.attributeField),e=d(a.attributeField2);a=d(a.attributeField3);!1!==b&&c.push(b);!1!==e&&c.push(e);!1!==a&&c.push(a)});this._rendererFields=c}else this._rendererFields=[];this.loaded&&(this._fixRendererFields(),
1720this._checkFields(this._rendererFields),this._collection&&(this._typesDirty=!0))},redraw:function(){this.inherited(arguments);this._trackManager&&this._trackManager.container&&this._trackManager.container.redraw()},_evalSDRenderer:function(){this.inherited(arguments);var a=this._getRenderer();this._ager=!(!a||!a.observationAger||!a.observationRenderer);this._trackManager&&this._trackManager.container&&this._trackManager.container.setRenderer(a&&a.trackRenderer)},_setMap:function(a){var b=this.inherited(arguments),
1721c=this._mode,d=this;c&&c.initialize(a);this.geometryType&&this.attr("data-geometry-type",this.geometryType.replace(/esriGeometry/i,"").toLowerCase());this._addHandle=this.on("graphic-node-add",function(a){a=a.graphic.attributes;(a=d._selectedFeatures[a&&a[d.objectIdField]])&&a.attr("data-selected","")});return b},_unsetMap:function(a){var b=this._mode;b&&b.suspend();this._trackManager&&(this._trackManager.destroy(),this._trackManager=null);e.disconnect(this._zoomConnect);e.disconnect(this._addHandle);
1722this._zoomConnect=this._addHandle=null;this._toggleTime(!1);this.inherited("_unsetMap",arguments)},refresh:function(){this._needsRefresh=!1;var a=this._mode;a&&a.refresh()},hasXYFootprint:function(){return"esriGeometryMultiPatch"===this.geometryType&&"xyFootprint"===this.multipatchOption},getOutFields:function(){return h.filter(this._getOutFields(),function(a){return"*"===a||!!this._getField(a)},this)},getField:function(a){return this._getField(a,!0)},getDomain:function(a,b){var c,d,e=b&&b.feature,
1723f=e&&this.typeIdField&&e.attributes&&e.attributes[this.typeIdField];
1723null!=f&&h.some(this.types,function(b){if(b.id==f){if((c=b.domains&&b.domains[a])&&"inherited"===c.type)c=this._getLayerDomain(a),d=!0;return!0}return!1},this);!d&&!c&&(c=this._getLayerDomain(a));return c},_getLayerDomain:function(a){var b;h.some(this.fields,function(c){c.name===a&&(b=c.domain);return!!b});return b},getType:function(a){var b,c=a&&this.typeIdField&&a.attributes&&a.attributes[this.typeIdField];h.some(this.types,function(a){a.id==
1724c&&(b=a);return!!b});return b},setEditable:function(a){if(!this._collection)return console.log("FeatureLayer:setEditable - this functionality is not yet supported for layer in a feature service"),this;if(!this.loaded)return this._optEditable=a,this;var b=this._editable;this._editable=a;this._updateCaps();if(b!==a)this.onCapabilitiesChange();return this},getEditCapabilities:function(a){var b={canCreate:!1,canUpdate:!1,canDelete:!1};if(!this.loaded||!this.isEditable())return b;var c=a&&a.feature;a=
1725a&&a.userId;var d=h.map(this.capabilities?this.capabilities.toLowerCase().split(","):[],l.trim),e=-1<h.indexOf(d,"editing"),f=e&&-1<h.indexOf(d,"create"),b=e&&-1<h.indexOf(d,"update"),d=e&&-1<h.indexOf(d,"delete"),g=this.ownershipBasedAccessControlForFeatures,k=this.editFieldsInfo,m=k&&k.creatorField,k=k&&k.realm,c=(c=c&&c.attributes)&&m?c[m]:void 0,n=!!this.userIsAdmin,m=!g||n||!(!g.allowOthersToUpdate&&!g.allowUpdateToOthers),g=!g||n||!(!g.allowOthersToDelete&&!g.allowDeleteToOthers);if(n||e&&!f&&
1726!b&&!d)f=b=d=!0;e={canCreate:f,canUpdate:b,canDelete:d};null===c?(e.canUpdate=b&&m,e.canDelete=d&&g):""!==c&&c&&((a=a||this.getUserId())&&k&&(a=a+"@"+k),a.toLowerCase()!==c.toLowerCase()&&(e.canUpdate=b&&m,e.canDelete=d&&g));return e},getUserId:function(){var a;this.loaded&&(a=this.credential&&this.credential.userId||this.userId||"");return a},setUserIsAdmin:function(a){this.userIsAdmin=a},setEditSummaryCallback:function(a){this.editSummaryCallback=a},getEditSummary:function(a,b,c){c=r.isDefined(c)?
1727c:(new Date).getTime();var d="";c=this.getEditInfo(a,b,c);(b=b&&b.callback||this.editSummaryCallback)&&(c=b(a,c)||"");if(l.isString(c))d=c;else{if(c){a=c.action;b=c.userId;var e=c.timeValue,f=0;a&&f++;b&&f++;r.isDefined(e)&&f++;1<f&&(d=("edit"===a?"edit":"create")+(b?"User":"")+(r.isDefined(e)?c.displayPattern:""))}d=d&&r.substitute(c,this.i18n.layers.FeatureLayer[d])}return d},getEditInfo:function(a,b,c){if(this.loaded){c=r.isDefined(c)?c:(new Date).getTime();b=b&&b.action||"last";var d=this.editFieldsInfo,
1728e=d&&d.creatorField,f=d&&d.creationDateField,g=d&&d.editorField,d=d&&d.editDateField,g=(a=a&&a.attributes)&&g?a[g]:void 0,d=a&&d?a[d]:null,e=this._getEditData(a&&e?a[e]:void 0,a&&f?a[f]:null,c);c=this._getEditData(g,d,c);var h;switch(b){case "creation":h=e;break;case "edit":h=c;break;case "last":h=c||e}h&&(h.action=h===c?"edit":"creation");return h}},_getEditData:function(a,b,c){var e,f,g;r.isDefined(b)&&(f=c-b,g=0>f?"Full":6E4>f?"Seconds":12E4>f?"Minute":36E5>f?"Minutes":72E5>f?"Hour":864E5>f?"Hours":
17296048E5>f?"WeekDay":"Full");if(void 0!==a||g)e=e||{},e.userId=a,g&&(a=d.format,c=new Date(b),e.minutes=Math.floor(f/6E4),e.hours=Math.floor(f/36E5),e.weekDay=a(c,{datePattern:"EEEE",selector:"date"}),e.formattedDate=a(c,{selector:"date"}),e.formattedTime=a(c,{selector:"time"}),e.displayPattern=g,e.timeValue=b);return e},isEditable:function(){return!(!this._editable&&!this.userIsAdmin)},setMaxAllowableOffset:function(a){this.isEditable()||this._setMaxOffset(a,!0);return this},getMaxAllowableOffset:function(){var a=
1730this._quantizationParameters?this._quantizationParameters.tolerance:void 0;return null!=this._maxOffset?this._maxOffset:a},_setMaxOffset:function(a,b){if(null==a)return delete this._maxOffset,delete this._quantizationParameters,this;if(this.quantize&&this.supportsCoordinatesQuantization)"esriGeometryPolyline"===this.geometryType?this._maxOffset=a:delete this._maxOffset,this._quantizationParameters={mode:"view",originPosition:"upperLeft",tolerance:a,extent:this.fullExtent};else{if(!this._isFractionalOffsetAllowed()||
1731!b)a=Math.floor(a);isNaN(a)||0===a?delete this._maxOffset:this._maxOffset=a;delete this._quantizationParameters}return this},_isFractionalOffsetAllowed:function(){return null==this.version||
173110.1<=this.version||navigator.languages&&this._isLangWithDot(navigator.languages[0])},_isLangWithDot:function(a){a=(a=a&&a.split("-"))&&a[0]&&a[0].toLowerCase();return-1!==h.indexOf(this._langsWithDot,a)},_langsWithDot:"ar en et fr he ja ko th vi zh".split(" "),setAutoGeneralize:function(a){if(this.loaded){if(!this.isEditable()&&
1732this.mode!==S.MODE_SNAPSHOT&&("esriGeometryPolyline"===this.geometryType||"esriGeometryPolygon"===this.geometryType||this.hasXYFootprint()))(this._autoGeneralize=a)?(this._autoSnapshot&&(this._prevScale=null),this._updateMaxOffset()):this._setMaxOffset(null)}else this._optAutoGen=a;return this},setGDBVersion:function(a){if(!this._collection&&a!==this.gdbVersion&&(a||this.gdbVersion))this.gdbVersion=a,this._task.gdbVersion=a,this._url.query=l.mixin(this._url.query,{gdbVersion:a}),this.loaded&&(this.clearSelection(),
1733this._map&&this.refresh()),this.onGDBVersionChange();return this},setDefinitionExpression:function(a){this._defnExpr=a;(a=this._mode)&&a.propertyChangeHandler(1);return this},getDefinitionExpression:function(){return this._defnExpr},setTimeDefinition:function(a){this._isSnapshot?(this._timeDefn=a,(a=this._mode)&&a.propertyChangeHandler(2)):console.log("FeatureLayer.setTimeDefinition: layer in on-demand or selection mode does not support time definitions. Layer id \x3d "+this.id+", Layer URL \x3d "+
1734this.url);return this},getTimeDefinition:function(){return this._timeDefn},setTimeOffset:function(a,b){this._timeOffset=a;this._timeOffsetUnits=b;var c=this._mode;c&&c.propertyChangeHandler(0);return this},setUseMapTime:function(a){this.useMapTime=a;this._toggleTime(!this.suspended);(a=this._mode)&&a.propertyChangeHandler(0)},selectFeatures:function(a,b,c,d){b=b||S.SELECTION_NEW;a=this._getShallowClone(a);var e=this._map,f,h=this,k=v._fixDfd(new g(v._dfdCanceller));a.outFields=this.getOutFields();
1735a.returnGeometry=!0;a.multipatchOption=this.multipatchOption;e&&(a.outSpatialReference=new z(e.spatialReference.toJson()));if(!this._applyQueryFilters(a,!0))return f={features:[]},this._selectHandler(f,b,c,d,k),k;if(e=this._canDoClientSideQuery(a))k._pendingDfd=t(this._doQuery(a,e)),k._pendingDfd.then(function(a){f={features:a};h._selectHandler(f,b,c,d,k)});else{if(this._collection)return this._resolve([Error("FeatureLayer::selectFeatures - "+this.invalidParams)],null,d,k,!0),k;var l=this;this._ts&&
1736(a._ts=(new Date).getTime());(k._pendingDfd=this._task.execute(a)).addCallbacks(function(a){l._selectHandler(a,b,c,d,k)},function(a){l._resolve([a],null,d,k,!0)})}return k},getSelectedFeatures:function(){var a=this._selectedFeatures,b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},clearSelection:function(a){var b=this._selectedFeatures,c=this._mode,d;for(d in b)b.hasOwnProperty(d)&&(this._unSelectFeatureIIf(d,c),c._removeFeatureIIf(d));this._selectedFeatures={};this._isSelOnly&&c._applyTimeFilter(!0);
1737if(!a)this.onSelectionClear();return this},setSelectionSymbol:function(a){if(this._selectionSymbol=a){var b=this._selectedFeatures,c;for(c in b)b.hasOwnProperty(c)&&b[c].setSymbol(a)}return this},getSelectionSymbol:function(){return this._selectionSymbol},setLabelingInfo:function(a){a?(this.labelingInfo=a,this._fixLabelExpr()):delete this.labelingInfo;this._collection&&(this._typesDirty=!0);this.onLabelingInfoChange()},_fixLabelExpr:function(){var a=/\[([^\[\]]+)\]/ig,b,c=this,d=function(a,b){var d=
1738c._getField(b,!0);return"["+(d&&d.name||b)+"]"};h.forEach(this.labelingInfo,function(c){if(b=c.labelExpression)c.labelExpression=b.replace(a,d)})},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(a,b,c,d,e,f){var g=f.assembly,k=f.dfd;this._applyNormalized(a,g&&g[0]);this._applyNormalized(b,g&&g[1]);this.onBeforeApplyEdits(a,b,c);var m={},n=this.objectIdField,g={f:"json"},p=!1;if(this._collection)f={},f.addResults=a?h.map(a,function(){p=!0;return{objectId:this._nextId++,
1739success:!0}},this):null,f.updateResults=b?h.map(b,function(a){p=!0;var b=a.attributes[n];m[b]=a;return{objectId:b,success:!0}},this):null,f.deleteResults=c?h.map(c,function(a){p=!0;return{objectId:a.attributes[n],success:!0}},this):null,p?this._editHandler(f,a,m,d,e,k):this._resolve([f.addResults,f.updateResults,f.deleteResults],null,d,k);else{a&&0<a.length&&(g.adds=this._convertFeaturesToJson(a,0,1),p=!0);if(b&&0<b.length){for(f=0;f<b.length;f++){var r=b[f];m[r.attributes[n]]=r}g.updates=this._convertFeaturesToJson(b,
17400,0,1);p=!0}if(c&&0<c.length){b=[];for(f=0;f<c.length;f++)b.push(c[f].attributes[n]);g.deletes=b.join(",");p=!0}if(p){var q=this;return u({url:this._url.path+"/applyEdits",content:l.mixin(g,this._url.query),callbackParamName:"callback",load:function(b){q._editHandler(b,a,m,d,e,k)},error:function(a){q._resolve([a],null,e,k,!0)}},{usePost:!0})}this._resolve([],null,d,k)}},queryFeatures:function(a,b,c){return this._query("execute","onQueryFeaturesComplete",a,b,c)},queryRelatedFeatures:function(a,b,c){return this._query("executeRelationshipQuery",
1741"onQueryRelatedFeaturesComplete",a,b,c)},queryIds:function(a,b,c){return this._query("executeForIds","onQueryIdsComplete",a,b,c)},queryCount:function(a,b,c){return this._query("executeForCount","onQueryCountComplete",a,b,c)},queryExtent:function(a,b,c){return this._query("executeForExtent","onQueryExtentComplete",a,b,c)},queryAttachmentInfos:function(a,c,d){var e=this._url.path+"/"+a+"/attachments",f=new g(v._dfdCanceller),k=this;f._pendingDfd=u({url:e,content:l.mixin({f:"json"},this._url.query),
1742callbackParamName:"callback",load:function(d){d=d.attachmentInfos;var g;h.forEach(d,function(c){g=b.objectToQuery({gdbVersion:k._url.query&&k._url.query.gdbVersion,layer:k._url.query&&k._url.query.layer,token:k._getToken()});c.url=e+"/"+c.id+(g?"?"+g:"");c.objectId=a});k._resolve([d],"onQueryAttachmentInfosComplete",c,f)},error:function(a){k._resolve([a],null,d,f,!0)}});return f},addAttachment:function(a,b,c,d){return this._sendAttachment("add",a,b,c,d)},updateAttachment:function(a,b,c,d,e){c.appendChild(f.create("input",
1743{type:"hidden",name:"attachmentId",value:b}));return this._sendAttachment("update",a,c,d,e)},deleteAttachments:function(a,b,c,d){var e=this._url.path+"/"+a+"/deleteAttachments",f=new g(v._dfdCanceller),k=this;b={f:"json",attachmentIds:b.join(",")};f._pendingDfd=u({url:e,content:l.mixin(b,this._url.query),callbackParamName:"callback",load:l.hitch(this,function(b){b=b.deleteAttachmentResults;b=h.map(b,function(b){b=new R(b);b.attachmentId=b.objectId;b.objectId=a;return b});k._resolve([b],"onDeleteAttachmentsComplete",
1744c,f)}),error:function(a){k._resolve([a],null,d,f,!0)}},{usePost:!0});return f}
1744,addType:function(a){var b=this.types;if(b){if(h.some(b,function(b){return b.id==a.id?!0:!1}))return!1;b.push(a)}else this.types=[a];return this._typesDirty=!0},deleteType:function(a){if(this._collection){var b=this.types;if(b){var c=-1;h.some(b,function(b,d){return b.id==a?(c=d,!0):!1});if(-1<c)return this._typesDirty=!0,b.splice(c,1)[0]}}},toJson:function(){var a=this._json;if(a=l.isString(a)?q.fromJson(a):l.clone(a)){var a=
1745a.layerDefinition?a:{layerDefinition:a},b=a.layerDefinition,c=this._collection;if(c&&this._typesDirty){b.types=h.map(this.types||[],function(a){return a.toJson()});var d=this.renderer,e=this.labelingInfo,f=b.drawingInfo;if((d||e)&&!f)f=b.drawingInfo={};f&&(d&&-1===d.declaredClass.indexOf("TemporalRenderer"))&&(f.renderer=d.toJson());e&&(f.labelingInfo=h.map(e,function(a){return a.toJson()}))}d=null;if(!c||this._fcAdded)d={geometryType:b.geometryType,features:this._convertFeaturesToJson(this.graphics,
1746!0)};a.featureSet=l.mixin({},a.featureSet||{},d);a.featureSet.transform&&(e=a.featureSet.transform,delete a.featureSet.transform,d=new H(a.featureSet),d.quantize(e),a.featureSet=d.toJson());c&&(a.nextObjectId=this._nextId,b.capabilities=this.capabilities);return a}},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},
1747onQueryCountComplete:function(){},onQueryExtentComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},onLabelingInfoChange:function(){},_forceIdentity:function(a){function b(a){var c=["allowOthersToUpdate","allowOthersToDelete","allowOthersToQuery"];return a&&h.some(c,function(b){return a.hasOwnProperty(b)&&
1748!a[b]})}var c=this,d,e=this._url&&this._url.path;d=e&&e.toLowerCase().indexOf("/rest/services");(this.userIsAdmin||b(this.ownershipBasedAccessControlForFeatures))&&!this._getToken()&&-1<d&&k.id?(d=e.substring(0,d)+"/rest/info",u({url:d,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(function(a){if(a.owningSystemUrl)return k.id.checkSignInStatus(a.owningSystemUrl+"/sharing")}).then(function(a){if(a)return k.id.getCredential(e)}).then(function(a){a&&c._findCredential()}).always(function(){a.call(c)})):
1749a.call(this)},_checkMode:function(a){var b=this.geometryType,c=this.maxRecordCount;a=(a=a&&a.features&&a.features[0])&&a.attributes&&a.attributes.exceedslimit;if(this.mode===S.MODE_AUTO&&!this.isEditable()&&0===a&&(this.queryPagination||("esriGeometryPolyline"===b||"esriGeometryPolygon"===b||"esriGeometryMultipoint"===b||this.hasXYFootprint())&&c>=this.maxRecordCountForAuto||"esriGeometryPoint"===b&&c>=this.maxPointCountForAuto))this.currentMode=S.MODE_SNAPSHOT,this._mode=new Q(this),this._isSnapshot=
1750this._autoSnapshot=!0},_queryLimit:function(){var a=this,b=new g;this._limitPromise=b.promise;setTimeout(function(){var c=new I,d=new L;d.statisticType="exceedslimit";d.maxPointCount=a.maxPointCountForAuto;d.maxRecordCount=a.maxRecordCountForAuto;d.maxVertexCount=a.maxVertexCountForAuto;d.outStatisticFieldName="exceedslimit";c.outStatistics=[d];a.queryFeatures(c).promise.then(function(a){b.resolve(a)},function(a){b.reject(a)})},0)},_updateCaps:function(){var a=this._editable,b=l.trim(this.capabilities||
1751""),c=h.map(b?b.split(","):[],l.trim),d=h.map(b?b.toLowerCase().split(","):[],l.trim),b=h.indexOf(d,"editing"),e,d={Create:h.indexOf(d,"create"),Update:h.indexOf(d,"update"),Delete:h.indexOf(d,"delete")};if(a&&-1===b)c.push("Editing");else if(!a&&-1<b){a=[b];for(e in d)-1<d[e]&&a.push(d[e]);a.sort();for(e=a.length-1;0<=e;e--)c.splice(a[e],1)}this.capabilities=c.join(",")},_counter:{value:0},_getUniqueId:function(){return this._counter.value++},onSuspend:function(){this.inherited(arguments);this._toggleTime(!1);
1752var a=this._mode;a&&a.suspend()},onResume:function(a){this.inherited(arguments);this._toggleTime(!0);var b=this._mode,c=this._map,d=this._getRenderer();if(a.firstOccurrence){this._fixRendererFields();this._checkFields();this.clearSelection();if(this.timeInfo&&!this._trackManager&&(this._trackIdField||d&&(d.latestObservationRenderer||d.trackRenderer)))this._trackManager=new X(this),this._trackManager.initialize(c);d&&("colors"in d&&"blurRadius"in d&&"maxPixelIntensity"in d)&&("esriGeometryPoint"==
1753this.geometryType&&!this._heatmapManager)&&(this._heatmapManager=new W(this),this._heatmapManager.initialize(c));if(this._autoSnapshot&&this._autoGeneralize&&("esriGeometryPolyline"===this.geometryType||"esriGeometryPolygon"===this.geometryType||this.hasXYFootprint())&&!this.isEditable()&&null==this.getMaxAllowableOffset())d=this.generalizeForScale,this._calculatedScale=d=this.maxScale?this.maxScale:this.minScale?Math.min(d,this.minScale):Math.min(d,M.getScale(c,this.initialExtent)),this._calcMaxOffset=
1754c.extent.getWidth()/c.width/c.getScale()*d;this._zoomConnect=e.connect(c,"onZoomEnd",this,this._zoomEndHandler);this._updateMaxOffset();this._needsRefresh=!1;b&&b.startup()}else this._zoomEndHandler(),b&&b.resume()},_zoomEndHandler:function(){var a=this._map;this._updateMaxOffset();this._prevScale=a.getScale();!this.suspended&&this._needsRefresh&&this.refresh()},_updateMaxOffset:function(){var a=this._map;
1754a&&a.loaded&&this._autoGeneralize&&(this._autoSnapshot?(a=this.getMaxAllowableOffset(),this._setMaxOffset(this._getMaxOffsetForScale(),
1755!0),this._needsRefresh||(this._needsRefresh=a!=this.getMaxAllowableOffset())):this._setMaxOffset(a.extent.getWidth()/a.width,!a.extent.spatialReference.isWebMercator()))},_getMaxOffsetForScale:function(){if(this._map){var a=this._map.getScale(),b=this._calculatedScale,c=this._calcMaxOffset,d=this._prevScale;return a>=b&&(null==d||d<b)?c:a<b&&(null==d||d>=b)?null:this.getMaxAllowableOffset()}},_toggleTime:function(a){var b=this._map;a&&this.timeInfo&&this.useMapTime&&b?(this._mapTimeExtent=b.timeExtent,
1756this._timeConnect||(this._timeConnect=e.connect(b,"onTimeExtentChange",this,this._timeChangeHandler))):(this._mapTimeExtent=null,e.disconnect(this._timeConnect),this._timeConnect=null)},_timeChangeHandler:function(a){this._mapTimeExtent=a;(a=this._mode)&&a.propertyChangeHandler(0)},_getOffsettedTE:function(a){var b=this._timeOffset,c=this._timeOffsetUnits;return a&&b&&c?a.offset(-1*b,c):a},_getTimeOverlap:function(a,b){return a&&b?a.intersection(b):a||b},_getTimeFilter:function(a){var b=this.getTimeDefinition(),
1757c;if(b&&(c=this._getTimeOverlap(b,null),!c))return[!1];if(a){if(a=c?this._getTimeOverlap(a,c):a,!a)return[!1]}else a=c;return[!0,a]},_getAttributeFilter:function(a){var b=this.getDefinitionExpression();return a?b?"("+b+") AND ("+a+")":a:b},_applyQueryFilters:function(a,b){a.where=this._getAttributeFilter(a.where);a.maxAllowableOffset||(a.maxAllowableOffset=this._maxOffset);a.quantizationParameters=this._quantizationParameters;b&&this.supportsAdvancedQueries&&(a.orderByFields=a.orderByFields||this.getOrderByFields());
1758if(this.timeInfo){var c=this._getTimeFilter(a.timeExtent);if(c[0])a.timeExtent=c[1];else return!1}return!0},_add:function(a){var b=this._selectionSymbol,c=a.attributes,d=this.visibilityField;b&&this._isSelOnly&&a.setSymbol(b);if(d&&c&&c.hasOwnProperty(d))a[c[d]?"show":"hide"]();return this.add.apply(this,arguments)},_remove:function(){return this.remove.apply(this,arguments)},_canDoClientSideQuery:function(a){var b=[],c=this._map,d;if(!(this._isTable||!c&&!this._collection))if(!a.text&&!(a.where&&
1759a.where!==this.getDefinitionExpression()||a.orderByFields&&a.orderByFields.length&&(d=this.getOrderByFields()||[])&&a.orderByFields.join()!==d.join()||a.outStatistics||a.returnDistinctValues)){d=this._isSnapshot;var e=this._isSelOnly,f=a.geometry;if(f)if(!e&&a.spatialRelationship===I.SPATIAL_REL_INTERSECTS&&"extent"===f.type&&(d||c.extent.contains(f)))b.push(1);else return;if(c=a.objectIds)if(d)b.push(2);else{var f=c.length,g=this._mode,k=0,l;for(l=0;l<f;l++)g._getFeature(c[l])&&k++;if(k===f)b.push(2);
1760else return}if(this.timeInfo)if(a=a.timeExtent,c=this._mapTimeExtent,d)a&&b.push(3);else if(e){if(a)return}else if(c)if(-1!==h.indexOf(b,2))a&&b.push(3);else if(-1!==h.indexOf(b,1))a==c&&b.push(3);else return;else if(0<b.length)a&&b.push(3);else if(a)return;return 0<b.length?b:null}},_getAbsMid:function(a){return p.toAbsMid?p.toAbsMid(a):n.id.replace(/\/[^\/]*$/ig,"/")+a},_doQuery:function(a,b,c){var d=[],e=this.objectIdField,f=this,k=new g,m=new g,n=this.graphics;if(-1!==h.indexOf(b,1)){var p=this.spatialIndex||
1761this._map&&this._map.spatialIndex,r,q=a.geometry._normalize(null,!0);null==p&&$.autoSpatialIndexing?r=(this._map||this).addPlugin(this._getAbsMid("../plugins/spatialIndex")).then(l.hitch(this,l.partial(this._getFromIndex,q,p)),function(a){m.resolve(l.hitch(this,l.partial(this._filterByExtent,n,q)))}):p&&(r=this._getFromIndex(q,p));r?r.then(function(a){for(var b=0;b<a.length;b++)a[b].results&&(d=d.concat(a[b].results));m.resolve(d)}).otherwise(function(a){m.reject(a)}):m.resolve(this._filterByExtent(n,
1762q))}else m.resolve(n);m.then(function(g){d=g;if(-1!==h.indexOf(b,2)){var l=a.objectIds;d=h.filter(d,function(a){return-1<h.indexOf(l,a.attributes[e])})}-1!==h.indexOf(b,3)&&f.timeInfo&&(g=a.timeExtent,d=f._filterByTime(d,g.startTime,g.endTime).match);c&&(d=h.map(d,function(a){return a.attributes[e]},this));k.resolve(d)});return k},_getFromIndex:function(a,b){b=b||this.spatialIndex||this._map.spatialIndex;
1762a instanceof Array||(a=[a]);var c=this.id;return s(h.map(a,function(a){return b.intersects(a,
1763c)}))},_filterByExtent:function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d],g=f.geometry;g&&(this.normalization&&b.length?(b[0].intersects(g)||b[1].intersects(g))&&c.push(f):b.intersects(g)&&c.push(f))}return c},_filterByTime:function(a,b,c){var d=this._startTimeField,e=this._endTimeField,f;this._twoTimeFields||(f=d||e);var g=r.isDefined,h=[],k=[],l,m=a.length,n,p;b=b?b.getTime():-Infinity;c=c?c.getTime():Infinity;if(f)for(l=0;l<m;l++)n=a[l],p=n.attributes,d=p[f],d>=b&&d<=c?h.push(n):k.push(n);
1764else for(l=0;l<m;l++)n=a[l],p=n.attributes,f=p[d],p=p[e],f=g(f)?f:-Infinity,p=g(p)?p:Infinity,f>=b&&f<=c||p>=b&&p<=c||b>=f&&c<=p?h.push(n):k.push(n);return{match:h,noMatch:k}},_resolve:function(a,b,c,d,e){b&&this[b].apply(this,a);c&&c.apply(null,a);d&&v._resDfd(d,a,e)},_getShallowClone:function(a){var b=new I,c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},_query:function(a,b,c,d,e){var f=this,k=this._map,l=new g(v._dfdCanceller),m=c,n,p;if("executeRelationshipQuery"!==a){var m=this._getShallowClone(c),
1765r=this.getOutFields();m.outFields||(m.outFields=r);m.outFields&&m.outFields.length&&(p=-1<h.indexOf(r,"*")?!1:!h.every(m.outFields,function(a){return-1<h.indexOf(r,a)}));m.returnGeometry=c.hasOwnProperty("returnGeometry")?c.returnGeometry:!c.outStatistics;m.returnGeometry&&(m.multipatchOption=this.multipatchOption);var q;k&&(c=k&&k.spatialReference,(k=m.outSpatialReference)?n=!k.equals(c):m.outSpatialReference=new z(c.toJson()));if(!this._applyQueryFilters(m,"execute"===a&&!m.outStatistics)){switch(a){case "execute":q=
1766new H({features:[]});break;case "executeForIds":q=[];break;case "executeForCount":q=0;break;case "executeForExtent":q={}}this._resolve([q],b,d,l);return l}if(c="executeForExtent"!==a&&!n&&!p&&this._canDoClientSideQuery(m))return l._pendingDfd=t(this._doQuery(m,c,"executeForIds"===a||"executeForCount"===a)),l._pendingDfd.then(function(c){switch(a){case "execute":q=new H;q.features=c;break;case "executeForIds":q=c;break;case "executeForCount":q=c.length}f._resolve([q],b,d,l)}),l}if(this._collection)return this._resolve([Error("FeatureLayer::_query - "+
1767this.invalidParams)],null,e,l,!0),l;this._ts&&(m._ts=(new Date).getTime());(l._pendingDfd=this._task[a](m)).addCallbacks(function(c){var e=!!m.outStatistics||n||p;if("execute"===a||"executeRelationshipQuery"===a){var g,h;if("execute"===a){g=c.features;h=g.length;for(h-=1;0<=h;h--)if(g[h]._layer=f,!e&&!f._isTable){var k=f._mode._getFeature(g[h].attributes[f.objectIdField]);k&&g.splice(h,1,k)}}else for(k in c)if(c.hasOwnProperty(k)){g=c[k].features;h=g.length;for(h-=1;0<=h;h--)g[h]._layer=f}}f._resolve([c],
1768b,d,l)},function(a){f._resolve([a],null,e,l,!0)});return l},_convertFeaturesToJson:function(a,b,c,d){var e=[],f=this._selectionSymbol,g=this.visibilityField,k,m=this.objectIdField;if(this.loaded&&(c||d))k=h.filter(this.fields,function(a){return!1===a.editable&&(!d||a.name!==m)});for(c=0;c<a.length;c++){var n=a[c],p={},r=n.geometry,s=n.attributes,t=n.symbol;if(r&&(!d||!this.loaded||this.allowGeometryUpdates))p.geometry=r.toJson();g?(p.attributes=s=l.mixin({},s),s[g]=n.visible?1:0):s&&(p.attributes=
1769l.mixin({},s));p.attributes&&(k&&k.length)&&h.forEach(k,function(a){delete p.attributes[a.name]});t&&t!==f&&(p.symbol=t.toJson());e.push(p)}return b?e:q.toJson(e)},_selectHandler:function(a,b,c,d,e){var f;d=S;switch(b){case d.SELECTION_NEW:this.clearSelection(!0);f=!0;break;case d.SELECTION_ADD:f=!0;break;case d.SELECTION_SUBTRACT:f=!1}d=a.features;var g=this._mode,h=[],k=this.objectIdField,l,m;if(f)for(f=0;f<d.length;f++)l=d[f],m=l.attributes[k],l=g._addFeatureIIf(m,l),h.push(l),this._selectFeatureIIf(m,
1770l,g);else for(f=0;f<d.length;f++)l=d[f],m=l.attributes[k],this._unSelectFeatureIIf(m,g),m=g._removeFeatureIIf(m),h.push(m||l);this._isSelOnly&&g._applyTimeFilter(!0);this._resolve([h,b,a.exceededTransferLimit?{queryLimitExceeded:!0}:null],"onSelectionComplete",c,e);if(a.exceededTransferLimit)this.onQueryLimitExceeded()},_selectFeatureIIf:function(a,b,c){var d=this._selectedFeatures,e=d[a];e||(c._incRefCount(a),d[a]=b,this._isTable||(this._setSelectSymbol(b),b.attr("data-selected","")));return e||
1771b},_unSelectFeatureIIf:function(a,b){var c=this._selectedFeatures[a];c&&(b._decRefCount(a),delete this._selectedFeatures[a],this._isTable||(this._setUnSelectSymbol(c),c.attr("data-selected")));return c},_isSelected:function(a){},_setSelectSymbol:function(a){var b=this._selectionSymbol;b&&!this._isSelOnly&&a.setSymbol(b)},_setUnSelectSymbol:function(a){var b=this._selectionSymbol;b&&!this._isSelOnly&&b===a.symbol&&a.setSymbol(null,!0)},_getOutFields:function(){var a=[this.objectIdField,this.typeIdField,
1772this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields).concat(this.dataAttributes),a=h.filter(a,function(a,b,c){return!!a&&h.indexOf(c,a)===b}),b=l.clone(this._outFields);if(b){if(-1!==h.indexOf(b,"*"))return b;h.forEach(a,function(a){-1===h.indexOf(b,a)&&b.push(a)});return b}return a},_checkFields:function(a){var b=a||this._getOutFields();h.forEach(b,function(a){"*"!==a&&(this._getField(a)||console.debug("esri.layers.FeatureLayer: "+r.substitute({url:this.url,
1773field:a},"unable to find '${field}' field in the layer 'fields' information [url: ${url}]")))},this);!a&&(!this._isTable&&!this._fserver&&!this._collection&&!this._isStream)&&(h.some(this.fields,function(a){return a&&"esriFieldTypeGeometry"===a.type?!0:!1})||console.debug("esri.layers.FeatureLayer: "+r.substitute({url:this.url},"unable to find a field of type 'esriFieldTypeGeometry' in the layer 'fields' information. If you are using a map service layer, features will not have geometry [url: ${url}]")))},
1774_fixFieldCase:function(a,b,c){var d=a&&a[b],e;if(d&&!l.isFunction(d)){if(e=!this._getField(d)&&this._getField(d,!0))d=a[b]=e.name;c&&c.push(d)}return d},_fixRendererFields:function(){var a=this.renderer;this._orderBy=null;if(a&&0<this.fields.length){var b=[],c,a=h.filter([a,a.observationRenderer,a.latestObservationRenderer,a.trackRenderer],r.isDefined),d=[].concat(a);h.forEach(a,function(a){h.forEach(a.rendererInfos,function(a){a.renderer&&d.push(a.renderer)})});h.forEach(d,function(a){this._fixFieldCase(a,
1775"attributeField",b);this._fixFieldCase(a,"attributeField2",b);this._fixFieldCase(a,"attributeField3",b);this._fixFieldCase(a.rotationInfo,"field",b);if((c=this._fixFieldCase(a.sizeInfo,"field",b))&&!this._orderBy)this._orderBy=[c+" DESC"];this._fixFieldCase(a.sizeInfo,"normalizationField",b);this._fixFieldCase(a.colorInfo,"field",b);this._fixFieldCase(a.colorInfo,"normalizationField",b);this._fixFieldCase(a.field,"field",b);this._fixFieldCase(a.opacityInfo,"field",b);this._fixFieldCase(a.opacityInfo,
1776"normalizationField",b);h.forEach(a.visualVariables,function(a){c=this._fixFieldCase(a,"field",b);"sizeInfo"===a.type&&(c&&!this._orderBy)&&(this._orderBy=[c+" DESC"]);this._fixFieldCase(a,"normalizationField",b)},this);if(!this._orderBy&&a.addBreak&&!l.isFunction(a.attributeField)&&(a.backgroundFillSymbol||this._hasSizeDiff(a)))this._orderBy=[a.attributeField+" DESC"]},this);this._rendererFields=h.filter(b,r.isDefined)}},_hasSizeDiff:function(a){var b=Number.MAX_VALUE,c=-Number.MAX_VALUE,d,e;h.forEach(a.infos,
1777function(a){if(e=a.symbol){d=0;switch(e.type){case "simplemarkersymbol":d=e.size;break;case "picturemarkersymbol":d=(e.width+e.height)/2;break;case "simplelinesymbol":case "cartographiclinesymbol":d=e.width;break;case "simplefillsymbol":case "picturefillsymbol":d=e.outline&&e.outline.width}d&&(b=Math.min(b,d),c=Math.max(c,d))}});return b!==Number.MAX_VALUE&&c!==-Number.MAX_VALUE&&1<Math.abs(c-b)},getOrderByFields:function(){var a=this.orderByFields||this._orderBy;return this.supportsAdvancedQueries&&
1778a?h.filter(a,function(a){a=a.split(" ")[0];return!!this._getField(a,!0)},this):null},_getField:function(a,b){var c=this.fields;if(!c||0===c.length)return null;var d;b&&(a=a.toLowerCase());h.some(c,function(c){var e=!1;(e=b?c&&c.name.toLowerCase()===a?!0:!1:c&&c.name===a?!0:!1)&&(d=c);return e});return d},_getDateOpts:function(){this._dtOpts||(this._dtOpts={properties:h.map(h.filter(this.fields,function(a){return!!(a&&"esriFieldTypeDate"===a.type)}),function(a){return a.name})});return this._dtOpts},
1779_applyNormalized:function(a,b){a&&b&&h.forEach(a,function(a,c){a&&b[c]&&a.setGeometry(b[c])})},_editHandler:function(a,b,c,d,e,f){e=a.addResults;var g=a.updateResults;a=a.deleteResults;var k,m,n,p,r=this.objectIdField,q=this._mode,s=this._isTable;k=this.editFieldsInfo;var t=this.getOutFields()||[],w=k&&k.creatorField,u=k&&k.creationDateField,y=k&&k.editorField,v=k&&k.editDateField;k=k&&k.realm;-1===h.indexOf(t,"*")&&(w&&-1===h.indexOf(t,w)&&(w=null),u&&-1===h.indexOf(t,u)&&(u=null),y&&-1===h.indexOf(t,
1780y)&&(y=null),v&&-1===h.indexOf(t,v)&&(v=null));var t=u||v?(new Date).getTime():null,B=w||y?this.getUserId():void 0;B&&k&&(B=B+"@"+k);if(e)for(k=0;k<e.length;k++)e[k]=new R(e[k]),s||(m=e[k],m.success&&(m=m.objectId,n=b[k],(p=n._graphicsLayer)&&p!==this&&p.remove(n),p=n.attributes||{},p[r]=m,w&&(p[w]=B),y&&(p[y]=B),u&&(p[u]=t),v&&(p[v]=t),n.setAttributes(p),q._init&&q.drawFeature(n)));if(g)for(k=0;k<g.length;k++)if(g[k]=new R(g[k]),!s&&(m=g[k],m.success)){m=m.objectId;n=c[m];if(b=q._getFeature(m))b.geometry!==
1781n.geometry&&n.geometry&&b.setGeometry(F.fromJson(n.geometry.toJson())),b.attributes!==n.attributes&&n.attributes&&b.setAttributes(l.mixin(b.attributes,n.attributes)),this._repaint(b,m);n=b||n;p=n.attributes||{};y&&(p[y]=B);v&&(p[v]=t);n.setAttributes(p)}if(a){c=[];for(k=0;k<a.length;k++)if(a[k]=new R(a[k]),!s&&(m=a[k],m.success&&(m=m.objectId,n=q._getFeature(m))))this._unSelectFeatureIIf(m,q)&&c.push(n),n._count=0,q._removeFeatureIIf(m);if(0<c.length)this.onSelectionComplete(c,S.SELECTION_SUBTRACT)}this._resolve([e,
1782g,a],"onEditsComplete",d,f)},_sendAttachment:function(a,b,c,d,e){var f=this;return u({url:this._url.path+"/"+b+"/"+("add"===a?"addAttachment":"updateAttachment"),form:c,content:l.mixin(this._url.query,{f:"json",token:this._getToken()||void 0}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(c){var e="add"===a?"onAddAttachmentComplete":"onUpdateAttachmentComplete";c=new R(c["add"===a?"addAttachmentResult":"updateAttachmentResult"]);c.attachmentId=c.objectId;c.objectId=b;f._resolve([c],
1783e,d);return c}).addErrback(function(a){f._resolve([a],null,e,null,!0)})},_repaint:function(a,b,c){b=r.isDefined(b)?b:a.attributes[this.objectIdField];(!(b in this._selectedFeatures)||!this._selectionSymbol)&&a.setSymbol(a.symbol,c)},_getKind:function(a){var b=this._trackManager;return b?b.isLatestObservation(a)?1:0:0}});l.mixin(S,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,MODE_AUTO:6,MODE_STREAM:7,POPUP_NONE:"esriServerHTMLPopupTypeNone",
1784POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",POPUP_URL:"esriServerHTMLPopupTypeAsURL"});K._createWrappers(S);c("extend-esri")&&l.setObject("layers.FeatureLayer",S,k);return S})},"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(p,n){return p("dijit._DialogMixin",null,{actionBarTemplate:"",execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=n._getTabNavigable(this.domNode);
1785this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}})})},"esri/layers/TiledMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/url dojo/dom-construct dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/dom dojox/collections/ArrayList dojox/gfx/matrix ../kernel ../config ../sniff ../domUtils ../tileUtils ../geometry/Point ../geometry/Rect ../geometry/Extent ./layer".split(" "),
1786function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s,k,r,u,x,v,z){p=p(z,{declaredClass:"esri.layers.TiledMapServiceLayer",constructor:function(b,c){n.connect(this,"onLoad",this,"_initTiledLayer");this._lowestLevel=(this._displayLevels=c?c.displayLevels:null)?this._displayLevels[0]:0;this.resampling=c?c.resampling:void 0;this._resamplingTolerance=c?c.resamplingTolerance:null;this.exclusionAreas=c?c.exclusionAreas:null;var d=a.hitch;this._addImage=d(this,this._addImage);
1786this._tileLoadHandler=d(this,this._tileLoadHandler);
1787this._tileErrorHandler=d(this,this._tileErrorHandler);this._popTile=d(this,this._popTile);this._cleanUpRemovedImages=d(this,this._cleanUpRemovedImages);this._fireOnUpdateEvent=d(this,this._fireOnUpdateEvent);this._transitionEnd=d(this,this._transitionEnd);this._tileMapCallback=d(this,this._tileMapCallback)},opacity:1,isPNG32:!1,_multiple:1,isResampling:!1,_initTiledLayer:function(){var a=this.tileInfo,b=a.lods;this.resampling=null!=this.resampling?this.resampling:!1;this._tileW=a.width;this._tileH=
1788a.height;var c=this.scales=[],d=this._displayLevels,f="esri.layers.WMTSLayer"===this.declaredClass&&96!=a.dpi,g=-Infinity,h=Infinity,k=this.fullExtent,l=new u(k.xmin,k.ymax),k=new u(k.xmax,k.ymin),m=r.getContainingTileCoords,n,p,q,t=b.length;for(q=0;q<t;q++)if(p=b[q],f&&(p.scale=96*p.scale/a.dpi),n=m(a,l,p),p.startTileRow=0>n.row?0:n.row,p.startTileCol=0>n.col?0:n.col,n=m(a,k,p),p.endTileRow=n.row,p.endTileCol=n.col,!d||-1!==e.indexOf(d,p.level))c[q]=p.scale,g=p.scale>g?p.scale:g,h=p.scale<h?p.scale:
1789h;f&&(a.dpi=96);-Infinity!==g&&!this._hasMin&&this.setMinScale(g);Infinity!==h&&!this._hasMax&&this.setMaxScale(h);this.setExclusionAreas(this.exclusionAreas);this._patchIE=6<=s("ie")&&7>s("ie")&&(this.isPNG32||"Mixed"===a.format)},isVisibleAtScale:function(a){return a?z.prototype._isMapAtVisibleScale.call(this,a,!0):!1},_isMapAtVisibleScale:function(a){var b=this.inherited(arguments,[a,!0]);if(b){var c;c=this._map;var b=this.scales,d=c.getScale(),e=!1,f=c.width>c.height?c.width:c.height;for(c=0;c<
1790b.length;c++)if(Math.abs(b[c]-d)/b[c]<1/f){e=!0;break}b=e}return b},_setMap:function(a,b,c,e){this.inherited(arguments);this._map=a;var f=this._div=h.create("div",null,b),g=a.__visibleDelta,k=n.connect,l=m._css.names,p={position:"absolute",width:a.width+"px",height:a.height+"px",overflow:"visible"},q=t.defaults.map.zoomDuration;"css-transforms"===a.navigationMode?(p[l.transform]=m._css.translate(-g.x,-g.y),d.set(f,p),delete p[l.transform],p[l.transition]=l.transformName+" "+q+"ms ease",d.set(this._active=
1791h.create("div",null,f),p),this._active._remove=0,this._passives=[]):(p.left=-g.x+"px",p.top=-g.y+"px",d.set(f,p));this._onResizeHandler_connect=k(a,"onResize",this,"_onResizeHandler");this._opacityChangeHandler_connect=k(this,"onOpacityChange",this,"_opacityChangeHandler");g=this.tileInfo;k=g.spatialReference;l=k._getInfo();(this._wrap=a.wrapAround180&&k._isWrappable()&&Math.abs(l.origin[0]-g.origin.x)<=l.dx)&&r._addFrameInfo(g,l);this.setExclusionAreas(this.exclusionAreas);this.evaluateSuspension();
1792if(this.suspended&&!a.loaded)var s=n.connect(a,"onLoad",this,function(){n.disconnect(s);s=null;this.setExclusionAreas(this.exclusionAreas);this.evaluateSuspension()});return f},_unsetMap:function(a,b){this.suspended||this._suspendImpl();h.destroy(this._div);this._map=this._div=null;var c=n.disconnect;c(this._onResizeHandler_connect);c(this._opacityChangeHandler_connect);this.inherited(arguments)},onSuspend:function(){this.inherited(arguments);this._suspendImpl()},_suspendImpl:function(){k.hide(this._div);
1793clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors();var a=this._tiles,b=this._tileIds,c=this._loadingList,d,e,f=n.disconnect,g=h.destroy;c&&0<c.count&&(c.forEach(function(b){if(d=a[b])f(d._onload_connect),f(d._onerror_connect),f(d._onabort_connect),d._onload_connect=d._onerror_connect=d._onabort_connect=null}),c.clear(),this._fireUpdateEnd());this._removeList.clear();for(c=b.length-1;0<=c;
1793c--)(d=(e=b[c])&&a[e])&&g(d);if("css-transforms"===this._map.navigationMode){b=this._active;
1794e=this._passives;var l;this._noDom=0;for(c=e.length-1;0<=c;c--)l=e[c],l._endHandle&&f(l._endHandle),l._matrix=l._multiply=l._endHandle=null,l._marked=l._remove=0,e.splice(c,1),g(l);b._matrix=b._multiply=null;b._marked=b._remove=0}this._tileIds=this._tiles=this._tileBounds=this._ct=this._loadingList=this._removeList=this._standby=null},onResume:function(){this.inherited(arguments);this._tileIds=[];this._tiles=[];this._tileBounds=[];this._ct=null;this._removeList=new b;this._loadingList=new b;k.show(this._div);
1795this._enableDrawConnectors();this._wakeTimer=this._wakeTimer||setTimeout(a.hitch(this,function(){this.suspended||this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD)}),0)},_enableDrawConnectors:function(){var a=this._map,b=n.connect;if("css-transforms"===a.navigationMode){if(this._onScaleHandler_connect=b(a,"onScale",this,this._onScaleHandler),s("esri-mobile")){this._standby=[];var c=this,d=function(){c._noDom=1};this._onPanStartHandler_connect=b(a,"onPanStart",d);this._onZoomStartHandler_connect=
1796b(a,"onZoomStart",d)}}else this._onZoomHandler_connect=b(a,"onZoom",this,"_onZoomHandler");this._onPanHandler_connect=b(a,"onPan",this,"_onPanHandler");this._onExtentChangeHandler_connect=b(a,"onExtentChange",this,"_onExtentChangeHandler")},_disableDrawConnectors:function(){var a=n.disconnect;a(this._onPanHandler_connect);a(this._onZoomHandler_connect);a(this._onScaleHandler_connect);a(this._onExtentChangeHandler_connect);a(this._onPanStartHandler_connect);a(this._onZoomStartHandler_connect);this._onPanHandler_connect=
1797this._onZoomHandler_connect=this._onScaleHandler_connect=this._onExtentChangeHandler_connect=this._onPanStartHandler_connect=this._onZoomStartHandler_connect=null},_onResizeHandler:function(a,b,c){a={width:b+"px",height:c+"px"};b=d.set;b(this._div,a);if("css-transforms"===this._map.navigationMode){this._active&&b(this._active,a);for(c=this._passives.length-1;0<=c;c--)b(this._passives[c],a)}},_onExtentChangeHandler:function(a,b,c,e){b=this._map;var k=this._standby,l;clearTimeout(this._wakeTimer);this._wakeTimer=
1798null;if(!b._isPanningOrZooming()){if("css-transforms"===b.navigationMode){if(c)for(e=this._passives.length-1;0<=e;e--)l=this._passives[e],d.set(l,m._css.names.transition,"none"),l._marked?(this._passives.splice(e,1),l.parentNode&&l.parentNode.removeChild(l),h.destroy(l)):0<l.childNodes.length&&(l._multiply=l._multiply?f.multiply(l._matrix,l._multiply):l._matrix);this._noDom=0;if(k&&k.length)for(e=k.length-1;0<=e;e--)l=k[e],d.set(l,"visibility","visible"),this._popTile(l),k.splice(e,1)}this._fireUpdateStart();
1799this._rrIndex=0;e=r.getCandidateTileInfo(b,this.tileInfo,a);a=b.__visibleDelta;if(!this._ct||e.lod.level!==this._ct.lod.level||c){l=e&&this._ct&&e.lod.level!==this._ct.lod.level;this._ct=e;var n=this._tiles,p=this._tileIds,q=this._tileBounds,s=this._removeList,t,u=p.length;this._cleanUpRemovedImages();for(e=0;e<u;e++)k=p[e],t=n[k],q[k]=p[e]=null,"css-transforms"===b.navigationMode&&(l&&t.parentNode&&b.fadeOnZoom)&&(t._fadeOut=l,t.parentNode._remove++),s.add(t);c&&(this._tileIds=[],this._tiles=[],
1800this._tileBounds=[])}e=a.x;c=a.y;"css-transforms"===b.navigationMode?(k={},k[m._css.names.transform]=m._css.translate(e,c),d.set(this._div,k)):d.set(this._div,{left:e+"px",to
1800p:c+"px"});this.__coords_dx=e;this.__coords_dy=c;this._updateImages(new x(0,0,a.width,a.height));0===this._loadingList.count?(this._cleanUpRemovedImages(),this.onUpdate(),this._fireUpdateEnd()):this._fireOnUpdate=!0;c=this._tileW;n=this._tileH;a=new x(-a.x,-a.y,a.width,a.height);for(e=this._tileIds.length-1;0<=e;e--)(k=this._tileIds[e])?
1801(l=this._tiles[k],p=g.getMarginBox(l),p=new x(p.l,p.t,c,n),"css-transforms"===b.navigationMode&&(p.x=l._left,p.y=l._top),a.intersects(p)?this._tileBounds[k]=p:(this._loadingList.contains(k)&&this._popTile(l),h.destroy(l),this._tileIds.splice(e,1),delete this._tileBounds[k],delete this._tiles[k])):(this._tileIds.splice(e,1),delete this._tileBounds[k],delete this._tiles[k])}},_onPanHandler:function(a,b){var c=this._map,e=c.__visibleDelta.offset(b.x,b.y);this.__coords_dx=this.__coords_dy=0;"css-transforms"===
1802c.navigationMode?(c={},c[m._css.names.transform]=m._css.translate(e.x,e.y),d.set(this._div,c),s("esri-mobile")||this._updateImages({x:-e.x,y:-e.y,width:e.width,height:e.height})):(d.set(this._div,{left:e.x+"px",top:e.y+"px"}),this._updateImages({x:-e.x,y:-e.y,width:e.width,height:e.height}));0<this._loadingList.count&&(this._fireUpdateStart(),this._fireOnUpdate=!0)},_onScaleHandler:function(a,b){var c,e={},g=m._css.names,k=this._map,l=t.defaults.map.zoomDuration;for(c=this._passives.length-1;0<=c;c--){var n=
1803this._passives[c];0===n.childNodes.length?(this._passives.splice(c,1),h.destroy(n)):("none"===n.style[g.transition]&&d.set(n,g.transition,g.transformName+" "+l+"ms ease"),d.set(n,g.transition,b?"none":g.transformName+" "+l+"ms ease"),n._matrix=a,e[g.transform]=m._css.matrix(n._multiply?f.multiply(a,n._multiply):a),d.set(n,e))}this._active&&0===this._active.childNodes.length||(d.set(this._active,g.transition,b?"none":g.transformName+" "+l+"ms ease"),this._active._matrix=a,e[g.transform]=m._css.matrix(this._active._matrix),
1804d.set(this._active,e),this._passives.push(this._active),e={position:"absolute",width:k.width+"px",height:k.height+"px",overflow:"visible"},e[g.transition]=g.transformName+" "+l+"ms ease",d.set(this._active=h.create("div",null,this._div),e),this._active._remove=0,k.fadeOnZoom&&h.place(this._active,this._div,"first"))},_onZoomHandler:function(a,b,c){a=g.getMarginBox(this._div);c=c.offset(-a.l,-a.t);if(!this._previousScale||1===b)this._previousScale=1;var f,h=this._tileW*b,k=this._tileH*b,l=this._tileBounds,
1805m=this._tiles,n=this._previousScale,p=this._multiple,r=d.set,q,t;if((a=s("ie"))&&8>a)e.forEach(this._tileIds,function(a){t="";f=l[a];q=m[a].style.margin.split(" ");e.forEach(q,function(a){""!==t&&(t+=" ");a=parseFloat(a);t+=a/n*b+"px"});r(m[a],{left:f.x-(h-f.width)*(c.x-f.x)/f.width+"px",top:f.y-(k-f.height)*(c.y-f.y)/f.height+"px",margin:1!==p&&-1===t.indexOf("NaN")?t:"",zoom:b})});else{var u=h*p,v=k*p,x,z;e.forEach(this._tileIds,function(a){t="";f=l[a];x=f.x-(h-f.width)*(c.x-f.x)/f.width;z=f.y-
1806(k-f.height)*(c.y-f.y)/f.height;q=m[a].style.margin.split(" ");e.forEach(q,function(a){""!==t&&(t+=" ");a=parseFloat(a);t+=a/n*b+"px"});r(m[a],{left:x+"px",top:z+"px",margin:1!==p&&-1===t.indexOf("NaN")?t:"",width:u+"px",height:v+"px"})})}this._previousScale=b},_updateImages:function(a){if(this._ct){var b,c=this._tileW,d=this._tileH,f=this._ct;b=f.lod;var f=f.tile,g=f.offsets,h=f.coords,k=h.row,h=h.col,l=b.level,m=this.opacity,n=this._tileIds,p=this._loadingList,r=this._addImage,q=this._map.id,s=
1807this.id,t=a.x,u=a.y,v=b.startTileRow,x=b.endTileRow,z=b.startTileCol,R=b.endTileCol,ba=e.indexOf,Q,P,ca=g.x-this.__coords_dx,Z=g.y-this.__coords_dy;P=c-ca+-a.x;var X=d-Z+-a.y;Q=Math.ceil;P=0<P?P%c:c-Math.abs(P)%c;X=0<X?X%d:d-Math.abs(X)%d;t=0<t?Math.floor((t+ca)/c):Q((t-(c-ca))/c);u=0<u?Math.floor((u+Z)/d):Q((u-(d-Z))/d);Z=t+Q((a.width-P)/c);a=u+Q((a.height-X)/d);var W,V,$;this._wrap&&(W=b._frameInfo,V=W[0],$=W[1],W=W[2]);for(X=t;X<=Z;X++)for(t=u;t<=a;t++)Q=k+t,P=h+X,this._wrap&&(P<$?(P%=V,P=P<$?
1808P+V:P):P>W&&(P%=V)),!this._isExcluded(l,Q,P)&&(Q>=v&&Q<=x&&P>=z&&P<=R)&&(b=q+"_"+s+"_tile_"+l+"_"+t+"_"+X,-1===ba(n,b)&&(p.add(b),n.push(b),r(l,t,Q,X,P,b,c,d,m,f,g)))}},_cleanUpRemovedImages:function(){var a=this._removeList,b=h.destroy,c,e=m._css.names;a.forEach(function(a){a._fadeOut||(a.style.filter="",a.style.zoom=1,b(a))});if("css-transforms"===this._map.navigationMode)for(c=this._passives.length-1;0<=c;c--){var f=this._passives[c];0===f.childNodes.length?(this._passives.splice(c,1),b(f)):this._map.fadeOnZoom&&
1809(!f._marked&&f._remove===f.childNodes.length)&&(f._marked=1,2048>m._css.getScaleFromMatrix(d.get(f,e.transform))?(d.set(f,e.transition,"opacity 0.65s"),d.set(f,"opacity",0),n.disconnect(f._endHandle),f._endHandle=n.connect(f,e.endEvent,this._transitionEnd)):this._transitionEnd({propertyName:"opacity",target:f}))}a.clear()},_transitionEnd:function(a){var b=a.target;"opacity"===a.propertyName&&(n.disconnect(b._endHandle),b._endHandle=null,a=e.indexOf(this._passives,b),-1<a&&this._passives.splice(a,
18101),b.parentNode&&b.parentNode.removeChild(b),h.destroy(b))},_addImage:function(b,c,e,f,g,k,l,p,r,s,t){if(this._patchIE)s=this._tiles[k]=h.create("div"),s.id=k,q.add(s,"layerTile"),d.set(s,{left:l*f-t.x+"px",top:p*c-t.y+"px",width:l+"px",height:p+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'"+this.getTileUrl(b,e,g)+"', sizingMethod\x3d'scale')"}),1>r&&d.set(s,"opacity",r),b=s.appendChild(h.create("div")),d.set(b,{opacity:0,width:l+"px",height:p+"px"}),this._div.appendChild(s),
1811this._loadingList.remove(k),this._fireOnUpdateEvent();else{s=this._tiles[k]=h.create("img");var u=n.connect;s.id=k;s.alt="";q.add(s,"layerTile");f=l*f-t.x;t=p*c-t.y;c=this._map;var v=m._css.names;l={width:l+"px",height:p+"px",visibility:"hidden"};"css-transforms"===c.navigationMode?(l[v.transform]=m._css.translate(f,t),d.set(s,l),s._left=f,s._top=t):(l.left=f+"px",l.top=t+"px",d.set(s,l));1>r&&d.set(s,"opacity",r);s._onload_connect=u(s,"onload",this,"_tileLoadHandler");
1811s._onerror_connect=u(s,"onerror",
1812a.hitch(this,"_tileErrorHandler",e,g));s._onabort_connect=u(s,"onabort",this,"_tileAbortHandler");if(this.tileMap)this.tileMap.getTile(b,e,g,k,this._tileMapCallback);else if(k=this.getTileUrl(b,e,g,s))this._failedRequests&&this._failedRequests[k]?(d.set(s,this._failedRequests[k].css),s.src=this._failedRequests[k].src,this._multiple=parseInt(this._failedRequests[k].css.width)/this._tileW,this.isResampling=1!==this._multiple):(this._multiple=1,this.isResampling=!1,s.src=k);"css-transforms"===c.navigationMode?
1813this._active.appendChild(s):this._div.appendChild(s)}},_tileMapCallback:function(a,b){var e,f;this.suspended||((f=this._tiles[b.id]||c.byId(b.id))?(this._multiple=2*(b.level-a.level)||1,this.isResampling=1!==this._multiple,e=this.tileMap.style(a,b),d.set(f,e),f.src=this.getTileUrl(a.level,a.row,a.col)):this._popTile(b))},getTileUrl:function(a,b,c){},_reCheckTS:/[\?\&]_ts=/ig,_reReplaceTS:/([\?\&]_ts=)[0-9]+/ig,addTimestampToURL:function(a){var b=this._refreshTS;b&&(a=this._reCheckTS.test(a)?a.replace(this._reReplaceTS,
1814"$$$1"+b):a+((-1===a.indexOf("?")?"?":"\x26")+"_ts\x3d"+b));return a},refresh:function(){this.suspended||(this._refreshTS=(new Date).getTime(),this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD))},_popTile:function(a){var b=n.disconnect;b(a._onload_connect);b(a._onerror_connect);b(a._onabort_connect);a._onload_connect=a._onerror_connect=a._onabort_connect=null;this._loadingList.remove(a.id);this._fireOnUpdateEvent()},_tileLoadHandler:function(a){a=a.currentTarget;this._noDom?this._standby.push(a):
1815(d.set(a,"visibility","visible"),this._popTile(a))},_tileAbortHandler:function(a){a=a.currentTarget;this.onError(Error("Unable to load tile: "+a.src));d.set(a,"visibility","hidden");this._popTile(a)},_tileErrorHandler:function(a,b,c){c=c.currentTarget;var e,f,g=!0;if(this.tileMap||!this.resampling)g=!1;else if(e=new l(c.src),e=e.path.split("/"),e=parseInt(e[e.length-3]),f=this._ct.lod.level-e+1,this._multiple=Math.pow(2,f),e===this._lowestLevel||0===this._resamplingTolerance||this._resamplingTolerance&&
1816Math.log(this._multiple)/Math.LN2>this._resamplingTolerance)g=!1;g?(this.isResampling=!0,this._resample(c,a,b)):(this.onError(Error("Unable to load tile: "+c.src)),d.set(c,"visibility","hidden"),this._popTile(c))},_resample:function(a,b,c){var e=(new l(a.src)).path.split("/"),f=this._multiple,g=parseInt(e[e.length-3])-1,h=parseInt(b/f),k=parseInt(c/f),e=c%f,m=b%f,h=this.getTileUrl(g,h,k);b=this.getTileUrl(g+Math.log(f)/Math.LN2,b,c);f={width:this._tileW*f+"px",height:this._tileH*f+"px",margin:"-"+
1817this._tileW*m+"px 0 0 "+("-"+this._tileH*e+"px")};this._failedRequests||(this._failedRequests={});this._failedRequests[b]={src:h,css:f};d.set(a,f);s("chrome")&&a.setAttribute("src",null);a.src=h},_fireOnUpdateEvent:function(){0===this._loadingList.count&&(this._cleanUpRemovedImages(),this._fireOnUpdate&&(this._fireOnUpdate=!1,this.onUpdate(),this._fireUpdateEnd()))},setOpacity:function(a){if(this.opacity!=a)this.onOpacityChange(this.opacity=a)},onOpacityChange:function(){},_opacityChangeHandler:function(a){var b=
1818d.set,c,e,f;if("css-transforms"===this._map.navigationMode){if(this._active){f=this._active.childNodes;for(c=f.length-1;0<=c;c--)b(f[c],"opacity",a)}for(c=this._passives.length-1;0<=c;c--){f=this._passives[c].childNodes;for(e=f.length-1;0<=e;e--)b(f[e],"opacity",a)}}else{f=this._div.childNodes;for(c=f.length-1;0<=c;c--)b(f[c],"opacity",a)}},setExclusionAreas:function(a){this.exclusionAreas=a;if(this.loaded&&this._map&&this._map.loaded){var b=this._map.spatialReference,c=this.tileInfo,d=c.origin,e=
1819c.lods,f=e[0].level,g=e[e.length-1].level,h,k,l,m,n,p,r,q,s;if(!this.exclusionAreas||!this.exclusionAreas.length)this._exclusionsPerZoom=null;else{this._exclusionsPerZoom=[];k=0;for(l=a.length;k<l;k++)if(h=a[k],(s=h.geometry)&&"extent"===s.type&&s.xmin<=s.xmax&&s.ymin<=s.ymax){if(!b.equals(s.spatialReference))if(b._canProject(s.spatialReference))b.isWebMercator()?(q=u.lngLatToXY(s.xmin,s.ymin),s=u.lngLatToXY(s.xmax,s.ymax)):(q=u.xyToLngLat(s.xmin,s.ymin,!0),s=u.xyToLngLat(s.xmax,s.ymax,!0)),s=new v(q[0],
1820q[1],s[0],s[1],b);else continue;r=-1;if(h.minZoom&&-1!==h.minZoom)r=h.minZoom;else if(h.minScale&&-1!==h.minScale){m=0;for(n=e.length;m<n;m++)if(e[m].scale<=h.minScale){r=e[m].level;break}}r=Math.max(r,f);q=-1;if(h.maxZoom&&-1!==h.maxZoom)q=h.maxZoom;else if(h.maxScale&&-1!==h.maxScale){m=0;for(n=e.length;m<n;m++)if(e[m].scale<h.maxScale){q=e[m-1].level;break}else if(e[m].scale===h.maxScale){q=e[m].level;break}}q=-1===q?g:Math.min(q,g);for(h=r;h<=q;h++){m=0;for(n=e.length;m<n;m++)if(e[m].level===
1821h){p=e[m];break}p&&(this._exclusionsPerZoom[h]||(this._exclusionsPerZoom[h]=[]),m=1/p.resolution/c.rows,n=1/p.resolution/c.cols,this._exclusionsPerZoom[h].push({rowFrom:Math.floor((d.y-s.ymax)*m),rowTo:Math.ceil((d.y-s.ymin)*m),colFrom:Math.floor((s.xmin-d.x)*n),colTo:Math.ceil((s.xmax-d.x)*n)}))}}}this.suspended||this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD)}},_isExcluded:function(a,b,c){var d,e,f;if(!this._exclusionsPerZoom)return!1;d=this._exclusionsPerZoom[a];if(!d)return!1;
1822e=0;for(f=d.length;e<f;e++)if(a=d[e],b>=a.rowFrom&&b<a.rowTo&&c>=a.colFrom&&c<a.colTo)return!0;return!1}});s("extend-esri")&&a.setObject("layers.TiledMapServiceLayer",p,m);return p})},"esri/layers/layer":function(){define("dojo/_base/declare dojo/_base/config dojo/_base/connect dojo/_base/lang dojo/_base/Deferred dojo/_base/json dojo/has ../Evented ../kernel ../lang ../request ../deferredUtils ../urlUtils ../SpatialReference ../geometry/Extent".split(" "),function(p,n,a,e,l,h,q,g,d,c,b,f,m,t,s){var k=
1823p([g],{declaredClass:"esri.layers.Layer",_eventMap:{error:["error"],load:["layer"],"opacity-change":["opacity"],"update-end":["error"],"visibility-change":["visible"]},constructor:function(b,d){this._attrs={};if(b&&e.isString(b))this._url=m.urlToObject(this.url=b);else if(this.url=this._url=null,(d=d||b)&&(d.layerDefinition||d.query))d=null;this.spatialReference=new t(4326);this.initialExtent=new s(-180,-90,180,90,new t(4326));this._map=this._div=null;this.normalization=!0;d&&(d.id&&(this.id=d.id),
1824!1===d.visible&&(this.visible=!1),c.isDefined(d.opacity)&&(this.opacity=d.opacity),c.isDefined(d.minScale)&&this.setMinScale(d.minScale),c.isDefined(d.maxScale)&&this.setMaxScale(d.maxScale),this.attributionDataUrl=d.attributionDataUrl||"",this.hasAttributionData=!!this.attributionDataUrl,c.isDefined(d.showAttribution)&&(this.showAttribution=d.showAttribution),this.className=d.className,this.refreshInterval=d.refreshInterval||0);this._errorHandler=e.hitch(this,this._errorHandler);this.refresh=e.hitch(this,
1825this.refresh);if(this.managedSuspension){var f=this._setMap;this._setMap=function(b){var c=f.apply(this,arguments);this.evaluateSuspension();if(this.suspended&&!b.loaded)var d=a.connect(b,"onLoad",this,function(){a.disconnect(d);d=null;this.evaluateSuspension()});return c}}this.registerConnectEvents()},id:null,visible:!0,opacity:1,loaded:!1,loadError:null,minScale:0,maxScale:0,visibleAtMapScale:!1,suspended:!0,attributionDataUrl:"",hasAttributionData:!1,showAttribution:!0,refreshInterval:0,_errorHandler:function(a){this.loaded||
1826(this.loadError=a);this.onError(a)},_setMap:function(b,c,d,e){this._map=b;this._lyrZEHandle=a.connect(b,"onZoomEnd",this,this._processMapScale);if(b.loaded)this.visibleAtMapScale=this._isMapAtVisibleScale();else var f=a.connect(b,"onLoad",this,function(){a.disconnect(f);f=null;this._processMapScale()})},_unsetMap:function(b,c){a.disconnect(this._lyrZEHandle);this._toggleRT();this._map=this._lyrZEHandle=null;this._resumedOnce=void 0;this.suspended=!0},_cleanUp:function(){this._map=this._div=null},
1827_fireUpdateStart:function(){this.updating||(this.updating=!0,this.attr("data-updating",""),this._toggleRT(),this.onUpdateStart(),this._map&&this._map._incr())},_fireUpdateEnd:function(a,b){this.updating&&(this.updating=!1,this.attr("data-updating"),this._toggleRT(!0),this.onUpdateEnd(a,b),this._map&&this._map._decr())},_getToken:function(){var a=this._url,b=this.credential;return a&&a.query&&a.query.token||b&&b.token||void 0},_findCredential:function(){this.credential=d.id&&this._url&&d.id.findCredential(this._url.path)},
1828_useSSL:function(){var a=this._url,b=/^http:/i;this.url&&(this.url=this.url.replace(b,"https:"));a&&a.path&&(a.path=a.path.replace(b,"https:"))},refresh:function(){},show:function(){this.setVisibility(!0)},hide:function(){this.setVisibility(!1)},setMinScale:function(a){this.setScaleRange(a)}
1828,setMaxScale:function(a){this.setScaleRange(null,a)},setScaleRange:function(a,b){var d=c.isDefined(a),e=c.isDefined(b);this.loaded||(this._hasMin=this._hasMin||d,this._hasMax=this._hasMax||e);var f=this.minScale,
1829g=this.maxScale;this.minScale=(d?a:this.minScale)||0;this.maxScale=(e?b:this.maxScale)||0;if(f!==this.minScale||g!==this.maxScale)this.onScaleRangeChange(),this._processMapScale()},suspend:function(){this._suspended=!0;this.evaluateSuspension()},resume:function(){this._suspended=!1;this.evaluateSuspension()},canResume:function(){return this.loaded&&this._map&&this._map.loaded&&this.visible&&this.visibleAtMapScale&&!this._suspended},evaluateSuspension:function(){this.canResume()?this.suspended&&this._resume():
1830this.suspended||this._suspend()},_suspend:function(){this.suspended=!0;this.attr("data-suspended","");this._toggleRT();this.onSuspend();if(this._map)this._map.onLayerSuspend(this)},_resume:function(){this.suspended=!1;this.attr("data-suspended");var a=void 0===this._resumedOnce,b=this.className,c=this._attrs,d=this.getNode(),e;if(a){this._resumedOnce=!0;if(b&&d){var f=d.getAttribute("class")||"";RegExp("(^|\\s)"+b+"(\\s|$)","i").test(f)||d.setAttribute("class",f+((f?" ":"")+b))}if(c&&d)for(e in c)c.hasOwnProperty(e)&&
1831d.setAttribute(e,c[e])}this._toggleRT(!0);this.onResume({firstOccurrence:a});if(this._map)this._map.onLayerResume(this)},_processMapScale:function(){var a=this.visibleAtMapScale;this.visibleAtMapScale=this._isMapAtVisibleScale();a!==this.visibleAtMapScale&&(this.onScaleVisibilityChange(),this.evaluateSuspension())},isVisibleAtScale:function(a){return a?k.prototype._isMapAtVisibleScale.apply(this,arguments):!1},_isMapAtVisibleScale:function(a,b){if(!a&&(!this._map||!this._map.loaded))return!1;var c=
1832this._map;a=a||c.getScale();var d=this.minScale,e=this.maxScale,f=!d,g=!e,h;b&&(h=c.width>c.height?c.width:c.height);f||(a<=d?f=!0:b&&(f=Math.abs(d-a)/d<1/h));g||(a>=e?g=!0:b&&(g=Math.abs(e-a)/e<1/h));return f&&g},getAttributionData:function(){var a=this.attributionDataUrl,c=new l(f._dfdCanceller);this.hasAttributionData&&a?(c._pendingDfd=b({url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}),c._pendingDfd.then(function(a){c.callback(a)},function(a){c.errback(a)})):(a=Error("Layer does not have attribution data"),
1833a.log=n.isDebug,c.errback(a));return c},getResourceInfo:function(){var a=this.resourceInfo;return e.isString(a)?h.fromJson(a):e.clone(a)},getMap:function(){return this._map},getNode:function(){return this._div},attr:function(a,b){var c=this.getNode();if("data-reference"===a&&11>q("ie"))return this;c&&(null==b?c.removeAttribute(a):c.setAttribute(a,b));this._attrs&&(null==b?delete this._attrs[a]:this._attrs[a]=b);return this},setRefreshInterval:function(a){var b=this.refreshInterval;this.refreshInterval=
1834a;this._toggleRT();a&&!this.updating&&!this.suspended&&this._toggleRT(!0);if(b!==a)this.onRefreshIntervalChange();return this},_toggleRT:function(a){a&&this.refreshInterval?(clearTimeout(this._refreshT),this._refreshT=setTimeout(this.refresh,6E4*this.refreshInterval)):this._refreshT&&(clearTimeout(this._refreshT),this._refreshT=null)},setNormalization:function(a){this.normalization=a},setVisibility:function(a){this.visible!==a&&(this.visible=a,this.onVisibilityChange(this.visible),this.evaluateSuspension());
1835this.attr("data-hidden",a?null:"")},onLoad:function(){},onVisibilityChange:function(){},onScaleRangeChange:function(){},onScaleVisibilityChange:function(){},onSuspend:function(){},onResume:function(){},onUpdate:function(){},onUpdateStart:function(){},onUpdateEnd:function(){},onRefreshIntervalChange:function(){},onError:function(){}});q("extend-esri")&&e.setObject("layers.Layer",k,d);return k})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],
1836function(p,n,a,e){return p("dijit.form._FormValueWidget",[a,e],{_layoutHackIE7:function(){if(7==n("ie"))for(var a=this.domNode,e=a.parentNode,p=a.firstChild||a,g=p.style.filter,d=this;e&&0==e.clientHeight;)(function(){var a=d.connect(e,"onscroll",function(){d.disconnect(a);p.style.filter=(new Date).getMilliseconds();d.defer(function(){p.style.filter=g})})})(),e=e.parentNode}})})},"esri/urlUtils":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/url dojo/io-query ./kernel ./config ./sniff dojo/i18n!./nls/jsapi".split(" "),
1837function(p,n,a,e,l,h,q,g){var d=new a(window.location.href.toLowerCase()),c={},b=h.defaults.io,f=window.location.protocol;"file:"===f&&(f="http:");c.urlToObject=function(b){var c={},d=new a(b),f=b.indexOf("?");null===d.query?c={path:b,query:null}
1837:(c.path=b.substring(0,f),c.query=e.queryToObject(d.query));d.fragment&&(c.hash=d.fragment,null===d.query&&(c.path=c.path.substring(0,c.path.length-(d.fragment.length+1))));return c};c.getProxyUrl=function(a,d){var e=p.isString(a)?0===p.trim(a).toLowerCase().indexOf("https:"):
1838a,f=b.proxyUrl,h,l,n=g.io.proxyNotSet;if(p.isString(a)&&(l=c.getProxyRule(a)))f=l.proxyUrl;if(!f)throw console.log(n),Error(n);e&&(!1!==d&&0!==window.location.href.toLowerCase().indexOf("https:"))&&(e=f,0!==e.toLowerCase().indexOf("http")&&(e=c.getAbsoluteUrl(e)),e=e.replace(/^http:/i,"https:"),c.canUseXhr(e)&&(f=e,h=1));f=c.urlToObject(f);f._xo=h;return f};c.addProxy=function(a){var d=c.getProxyRule(a),f;d?f=c.urlToObject(d.proxyUrl):b.alwaysUseProxy&&(f=c.getProxyUrl());f&&(d=c.urlToObject(a),a=
1839f.path+"?"+d.path,(f=e.objectToQuery(p.mixin(f.query||{},d.query)))&&(a+="?"+f));return a};c.addProxyRule=function(a){var d=a.urlPrefix=c.urlToObject(a.urlPrefix).path.replace(/([^\/])$/,"$1/").replace(/^https?:\/\//ig,"").toLowerCase(),e=b.proxyRules,f,g=e.length,h,l=g;for(f=0;f<g;f++)if(h=e[f].urlPrefix,0===d.indexOf(h)){if(d.length===h)return-1;l=f;break}else 0===h.indexOf(d)&&(l=f+1);e.splice(l,0,a);return l};c.getProxyRule=function(a){var d=b.proxyRules,e=d.length,f=c.urlToObject(a).path.replace(/([^\/])$/,
1840"$1/").replace(/^https?:\/\//ig,"").toLowerCase(),g;for(a=0;a<e;a++)if(0===f.indexOf(d[a].urlPrefix)){g=d[a];break}return g};c.hasSameOrigin=function(b,c,d){b=b.toLowerCase();c=c.toLowerCase();var e=window.location.href.toLowerCase();b=0===b.indexOf("http")?new a(b):e=new a(e);c=0===c.indexOf("http")?new a(c):p.isString(e)?new a(e):e;return(d||b.scheme===c.scheme)&&b.host===c.host&&b.port===c.port};c.canUseXhr=function(a,d){var e=q("esri-phonegap")?!0:!1,f=c.hasSameOrigin,g=b.corsEnabledServers,h,
1841l=-1;!e&&(q("esri-cors")&&g&&g.length)&&(e=n.some(g,function(b,c){var d=b&&"object"===typeof b?b.host:b;return d&&(h=0!==p.trim(d).toLowerCase().indexOf("http"),f(a,h?"http://"+d:d)||h&&f(a,"https://"+d))?(l=c,!0):!1}));return d?l:e};c.getAbsoluteUrl=function(a){return p.isString(a)&&!/^https?:\/\//i.test(a)?0===a.indexOf("//")?f+a:0===a.indexOf("/")?f+"//"+window.location.host+a:l._appBaseUrl+a:a};c.fixUrl=function(a){/^\/\//i.test(a)&&(a=f+a);return a=a.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")};
1842c.normalize=function(a){a=c._ensureProtocol(a);return a=c._ensureProperProtocolForAGOResource(a)};c._ensureProtocol=function(a){var b;if(!a)return a;/^\/\//i.test(a)&&(b=d.scheme,a=("file"===b?"https":b)+":"+a);return a};c._ensureProperProtocolForAGOResource=function(a){return"https"===d.scheme&&(/^http\:\/\/server\.arcgisonline\.com(?!:)/i.test(a)||/^http\:\/\/services\.arcgisonline\.com(?!:)/i.test(a)||/^http\:\/\/.+\.arcgis\.com(?!:)/i.test(a))?a.replace(/http:/i,"https:"):a};q("extend-esri")&&
1843(p.mixin(l,c),l._getProxyUrl=c.getProxyUrl,l._getProxiedUrl=c.addProxy,l._hasSameOrigin=c.hasSameOrigin,l._canDoXOXHR=c.canUseXhr,l._getAbsoluteUrl=c.getAbsoluteUrl,l.fixUrl=c.fixUrl);return c})},"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip" data-dojo-attach-event\x3d"mouseenter:onMouseEnter,mouseleave:onMouseLeave"\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
1844"url:dijit/templates/Dialog.html":'\x3cdiv class\x3d"dijitDialog" role\x3d"dialog" aria-labelledby\x3d"${id}_title"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"titleBar" class\x3d"dijitDialogTitleBar"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitDialogTitle" id\x3d"${id}_title"\r\n\t\t\t\trole\x3d"heading" level\x3d"1"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"closeButtonNode" class\x3d"dijitDialogCloseIcon" data-dojo-attach-event\x3d"ondijitclick: onCancel" title\x3d"${buttonCancel}" role\x3d"button" tabindex\x3d"-1"\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"closeText" class\x3d"closeText" title\x3d"${buttonCancel}"\x3ex\x3c/span\x3e\r\n\t\t\x3c/span\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitDialogPaneContent"\x3e\x3c/div\x3e\r\n\t${!actionBarTemplate}\r\n\x3c/div\x3e\r\n\r\n',
1845"url:dijit/form/templates/ComboButton.html":'\x3ctable class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tcellspacing\x3d\'0\' cellpadding\x3d\'0\' role\x3d"presentation"\r\n\t\x3e\x3ctbody role\x3d"presentation"\x3e\x3ctr role\x3d"presentation"\r\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitStretch dijitButtonNode" data-dojo-attach-point\x3d"buttonNode" data-dojo-attach-event\x3d"ondijitclick:__onClick,onkeydown:_onButtonKeyDown"\r\n\t\t\x3e\x3cdiv id\x3d"${id}_button" class\x3d"dijitReset dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"titleNode"\r\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInline dijitButtonText" id\x3d"${id}_label" data-dojo-attach-point\x3d"containerNode" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\x3e\x3c/div\r\n\t\t\x3e\x3c/td\r\n\t\t\x3e\x3ctd id\x3d"${id}_arrow" class\x3d\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\r\n\t\t\tdata-dojo-attach-point\x3d"_popupStateNode,focusNode,_buttonNode"\r\n\t\t\tdata-dojo-attach-event\x3d"onkeydown:_onArrowKeyDown"\r\n\t\t\ttitle\x3d"${optionsTitle}"\r\n\t\t\trole\x3d"button" aria-haspopup\x3d"true"\r\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitArrowButtonInner" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitArrowButtonChar" role\x3d"presentation"\x3e\x26#9660;\x3c/div\r\n\t\t\x3e\x3c/td\r\n\t\t\x3e\x3ctd style\x3d"display:none !important;"\r\n\t\t\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" data-dojo-attach-point\x3d"valueNode"\r\n\t\t\t\tclass\x3d"dijitOffScreen"\r\n\t\t\t\trole\x3d"presentation" aria-hidden\x3d"true"\r\n\t\t\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\t/\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/tbody\r\n\x3e\x3c/table\x3e\r\n',
1846"url:dijit/form/templates/DropDownButton.html":'\x3cspan class\x3d"dijit dijitReset dijitInline"\r\n\t\x3e\x3cspan class\x3d\'dijitReset dijitInline dijitButtonNode\'\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" data-dojo-attach-point\x3d"_buttonNode"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"focusNode,titleNode,_arrowWrapperNode,_popupStateNode"\r\n\t\t\trole\x3d"button" aria-haspopup\x3d"true" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon"\r\n\t\t\t\tdata-dojo-attach-point\x3d"iconNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonInner"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonChar"\x3e\x26#9660;\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen" tabIndex\x3d"-1"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\tdata-dojo-attach-point\x3d"valueNode" role\x3d"presentation" aria-hidden\x3d"true"\r\n/\x3e\x3c/span\x3e\r\n',
1847"url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\r\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\r\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\ttabIndex\x3d"-1" role\x3d"presentation" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\r\n/\x3e\x3c/span\x3e\r\n',
1848"url:dijit/templates/TooltipDialog.html":'\x3cdiv role\x3d"alertdialog" tabIndex\x3d"-1"\x3e\r\n\t\x3cdiv class\x3d"dijitTooltipContainer" role\x3d"presentation"\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"contentsNode" class\x3d"dijitTooltipContents dijitTooltipFocusNode"\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e\r\n\t\t\t${!actionBarTemplate}\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dijitTooltipConnector" role\x3d"presentation" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
1849"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
1850"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',"*now":function(p){p(['dojo/i18n!*preload*esri/nls/jsapi*["ar","az","ca","cs","da","de-de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ro","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},
1851"*noref":1}});
1852define("esri/jsapi","dojo/fx/Toggler dojo/_base/html dijit/_base dijit/form/DropDownButton dijit/form/ComboButton dijit/form/ToggleButton dijit/_base/manager dijit/TooltipDialog ./main ./map ./geometry ./symbol ./renderer ./utils ./IdentityManager ./layers/graphics ./layers/agstiled ./layers/agsdynamic ./layers/FeatureLayer ./dijit/PopupTemplate ./dijit/PopupRenderer ./dijit/Attribution ./arcgis/utils ./tasks/query ./tasks/QueryTask ./tasks/RelationshipQuery ./tasks/StatisticDefinition".split(" "),function(){return{}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.