// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.5/esri/copyright.txt for details.
//>>built
(function(b,h){var l,k=function(){},f=function(e){for(var a in e)return 0;return 1},n={}.toString,m=function(e){return"[object Function]"==n.call(e)},g=function(e){return"[object String]"==n.call(e)},d=function(e){return"[object Array]"==n.call(e)},a=function(e,a){if(e)for(var q=0;q<e.length;)a(e[q++])},c=function(e,a){for(var q in a)e[q]=a[q];return e},r=function(e,a){return c(Error(e),{src:"dojoLoader",info:a})},w=1,t=function(){return"_"+w++},x=function(e,a,q){return wa(e,a,q,0,x)},v=this,y=v.document,
p=y&&y.createElement("DiV"),e=x.has=function(e){return m(q[e])?q[e]=q[e](v,y,p):q[e]},q=e.cache=h.hasCache;e.add=function(a,c,p,d){(void 0===q[a]||d)&&(q[a]=c);return p&&e(a)};e.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);e("host-webworker")&&(c(h.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,"dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1,"dojo-guarantee-console":0}),h.loaderPatch={injectUrl:function(e,a){try{importScripts(e),a()}catch(fb){console.info("failed to load resource ("+
e+")"),console.error(fb)}}});for(var u in b.has)e.add(u,b.has[u],0,1);x.async=1;var z=e("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");x.eval=function(e,a){return z(e+"\r\n//# sourceURL\x3d"+a)};var C={},B=x.signal=function(e,q){e=C[e];a(e&&e.slice(0),function(e){e.apply(null,d(q)?q:[q])})},F=x.on=function(e,a){var q=C[e]||(C[e]=[]);q.push(a);return{remove:function(){for(var e=0;e<q.length;e++)if(q[e]===a){q.splice(e,1);break}}}},D=[],E={},I=[],J={},U=x.map={},P=[],H=
{},K="",G={},S={};u={};var O=0,da=function(e){var a,q,c,p;for(a in S)q=S[a],(c=a.match(/^url\:(.+)/))?G["url:"+$a(c[1],e)]=q:"*now"==a?p=q:"*noref"!=a&&(c=Ga(a,e,!0),G[c.mid]=G["url:"+c.url]=q);p&&p(pa(e));S={}},N=function(e){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(e){return"\\"+e})},M=function(e,a){a.splice(0,a.length);for(var q in e)a.push([q,e[q],new RegExp("^"+N(q)+"(/|$)"),q.length]);a.sort(function(e,a){return a[3]-e[3]});return a},ca=function(e,q){a(e,function(e){q.push([g(e[0])?
new RegExp("^"+N(e[0])+"$"):e[0],e[1]])})},W=function(e){var a=e.name;a||(a=e,e={name:a});e=c({main:"main"},e);e.location=e.location?e.location:a;e.packageMap&&(U[a]=e.packageMap);e.main.indexOf("./")||(e.main=e.main.substring(2));J[a]=e},X=[],ga=function(p,d,b){for(var u in p){"waitSeconds"==u&&(x.waitms=1E3*(p[u]||0));"cacheBust"==u&&(K=p[u]?g(p[u])?p[u]:(new Date).getTime()+"":"");if("baseUrl"==u||"combo"==u)x[u]=p[u];p[u]!==q&&(x.rawConfig[u]=p[u],"has"!=u&&e.add("config-"+u,p[u],0,d))}x.baseUrl||
(x.baseUrl="./");/\/$/.test(x.baseUrl)||(x.baseUrl+="/");for(u in p.has)e.add(u,p.has[u],0,d);a(p.packages,W);for(var r in p.packagePaths)a(p.packagePaths[r],function(e){var a=r+"/"+e;g(e)&&(e={name:e});e.location=a;W(e)});M(c(U,p.map),P);a(P,function(e){e[1]=M(e[1],[]);"*"==e[0]&&(P.star=e)});M(c(E,p.paths),I);ca(p.aliases,D);if(d)X.push({config:p.config});else for(u in p.config)d=Ea(u,b),d.config=c(d.config||{},p.config[u]);p.cache&&(da(),S=p.cache,p.cache["*noref"]&&da());B("config",[p,x.rawConfig])};
if(e("dojo-cdn")){var fa=y.getElementsByTagName("script");l=0;for(var T,ka,ja,ha;l<fa.length;)if(T=fa[l++],(ja=T.getAttribute("src"))&&(ha=ja.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(ka=ha[3]||"",h.baseUrl=h.baseUrl||ka,O=T),ja=T.getAttribute("data-dojo-config")||T.getAttribute("djConfig"))u=x.eval("({ "+ja+" })","data-dojo-config"),O=T}x.rawConfig={};ga(h,1);e("dojo-cdn")&&((J.dojo.location=ka)&&(ka+="/"),J.dijit.location=ka+"../dijit/",J.dojox.location=ka+"../dojox/");ga(b,1);ga(u,1);var sa=function(e){A(function(){a(e.deps,
nb)})},wa=function(e,a,q,p,u){var b;if(g(e)){if((b=Ea(e,p,!0))&&b.executed)return b.result;throw r("undefinedModule",e);}d(e)||(ga(e,0,p),e=a,a=q);if(d(e))if(e.length){q="require*"+t();for(var f,w=[],m=0;m<e.length;)f=e[m++],w.push(Ea(f,p));b=c(Fa("",q,0,""),{injected:2,deps:w,def:a||k,require:p?p.require:x,gc:1});H[b.mid]=b;sa(b);var n=la&&!0;A(function(){Q(b,n)});b.executed||ta.push(b);ea()}else a&&a();return u},pa=function(e){if(!e)return x;var a=e.require;a||(a=function(q,c,p){return wa(q,c,p,
e,a)},e.require=c(a,x),a.module=e,a.toUrl=function(a){return $a(a,e)},a.toAbsMid=function(a){return Pa(a,e)});return a},ta=[],Ba=[],oa={},hb=function(e){e.injected=1;oa[e.mid]=1;e.url&&(oa[e.url]=e.pack||1);sb()},Qa=function(e){e.injected=2;delete oa[e.mid];e.url&&delete oa[e.url];f(oa)&&Ua()},Ha=x.idle=function(){return!Ba.length&&f(oa)&&!ta.length&&!la},ua=function(e,a){if(a)for(var q=0;q<a.length;q++)if(a[q][2].test(e))return a[q];return 0},ya=function(e){var a=[],q,c;for(e=e.replace(/\\/g,"/").split("/");e.length;)q=
e.shift(),".."==q&&a.length&&".."!=c?(a.pop(),c=a[a.length-1]):"."!=q&&a.push(c=q);return a.join("/")},Fa=function(e,a,q,c){return{pid:e,mid:a,pack:q,url:c,executed:0,def:0}},ib=function(e,q,c,p,d,u,b,g,f){var w,t,k,n;n=/^\./.test(e);if(/(^\/)|(\:)|(\.js$)/.test(e)||n&&!q)return Fa(0,e,0,e);e=ya(n?q.mid+"/../"+e:e);if(/^\./.test(e))throw r("irrationalPath",e);q&&(k=ua(q.mid,u));(k=(k=k||u.star)&&ua(e,k[1]))&&(e=k[1]+e.substring(k[3]));q=(ha=e.match(/^([^\/]+)(\/(.+))?$/))?ha[1]:"";(w=c[q])?e=q+"/"+
(t=ha[3]||w.main):q="";var v=0;a(g,function(a){var q=e.match(a[0]);q&&0<q.length&&(v=m(a[1])?e.replace(a[0],a[1]):a[1])});if(v)return ib(v,0,c,p,d,u,b,g,f);if(c=p[e])return f?Fa(c.pid,c.mid,c.pack,c.url):p[e];p=(k=ua(e,b))?k[1]+e.substring(k[3]):q?w.location+"/"+t:e;/(^\/)|(\:)/.test(p)||(p=d+p);return Fa(q,e,w,ya(p+".js"))},Ga=function(e,a,q){return ib(e,a,J,H,x.baseUrl,q?[]:P,q?[]:I,q?[]:D)},Ia=function(e,a,q){return e.normalize?e.normalize(a,function(e){return Pa(e,q)}):Pa(a,q)},Da=0,Ea=function(e,
a,q){var c,p;(c=e.match(/^(.+?)\!(.*)$/))?(p=Ea(c[1],a,q),5!==p.executed||p.load||La(p),p.load?(c=Ia(p,c[2],a),e=p.mid+"!"+(p.dynamic?++Da+"!":"")+c):(c=c[2],e=p.mid+"!"+ ++Da+"!waitingForPlugin"),e={plugin:p,mid:e,req:pa(a),prid:c}):e=Ga(e,a);return H[e.mid]||!q&&(H[e.mid]=e)},Pa=x.toAbsMid=function(e,a){return Ga(e,a).mid},$a=x.toUrl=function(e,a){a=Ga(e+"/x",a);var q=a.url;return ia(0===a.pid?e:q.substring(0,q.length-5))},Ra={injected:2,executed:5,def:3,result:3};ka=function(e){return H[e]=c({mid:e},
Ra)};var Ma=ka("require"),R=ka("exports"),za=ka("module"),Va={},Z=0,La=function(e){var a=e.result;e.dynamic=a.dynamic;e.normalize=a.normalize;e.load=a.load;return e},Ja=function(e){var q={};a(e.loadQ,function(a){var p=Ia(e,a.prid,a.req.module),d=e.dynamic?a.mid.replace(/waitingForPlugin$/,p):e.mid+"!"+p,p=c(c({},a),{mid:d,prid:p,injected:0});H[d]&&H[d].injected||ma(H[d]=p);q[a.mid]=H[d];Qa(a);delete H[a.mid]});e.loadQ=0;var p=function(e){for(var a=e.deps||[],c=0;c<a.length;c++)(e=q[a[c].mid])&&(a[c]=
e)},d;for(d in H)p(H[d]);a(ta,p)},aa=function(e){x.trace("loader-finish-exec",[e.mid]);e.executed=5;e.defOrder=Z++;e.loadQ&&(La(e),Ja(e));for(l=0;l<ta.length;)ta[l]===e?ta.splice(l,1):l++;/^require\*/.test(e.mid)&&delete H[e.mid]},bb=[],Q=function(e,a){if(4===e.executed)return x.trace("loader-circular-dependency",[bb.concat(e.mid).join("-\x3e")]),!e.def||a?Va:e.cjs&&e.cjs.exports;if(!e.executed){if(!e.def)return Va;var q=e.mid,c=e.deps||[],p,d=[],u=0;for(e.executed=4;p=c[u++];){p=p===Ma?pa(e):p===
R?e.cjs.exports:p===za?e.cjs:Q(p,a);if(p===Va)return e.executed=0,x.trace("loader-exec-module",["abort",q]),Va;d.push(p)}x.trace("loader-run-factory",[e.mid]);a=e.def;d=m(a)?a.apply(null,d):a;e.result=void 0===d&&e.cjs?e.cjs.exports:d;aa(e)}return e.result},la=0,A=function(e){try{la++,e()}catch(kb){throw kb;}finally{la--}Ha()&&B("idle",[])},ea=function(){la||A(function(){for(var e,a,q=0;q<ta.length;)e=Z,a=ta[q],Q(a),e!=Z?q=0:q++})};void 0===e("dojo-loader-eval-hint-url")&&e.add("dojo-loader-eval-hint-url",
1);var ia="function"==typeof b.fixupUrl?b.fixupUrl:function(e){e+="";return e+(K?(/\?/.test(e)?"\x26":"?")+K:"")},ma=function(e){var a=e.plugin;5!==a.executed||a.load||La(a);var q=function(a){e.result=a;Qa(e);aa(e);ea()};a.load?a.load(e.prid,e.req,q):a.loadQ?a.loadQ.push(e):(a.loadQ=[e],ta.unshift(a),nb(a))},Y=0,ba=0,L=0,Wa=function(a,q){e("config-stripStrict")&&(a=a.replace(/(["'])use strict\1/g,""));L=1;a===Y?Y.call(null):x.eval(a,e("dojo-loader-eval-hint-url")?q.url:q.mid);L=0},nb=function(a){var q=
a.mid,p=a.url;if(!(a.executed||a.injected||oa[q]||a.url&&(a.pack&&oa[a.url]===a.pack||1==oa[a.url])))if(hb(a),a.plugin)ma(a);else{var d=function(){ub(a);if(2!==a.injected){if(e("dojo-enforceDefine")){B("error",r("noDefine",a));return}Qa(a);c(a,Ra);x.trace("loader-define-nonmodule",[a.url])}ea()};(Y=G[q]||G["url:"+a.url])?(x.trace("loader-inject",["cache",a.mid,p]),Wa(Y,a),d()):(x.trace("loader-inject",["script",a.mid,p]),ba=a,x.injectUrl(ia(p),d,a),ba=0)}},lb=function(e,a,q){x.trace("loader-define-module",
[e.mid,a]);if(2===e.injected)return B("error",r("multipleDefine",e)),e;c(e,{deps:a,def:q,cjs:{id:e.mid,uri:e.url,exports:e.result={},setExports:function(a){e.cjs.exports=a},config:function(){return e.config}}});for(var p=0;a[p];p++)a[p]=Ea(a[p],e);Qa(e);m(q)||a.length||(e.result=q,aa(e));return e},ub=function(e,q){for(var c=[],p,d;Ba.length;)d=Ba.shift(),q&&(d[0]=q.shift()),p=d[0]&&Ea(d[0])||e,c.push([p,d[1],d[2]]);da(e);a(c,function(e){sa(lb.apply(null,e))})},Ua=k,sb=k;e("dom")&&e.add("ie-event-behavior",
y.attachEvent&&"undefined"===typeof Windows&&("undefined"===typeof opera||"[object Opera]"!=opera.toString()));if(e("dom")){var cb=function(a,q,c,p){if(e("ie-event-behavior"))return a.attachEvent(c,p),function(){a.detachEvent(c,p)};a.addEventListener(q,p,!1);return function(){a.removeEventListener(q,p,!1)}},vb=cb(window,"load","onload",function(){x.pageLoaded=1;try{"complete"!=y.readyState&&(y.readyState="complete")}catch(Ob){}vb()}),fa=y.getElementsByTagName("script");for(l=0;!O;)/^dojo/.test((T=
fa[l++])&&T.type)||(O=T);x.injectUrl=function(e,a,q){q=q.node=y.createElement("script");var c=cb(q,"load","onreadystatechange",function(e){e=e||window.event;var q=e.target||e.srcElement;if("load"===e.type||/complete|loaded/.test(q.readyState))c(),p(),a&&a()}),p=cb(q,"error","onerror",function(a){c();p();B("error",r("scriptError",[e,a]))});q.type="text/javascript";q.charset="utf-8";q.src=e;O.parentNode.insertBefore(q,O);return q}}x.log=k;x.trace=k;T=function(a,q,c){var p=arguments.length,d=["require",
"exports","module"],u=[0,a,q];1==p?u=[0,m(a)?d:[],a]:2==p&&g(a)?u=[a,m(q)?d:[],q]:3==p&&(u=[a,q,c]);x.trace("loader-define",u.slice(0,2));if((p=u[0]&&Ea(u[0]))&&!oa[p.mid])sa(lb(p,u[1],u[2]));else if(e("ie-event-behavior")&&e("host-browser")&&!L){p=p||ba;if(!p)for(a in oa)if((d=H[a])&&d.node&&"interactive"===d.node.readyState){p=d;break}p?(da(p),sa(lb(p,u[1],u[2]))):B("error",r("ieDefineFailed",u[0]));ea()}else Ba.push(u)};T.amd={vendor:"dojotoolkit.org"};c(c(x,h.loaderPatch),b.loaderPatch);F("error",
function(e){try{if(console.error(e),e instanceof Error){for(var a in e)console.log(a+":",e[a]);console.log(".")}}catch(fb){}});c(x,{uid:t,cache:G,packs:J});v.define||(v.define=T,v.require=x,a(X,function(e){ga(e)}),F=u.deps||b.deps||h.deps,b=u.callback||b.callback||h.callback,x.boot=F||b?[F||[],b]:0)})(this.dojoConfig||this.djConfig||this.require||{},{aliases:[[/^webgl-engine/,function(){return"esri/views/3d/webgl-engine"}],[/^engine/,function(){return"esri/views/3d/webgl-engine"}],[/^esri-hydra/,
function(){return"esri"}]],async:1,baseUrl:"https://js.arcgis.com/4.5/dojo",hasCache:{"config-deferredInstrumentation":0,"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-has-api":1,"dojo-loader":1,"dojo-undef-api":0,dom:1,"host-browser":1},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../esri",
name:"esri"},{location:"../moment",main:"moment",name:"moment"}]});
require({cache:{"dojo/domReady":function(){define(["./has"],function(b){function h(a){d.push(a);g&&l()}function l(){if(!a){for(a=!0;d.length;)try{d.shift()(f)}catch(v){console.error(v,"in domReady callback",v.stack)}a=!1;h._onQEmpty()}}var k=function(){return this}(),f=document,n={loaded:1,complete:1},m="string"!=typeof f.readyState,g=!!n[f.readyState],d=[],a;h.load=function(a,c,p){h(p)};h._Q=d;h._onQEmpty=function(){};m&&(f.readyState="loading");if(!g){var c=[],r=function(a){a=a||k.event;g||"readystatechange"==
a.type&&!n[f.readyState]||(m&&(f.readyState="complete"),g=1,l())},w=function(a,c){a.addEventListener(c,r,!1);d.push(function(){a.removeEventListener(c,r,!1)})};if(!b("dom-addeventlistener")){var w=function(a,c){c="on"+c;a.attachEvent(c,r);d.push(function(){a.detachEvent(c,r)})},t=f.createElement("div");try{t.doScroll&&null===k.frameElement&&c.push(function(){try{return t.doScroll("left"),1}catch(v){}})}catch(v){}}w(f,"DOMContentLoaded");w(k,"load");"onreadystatechange"in f?w(f,"readystatechange"):
m||c.push(function(){return n[f.readyState]});if(c.length){var x=function(){if(!g){for(var a=c.length;a--;)if(c[a]()){r("poller");return}setTimeout(x,30)}};x()}}return h})},"dojo/has":function(){define(["require","module"],function(b,h){var l=b.has||function(){};if(!l("dojo-has-api")){b="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document;var k=function(){return this}(),f=b&&document,n=f&&f.createElement("DiV"),
m=h.config&&h.config()||{},l=function(b){return"function"==typeof m[b]?m[b]=m[b](k,f,n):m[b]};l.cache=m;l.add=function(b,d,a,c){("undefined"==typeof m[b]||c)&&(m[b]=d);return a&&l(b)};l.add("host-browser",b);l.add("dom",b)}l("host-browser")&&(l.add("dom-addeventlistener",!!document.addEventListener),l.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),l.add("touch-events","ontouchstart"in document),l.add("pointer-events",
"pointerEnabled"in window.navigator?window.navigator.pointerEnabled:"PointerEvent"in window),l.add("MSPointer",window.navigator.msPointerEnabled),l.add("touch-action",l("touch")&&l("pointer-events")),l.add("device-width",screen.availWidth||innerWidth),h=document.createElement("form"),l.add("dom-attributes-explicit",0==h.attributes.length),l.add("dom-attributes-specified-flag",0<h.attributes.length&&40>h.attributes.length));l.clearElement=function(b){b.innerHTML="";return b};l.normalize=function(b,
d){var a=b.match(/[\?:]|[^:\?]*/g),c=0,g=function(d){var b=a[c++];if(":"==b)return 0;if("?"==a[c++]){if(!d&&l(b))return g();g(!0);return g(d)}return b||0};return(b=g())&&d(b)};l.load=function(b,d,a){b?d([b],a):a()};return l})},"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/ready":function(){define(["./_base/kernel",
"./has","require","./has!host-browser?./domReady","./_base/lang"],function(b,h,l,k,f){var n=0,m=[],g=0;h=function(){n=1;b._postLoad=b.config.afterOnLoad=!0;d()};var d=function(){if(!g){for(g=1;n&&(!k||0==k._Q.length)&&(l.idle?l.idle():1)&&m.length;){var a=m.shift();try{a()}catch(w){if(w.info=w.message,l.signal)l.signal("error",w);else throw w;}}g=0}};l.on&&l.on("idle",d);k&&(k._onQEmpty=d);var a=b.ready=b.addOnLoad=function(a,c,g){var r=f._toArray(arguments);"number"!=typeof a?(g=c,c=a,a=1E3):r.shift();
g=g?f.hitch.apply(b,r):function(){c()};g.priority=a;for(r=0;r<m.length&&a>=m[r].priority;r++);m.splice(r,0,g);d()},c=b.config.addOnLoad;if(c)a[f.isArray(c)?"apply":"call"](b,c);k?k(h):h();return a})},"dojo/_base/kernel":function(){define(["../has","./config","require","module"],function(b,h,l,k){var f,n=function(){return this}(),m={},g={},d={config:h,global:n,dijit:m,dojox:g},m={dojo:["dojo",d],dijit:["dijit",m],dojox:["dojox",g]};k=l.map&&l.map[k.id.match(/[^\/]+/)[0]];for(f in k)m[f]?m[f][0]=k[f]:
m[f]=[k[f],{}];for(f in m)k=m[f],k[1]._scopeName=k[0],h.noGlobals||(n[k[0]]=k[1]);d.scopeMap=m;d.baseUrl=d.config.baseUrl=l.baseUrl;d.isAsync=l.async;d.locale=h.locale;h="$Rev: 594ed6f $".match(/[0-9a-f]{7,}/);d.version={major:1,minor:12,patch:2,flag:"",revision:h?h[0]:NaN,toString:function(){var a=d.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+")"}};b("csp-restrictions")||Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(d);
d.exit=function(){};b("host-webworker");b.add("console-as-object",function(){return Function.prototype.bind&&console&&"object"===typeof console.log});"undefined"!=typeof console||(console={});l="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var a;for(h=0;a=l[h++];)console[a]?b("console-as-object")&&(console[a]=Function.prototype.bind.call(console[a],console)):function(){var c=a+"";console[c]="log"in console?function(){var a=Array.prototype.slice.call(arguments);
a.unshift(c+":");console.log(a.join(" "))}:function(){};console[c]._fake=!0}();d.deprecated=d.experimental=function(){};d._hasResource={};return d})},"dojo/_base/config":function(){define(["../has","require"],function(b,h){b={};h=h.rawConfig;for(var l in h)b[l]=h[l];!b.locale&&"undefined"!=typeof navigator&&(l=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage)&&(b.locale=l.toLowerCase());return b})},"dojo/_base/lang":function(){define(["./kernel",
"../has","../sniff"],function(b,h){h.add("bug-for-in-skips-shadowed",function(){for(var a in{toString:1})return 0;return 1});var l=h("bug-for-in-skips-shadowed")?"hasOwnProperty valueOf isPrototypeOf propertyIsEnumerable toLocaleString toString constructor".split(" "):[],k=l.length,f=function(a,c,d){d||(d=a[0]&&b.scopeMap[a[0]]?b.scopeMap[a.shift()][1]:b.global);try{for(var g=0;g<a.length;g++){var r=a[g];if(!(r in d))if(c)d[r]={};else return;d=d[r]}return d}catch(x){}},n=Object.prototype.toString,
m=function(a,c,d){return(d||[]).concat(Array.prototype.slice.call(a,c||0))},g=/\{([^\}]+)\}/g,d={_extraNames:l,_mixin:function(a,c,d){var b,g,r,f={};for(b in c)g=c[b],b in a&&(a[b]===g||b in f&&f[b]===g)||(a[b]=d?d(g):g);if(h("bug-for-in-skips-shadowed")&&c)for(r=0;r<k;++r)b=l[r],g=c[b],b in a&&(a[b]===g||b in f&&f[b]===g)||(a[b]=d?d(g):g);return a},mixin:function(a,c){a||(a={});for(var b=1,g=arguments.length;b<g;b++)d._mixin(a,arguments[b]);return a},setObject:function(a,c,d){var b=a.split(".");
a=b.pop();return(d=f(b,!0,d))&&a?d[a]=c:void 0},getObject:function(a,c,d){return a?f(a.split("."),c,d):d},exists:function(a,c){return void 0!==d.getObject(a,!1,c)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:Array.isArray||function(a){return"[object Array]"==n.call(a)},isFunction:function(a){return"[object Function]"===n.call(a)},isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||d.isArray(a)||d.isFunction(a))},isArrayLike:function(a){return!!a&&
!d.isString(a)&&!d.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(d.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!d.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))},extend:function(a,c){for(var b=1,g=arguments.length;b<g;b++)d._mixin(a.prototype,arguments[b]);return a},_hitchArgs:function(a,c){var g=d._toArray(arguments,2),f=d.isString(c);return function(){var r=d._toArray(arguments),w=f?(a||b.global)[c]:c;return w&&w.apply(a||this,g.concat(r))}},hitch:function(a,
c){if(2<arguments.length)return d._hitchArgs.apply(b,arguments);c||(c=a,a=null);if(d.isString(c)){a=a||b.global;if(!a[c])throw['lang.hitch: scope["',c,'"] is null (scope\x3d"',a,'")'].join("");return function(){return a[c].apply(a,arguments||[])}}return a?function(){return c.apply(a,arguments||[])}:c},delegate:function(){function a(){}return function(c,b){a.prototype=c;c=new a;a.prototype=null;b&&d._mixin(c,b);return c}}(),_toArray:h("ie")?function(){function a(a,d,b){b=b||[];for(d=d||0;d<a.length;d++)b.push(a[d]);
return b}return function(c){return(c.item?a:m).apply(this,arguments)}}():m,partial:function(a){return d.hitch.apply(b,[null].concat(d._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||d.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 new RegExp(a);var c,b,g;if(d.isArray(a))for(c=[],b=0,g=a.length;b<g;++b)b in a&&(c[b]=d.clone(a[b]));else c=a.constructor?new a.constructor:
{};return d._mixin(c,a,d.clone)},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(a,c,b){return a.replace(b||g,d.isFunction(c)?c:function(a,b){return d.getObject(b,!1,c)})}};d.mixin(b,d);return d})},"dojo/sniff":function(){define(["./has"],function(b){if(b("host-browser")){var h=navigator,l=h.userAgent,h=h.appVersion,k=parseFloat(h);b.add("air",0<=l.indexOf("AdobeAIR"));b.add("wp",parseFloat(l.split("Windows Phone")[1])||
void 0);b.add("msapp",parseFloat(l.split("MSAppHost/")[1])||void 0);b.add("khtml",0<=h.indexOf("Konqueror")?k:void 0);b.add("edge",parseFloat(l.split("Edge/")[1])||void 0);b.add("opr",parseFloat(l.split("OPR/")[1])||void 0);b.add("webkit",!b("wp")&&!b("edge")&&parseFloat(l.split("WebKit/")[1])||void 0);b.add("chrome",!b("edge")&&!b("opr")&&parseFloat(l.split("Chrome/")[1])||void 0);b.add("android",!b("wp")&&parseFloat(l.split("Android ")[1])||void 0);b.add("safari",!(0<=h.indexOf("Safari"))||b("wp")||
b("chrome")||b("android")||b("edge")||b("opr")?void 0:parseFloat(h.split("Version/")[1]));b.add("mac",0<=h.indexOf("Macintosh"));b.add("quirks","BackCompat"==document.compatMode);if(!b("wp")&&l.match(/(iPhone|iPod|iPad)/)){var f=RegExp.$1.replace(/P/,"p"),n=l.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(n.replace(/_/,".").replace(/_/g,""));b.add(f,n);b.add("ios",n)}b.add("bb",(0<=l.indexOf("BlackBerry")||0<=l.indexOf("BB10"))&&parseFloat(l.split("Version/")[1])||void 0);b.add("trident",parseFloat(h.split("Trident/")[1])||
void 0);b.add("svg","undefined"!==typeof SVGAngle);b("webkit")||(0<=l.indexOf("Opera")&&b.add("opera",9.8<=k?parseFloat(l.split("Version/")[1])||k:k),!(0<=l.indexOf("Gecko"))||b("wp")||b("khtml")||b("trident")||b("edge")||b.add("mozilla",k),b("mozilla")&&b.add("ff",parseFloat(l.split("Firefox/")[1]||l.split("Minefield/")[1])||void 0),document.all&&!b("opera")&&(l=parseFloat(h.split("MSIE ")[1])||void 0,(h=document.documentMode)&&5!=h&&Math.floor(l)!=h&&(l=h),b.add("ie",l)),b.add("wii","undefined"!=
typeof opera&&opera.wiiremote))}return b})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),function(b,h,l,k,f,n,m,g){function d(a,c,p,e,q){e=g.hitch(p,e);if(!a||!a.addEventListener&&!a.attachEvent)return k.after(a||b.global,c,e,!0);"string"==typeof c&&"on"==c.substring(0,2)&&(c=c.substring(2));a||(a=b.global);if(!q)switch(c){case "keypress":c=t;break;case "mouseenter":c=n.enter;break;case "mouseleave":c=n.leave}return h(a,
c,e,q)}function a(a){a.keyChar=a.charCode?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode}m.add("events-keypress-typed",function(){var a={charCode:0};try{a=document.createEvent("KeyboardEvent"),(a.initKeyboardEvent||a.initKeyEvent).call(a,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(y){}return 0==a.charCode&&!m("opera")});var c={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},r=m("mac")?"metaKey":"ctrlKey",w=function(c,d){d=
g.mixin({},c,d);a(d);d.preventDefault=function(){c.preventDefault()};d.stopPropagation=function(){c.stopPropagation()};return d},t;t=m("events-keypress-typed")?function(a,d){var p=h(a,"keydown",function(e){var a=e.keyCode,q=13!=a&&32!=a&&(27!=a||!m("ie"))&&(48>a||90<a)&&(96>a||111<a)&&(186>a||192<a)&&(219>a||222<a)&&229!=a;if(q||e.ctrlKey){q=q?0:a;if(e.ctrlKey){if(3==a||13==a)return d.call(e.currentTarget,e);q=95<q&&106>q?q-48:!e.shiftKey&&65<=q&&90>=q?q+32:c[q]||q}a=w(e,{type:"keypress",faux:!0,
charCode:q});d.call(e.currentTarget,a);if(m("ie"))try{e.keyCode=a.keyCode}catch(C){}}}),e=h(a,"keypress",function(e){var a=e.charCode;e=w(e,{charCode:32<=a?a:0,faux:!0});return d.call(this,e)});return{remove:function(){p.remove();e.remove()}}}:m("opera")?function(a,c){return h(a,"keypress",function(a){var e=a.which;3==e&&(e=99);e=32>e&&!a.shiftKey?0:e;a.ctrlKey&&!a.shiftKey&&65<=e&&90>=e&&(e+=32);return c.call(this,w(a,{charCode:e}))})}:function(c,d){return h(c,"keypress",function(c){a(c);return d.call(this,
c)})};var x={_keypress:t,connect:function(a,c,p,e,q){var b=arguments,g=[],r=0;g.push("string"==typeof b[0]?null:b[r++],b[r++]);var f=b[r+1];g.push("string"==typeof f||"function"==typeof f?b[r++]:null,b[r++]);for(f=b.length;r<f;r++)g.push(b[r]);return d.apply(this,g)},disconnect:function(a){a&&a.remove()},subscribe:function(a,c,p){return l.subscribe(a,g.hitch(c,p))},publish:function(a,c){return l.publish.apply(l,[a].concat(c))},connectPublisher:function(a,c,p){var e=function(){x.publish(a,arguments)};
return p?x.connect(c,p,e):x.connect(c,e)},isCopyKey:function(a){return a[r]}};x.unsubscribe=x.disconnect;g.mixin(b,x);return x})},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect","./_base/kernel","./sniff"],function(b,h,l){function k(e,a,q,c,b){if(c=a.match(/(.*):(.*)/))return a=c[2],c=c[1],g.selector(c,a).call(b,e,q);l("touch")&&(d.test(a)&&(q=C(q)),l("event-orientationchange")||"orientationchange"!=a||(a="resize",e=window,q=C(q)));t&&(q=t(q));if(e.addEventListener){var u=a in
r,f=u?r[a]:a;e.addEventListener(f,q,u);return{remove:function(){e.removeEventListener(f,q,u)}}}if(p&&e.attachEvent)return p(e,"on"+a,q);throw Error("Target must be an event emitter");}function f(){this.cancelable=!1;this.defaultPrevented=!0}function n(){this.bubbles=!1}if(l("dom")){var m=window.ScriptEngineMajorVersion;l.add("jscript",m&&m()+ScriptEngineMinorVersion()/10);l.add("event-orientationchange",l("touch")&&!l("android"));l.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&
!!window.Event.prototype.stopImmediatePropagation);l.add("event-focusin",function(e,a,q){return"onfocusin"in q});l("touch")&&l.add("touch-can-modify-event-delegate",function(){var e=function(){};e.prototype=document.createEvent("MouseEvents");try{var a=new e;a.target=null;return null===a.target}catch(D){return!1}})}var g=function(e,a,q,c){return"function"!=typeof e.on||"function"==typeof a||e.nodeType?g.parse(e,a,q,k,c,this):e.on(a,q)};g.pausable=function(e,a,q,c){var p;e=g(e,a,function(){if(!p)return q.apply(this,
arguments)},c);e.pause=function(){p=!0};e.resume=function(){p=!1};return e};g.once=function(e,a,q,c){var p=g(e,a,function(){p.remove();return q.apply(this,arguments)});return p};g.parse=function(e,a,q,c,p,d){var b;if(a.call)return a.call(d,e,q);a instanceof Array?b=a:-1<a.indexOf(",")&&(b=a.split(/\s*,\s*/));if(b){var u=[];a=0;for(var r;r=b[a++];)u.push(g.parse(e,r,q,c,p,d));u.remove=function(){for(var e=0;e<u.length;e++)u[e].remove()};return u}return c(e,a,q,p,d)};var d=/^touch/;g.matches=function(e,
a,q,c,p){p=p&&"function"==typeof p.matches?p:h.query;c=!1!==c;1!=e.nodeType&&(e=e.parentNode);for(;!p.matches(e,a,q);)if(e==q||!1===c||!(e=e.parentNode)||1!=e.nodeType)return!1;return e};g.selector=function(e,a,q){return function(c,p){function d(a){return g.matches(a,e,c,q,b)}var b="function"==typeof e?{matches:e}:this,u=a.bubble;return u?g(c,u(d),p):g(c,a,function(e){var a=d(e.target);if(a)return e.selectorTarget=a,p.call(a,e)})}};var a=[].slice,c=g.emit=function(e,q,c){var p=a.call(arguments,2),
d="on"+q;if("parentNode"in e){var b=p[0]={},g;for(g in c)b[g]=c[g];b.preventDefault=f;b.stopPropagation=n;b.target=e;b.type=q;c=b}do e[d]&&e[d].apply(e,p);while(c&&c.bubbles&&(e=e.parentNode));return c&&c.cancelable&&c},r=l("event-focusin")?{}:{focusin:"focus",focusout:"blur"};if(!l("event-stopimmediatepropagation"))var w=function(){this.modified=this.immediatelyStopped=!0},t=function(e){return function(a){if(!a.immediatelyStopped)return a.stopImmediatePropagation=w,e.apply(this,arguments)}};if(l("dom-addeventlistener"))g.emit=
function(e,a,q){if(e.dispatchEvent&&document.createEvent){var p=(e.ownerDocument||document).createEvent("HTMLEvents");p.initEvent(a,!!q.bubbles,!!q.cancelable);for(var d in q)d in p||(p[d]=q[d]);return e.dispatchEvent(p)&&p}return c.apply(g,arguments)};else{g._fixEvent=function(a,c){a||(a=(c&&(c.ownerDocument||c.document||c).parentWindow||window).event);if(!a)return a;try{x&&a.type==x.type&&a.srcElement==x.target&&(a=x)}catch(D){}if(!a.target)switch(a.target=a.srcElement,a.currentTarget=c||a.srcElement,
"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=e,a.preventDefault=q),a.type){case "keypress":c="charCode"in a?a.charCode:a.keyCode,10==c?(c=0,a.keyCode=13):13==c||27==c?c=0:3==c&&(c=99),a.charCode=c,c=a,c.keyChar=c.charCode?String.fromCharCode(c.charCode):"",c.charOrCode=c.keyChar||c.keyCode}return a};var x,v=function(e){this.handle=e};v.prototype.remove=function(){delete _dojoIEListeners_[this.handle]};
var y=function(e){return function(a){a=g._fixEvent(a,this);var q=e.call(this,a);a.modified&&(x||setTimeout(function(){x=null}),x=a);return q}},p=function(e,a,q){q=y(q);if(((e.ownerDocument?e.ownerDocument.parentWindow:e.parentWindow||e.window||window)!=top||5.8>l("jscript"))&&!l("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var c=e[a];if(!c||!c.listeners){var p=c,c=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);}}");
c.listeners=[];e[a]=c;c.global=this;p&&c.listeners.push(_dojoIEListeners_.push(p)-1)}c.listeners.push(e=c.global._dojoIEListeners_.push(q)-1);return new v(e)}return b.after(e,a,q,!0)},e=function(){this.cancelBubble=!0},q=g._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(B){}this.defaultPrevented=!0;this.returnValue=!1;this.modified=!0}}if(l("touch"))var u=function(){},z=window.orientation,C=function(e){return function(a){var q=a.corrected;if(!q){var c=
a.type;try{delete a.type}catch(U){}if(a.type){if(l("touch-can-modify-event-delegate"))u.prototype=a,q=new u;else{var q={},p;for(p in a)q[p]=a[p]}q.preventDefault=function(){a.preventDefault()};q.stopPropagation=function(){a.stopPropagation()}}else q=a,q.type=c;a.corrected=q;if("resize"==c){if(z==window.orientation)return null;z=window.orientation;q.type="orientationchange";return e.call(this,q)}"rotation"in q||(q.rotation=0,q.scale=1);if(window.TouchEvent&&a instanceof TouchEvent){var c=q.changedTouches[0],
d;for(d in c)delete q[d],q[d]=c[d]}}return e.call(this,q)}};return g})},"dojo/topic":function(){define(["./Evented"],function(b){var h=new b;return{publish:function(b,k){return h.emit.apply(h,arguments)},subscribe:function(b,k){return h.on.apply(h,arguments)}}})},"dojo/Evented":function(){define(["./aspect","./on"],function(b,h){function l(){}var k=b.after;l.prototype={on:function(b,n){return h.parse(this,b,n,function(b,g){return k(b,"on"+g,n,!0)})},emit:function(b,k){var f=[this];f.push.apply(f,
arguments);return h.emit.apply(h,f)}};return l})},"dojo/aspect":function(){define([],function(){function b(b,g,d,a){var c=b[g],r="around"==g,f;if(r){var k=d(function(){return c.advice(this,arguments)});f={remove:function(){k&&(k=b=d=null)},advice:function(a,d){return k?k.apply(a,d):c.advice(a,d)}}}else f={remove:function(){if(f.advice){var a=f.previous,c=f.next;c||a?(a?a.next=c:b[g]=c,c&&(c.previous=a)):delete b[g];b=d=f.advice=null}},id:b.nextId++,advice:d,receiveArguments:a};if(c&&!r)if("after"==
g){for(;c.next&&(c=c.next););c.next=f;f.previous=c}else"before"==g&&(b[g]=f,f.next=c,c.previous=f);else b[g]=f;return f}function h(f){return function(g,d,a,c){var r=g[d],k;r&&r.target==g||(g[d]=k=function(){for(var a=k.nextId,c=arguments,d=k.before;d;)d.advice&&(c=d.advice.apply(this,c)||c),d=d.next;if(k.around)var b=k.around.advice(this,c);for(d=k.after;d&&d.id<a;){if(d.advice)if(d.receiveArguments)var p=d.advice.apply(this,c),b=p===l?b:p;else b=d.advice.call(this,b,c);d=d.next}return b},r&&(k.around=
{advice:function(a,c){return r.apply(a,c)}}),k.target=g,k.nextId=k.nextId||0);g=b(k||r,f,a,c);a=null;return g}}var l,k=h("after"),f=h("before"),n=h("around");return{before:f,around:n,after:k}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(b,h,l,k){if(h._fixEvent){var f=h._fixEvent;h._fixEvent=function(b,g){(b=f(b,g))&&k.normalizeEvent(b);return b}}var n={fix:function(b,g){return h._fixEvent?h._fixEvent(b,g):b},stop:function(b){l("dom-addeventlistener")||
b&&b.preventDefault?(b.preventDefault(),b.stopPropagation()):(b=b||window.event,b.cancelBubble=!0,h._preventDefault.call(b))}};b.fixEvent=n.fix;b.stopEvent=n.stop;return n})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(b,h,l,k){function f(a,c,d,b,g,f){f=f||"px";a=a.style;isNaN(c)||(a.left=c+f);isNaN(d)||(a.top=d+f);0<=b&&(a.width=b+f);0<=g&&(a.height=g+f)}function n(a){return"button"==a.tagName.toLowerCase()||"input"==a.tagName.toLowerCase()&&
"button"==(a.getAttribute("type")||"").toLowerCase()}function m(a){return"border-box"==g.boxModel||"table"==a.tagName.toLowerCase()||n(a)}var g={boxModel:"content-box"};b("ie")&&(g.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");g.getPadExtents=function(a,c){a=l.byId(a);var d=c||k.getComputedStyle(a),b=k.toPixelValue;c=b(a,d.paddingLeft);var g=b(a,d.paddingTop),f=b(a,d.paddingRight);a=b(a,d.paddingBottom);return{l:c,t:g,r:f,b:a,w:c+f,h:g+a}};g.getBorderExtents=function(a,c){a=
l.byId(a);var d=k.toPixelValue,b=c||k.getComputedStyle(a);c="none"!=b.borderLeftStyle?d(a,b.borderLeftWidth):0;var g="none"!=b.borderTopStyle?d(a,b.borderTopWidth):0,f="none"!=b.borderRightStyle?d(a,b.borderRightWidth):0;a="none"!=b.borderBottomStyle?d(a,b.borderBottomWidth):0;return{l:c,t:g,r:f,b:a,w:c+f,h:g+a}};g.getPadBorderExtents=function(a,c){a=l.byId(a);var d=c||k.getComputedStyle(a);c=g.getPadExtents(a,d);a=g.getBorderExtents(a,d);return{l:c.l+a.l,t:c.t+a.t,r:c.r+a.r,b:c.b+a.b,w:c.w+a.w,h:c.h+
a.h}};g.getMarginExtents=function(a,c){a=l.byId(a);var d=c||k.getComputedStyle(a),b=k.toPixelValue;c=b(a,d.marginLeft);var g=b(a,d.marginTop),f=b(a,d.marginRight);a=b(a,d.marginBottom);return{l:c,t:g,r:f,b:a,w:c+f,h:g+a}};g.getMarginBox=function(a,c){a=l.byId(a);c=c||k.getComputedStyle(a);c=g.getMarginExtents(a,c);var d=a.offsetLeft-c.l,f=a.offsetTop-c.t,n=a.parentNode,m=k.toPixelValue;8==b("ie")&&!b("quirks")&&n&&(n=k.getComputedStyle(n),d-="none"!=n.borderLeftStyle?m(a,n.borderLeftWidth):0,f-="none"!=
n.borderTopStyle?m(a,n.borderTopWidth):0);return{l:d,t:f,w:a.offsetWidth+c.w,h:a.offsetHeight+c.h}};g.getContentBox=function(a,c){a=l.byId(a);var d=c||k.getComputedStyle(a);c=a.clientWidth;var f,n=g.getPadExtents(a,d);f=g.getBorderExtents(a,d);var d=a.offsetLeft+n.l+f.l,m=a.offsetTop+n.t+f.t;c?f=a.clientHeight:(c=a.offsetWidth-f.w,f=a.offsetHeight-f.h);if(8==b("ie")&&!b("quirks")){var v=a.parentNode,h=k.toPixelValue;v&&(v=k.getComputedStyle(v),d-="none"!=v.borderLeftStyle?h(a,v.borderLeftWidth):0,
m-="none"!=v.borderTopStyle?h(a,v.borderTopWidth):0)}return{l:d,t:m,w:c-n.w,h:f-n.h}};g.setContentSize=function(a,c,d){a=l.byId(a);var b=c.w;c=c.h;m(a)&&(d=g.getPadBorderExtents(a,d),0<=b&&(b+=d.w),0<=c&&(c+=d.h));f(a,NaN,NaN,b,c)};var d={l:0,t:0,w:0,h:0};g.setMarginBox=function(a,c,r){a=l.byId(a);var w=r||k.getComputedStyle(a);r=c.w;var t=c.h,h=m(a)?d:g.getPadBorderExtents(a,w),w=g.getMarginExtents(a,w);if(b("webkit")&&n(a)){var v=a.style;0<=r&&!v.width&&(v.width="4px");0<=t&&!v.height&&(v.height=
"4px")}0<=r&&(r=Math.max(r-h.w-w.w,0));0<=t&&(t=Math.max(t-h.h-w.h,0));f(a,c.l,c.t,r,t)};g.isBodyLtr=function(a){a=a||h.doc;return"ltr"==(h.body(a).dir||a.documentElement.dir||"ltr").toLowerCase()};g.docScroll=function(a){a=a||h.doc;var c=h.doc.parentWindow||h.doc.defaultView;return"pageXOffset"in c?{x:c.pageXOffset,y:c.pageYOffset}:(c=b("quirks")?h.body(a):a.documentElement)&&{x:g.fixIeBiDiScrollLeft(c.scrollLeft||0,a),y:c.scrollTop||0}};g.getIeDocumentElementOffset=function(a){return{x:0,y:0}};
g.fixIeBiDiScrollLeft=function(a,c){c=c||h.doc;var d=b("ie");if(d&&!g.isBodyLtr(c)){var f=b("quirks");c=f?h.body(c):c.documentElement;var k=h.global;6==d&&!f&&k.frameElement&&c.scrollHeight>c.clientHeight&&(a+=c.clientLeft);return 8>d||f?a+c.clientWidth-c.scrollWidth:-a}return a};g.position=function(a,c){a=l.byId(a);var d=h.body(a.ownerDocument),f=a.getBoundingClientRect(),f={x:f.left,y:f.top,w:f.right-f.left,h:f.bottom-f.top};9>b("ie")&&(f.x-=b("quirks")?d.clientLeft+d.offsetLeft:0,f.y-=b("quirks")?
d.clientTop+d.offsetTop:0);c&&(a=g.docScroll(a.ownerDocument),f.x+=a.x,f.y+=a.y);return f};g.getMarginSize=function(a,c){a=l.byId(a);c=g.getMarginExtents(a,c||k.getComputedStyle(a));a=a.getBoundingClientRect();return{w:a.right-a.left+c.w,h:a.bottom-a.top+c.h}};g.normalizeEvent=function(a){"layerX"in a||(a.layerX=a.offsetX,a.layerY=a.offsetY);if(!("pageX"in a)){var c=a.target,c=c&&c.ownerDocument||document,d=b("quirks")?c.body:c.documentElement;a.pageX=a.clientX+g.fixIeBiDiScrollLeft(d.scrollLeft||
0,c);a.pageY=a.clientY+(d.scrollTop||0)}};return g})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(b,h,l){var k={global:b.global,doc:b.global.document||null,body:function(f){f=f||b.doc;return f.body||f.getElementsByTagName("body")[0]},setContext:function(f,n){b.global=k.global=f;b.doc=k.doc=n},withGlobal:function(f,n,m,g){var d=b.global;try{return b.global=k.global=f,k.withDoc.call(null,f.document,n,m,g)}finally{b.global=k.global=d}},withDoc:function(f,n,m,g){var d=
k.doc,a=l("quirks"),c=l("ie"),r,w,t;try{return b.doc=k.doc=f,b.isQuirks=l.add("quirks","BackCompat"==b.doc.compatMode,!0,!0),l("ie")&&(t=f.parentWindow)&&t.navigator&&(r=parseFloat(t.navigator.appVersion.split("MSIE ")[1])||void 0,(w=f.documentMode)&&5!=w&&Math.floor(r)!=w&&(r=w),b.isIE=l.add("ie",r,!0,!0)),m&&"string"==typeof n&&(n=m[n]),n.apply(m,g||[])}finally{b.doc=k.doc=d,b.isQuirks=l.add("quirks",a,!0,!0),b.isIE=l.add("ie",c,!0,!0)}}};h.mixin(b,k);return k})},"dojo/dom":function(){define(["./sniff",
"./_base/window","./_base/kernel"],function(b,h,l){if(7>=b("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(n){}var k={};b("ie")?k.byId=function(b,f){if("string"!=typeof b)return b;var g=f||h.doc;f=b&&g.getElementById(b);if(!f||f.attributes.id.value!=b&&f.id!=b){g=g.all[b];if(!g||g.nodeName)g=[g];for(var d=0;f=g[d++];)if(f.attributes&&f.attributes.id&&f.attributes.id.value==b||f.id==b)return f}else return f}:k.byId=function(b,f){return("string"==typeof b?(f||h.doc).getElementById(b):
b)||null};l=l.global.document||null;b.add("dom-contains",!(!l||!l.contains));k.isDescendant=b("dom-contains")?function(b,f){return!(!(f=k.byId(f))||!f.contains(k.byId(b)))}:function(b,f){try{for(b=k.byId(b),f=k.byId(f);b;){if(b==f)return!0;b=b.parentNode}}catch(g){}return!1};b.add("css-user-select",function(b,f,g){if(!g)return!1;b=g.style;f=["Khtml","O","Moz","Webkit"];g=f.length;var d="userSelect";do if("undefined"!==typeof b[d])return d;while(g--&&(d=f[g]+"UserSelect"));return!1});var f=b("css-user-select");
k.setSelectable=f?function(b,m){k.byId(b).style[f]=m?"":"none"}:function(b,f){b=k.byId(b);var g=b.getElementsByTagName("*"),d=g.length;if(f)for(b.removeAttribute("unselectable");d--;)g[d].removeAttribute("unselectable");else for(b.setAttribute("unselectable","on");d--;)g[d].setAttribute("unselectable","on")};return k})},"dojo/dom-style":function(){define(["./sniff","./dom","./_base/window"],function(b,h,l){function k(a,d,b){d=d.toLowerCase();if("auto"==b){if("height"==d)return a.offsetHeight;if("width"==
d)return a.offsetWidth}if("fontweight"==d)switch(b){case 700:return"bold";default:return"normal"}d in c||(c[d]=r.test(d));return c[d]?m(a,b):b}var f,n={};f=b("webkit")?function(a){var c;if(1==a.nodeType){var d=a.ownerDocument.defaultView;c=d.getComputedStyle(a,null);!c&&a.style&&(a.style.display="",c=d.getComputedStyle(a,null))}return c||{}}:b("ie")&&(9>b("ie")||b("quirks"))?function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){if(1===a.nodeType){var c=a.ownerDocument.defaultView;
return(c.opener?c:l.global.window).getComputedStyle(a,null)}return{}};n.getComputedStyle=f;var m;m=b("ie")?function(a,c){if(!c)return 0;if("medium"==c)return 4;if(c.slice&&"px"==c.slice(-2))return parseFloat(c);var d=a.style,b=a.runtimeStyle,p=d.left,e=b.left;b.left=a.currentStyle.left;try{d.left=c,c=d.pixelLeft}catch(q){c=0}d.left=p;b.left=e;return c}:function(a,c){return parseFloat(c)||0};n.toPixelValue=m;var g=function(a,c){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(v){return c?
{}:null}},d=9>b("ie")||10>b("ie")&&b("quirks")?function(a){try{return g(a).Opacity/100}catch(x){return 1}}:function(a){return f(a).opacity},a=9>b("ie")||10>b("ie")&&b("quirks")?function(c,d){""===d&&(d=1);var b=100*d;1===d?(c.style.zoom="",g(c)&&(c.style.filter=c.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,""))):(c.style.zoom=1,g(c)?g(c,1).Opacity=b:c.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+b+")",g(c,1).Enabled=!0);if("tr"==c.tagName.toLowerCase())for(c=
c.firstChild;c;c=c.nextSibling)"td"==c.tagName.toLowerCase()&&a(c,d);return d}:function(a,c){return a.style.opacity=c},c={left:!0,top:!0},r=/margin|padding|width|height|max|min|offset/,w={cssFloat:1,styleFloat:1,"float":1};n.get=function(a,c){var b=h.byId(a),g=arguments.length;if(2==g&&"opacity"==c)return d(b);c=w[c]?"cssFloat"in b.style?"cssFloat":"styleFloat":c;var p=n.getComputedStyle(b);return 1==g?p:k(b,c,p[c]||b.style[c])};n.set=function(c,d,b){var g=h.byId(c),p=arguments.length,e="opacity"==
d;d=w[d]?"cssFloat"in g.style?"cssFloat":"styleFloat":d;if(3==p)return e?a(g,b):g.style[d]=b;for(var q in d)n.set(c,q,d[q]);return n.getComputedStyle(g)};return n})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(b,h,l,k,f){function n(b,g){var d=function(a,c){return h(a,b,function(d){if(g)return g(d,c);if(!k.isDescendant(d.relatedTarget,a))return c.call(this,d)})};d.bubble=function(a){return n(b,function(c,d){var b=a(c.target),g=c.relatedTarget;
if(b&&b!=(g&&1==g.nodeType&&a(g)))return d.call(b,c)})};return d}l.add("dom-quirks",f.doc&&"BackCompat"==f.doc.compatMode);l.add("events-mouseenter",f.doc&&"onmouseenter"in f.doc.createElement("div"));l.add("events-mousewheel",f.doc&&"onmousewheel"in f.doc);f=l("dom-quirks")&&l("ie")||!l("dom-addeventlistener")?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(b,g){return b.button&g},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,g){return b.button==g},isLeft:function(b){return 0==b.button},isMiddle:function(b){return 1==b.button},isRight:function(b){return 2==b.button}};b.mouseButtons=f;b=l("events-mousewheel")?"mousewheel":function(b,g){return h(b,"DOMMouseScroll",function(d){d.wheelDelta=-d.detail;g.call(this,d)})};return{_eventHandler:n,enter:n("mouseover"),leave:n("mouseout"),wheel:b,isLeft:f.isLeft,isMiddle:f.isMiddle,isRight:f.isRight}})},"dojo/_base/sniff":function(){define(["./kernel",
"./lang","../sniff"],function(b,h,l){if(!l("host-browser"))return l;b._name="browser";h.mixin(b,{isBrowser:!0,isFF:l("ff"),isIE:l("ie"),isKhtml:l("khtml"),isWebKit:l("webkit"),isMozilla:l("mozilla"),isMoz:l("mozilla"),isOpera:l("opera"),isSafari:l("safari"),isChrome:l("chrome"),isMac:l("mac"),isIos:l("ios"),isAndroid:l("android"),isWii:l("wii"),isQuirks:l("quirks"),isAir:l("air")});return l})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(b,h){return b.keys={BACKSPACE:8,TAB:9,
CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:h("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,NUMPAD_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:h("mac")&&!h("air")?h("safari")?91:224:17}})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(b,h,l){var k=window,f={addOnWindowUnload:function(f,m){b.windowUnloaded||l(k,"unload",b.windowUnloaded=function(){});l(k,"unload",h.hitch(f,m))},addOnUnload:function(b,f){l(k,
"beforeunload",h.hitch(b,f))}};b.addOnWindowUnload=f.addOnWindowUnload;b.addOnUnload=f.addOnUnload;return f})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(b,h,l,k,f,n,m,g){b.byId=h.byId;b.isDescendant=h.isDescendant;b.setSelectable=h.setSelectable;b.getAttr=k.get;b.setAttr=k.set;b.hasAttr=k.has;b.removeAttr=k.remove;b.getNodeProp=k.getNodeProp;b.attr=function(d,a,c){return 2==arguments.length?
k["string"==typeof a?"get":"set"](d,a):k.set(d,a,c)};b.hasClass=n.contains;b.addClass=n.add;b.removeClass=n.remove;b.toggleClass=n.toggle;b.replaceClass=n.replace;b._toDom=b.toDom=m.toDom;b.place=m.place;b.create=m.create;b.empty=function(d){m.empty(d)};b._destroyElement=b.destroy=function(d){m.destroy(d)};b._getPadExtents=b.getPadExtents=g.getPadExtents;b._getBorderExtents=b.getBorderExtents=g.getBorderExtents;b._getPadBorderExtents=b.getPadBorderExtents=g.getPadBorderExtents;b._getMarginExtents=
b.getMarginExtents=g.getMarginExtents;b._getMarginSize=b.getMarginSize=g.getMarginSize;b._getMarginBox=b.getMarginBox=g.getMarginBox;b.setMarginBox=g.setMarginBox;b._getContentBox=b.getContentBox=g.getContentBox;b.setContentSize=g.setContentSize;b._isBodyLtr=b.isBodyLtr=g.isBodyLtr;b._docScroll=b.docScroll=g.docScroll;b._getIeDocumentElementOffset=b.getIeDocumentElementOffset=g.getIeDocumentElementOffset;b._fixIeBiDiScrollLeft=b.fixIeBiDiScrollLeft=g.fixIeBiDiScrollLeft;b.position=g.position;b.marginBox=
function(d,a){return a?g.setMarginBox(d,a):g.getMarginBox(d)};b.contentBox=function(d,a){return a?g.setContentSize(d,a):g.getContentBox(d)};b.coords=function(d,a){b.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");d=h.byId(d);var c=l.getComputedStyle(d),c=g.getMarginBox(d,c);d=g.position(d,a);c.x=d.x;c.y=d.y;return c};b.getProp=f.get;b.setProp=f.set;b.prop=function(d,a,c){return 2==arguments.length?f["string"==typeof a?"get":"set"](d,a):f.set(d,a,c)};b.getStyle=l.get;b.setStyle=
l.set;b.getComputedStyle=l.getComputedStyle;b.__toPixelValue=b.toPixelValue=l.toPixelValue;b.style=function(d,a,c){switch(arguments.length){case 1:return l.get(d);case 2:return l["string"==typeof a?"get":"set"](d,a)}return l.set(d,a,c)};return b})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(b,h,l,k,f,n){function m(a,c){a=a.getAttributeNode&&a.getAttributeNode(c);return!!a&&a.specified}var g={innerHTML:1,textContent:1,className:1,
htmlFor:h("ie"),value:1},d={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};b.has=function(a,c){var b=c.toLowerCase();return g[n.names[b]||c]||m(k.byId(a),d[b]||c)};b.get=function(a,c){a=k.byId(a);var b=c.toLowerCase(),f=n.names[b]||c,t=a[f];if(g[f]&&"undefined"!=typeof t)return t;if("textContent"==f)return n.get(a,f);if("href"!=f&&("boolean"==typeof t||l.isFunction(t)))return t;c=d[b]||c;return m(a,c)?a.getAttribute(c):null};b.set=function(a,c,r){a=k.byId(a);if(2==arguments.length){for(var m in c)b.set(a,
m,c[m]);return a}m=c.toLowerCase();var t=n.names[m]||c,h=g[t];if("style"==t&&"string"!=typeof r)return f.set(a,r),a;if(h||"boolean"==typeof r||l.isFunction(r))return n.set(a,c,r);a.setAttribute(d[m]||c,r);return a};b.remove=function(a,c){k.byId(a).removeAttribute(d[c.toLowerCase()]||c)};b.getNodeProp=function(a,c){a=k.byId(a);var b=c.toLowerCase(),g=n.names[b]||c;if(g in a&&"href"!=g)return a[g];c=d[b]||c;return m(a,c)?a.getAttribute(c):null}})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),
function(b,h,l,k,f,n,m,g){function d(a){var c="";a=a.childNodes;for(var b=0,g;g=a[b];b++)8!=g.nodeType&&(c=1==g.nodeType?c+d(g):c+g.nodeValue);return c}var a={},c=1,r=h._scopeName+"attrid";l.add("dom-textContent",function(a,c,d){return"textContent"in d});b.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};b.get=function(a,c){a=f.byId(a);var g=c.toLowerCase();
c=b.names[g]||c;return"textContent"!=c||l("dom-textContent")?a[c]:d(a)};b.set=function(d,t,h){d=f.byId(d);if(2==arguments.length&&"string"!=typeof t){for(var w in t)b.set(d,w,t[w]);return d}w=t.toLowerCase();w=b.names[w]||t;if("style"==w&&"string"!=typeof h)return n.set(d,h),d;if("innerHTML"==w)return l("ie")&&d.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(m.empty(d),d.appendChild(m.toDom(h,d.ownerDocument))):d[w]=h,d;if("textContent"==w&&!l("dom-textContent"))return m.empty(d),
d.appendChild(d.ownerDocument.createTextNode(h)),d;if(k.isFunction(h)){var y=d[r];y||(y=c++,d[r]=y);a[y]||(a[y]={});var p=a[y][w];if(p)g.disconnect(p);else try{delete d[w]}catch(e){}h?a[y][w]=g.connect(d,w,h):d[w]=null;return d}d[w]=h;return d}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(b,h,l,k,f,n){function m(a,e){var q=e.parentNode;q&&q.insertBefore(a,e)}function g(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(q){}for(var e;e=
a.lastChild;)a.removeChild(e)}var d={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\:]+)/,c={},r=0,w="__"+h._scopeName+"ToDomId",t;for(t in d)d.hasOwnProperty(t)&&(h=d[t],h.pre="option"==t?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+h.join("\x3e\x3c")+"\x3e",h.post="\x3c/"+h.reverse().join("\x3e\x3c/")+
"\x3e");var x;8>=l("ie")&&(x=function(a){a.__dojo_html5_tested="yes";var e=v("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!==e.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(e){a.createElement(e)});y(e)});b.toDom=function(p,e){e=e||k.doc;var q=e[w];q||(e[w]=q=++r+"",c[q]=e.createElement("div"));8>=l("ie")&&!e.__dojo_html5_tested&&
e.body&&x(e);p+="";var b=p.match(a),g=b?b[1].toLowerCase():"",q=c[q];if(b&&d[g])for(b=d[g],q.innerHTML=b.pre+p+b.post,p=b.length;p;--p)q=q.firstChild;else q.innerHTML=p;if(1==q.childNodes.length)return q.removeChild(q.firstChild);for(p=e.createDocumentFragment();e=q.firstChild;)p.appendChild(e);return p};b.place=function(a,e,q){e=f.byId(e);"string"==typeof a&&(a=/^\s*</.test(a)?b.toDom(a,e.ownerDocument):f.byId(a));if("number"==typeof q){var c=e.childNodes;!c.length||c.length<=q?e.appendChild(a):
m(a,c[0>q?0:q])}else switch(q){case "before":m(a,e);break;case "after":q=a;(c=e.parentNode)&&(c.lastChild==e?c.appendChild(q):c.insertBefore(q,e.nextSibling));break;case "replace":e.parentNode.replaceChild(a,e);break;case "only":b.empty(e);e.appendChild(a);break;case "first":if(e.firstChild){m(a,e.firstChild);break}default:e.appendChild(a)}return a};var v=b.create=function(a,e,q,c){var d=k.doc;q&&(q=f.byId(q),d=q.ownerDocument);"string"==typeof a&&(a=d.createElement(a));e&&n.set(a,e);q&&b.place(a,
q,c);return a};b.empty=function(a){g(f.byId(a))};var y=b.destroy=function(a){if(a=f.byId(a)){var e=a;a=a.parentNode;e.firstChild&&g(e);a&&(l("ie")&&a.canHaveChildren&&"removeNode"in e?e.removeNode(!1):a.removeChild(e))}}})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(b,h,l){function k(d){if("string"==typeof d||d instanceof String){if(d&&!n.test(d))return m[0]=d,m;d=d.split(n);d.length&&!d[0]&&d.shift();d.length&&!d[d.length-1]&&d.pop();return d}return d?h.filter(d,
function(a){return a}):[]}var f,n=/\s+/,m=[""],g={};return f={contains:function(d,a){return 0<=(" "+l.byId(d).className+" ").indexOf(" "+a+" ")},add:function(d,a){d=l.byId(d);a=k(a);var c=d.className,b,c=c?" "+c+" ":" ";b=c.length;for(var g=0,f=a.length,n;g<f;++g)(n=a[g])&&0>c.indexOf(" "+n+" ")&&(c+=n+" ");b<c.length&&(d.className=c.substr(1,c.length-2))},remove:function(d,a){d=l.byId(d);var c;if(void 0!==a){a=k(a);c=" "+d.className+" ";for(var g=0,f=a.length;g<f;++g)c=c.replace(" "+a[g]+" "," ");
c=b.trim(c)}else c="";d.className!=c&&(d.className=c)},replace:function(d,a,c){d=l.byId(d);g.className=d.className;f.remove(g,c);f.add(g,a);d.className!==g.className&&(d.className=g.className)},toggle:function(d,a,c){d=l.byId(d);if(void 0===c){a=k(a);for(var b=0,g=a.length,n;b<g;++b)n=a[b],f[f.contains(d,n)?"remove":"add"](d,n)}else f[c?"add":"remove"](d,a);return c}}})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(b,h,l){function k(a){return m[a]=new Function("item",
"index","array",a)}function f(a){var c=!a;return function(d,b,g){var f=0,r=d&&d.length||0,n;r&&"string"==typeof d&&(d=d.split(""));"string"==typeof b&&(b=m[b]||k(b));if(g)for(;f<r;++f){if(n=!b.call(g,d[f],f,d),a^n)return!n}else for(;f<r;++f)if(n=!b(d[f],f,d),a^n)return!n;return c}}function n(a){var c=1,b=0,f=0;a||(c=b=f=-1);return function(r,k,n,m){if(m&&0<c)return d.lastIndexOf(r,k,n);m=r&&r.length||0;var p=a?m+f:b;n===g?n=a?b:m+f:0>n?(n=m+n,0>n&&(n=b)):n=n>=m?m+f:n;for(m&&"string"==typeof r&&(r=
r.split(""));n!=p;n+=c)if(r[n]==k)return n;return-1}}var m={},g,d={every:f(!1),some:f(!0),indexOf:n(!0),lastIndexOf:n(!1),forEach:function(a,c,d){var b=0,g=a&&a.length||0;g&&"string"==typeof a&&(a=a.split(""));"string"==typeof c&&(c=m[c]||k(c));if(d)for(;b<g;++b)c.call(d,a[b],b,a);else for(;b<g;++b)c(a[b],b,a)},map:function(a,c,d,b){var g=0,f=a&&a.length||0;b=new (b||Array)(f);f&&"string"==typeof a&&(a=a.split(""));"string"==typeof c&&(c=m[c]||k(c));if(d)for(;g<f;++g)b[g]=c.call(d,a[g],g,a);else for(;g<
f;++g)b[g]=c(a[g],g,a);return b},filter:function(a,c,d){var b=0,g=a&&a.length||0,f=[],r;g&&"string"==typeof a&&(a=a.split(""));"string"==typeof c&&(c=m[c]||k(c));if(d)for(;b<g;++b)r=a[b],c.call(d,r,b,a)&&f.push(r);else for(;b<g;++b)r=a[b],c(r,b,a)&&f.push(r);return f},clearCache:function(){m={}}};l.mixin(b,d);return d})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(b,h,l){h=h.NodeList;var k=h.prototype;k.connect=h._adaptAsForEach(function(){return b.connect.apply(this,
arguments)});k.coords=h._adaptAsMap(b.coords);h.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");l.forEach(h.events,function(b){var f="on"+b;k[f]=function(b,g){return this.connect(f,b,g)}});return b.NodeList=h})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),function(b,h,l,k,f,n,m,g){function d(e,
a){var q=function(q,c){if("string"==typeof c&&(c=l.byId(c),!c))return new a([]);q="string"==typeof q?e(q,c):q?q.end&&q.on?q:[q]:[];return q.end&&q.on?q:new a(q)};q.matches=e.match||function(e,a,c){return 0<q.filter([e],a,c).length};q.filter=e.filter||function(e,a,c){return q(a,c).filter(function(a){return-1<f.indexOf(e,a)})};if("function"!=typeof e){var c=e.search;e=function(e,a){return c(a||document,e)}}return q}h.add("array-extensible",function(){return 1==n.delegate([],{length:1}).length&&!h("bug-for-in-skips-shadowed")});
var a=Array.prototype,c=a.slice,r=a.concat,w=f.forEach,t=function(e,a,d){a=[0].concat(c.call(a,0));d=d||b.global;return function(q){a[0]=q;return e.apply(d,a)}},x=function(e){var a=this instanceof v&&h("array-extensible");"number"==typeof e&&(e=Array(e));var c=e&&"length"in e?e:arguments;if(a||!c.sort){for(var d=a?this:[],b=d.length=c.length,p=0;p<b;p++)d[p]=c[p];if(a)return d;c=d}n._mixin(c,y);c._NodeListCtor=function(e){return v(e)};return c},v=x,y=v.prototype=h("array-extensible")?[]:{};v._wrap=
y._wrap=function(e,a,c){e=new (c||this._NodeListCtor||v)(e);return a?e._stash(a):e};v._adaptAsMap=function(e,a){return function(){return this.map(t(e,arguments,a))}};v._adaptAsForEach=function(e,a){return function(){this.forEach(t(e,arguments,a));return this}};v._adaptAsFilter=function(e,a){return function(){return this.filter(t(e,arguments,a))}};v._adaptWithCondition=function(e,a,c){return function(){var q=arguments,d=t(e,q,c);if(a.call(c||b.global,q))return this.map(d);this.forEach(d);return this}};
w(["slice","splice"],function(e){var q=a[e];y[e]=function(){return this._wrap(q.apply(this,arguments),"slice"==e?this:null)}});w(["indexOf","lastIndexOf","every","some"],function(e){var a=f[e];y[e]=function(){return a.apply(b,[this].concat(c.call(arguments,0)))}});n.extend(x,{constructor:v,_NodeListCtor:v,toString:function(){return this.join(",")},_stash:function(e){this._parent=e;return this},on:function(e,a){var q=this.map(function(q){return k(q,e,a)});q.remove=function(){for(var e=0;e<q.length;e++)q[e].remove()};
return q},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(e){var a=c.call(this,0),d=f.map(arguments,function(e){return c.call(e,0)});return this._wrap(r.apply(a,d),this)},map:function(e,a){return this._wrap(f.map(this,e,a),this)},forEach:function(e,a){w(this,e,a);return this},filter:function(e){var a=arguments,c=this,d=0;if("string"==typeof e){c=p._filterResult(this,a[0]);if(1==a.length)return c._stash(this);d=1}return this._wrap(f.filter(c,a[d],a[d+1]),
this)},instantiate:function(e,a){var q=n.isFunction(e)?e:n.getObject(e);a=a||{};return this.forEach(function(e){new q(a,e)})},at:function(){var e=new this._NodeListCtor(0);w(arguments,function(a){0>a&&(a=this.length+a);this[a]&&e.push(this[a])},this);return e._stash(this)}});var p=d(g,x);b.query=d(g,function(e){return x(e)});p.load=function(e,a,c){m.load(e,a,function(e){c(d(e,x))})};b._filterQueryResult=p._filterResult=function(e,a,c){return new x(p.filter(e,a,c))};b.NodeList=p.NodeList=x;return p})},
"dojo/selector/_loader":function(){define(["../has","require"],function(b,h){if("undefined"!==typeof document){var l=document.createElement("div");b.add("dom-qsa2.1",!!l.querySelectorAll);b.add("dom-qsa3",function(){try{return l.innerHTML="\x3cp class\x3d'TEST'\x3e\x3c/p\x3e",1==l.querySelectorAll(".TEST:empty").length}catch(f){}})}var k;return{load:function(f,n,m,g){if(g&&g.isBuild)m();else{g=h;f="default"==f?b("config-selectorEngine")||"css3":f;f="css2"==f||"lite"==f?"./lite":"css2.1"==f?b("dom-qsa2.1")?
"./lite":"./acme":"css3"==f?b("dom-qsa3")?"./lite":"./acme":"acme"==f?"./acme":(g=n)&&f;if("?"==f.charAt(f.length-1)){f=f.substring(0,f.length-1);var d=!0}if(d&&(b("dom-compliant-qsa")||k))return m(k);g([f],function(a){"./lite"!=f&&(k=a);m(a)})}}}})},"dojo/selector/acme":function(){define(["../dom","../sniff","../_base/array","../_base/lang","../_base/window"],function(b,h,l,k,f){var n=k.trim,m=l.forEach,g="BackCompat"==f.doc.compatMode,d=!1,a=function(){return!0},c=function(e){e=0<="\x3e~+".indexOf(e.slice(-1))?
e+" * ":e+" ";for(var a=function(a,q){return n(e.slice(a,q))},q=[],c=-1,b=-1,p=-1,g=-1,u=-1,f=-1,r=-1,k,m="",t="",w,h=0,v=e.length,y=null,x=null,z=function(){0<=f&&(y.id=a(f,h).replace(/\\/g,""),f=-1);if(0<=r){var e=r==h?null:a(r,h);y[0>"\x3e~+".indexOf(e)?"tag":"oper"]=e;r=-1}0<=u&&(y.classes.push(a(u+1,h).replace(/\\/g,"")),u=-1)};m=t,t=e.charAt(h),h<v;h++)"\\"!=m&&(y||(w=h,y={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return d?this.otag:this.tag}},r=
h),k?t==k&&(k=null):"'"==t||'"'==t?k=t:0<=c?"]"==t?(x.attr?x.matchFor=a(p||c+1,h):x.attr=a(c+1,h),!(c=x.matchFor)||'"'!=c.charAt(0)&&"'"!=c.charAt(0)||(x.matchFor=c.slice(1,-1)),x.matchFor&&(x.matchFor=x.matchFor.replace(/\\/g,"")),y.attrs.push(x),x=null,c=p=-1):"\x3d"==t&&(p=0<="|~^$*".indexOf(m)?m:"",x.type=p+t,x.attr=a(c+1,h-p.length),p=h+1):0<=b?")"==t&&(0<=g&&(x.value=a(b+1,h)),g=b=-1):"#"==t?(z(),f=h+1):"."==t?(z(),u=h):":"==t?(z(),g=h):"["==t?(z(),c=h,x={}):"("==t?(0<=g&&(x={name:a(g+1,h),
value:null},y.pseudos.push(x)),b=h):" "==t&&m!=t&&(z(),0<=g&&y.pseudos.push({name:a(g+1,h)}),y.loops=y.pseudos.length||y.attrs.length||y.classes.length,y.oquery=y.query=a(w,h),y.otag=y.tag=y.oper?null:y.tag||"*",y.tag&&(y.tag=y.tag.toUpperCase()),q.length&&q[q.length-1].oper&&(y.infixOper=q.pop(),y.query=y.infixOper.query+" "+y.query),q.push(y),y=null));return q},r=function(e,a){return e?a?function(){return e.apply(window,arguments)&&a.apply(window,arguments)}:e:a},w=function(e,a){a=a||[];e&&a.push(e);
return a},t=function(e){return 1==e.nodeType},x=function(e,a){return e?"class"==a?e.className||"":"for"==a?e.htmlFor||"":"style"==a?e.style.cssText||"":(d?e.getAttribute(a):e.getAttribute(a,2))||"":""},v={"*\x3d":function(e,a){return function(q){return 0<=x(q,e).indexOf(a)}},"^\x3d":function(e,a){return function(q){return 0==x(q,e).indexOf(a)}},"$\x3d":function(e,a){return function(q){q=" "+x(q,e);var c=q.lastIndexOf(a);return-1<c&&c==q.length-a.length}},"~\x3d":function(e,a){var q=" "+a+" ";return function(a){return 0<=
(" "+x(a,e)+" ").indexOf(q)}},"|\x3d":function(e,a){var q=a+"-";return function(c){c=x(c,e);return c==a||0==c.indexOf(q)}},"\x3d":function(e,a){return function(q){return x(q,e)==a}}};k=f.doc.documentElement;var y=!(k.nextElementSibling||"nextElementSibling"in k),p=y?"nextSibling":"nextElementSibling",e=y?"previousSibling":"previousElementSibling",q=y?t:a,u=function(a){for(;a=a[e];)if(q(a))return!1;return!0},z=function(e){for(;e=e[p];)if(q(e))return!1;return!0},C=function(e){var a=e.parentNode,a=7!=
a.nodeType?a:a.nextSibling,c=0,d=a.children||a.childNodes,b=e._i||e.getAttribute("_i")||-1,g=a._l||("undefined"!==typeof a.getAttribute?a.getAttribute("_l"):-1);if(!d)return-1;d=d.length;if(g==d&&0<=b&&0<=g)return b;h("ie")&&"undefined"!==typeof a.setAttribute?a.setAttribute("_l",d):a._l=d;b=-1;for(a=a.firstElementChild||a.firstChild;a;a=a[p])q(a)&&(h("ie")?a.setAttribute("_i",++c):a._i=++c,e===a&&(b=c));return b},B=function(e){return!(C(e)%2)},F=function(e){return C(e)%2},D={checked:function(e,a){return function(e){return!("checked"in
e?!e.checked:!e.selected)}},disabled:function(e,a){return function(e){return e.disabled}},enabled:function(e,a){return function(e){return!e.disabled}},"first-child":function(){return u},"last-child":function(){return z},"only-child":function(e,a){return function(e){return u(e)&&z(e)}},empty:function(e,a){return function(e){var a=e.childNodes;for(e=e.childNodes.length-1;0<=e;e--){var q=a[e].nodeType;if(1===q||3==q)return!1}return!0}},contains:function(e,a){e=a.charAt(0);if('"'==e||"'"==e)a=a.slice(1,
-1);return function(e){return 0<=e.innerHTML.indexOf(a)}},not:function(e,a){e=c(a)[0];a={el:1};"*"!=e.tag&&(a.tag=1);e.classes.length||(a.classes=1);var q=I(e,a);return function(e){return!q(e)}},"nth-child":function(e,a){e=parseInt;if("odd"==a)return F;if("even"==a)return B;if(-1!=a.indexOf("n")){a=a.split("n",2);var q=a[0]?"-"==a[0]?-1:e(a[0]):1,c=a[1]?e(a[1]):0,d=0,b=-1;0<q?0>c?c=c%q&&q+c%q:0<c&&(c>=q&&(d=c-c%q),c%=q):0>q&&(q*=-1,0<c&&(b=c,c%=q));if(0<q)return function(e){e=C(e);return e>=d&&(0>
b||e<=b)&&e%q==c};a=c}var p=e(a);return function(e){return C(e)==p}}},E=9>h("ie")||9==h("ie")&&h("quirks")?function(e){var a=e.toLowerCase();"class"==a&&(e="className");return function(q){return d?q.getAttribute(e):q[e]||q[a]}}:function(e){return function(a){return a&&a.getAttribute&&a.hasAttribute(e)}},I=function(e,q){if(!e)return a;q=q||{};var c=null;"el"in q||(c=r(c,t));"tag"in q||"*"!=e.tag&&(c=r(c,function(a){return a&&(d?a.tagName:a.tagName.toUpperCase())==e.getTag()}));"classes"in q||m(e.classes,
function(e,a,q){var d=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)");c=r(c,function(e){return d.test(e.className)});c.count=a});"pseudos"in q||m(e.pseudos,function(e){var a=e.name;D[a]&&(c=r(c,D[a](a,e.value)))});"attrs"in q||m(e.attrs,function(e){var a,q=e.attr;e.type&&v[e.type]?a=v[e.type](q,e.matchFor):q.length&&(a=E(q));a&&(c=r(c,a))});"id"in q||e.id&&(c=r(c,function(a){return!!a&&a.id==e.id}));c||"default"in q||(c=a);return c},J=function(e){return function(a,q,c){for(;a=a[p];)if(!y||t(a)){c&&!ja(a,c)||
!e(a)||q.push(a);break}return q}},U=function(e){return function(a,c,d){for(a=a[p];a;){if(q(a)){if(d&&!ja(a,d))break;e(a)&&c.push(a)}a=a[p]}return c}},P=function(e,c){var d=function(e){var a=[];try{a=Array.prototype.slice.call(e)}catch(Ha){for(var q=0,c=e.length;q<c;q++)a.push(e[q])}return a};e=e||a;return function(a,b,p){var g=0,u=[],u=d(a.children||a.childNodes);for(c&&l.forEach(u,function(e){1===e.nodeType&&(u=u.concat(d(e.getElementsByTagName("*"))))});a=u[g++];)q(a)&&(!p||ja(a,p))&&e(a,g)&&b.push(a);
return b}},H=function(e,a){for(e=e.parentNode;e&&e!=a;)e=e.parentNode;return!!e},K={},G=function(e){var q=K[e.query];if(q)return q;var c=e.infixOper,c=c?c.oper:"",d=I(e,{el:1}),p="*"==e.tag,u=f.doc.getElementsByClassName;if(c)u={el:1},p&&(u.tag=1),d=I(e,u),"+"==c?q=J(d):"~"==c?q=U(d):"\x3e"==c&&(q=P(d));else if(e.id)d=!e.loops&&p?a:I(e,{el:1,id:1}),q=function(a,q){var c=b.byId(e.id,a.ownerDocument||a);a.ownerDocument&&!H(a,a.ownerDocument)&&l.some(11===a.nodeType?a.childNodes:[a],function(a){a=P(function(a){return a.id===
e.id},!0)(a,[]);if(a.length)return c=a[0],!1});if(c&&d(c)&&(9==a.nodeType||H(c,a)))return w(c,q)};else if(u&&/\{\s*\[native code\]\s*\}/.test(String(u))&&e.classes.length&&!g)var d=I(e,{el:1,classes:1,id:1}),r=e.classes.join(" "),q=function(e,a,q){a=w(0,a);for(var c,b=0,p=e.getElementsByClassName(r);c=p[b++];)d(c,e)&&ja(c,q)&&a.push(c);return a};else p||e.loops?(d=I(e,{el:1,tag:1,id:1}),q=function(a,q,c){q=w(0,q);for(var b,p=0,g=(b=e.getTag())?a.getElementsByTagName(b):[];b=g[p++];)d(b,a)&&ja(b,c)&&
q.push(b);return q}):q=function(a,q,c){q=w(0,q);for(var d=0,b=e.getTag(),b=b?a.getElementsByTagName(b):[];a=b[d++];)ja(a,c)&&q.push(a);return q};return K[e.query]=q},S={},O={},da=function(e){var a=c(n(e));if(1==a.length){var q=G(a[0]);return function(e){if(e=q(e,[]))e.nozip=!0;return e}}return function(e){e=w(e);for(var q,c,d=a.length,b,p,g=0;g<d;g++){p=[];q=a[g];c=e.length-1;0<c&&(b={},p.nozip=!0);c=G(q);for(var u=0;q=e[u];u++)c(q,p,b);if(!p.length)break;e=p}return p}},N=h("ie")?"commentStrip":"nozip",
M=!!f.doc.querySelectorAll,ca=/\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g,W=function(e,a,q,c){return q?(a?a+" ":"")+q+(c?" "+c:""):e},X=/([^[]*)([^\]]*])?/g,ga=function(e,a,q){return a.replace(ca,W)+(q||"")},fa=function(e,a){e=e.replace(X,ga);if(M){var q=O[e];if(q&&!a)return q}if(q=S[e])return q;var q=e.charAt(0),c=-1==e.indexOf(" ");0<=e.indexOf("#")&&c&&(a=!0);if(!M||a||-1!="\x3e~+".indexOf(q)||h("ie")&&-1!=e.indexOf(":")||g&&0<=e.indexOf(".")||-1!=e.indexOf(":contains")||-1!=e.indexOf(":checked")||
-1!=e.indexOf("|\x3d")){var d=e.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);return S[e]=2>d.length?da(e):function(e){for(var a=0,q=[],c;c=d[a++];)q=q.concat(da(c)(e));return q}}var b=0<="\x3e~+".indexOf(e.charAt(e.length-1))?e+" *":e;return O[e]=function(a){if(9==a.nodeType||c)try{var q=a.querySelectorAll(b);q[N]=!0;return q}catch(ua){}return fa(e,!0)(a)}},T=0,ka=h("ie")?function(e){return d?e.getAttribute("_uid")||e.setAttribute("_uid",++T)||T:e.uniqueID}:function(e){return e._uid||
(e._uid=++T)},ja=function(e,a){if(!a)return 1;e=ka(e);return a[e]?0:a[e]=1},ha=function(e){if(e&&e.nozip)return e;if(!e||!e.length)return[];if(2>e.length)return[e[0]];var a=[];T++;var q,c;if(h("ie")&&d){var b=T+"";for(q=0;q<e.length;q++)(c=e[q])&&c.getAttribute("_zipIdx")!=b&&(a.push(c),c.setAttribute("_zipIdx",b))}else if(h("ie")&&e.commentStrip)try{for(q=0;q<e.length;q++)(c=e[q])&&t(c)&&a.push(c)}catch(hb){}else for(q=0;q<e.length;q++)(c=e[q])&&c._zipIdx!=T&&(a.push(c),c._zipIdx=T);return a},sa=
function(e,a){a=a||f.doc;d="div"===(a.ownerDocument||a).createElement("div").tagName;return(e=fa(e)(a))&&e.nozip?e:ha(e)};sa.filter=function(e,a,q){for(var d=[],p=c(a),p=1!=p.length||/[^\w#\.]/.test(a)?function(e){return-1!=l.indexOf(sa(a,b.byId(q)),e)}:I(p[0]),g=0,u;u=e[g];g++)p(u)&&d.push(u);return d};return sa})},"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,h,l,k,
f,n,m,g,d){function a(a){return function(c,e,q){return 2==arguments.length?a["string"==typeof e?"get":"set"](c,e):a.set(c,e,q)}}var c=function(a){return 1==a.length&&"string"==typeof a[0]},r=function(a){var c=a.parentNode;c&&c.removeChild(a)},w=h.NodeList,t=w._adaptWithCondition,x=w._adaptAsForEach,v=w._adaptAsMap;k.extend(w,{_normalize:function(a,c){var e=!0===a.parse;if("string"==typeof a.template){var q=a.templateFunc||b.string&&b.string.substitute;a=q?q(a.template,a):a}q=typeof a;"string"==q||
"number"==q?(a=n.toDom(a,c&&c.ownerDocument),a=11==a.nodeType?k._toArray(a.childNodes):[a]):k.isArrayLike(a)?k.isArray(a)||(a=k._toArray(a)):a=[a];e&&(a._runParse=!0);return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,c,e,q){if(1==c.nodeType||"only"!=e)for(var d,p=a.length,g=p-1;0<=g;g--){var f=q?this._cloneNode(a[g]):a[g];if(a._runParse&&b.parser&&b.parser.parse)for(d||(d=c.ownerDocument.createElement("div")),d.appendChild(f),b.parser.parse(d),f=d.firstChild;d.firstChild;)d.removeChild(d.firstChild);
g==p-1?n.place(f,c,e):c.parentNode.insertBefore(f,c);c=f}},position:v(m.position),attr:t(a(g),c),style:t(a(d),c),addClass:x(f.add),removeClass:x(f.remove),toggleClass:x(f.toggle),replaceClass:x(f.replace),empty:x(n.empty),removeAttr:x(g.remove),marginBox:v(m.getMarginBox),place:function(a,c){var e=h(a)[0];return this.forEach(function(a){n.place(a,e,c)})},orphan:function(a){return(a?h._filterResult(this,a):this).forEach(r)},adopt:function(a,c){return h(a).place(this[0],c)._stash(this)},query:function(a){if(!a)return this;
var c=new w;this.map(function(e){h(a,e).forEach(function(e){void 0!==e&&c.push(e)})});return c._stash(this)},filter:function(a){var c=arguments,e=this,q=0;if("string"==typeof a){e=h._filterResult(this,c[0]);if(1==c.length)return e._stash(this);q=1}return this._wrap(l.filter(e,c[q],c[q+1]),this)},addContent:function(a,c){a=this._normalize(a,this[0]);for(var e=0,q;q=this[e];e++)a.length?this._place(a,q,c,0<e):n.empty(q);return this}});return w})},"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,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v){b._xhrObj=x._create;var y=b.config;b.objectToQuery=k.objectToQuery;b.queryToObject=k.queryToObject;b.fieldToObject=n.fieldToObject;b.formToObject=n.toObject;b.formToQuery=n.toQuery;b.formToJson=n.toJson;b._blockAsync=!1;h.add("native-xhr2-blob",function(){if(h("native-xhr2")){var e=new XMLHttpRequest;e.open("GET","/",!0);e.responseType="blob";var a=e.responseType;e.abort();return"blob"===a}});var p=b._contentHandlers=b.contentHandlers={text:function(e){return e.responseText},
json:function(e){return d.fromJson(e.responseText||null)},"json-comment-filtered":function(e){g.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.");e=e.responseText;var a=e.indexOf("/*"),c=e.lastIndexOf("*/");if(-1==a||-1==c)throw Error("JSON was not comment filtered");
return d.fromJson(e.substring(a+2,c))},javascript:function(e){return b.eval(e.responseText)},xml:function(e){var a=e.responseXML;a&&h("dom-qsa2.1")&&!a.querySelectorAll&&h("dom-parser")&&(a=(new DOMParser).parseFromString(e.responseText,"application/xml"));if(h("ie")&&(!a||!a.documentElement)){var q=function(e){return"MSXML"+e+".DOMDocument"},q=["Microsoft.XMLDOM",q(6),q(4),q(3),q(2)];c.some(q,function(c){try{var q=new ActiveXObject(c);q.async=!1;q.loadXML(e.responseText);a=q}catch(I){return!1}return!0})}return a},
"json-comment-optional":function(e){return e.responseText&&/^[^{\[]*\/\*/.test(e.responseText)?p["json-comment-filtered"](e):p.json(e)}};h("native-xhr2")&&(p.arraybuffer=p.blob=p.document=function(e,a){return"blob"!==a.args.handleAs||h("native-xhr2-blob")?e.response:new Blob([e.response],{type:e.getResponseHeader("Content-Type")})});b._ioSetArgs=function(e,c,q,d){var p={args:e,url:e.url},g=null;if(e.form){var g=f.byId(e.form),u=g.getAttributeNode("action");p.url=p.url||(u?u.value:b.doc?b.doc.URL:
null);g=n.toObject(g)}u=[{}];g&&u.push(g);e.content&&u.push(e.content);e.preventCache&&u.push({"dojo.preventCache":(new Date).valueOf()});p.query=k.objectToQuery(a.mixin.apply(null,u));p.handleAs=e.handleAs||"text";var r=new m(function(e){e.canceled=!0;c&&c(e);var a=e.ioArgs.error;a||(a=Error("request cancelled"),a.dojoType="cancel",e.ioArgs.error=a);return a});r.addCallback(q);var t=e.load;t&&a.isFunction(t)&&r.addCallback(function(a){return t.call(e,a,p)});var w=e.error;w&&a.isFunction(w)&&r.addErrback(function(a){return w.call(e,
a,p)});var h=e.handle;h&&a.isFunction(h)&&r.addBoth(function(a){return h.call(e,a,p)});r.addErrback(function(e){return d(e,r)});y.ioPublish&&b.publish&&!1!==p.args.ioPublish&&(r.addCallbacks(function(e){b.publish("/dojo/io/load",[r,e]);return e},function(e){b.publish("/dojo/io/error",[r,e]);return e}),r.addBoth(function(e){b.publish("/dojo/io/done",[r,e]);return e}));r.ioArgs=p;return r};var e=function(e){e=p[e.ioArgs.handleAs](e.ioArgs.xhr,e.ioArgs);return void 0===e?null:e},q=function(e,a){a.ioArgs.args.failOk||
console.error(e);return e},u=function(e){0>=z&&(z=0,y.ioPublish&&b.publish&&(!e||e&&!1!==e.ioArgs.args.ioPublish)&&b.publish("/dojo/io/stop"))},z=0;w.after(t,"_onAction",function(){--z});w.after(t,"_onInFlight",u);b._ioCancelAll=t.cancelAll;b._ioNotifyStart=function(e){y.ioPublish&&b.publish&&!1!==e.ioArgs.args.ioPublish&&(z||b.publish("/dojo/io/start"),z+=1,b.publish("/dojo/io/send",[e]))};b._ioWatch=function(e,c,q,d){e.ioArgs.options=e.ioArgs.args;a.mixin(e,{response:e.ioArgs,isValid:function(a){return c(e)},
isReady:function(a){return q(e)},handleResponse:function(a){return d(e)}});t(e);u(e)};b._ioAddQueryToUrl=function(e){e.query.length&&(e.url+=(-1==e.url.indexOf("?")?"?":"\x26")+e.query,e.query=null)};b.xhr=function(a,c,d){var p,g=b._ioSetArgs(c,function(e){p&&p.cancel()},e,q),u=g.ioArgs;"postData"in c?u.query=c.postData:"putData"in c?u.query=c.putData:"rawBody"in c?u.query=c.rawBody:(2<arguments.length&&!d||-1==="POST|PUT".indexOf(a.toUpperCase()))&&b._ioAddQueryToUrl(u);var f;h("native-xhr2")&&(f=
{arraybuffer:1,blob:1,document:1});f=h("native-xhr2")&&f[c.handleAs]?c.handleAs:"text";"blob"!==f||h("native-xhr2-blob")||(f="arraybuffer");f={method:a,handleAs:f,responseType:c.responseType,timeout:c.timeout,withCredentials:c.withCredentials,ioArgs:u};"undefined"!==typeof c.headers&&(f.headers=c.headers);"undefined"!==typeof c.contentType&&(f.headers||(f.headers={}),f.headers["Content-Type"]=c.contentType);"undefined"!==typeof u.query&&(f.data=u.query);"undefined"!==typeof c.sync&&(f.sync=c.sync);
b._ioNotifyStart(g);try{p=x(u.url,f,!0)}catch(U){return g.cancel(),g}g.ioArgs.xhr=p.response.xhr;p.then(function(){g.resolve(g)}).otherwise(function(e){u.error=e;e.response&&(e.status=e.response.status,e.responseText=e.response.text,e.xhr=e.response.xhr);g.reject(e)});return g};b.xhrGet=function(e){return b.xhr("GET",e)};b.rawXhrPost=b.xhrPost=function(e){return b.xhr("POST",e,!0)};b.rawXhrPut=b.xhrPut=function(e){return b.xhr("PUT",e,!0)};b.xhrDelete=function(e){return b.xhr("DELETE",e)};b._isDocumentOk=
function(e){return v.checkStatus(e.status)};b._getText=function(e){var a;b.xhrGet({url:e,sync:!0,load:function(e){a=e}});return a};a.mixin(b.xhr,{_xhrObj:b._xhrObj,fieldToObject:n.fieldToObject,formToObject:n.toObject,objectToQuery:k.objectToQuery,formToQuery:n.toQuery,formToJson:n.toJson,queryToObject:k.queryToObject,contentHandlers:p,_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/io-query":function(){define(["./_base/lang"],function(b){var h={};return{objectToQuery:function(l){var k=encodeURIComponent,f=[],n;for(n in l){var m=l[n];if(m!=h[n]){var g=k(n)+"\x3d";if(b.isArray(m))for(var d=0,a=m.length;d<a;++d)f.push(g+k(m[d]));else f.push(g+k(m))}}return f.join("\x26")},queryToObject:function(h){var k=decodeURIComponent;h=h.split("\x26");for(var f={},n,m,g=0,d=h.length;g<d;++g)if(m=
h[g],m.length){var a=m.indexOf("\x3d");0>a?(n=k(m),m=""):(n=k(m.slice(0,a)),m=k(m.slice(a+1)));"string"==typeof f[n]&&(f[n]=[f[n]]);b.isArray(f[n])?f[n].push(m):f[n]=m}return f}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(b,h,l,k){var f={fieldToObject:function(b){var f=null;if(b=h.byId(b)){var g=b.name,d=(b.type||"").toLowerCase();if(g&&d&&!b.disabled)if("radio"==d||"checkbox"==d)b.checked&&(f=b.value);else if(b.multiple)for(f=[],b=[b.firstChild];b.length;)for(g=
b.pop();g;g=g.nextSibling)if(1==g.nodeType&&"option"==g.tagName.toLowerCase())g.selected&&f.push(g.value);else{g.nextSibling&&b.push(g.nextSibling);g.firstChild&&b.push(g.firstChild);break}else f=b.value}return f},toObject:function(k){var n={};k=h.byId(k).elements;for(var g=0,d=k.length;g<d;++g){var a=k[g],c=a.name,r=(a.type||"").toLowerCase();if(c&&r&&0>"file|submit|image|reset|button".indexOf(r)&&!a.disabled){var w=n,t=c,a=f.fieldToObject(a);if(null!==a){var x=w[t];"string"==typeof x?w[t]=[x,a]:
b.isArray(x)?x.push(a):w[t]=a}"image"==r&&(n[c+".x"]=n[c+".y"]=n[c].x=n[c].y=0)}}return n},toQuery:function(b){return l.objectToQuery(f.toObject(b))},toJson:function(b,m){return k.stringify(f.toObject(b),null,m?4:0)}};return f})},"dojo/json":function(){define(["./has"],function(b){var h="undefined"!=typeof JSON;b.add("json-parse",h);b.add("json-stringify",h&&'{"a":1}'==JSON.stringify({a:0},function(b,f){return f||1}));if(b("json-stringify"))return JSON;var l=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,f){if(f&&!/^([\s\[\{]*(?:"(?:\\.|[^"])*"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(b))throw new SyntaxError("Invalid characters in JSON");return eval("("+b+")")},stringify:function(b,f,n){function k(d,a,c){f&&(d=f(c,d));var b;b=typeof d;if("number"==b)return isFinite(d)?d+"":"null";if("boolean"==
b)return d+"";if(null===d)return"null";if("string"==typeof d)return l(d);if("function"==b||"undefined"==b)return g;if("function"==typeof d.toJSON)return k(d.toJSON(c),a,c);if(d instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(a,e,c){a=d["getUTC"+e]()+(c?1:0);return 10>a?"0"+a:a});if(d.valueOf()!==d)return k(d.valueOf(),a,c);var m=n?a+n:"",t=n?" ":"",h=n?"\n":"";if(d instanceof Array){var t=d.length,v=[];for(c=0;c<t;c++)b=k(d[c],m,
c),"string"!=typeof b&&(b="null"),v.push(h+m+b);return"["+v.join(",")+h+a+"]"}v=[];for(c in d){var y;if(d.hasOwnProperty(c)){if("number"==typeof c)y='"'+c+'"';else if("string"==typeof c)y=l(c);else continue;b=k(d[c],m,c);"string"==typeof b&&v.push(h+m+y+":"+t+b)}}return"{"+v.join(",")+h+a+"}"}var g;"string"==typeof f&&(n=f,f=null);return k(b,"","")}}})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(b,
h,l,k,f,n,m){var g=function(){},d=Object.freeze||function(){},a=b.Deferred=function(c){function b(e){if(x)throw Error("This deferred has already been resolved");t=e;x=!0;m()}function m(){for(var e;!e&&q;){var a=q;q=q.next;if(e=a.progress==g)x=!1;var c=p?a.error:a.resolved;f("config-useDeferredInstrumentation")&&p&&h.instrumentRejected&&h.instrumentRejected(t,!!c);if(c)try{var d=c(t);d&&"function"===typeof d.then?d.then(n.hitch(a.deferred,"resolve"),n.hitch(a.deferred,"reject"),n.hitch(a.deferred,
"progress")):(c=e&&void 0===d,e&&!c&&(p=d instanceof Error),a.deferred[c&&p?"reject":"resolve"](c?t:d))}catch(E){a.deferred.reject(E)}else p?a.deferred.reject(t):a.deferred.resolve(t)}}var t,x,v,y,p,e,q,u=this.promise=new l;this.isResolved=u.isResolved=function(){return 0==y};this.isRejected=u.isRejected=function(){return 1==y};this.isFulfilled=u.isFulfilled=function(){return 0<=y};this.isCanceled=u.isCanceled=function(){return v};this.resolve=this.callback=function(e){this.fired=y=0;this.results=
[e,null];b(e)};this.reject=this.errback=function(e){p=!0;this.fired=y=1;f("config-useDeferredInstrumentation")&&h.instrumentRejected&&h.instrumentRejected(e,!!q);b(e);this.results=[null,e]};this.progress=function(e){for(var a=q;a;){var c=a.progress;c&&c(e);a=a.next}};this.addCallbacks=function(e,a){this.then(e,a,g);return this};u.then=this.then=function(c,d,b){var p=b==g?this:new a(u.cancel);c={resolved:c,error:d,progress:b,deferred:p};q?e=e.next=c:q=e=c;x&&m();return p.promise};var z=this;u.cancel=
this.cancel=function(){if(!x){var e=c&&c(z);x||(e instanceof Error||(e=new k(e)),e.log=!1,z.reject(e))}v=!0};d(u)};n.extend(a,{addCallback:function(a){return this.addCallbacks(n.hitch.apply(b,arguments))},addErrback:function(a){return this.addCallbacks(null,n.hitch.apply(b,arguments))},addBoth:function(a){var c=n.hitch.apply(b,arguments);return this.addCallbacks(c,c)},fired:-1});a.when=b.when=m;return a})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise",
"./has!config-deferredInstrumentation?./promise/instrumentation"],function(b,h,l,k,f){var n=Object.freeze||function(){},m=function(a,d,f,k,n){b("config-deferredInstrumentation")&&2===d&&c.instrumentRejected&&0===a.length&&c.instrumentRejected(f,!1,k,n);for(n=0;n<a.length;n++)g(a[n],d,f,k)},g=function(g,f,k,n){var r=g[f],m=g.deferred;if(r)try{var p=r(k);if(0===f)"undefined"!==typeof p&&a(m,f,p);else{if(p&&"function"===typeof p.then){g.cancel=p.cancel;p.then(d(m,1),d(m,2),d(m,0));return}a(m,1,p)}}catch(e){a(m,
2,e)}else a(m,f,k);b("config-deferredInstrumentation")&&2===f&&c.instrumentRejected&&c.instrumentRejected(k,!!r,n,m.promise)},d=function(c,d){return function(b){a(c,d,b)}},a=function(a,c,d){if(!a.isCanceled())switch(c){case 0:a.progress(d);break;case 1:a.resolve(d);break;case 2:a.reject(d)}},c=function(a){var d=this.promise=new k,f=this,r,h,y,p=!1,e=[];b("config-deferredInstrumentation")&&Error.captureStackTrace&&(Error.captureStackTrace(f,c),Error.captureStackTrace(d,c));this.isResolved=d.isResolved=
function(){return 1===r};this.isRejected=d.isRejected=function(){return 2===r};this.isFulfilled=d.isFulfilled=function(){return!!r};this.isCanceled=d.isCanceled=function(){return p};this.progress=function(a,c){if(r){if(!0===c)throw Error("This deferred has already been fulfilled.");return d}m(e,0,a,null,f);return d};this.resolve=function(a,c){if(r){if(!0===c)throw Error("This deferred has already been fulfilled.");return d}m(e,r=1,h=a,null,f);e=null;return d};var q=this.reject=function(a,c){if(r){if(!0===
c)throw Error("This deferred has already been fulfilled.");return d}b("config-deferredInstrumentation")&&Error.captureStackTrace&&Error.captureStackTrace(y={},q);m(e,r=2,h=a,y,f);e=null;return d};this.then=d.then=function(a,q,b){var p=[b,a,q];p.cancel=d.cancel;p.deferred=new c(function(e){return p.cancel&&p.cancel(e)});r&&!e?g(p,r,h,y):e.push(p);return p.deferred.promise};this.cancel=d.cancel=function(e,c){if(!r){a&&(c=a(e),e="undefined"===typeof c?e:c);p=!0;if(!r)return"undefined"===typeof e&&(e=
new l),q(e),e;if(2===r&&h===e)return e}else if(!0===c)throw Error("This deferred has already been fulfilled.");};n(d)};c.prototype.toString=function(){return"[object Deferred]"};f&&f(c);return c})},"dojo/errors/CancelError":function(){define(["./create"],function(b){return b("CancelError",null,null,{dojoType:"cancel",log:!1})})},"dojo/errors/create":function(){define(["../_base/lang"],function(b){return function(h,l,k,f){k=k||Error;var n=function(b){if(k===Error){Error.captureStackTrace&&Error.captureStackTrace(this,
n);var g=Error.call(this,b),d;for(d in g)g.hasOwnProperty(d)&&(this[d]=g[d]);this.message=b;this.stack=g.stack}else k.apply(this,arguments);l&&l.apply(this,arguments)};n.prototype=b.delegate(k.prototype,f);n.prototype.name=h;return n.prototype.constructor=n}})},"dojo/promise/Promise":function(){define(["../_base/lang"],function(b){function h(){throw new TypeError("abstract");}return b.extend(function(){},{then:function(b,k,f){h()},cancel:function(b,k){h()},isResolved:function(){h()},isRejected:function(){h()},
isFulfilled:function(){h()},isCanceled:function(){h()},always:function(b){return this.then(b,b)},catch:function(b){return this.then(null,b)},otherwise:function(b){return this.then(null,b)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},"dojo/when":function(){define(["./Deferred","./promise/Promise"],function(b,h){return function(l,k,f,n){var m=l&&"function"===typeof l.then,g=m&&l instanceof h;if(!m)return 1<arguments.length?k?
k(l):l:(new b).resolve(l);g||(m=new b(l.cancel),l.then(m.resolve,m.reject,m.progress),l=m.promise);return k||f||n?l.then(k,f,n):l}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(b,h){b.fromJson=function(b){return eval("("+b+")")};b._escapeString=h.stringify;b.toJsonIndentStr="\t";b.toJson=function(l,k){return h.stringify(l,function(b,k){return k&&(b=k.__json__||k.json,"function"==typeof b)?b.call(k):k},k&&b.toJsonIndentStr)};return b})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../has!host-browser?../_base/window: ../has!host-browser?dom-addeventlistener?:../on:".split(" "),
function(b,h,l,k,f,n){function m(){for(var c=+new Date,b=0,f;b<a.length&&(f=a[b]);b++){var k=f.response,n=k.options;f.isCanceled&&f.isCanceled()||f.isValid&&!f.isValid(k)?(a.splice(b--,1),g._onAction&&g._onAction()):f.isReady&&f.isReady(k)?(a.splice(b--,1),f.handleResponse(k),g._onAction&&g._onAction()):f.startTime&&f.startTime+(n.timeout||0)<c&&(a.splice(b--,1),f.cancel(new h("Timeout exceeded",k)),g._onAction&&g._onAction())}g._onInFlight&&g._onInFlight(f);a.length||(clearInterval(d),d=null)}function g(c){c.response.options.timeout&&
(c.startTime=+new Date);c.isFulfilled()||(a.push(c),d||(d=setInterval(m,50)),c.response.options.sync&&m())}var d=null,a=[];g.cancelAll=function(){try{k.forEach(a,function(a){try{a.cancel(new l("All requests canceled."))}catch(r){}})}catch(c){}};f&&n&&f.doc.attachEvent&&n(f.global,"unload",function(){g.cancelAll()});return g})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise ../has".split(" "),
function(b,h,l,k,f,n,m,g,d){function a(a){return r(a)}function c(a){return void 0!==a.data?a.data:a.text}b.deepCopy=function(a,c){for(var d in c){var g=a[d],f=c[d];g!==f&&(g&&"object"===typeof g&&f&&"object"===typeof f?b.deepCopy(g,f):a[d]=f)}return a};b.deepCreate=function(a,c){c=c||{};var d=m.delegate(a),g,f;for(g in a)(f=a[g])&&"object"===typeof f&&(d[g]=b.deepCreate(f,c[g]));return b.deepCopy(d,c)};var r=Object.freeze||function(a){return a};b.deferred=function(d,f,n,v,y,p){var e=new k(function(a){f&&
f(e,d);return a&&(a instanceof h||a instanceof l)?a:new l("Request canceled",d)});e.response=d;e.isValid=n;e.isReady=v;e.handleResponse=y;n=e.then(a).otherwise(function(e){e.response=d;throw e;});b.notify&&n.then(m.hitch(b.notify,"emit","load"),m.hitch(b.notify,"emit","error"));v=n.then(c);y=new g;for(var q in v)v.hasOwnProperty(q)&&(y[q]=v[q]);y.response=n;r(y);p&&e.then(function(a){p.call(e,a)},function(a){p.call(e,d,a)});e.promise=y;e.then=y.then;return e};b.addCommonMethods=function(a,c){n.forEach(c||
["GET","POST","PUT","DELETE"],function(c){a[("DELETE"===c?"DEL":c).toLowerCase()]=function(d,b){b=m.delegate(b||{});b.method=c;return a(d,b)}})};b.parseArgs=function(a,c,b){var g=c.data,r=c.query;!g||b||"object"!==typeof g||d("native-xhr2")&&(g instanceof ArrayBuffer||g instanceof Blob)||(c.data=f.objectToQuery(g));r?("object"===typeof r&&(r=f.objectToQuery(r)),c.preventCache&&(r+=(r?"\x26":"")+"request.preventCache\x3d"+ +new Date)):c.preventCache&&(r="request.preventCache\x3d"+ +new Date);a&&r&&
(a+=(~a.indexOf("?")?"\x26":"?")+r);return{url:a,options:c,getHeader:function(a){return null}}};b.checkStatus=function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||!a}})},"dojo/errors/RequestError":function(){define(["./create"],function(b){return b("RequestError",function(b,l){this.response=l})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(b,h){return b("RequestTimeoutError",null,h,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError",
"./watch","./handlers","./util","../has"],function(b,h,l,k,f){function n(a,c){var d=a.xhr;a.status=a.xhr.status;try{a.text=d.responseText}catch(q){}"xml"===a.options.handleAs&&(a.data=d.responseXML);if(!c)try{l(a)}catch(q){c=q}var e;if(c)this.reject(c);else{try{l(a)}catch(q){e=q}k.checkStatus(d.status)?e?this.reject(e):this.resolve(a):(c=e?new b("Unable to load "+a.url+" status: "+d.status+" and an error in handleAs: transformation of response",a):new b("Unable to load "+a.url+" status: "+d.status,
a),this.reject(c))}}function m(a){return this.xhr.getResponseHeader(a)}function g(v,y,p){var e=f("native-formdata")&&y&&y.data&&y.data instanceof FormData,q=k.parseArgs(v,k.deepCreate(x,y),e);v=q.url;y=q.options;var u,z=k.deferred(q,w,a,c,n,function(){u&&u()}),l=q.xhr=g._create();if(!l)return z.cancel(new b("XHR was not created")),p?z:z.promise;q.getHeader=m;r&&(u=r(l,z,q));var B="undefined"===typeof y.data?null:y.data,F=!y.sync,D=y.method;try{l.open(D,v,F,y.user||t,y.password||t);y.withCredentials&&
(l.withCredentials=y.withCredentials);f("native-response-type")&&y.handleAs in d&&(l.responseType=d[y.handleAs]);var E=y.headers;v=e?!1:"application/x-www-form-urlencoded";if(E)for(var I in E)"content-type"===I.toLowerCase()?v=E[I]:E[I]&&l.setRequestHeader(I,E[I]);v&&!1!==v&&l.setRequestHeader("Content-Type",v);E&&"X-Requested-With"in E||l.setRequestHeader("X-Requested-With","XMLHttpRequest");k.notify&&k.notify.emit("send",q,z.promise.cancel);l.send(B)}catch(J){z.reject(J)}h(z);l=null;return p?z:
z.promise}f.add("native-xhr",function(){return"undefined"!==typeof XMLHttpRequest});f.add("dojo-force-activex-xhr",function(){return f("activex")&&"file:"===window.location.protocol});f.add("native-xhr2",function(){if(f("native-xhr")&&!f("dojo-force-activex-xhr")){var a=new XMLHttpRequest;return"undefined"!==typeof a.addEventListener&&("undefined"===typeof opera||"undefined"!==typeof a.upload)}});f.add("native-formdata",function(){return"undefined"!==typeof FormData});f.add("native-response-type",
function(){return f("native-xhr")&&"undefined"!==typeof(new XMLHttpRequest).responseType});f.add("native-xhr2-blob",function(){if(f("native-response-type")){var a=new XMLHttpRequest;a.open("GET","https://dojotoolkit.org/",!0);a.responseType="blob";var c=a.responseType;a.abort();return"blob"===c}});var d={blob:f("native-xhr2-blob")?"blob":"arraybuffer",document:"document",arraybuffer:"arraybuffer"},a,c,r,w;f("native-xhr2")?(a=function(a){return!this.isFulfilled()},w=function(a,c){c.xhr.abort()},r=
function(a,c,d){function e(e){c.handleResponse(d)}function q(e){e=new b("Unable to load "+d.url+" status: "+e.target.status,d);c.handleResponse(d,e)}function p(e){e.lengthComputable?(d.loaded=e.loaded,d.total=e.total,c.progress(d)):3===d.xhr.readyState&&(d.loaded="loaded"in e?e.loaded:e.position,c.progress(d))}a.addEventListener("load",e,!1);a.addEventListener("error",q,!1);a.addEventListener("progress",p,!1);return function(){a.removeEventListener("load",e,!1);a.removeEventListener("error",q,!1);
a.removeEventListener("progress",p,!1);a=null}}):(a=function(a){return a.xhr.readyState},c=function(a){return 4===a.xhr.readyState},w=function(a,c){a=c.xhr;c=typeof a.abort;"function"!==c&&"object"!==c&&"unknown"!==c||a.abort()});var t,x={data:null,query:null,sync:!1,method:"GET"};g._create=function(){throw Error("XMLHTTP not available");};if(f("native-xhr")&&!f("dojo-force-activex-xhr"))g._create=function(){return new XMLHttpRequest};else if(f("activex"))try{new ActiveXObject("Msxml2.XMLHTTP"),g._create=
function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(v){try{new ActiveXObject("Microsoft.XMLHTTP"),g._create=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(y){}}k.addCommonMethods(g);return g})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../has!dom?../selector/_loader"],function(b,h,l,k){function f(c){var d=a[c.options.handleAs];c.data=d?d(c):c.data||c.text;return c}k.add("activex","undefined"!==typeof ActiveXObject);
k.add("dom-parser",function(a){return"DOMParser"in a});var n;if(k("activex")){var m=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"],g;n=function(a){function c(a){try{var c=new ActiveXObject(a);c.async=!1;c.loadXML(b);d=c;g=a}catch(y){return!1}return!0}var d=a.data,b=a.text;d&&k("dom-qsa2.1")&&!d.querySelectorAll&&k("dom-parser")&&(d=(new DOMParser).parseFromString(b,"application/xml"));d&&d.documentElement||g&&c(g)||l.some(m,c);return d}}var d=function(a){return k("native-xhr2-blob")||
"blob"!==a.options.handleAs||"undefined"===typeof Blob?a.xhr.response:new Blob([a.xhr.response],{type:a.xhr.getResponseHeader("Content-Type")})},a={javascript:function(a){return h.eval(a.text||"")},json:function(a){return b.parse(a.text||null)},xml:n,blob:d,arraybuffer:d,document:d};f.register=function(c,d){a[c]=d};return f})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(b,h,l,k,f,n,m,g,d){var a=l.mixin,
c={},r=c._Line=function(a,c){this.start=a;this.end=c};r.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var w=c.Animation=function(e){a(this,e);l.isArray(this.curve)&&(this.curve=new r(this.curve[0],this.curve[1]))};w.prototype=new k;l.extend(w,{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){c=c||[];if(this[a])if(h.debugAtAllCosts)this[a].apply(this,c);else try{this[a].apply(this,
c)}catch(u){console.error("exception in animation handler for:",a),console.error(u)}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]);a=a||this.delay;c=l.hitch(this,"_play",c);if(0<a)return this._delayTimer=setTimeout(c,a),this;c();return this},_play:function(a){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();
this._paused&&(this._startTime-=this.duration*this._percent);this._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=a;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=a;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 t=0,x=null,v={run:function(){}};l.extend(w,{_startTimer:function(){this._timer||(this._timer=n.after(v,"run",l.hitch(this,"_cycle"),!0),t++);x||(x=setInterval(l.hitch(v,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,t--);0>=t&&(clearInterval(x),x=null,t=0)}});var y=m("ie")?function(a){var e=a.style;e.width.length||"auto"!=d.get(a,"width")||(e.width="auto")}:function(){};c._fade=function(e){e.node=g.byId(e.node);var q=a({properties:{}},
e);e=q.properties.opacity={};e.start="start"in q?q.start:function(){return+d.get(q.node,"opacity")||0};e.end=q.end;e=c.animateProperty(q);n.after(e,"beforeBegin",l.partial(y,q.node),!0);return e};c.fadeIn=function(e){return c._fade(a({end:1},e))};c.fadeOut=function(e){return c._fade(a({end:0},e))};c._defaultEasing=function(a){return.5+Math.sin((a+1.5)*Math.PI)/2};var p=function(a){this._properties=a;for(var e in a){var c=a[e];c.start instanceof f&&(c.tempColor=new f)}};p.prototype.getValue=function(a){var e=
{},c;for(c in this._properties){var d=this._properties[c],b=d.start;b instanceof f?e[c]=f.blendColors(b,d.end,a,d.tempColor).toCss():l.isArray(b)||(e[c]=(d.end-b)*a+b+("opacity"!=c?d.units||"px":0))}return e};c.animateProperty=function(e){var c=e.node=g.byId(e.node);e.easing||(e.easing=b._defaultEasing);e=new w(e);n.after(e,"beforeBegin",l.hitch(e,function(){var e={},q;for(q in this.properties){var b=function(a,e){var c={height:a.offsetHeight,width:a.offsetWidth}[e];if(void 0!==c)return c;c=d.get(a,
e);return"opacity"==e?+c:r?c:parseFloat(c)};if("width"==q||"height"==q)this.node.display="block";var g=this.properties[q];l.isFunction(g)&&(g=g(c));g=e[q]=a({},l.isObject(g)?g:{end:g});l.isFunction(g.start)&&(g.start=g.start(c));l.isFunction(g.end)&&(g.end=g.end(c));var r=0<=q.toLowerCase().indexOf("color");"end"in g?"start"in g||(g.start=b(c,q)):g.end=b(c,q);r?(g.start=new f(g.start),g.end=new f(g.end)):g.start="opacity"==q?+g.start:parseFloat(g.start)}this.curve=new p(e)}),!0);n.after(e,"onAnimate",
l.hitch(d,"set",e.node),!0);return e};c.anim=function(a,q,d,b,p,g){return c.animateProperty({node:a,duration:d||w.prototype.duration,properties:q,easing:b,onEnd:p}).play(g||0)};a(b,c);b._Animation=w;return c})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(b,h,l,k){var f=b.Color=function(b){b&&this.setColor(b)};f.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,128,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:k.transparentColor||[0,0,0,0]};h.extend(f,{r:255,g:255,b:255,a:1,_set:function(b,f,g,d){this.r=b;this.g=f;this.b=g;this.a=d},setColor:function(b){h.isString(b)?f.fromString(b,this):h.isArray(b)?f.fromArray(b,this):(this._set(b.r,b.g,b.b,b.a),b instanceof f||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,
this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+l.map(["r","g","b"],function(b){b=this[b].toString(16);return 2>b.length?"0"+b:b},this).join("")},toCss:function(b){var f=this.r+", "+this.g+", "+this.b;return(b?"rgba("+f+", "+this.a:"rgb("+f)+")"},toString:function(){return this.toCss(!0)}});f.blendColors=b.blendColors=function(b,k,g,d){var a=d||new f;l.forEach(["r","g","b","a"],function(c){a[c]=b[c]+(k[c]-b[c])*g;"a"!=c&&(a[c]=Math.round(a[c]))});
return a.sanitize()};f.fromRgb=b.colorFromRgb=function(b,k){return(b=b.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&f.fromArray(b[1].split(/\s*,\s*/),k)};f.fromHex=b.colorFromHex=function(b,k){var g=k||new f,d=4==b.length?4:8,a=(1<<d)-1;b=Number("0x"+b.substr(1));if(isNaN(b))return null;l.forEach(["b","g","r"],function(c){var f=b&a;b>>=d;g[c]=4==d?17*f:f});g.a=1;return g};f.fromArray=b.colorFromArray=function(b,k){k=k||new f;k._set(Number(b[0]),Number(b[1]),Number(b[2]),Number(b[3]));isNaN(k.a)&&
(k.a=1);return k.sanitize()};f.fromString=b.colorFromString=function(b,k){var g=f.named[b];return g&&f.fromArray(g,k)||f.fromRgb(b,k)||f.fromHex(b,k)};return f})},"esri/core/request/script":function(){define("require exports dojo/Deferred dojo/request/script dojo/text!./iframe.html ../sniff".split(" "),function(b,h,l,k,f,n){function m(){var a=document.createElement("iframe");a.name="esri_core_jsonp_iframe";a.style.display="none";a.setAttribute("sandbox","allow-scripts");if(!n("ff")&&"srcdoc"in a){var c=
b.toUrl("dojo/dojo.js"),e=f.replace("../../../dojo/dojo.js",c),c=c.slice(0,-7),e=e.replace("../../../dojo/",c);a.srcdoc=e}else e=b.toUrl("./iframe.html"),"http:"===window.location.protocol&&0===e.indexOf("https:")&&(e=e.replace("https:","http:")),a.src=e;document.body.appendChild(a);return a}function g(){var a=new MessageChannel;a.port1.addEventListener("message",d);a.port1.start();return a}function d(a){var b=a.data;if("ready"===b){for(var b=0,e=x;b<e.length;b++)a=e[b],c(a,w);x=null}else if(a=v[b.id])delete v[b.id],
b.isError?a.dfd.reject(Error(b.message)):a.dfd.resolve(b.response)}function a(a,c){a.addEventListener("load",function(){a.contentWindow.postMessage("init","*",[c.port2])})}function c(a,c){v[a.message.id]=a;c.port1.postMessage(a.message)}Object.defineProperty(h,"__esModule",{value:!0});var r,w,t=0,x=[],v={};h.get=function(b,d){if(!n("esri-script-sandbox"))return k.get(b,d);var e=null;d&&(e={jsonp:d.jsonp,preventCache:d.preventCache,query:d.query,timeout:d.timeout});d=new l(function(){if(x){var a=x.indexOf(q);
-1<a&&x.splice(a,1)}else q.message.id in v&&delete v[q.message.id]});var q={dfd:d,message:{id:"id"+(++t+Math.random()),url:b,options:e}};r||(r=m(),w=g(),a(r,w));x?x.push(q):c(q,w);return d.promise}})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),function(b,h,l,k,f,n,m,g,d,a,c){function r(a,e){a.canDelete&&y._remove(a.id,e.options.frameDoc,!0)}function w(a){C&&C.length&&(f.forEach(C,
function(a){y._remove(a.id,a.frameDoc);a.frameDoc=null}),C=[]);return a.options.jsonp?!a.data:!0}function t(a){return!!this.scriptLoaded}function x(a){return(a=a.options.checkString)&&eval("typeof("+a+') !\x3d\x3d "undefined"')}function v(a,e){if(this.canDelete){var c=this.response.options;C.push({id:this.id,frameDoc:c.ioArgs?c.ioArgs.frameDoc:c.frameDoc});c.ioArgs&&(c.ioArgs.frameDoc=null);c.frameDoc=null}e?this.reject(e):this.resolve(a)}function y(a,c,b){var d=l.parseArgs(a,l.deepCopy({},c));a=
d.url;c=d.options;var g=l.deferred(d,r,w,c.jsonp?null:c.checkString?x:t,v);n.mixin(g,{id:p+e++,canDelete:!1});c.jsonp&&((new RegExp("[?\x26]"+c.jsonp+"\x3d")).test(a)||(a+=(~a.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+p+"_callbacks."+g.id),g.canDelete=!0,z[g.id]=function(a){d.data=a;g.handleResponse(d)});l.notify&&l.notify.emit("send",d,g.promise.cancel);if(!c.canAttach||c.canAttach(g)){var f=y._attach(g.id,a,c.frameDoc,function(a){if(!(a instanceof Error)){var e=Error("Error loading "+
(a.target?a.target.src:"script"));e.source=a;a=e}g.reject(a);y._remove(g.id,c.frameDoc,!0)});if(!c.jsonp&&!c.checkString)var k=m(f,q,function(a){if("load"===a.type||u.test(f.readyState))k.remove(),g.scriptLoaded=a})}h(g);return b?g:g.promise}a.add("script-readystatechange",function(a,e){return"undefined"!==typeof e.createElement("script").onreadystatechange&&("undefined"===typeof a.opera||"[object Opera]"!==a.opera.toString())});var p=b.id.replace(/[\/\.\-]/g,"_"),e=0,q=a("script-readystatechange")?
"readystatechange":"load",u=/complete|loaded/,z=k.global[p+"_callbacks"]={},C=[];y.get=y;y._attach=function(a,e,q,b){q=q||c.doc;var d=q.createElement("script");if(b)m.once(d,"error",b);d.type="text/javascript";try{d.src=e}catch(J){b&&b(d)}d.id=a;d.async=!0;d.charset="utf-8";return q.getElementsByTagName("head")[0].appendChild(d)};y._remove=function(a,e,c){d.destroy(g.byId(a,e));z[a]&&(c?z[a]=function(){delete z[a]}:delete z[a])};y._callbacksProperty=p+"_callbacks";return y})},"dojo/text":function(){define(["./_base/kernel",
"require","./has","./has!host-browser?./request"],function(b,h,l,k){var f;l("host-browser")?f=function(a,c,d){k(a,{sync:!!c,headers:{"X-Requested-With":null}}).then(d)}:h.getText?f=h.getText:console.error("dojo/text plugin failed to load because loader does not support getText");var n={},m=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(a=c[1])}else a="";return a},g={},d={};b.cache=function(a,c,
d){var b;"string"==typeof a?/\//.test(a)?(b=a,d=c):b=h.toUrl(a.replace(/\./g,"/")+(c?"/"+c:"")):(b=a+"",d=c);a=void 0!=d&&"string"!=typeof d?d.value:d;d=d&&d.sanitize;if("string"==typeof a)return n[b]=a,d?m(a):a;if(null===a)return delete n[b],null;b in n||f(b,!0,function(a){n[b]=a});return d?m(n[b]):n[b]};return{dynamic:!0,normalize:function(a,c){a=a.split("!");var d=a[0];return(/^\./.test(d)?c(d):d)+(a[1]?"!"+a[1]:"")},load:function(a,c,b){a=a.split("!");var k=1<a.length,r=a[0],h=c.toUrl(a[0]);a=
"url:"+h;var v=g,y=function(a){b(k?m(a):a)};r in n?v=n[r]:c.cache&&a in c.cache?v=c.cache[a]:h in n&&(v=n[h]);if(v===g)if(d[h])d[h].push(y);else{var p=d[h]=[y];f(h,!c.async,function(a){n[r]=n[h]=a;for(var e=0;e<p.length;)p[e++](a);delete d[h]})}else y(v)}}})},"esri/core/sniff":function(){define(["dojo/_base/window","dojo/sniff","../kernel"],function(b,h,l){function k(){if(t)return t;t={available:!1,version:0,supportsHighPrecisionFragment:!1};var a=function(a,e){for(var c=["webgl","experimental-webgl",
"webkit-3d","moz-webgl"],d=null,b=0;b<c.length;++b){try{d=a.getContext(c[b],e)}catch(C){}if(d)break}return d},c;try{if(!r.WebGLRenderingContext)throw 0;c=document.createElement("canvas")}catch(p){return t}var d=a(c,{failIfMajorPerformanceCaveat:!0});!d&&(d=a(c))&&(t.majorPerformanceCaveat=!0);if(!d)return t;a=d.getParameter(d.VERSION);if(!a)return t;if(a=a.match(/^WebGL\s+([\d.]*)/))t.version=parseFloat(a[1]),t.available=.94<=t.version,a=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT),
t.supportsHighPrecisionFragment=a&&0<a.precision,t.supportsVertexShaderSamplers=0<d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),t.supportsElementIndexUint=null!=d.getExtension("OES_element_index_uint");return t}var f=h("ff"),n=h("ie"),m=void 0===n&&7<=h("trident"),g=h("webkit"),d=h("opera"),a=h("chrome"),c=h("safari"),r=b.global;b=navigator.userAgent;var w;(w=b.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i))&&h.add("esri-iphone",parseFloat(w[2].replace("_",".")));(w=b.match(/Android\s+(\d+\.\d+)/i))&&
h.add("esri-android",parseFloat(w[1]));(w=b.match(/Fennec\/(\d+\.\d+)/i))&&h.add("esri-fennec",parseFloat(w[1]));0<=b.indexOf("BlackBerry")&&0<=b.indexOf("WebKit")&&h.add("esri-blackberry",1);h.add("esri-touch",h("esri-iphone")||h("esri-android")||h("esri-blackberry")||6<=h("esri-fennec")||(f||g)&&document.createTouch?!0:!1);(w=b.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i))&&h.add("esri-mobile",w);h.add("esri-pointer",navigator.pointerEnabled||navigator.msPointerEnabled);
l._getDOMAccessor=function(a){var c="";f?c="Moz":g?c="Webkit":n?c="ms":d&&(c="O");return c+a.charAt(0).toUpperCase()+a.substr(1)};h.add("esri-phonegap",!!r.cordova);h.add("esri-cors",h("esri-phonegap")||"XMLHttpRequest"in r&&"withCredentials"in new XMLHttpRequest);h.add("esri-canvas-svg-support",function(){return!(h("trident")||h("ie"))});if(h("host-webworker"))return h;h.add("esri-workers","Worker"in r);h.add("esri-script-sandbox",function(){return"MessageChannel"in r&&"HTMLIFrameElement"in r&&"sandbox"in
HTMLIFrameElement.prototype});h.add("esri-transforms",m||9<=n||3.5<=f||4<=a||3.1<=c||10.5<=d||3.2<=h("esri-iphone")||2.1<=h("esri-android"));h.add("esri-transitions",m||10<=n||4<=f||4<=a||3.1<=c||10.5<=d||3.2<=h("esri-iphone")||2.1<=h("esri-android"));h.add("esri-transforms3d",m||10<=f||12<=a||4<=c||3.2<=h("esri-iphone")||3<=h("esri-android"));h.add("esri-url-encodes-apostrophe",function(){var a=r.document.createElement("a");a.href="?'";return-1<a.href.indexOf("?%27")});3>h("esri-android")&&(h.add("esri-transforms",
!1,!1,!0),h.add("esri-transitions",!1,!1,!0),h.add("esri-transforms3d",!1,!1,!0));l._css=function(b){var r=h("esri-transforms3d");void 0!==b&&null!==b?r=b:r&&(a||c&&!h("esri-iphone"))&&(r=!1);var k=r?"translate3d(":"translate(",p=r?a?",-1px)":",0px)":")",e=r?"scale3d(":"scale(",q=r?",1)":")",u=r?"rotate3d(0,0,1,":"rotate(",m=r?"matrix3d(":"matrix(",t=r?",0,0,":",",w=r?",0,0,0,0,1,0,":",",x=r?",0,1)":")";return{names:{transition:g&&"-webkit-transition"||f&&"MozTransition"||d&&"OTransition"||n&&"msTransition"||
"transition",transform:g&&"-webkit-transform"||f&&"MozTransform"||d&&"OTransform"||n&&"msTransform"||"transform",transformName:g&&"-webkit-transform"||f&&"-moz-transform"||d&&"-o-transform"||n&&"-ms-transform"||"transform",origin:g&&"-webkit-transform-origin"||f&&"MozTransformOrigin"||d&&"OTransformOrigin"||n&&"msTransformOrigin"||"transformOrigin",endEvent:g&&"webkitTransitionEnd"||f&&"transitionend"||d&&"oTransitionEnd"||n&&"MSTransitionEnd"||"transitionend"},translate:function(a,e){return k+a+
"px,"+e+"px"+p},scale:function(a){return e+a+","+a+q},rotate:function(a){return u+a+"deg)"},matrix:function(a){return a.m?(a=a.m,m+a[0].toFixed(10)+","+a[1].toFixed(10)+t+a[2].toFixed(10)+","+a[3].toFixed(10)+w+a[4].toFixed(10)+(f?"px,":",")+a[5].toFixed(10)+(f?"px":"")+x):m+a.xx.toFixed(10)+","+a.yx.toFixed(10)+t+a.xy.toFixed(10)+","+a.yy.toFixed(10)+w+a.dx.toFixed(10)+(f?"px,":",")+a.dy.toFixed(10)+(f?"px":"")+x},matrix3d:function(a){a=a.m;return"matrix3d("+a[0].toFixed(10)+","+a[1].toFixed(10)+
",0,0,"+a[2].toFixed(10)+","+a[3].toFixed(10)+",0,0,0,0,1,0,"+a[4].toFixed(10)+","+a[5].toFixed(10)+",0,1)"},getScaleFromMatrix:function(a){if(!a)return 1;a=a.toLowerCase();var e=-1<a.indexOf("matrix3d")?"matrix3d(":"matrix(";return Number(a.substring(e.length,a.indexOf(",")))}}};var t;h.add("esri-webgl",function(){return!!k().available});h.add("esri-webgl-high-precision-fragment",function(){return!!k().supportsHighPrecisionFragment});h.add("esri-webgl-vertex-shader-samplers",function(){return!!k().supportsVertexShaderSamplers});
h.add("esri-webgl-element-index-uint",function(){return!!k().supportsElementIndexUint});h.add("esri-webgl-major-performance-caveat",function(){return!!k().majorPerformanceCaveat});return h})},"esri/kernel":function(){define(["require","./core/requireUtils","dojo/main","dojo/has"],function(b,h,l,k){(function(){var b=l.config,n=b.has&&void 0!==b.has["config-deferredInstrumentation"],m=b.has&&void 0!==b.has["config-useDeferredInstrumentation"];void 0!==b.useDeferredInstrumentation||n||m||(k.add("config-deferredInstrumentation",
!1,!0,!0),k.add("config-useDeferredInstrumentation",!1,!0,!0))})();return{version:"4.5",workerMessages:{request:function(f){return h.when(b,"./request").then(function(b){var k=f.options||{};k.responseType="array-buffer";return b(f.url,k)}).then(function(b){return{data:{data:b.data,ssl:b.ssl},buffers:[b.data]}}).otherwise(function(b){throw b.toJSON();})}}}})},"esri/core/requireUtils":function(){define(["require","exports","dojo/Deferred"],function(b,h,l){function k(b,n){if(Array.isArray(n)){var f=
new l;b(n,function(){for(var b=[],d=0;d<arguments.length;d++)b[d]=arguments[d];f.resolve(b)});return f.promise}return k(b,[n]).then(function(b){return b[0]})}Object.defineProperty(h,"__esModule",{value:!0});h.when=k;h.getAbsMid=function(b,k,m){return k.toAbsMid?k.toAbsMid(b):m.id.replace(/\/[^\/]*$/ig,"/")+b}})},"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 require ./has!host-browser?./_base/browser require".split(" "),
function(b,h,l,k,f,n,m,g){m.isDebug&&l(["./_firebug/firebug"]);return b})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(b,h,l){function k(a,e){throw Error("declare"+(e?" "+e:"")+": "+a);}function f(a,e){for(var c=[],q=[{cls:0,refs:[]}],b={},d=1,p=a.length,g=0,u,f,r,n,m;g<p;++g){(u=a[g])?"[object Function]"!=z.call(u)&&k("mixin #"+g+" is not a callable constructor.",e):k("mixin #"+g+" is unknown. Did you use dojo.require to pull it in?",e);f=u._meta?u._meta.bases:
[u];r=0;for(u=f.length-1;0<=u;--u)n=f[u].prototype,n.hasOwnProperty("declaredClass")||(n.declaredClass="uniqName_"+B++),n=n.declaredClass,b.hasOwnProperty(n)||(b[n]={count:0,refs:[],cls:f[u]},++d),n=b[n],r&&r!==n&&(n.refs.push(r),++r.count),r=n;++r.count;q[0].refs.push(r)}for(;q.length;){r=q.pop();c.push(r.cls);for(--d;m=r.refs,1==m.length;){r=m[0];if(!r||--r.count){r=0;break}c.push(r.cls);--d}if(r)for(g=0,p=m.length;g<p;++g)r=m[g],--r.count||q.push(r)}d&&k("can't build consistent linearization",
e);u=a[0];c[0]=u?u._meta&&u===c[c.length-u._meta.bases.length]?u._meta.bases.length:1:0;return c}function n(a,e,c,q){var b,d,p,g,f,r,n=this._inherited=this._inherited||{};"string"===typeof a&&(b=a,a=e,e=c,c=q);if("function"===typeof a)p=a,a=e,e=c;else try{p=a.callee}catch(da){if(da instanceof TypeError)k("strict mode inherited() requires the caller function to be passed before arguments",this.declaredClass);else throw da;}(b=b||p.nom)||k("can't deduce a name to call inherited()",this.declaredClass);
c=q=0;g=this.constructor._meta;q=g.bases;r=n.p;if("constructor"!=b){if(n.c!==p&&(r=0,f=q[0],g=f._meta,g.hidden[b]!==p)){(d=g.chains)&&"string"==typeof d[b]&&k("calling chained method with inherited: "+b,this.declaredClass);do if(g=f._meta,d=f.prototype,g&&(d[b]===p&&d.hasOwnProperty(b)||g.hidden[b]===p))break;while(f=q[++r]);r=f?r:-1}if(f=q[++r])if(d=f.prototype,f._meta&&d.hasOwnProperty(b))c=d[b];else{p=u[b];do if(d=f.prototype,(c=d[b])&&(f._meta?d.hasOwnProperty(b):c!==p))break;while(f=q[++r])}c=
f&&c||u[b]}else{if(n.c!==p&&(r=0,(g=q[0]._meta)&&g.ctor!==p)){for((d=g.chains)&&"manual"===d.constructor||k("calling chained constructor with inherited",this.declaredClass);(f=q[++r])&&(!(g=f._meta)||g.ctor!==p););r=f?r:-1}for(;(f=q[++r])&&!(c=(g=f._meta)?g.ctor:f););c=f&&c}n.c=c;n.p=r;if(c)return!0===e?c:c.apply(this,e||a)}function m(a,e,c){return"string"===typeof a?"function"===typeof e?this.__inherited(a,e,c,!0):this.__inherited(a,e,!0):"function"===typeof a?this.__inherited(a,e,!0):this.__inherited(a,
!0)}function g(a,e,c,q){var b=this.getInherited(a,e,c);if(b)return b.apply(this,q||c||e||a)}function d(a){for(var e=this.constructor._meta.bases,c=0,q=e.length;c<q;++c)if(e[c]===a)return!0;return this instanceof a}function a(a,e){for(var c in e)"constructor"!=c&&e.hasOwnProperty(c)&&(a[c]=e[c]);if(h("bug-for-in-skips-shadowed"))for(var q=l._extraNames,b=q.length;b;)c=q[--b],"constructor"!=c&&e.hasOwnProperty(c)&&(a[c]=e[c])}function c(a){e.safeMixin(this.prototype,a);return this}function r(a,c){a instanceof
Array||"function"===typeof a||(c=a,a=void 0);c=c||{};a=a||[];return e([this].concat(a),c)}function w(a,e){return function(){var c=arguments,q=c,b=c[0],d,g;g=a.length;var u;if(!(this instanceof c.callee))return p(c);if(e&&(b&&b.preamble||this.preamble))for(u=Array(a.length),u[0]=c,d=0;;){(b=c[0])&&(b=b.preamble)&&(c=b.apply(this,c)||c);b=a[d].prototype;(b=b.hasOwnProperty("preamble")&&b.preamble)&&(c=b.apply(this,c)||c);if(++d==g)break;u[d]=c}for(d=g-1;0<=d;--d)b=a[d],(b=(g=b._meta)?g.ctor:b)&&b.apply(this,
u?u[d]:c);(b=this.postscript)&&b.apply(this,q)}}function t(a,e){return function(){var c=arguments,q=c,b=c[0];if(!(this instanceof c.callee))return p(c);e&&(b&&(b=b.preamble)&&(q=b.apply(this,q)||q),(b=this.preamble)&&b.apply(this,q));a&&a.apply(this,c);(b=this.postscript)&&b.apply(this,c)}}function x(a){return function(){var e=arguments,c=0,q,b;if(!(this instanceof e.callee))return p(e);for(;q=a[c];++c)if(q=(b=q._meta)?b.ctor:q){q.apply(this,e);break}(q=this.postscript)&&q.apply(this,e)}}function v(a,
e,c){return function(){var q,b,d=0,p=1;c&&(d=e.length-1,p=-1);for(;q=e[d];d+=p)b=q._meta,(q=(b?b.hidden:q.prototype)[a])&&q.apply(this,arguments)}}function y(a){C.prototype=a.prototype;a=new C;C.prototype=null;return a}function p(a){var e=a.callee,c=y(e);e.apply(c,a);return c}function e(b,p,g){"string"!=typeof b&&(g=p,p=b,b="");g=g||{};var C,B,D,E,I,G,S,O=1,da=p;"[object Array]"==z.call(p)?(G=f(p,b),D=G[0],O=G.length-D,p=G[O]):(G=[0],p?"[object Function]"==z.call(p)?(D=p._meta,G=G.concat(D?D.bases:
p)):k("base class is not a callable constructor.",b):null!==p&&k("unknown base class. Did you use dojo.require to pull it in?",b));if(p)for(B=O-1;;--B){C=y(p);if(!B)break;D=G[B];(D._meta?a:q)(C,D.prototype);E=h("csp-restrictions")?function(){}:new Function;E.superclass=p;E.prototype=C;p=C.constructor=E}else C={};e.safeMixin(C,g);D=g.constructor;D!==u.constructor&&(D.nom="constructor",C.constructor=D);for(B=O-1;B;--B)(D=G[B]._meta)&&D.chains&&(S=q(S||{},D.chains));C["-chains-"]&&(S=q(S||{},C["-chains-"]));
p&&p.prototype&&p.prototype["-chains-"]&&(S=q(S||{},p.prototype["-chains-"]));D=!S||!S.hasOwnProperty("constructor");G[0]=E=S&&"manual"===S.constructor?x(G):1==G.length?t(g.constructor,D):w(G,D);E._meta={bases:G,hidden:g,chains:S,parents:da,ctor:g.constructor};E.superclass=p&&p.prototype;E.extend=c;E.createSubclass=r;E.prototype=C;C.constructor=E;C.getInherited=m;C.isInstanceOf=d;C.inherited=F;C.__inherited=n;b&&(C.declaredClass=b,l.setObject(b,E));if(S)for(I in S)C[I]&&"string"==typeof S[I]&&"constructor"!=
I&&(D=C[I]=v(I,G,"after"===S[I]),D.nom=I);return E}var q=l.mixin,u=Object.prototype,z=u.toString,C,B=0;C=h("csp-restrictions")?function(){}:new Function;var F=b.config.isDebug?g:n;b.safeMixin=e.safeMixin=function(a,e){var c,q;for(c in e)q=e[c],q===u[c]&&c in u||"constructor"==c||("[object Function]"==z.call(q)&&(q.nom=c),a[c]=q);if(h("bug-for-in-skips-shadowed")&&e)for(var b=l._extraNames,d=b.length;d;)c=b[--d],q=e[c],q===u[c]&&c in u||"constructor"==c||("[object Function]"==z.call(q)&&(q.nom=c),
a[c]=q);return a};return b.declare=e})},"esri/Map":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/Accessor ./core/CollectionFlattener ./core/Evented ./core/Logger ./support/LayersMixin ./Basemap ./Ground ./support/basemapUtils ./support/groundUtils ./core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w,t){var x=g.getLogger("esri.Map");return function(b){function d(a){a=b.call(this)||this;a.basemap=null;a.ground=
new c;a._basemapCache=r.createCache();return a}l(d,b);Object.defineProperty(d.prototype,"allLayers",{get:function(){return new n({root:this,rootCollectionNames:["basemap.baseLayers","ground.layers","layers","basemap.referenceLayers"],getChildrenFunction:function(a){return a.layers}})},enumerable:!0,configurable:!0});d.prototype.castBasemap=function(a){return r.ensureType(a,this._basemapCache)};d.prototype.castGround=function(a){a=w.ensureType(a);return a?a:(x.error("Map.ground may not be set to null or undefined"),
this._get("ground"))};k([t.property({readOnly:!0})],d.prototype,"allLayers",null);k([t.property({type:a})],d.prototype,"basemap",void 0);k([t.cast("basemap")],d.prototype,"castBasemap",null);k([t.property({type:c})],d.prototype,"ground",void 0);k([t.cast("ground")],d.prototype,"castGround",null);return d=k([t.subclass("esri.Map")],d)}(t.declared(f,m,d))})},"esri/core/tsSupport/declareExtendsHelper":function(){define(["require","exports"],function(b,h){return function(b,k){b.__bases__=k.__bases__}})},
"esri/core/tsSupport/decorateHelper":function(){define([],function(){return function(b,h,l,k){var f=arguments.length,n=3>f?h:null===k?k=Object.getOwnPropertyDescriptor(h,l):k,m;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)n=Reflect.decorate(b,h,l,k);else for(var g=b.length-1;0<=g;g--)if(m=b[g])n=(3>f?m(n):3<f?m(h,l,n):m(h,l))||n;return 3<f&&n&&Object.defineProperty(h,l,n),n}})},"esri/core/Accessor":function(){define("./declare ./accessorSupport/Properties ./accessorSupport/get ./accessorSupport/introspection ./accessorSupport/set ./accessorSupport/watch".split(" "),
function(b,h,l,k,f,n){h=h.default;b.before(function(g,d){b.hasMixin(g,m)&&k.processPrototype(d)});b.after(function(g){b.hasMixin(g,m)&&(k.processClass(g),Object.defineProperties(g.prototype,{initialized:{get:function(){return this.__accessor__&&this.__accessor__.initialized||!1}},destroyed:{get:function(){return this.__accessor__&&this.__accessor__.destroyed||!1}}}))});var m=b(null,{declaredClass:"esri.core.Accessor","-chains-":{initialize:"after",destroy:"before"},constructor:function(){if(this.constructor===
m)throw Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{value:new h(this)});if(0<arguments.length&&this.normalizeCtorArgs){for(var b=[],d=0;d<arguments.length;d++)b.push(arguments[d]);this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,b)}},__accessor__:null,postscript:function(b){var d=this.__accessor__;b=d.ctorArgs||b;var a;null!=this.getDefaults&&(a=this.getDefaults(b||{}),this.set(a));d.initialize();
b&&(this.set(b),d.ctorArgs=null);d.constructed();this.initialize()},initialize:function(){},destroy:function(){if(this.destroyed)try{throw Error("instance is already destroyed");}catch(g){console.warn(g.stack)}else n.removeTarget(this),this.__accessor__.destroy()},get:function(b){return l.get(this,b)},hasOwnProperty:function(b){return this.__accessor__?this.__accessor__.has(b):Object.prototype.hasOwnProperty.call(this,b)},keys:function(){return this.__accessor__?this.__accessor__.keys():[]},set:function(b,
d){f.set(this,b,d);return this},watch:function(b,d,a){return n.watch(this,b,d,a)},_clearOverride:function(b){return this.__accessor__.clearOverride(b)},_override:function(b,d){return this.__accessor__.override(b,d)},_isOverridden:function(b){return this.__accessor__.isOverridden(b)},notifyChange:function(b){this.__accessor__.propertyInvalidated(b)},_get:function(b){return this.__accessor__.internalGet(b)},_set:function(b,d){return this.__accessor__.internalSet(b,d)}});return m})},"esri/core/declare":function(){define(["require",
"exports","dojo/_base/declare"],function(b,h,l){function k(b,d){b&&!Array.isArray(b)&&"function"!==typeof b&&(d=b,b=null);b=b||[];d=d||{};return f([this].concat(b),d)}function f(b,d){b&&!Array.isArray(b)&&"function"!==typeof b&&(d=b,b=null);"function"===typeof b?b=[b]:b||(b=[]);d=d||{};var a,c;a=0;for(c=n.length;a<c;a++)n[a](b,d);b=l(b,d);b.createSubclass=k;a=0;for(c=m.length;a<c;a++)m[a](b);return b}var n=[],m=[];(function(b){b.hasMixin=function(b,a){b=Array.isArray(b)?b.reduce(function(a,c){return c._meta?
a.concat(c._meta.bases):a},[]):b._meta?b._meta.bases:b;if(!b)return!1;if("string"===typeof a)for(var c=b.length-1;0<=c;c--)if(b[c].prototype.declaredClass===a)return!0;return-1!==b.indexOf(a)};b.safeMixin=function(b,a){return l.safeMixin(b,a)};b.before=function(b){n.push(b)};b.after=function(b){m.push(b)}})(f||(f={}));return f})},"esri/core/accessorSupport/Properties":function(){define("require exports dojo/has ./Store ./PropertyOrigin ./extensions ../Logger".split(" "),function(b,h,l,k,f,n,m){Object.defineProperty(h,
"__esModule",{value:!0});m.getLogger("esri.core.accessorSupport.Properties");b=function(){function b(b){this.host=b;this._origin=f.OriginId.USER;this.ctorArgs=this.cursors=null;this.destroyed=!1;this.dirties={};this.lifecycle=0;this.overridden=null;this.store=new k.default;b=this.host.constructor.__accessorMetadata__;this.metadatas=b.properties;this.autoDestroy=b.autoDestroy}b.prototype.initialize=function(){this.lifecycle=1;n.instanceCreated(this.host,this.metadatas)};b.prototype.constructed=function(){this.lifecycle=
2};b.prototype.destroy=function(){this.destroyed=!0;var b=this.cursors;if(this.cursors)for(var a=0,c=Object.getOwnPropertyNames(b);a<c.length;a++){var g=c[a],f=b[g];if(f){for(;0<f.length;)f.pop().propertyDestroyed(this,g);b[g]=null}}if(this.autoDestroy)for(g in this.metadatas)(b=this.internalGet(g))&&b&&"function"===typeof b.destroy&&(b.destroy(),this.internalSet(g,null))};Object.defineProperty(b.prototype,"initialized",{get:function(){return 0!==this.lifecycle},enumerable:!0,configurable:!0});b.prototype.clearOverride=
function(b){this.isOverridden(b)&&(this.overridden[b]=!1,this.propertyInvalidated(b))};b.prototype.get=function(b){var a=this.metadatas[b];if(this.store.has(b)&&!this.dirties[b])return this.store.get(b);var c=a.get;return c?(a=c.call(this.host),this.store.set(b,a,f.OriginId.COMPUTED),this.propertyCommitted(b),a):a.value};b.prototype.originOf=function(b){var a=this.store.originOf(b);return void 0===a&&(b=this.metadatas[b])&&b.hasOwnProperty("value")?"defaults":f.idToName(a)};b.prototype.has=function(b){return this.metadatas[b]?
this.store.has(b):!1};b.prototype.internalGet=function(b){if(this.metadatas[b]){var a=this.store;return a.has(b)?a.get(b):this.metadatas[b].value}};b.prototype.internalSet=function(b,a){this.metadatas[b]&&(this.propertyInvalidated(b),this.initialized?this.store.set(b,a,this._origin):this.store.set(b,a,f.OriginId.DEFAULTS),this.propertyCommitted(b))};b.prototype.isOverridden=function(b){return null!=this.overridden&&!0===this.overridden[b]};b.prototype.keys=function(){return this.store.keys()};b.prototype.override=
function(b,a){this.metadatas[b]&&(this.overridden||(this.overridden={}),this.overridden[b]=!0,this.internalSet(b,a))};b.prototype.set=function(b,a){if(this.metadatas[b]){var c=this.metadatas[b],d=c.set;(c=c.cast)&&(a=c.call(this.host,a));d?d.call(this.host,a):this.internalSet(b,a)}};b.prototype.setDefaultOrigin=function(b){this._origin=f.nameToId(b)};b.prototype.propertyInvalidated=function(b){var a=this.dirties,c=this.isOverridden(b),d=this.cursors&&this.cursors[b],g=this.metadatas[b].computes;if(d)for(var f=
0;f<d.length;f++)d[f].propertyInvalidated(this,b);c||(a[b]=!0);if(g)for(b=0;b<g.length;b++)this.propertyInvalidated(g[b])};b.prototype.propertyCommitted=function(b){var a=this.cursors&&this.cursors[b];this.dirties[b]=!1;if(a)for(var c=0;c<a.length;c++)a[c].propertyCommitted(this,b)};b.prototype.addCursor=function(b,a){this.cursors||(this.cursors={});var c=this.cursors[b];c||(this.cursors[b]=c=[]);c.push(a)};b.prototype.removeCursor=function(b,a){var c=this.cursors[b];this.cursors[b]&&(c.splice(c.indexOf(a),
1),0===c.length&&(this.cursors[b]=null))};return b}();h.default=b})},"esri/core/accessorSupport/Store":function(){define(["require","exports","./PropertyOrigin"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});b=function(){function b(){this._values={}}b.prototype.get=function(b){return this._values[b]};b.prototype.originOf=function(b){return l.OriginId.USER};b.prototype.keys=function(){return Object.keys(this._values)};b.prototype.set=function(b,k){this._values[b]=k};b.prototype.clear=
function(b){delete this._values[b]};b.prototype.has=function(b){return b in this._values};return b}();h.default=b})},"esri/core/accessorSupport/PropertyOrigin":function(){define(["require","exports"],function(b,h){function l(b){switch(b){case "defaults":return f.DEFAULTS;case "service":return f.SERVICE;case "portal-item":return f.PORTAL_ITEM;case "web-scene":return f.WEB_SCENE;case "web-map":return f.WEB_MAP;case "user":return f.USER}}function k(b){switch(b){case f.DEFAULTS:return"defaults";case f.SERVICE:return"service";
case f.PORTAL_ITEM:return"portal-item";case f.WEB_SCENE:return"web-scene";case f.WEB_MAP:return"web-map";case f.USER:return"user"}}Object.defineProperty(h,"__esModule",{value:!0});var f;(function(b){b[b.DEFAULTS=0]="DEFAULTS";b[b.COMPUTED=1]="COMPUTED";b[b.SERVICE=2]="SERVICE";b[b.PORTAL_ITEM=3]="PORTAL_ITEM";b[b.WEB_SCENE=4]="WEB_SCENE";b[b.WEB_MAP=5]="WEB_MAP";b[b.USER=6]="USER";b[b.NUM=7]="NUM"})(f=h.OriginId||(h.OriginId={}));h.nameToId=l;h.idToName=k;h.readableNameToId=function(b){return l(b)};
h.idToReadableName=function(b){return k(b)};h.writableNameToId=function(b){return l(b)};h.idToWritableName=function(b){return k(b)}})},"esri/core/accessorSupport/extensions":function(){define(["require","exports","./extensions/aliasedProperty","./extensions/computedProperty","./extensions/serializableProperty"],function(b,h,l,k,f){Object.defineProperty(h,"__esModule",{value:!0});var n=[l.default,k.default,f.default];h.processPrototypeMetadatas=function(b,g){for(var d=Object.getOwnPropertyNames(b),
a=0;a<n.length;a++){var c=n[a];if(c.processPrototypePropertyMetadata)for(var f=0,k=d;f<k.length;f++){var m=k[f];c.processPrototypePropertyMetadata(m,b[m],b,g)}}};h.processClassMetadatas=function(b,g){for(var d=Object.getOwnPropertyNames(b),a=0;a<n.length;a++){var c=n[a];if(c.processClassPropertyMetadata)for(var f=0,k=d;f<k.length;f++){var m=k[f];c.processClassPropertyMetadata(m,b[m],b,g)}}};h.instanceCreated=function(b,g){for(var d=Object.getOwnPropertyNames(g),a=0;a<n.length;a++){var c=n[a];c.instanceCreated&&
c.instanceCreated(b,g,d)}}})},"esri/core/accessorSupport/extensions/aliasedProperty":function(){define("require exports dojo/has ../wire ../utils ../get ../set".split(" "),function(b,h,l,k,f,n,m){function g(b,a,c){var d=f.getProperties(b);return k.wire(b,c.aliasOf,function(){d.propertyInvalidated(a)})}Object.defineProperty(h,"__esModule",{value:!0});h.AliasedPropertyExtension={processClassPropertyMetadata:function(b,a,c,g){var d=a.aliasOf;if(d&&(b=d.split(".")[0],null!=c[b]&&!a.set&&!a.get)){var f;
a.get=function(){var a=n.default(this,d);if("function"===typeof a){f||(f=d.split(".").slice(0,-1).join("."));var c=n.default(this,f);c&&(a=a.bind(c))}return a};a.readOnly||(a.set=function(a){return m.default(this,d,a)})}},instanceCreated:function(b,a,c){for(var d=0;d<c.length;d++){var f=c[d],k=a[f];k.aliasOf&&g(b,f,k)}}};h.default=h.AliasedPropertyExtension})},"esri/core/accessorSupport/wire":function(){define(["require","exports","./utils"],function(b,h,l){function k(a,c,b){c=l.splitPath(c);if(Array.isArray(c)){for(var r=
[],k=0;k<c.length;k++)r.push((new f(c[k],b)).install(a));return new g(r)}a=(new f(c,b)).install(a);return new d(a)}Object.defineProperty(h,"__esModule",{value:!0});var f=function(){function a(a,b){this.path=a;this.callback=b;this.chain=null;this.path=a;-1<a.indexOf(".")&&(this.chain=l.pathToArray(a));this.callback=b;return this}a.prototype.install=function(a){a=this.chain?new m(this,a):new n(this,a);return a};a.prototype.notify=function(a){this.callback(a,this.path)};return a}(),n=function(){function a(a,
b){this.binding=a;this.target=b;l.getProperties(b).addCursor(this.binding.path,this)}a.prototype.destroy=function(){this.target&&(l.getProperties(this.target).removeCursor(this.binding.path,this),this.target=this.binding=null)};a.prototype.propertyDestroyed=function(a,b){l.getProperties(this.target).removeCursor(b,this)};a.prototype.propertyInvalidated=function(a,b){this.binding&&this.binding.notify(this.target)};a.prototype.propertyCommitted=function(a,b){this.binding&&this.binding.notify(this.target)};
return a}(),m=function(){function a(a,b){this.binding=a;this.target=b;this.stack=[];this.properties=l.getProperties(b);this.stack.push({properties:this.properties,propertyName:a.chain[0]});this.properties.addCursor(a.chain[0],this);this.moveForward();return this}a.prototype.destroy=function(){for(;;){var a=this.stack.pop();if(null==a)break;a.properties.removeCursor(a.propertyName,this)}this.target=this.binding=null};a.prototype.propertyDestroyed=function(a,b){this.moveBackward(a,b)};a.prototype.propertyInvalidated=
function(a,b){this.binding&&this.binding.notify(this.target)};a.prototype.propertyCommitted=function(a,b){this.binding&&(this.moveBackward(a,b),this.moveForward(),this.binding.notify(this.target))};a.prototype.moveBackward=function(a,b){for(var c=this.stack,d=c[c.length-1];d.properties!==a&&d.propertyName!==b;)d.properties.removeCursor(d.propertyName,this),c.pop(),d=c[c.length-1]};a.prototype.moveForward=function(){var a=this.stack,b=a[a.length-1],b=b.properties.internalGet(b.propertyName);(b=l.getProperties(b))&&
a.length<this.binding.chain.length&&(a=this.binding.chain[a.length],this.stack.push({properties:b,propertyName:a}),b.addCursor(a,this),this.moveForward())};return a}(),g=function(){function a(a){this.cursors=a}a.prototype.remove=function(){for(var a=this.cursors;0<a.length;)a.pop().destroy();this.cursors=null};return a}(),d=function(){function a(a){this.cursor=a}a.prototype.remove=function(){this.cursor.destroy();this.cursor=null};return a}();h.create=function(a,c){a=l.splitPath(a);if(Array.isArray(a)){for(var b=
[],k=0;k<a.length;k++)b.push(new f(a[k],c));return function(a){for(var c=[],d=0;d<b.length;d++)c[d]=b[d].install(a);return new g(c)}}var m=new f(a,c);return function(a){return new d(m.install(a))}};h.wire=k;h.default=k})},"esri/core/accessorSupport/utils":function(){define(["require","exports","../lang"],function(b,h,l){function k(b,d){return d?Object.keys(d).reduce(function(a,b){if("value"===b)return a[b]=d[b],a;if(void 0===a[b])return a[b]=l.clone(d[b]),a;var c=a[b],g=d[b];if(c===g)return a;if(Array.isArray(g)||
Array.isArray(a))c=c?Array.isArray(c)?a[b]=c.concat():a[b]=[c]:a[b]=[],g&&(Array.isArray(g)||(g=[g]),g.forEach(function(a){-1===c.indexOf(a)&&c.push(a)}));else if(g&&"object"===typeof g)a[b]=k(c,g);else if(!a.hasOwnProperty(b)||d.hasOwnProperty(b))a[b]=g;return a},b||{}):b}function f(b){return Array.isArray(b)?b:b.split(".")}function n(b){if(Array.isArray(b)||-1<b.indexOf(",")){b=Array.isArray(b)?b:b.split(",");for(var d=0;d<b.length;d++)b[d]=b[d].trim();return 1===b.length?b[0]:b}return b.trim()}
function m(b){var d=!1;return function(){d||(d=!0,b())}}Object.defineProperty(h,"__esModule",{value:!0});h.getProperties=function(b){return b?b.__accessor__?b.__accessor__:b.propertyInvalidated?b:null:null};h.isPropertyDeclared=function(b,d){return b&&b.metadatas&&null!=b.metadatas[d]};h.merge=k;h.pathToStringOrArray=function(b){return b?"string"===typeof b&&-1===b.indexOf(".")?b:f(b):b};h.pathToArray=f;h.splitPath=n;h.parse=function(b,d,a,c){d=n(d);if(Array.isArray(d)){var g=d.map(function(d){return c(b,
d.trim(),a)});return{remove:m(function(){return g.forEach(function(a){return a.remove()})})}}return c(b,d.trim(),a)};h.once=m})},"esri/core/lang":function(){define("dojo/_base/array dojo/_base/kernel dojo/_base/lang dojo/date dojo/number dojo/date/locale dojo/i18n!../nls/common".split(" "),function(b,h,l,k,f,n,m){function g(a){return void 0!==a&&null!==a}function d(a){return g(a)?a:""}function a(a,c,r){var p=r.match(/([^\(]+)(\([^\)]+\))?/i),e=l.trim(p[1]);r=c[a];var p=JSON.parse((p[2]?l.trim(p[2]):
"{}").replace(/^\(/,"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z\_]+)\s*:/gi,'$1"$2":').replace(/\"\s*:\s*\'/gi,'":"').replace(/\'\s*(,|\})/gi,'"$1')),q=p.utcOffset;if(-1===b.indexOf(w,e))e=l.getObject(e),l.isFunction(e)&&(r=e(r,a,c,p));else if("number"===typeof r||"string"===typeof r&&r&&!isNaN(Number(r)))switch(r=Number(r),e){case "NumberFormat":a=l.mixin({},p);c=parseFloat(a.places);if(isNaN(c)||0>c)a.places=Infinity;return f.format(r,a);case "DateString":r=new Date(r);if(p.local||p.systemLocale)return p.systemLocale?
r.toLocaleDateString()+(p.hideTime?"":" "+r.toLocaleTimeString()):r.toDateString()+(p.hideTime?"":" "+r.toTimeString());r=r.toUTCString();p.hideTime&&(r=r.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return r;case "DateFormat":return r=new Date(r),g(q)&&(r=k.add(r,"minute",r.getTimezoneOffset()-q)),n.format(r,p)}return d(r)}function c(a,b){var d;if(b)for(d in a)a.hasOwnProperty(d)&&(void 0===a[d]?delete a[d]:a[d]instanceof Object&&c(a[d],!0));else for(d in a)a.hasOwnProperty(d)&&void 0===a[d]&&
delete a[d];return a}function r(a){if(!a||"object"!=typeof a||l.isFunction(a))return a;if("function"===typeof a.clone)a=a.clone();else if("function"===typeof a.map&&"function"===typeof a.forEach)a=a.map(r);else{var b={},c,d,e={};for(c in a){d=a[c];var q=!(c in e)||e[c]!==d;if(!(c in b)||b[c]!==d&&q)b[c]=r?r(d):d}a=b}return a}var w=["NumberFormat","DateString","DateFormat"],t=/<\/?[^>]+>/g;return{equals:function(a,b){return a===b||"number"===typeof a&&isNaN(a)&&"number"===typeof b&&isNaN(b)||l.isFunction((a||
{}).getTime)&&l.isFunction((b||{}).getTime)&&a.getTime()==b.getTime()||l.isFunction((a||{}).equals)&&a.equals(b)||l.isFunction((b||{}).equals)&&b.equals(a)||!1},valueOf:function(a,b){for(var c in a)if(a[c]==b)return c;return null},stripTags:function(a){if(a){var b=typeof a;if("string"===b)a=a.replace(t,"");else if("object"===b)for(var c in a)(b=a[c])&&"string"===typeof b&&(b=b.replace(t,"")),a[c]=b}return a},substitute:function(c,f,k){var p,e,q;g(k)&&(l.isObject(k)?(p=k.first,e=k.dateFormat,q=k.numberFormat):
p=k);if(f&&"{*}"!==f)return l.replace(f,l.hitch({obj:c},function(c,p){c=p.split(":");return 1<c.length?(p=c[0],c.shift(),a(p,this.obj,c.join(":"))):e&&-1!==b.indexOf(e.properties||"",p)?a(p,this.obj,e.formatter||"DateString"):q&&-1!==b.indexOf(q.properties||"",p)?a(p,this.obj,q.formatter||"NumberFormat"):d(this.obj[p])}));f=[];var u;f.push('\x3ctable summary\x3d"'+m.fieldsSummary+'"\x3e\x3ctbody\x3e');for(u in c)if(k=c[u],e&&-1!==b.indexOf(e.properties||"",u)?k=a(u,c,e.formatter||"DateString"):q&&
-1!==b.indexOf(q.properties||"",u)&&(k=a(u,c,q.formatter||"NumberFormat")),f.push("\x3ctr\x3e\x3cth\x3e"+u+"\x3c/th\x3e\x3ctd\x3e"+d(k)+"\x3c/td\x3e\x3c/tr\x3e"),p)break;f.push("\x3c/tbody\x3e\x3c/table\x3e");return f.join("")},filter:function(a,b,c){b=[l.isString(a)?a.split(""):a,c||h.global,l.isString(b)?new Function("item","index","array",b):b];c={};var d;a=b[0];for(d in a)b[2].call(b[d],a[d],d,a)&&(c[d]=a[d]);return c},startsWith:function(a,b,c){c=c||0;return a.indexOf(b,c)===c},endsWith:function(a,
b,c){if("number"!==typeof c||!isFinite(c)||Math.floor(c)!==c||c>a.length)c=a.length;c-=b.length;a=a.indexOf(b,c);return-1!==a&&a===c},isDefined:g,fixJson:c,clone:r}})},"dojo/date":function(){define(["./has","./_base/lang"],function(b,h){var l={getDaysInMonth:function(b){var f=b.getMonth();return 1==f&&l.isLeapYear(b)?29:[31,28,31,30,31,30,31,31,30,31,30,31][f]},isLeapYear:function(b){b=b.getFullYear();return!(b%400)||!(b%4)&&!!(b%100)},getTimezoneName:function(b){var f=b.toString(),k="",m=f.indexOf("(");
if(-1<m)k=f.substring(++m,f.indexOf(")"));else if(m=/([A-Z\/]+) \d{4}$/,f=f.match(m))k=f[1];else if(f=b.toLocaleString(),m=/ ([A-Z\/]+)$/,f=f.match(m))k=f[1];return"AM"==k||"PM"==k?"":k},compare:function(b,f,n){b=new Date(+b);f=new Date(+(f||new Date));"date"==n?(b.setHours(0,0,0,0),f.setHours(0,0,0,0)):"time"==n&&(b.setFullYear(0,0,0),f.setFullYear(0,0,0));return b>f?1:b<f?-1:0},add:function(b,f,n){var k=new Date(+b),g=!1,d="Date";switch(f){case "day":break;case "weekday":var a;(f=n%5)?a=parseInt(n/
5):(f=0<n?5:-5,a=0<n?(n-5)/5:(n+5)/5);var c=b.getDay(),r=0;6==c&&0<n?r=1:0==c&&0>n&&(r=-1);c+=f;if(0==c||6==c)r=0<n?2:-2;n=7*a+f+r;break;case "year":d="FullYear";g=!0;break;case "week":n*=7;break;case "quarter":n*=3;case "month":g=!0;d="Month";break;default:d="UTC"+f.charAt(0).toUpperCase()+f.substring(1)+"s"}if(d)k["set"+d](k["get"+d]()+n);g&&k.getDate()<b.getDate()&&k.setDate(0);return k},difference:function(b,f,n){f=f||new Date;n=n||"day";var k=f.getFullYear()-b.getFullYear(),g=1;switch(n){case "quarter":b=
b.getMonth();f=f.getMonth();g=Math.floor(f/3)+1+4*k-(Math.floor(b/3)+1);break;case "weekday":k=Math.round(l.difference(b,f,"day"));n=parseInt(l.difference(b,f,"week"));if(0==k%7)k=5*n;else{var g=0,d=b.getDay(),a=f.getDay();n=parseInt(k/7);f=k%7;b=new Date(b);b.setDate(b.getDate()+7*n);b=b.getDay();if(0<k)switch(!0){case 6==d:g=-1;break;case 0==d:g=0;break;case 6==a:g=-1;break;case 0==a:g=-2;break;case 5<b+f:g=-2}else if(0>k)switch(!0){case 6==d:g=0;break;case 0==d:g=1;break;case 6==a:g=2;break;case 0==
a:g=1;break;case 0>b+f:g=2}k=k+g-2*n}g=k;break;case "year":g=k;break;case "month":g=f.getMonth()-b.getMonth()+12*k;break;case "week":g=parseInt(l.difference(b,f,"day")/7);break;case "day":g/=24;case "hour":g/=60;case "minute":g/=60;case "second":g/=1E3;case "millisecond":g*=f.getTime()-b.getTime()}return Math.round(g)}};h.mixin(h.getObject("dojo.date",!0),l);return l})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(b,h,l,k,f){var n=
{};b.setObject("dojo.number",n);n.format=function(g,d){d=b.mixin({},d||{});var a=h.normalizeLocale(d.locale),a=h.getLocalization("dojo.cldr","number",a);d.customs=a;a=d.pattern||a[(d.type||"decimal")+"Format"];return isNaN(g)||Infinity==Math.abs(g)?null:n._applyPattern(g,a,d)};n._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;n._applyPattern=function(b,d,a){a=a||{};var c=a.customs.group,g=a.customs.decimal;d=d.split(";");var f=d[0];d=d[0>b?1:0]||"-"+f;if(-1!=d.indexOf("%"))b*=100;else if(-1!=d.indexOf("\u2030"))b*=
1E3;else if(-1!=d.indexOf("\u00a4"))c=a.customs.currencyGroup||c,g=a.customs.currencyDecimal||g,d=d.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(b,c,d,p){return(b=a[["symbol","currency","displayName"][d.length-1]]||a.currency||"")?c+b+p:""});else if(-1!=d.indexOf("E"))throw Error("exponential notation not supported");var k=n._numberPatternRE,f=f.match(k);if(!f)throw Error("unable to find a number expression in pattern: "+d);!1===a.fractional&&(a.places=0);return d.replace(k,n._formatAbsolute(b,
f[0],{decimal:g,group:c,places:a.places,round:a.round}))};n.round=function(b,d,a){a=10/(a||10);return(a*+b).toFixed(d)/a};if(0==(.9).toFixed()){var m=n.round;n.round=function(b,d,a){var c=Math.pow(10,-d||0),g=Math.abs(b);if(!b||g>=c)c=0;else if(g/=c,.5>g||.95<=g)c=0;return m(b,d,a)+(0<b?c:-c)}}n._formatAbsolute=function(b,d,a){a=a||{};!0===a.places&&(a.places=0);Infinity===a.places&&(a.places=6);d=d.split(".");var c="string"==typeof a.places&&a.places.indexOf(","),g=a.places;c?g=a.places.substring(c+
1):0<=g||(g=(d[1]||[]).length);0>a.round||(b=n.round(b,g,a.round));b=String(Math.abs(b)).split(".");var f=b[1]||"";d[1]||a.places?(c&&(a.places=a.places.substring(0,c)),c=void 0!==a.places?a.places:d[1]&&d[1].lastIndexOf("0")+1,c>f.length&&(b[1]=k.pad(f,c,"0",!0)),g<f.length&&(b[1]=f.substr(0,g))):b[1]&&b.pop();g=d[0].replace(",","");c=g.indexOf("0");-1!=c&&(c=g.length-c,c>b[0].length&&(b[0]=k.pad(b[0],c)),-1==g.indexOf("#")&&(b[0]=b[0].substr(b[0].length-c)));var g=d[0].lastIndexOf(","),m,h;-1!=
g&&(m=d[0].length-g-1,d=d[0].substr(0,g),g=d.lastIndexOf(","),-1!=g&&(h=d.length-g-1));d=[];for(g=b[0];g;)c=g.length-m,d.push(0<c?g.substr(c):g),g=0<c?g.slice(0,c):"",h&&(m=h,h=void 0);b[0]=d.reverse().join(a.group||",");return b.join(a.decimal||".")};n.regexp=function(b){return n._parseInfo(b).regexp};n._parseInfo=function(b){b=b||{};var d=h.normalizeLocale(b.locale),d=h.getLocalization("dojo.cldr","number",d),a=b.pattern||d[(b.type||"decimal")+"Format"],c=d.group,g=d.decimal,k=1;if(-1!=a.indexOf("%"))k/=
100;else if(-1!=a.indexOf("\u2030"))k/=1E3;else{var m=-1!=a.indexOf("\u00a4");m&&(c=d.currencyGroup||c,g=d.currencyDecimal||g)}d=a.split(";");1==d.length&&d.push("-"+d[0]);d=f.buildGroupRE(d,function(a){a="(?:"+f.escapeString(a,".")+")";return a.replace(n._numberPatternRE,function(a){var d={signed:!1,separator:b.strict?c:[c,""],fractional:b.fractional,decimal:g,exponent:!1};a=a.split(".");var p=b.places;1==a.length&&1!=k&&(a[1]="###");1==a.length||0===p?d.fractional=!1:(void 0===p&&(p=b.pattern?a[1].lastIndexOf("0")+
1:Infinity),p&&void 0==b.fractional&&(d.fractional=!0),!b.places&&p<a[1].length&&(p+=","+a[1].length),d.places=p);a=a[0].split(",");1<a.length&&(d.groupSize=a.pop().length,1<a.length&&(d.groupSize2=a.pop().length));return"("+n._realNumberRegexp(d)+")"})},!0);m&&(d=d.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(a,c,d,p){a=f.escapeString(b[["symbol","currency","displayName"][d.length-1]]||b.currency||"");if(!a)return"";c=c?"[\\s\\xa0]":"";p=p?"[\\s\\xa0]":"";return b.strict?c+a+p:(c&&(c+=
"*"),p&&(p+="*"),"(?:"+c+a+p+")?")}));return{regexp:d.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:c,decimal:g,factor:k}};n.parse=function(b,d){d=n._parseInfo(d);b=(new RegExp("^"+d.regexp+"$")).exec(b);if(!b)return NaN;var a=b[1];if(!b[1]){if(!b[2])return NaN;a=b[2];d.factor*=-1}a=a.replace(new RegExp("["+d.group+"\\s\\xa0]","g"),"").replace(d.decimal,".");return a*d.factor};n._realNumberRegexp=function(b){b=b||{};"places"in b||(b.places=Infinity);"string"!=typeof b.decimal&&(b.decimal=".");"fractional"in
b&&!/^0/.test(b.places)||(b.fractional=[!0,!1]);"exponent"in b||(b.exponent=[!0,!1]);"eSigned"in b||(b.eSigned=[!0,!1]);var d=n._integerRegexp(b),a=f.buildGroupRE(b.fractional,function(a){var c="";a&&0!==b.places&&(c="\\"+b.decimal,c=Infinity==b.places?"(?:"+c+"\\d+)?":c+("\\d{"+b.places+"}"));return c},!0),c=f.buildGroupRE(b.exponent,function(a){return a?"([eE]"+n._integerRegexp({signed:b.eSigned})+")":""}),d=d+a;a&&(d="(?:(?:"+d+")|(?:"+a+"))");return d+c};n._integerRegexp=function(b){b=b||{};"signed"in
b||(b.signed=[!0,!1]);"separator"in b?"groupSize"in b||(b.groupSize=3):b.separator="";var d=f.buildGroupRE(b.signed,function(a){return a?"[-+]":""},!0),a=f.buildGroupRE(b.separator,function(a){if(!a)return"(?:\\d+)";a=f.escapeString(a);" "==a?a="\\s":"\u00a0"==a&&(a="\\s\\xa0");var c=b.groupSize,d=b.groupSize2;return d?(a="(?:0|[1-9]\\d{0,"+(d-1)+"}(?:["+a+"]\\d{"+d+"})*["+a+"]\\d{"+c+"})",0<c-d?"(?:"+a+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":a):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+a+"]\\d{"+c+"})*)"},!0);return d+
a};return n})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./has!host-browser?./_base/xhr ./json module".split(" "),function(b,h,l,k,f,n,m,g,d){l.add("dojo-preload-i18n-Api",1);m=b.i18n={};var a=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,c=function(a,e,b,c){var q=[b+c];e=e.split("-");for(var d="",p=0;p<e.length;p++)if(d+=(d?"-":"")+e[p],!a||a[d])q.push(b+d+"/"+c),q.specificity=d;return q},r={},w=function(a,e,c){c=c?c.toLowerCase():b.locale;
a=a.replace(/\./g,"/");e=e.replace(/\./g,"/");return/root/i.test(c)?a+"/nls/"+e:a+"/nls/"+c+"/"+e},t=b.getL10nName=function(a,e,b){return a=d.id+"!"+w(a,e,b)},x=function(a,e,b,q,d,p){a([e],function(g){var u=n.clone(g.root||g.ROOT),f=c(!g._v1x&&g,d,b,q);a(f,function(){for(var a=1;a<f.length;a++)u=n.mixin(n.clone(u),arguments[a]);r[e+"/"+d]=u;u.$locale=f.specificity;p()})})},v=function(a){var e=f.extraLocale||[],e=n.isArray(e)?e:[e];e.push(a);return e},y=function(c,d,p){var f=a.exec(c),m=f[1]+"/",h=
f[5]||f[4],t=m+h,w=(f=f[5]&&f[4])||b.locale||"",y=t+"/"+w,f=f?[w]:v(w),C=f.length,F=function(){--C||p(n.delegate(r[y]))},w=c.split("*"),B="preload"==w[1];if(l("dojo-preload-i18n-Api")){if(B&&(r[c]||(r[c]=1,u(w[2],g.parse(w[3]),1,d)),p(1)),(w=B)||(e&&q.push([c,d,p]),w=e&&!r[y]),w)return}else if(B){p(1);return}k.forEach(f,function(a){var e=t+"/"+a;l("dojo-preload-i18n-Api")&&z(e);r[e]?F():x(d,t,m,h,a,F)})};l("dojo-preload-i18n-Api");var p=m.normalizeLocale=function(a){a=a?a.toLowerCase():b.locale;return"root"==
a?"ROOT":a},e=0,q=[],u=m._preloadLocalizations=function(a,c,d,g){function u(a,e){g([a],e)}function f(a,e){for(a=a.split("-");a.length;){if(e(a.join("-")))return;a.pop()}e("ROOT")}function m(){for(--e;!e&&q.length;)y.apply(null,q.shift())}function t(b){b=p(b);f(b,function(q){if(0<=k.indexOf(c,q)){var d=a.replace(/\./g,"/")+"_"+q;e++;u(d,function(a){for(var c in a){var d=a[c],p=c.match(/(.+)\/([^\/]+)$/),u;if(p&&(u=p[2],p=p[1]+"/",d._localized)){var k;if("ROOT"===q){var t=k=d._localized;delete d._localized;
t.root=d;r[h.toAbsMid(c)]=t}else k=d._localized,r[h.toAbsMid(p+u+"/"+q)]=d;q!==b&&function(a,c,q,d){var p=[],u=[];f(b,function(e){d[e]&&(p.push(h.toAbsMid(a+e+"/"+c)),u.push(h.toAbsMid(a+c+"/"+e)))});p.length?(e++,g(p,function(){for(var e=p.length-1;0<=e;e--)q=n.mixin(n.clone(q),arguments[e]),r[u[e]]=q;r[h.toAbsMid(a+c+"/"+b)]=n.clone(q);m()})):r[h.toAbsMid(a+c+"/"+b)]=q}(p,u,d,k)}}m()});return!0}return!1})}g=g||h;t();k.forEach(b.config.extraLocale,t)},z=function(){},z=function(a){for(var e,c=a.split("/"),
q=b.global[c[0]],d=1;q&&d<c.length-1;q=q[c[d++]]);q&&((e=q[c[d]])||(e=q[c[d].replace(/-/g,"_")]),e&&(r[a]=e));return e};m.getLocalization=function(a,e,b){var c;a=w(a,e,b);y(a,h,function(a){c=a});return c};return n.mixin(m,{dynamic:!0,normalize:function(a,e){return/^\./.test(a)?e(a):a},load:y,cache:r,getL10nName:t})})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(b,h){var l=/[&<>'"\/]/g,k={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;",
"/":"\x26#x2F;"},f={};h.setObject("dojo.string",f);f.escape=function(b){return b?b.replace(l,function(b){return k[b]}):""};f.rep=function(b,f){if(0>=f||!b)return"";for(var g=[];;){f&1&&g.push(b);if(!(f>>=1))break;b+=b}return g.join("")};f.pad=function(b,k,g,d){g||(g="0");b=String(b);k=f.rep(g,Math.ceil((k-b.length)/g.length));return d?b+k:k+b};f.substitute=function(f,k,g,d){d=d||b.global;g=g?h.hitch(d,g):function(a){return a};return f.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,function(a,b,
f){if(""==b)return"$";a=h.getObject(b,!1,k);f&&(a=h.getObject(f,!1,d).call(d,a,b));f=g(a,b);if("undefined"===typeof f)throw Error('string.substitute could not find key "'+b+'" in template');return f.toString()})};f.trim=String.prototype.trim?h.trim:function(b){b=b.replace(/^\s+/,"");for(var f=b.length-1;0<=f;f--)if(/\S/.test(b.charAt(f))){b=b.substring(0,f+1);break}return b};return f})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(b,h){var l={};h.setObject("dojo.regexp",
l);l.escapeString=function(b,f){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(b){return f&&-1!=f.indexOf(b)?b:"\\"+b})};l.buildGroupRE=function(b,f,n){if(!(b instanceof Array))return f(b);for(var k=[],g=0;g<b.length;g++)k.push(f(b[g]));return l.group(k.join("|"),n)};l.group=function(b,f){return"("+(f?"?:":"")+b+")"};return l})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),
function(b,h,l,k,f,n,m,g,d){function a(a,b,e,c){return c.replace(/([a-z])\1*/ig,function(q){var d,p,g=q.charAt(0);q=q.length;var u=["abbr","wide","narrow"];switch(g){case "G":d=b[4>q?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":d=a.getFullYear();switch(q){case 1:break;case 2:if(!e.fullYear){d=String(d);d=d.substr(d.length-2);break}default:p=!0}break;case "Q":case "q":d=Math.ceil((a.getMonth()+1)/3);p=!0;break;case "M":case "L":d=a.getMonth();3>q?(d+=1,p=!0):(g=["months","L"==g?"standAlone":
"format",u[q-3]].join("-"),d=b[g][d]);break;case "w":d=w._getWeekOfYear(a,0);p=!0;break;case "d":d=a.getDate();p=!0;break;case "D":d=w._getDayOfYear(a);p=!0;break;case "e":case "c":if(d=a.getDay(),2>q){d=(d-k.getFirstDayOfWeek(e.locale)+8)%7;break}case "E":d=a.getDay();3>q?(d+=1,p=!0):(g=["days","c"==g?"standAlone":"format",u[q-3]].join("-"),d=b[g][d]);break;case "a":g=12>a.getHours()?"am":"pm";d=e[g]||b["dayPeriods-format-wide-"+g];break;case "h":case "H":case "K":case "k":p=a.getHours();switch(g){case "h":d=
p%12||12;break;case "H":d=p;break;case "K":d=p%12;break;case "k":d=p||24}p=!0;break;case "m":d=a.getMinutes();p=!0;break;case "s":d=a.getSeconds();p=!0;break;case "S":d=Math.round(a.getMilliseconds()*Math.pow(10,q-3));p=!0;break;case "v":case "z":if(d=w._getZone(a,!0,e))break;q=4;case "Z":g=w._getZone(a,!1,e);g=[0>=g?"+":"-",m.pad(Math.floor(Math.abs(g)/60),2),m.pad(Math.abs(g)%60,2)];4==q&&(g.splice(0,0,"GMT"),g.splice(3,0,":"));d=g.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+
c);}p&&(d=m.pad(d,q));return d})}function c(a,b,e,c){var q=function(a){return a};b=b||q;e=e||q;c=c||q;var d=a.match(/(''|[^'])+/g),p="'"==a.charAt(0);h.forEach(d,function(a,c){a?(d[c]=(p?e:b)(a.replace(/''/g,"'")),p=!p):d[c]=""});return c(d.join(""))}function r(a,b,e,c){c=n.escapeString(c);e.strict||(c=c.replace(" a"," ?a"));return c.replace(/([a-z])\1*/ig,function(c){var q;q=c.charAt(0);var d=c.length,p="",g="";e.strict?(1<d&&(p="0{"+(d-1)+"}"),2<d&&(g="0{"+(d-2)+"}")):(p="0?",g="0{0,2}");switch(q){case "y":q=
"\\d{2,4}";break;case "M":case "L":2<d?(q=b["months-"+("L"==q?"standAlone":"format")+"-"+t[d-3]].slice(0).join("|"),e.strict||(q=q.replace(/\./g,""),q="(?:"+q+")\\.?")):q="1[0-2]|"+p+"[1-9]";break;case "D":q="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+p+"[1-9][0-9]|"+g+"[1-9]";break;case "d":q="3[01]|[12]\\d|"+p+"[1-9]";break;case "w":q="[1-4][0-9]|5[0-3]|"+p+"[1-9]";break;case "E":case "e":case "c":q=".+?";break;case "h":q="1[0-2]|"+p+"[1-9]";break;case "k":q="1[01]|"+p+"\\d";break;case "H":q="1\\d|2[0-3]|"+
p+"\\d";break;case "K":q="1\\d|2[0-4]|"+p+"[1-9]";break;case "m":case "s":q="[0-5]\\d";break;case "S":q="\\d{"+d+"}";break;case "a":d=e.am||b["dayPeriods-format-wide-am"];p=e.pm||b["dayPeriods-format-wide-pm"];q=d+"|"+p;e.strict||(d!=d.toLowerCase()&&(q+="|"+d.toLowerCase()),p!=p.toLowerCase()&&(q+="|"+p.toLowerCase()),-1!=q.indexOf(".")&&(q+="|"+q.replace(/\./g,"")));q=q.replace(/\./g,"\\.");break;default:q=".*"}a&&a.push(c);return"("+q+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var w={};b.setObject(d.id.replace(/\//g,
"."),w);w._getZone=function(a,b,e){return b?l.getTimezoneName(a):a.getTimezoneOffset()};w.format=function(d,p){p=p||{};var e=f.normalizeLocale(p.locale),q=p.formatLength||"short",e=w._getGregorianBundle(e),g=[];d=b.hitch(this,a,d,e,p);if("year"==p.selector)return c(e["dateFormatItem-yyyy"]||"yyyy",d);var k;"date"!=p.selector&&(k=p.timePattern||e["timeFormat-"+q])&&g.push(c(k,d));"time"!=p.selector&&(k=p.datePattern||e["dateFormat-"+q])&&g.push(c(k,d));return 1==g.length?g[0]:e["dateTimeFormat-"+q].replace(/\'/g,
"").replace(/\{(\d+)\}/g,function(a,e){return g[e]})};w.regexp=function(a){return w._parseInfo(a).regexp};w._parseInfo=function(a){a=a||{};var d=f.normalizeLocale(a.locale),d=w._getGregorianBundle(d),e=a.formatLength||"short",q=a.datePattern||d["dateFormat-"+e],g=a.timePattern||d["timeFormat-"+e],e="date"==a.selector?q:"time"==a.selector?g:d["dateTimeFormat-"+e].replace(/\{(\d+)\}/g,function(a,e){return[g,q][e]}),k=[];return{regexp:c(e,b.hitch(this,r,k,d,a)),tokens:k,bundle:d}};w.parse=function(a,
b){var e=/[\u200E\u200F\u202A\u202E]/g,c=w._parseInfo(b),d=c.tokens,p=c.bundle;a=(new RegExp("^"+c.regexp.replace(e,"")+"$",c.strict?"":"i")).exec(a&&a.replace(e,""));if(!a)return null;var g=["abbr","wide","narrow"],f=[1970,0,1,0,0,0,0],k="";a=h.every(a,function(a,e){if(!e)return!0;var c=d[e-1];e=c.length;c=c.charAt(0);switch(c){case "y":if(2!=e&&b.strict)f[0]=a;else if(100>a)a=Number(a),c=""+(new Date).getFullYear(),e=100*c.substring(0,2),c=Math.min(Number(c.substring(2,4))+20,99),f[0]=a<c?e+a:e-
100+a;else{if(b.strict)return!1;f[0]=a}break;case "M":case "L":if(2<e){if(e=p["months-"+("L"==c?"standAlone":"format")+"-"+g[e-3]].concat(),b.strict||(a=a.replace(".","").toLowerCase(),e=h.map(e,function(a){return a.replace(".","").toLowerCase()})),a=h.indexOf(e,a),-1==a)return!1}else a--;f[1]=a;break;case "E":case "e":case "c":e=p["days-"+("c"==c?"standAlone":"format")+"-"+g[e-3]].concat();b.strict||(a=a.toLowerCase(),e=h.map(e,function(a){return a.toLowerCase()}));a=h.indexOf(e,a);if(-1==a)return!1;
break;case "D":f[1]=0;case "d":f[2]=a;break;case "a":e=b.am||p["dayPeriods-format-wide-am"];c=b.pm||p["dayPeriods-format-wide-pm"];if(!b.strict){var q=/\./g;a=a.replace(q,"").toLowerCase();e=e.replace(q,"").toLowerCase();c=c.replace(q,"").toLowerCase()}if(b.strict&&a!=e&&a!=c)return!1;k=a==c?"p":a==e?"a":"";break;case "K":24==a&&(a=0);case "h":case "H":case "k":if(23<a)return!1;f[3]=a;break;case "m":f[4]=a;break;case "s":f[5]=a;break;case "S":f[6]=a}return!0});e=+f[3];"p"===k&&12>e?f[3]=e+12:"a"===
k&&12==e&&(f[3]=0);e=new Date(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);b.strict&&e.setFullYear(f[0]);var r=d.join(""),c=-1!=r.indexOf("d"),r=-1!=r.indexOf("M");if(!a||r&&e.getMonth()>f[1]||c&&e.getDate()>f[2])return null;if(r&&e.getMonth()<f[1]||c&&e.getDate()<f[2])e=l.add(e,"hour",1);return e};var t=["abbr","wide","narrow"],x=[],v={};w.addCustomFormats=function(a,b){x.push({pkg:a,name:b});v={}};w._getGregorianBundle=function(a){if(v[a])return v[a];var c={};h.forEach(x,function(e){e=f.getLocalization(e.pkg,
e.name,a);c=b.mixin(c,e)},this);return v[a]=c};w.addCustomFormats(d.id.replace(/\/date\/locale$/,".cldr"),"gregorian");w.getNames=function(a,b,e,c){var q;c=w._getGregorianBundle(c);a=[a,e,b];"standAlone"==e&&(e=a.join("-"),q=c[e],1==q[0]&&(q=void 0));a[1]="format";return(q||c[a.join("-")]).concat()};w.isWeekend=function(a,b){b=k.getWeekend(b);a=(a||new Date).getDay();b.end<b.start&&(b.end+=7,a<b.start&&(a+=7));return a>=b.start&&a<=b.end};w._getDayOfYear=function(a){return l.difference(new Date(a.getFullYear(),
0,1,a.getHours()),a)+1};w._getWeekOfYear=function(a,b){1==arguments.length&&(b=0);var e=(new Date(a.getFullYear(),0,1)).getDay(),c=(e-b+7)%7,c=Math.floor((w._getDayOfYear(a)+c-1)/7);e==b&&c++;return c};return w})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(b,h){var l={};b.setObject("dojo.cldr.supplemental",l);l.getFirstDayOfWeek=function(b){b={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,pr: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}[l._region(b)];return void 0===b?1:b};l._region=function(b){b=h.normalizeLocale(b);b=b.split("-");var f=b[1];f?4==f.length&&(f=b[2]):f={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",fa:"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",mn:"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",ur:"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",crk:"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",khq:"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:"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",nds:"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",teo:"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"}[b[0]];return f};l.getWeekend=
function(b){var f=l._region(b);b={"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}[f];f={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[f];void 0===b&&(b=6);void 0===f&&(f=0);return{start:b,end:f}};return l})},"esri/core/accessorSupport/get":function(){define(["require","exports","./utils"],function(b,h,l){function k(b,d,a){if(null!=a.getItemAt||Array.isArray(a)){var c=parseInt(b,10);if(!isNaN(c))return Array.isArray(a)?
a[c]:a.getItemAt(c)}c=l.getProperties(a);return d?l.isPropertyDeclared(c,b)?c.get(b):a[b]:l.isPropertyDeclared(c,b)?c.internalGet(b):a[b]}function f(b,d,a,c){if(null==b)return b;if((b=k(d[c],a,b))||!(c<d.length-1))return c===d.length-1?b:f(b,d,a,c+1)}function n(b,d,a,c){void 0===a&&(a=!1);void 0===c&&(c=0);return"string"===typeof d&&-1===d.indexOf(".")?k(d,a,b):f(b,l.pathToArray(d),a,c)}function m(b,d){return n(b,d,!0)}Object.defineProperty(h,"__esModule",{value:!0});h.valueOf=n;h.get=m;h.exists=
function(b,d){return void 0!==n(d,b,!0)};h.default=m})},"esri/core/accessorSupport/set":function(){define(["require","exports","dojo/has","../Logger","./get"],function(b,h,l,k,f){function n(b,g,d){if(b&&g)if("object"===typeof g){d=0;for(var a=Object.getOwnPropertyNames(g);d<a.length;d++){var c=a[d];n(b,c,g[c])}}else"_"!==g[0]&&(-1!==g.indexOf(".")?(g=g.split("."),c=g.splice(g.length-1,1)[0],n(f.default(b,g),c,d)):b[g]=d)}Object.defineProperty(h,"__esModule",{value:!0});k.getLogger("esri.core.accessorSupport.set");
h.set=n;h.default=n})},"esri/core/Logger":function(){define(["require","exports","dojo/has"],function(b,h,l){var k={info:0,warn:1,error:2};b=function(){function b(f){void 0===f&&(f={});this.module=f.module||"";this.writer=f.writer||null;this.level=f.level||null;null!=f.enabled&&(this.enabled=!!f.enabled);b._loggers[this.module]=this;f=this.module.lastIndexOf(".");-1!==f&&(this.parent=b.getLogger(this.module.slice(0,f)))}b.prototype.log=function(b){for(var f=[],g=1;g<arguments.length;g++)f[g-1]=arguments[g];
this._isEnabled()&&this._matchLevel(b)&&(g=this._inheritedWriter())&&g.apply(void 0,[b,this.module].concat(f))};b.prototype.error=function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];this.log.apply(this,["error"].concat(b))};b.prototype.warn=function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];this.log.apply(this,["warn"].concat(b))};b.prototype.info=function(){for(var b=[],f=0;f<arguments.length;f++)b[f]=arguments[f];this.log.apply(this,["info"].concat(b))};b.prototype.getLogger=
function(f){return b.getLogger(this.module+"."+f)};b.getLogger=function(f){var k=b._loggers[f];k||(k=new b({module:f}));return k};b.prototype._parentWithMember=function(b,f){for(var g=this;g&&null==g[b];)g=g.parent;return g?g[b]:f};b.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};b.prototype._consoleWriter=function(b,f){for(var g=[],d=2;d<arguments.length;d++)g[d-2]=arguments[d];console[b].apply(console,["["+f+"]"].concat(g))};b.prototype._matchLevel=
function(b){return k[this._parentWithMember("level","error")]<=k[b]};b.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};b._loggers={};return b}();b.getLogger("esri").level="warn";return b})},"esri/core/accessorSupport/extensions/computedProperty":function(){define("require exports dojo/has ../../Logger ../utils ../wire".split(" "),function(b,h,l,k,f,n){Object.defineProperty(h,"__esModule",{value:!0});k.getLogger("esri.core.accessorSupport.extensions.computedProperty");
h.ComputedPropertyExtension={processClassPropertyMetadata:function(b,g,d,a){g.dependsOn&&(d=void 0,d=g.dependsOn.slice())&&(g.wire=n.create(d,function(a){return f.getProperties(a).propertyInvalidated(b)}))},instanceCreated:function(b,g,d){for(var a=0;a<d.length;a++){var c=g[d[a]];c.wire&&c.wire(b)}}};h.default=h.ComputedPropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty":function(){define("require exports ./serializableProperty/shorthands ./serializableProperty/originAliases ./serializableProperty/reader ./serializableProperty/writer".split(" "),
function(b,h,l,k,f,n){function m(b,d,a){var c=b&&b.json;b&&b.json&&b.json.origins&&a&&(b=b.json.origins[a.origin])&&d in b&&(c=b);return c}Object.defineProperty(h,"__esModule",{value:!0});h.originSpecificReadPropertyDefinition=function(b,d){return m(b,"read",d)};h.originSpecificWritePropertyDefinition=function(b,d){return m(b,"write",d)};h.SerializablePropertyExtension={processPrototypePropertyMetadata:function(b,d,a,c){if(l.process(d)){k.process(d);c=(a=Array.isArray(d.type))?d.type[0]:d.type;if(d.json.origins)for(var g in d.json.origins){var h=
d.json.origins[g];f.create(c,a,b,h);n.create(c,a,b,h)}f.create(c,a,b,d.json);n.create(c,a,b,d.json)}}};h.default=h.SerializablePropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty/shorthands":function(){define(["require","exports"],function(b,h){function l(b){"boolean"===typeof b.read?b.read={enabled:b.read}:"function"===typeof b.read?b.read={enabled:!0,reader:b.read}:b.read&&"object"===typeof b.read&&void 0===b.read.enabled&&(b.read.enabled=!0)}function k(b){"boolean"===
typeof b.write?b.write={enabled:b.write}:"function"===typeof b.write?b.write={enabled:!0,writer:b.write}:b.write&&"object"===typeof b.write&&void 0===b.write.enabled&&(b.write.enabled=!0)}Object.defineProperty(h,"__esModule",{value:!0});h.process=function(b){b.json||(b.json={});l(b.json);k(b.json);if(b.json.origins)for(var f in b.json.origins)l(b.json.origins[f]),k(b.json.origins[f]);return!0}})},"esri/core/accessorSupport/extensions/serializableProperty/originAliases":function(){define(["require",
"exports"],function(b,h){Object.defineProperty(h,"__esModule",{value:!0});h.process=function(b){if(b.json&&b.json.origins){var k=b.json.origins,f={portalItem:["portal-item"],webScene:["web-scene"],webMap:["web-map"],webDocument:["web-scene","web-map"],"web-document":["web-scene","web-map"]};b=function(b){if(k[b]){var g=k[b];f[b].forEach(function(b){k[b]=g});delete k[b]}};for(var h in f)b(h)}}})},"esri/core/accessorSupport/extensions/serializableProperty/reader":function(){define(["require","exports",
"dojo/_base/lang","./type"],function(b,h,l,k){function f(a,b,d,f){if(b)return m(a);if(g(a)){var c=m(a.prototype.itemType.Type);return function(b,d,g){return(b=c(b,d,g))?new a(b):b}}return n(a)}function n(a){return a.prototype.read?function(b,d,g){return null==b?b:(new a).read(b,g)}:a.fromJSON}function m(a){var b=n(a);return function(a,c,d){return null==a?a:Array.isArray(a)?a.map(function(a){return b(a,null,d)}):[b(a,null,d)]}}function g(a){return k.isCollection(a)?(a=a.prototype.itemType)&&a.Type&&
"function"===typeof a.Type?d(a.Type):!1:!1}function d(a){return!!a&&(!!a.prototype.read||!!a.fromJSON||g(a))}Object.defineProperty(h,"__esModule",{value:!0});h.create=function(a,b,g,k){(!k.read||!k.read.reader&&!1!==k.read.enabled)&&d(a)&&l.setObject("read.reader",f(a,b,g,k),k)}})},"esri/core/accessorSupport/extensions/serializableProperty/type":function(){define(["require","exports"],function(b,h){Object.defineProperty(h,"__esModule",{value:!0});h.isCollection=function(b){return!!b&&!!b.prototype.declaredClass&&
0===b.prototype.declaredClass.indexOf("esri.core.Collection")}})},"esri/core/accessorSupport/extensions/serializableProperty/writer":function(){define(["require","exports","dojo/_base/lang","./type"],function(b,h,l,k){function f(b,d,a,c){l.setObject(a,n(b,c),d)}function n(b,d){return b&&"function"===typeof b.write?b.write({},d):b&&"function"===typeof b.toJSON?b.toJSON():b}function m(b,d,a,c){null===b?b=null:b&&"function"===typeof b.map?(b=b.map(function(a){return n(a,c)}),"function"===typeof b.toArray&&
(b=b.toArray())):b=[n(b,c)];l.setObject(a,b,d)}Object.defineProperty(h,"__esModule",{value:!0});h.create=function(b,d,a,c){c.write&&!c.write.writer&&!1!==c.write.enabled&&(d||k.isCollection(b)?c.write.writer=m:c.write.writer=f)}})},"esri/core/accessorSupport/introspection":function(){define("require exports dojo/_base/lang ./utils ./metadata ./ensureType ./extensions ./decorators/cast".split(" "),function(b,h,l,k,f,n,m,g){function d(a){switch(a){case Number:return n.ensureNumber;case Boolean:return n.ensureBoolean;
case String:return n.ensureString;case Date:return n.ensureDate;default:return Array.isArray(a)?n.ensureArray(a[0]):n.ensureType(a)}}Object.defineProperty(h,"__esModule",{value:!0});var a=Object.prototype.hasOwnProperty,c=/^_([a-zA-Z0-9]+)(Getter|Setter|Reader|Writer|Caster)$/,r={Getter:"get",Setter:"set",Reader:"json.read.reader",Writer:"json.write.writer",Caster:"cast"},w=/^_(set|get)([a-zA-Z0-9]+)Attr$/;h.processPrototype=function(b){for(var g=b.declaredClass,h=b.properties||{},t=0,p=Object.getOwnPropertyNames(h);t<
p.length;t++){var e=p[t],q=h[e],u=typeof q;null==q?f.setPropertyMetadata(b,e,{value:q}):Array.isArray(q)?f.setPropertyMetadata(b,e,{type:[q[0]],value:null}):"object"===u?k.getProperties(q)||q instanceof Date?f.setPropertyMetadata(b,e,{type:q.constructor,value:q}):f.setPropertyMetadata(b,e,q):"boolean"===u?f.setPropertyMetadata(b,e,{type:Boolean,value:q}):"string"===u?f.setPropertyMetadata(b,e,{type:String,value:q}):"number"===u?f.setPropertyMetadata(b,e,{type:Number,value:q}):"function"===u&&f.setPropertyMetadata(b,
e,{type:q,value:null})}t=0;for(p=Object.getOwnPropertyNames(b);t<p.length;t++){var u=p[t],q=b[u],h=e=void 0,z=c.exec(u);if(z)e=z[1],h=r[z[2]];else if(z=w.exec(u))e=z[2][0].toLowerCase()+z[2].substr(1),h=z[1].toLowerCase();e&&h&&(e=f.getPropertyMetadata(b,e),l.setObject(h,q,e))}t=0;for(p=Object.getOwnPropertyNames(f.getPropertiesMetadata(b));t<p.length;t++)e=p[t],q=f.getPropertyMetadata(b,e),h=q.type,u=q.types,void 0===q.value&&a.call(b,e)&&(q.value=b[e]),!q.cast&&h?q.cast=d(h):!q.cast&&u&&(Array.isArray(u)?
q.cast=n.ensureArrayTyped(n.ensureOneOfType(u[0])):q.cast=n.ensureOneOfType(u));m.processPrototypeMetadatas(f.getPropertiesMetadata(b),g);return f.getPropertiesMetadata(b)};h.processClass=function(a){for(var b=a.prototype,c=b.declaredClass,d=a._meta.bases,p={},e=d.length-1;0<=e;e--)k.merge(p,f.getMetadata(d[e].prototype));var q=p.properties;m.processClassMetadatas(q,c);Object.defineProperty(a,"__accessorMetadata__",{value:{properties:q,autoDestroy:!!p.autoDestroy}});for(var u={},c=function(a){var e=
q[a];u[a]={enumerable:!0,configurable:!0,get:function(){return this.__accessor__?this.__accessor__.get(a):e.value},set:function(b){var c=this.__accessor__;if(!c)Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b});else if(!Object.isFrozen(this)){if(c.initialized&&e.readOnly)throw new TypeError("[accessor] cannot assign to read-only property '"+a+"' of "+this.declaredClass);if(2===c.lifecycle&&e.constructOnly)throw new TypeError("[accessor] cannot assign to construct-only property '"+
a+"' of "+this.declaredClass);c.set(a,b)}}}},d=0,e=Object.getOwnPropertyNames(q);d<e.length;d++)c(e[d]);Object.defineProperties(a.prototype,u);if(p.parameters)for(a=0,c=Object.getOwnPropertyNames(p.parameters);a<c.length;a++)d=c[a],e=Object.getOwnPropertyDescriptor(b,d)||{value:b[d]},(e=g.autocastMethod(b,d,e))&&Object.defineProperty(b,d,e);return p}})},"esri/core/accessorSupport/metadata":function(){define(["require","exports"],function(b,h){function l(b){return null!=b.__accessorMetadata__}function k(b){return l(b)&&
null!=f(b).properties}function f(b){b.__accessorMetadata__||Object.defineProperty(b,"__accessorMetadata__",{value:{},enumerable:!0,configurable:!0,writable:!0});return b.__accessorMetadata__}function n(b){b=f(b);var d=b.properties;d||(d=b.properties={});return d}function m(b,d){var a=f(b);b=a.parameters;b||(b=a.parameters={});a=b[d];a||(a=[],b[d]=a);return a}Object.defineProperty(h,"__esModule",{value:!0});h.hasMetadata=l;h.hasPropertiesMetadata=k;h.hasPropertyMetadata=function(b,d){return k(b)&&
null!=n(b)[d]};h.hasParametersMetadata=function(b,d){return l(b)&&null!=f(b).parameters&&null!=f(b).parameters[d]};h.getMetadata=f;h.getPropertiesMetadata=n;h.getPropertyMetadata=function(b,d){b=n(b);var a=b[d];a||(a=b[d]={});return a};h.setPropertyMetadata=function(b,d,a){n(b)[d]=a};h.getParametersMetadata=m;h.getParameterMetadata=function(b,d,a){var c=m(b,d)[a];c||(m(b,d)[a]=c={index:a});return c}})},"esri/core/accessorSupport/ensureType":function(){define(["require","exports","../Logger"],function(b,
h,l){function k(a,b){return b.isInstanceOf?b.isInstanceOf(a):b instanceof a}function f(a){return a&&a.constructor&&void 0!==a.constructor._meta}function n(a,b){return null!=b&&a&&!k(a,b)}function m(a){return a&&a.prototype&&a.prototype.declaredClass||"unknown"}function g(b,d){if(1===arguments.length)return g.bind(null,b);n(b,d)&&(f(d)?a.error("Accessor#set","Assigning an instance of '"+(d.declaredClass||"unknown")+"' which is not a subclass of '"+m(b)+"'"):d=new b(d));return d}function d(a,b){return 1===
arguments.length?d.bind(null,a):b?Array.isArray(b)?b.map(a):[a(b)]:b}Object.defineProperty(h,"__esModule",{value:!0});var a=l.getLogger("esri.core.Accessor");h.isInstanceOf=k;h.ensureDate=function(a){return null==a?a:new Date(a)};h.ensureBoolean=function(a){return!0===a||!1===a?a:!!a};h.ensureString=function(a){return null==a?a:a.toString()};h.ensureNumber=function(a){return null==a?a:parseFloat(a)};h.isClassedType=f;h.requiresType=n;h.ensureType=g;h.ensureArrayTyped=d;h.ensureArray=function(a,b){return 1===
arguments.length?d(g.bind(null,a)):d(g.bind(null,a),b)};h.ensureOneOfType=function(b){var c={},d=[],f=[],k;for(k in b.typeMap){var h=b.typeMap[k];c[k]=g(h);d.push(m(h));f.push(k)}var l="string"===typeof b.key?function(a){return a[b.key]}:b.key;return function(p){if(b.base&&!n(b.base,p))return p;var e=c[l(p)];if(!e)return a.error("Accessor#set","Invalid property value, value needs to be a subclass of '"+m(b.base)+"' ("+("'"+d.join("', '")+"'")+"), or a plain object that can auto-cast (having .type \x3d "+
("'"+f.join("', '")+"'")+")"),null;if("string"===typeof b.key){var q={},g;for(g in p)g!==b.key&&(q[g]=p[g]);return e(q)}return e(p)}};h.default=g})},"esri/core/accessorSupport/decorators/cast":function(){define(["require","exports","../metadata","../ensureType"],function(b,h,l,k){function f(a){var b="_meta"in a?k.ensureType(a):a;return function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a.push(b);return"number"===typeof a[2]?m.apply(this,a):n.apply(this,a)}}function n(a,b,d,g){l.getPropertyMetadata(a,
b).cast=g}function m(a,b,d,g){l.getParameterMetadata(a,b,d).cast=g}function g(a){return function(b,d,g){l.getPropertyMetadata(b,a).cast=b[d]}}Object.defineProperty(h,"__esModule",{value:!0});var d=Object.prototype.toString;h.autocastMethod=function(a,b,d){if(l.hasParametersMetadata(a,b)){var c=l.getParametersMetadata(a,b).filter(function(a){return null!=a.cast});if(c.length){var g=d.value;d.value=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];for(b=0;b<c.length;b++){var d=c[b];
a[d.index]=d.cast(a[d.index])}return g.apply(this,a)};return d}console.warn("Method "+a.declaredClass+"::"+b+" is decorated with @cast but no parameters are decorated")}};h.cast=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];if(3!==a.length||"string"!==typeof a[1]){if(1===a.length&&"[object Function]"===d.call(a[0]))return f(a[0]);if(1===a.length&&"string"===typeof a[0])return g(a[0])}}})},"esri/core/accessorSupport/watch":function(){define("require exports ../Scheduler ../ObjectPool ../ArrayPool ../lang ./utils ./get ./wire".split(" "),
function(b,h,l,k,f,n,m,g,d){function a(a){p.has(a)?e.splice(e.indexOf(a),1):p.add(a);e.push(a);q||(q=l.schedule(r))}function c(a){if(!a.removed){var e=a.callback,b=a.path,c=a.oldValue,q=a.target,d=g.valueOf(q,a.propertyPath,!0);n.equals(c,d)||(a.oldValue=d,e.call(q,d,c,b,q))}}function r(){if(q){q=null;var a=e;e=y.acquire();p.clear();for(var b=y.acquire(),d=0;d<a.length;d++){var g=a[d];c(g);g.removed&&b.push(g)}for(d=0;d<e.length;d++)g=e[d],g.removed&&(b.push(g),p.delete(g),e.splice(d,1),--d);for(d=
0;d<b.length;d++)v.pool.release(b[d]);y.release(a);y.release(b)}}function w(e,b,c){var q=m.parse(e,b,c,function(e,b,c){var p=g.valueOf(e,b,!0),f,u=d.wire(e,b,function(e,b){e.__accessor__.destroyed?q.remove():(f||(f=v.pool.acquire(e,b,p,c),p=null),a(f))});return{remove:m.once(function(){u.remove();f&&(f.removed=!0,a(f),f=null);q=u=p=null})}});return q}function t(a,e,b){var c=m.parse(a,e,b,function(a,e,b){var q=g.valueOf(a,e,!0),p=!1;return d.wire(a,e,function(a,e){if(a.__accessor__.destroyed)c.remove();
else if(!p){p=!0;var d=g.valueOf(a,e,!0);n.equals(q,d)||b.call(a,d,q,e,a);q=g.valueOf(a,e,!0);p=!1}})});return c}function x(a,e,b,c){void 0===c&&(c=!1);return!a.__accessor__||a.__accessor__.destroyed?{remove:function(){}}:c?t(a,e,b):w(a,e,b)}Object.defineProperty(h,"__esModule",{value:!0});var v=function(){function a(a,e,b,c){this.target=a;this.path=e;this.oldValue=b;this.callback=c;this.removed=!1;this.propertyPath=m.pathToStringOrArray(e)}a.prototype.release=function(){this.target=this.path=this.propertyPath=
this.callback=this.oldValue=null;this.removed=!0};a.pool=new k(a,!0);return a}(),y=new f,p=new Set,e=y.acquire(),q;h.dispatchTarget=function(a){for(var b=y.copy(e),q=0;q<b.length;q++){var d=b[q];d.target===a&&(c(d),p.delete(d),e.splice(e.indexOf(d),1))}};h.removeTarget=function(a){for(var b=0;b<e.length;b++){var c=e[b];c.target===a&&(c.removed=!0)}};h.dispatch=r;h.watch=x;h.default=x})},"esri/core/Scheduler":function(){define(["./ArrayPool","./ObjectPool","./nextTick","./requestAnimationFrame","./now"],
function(b,h,l,k,f){var n=["prepare","preRender","render","postRender","update"],m=new h(function(){this.isActive=!0;this.callback=null},!0,function(a){a.isActive=!1;a.callback=null}),g=function(){},d=function(){this.item.isActive=!1;c.release(this)},a={time:0,deltaTime:0,spendInFrame:0,spendInTask:0},c=new h(function(){this.remove=d;this.item=null},!0,function(a){a.remove=g;a.item=null});h=function(){this._boundDispatch=this._dispatch.bind(this);this.willDispatch=!1;this._queue=b.acquire();this._frameTasks=
b.acquire();this._phaseTasks={};this._previousFrameTime=-1;for(var a=0;a<n.length;a++)this._phaseTasks[n[a]]=b.acquire();this._boundAnimationFrame=this._animationFrame.bind(this);this.executing=!1;this._animationFrameRequestId=null};h.prototype={schedule:function(a){var b=m.acquire();b.callback=a;this._schedule(b);a=c.acquire();a.item=b;return a},_dispatch:function(){for(var a=this._queue;a.length;){var b=a.shift();b.isActive&&(b.isActive=!1,b.callback())}this.willDispatch=!1},_schedule:function(a){this._queue.push(a);
this.willDispatch||(this.willDispatch=!0,l(this._boundDispatch))},addFrameTask:function(a){var b={phases:a,paused:!1,pausedAt:0,epoch:-1,dt:0,ticks:-1,removed:!1};this._frameTasks.push(b);for(var c=0;c<n.length;c++){var d=n[c];a[d]&&this._phaseTasks[d].push(b)}this._animationFrameRequestId||(this._previousFrameTime=-1,this._requestAnimationFrame());return{isPaused:function(){return b.paused},remove:function(){b.removed=!0},pause:function(){b.paused=!0;b.pausedAt=f()},resume:function(){b.paused=!1;
-1!==b.epoch&&(b.epoch+=f()-b.pausedAt)}}},clearFrameTasks:function(){for(var a=0;a<this._frameTasks.length;a++)this._frameTasks[a].removed=!0},_purge:function(){for(var a=0;a<this._frameTasks.length;){var b=this._frameTasks[a];a++;if(b.removed){this._frameTasks.splice(a-1,1);for(var c=0;c<n.length;c++){var d=n[c];if(b.phases[d]){var d=this._phaseTasks[d],g=d.indexOf(b);-1!==g&&d.splice(g,1)}}}}},_animationFrame:function(b){this._animationFrameRequestId=null;this.executing=!0;0<this._frameTasks.length&&
this._requestAnimationFrame();b=f();0>this._previousFrameTime&&(this._previousFrameTime=b);var c=b-this._previousFrameTime;this._previousFrameTime=b;for(var d=0;d<this._frameTasks.length;d++){var g=this._frameTasks[d];-1!==g.epoch&&(g.dt=c)}for(d=0;d<n.length;d++)for(var c=n[d],k=this._phaseTasks[c],p=0;p<k.length;p++)g=k[p],g.paused||g.removed||(0===d&&g.ticks++,-1===g.epoch&&(g.epoch=b),a.time=b,a.deltaTime=g.dt,a.spendInFrame=f()-b,a.spendInTask=b-g.epoch,g.phases[c].call(g,a));this._purge();this.executing=
!1},_requestAnimationFrame:function(){this._animationFrameRequestId=k(this._boundAnimationFrame)}};var r=new h;h.schedule=function(a){return r.schedule(a)};h.addFrameTask=function(a){return r.addFrameTask(a)};h.clearFrameTasks=function(){return r.clearFrameTasks()};Object.defineProperty(h,"executing",{get:function(){return r.executing}});h.instance=r;return h})},"esri/core/ArrayPool":function(){define(["require","exports","./ObjectPool"],function(b,h,l){var k=Array.prototype.splice;b=function(){function b(b,
g){void 0===b&&(b=50);void 0===g&&(g=50);this._pool=new l(Array,!1,function(b){return b.length=0},g,b)}b.prototype.acquire=function(){return this._pool.acquire()};b.prototype.copy=function(b){var g=this.acquire();b.unshift(0,0);k.apply(g,b);b.splice(0,2);return g};b.prototype.release=function(b){this._pool.release(b)};b.acquire=function(){return f.acquire()};b.copy=function(b){return f.copy(b)};b.release=function(b){return f.release(b)};return b}();var f=new b(100);return b})},"esri/core/ObjectPool":function(){define(["require",
"exports"],function(b,h){var l=function(){return function(){}}();return function(){function b(b,k,h,g,d){void 0===g&&(g=1);void 0===d&&(d=0);this.classConstructor=b;this.acquireFunctionOrWithConstructor=k;this.releaseFunction=h;this.growthSize=g;!0===k?this.acquireFunction=this._constructorAcquireFunction:"function"===typeof k&&(this.acquireFunction=k);this._pool=Array(d);this._set=new Set;this._initialSize=d;for(b=0;b<d;b++)this._pool[b]=new this.classConstructor;this.growthSize=Math.max(g,1)}b.prototype.acquire=
function(){for(var b=[],k=0;k<arguments.length;k++)b[k]=arguments[k];k=this.classConstructor||l;if(0===this._pool.length)for(var h=this.growthSize,g=0;g<h;g++)this._pool[g]=new k;k=this._pool.shift();this.acquireFunction?this.acquireFunction.apply(this,[k].concat(b)):k&&k.acquire&&"function"===typeof k.acquire&&k.acquire.apply(k,b);this._set.delete(k);return k};b.prototype.release=function(b){b&&!this._set.has(b)&&(this.releaseFunction?this.releaseFunction(b):b&&b.release&&"function"===typeof b.release&&
b.release(),this._pool.push(b),this._set.add(b))};b.prototype.prune=function(){if(!(this._pool.length<=this._initialSize))for(var b;this._initialSize>this._pool.length;)b=this._pool.shift(),this._set.delete(b),b.dispose&&"function"===typeof b.dispose&&b.dispose()};b.prototype._constructorAcquireFunction=function(b){for(var f=[],k=1;k<arguments.length;k++)f[k-1]=arguments[k];(g=this.classConstructor).call.apply(g,[b].concat(f));var g};return b}()})},"esri/core/nextTick":function(){define(["require",
"exports","./global"],function(b,h,l){function k(){if(l.postMessage&&!l.importScripts){var b=l.onmessage,f=!0;l.onmessage=function(){f=!1};l.postMessage("","*");l.onmessage=b;return f}return!1}var f=l.MutationObserver||l.WebKitMutationObserver;return function(){var b;if(l.process&&l.process.nextTick)b=function(a){l.process.nextTick(a)};else if(l.Promise)b=function(a){l.Promise.resolve().then(a)};else if(f){var h=[],g=document.createElement("div");(new f(function(){for(;0<h.length;)h.shift()()})).observe(g,
{attributes:!0});b=function(a){h.push(a);g.setAttribute("queueStatus","1")}}else if(k()){var d=[];l.addEventListener("message",function(a){if(a.source===l&&"esri-nexttick-message"===a.data)for(a.stopPropagation();d.length;)d.shift()()},!0);b=function(a){d.push(a);l.postMessage("esri-nexttick-message","*")}}else b=l.setImmediate?function(a){return l.setImmediate(a)}:function(a){return l.setTimeout(a,0)};return b}()})},"esri/core/global":function(){define(["require","exports"],function(b,h){return function(){if("undefined"!==
typeof global)return global;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self}()})},"esri/core/requestAnimationFrame":function(){define(["require","exports","./global","dojo/sniff","./now"],function(b,h,l,k,f){b=k("ff");h=k("ie");var n=k("webkit");k=k("opera");var m=f(),g=l.requestAnimationFrame;g||(g=l[(n&&"webkit"||b&&"moz"||k&&"o"||h&&"ms")+"RequestAnimationFrame"])||(g=function(b){var a=f(),c=Math.max(0,16-(a-m)),d=l.setTimeout(function(){b(f())},c);m=a+c;return d});
return g})},"esri/core/now":function(){define(["require","exports","./global"],function(b,h,l){return function(){var b=l.performance||{};if(b.now)return function(){return b.now()};if(b.webkitNow)return function(){return b.webkitNow()};if(b.mozNow)return function(){return b.mozNow()};if(b.msNow)return function(){return b.msNow()};if(b.oNow)return function(){return b.oNow()};var f;f=b.timing&&b.timing.navigationStart?b.timing.navigationStart:Date.now();return function(){return Date.now()-f}}()})},"esri/core/CollectionFlattener":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./accessorSupport/decorators ./Collection ./HandleRegistry".split(" "),
function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a._handles=new m;a.root=null;a.refresh=a.refresh.bind(a);a.updateCollections=a.updateCollections.bind(a);return a}l(d,b);d.prototype.initialize=function(){var a=this;this._handles.add(this.rootCollectionNames.map(function(b){return a.watch("root."+b,a.updateCollections,!0)}));this.updateCollections()};d.prototype.destroy=function(){this.root=null;this.refresh();this._handles.destroy();this._handles=null};d.prototype.updateCollections=
function(){var a=this;this._collections=this.rootCollectionNames.map(function(b){return a.get("root."+b)}).filter(function(a){return null!=a});this.refresh()};d.prototype.refresh=function(){var a=this._handles;a.remove("collections");this.removeAll();for(var b=this._collections.slice(),d=0,g=this._collections;d<g.length;d++)this._processCollection(b,this,g[d]);for(d=0;d<b.length;d++)a.add(b[d].on("after-changes",this.refresh),"collections")};d.prototype._createNewInstance=function(a){return new n(a)};
d.prototype._processCollection=function(a,b,d){var c=this;d&&(a.push(d),d.forEach(function(d){d&&(b.push(d),c._processCollection(a,b,c.getChildrenFunction(d)))}))};k([f.property()],d.prototype,"rootCollectionNames",void 0);k([f.property()],d.prototype,"root",void 0);k([f.property()],d.prototype,"getChildrenFunction",void 0);return d=k([f.subclass("esri.core.CollectionFlattener")],d)}(f.declared(n))})},"esri/core/accessorSupport/decorators":function(){define("require exports ./decorators/aliasOf ./decorators/autoDestroy ./decorators/cast ./decorators/declared ./decorators/property ./decorators/reader ./decorators/shared ./decorators/subclass ./decorators/writer".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){function r(a){for(var b in a)h.hasOwnProperty(b)||(h[b]=a[b])}Object.defineProperty(h,"__esModule",{value:!0});r(l);r(k);r(f);r(n);r(m);r(g);r(d);r(a);r(c)})},"esri/core/accessorSupport/decorators/aliasOf":function(){define(["require","exports","../metadata"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});h.aliasOf=function(b){return function(f,k){l.getPropertyMetadata(f,k).aliasOf=b}}})},"esri/core/accessorSupport/decorators/autoDestroy":function(){define(["require",
"exports","../metadata"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});h.autoDestroy=function(){return function(b,f,h){l.getMetadata(b).autoDestroy=!0;return b[f]}}})},"esri/core/accessorSupport/decorators/declared":function(){define(["require","exports"],function(b,h){Object.defineProperty(h,"__esModule",{value:!0});h.declared=function(b){for(var k=[],f=1;f<arguments.length;f++)k[f-1]=arguments[f];f=function(){return this||{}};f.__bases__=[b].concat(k);return f}})},"esri/core/accessorSupport/decorators/property":function(){define("require exports dojo/has ../../Logger ../../lang ../metadata".split(" "),
function(b,h,l,k,f,n){Object.defineProperty(h,"__esModule",{value:!0});k.getLogger("esri.core.accessorSupport.decorators.property");h.property=function(b){void 0===b&&(b={});return function(g,d){var a=g.constructor.prototype;if(a!==Function.prototype){(g=Object.getOwnPropertyDescriptor(g,d))&&(g.get||g.set)?(b=f.clone(b),g.set&&(b.set=g.set),g.get&&(b.get=g.get)):g&&g.hasOwnProperty("value")&&(b=f.clone(b),b.value=g.value);d=n.getPropertyMetadata(a,d);for(var c in b)a=b[c],Array.isArray(a)?d[c]=(d[c]||
[]).concat(a):d[c]=a}}};h.propertyJSONMeta=function(b,g,d){b=n.getPropertyMetadata(b.constructor.prototype,d);b.json||(b.json={});b=b.json;void 0!==g&&(b.origins||(b.origins={}),b.origins[g]||(b.origins[g]={}),b=b.origins[g]);return b}})},"esri/core/accessorSupport/decorators/reader":function(){define(["require","exports","dojo/_base/lang","./property"],function(b,h,l,k){Object.defineProperty(h,"__esModule",{value:!0});h.reader=function(b,h,m){var g,d;void 0===h||Array.isArray(h)?(d=b,m=h,g=[void 0]):
(d=h,g=Array.isArray(b)?b:[b]);return function(a,b,f){var c=a.constructor.prototype;g.forEach(function(g){g=k.propertyJSONMeta(a,g,d);g.read&&"object"!==typeof g.read&&(g.read={});l.setObject("read.reader",c[b],g);m&&(g.read.source=(g.read.source||[]).concat(m))})}}})},"esri/core/accessorSupport/decorators/shared":function(){define(["require","exports"],function(b,h){Object.defineProperty(h,"__esModule",{value:!0});h.shared=function(b){return function(k,f){k[f]=b}}})},"esri/core/accessorSupport/decorators/subclass":function(){define(["require",
"exports","../../declare","../metadata"],function(b,h,l,k){function f(a,b){a.read&&("function"===typeof a.read?b.push(a.read):"object"===typeof a.read&&a.read.reader&&b.push(a.read.reader))}function n(a,b){a.write&&("function"===typeof a.write?b.push(a.write):"object"===typeof a.write&&a.write.writer&&b.push(a.write.writer))}function m(a){var b=[];a=k.getPropertiesMetadata(a.prototype);if(!a)return b;for(var d in a){var g=a[d];g.cast&&b.push(g.cast);g.copy&&b.push(g.copy);if(g=g.json)if(f(g,b),n(g,
b),g=g.origins)for(var h in g){var m=g[h];f(m,b);n(m,b)}}return b}function g(a){var b={values:{},descriptors:{}},d=["__bases__"],g=k.getPropertiesMetadata(a.prototype),f=m(a);Object.getOwnPropertyNames(a.prototype).filter(function(b){return-1!==d.indexOf(b)||g&&g.hasOwnProperty(b)||-1!==f.indexOf(a.prototype[b])?!1:!0}).forEach(function(c){var d=Object.getOwnPropertyDescriptor(a.prototype,c);d&&(d.get||d.set)?b.descriptors[c]=d:b.values[c]=a.prototype[c]});return b}function d(a){var b=Object.getOwnPropertyNames(a),
d=Object.getPrototypeOf(a.prototype).constructor,g=Object.getOwnPropertyNames(Function);g.push("__bases__");var f=Object.getOwnPropertyNames(d),k={values:{},descriptors:{}};b.filter(function(b){return-1!==g.indexOf(b)?!1:-1===f.indexOf(b)||d[b]!==a[b]?!0:!1}).forEach(function(b){var c=Object.getOwnPropertyDescriptor(a,b);c&&(c.get||c.set)?k.descriptors[b]=c:k.values[b]=a[b]});return k}Object.defineProperty(h,"__esModule",{value:!0});h.subclass=function(a){return function(b){var c=g(b),f=d(b);null!=
a&&(c.values.declaredClass=a);b=l(b.__bases__,c.values);Object.defineProperties(b.prototype,c.descriptors);for(var k in f.values)b[k]=f.values[k];Object.defineProperties(b,f.descriptors);return b}}})},"esri/core/accessorSupport/decorators/writer":function(){define(["require","exports","dojo/_base/lang","./property"],function(b,h,l,k){Object.defineProperty(h,"__esModule",{value:!0});h.writer=function(b,h){var f;void 0===h?(h=b,f=[void 0]):f=Array.isArray(b)?b:[b];return function(b,d,a){var c=b.constructor.prototype;
f.forEach(function(a){a=k.propertyJSONMeta(b,a,h);a.write&&"object"!==typeof a.write&&(a.write={});l.setObject("write.writer",c[d],a)})}}})},"esri/core/Collection":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper dojo/aspect ./accessorSupport/decorators ./accessorSupport/ensureType ./Accessor ./ArrayPool ./Evented ./ObjectPool ./Scheduler ./lang".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w){function t(a){return a?a.isInstanceOf&&a.isInstanceOf(F)?!0:
!1:!1}function x(a){return a?t(a)?a.toArray():a.length?Array.prototype.slice.apply(a):[]:[]}function v(a){if(a&&a.length)return a[0]}function y(a,e,b,c){e&&e.forEach(function(e,d,q){a.push(e);y(a,b.call(c,e,d,q),b,c)})}(function(){return function(){}})();b=function(){function a(){this.target=null;this.defaultPrevented=this.cancellable=!1}a.prototype.preventDefault=function(){this.cancellable&&(this.defaultPrevented=!0)};a.prototype.reset=function(a){this.defaultPrevented=!1;this.item=a};return a}();
var p=function(){},e=new c(b,!0,function(a){a.item=null;a.target=null}),q=new Set,u=new Set,z=new Set,C=new Map,B=0,F=function(a){function b(e){e=a.call(this,e)||this;e._boundDispatch=e._dispatchColChange.bind(e);e._chgListeners=[];e._notifications=null;e._timer=null;e.length=0;e._items=[];Object.defineProperty(e,"uid",{value:B++});return e}l(b,a);c=b;b.ofType=function(a){if(!a)return c;if(C.has(a))return C.get(a);var e=c.createSubclass({declaredClass:"esri.core.Collection\x3c"+("function"===typeof a?
a.prototype.declaredClass:a.base.prototype.declaredClass)+"\x3e"}),b={Type:a,ensureType:"function"===typeof a?m.ensureType(a):m.ensureOneOfType(a)};Object.defineProperty(e.prototype,"itemType",{value:b});C.set(a,e);return e};b.prototype.normalizeCtorArgs=function(a){return a?Array.isArray(a)||t(a)?{items:a}:a:{}};Object.defineProperty(b.prototype,"items",{get:function(){return this._items},set:function(a){this._emitBeforeChanges()||(this._splice.apply(this,[0,this.length].concat(x(a))),this._emitAfterChanges())},
enumerable:!0,configurable:!0});b.prototype.on=function(a,e){var b;Array.isArray(a)?b=a:-1<a.indexOf(",")&&(b=a.split(/\s*,\s*/));if(b){var c=[];for(a=0;a<b.length;a++)c.push(this.on(b[a],e));c.remove=function(){for(var a=0;a<c.length;a++)c[a].remove()};return c}if("change"===a){var d=this._chgListeners,q={removed:!1,callback:e};d.push(q);this._notifications&&this._notifications.push({listeners:d.slice(),items:this._items.slice(),changes:[]});return{remove:function(){this.remove=p;q.removed=!0;d.splice(d.indexOf(q),
1)}}}return f.after(this,"on"+a,e,!0)};b.prototype.hasEventListener=function(a){return"change"===a?0<this._chgListeners.length:this.inherited(arguments)};b.prototype.add=function(a,e){if(this._emitBeforeChanges())return this;e=this.getNextIndex(e);this._splice(e,0,a);this._emitAfterChanges();return this};b.prototype.addMany=function(a,e){void 0===e&&(e=this._items.length);if(this._emitBeforeChanges())return this;e=this.getNextIndex(e);this._splice.apply(this,[e,0].concat(x(a)));this._emitAfterChanges();
return this};b.prototype.removeAll=function(){if(!this.length||this._emitBeforeChanges())return[];var a=this._splice(0,this.length)||[];this._emitAfterChanges();return a};b.prototype.clone=function(){return this._createNewInstance({items:this._items.map(w.clone)})};b.prototype.concat=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];a=a.map(x);return this._createNewInstance({items:(b=this._items).concat.apply(b,a)});var b};b.prototype.drain=function(a,e){if(this.length&&!this._emitBeforeChanges()){for(var b=
this._splice(0,this.length),c=b.length,d=0;d<c;d++)a.call(e,b[d],d,b);this._emitAfterChanges()}};b.prototype.every=function(a,e){return this._items.every(a,e)};b.prototype.filter=function(a,e){var b;b=2===arguments.length?this._items.filter(a,e):this._items.filter(a);return this._createNewInstance({items:b})};b.prototype.find=function(a,e){if("function"!==typeof a)throw new TypeError(a+" is not a function");for(var b=this._items,c=b.length,d=0;d<c;d++){var q=b[d];if(a.call(e,q,d,b))return q}};b.prototype.findIndex=
function(a,e){if("function"!==typeof a)throw new TypeError(a+" is not a function");for(var b=this._items,c=b.length,d=0;d<c;d++)if(a.call(e,b[d],d,b))return d;return-1};b.prototype.flatten=function(a,e){var b=[];y(b,this,a,e);return new c(b)};b.prototype.forEach=function(a,e){for(var b=this._items,c=b.length,d=0;d<c;d++)a.call(e,b[d],d,b)};b.prototype.getItemAt=function(a){return this._items[a]};b.prototype.getNextIndex=function(a){var e=this.length;a=null==a?e:a;0>a?a=0:a>e&&(a=e);return a};b.prototype.includes=
function(a,e){void 0===e&&(e=0);return arguments.length?-1!==this._items.indexOf(a,e):!1};b.prototype.indexOf=function(a,e){void 0===e&&(e=0);return this._items.indexOf(a,e)};b.prototype.join=function(a){void 0===a&&(a=",");return this._items.join(a)};b.prototype.lastIndexOf=function(a,e){void 0===e&&(e=this.length-1);return this._items.lastIndexOf(a,e)};b.prototype.map=function(a,e){a=this._items.map(a,e);return new c({items:a})};b.prototype.reorder=function(a,e){void 0===e&&(e=this.length-1);var b=
this.indexOf(a);if(-1!==b){0>e?e=0:e>=this.length&&(e=this.length-1);if(b!==e){if(this._emitBeforeChanges())return a;this._splice(b,1);this._splice(e,0,a);this._emitAfterChanges()}return a}};b.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges()){var a=v(this._splice(this.length-1,1));this._emitAfterChanges();return a}};b.prototype.push=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[this.length,
0].concat(a));this._emitAfterChanges();return this.length};b.prototype.reduce=function(a,e){var b=this._items;return 2===arguments.length?b.reduce(a,e):b.reduce(a)};b.prototype.reduceRight=function(a,e){var b=this._items;return 2===arguments.length?b.reduceRight(a,e):b.reduceRight(a)};b.prototype.remove=function(a){return this.removeAt(this.indexOf(a))};b.prototype.removeAt=function(a){if(!(0>a||a>=this.length||this._emitBeforeChanges()))return a=v(this._splice(a,1)),this._emitAfterChanges(),a};b.prototype.removeMany=
function(a){if(!a||!a.length||this._emitBeforeChanges())return[];a=t(a)?a.toArray():a;for(var e=this._items,b=[],c=a.length,d=0;d<c;d++){var q=e.indexOf(a[d]);if(-1<q){for(var p=d+1,g=q+1,f=Math.min(a.length-p,e.length-g),u=0;u<f&&a[p+u]===e[g+u];)u++;p=1+u;(q=this._splice(q,p))&&0<q.length&&b.push.apply(b,q);d+=p-1}}this._emitAfterChanges();return b};b.prototype.reverse=function(){if(this._emitBeforeChanges())return this;var a=this._splice(0,this.length);a&&(a.reverse(),this._splice.apply(this,[0,
0].concat(a)));this._emitAfterChanges();return this};b.prototype.shift=function(){if(this.length&&!this._emitBeforeChanges()){var a=v(this._splice(0,1));this._emitAfterChanges();return a}};b.prototype.slice=function(a,e){void 0===a&&(a=0);void 0===e&&(e=this.length);return this._createNewInstance({items:this._items.slice(a,e)})};b.prototype.some=function(a,e){return this._items.some(a,e)};b.prototype.sort=function(a){if(!this.length||this._emitBeforeChanges())return this;var e=this._splice(0,this.length);
arguments.length?e.sort(a):e.sort();this._splice.apply(this,[0,0].concat(e));return this};b.prototype.splice=function(a,e){for(var b=[],c=2;c<arguments.length;c++)b[c-2]=arguments[c];if(this._emitBeforeChanges())return[];b=this._splice.apply(this,[a,e].concat(b))||[];this._emitAfterChanges();return b};b.prototype.toArray=function(){return this._items.slice()};b.prototype.toJSON=function(){return this.toArray()};b.prototype.toLocaleString=function(){return this._items.toLocaleString()};b.prototype.toString=
function(){return this._items.toString()};b.prototype.unshift=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[0,0].concat(a));this._emitAfterChanges();return this.length};b.prototype._createNewInstance=function(a){return new this.constructor(a)};b.prototype._splice=function(a,b){for(var c=this,d=[],q=2;q<arguments.length;q++)d[q-2]=arguments[q];var p=this._items,g=this.constructor.prototype.itemType,f,u;
!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=r.schedule(this._boundDispatch));if(b){u=p.splice(a,b);if(this.hasEventListener("before-remove")){q=e.acquire();q.target=this;q.cancellable=!0;for(var k=0,h=u.length;k<h;k++)f=u[k],q.reset(f),this.emit("before-remove",q),q.defaultPrevented&&(u.splice(k,1),p.splice(a,0,f),a+=1,--k,--h);e.release(q)}this.length=
this._items.length;if(this.hasEventListener("after-remove")){q=e.acquire();q.target=this;q.cancellable=!1;h=u.length;for(k=0;k<h;k++)q.reset(u[k]),this.emit("after-remove",q);e.release(q)}this._notifyChangeEvent(null,u)}if(d&&d.length){g&&(d=d.map(g.ensureType));if(this.hasEventListener("before-add")){var m=e.acquire();m.target=this;m.cancellable=!0;d=d.filter(function(a){m.reset(a);c.emit("before-add",m);return!m.defaultPrevented});e.release(m)}p.splice.apply(p,[a,0].concat(d));this.length=this._items.length;
if(this.hasEventListener("after-add")){q=e.acquire();q.target=this;q.cancellable=!1;p=0;for(g=d;p<g.length;p++)f=g[p],q.reset(f),this.emit("after-add",q);e.release(q)}this._notifyChangeEvent(d,null)}return u};b.prototype._emitBeforeChanges=function(){var a=!1;if(this.hasEventListener("before-changes")){var b=e.acquire();b.target=this;b.cancellable=!0;this.emit("before-changes",b);a=b.defaultPrevented;e.release(b)}return a};b.prototype._emitAfterChanges=function(){if(this.hasEventListener("after-changes")){var a=
e.acquire();a.target=this;a.cancellable=!1;this.emit("after-changes",a);e.release(a)}};b.prototype._notifyChangeEvent=function(a,e){this.hasEventListener("change")&&this._notifications[this._notifications.length-1].changes.push({added:a,removed:e})};b.prototype._dispatchColChange=function(){this._timer&&(this._timer.remove(),this._timer=null);if(this._notifications){var a=this._notifications;this._notifications=null;for(var e=function(a){var e=a.changes;q.clear();u.clear();z.clear();for(var c=0;c<
e.length;c++){var p=e[c],g=p.added,p=p.removed;if(g)if(0===z.size&&0===u.size)for(var f=0,k=g;f<k.length;f++)g=k[f],q.add(g);else for(f=0,k=g;f<k.length;f++)g=k[f],u.has(g)?(z.add(g),u.delete(g)):z.has(g)||q.add(g);if(p)if(0===z.size&&0===q.size)for(f=0;f<p.length;f++)g=p[f],u.add(g);else for(f=0;f<p.length;f++)g=p[f],q.has(g)?q.delete(g):(z.delete(g),u.add(g))}var r=d.acquire();q.forEach(function(a){r.push(a)});var h=d.acquire();u.forEach(function(a){h.push(a)});var m=b._items,n=a.items,t=d.acquire();
z.forEach(function(a){n.indexOf(a)!==m.indexOf(a)&&t.push(a)});if(a.listeners&&(r.length||h.length||t.length))for(e={target:b,added:r,removed:h,moved:t},c=a.listeners.length,g=0;g<c;g++)p=a.listeners[g],p.removed||p.callback.call(b,e);d.release(r);d.release(h);d.release(t)},b=this,c=0;c<a.length;c++)e(a[c]);q.clear();u.clear();z.clear()}};b.isCollection=t;k([n.property()],b.prototype,"length",void 0);k([n.property()],b.prototype,"items",null);return b=c=k([n.subclass("esri.core.Collection")],b);var c}(n.declared(g,
a));return F})},"esri/core/Evented":function(){define(["./declare","dojo/Evented"],function(b,h){return b(h,{declaredClass:"esri.core.Evented",hasEventListener:function(b){b="on"+b;return!(!this[b]||!this[b].after)},emit:function(b,k){if(this.hasEventListener(b))return k=k||{},k.target||(k.target=this),this.inherited(arguments,[b,k])}})})},"esri/core/HandleRegistry":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./accessorSupport/decorators ./Accessor ./Collection".split(" "),
function(b,h,l,k,f,n,m){return function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a._groups=new Map;return a}l(d,b);d.prototype.destroy=function(){this.removeAll()};Object.defineProperty(d.prototype,"size",{get:function(){var a=0;this._groups.forEach(function(b){a+=b.length});return a},enumerable:!0,configurable:!0});d.prototype.add=function(a,b){if(!this._isHandle(a)&&!Array.isArray(a)&&!m.isCollection(a))return this;var c=this._getOrCreateGroup(b);Array.isArray(a)||m.isCollection(a)?
a.forEach(function(a){return c.push(a)}):c.push(a);this.notifyChange("size");return this};d.prototype.has=function(a){return this._groups.has(this._ensureGroupKey(a))};d.prototype.remove=function(a){if(Array.isArray(a)||m.isCollection(a))return a.forEach(this.remove,this),this;if(!this.has(a))return this;for(var b=this._getGroup(a),d=0;d<b.length;d++)b[d].remove();this._deleteGroup(a);this.notifyChange("size");return this};d.prototype.removeAll=function(){this._groups.forEach(function(a){for(var b=
0;b<a.length;b++)a[b].remove()});this._groups.clear();this.notifyChange("size");return this};d.prototype._isHandle=function(a){return a&&!!a.remove};d.prototype._getOrCreateGroup=function(a){if(this.has(a))return this._getGroup(a);var b=[];this._groups.set(this._ensureGroupKey(a),b);return b};d.prototype._getGroup=function(a){return this._groups.get(this._ensureGroupKey(a))};d.prototype._deleteGroup=function(a){return this._groups.delete(this._ensureGroupKey(a))};d.prototype._ensureGroupKey=function(a){return a||
"_default_"};k([f.property({readOnly:!0})],d.prototype,"size",null);return d=k([f.subclass()],d)}(f.declared(n))})},"esri/support/LayersMixin":function(){define(["../core/Accessor","../core/Collection","../core/Logger"],function(b,h,l){var k=function(b,f,g){for(var d,a=0,c=b.length;a<c;a++)if(d=b.getItemAt(a),d[f]===g||d.layers&&(d=k(d.layers,f,g)))return d},f=l.getLogger("esri.support.LayersMixin");return b.createSubclass({declaredClass:"esri.support.LayersMixin",destroy:function(){this._layersHandle.remove();
this._layersHandle=null;this.layers.drain(this._lyrRemove,this)},properties:{layers:{type:h,get:function(){var b=this._get("layers");if(b)return b;b=new h;b.on("after-add",function(b){b=b.item;b.parent&&b.parent!==this&&b.parent.remove(b);b.parent=this;this.layerAdded(b);"elevation"===b.type&&f.error("Layer '"+b.title+", id:"+b.id+"' of type '"+b.type+"' is not supported as an operational layer and will therefore be ignored.")}.bind(this));b.on("after-remove",function(b){b=b.item;b.parent=null;this.layerRemoved(b)}.bind(this));
return b},set:function(b){var f=this._get("layers");f&&this.remove(f.toArray());this.addMany(b.toArray())}}},findLayerById:function(b){return k(this.layers,"id",b)},add:function(b,f){var g=this.layers;f=g.getNextIndex(f);b.parent===this?this.reorder(b,f):g.add(b,f)},addMany:function(b,f){var g=this.layers;f=g.getNextIndex(f);b.slice().forEach(function(b){b.parent===this?this.reorder(b,f):(g.add(b,f),f+=1)},this)},remove:function(b){return this.layers.remove(b)},removeMany:function(b){return this.layers.removeMany(b)},
removeAll:function(){return this.layers.removeAll()},reorder:function(b,f){return this.layers.reorder(b,f)},findLayerByUid:function(b){return k(this.layers,"uid",b)},layerAdded:function(b){},layerRemoved:function(b){}})})},"esri/Basemap":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./support/basemapDefinitions ./core/Collection ./core/collectionUtils ./core/Evented ./core/JSONSupport ./core/Loadable ./core/promiseUtils ./core/requireUtils ./core/urlUtils ./core/Logger ./portal/Portal ./portal/PortalItem ./layers/Layer".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e){var q=0,u=g.ofType(e),z=v.getLogger("esri.Basemap");return function(a){function e(e){e=a.call(this)||this;e.id=null;e.portalItem=null;e.thumbnailUrl=null;e.title="Basemap";e.id=Date.now().toString(16)+"-basemap-"+q++;e.baseLayers=new g;e.referenceLayers=new g;var b=function(a){"elevation"===a.type&&z.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as a basemap layer and will therefore be ignored.")};e.baseLayers.on("after-add",
function(a){return b(a.item)});e.referenceLayers.on("after-add",function(a){return b(a.item)});return e}l(e,a);c=e;e.prototype.initialize=function(){var a=this;this.otherwise(function(e){z.error("#load()","Failed to load basemap (title: '"+a.title+"', id: '"+a.id+"')",e)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};e.prototype.normalizeCtorArgs=function(a){a&&"resourceInfo"in a&&(this._set("resourceInfo",a.resourceInfo),a=n.mixin({},a),delete a.resourceInfo);return a};
Object.defineProperty(e.prototype,"baseLayers",{set:function(a){this._set("baseLayers",d.referenceSetter(a,this._get("baseLayers"),u))},enumerable:!0,configurable:!0});e.prototype.writeBaseLayers=function(a,e,b,c){var d=[];a&&(c=n.mixin({},c,{layerContainerType:"basemap"}),this.baseLayers.forEach(function(a){if(a.write){var e={};a.write(e,c)&&d.push(e)}}),this.referenceLayers.forEach(function(a){if(a.write){var e={isReference:!0};a.write(e,c)&&d.push(e)}}));e.baseMapLayers=d};Object.defineProperty(e.prototype,
"referenceLayers",{set:function(a){this._set("referenceLayers",d.referenceSetter(a,this._get("referenceLayers"),u))},enumerable:!0,configurable:!0});e.prototype.writeTitle=function(a,e){e.title=a||"Basemap"};e.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this};e.prototype.clone=function(){var a={id:this.id,title:this.title,portalItem:this.portalItem,resourceInfo:this.resourceInfo,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};
this.loaded&&(a.loadStatus="loaded");return new c(a)};e.prototype.read=function(a,e){this.resourceInfo||this._set("resourceInfo",{data:a,context:e});return this.inherited(arguments)};e.prototype.write=function(a,e){a=a||{};e&&e.origin||(e=n.mixin({origin:"web-map"},e));this.inherited(arguments,[a,e]);!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(a.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(function(a){a=n.clone(a);a.url&&x.isProtocolRelative(a.url)&&(a.url="https:"+
a.url);a.templateUrl&&x.isProtocolRelative(a.templateUrl)&&(a.templateUrl="https:"+a.templateUrl);return a}));return a};e.prototype._loadFromSource=function(){var a=this.resourceInfo,e=this.portalItem;return a?this._loadLayersFromJSON(a.data,a.context?a.context.url:null):e?this._loadFromItem(e):w.resolve(null)};e.prototype._loadLayersFromJSON=function(a,e){var c=this,d=this.resourceInfo&&this.resourceInfo.context,q=this.portalItem&&this.portalItem.portal||d&&d.portal||null,p=d&&"web-scene"===d.origin?
"web-scene":"web-map";return t.when(b,"./portal/support/layersCreator").then(function(b){var d=[];if(a.baseMapLayers&&Array.isArray(a.baseMapLayers)){var g={context:{origin:p,url:e,portal:q,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},f=b.populateOperationalLayers(c.baseLayers,a.baseMapLayers.filter(function(a){return!a.isReference}),g);d.push.apply(d,f);b=b.populateOperationalLayers(c.referenceLayers,a.baseMapLayers.filter(function(a){return a.isReference}),g);d.push.apply(d,
b)}return w.eachAlways(d)}).then(function(){})};e.prototype._loadFromItem=function(a){var e=this;return a.load().then(function(a){return a.fetchData()}).then(function(b){var c=x.urlToObject(a.itemUrl);e._set("resourceInfo",{data:b.baseMap,context:{origin:"web-map",portal:a.portal||y.getDefault(),url:c}});e.read(e.resourceInfo.data,e.resourceInfo.context);e.read({title:a.title,thumbnailUrl:a.thumbnailUrl},{origin:"portal-item",portal:a.portal||y.getDefault(),url:c});return e._loadLayersFromJSON(e.resourceInfo.data,
c)})};e.fromId=function(a){return(a=m[a])?c.fromJSON(a):null};k([f.property({type:u,json:{write:{ignoreOrigin:!0}}}),f.cast(d.castForReferenceSetter)],e.prototype,"baseLayers",null);k([f.writer("baseLayers")],e.prototype,"writeBaseLayers",null);k([f.property({json:{origins:{webScene:{write:!0}}}})],e.prototype,"id",void 0);k([f.property({type:p})],e.prototype,"portalItem",void 0);k([f.property({type:u}),f.cast(d.castForReferenceSetter)],e.prototype,"referenceLayers",null);k([f.property({readOnly:!0})],
e.prototype,"resourceInfo",void 0);k([f.property()],e.prototype,"thumbnailUrl",void 0);k([f.property()],e.prototype,"title",void 0);k([f.writer("title")],e.prototype,"writeTitle",null);return e=c=k([f.subclass("esri.Basemap")],e);var c}(f.declared(c,a,r))})},"esri/support/basemapDefinitions":function(){define(["require","exports","dojo/i18n!../nls/basemaps"],function(b,h,l){return{streets:{id:"streets",title:l.streets,thumbnailUrl:b.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-base-layer",
url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Street Map",showLegend:!1,visibility:!0,opacity:1}]},satellite:{id:"satellite",title:l.satellite,thumbnailUrl:b.toUrl("../images/basemap/satellite.jpg"),baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},
hybrid:{id:"hybrid",title:l.hybrid,thumbnailUrl:b.toUrl("../images/basemap/hybrid.jpg"),baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Boundaries and Places",
isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",title:l.terrain,thumbnailUrl:b.toUrl("../images/basemap/terrain.jpg"),baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},topo:{id:"topo",title:l.topo,thumbnailUrl:b.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Topo Map",showLegend:!1,visibility:!0,opacity:1}]},gray:{id:"gray",title:l.gray,thumbnailUrl:b.toUrl("../images/basemap/gray.jpg"),
baseMapLayers:[{id:"gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"dark-gray":{id:"dark-gray",
title:l["dark-gray"],thumbnailUrl:b.toUrl("../images/basemap/dark-gray.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"dark-gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Reference",
isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",title:l.oceans,thumbnailUrl:b.toUrl("../images/basemap/oceans.jpg"),baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",
title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"national-geographic":{id:"national-geographic",title:l["national-geographic"],thumbnailUrl:b.toUrl("../images/basemap/national-geographic.jpg"),baseMapLayers:[{id:"national-geographic-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",title:"NatGeo World Map",showLegend:!1,layerType:"ArcGISTiledMapServiceLayer",visibility:!0,opacity:1}]},osm:{id:"osm",title:l.osm,thumbnailUrl:b.toUrl("../images/basemap/osm.jpg"),
baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",title:l["dark-gray"],thumbnailUrl:b.toUrl("../images/basemap/dark-gray.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/5ad3948260a147a993ef4865e3fad476/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Dark Gray",visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",
title:l.gray,thumbnailUrl:b.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/5dd75c1a544b46c3af01ba5736bfdfa0/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Light Gray",visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",title:l.streets,thumbnailUrl:b.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/a60a37a27cc140ddad15f919cd5a69f2/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",title:l.topo,thumbnailUrl:b.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/86d5ed4b6dc741de9dad5f0fbe09ae95/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",title:l["streets-night-vector"],thumbnailUrl:b.toUrl("../images/basemap/streets-night.jpg"),
baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/92c551c9f07b4147846aae273e822714/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",title:l["streets-relief-vector"],thumbnailUrl:b.toUrl("../images/basemap/streets-relief.jpg"),baseMapLayers:[{id:"streets-relief-vector-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Streets Relief Base",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-reference-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/78c0a9ab4fbf4198a8b951848aab19d8/resources/styles/root.json",title:"World Streets Relief Reference",layerType:"VectorTileLayer",showLegend:!1,visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",title:l["streets-navigation-vector"],thumbnailUrl:b.toUrl("../images/basemap/streets-navigation.jpg"),
baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/e19e9330bf08490ca8353d76b5e2e658/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]}}})},"esri/core/collectionUtils":function(){define(["require","exports","./Collection"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});h.referenceSetter=function(b,f,h){void 0===h&&(h=l);f||(f=new h);f.removeAll();b&&(Array.isArray(b)||
b.isInstanceOf&&b.isInstanceOf(l))?f.addMany(b):f.add(b);return f};h.castForReferenceSetter=function(b){return b}})},"esri/core/JSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./declare ./accessorSupport/read ./accessorSupport/write ./accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m,g,d){function a(a,b){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");var c=new this;c.read(a,b);return c}
var c=function(b){function c(){return null!==b&&b.apply(this,arguments)||this}l(c,b);c.prototype.read=function(a,b){m.default(this,a,b);return this};c.prototype.write=function(a,b){return g.default(this,a||{},b)};c.prototype.toJSON=function(a){return this.write(null,a)};c.fromJSON=function(b,c){return a.call(this,b,c)};return c=k([d.subclass("esri.core.JSONSupport")],c)}(d.declared(f));c.prototype.toJSON.isDefaultToJSON=!0;n.after(function(b){n.hasMixin(b,c)&&(b.fromJSON=a.bind(b))});return c})},
"esri/core/accessorSupport/read":function(){define("require exports dojo/_base/lang ./utils ./get ./extensions/serializableProperty".split(" "),function(b,h,l,k,f,n){function m(b,a,c){void 0===c&&(c=g);for(var d=k.getProperties(b),h=d.metadatas,m={},l=0,v=Object.getOwnPropertyNames(a);l<v.length;l++){var y=m,p=h,e=v[l],q=a,u=c,z=n.originSpecificReadPropertyDefinition(p[e],u);z&&(!z.read||!1!==z.read.enabled&&!z.read.source)&&(y[e]=!0);for(var C=0,B=Object.getOwnPropertyNames(p);C<B.length;C++){var F=
B[C],z=n.originSpecificReadPropertyDefinition(p[F],u),D;a:{D=e;var E=q;if(z&&z.read&&!1!==z.read.enabled&&z.read.source)if(z=z.read.source,"string"===typeof z){if(z===D||-1<z.indexOf(".")&&0===z.indexOf(D)&&f.exists(z,E)){D=!0;break a}}else for(var I=0;I<z.length;I++){var J=z[I];if(J===D||-1<J.indexOf(".")&&0===J.indexOf(D)&&f.exists(J,E)){D=!0;break a}}D=!1}D&&(y[F]=!0)}}d.setDefaultOrigin(c.origin);l=0;for(m=Object.getOwnPropertyNames(m);l<m.length;l++)v=m[l],p=(y=n.originSpecificReadPropertyDefinition(h[v],
c).read)&&y.source,e=void 0,e=p&&"string"===typeof p?f.valueOf(a,p):a[v],y&&y.reader&&(e=y.reader.call(b,e,a,c)),void 0!==e&&d.set(v,e);d.setDefaultOrigin("user")}Object.defineProperty(h,"__esModule",{value:!0});var g={origin:"service"};h.read=m;h.readLoadable=function(b,a,c,f){void 0===f&&(f=g);a=l.mixin({},f,{messages:[]});c(a);a.messages.forEach(function(a){"warning"!==a.type||b.loaded?f&&f.messages.push(a):b.loadWarnings.push(a)})};h.default=m})},"esri/core/accessorSupport/write":function(){define(["require",
"exports","./PropertyOrigin","./utils","./extensions/serializableProperty"],function(b,h,l,k,f){function n(b,d,a,c,f,k){if(!c||!c.write)return!1;var g=b.get(a);if(void 0===g)return!1;!f&&c.write.overridePolicy&&(b=c.write.overridePolicy.call(b,g,a,k),void 0!==b&&(f=b));f||(f=c.write);return!f||!1===f.enabled||!f.allowNull&&null===g||!f.ignoreOrigin&&k&&k.origin&&d.store.originOf(a)<l.nameToId(k.origin)?!1:!0}function m(b,d,a){if(b&&"function"===typeof b.toJSON&&(!b.toJSON.isDefaultToJSON||!b.write))return k.merge(d,
b.toJSON());var c=k.getProperties(b),g=c.metadatas,h;for(h in g){var m=f.originSpecificWritePropertyDefinition(g[h],a);if(n(b,c,h,m,null,a)){var x=b.get(h),v={};m.write.writer.call(b,x,v,m.write.target||h,a);m=v;0<Object.keys(m).length&&(d=k.merge(d,m),a&&a.writtenProperties&&a.writtenProperties.push({target:b,propName:h,oldOrigin:l.idToReadableName(c.store.originOf(h)),newOrigin:a.origin}))}}return d}Object.defineProperty(h,"__esModule",{value:!0});h.willPropertyWrite=function(b,d,a,c){var g=k.getProperties(b),
h=f.originSpecificWritePropertyDefinition(g.metadatas[d],c);return h?n(b,g,d,h,a,c):!1};h.write=m;h.default=m})},"esri/core/Loadable":function(){define("./Promise ./Accessor ./Error ./Warning dojo/aspect dojo/_base/lang dojo/Deferred".split(" "),function(b,h,l,k,f,n,m){return b.createSubclass([h],{declaredClass:"esri.core.Loadable","-chains-":n.mixin(h._meta.chains,{load:"after"}),constructor:function(){this._set("loadWarnings",[]);var b=new m;this.addResolvingPromise(b.promise);f.around(this,"load",
function(d){return function(){"not-loaded"===this.loadStatus&&(this.loadStatus="loading",d.apply(this));b&&(b.resolve(),b=null);return this}});this.then(function(b){this.loadStatus="loaded"}.bind(this),function(b){this.loadStatus="failed";this.loadError=b}.bind(this))},properties:{loaded:{readOnly:!0,dependsOn:["loadStatus"],get:function(){return"loaded"===this.loadStatus}},loadError:null,loadStatus:"not-loaded",loadWarnings:{type:[k],readOnly:!0}},load:function(){},cancelLoad:function(){if(this.isFulfilled())return this;
this.loadError=new l("load:cancelled","Cancelled");this._promiseProps.cancel(this.loadError);return this}})})},"esri/core/Promise":function(){define("./declare dojo/promise/all dojo/aspect dojo/Deferred dojo/errors/create ./Scheduler".split(" "),function(b,h,l,k,f,n){var m=function(a){if(!a.isFulfilled()){var b=a._promiseProps,c=b.resolvingPromises,d,g;b.allPromise&&b.allPromise.cancel();var f=new k;for(d=c.length-1;0<=d;d--)g=c[d],g.isCanceled&&g.isCanceled()?c.splice(d,1):g.then(null,null,b.resolver.progress);
g=null;(b.allPromise=h(c.concat([f.promise]))).then(function(){b.resolver.resolve(a);a=b=f=b.allPromise=b.resolvingPromises=null},function(c){b.allPromise=null;if(!c||"cancel"!==c.dojoType){var d=Array.prototype.slice.call(arguments,0);b.resolver.reject(d[0]);a=b=f=b.allPromise=b.resolvingPromises=null}});f&&n.schedule(function(){f&&f.resolve()})}},g=f("CancelError",null,function(a){this.target=a}),d=function(a){return a||new g(this.instance)},a=function(a){this.instance=a;this.canceler=d.bind(this);
this.resolver=new k;this.initialized=!1;this.resolvingPromises=[]};a.prototype={canceler:null,cancel:function(a){if(!this.resolver.isFulfilled()){this.allPromise.cancel();for(var b=this.resolvingPromises.concat(),c=b.length-1;0<=c;c--)b[c].cancel(a);this.resolver.cancel(a)}}};return b(null,{declaredClass:"esri.core.Promise",constructor:function(){Object.defineProperty(this,"_promiseProps",{value:new a(this),enumerable:!1,configurable:!1,writable:!0});var b=l.after(this,"postscript",function(a,c){b.remove();
b=null;m(this)},!0)},_promiseProps:null,always:function(a){return this.then(a,a)},then:function(a,b,d){var c=new k(this._promiseProps.canceler);a=c.then(a,b,d);this._promiseProps.resolver.then(c.resolve,c.reject,c.progress);return a},isResolved:function(){return this._promiseProps.resolver.isResolved()},isRejected:function(){return this._promiseProps.resolver.isRejected()},isFulfilled:function(){return this._promiseProps.resolver.isFulfilled()},otherwise:function(a){return this.then(null,a)},addResolvingPromise:function(a){a&&
!this.isFulfilled()&&(this._promiseProps.resolvingPromises.push(a),m(this))}})})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(b,h,l){var k=b.some;return function(b){var f,m;b instanceof Array?m=b:b&&"object"===typeof b&&(f=b);var g,d=[];if(f){m=[];for(var a in f)Object.hasOwnProperty.call(f,a)&&(d.push(a),m.push(f[a]));g={}}else m&&(g=[]);if(!m||!m.length)return(new h).resolve(g);var c=new h;c.promise.always(function(){g=d=null});var r=m.length;k(m,function(a,
b){f||d.push(b);l(a,function(a){c.isFulfilled()||(g[d[b]]=a,0===--r&&c.resolve(g))},c.reject);return c.isFulfilled()});return c.promise}})},"esri/core/Error":function(){define(["require","exports","./tsSupport/extendsHelper","./Message","./lang"],function(b,h,l,k,f){b=function(b){function k(g,d,a){var c=b.call(this,g,d,a)||this;return c instanceof k?c:new k(g,d,a)}l(k,b);k.prototype.toJSON=function(){return{name:this.name,message:this.message,details:f.clone(this.details)}};k.fromJSON=function(b){return new k(b.name,
b.message,b.details)};return k}(k);b.prototype.type="error";return b})},"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,l){b.__proto__=l}||function(b,l){for(var k in l)l.hasOwnProperty(k)&&(b[k]=l[k])};return function(h,l){function k(){this.constructor=h}b(h,l);h.prototype=null===l?Object.create(l):(k.prototype=l.prototype,new k)}}()})},"esri/core/Message":function(){define(["require","exports",
"dojo/string"],function(b,h,l){return function(){function b(f,k,h){this instanceof b&&(this.name=f,this.message=k&&l.substitute(k,h,function(b){return null==b?"":b})||"",this.details=h)}b.prototype.toString=function(){return"["+this.name+"]: "+this.message};return b}()})},"esri/core/Warning":function(){define(["require","exports","./tsSupport/extendsHelper","./tsSupport/decorateHelper","./Message"],function(b,h,l,k,f){b=function(b){function f(g,d,a){var c=b.call(this,g,d,a)||this;return c instanceof
f?c:new f(g,d,a)}l(f,b);return f}(f);b.prototype.type="warning";return b})},"esri/core/promiseUtils":function(){define(["require","exports","dojo/Deferred","dojo/promise/all","./Error"],function(b,h,l,k,f){function n(b){if(b){if("function"!==typeof b.forEach){var g=Object.keys(b),d=g.map(function(a){return b[a]});return n(d).then(function(a){var b={};g.forEach(function(c,d){return b[c]=a[d]});return b})}var a=new l,c=[],f=b.length;0===f&&a.resolve(c);b.forEach(function(b){var d={promise:b};c.push(d);
b.then(function(a){d.value=a}).otherwise(function(a){d.error=a}).then(function(){--f;0===f&&a.resolve(c)})});return a.promise}}Object.defineProperty(h,"__esModule",{value:!0});h.all=function(b){return k(b)};h.filter=function(b,g){var d=b.slice();return k(b.map(function(a,b){return g(a,b)})).then(function(a){return d.filter(function(b,d){return a[d]})})};h.eachAlways=n;h.create=function(b,g){var d=new l(g);b(function(a){void 0===a&&(a=null);return d.resolve(a)},d.reject);return d.promise};h.reject=
function(b){var g=new l;g.reject(b);return g.promise};h.resolve=function(b){void 0===b&&(b=null);var g=new l;g.resolve(b);return g.promise};h.after=function(b,g){void 0===g&&(g=null);var d=0,a=new l(function(){d&&(clearTimeout(d),d=0)}),d=setTimeout(function(){a.resolve(g)},b);return a.promise};h.timeout=function(b,g,d){var a=0,c=new l(b.cancel);b.then(function(b){c.isFulfilled()||(c.resolve(b),a&&(clearTimeout(a),a=0))});b.otherwise(function(b){c.isFulfilled()||(c.reject(b),a&&(clearTimeout(a),a=
0))});a=setTimeout(function(){var a=d||new f("promiseUtils:timeout","The wrapped promise did not resolve within "+g+" ms");c.reject(a)},g);return c.promise};h.wrapCallback=function(b){var g=!1,d=new l(function(){return g=!0});b(function(a){g||d.resolve(a)});return d.promise}})},"esri/core/urlUtils":function(){define("require exports dojo/_base/window dojo/_base/lang dojo/_base/url dojo/io-query ../config ./lang ./sniff ./Logger ./Error".split(" "),function(b,h,l,k,f,n,m,g,d,a,c){function r(a){var b=
{path:null,query:null},e=new f(a),c=a.indexOf("?");null===e.query?b.path=a:(b.path=a.substring(0,c),b.query=n.queryToObject(e.query));e.fragment&&(b.hash=e.fragment,null===e.query&&(b.path=b.path.substring(0,b.path.length-(e.fragment.length+1))));return b}function w(a,b){void 0===a&&(a=!1);void 0===b&&(b=!0);var d,q=M.proxyUrl;if("string"===typeof a){if(d=P(a),a=v(a))q=a.proxyUrl}else d=!!a;if(!q)throw N.warn("esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers."),
new c("urlutils:proxy-not-set","esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers.");var p;d&&b&&"https"===h.appUrl.scheme&&(b=K(q),e(b)&&(q=b,p=1));q=r(q);q._xo=p;return q}function t(a){var b=a.indexOf("?");-1!==b?(T.path=a.slice(0,b),T.query=a.slice(b+1)):(T.path=a,T.query=null);return T}function x(a){a=t(a).path;a&&"/"===a[a.length-1]||(a+="/");a=G(a,!0);return a=a.toLowerCase()}
function v(a){var b=M.proxyRules;a=x(a);for(var e=0;e<b.length;e++)if(0===a.indexOf(b[e].urlPrefix))return b[e]}function y(a){a=B(a);var b=a.indexOf("/sharing");return 0<b?a.substring(0,b):a.replace(/\/+$/,"")}function p(a,b,e){void 0===e&&(e=!1);a=da(a);b=da(b);return e||a.scheme===b.scheme?a.host.toLowerCase()===b.host.toLowerCase()&&a.port===b.port:!1}function e(a){return d("esri-phonegap")?!0:d("esri-cors")?null!=q(a):!1}function q(a,b){void 0===b&&(b=!1);"string"===typeof a&&(a=E(a)?da(a):h.appUrl);
for(var e=M.corsEnabledServers||[],c=0;c<e.length;c++)for(var d=e[c],q=void 0,q="string"===typeof d?u(d):d.host?u(d.host):[],g=0;g<q.length;g++)if(p(a,q[g]))return b?c:d;return b?-1:null}function u(a){h.corsServersUrlCache[a]||(U(a)||J(a)?h.corsServersUrlCache[a]=[new f(z(a))]:h.corsServersUrlCache[a]=[new f("http://"+a),new f("https://"+a)]);return h.corsServersUrlCache[a]}function z(a,b,e){void 0===b&&(b=h.appBaseUrl);if(J(a))return e&&e.preserveProtocolRelative?a:"http"===h.appUrl.scheme&&h.appUrl.authority===
D(a).slice(2)?"http:"+a:"https:"+a;if(U(a))return a;e=F;if("/"===a[0]){var c=b.indexOf("//"),c=b.indexOf("/",c+2);b=-1===c?b:b.slice(0,c)}return e(b,a)}function C(a,b,e){void 0===b&&(b=h.appBaseUrl);if(!E(a))return a;var c=B(a),d=c.toLowerCase();b=B(b).toLowerCase().replace(/\/+$/,"");if((e=e?B(e).toLowerCase().replace(/\/+$/,""):null)&&0!==b.indexOf(e))return a;for(var q=function(a,b,e){e=a.indexOf(b,e);return-1===e?a.length:e},p=q(d,"/",d.indexOf("//")+2),g=-1;d.slice(0,p+1)===b.slice(0,p)+"/";){g=
p+1;if(p===d.length)break;p=q(d,"/",p+1)}if(-1===g||e&&g<e.length)return a;a=c.slice(g);c=b.slice(g-1).replace(/[^/]+/g,"").length;if(0<c)for(d=0;d<c;d++)a="../"+a;else a="./"+a;return a}function B(a){a=a.trim();a=z(a);a="http"===h.appUrl.scheme&&P(a)&&p(h.appBaseUrl,a,!0)&&!e(a)?J(a)?"http:"+a:a.replace(X,"http:"):a;a=S(a);return a=a.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function F(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];if(a&&a.length){b=[];if(E(a[0])){var e=a[0],
c=e.indexOf("//");b.push(e.slice(0,c+1));ga.test(a[0])&&(b[0]+="/");a[0]=e.slice(c+2)}else"/"===a[0][0]&&b.push("");a=a.reduce(function(a,b){return a.concat(b.split("/"))},[]);for(e=0;e<a.length;e++)c=a[e],".."===c&&0<b.length?b.pop():!c||"."===c&&0!==b.length||b.push(c);return b.join("/")}}function D(a){if(I(a))return null;var b=a.indexOf("://");if(-1===b&&J(a))b=2;else if(-1!==b)b+=3;else return null;b=a.indexOf("/",b);return-1===b?a:a.slice(0,b)}function E(a){return J(a)||U(a)}function I(a){return"data:"===
a.slice(0,5)}function J(a){return a&&"/"===a[0]&&"/"===a[1]}function U(a){return ca.test(a)}function P(a){return X.test(a)||"https"===h.appUrl.scheme&&J(a)}function H(a){return W.test(a)||"http"===h.appUrl.scheme&&J(a)}function K(a){return J(a)?"https:"+a:a.replace(W,"https:")}function G(a,b){void 0===b&&(b=!1);if(J(a))return a.slice(2);a=a.replace(ca,"");b&&1<a.length&&"/"===a[0]&&"/"===a[1]&&(a=a.slice(2));return a}function S(a){var b=m.request.httpsDomains;if(!H(a))return a;var c=a.indexOf("/",
7),d;d=-1===c?a:a.slice(0,c);d=d.toLowerCase().slice(7);if(!("http"!==h.appUrl.scheme||d!==h.appUrl.authority||fa.test(a)&&e(a)))return a;if("https"===h.appUrl.scheme&&d===h.appUrl.authority||b&&b.some(function(a){return d===a||g.endsWith(d,"."+a)}))a=K(a);return a}function O(a,b,e){if(!(b&&e&&a&&E(a)))return a;var c=a.indexOf("//"),d=a.indexOf("/",c+2),q=a.indexOf(":",c+2),d=Math.min(0>d?a.length:d,0>q?a.length:q);if(a.slice(c+2,d).toLowerCase()!==b.toLowerCase())return a;b=a.slice(0,c+2);a=a.slice(d);
return""+b+e+a}function da(a){if("string"===typeof a)return new f(z(a));a.scheme||(a.scheme=h.appUrl.scheme);return a}Object.defineProperty(h,"__esModule",{value:!0});b=l.global;var N=a.getLogger("esri.core.urlUtils"),M=m.request,ca=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,W=/^\s*http:/i,X=/^\s*https:/i,ga=/^\s*file:/i,fa=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;h.appUrl=new f(b.location);h.corsServersUrlCache={};h.appBaseUrl=function(){var a=h.appUrl.path,a=a.substring(0,a.lastIndexOf(a.split("/")[a.split("/").length-
1]));return""+(h.appUrl.scheme+"://"+h.appUrl.host+(null!=h.appUrl.port?":"+h.appUrl.port:""))+a}();h.urlToObject=r;h.getProxyUrl=w;h.addProxy=function(a){var b=v(a),e,c;b?(c=t(b.proxyUrl),e=c.path,c=c.query?n.queryToObject(c.query):null):M.forceProxy&&(c=w(),e=c.path,c=c.query);e&&(b=r(a),a=e+"?"+b.path,(e=n.objectToQuery(k.mixin(c||{},b.query)))&&(a=a+"?"+e));return a};var T={path:"",query:""};h.addProxyRule=function(a){a={proxyUrl:a.proxyUrl,urlPrefix:x(a.urlPrefix)};for(var b=M.proxyRules,e=a.urlPrefix,
c=b.length,d=0;d<b.length;d++){var q=b[d].urlPrefix;if(0===e.indexOf(q)){if(e.length===q.length)return-1;c=d;break}0===q.indexOf(e)&&(c=d+1)}b.splice(c,0,a);return c};h.getProxyRule=v;h.hasSamePortal=function(a,b){a=y(a);b=y(b);return G(a)===G(b)};h.hasSameOrigin=p;h.canUseXhr=e;h.getCorsConfig=q;h.makeAbsolute=z;h.makeRelative=C;h.normalize=B;h.join=F;h.getOrigin=D;h.isAbsolute=E;h.isDataProtocol=I;var ka=/^data:(.*?)(;base64)?,(.*)$/;h.dataComponents=function(a){return(a=a.match(ka))?{mediaType:a[1],
isBase64:!!a[2],data:a[3]}:null};h.makeData=function(a){return a.isBase64?"data:"+a.mediaType+";base64,"+a.data:"data:"+a.mediaType+","+a.data};h.isProtocolRelative=J;h.hasProtocol=U;h.toHTTPS=K;h.removeFile=function(a){var b=0;if(E(a)){var e=a.indexOf("//");-1!==e&&(b=e+2)}e=a.lastIndexOf("/");return e<b?a:a.slice(0,e+1)};h.changeDomain=O;h.read=function(a,b){var e=b&&b.url&&b.url.path;a&&e&&(a=z(a,e,{preserveProtocolRelative:!0}));(b=b&&b.portal)&&!b.isPortal&&b.urlKey&&b.customBaseUrl?(e=b.urlKey+
"."+b.customBaseUrl,b=p(h.appUrl,h.appUrl.scheme+"://"+e)?O(a,b.portalHostname,e):O(a,e,b.portalHostname)):b=a;return b};h.write=function(a,b){if(!a)return a;!E(a)&&b&&b.blockedRelativeUrls&&b.blockedRelativeUrls.push(a);var e=z(a);if(b){var c=b.verifyItemRelativeUrls&&b.verifyItemRelativeUrls.rootPath||b.url&&b.url.path;c&&(e=C(e,c,c),e!==a&&b.verifyItemRelativeUrls&&b.verifyItemRelativeUrls.writtenUrls.push(e))}a=e;e=(b=b&&b.portal)&&!b.isPortal&&b.urlKey&&b.customBaseUrl?O(a,b.urlKey+"."+b.customBaseUrl,
b.portalHostname):a;return e};h.isSVG=function(a){return ja.test(a)};var ja=/(^data:image\/svg|\.svg$)/i})},"dojo/_base/url":function(){define(["./kernel"],function(b){var h=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,l=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,k=function(){for(var b=arguments,n=[b[0]],m=1;m<b.length;m++)if(b[m]){var g=new k(b[m]+""),n=new k(n[0]+"");if(""==g.path&&!g.scheme&&!g.authority&&!g.query)null!=g.fragment&&(n.fragment=g.fragment),
g=n;else if(!g.scheme&&(g.scheme=n.scheme,!g.authority&&(g.authority=n.authority,"/"!=g.path.charAt(0)))){for(var n=(n.path.substring(0,n.path.lastIndexOf("/")+1)+g.path).split("/"),d=0;d<n.length;d++)"."==n[d]?d==n.length-1?n[d]="":(n.splice(d,1),d--):0<d&&(1!=d||""!=n[0])&&".."==n[d]&&".."!=n[d-1]&&(d==n.length-1?(n.splice(d,1),n[d-1]=""):(n.splice(d-1,2),d-=2));g.path=n.join("/")}n=[];g.scheme&&n.push(g.scheme,":");g.authority&&n.push("//",g.authority);n.push(g.path);g.query&&n.push("?",g.query);
g.fragment&&n.push("#",g.fragment)}this.uri=n.join("");b=this.uri.match(h);this.scheme=b[2]||(b[1]?"":null);this.authority=b[4]||(b[3]?"":null);this.path=b[5];this.query=b[7]||(b[6]?"":null);this.fragment=b[9]||(b[8]?"":null);null!=this.authority&&(b=this.authority.match(l),this.user=b[3]||null,this.password=b[4]||null,this.host=b[6]||b[7],this.port=b[9]||null)};k.prototype.toString=function(){return this.uri};return b._Url=k})},"esri/config":function(){define(["require","exports","dojo/_base/window"],
function(b,h,l){return{screenDPI:96,geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{corsDetection:!(l.global&&l.global.cordova),corsDetectionTimeout:15,corsEnabledServers:"basemaps.arcgis.com basemapsbeta.arcgis.com basemapsbetadev.arcgis.com basemapsdev.arcgis.com cdn.arcgis.com cdn-a.arcgis.com cdn-b.arcgis.com demographics1.arcgis.com demographics2.arcgis.com demographics3.arcgis.com demographics4.arcgis.com demographics5.arcgis.com demographics6.arcgis.com dev.arcgis.com devext.arcgis.com elevation3d.arcgis.com elevation3ddev.arcgis.com js.arcgis.com jsdev.arcgis.com jsqa.arcgis.com geocode.arcgis.com geocodedev.arcgis.com geocodeqa.arcgis.com geoenrich.arcgis.com geoenrichdev.arcgis.com geoenrichqa.arcgis.com localvtiles.arcgis.com qaext.arcgis.com server.arcgisonline.com services.arcgis.com services.arcgisonline.com services1.arcgis.com services2.arcgis.com services3.arcgis.com services4.arcgis.com services5.arcgis.com services6.arcgis.com services7.arcgis.com services8.arcgis.com services9.arcgis.com servicesdev.arcgis.com servicesdev1.arcgis.com servicesdev2.arcgis.com servicesdev3.arcgis.com servicesqa.arcgis.com servicesqa1.arcgis.com servicesqa2.arcgis.com servicesqa3.arcgis.com static.arcgis.com staticqa.arcgis.com staticdev.arcgis.com tiles.arcgis.com tiles1.arcgis.com tiles2.arcgis.com tiles3.arcgis.com tiles4.arcgis.com tilesdevext.arcgis.com tilesqa.arcgis.com utility.arcgis.com utility.arcgisonline.com www.arcgis.com".split(" "),
corsStatus:{},forceProxy:!1,maxUrlLength:2E3,maxWorkers:5,proxyRules:[],proxyUrl:null,timeout:6E4,useIdentity:!0,useCors:"with-credentials",httpsDomains:"arcgis.com arcgisonline.com esrikr.com premiumservices.blackbridge.com esripremium.accuweather.com gbm.digitalglobe.com firstlook.digitalglobe.com msi.digitalglobe.com".split(" ")},useSpatialIndex:!1}})},"esri/portal/Portal":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/Error ../config ../kernel ../request ../geometry/Extent ../core/global ../core/JSONSupport ../core/Loadable ./PortalQueryParams ./PortalQueryResult ./PortalUser ../core/promiseUtils ../core/requireUtils ../core/urlUtils dojo/promise/all dojo/_base/kernel dojo/_base/lang dojo/_base/url".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q,u,z,C,B,F){var D;return function(h){function t(a){a=h.call(this)||this;a.access=null;a.allSSL=!1;a.authMode="auto";a.authorizedCrossOriginDomains=null;a.basemapGalleryGroupQuery=null;a.bingKey=null;a.canListApps=!1;a.canListData=!1;a.canListPreProvisionedItems=!1;a.canProvisionDirectPurchase=!1;a.canSearchPublic=!1;a.canShareBingPublic=!1;a.canSharePublic=!1;a.canSignInArcGIS=!1;a.canSignInIDP=!1;a.colorSetsGroupQuery=null;a.commentsEnabled=!1;a.created=
null;a.culture=null;a.customBaseUrl=null;a.defaultBasemap=null;a.defaultExtent=null;a.defaultVectorBasemap=null;a.description=null;a.featuredGroups=null;a.featuredItemsGroupQuery=null;a.galleryTemplatesGroupQuery=null;a.livingAtlasGroupQuery=null;a.helperServices=null;a.homePageFeaturedContent=null;a.homePageFeaturedContentCount=null;a.httpPort=null;a.httpsPort=null;a.id=null;a.ipCntryCode=null;a.isPortal=!1;a.layerTemplatesGroupQuery=null;a.maxTokenExpirationMinutes=null;a.modified=null;a.name=null;
a.portalHostname=null;a.portalMode=null;a.portalProperties=null;a.region=null;a.rotatorPanels=null;a.showHomePageDescription=!1;a.supportsHostedServices=!1;a.symbolSetsGroupQuery=null;a.templatesGroupQuery=null;a.units=null;a.url=d.portalUrl;a.urlKey=null;a.user=null;a.useStandardizedQuery=!1;a.useVectorBasemaps=!1;a.vectorBasemapGalleryGroupQuery=null;return a}k(t,h);x=t;t.prototype.normalizeCtorArgs=function(a){return"string"===typeof a?{url:a}:a};t.prototype.destroy=function(){this._esriId_credentialCreateHandle&&
(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)};t.prototype.readAuthorizedCrossOriginDomains=function(a){if(a)for(var b=0;b<a.length;b++){var e=a[b],c=e;u.hasProtocol(c)||(c=u.appUrl.scheme+"://"+c);u.canUseXhr(c)||d.request.corsEnabledServers.push({host:e,withCredentials:!0})}return a};t.prototype.readDefaultBasemap=function(a){return a?(a=D.fromJSON(a),a.portalItem={portal:this},a):null};t.prototype.readDefaultVectorBasemap=function(a){return a?(a=D.fromJSON(a),
a.portalItem={portal:this},a):null};Object.defineProperty(t.prototype,"extraQuery",{get:function(){return this.id&&!this.canSearchPublic?" AND orgid:"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"isOrganization",{get:function(){return!!this.access},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"restUrl",{get:function(){var a=this.url;if(a)var b=a.indexOf("/sharing"),a=0<b?a.substring(0,b):this.url.replace(/\/+$/,""),a=a+"/sharing/rest";return a},
enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"thumbnailUrl",{get:function(){var a=this.restUrl,b=this.thumbnail;return a&&b?this._normalizeSSL(a+"/portals/self/resources/"+b):null},enumerable:!0,configurable:!0});t.prototype.readUrlKey=function(a){return a?a.toLowerCase():a};t.prototype.readUser=function(a){var b=null;a&&(b=p.fromJSON(a),b.portal=this);return b};t.prototype.load=function(){var e=this,c=q.when(b,"../Basemap").then(function(a){D=a}).then(function(){return e._fetchSelf()}).then(function(b){if(a.id){var c=
a.id;e.credential=c.findCredential(e.restUrl);e.credential||e.authMode!==x.AUTH_MODE_AUTO||(e._esriId_credentialCreateHandle=c.on("credential-create",function(){c.findCredential(e.restUrl)&&e._signIn()}))}e.read(b)});this.addResolvingPromise(c);return this};t.prototype.fetchBasemaps=function(a){var b=new v;b.query=a||(this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery);b.disableExtraQuery=!0;return this.queryGroups(b).then(function(a){b.num=100;b.query='type:"Web Map" -type:"Web Application"';
return a.total?(a=a.results[0],b.sortField=a.sortField||"name",b.sortOrder=a.sortOrder||"desc",a.queryItems(b)):null}).then(function(a){return a&&a.total?a.results.filter(function(a){return"Web Map"===a.type}).map(function(a){return new D({portalItem:a})}):[]})};t.prototype.fetchFeaturedGroups=function(){var a=this.featuredGroups,b=new v;b.num=100;b.sortField="title";if(a&&a.length){for(var c=[],d=0;d<a.length;d++){var q=a[d];c.push('(title:"'+q.title+'" AND owner:'+q.owner+")")}b.query=c.join(" OR ");
return this.queryGroups(b).then(function(a){return a.results})}return e.resolve([])};t.getDefault=function(){x._default||(x._default=new x);return x._default};t.prototype.queryGroups=function(a){return this._queryPortal("/community/groups",a,"PortalGroup")};t.prototype.queryItems=function(a){return this._queryPortal("/search",a,"PortalItem")};t.prototype.queryUsers=function(a){a.sortField||(a.sortField="username");return this._queryPortal("/community/users",a,"PortalUser")};t.prototype.toJSON=function(){throw new g("internal:not-yet-implemented",
"Portal.toJSON is not yet implemented");};t.prototype._fetchSelf=function(a){void 0===a&&(a=this.authMode);var b=this.restUrl+"/portals/self";a={authMode:a,query:{culture:C.locale}};"auto"===a.authMode&&(a.authMode="no-prompt");return this._request(b,a)};t.prototype._queryPortal=function(a,e,c){var d=this,p=function(b){return d._request(d.restUrl+a,e.toRequestOptions(d)).then(function(a){var c=e.clone();c.start=a.nextStart;return new y({nextQueryParams:c,queryParams:e,total:a.total,results:x._resultsToTypedArray(b,
{portal:d},a)})}).then(function(a){return z(a.results).always(function(){return a})})};return c?q.when(b,"./"+c).then(function(a){return p(a)}):p()};t.prototype._signIn=function(){var b=this;if(this.authMode===x.AUTH_MODE_ANONYMOUS)return e.reject(new g("portal:invalid-auth-mode",'Current "authMode"\' is "'+this.authMode+'"'));if("failed"===this.loadStatus)return e.reject(this.loadError);var c=function(a){return e.resolve().then(function(){if("not-loaded"===b.loadStatus)return a||(b.authMode="immediate"),
b.load().then(function(){return null});if("loading"===b.loadStatus)return b.load().then(function(){if(b.credential)return null;b.credential=a;return b._fetchSelf("immediate")});if(b.user&&b.credential===a)return null;b.credential=a;return b._fetchSelf("immediate")}).then(function(a){a&&b.read(a)})};return a.id?a.id.getCredential(this.restUrl).then(function(a){return c(a)}):c(this.credential)};t.prototype._normalizeSSL=function(a){var b=this.allSSL;b||("isSecureContext"in w?b=w.isSecureContext:w.location&&
w.location.origin&&(b=0===w.location.origin.indexOf("https:")));if(this.isPortal){var e=new F(a);return-1<this.portalHostname.toLowerCase().indexOf(e.host.toLowerCase())&&e.port&&"80"!==e.port&&"443"!==e.port?b?"https://"+e.host+(this.httpsPort&&443!==this.httpsPort?":"+this.httpsPort:"")+e.path+"?"+e.query:"http://"+e.host+(this.httpPort&&80!==this.httpPort?":"+this.httpPort:"")+e.path+"?"+e.query:b?a.replace("http:","https:"):a}return b?a.replace("http:","https:"):a};t.prototype._normalizeUrl=function(a){var b=
this.credential&&this.credential.token;return this._normalizeSSL(b?a+(-1<a.indexOf("?")?"\x26":"?")+"token\x3d"+b:a)};t.prototype._requestToTypedArray=function(a,e,c){var d=this,p=function(b){return d._request(a,e).then(function(a){var e=x._resultsToTypedArray(b,{portal:d},a);return z(e).always(function(){return e})})};return c?q.when(b,"./"+c).then(function(a){return p(a)}):p()};t.prototype._request=function(a,b){var e=this.authMode===x.AUTH_MODE_ANONYMOUS?"anonymous":"auto",d=null,q="auto",p={f:"json"},
g="json";b&&(b.authMode&&(e=b.authMode),b.body&&(d=b.body),b.method&&(q=b.method),b.query&&(p=l({},p,b.query)),b.responseType&&(g=b.responseType));b={authMode:e,body:d,callbackParamName:"callback",method:q,query:p,responseType:g,timeout:0};return c(this._normalizeSSL(a),b).then(function(a){return a.data})};t._resultsToTypedArray=function(a,b,e){if(e){if(e=e.listings||e.notifications||e.userInvitations||e.tags||e.items||e.groups||e.comments||e.provisions||e.results||e.relatedItems||e,a||b)e=e.map(function(e){e=
B.mixin(a?a.fromJSON(e):e,b);"function"===typeof e.load&&e.load();return e})}else e=[];return e};t.AUTH_MODE_ANONYMOUS="anonymous";t.AUTH_MODE_AUTO="auto";t.AUTH_MODE_IMMEDIATE="immediate";f([m.property()],t.prototype,"access",void 0);f([m.property()],t.prototype,"allSSL",void 0);f([m.property()],t.prototype,"authMode",void 0);f([m.property()],t.prototype,"authorizedCrossOriginDomains",void 0);f([m.reader("authorizedCrossOriginDomains")],t.prototype,"readAuthorizedCrossOriginDomains",null);f([m.property()],
t.prototype,"basemapGalleryGroupQuery",void 0);f([m.property()],t.prototype,"bingKey",void 0);f([m.property()],t.prototype,"canListApps",void 0);f([m.property()],t.prototype,"canListData",void 0);f([m.property()],t.prototype,"canListPreProvisionedItems",void 0);f([m.property()],t.prototype,"canProvisionDirectPurchase",void 0);f([m.property()],t.prototype,"canSearchPublic",void 0);f([m.property()],t.prototype,"canShareBingPublic",void 0);f([m.property()],t.prototype,"canSharePublic",void 0);f([m.property()],
t.prototype,"canSignInArcGIS",void 0);f([m.property()],t.prototype,"canSignInIDP",void 0);f([m.property()],t.prototype,"colorSetsGroupQuery",void 0);f([m.property()],t.prototype,"commentsEnabled",void 0);f([m.property({type:Date})],t.prototype,"created",void 0);f([m.property()],t.prototype,"credential",void 0);f([m.property()],t.prototype,"culture",void 0);f([m.property()],t.prototype,"customBaseUrl",void 0);f([m.property()],t.prototype,"defaultBasemap",void 0);f([m.reader("defaultBasemap")],t.prototype,
"readDefaultBasemap",null);f([m.property({type:r})],t.prototype,"defaultExtent",void 0);f([m.property()],t.prototype,"defaultVectorBasemap",void 0);f([m.reader("defaultVectorBasemap")],t.prototype,"readDefaultVectorBasemap",null);f([m.property()],t.prototype,"description",void 0);f([m.property({dependsOn:["id","canSearchPublic"],readOnly:!0})],t.prototype,"extraQuery",null);f([m.property()],t.prototype,"featuredGroups",void 0);f([m.property()],t.prototype,"featuredItemsGroupQuery",void 0);f([m.property()],
t.prototype,"galleryTemplatesGroupQuery",void 0);f([m.property()],t.prototype,"livingAtlasGroupQuery",void 0);f([m.property()],t.prototype,"helpBase",void 0);f([m.property()],t.prototype,"helperServices",void 0);f([m.property()],t.prototype,"helpMap",void 0);f([m.property()],t.prototype,"homePageFeaturedContent",void 0);f([m.property()],t.prototype,"homePageFeaturedContentCount",void 0);f([m.property()],t.prototype,"httpPort",void 0);f([m.property()],t.prototype,"httpsPort",void 0);f([m.property()],
t.prototype,"id",void 0);f([m.property()],t.prototype,"ipCntryCode",void 0);f([m.property({dependsOn:["access"],readOnly:!0})],t.prototype,"isOrganization",null);f([m.property()],t.prototype,"isPortal",void 0);f([m.property()],t.prototype,"layerTemplatesGroupQuery",void 0);f([m.property()],t.prototype,"maxTokenExpirationMinutes",void 0);f([m.property({type:Date})],t.prototype,"modified",void 0);f([m.property()],t.prototype,"name",void 0);f([m.property()],t.prototype,"portalHostname",void 0);f([m.property()],
t.prototype,"portalMode",void 0);f([m.property()],t.prototype,"portalProperties",void 0);f([m.property()],t.prototype,"region",void 0);f([m.property({dependsOn:["url"],readOnly:!0})],t.prototype,"restUrl",null);f([m.property()],t.prototype,"rotatorPanels",void 0);f([m.property()],t.prototype,"showHomePageDescription",void 0);f([m.property()],t.prototype,"staticImagesUrl",void 0);f([m.property()],t.prototype,"stylesGroupQuery",void 0);f([m.property()],t.prototype,"supportsHostedServices",void 0);f([m.property()],
t.prototype,"symbolSetsGroupQuery",void 0);f([m.property()],t.prototype,"templatesGroupQuery",void 0);f([m.property()],t.prototype,"thumbnail",void 0);f([m.property({dependsOn:["restUrl","thumbnail"],readOnly:!0})],t.prototype,"thumbnailUrl",null);f([m.property()],t.prototype,"units",void 0);f([m.property()],t.prototype,"url",void 0);f([m.property()],t.prototype,"urlKey",void 0);f([m.reader("urlKey")],t.prototype,"readUrlKey",null);f([m.property()],t.prototype,"user",void 0);f([m.reader("user")],
t.prototype,"readUser",null);f([m.property()],t.prototype,"useStandardizedQuery",void 0);f([m.property()],t.prototype,"useVectorBasemaps",void 0);f([m.property()],t.prototype,"vectorBasemapGalleryGroupQuery",void 0);f([n(1,m.cast(v))],t.prototype,"_queryPortal",null);return t=x=f([m.subclass("esri.portal.Portal")],t);var x}(m.declared(t,x))})},"esri/core/tsSupport/assignHelper":function(){define([],function(){return Object.assign||function(b){for(var h,l=1,k=arguments.length;l<k;l++){h=arguments[l];
for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(b[f]=h[f])}return b}})},"esri/core/tsSupport/paramHelper":function(){define([],function(){return function(b,h){return function(l,k){h(l,k,b)}}})},"esri/request":function(){define("require dojo/_base/config dojo/Deferred dojo/_base/lang dojo/_base/url dojo/request dojo/io-query ./config ./core/Error ./core/global ./core/sniff ./core/lang ./core/urlUtils ./core/deferredUtils ./core/promiseUtils ./core/requireUtils dojo/has!host-browser?./core/request/script dojo/has!host-webworker?./core/workers/request".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p){function e(a){var b=m.objectToQuery(a.content);b&&(a.url+=(-1===a.url.indexOf("?")?"?":"\x26")+b);if(2E3<a.url.length){if(!w.isDataProtocol(a.url))return x.reject(k.mixin(Error(),{message:"When using responseType 'image', URL length cannot exceed 2000 characters."}));if(3E6<a.url.length)return x.reject(k.mixin(Error(),{message:"When using responseType 'image', data URL length cannot exceed 3000000 characters."}))}var e=new Image;a.allowImageDataAccess&&
(e.crossOrigin=a.withCredentials?"use-credentials":"anonymous");var c=!1,d=new l(function(a){c=!0;e.onload=e.onerror=e.onabort=null;e.src=""}),b=function(a){e.onload=e.onerror=e.onabort=null;c||d.reject(Error("Unable to load the resource"))};e.onload=function(){e.onload=e.onerror=e.onabort=null;c||d.resolve(this)};e.onerror=b;e.onabort=b;e.alt="";e.src=a.url;return d.promise}function q(a){a=new f(a);return(a.host+(a.port?":"+a.port:"")).toLowerCase()}function u(){return S?S:S=v.when(b,"./identity/IdentityManager").then(function(a){G=
a})}function z(a,b){var d=!!a.useProxy,q=a.method||"auto",p=r.isDefined(a.crossOrigin)?a.crossOrigin:J.useCors;a=k.mixin({},a);a._ssl&&(a.url=a.url.replace(/^http:/i,"https:"));var g=a.content,f=a.url;a._token&&(a.content=a.content||{},a.content.token=a._token);var u=0,h;f&&(h=m.objectToQuery(g),u=h.length+f.length+1,c("esri-url-encodes-apostrophe")&&(u=h.replace(/'/g,"%27").length+f.length+1));a.timeout=r.isDefined(a.timeout)?a.timeout:J.timeout;a.handleAs=a.handleAs||"json";try{var t,v,z=p&&w.canUseXhr(a.urlObj)&&
!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(a.url),x=w.hasSameOrigin(a.urlObj,w.appUrl)||z,F="post"===q||!!a.body||u>J.maxUrlLength,C=!x&&-1!==a.handleAs.indexOf("json")&&a.callbackParamName&&!a.body,B=!!w.getProxyRule(a.url)||J.forceProxy||d||("image"!==a.handleAs||a.allowImageDataAccess)&&(!C||F)&&!x;if((c("host-browser")||c("host-webworker"))&&B)if(t=w.getProxyUrl(f,p),v=t.path,t._xo&&(z=!0),!F&&v.length+1+u>J.maxUrlLength&&(F=!0),a.url=v+"?"+f,F)a.content=k.mixin(t.query||{},g);else{var D=
m.objectToQuery(k.mixin(t.query||{},g));D&&(a.url+=(-1===f.indexOf("?")?"?":"\x26")+D);a.content=null}if(C&&!F&&!B&&c("host-browser"))return a=I?I(a):a,a.jsonp=a.callbackParamName,a.query=a.content,y.get(a.url,a);var E=a.headers;!c("host-browser")&&!c("host-webworker")||E&&E.hasOwnProperty("X-Requested-With")||(E=a.headers=E||{},E["X-Requested-With"]=null);if(c("host-browser")&&b){var da=a.content&&a.content.token;da&&(b.set?b.set("token",da):b.append("token",da));a.contentType=!1}if(z&&!a.hasOwnProperty("withCredentials")&&
"with-credentials"===J.useCors){var d=B?v:f,H=w.getCorsConfig(d);if(H&&H.hasOwnProperty("withCredentials"))H.withCredentials&&(a.withCredentials=!0);else if(G){var U=G.findServerInfo(d);U&&U.webTierAuth&&(a.withCredentials=!0)}}a=I?I(a):a;if("image"===a.handleAs)return e(a);if(F)return a.body?(a.data=b||a.body,a.query=a.content):a.data=a.content,delete a.body,delete a.content,!B&&c("safari")&&(a.url+=(-1===a.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+P++),n.post(a.url,a);a.query=
a.content;delete a.content;return n.get(a.url,a)}catch(Ha){return a=new l,a.reject(Ha),a.promise}}function C(a){var b=J.corsStatus;try{var e=q(a.url);if(J.corsDetection&&J.useCors&&c("esri-cors")&&a.url&&-1!==a.url.toLowerCase().indexOf("/rest/services")&&!w.hasSameOrigin(a.urlObj,w.appUrl)&&!w.canUseXhr(a.urlObj)){if(b[e])return b[e];var d=new l;b[e]=d.promise;var p=a.url.substring(0,a.url.toLowerCase().indexOf("/rest/")+6)+"info";n.get(p,{query:{f:"json"},handleAs:"json",headers:{"X-Requested-With":null},
timeout:1E3*J.corsDetectionTimeout}).then(function(b){b?(w.canUseXhr(a.url)||J.corsEnabledServers.push(e),d.resolve()):d.reject()},function(a){d.reject()});return d.promise}}catch(W){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}return K}function B(a,b,e,c){function p(a){a._pendingDfd=z(e,t);var b=!!a._pendingDfd.response;(a._pendingDfd.response||a._pendingDfd).then(function(a){if(!b||!a.data)return a;var e=a.getHeader("Content-Type");if(e&&(e=e.toLowerCase(),
-1===e.indexOf("text/plain")&&-1===e.indexOf("application/json")))return a;e=a.data;if(e instanceof ArrayBuffer&&750>=e.byteLength)e=new Blob([e]);else if(!(e instanceof Blob&&750>=e.size))return a;var c=new l,d=new FileReader;d.readAsText(e);d.onloadend=function(){if(!d.error)try{var b=JSON.parse(d.result);b.error&&(Object.isExtensible(a)||(a=k.mixin({},a)),a._jsonData=b)}catch(oa){}c.resolve(a)};return c.promise}).then(function(e){var d=b?e.data:e,q=b?e.getHeader.bind(e):H;if(d&&(e=b&&e._jsonData||
d,e.error||"error"===e.status))throw d=k.mixin(Error(),e.error||e),d.getHeader=q,d;a.resolve({data:d,url:c.url,requestOptions:c.requestOptions,getHeader:q});a._pendingDfd=null}).otherwise(function(b){var d,p,g;b&&(d=b.code,p=b.subcode,g=(g=b.messageCode)&&g.toUpperCase());if(b&&403==d&&(4==p||b.message&&-1<b.message.toLowerCase().indexOf("ssl")&&-1===b.message.toLowerCase().indexOf("permission"))){if(!e._ssl){e._ssl=e._sslFromServer=!0;B(a,!0,e,c);return}}else if(b&&415==b.status){if(d=e.url,p=J.corsStatus,
g=w.getCorsConfig(d,!0),-1<g&&J.corsEnabledServers.splice(g,1),g=new l,g.reject({log:!!h.isDebug}),p[q(d)]=g.promise,!e._err415){e._err415=1;B(a,!0,e,c);return}}else if(f&&"no-prompt"!==e.authMode&&G._errorCodes&&-1!==G._errorCodes.indexOf(d)&&!G._isPublic(e.url)&&(403!=d||U&&-1===U.indexOf(g)&&(!r.isDefined(p)||2==p&&e._token))){F(a,e,c,D("request:server",b,c));return}a.reject(D("request:server",b,c));a._pendingDfd=null})}var g=e.body,f=e.useIdentity,u,t=null,n=g instanceof FormData;if(n||g&&g.elements)t=
n?g:new FormData(g);var m=!!(-1!==e.url.toLowerCase().indexOf("token\x3d")||e.content&&e.content.token||t&&t.get&&t.get("token")||g&&g.elements&&g.elements.token);b||(!f||m||e._token||G._isPublic(e.url)||(b=function(a){a&&(e._token=a.token,e._ssl=a.ssl)},"immediate"===e.authMode?u=G.getCredential(e.url).then(b):"no-prompt"===e.authMode?u=G.checkSignInStatus(e.url).then(b).otherwise(function(){}):b(G.findCredential(e.url))),a.then(function(a){if((/\/sharing\/rest\/accounts\/self/i.test(e.url)||/\/sharing\/rest\/portals\/self/i.test(e.url))&&
!m&&!e._token&&a.user&&a.user.username){var b=J.corsEnabledServers,c=w.getCorsConfig(e.url,!0),d={host:q(e.url),withCredentials:!0};if(-1===c)b.push(d);else{var p=b[c];"object"===typeof p?p.withCredentials=!0:b.splice(c,1,d)}}if(b=e._credential)if(c=(c=G.findServerInfo(b.server))&&c.owningSystemUrl)c=c.replace(/\/?$/,"/sharing"),(b=G.findCredential(c,b.userId))&&-1===G._getIdenticalSvcIdx(c,b)&&b.resources.splice(0,0,c);return a}).always(function(a){delete e._credential;if(a){var b=!!e._ssl;a instanceof
d?a.details.ssl=b:a.ssl=b}}));u?u.then(function(){p(a)}).otherwise(function(b){a.reject(b)}):p(a);return a.promise}function F(a,b,e,c){a._pendingDfd=G.getCredential(b.url,{error:c,token:b._token});a._pendingDfd.then(function(c){b._token=c.token;b._credential=c;b._ssl=b._sslFromServer||c.ssl;B(a,!0,b,e)}).otherwise(function(b){a.reject(b);a._pendingDfd=null})}function D(a,b,e){var c="Error",q={url:e.url,requestOptions:e.requestOptions,getHeader:H};if(b instanceof d)return b.details?(b.details=r.clone(b.details),
b.details.url=e.url,b.details.requestOptions=e.requestOptions):b.details=q,b;if(b){var p=b.response;e=p&&p.getHeader;var p=p&&p.status,g=b.message;e=b.getHeader||e;g&&(c=g);e&&(q.getHeader=e);q.httpStatus=(r.isDefined(b.httpCode)?b.httpCode:b.code)||p;q.subCode=b.subcode;q.messageCode=b.messageCode;q.messages="string"===typeof b.details?[b.details]:b.details}a=new d(a,c,q);b&&"cancel"===b.dojoType&&(a.dojoType="cancel");return a}function E(b,e){if(p&&a.invokeStaticMessage)return p.execute(b,e);var d=
k.mixin({},e),q={url:b,requestOptions:k.mixin({},e)};d.content=d.query;delete d.query;d.preventCache=!!d.cacheBust;delete d.cacheBust;d.handleAs=d.responseType;delete d.responseType;"array-buffer"===d.handleAs&&(d.handleAs="arraybuffer");if("image"===d.handleAs){if(c("host-webworker"))return x.reject(D("request:invalid-parameters",Error("responseType 'image' is not supported in Web Workers or Node environment"),q));d.preventCache&&(d.content=d.content||{},d.content["request.preventCache"]=Date.now());
d.method="auto"}var g=J.useIdentity;"anonymous"===d.authMode&&(g=!1);d.useIdentity=g;d.url=w.normalize(b);d.urlObj=new f(d.url);var h=t.makeDeferredCancellingPending();C(d).always(function(){if(g&&!G)return u()}).always(function(){B(h,!1,d,q)});return h.promise}var I,J=g.request,U=["COM_0056","COM_0057"],P=0,H=function(){return null},K=(new l).resolve(),G,S;E.setRequestPreCallback=function(a){I=a};return E})},"dojo/request":function(){define(["./request/default!"],function(b){return b})},"dojo/request/default":function(){define(["exports",
"require","../has"],function(b,h,l){var k=l("config-requestProvider"),f;if(l("host-browser")||l("host-webworker"))f="./xhr";k||(k=f);b.getPlatformDefaultId=function(){return f};b.load=function(b,m,g,d){h(["platform"==b?f:k],function(a){g(a)})}})},"esri/core/deferredUtils":function(){define(["dojo/Deferred"],function(b){var h={makeDeferredCancellingPending:function(){var l={},k=h._dfdCanceller.bind(null,l),k=new b(k);return l.deferred=k},_dfdCanceller:function(b){b=b.deferred?b.deferred:b;b.canceled=
!0;var k=b._pendingDfd;b.isResolved()||!k||k.isResolved()||k.cancel();b._pendingDfd=null},_fixDfd:function(b){var k=b.then;b.then=function(b,h,m){if(b){var g=b;b=function(b){return b&&b._argsArray?g.apply(null,b):g(b)}}return k.call(this,b,h,m)};return b},_resDfd:function(b,k,f){var h=k.length;1===h?f?b.reject(k[0]):b.resolve(k[0]):1<h?(k._argsArray=!0,b.resolve(k)):b.resolve()}};return h})},"esri/geometry/Extent":function(){define("dojo/_base/lang ../core/lang ./SpatialReference ./Geometry ./Point ./support/webMercatorUtils ./support/mathUtils ./support/spatialReferenceUtils".split(" "),
function(b,h,l,k,f,n,m,g){var d=k.createSubclass({declaredClass:"esri.geometry.Extent",type:"extent",normalizeCtorArgs:function(a,c,d,g,f){return this.isSR(a)?{spatialReference:a,xmin:0,ymin:0,xmax:0,ymax:0}:b.isObject(a)?(a.spatialReference=null!=a.spatialReference?a.spatialReference:l.WGS84,a):{xmin:a,ymin:c,xmax:d,ymax:g,spatialReference:null!=f?f:l.WGS84}},properties:{cache:{dependsOn:"xmin ymin zmin mmin xmax ymax zmax mmax".split(" ")},center:{readOnly:!0,dependsOn:["cache"],get:function(a){a||
(a=new f({spatialReference:this.spatialReference}));a.x=.5*(this.xmin+this.xmax);a.y=.5*(this.ymin+this.ymax);this.hasZ&&(a.z=.5*(this.zmin+this.zmax));this.hasM&&(a.m=.5*(this.mmin+this.mmax));return a}},extent:{readOnly:!0,dependsOn:["cache"],get:function(){return this.clone()}},hasM:{readOnly:!0,dependsOn:["mmin","mmax"],get:function(){return null!=this.mmin&&null!=this.mmax}},hasZ:{readOnly:!0,dependsOn:["zmin","zmax"],get:function(){return null!=this.zmin&&null!=this.zmax}},height:{readOnly:!0,
dependsOn:["ymin","ymax"],get:function(){return Math.abs(this.ymax-this.ymin)}},width:{readOnly:!0,dependsOn:["xmin","xmax"],get:function(){return Math.abs(this.xmax-this.xmin)}},xmin:0,ymin:0,mmin:void 0,zmin:void 0,xmax:0,ymax:0,mmax:void 0,zmax:void 0},centerAt:function(a){var b=this.center;return null!=a.z&&this.hasZ?this.offset(a.x-b.x,a.y-b.y,a.z-b.z):this.offset(a.x-b.x,a.y-b.y)},clone:function(){var a=new d;a.xmin=this.xmin;a.ymin=this.ymin;a.xmax=this.xmax;a.ymax=this.ymax;a.spatialReference=
this.spatialReference;null!=this.zmin&&(a.zmin=this.zmin,a.zmax=this.zmax);null!=this.mmin&&(a.mmin=this.mmin,a.mmax=this.mmax);return a},contains:function(a){if(!a)return!1;var b=a.type;if("point"===b){var d=this.spatialReference,g=a.spatialReference,b=a.x,k=a.y;a=a.z;d&&g&&!d.equals(g)&&n.canProject(d,g)&&(d=d.isWebMercator?f.lngLatToXY(b,k):f.xyToLngLat(b,k,!0),b=d[0],k=d[1]);if(b>=this.xmin&&b<=this.xmax&&k>=this.ymin&&k<=this.ymax)return null!=a&&this.hasZ?a>=this.zmin&&a<=this.zmax:!0}else if("extent"===
b)return this._containsExtent(a);return!1},equals:function(a){if(!a)return!1;var b=this.spatialReference;if(!b.equals(a.spatialReference))if(n.canProject(a.spatialReference,b))a=n.project(a,b);else return!1;return this.xmin===a.xmin&&this.ymin===a.ymin&&this.zmin===a.zmin&&this.mmin===a.mmin&&this.xmax===a.xmax&&this.ymax===a.ymax&&this.zmax===a.zmax&&this.mmax===a.mmax},expand:function(a){a=.5*(1-a);var b=this.width*a,d=this.height*a;this.xmin+=b;this.ymin+=d;this.xmax-=b;this.ymax-=d;this.hasZ&&
(b=(this.zmax-this.zmin)*a,this.zmin+=b,this.zmax-=b);this.hasM&&(a*=this.mmax-this.mmin,this.mmin+=a,this.mmax-=a);return this},intersects:function(a){if(!a)return!1;var b=a.type,d=this.spatialReference,g=a.spatialReference;d&&g&&!d.equals(g)&&n.canProject(d,g)&&(a=d.isWebMercator?n.geographicToWebMercator(a):n.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 a=this._normalize(!1,!0);Array.isArray(a)||(a=[a]);return a},offset:function(a,b,d){this.xmin+=a;this.ymin+=b;this.xmax+=a;this.ymax+=b;null!=d&&(this.zmin+=d,this.zmax+=d);return this},shiftCentralMeridian:function(){return this._normalize(!0)},toJSON:function(){var a=this.spatialReference,a={xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax,spatialReference:a&&a.toJSON()};this.hasZ&&(a.zmin=this.zmin,a.zmax=
this.zmax);this.hasM&&(a.mmax=this.mmax,a.mmin=this.mmin);return a},union:function(a){function b(a,b,c){return null==b?c:null==c?b:a(b,c)}this.xmin=Math.min(this.xmin,a.xmin);this.ymin=Math.min(this.ymin,a.ymin);this.xmax=Math.max(this.xmax,a.xmax);this.ymax=Math.max(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=b(Math.min,this.zmin,a.zmin),this.zmax=b(Math.max,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=b(Math.min,this.mmin,a.mmin),this.mmax=b(Math.max,this.mmax,a.mmax);return this},intersection:function(a){function b(a,
b,c){return null==b?c:null==c?b:a(b,c)}if(!this._intersectsExtent(a))return null;this.xmin=Math.max(this.xmin,a.xmin);this.ymin=Math.max(this.ymin,a.ymin);this.xmax=Math.min(this.xmax,a.xmax);this.ymax=Math.min(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=b(Math.max,this.zmin,a.zmin),this.zmax=b(Math.min,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=b(Math.max,this.mmin,a.mmin),this.mmax=b(Math.min,this.mmax,a.mmax);return this},_containsExtent:function(a){var b=a.xmin,d=a.ymin,g=a.zmin,k=
a.xmax,h=a.ymax,m=a.zmax;a=a.spatialReference;return null!=g&&this.hasZ?this.contains(new f(b,d,g,a))&&this.contains(new f(b,h,g,a))&&this.contains(new f(k,h,g,a))&&this.contains(new f(k,d,g,a))&&this.contains(new f(b,d,m,a))&&this.contains(new f(b,h,m,a))&&this.contains(new f(k,h,m,a))&&this.contains(new f(k,d,m,a)):this.contains(new f(b,d,a))&&this.contains(new f(b,h,a))&&this.contains(new f(k,h,a))&&this.contains(new f(k,d,a))},_intersectsMultipoint:function(a){var b=a.points.length,d;for(d=0;d<
b;d++)if(this.contains(a.getPoint(d)))return!0;return!1},_intersectsExtent:function(a){var b,d;d=this.hasZ&&a.hasZ;if(this.xmin<=a.xmin){if(b=a.xmin,this.xmax<b)return!1}else if(b=this.xmin,a.xmax<b)return!1;if(this.ymin<=a.ymin){if(b=a.ymin,this.ymax<b)return!1}else if(b=this.ymin,a.ymax<b)return!1;if(d&&a.hasZ)if(this.zmin<=a.zmin){if(d=a.zmin,this.zmax<d)return!1}else if(d=this.zmin,a.zmax<d)return!1;return!0},_intersectsPolygon:function(a){var b=[this.xmin,this.ymax],d=[this.xmax,this.ymax],g=
[this.xmin,this.ymin],k=[this.xmax,this.ymin],h=[b,d,g,k],b=[[g,b],[b,d],[d,k],[k,g]],g=a.rings,k=g.length,m,n=new f(0,0,this.spatialReference);m=h.length;for(d=0;d<m;d++)if(n.x=h[d][0],n.y=h[d][1],a.contains(n))return!0;for(var n={x:0,y:0,spatialReference:a.spatialReference,type:"point"},p,e,d=0;d<k;d++)if(h=g[d],m=h.length){p=h[0];n.x=p[0];n.y=p[1];if(this.contains(n))return!0;for(a=1;a<m;a++){e=h[a];n.x=e[0];n.y=e[1];if(this.contains(n)||this._intersectsLine([p,e],b))return!0;p=e}}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]]],d,g=a.paths,f=g.length,k,h,m,p,e={x:0,y:0,spatialReference:a.spatialReference,type:"point"};for(a=0;a<f;a++)if(k=g[a],h=k.length){m=k[0];e.x=m[0];e.y=m[1];if(this.contains(e))return!0;for(d=1;d<h;d++){p=k[d];e.x=p[0];e.y=p[1];if(this.contains(e)||this._intersectsLine([m,p],b))return!0;m=p}}return!1},_intersectsLine:function(a,
b){var c=m._getLineIntersection2,d,g=b.length;for(d=0;d<g;d++)if(c(a,b[d]))return!0;return!1},_shiftCM:function(a){var b=this.spatialReference;if(a=a||g.getInfo(b)){var d=this._getCM(a);if(d){var f=b.isWebMercator?n.webMercatorToGeographic(d):d;this.xmin-=d.x;this.xmax-=d.x;b.isWebMercator||(f.x=this._normalizeX(f.x,a).x);this.spatialReference=new l(h.substitute({Central_Meridian:f.x},b.isWGS84?a.altTemplate:a.wkTemplate))}}return this},_getCM:function(a){var b,d=a.valid[0];a=a.valid[1];var g=this.xmin,
f=this.xmax;g>=d&&g<=a&&f>=d&&f<=a||(b=this.center);return b},_normalize:function(a,b,d){var c=this.spatialReference;if(c&&(d=d||g.getInfo(c))){var f=this._getParts(d).map(function(a){return a.extent});if(2<f.length)return a?this._shiftCM(d):this.set({xmin:d.valid[0],xmax:d.valid[1]});if(2===f.length){if(a)return this._shiftCM(d);if(b)return f;var k=!0,h=!0;f.map(function(a){a.hasZ||(k=!1);a.hasM||(h=!1)});return{rings:f.map(function(a){var b=[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,
a.ymin],[a.xmin,a.ymin]];if(k)for(var e=(a.zmax-a.zmin)/2,c=0;c<b.length;c++)b[c].push(e);if(h)for(a=(a.mmax-a.mmin)/2,c=0;c<b.length;c++)b[c].push(a);return b}),hasZ:k,hasM:h,spatialReference:c}}return f[0]||this}return this},_getParts:function(a){var b=this.cache._parts;if(!b){var b=[],f=this.xmin,k=this.xmax,h=this.ymin,m=this.ymax,n=this.spatialReference,l=this.width,p=f,e=k,q=0,u=0,z,C;a=a||g.getInfo(n);z=a.valid[0];C=a.valid[1];u=this._normalizeX(f,a);f=u.x;q=u.frameId;u=this._normalizeX(k,
a);k=u.x;u=u.frameId;a=f===k&&0<l;if(l>2*C){l=new d(p<e?f:k,h,C,m,n);f=new d(z,h,p<e?k:f,m,n);C=new d(0,h,C,m,n);h=new d(z,h,0,m,n);n=[];z=[];l.contains(C)&&n.push(q);l.contains(h)&&z.push(q);f.contains(C)&&n.push(u);f.contains(h)&&z.push(u);for(m=q+1;m<u;m++)n.push(m),z.push(m);b.push({extent:l,frameIds:[q]},{extent:f,frameIds:[u]},{extent:C,frameIds:n},{extent:h,frameIds:z})}else f>k||a?b.push({extent:new d(f,h,C,m,n),frameIds:[q]},{extent:new d(z,h,k,m,n),frameIds:[u]}):b.push({extent:new d(f,
h,k,m,n),frameIds:[q]});this.cache._parts=b}u=this.hasZ;h=this.hasM;if(u||h)for(q={},u&&(q.zmin=this.zmin,q.zmax=this.zmax),h&&(q.mmin=this.mmin,q.mmax=this.mmax),u=0;u<b.length;u++)b[u].extent.set(q);return b},_normalizeX:function(a,b){var c=0,d=b.valid[0],g=b.valid[1];b=2*g;a>g?(c=Math.ceil(Math.abs(a-g)/b),a-=c*b):a<d&&(c=Math.ceil(Math.abs(a-d)/b),a+=c*b,c=-c);return{x:a,frameId:c}}});return d})},"esri/geometry/SpatialReference":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/accessorSupport/decorators ./support/spatialReferenceUtils".split(" "),
function(b,h,l,k,f,n,m){b=function(a){function b(b){b=a.call(this)||this;b.latestWkid=null;b.wkid=null;b.wkt=null;return b}l(b,a);f=b;b.prototype.normalizeCtorArgs=function(a){return a&&"object"===typeof a?a:(b={},b["string"===typeof a?"wkt":"wkid"]=a,b);var b};Object.defineProperty(b.prototype,"isWGS84",{get:function(){return 4326===this.wkid},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWebMercator",{get:function(){return-1!==g.indexOf(this.wkid)},enumerable:!0,configurable:!0});
Object.defineProperty(b.prototype,"isGeographic",{get:function(){return m.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWrappable",{get:function(){return-1!==d.indexOf(this.wkid)},enumerable:!0,configurable:!0});b.prototype.writeWkt=function(a,b){this.wkid||(b.wkt=a)};b.prototype.clone=function(){if(this===f.WGS84)return f.WGS84;if(this===f.WebMercator)return f.WebMercator;var a=new f;null!=this.wkid?(a.wkid=this.wkid,null!=this.latestWkid&&(a.latestWkid=
this.latestWkid),null!=this.vcsWkid&&(a.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(a.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(a.wkt=this.wkt);return a};b.prototype.equals=function(a){if(a){if(this===a)return!0;if(null!=this.wkid||null!=a.wkid)return this.wkid===a.wkid||this.isWebMercator&&a.isWebMercator||null!=a.latestWkid&&this.wkid===a.latestWkid||null!=this.latestWkid&&a.wkid===this.latestWkid;if(this.wkt&&a.wkt)return this.wkt.toUpperCase()===a.wkt.toUpperCase()}return!1};b.fromJSON=
function(a){if(!a)return null;if(a.wkid){if(102100===a.wkid)return f.WebMercator;if(4326===a.wkid)return f.WGS84}var b=new f;b.read(a);return b};b.WGS84=null;b.WebMercator=null;k([n.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWGS84",null);k([n.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWebMercator",null);k([n.property({dependsOn:["wkid","wkt"],readOnly:!0})],b.prototype,"isGeographic",null);k([n.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWrappable",null);
k([n.property({json:{write:!0}})],b.prototype,"latestWkid",void 0);k([n.property({json:{write:!0}})],b.prototype,"wkid",void 0);k([n.property()],b.prototype,"wkt",void 0);k([n.writer("wkt")],b.prototype,"writeWkt",null);k([n.property({json:{write:!0}})],b.prototype,"vcsWkid",void 0);k([n.property({json:{write:!0}})],b.prototype,"latestVcsWkid",void 0);return b=f=k([n.subclass("esri.SpatialReference")],b);var f}(n.declared(f));b.WGS84=new b(4326);b.WebMercator=new b({wkid:102100,latestWkid:3857});
Object.freeze&&(Object.freeze(b.WGS84),Object.freeze(b.WebMercator));var g=[102113,102100,3857,3785],d=[102113,102100,3857,3785,4326];return b})},"esri/geometry/support/spatialReferenceUtils":function(){define(["require","exports","./WKIDUnitConversion"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});h.isGeographic=function(b){return b.wkid?null==l[b.wkid]:b.wkt?/^\s*GEOGCS/i.test(b.wkt):!1};h.getInfo=function(b){return b.wkid?k[b.wkid]:null};b=[-2.0037508342788905E7,2.0037508342788905E7];
h=[-2.0037508342787E7,2.0037508342787E7];var k={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:b,
origin:h,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]]',valid:b,origin:h,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:b,origin:h,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]]',
valid:b,origin:h,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]]',
valid:[-180,180],origin:[-180,180],dx:1E-5}}})},"esri/geometry/support/WKIDUnitConversion":function(){define([],function(){var b,h={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],units:"Meter Foot Foot_US Foot_Clarke Yard_Clarke Link_Clarke Yard_Sears Foot_Sears Chain_Sears Chain_Benoit_1895_B Yard_Indian Yard_Indian_1937 Foot_Gold_Coast Chain_Sears_1922_Truncated 50_Kilometers 150_Kilometers".split(" "),
2066:5,2136:12,2155:2,2157:0,2158: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,3496: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,3600: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,3682: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,4087:0,4088: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,5457: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,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,
6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,
6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,
6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,
6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7257:0,7258:2,7259:0,7260:2,
7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,
7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7899:0,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,22391: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,
24100: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,
31171: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,102706:0,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,
102974:2,102993:0,102994:0,102995: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,103121: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,103262: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,103507: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(b=2E3;2045>=b;b++)h[b]=0;for(b=2056;2065>=b;b++)h[b]=0;for(b=2067;2135>=b;b++)h[b]=0;for(b=2137;2154>=b;b++)h[b]=0;for(b=2161;2170>=b;b++)h[b]=0;for(b=2172;2193>=b;b++)h[b]=
0;for(b=2195;2198>=b;b++)h[b]=0;for(b=2200;2203>=b;b++)h[b]=0;for(b=2205;2217>=b;b++)h[b]=0;for(b=2222;2224>=b;b++)h[b]=1;for(b=2225;2250>=b;b++)h[b]=2;for(b=2251;2253>=b;b++)h[b]=1;for(b=2257;2264>=b;b++)h[b]=2;for(b=2274;2279>=b;b++)h[b]=2;for(b=2280;2282>=b;b++)h[b]=1;for(b=2283;2289>=b;b++)h[b]=2;for(b=2290;2292>=b;b++)h[b]=0;for(b=2308;2313>=b;b++)h[b]=0;for(b=2315;2491>=b;b++)h[b]=0;for(b=2494;2866>=b;b++)h[b]=0;for(b=2867;2869>=b;b++)h[b]=1;for(b=2870;2888>=b;b++)h[b]=2;for(b=2891;2895>=b;b++)h[b]=
2;for(b=2896;2898>=b;b++)h[b]=1;for(b=2902;2908>=b;b++)h[b]=2;for(b=2915;2920>=b;b++)h[b]=2;for(b=2921;2923>=b;b++)h[b]=1;for(b=2924;2930>=b;b++)h[b]=2;for(b=2931;2962>=b;b++)h[b]=0;for(b=2964;2968>=b;b++)h[b]=2;for(b=2969;2973>=b;b++)h[b]=0;for(b=2975;2991>=b;b++)h[b]=0;for(b=2995;3051>=b;b++)h[b]=0;for(b=3054;3079>=b;b++)h[b]=0;for(b=3081;3088>=b;b++)h[b]=0;for(b=3092;3101>=b;b++)h[b]=0;for(b=3106;3138>=b;b++)h[b]=0;for(b=3146;3151>=b;b++)h[b]=0;for(b=3153;3166>=b;b++)h[b]=0;for(b=3168;3172>=b;b++)h[b]=
0;for(b=3174;3203>=b;b++)h[b]=0;for(b=3294;3358>=b;b++)h[b]=0;for(b=3367;3403>=b;b++)h[b]=0;for(b=3408;3416>=b;b++)h[b]=0;for(b=3417;3438>=b;b++)h[b]=2;for(b=3441;3446>=b;b++)h[b]=2;for(b=3447;3450>=b;b++)h[b]=0;for(b=3451;3459>=b;b++)h[b]=2;for(b=3460;3478>=b;b++)h[b]=0;for(b=3554;3559>=b;b++)h[b]=0;for(b=3560;3570>=b;b++)h[b]=2;for(b=3571;3581>=b;b++)h[b]=0;for(b=3594;3597>=b;b++)h[b]=0;for(b=3601;3604>=b;b++)h[b]=0;for(b=3637;3639>=b;b++)h[b]=0;for(b=3665;3667>=b;b++)h[b]=0;for(b=3693;3695>=b;b++)h[b]=
0;for(b=3701;3727>=b;b++)h[b]=0;for(b=3728;3739>=b;b++)h[b]=2;for(b=3740;3751>=b;b++)h[b]=0;for(b=3753;3760>=b;b++)h[b]=2;for(b=3761;3773>=b;b++)h[b]=0;for(b=3775;3777>=b;b++)h[b]=0;for(b=3779;3781>=b;b++)h[b]=0;for(b=3783;3785>=b;b++)h[b]=0;for(b=3788;3791>=b;b++)h[b]=0;for(b=3797;3802>=b;b++)h[b]=0;for(b=3814;3816>=b;b++)h[b]=0;for(b=3825;3829>=b;b++)h[b]=0;for(b=3832;3841>=b;b++)h[b]=0;for(b=3844;3852>=b;b++)h[b]=0;for(b=3873;3885>=b;b++)h[b]=0;for(b=3890;3893>=b;b++)h[b]=0;for(b=3907;3912>=b;b++)h[b]=
0;for(b=3942;3950>=b;b++)h[b]=0;for(b=3968;3970>=b;b++)h[b]=0;for(b=3973;3976>=b;b++)h[b]=0;for(b=3986;3989>=b;b++)h[b]=0;for(b=3994;3997>=b;b++)h[b]=0;for(b=4048;4051>=b;b++)h[b]=0;for(b=4056;4063>=b;b++)h[b]=0;for(b=4093;4096>=b;b++)h[b]=0;for(b=4390;4398>=b;b++)h[b]=0;for(b=4399;4413>=b;b++)h[b]=2;for(b=4418;4433>=b;b++)h[b]=2;for(b=4455;4457>=b;b++)h[b]=2;for(b=4484;4489>=b;b++)h[b]=0;for(b=4491;4554>=b;b++)h[b]=0;for(b=4568;4589>=b;b++)h[b]=0;for(b=4652;4656>=b;b++)h[b]=0;for(b=4766;4800>=b;b++)h[b]=
0;for(b=5014;5016>=b;b++)h[b]=0;for(b=5069;5072>=b;b++)h[b]=0;for(b=5105;5130>=b;b++)h[b]=0;for(b=5173;5188>=b;b++)h[b]=0;for(b=5253;5259>=b;b++)h[b]=0;for(b=5269;5275>=b;b++)h[b]=0;for(b=5292;5311>=b;b++)h[b]=0;for(b=5329;5331>=b;b++)h[b]=0;for(b=5343;5349>=b;b++)h[b]=0;for(b=5355;5357>=b;b++)h[b]=0;for(b=5387;5389>=b;b++)h[b]=0;for(b=5459;5463>=b;b++)h[b]=0;for(b=5479;5482>=b;b++)h[b]=0;for(b=5518;5520>=b;b++)h[b]=0;for(b=5530;5539>=b;b++)h[b]=0;for(b=5550;5552>=b;b++)h[b]=0;for(b=5562;5583>=b;b++)h[b]=
0;for(b=5623;5625>=b;b++)h[b]=2;for(b=5631;5639>=b;b++)h[b]=0;for(b=5649;5653>=b;b++)h[b]=0;for(b=5663;5680>=b;b++)h[b]=0;for(b=5682;5685>=b;b++)h[b]=0;for(b=5875;5877>=b;b++)h[b]=0;for(b=5921;5940>=b;b++)h[b]=0;for(b=6050;6125>=b;b++)h[b]=0;for(b=6244;6275>=b;b++)h[b]=0;for(b=6328;6348>=b;b++)h[b]=0;for(b=6350;6356>=b;b++)h[b]=0;for(b=6366;6372>=b;b++)h[b]=0;for(b=6381;6387>=b;b++)h[b]=0;for(b=6393;6404>=b;b++)h[b]=0;for(b=6480;6483>=b;b++)h[b]=0;for(b=6511;6514>=b;b++)h[b]=0;for(b=6579;6581>=b;b++)h[b]=
0;for(b=6619;6624>=b;b++)h[b]=0;for(b=6625;6627>=b;b++)h[b]=2;for(b=6628;6632>=b;b++)h[b]=0;for(b=6634;6637>=b;b++)h[b]=0;for(b=6669;6692>=b;b++)h[b]=0;for(b=6707;6709>=b;b++)h[b]=0;for(b=6720;6723>=b;b++)h[b]=0;for(b=6732;6738>=b;b++)h[b]=0;for(b=6931;6933>=b;b++)h[b]=0;for(b=6956;6959>=b;b++)h[b]=0;for(b=7005;7007>=b;b++)h[b]=0;for(b=7057;7070>=b;b++)h[b]=2;for(b=7074;7082>=b;b++)h[b]=0;for(b=7109;7118>=b;b++)h[b]=0;for(b=7119;7127>=b;b++)h[b]=1;for(b=7374;7376>=b;b++)h[b]=0;for(b=7528;7586>=b;b++)h[b]=
0;for(b=7587;7645>=b;b++)h[b]=2;for(b=7845;7859>=b;b++)h[b]=0;for(b=8013;8032>=b;b++)h[b]=0;for(b=20002;20032>=b;b++)h[b]=0;for(b=20062;20092>=b;b++)h[b]=0;for(b=20135;20138>=b;b++)h[b]=0;for(b=20248;20258>=b;b++)h[b]=0;for(b=20348;20358>=b;b++)h[b]=0;for(b=20436;20440>=b;b++)h[b]=0;for(b=20822;20824>=b;b++)h[b]=0;for(b=20934;20936>=b;b++)h[b]=0;for(b=21035;21037>=b;b++)h[b]=0;for(b=21095;21097>=b;b++)h[b]=0;for(b=21148;21150>=b;b++)h[b]=0;for(b=21413;21423>=b;b++)h[b]=0;for(b=21473;21483>=b;b++)h[b]=
0;for(b=21780;21782>=b;b++)h[b]=0;for(b=21891;21894>=b;b++)h[b]=0;for(b=21896;21899>=b;b++)h[b]=0;for(b=22171;22177>=b;b++)h[b]=0;for(b=22181;22187>=b;b++)h[b]=0;for(b=22191;22197>=b;b++)h[b]=0;for(b=22234;22236>=b;b++)h[b]=0;for(b=22521;22525>=b;b++)h[b]=0;for(b=22991;22994>=b;b++)h[b]=0;for(b=23028;23038>=b;b++)h[b]=0;for(b=23830;23853>=b;b++)h[b]=0;for(b=23866;23872>=b;b++)h[b]=0;for(b=23877;23884>=b;b++)h[b]=0;for(b=23886;23894>=b;b++)h[b]=0;for(b=23946;23948>=b;b++)h[b]=0;for(b=24311;24313>=
b;b++)h[b]=0;for(b=24342;24347>=b;b++)h[b]=0;for(b=24370;24374>=b;b++)h[b]=10;for(b=24375;24381>=b;b++)h[b]=0;for(b=24718;24721>=b;b++)h[b]=0;for(b=24817;24821>=b;b++)h[b]=0;for(b=24877;24882>=b;b++)h[b]=0;for(b=24891;24893>=b;b++)h[b]=0;for(b=25391;25395>=b;b++)h[b]=0;for(b=25828;25838>=b;b++)h[b]=0;for(b=26191;26195>=b;b++)h[b]=0;for(b=26391;26393>=b;b++)h[b]=0;for(b=26701;26722>=b;b++)h[b]=0;for(b=26729;26799>=b;b++)h[b]=2;for(b=26801;26803>=b;b++)h[b]=2;for(b=26811;26813>=b;b++)h[b]=2;for(b=26847;26870>=
b;b++)h[b]=2;for(b=26891;26899>=b;b++)h[b]=0;for(b=26901;26923>=b;b++)h[b]=0;for(b=26929;26946>=b;b++)h[b]=0;for(b=26948;26998>=b;b++)h[b]=0;for(b=27037;27040>=b;b++)h[b]=0;for(b=27205;27232>=b;b++)h[b]=0;for(b=27258;27260>=b;b++)h[b]=0;for(b=27391;27398>=b;b++)h[b]=0;for(b=27561;27564>=b;b++)h[b]=0;for(b=27571;27574>=b;b++)h[b]=0;for(b=27581;27584>=b;b++)h[b]=0;for(b=27591;27594>=b;b++)h[b]=0;for(b=28191;28193>=b;b++)h[b]=0;for(b=28348;28358>=b;b++)h[b]=0;for(b=28402;28432>=b;b++)h[b]=0;for(b=28462;28492>=
b;b++)h[b]=0;for(b=29118;29122>=b;b++)h[b]=0;for(b=29168;29172>=b;b++)h[b]=0;for(b=29177;29185>=b;b++)h[b]=0;for(b=29187;29195>=b;b++)h[b]=0;for(b=29900;29903>=b;b++)h[b]=0;for(b=30161;30179>=b;b++)h[b]=0;for(b=30491;30494>=b;b++)h[b]=0;for(b=30729;30732>=b;b++)h[b]=0;for(b=31251;31259>=b;b++)h[b]=0;for(b=31265;31268>=b;b++)h[b]=0;for(b=31275;31279>=b;b++)h[b]=0;for(b=31281;31297>=b;b++)h[b]=0;for(b=31461;31469>=b;b++)h[b]=0;for(b=31491;31495>=b;b++)h[b]=0;for(b=31917;31922>=b;b++)h[b]=0;for(b=31965;32E3>=
b;b++)h[b]=0;for(b=32001;32003>=b;b++)h[b]=2;for(b=32005;32031>=b;b++)h[b]=2;for(b=32033;32060>=b;b++)h[b]=2;for(b=32064;32067>=b;b++)h[b]=2;for(b=32074;32077>=b;b++)h[b]=2;for(b=32081;32086>=b;b++)h[b]=0;for(b=32107;32130>=b;b++)h[b]=0;for(b=32133;32158>=b;b++)h[b]=0;for(b=32164;32167>=b;b++)h[b]=2;for(b=32180;32199>=b;b++)h[b]=0;for(b=32201;32260>=b;b++)h[b]=0;for(b=32301;32360>=b;b++)h[b]=0;for(b=32601;32662>=b;b++)h[b]=0;for(b=32664;32667>=b;b++)h[b]=2;for(b=32701;32761>=b;b++)h[b]=0;for(b=53001;53004>=
b;b++)h[b]=0;for(b=53008;53019>=b;b++)h[b]=0;for(b=53021;53032>=b;b++)h[b]=0;for(b=53042;53046>=b;b++)h[b]=0;for(b=53074;53080>=b;b++)h[b]=0;for(b=54001;54004>=b;b++)h[b]=0;for(b=54008;54019>=b;b++)h[b]=0;for(b=54021;54032>=b;b++)h[b]=0;for(b=54042;54046>=b;b++)h[b]=0;for(b=54048;54053>=b;b++)h[b]=0;for(b=54074;54080>=b;b++)h[b]=0;for(b=102001;102040>=b;b++)h[b]=0;for(b=102042;102063>=b;b++)h[b]=0;for(b=102065;102067>=b;b++)h[b]=0;for(b=102070;102117>=b;b++)h[b]=0;for(b=102122;102216>=b;b++)h[b]=
0;for(b=102221;102377>=b;b++)h[b]=0;for(b=102382;102388>=b;b++)h[b]=0;for(b=102389;102398>=b;b++)h[b]=2;for(b=102399;102444>=b;b++)h[b]=0;for(b=102445;102447>=b;b++)h[b]=2;for(b=102448;102458>=b;b++)h[b]=0;for(b=102459;102468>=b;b++)h[b]=2;for(b=102469;102496>=b;b++)h[b]=0;for(b=102500;102519>=b;b++)h[b]=1;for(b=102520;102524>=b;b++)h[b]=0;for(b=102525;102529>=b;b++)h[b]=2;for(b=102530;102561>=b;b++)h[b]=0;for(b=102570;102588>=b;b++)h[b]=0;for(b=102590;102598>=b;b++)h[b]=0;for(b=102601;102603>=b;b++)h[b]=
0;for(b=102605;102628>=b;b++)h[b]=0;for(b=102629;102646>=b;b++)h[b]=2;for(b=102648;102700>=b;b++)h[b]=2;for(b=102701;102703>=b;b++)h[b]=0;for(b=102707;102730>=b;b++)h[b]=2;for(b=102733;102758>=b;b++)h[b]=2;for(b=102767;102798>=b;b++)h[b]=0;for(b=102965;102969>=b;b++)h[b]=0;for(b=102971;102973>=b;b++)h[b]=0;for(b=102975;102989>=b;b++)h[b]=0;for(b=102990;102992>=b;b++)h[b]=1;for(b=102997;103002>=b;b++)h[b]=0;for(b=103003;103008>=b;b++)h[b]=2;for(b=103009;103011>=b;b++)h[b]=0;for(b=103012;103014>=b;b++)h[b]=
2;for(b=103019;103021>=b;b++)h[b]=0;for(b=103022;103024>=b;b++)h[b]=2;for(b=103029;103031>=b;b++)h[b]=0;for(b=103032;103034>=b;b++)h[b]=2;for(b=103065;103068>=b;b++)h[b]=0;for(b=103074;103076>=b;b++)h[b]=0;for(b=103077;103079>=b;b++)h[b]=1;for(b=103080;103082>=b;b++)h[b]=0;for(b=103083;103085>=b;b++)h[b]=2;for(b=103090;103093>=b;b++)h[b]=0;for(b=103097;103099>=b;b++)h[b]=0;for(b=103100;103102>=b;b++)h[b]=2;for(b=103107;103109>=b;b++)h[b]=0;for(b=103110;103112>=b;b++)h[b]=2;for(b=103113;103116>=b;b++)h[b]=
0;for(b=103117;103120>=b;b++)h[b]=2;for(b=103153;103157>=b;b++)h[b]=0;for(b=103158;103162>=b;b++)h[b]=2;for(b=103163;103165>=b;b++)h[b]=0;for(b=103166;103168>=b;b++)h[b]=1;for(b=103169;103171>=b;b++)h[b]=2;for(b=103186;103188>=b;b++)h[b]=0;for(b=103189;103191>=b;b++)h[b]=2;for(b=103192;103195>=b;b++)h[b]=0;for(b=103196;103199>=b;b++)h[b]=2;for(b=103200;103224>=b;b++)h[b]=0;for(b=103225;103227>=b;b++)h[b]=1;for(b=103232;103237>=b;b++)h[b]=0;for(b=103238;103243>=b;b++)h[b]=2;for(b=103244;103246>=b;b++)h[b]=
0;for(b=103247;103249>=b;b++)h[b]=2;for(b=103254;103256>=b;b++)h[b]=0;for(b=103257;103259>=b;b++)h[b]=2;for(b=103264;103266>=b;b++)h[b]=0;for(b=103267;103269>=b;b++)h[b]=2;for(b=103300;103375>=b;b++)h[b]=0;for(b=103381;103383>=b;b++)h[b]=0;for(b=103384;103386>=b;b++)h[b]=1;for(b=103387;103389>=b;b++)h[b]=0;for(b=103390;103392>=b;b++)h[b]=2;for(b=103397;103399>=b;b++)h[b]=0;for(b=103400;103471>=b;b++)h[b]=2;for(b=103476;103478>=b;b++)h[b]=0;for(b=103479;103481>=b;b++)h[b]=2;for(b=103486;103488>=b;b++)h[b]=
0;for(b=103489;103491>=b;b++)h[b]=2;for(b=103492;103495>=b;b++)h[b]=0;for(b=103496;103499>=b;b++)h[b]=2;for(b=103528;103543>=b;b++)h[b]=0;for(b=103544;103548>=b;b++)h[b]=2;for(b=103549;103551>=b;b++)h[b]=0;for(b=103552;103554>=b;b++)h[b]=1;for(b=103555;103557>=b;b++)h[b]=2;for(b=103558;103560>=b;b++)h[b]=0;for(b=103571;103573>=b;b++)h[b]=0;for(b=103574;103576>=b;b++)h[b]=2;for(b=103577;103580>=b;b++)h[b]=0;for(b=103581;103583>=b;b++)h[b]=2;for(b=103600;103694>=b;b++)h[b]=0;for(b=103700;103793>=b;b++)h[b]=
2;for(b=103794;103871>=b;b++)h[b]=0;for(b=103900;103971>=b;b++)h[b]=2;return h})},"esri/geometry/Geometry":function(){define(["../core/JSONSupport","./SpatialReference"],function(b,h){return b.createSubclass({declaredClass:"esri.geometry.Geometry",type:null,properties:{cache:{value:null,readOnly:!0,dependsOn:["spatialReference"],get:function(){return{}}},extent:{value:null,readOnly:!0,dependsOn:["spatialReference"]},hasM:!1,hasZ:!1,spatialReference:h.WGS84},isSR:function(b){return b&&("esri.SpatialReference"===
b.declaredClass||null!=b.wkid)},clone:function(){console.warn(".clone() is not implemented for "+this.declaredClass);return null},toJSON:function(){console.warn(".toJSON() is not implemented for "+this.declaredClass);return null},clearCache:function(){this.notifyChange("cache")},getCacheValue:function(b){return this.cache[b]},setCacheValue:function(b,k){this.cache[b]=k}})})},"esri/geometry/Point":function(){define(["./SpatialReference","./Geometry","./support/webMercatorUtils","./support/spatialReferenceUtils"],
function(b,h,l,k){var f=[0,0],n=l.lngLatToXY,m=l.xyToLngLat,g=h.createSubclass({declaredClass:"esri.geometry.Point",normalizeCtorArgs:function(d,a,c,g,k){var h;Array.isArray(d)?(h=d,k=a,d=h[0],a=h[1],c=h[2],g=h[3]):d&&"object"===typeof d?(h=d,d=null!=h.x?h.x:h.longitude,a=null!=h.y?h.y:h.latitude,c=null!=h.z?h.z:h.altitude,g=h.m,(k=h.spatialReference)&&"esri.SpatialReference"!==k.declaredClass&&(k=new b(k)),!h.declaredClass&&k&&k.isWebMercator&&null!=h.longitude&&null!=h.latitude&&(a=n(h.longitude,
h.latitude,!1,f),d=a[0],a=a[1])):this.isSR(c)?(k=c,c=null):this.isSR(g)&&(k=g,g=null);d={x:d,y:a};null!=k&&(d.spatialReference=k);null!=c&&(d.z=c);null!=g&&(d.m=g);return d},properties:{cache:{dependsOn:["x","y","z","m"]},hasM:{dependsOn:["m"],get:function(){return void 0!==this.m},set:function(b){var a=this._get("hasM");b!==a&&(this._set("m",b?0:void 0),this._set("hasM",b))}},hasZ:{dependsOn:["z"],get:function(){return void 0!==this.z},set:function(b){var a=this._get("hasZ");b!==a&&(this._set("z",
b?0:void 0),this._set("hasZ",b))}},latitude:{dependsOn:["y"],get:function(){var b=this._get("spatialReference");if(b){if(b.isWebMercator)return m(this.x,this.y,!1,f)[1];if(b.isWGS84)return this._get("y")}return null},set:function(b){var a=this._get("spatialReference");a&&(a.isWebMercator?this._set("y",n(this.x,b,!1,f)[1]):a.isWGS84&&this._set("y",b),this._set("latitude",b))}},longitude:{dependsOn:["x"],get:function(){var b=this._get("spatialReference");if(b){if(b.isWebMercator)return m(this._get("x"),
this._get("y"),!1,f)[0];if(b.isWGS84)return this._get("x")}return null},set:function(b){var a=this._get("spatialReference");a&&(a.isWebMercator?this._set("x",n(b,this._get("y"),!1,f)[0]):a.isWGS84&&this._set("x",b),this._set("longitude",b))}},x:0,y:0,z:void 0,m:void 0,type:"point"},clone:function(){var b=new g;b.x=this.x;b.y=this.y;b.z=this.z;b.m=this.m;b.spatialReference=this.spatialReference;return b},copy:function(b){g.copy(b,this);return this},equals:function(b){if(!b)return!1;var a=this.x,c=
this.y,d=this.z,g=this.m,f=this.spatialReference,k=b.x,h=b.y,l=b.z,p=b.m;b=b.spatialReference;if(!f.equals(b))if(f.isWebMercator&&b.isWGS84)h=n(k,h),k=h[0],h=h[1],b=f;else if(f.isWGS84&&b.isWebMercator)h=m(k,h),k=h[0],h=h[1],b=f;else return!1;return a===k&&c===h&&d===l&&g===p&&f.wkid===b.wkid},offset:function(b,a,c){this.x+=b;this.y+=a;null!=c&&this.hasZ&&(this.z+=c);return this},normalize:function(){var b=this.x,a=this.spatialReference;if(a){var c=k.getInfo(a);if(c){var a=c.valid[0],g=c.valid[1],
c=2*g;b>g?(a=Math.ceil(Math.abs(b-g)/c),b-=a*c):b<a&&(a=Math.ceil(Math.abs(b-a)/c),b+=a*c)}}this._set("x",b);return this},distance:function(b){return g.distance(this,b)},toArray:function(){var b=this.hasZ,a=this.hasM;return b&&a?[this.x,this.y,this.z,this.m]:b?[this.x,this.y,this.z]:a?[this.x,this.y,this.m]:[this.x,this.y]},toJSON:function(){var b=this.spatialReference,a={x:this.x,y:this.y};this.hasZ&&(a.z=this.z);this.hasM&&(a.m=this.m);a.spatialReference=b&&b.toJSON();return a}});g.lngLatToXY=n;
g.xyToLngLat=m;g.copy=function(b,a){a.x=b.x;a.y=b.y;a.z=b.z;a.m=b.m;a.spatialReference=Object.isFrozen(b.spatialReference)?b.spatialReference:b.spatialReference.clone()};g.distance=function(b,a){var c=b.x-a.x,d=b.y-a.y;b=b.hasZ&&a.hasZ?b.z-a.z:0;return Math.sqrt(c*c+d*d+b*b)};return g})},"esri/geometry/support/webMercatorUtils":function(){define(["require","exports","../SpatialReference"],function(b,h,l){function k(b,a,c,f,k){if("point"===b.type)a=a(b.x,b.y,f,g),k.x=a[0],k.y=a[1];else if("extent"===
b.type)e=a(b.xmin,b.ymin,f,g),k.xmin=e[0],k.ymin=e[1],a=a(b.xmax,b.ymax,f,g),k.xmax=a[0],k.ymax=a[1];else if("polyline"===b.type||"polygon"===b.type){var d=(e="polyline"===b.type)?b.paths:b.rings,h=[],m=void 0;for(b=0;b<d.length;b++){var n=d[b],m=[];h.push(m);for(var p=0;p<n.length;p++)m.push(a(n[p][0],n[p][1],f)),2<n[p].length&&m[p].push(n[p][2]),3<n[p].length&&m[p].push(n[p][3])}e?k.paths=h:k.rings=h}else if("multipoint"===b.type){e=b.points;d=[];for(b=0;b<e.length;b++)d[b]=a(e[b][0],e[b][1],f),
2<e[b].length&&d[b].push(e[b][2]),3<e[b].length&&d[b].push(e[b][3]);k.points=d}k.spatialReference=c;return k;var e}function f(b,a){b=b&&(null!=b.wkid||null!=b.wkt?b:b.spatialReference);a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);return b&&a?a.equals(b)?!0:a.isWebMercator&&b.isWGS84||b.isWebMercator&&a.isWGS84:!1}function n(b,a,c,g){void 0===g&&(g=[0,0]);89.99999<a?a=89.99999:-89.99999>a&&(a=-89.99999);a*=.017453292519943;g[0]=111319.49079327169*b;g[1]=3189068.5*Math.log((1+Math.sin(a))/
(1-Math.sin(a)));return g}function m(b,a,c,g){void 0===c&&(c=!1);void 0===g&&(g=[0,0]);b=b/6378137*57.29577951308232;g[0]=c?b:b-360*Math.floor((b+180)/360);g[1]=57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*a/6378137)));return g}Object.defineProperty(h,"__esModule",{value:!0});var g=[0,0];h.canProject=f;h.project=function(b,a){var c=b&&b.spatialReference;a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);return f(c,a)?c.equals(a)?b.clone():a.isWebMercator?k(b,n,l.WebMercator,!1,
b.clone()):a.isWGS84?k(b,m,l.WGS84,!1,b.clone()):null:null};h.lngLatToXY=n;h.xyToLngLat=m;h.geographicToWebMercator=function(b,a,c){void 0===a&&(a=!1);void 0===c&&(c=b.clone());return k(b,n,l.WebMercator,a,c)};h.webMercatorToGeographic=function(b,a,c){void 0===a&&(a=!1);void 0===c&&(c=b.clone());return k(b,m,l.WGS84,a,c)}})},"esri/geometry/support/mathUtils":function(){define(["../Point"],function(b){function h(f,k){var g,d,a;f instanceof b?(g=k.x-f.x,d=k.y-f.y,a=0,null!=f.z&&null!=k.z&&(a=f.z-k.z)):
(g=k[0]-f[0],d=k[1]-f[1],a=0,null!=f[2]&&null!=k[2]&&(a=f[2]-k[2]));return Math.sqrt(g*g+d*d+a*a)}function l(f,k,g){var d,a,c;if(f instanceof b)return d=f.x+g*(k.x-f.x),a=f.y+g*(k.y-f.y),null!=f.z&&null!=k.z&&(c=f.z+g*(k.z-f.z)),new b(d,a,c);d=f[0]+g*(k[0]-f[0]);a=f[1]+g*(k[1]-f[1]);return 2<f.length&&2<k.length?[d,a,f[2]+g*(k[2]-f[2])]:[d,a]}function k(b,f){return 1E-8>Math.abs(b-f)}function f(b,f,g,d){var a,c=k(b[0],f[0])?1E10:(b[1]-f[1])/(b[0]-f[0]),h=k(g[0],d[0])?1E10:(g[1]-d[1])/(g[0]-d[0]),
m=b[1]-c*b[0],n=g[1]-h*g[0];if(k(c,h)){if(k(m,n)){if(k(b[0],f[0]))if(Math.min(b[1],f[1])<Math.max(g[1],d[1])||Math.max(b[1],f[1])>Math.min(g[1],d[1]))b=(b[1]+f[1]+g[1]+d[1]-Math.min(b[1],f[1],g[1],d[1])-Math.max(b[1],f[1],g[1],d[1]))/2,a=(b-m)/c;else return null;else if(Math.min(b[0],f[0])<Math.max(g[0],d[0])||Math.max(b[0],f[0])>Math.min(g[0],d[0]))a=(b[0]+f[0]+g[0]+d[0]-Math.min(b[0],f[0],g[0],d[0])-Math.max(b[0],f[0],g[0],d[0]))/2,b=c*a+m;else return null;return[a,b]}return null}k(c,1E10)?(a=b[0],
b=h*a+n):k(h,1E10)?(a=g[0],b=c*a+m):(a=-(m-n)/(c-h),b=b[1]===f[1]?b[1]:g[1]===d[1]?g[1]:c*a+m);return[a,b]}return{getLength:h,_getLength:function(b,f){var g=f[0]-b[0];b=f[1]-b[1];return Math.sqrt(g*g+b*b)},getPointOnLine:l,getMidpoint:function(b,f){return l(b,f,.5)},_equals:k,_getLineIntersection:f,getLineIntersection:function(k,h,g,d,a){(k=f([k.x,k.y],[h.x,h.y],[g.x,g.y],[d.x,d.y]))&&(k=new b(k[0],k[1],a));return k},_getLineIntersection2:function(b,f){var g=b[0],d=b[1],a=f[0],c=f[1];f=g[0];g=g[1];
b=d[0];var d=d[1],k=a[0],h=a[1],a=c[0]-k,k=f-k,m=b-f,c=c[1]-h,h=g-h,n=d-g,l=c*m-a*n;if(0===l)return!1;a=(a*h-c*k)/l;k=(m*h-n*k)/l;return 0<=a&&1>=a&&0<=k&&1>=k?[f+a*(b-f),g+a*(d-g)]:!1},_pointLineDistance:function(b,f){var g=f[0],d=f[1];f=g[0];var a=g[1],g=b[0];b=b[1];var c=d[0]-f,k=d[1]-a,h=g-f,m=b-a,d=Math.sqrt,n=Math.pow,l=d(n(c,2)+n(k,2)),h=(h*c+m*k)/(l*l),a=a+h*k;return d(n(g-(f+h*c),2)+n(b-a,2))},getPathLength:function(b){for(var f=0,g=b.length,d=0;d<g-1;++d)f+=h(b[d],b[d+1]);return f},getPointOnPath:function(b,
f){if(0>=f)return b[0];for(var g=0,d=b.length,a=0;a<d-1;++a){var c=h(b[a],b[a+1]);if(f-g<c)return l(b[a],b[a+1],(f-g)/c);g+=c}return b[d-1]}}})},"esri/portal/PortalQueryParams":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/kebabDictionary ../geometry/Extent ../geometry/support/webMercatorUtils ../geometry/SpatialReference dojo/_base/lang".split(" "),function(b,h,l,k,f,n,m,g,d,a,
c){var r=m({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});return function(b){function h(a){a=b.call(this)||this;a.disableExtraQuery=!1;a.extent=null;a.num=10;a.query=null;a.sortField=null;a.start=1;return a}l(h,b);m=h;Object.defineProperty(h.prototype,"sortOrder",{get:function(){return this._get("sortOrder")||"asc"},set:function(a){"asc"!==a&&"desc"!==a||this._set("sortOrder",a)},enumerable:!0,configurable:!0});h.prototype.clone=function(){return new m({disableExtraQuery:this.disableExtraQuery,
extent:this.extent?this.extent.clone():null,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})};h.prototype.toRequestOptions=function(b,g){var p;if(this.extent){var e=d.project(this.extent,a.WGS84);e&&(p=e.xmin+","+e.ymin+","+e.xmax+","+e.ymax)}e=this.query;!this.disableExtraQuery&&b.extraQuery&&(e="("+e+")"+b.extraQuery);b={bbox:p,q:e,num:this.num,sortField:null,sortOrder:null,start:this.start};this.sortField&&(b.sortField=r.toJSON(this.sortField),
b.sortOrder=this.sortOrder);return{query:c.mixin(g,b)}};k([f.property()],h.prototype,"disableExtraQuery",void 0);k([f.property({type:g})],h.prototype,"extent",void 0);k([f.property()],h.prototype,"num",void 0);k([f.property()],h.prototype,"query",void 0);k([f.property()],h.prototype,"sortField",void 0);k([f.property()],h.prototype,"sortOrder",null);k([f.property()],h.prototype,"start",void 0);return h=m=k([f.subclass("esri.portal.PortalQueryParams")],h);var m}(f.declared(n))})},"esri/core/kebabDictionary":function(){define(["require",
"exports"],function(b,h){return function(b,k){void 0===k&&(k={});var f=k.ignoreUnknown||!1,h={},m;for(m in b)h[b[m]]=m;var g=function(a){return h.hasOwnProperty(a)?h[a]:f?void 0:a},d=function(a){return b.hasOwnProperty(a)?b[a]:f?void 0:a};return{toJSON:g,fromJSON:d,read:function(a){return d(a)},write:function(a,b,d){a=g(a);void 0!==a&&(b[d]=a)}}}})},"esri/portal/PortalQueryResult":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor".split(" "),
function(b,h,l,k,f,n){return function(b){function g(d){d=b.call(this)||this;d.nextQueryParams=null;d.queryParams=null;d.results=null;d.total=null;return d}l(g,b);k([f.property()],g.prototype,"nextQueryParams",void 0);k([f.property()],g.prototype,"queryParams",void 0);k([f.property()],g.prototype,"results",void 0);k([f.property()],g.prototype,"total",void 0);return g=k([f.subclass("esri.portal.PortalQueryResult")],g)}(f.declared(n))})},"esri/portal/PortalUser":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport ./PortalFolder ./PortalGroup ../core/promiseUtils ../core/requireUtils dojo/promise/all".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r){return function(h){function m(){var a=h.call(this)||this;a.access=null;a.created=null;a.culture=null;a.description=null;a.email=null;a.fullName=null;a.modified=null;a.orgId=null;a.portal=null;a.preferredView=null;a.privileges=null;a.region=null;a.role=null;a.roleId=null;a.units=null;a.username=null;a.userType=null;return a}l(m,h);Object.defineProperty(m.prototype,"thumbnailUrl",{get:function(){var a=this.url,b=this.thumbnail;return a&&b?this.portal._normalizeUrl(a+
"/info/"+b+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"userContentUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username:null},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/users/"+this.username:null},enumerable:!0,configurable:!0});m.prototype.addItem=function(a){var b=this,c=a&&a.item,d=a&&a.data;a=a&&a.folder;var e=
{method:"post"};c&&(e.query=c._getPostQuery(),null!=d&&("string"===typeof d?e.query.text=d:"object"===typeof d&&(e.query.text=JSON.stringify(d))));d=this.userContentUrl;a&&(d+="/"+a.id);return this.portal._request(d+"/addItem",e).then(function(a){c.id=a.id;c.portal=b.portal;return c.loaded?c._reload():c.load()})};m.prototype.deleteItem=function(a){var b=this.userContentUrl;a.ownerFolder&&(b+="/"+a.ownerFolder);return this.portal._request(b+("/items/"+a.id+"/delete"),{method:"post"}).then(function(){a.id=
null;a.portal=null})};m.prototype.fetchFolders=function(){var a=this;return this.portal._request(this.userContentUrl,{query:{num:1}}).then(function(b){return b&&b.folders?b.folders.map(function(b){b=g.fromJSON(b);b.portal=a.portal;return b}):[]})};m.prototype.fetchGroups=function(){var a=this;return this.portal._request(this.url).then(function(b){return b&&b.groups?b.groups.map(function(b){b=d.fromJSON(b);b.portal=a.portal;return b}):[]})};m.prototype.fetchItems=function(a){var d=this;a||(a={});var g=
this.userContentUrl;a.folder&&(g+="/"+a.folder.id);var p;return c.when(b,"./PortalItem").then(function(b){p=b;return d.portal._request(g,{query:{folders:!1,num:a.num||10,start:a.start||1}})}).then(function(a){var b;return a&&a.items?(b=a.items.map(function(a){a=p.fromJSON(a);a.portal=d.portal;a.load();return a}),r(b).always(function(){return{items:b,nextStart:a.nextStart,total:a.total}})):{items:[],nextStart:-1,total:0}})};m.prototype.getThumbnailUrl=function(a){var b=this.thumbnailUrl;b&&a&&(b+=
"\x26w\x3d"+a);return b};m.prototype.queryFavorites=function(b){return this.favGroupId?(this._favGroup||(this._favGroup=new d({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(b)):a.reject(new n("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))};m.prototype.toJSON=function(){throw new n("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};k([f.property()],m.prototype,"access",void 0);k([f.property({type:Date})],m.prototype,
"created",void 0);k([f.property()],m.prototype,"culture",void 0);k([f.property()],m.prototype,"description",void 0);k([f.property()],m.prototype,"email",void 0);k([f.property()],m.prototype,"favGroupId",void 0);k([f.property()],m.prototype,"fullName",void 0);k([f.property({type:Date})],m.prototype,"modified",void 0);k([f.property()],m.prototype,"orgId",void 0);k([f.property()],m.prototype,"portal",void 0);k([f.property()],m.prototype,"preferredView",void 0);k([f.property()],m.prototype,"privileges",
void 0);k([f.property()],m.prototype,"region",void 0);k([f.property()],m.prototype,"role",void 0);k([f.property()],m.prototype,"roleId",void 0);k([f.property()],m.prototype,"thumbnail",void 0);k([f.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],m.prototype,"thumbnailUrl",null);k([f.property()],m.prototype,"units",void 0);k([f.property({dependsOn:["portal.restUrl"],readOnly:!0})],m.prototype,"userContentUrl",null);k([f.property({dependsOn:["portal.restUrl"],readOnly:!0})],
m.prototype,"url",null);k([f.property()],m.prototype,"username",void 0);k([f.property()],m.prototype,"userType",void 0);return m=k([f.subclass("esri.portal.PortalUser")],m)}(f.declared(m))})},"esri/portal/PortalFolder":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.created=null;a.id=
null;a.portal=null;a.title=null;a.username=null;return a}l(d,b);Object.defineProperty(d.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username+"/"+this.id:null},enumerable:!0,configurable:!0});d.prototype.toJSON=function(){throw new n("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented");};k([f.property({type:Date})],d.prototype,"created",void 0);k([f.property()],d.prototype,"id",void 0);k([f.property()],d.prototype,"portal",
void 0);k([f.property()],d.prototype,"title",void 0);k([f.property({dependsOn:["portal.restUrl"],readOnly:!0})],d.prototype,"url",null);k([f.property()],d.prototype,"username",void 0);return d=k([f.subclass("esri.portal.PortalFolder")],d)}(f.declared(m))})},"esri/portal/PortalGroup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport ./PortalQueryParams".split(" "),
function(b,h,l,k,f,n,m,g,d){return function(a){function b(b){b=a.call(this)||this;b.access=null;b.created=null;b.description=null;b.id=null;b.isInvitationOnly=!1;b.modified=null;b.owner=null;b.portal=null;b.snippet=null;b.sortField=null;b.sortOrder=null;b.tags=null;b.title=null;return b}l(b,a);Object.defineProperty(b.prototype,"thumbnailUrl",{get:function(){var a=this.url,b=this.thumbnail;return a&&b?this.portal._normalizeUrl(a+"/info/"+b+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/groups/"+this.id:null},enumerable:!0,configurable:!0});b.prototype.fetchMembers=function(){return this.portal._request(this.url+"/users")};b.prototype.getThumbnailUrl=function(a){var b=this.thumbnailUrl;b&&a&&(b+="\x26w\x3d"+a);return b};b.prototype.toJSON=function(){throw new m("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};b.prototype.queryItems=function(a){a=a?a.clone():new d;a.query="group:"+
this.id+(a.query?" "+a.query:"");return this.portal.queryItems(a)};k([n.property()],b.prototype,"access",void 0);k([n.property({type:Date})],b.prototype,"created",void 0);k([n.property()],b.prototype,"description",void 0);k([n.property()],b.prototype,"id",void 0);k([n.property()],b.prototype,"isInvitationOnly",void 0);k([n.property({type:Date})],b.prototype,"modified",void 0);k([n.property()],b.prototype,"owner",void 0);k([n.property()],b.prototype,"portal",void 0);k([n.property()],b.prototype,"snippet",
void 0);k([n.property()],b.prototype,"sortField",void 0);k([n.property()],b.prototype,"sortOrder",void 0);k([n.property()],b.prototype,"tags",void 0);k([n.property()],b.prototype,"thumbnail",void 0);k([n.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],b.prototype,"thumbnailUrl",null);k([n.property()],b.prototype,"title",void 0);k([n.property({dependsOn:["portal.restUrl"],readOnly:!0})],b.prototype,"url",null);k([f(0,n.cast(d))],b.prototype,"queryItems",null);return b=
k([n.subclass("esri.portal.PortalGroup")],b)}(n.declared(g))})},"esri/portal/PortalItem":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/lang ../geometry/Extent ../core/JSONSupport ../core/Loadable ./Portal ./PortalRating ../core/promiseUtils ../core/urlUtils".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w,t){return function(a){function d(b){b=a.call(this)||this;b.access=null;b.accessInformation=
null;b.appProxies=null;b.avgRating=null;b.created=null;b.culture=null;b.description=null;b.extent=null;b.id=null;b.itemControl=null;b.licenseInfo=null;b.modified=null;b.name=null;b.numComments=null;b.numRatings=null;b.numViews=null;b.owner=null;b.portal=null;b.size=null;b.snippet=null;b.tags=null;b.title=null;b.type=null;b.typeKeywords=null;b.url=null;return b}l(d,a);h=d;Object.defineProperty(d.prototype,"displayName",{get:function(){var a=this.type,b=this.typeKeywords||[],c=a;"Feature Service"===
a||"Feature Collection"===a?c=-1<b.indexOf("Table")?"Table":-1<b.indexOf("Route Layer")?"Route Layer":-1<b.indexOf("Markup")?"Markup":"Feature Layer":"Image Service"===a?c=-1<b.indexOf("Elevation 3D Layer")?"Elevation Layer":"Imagery Layer":"Scene Service"===a?c="Scene Layer":"Scene Package"===a?c="Scene Layer Package":"Stream Service"===a?c="Feature Layer":"Geoprocessing Service"===a&&this.portal&&this.portal.isPortal?c=-1<b.indexOf("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===
a?c="Locator":"Microsoft Powerpoint"===a?c="Microsoft PowerPoint":"GeoJson"===a?c="GeoJSON":"Globe Service"===a?c="Globe Layer":"Vector Tile Service"===a?c="Tile Layer":"netCDF"===a?c="NetCDF":"Map Service"===a?c=-1===b.indexOf("Spatiotemporal")&&(-1<b.indexOf("Hosted Service")||-1<b.indexOf("Tiled"))?"Tile Layer":"Map Image Layer":a&&-1<a.toLowerCase().indexOf("add in")?c=a.replace(/(add in)/ig,"Add-In"):"datastore catalog service"===a&&(c="Big Data File Share");return c},enumerable:!0,configurable:!0});
d.prototype.readExtent=function(a){return a&&a.length?new g(a[0][0],a[0][1],a[1][0],a[1][1]):null};Object.defineProperty(d.prototype,"iconUrl",{get:function(){var a=this.type&&this.type.toLowerCase()||"",e=this.typeKeywords||[],c=!1,d=!1,g=!1,f=!1;0<a.indexOf("service")||"feature collection"===a||"kml"===a||"wms"===a||"wmts"===a||"wfs"===a?(c=-1<e.indexOf("Hosted Service"),"feature service"===a||"feature collection"===a||"kml"===a||"wfs"===a?(d=-1<e.indexOf("Table"),g=-1<e.indexOf("Route Layer"),
f=-1<e.indexOf("Markup"),a=d?"table":g?"routelayer":f?"markup":c?"featureshosted":"features"):a="map service"===a||"wms"===a||"wmts"===a?c||-1<e.indexOf("Tiled")||"wmts"===a?"maptiles":"mapimages":"scene service"===a?-1<e.indexOf("Line")?"sceneweblayerline":-1<e.indexOf("3DObject")?"sceneweblayermultipatch":-1<e.indexOf("Point")?"sceneweblayerpoint":-1<e.indexOf("IntegratedMesh")?"sceneweblayermesh":-1<e.indexOf("PointCloud")?"sceneweblayerpointcloud":-1<e.indexOf("Polygon")?"sceneweblayerpolygon":
"sceneweblayer":"image service"===a?-1<e.indexOf("Elevation 3D Layer")?"elevationlayer":"imagery":"stream service"===a?"streamlayer":"vector tile service"===a?"vectortile":"datastore catalog service"===a?"datastorecollection":"geocoding service"===a?"geocodeservice":"geoprocessing service"===a?-1<e.indexOf("Web Tool")&&this.portal&&this.portal.isPortal?"tool":"layers":"layers"):a="web map"===a||"cityengine web scene"===a?"maps":"web scene"===a?-1<e.indexOf("ViewingMode-Local")?"webscenelocal":"websceneglobal":
"web mapping application"===a||"mobile application"===a||"application"===a||"operation view"===a||"desktop application"===a?"apps":"map document"===a||"map package"===a||"published map"===a||"scene document"===a||"globe document"===a||"basemap package"===a||"mobile basemap package"===a||"mobile map package"===a||"project package"===a||"project template"===a||"pro map"===a||"layout"===a||"layer"===a&&-1<e.indexOf("ArcGIS Pro")||"explorer map"===a&&e.indexOf("Explorer Document")?"mapsgray":"service definition"===
a||"csv"===a||"shapefile"===a||"cad drawing"===a||"geojson"===a||"360 vr experience"===a||"netCDF"===a?"datafiles":"explorer add in"===a||"desktop add in"===a||"windows viewer add in"===a||"windows viewer configuration"===a?"appsgray":"arcgis pro add in"===a||"arcgis pro configuration"===a?"addindesktop":"rule package"===a||"file geodatabase"===a||"csv collection"===a||"kml collection"===a||"windows mobile package"===a||"map template"===a||"desktop application template"===a||"arcpad package"===a||
"code sample"===a||"form"===a||"document link"===a||"vector tile package"===a||"operations dashboard add in"===a||"rules package"===a||"image"===a||"workflow manager package"===a||"explorer map"===a&&-1<e.indexOf("Explorer Mapping Application")||-1<e.indexOf("Document")?"datafilesgray":"network analysis service"===a||"geoprocessing service"===a||"geodata service"===a||"geometry service"===a||"geoprocessing package"===a||"locator package"===a||"geoprocessing sample"===a||"workflow manager service"===
a||"raster function template"===a?"toolsgray":"layer"===a||"layer package"===a||"explorer layer"===a?"layersgray":"scene package"===a?"scenepackage":"tile package"===a?"tilepackage":"task file"===a?"taskfile":"report template"===a?"report-template":"statistical data collection"===a?"statisticaldatacollection":"insights workbook"===a?"workbook":"insights model"===a?"insightsmodel":"insights page"===a?"insightspage":"hub initiative"===a?"hubinitiative":"hubpage"===a?"hubpage":"hub site application"===
a?"hubsite":"relational database connection"===a?"relationaldatabaseconnection":"big data file share"===a?"datastorecollection":"image collection"===a?"imagecollection":"style"===a?"style":"desktop style"===a?"desktopstyle":"dashboard"===a?"dashboard":"maps";return a?b.toUrl("../images/portal/"+a+"16.png"):null},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"isLayer",{get:function(){return-1<"Map Service;Feature Service;Feature Collection;Scene Service;Image Service;Stream Service;Vector Tile Service;WMTS;WMS".split(";").indexOf(this.type)},
enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"itemUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/items/"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"thumbnailUrl",{get:function(){var a=this.itemUrl,b=this.thumbnail;return a&&b?this.portal._normalizeUrl(a+"/info/"+b+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"userItemUrl",{get:function(){var a=this.get("portal.restUrl");
if(!a)return null;var b=this.owner||this.get("portal.user.username");return b?a+"/content/users/"+(this.ownerFolder?b+"/"+this.ownerFolder:b)+"/items/"+this.id:null},enumerable:!0,configurable:!0});d.prototype.load=function(){var a=this;this.portal||(this.portal=c.getDefault());var b=this.portal.load().then(function(){return a.resourceInfo?a.resourceInfo:a.id&&a.itemUrl?a.portal._request(a.itemUrl):{}}).then(function(b){a.resourceInfo=b;a.read(b)});this.addResolvingPromise(b);return this};d.prototype.addRating=
function(a){var b={method:"post",query:{}};a instanceof r&&(a=a.rating);isNaN(a)||"number"!==typeof a||(b.query.rating=a);return this.portal._request(this.itemUrl+"/addRating",b).then(function(){return new r({rating:a,created:new Date})})};d.prototype.deleteRating=function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(function(){})};d.prototype.fetchData=function(a){void 0===a&&(a="json");return this.portal._request(this.itemUrl+"/data",{responseType:a})};d.prototype.fetchRating=
function(){return this.portal._request(this.itemUrl+"/rating").then(function(a){return null!=a.rating?(a.created=new Date(a.created),new r(a)):null})};d.prototype.fetchRelatedItems=function(a){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:a},"PortalItem")};d.prototype.getThumbnailUrl=function(a){var b=this.thumbnailUrl;b&&a&&(b+="\x26w\x3d"+a);return b};d.prototype.update=function(a){var b=this;return this.id?this.load().then(function(){return b.portal._signIn()}).then(function(){var e=
a&&a.data,c={method:"post"};c.query=b._getPostQuery();for(var d in c.query)null===c.query[d]&&(c.query[d]="");c.query.clearEmptyFields=!0;null!=e&&("string"===typeof e?c.query.text=e:"object"===typeof e&&(c.query.text=JSON.stringify(e)));return b.portal._request(b.userItemUrl+"/update",c).then(function(){return b._reload()})}):w.reject(new n("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};d.prototype.updateThumbnail=function(a){var b=this;return this.id?this.load().then(function(){return b.portal._signIn()}).then(function(){var e=
a.thumbnail,c={method:"post"};if("string"===typeof e)t.isDataProtocol(e)?c.query={data:e}:c.query={url:t.makeAbsolute(e)};else{var d=new FormData;d.append("file",e);c.body=d}return b.portal._request(b.userItemUrl+"/updateThumbnail",c).then(function(){return b._reload()})}):w.reject(new n("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};d.prototype.toJSON=function(){var a=this.extent,a={created:this.created&&this.created.getTime(),description:this.description,extent:a&&
[[a.xmin,a.ymin],[a.xmax,a.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return m.fixJson(a)};d.fromJSON=function(a){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");return new h({resourceInfo:a})};d.prototype._reload=function(){var a=this;return this.portal._request(this.itemUrl,
{query:{_ts:(new Date).getTime()}}).then(function(b){a.resourceInfo=b;a.read(b);return a})};d.prototype._getPostQuery=function(){var a=this.toJSON(),b;for(b in a)"tags"===b&&null!==a[b]&&(a[b]=a[b].join(", ")),"typeKeywords"===b&&null!==a[b]&&(a[b]=a[b].join(", "));return a};k([f.property()],d.prototype,"access",void 0);k([f.property()],d.prototype,"accessInformation",void 0);k([f.property()],d.prototype,"appProxies",void 0);k([f.property()],d.prototype,"avgRating",void 0);k([f.property({type:Date})],
d.prototype,"created",void 0);k([f.property()],d.prototype,"culture",void 0);k([f.property()],d.prototype,"description",void 0);k([f.property({dependsOn:["type","typeKeywords"],readOnly:!0})],d.prototype,"displayName",null);k([f.property({type:g})],d.prototype,"extent",void 0);k([f.reader("extent")],d.prototype,"readExtent",null);k([f.property({dependsOn:["type","typeKeywords"],readOnly:!0})],d.prototype,"iconUrl",null);k([f.property()],d.prototype,"id",void 0);k([f.property({dependsOn:["type"],readOnly:!0})],
d.prototype,"isLayer",null);k([f.property()],d.prototype,"itemControl",void 0);k([f.property({dependsOn:["portal.restUrl","id"],readOnly:!0})],d.prototype,"itemUrl",null);k([f.property()],d.prototype,"licenseInfo",void 0);k([f.property({type:Date})],d.prototype,"modified",void 0);k([f.property()],d.prototype,"name",void 0);k([f.property()],d.prototype,"numComments",void 0);k([f.property()],d.prototype,"numRatings",void 0);k([f.property()],d.prototype,"numViews",void 0);k([f.property()],d.prototype,
"owner",void 0);k([f.property()],d.prototype,"ownerFolder",void 0);k([f.property({type:c})],d.prototype,"portal",void 0);k([f.property()],d.prototype,"resourceInfo",void 0);k([f.property()],d.prototype,"size",void 0);k([f.property()],d.prototype,"snippet",void 0);k([f.property()],d.prototype,"tags",void 0);k([f.property()],d.prototype,"thumbnail",void 0);k([f.property({dependsOn:["itemUrl","thumbnail","portal.credential.token"],readOnly:!0})],d.prototype,"thumbnailUrl",null);k([f.property()],d.prototype,
"title",void 0);k([f.property()],d.prototype,"type",void 0);k([f.property()],d.prototype,"typeKeywords",void 0);k([f.property()],d.prototype,"url",void 0);k([f.property({dependsOn:["portal.restUrl","portal.user.username","owner","ownerFolder","id"],readOnly:!0})],d.prototype,"userItemUrl",null);return d=h=k([f.subclass("esri.portal.PortalItem")],d);var h}(f.declared(d,a))})},"esri/portal/PortalRating":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor".split(" "),
function(b,h,l,k,f,n){return function(b){function g(d){d=b.call(this)||this;d.created=null;d.rating=null;return d}l(g,b);k([f.property()],g.prototype,"created",void 0);k([f.property()],g.prototype,"rating",void 0);return g=k([f.subclass("esri.portal.PortalRating")],g)}(f.declared(n))})},"esri/layers/Layer":function(){define("require dojo/Deferred ../core/Accessor ../core/Error ../core/Evented ../core/Identifiable ../core/Loadable ../core/urlUtils ../core/requireUtils ../core/promiseUtils ../core/Logger ../config ../kernel ../request ../geometry/SpatialReference ../geometry/Extent".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v){var y=0,p=c.getLogger("esri.layers.Layer");l=l.createSubclass([f,n,m],{declaredClass:"esri.layers.Layer",properties:{attributionDataUrl:null,credential:{value:null,readOnly:!0,dependsOn:["loaded","parsedUrl"],get:function(){var a=this.loaded&&this.parsedUrl&&w.id&&w.id.findCredential(this.parsedUrl.path)||null;a&&a.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));return a}},fullExtent:new v(-180,-90,180,90,x.WGS84),hasAttributionData:{readOnly:!0,dependsOn:["attributionDataUrl"],
get:function(){return null!=this.attributionDataUrl}},id:{get:function(){return Date.now().toString(16)+"-layer-"+y++}},legendEnabled:!0,listMode:"show",opacity:{value:1,type:Number,cast:function(a){return 0>a?0:1<a?1:a}},parsedUrl:{readOnly:!0,dependsOn:["url"],get:function(){var a=this._get("url");return a?g.urlToObject(a):null}},popupEnabled:!0,attributionVisible:!0,spatialReference:x.WGS84,title:null,token:{dependsOn:["credential.token"],get:function(){var a=this.get("parsedUrl.query.token"),
b=this.get("credential.token");return a||b||null},set:function(a){a?this._override("token",a):this._clearOverride("token")}},type:{type:String,readOnly:!0,value:null,json:{read:!1}},url:{value:null},visible:!0},initialize:function(){this.otherwise(function(a){c.getLogger(this.declaredClass).error("#load()","Failed to load layer (title: '"+this.title+"', id: '"+this.id+"')",a)})},createLayerView:function(e){var c=this.viewModulePaths[e.type];return c?d.when(b,c).then(function(a){a.default&&(a=a.default);
return new a({layer:this,view:e})}.bind(this)):a.reject(new k("layerview:module-unavailable","No LayerView module available for layer '${layer.declaredClass}' and view type: '${view.type}'",{view:e,layer:this}))},destroyLayerView:function(a){a.destroy()},fetchAttributionData:function(){var a=this.attributionDataUrl;this.hasAttributionData&&a?a=t(a,{query:{f:"json"},responseType:"json"}).then(function(a){return a.data}):(a=new h,a.reject(new k("layer:no-attribution-data","Layer does not have attribution data")),
a=a.promise);return a},refresh:function(){this.emit("refresh")}});l.fromArcGISServerUrl=function(a){"string"===typeof a&&(a={url:a});var e=d.when(b,"./support/arcgisLayers").then(function(b){return b.fromUrl(a)});e.otherwise(function(b){p.error("#fromArcGISServerUrl({ url: '"+a.url+"'})","Failed to create layer from arcgis server url",b)});return e};l.fromPortalItem=function(a){!a||a.portalItem||"object"!==typeof a||a.declaredClass&&"esri.portal.PortalItem"!==a.declaredClass||(a={portalItem:a});var e=
d.when(b,"../portal/support/portalLayers").then(function(b){return b.fromItem(a)});e.otherwise(function(b){var e=a&&a.portalItem;p.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+(e&&e.portal&&e.portal.url||r.portalUrl)+"', id: '"+(e&&e.id||"unset")+"')",b)});return e};return l})},"esri/core/Identifiable":function(){define(["./declare"],function(b){var h=0;return b(null,{constructor:function(){Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+
"-object-"+h++})}})})},"esri/Ground":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./core/JSONSupport ./core/Loadable ./core/Collection ./core/collectionUtils ./core/Logger ./core/requireUtils ./core/promiseUtils ./core/Error ./layers/Layer ./layers/support/types".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v){var y=d.ofType(x),p=c.getLogger("esri.Ground");return function(e){function c(a){a=
e.call(this)||this;a.layers=new y;a.layers.on("after-add",function(a){a=a.item;v.isOfType(a,["elevation","base-elevation"])||p.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.")});return a}l(c,e);d=c;c.prototype.initialize=function(){this.otherwise(function(a){p.error("#load()","Failed to load ground",a)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};
c.prototype.normalizeCtorArgs=function(a){a&&"resourceInfo"in a&&(this._set("resourceInfo",a.resourceInfo),a=n.mixin({},a),delete a.resourceInfo);return a};Object.defineProperty(c.prototype,"layers",{set:function(b){this._set("layers",a.referenceSetter(b,this._get("layers"),y))},enumerable:!0,configurable:!0});c.prototype.writeLayers=function(a,b,e,c){var d=[];a&&(c=n.mixin({},c),c.layerContainerType="ground",a.forEach(function(a){if(a.write){var b={};a.write(b,c)&&d.push(b)}else c&&c.messages&&c.messages.push(new t("layer:unsupported",
"Layers ("+a.title+", "+a.id+") of type '"+a.declaredClass+"' cannot be persisted in the ground",{layer:a}))}));b.layers=d};c.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this};c.prototype.queryElevation=function(a,e){var c=this;return r.when(b,"./layers/support/ElevationQuery").then(function(b){b=new b.ElevationQuery;var d=c.layers.filter(function(a){return"elevation"===a.type}).toArray();return b.queryAll(d,a,e)})};c.prototype.clone=function(){var a={resourceInfo:this.resourceInfo,
layers:this.layers.slice()};this.loaded&&(a.loadStatus="loaded");return new d(a)};c.prototype.read=function(a,b){this.resourceInfo||this._set("resourceInfo",{data:a,context:b});return this.inherited(arguments)};c.prototype._loadFromSource=function(){var a=this.resourceInfo;return a?this._loadLayersFromJSON(a.data,a.context):w.resolve(null)};c.prototype._loadLayersFromJSON=function(a,e){var c=this,d=e&&e.origin||"web-scene",q=e&&e.portal||null,g=e&&e.url||null;return r.when(b,"./portal/support/layersCreator").then(function(b){var e=
[];a.layers&&Array.isArray(a.layers)&&e.push.apply(e,b.populateOperationalLayers(c.layers,a.layers,{context:{origin:d,url:g,portal:q,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"}));return w.eachAlways(e)}).then(function(){})};k([f.property({type:y,json:{read:!1}}),f.cast(a.castForReferenceSetter)],c.prototype,"layers",null);k([f.writer("layers")],c.prototype,"writeLayers",null);k([f.property({readOnly:!0})],c.prototype,"resourceInfo",void 0);return c=d=k([f.subclass("esri.Ground")],
c);var d}(f.declared(m,g))})},"esri/layers/support/types":function(){define(["require","exports"],function(b,h){Object.defineProperty(h,"__esModule",{value:!0});h.isOfType=function(b,k){b=b.constructor._meta;if(!b||!b.bases)return!1;b=b.bases;var f=Array.isArray(k);return b.some(function(b){b=b.__accessorMetadata__;if(!b)return!1;b=b.properties;if(!b||!b.type||!b.type.value)return!1;b=b.type.value;return f?-1!==k.indexOf(b):b===k})}})},"esri/support/basemapUtils":function(){define("require exports ./basemapDefinitions ../core/accessorSupport/ensureType ../core/Collection ../core/urlUtils ../core/Logger ../Basemap".split(" "),
function(b,h,l,k,f,n,m,g){function d(a,b){var c;if("string"===typeof a){if(!(a in l))return b=Object.keys(l).map(function(a){return'"'+a+'"'}).join(", "),e.warn("Unable to find basemap definition for: "+a+". Try one of these: "+b),null;b&&(c=b[a]);c||(c=g.fromId(a),b&&(b[a]=c))}else c=k.default(g,a);return c}function a(a,b){return a.map(function(a){return b.find(function(b){var e=w(a);b=w(b);return e.type===b.type&&e.url===b.url})||a})}function c(a){return a?!a.loaded&&a.resourceInfo?t(a.resourceInfo.data):
{baseLayers:r(a.baseLayers),referenceLayers:r(a.referenceLayers)}:null}function r(a){return(f.isCollection(a)?a.toArray():a).map(w)}function w(a){return{type:a.type,url:p(a.urlTemplate||a.url||a.styleUrl)}}function t(a){return a?{baseLayers:x(a.baseMapLayers.filter(function(a){return!a.isReference})),referenceLayers:x(a.baseMapLayers.filter(function(a){return a.isReference}))}:null}function x(a){return a.map(function(a){var b;switch(a.layerType){case "VectorTileLayer":b="vector-tile";break;case "ArcGISTiledMapServiceLayer":b=
"tile";break;default:b="unknown"}return{type:b,url:p(a.templateUrl||a.urlTemplate||a.styleUrl||a.url)}})}function v(a,b,e){return null!=a!==(null!=b)?"not-equal":a?y(a.baseLayers,b.baseLayers)?y(a.referenceLayers,b.referenceLayers)?"equal":e.mustMatchReferences?"not-equal":"base-layers-equal":"not-equal":"equal"}function y(a,b){return a.length!==b.length?!1:!a.some(function(a){return!b.some(function(b){return a.type===b.type&&a.url===b.url})})}function p(a){return a?n.normalize(a).replace(/^\s*https?:/i,
"").toLowerCase():""}Object.defineProperty(h,"__esModule",{value:!0});var e=m.getLogger("esri.support.basemapUtils");h.createCache=function(){return{}};h.ensureType=d;h.clonePreservingTiledLayers=function(b,e){void 0===e&&(e=null);b=d(b);if(!b)return null;b=new g({id:b.id,title:b.title,baseLayers:b.baseLayers.slice(),referenceLayers:b.referenceLayers.slice()});e&&(b.baseLayers=a(b.baseLayers,e.baseLayers),b.referenceLayers=a(b.referenceLayers,e.referenceLayers));return b};h.getWellKnownBasemapId=
function(a){var b=null;a=c(a);for(var e in l){var d=t(l[e]),d=v(a,d,{mustMatchReferences:!1});if("equal"===d){b=e;break}else"base-layers-equal"===d&&(b=e)}return b};h.contentEquals=function(a,b){if(a===b)return!0;a=c(a);b=c(b);return"equal"===v(a,b,{mustMatchReferences:!0})}})},"esri/support/groundUtils":function(){define("require exports ../core/accessorSupport/ensureType ../core/Logger ../Ground ../layers/ElevationLayer".split(" "),function(b,h,l,k,f,n){Object.defineProperty(h,"__esModule",{value:!0});
var m=k.getLogger("esri.support.groundUtils");h.groundElevationLayers={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"}};h.ensureType=function(b){var d;"string"===typeof b?b in h.groundElevationLayers?(b=h.groundElevationLayers[b],b=new n({id:b.id,url:b.url}),d=new f({layers:[b]})):m.warn("Unable to find ground definition for: "+b+'. Try "world-elevation"'):d=l.default(f,b);return d}})},"esri/layers/ElevationLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/_base/lang ../request ../core/Error ../core/promiseUtils ../core/requireUtils ../geometry/HeightModelInfo ./TiledLayer ./mixins/ArcGISMapService ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./support/rasterFormats/LercCodec".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y){return function(p){function e(a){a=p.call(this)||this;a.heightModelInfo=null;a.type="elevation";a.url=null;a.opacity=1;a.operationalLayerType="ArcGISTiledElevationServiceLayer";return a}l(e,p);e.prototype.normalizeCtorArgs=function(a,b){return"string"===typeof a?n.mixin({},{url:a},b):a};e.prototype.load=function(){var a=this;this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:function(a){for(var b=
0;b<a.typeKeywords.length;b++)if("elevation 3d layer"===a.typeKeywords[b].toLowerCase())return!0;throw new g("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"});}}).always(function(){return a._fetchImageService()}));return this};e.prototype.fetchTile=function(a,b,e,c){var d=this;void 0===c&&(c=0);return this.load().then(function(){return d._fetchTileAvailability(a,b,e)}).then(function(){var c=
d.getTileUrl(a,b,e);return m(c,{responseType:"array-buffer",failOk:!0})}).then(function(a){a=y.decode(a.data,{noDataValue:c,returnFileInfo:!0});return{values:a.pixelData,width:a.width,height:a.height,maxZError:a.fileInfo.maxZError,noDataValue:a.noDataValue}})};e.prototype.queryElevation=function(e,c){var d=this;return a.when(b,"./support/ElevationQuery").then(function(a){return(new a.ElevationQuery).query(d,e,c)})};e.prototype._fetchTileAvailability=function(a,b,e){return this.tilemapCache?this.tilemapCache.fetchAvailability(a,
b,e):d.resolve("unknown")};e.prototype._fetchImageService=function(){var a=this;return d.resolve().then(function(){if(a.resourceInfo)return a.resourceInfo;var b={query:n.mixin({f:"json"},a.parsedUrl.query),responseType:"json",callbackParamName:"callback"};return m(a.parsedUrl.path,b)}).then(function(b){b.ssl&&(a.url=a.url.replace(/^http:/i,"https:"));a.read(b.data,{origin:"service",url:a.parsedUrl})})};k([f.shared({"3d":"../views/3d/layers/ElevationLayerView3D"})],e.prototype,"viewModulePaths",void 0);
k([f.property({readOnly:!0,type:c})],e.prototype,"heightModelInfo",void 0);k([f.property()],e.prototype,"resourceInfo",void 0);k([f.property({json:{read:!1},value:"elevation",readOnly:!0})],e.prototype,"type",void 0);k([f.property()],e.prototype,"url",void 0);k([f.property({json:{read:!1,write:!1}})],e.prototype,"opacity",void 0);k([f.property()],e.prototype,"operationalLayerType",void 0);return e=k([f.subclass("esri.layers.ElevationLayer")],e)}(f.declared(r,w,t,x,v))})},"esri/geometry/HeightModelInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/JSONSupport ../core/kebabDictionary ../core/Warning ../core/accessorSupport/decorators ./support/scaleUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a){function c(a,b){return new g("height-unit:unsupported","Height unit of value '"+a+"' is not supported",b)}function r(a,b){return new g("height-model:unsupported","Height model of value '"+a+"' is not supported",b)}var w=m({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"},{ignoreUnknown:!0}),t=m({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links",
"sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"},{ignoreUnknown:!0});return function(b){function g(a){a=b.call(this)||this;a.heightModel="gravity-related-height";a.heightUnit="meters";a.vertCRS=
null;return a}l(g,b);h=g;g.prototype.writeHeightModel=function(a,b,c){return w.write(a,b,c)};g.prototype.readHeightModel=function(a,b,c){if(b=w.read(a))return b;c&&c.messages&&c.messages.push(r(a,{context:c}));return null};g.prototype.writeHeightUnit=function(a,b,c){return t.write(a,b,c)};g.prototype.readHeightUnit=function(a,b,d){if(b=t.read(a))return b;d&&d.messages&&d.messages.push(c(a,{context:d}));return null};g.prototype.readHeightUnitService=function(b,e,d){if(e=a.unitFromRESTJSON(b)||t.read(b))return e;
d&&d.messages&&d.messages.push(c(b,{context:d}));return null};g.prototype.readVertCRS=function(a,b){return b.vertCRS||b.ellipsoid||b.geoid};g.prototype.clone=function(){return new h({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})};g.prototype.equals=function(a){return a?this===a?!0:this.heightModel===a.heightModel&&this.heightUnit===a.heightUnit&&this.vertCRS===a.vertCRS:!1};g.deriveUnitFromSR=function(b,e){e=a.getVerticalUnitStringForSR(e);return new h({heightModel:b.heightModel,
heightUnit:e,vertCRS:b.vertCRS})};g.prototype.write=function(a,b){b=f.mixin({},{origin:"web-scene"},b);return this.inherited(arguments,[a,b])};g.fromJSON=function(a){if(!a)return null;var b=new h;b.read(a,{origin:"web-scene"});return b};k([d.property({constructOnly:!0})],g.prototype,"heightModel",void 0);k([d.writer("web-scene","heightModel")],g.prototype,"writeHeightModel",null);k([d.reader(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null);k([d.property({constructOnly:!0})],
g.prototype,"heightUnit",void 0);k([d.writer("web-scene","heightUnit")],g.prototype,"writeHeightUnit",null);k([d.reader("web-scene","heightUnit")],g.prototype,"readHeightUnit",null);k([d.reader("service","heightUnit")],g.prototype,"readHeightUnitService",null);k([d.property({constructOnly:!0,json:{origins:{webScene:{write:!0}}}})],g.prototype,"vertCRS",void 0);k([d.reader("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null);return g=h=k([d.subclass("esri.HeightModelInfo")],
g);var h}(d.declared(n))})},"esri/geometry/support/scaleUtils":function(){define(["../../config","../../core/lang","../../core/kebabDictionary","./WKIDUnitConversion"],function(b,h,l,k){var f=20015077/180,n=/UNIT\[([^\]]+)\]\]$/i,m=l({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",
yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"},{ignoreUnknown:!0}),g={unitFromRESTJSON:function(b){return m.fromJSON(b.toLowerCase())||null},unitToRESTJSON:function(b){return m.toJSON(b)||null},getMetersPerVerticalUnitForSR:function(b){b=this.getMetersPerUnitForSR(b);return 1E5<b?1:b},getVerticalUnitStringForSR:function(b){return 1E5<this.getMetersPerUnitForSR(b)?
"meters":this.getUnitString(b)},getMetersPerUnitForSR:function(b){return this.getMetersPerUnit(b)||f},getMetersPerUnit:function(b){var a,c,d;b&&("object"===typeof b?(a=b.wkid,c=b.wkt):"number"===typeof b?a=b:"string"===typeof b&&(c=b));a?d=k.values[k[a]]:c&&-1!==c.search(/^PROJCS/i)&&(b=n.exec(c))&&b[1]&&(d=parseFloat(b[1].split(",")[1]));return d},getUnitString:function(b){var a,c,d;b&&("object"===typeof b?(a=b.wkid,c=b.wkt):"number"===typeof b?a=b:"string"===typeof b&&(c=b));a?d=k.units[k[a]]:c&&
-1!==c.search(/^PROJCS/i)&&(b=n.exec(c))&&b[1]&&(d=(b=/[\\"\\']{1}([^\\"\\']+)/.exec(b[1]))&&b[1]);return d?this.unitFromRESTJSON(d):null},getScale:function(d,a,c){var k,m,n;1<arguments.length&&h.isDefined(a)&&!a.declaredClass?(k=d,m=a,a=null,n=g.getMetersPerUnit(c)):(k=a||d.extent,m=d.width,n=g.getMetersPerUnit(k&&k.spatialReference));return k&&m?k.width/m*(n||f)*39.37*b.screenDPI:0},getResolutionForScale:function(d,a){a=g.getMetersPerUnitForSR(a);return d/(39.37*a*b.screenDPI)},getExtentForScale:function(b,
a){var c=b.extent;b=b.width;a=g.getResolutionForScale(a,c.spatialReference);return c.clone().expand(a*b/c.width)}};return g})},"esri/layers/TiledLayer":function(){define(["../request","./Layer","./support/TileInfo"],function(b,h,l){return h.createSubclass({properties:{attributionDataUrl:null,tileInfo:l},viewModulePaths:{"2d":"../views/2d/layers/TiledLayerView2D","3d":"../views/3d/layers/TileLayerView3D"},getTileUrl:function(b,f,h){},fetchTile:function(k,f,h,m){k=this.getTileUrl(k,f,h);m={responseType:"image",
allowImageDataAccess:m&&m.allowImageDataAccess||!1};return"string"===typeof k?b(k,m).then(function(b){return b.data}):k.then(function(g){return b(g,{responseType:"image"})}).then(function(b){return b.data})}})})},"esri/layers/support/TileInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators ../../geometry/SpatialReference ../../geometry/Point ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ../../geometry/support/scaleUtils ./LOD".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x){var v=m({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc"});return function(b){function p(a){a=b.call(this)||this;a.dpi=96;a.format=null;a.origin=null;a.minScale=0;a.maxScale=0;a.size=null;a.spatialReference=null;return a}l(p,b);e=p;p.create=function(b){void 0===b&&(b={size:256,spatialReference:a.WebMercator});var d=
b.scales,q=b.size||256;b=b.spatialReference||a.WebMercator;var g=r.getInfo(b),g=g?new c(g.origin[0],g.origin[1],b):new c(0,0,b),f=1/(39.37*t.getMetersPerUnitForSR(b)*96),p=[];if(d)for(var k=0;k<d.length;k++){var h=d[k],m=h*f;p.push({level:k,scale:h,resolution:m})}else for(d=256/q*5.91657527591555E8,p.push({level:0,scale:d,resolution:d*f}),k=1;24>k;k++)h=d/2,m=h*f,p.push({level:k,scale:h,resolution:m}),d=h;return new e({dpi:96,lods:p,origin:g,size:q,spatialReference:b})};Object.defineProperty(p.prototype,
"isWrappable",{get:function(){var a=this.spatialReference,b=this.origin;if(a&&b){var e=r.getInfo(a);return a.isWrappable&&Math.abs(e.origin[0]-b.x)<=e.dx}return!1},enumerable:!0,configurable:!0});p.prototype.readOrigin=function(a,b){return c.fromJSON(f.mixin({spatialReference:b.spatialReference},a))};Object.defineProperty(p.prototype,"lods",{set:function(a){var b=this,e=0,c=0,d=[];this._levelToLOD={};a&&(e=-Infinity,c=Infinity,a.forEach(function(a){d.push(a.scale);e=a.scale>e?a.scale:e;c=a.scale<
c?a.scale:c;b._levelToLOD[a.level]=a}));this._set("scales",d);this._set("minScale",e);this._set("maxScale",c);this._set("lods",a);this._initializeUpsampleLevels()},enumerable:!0,configurable:!0});p.prototype.zoomToScale=function(a){var b=this.scales;if(0>=a)return b[0];if(a>=b.length)return b[b.length-1];var e=Math.round(a);return b[e]+(e-a)*(b[Math.round(a-.5)]-b[e])};p.prototype.scaleToZoom=function(a){for(var b=this.scales,e=b.length-1,c=0;c<e;c++){var d=b[c],q=b[c+1];if(d<=a)break;if(q===a)return c+
1;if(d>a&&q<a)return c+1-(a-q)/(d-q)}return c};p.prototype.snapScale=function(a,b){void 0===b&&(b=.95);a=this.scaleToZoom(a);return a%Math.floor(a)>=b?this.zoomToScale(Math.ceil(a)):this.zoomToScale(Math.floor(a))};p.prototype.tileAt=function(a,b,e,c){var d=this.lodAt(a);if(!d)return null;c||(c={id:null,level:0,row:0,col:0,extent:[0,0,0,0]});var q;if("number"===typeof b)q=b,b=e;else{if(b.spatialReference.equals(this.spatialReference))q=b.x,b=b.y;else{c=w.project(b,this.spatialReference);if(!c)return null;
q=c.x;b=c.y}c=e}e=d.resolution*this.size[0];d=d.resolution*this.size[1];c.level=a;c.row=Math.floor((this.origin.y-b)/d+.001);c.col=Math.floor((q-this.origin.x)/e+.001);this.updateTileInfo(c);return c};p.prototype.updateTileInfo=function(a){var b=this.lodAt(a.level),e=b.resolution*this.size[0],b=b.resolution*this.size[1];a.id=a.level+"/"+a.row+"/"+a.col;a.extent||(a.extent=[0,0,0,0]);a.extent[0]=this.origin.x+a.col*e;a.extent[1]=this.origin.y-(a.row+1)*b;a.extent[2]=a.extent[0]+e;a.extent[3]=a.extent[1]+
b};p.prototype.upsampleTile=function(a){var b=this._upsampleLevels[a.level];if(!b||-1===b.parentLevel)return!1;a.level=b.parentLevel;a.row=Math.floor(a.row/b.factor+.001);a.col=Math.floor(a.col/b.factor+.001);this.updateTileInfo(a);return!0};p.prototype.lodAt=function(a){return this._levelToLOD&&this._levelToLOD[a]||null};p.prototype.clone=function(){return e.fromJSON(this.toJSON())};p.prototype.toJSON=function(){return g.fixJson({rows:this.size[0],cols:this.size[1],dpi:this.dpi,format:v.toJSON(this.format),
compressionQuality:this.compressionQuality,origin:this.origin&&this.origin.toJSON(),spatialReference:this.spatialReference&&this.spatialReference.toJSON(),lods:this.lods&&this.lods.map(function(a){return a.toJSON()})})};p.prototype._initializeUpsampleLevels=function(){var a=this.lods;this._upsampleLevels=[];for(var b=null,e=0;e<a.length;e++){var c=a[e];this._upsampleLevels[c.level]={parentLevel:b?b.level:-1,factor:b?b.resolution/c.resolution:0};b=c}};k([d.property()],p.prototype,"compressionQuality",
void 0);k([d.property()],p.prototype,"dpi",void 0);k([d.property({json:{read:v.fromJSON}})],p.prototype,"format",void 0);k([d.property({readOnly:!0,dependsOn:["spatialReference","origin"]})],p.prototype,"isWrappable",null);k([d.property({type:c})],p.prototype,"origin",void 0);k([d.reader("origin")],p.prototype,"readOrigin",null);k([d.property({type:[x],value:null})],p.prototype,"lods",null);k([d.property({readOnly:!0})],p.prototype,"minScale",void 0);k([d.property({readOnly:!0})],p.prototype,"maxScale",
void 0);k([d.property({readOnly:!0})],p.prototype,"scales",void 0);k([d.property({cast:function(a){return Array.isArray(a)?a:"number"===typeof a?[a,a]:[256,256]},json:{read:{source:["rows","cols"],reader:function(a,b){return[b.cols,b.rows]}}}})],p.prototype,"size",void 0);k([d.property({type:a})],p.prototype,"spatialReference",void 0);return p=e=k([d.subclass("esri.layers.support.TileInfo")],p);var e}(d.declared(n))})},"esri/layers/support/LOD":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport".split(" "),
function(b,h,l,k,f,n){return function(b){function g(a){a=b.call(this,a)||this;a.level=0;a.levelValue=null;a.resolution=0;a.scale=0;return a}l(g,b);d=g;g.prototype.clone=function(){return new d({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})};k([f.property({json:{write:!0}})],g.prototype,"level",void 0);k([f.property({json:{write:!0}})],g.prototype,"levelValue",void 0);k([f.property({json:{write:!0}})],g.prototype,"resolution",void 0);k([f.property({json:{write:!0}})],
g.prototype,"scale",void 0);return g=d=k([f.subclass("esri.layers.support.LOD")],g);var d}(f.declared(n))})},"esri/layers/mixins/ArcGISMapService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./ArcGISService ./ScaleRangeLayer ../../geometry/Extent ../../geometry/SpatialReference".split(" "),function(b,h,l,k,f,n,m,g,d){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;
b.copyright=null;b.fullExtent=null;b.spatialReference=null;b.version=null;return b}l(b,a);b.prototype.readCapabilities=function(a,b){return a&&a.split(",").map(function(a){return a.trim()})};b.prototype.readCopyright=function(a,b){return b.copyrightText};b.prototype.readLegendEnabled=function(a,b){return b.showLegend};b.prototype.writeLegendEnabled=function(a,b){b.showLegend=!!a};b.prototype.readPopupEnabled=function(a,b){return!b.disablePopup};b.prototype.readVersion=function(a,b){(a=b.currentVersion)||
(a=b.hasOwnProperty("capabilities")||b.hasOwnProperty("tables")?10:b.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3);return a};k([f.property()],b.prototype,"capabilities",void 0);k([f.reader("service","capabilities")],b.prototype,"readCapabilities",null);k([f.property()],b.prototype,"copyright",void 0);k([f.reader("copyright",["copyrightText"])],b.prototype,"readCopyright",null);k([f.property({type:g})],b.prototype,"fullExtent",void 0);k([f.property({json:{origins:{service:{read:!1},portalItem:{read:!1}}}})],
b.prototype,"id",void 0);k([f.property()],b.prototype,"legendEnabled",void 0);k([f.reader("legendEnabled",["showLegend"])],b.prototype,"readLegendEnabled",null);k([f.writer("legendEnabled")],b.prototype,"writeLegendEnabled",null);k([f.reader("popupEnabled",["disablePopup"])],b.prototype,"readPopupEnabled",null);k([f.property({type:d})],b.prototype,"spatialReference",void 0);k([f.property()],b.prototype,"version",void 0);k([f.reader("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],
b.prototype,"readVersion",null);return b=k([f.subclass("esri.layers.mixins.ArcGISMapService")],b)}(f.declared(n,m))})},"esri/layers/mixins/ArcGISService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/MultiOriginJSONSupport ../support/arcgisLayerUrl".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(){return null!==b&&b.apply(this,arguments)||this}l(d,b);Object.defineProperty(d.prototype,
"title",{get:function(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var a=m.parse(this.url);if(a&&a.title)return a.title}return this._get("title")||""},set:function(a){this._set("title",a)},enumerable:!0,configurable:!0});k([f.property({dependsOn:["url"]})],d.prototype,"title",null);k([f.property()],d.prototype,"url",void 0);return d=k([f.subclass("esri.layers.mixins.ArcGISService")],d)}(f.declared(n))})},"esri/core/MultiOriginJSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./accessorSupport/decorators ./Accessor ./accessorSupport/read ./accessorSupport/write ./accessorSupport/utils ./accessorSupport/MultiOriginStore ./accessorSupport/PropertyOrigin".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){function r(a){return d.getProperties(a).store}return function(b){function h(){var g=b.call(this)||this,f=d.getProperties(g),k=f.metadatas,p=f.store,e=new a.default;f.store=e;p.keys().forEach(function(a){e.set(a,p.get(a),c.OriginId.DEFAULTS)});Object.keys(k).forEach(function(a){f.internalGet(a)&&e.set(a,f.internalGet(a),c.OriginId.DEFAULTS)});return g}l(h,b);h.prototype.clear=function(a,b){void 0===b&&(b="user");return r(this).clear(a,c.nameToId(b))};h.prototype.read=
function(a,b){m.default(this,a,b);return this};h.prototype.write=function(a,b){a=a||{};g.default(this,a,b);return a};h.prototype.getAtOrigin=function(a,b){var d=r(this),g=c.nameToId(b);if("string"===typeof a)return d.get(a,g);var e={};a.forEach(function(a){e[a]=d.get(a,g)});return e};h.prototype.originOf=function(a){var b=r(this);if("string"===typeof a)return c.idToName(b.originOf(a));a.forEach(function(a){c.idToName(b.originOf(a))})};h.prototype.revert=function(a,b){var g=r(this),f=c.nameToId(b),
e=d.getProperties(this);("string"===typeof a?"*"===a?Object.keys(g.getAll(f)):[a]:a).forEach(function(a){e.propertyInvalidated(a);g.revert(a,f);e.propertyCommitted(a)})};h.prototype.removeOrigin=function(a){var b=r(this);a=c.nameToId(a);var d=b.getAll(a),g;for(g in d)b.originOf(g)===a&&b.set(g,d[g],c.OriginId.USER)};h.prototype.updateOrigin=function(a,b){var d=r(this);b=c.nameToId(b);var g=this.get(a);d.clear(a);d.set(a,g,b)};return h=k([f.subclass("esri.core.MultiOriginJSONSupport")],h)}(f.declared(n))})},
"esri/core/accessorSupport/MultiOriginStore":function(){define(["require","exports","./PropertyOrigin"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});b=function(){function b(){this._propertyOriginMap={};this._originStores=Array(l.OriginId.NUM);this._values={}}b.prototype.get=function(b,k){return(k=void 0===k?this._values:this._originStores[k])?k[b]:void 0};b.prototype.keys=function(){return Object.keys(this._values)};b.prototype.set=function(b,k,h){void 0===h&&(h=l.OriginId.USER);
var g=this._originStores[h];g||(g={},this._originStores[h]=g);g[b]=k;return!(b in this._values)||this._propertyOriginMap[b]<=h?(g=this._values[b],this._values[b]=k,this._propertyOriginMap[b]=h,g!==k):!1};b.prototype.clear=function(b,k){void 0===k&&(k=l.OriginId.USER);var f=this._originStores[k];if(f){var g=f[b];delete f[b];if(b in this._values&&this._propertyOriginMap[b]===k)for(delete this._values[b],--k;0<=k;k--)if((f=this._originStores[k])&&b in f){this._values[b]=f[b];this._propertyOriginMap[b]=
k;break}return g}};b.prototype.has=function(b,k){return(k=void 0===k?this._values:this._originStores[k])?b in k:!1};b.prototype.revert=function(b,k){for(;0<k&&!this.has(b,k);)--k;var f=this._originStores[k],f=f&&f[b],g=this._values[b];this._values[b]=f;this._propertyOriginMap[b]=k;return g!==f};b.prototype.originOf=function(b,k){return this._propertyOriginMap[b]||l.OriginId.DEFAULTS};b.prototype.getAll=function(b){return this._originStores[b]};return b}();h.default=b})},"esri/layers/support/arcgisLayerUrl":function(){define(["require",
"exports","../../core/urlUtils"],function(b,h,l){function k(b){var k=l.urlToObject(b).path.match(h.match);if(!k)return null;b=k[1];var g=k[2],d=k[3],k=k[4],a=g.indexOf("/");return{title:f(-1!==a?g.slice(a+1):g),serverType:d,sublayer:null!=k&&""!==k?parseInt(k,10):null,url:{path:b}}}function f(b){b=b.replace(/\s*[/_]+\s*/g," ");return b[0].toUpperCase()+b.slice(1)}Object.defineProperty(h,"__esModule",{value:!0});h.serverTypes="MapServer ImageServer FeatureServer SceneServer StreamServer VectorTileServer".split(" ");
h.match=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/("+h.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i");h.test=function(b){return!!h.match.test(b)};h.parse=k;h.cleanTitle=f;h.titleFromUrlAndName=function(b,h){var g=[];b&&(b=k(b))&&b.title&&g.push(b.title);h&&(h=f(h),g.push(h));if(2===g.length){if(-1!==g[0].toLowerCase().indexOf(g[1].toLowerCase()))return g[0];if(-1!==g[1].toLowerCase().indexOf(g[0].toLowerCase()))return g[1]}return g.join(" - ")};h.isHostedAgolService=
function(b){if(!b)return!1;b=b.toLowerCase();var f=-1!==b.indexOf(".arcgis.com/");b=-1!==b.indexOf("//services")||-1!==b.indexOf("//tiles")||-1!==b.indexOf("//features");return f&&b};h.isHostedSecuredProxyService=function(b,f){return f&&b&&-1!==b.toLowerCase().indexOf(f.toLowerCase())}})},"esri/layers/mixins/ScaleRangeLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/accessorSupport/write".split(" "),
function(b,h,l,k,f,n,m){return function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a.minScale=0;a.maxScale=0;return a}l(d,b);k([f.property({json:{write:{overridePolicy:function(a,b,d){if(m.willPropertyWrite(this,"maxScale",{},d))return{ignoreOrigin:!0}}}}})],d.prototype,"minScale",void 0);k([f.property({json:{write:{overridePolicy:function(a,b,d){if(m.willPropertyWrite(this,"minScale",{},d))return{ignoreOrigin:!0}}}}})],d.prototype,"maxScale",void 0);return d=k([f.subclass("esri.layers.mixins.ScaleRangeLayer")],
d)}(f.declared(n))})},"esri/layers/mixins/ArcGISCachedService":function(){define("dojo/_base/lang dojo/io-query ./ArcGISService ./ScaleRangeLayer ../support/TileInfo ../support/TilemapCache".split(" "),function(b,h,l,k,f,n){return l.createSubclass([k],{declaredClass:"esri.layers.mixins.ArcGISCachedService",properties:{minScale:{json:{origins:{service:{read:!1}}}},maxScale:{json:{origins:{service:{read:!1}}}},resampling:!0,supportsBlankTile:{value:!1,readOnly:!0,dependsOn:["version"],get:function(){return 10.2<=
this.version}},tileInfo:{value:null,type:f,json:{read:function(b,g){var d=g.minScale?g.minScale:Infinity,a=g.maxScale?g.maxScale:-Infinity;return b?(b.lods=b.lods.filter(function(b){return b.scale<=d&&b.scale>=a}),f.fromJSON(b)):null}}},tilemapCache:{value:null,json:{read:{source:["capabilities"],reader:function(b,g){return g.capabilities&&-1<g.capabilities.indexOf("Tilemap")?new n({layer:this}):null}}}},refreshTimestamp:null,version:{}},refresh:function(){this.refreshTimestamp=Date.now();this.inherited(arguments)},
getTileUrl:function(f,g,d){var a=b.mixin({},this.parsedUrl.query,{token:this.token,blankTile:!this.tilemapCache&&this.resampling&&this.supportsBlankTile?!1:null,_ts:this.refreshTimestamp});f=this.parsedUrl.path+"/tile/"+f+"/"+g+"/"+d;a=h.objectToQuery(a);return f+(a?"?"+a:"")}})})},"esri/layers/support/TilemapCache":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang dojo/io-query ../../request ../../core/Accessor ../../core/LRUMap ../../core/promiseUtils ../../core/watchUtils ../../core/Error ../../core/HandleRegistry ../../core/Logger ../../core/accessorSupport/decorators ./Tilemap".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v){var y=t.getLogger("esri.layers.support.TilemapCache");return function(b){function e(a){a=b.call(this)||this;a._handles=new w;a._pendingTilemapRequests={};a._availableLevels={};a.levels=5;a.cacheByteSize=2097152;a.request=m;return a}l(e,b);e.prototype.initialize=function(){var a=this;this._tilemapCache=new d(this.cacheByteSize,{sizeOfFunction:function(a){return a.byteSize}});this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers"],function(){return a._initializeTilemapDefinition()}),
c.init(this,"layer.tileInfo.lods",function(b){return a._initializeAvailableLevels(b)},!0)]);this._initializeTilemapDefinition()};e.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null)};e.prototype.castLevels=function(a){return 2>=a?(y.error("Minimum levels for Tilemap is 3, but got ",a),3):a};Object.defineProperty(e.prototype,"size",{get:function(){return 1<<this.levels},enumerable:!0,configurable:!0});e.prototype.getTilemap=function(a,b,e){return this._tilemapFromCache(a,
b,e,this._tmpTilemapDefinition)};e.prototype.fetchTilemap=function(b,e,c,d){var q=this;if(!this._availableLevels[b])return a.reject(new r("tilemap-cache:level-unavailable","Level "+b+" is unavailable in the service"));var g=this._tmpTilemapDefinition;if(b=this._tilemapFromCache(b,e,c,g))return a.resolve(b);var f=v.tilemapDefinitionId(g);b=this._pendingTilemapRequests[f];b||(b=v.Tilemap.fromDefinition(g,d).then(function(a){q._tilemapCache.set(f,a);delete q._pendingTilemapRequests[f];return a}).otherwise(function(b){delete q._pendingTilemapRequests[f];
return a.reject(b)}),this._pendingTilemapRequests[f]=b);return b};e.prototype.getAvailability=function(a,b,e){return this._availableLevels[a]?(a=this.getTilemap(a,b,e))?a.getAvailability(b,e):"unknown":"unavailable"};e.prototype.getAvailabilityUpsample=function(a,b,e,c){c.level=a;c.row=b;c.col=e;a=this.layer.tileInfo;for(a.updateTileInfo(c);;)if(b=this.getAvailability(c.level,c.row,c.col),"unavailable"===b){if(!a.upsampleTile(c))return"unavailable"}else return b};e.prototype.fetchAvailability=function(b,
e,c,d){return this._availableLevels[b]?this.fetchTilemap(b,e,c,d).always(function(d){return d instanceof v.Tilemap?(d=d.getAvailability(e,c),"unavailable"===d?a.reject(new r("tile-map:tile-unavailable","Tile is not available",{level:b,row:e,col:c})):d):"unknown"}):a.reject(new r("tilemap-cache:level-unavailable","Level "+b+" is unavailable in the service"))};e.prototype.fetchAvailabilityUpsample=function(b,e,c,d,g){var q=this;d.level=b;d.row=e;d.col=c;var f=this.layer.tileInfo;f.updateTileInfo(d);
return this.fetchAvailability(b,e,c,g).otherwise(function(b){return f.upsampleTile(d)?q.fetchAvailabilityUpsample(d.level,d.row,d.col,d):a.reject(b)})};e.prototype._initializeTilemapDefinition=function(){if(this.layer.parsedUrl){var a=this.layer.parsedUrl,b=a.query;b&&b.token||!this.layer.token||(b=f.mixin(b,{token:this.layer.token}));this._tilemapCache.clear();this._tmpTilemapDefinition={service:{url:a.path,query:b?n.objectToQuery(b):null,tileServers:this.layer.tileServers,request:this.request},
width:this.size,height:this.size,level:0,row:0,col:0}}};e.prototype._tilemapFromCache=function(a,b,e,c){a=this._getTilemapDefinition(a,b,e,c);a=v.tilemapDefinitionId(a);return this._tilemapCache.get(a)};e.prototype._getTilemapDefinition=function(a,b,e,c){c.level=a;c.row=b-b%this.size;c.col=e-e%this.size;return c};e.prototype._initializeAvailableLevels=function(a){var b=this;this._availableLevels={};a&&a.forEach(function(a){return b._availableLevels[a.level]=!0})};k([x.property({constructOnly:!0,type:Number})],
e.prototype,"levels",void 0);k([x.cast("levels")],e.prototype,"castLevels",null);k([x.property({readOnly:!0,dependsOn:["levels"],type:Number})],e.prototype,"size",null);k([x.property({constructOnly:!0,type:Number})],e.prototype,"cacheByteSize",void 0);k([x.property({constructOnly:!0})],e.prototype,"layer",void 0);k([x.property({constructOnly:!0})],e.prototype,"request",void 0);return e=k([x.subclass("esri.layers.support.TilemapCache")],e)}(x.declared(g))})},"esri/core/LRUMap":function(){define(["require",
"exports"],function(b,h){return function(){function b(b,f){void 0===b&&(b=0);this.sizeOfFunction=function(){return 1};this._sizeOf=0;this._cache=new Map;this._queue=[];if(0>=b)throw Error("LRU cache size must be bigger than zero!");this._maxSize=b;f&&(f.disposeFunction&&(this.disposeFunction=f.disposeFunction),f.sizeOfFunction&&(this.sizeOfFunction=f.sizeOfFunction))}Object.defineProperty(b.prototype,"length",{get:function(){return this._cache.size},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
"size",{get:function(){return this._sizeOf},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"keys",{get:function(){return this._queue.slice()},enumerable:!0,configurable:!0});b.prototype.clear=function(){var b=this;this._queue.length=0;this.disposeFunction&&this._cache.forEach(function(f,k){b.disposeFunction(k,f)});this._cache.clear();this._sizeOf=0};b.prototype.delete=function(b){var f=this._cache.get(b);return this._cache.delete(b)?(this._sizeOf-=this.sizeOfFunction(f),this.disposeFunction&&
this.disposeFunction(b,f),this._queue.splice(this._queue.indexOf(b),1),!0):!1};b.prototype.forEach=function(b,f){this._cache.forEach(b,f)};b.prototype.get=function(b){var f=this._cache.get(b);if(void 0!==f)return this._queue.splice(this._queue.indexOf(b),1),this._queue.unshift(b),f};b.prototype.has=function(b){return this._cache.has(b)};b.prototype.set=function(b,f){var k=this.get(b);void 0!==k?this._sizeOf-=this.sizeOfFunction(k):this._queue.unshift(b);this._sizeOf+=this.sizeOfFunction(f);this._cache.set(b,
f);this._collect();return this};b.prototype._collect=function(){for(;this._queue.length&&this._sizeOf>this._maxSize;){var b=this._queue.pop(),f=this._cache.get(b);this._cache.delete(b)&&(this._sizeOf-=this.sizeOfFunction(f),this.disposeFunction&&this.disposeFunction(b,f))}};return b}()})},"esri/core/watchUtils":function(){define(["require","exports","dojo/Deferred","dojo/promise/Promise"],function(b,h,l,k){function f(a,b,c,d,g){g=a.watch(b,function(b,e,g,f){d&&!d(b)||c.call(a,b,e,g,f)},g);var e=a.get(b);
d&&d(e)&&c.call(a,e,e,b,a);return g}function n(a,b,c,d,g){function e(){p&&(p.remove(),p=null)}var q=!1,p,h=new l(e),m=new k;m.cancel=h.cancel;m.isCanceled=h.isCanceled;m.isFulfilled=h.isFulfilled;m.isRejected=h.isRejected;m.isResolved=h.isResolved;m.then=h.then;m.remove=e;Object.freeze(m);p=f(a,b,function(b,d,g,f){q=!0;e();c&&c.call(a,b,d,g,f);h.resolve({value:b,oldValue:d,propertyName:g,target:f})},d,g);q&&p.remove();return m}function m(a){return!!a}function g(a){return!a}function d(a){return!0===
a}function a(a){return!1===a}function c(a){return void 0!==a}function r(a){return void 0===a}function w(a,b,c,d){(Array.isArray(b)?b:-1<b.indexOf(",")?b.split(","):[b]).forEach(function(b){b=b.trim();var e=a.get(b);c.call(a,e,e,b,a)});return a.watch(b,c,d)}Object.defineProperty(h,"__esModule",{value:!0});h.init=w;h.watch=function(a,b,c,d){return a.watch(b,c,d)};h.once=function(a,b,c,d){return n(a,b,c,null,d)};h.when=function(a,b,c,d){return f(a,b,c,m,d)};h.whenOnce=function(a,b,c,d){return n(a,b,
c,m,d)};h.whenNot=function(a,b,c,d){return f(a,b,c,g,d)};h.whenNotOnce=function(a,b,c,d){return n(a,b,c,g,d)};h.whenTrue=function(a,b,c,g){return f(a,b,c,d,g)};h.whenTrueOnce=function(a,b,c,g){return n(a,b,c,d,g)};h.whenFalse=function(b,c,d,g){return f(b,c,d,a,g)};h.whenFalseOnce=function(b,c,d,g){return n(b,c,d,a,g)};h.whenDefined=function(a,b,d,g){return f(a,b,d,c,g)};h.whenDefinedOnce=function(a,b,d,g){return n(a,b,d,c,g)};h.whenUndefined=function(a,b,c,d){return f(a,b,c,r,d)};h.whenUndefinedOnce=
function(a,b,c,d){return n(a,b,c,r,d)};h.pausable=function(a,b,c,d){var g=!1;return{remove:a.watch(b,function(b,d,f,p){g||c.call(a,b,d,f,p)},d).remove,pause:function(){g=!0},resume:function(){g=!1}}};h.on=function(a,b,c,d,g,e,q){function f(){k&&(e&&e(p,b,a,c),k.remove(),p=k=null)}var p=null,k=null,h=w(a,b,function(e){f();e&&e.on&&(p=e,k=e.on(c,d),g&&g(p,b,a,c))},q);return{remove:function(){h.remove();f()}}}})},"esri/layers/support/Tilemap":function(){define("require exports dojo/_base/lang ../../request ../../core/lang ../../core/Error".split(" "),
function(b,h,l,k,f,n){function m(b){var d=b.service.tileServers,d=(d&&d.length?d[b.row%d.length]:b.service.url)+"/tilemap/"+b.level+"/"+b.row+"/"+b.col+"/"+b.width+"/"+b.height;(b=b.service.query)&&(d=d+"?"+b);return d}Object.defineProperty(h,"__esModule",{value:!0});b=function(){function b(){this.location={left:0,top:0,width:0,height:0};this.byteSize=40}b.prototype.getAvailability=function(b,a){if(this._isAllAvailable)return"available";if(this._isAllUnvailable)return"unavailable";b=(b-this.location.top)*
this.location.width+(a-this.location.left);a=b>>3;var c=this._tileAvailabilityBitSet;return 0>a||a>c.length?"unknown":c[a]&1<<b%8?"available":"unavailable"};b.prototype._updateFromData=function(b){for(var a=!0,c=!0,d=new Uint8Array(Math.ceil(this.location.width*this.location.height/8)),g=0,f=0;f<b.length;f++){var k=f%8;b[f]?(c=!1,d[g]|=1<<k):a=!1;7===k&&++g}this._isAllUnvailable=c;this._isAllAvailable=a;this._isAllAvailable||this._isAllUnvailable||(this._tileAvailabilityBitSet=d,this.byteSize+=d.length)};
b.fromDefinition=function(d,a){var c=d.service.request||k,g=d.row,f=d.col,h=d.width,x=d.height,v={callbackParamName:"callback"};a=a?l.mixin(v,a):v;return c(m(d),a).then(function(a){var c=a.data;if(c.location&&(c.location.top!==g||c.location.left!==f||c.location.width!==h||c.location.height!==x))throw new n("tilemap:location-mismatch","Tilemap response for different location than requested",{response:c,definition:{top:g,left:f,width:h,height:x}});return b.fromJSON(a.data)})};b.fromJSON=function(d){b.validateJSON(d);
var a=new b;a.location=Object.freeze(f.clone(d.location));a._updateFromData(d.data);return Object.freeze(a)};b.validateJSON=function(b){if(!b||!b.location)throw new n("tilemap:missing-location","Location missing from tilemap response");if(!b.valid)throw new n("tilemap:invalid","Tilemap response was marked as invalid");if(!b.data)throw new n("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(b.data))throw new n("tilemap:data-mismatch","Data must be an array of numbers");
if(b.data.length!==b.location.width*b.location.height)throw new n("tilemap:data-mismatch","Number of data items does not match width/height of tilemap");};return b}();h.Tilemap=b;h.tilemapDefinitionId=function(b){return b.level+"/"+b.row+"/"+b.col+"/"+b.width+"/"+b.height};h.tilemapDefinitionUrl=m;h.default=b})},"esri/layers/mixins/OperationalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/MultiOriginJSONSupport ../../core/Error ../../core/urlUtils ../../core/accessorSupport/write ../../core/accessorSupport/read".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){b=function(b){function h(){var a=null!==b&&b.apply(this,arguments)||this;a.title="Layer";return a}l(h,b);m=h;h.prototype.writeListMode=function(b,c,d,e){e&&"ground"===e.layerContainerType?c[d]=b:b&&a.willPropertyWrite(this,d,{},e)&&(c[d]=b)};h.prototype.writeTitle=function(a,b){b.title=a||"Layer"};h.prototype.writeUrl=function(a,b){a&&d.isProtocolRelative(a)&&(a="https:"+a);b.url=a?d.normalize(a):a};h.prototype.writeOperationalLayerType=function(a,b){a&&(b.layerType=
a)};h.prototype.readOpacity=function(a,b,c){if(void 0!==b.opacity&&(!c||"web-map"===c.origin||"web-scene"===c.origin))return b.opacity;if((!c||"service"===c.origin)&&b.drawingInfo&&void 0!==b.drawingInfo.transparency)return 1-b.drawingInfo.transparency/100;if(b.layerDefinition&&b.layerDefinition.drawingInfo&&void 0!==b.layerDefinition.drawingInfo.transparency)return 1-b.layerDefinition.drawingInfo.transparency/100};h.prototype.readVisible=function(a,b){return!!b.visibility};h.prototype.read=function(a,
b){var d=this,e=arguments;b&&(b.layer=this);c.readLoadable(this,a,function(b){return d.inherited(e,[a,b])},b);return this};h.prototype.write=function(a,b){if(b&&b.origin){var c=b.origin+"/"+(b.layerContainerType||"operational-layers"),e=m.supportedTypes[c],e=e&&e[this.operationalLayerType];if("write"!==e&&"readwrite"!==e)return b.messages&&b.messages.push(new g("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' are not supported in the context of '"+c+"'",{layer:this})),
null;if(!this.url&&!r[this.operationalLayerType])return b.messages&&b.messages.push(new g("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to a '"+b.origin+"'",{layer:this})),null}return this.inherited(arguments,[a,b])};k([f.property({json:{write:{ignoreOrigin:!0}}})],h.prototype,"id",void 0);k([f.property({json:{write:{ignoreOrigin:!0}}})],h.prototype,"listMode",void 0);k([f.writer("listMode")],h.prototype,"writeListMode",
null);k([f.property({json:{write:{ignoreOrigin:!0,allowNull:!0}}})],h.prototype,"title",void 0);k([f.writer("title")],h.prototype,"writeTitle",null);k([f.property({json:{write:{ignoreOrigin:!0}}})],h.prototype,"url",void 0);k([f.writer("url")],h.prototype,"writeUrl",null);k([f.property({json:{write:{target:"layerType",ignoreOrigin:!0}}})],h.prototype,"operationalLayerType",void 0);k([f.writer("operationalLayerType")],h.prototype,"writeOperationalLayerType",null);k([f.property({json:{write:{ignoreOrigin:!0}}})],
h.prototype,"opacity",void 0);k([f.reader("opacity",["opacity","layerDefinition.drawingInfo.transparency","drawingInfo.transparency"])],h.prototype,"readOpacity",null);k([f.property({json:{write:{target:"visibility",ignoreOrigin:!0}}})],h.prototype,"visible",void 0);k([f.reader("visible",["visibility"])],h.prototype,"readVisible",null);return h=m=k([f.subclass("esri.layers.mixins.OperationalLayer")],h);var m}(f.declared(n,m));var r={GroupLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,ArcGISFeatureLayer:!0,
CSV:!0,VectorTileLayer:!0,KML:!0};(b||(b={})).supportedTypes={"web-scene/operational-layers":{ArcGISFeatureLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISSceneServiceLayer:"readwrite",ArcGISTiledElevationServiceLayer:"read",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",GroupLayer:"readwrite",IntegratedMeshLayer:"readwrite",PointCloudLayer:"readwrite",WebTiledLayer:"readwrite",CSV:"readwrite",VectorTileLayer:"readwrite",
WMS:"readwrite"},"web-scene/basemap":{ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",WebTiledLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite"},"web-scene/ground":{ArcGISTiledElevationServiceLayer:"readwrite"},"web-map/operational-layers":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISStreamLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",
ArcGISFeatureLayer:"readwrite",CSV:"readwrite",GeoRSS:"readwrite",KML:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite"},"web-map/basemap":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite",bingLayer:"readwrite"}};return b})},"esri/layers/mixins/PortalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Error ../../core/Logger ../../core/requireUtils ../../core/promiseUtils ../../core/urlUtils ../../portal/PortalItem ../../portal/Portal".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w){var t=g.getLogger("esri.layers.mixins.PortalLayer");return function(g){function h(){return null!==g&&g.apply(this,arguments)||this}l(h,g);Object.defineProperty(h.prototype,"portalItem",{set:function(a){a!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",a))},enumerable:!0,configurable:!0});h.prototype.writePortalItem=function(a,b){a&&a.id&&(b.itemId=a.id)};h.prototype.loadFromPortal=function(c){var g=this;return this.portalItem&&
this.portalItem.id?d.when(b,"../../portal/support/layersLoader").then(function(a){return a.load({instance:g,supportedTypes:c.supportedTypes,validateItem:c.validateItem,supportsData:c.supportsData}).otherwise(function(a){t.warn("Failed to load layer ("+g.title+", "+g.id+") portal item ("+g.portalItem.id+")\n  "+a);throw a;})}):a.resolve()};h.prototype.read=function(a,b){b&&(b.layer=this);return this.inherited(arguments)};h.prototype.write=function(a,b){var e=b&&b.portal,d=this.portalItem&&this.portalItem.id&&
(this.portalItem.portal||w.getDefault());return e&&d&&!c.hasSamePortal(d.restUrl,e.restUrl)?(b.messages&&b.messages.push(new m("layer:cross-portal","The layer '"+this.title+" ("+this.id+")' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer",{layer:this})),null):this.inherited(arguments)};k([f.property({type:r})],h.prototype,
"portalItem",null);k([f.writer("portalItem")],h.prototype,"writePortalItem",null);return h=k([f.subclass("esri.layers.mixins.PortalLayer")],h)}(f.declared(n))})},"esri/layers/support/rasterFormats/LercCodec":function(){define([],function(){var b={defaultNoDataValue:-3.4027999387901484E38,decode:function(l,k){var f;k=k||{};var n=k.inputOffset||0,m=k.encodedMaskData||null===k.encodedMaskData,g={},d=new Uint8Array(l,n,10);g.fileIdentifierString=String.fromCharCode.apply(null,d);if("CntZImage"!=g.fileIdentifierString.trim())throw"Unexpected file identifier string: "+
g.fileIdentifierString;n+=10;d=new DataView(l,n,24);g.fileVersion=d.getInt32(0,!0);g.imageType=d.getInt32(4,!0);g.height=d.getUint32(8,!0);g.width=d.getUint32(12,!0);g.maxZError=d.getFloat64(16,!0);n+=24;if(!m)if(d=new DataView(l,n,16),g.mask={},g.mask.numBlocksY=d.getUint32(0,!0),g.mask.numBlocksX=d.getUint32(4,!0),g.mask.numBytes=d.getUint32(8,!0),g.mask.maxValue=d.getFloat32(12,!0),n+=16,0<g.mask.numBytes){var m=new Uint8Array(Math.ceil(g.width*g.height/8)),d=new DataView(l,n,g.mask.numBytes),
a=d.getInt16(0,!0),c=2,r=0;do{if(0<a)for(;a--;)m[r++]=d.getUint8(c++);else for(var w=d.getUint8(c++),a=-a;a--;)m[r++]=w;a=d.getInt16(c,!0);c+=2}while(c<g.mask.numBytes);if(-32768!==a||r<m.length)throw"Unexpected end of mask RLE encoding";g.mask.bitset=m;n+=g.mask.numBytes}else 0===(g.mask.numBytes|g.mask.numBlocksY|g.mask.maxValue)&&(m=new Uint8Array(Math.ceil(g.width*g.height/8)),g.mask.bitset=m);d=new DataView(l,n,16);g.pixels={};g.pixels.numBlocksY=d.getUint32(0,!0);g.pixels.numBlocksX=d.getUint32(4,
!0);g.pixels.numBytes=d.getUint32(8,!0);g.pixels.maxValue=d.getFloat32(12,!0);n+=16;m=g.pixels.numBlocksX;d=g.pixels.numBlocksY;m+=0<g.width%m?1:0;a=d+(0<g.height%d?1:0);g.pixels.blocks=Array(m*a);c=1E9;for(w=r=0;w<a;w++)for(var t=0;t<m;t++){var x=0,d=new DataView(l,n,Math.min(10,l.byteLength-n)),v={};g.pixels.blocks[r++]=v;var y=d.getUint8(0);x++;v.encoding=y&63;if(3<v.encoding)throw"Invalid block encoding ("+v.encoding+")";if(2===v.encoding)n++,c=Math.min(c,0);else{if(0!==y&&2!==y){y>>=6;v.offsetType=
y;if(2===y)v.offset=d.getInt8(1),x++;else if(1===y)v.offset=d.getInt16(1,!0),x+=2;else if(0===y)v.offset=d.getFloat32(1,!0),x+=4;else throw"Invalid block offset type";c=Math.min(v.offset,c);if(1===v.encoding)if(y=d.getUint8(x),x++,v.bitsPerPixel=y&63,y>>=6,v.numValidPixelsType=y,2===y)v.numValidPixels=d.getUint8(x),x++;else if(1===y)v.numValidPixels=d.getUint16(x,!0),x+=2;else if(0===y)v.numValidPixels=d.getUint32(x,!0),x+=4;else throw"Invalid valid pixel count type";}n+=x;if(3!=v.encoding)if(0===
v.encoding){d=(g.pixels.numBytes-1)/4;if(d!==Math.floor(d))throw"uncompressed block has invalid length";x=new ArrayBuffer(4*d);y=new Uint8Array(x);y.set(new Uint8Array(l,n,4*d));x=new Float32Array(x);for(y=0;y<x.length;y++)c=Math.min(c,x[y]);v.rawData=x;n+=4*d}else 1===v.encoding&&(d=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),x=new ArrayBuffer(4*Math.ceil(d/4)),y=new Uint8Array(x),y.set(new Uint8Array(l,n,d)),v.stuffedData=new Uint32Array(x),n+=d)}}g.pixels.minValue=c;g.eofOffset=n;l=null!=k.noDataValue?
k.noDataValue:b.defaultNoDataValue;var m=k.encodedMaskData,v=k.returnMask,d=0,a=g.pixels.numBlocksX,c=g.pixels.numBlocksY,r=Math.floor(g.width/a),w=Math.floor(g.height/c),t=2*g.maxZError,m=m||(g.mask?g.mask.bitset:null),p,n=new (k.pixelType||Float32Array)(g.width*g.height);v&&m&&(p=new Uint8Array(g.width*g.height));for(var v=new Float32Array(r*w),e,q,x=0;x<=c;x++)if(y=x!==c?w:g.height%c,0!==y)for(var u=0;u<=a;u++){var z=u!==a?r:g.width%a;if(0!==z){var C=x*g.width*w+u*r,B=g.width-z,F=g.pixels.blocks[d],
D,E;if(2>F.encoding){if(0===F.encoding)D=F.rawData;else{D=F.stuffedData;E=F.bitsPerPixel;e=F.numValidPixels;q=F.offset;var I=t,J=v,U=g.pixels.maxValue,P=(1<<E)-1,H=0,K=void 0,G=0,S=void 0,O=void 0,da=Math.ceil((U-q)/I);D[D.length-1]<<=8*(4*D.length-Math.ceil(E*e/8));for(K=0;K<e;K++)0===G&&(O=D[H++],G=32),G>=E?(S=O>>>G-E&P,G-=E):(G=E-G,S=(O&P)<<G&P,O=D[H++],G=32-G,S+=O>>>G),J[K]=S<da?q+S*I:U;D=v}E=0}else f=2===F.encoding?0:F.offset;var N;if(m)for(q=0;q<y;q++){C&7&&(N=m[C>>3],N<<=C&7);for(e=0;e<z;e++)C&
7||(N=m[C>>3]),N&128?(p&&(p[C]=1),n[C++]=2>F.encoding?D[E++]:f):(p&&(p[C]=0),n[C++]=l),N<<=1;C+=B}else if(2>F.encoding)for(q=0;q<y;q++){for(e=0;e<z;e++)n[C++]=D[E++];C+=B}else for(q=0;q<y;q++){for(e=0;e<z;e++)n[C++]=f;C+=B}if(1===F.encoding&&E!==F.numValidPixels)throw"Block and Mask do not match";d++}}f=p;p={width:g.width,height:g.height,pixelData:n,minValue:g.pixels.minValue,maxValue:g.pixels.maxValue,noDataValue:l};f&&(p.maskData=f);k.returnEncodedMask&&g.mask&&(p.encodedMaskData=g.mask.bitset?
g.mask.bitset:null);if(k.returnFileInfo&&(p.fileInfo=h(g),k.computeUsedBitDepths)){k=p.fileInfo;f=g.pixels.numBlocksX*g.pixels.numBlocksY;N={};for(D=0;D<f;D++)E=g.pixels.blocks[D],0===E.encoding?N.float32=!0:1===E.encoding?N[E.bitsPerPixel]=!0:N[0]=!0;g=Object.keys(N);k.bitDepths=g}return p}},h=function(b){return{fileIdentifierString:b.fileIdentifierString,fileVersion:b.fileVersion,imageType:b.imageType,height:b.height,width:b.width,maxZError:b.maxZError,eofOffset:b.eofOffset,mask:b.mask?{numBlocksX:b.mask.numBlocksX,
numBlocksY:b.mask.numBlocksY,numBytes:b.mask.numBytes,maxValue:b.mask.maxValue}:null,pixels:{numBlocksX:b.pixels.numBlocksX,numBlocksY:b.pixels.numBlocksY,numBytes:b.pixels.numBytes,maxValue:b.pixels.maxValue,minValue:b.pixels.minValue,noDataValue:this.noDataValue}}};return b})},"esri/Viewpoint":function(){define(["./core/JSONSupport","./Camera","./core/lang","./geometry/support/typeUtils","./geometry/support/jsonUtils"],function(b,h,l,k,f){var n=b.createSubclass({declaredClass:"esri.Viewpoint",properties:{rotation:{value:0,
cast:function(b){b%=360;0>b&&(b+=360);return b}},scale:0,targetGeometry:{value:null,types:k.types,json:{read:function(b){return f.fromJSON(b)}}},camera:{value:null,type:h}},toJSON:function(){var b={scale:this.scale,rotation:this.rotation,targetGeometry:this.targetGeometry?this.targetGeometry.toJSON():void 0,camera:this.camera?this.camera.toJSON():void 0};b.camera&&delete b.camera.fov;return l.fixJson(b)},clone:function(){return new n({rotation:this.rotation,scale:this.scale,targetGeometry:this.targetGeometry?
this.targetGeometry.clone():null,camera:this.camera?this.camera.clone():null})}});return n})},"esri/Camera":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/lang ./geometry/Point ./views/3d/support/mathUtils ./core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m,g,d){return function(a){function b(b){b=a.call(this)||this;b.position=null;b.heading=0;b.tilt=0;b.fov=55;return b}l(b,a);f=b;b.prototype.getDefaults=
function(a){if(!a.position)return{position:new m([0,0,0])}};b.prototype.normalizeCtorArgs=function(a,b,c,d){a&&"object"===typeof a&&("x"in a||Array.isArray(a))&&(a={position:a},null!=b&&(a.heading=b),null!=c&&(a.tilt=c),null!=d&&(a.fov=d));return a};b.prototype.equals=function(a){return a?this.tilt===a.tilt&&this.heading===a.heading&&this.fov===a.fov&&this.position.equals(a.position):!1};b.prototype.clone=function(){return new f({position:this.position.clone(),heading:this.heading,tilt:this.tilt,
fov:this.fov})};b.prototype.toJSON=function(){var a={position:this.position.toJSON(),heading:this.heading,tilt:this.tilt};return n.fixJson(a)};k([d.property({type:m})],b.prototype,"position",void 0);k([d.property(),d.cast(g.cyclicalDeg.normalize)],b.prototype,"heading",void 0);k([d.property(),d.cast(function(a){return g.clamp(a,-180,180)})],b.prototype,"tilt",void 0);k([d.property({json:{read:!1,write:!1}})],b.prototype,"fov",void 0);return b=f=k([d.subclass("esri.Camera")],b);var f}(d.declared(f))})},
"esri/views/3d/support/mathUtils":function(){define(["require","exports","../lib/glMatrix"],function(b,h,l){function k(a){return Math.acos(1<a?1:-1>a?-1:a)}function f(a,b,d){return a<b?b:a>d?d:a}function n(a){for(var b in a){var c=a[b];c instanceof Function&&(a[b]=c.bind(a))}return a}Object.defineProperty(h,"__esModule",{value:!0});h.deg2rad=function(a){return a*Math.PI/180};h.rad2deg=function(a){return 180*a/Math.PI};h.asin=function(a){return Math.asin(1<a?1:-1>a?-1:a)};h.acos=k;h.log2=Math.log2||
function(a){return Math.log(a)/Math.LN2};h.fovx2fovy=function(a,b,d){return 2*Math.atan(d*Math.tan(.5*a)/b)};h.fovy2fovx=function(a,b,d){return 2*Math.atan(b*Math.tan(.5*a)/d)};h.lerp=function(a,b,d){return a+(b-a)*d};h.bilerp=function(a,b,d,g,f,k){a+=(b-a)*f;return a+(d+(g-d)*f-a)*k};h.slerp=function(a,b,d,f){void 0===f&&(f=a);var c=l.vec3d.length(a),k=l.vec3d.length(b),h=l.vec3d.dot(a,b)/c/k;.999999999999>h&&(l.vec3d.cross(a,b,m),l.mat4d.identity(g),l.mat4d.rotate(g,d*Math.acos(h),m),l.mat4d.multiplyVec3(g,
a,f));l.vec3d.scale(f,((1-d)*c+d*k)/c);return f};h.slerpOrLerp=function(a,b,d,f,k){var c=l.vec3d.length(a),h=l.vec3d.length(b);l.vec3d.cross(a,b,m);l.vec3d.length(m)/c/h>k?(b=Math.acos(l.vec3d.dot(a,b)/c/h),l.mat4d.identity(g),l.mat4d.rotate(g,d*b,m),l.mat4d.multiplyVec3(g,a,f),l.vec3d.scale(f,((1-d)*c+d*h)/c)):l.vec3d.lerp(a,b,d,f);return f};h.angle=function(b,g,f){b=l.vec3d.normalize(b,d);g=l.vec3d.normalize(g,a);var c=k(l.vec3d.dot(b,g));return f&&(b=l.vec3d.cross(b,g,m),0>l.vec3d.dot(b,f))?-c:
c};h.clamp=f;h.isFinite=Number.isFinite||function(a){return"number"===typeof a&&window.isFinite(a)};h.isNaN=Number.isNaN||function(a){return a!==a};h.makePiecewiseLinearFunction=function(a){var b=a.length;return function(c){var d=0;if(c<=a[0][0])return a[0][1];if(c>=a[b-1][0])return a[b-1][1];for(;c>a[d][0];)d++;var g=a[d][0];c=(g-c)/(g-a[d-1][0]);return c*a[d-1][1]+(1-c)*a[d][1]}};h.vectorEquals=function(a,b){if(null==a||null==b)return a!==b;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==
b[c])return!1;return!0};h.floatEqualRelative=function(a,b,d){void 0===d&&(d=1E-6);if(h.isNaN(a)||h.isNaN(b))return!1;if(a===b)return!0;var c=Math.abs(a-b),g=Math.abs(a),f=Math.abs(b);if(0===a||0===b||1E-12>g&&1E-12>f){if(c>.01*d)return!1}else if(c/(g+f)>d)return!1;return!0};h.floatEqualAbsolute=function(a,b,d){void 0===d&&(d=1E-6);return h.isNaN(a)||h.isNaN(b)?!1:(a>b?a-b:b-a)<=d};b=function(){function a(a,b){this.min=a;this.max=b;this.range=b-a}a.prototype.ndiff=function(a,b){void 0===b&&(b=0);return Math.ceil((a-
b)/this.range)*this.range+b};a.prototype._normalize=function(a,b,c,d){void 0===d&&(d=0);c-=d;c<a?c+=this.ndiff(a-c):c>b&&(c-=this.ndiff(c-b));return c+d};a.prototype.normalize=function(a,b){return this._normalize(this.min,this.max,a,b)};a.prototype.clamp=function(a,b){void 0===b&&(b=0);return f(a-b,this.min,this.max)+b};a.prototype.monotonic=function(a,b,c){return a<b?b:b+this.ndiff(a-b,c)};a.prototype.minimalMonotonic=function(a,b,c){return this._normalize(a,a+this.range,b,c)};a.prototype.center=
function(a,b,c){b=this.monotonic(a,b,c);return this.normalize((a+b)/2,c)};a.prototype.diff=function(a,b,c){return this.monotonic(a,b,c)-a};a.prototype.contains=function(a,b,c){b=this.minimalMonotonic(a,b);c=this.minimalMonotonic(a,c);return c>a&&c<b};return a}();h.Cyclical=b;h.cyclical2PI=n(new b(0,2*Math.PI));h.cyclicalPI=n(new b(-Math.PI,Math.PI));h.cyclicalDeg=n(new b(0,360));var m=l.vec3d.create(),g=l.mat4d.create(),d=l.vec3d.create(),a=l.vec3d.create()})},"esri/views/3d/lib/glMatrix":function(){define([],
function(){var b={};(function(b,l){l(b,!0);l(b,!1)})(b,function(b,l){var k={};(function(){if("undefined"!=typeof Float32Array){var a=new Float32Array(1),b=new Int32Array(a.buffer);k.invsqrt=function(e){a[0]=e;b[0]=1597463007-(b[0]>>1);var c=a[0];return c*(1.5-.5*e*c*c)}}else k.invsqrt=function(a){return 1/Math.sqrt(a)}})();var f=Array;"undefined"!=typeof Float32Array&&(f=l?Float32Array:Array);var h={create:function(a){var b=new f(3);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2]):b[0]=b[1]=b[2]=0;return b},createFrom:function(a,
b,c){var e=new f(3);e[0]=a;e[1]=b;e[2]=c;return e},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b},set3:function(a,b,c,d){d[0]=a;d[1]=b;d[2]=c;return d},add:function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];return c},subtract:function(a,b,c){if(!c||a===c)return a[0]-=b[0],a[1]-=b[1],a[2]-=b[2],a;c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c},multiply:function(a,b,c){if(!c||a===c)return a[0]*=b[0],a[1]*=b[1],a[2]*=
b[2],a;c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];return c},max:function(a,b,c){c[0]=Math.max(a[0],b[0]);c[1]=Math.max(a[1],b[1]);c[2]=Math.max(a[2],b[2]);return c},min:function(a,b,c){c[0]=Math.min(a[0],b[0]);c[1]=Math.min(a[1],b[1]);c[2]=Math.min(a[2],b[2]);return c},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b},scale:function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c},normalize:function(a,b){b||(b=a);var e=a[0],
c=a[1];a=a[2];var d=Math.sqrt(e*e+c*c+a*a);if(!d)return b[0]=0,b[1]=0,b[2]=0,b;if(1===d)return b[0]=e,b[1]=c,b[2]=a,b;d=1/d;b[0]=e*d;b[1]=c*d;b[2]=a*d;return b},cross:function(a,b,c){c||(c=a);var e=a[0],d=a[1];a=a[2];var q=b[0],g=b[1];b=b[2];c[0]=d*b-a*g;c[1]=a*q-e*b;c[2]=e*g-d*q;return c},length:function(a){var b=a[0],e=a[1];a=a[2];return Math.sqrt(b*b+e*e+a*a)},length2:function(a){var b=a[0],e=a[1];a=a[2];return b*b+e*e+a*a},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]},direction:function(a,
b,c){c||(c=a);var e=a[0]-b[0],d=a[1]-b[1];a=a[2]-b[2];b=Math.sqrt(e*e+d*d+a*a);if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/b;c[0]=e*b;c[1]=d*b;c[2]=a*b;return c},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);return d},dist:function(a,b){var e=b[0]-a[0],c=b[1]-a[1];a=b[2]-a[2];return Math.sqrt(e*e+c*c+a*a)},dist2:function(a,b){var e=b[0]-a[0],c=b[1]-a[1];a=b[2]-a[2];return e*e+c*c+a*a}},m=null,g=new f(4);h.unproject=function(a,b,c,d,f){f||(f=a);
m||(m=x.create());var e=m;g[0]=2*(a[0]-d[0])/d[2]-1;g[1]=2*(a[1]-d[1])/d[3]-1;g[2]=2*a[2]-1;g[3]=1;x.multiply(c,b,e);if(!x.inverse(e))return null;x.multiplyVec4(e,g);if(0===g[3])return null;f[0]=g[0]/g[3];f[1]=g[1]/g[3];f[2]=g[2]/g[3];return f};var d=h.createFrom(1,0,0),a=h.createFrom(0,1,0),c=h.createFrom(0,0,1);h.rotationTo=function(b,q,g){g||(g=v.create());var e=h.dot(b,q),f=h.create();if(1<=e)v.set(y,g);else if(-.999999>e)h.cross(d,b,f),1E-6>f.length&&h.cross(a,b,f),1E-6>f.length&&h.cross(c,b,
f),h.normalize(f),v.fromAxisAngle(f,Math.PI,g);else{var e=Math.sqrt(2*(1+e)),p=1/e;h.cross(b,q,f);g[0]=f[0]*p;g[1]=f[1]*p;g[2]=f[2]*p;g[3]=.5*e;v.normalize(g)}1<g[3]?g[3]=1:-1>g[3]&&(g[3]=-1);return g};var r=h.create(),w=h.create();h.project=function(a,b,c,d){d||(d=a);h.direction(b,c,r);h.subtract(a,b,w);a=h.dot(r,w);h.scale(r,a,d);h.add(d,b,d)};h.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var t={create:function(a){var b=new f(9);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=
a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8]):b[0]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=0;return b},createFrom:function(a,b,c,d,g,p,k,h,m){var e=new f(9);e[0]=a;e[1]=b;e[2]=c;e[3]=d;e[4]=g;e[5]=p;e[6]=k;e[7]=h;e[8]=m;return e},determinant:function(a){var b=a[3],e=a[4],c=a[5],d=a[6],g=a[7],f=a[8];return a[0]*(f*e-c*g)+a[1]*(-f*b+c*d)+a[2]*(g*b-e*d)},inverse:function(a,b){var e=a[0],c=a[1],d=a[2],q=a[3],g=a[4],f=a[5],p=a[6],k=a[7];a=a[8];var h=a*g-f*k,m=-a*q+f*p,n=k*q-g*p,r=e*h+c*m+d*n;if(!r)return null;r=
1/r;b||(b=t.create());b[0]=h*r;b[1]=(-a*c+d*k)*r;b[2]=(f*c-d*g)*r;b[3]=m*r;b[4]=(a*e-d*p)*r;b[5]=(-f*e+d*q)*r;b[6]=n*r;b[7]=(-k*e+c*p)*r;b[8]=(g*e-c*q)*r;return b},multiply:function(a,b,c){c||(c=a);var e=a[0],d=a[1],q=a[2],g=a[3],f=a[4],p=a[5],k=a[6],h=a[7];a=a[8];var u=b[0],m=b[1],n=b[2],r=b[3],l=b[4],t=b[5],v=b[6],w=b[7];b=b[8];c[0]=u*e+m*g+n*k;c[1]=u*d+m*f+n*h;c[2]=u*q+m*p+n*a;c[3]=r*e+l*g+t*k;c[4]=r*d+l*f+t*h;c[5]=r*q+l*p+t*a;c[6]=v*e+w*g+b*k;c[7]=v*d+w*f+b*h;c[8]=v*q+w*p+b*a;return c},add:function(a,
b,c){c||(c=a);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];c[4]=a[4]+b[4];c[5]=a[5]+b[5];c[6]=a[6]+b[6];c[7]=a[7]+b[7];c[8]=a[8]+b[8];return c},subtract:function(a,b,c){c||(c=a);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];c[4]=a[4]-b[4];c[5]=a[5]-b[5];c[6]=a[6]-b[6];c[7]=a[7]-b[7];c[8]=a[8]-b[8];return c},multiplyVec2:function(a,b,c){c||(c=b);var e=b[0];b=b[1];c[0]=e*a[0]+b*a[3]+a[6];c[1]=e*a[1]+b*a[4]+a[7];return c},multiplyVec3:function(a,b,c){c||(c=b);var e=b[0],
d=b[1];b=b[2];c[0]=e*a[0]+d*a[3]+b*a[6];c[1]=e*a[1]+d*a[4]+b*a[7];c[2]=e*a[2]+d*a[5]+b*a[8];return c},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return b},identity:function(a){a||(a=t.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,b){if(!b||a===b){b=a[1];var e=a[2],c=a[5];a[1]=a[3];a[2]=a[6];a[3]=b;a[5]=a[7];a[6]=e;a[7]=c;return a}b[0]=a[0];b[1]=a[3];b[2]=a[6];b[3]=a[1];b[4]=a[4];
b[5]=a[7];b[6]=a[2];b[7]=a[5];b[8]=a[8];return b},toMat4:function(a,b){b||(b=x.create());b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=a[8];b[9]=a[7];b[8]=a[6];b[7]=0;b[6]=a[5];b[5]=a[4];b[4]=a[3];b[3]=0;b[2]=a[2];b[1]=a[1];b[0]=a[0];return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"}},x={create:function(a){var b=new f(16);4===arguments.length?(b[0]=arguments[0],b[1]=arguments[1],b[2]=arguments[2],b[3]=arguments[3],b[4]=arguments[4],
b[5]=arguments[5],b[6]=arguments[6],b[7]=arguments[7],b[8]=arguments[8],b[9]=arguments[9],b[10]=arguments[10],b[11]=arguments[11],b[12]=arguments[12],b[13]=arguments[13],b[14]=arguments[14],b[15]=arguments[15]):a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b},createFrom:function(a,b,c,d,g,p,k,h,m,n,r,l,t,v,w,x){var e=new f(16);e[0]=a;e[1]=b;e[2]=c;e[3]=d;e[4]=g;
e[5]=p;e[6]=k;e[7]=h;e[8]=m;e[9]=n;e[10]=r;e[11]=l;e[12]=t;e[13]=v;e[14]=w;e[15]=x;return e},createFromMatrixRowMajor:function(a){var b=new f(16);b[0]=a[0];b[4]=a[1];b[8]=a[2];b[12]=a[3];b[1]=a[4];b[5]=a[5];b[9]=a[6];b[13]=a[7];b[2]=a[8];b[6]=a[9];b[10]=a[10];b[14]=a[11];b[3]=a[12];b[7]=a[13];b[11]=a[14];b[15]=a[15];return b},createFromMatrix:function(a){var b=new f(16);b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=
a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},setRowMajor:function(a,b){b[0]=a[0];b[4]=a[1];b[8]=a[2];b[12]=a[3];b[1]=a[4];b[5]=a[5];b[9]=a[6];b[13]=a[7];b[2]=a[8];b[6]=a[9];b[10]=a[10];b[14]=a[11];b[3]=a[12];b[7]=a[13];b[11]=a[14];b[15]=a[15];return b},identity:function(a){a||(a=x.create());a[0]=
1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,b){if(!b||a===b){b=a[1];var e=a[2],c=a[3],d=a[6],g=a[7],f=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=b;a[6]=a[9];a[7]=a[13];a[8]=e;a[9]=d;a[11]=a[14];a[12]=c;a[13]=g;a[14]=f;return a}b[0]=a[0];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=a[1];b[5]=a[5];b[6]=a[9];b[7]=a[13];b[8]=a[2];b[9]=a[6];b[10]=a[10];b[11]=a[14];b[12]=a[3];b[13]=a[7];b[14]=a[11];b[15]=a[15];return b},
determinant:function(a){var b=a[0],e=a[1],c=a[2],d=a[3],g=a[4],f=a[5],p=a[6],k=a[7],h=a[8],m=a[9],n=a[10],r=a[11],l=a[12],t=a[13],v=a[14];a=a[15];return l*m*p*d-h*t*p*d-l*f*n*d+g*t*n*d+h*f*v*d-g*m*v*d-l*m*c*k+h*t*c*k+l*e*n*k-b*t*n*k-h*e*v*k+b*m*v*k+l*f*c*r-g*t*c*r-l*e*p*r+b*t*p*r+g*e*v*r-b*f*v*r-h*f*c*a+g*m*c*a+h*e*p*a-b*m*p*a-g*e*n*a+b*f*n*a},inverse:function(a,b){b||(b=a);var e=a[0],c=a[1],d=a[2],g=a[3],f=a[4],q=a[5],p=a[6],k=a[7],h=a[8],m=a[9],n=a[10],r=a[11],l=a[12],t=a[13],v=a[14];a=a[15];var w=
e*q-c*f,x=e*p-d*f,y=e*k-g*f,M=c*p-d*q,ca=c*k-g*q,W=d*k-g*p,X=h*t-m*l,ga=h*v-n*l,fa=h*a-r*l,T=m*v-n*t,ka=m*a-r*t,ja=n*a-r*v,ha=w*ja-x*ka+y*T+M*fa-ca*ga+W*X;if(!ha)return null;ha=1/ha;b[0]=(q*ja-p*ka+k*T)*ha;b[1]=(-c*ja+d*ka-g*T)*ha;b[2]=(t*W-v*ca+a*M)*ha;b[3]=(-m*W+n*ca-r*M)*ha;b[4]=(-f*ja+p*fa-k*ga)*ha;b[5]=(e*ja-d*fa+g*ga)*ha;b[6]=(-l*W+v*y-a*x)*ha;b[7]=(h*W-n*y+r*x)*ha;b[8]=(f*ka-q*fa+k*X)*ha;b[9]=(-e*ka+c*fa-g*X)*ha;b[10]=(l*ca-t*y+a*w)*ha;b[11]=(-h*ca+m*y-r*w)*ha;b[12]=(-f*T+q*ga-p*X)*ha;b[13]=
(e*T-c*ga+d*X)*ha;b[14]=(-l*M+t*x-v*w)*ha;b[15]=(h*M-m*x+n*w)*ha;return b},toRotationMat:function(a,b){b||(b=x.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},toMat3:function(a,b){b||(b=t.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[4];b[4]=a[5];b[5]=a[6];b[6]=a[8];b[7]=a[9];b[8]=a[10];return b},toInverseMat3:function(a,b){var e=a[0],c=a[1],d=a[2],g=a[4],f=a[5],q=a[6],
p=a[8],k=a[9];a=a[10];var h=a*f-q*k,m=-a*g+q*p,n=k*g-f*p,r=e*h+c*m+d*n;if(!r)return null;r=1/r;b||(b=t.create());b[0]=h*r;b[1]=(-a*c+d*k)*r;b[2]=(q*c-d*f)*r;b[3]=m*r;b[4]=(a*e-d*p)*r;b[5]=(-q*e+d*g)*r;b[6]=n*r;b[7]=(-k*e+c*p)*r;b[8]=(f*e-c*g)*r;return b},multiply:function(a,b,c){c||(c=a);var e=a[0],d=a[1],g=a[2],f=a[3],p=a[4],q=a[5],k=a[6],h=a[7],u=a[8],m=a[9],n=a[10],r=a[11],l=a[12],t=a[13],v=a[14];a=a[15];var w=b[0],x=b[1],y=b[2],ca=b[3],W=b[4],X=b[5],ga=b[6],fa=b[7],T=b[8],ka=b[9],ja=b[10],ha=
b[11],sa=b[12],wa=b[13],pa=b[14];b=b[15];c[0]=w*e+x*p+y*u+ca*l;c[1]=w*d+x*q+y*m+ca*t;c[2]=w*g+x*k+y*n+ca*v;c[3]=w*f+x*h+y*r+ca*a;c[4]=W*e+X*p+ga*u+fa*l;c[5]=W*d+X*q+ga*m+fa*t;c[6]=W*g+X*k+ga*n+fa*v;c[7]=W*f+X*h+ga*r+fa*a;c[8]=T*e+ka*p+ja*u+ha*l;c[9]=T*d+ka*q+ja*m+ha*t;c[10]=T*g+ka*k+ja*n+ha*v;c[11]=T*f+ka*h+ja*r+ha*a;c[12]=sa*e+wa*p+pa*u+b*l;c[13]=sa*d+wa*q+pa*m+b*t;c[14]=sa*g+wa*k+pa*n+b*v;c[15]=sa*f+wa*h+pa*r+b*a;return c},multiplyVec3:function(a,b,c){c||(c=b);var e=b[0],d=b[1];b=b[2];c[0]=a[0]*
e+a[4]*d+a[8]*b+a[12];c[1]=a[1]*e+a[5]*d+a[9]*b+a[13];c[2]=a[2]*e+a[6]*d+a[10]*b+a[14];return c},multiplyVec4:function(a,b,c){c||(c=b);var e=b[0],d=b[1],g=b[2];b=b[3];c[0]=a[0]*e+a[4]*d+a[8]*g+a[12]*b;c[1]=a[1]*e+a[5]*d+a[9]*g+a[13]*b;c[2]=a[2]*e+a[6]*d+a[10]*g+a[14]*b;c[3]=a[3]*e+a[7]*d+a[11]*g+a[15]*b;return c},translate:function(a,b,c){var e=b[0],d=b[1];b=b[2];var g,f,p,q,k,h,u,m,n,r,l,t;if(!c||a===c)return a[12]=a[0]*e+a[4]*d+a[8]*b+a[12],a[13]=a[1]*e+a[5]*d+a[9]*b+a[13],a[14]=a[2]*e+a[6]*d+a[10]*
b+a[14],a[15]=a[3]*e+a[7]*d+a[11]*b+a[15],a;g=a[0];f=a[1];p=a[2];q=a[3];k=a[4];h=a[5];u=a[6];m=a[7];n=a[8];r=a[9];l=a[10];t=a[11];c[0]=g;c[1]=f;c[2]=p;c[3]=q;c[4]=k;c[5]=h;c[6]=u;c[7]=m;c[8]=n;c[9]=r;c[10]=l;c[11]=t;c[12]=g*e+k*d+n*b+a[12];c[13]=f*e+h*d+r*b+a[13];c[14]=p*e+u*d+l*b+a[14];c[15]=q*e+m*d+t*b+a[15];return c},scale:function(a,b,c){var e=b[0],d=b[1];b=b[2];if(!c||a===c)return a[0]*=e,a[1]*=e,a[2]*=e,a[3]*=e,a[4]*=d,a[5]*=d,a[6]*=d,a[7]*=d,a[8]*=b,a[9]*=b,a[10]*=b,a[11]*=b,a;c[0]=a[0]*e;
c[1]=a[1]*e;c[2]=a[2]*e;c[3]=a[3]*e;c[4]=a[4]*d;c[5]=a[5]*d;c[6]=a[6]*d;c[7]=a[7]*d;c[8]=a[8]*b;c[9]=a[9]*b;c[10]=a[10]*b;c[11]=a[11]*b;c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c},maxScale:function(a){return Math.max(Math.max(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8]),Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])),Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))},rotate:function(a,b,c,d){var e=c[0],g=c[1];c=c[2];var f=Math.sqrt(e*e+g*g+c*c),p,q,k,h,u,m,n,r,l,t,v,w,x,y,z,W,X,ga,fa,T;if(!f)return null;
1!==f&&(f=1/f,e*=f,g*=f,c*=f);p=Math.sin(b);q=Math.cos(b);k=1-q;b=a[0];f=a[1];h=a[2];u=a[3];m=a[4];n=a[5];r=a[6];l=a[7];t=a[8];v=a[9];w=a[10];x=a[11];y=e*e*k+q;z=g*e*k+c*p;W=c*e*k-g*p;X=e*g*k-c*p;ga=g*g*k+q;fa=c*g*k+e*p;T=e*c*k+g*p;e=g*c*k-e*p;g=c*c*k+q;d?a!==d&&(d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]):d=a;d[0]=b*y+m*z+t*W;d[1]=f*y+n*z+v*W;d[2]=h*y+r*z+w*W;d[3]=u*y+l*z+x*W;d[4]=b*X+m*ga+t*fa;d[5]=f*X+n*ga+v*fa;d[6]=h*X+r*ga+w*fa;d[7]=u*X+l*ga+x*fa;d[8]=b*T+m*e+t*g;d[9]=f*T+n*e+v*g;d[10]=
h*T+r*e+w*g;d[11]=u*T+l*e+x*g;return d},rotateX:function(a,b,c){var e=Math.sin(b);b=Math.cos(b);var d=a[4],g=a[5],f=a[6],p=a[7],q=a[8],k=a[9],h=a[10],u=a[11];c?a!==c&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[4]=d*b+q*e;c[5]=g*b+k*e;c[6]=f*b+h*e;c[7]=p*b+u*e;c[8]=d*-e+q*b;c[9]=g*-e+k*b;c[10]=f*-e+h*b;c[11]=p*-e+u*b;return c},rotateY:function(a,b,c){var e=Math.sin(b);b=Math.cos(b);var d=a[0],g=a[1],f=a[2],p=a[3],q=a[8],k=a[9],h=a[10],u=a[11];c?
a!==c&&(c[4]=a[4],c[5]=a[5],c[6]=a[6],c[7]=a[7],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=d*b+q*-e;c[1]=g*b+k*-e;c[2]=f*b+h*-e;c[3]=p*b+u*-e;c[8]=d*e+q*b;c[9]=g*e+k*b;c[10]=f*e+h*b;c[11]=p*e+u*b;return c},rotateZ:function(a,b,c){var e=Math.sin(b);b=Math.cos(b);var d=a[0],g=a[1],f=a[2],p=a[3],q=a[4],k=a[5],h=a[6],u=a[7];c?a!==c&&(c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=d*b+q*e;c[1]=g*b+k*e;c[2]=f*b+h*e;c[3]=p*b+u*e;c[4]=
d*-e+q*b;c[5]=g*-e+k*b;c[6]=f*-e+h*b;c[7]=p*-e+u*b;return c},frustum:function(a,b,c,d,g,f,p){p||(p=x.create());var e=b-a,q=d-c,k=f-g;p[0]=2*g/e;p[1]=0;p[2]=0;p[3]=0;p[4]=0;p[5]=2*g/q;p[6]=0;p[7]=0;p[8]=(b+a)/e;p[9]=(d+c)/q;p[10]=-(f+g)/k;p[11]=-1;p[12]=0;p[13]=0;p[14]=-(f*g*2)/k;p[15]=0;return p},perspective:function(a,b,c,d,g){a=c*Math.tan(a*Math.PI/360);b*=a;return x.frustum(-b,b,-a,a,c,d,g)},ortho:function(a,b,c,d,g,f,p){p||(p=x.create());var e=b-a,q=d-c,k=f-g;p[0]=2/e;p[1]=0;p[2]=0;p[3]=0;p[4]=
0;p[5]=2/q;p[6]=0;p[7]=0;p[8]=0;p[9]=0;p[10]=-2/k;p[11]=0;p[12]=-(a+b)/e;p[13]=-(d+c)/q;p[14]=-(f+g)/k;p[15]=1;return p},lookAt:function(a,b,c,d){d||(d=x.create());var e,g,f,p,q,k,h,u,m=a[0],n=a[1];a=a[2];f=c[0];p=c[1];g=c[2];h=b[0];c=b[1];e=b[2];if(m===h&&n===c&&a===e)return x.identity(d);b=m-h;c=n-c;h=a-e;u=1/Math.sqrt(b*b+c*c+h*h);b*=u;c*=u;h*=u;e=p*h-g*c;g=g*b-f*h;f=f*c-p*b;(u=Math.sqrt(e*e+g*g+f*f))?(u=1/u,e*=u,g*=u,f*=u):f=g=e=0;p=c*f-h*g;q=h*e-b*f;k=b*g-c*e;(u=Math.sqrt(p*p+q*q+k*k))?(u=1/
u,p*=u,q*=u,k*=u):k=q=p=0;d[0]=e;d[1]=p;d[2]=b;d[3]=0;d[4]=g;d[5]=q;d[6]=c;d[7]=0;d[8]=f;d[9]=k;d[10]=h;d[11]=0;d[12]=-(e*m+g*n+f*a);d[13]=-(p*m+q*n+k*a);d[14]=-(b*m+c*n+h*a);d[15]=1;return d},fromRotationTranslation:function(a,b,c){c||(c=x.create());var e=a[0],d=a[1],g=a[2],f=a[3],p=e+e,q=d+d,k=g+g;a=e*p;var h=e*q,e=e*k,u=d*q,d=d*k,g=g*k,p=f*p,q=f*q,f=f*k;c[0]=1-(u+g);c[1]=h+f;c[2]=e-q;c[3]=0;c[4]=h-f;c[5]=1-(a+g);c[6]=d+p;c[7]=0;c[8]=e+q;c[9]=d-p;c[10]=1-(a+u);c[11]=0;c[12]=b[0];c[13]=b[1];c[14]=
b[2];c[15]=1;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},v={create:function(a){var b=new f(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,d){var e=new f(4);e[0]=a;e[1]=b;e[2]=c;e[3]=d;return e},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},identity:function(a){a||
(a=v.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},y=v.identity();v.calculateW=function(a,b){var e=a[0],c=a[1],d=a[2];if(!b||a===b)return a[3]=-Math.sqrt(Math.abs(1-e*e-c*c-d*d)),a;b[0]=e;b[1]=c;b[2]=d;b[3]=-Math.sqrt(Math.abs(1-e*e-c*c-d*d));return b};v.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};v.inverse=function(a,b){var e=a[0],c=a[1],d=a[2],g=a[3],e=(e=e*e+c*c+d*d+g*g)?1/e:0;if(!b||a===b)return a[0]*=-e,a[1]*=-e,a[2]*=-e,a[3]*=e,a;b[0]=-a[0]*e;b[1]=-a[1]*e;b[2]=-a[2]*
e;b[3]=a[3]*e;return b};v.conjugate=function(a,b){if(!b||a===b)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b};v.length=function(a){var b=a[0],e=a[1],c=a[2];a=a[3];return Math.sqrt(b*b+e*e+c*c+a*a)};v.normalize=function(a,b){b||(b=a);var e=a[0],c=a[1],d=a[2];a=a[3];var g=Math.sqrt(e*e+c*c+d*d+a*a);if(0===g)return b[0]=0,b[1]=0,b[2]=0,b[3]=0,b;g=1/g;b[0]=e*g;b[1]=c*g;b[2]=d*g;b[3]=a*g;return b};v.add=function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],
a[2]+=b[2],a[3]+=b[3],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c};v.multiply=function(a,b,c){c||(c=a);var e=a[0],d=a[1],g=a[2];a=a[3];var f=b[0],p=b[1],q=b[2];b=b[3];c[0]=e*b+a*f+d*q-g*p;c[1]=d*b+a*p+g*f-e*q;c[2]=g*b+a*q+e*p-d*f;c[3]=a*b-e*f-d*p-g*q;return c};v.multiplyVec3=function(a,b,c){c||(c=b);var e=b[0],d=b[1],g=b[2];b=a[0];var f=a[1],p=a[2];a=a[3];var q=a*e+f*g-p*d,k=a*d+p*e-b*g,h=a*g+b*d-f*e,e=-b*e-f*d-p*g;c[0]=q*a+e*-b+k*-p-h*-f;c[1]=k*a+e*-f+h*-b-q*-p;c[2]=h*
a+e*-p+q*-f-k*-b;return c};v.scale=function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a[3]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c};v.toMat3=function(a,b){b||(b=t.create());var e=a[0],c=a[1],d=a[2],g=a[3],f=e+e,p=c+c,q=d+d;a=e*f;var k=e*p,e=e*q,h=c*p,c=c*q,d=d*q,f=g*f,p=g*p,g=g*q;b[0]=1-(h+d);b[1]=k+g;b[2]=e-p;b[3]=k-g;b[4]=1-(a+d);b[5]=c+f;b[6]=e+p;b[7]=c-f;b[8]=1-(a+h);return b};v.toMat4=function(a,b){b||(b=x.create());var e=a[0],c=a[1],d=a[2],g=a[3],f=e+e,p=c+c,q=
d+d;a=e*f;var k=e*p,e=e*q,h=c*p,c=c*q,d=d*q,f=g*f,p=g*p,g=g*q;b[0]=1-(h+d);b[1]=k+g;b[2]=e-p;b[3]=0;b[4]=k-g;b[5]=1-(a+d);b[6]=c+f;b[7]=0;b[8]=e+p;b[9]=c-f;b[10]=1-(a+h);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};v.slerp=function(a,b,c,d){d||(d=a);var e=a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3],g,f;if(1<=Math.abs(e))return d!==a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3]),d;g=Math.acos(e);f=Math.sqrt(1-e*e);if(.001>Math.abs(f))return d[0]=.5*a[0]+.5*b[0],d[1]=.5*a[1]+.5*b[1],d[2]=.5*a[2]+.5*b[2],
d[3]=.5*a[3]+.5*b[3],d;e=Math.sin((1-c)*g)/f;c=Math.sin(c*g)/f;d[0]=a[0]*e+b[0]*c;d[1]=a[1]*e+b[1]*c;d[2]=a[2]*e+b[2]*c;d[3]=a[3]*e+b[3]*c;return d};v.fromRotationMatrix=function(a,b){b||(b=v.create());var e=a[0]+a[4]+a[8],c;if(0<e)c=Math.sqrt(e+1),b[3]=.5*c,c=.5/c,b[0]=(a[7]-a[5])*c,b[1]=(a[2]-a[6])*c,b[2]=(a[3]-a[1])*c;else{c=v.fromRotationMatrix.s_iNext=v.fromRotationMatrix.s_iNext||[1,2,0];e=0;a[4]>a[0]&&(e=1);a[8]>a[3*e+e]&&(e=2);var d=c[e],g=c[d];c=Math.sqrt(a[3*e+e]-a[3*d+d]-a[3*g+g]+1);b[e]=
.5*c;c=.5/c;b[3]=(a[3*g+d]-a[3*d+g])*c;b[d]=(a[3*d+e]+a[3*e+d])*c;b[g]=(a[3*g+e]+a[3*e+g])*c}return b};t.toQuat4=v.fromRotationMatrix;(function(){var a=t.create();v.fromAxes=function(b,c,e,d){a[0]=c[0];a[3]=c[1];a[6]=c[2];a[1]=e[0];a[4]=e[1];a[7]=e[2];a[2]=b[0];a[5]=b[1];a[8]=b[2];return v.fromRotationMatrix(a,d)}})();v.identity=function(a){a||(a=v.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a};v.fromAngleAxis=function(a,b,c){c||(c=v.create());a*=.5;var e=Math.sin(a);c[3]=Math.cos(a);c[0]=e*b[0];
c[1]=e*b[1];c[2]=e*b[2];return c};v.toAngleAxis=function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0<c?(b[3]=2*Math.acos(a[3]),c=k.invsqrt(c),b[0]=a[0]*c,b[1]=a[1]*c,b[2]=a[2]*c):(b[3]=0,b[0]=1,b[1]=0,b[2]=0);return b};v.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"};var p={create:function(a){var b=new f(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,d){var e=new f(4);e[0]=a;e[1]=b;e[2]=c;e[3]=d;return e},set:function(a,
b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},identity:function(a){a||(a=p.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,b){if(!b||a===b)return b=a[1],a[1]=a[2],a[2]=b,a;b[0]=a[0];b[1]=a[2];b[2]=a[1];b[3]=a[3];return b},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,b){b||(b=a);var c=a[0],e=a[1],d=a[2];a=a[3];var g=c*a-d*e;if(!g)return null;g=1/g;b[0]=a*g;b[1]=-e*g;b[2]=-d*g;b[3]=c*g;return b},multiply:function(a,b,c){c||(c=a);var e=a[0],d=a[1],
g=a[2];a=a[3];c[0]=e*b[0]+d*b[2];c[1]=e*b[1]+d*b[3];c[2]=g*b[0]+a*b[2];c[3]=g*b[1]+a*b[3];return c},rotate:function(a,b,c){c||(c=a);var e=a[0],d=a[1],g=a[2];a=a[3];var f=Math.sin(b);b=Math.cos(b);c[0]=e*b+d*f;c[1]=e*-f+d*b;c[2]=g*b+a*f;c[3]=g*-f+a*b;return c},multiplyVec2:function(a,b,c){c||(c=b);var e=b[0];b=b[1];c[0]=e*a[0]+b*a[1];c[1]=e*a[2]+b*a[3];return c},scale:function(a,b,c){c||(c=a);var e=a[1],d=a[2],g=a[3],f=b[0];b=b[1];c[0]=a[0]*f;c[1]=e*b;c[2]=d*f;c[3]=g*b;return c},str:function(a){return"["+
a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};l=l?"":"d";b["glMath"+l]=k;b["vec2"+l]={create:function(a){var b=new f(2);a?(b[0]=a[0],b[1]=a[1]):(b[0]=0,b[1]=0);return b},createFrom:function(a,b){var c=new f(2);c[0]=a;c[1]=b;return c},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/
b[1];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;return c},dist:function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return Math.sqrt(c*c+a*a)},dist2:function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return c*c+a*a},set:function(a,b){b[0]=a[0];b[1]=a[1];return b},set2:function(a,b,c){c[0]=a;c[1]=b;return c},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];return b},normalize:function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1];0<c?(c=Math.sqrt(c),b[0]=a[0]/c,b[1]=a[1]/c):b[0]=b[1]=0;return b},cross:function(a,
b,c){a=a[0]*b[1]-a[1]*b[0];if(!c)return a;c[0]=c[1]=0;c[2]=a;return c},length:function(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]},direction:function(a,b,c){c||(c=a);var e=a[0]-b[0];a=a[1]-b[1];b=e*e+a*a;if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/Math.sqrt(b);c[0]=e*b;c[1]=a*b;return c},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);return d},str:function(a){return"["+a[0]+", "+a[1]+"]"}};b["vec3"+l]=h;b["vec4"+l]={create:function(a){var b=
new f(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):(b[0]=0,b[1]=0,b[2]=0,b[3]=0);return b},createFrom:function(a,b,c,d){var e=new f(4);e[0]=a;e[1]=b;e[2]=c;e[3]=d;return e},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];c[3]=a[3]*b[3];return c},divide:function(a,b,
c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];c[2]=a[2]/b[2];c[3]=a[3]/b[3];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},set4:function(a,b,c,d,g){g[0]=a;g[1]=b;g[2]=c;g[3]=d;return g},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-
a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);d[3]=a[3]+c*(b[3]-a[3]);return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};b["mat2"+l]=p;b["mat3"+l]=t;b["mat4"+l]=x;b["quat4"+l]=v});return b})},"esri/geometry/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Geometry ../Extent ../Multipoint ../Point ../Polyline ../Polygon".split(" "),function(b,h,l,k,f,n,m,g,d){Object.defineProperty(h,"__esModule",{value:!0});h.types={base:k,
key:"type",typeMap:{extent:f,multipoint:n,point:m,polyline:g,polygon:d}};h.ensureType=l.ensureOneOfType(h.types)})},"esri/geometry/Multipoint":function(){define("dojo/_base/lang ./SpatialReference ./Geometry ./Point ./Extent ./support/zmUtils".split(" "),function(b,h,l,k,f,n){var m=l.createSubclass({declaredClass:"esri.geometry.Multipoint",type:"multipoint",getDefaults:function(b){return{points:[]}},normalizeCtorArgs:function(b,d){var a=null,c,g,f=null;b&&!Array.isArray(b)?b.wkid?d=b:(a=b.points||
null,d=b.spatialReference||null,c=b.hasZ,g=b.hasM):a=b;a=a||[];d=d||h.WGS84;if(f=a[0])void 0===c&&void 0===g?(c=2<f.length,g=!1):void 0===c?c=3<f.length:void 0===g&&(g=3<f.length);return{points:a,spatialReference:d,hasZ:c,hasM:g}},properties:{cache:{dependsOn:["points","hasZ","hasM"]},extent:{dependsOn:["cache"],get:function(b){function d(a){return function(b,c){return null==b?c:null==c?b:a(b,c)}}if(!this.points.length)return null;b=b||new f;var a=this.points,c=this.hasZ,g=this.hasM,k=a[0],h=d(Math.min),
m=d(Math.max),n=q=k[0],l=u=k[1],p,e,q,u,z,C,B,F,D,E,I=c?3:2;D=0;for(E=a.length;D<E;D++)k=a[D],B=k[0],F=k[1],n=h(n,B),l=h(l,F),q=m(q,B),u=m(u,F),c&&2<k.length&&(B=k[2],p=h(p,B),z=m(z,B)),g&&k.length>I&&(k=k[I],e=h(e,k),C=m(C,k));b.xmin=n;b.ymin=l;b.xmax=q;b.ymax=u;b.spatialReference=this.spatialReference;c?(b.zmin=p,b.zmax=z):(b.zmin=null,b.zmax=null);g?(b.mmin=e,b.mmax=C):(b.mmin=null,b.mmax=null);return b}},points:null},addPoint:function(b){this.clearCache();n.updateSupportFromPoint(this,b);Array.isArray(b)?
this.points.push(b):this.points.push(b.toArray());return this},clone:function(){var g={points:b.clone(this.points),spatialReference:this.spatialReference};this.hasZ&&(g.hasZ=!0);this.hasM&&(g.hasM=!0);return new m(g)},getPoint:function(b){if(this._validateInputs(b)){b=this.points[b];var d,a,c=2;this.hasZ&&(d=b[2],c=3);this.hasM&&(a=b[c]);return new k({x:b[0],y:b[1],z:d,m:a,spatialReference:this.spatialReference})}},removePoint:function(b){if(this._validateInputs(b))return this.clearCache(),new k(this.points.splice(b,
1)[0],this.spatialReference)},setPoint:function(b,d){if(this._validateInputs(b))return this.clearCache(),n.updateSupportFromPoint(d),this.points[b]=d.toArray(),this},toJSON:function(){var g=this.spatialReference,g={points:b.clone(this.points),spatialReference:g&&g.toJSON()};this.hasZ&&(g.hasZ=!0);this.hasM&&(g.hasM=!0);return g},_pointsToArrays:function(b){for(var d=0;d<b.points.length;d++){var a=b.points[d];n.updateSupportFromPoint(b,a,!0);Array.isArray(a)||(b.spatialReference||(b.spatialReference=
a.spatialReference),b.points[d]=a.toArray())}return b},_validateInputs:function(b){return null!=b&&0<=b&&b<this.points.length}});return m})},"esri/geometry/support/zmUtils":function(){define([],function(){return{updateSupportFromPoint:function(b,h,l){var k=b.hasZ,f=b.hasM;Array.isArray(h)?4!==h.length||f||k?3===h.length&&l&&!f?(k=!0,f=!1):3===h.length&&f&&k&&(k=f=!1):k=f=!0:(k=!k&&h.hasZ&&(!f||h.hasM),f=!f&&h.hasM&&(!k||h.hasZ));b.hasZ=k;b.hasM=f}}})},"esri/geometry/Polyline":function(){define("dojo/_base/lang ../core/lang ./SpatialReference ./Geometry ./Point ./Extent ./support/zmUtils".split(" "),
function(b,h,l,k,f,n,m){var g=k.createSubclass({declaredClass:"esri.geometry.Polyline",type:"polyline",getDefaults:function(b){return{paths:[]}},normalizeCtorArgs:function(b,a){var c=null,d,g,f=null;b&&!Array.isArray(b)?(c=b.paths?b.paths:null,a||(b.spatialReference?a=b.spatialReference:b.paths||(a=b)),d=b.hasZ,g=b.hasM):c=b;c=c||[];a=a||l.WGS84;c.length&&c[0]&&null!=c[0][0]&&"number"==typeof c[0][0]&&(c=[c]);if(f=c[0]&&c[0][0])void 0===d&&void 0===g?(d=2<f.length,g=!1):void 0===d?d=!g&&3<f.length:
void 0===g&&(g=!d&&3<f.length);return{paths:c,spatialReference:a,hasZ:d,hasM:g}},_path:0,properties:{cache:{dependsOn:["hasM","hasZ","paths"]},extent:{dependsOn:["cache"],readOnly:!0,get:function(){function b(a){return function(b,c){return void 0===b?c:void 0===c?b:a(b,c)}}var a=this.paths,c=a.length;if(!c||!a[0].length)return null;var g,f,k,h,m,l,p,e,q,u,z,C,B=l=a[0][0][0],F=p=a[0][0][1],D,E,I=b(Math.min),J=b(Math.max),U=this.spatialReference,P=[],H,K,G,S,O,da,N,M,ca=this.hasZ,W=this.hasM,X=ca?3:
2;for(u=0;u<c;u++){g=a[u];H=K=g[0]&&g[0][0];G=S=g[0]&&g[0][1];C=g.length;N=M=O=da=void 0;for(z=0;z<C;z++)f=g[z],k=f[0],h=f[1],B=I(B,k),F=I(F,h),l=J(l,k),p=J(p,h),H=I(H,k),G=I(G,h),K=J(K,k),S=J(S,h),ca&&2<f.length&&(m=f[2],D=I(D,m),e=J(e,m),O=I(O,m),da=J(da,m)),W&&f.length>X&&(f=f[X],E=I(E,m),q=J(q,m),N=I(N,f),M=J(M,f));P.push(new n({xmin:H,ymin:G,zmin:O,mmin:N,xmax:K,ymax:S,zmax:da,mmax:M,spatialReference:U?U.clone():null}))}a=new n({xmin:B,ymin:F,xmax:l,ymax:p,spatialReference:U?U.toJSON():null});
ca&&(a.zmin=D,a.zmax=e);W&&(a.mmin=E,a.mmax=q);a.cache._partwise=1<P.length?P:null;return a}},paths:null},addPath:function(b){this.clearCache();this._path=this.paths.length;this.paths[this._path]=[];b.forEach(this._addPoint,this);return this},clone:function(){var d=new g;d.spatialReference=this.spatialReference;d.paths=b.clone(this.paths);d.hasZ=this.hasZ;d.hasM=this.hasM;return d},getPoint:function(b,a){if(this._validateInputs(b,a)){b=this.paths[b][a];a=this.hasZ;var c=this.hasM;return a&&c?new f(b[0],
b[1],b[2],b[3],this.spatialReference):a?new f(b[0],b[1],b[2],void 0,this.spatialReference):c?new f(b[0],b[1],void 0,b[2],this.spatialReference):new f(b[0],b[1],this.spatialReference)}},insertPoint:function(b,a,c){if(this._validateInputs(b)&&h.isDefined(a)&&0<=a&&a<=this.paths[b].length)return this.clearCache(),m.updateSupportFromPoint(this,c),Array.isArray(c)||(c=c.toArray()),this.paths[b].splice(a,0,c),this},removePath:function(b){if(this._validateInputs(b,null)){this.clearCache();b=this.paths.splice(b,
1)[0];var a,c=b.length,d=this.spatialReference;for(a=0;a<c;a++)b[a]=new f(b[a],d);return b}},removePoint:function(b,a){if(this._validateInputs(b,a))return this.clearCache(),new f(this.paths[b].splice(a,1)[0],this.spatialReference)},setPoint:function(b,a,c){if(this._validateInputs(b,a))return this.clearCache(),m.updateSupportFromPoint(this,c),Array.isArray(c)||(c=c.toArray()),this.paths[b][a]=c,this},toJSON:function(){var b=this.spatialReference,b={paths:this.paths,spatialReference:b&&b.toJSON()};
this.hasZ&&(b.hasZ=!0);this.hasM&&(b.hasM=!0);return b},_initPathPointsToArray:function(b){for(var a=0;a<b.paths.length;a++)b.paths[a]=b.paths[a].map(function(a){m.updateSupportFromPoint(b,a,!0);Array.isArray(a)||(b.spatialReference||(b.spatialReference=a.spatialReference),a=a.toArray());return a});return b},_addPoint:function(b){Array.isArray(b)?this.paths[this._path].push(b):this.paths[this._path].push(b.toArray());m.updateSupportFromPoint(this,b)},_insertPoints:function(b,a){this.clearCache();
this._path=a;this.paths[this._path]||(this.paths[this._path]=[]);b.forEach(this._addPoint,this)},_validateInputs:function(b,a){return null!==b&&void 0!==b&&(0>b||b>=this.paths.length)||null!==a&&void 0!==b&&(0>a||a>=this.paths[b].length)?!1:!0}});return g})},"esri/geometry/Polygon":function(){define("dojo/_base/lang ../core/lang ./SpatialReference ./Geometry ./Point ./Extent ./support/coordsUtils ./support/mathUtils ./support/webMercatorUtils ./support/zmUtils".split(" "),function(b,h,l,k,f,n,m,g,
d,a){var c=function(a){return function(b,c){return null==b?c:null==c?b:a(b,c)}},r=c(Math.min),w=c(Math.max),t=k.createSubclass({declaredClass:"esri.geometry.Polygon",type:"polygon",getDefaults:function(a){return{rings:[]}},normalizeCtorArgs:function(a,b){var c=null,d,e,g=null;a&&!Array.isArray(a)?(c=a.rings?a.rings:null,b||(a.spatialReference?b=a.spatialReference:a.rings||(b=a)),d=a.hasZ,e=a.hasM):c=a;c=c||[];b=b||l.WGS84;c.length&&c[0]&&null!=c[0][0]&&"number"==typeof c[0][0]&&(c=[c]);if(g=c[0]&&
c[0][0])void 0===d&&void 0===e?(d=2<g.length,e=!1):void 0===d?d=!e&&3<g.length:void 0===e&&(e=!d&&3<g.length);return{rings:c,spatialReference:b,hasZ:d,hasM:e}},_ring:0,properties:{cache:{dependsOn:["hasM","hasZ","rings"]},centroid:{readOnly:!0,dependsOn:["cache"],get:function(a){var b=m.centroid([],this.rings,this.hasZ);if(isNaN(b[0])||isNaN(b[1])||this.hasZ&&isNaN(b[2]))return null;a=a||new f;a.x=b[0];a.y=b[1];a.spatialReference=this.spatialReference;this.hasZ&&(a.z=b[2]);return a}},extent:{dependsOn:["cache"],
readOnly:!0,get:function(){var a=this.rings,b=a.length;if(!b||!a[0].length)return null;var c,d,e,g,f,k,h,m,l,t,E,I=f=a[0][0][0],J=k=a[0][0][1],U,P,H=this.spatialReference,K=[],G,S,O,da,N,M,ca,W,X=this.hasZ,ga=this.hasM,fa=X?3:2;for(l=0;l<b;l++){c=a[l];G=S=c[0]&&c[0][0];O=da=c[0]&&c[0][1];E=c.length;ca=W=N=M=void 0;for(t=0;t<E;t++)d=c[t],e=d[0],g=d[1],I=r(I,e),J=r(J,g),f=w(f,e),k=w(k,g),G=r(G,e),O=r(O,g),S=w(S,e),da=w(da,g),X&&2<d.length&&(e=d[2],U=r(U,e),h=w(h,e),N=r(N,e),M=w(M,e)),ga&&d.length>fa&&
(d=d[fa],P=r(U,d),m=w(h,d),ca=r(N,d),W=w(M,d));K.push(new n({xmin:G,ymin:O,zmin:N,mmin:ca,xmax:S,ymax:da,zmax:M,mmax:W,spatialReference:H}))}a=new n;a.xmin=I;a.ymin=J;a.xmax=f;a.ymax=k;a.spatialReference=H;X&&(a.zmin=U,a.zmax=h);ga&&(a.mmin=P,a.mmax=m);a.cache._partwise=1<K.length?K:null;return a}},isSelfIntersecting:{dependsOn:["cache"],readOnly:!0,get:function(){var a=this.rings,b=a.length,c,d,e,f,k,h,m,n,r;for(f=0;f<b;f++){c=a[f];for(d=0;d<c.length-1;d++)for(h=[[c[d][0],c[d][1]],[c[d+1][0],c[d+
1][1]]],e=f+1;e<b;e++)for(k=0;k<a[e].length-1;k++)if(m=[[a[e][k][0],a[e][k][1]],[a[e][k+1][0],a[e][k+1][1]]],(n=g._getLineIntersection2(h,m))&&!(n[0]===h[0][0]&&n[1]===h[0][1]||n[0]===m[0][0]&&n[1]===m[0][1]||n[0]===h[1][0]&&n[1]===h[1][1]||n[0]===m[1][0]&&n[1]===m[1][1]))return!0;k=c.length;if(!(4>=k))for(d=0;d<k-3;d++)for(r=k-1,0===d&&(r=k-2),h=[[c[d][0],c[d][1]],[c[d+1][0],c[d+1][1]]],e=d+2;e<r;e++)if(m=[[c[e][0],c[e][1]],[c[e+1][0],c[e+1][1]]],(n=g._getLineIntersection2(h,m))&&!(n[0]===h[0][0]&&
n[1]===h[0][1]||n[0]===m[0][0]&&n[1]===m[0][1]||n[0]===h[1][0]&&n[1]===h[1][1]||n[0]===m[1][0]&&n[1]===m[1][1]))return!0}return!1}},rings:null},addRing:function(a){if(a){this.clearCache();var b=this.rings,c=b.length;if(Array.isArray(a[0]))b[c]=a.concat();else{var d=[];b[c]=d;b=0;for(c=a.length;b<c;b++)d[b]=a[b].toArray()}return this}},clone:function(){var a=new t;a.spatialReference=this.spatialReference;a.rings=b.clone(this.rings);a.hasZ=this.hasZ;a.hasM=this.hasM;return a},contains:function(a){if(!a)return!1;
d.canProject(a,this.spatialReference)&&(a=d.project(a,this.spatialReference));return m.contains(this.rings,m.fromGeom(a))},isClockwise:function(a){var b=0,c=0,d=0,e,g=a.length,f,k,h,m=this.hasZ,n=this.hasM;for(e=0;e<g;e++)f=a[e],k=a[(e+1)%g],Array.isArray(f)?(b+=f[0]*k[1]-k[0]*f[1],h=2,2<f.length&&2<k.length&&m&&(c+=f[0]*k[2]-k[0]*f[2],h=3),f.length>h&&k.length>h&&n&&(d+=f[0]*k[h]-k[0]*f[h])):(b+=f.x*k.y-k.x*f.y,f.hasZ&&k.hasZ&&(c+=f.x*k.z-k.x*f.z),f.hasM&&k.hasM&&(d+=f.x*k.m-k.x*f.m));return 0>=
b&&0>=c&&0>=d},getPoint:function(a,b){if(this._validateInputs(a,b)){a=this.rings[a][b];b=this.hasZ;var c=this.hasM;return b&&!c?new f(a[0],a[1],a[2],void 0,this.spatialReference):c&&!b?new f(a[0],a[1],void 0,a[2],this.spatialReference):b&&c?new f(a[0],a[1],a[2],a[3],this.spatialReference):new f(a[0],a[1],this.spatialReference)}},insertPoint:function(b,c,d){if(this._validateInputs(b)&&h.isDefined(c)&&0<=c&&c<=this.rings[b].length)return this.clearCache(),a.updateSupportFromPoint(this,d),Array.isArray(d)||
(d=d.toArray()),this.rings[b].splice(c,0,d),this},removePoint:function(a,b){if(this._validateInputs(a,b))return this.clearCache(),new f(this.rings[a].splice(b,1)[0],this.spatialReference)},removeRing:function(a){if(this._validateInputs(a,null)){this.clearCache();a=this.rings.splice(a,1)[0];var b,c=a.length,d=this.spatialReference;for(b=0;b<c;b++)a[b]=new f(a[b],d);return a}},setPoint:function(b,c,d){if(this._validateInputs(b,c))return this.clearCache(),a.updateSupportFromPoint(this,d),Array.isArray(d)||
(d=d.toArray()),this.rings[b][c]=d,this},toJSON:function(){var a=this.spatialReference,a={rings:this.rings,spatialReference:a&&a.toJSON()};this.hasZ&&(a.hasZ=!0);this.hasM&&(a.hasM=!0);return a},_insertPoints:function(a,b){this.clearCache();this._ring=b;this.rings[this._ring]||(this.rings[this._ring]=[]);a.forEach(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}});t.createEllipse=
function(a){var b=a.center.x,c=a.center.y,d=a.center.z,e=a.center.m,g=a.longAxis,f=a.shortAxis,k=a.numberOfPoints;a=a.map;var h,m,n,r=[],l=2*Math.PI/k;for(m=0;m<k;m++)h=Math.cos(m*l),n=Math.sin(m*l),h=a.toMap({x:g*h+b,y:f*n+c}),null==d||h.hasZ||(h.z=d),null==e||h.hasM||(h.m=e),r.push(h);r.push(r[0]);return new t({rings:[r],spatialReference:a.spatialReference})};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.clone().normalize();a=a.spatialReference;var c=!1,d=!1;b.map(function(a){a.hasZ&&(c=!0);a.hasM&&(d=!0)});b={rings:b.map(function(a){var b=[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(c&&a.hasZ)for(var e=(a.zmax-a.zmin)/2,g=0;g<b.length;g++)b[g].push(e);if(d&&a.hasM)for(a=(a.mmax-a.mmin)/2,g=0;g<b.length;g++)b[g].push(a);return b}),spatialReference:a?a.toJSON():null};c&&(b.hasZ=!0);d&&(b.hasM=!0);return new t(b)};return t})},
"esri/geometry/support/coordsUtils":function(){define([],function(){var b=function(b,f,h){var k=h[0];h=h[1];for(var g=0,d,a,c,n,l=0,t=f.length;l<t;l++)g++,g===t&&(g=0),d=f[l][0],a=f[g][0],c=f[l][1],n=f[g][1],(c<h&&n>=h||n<h&&c>=h)&&d+(h-c)/(n-c)*(a-d)<k&&(b=!b);return b},h=function(b,f,h,m){for(var g=0,d=0,a=0,c,k,n,l,x,v,y,p,e,q=0,u=0,z=0,C=f.length-1;z<C;z++)c=f[z],k=c[0],n=c[1],l=c[2],x=f[z+1],v=x[0],y=x[1],p=x[2],e=k*y-v*n,q+=e,g+=(k+v)*e,d+=(n+y)*e,h&&2<c.length&&2<x.length&&(e=k*p-v*l,a+=(l+
p)*e,u+=e),k<m[0]&&(m[0]=k),k>m[1]&&(m[1]=k),n<m[2]&&(m[2]=n),n>m[3]&&(m[3]=n),h&&(l<m[4]&&(m[4]=l),l>m[5]&&(m[5]=l));0<q&&(q*=-1);0<u&&(u*=-1);q?(b[0]=g,b[1]=d,b[2]=.5*q,h?(b[3]=a,b[4]=.5*u):b.length=3):b.length=0;return b},l=function(b,f){for(var k=0,h=0,g=0,d=0,a=f?[0,0,0]:[0,0],c=f?[0,0,0]:[0,0],r,l,t,x=0,v=b.length;x<v-1;x++)if(r=b[x],l=b[x+1],r&&l){a[0]=r[0];a[1]=r[1];c[0]=l[0];c[1]=l[1];f&&2<r.length&&2<l.length&&(a[2]=r[2],c[2]=l[2]);t=c[0]-a[0];var y=c[1]-a[1],p=0;2<a.length&&2<c.length&&
(p=a[2]-c[2]);if(t=Math.sqrt(t*t+y*y+p*p))k+=t,y=r[0]+.5*(l[0]-r[0]),p=r[1]+.5*(l[1]-r[1]),r=2<r.length&&2<l.length?[y,p,r[2]+.5*(l[2]-r[2])]:[y,p],h+=t*r[0],g+=t*r[1],f&&2<r.length&&(d+=t*r[2])}return 0<k?f?[h/k,g/k,d/k]:[h/k,g/k]:b.length?b[0]:null};return{fromGeom:function(b){if(!b)return null;if(Array.isArray(b))return b;var f=b.hasZ,k=b.hasM;if("point"===b.type)return k&&f?[b.x,b.y,b.z,b.m]:f?[b.x,b.y,b.z]:k?[b.x,b.y,b.m]:[b.x,b.y];if("polygon"===b.type)return b.rings.slice(0);if("polyline"===
b.type)return b.path.slice(0);if("multipoint"===b.type)return b.points.slice(0);if("extent"===b.type){b=b.clone().normalize();if(!b)return null;f=k=!1;b.map(function(b){b.hasZ&&(f=!0);b.hasM&&(k=!0)});return b.map(function(b){var g=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]];if(f&&b.hasZ)for(var d=.5*(b.zmax-b.zmin),a=0;a<g.length;a++)g[a].push(d);if(k&&b.hasM)for(b=.5*(b.mmax-b.mmin),a=0;a<g.length;a++)g[a].push(b);return g})}return null},contains:function(k,
f){if(!k)return!1;if(!Array.isArray(k[0][0]))return b(!1,k,f);for(var h=!1,m=0,g=k.length;m<g;m++)h=b(h,k[m],f);return h},centroid:function(b,f,n){var k=[],g;b.length=0;for(var d=n?[Infinity,-Infinity,Infinity,-Infinity,Infinity,-Infinity]:[Infinity,-Infinity,Infinity,-Infinity],a=0,c=f.length;a<c;a++)g=h([],f[a],n,d),g.length&&k.push(g);k.sort(function(a,b){var c=a[2]-b[2];0===c&&n&&(c=a[4]-b[4]);return c});k.length&&(g=6*k[0][2],b[0]=k[0][0]/g,b[1]=k[0][1]/g,n&&(g=6*k[0][4],b[2]=0!==g?k[0][3]/g:
0),b[0]<d[0]||b[0]>d[1]||b[1]<d[2]||b[1]>d[3]||n&&(b[2]<d[4]||b[2]>d[5]))&&(b.length=0);!b.length&&(f=f[0]&&f[0].length?l(f[0],n):null)&&(b[0]=f[0],b[1]=f[1],n&&2<f.length&&(b[2]=f[2]));return b},isClockwise:function(b){for(var f=0,k=0,h=k+1,g=b.length;k<g;k++,h+=1%g)f+=b[k][0]*b[h][1]-b[h][0]*b[k][1];return 0>=.5*f}}})},"esri/geometry/support/jsonUtils":function(){define(["../Point","../Polyline","../Polygon","../Multipoint","../Extent"],function(b,h,l,k,f){function n(g){if(!g)return null;if(g){if(void 0!==
g.x&&void 0!==g.y)return b.fromJSON(g);if(void 0!==g.paths)return h.fromJSON(g);if(void 0!==g.rings)return l.fromJSON(g);if(void 0!==g.points)return k.fromJSON(g);if(void 0!==g.xmin&&void 0!==g.ymin&&void 0!==g.xmax&&void 0!==g.ymax)return f.fromJSON(g)}return null}var m={esriGeometryPoint:b,esriGeometryPolyline:h,esriGeometryPolygon:l,esriGeometryEnvelope:f,esriGeometryMultipoint:k};return{fromJSON:n,fromJson:function(b){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(d){console.warn(d.stack)}return n(b)},
getJsonType:function(g){return g instanceof b?"esriGeometryPoint":g instanceof h?"esriGeometryPolyline":g instanceof l?"esriGeometryPolygon":g instanceof f?"esriGeometryEnvelope":g instanceof k?"esriGeometryMultipoint":null},getGeometryType:function(b){return b&&m[b]||null}}})},"esri/layers/graphics/controllers/AutoController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/requireUtils ../../../Graphic ../../../core/Accessor ../../../core/Collection ../../../core/Error ../../../core/Promise ../../../tasks/QueryTask ../../../tasks/support/StatisticDefinition".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w){var t;(function(a){a[a.Snapshot=0]="Snapshot";a[a.OnDemand=1]="OnDemand"})(t||(t={}));return function(c){function g(){var a=null!==c&&c.apply(this,arguments)||this;a.controllerModulePaths=(b={},b[t.Snapshot]="./SnapshotController",b[t.OnDemand]="./OnDemandController2D",b);a.maxPointCountForAuto=4E3;a.maxRecordCountForAuto=2E3;a.maxVertexCountForAuto=25E4;return a;var b}l(g,c);g.prototype.initialize=function(){var a=this,b=this.layer.then(function(){a._verifyCapabilities()}).then(function(){return a._figureOutMode().then(function(b){return a._createController(b)})}).then(function(b){return a._set("activeController",
b)});this.addResolvingPromise(b)};g.prototype.destroy=function(){this.activeController&&(this.activeController.destroy(),this._set("activeController",null))};Object.defineProperty(g.prototype,"countThresholdForAuto",{get:function(){var a=this.layer.geometryType,b;"polyline"===a||"polygon"===a||"multipoint"===a?b=this.maxRecordCountForAuto:"point"===a&&(b=this.maxPointCountForAuto);return b},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"updating",{get:function(){return!1===this.isFulfilled()||
!0===this.get("activeController.updating")},enumerable:!0,configurable:!0});g.prototype._figureOutMode=function(){return this._isStatisticsSupported()?this._checkByStatistics():this._checkByCount()};g.prototype._isStatisticsSupported=function(){return/(https?:)?\/\/services.*\.arcgis\.com/i.test(this.layer.source.parsedUrl.path)};g.prototype._checkByStatistics=function(){var a=this,b=this.layer,c=b.source.parsedUrl.path,b=b.createQuery();b.outStatistics=[new w({statisticType:"exceedslimit",maxPointCount:this.maxPointCountForAuto,
maxRecordCount:this.maxRecordCountForAuto,maxVertexCount:this.maxVertexCountForAuto,outStatisticFieldName:"exceedslimit"})];return(new r({url:c+"/query"})).execute(b).then(function(b){b=b&&b.features&&b.features[0];if(0===(b&&b.attributes&&b.attributes.exceedslimit)){b=a.layer;var c=b.maxRecordCount;if(b.get("capabilities.query.supportsPagination")||c>=a.countThresholdForAuto)return t.Snapshot}return t.OnDemand})};g.prototype._checkByCount=function(){var a=this,b=this.layer;return b.queryFeatureCount().then(function(c){return c<=
a.countThresholdForAuto&&c<=b.maxRecordCount?t.Snapshot:t.OnDemand})};g.prototype._createController=function(a){var c=this;return n.when(b,this.controllerModulePaths[a]).then(function(a){return new a({layer:c.layer,layerView:c.layerView,graphics:c.graphics})}).otherwise(function(b){throw Error("Module path not found for controller type: "+(a===t.Snapshot?"snapshot":"on demand"));})};g.prototype._verifyCapabilities=function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new a("graphicscontroller:query-capability-required",
"Service requires query capabilities to be used as a feature layer",{layer:this.layer});};k([f.property()],g.prototype,"activeController",void 0);k([f.property({dependsOn:["layer.geometryType"]})],g.prototype,"countThresholdForAuto",null);k([f.property()],g.prototype,"controllerModulePaths",void 0);k([f.property({type:d.ofType(m)})],g.prototype,"graphics",void 0);k([f.property()],g.prototype,"layer",void 0);k([f.property()],g.prototype,"layerView",void 0);k([f.property({dependsOn:["activeController.updating"]})],
g.prototype,"updating",null);k([f.aliasOf("activeController.update")],g.prototype,"update",void 0);return g=k([f.subclass("esri.layers.graphics.controllers.AutoController2D")],g)}(f.declared(g,c))})},"esri/Graphic":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./core/lang ./core/JSONSupport ./PopupTemplate ./symbols/support/typeUtils ./symbols/support/jsonUtils ./geometry/support/jsonUtils ./geometry/support/typeUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w){var t=0;return function(b){function g(a,c,d,g){a=b.call(this,a,c,d,g)||this;a.layer=null;Object.defineProperty(a,"uid",{value:t++});return a}l(g,b);h=g;g.prototype.normalizeCtorArgs=function(a,b,c,d){return a&&!a.declaredClass?a:{geometry:a,symbol:b,attributes:c,popupTemplate:d}};Object.defineProperty(g.prototype,"attributes",{set:function(a){var b=this._get("attributes");b!==a&&(this._set("attributes",a),this._notifyLayer("attributes",b,a))},enumerable:!0,configurable:!0});
Object.defineProperty(g.prototype,"geometry",{set:function(a){var b=this._get("geometry");b!==a&&(this._set("geometry",a),this._notifyLayer("geometry",b,a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"popupTemplate",{get:function(){return this.get("layer.popupTemplate")||null},set:function(a){void 0===a?this._clearOverride("popupTemplate"):this._override("popupTemplate",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"symbol",{set:function(a){var b=this._get("symbol");
b!==a&&(this._set("symbol",a),this._notifyLayer("symbol",b,a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"visible",{set:function(a){var b=this._get("visible");b!==a&&(this._set("visible",a),this._notifyLayer("visible",b,a))},enumerable:!0,configurable:!0});g.prototype.getAttribute=function(a){return this.attributes&&this.attributes[a]};g.prototype.setAttribute=function(a,b){if(this.attributes){var c=this.getAttribute(a);this.attributes[a]=b;this._notifyLayer("attributes",
c,b,a)}else this.attributes=(c={},c[a]=b,c),this._notifyLayer("attributes",void 0,b,a)};g.prototype.toJSON=function(){return{geometry:this.geometry&&this.geometry.toJSON(),symbol:this.symbol&&this.symbol.toJSON(),attributes:n.mixin({},this.attributes),popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}};g.prototype.clone=function(){return new h({attributes:m.clone(this.attributes),geometry:this.geometry&&this.geometry.clone()||null,popupTemplate:this.popupTemplate&&this.popupTemplate.clone(),
symbol:this.symbol&&this.symbol.clone()||null,visible:this.visible})};g.prototype._notifyLayer=function(a,b,c,d){this.layer&&(a={graphic:this,property:a,oldValue:b,newValue:c},d&&(a.attributeName=d),this.layer.graphicChanged(a))};k([f.property({value:null})],g.prototype,"attributes",null);k([f.property({value:null,types:w.types,json:{read:r.fromJSON}})],g.prototype,"geometry",null);k([f.property()],g.prototype,"layer",void 0);k([f.property({dependsOn:["layer.popupTemplate"],type:d})],g.prototype,
"popupTemplate",null);k([f.property({value:null,types:a.types,json:{read:c.read}})],g.prototype,"symbol",null);k([f.property({value:!0,set:function(a){}})],g.prototype,"visible",null);return g=h=k([f.subclass("esri.Graphic")],g);var h}(f.declared(g))})},"esri/PopupTemplate":function(){define(["./core/JSONSupport","./core/kebabDictionary","./core/Collection","./core/lang","./support/Action"],function(b,h,l,k,f){var n=h({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),m=h({shortDate:"short-date",
shortDateLE:"short-date-le",longDate:"long-date",dayShortMonthYear:"day-short-month-year",longMonthDayYear:"long-month-day-year",shortDateLongTime:"short-date-long-time",shortDateLELongTime:"short-date-le-long-time",shortDateShortTime:"short-date-short-time",shortDateLEShortTime:"short-date-le-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLongTime24:"short-date-long-time-24",shortDateLELongTime24:"short-date-le-long-time-24",
longMonthYear:"long-month-year",shortMonthYear:"short-month-year"}),g=h({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"}),d=b.createSubclass({properties:{actions:{type:l.ofType(f)},content:{value:null,json:{read:{source:["description","popupElements","mediaInfos","showAttachments"]}}},expressionInfos:{value:null},fieldInfos:{value:null},layerOptions:{value:null},overwriteActions:{value:!1},title:{value:""},relatedRecordsInfo:{value:null}},declaredClass:"esri.PopupTemplate",
actions:null,content:"",expressionInfos:null,fieldInfos:null,_fieldInfosReader:function(a){return this._readFieldInfos(a)},layerOptions:null,_layerOptionsReader:function(a){return a?k.clone(a):a},overwriteActions:!1,title:"",relatedRecordsInfo:null,_relatedRecordsInfoReader:function(a){return a?k.clone(a):a},_dateFormatKebabDict:m,clone:function(){var a=this.actions;a&&(a=k.clone(a.toArray()));return new d({actions:a||[],content:Array.isArray(this.content)?k.clone(this.content):this.content,fieldInfos:this.fieldInfos?
k.clone(this.fieldInfos):null,layerOptions:this.layerOptions?k.clone(this.layerOptions):null,overwriteActions:this.overwriteActions,relatedRecordsInfo:this.relatedRecordsInfo?k.clone(this.relatedRecordsInfo):null,title:this.title})},toJSON:function(){var a={showAttachments:!1,title:this.title};this.expressionInfos&&(a.expressionInfos=k.clone(this.expressionInfos));this.fieldInfos&&(a.fieldInfos=this._writeFieldInfos(k.clone(this.fieldInfos)));this.layerOptions&&(a.layerOptions=k.clone(this.layerOptions));
this.relatedRecordsInfo&&(a.relatedRecordsInfo=k.clone(this.relatedRecordsInfo));var b=this.content;"string"===typeof b?a.description=b:Array.isArray(b)&&(a.popupElements=k.clone(b),a.popupElements.forEach(function(b){"attachments"!==b.type||a.showAttachments?"media"!==b.type||a.mediaInfos?"text"!==b.type||a.description?"fields"!==b.type||a.fieldInfos||(b.fieldInfos&&(a.fieldInfos=this._writeFieldInfos(k.clone(b.fieldInfos))),delete b.fieldInfos):(b.text&&(a.description=b.text),delete b.text):(b.mediaInfos&&
(a.mediaInfos=k.clone(b.mediaInfos),a.mediaInfos.forEach(function(a){a.type=g.toJSON(a.type)})),delete b.mediaInfos):a.showAttachments=!0;return b}.bind(this)));return a},_contentReader:function(a,b){a=b.description;var c=[],d=b.popupElements;d&&d.length?c=d.map(function(a){"text"!==a.type||a.text?"media"===a.type&&(a.mediaInfos||b.mediaInfos)&&(a.mediaInfos||(a.mediaInfos=b.mediaInfos),a.mediaInfos=this._readMediaInfos(a.mediaInfos)):a.text=b.description;return a}.bind(this)):(b.description?c.push({type:"text",
text:b.description}):c.push({type:"fields"}),b.mediaInfos&&b.mediaInfos.length&&c.push({type:"media",mediaInfos:this._readMediaInfos(b.mediaInfos)}),b.showAttachments&&c.push({type:"attachments",displayType:"list"}));c.length&&(a=c);return a},_readFieldInfos:function(a){a&&a.forEach(function(a){var b=a.format&&a.format.dateFormat,c=a.stringFieldOption;b&&(a.format.dateFormat=m.fromJSON(b));c&&(a.stringFieldOption=n.fromJSON(c))});return a},_writeFieldInfos:function(a){a.forEach(function(a){var b=
a.format&&a.format.dateFormat,c=a.stringFieldOption;b&&(a.format.dateFormat=m.toJSON(b));c&&(a.stringFieldOption=n.toJSON(c));a.format||delete a.format});return a},_readMediaInfos:function(a){a.forEach(function(a){a.type=g.fromJSON(a.type)});return a}});return d})},"esri/support/Action":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Identifiable ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,
m){return function(b){function d(a){a=b.call(this)||this;a.className="";a.temporary=!1;a.image="";a.id="";a.title="";a.visible=!0;return a}l(d,b);a=d;d.prototype.clone=function(){return new a({className:this.className,image:this.image,id:this.id,title:this.title,visible:this.visible})};k([m.property()],d.prototype,"className",void 0);k([m.property()],d.prototype,"temporary",void 0);k([m.property()],d.prototype,"image",void 0);k([m.property()],d.prototype,"id",void 0);k([m.property()],d.prototype,
"title",void 0);k([m.property()],d.prototype,"visible",void 0);return d=a=k([m.subclass("esri.support.Action")],d);var a}(m.declared(f,n))})},"esri/symbols/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Symbol ../PictureFillSymbol ../PictureMarkerSymbol ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../TextSymbol ../WebStyleSymbol ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PointSymbol3D ../PolygonSymbol3D".split(" "),function(b,
h,l,k,f,n,m,g,d,a,c,r,w,t,x,v){Object.defineProperty(h,"__esModule",{value:!0});h.types={base:k,key:"type",typeMap:{"simple-fill":m,"picture-fill":f,"picture-marker":n,"simple-line":g,"simple-marker":d,text:a,"label-3d":r,"line-3d":w,"mesh-3d":t,"point-3d":x,"polygon-3d":v,"web-style":c}};h.ensureType=l.ensureOneOfType(h.types)})},"esri/symbols/Symbol":function(){define(["../core/lang","../core/kebabDictionary","../core/JSONSupport","../Color"],function(b,h,l,k){var f=h({esriSMS:"simple-marker",esriPMS:"picture-marker",
esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d"}),n=0;return l.createSubclass({declaredClass:"esri.symbols.Symbol",constructor:function(){this.id="sym"+n++},properties:{type:{type:String,value:null,json:{read:f.fromJSON,write:{ignoreOrigin:!0,writer:function(b,g){g.type=f.toJSON(this.type)}}}},color:{type:k,value:new k([0,
0,0,1]),json:{read:function(f){return f&&b.isDefined(f[0])?[f[0],f[1],f[2],f[3]/255]:f},write:!0}}}})})},"esri/Color":function(){define(["./core/declare","dojo/colors"],function(b,h){var l=b([h],{declaredClass:"esri.Color",toJSON:function(){return[this.r,this.g,this.b,1<this.a?this.a:Math.round(255*this.a)]},clone:function(){return new l(this.toRgba())}});l.toJSON=function(b){return b&&[b.r,b.g,b.b,1<b.a?b.a:Math.round(255*b.a)]};l.fromJSON=function(b){return b&&new l([b[0],b[1],b[2],b[3]/255])};
l.toUnitRGB=function(b){return[b.r/255,b.g/255,b.b/255]};l.toUnitRGBA=function(b){return[b.r/255,b.g/255,b.b/255,null!=b.a?b.a:1]};var k="named blendColors fromRgb fromHex fromArray fromString".split(" ");for(b=0;b<k.length;b++)l[k[b]]=h[k[b]];l.named.rebeccapurple=[102,51,153];return l})},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(b,h,l,k){var f={};h.setObject("dojo.colors",f);var n=function(b,d,a){0>a&&++a;1<a&&--a;var c=6*a;return 1>
c?b+(d-b)*c:1>2*a?d:2>3*a?b+(d-b)*(2/3-a)*6:b};b.colorFromRgb=l.fromRgb=function(b,d){var a=b.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(a){b=a[2].split(/\s*,\s*/);var c=b.length,a=a[1];if("rgb"==a&&3==c||"rgba"==a&&4==c)return a=b[0],"%"==a.charAt(a.length-1)?(a=k.map(b,function(a){return 2.56*parseFloat(a)}),4==c&&(a[3]=b[3]),l.fromArray(a,d)):l.fromArray(b,d);if("hsl"==a&&3==c||"hsla"==a&&4==c){var a=(parseFloat(b[0])%360+360)%360/360,g=parseFloat(b[1])/100,f=parseFloat(b[2])/
100,g=.5>=f?f*(g+1):f+g-f*g,f=2*f-g,a=[256*n(f,g,a+1/3),256*n(f,g,a),256*n(f,g,a-1/3),1];4==c&&(a[3]=b[3]);return l.fromArray(a,d)}}return null};var m=function(b,d,a){b=Number(b);return isNaN(b)?a:b<d?d:b>a?a:b};l.prototype.sanitize=function(){this.r=Math.round(m(this.r,0,255));this.g=Math.round(m(this.g,0,255));this.b=Math.round(m(this.b,0,255));this.a=m(this.a,0,1);return this};f.makeGrey=l.makeGrey=function(b,d){return l.fromArray([b,b,b,d])};h.mixin(l.named,{aliceblue:[240,248,255],antiquewhite:[250,
235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,
183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,
220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,
211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,
209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],
rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,
205,50]});return l})},"esri/symbols/PictureFillSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./FillSymbol ./support/urlUtils".split(" "),function(b,h,l,k,f,n){var m={xscale:1,yscale:1,xoffset:0,yoffset:0,width:12,height:12},g=b(f,{declaredClass:"esri.symbols.PictureFillSymbol",properties:{type:"picture-fill",url:n.urlPropertyDefinition,xscale:{value:1,json:{write:!0}},yscale:{value:1,json:{write:!0}},width:{value:12,cast:k.toPt,json:{write:!0}},height:{value:12,
cast:k.toPt,json:{write:!0}},xoffset:{value:0,cast:k.toPt,json:{write:!0}},yoffset:{value:0,cast:k.toPt,json:{write:!0}},source:n.sourcePropertyDefinition},getDefaults:function(){return h.mixin(this.inherited(arguments),m)},normalizeCtorArgs:function(b,a,c,g){if(b&&"string"!==typeof b&&null==b.imageData)return b;var d={};b&&(d.url=b);a&&(d.outline=a);null!=c&&(d.width=k.toPt(c));null!=g&&(d.height=k.toPt(g));return d},clone:function(){var b=new g({color:l.clone(this.color),height:this.height,outline:this.outline&&
this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});b._set("source",l.clone(this.source));return b}});g.defaultProps=m;return g})},"esri/core/screenUtils":function(){define(["require","exports"],function(b,h){function l(b){return b?72*b/h.DPI:0}Object.defineProperty(h,"__esModule",{value:!0});var k=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;h.DPI=96;h.pt2px=function(b){return b?b/72*h.DPI:0};h.px2pt=l;h.toPt=function(b){if("string"===
typeof b){if(k.test(b)){var f=b.match(k),h=Number(f[1]),f=f[3]&&f[3].toLowerCase();b="-"===b.charAt(0);h="px"===f?l(h):h;return b?-h:h}console.warn("screenUtils.toPt: input not recognized!");return null}return b}})},"esri/symbols/FillSymbol":function(){define(["dojo/_base/lang","./Symbol","./SimpleLineSymbol"],function(b,h,l){return h.createSubclass({declaredClass:"esri.symbols.FillSymbol",properties:{outline:{type:l,json:{write:!0}},type:null},read:function f(h,m){return this.getInherited(f,arguments).call(this,
b.mixin({outline:null},h),m)}})})},"esri/symbols/SimpleLineSymbol":function(){define(["../core/declare","dojo/_base/lang","../core/lang","../core/screenUtils","./LineSymbol"],function(b,h,l,k,f){var n={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dash-dot",STYLE_DASHDOTDOT:"long-dash-dot-dot",STYLE_NULL:"none",STYLE_SHORTDASH:"short-dash",STYLE_SHORTDOT:"short-dot",STYLE_SHORTDASHDOT:"short-dash-dot",STYLE_SHORTDASHDOTDOT:"short-dash-dot-dot",STYLE_LONGDASH:"long-dash",STYLE_LONGDASHDOT:"long-dash-dot",
CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"},m={color:[0,0,0,1],style:n.STYLE_SOLID,width:.75,cap:n.CAP_BUTT,join:n.JOIN_MITER,miterLimit:7.5},g=b(f,{declaredClass:"esri.symbols.SimpleLineSymbol",properties:{type:"simple-line",style:{value:n.STYLE_SOLID,json:{read:function(b,a){return l.valueOf(this._jsonStyles,b)||void 0},write:function(b,a){a.style=this._jsonStyles[b]}}},cap:{value:n.CAP_BUTT,json:{read:!1,write:!1}},join:{value:n.JOIN_MITER,
json:{read:!1,write:!1}},miterLimit:{value:7.5,cast:k.toPt,json:{read:!1,write:!1}}},_jsonStyles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot","dash-dot":"esriSLSDashDot","long-dash-dot-dot":"esriSLSDashDotDot",none:"esriSLSNull","inside-frame":"esriSLSInsideFrame","short-dash":"esriSLSShortDash","short-dot":"esriSLSShortDot","short-dash-dot":"esriSLSShortDashDot","short-dash-dot-dot":"esriSLSShortDashDotDot","long-dash":"esriSLSLongDash","long-dash-dot":"esriSLSLongDashDot"},getDefaults:function(){return h.mixin(this.inherited(arguments),
m)},normalizeCtorArgs:function(b,a,c,g,f,h){if(b&&"string"!==typeof b)return b;var d={};null!=b&&(d.style=b);null!=a&&(d.color=a);null!=c&&(d.width=k.toPt(c));null!=g&&(d.cap=g);null!=f&&(d.join=f);null!=h&&(d.miterLimit=k.toPt(h));return d},clone:function(){return new g({color:l.clone(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit})}});h.mixin(g,n);g.defaultProps=m;return g})},"esri/symbols/LineSymbol":function(){define(["../core/declare","../core/screenUtils",
"./Symbol"],function(b,h,l){return b(l,{declaredClass:"esri.symbols.LineSymbol",properties:{color:{},type:"simple-line",width:{value:.75,cast:h.toPt,json:{write:!0}}}})})},"esri/symbols/support/urlUtils":function(){define(["require","exports","../../core/urlUtils"],function(b,h,l){function k(b,d,a){return d.imageData?l.makeData({mediaType:d.contentType||"image/png",isBase64:!0,data:d.imageData}):f(d.url,a)}function f(b,d){return!d||"service"!==d.origin&&"portal-item"!==d.origin||!d.layer||"feature"!==
d.layer.type&&"stream"!==d.layer.type||l.isAbsolute(b)||!d.layer.parsedUrl?l.read(b,d):l.join(d.layer.parsedUrl.path,"images",b)}function n(b,d,a,c){l.isDataProtocol(b)?(b=l.dataComponents(b),d.contentType=b.mediaType,d.imageData=b.data,a&&a.imageData===d.imageData&&a.url&&(d.url=m(a.url,c))):d.url=m(b,c)}function m(b,d){return l.write(b,d)}Object.defineProperty(h,"__esModule",{value:!0});h.readImageDataOrUrl=k;h.read=f;h.writeImageDataAndUrl=n;h.write=m;h.urlPropertyDefinition={json:{read:{source:["imageData",
"url"],reader:k},write:{writer:function(b,d,a,c){n(b,d,this.source,c)}}}};h.sourcePropertyDefinition={readOnly:!0,json:{read:{source:["imageData","url"],reader:function(b,d,a){b={};d.imageData&&(b.imageData=d.imageData);d.contentType&&(b.contentType=d.contentType);d.url&&(b.url=f(d.url,a));return b}}}}})},"esri/symbols/PictureMarkerSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./MarkerSymbol ./support/urlUtils".split(" "),function(b,h,l,k,f,n){var m={width:12,
height:12,angle:0,xoffset:0,yoffset:0},g=b(f,{declaredClass:"esri.symbols.PictureMarkerSymbol",properties:{color:{json:{write:!1}},type:"picture-marker",url:n.urlPropertyDefinition,source:n.sourcePropertyDefinition,height:{json:{read:{source:["height","size"],reader:function(b,a){return a.size||b}},write:!0},cast:k.toPt},width:{json:{read:{source:["width","size"],reader:function(b,a){return a.size||b}},write:!0},cast:k.toPt},size:{json:{write:!1}}},getDefaults:function(){return h.mixin(this.inherited(arguments),
m)},normalizeCtorArgs:function(b,a,c){if(b&&"string"!==typeof b&&null==b.imageData)return b;var d={};b&&(d.url=b);null!=a&&(d.width=k.toPt(a));null!=c&&(d.height=k.toPt(c));return d},clone:function(){var b=new g({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});b._set("source",l.clone(this.source));return b}});g.defaultProps=m;return g})},"esri/symbols/MarkerSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],
function(b,h,l){return b(l,{declaredClass:"esri.symbols.MarkerSymbol",properties:{angle:{value:0,json:{read:function(b){return b&&-1*b},write:function(b,f){f.angle=b&&-1*b}}},type:{},xoffset:{value:0,cast:h.toPt,json:{write:!0}},yoffset:{value:0,cast:h.toPt,json:{write:!0}},size:{value:9,cast:function(b){return"auto"===b?b:h.toPt(b)},json:{write:!0}}}})})},"esri/symbols/SimpleFillSymbol":function(){define(["../core/declare","dojo/_base/lang","../core/lang","./FillSymbol","./SimpleLineSymbol"],function(b,
h,l,k,f){var n={style:"solid",outline:new f,color:[0,0,0,.25]},m=b(k,{declaredClass:"esri.symbols.SimpleFillSymbol",properties:{color:{},type:"simple-fill",style:{value:"solid",type:String,json:{read:function(b){return l.valueOf(this._styles,b)||void 0},write:function(b,d){d.style=this._styles[b]}}}},_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical","forward-diagonal":"esriSFSForwardDiagonal","backward-diagonal":"esriSFSBackwardDiagonal",cross:"esriSFSCross",
"diagonal-cross":"esriSFSDiagonalCross"},getDefaults:function(){return h.mixin(this.inherited(arguments),n)},normalizeCtorArgs:function(b,d,a){if(b&&"string"!==typeof b)return b;var c={};b&&(c.style=b);d&&(c.outline=d);a&&(c.color=a);return c},clone:function(){return new m({color:l.clone(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}});h.mixin(m,{STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forward-diagonal",
STYLE_BACKWARD_DIAGONAL:"backward-diagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonal-cross"});m.defaultProps=n;return m})},"esri/symbols/SimpleMarkerSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./MarkerSymbol ./SimpleLineSymbol".split(" "),function(b,h,l,k,f,n){var m={style:"circle",color:[255,255,255,.25],outline:new n,size:12,angle:0,xoffset:0,yoffset:0},g=b(f,{declaredClass:"esri.symbols.SimpleMarkerSymbol",properties:{color:{json:{write:function(b,
a){b&&"x"!==this.style&&"cross"!==this.style&&(a.color=b.toJSON())}}},type:"simple-marker",size:{value:12},style:{type:String,value:"circle",json:{read:function(b){return l.valueOf(this._styles,b)},write:function(b,a){a.style=this._styles[b]}}},path:{type:String,value:null,set:function(b){this.style="path";this._set("path",b)},json:{write:!0}},outline:{type:n,json:{write:!0}}},_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond",path:"esriSMSPath"},
getDefaults:function(){return h.mixin(this.inherited(arguments),m)},normalizeCtorArgs:function(b,a,c,g){if(b&&"string"!==typeof b)return b;var d={};b&&(d.style=b);null!=a&&(d.size=k.toPt(a));c&&(d.outline=c);g&&(d.color=g);return d},clone:function(){return new g({angle:this.angle,color:l.clone(this.color),outline:this.outline&&this.outline.clone(),size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})},read:function a(b,g){return this.getInherited(a,arguments).call(this,h.mixin({outline:null},
b),g)}});h.mixin(g,{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_PATH:"path",STYLE_TARGET:"target"});g.defaultProps=m;return g})},"esri/symbols/TextSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ../Color ./Symbol ./Font".split(" "),function(b,h,l,k,f,n,m){var g={text:"",rotated:!1,kerning:!0,color:[0,0,0,1],font:{},angle:0,xoffset:0,yoffset:0,horizontalAlignment:"center"},d=b(n,{declaredClass:"esri.symbols.TextSymbol",
properties:{backgroundColor:{type:f,json:{write:!0}},borderLineColor:{type:f,json:{write:!0}},borderLineSize:{type:Number,json:{write:!0}},color:{},font:{type:m,json:{write:!0}},horizontalAlignment:{value:"center",json:{write:!0}},kerning:{value:!0,json:{write:!0}},haloColor:{type:f,json:{write:!0}},haloSize:{type:Number,cast:k.toPt,json:{write:!0}},rightToLeft:{json:{write:!0}},rotated:{value:!1,json:{write:!0}},text:{type:String,json:{write:!0}},type:"text",verticalAlignment:{type:String,json:{write:!0}},
xoffset:{value:0,type:Number,cast:k.toPt,json:{write:!0}},yoffset:{value:0,type:Number,cast:k.toPt,json:{write:!0}},angle:{type:Number,value:0,json:{read:function(a){return a&&-1*a},write:function(a,b){b.angle=a&&-1*a}}},width:{json:{write:!0}}},getDefaults:function(){return h.mixin(this.inherited(arguments),g)},normalizeCtorArgs:function(a,b,d){if(a&&"string"!==typeof a)return a;var c={};a&&(c.text=a);b&&(c.font=b);d&&(c.color=d);return c},clone:function(){return new d({angle:this.angle,backgroundColor:l.clone(this.backgroundColor),
borderLineColor:l.clone(this.borderLineColor),borderLineSize:this.borderLineSize,color:l.clone(this.color),font:this.font&&this.font.clone(),haloColor:l.clone(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}});h.mixin(d,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",
DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});d.defaultProps=g;return d})},"esri/symbols/Font":function(){define(["dojo/_base/lang","../core/JSONSupport","../core/lang","../core/screenUtils"],function(b,h,l,k){var f={style:"normal",variant:"normal",weight:"normal",size:9,family:"serif",decoration:"none"},n=h.createSubclass({declaredClass:"esri.symbols.Font",properties:{decoration:{},family:{},size:{cast:k.toPt},style:{},
variant:{},weight:{}},getDefaults:function(){return f},normalizeCtorArgs:function(b,g,d,a,c){if(b&&"string"!==typeof b)return b;var f={};null!=b&&(f.size=k.toPt(b));null!=g&&(f.style=g);null!=d&&(f.variant=d);null!=a&&(f.weight=a);c&&(f.family=c);return f},toJSON:function(){return l.fixJson({size:this.size,style:this.style,variant:this.variant,decoration:this.decoration,weight:this.weight,family:this.family})},clone:function(){return new n({decoration:this.decoration,family:this.family,size:this.size,
style:this.style,variant:this.variant,weight:this.weight})}});n.defaultProps=f;b.mixin(n,{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"});return n})},"esri/symbols/WebStyleSymbol":function(){define("require exports ../core/tsSupport/extendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/urlUtils ../core/Logger ../core/requireUtils ./Symbol ../portal/Portal".split(" "),
function(b,h,l,k,f,n,m,g,d,a){var c=m.getLogger("esri.symbols.WebStyleSymbol");return function(d){function h(a){a=d.call(this,a)||this;a.styleName=null;a.portal=null;a.styleUrl=null;a.name=null;a.type="web-style";return a}l(h,d);m=h;h.prototype._readStyleUrl=function(a,b,c){return n.read(a,c)};h.prototype._writeStyleUrl=function(a,b,c,d){b.styleUrl=n.write(a,d);n.isAbsolute(b.styleUrl)&&(b.styleUrl=n.normalize(b.styleUrl))};h.prototype._writeType=function(a,b,c,d){b.type="styleSymbolReference"};h.prototype.read=
function(a,b){this.portal=b?b.portal:void 0;this.inherited(arguments,[a,b]);return this};h.prototype.clone=function(){return new m({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};h.prototype.fetchSymbol=function(){var a=this;return g.when(b,"./support/styleUtils").then(function(b){b=b.resolveWebStyleSymbol(a,{portal:a.portal});b.otherwise(function(a){c.error("#fetchSymbol()","Failed to create symbol from style",a)});return b})};k([f.property({json:{write:!1}})],
h.prototype,"color",void 0);k([f.property({type:String,json:{write:!0}})],h.prototype,"styleName",void 0);k([f.property({type:a,json:{write:!1}})],h.prototype,"portal",void 0);k([f.property({type:String,json:{write:!0}})],h.prototype,"styleUrl",void 0);k([f.reader("styleUrl")],h.prototype,"_readStyleUrl",null);k([f.writer("styleUrl")],h.prototype,"_writeStyleUrl",null);k([f.property({type:String,json:{write:!0}})],h.prototype,"name",void 0);k([f.property({type:String,readOnly:!0,json:{read:!1}})],
h.prototype,"type",void 0);k([f.writer("type")],h.prototype,"_writeType",null);return h=m=k([f.subclass("esri.symbols.WebStyleSymbol")],h);var m}(f.declared(d))})},"esri/symbols/LabelSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3D ./support/Symbol3DVerticalOffset ./callouts/calloutUtils ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m,g,d){return function(a){function b(b){b=a.call(this)||
this;b.verticalOffset=null;b.callout=null;b.type="label-3d";return b}l(b,a);h=b;b.prototype.supportsCallout=function(){return!0};b.prototype.hasVisibleCallout=function(){return g.hasVisibleCallout(this)};b.prototype.hasVisibleVerticalOffset=function(){return g.hasVisibleVerticalOffset(this)};b.prototype.clone=function(){return new h({styleOrigin:f.clone(this.styleOrigin),symbolLayers:f.clone(this.symbolLayers),thumbnail:f.clone(this.thumbnail),callout:f.clone(this.callout),verticalOffset:f.clone(this.verticalOffset)})};
k([d.property({type:m.default,json:{write:!0}})],b.prototype,"verticalOffset",void 0);k([d.property(g.calloutProperty)],b.prototype,"callout",void 0);k([d.property()],b.prototype,"type",void 0);k([d.shared(["text"])],b.prototype,"_allowedLayerTypes",void 0);return b=h=k([d.subclass("esri.symbols.LabelSymbol3D")],b);var h}(d.declared(n))})},"esri/symbols/Symbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Logger ../core/collectionUtils ../core/Warning ../core/urlUtils ./Symbol ./Symbol3DLayer ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./LineSymbol3DLayer ./PathSymbol3DLayer ./FillSymbol3DLayer ./ExtrudeSymbol3DLayer ./TextSymbol3DLayer ./support/Thumbnail ./support/StyleOrigin ../portal/Portal ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q,u,z){var C={icon:r,object:w,line:t,path:x,fill:v,extrude:y,text:p},B=f.ofType({base:c,key:"type",typeMap:C}),F=n.getLogger("esri.symbols.Symbol3D");return function(a){function b(b){b=a.call(this)||this;b.styleOrigin=null;b.thumbnail=null;b.type=null;b._set("symbolLayers",b._createSymbolLayersCollection());return b}l(b,a);Object.defineProperty(b.prototype,"symbolLayers",{set:function(a){var b=this._get("symbolLayers");b?(b.removeAll(),b.addMany(a)):
(b=this._createSymbolLayersCollection(a),this._set("symbolLayers",b))},enumerable:!0,configurable:!0});b.prototype.readSymbolLayers=function(a,b,d){b=this._createSymbolLayersCollection();for(var e=0;e<a.length;e++){var f=a[e],p=c.typeJSONDictionary.read(f.type),k=C[p];k?(f=new k,f.read(a[e],d),b.add(f)):(F.warn("Unknown symbol layer type: "+p),d&&d.messages&&d.messages.push(new g("symbol-layer:unsupported","Symbol layers of type '"+(p||"unknown")+"' are not supported",{definition:f,context:d})))}return b};
b.prototype.readStyleOrigin=function(a,b,c){if(a.styleUrl&&a.name)return b=d.read(a.styleUrl,c),new q({styleUrl:b,name:a.name});if(a.styleName&&a.name)return new q({portal:c&&c.portal||u.getDefault(),styleName:a.styleName,name:a.name});c&&c.messages&&c.messages.push(new g("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:c,definition:a}))};b.prototype.writeStyleOrigin=function(a,b,c,e){a.styleUrl&&a.name?(c=d.write(a.styleUrl,
e),d.isAbsolute(c)&&(c=d.normalize(c)),b.styleOrigin={styleUrl:c,name:a.name}):a.styleName&&a.name&&(a.portal&&e&&e.portal&&!d.hasSamePortal(a.portal.restUrl,e.portal.restUrl)?e&&e.messages&&e.messages.push(new g("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):b.styleOrigin={styleName:a.styleName,name:a.name})};b.prototype.normalizeCtorArgs=function(a){return a instanceof c||a&&C[a.type]?
{symbolLayers:this._createSymbolLayersCollection([a])}:Array.isArray(a)?{symbolLayers:this._createSymbolLayersCollection(a)}:a};b.prototype._createSymbolLayersCollection=function(a){var b=this;a=new B(a);a.on("before-add",function(a){return b._onSymbolLayersBeforeAdd(a)});return a};b.prototype._onSymbolLayersBeforeAdd=function(a){0>this._allowedLayerTypes.indexOf(a.item.type)&&(F.error("Symbol layer of type '"+a.item.type+"' is not allowed for symbol of type '"+this.type+"'"),a.preventDefault())};
k([z.property({json:{write:!1}})],b.prototype,"color",void 0);k([z.property({type:B,json:{write:!0}}),z.cast(m.castForReferenceSetter)],b.prototype,"symbolLayers",null);k([z.reader("symbolLayers")],b.prototype,"readSymbolLayers",null);k([z.property({type:q})],b.prototype,"styleOrigin",void 0);k([z.reader("styleOrigin")],b.prototype,"readStyleOrigin",null);k([z.writer("styleOrigin")],b.prototype,"writeStyleOrigin",null);k([z.property({type:e.default,json:{read:!1}})],b.prototype,"thumbnail",void 0);
k([z.property({type:String,readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0);k([z.shared([])],b.prototype,"_allowedLayerTypes",void 0);return b=k([z.subclass("esri.symbols.Symbol3D")],b)}(z.declared(a))})},"esri/symbols/Symbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/kebabDictionary ./support/Symbol3DMaterial ./support/ElevationInfo ../core/accessorSupport/decorators".split(" "),function(b,
h,l,k,f,n,m,g,d){var a=n({Icon:"icon",Object:"object",Line:"line",Path:"path",Fill:"fill",Extrude:"extrude",Text:"text"});b=function(b){function c(a){a=b.call(this)||this;a.enabled=!0;a.material=null;a.type=null;return a}l(c,b);c.prototype.writeEnabled=function(a,b){a||(b.enabled=a)};k([d.property()],c.prototype,"enabled",void 0);k([d.writer("enabled")],c.prototype,"writeEnabled",null);k([d.property({type:g,json:{read:!1,write:!1}})],c.prototype,"elevationInfo",void 0);k([d.property({type:m.default,
json:{write:!0}})],c.prototype,"material",void 0);k([d.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:a.write}}})],c.prototype,"type",void 0);return c=k([d.subclass("esri.symbols.Symbol3DLayer")],c)}(d.declared(f));(b||(b={})).typeJSONDictionary=a;return b})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m){Object.defineProperty(h,"__esModule",{value:!0});b=function(b){function d(){return null!==b&&b.apply(this,arguments)||this}l(d,b);a=d;d.prototype.clone=function(){return new a({color:this.color?this.color.clone():null,colorMixMode:this.colorMixMode})};k([m.property(n.colorAndTransparencyProperty)],d.prototype,"color",void 0);k([m.property({type:String,json:{read:!0,write:!0}})],d.prototype,"colorMixMode",void 0);return d=a=k([m.subclass("esri.symbols.support.Symbol3DMaterial")],
d);var a}(m.declared(f));h.Symbol3DMaterial=b;h.default=b})},"esri/symbols/support/materialUtils":function(){define(["require","exports","../../Color","../../core/screenUtils"],function(b,h,l,k){function f(a){return Math.max(0,Math.min(Math.round(100*(1-a)),100))}function n(a){return Math.max(0,Math.min(1-a/100,1))}function m(a,b){a=null!=b.transparency?n(b.transparency):1;if((b=b.color)&&Array.isArray(b))return new l([b[0]||0,b[1]||0,b[2]||0,a])}function g(a,b){b.color=[d(a.r),d(a.g),d(a.b)];a=f(a.a);
0!==a&&(b.transparency=a)}function d(a){return Math.max(0,Math.min(Math.round(a),255))}Object.defineProperty(h,"__esModule",{value:!0});h.opacityToTransparency=f;h.transparencyToOpacity=n;h.readColorAndTransparency=m;h.writeColorAndTransparency=g;h.colorAndTransparencyProperty={type:l,json:{read:{source:["color","transparency"],reader:m},write:{writer:g}}};h.screenSizeProperty={type:Number,cast:k.toPt,json:{write:!0}}})},"esri/symbols/support/ElevationInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary".split(" "),
function(b,h,l,k,f,n,m){var g=m({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),d=m({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"}),a=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}l(b,a);c=b;b.prototype.clone=function(){return new c({expression:this.expression})};k([f.property({type:String,json:{write:!0}})],b.prototype,"expression",
void 0);return b=c=k([f.subclass("esri.layers.support.FeatureExpressionInfo")],b);var c}(f.declared(n));return function(b){function c(){return null!==b&&b.apply(this,arguments)||this}l(c,b);h=c;c.prototype.readFeatureExpressionInfo=function(a,b){if(null!=a)return a;if(b.featureExpression&&0===b.featureExpression.value)return{expression:"0"}};c.prototype.writeFeatureExpressionInfo=function(a,b,c,d){b[c]=a.write(null,d);"0"===a.expression&&(b.featureExpression={value:0})};c.prototype.write=function(a,
b){return this.offset||this.mode||this.featureExpressionInfo||this.unit?this.inherited(arguments):null};c.prototype.clone=function(){return new h({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})};k([f.property({type:a,json:{write:!0}})],c.prototype,"featureExpressionInfo",void 0);k([f.reader("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],c.prototype,"readFeatureExpressionInfo",null);
k([f.writer("featureExpressionInfo")],c.prototype,"writeFeatureExpressionInfo",null);k([f.property({type:String,json:{read:g.read,write:g.write}})],c.prototype,"mode",void 0);k([f.property({type:Number,json:{write:!0}})],c.prototype,"offset",void 0);k([f.property({type:String,json:{read:d.read,write:d.write}})],c.prototype,"unit",void 0);return c=h=k([f.subclass("esri.layers.support.ElevationInfo")],c);var h}(f.declared(n))})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ../core/urlUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/Symbol3DOutline ./support/Symbol3DMaterial ./support/Symbol3DResource ./support/materialUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r){var w=f({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right"},{ignoreUnknown:!0}),t=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}l(b,a);c=b;b.prototype.readHref=function(a,b,c){return a?n.read(a,c):b.dataURI};b.prototype.writeHref=function(a,b,c,d){a&&(n.isDataProtocol(a)?b.dataURI=a:(b.href=n.write(a,d),n.isAbsolute(b.href)&&(b.href=
n.normalize(b.href))))};b.prototype.clone=function(){return new c({href:this.href,primitive:this.primitive})};k([m.property({json:{write:!0,read:{source:["href","dataURI"]}}})],b.prototype,"href",void 0);k([m.reader("href")],b.prototype,"readHref",null);k([m.writer("href")],b.prototype,"writeHref",null);return b=c=k([m.subclass("esri.symbols.support.IconSymbol3DLayerResource")],b);var c}(m.declared(c.default));return function(b){function c(a){a=b.call(this)||this;a.material=null;a.resource=null;a.type=
"icon";a.size=void 0;a.anchor=void 0;a.outline=void 0;return a}l(c,b);g=c;c.prototype.clone=function(){return new g({anchor:this.anchor,enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone(),resource:this.resource&&this.resource.clone(),size:this.size})};k([m.property({type:a.default})],c.prototype,"material",void 0);k([m.property({type:t,json:{write:!0}})],c.prototype,"resource",void 0);
k([m.property()],c.prototype,"type",void 0);k([m.property(r.screenSizeProperty)],c.prototype,"size",void 0);k([m.property({type:String,json:{read:w.read,write:w.write}})],c.prototype,"anchor",void 0);k([m.property({type:d.default,json:{write:!0}})],c.prototype,"outline",void 0);return c=g=k([m.subclass("esri.symbols.IconSymbol3DLayer")],c);var g}(m.declared(g))})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../Color ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m,g){Object.defineProperty(h,"__esModule",{value:!0});b=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new n([0,0,0,1]);a.size=1;return a}l(a,b);c=a;a.prototype.clone=function(){return new c({color:this.color?this.color.clone():null,size:this.size})};k([g.property(m.colorAndTransparencyProperty)],a.prototype,"color",void 0);k([g.property(m.screenSizeProperty)],a.prototype,"size",void 0);return a=c=k([g.subclass("esri.symbols.support.Symbol3DOutline")],
a);var c}(g.declared(f));h.Symbol3DOutline=b;h.default=b})},"esri/symbols/support/Symbol3DResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/urlUtils ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m,g){Object.defineProperty(h,"__esModule",{value:!0});var d=m({invertedCone:"inverted-cone"});b=function(a){function b(){return null!==a&&a.apply(this,
arguments)||this}l(b,a);h=b;b.prototype.readHref=function(a,b,c){return f.read(a,c)};b.prototype.writeHref=function(a,b,c,d){a&&(b.href=f.write(a,d),f.isAbsolute(b.href)&&(b.href=f.normalize(b.href)))};b.prototype.readPrimitive=function(a){return d.fromJSON(a)};b.prototype.writePrimitive=function(a,b){b.primitive=d.toJSON(a)};b.prototype.clone=function(){return new h({href:this.href,primitive:this.primitive})};k([g.property({json:{write:!0}})],b.prototype,"href",void 0);k([g.reader("href")],b.prototype,
"readHref",null);k([g.writer("href")],b.prototype,"writeHref",null);k([g.property({json:{write:!0}})],b.prototype,"primitive",void 0);k([g.reader("primitive")],b.prototype,"readPrimitive",null);k([g.writer("primitive")],b.prototype,"writePrimitive",null);return b=h=k([g.subclass("esri.symbols.support.Symbol3DResource")],b);var h}(g.declared(n));h.Symbol3DResource=b;h.default=b})},"esri/symbols/ObjectSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ./Symbol3DLayer ./support/Symbol3DMaterial ./support/Symbol3DResource ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m,g,d){var a=f({center:"center",top:"top",bottom:"bottom",origin:"origin"},{ignoreUnknown:!0});return function(b){function c(a){a=b.call(this)||this;a.material=null;a.resource=null;a.type="object";a.width=void 0;a.height=void 0;a.depth=void 0;a.anchor=void 0;a.heading=void 0;a.tilt=void 0;a.roll=void 0;return a}l(c,b);f=c;c.prototype.clone=function(){return new f({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,depth:this.depth,enabled:this.enabled,elevationInfo:this.elevationInfo&&
this.elevationInfo.clone(),height:this.height,material:this.material&&this.material.clone(),resource:this.resource&&this.resource.clone(),width:this.width})};Object.defineProperty(c.prototype,"isPrimitive",{get:function(){return!this.resource||"string"!==typeof this.resource.href},enumerable:!0,configurable:!0});k([d.property({type:m.default})],c.prototype,"material",void 0);k([d.property({type:g.default,json:{write:!0}})],c.prototype,"resource",void 0);k([d.property()],c.prototype,"type",void 0);
k([d.property({json:{write:!0}})],c.prototype,"width",void 0);k([d.property({json:{write:!0}})],c.prototype,"height",void 0);k([d.property({json:{write:!0}})],c.prototype,"depth",void 0);k([d.property({type:String,json:{read:a.read,write:a.write}})],c.prototype,"anchor",void 0);k([d.property({json:{write:!0}})],c.prototype,"heading",void 0);k([d.property({json:{write:!0}})],c.prototype,"tilt",void 0);k([d.property({json:{write:!0}})],c.prototype,"roll",void 0);k([d.property({readOnly:!0,dependsOn:["resource",
"resource.href"]})],c.prototype,"isPrimitive",null);return c=f=k([d.subclass("esri.symbols.ObjectSymbol3DLayer")],c);var f}(d.declared(n))})},"esri/symbols/LineSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ./support/materialUtils ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.material=null;a.type="line";a.size=1;return a}l(d,b);
a=d;d.prototype.clone=function(){return new a({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};k([m.property()],d.prototype,"material",void 0);k([m.property()],d.prototype,"type",void 0);k([m.property(n.screenSizeProperty)],d.prototype,"size",void 0);return d=a=k([m.subclass("esri.symbols.LineSymbol3DLayer")],d);var a}(m.declared(f))})},"esri/symbols/PathSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n){return function(b){function g(a){a=b.call(this)||this;a.material=null;a.type="path";a.size=void 0;return a}l(g,b);d=g;g.prototype.readSize=function(a,b){return a||b.width||0};g.prototype.clone=function(){return new d({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};k([n.property()],g.prototype,"material",void 0);k([n.property()],g.prototype,"type",void 0);k([n.property({json:{write:!0}})],
g.prototype,"size",void 0);k([n.reader("size",["size","width"])],g.prototype,"readSize",null);return g=d=k([n.subclass("esri.symbols.PathSymbol3DLayer")],g);var d}(n.declared(f))})},"esri/symbols/FillSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ./support/Symbol3DOutline ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.type="fill";
a.material=null;a.outline=null;return a}l(d,b);a=d;d.prototype.clone=function(){return new a({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone()})};k([m.property()],d.prototype,"type",void 0);k([m.property()],d.prototype,"material",void 0);k([m.property({type:n.default,json:{write:!0}})],d.prototype,"outline",void 0);return d=a=k([m.subclass("esri.symbols.FillSymbol3DLayer")],d);
var a}(m.declared(f))})},"esri/symbols/ExtrudeSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n){return function(b){function g(a){a=b.call(this)||this;a.type="extrude";a.size=void 0;a.material=null;return a}l(g,b);d=g;g.prototype.clone=function(){return new d({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&
this.material.clone(),size:this.size})};k([n.property()],g.prototype,"type",void 0);k([n.property({json:{write:!0}})],g.prototype,"size",void 0);k([n.property()],g.prototype,"material",void 0);return g=d=k([n.subclass("esri.symbols.ExtrudeSymbol3DLayer")],g);var d}(n.declared(f))})},"esri/symbols/TextSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3DLayer ./support/Symbol3DHalo ./support/materialUtils ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m,g,d){return function(a){function b(b){b=a.call(this)||this;b.font=null;b.halo=null;b.material=null;b.size=void 0;b.text=void 0;b.type="text";return b}l(b,a);h=b;b.prototype.writeFont=function(a,b){a&&(b.font=f.clone(a))};b.prototype.clone=function(){return new h({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),font:this.font&&f.clone(this.font),halo:this.halo&&f.clone(this.halo),material:this.material&&this.material.clone(),size:this.size,text:this.text})};
k([d.property()],b.prototype,"font",void 0);k([d.writer("font")],b.prototype,"writeFont",null);k([d.property({type:m.default,json:{write:!0}})],b.prototype,"halo",void 0);k([d.property()],b.prototype,"material",void 0);k([d.property(g.screenSizeProperty)],b.prototype,"size",void 0);k([d.property({json:{write:!0}})],b.prototype,"text",void 0);k([d.property()],b.prototype,"type",void 0);return b=h=k([d.subclass("esri.symbols.TextSymbol3DLayer")],b);var h}(d.declared(n))})},"esri/symbols/support/Symbol3DHalo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m,g,d){Object.defineProperty(h,"__esModule",{value:!0});b=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.color=new f([0,0,0,1]);b.size=0;return b}l(b,a);h=b;b.prototype.clone=function(){return new h({color:m.clone(this.color),size:this.size})};k([d.property(g.colorAndTransparencyProperty)],b.prototype,"color",void 0);k([d.property(g.screenSizeProperty)],b.prototype,"size",void 0);return b=h=k([d.subclass("esri.symbols.support.Symbol3DHalo")],b);var h}(d.declared(n));
h.Symbol3DHalo=b;h.default=b})},"esri/symbols/support/Thumbnail":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),function(b,h,l,k,f,n){Object.defineProperty(h,"__esModule",{value:!0});b=function(b){function g(){return null!==b&&b.apply(this,arguments)||this}l(g,b);d=g;g.prototype.clone=function(){return new d({url:this.url})};k([f.property({type:String})],g.prototype,
"url",void 0);return g=d=k([f.subclass("esri.symbols.support.Thumbnail")],g);var d}(f.declared(n));h.Thumbnail=b;h.default=b})},"esri/symbols/support/StyleOrigin":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../portal/Portal".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a.portal=null;return a}l(d,b);a=d;
d.prototype.clone=function(){return new a({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};k([f.property({type:String})],d.prototype,"name",void 0);k([f.property({type:String})],d.prototype,"styleUrl",void 0);k([f.property({type:String})],d.prototype,"styleName",void 0);k([f.property({type:m})],d.prototype,"portal",void 0);return d=a=k([f.subclass("esri.symbols.support.StyleOrigin")],d);var a}(f.declared(n))})},"esri/symbols/support/Symbol3DVerticalOffset":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(b,h,l,k,f,n,m){Object.defineProperty(h,"__esModule",{value:!0});b=function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a.screenLength=0;a.minWorldLength=0;return a}l(d,b);a=d;d.prototype.writeMinWorldLength=function(a,b,d){a&&(b[d]=a)};d.prototype.clone=function(){return new a({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})};k([n.property(m.screenSizeProperty)],d.prototype,"screenLength",void 0);k([n.property({type:Number,
json:{write:!0}})],d.prototype,"minWorldLength",void 0);k([n.writer("minWorldLength")],d.prototype,"writeMinWorldLength",null);k([n.property({type:Number,json:{write:!0}})],d.prototype,"maxWorldLength",void 0);return d=a=k([n.subclass("esri.symbols.support.Symbol3DVerticalOffset")],d);var a}(n.declared(f));h.Symbol3DVerticalOffset=b;h.default=b})},"esri/symbols/callouts/calloutUtils":function(){define(["require","exports","./Callout3D","./LineCallout3D"],function(b,h,l,k){function f(b){if(!b)return!1;
b=b.verticalOffset;return!b||0>=b.screenLength||0>=b.maxWorldLength?!1:!0}function n(b,g,d){if(!b)return b;switch(b.type){case "line":return g=new k,g.read(b,d),g}}Object.defineProperty(h,"__esModule",{value:!0});h.hasVisibleVerticalOffset=f;h.hasVisibleCallout=function(b){if(!b||!b.supportsCallout||!b.supportsCallout())return!1;var g=b.callout;return g&&g.visible?f(b)?!0:!1:!1};h.isCalloutSupport=function(b){return"point-3d"===b.type||"label-3d"===b.type};h.read=n;h.calloutProperty={types:{key:"type",
base:l,typeMap:{line:k}},json:{read:n,write:!0}}})},"esri/symbols/callouts/Callout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.visible=!0;return a}l(d,b);d.prototype.normalizeCtorArgs=function(a){a&&a.type&&(a=f.mixin({},a),delete a.type);return a};d.prototype.clone=
function(){};k([m.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],d.prototype,"type",void 0);k([m.property({readOnly:!0})],d.prototype,"visible",void 0);return d=k([m.subclass("esri.symbols.callouts.Callout3D")],d)}(m.declared(n))})},"esri/symbols/callouts/LineCallout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ./Callout3D ../support/materialUtils ./LineCallout3DBorder".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){return function(b){function d(a){a=b.call(this)||this;a.type="line";a.color=new f([0,0,0,1]);a.size=m.px2pt(1);a.border=null;return a}l(d,b);h=d;Object.defineProperty(d.prototype,"visible",{get:function(){return 0<this.size&&0<this.color.a},enumerable:!0,configurable:!0});d.prototype.clone=function(){return new h({color:n.clone(this.color),size:this.size,border:n.clone(this.border)})};k([g.property({type:String})],d.prototype,"type",void 0);k([g.property(a.colorAndTransparencyProperty)],
d.prototype,"color",void 0);k([g.property(a.screenSizeProperty)],d.prototype,"size",void 0);k([g.property({type:c.default,json:{write:!0}})],d.prototype,"border",void 0);k([g.property({dependsOn:["size","color"],readOnly:!0})],d.prototype,"visible",null);return d=h=k([g.subclass("esri.symbols.callouts.LineCallout3D")],d);var h}(g.declared(d))})},"esri/symbols/callouts/LineCallout3DBorder":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),
function(b,h,l,k,f,n,m,g,d){Object.defineProperty(h,"__esModule",{value:!0});b=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.color=new f("white");return b}l(b,a);h=b;b.prototype.clone=function(){return new h({color:m.clone(this.color)})};k([g.property(d.colorAndTransparencyProperty)],b.prototype,"color",void 0);return b=h=k([g.subclass("esri.symbols.support.LineCallout3DBorder")],b);var h}(g.declared(n));h.LineCallout3DBorder=b;h.default=b})},"esri/symbols/LineSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3D ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.type="line-3d";return a}l(d,b);a=d;d.prototype.clone=function(){return new a({styleOrigin:f.clone(this.styleOrigin),symbolLayers:f.clone(this.symbolLayers),thumbnail:f.clone(this.thumbnail)})};k([m.property()],d.prototype,"type",void 0);k([m.shared(["line","path","text"])],d.prototype,"_allowedLayerTypes",void 0);return d=a=k([m.subclass("esri.symbols.LineSymbol3D")],d);var a}(m.declared(n))})},"esri/symbols/MeshSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3D ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.type="mesh-3d";return a}l(d,b);a=d;d.prototype.clone=function(){return new a({styleOrigin:f.clone(this.styleOrigin),symbolLayers:f.clone(this.symbolLayers),thumbnail:f.clone(this.thumbnail)})};k([m.property()],d.prototype,"type",void 0);k([m.shared(["fill"])],d.prototype,"_allowedLayerTypes",void 0);return d=a=k([m.subclass("esri.symbols.MeshSymbol3D")],d);var a}(m.declared(n))})},"esri/symbols/PointSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3D ./support/Symbol3DVerticalOffset ./callouts/calloutUtils ../core/accessorSupport/decorators".split(" "),
function(b,h,l,k,f,n,m,g,d){return function(a){function b(b){b=a.call(this)||this;b.verticalOffset=null;b.callout=null;b.type="point-3d";return b}l(b,a);h=b;b.prototype.supportsCallout=function(){if(1!==(this.symbolLayers?this.symbolLayers.length:0))return!1;switch(this.symbolLayers.getItemAt(0).type){case "icon":case "text":case "object":return!0}return!1};b.prototype.hasVisibleCallout=function(){return g.hasVisibleCallout(this)};b.prototype.hasVisibleVerticalOffset=function(){return g.hasVisibleVerticalOffset(this)};
b.prototype.clone=function(){return new h({verticalOffset:f.clone(this.verticalOffset),callout:f.clone(this.callout),styleOrigin:f.clone(this.styleOrigin),symbolLayers:f.clone(this.symbolLayers),thumbnail:f.clone(this.thumbnail)})};k([d.property({type:m.default,json:{write:!0}})],b.prototype,"verticalOffset",void 0);k([d.property(g.calloutProperty)],b.prototype,"callout",void 0);k([d.property()],b.prototype,"type",void 0);k([d.shared(["icon","object","text"])],b.prototype,"_allowedLayerTypes",void 0);
return b=h=k([d.subclass("esri.symbols.PointSymbol3D")],b);var h}(d.declared(n))})},"esri/symbols/PolygonSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3D ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this)||this;a.type="polygon-3d";return a}l(d,b);a=d;d.prototype.clone=function(){return new a({styleOrigin:f.clone(this.styleOrigin),symbolLayers:f.clone(this.symbolLayers),
thumbnail:f.clone(this.thumbnail)})};d.fromJSON=function(b){var c=new a;c.read(b);if(2===c.symbolLayers.length&&"fill"===c.symbolLayers.getItemAt(0).type&&"line"===c.symbolLayers.getItemAt(1).type){var d=c.symbolLayers.getItemAt(0),g=c.symbolLayers.getItemAt(1);!g.enabled||b.symbolLayers&&b.symbolLayers[1]&&!1===b.symbolLayers[1].enable||(d.outline={size:g.size,color:g.material.color});c.symbolLayers.removeAt(1)}return c};k([m.property()],d.prototype,"type",void 0);k([m.shared("extrude fill line icon object text".split(" "))],
d.prototype,"_allowedLayerTypes",void 0);return d=a=k([m.subclass("esri.symbols.PolygonSymbol3D")],d);var a}(m.declared(n))})},"esri/symbols/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/Warning ../Symbol3D ../SimpleLineSymbol ../SimpleMarkerSymbol ../PictureMarkerSymbol ../PictureFillSymbol ../SimpleFillSymbol ../TextSymbol ../PointSymbol3D ../LineSymbol3D ../PolygonSymbol3D ../MeshSymbol3D ../LabelSymbol3D ../WebStyleSymbol ../callouts/LineCallout3D ./symbolConversion".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e){Object.defineProperty(h,"__esModule",{value:!0});var q={esriSMS:m,esriPMS:g,esriTS:c,esriSLS:n,esriSFS:a,esriPFS:d,PointSymbol3D:r,LineSymbol3D:w,PolygonSymbol3D:t,MeshSymbol3D:x,LabelSymbol3D:v,styleSymbolReference:y};h.read=function(a,b,c){if(b=a?q[a.type]||null:null)return b=new b,b.read(a,c),b;c&&c.messages&&a&&c.messages.push(new k("symbol:unsupported","Symbols of type '"+(a.type||"unknown")+"' are not supported",{definition:a,context:c}));return null};
h.write=function(a,b,c){if(!a)return null;if(!c||"web-scene"!==c.origin||a.isInstanceOf(f)||a.isInstanceOf(y))return a.write(b,c);var d=e.to3D(a);if(d.symbol)return d.symbol.write(b,c);c.messages&&c.messages.push(new l("symbol:unsupported","Symbols of type '"+a.declaredClass+"' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView",{symbol:a,context:c,error:d.error}));return null};h.fromJSON=function(a,b){var c=a?q[a.type]||null:null;return c?c.fromJSON(a,
b):null};h.readCallout3D=function(a,b){if(!a||!a.type)return null;var c=null;switch(a.type){case "line":c=new p}c&&c.read(a,b);return c}})},"esri/symbols/support/symbolConversion":function(){define("require exports dojo/_base/lang ../../core/lang ../../core/Error ../Font ../SimpleLineSymbol ../SimpleMarkerSymbol ../PictureMarkerSymbol ../SimpleFillSymbol ../TextSymbol ../WebStyleSymbol ../Symbol3D ../LineSymbol3D ../PointSymbol3D ../PolygonSymbol3D ../LabelSymbol3D ../LineSymbol3DLayer ../IconSymbol3DLayer ../FillSymbol3DLayer ../TextSymbol3DLayer ../../Color".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q,u,z){function C(a){var b=a.color?a.color.clone():new z([255,255,255]),c,g,f;a instanceof d?(a.color&&0===a.color.r&&0===a.color.g&&0===a.color.b&&(b=new z([255,255,255])),c={href:a.url},g=a.width<=a.height?a.height:a.width):(c=a.style,c in B?c=B[c]:(console.log(c+' cannot be mapped to Icon symbol. Fallback to "circle"'),c="circle"),c={primitive:c},g=a.size,a.outline&&a.outline.color&&0<a.outline.width&&(f={size:a.outline.width,color:a.outline.color.clone()}));
return new x(new e({size:g,resource:c,material:{color:b},outline:f}))}Object.defineProperty(h,"__esModule",{value:!0});var B={};B[g.STYLE_CIRCLE]="circle";B[g.STYLE_CROSS]="cross";B[g.STYLE_DIAMOND]="kite";B[g.STYLE_SQUARE]="square";B[g.STYLE_X]="x";h.to3D=function(b,e,h,z){void 0===e&&(e=!1);void 0===h&&(h=!1);void 0===z&&(z=!0);if(!b)return{symbol:null};if(b instanceof w||b instanceof r)z=b.clone();else if(b instanceof m)z=new t(new p({size:b.width||1,material:{color:b.color?b.color.clone():[255,
255,255]}}));else if(b instanceof g)z=C(b);else if(b instanceof d)z=C(b);else if(b instanceof a)z=new q({material:{color:b.color?b.color.clone():[255,255,255]}}),b.outline&&b.outline.color&&(z.outline={size:b.outline.width||0,color:b.outline.color}),z=new v(z);else if(b instanceof c){var F=l.clone(n.defaultProps);b.font&&l.mixin(F,b.font);var B;B=b.haloColor;var D=b.haloSize;B=B&&0<D?{color:k.clone(B),size:D}:null;z=new (z?y:x)(new u({size:F.size,font:{family:F.family,weight:F.weight,style:F.style},
halo:B,material:{color:b.color.clone()},text:b.text}))}else return{error:new f("symbol-conversion:unsupported-2d-symbol","2D symbol of type '"+(b.type||b.declaredClass)+"' is unsupported in 3D",{symbol:b})};e&&(z.id=b.id);if(h&&z.isInstanceOf(w))for(b=0;b<z.symbolLayers.length;++b)z.symbolLayers.getItemAt(b)._ignoreDrivers=!0;return{symbol:z}}})},"esri/tasks/QueryTask":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators dojo/_base/lang ../request ./Task ./support/FeatureSet ./support/Query ../geometry/Extent ../geometry/support/normalizeUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w){return function(b){function d(a){a=b.call(this,a)||this;a.gdbVersion=null;a.source=null;return a}l(d,b);d.prototype.execute=function(a,b){var c=this;return w.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(m.mixin({},c.parsedUrl.query,{f:"json"},a.toJSON({geometry:d&&d[0]})));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};
if(c.requestOptions||b)d=m.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",d)}).then(function(b){return a.returnJSON?b.data:c._handleExecuteResponse(b)})};d.prototype.executeRelationshipQuery=function(a,b){a=this._encode(m.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);a={query:a,callbackParamName:"callback"};if(this.requestOptions||b)a=m.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/queryRelatedRecords",a).then(this._handleExecuteRelationshipQueryResponse)};
d.prototype.executeForIds=function(a,b){var c=this;return w.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(m.mixin({},c.parsedUrl.query,{f:"json",returnIdsOnly:!0},a.toJSON({geometry:d&&d[0]})));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=m.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",d)}).then(this._handleExecuteForIdsResponse)};
d.prototype.executeForCount=function(a,b){var c=this;return w.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(m.mixin({},c.parsedUrl.query,{f:"json",returnIdsOnly:!0,returnCountOnly:!0},a.toJSON({geometry:d&&d[0]})));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=m.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",d)}).then(this._handleExecuteForCountResponse)};
d.prototype.executeForExtent=function(a,b){var c=this;return w.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(m.mixin({},c.parsedUrl.query,{f:"json",returnExtentOnly:!0,returnCountOnly:!0},a.toJSON({geometry:d&&d[0]})));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=m.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",
d)}).then(this._handleExecuteForExtentResponse)};d.prototype._handleExecuteResponse=function(b){return a.fromJSON(b.data)};d.prototype._handleExecuteRelationshipQueryResponse=function(b){b=b.data;var c=b.geometryType,d=b.spatialReference,e={};b.relatedRecordGroups.forEach(function(b){var g=a.fromJSON({geometryType:c,spatialReference:d,features:b.relatedRecords});if(null!=b.objectId)e[b.objectId]=g;else for(var f in b)b.hasOwnProperty(f)&&"relatedRecords"!==f&&(e[b[f]]=g)});return e};d.prototype._handleExecuteForIdsResponse=
function(a){return a.data.objectIds};d.prototype._handleExecuteForCountResponse=function(a){a=a.data;var b=a.features,c=a.objectIds;if(c)a=c.length;else{if(b)throw Error("Unable to perform query. Please check your parameters.");a=a.count}return a};d.prototype._handleExecuteForExtentResponse=function(a){a=a.data;if(a.hasOwnProperty("extent"))a.extent=r.fromJSON(a.extent);else{if(a.features)throw Error("Layer does not support extent calculation.");if(a.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");
}return a};k([n.property()],d.prototype,"gdbVersion",void 0);k([n.property()],d.prototype,"source",void 0);k([f(0,n.cast(c))],d.prototype,"execute",null);k([f(0,n.cast(c))],d.prototype,"executeForIds",null);k([f(0,n.cast(c))],d.prototype,"executeForCount",null);k([f(0,n.cast(c))],d.prototype,"executeForExtent",null);return d=k([n.subclass("esri.tasks.QueryTask")],d)}(n.declared(d))})},"esri/tasks/Task":function(){define(["dojo/_base/lang","../core/Accessor","../core/urlUtils"],function(b,h,l){return h.createSubclass({declaredClass:"esri.tasks.Task",
normalizeCtorArgs:function(k,f){if("string"!==typeof k)return k;var h={};k&&(h.url=k);f&&b.mixin(h,f);return h},properties:{normalization:{value:!0},parsedUrl:{value:null,readOnly:!0,dependsOn:["url"],get:function(){return this._parseUrl(this.url)}},requestOptions:{value:null},url:{value:null,type:String}},_parseUrl:function(b){return b?l.urlToObject(b):null},_useSSL:function(){var b=this.parsedUrl,f=/^http:/i;this.url&&this.set("url",this.url.replace(f,"https:"));b&&b.path&&(b.path=b.path.replace(f,
"https:"))},_encode:function(h,f,n){var k,g,d={},a,c;for(a in h)if("declaredClass"!==a&&(k=h[a],g=typeof k,null!==k&&void 0!==k&&"function"!==g))if(b.isArray(k))for(d[a]=[],c=k.length,g=0;g<c;g++)d[a][g]=this._encode(k[g]);else"object"===g?k.toJSON&&(g=k.toJSON(n&&n[a]),"esri.tasks.support.FeatureSet"===k.declaredClass&&g.spatialReference&&(g.sr=g.spatialReference,delete g.spatialReference),d[a]=f?g:JSON.stringify(g)):d[a]=k;return d}})})},"esri/tasks/support/FeatureSet":function(){define("../../core/kebabDictionary ../../core/JSONSupport ../../core/lang ../../Graphic ../../layers/support/Field ../../geometry/SpatialReference ../../geometry/support/graphicsUtils ../../geometry/support/jsonUtils dojo/_base/lang".split(" "),
function(b,h,l,k,f,n,m,g,d){b=b({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent"});return h.createSubclass({declaredClass:"esri.tasks.support.FeatureSet",getDefaults:function(){return d.mixin(this.inherited(arguments),{features:[]})},properties:{displayFieldName:null,exceededTransferLimit:null,features:{value:null,json:{read:function(a,b){var c=n.fromJSON(b.spatialReference);a=a.map(function(a){var b=
k.fromJSON(a);a=a.geometry&&a.geometry.spatialReference;b.geometry&&!a&&(b.geometry.spatialReference=c);return b});b.transform&&this._hydrate(b.transform,b.geometryType,a);return a}}},fields:{value:null,type:[f]},geometryType:{value:null,json:{read:b.fromJSON}},spatialReference:{type:n}},toJSON:function(a){var b={hasZ:this.hasZ,hasM:this.hasM};this.displayFieldName&&(b.displayFieldName=this.displayFieldName);this.fields&&(b.fields=this.fields.map(function(a){return a.toJSON()}));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=g.getJsonType(this.features[0].geometry)),b.features=m._encodeGraphics(this.features,a));b.exceededTransferLimit=this.exceededTransferLimit;b.transform=this.transform;return l.fixJson(b)},quantize:function(a){var b=a.translate[0],d=a.translate[1],g=a.scale[0],f=a.scale[1],
h=this.features,k=function(a,b,c){var d,e,g,f,p,h,k=[];d=0;for(e=a.length;d<e;d++)if(g=a[d],0<d){if(h=b(g[0]),g=c(g[1]),h!==f||g!==p)k.push([h-f,g-p]),f=h,p=g}else f=b(g[0]),p=c(g[1]),k.push([f,p]);return 0<k.length?k:null},m=function(a,b,c){if("point"===a)return function(a){a.x=b(a.x);a.y=c(a.y);return a};if("polyline"===a||"polygon"===a)return function(a){var d,e,g,f,p;g=a.rings||a.paths;p=[];d=0;for(e=g.length;d<e;d++)f=g[d],(f=k(f,b,c))&&p.push(f);return 0<p.length?(a.rings?a.rings=p:a.paths=
p,a):null};if("multipoint"===a)return function(a){var d;d=k(a.points,b,c);return 0<d.length?(a.points=d,a):null};if("extent"===a)return function(a){return a}}(this.geometryType,function(a){return Math.round((a-b)/g)},function(a){return Math.round((d-a)/f)}),p,e;p=0;for(e=h.length;p<e;p++)m(h[p].geometry)||(h.splice(p,1),p--,e--);this.transform=a;return this},_hydrate:function(a,b,d){if(a){var c=a.translate[0],g=a.translate[1],f=a.scale[0],h=a.scale[1],k=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=
b(a.x);a.y=c(a.y)};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){a=a.rings||a.paths;var d,e,g,f,p,h,k,q;d=0;for(e=a.length;d<e;d++)for(p=a[d],g=0,f=p.length;g<f;g++)h=p[g],0<g?(k+=h[0],q+=h[1]):(k=h[0],q=h[1]),h[0]=b(k),h[1]=c(q)};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,e,g,f,p;d=0;for(e=a.length;d<e;d++)g=a[d],0<d?(f+=g[0],
p+=g[1]):(f=g[0],p=g[1]),g[0]=b(f),g[1]=c(p)}}(b,function(a){return a*f+c},function(a){return g-a*h});a=0;for(b=d.length;a<b;a++)d[a].geometry&&k(d[a].geometry)}}})})},"esri/layers/support/Field":function(){define(["../../core/kebabDictionary","../../core/JSONSupport","./CodedValueDomain","./RangeDomain"],function(b,h,l,k){var f=b({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",
esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"}),n=h.createSubclass({declaredClass:"esri.layers.support.Field",properties:{alias:null,domain:{value:null,json:{read:function(b,g){g=b&&b.type;return"range"===g?new k(b):"codedValue"===g?new l(b):null}}},editable:!1,length:-1,name:null,nullable:!0,type:{json:{read:f.fromJSON}}},clone:function(){return n.fromJSON(this.toJSON())},
toJSON:function(){return{alias:this.alias,domain:this.domain&&this.domain.toJSON(),editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:f.toJSON(this.type)}}});return n})},"esri/layers/support/CodedValueDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain ../../core/lang".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(a){a=b.call(this,
a)||this;a.codedValues=null;a.type="coded-value";return a}l(d,b);d.prototype.writeCodedValues=function(a,b){var c=null;a&&(c=a.map(function(a){return m.fixJson(m.clone(a))}));b.codedValues=c};d.prototype.getName=function(a){var b=null;if(this.codedValues){var d=String(a);this.codedValues.some(function(a){String(a.code)===d&&(b=a.name);return!!b})}return b};k([f.property({json:{write:!0}})],d.prototype,"codedValues",void 0);k([f.writer("codedValues")],d.prototype,"writeCodedValues",null);k([f.property()],
d.prototype,"type",void 0);return d=k([f.subclass("esri.layers.support.CodedValueDomain")],d)}(f.declared(n))})},"esri/layers/support/Domain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary".split(" "),function(b,h,l,k,f,n,m){var g=m({codedValue:"coded-value"});return function(b){function a(a){a=b.call(this,a)||this;a.name=null;a.type=null;return a}
l(a,b);a.prototype.writeType=function(a,b){b.type=g.toJSON(a)};k([f.property({json:{write:!0}})],a.prototype,"name",void 0);k([f.property({json:{read:g.fromJSON,write:!0}})],a.prototype,"type",void 0);k([f.writer("type")],a.prototype,"writeType",null);return a=k([f.subclass("esri.layers.support.Domain")],a)}(f.declared(n))})},"esri/layers/support/RangeDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),
function(b,h,l,k,f,n){return function(b){function g(d){d=b.call(this,d)||this;d.maxValue=null;d.minValue=null;d.type="range";return d}l(g,b);k([f.property({json:{read:{source:"range",reader:function(b,a){return a.range&&a.range[1]}},write:{target:"range",writer:function(b,a,c){a[c]=[this.minValue,b]}}}})],g.prototype,"maxValue",void 0);k([f.property({json:{read:{source:"range",reader:function(b,a){return a.range&&a.range[0]}},write:{target:"range",writer:function(b,a,c){a[c]=[b,this.maxValue]}}}})],
g.prototype,"minValue",void 0);k([f.property()],g.prototype,"type",void 0);return g=k([f.subclass("esri.layers.support.RangeDomain")],g)}(f.declared(n))})},"esri/geometry/support/graphicsUtils":function(){define(["require","exports","dojo/_base/array","../Extent","../../core/Collection"],function(b,h,l,k,f){Object.defineProperty(h,"__esModule",{value:!0});h.graphicsExtent=function(b){if(!b||!b.length)return null;var h=f.isCollection(b)?b.getItemAt(0).geometry:b[0].geometry,g=h.extent,d=h;null===g&&
(g=new k(d.x,d.y,d.x,d.y,h.spatialReference));for(var a=1;a<b.length;a++){var d=h=f.isCollection(b)?b.getItemAt(a).geometry:b[a].geometry,c=h.extent;null===c&&(c=new k(d.x,d.y,d.x,d.y,h.spatialReference));g=g.clone().union(c)}return 0>g.width&&0>g.height?null:g};h.getGeometries=function(b){return l.map(b,function(b){return b.geometry})};h._encodeGraphics=function(b,f){var g=[];l.forEach(b,function(b,a){b=b.toJSON();var c={};if(b.geometry){var d=f&&f[a];c.geometry=d&&d.toJSON()||b.geometry}b.attributes&&
(c.attributes=b.attributes);g[a]=c});return g}})},"esri/tasks/support/Query":function(){define(["../../core/Accessor","../../core/kebabDictionary","../../core/lang","../../geometry/support/jsonUtils","dojo/_base/array"],function(b,h,l,k,f){var n=h({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",
esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=h({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),g=h({upperLeft:"upper-left",lowerLeft:"lower-left"});return b.createSubclass({declaredClass:"esri.tasks.support.Query",properties:{spatialRelationship:"intersects",text:null,where:"",geometry:null,geometryPrecision:null,groupByFieldsForStatistics:null,
objectIds:null,returnGeometry:!1,returnCentroid:!1,returnDistinctValues:!1,returnJSON:!1,maxAllowableOffset:null,multipatchOption:null,num:null,start:null,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,pixelSize:null,distance:null,units:"meters",resultOffset:null,resultRecordCount:null,returnExceededLimitFeatures:!0,quantizationParameters:null,sqlFormat:null},toJSON:function(b){var a={text:this.text,where:this.where,returnGeometry:this.returnGeometry,
spatialRel:n.toJSON(this.spatialRelationship),maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision,returnZ:this.returnZ,returnM:this.returnM,sqlFormat:this.sqlFormat},c=b&&b.geometry||this.geometry,d=this.objectIds,h=this.outFields,t=this.outSpatialReference,x=this.groupByFieldsForStatistics,v=this.orderByFields,y=this.outStatistics;b=this.distance;c&&(a.geometry=c,a.geometryType=k.getJsonType(c),a.inSR=c.spatialReference.wkid||JSON.stringify(c.spatialReference.toJSON()));
d&&(a.objectIds=d.join(","));h&&(a.outFields=h.join(","));this.returnDistinctValues&&(a.returnDistinctValues=!0);this.returnCentroid&&(a.returnCentroid=!0);this.returnExceededLimitFeatures||(a.returnExceededLimitFeatures=!1);x&&(a.groupByFieldsForStatistics=x.join(","));v&&(a.orderByFields=v.join(","));if(y){var p=[];f.forEach(y,function(a){p.push(a.toJSON())});a.outStatistics=JSON.stringify(p)}t?a.outSR=t.wkid||JSON.stringify(t.toJSON()):c&&(a.outSR=c.spatialReference.wkid||JSON.stringify(c.spatialReference.toJSON()));
c=this.timeExtent;a.time=c?c.toJSON().join(","):null;(c=this.relationParam)&&a.spatialRel===n.toJSON("relation")&&(a.relationParam=c);b&&(a.distance=this.distance,a.units=m.toJSON(this.units));this.resultType&&(a.resultType=this.resultType);this.hasOwnProperty("start")&&(a.resultOffset=this.start,a.resultRecordCount=10,""===a.where&&(a.where="1\x3d1"));this.hasOwnProperty("num")&&(a.resultRecordCount=this.num);a.pixelSize=this.pixelSize?JSON.stringify(this.pixelSize.toJSON()):null;a.multipatchOption=
this.multipatchOption;this.quantizationParameters&&(b=l.clone(this.quantizationParameters),b.originPosition&&(b.originPosition=g.toJSON(b.originPosition)),a.quantizationParameters=JSON.stringify(b));a._ts=this._ts;return a}})})},"esri/geometry/support/normalizeUtils":function(){define("dojo/_base/array dojo/Deferred ../../config ../../tasks/GeometryService ../Polyline ../Polygon ./webMercatorUtils ./spatialReferenceUtils ./jsonUtils".split(" "),function(b,h,l,k,f,n,m,g,d){function a(a,b){return Math.ceil((a-
b)/(2*b))}function c(a,b){var c=a.paths||a.rings,d,e,g=c.length,f;for(d=0;d<g;d++)for(f=c[d].length,e=0;e<f;e++){var p=a.getPoint(d,e);a.setPoint(d,e,p.clone().offset(b,0))}return a}function r(a,c){if(!(a instanceof f||a instanceof n))throw console.error("straightLineDensify: the input geometry is neither polyline nor polygon"),Error("straightLineDensify: the input geometry is neither polyline nor polygon");var d=a instanceof f,e=[],g;b.forEach(d?a.paths:a.rings,function(a){e.push(g=[]);g.push([a[0][0],
a[0][1]]);var b,d,f,p,h,k,q,m,n,l,u,t;for(h=0;h<a.length-1;h++){b=a[h][0];d=a[h][1];f=a[h+1][0];p=a[h+1][1];q=Math.sqrt((f-b)*(f-b)+(p-d)*(p-d));m=(p-d)/q;n=(f-b)/q;l=q/c;if(1<l){for(k=1;k<=l-1;k++)t=k*c,u=n*t+b,t=m*t+d,g.push([u,t]);k=(q+Math.floor(l-1)*c)/2;u=n*k+b;t=m*k+d;g.push([u,t])}g.push([f,p])}});return d?new f({paths:e,spatialReference:a.spatialReference}):new n({rings:e,spatialReference:a.spatialReference})}function w(a,b,d){b&&(a=r(a,1E6),a=m.webMercatorToGeographic(a,!0));d&&(a=c(a,d));
return a}function t(b,c,d){var e=b.x||b[0],g;e>c?(g=a(e,c),b.x?b=b.clone().offset(-2*g*c,0):b[0]=e+-2*g*c):e<d&&(g=a(e,d),b.x?b=b.clone().offset(-2*g*d,0):b[0]=e+-2*g*d);return b}function x(c,d){var e=-1;b.forEach(d.cutIndexes,function(g,f){var p=d.geometries[f];b.forEach(p.rings||p.paths,function(c,d){b.some(c,function(b){if(!(180>b[0])){b=0;var e,g=c.length,f;for(e=0;e<g;e++)f=c[e][0],b=f>b?f:b;b=Number(b.toFixed(9));b=-360*a(b,180);g=c.length;for(e=0;e<g;e++)f=p.getPoint(d,e),p.setPoint(d,e,f.clone().offset(b,
0))}return!0})});g===e?p.rings?b.forEach(p.rings,function(a){c[g]=c[g].addRing(a)}):b.forEach(p.paths,function(a){c[g]=c[g].addPath(a)}):(e=g,c[g]=p)});return c}function v(a){for(var b=[],c=0,d=0,g=Math.min,f=Math.max,p=0;p<a.length;p++){for(var h=a[p],k=null,m=0;m<h.length;m++)k=h[m],b.push(k),0===m?d=c=k[0]:(c=g(c,k[0]),d=f(d,k[0]));k&&b.push([(c+d)/2,0])}return b}var y;return{_straightLineDensify:r,normalizeCentralMeridian:function(p,e){var q=new h;e||(y||(y=new k({url:l.geometryServiceUrl})),
e=y);var u=[],r=[],v,B,F,D,E,I,J,U,P=0;b.forEach(p,function(e){if(e)if(v||(v=e.spatialReference,B=g.getInfo(v),D=(F=v.isWebMercator)?2.0037508342788905E7:180,E=F?-2.0037508342788905E7:-180,I=F?102100:4326,J=new f({paths:[[[D,E],[D,D]]],spatialReference:{wkid:I}}),U=new f({paths:[[[E,E],[E,D]]],spatialReference:{wkid:I}})),B){var p=d.fromJSON(e.toJSON()),h=e.extent;"point"===e.type?u.push(t(p,D,E)):"multipoint"===e.type?(p.points=b.map(p.points,function(a){return t(a,D,E)}),u.push(p)):"extent"===e.type?
(p=h.clone()._normalize(null,null,B),u.push(p.rings?new n(p):p)):h?(e=2*a(h.xmin,E)*D,p=0===e?p:c(p,e),h=h.clone().offset(e,0),h.intersects(J)&&h.xmax!==D?(P=h.xmax>P?h.xmax:P,p=w(p,F),r.push(p),u.push("cut")):h.intersects(U)&&h.xmin!==E?(P=2*h.xmax*D>P?2*h.xmax*D:P,p=w(p,F,360),r.push(p),u.push("cut")):u.push(p)):u.push(p)}else u.push(e);else u.push(e)});for(var H=new f,K=a(P,D),G=-90,S=K;0<K;){var O=-180+360*K;H.addPath([[O,G],[O,-1*G]]);G*=-1;K--}0<r.length&&0<S?e?e.cut(r,H).then(function(a){r=
x(r,a);var c=[];b.forEach(u,function(a,b){"cut"===a&&(a=r.shift(),p[b].rings&&1<p[b].rings.length&&a.rings.length>=p[b].rings.length?(u[b]="simplify",c.push(a)):u[b]=!0===F?m.geographicToWebMercator(a):a)});0<c.length?e.simplify(c).then(function(a){b.forEach(u,function(b,c){"simplify"===b&&(u[c]=!0===F?m.geographicToWebMercator(a.shift()):a.shift())});q.resolve(u)}).otherwise(function(a){q.reject(a)}):q.resolve(u)}).otherwise(function(a){q.reject(a)}):q.reject(Error("esri.geometry.normalizeCentralMeridian: 'geometryService' argument is missing.")):
(b.forEach(u,function(a,b){"cut"===a&&(a=r.shift(),u[b]=!0===F?m.geographicToWebMercator(a):a)}),q.resolve(u));return q.promise},getDenormalizedExtent:function(a){if(!a)return null;var b=a.extent;if(!b)return null;var c=a.spatialReference&&g.getInfo(a.spatialReference);if(!c)return b;var d=c.valid[0],c=c.valid[1],f=b.width,p=b.xmax,h=b.xmin;if("extent"===a.type||0===f||f<=c||f>2*c||p<d||h>c)return b;var k;switch(a.type){case "polygon":if(1<a.rings.length)k=v(a.rings);else return b;break;case "polyline":if(1<
a.paths.length)k=v(a.paths);else return b;break;case "multipoint":k=a.points}a=Math.min;for(var d=Math.max,m=b.clone(),n=0;n<k.length;n++){var l=k[n][0];0>l?(l+=c,h=d(l,h)):(l-=c,p=a(l,p))}m.xmin=p;m.xmax=h;return m.width<f?(m.xmin-=c,m.xmax-=c,m):b}}})},"esri/tasks/GeometryService":function(){define("../core/kebabDictionary ../core/accessorSupport/ensureType ../geometry/Extent ../geometry/Multipoint ../geometry/Polyline ../geometry/Polygon ../geometry/support/jsonUtils ../request ./Task ./support/ProjectParameters dojo/_base/lang".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){var r=b({MGRS:"mgrs",USNG:"usng",UTM:"utm",GeoRef:"geo-ref",GARS:"gars",DMS:"dms",DDM:"ddm",DD:"dd"}),w=h.ensureType(a);b=d.createSubclass({declaredClass:"esri.tasks.GeometryService",areasAndLengths:function(a,b){a={query:c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/areasAndLengths",a).then(function(a){return a.data})},autoComplete:function(a,
b,d){var f=a[0].spatialReference;a={query:c.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),polygons:JSON.stringify(this._encodeGeometries(a).geometries),polylines:JSON.stringify(this._encodeGeometries(b).geometries)}),callbackParamName:"callback"};if(this.requestOptions||d)a=c.mixin({},this.requestOptions,d,a);return g(this.parsedUrl.path+"/autoComplete",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new n({spatialReference:f,rings:a.rings})})})},buffer:function(a,
b){var d=c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),f=a.outSpatialReference||a.geometries[0].spatialReference;a={query:d,callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/buffer",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new n({spatialReference:f,rings:a.rings})})})},cut:function(a,b,d){var f=a[0].spatialReference,p=a.map(function(a){return a.toJSON()});a={query:c.mixin({},this.parsedUrl.query,
{f:"json",sr:JSON.stringify(f.toJSON()),target:JSON.stringify({geometryType:m.getJsonType(a[0]),geometries:p}),cutter:JSON.stringify(b.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||d)a=c.mixin({},this.requestOptions,d,a);return g(this.parsedUrl.path+"/cut",a).then(function(a){a=a.data;return{cutIndexes:a.cutIndexes,geometries:(a.geometries||[]).map(function(a){return m.fromJSON(a).set("spatialReference",f)})}})},convexHull:function(a,b){var d=a[0].spatialReference;a={query:c.mixin({},
this.parsedUrl.query,{f:"json",sr:JSON.stringify(d.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/convexHull",a).then(function(a){return m.fromJSON(a.data.geometry).set("spatialReference",d)})},densify:function(a,b){var d=c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),f=a.geometries[0].spatialReference;a={query:d,callbackParamName:"callback"};if(this.requestOptions||
b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/densify",a).then(function(a){return(a.data.geometries||[]).map(function(a){return m.fromJSON(a).set("spatialReference",f)})})},difference:function(a,b,d){var f=a[0].spatialReference;a={query:c.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a)),geometry:JSON.stringify({geometryType:m.getJsonType(b),geometry:b.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||
d)a=c.mixin({},this.requestOptions,d,a);return g(this.parsedUrl.path+"/difference",a).then(function(a){return(a.data.geometries||[]).map(function(a){return m.fromJSON(a).set("spatialReference",f)})})},distance:function(a,b){a={query:c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/distance",a).then(this._handleDistanceResponse)},fromGeoCoordinateString:function(a,b){var d=
{};c.isObject(a.sr)?d.sr=a.sr.wkid||JSON.stringify(a.sr.toJSON()):d.sr=a.sr;d.strings=JSON.stringify(a.strings);d.conversionType=r.toJSON(a.conversionType||"mgrs");d.conversionMode=a.conversionMode;a={query:c.mixin({},this.parsedUrl.query,{f:"json"},d),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/fromGeoCoordinateString",a).then(this._handleFromGeoCoordinateResponse)},generalize:function(a,b){var d=c.mixin({},this.parsedUrl.query,
{f:"json"},a.toJSON()),f=a.geometries[0].spatialReference;a={query:d,callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/generalize",a).then(function(a){return(a.data.geometries||[]).map(function(a){return m.fromJSON(a).set("spatialReference",f)})})},intersect:function(a,b,d){var f=a[0].spatialReference;a={query:c.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a)),
geometry:JSON.stringify({geometryType:m.getJsonType(b),geometry:b.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||d)a=c.mixin({},this.requestOptions,d,a);return g(this.parsedUrl.path+"/intersect",a).then(function(a){return(a.data.geometries||[]).map(function(a){return m.fromJSON(a).set("spatialReference",f)})})},lengths:function(a,b){a={query:c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,
b,a);return g(this.parsedUrl.path+"/lengths",a).then(function(a){return a.data})},labelPoints:function(a,b){var d=a.map(function(a){return a.toJSON()}),f=a[0].spatialReference;a={query:c.mixin({},this.parsedUrl.query,{f:"json",sr:f.wkid?f.wkid:JSON.stringify(f.toJSON()),polygons:JSON.stringify(d)}),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/labelPoints",a).then(function(a){return(a.data.labelPoints||[]).map(function(a){return m.fromJSON(a).set("spatialReference",
f)})})},offset:function(a,b){var d=c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),f=a.geometries[0].spatialReference;a={query:d,callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/offset",a).then(function(a){return(a.data.geometries||[]).map(function(a){return m.fromJSON(a).set("spatialReference",f)})})},project:function(a,b){a=w(a);var d=c.mixin({},a.toJSON(),this.parsedUrl.query,{f:"json"}),f=a.outSpatialReference,
p=m.getJsonType(a.geometries[0]),e=this._decodeGeometries;a={query:d,callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/project",a).then(function(a){return e(a.data,p,f)})},relation:function(a,b){a={query:c.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/relation",a).then(this._handleRelationResponse)},
reshape:function(a,b,d){var f=a.spatialReference;a={query:c.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),target:JSON.stringify({geometryType:m.getJsonType(a),geometry:a.toJSON()}),reshaper:JSON.stringify(b.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||d)a=c.mixin({},this.requestOptions,d,a);return g(this.parsedUrl.path+"/reshape",a).then(function(a){return m.fromJSON(a.data.geometry).set("spatialReference",f)})},simplify:function(a,b){var d=a[0].spatialReference,
f=c.mixin({},this.parsedUrl.query,{f:"json",sr:d.wkid?d.wkid:JSON.stringify(d.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),p=m.getJsonType(a[0]),e=this._decodeGeometries;a={query:f,callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/simplify",a).then(function(a){return e(a.data,p,d)})},toGeoCoordinateString:function(a,b){var d={};c.isObject(a.sr)?d.sr=a.sr.wkid||JSON.stringify(a.sr.toJSON()):d.sr=a.sr;d.coordinates=
JSON.stringify(a.coordinates);d.conversionType=r.toJSON(a.conversionType||"mgrs");d.conversionMode=a.conversionMode;d.numOfDigits=a.numOfDigits;d.rounding=a.rounding;d.addSpaces=a.addSpaces;a={query:c.mixin({},this.parsedUrl.query,{f:"json"},d),callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/toGeoCoordinateString",a).then(this._handleToGeoCoordinateResponse)},trimExtend:function(a,b){var d=c.mixin({},this.parsedUrl.query,
{f:"json"},a.toJSON()),h=a.sr;a={query:d,callbackParamName:"callback"};if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/trimExtend",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new f({spatialReference:h,paths:a.paths})})})},union:function(a,b){var d=a[0].spatialReference;a={query:c.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(d.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),callbackParamName:"callback"};
if(this.requestOptions||b)a=c.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/union",a).then(function(a){return m.fromJSON(a.data.geometry).set("spatialReference",d)})},_handleRelationResponse:function(a){return a.data.relations},_handleDistanceResponse:function(a){return(a=a.data)&&a.distance},_handleToGeoCoordinateResponse:function(a){return a.data.strings},_handleFromGeoCoordinateResponse:function(a){return a.data.coordinates},_encodeGeometries:function(a){var b=[],c,d=a.length;
for(c=0;c<d;c++)b.push(a[c].toJSON());return{geometryType:m.getJsonType(a[0]),geometries:b}},_decodeGeometries:function(a,b,d){var g=m.getGeometryType(b);a=a.geometries;var f=[],e={spatialReference:d.toJSON()},h=c.mixin;a.forEach(function(a,b){f[b]=new g(h(a,e))});return f},_toProjectGeometry:function(a){var b=a.spatialReference.toJSON();return a instanceof l?new n({rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]],spatialReference:b}):new f({paths:[[].concat(a.points)],
spatialReference:b})},_fromProjectedGeometry:function(a,b,c){return"extent"===b?(a=a.rings[0],new l(a[0][0],a[0][1],a[2][0],a[2][1],c)):new k({points:a.paths[0],spatialReference:c.toJSON()})}});c.mixin(b,{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,UNIT_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,UNIT_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,UNIT_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",UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",
UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});return b})},"esri/tasks/support/ProjectParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/lang ../../geometry/support/jsonUtils ../../core/JSONSupport ../../core/Logger".split(" "),function(b,h,l,k,f,n,m,g,d){var a=d.getLogger("esri.tasks.support.ProjectParameters");
return function(b){function c(a){a=b.call(this)||this;a.geometries=null;a.outSpatialReference=null;a.transformation=null;a.transformForward=null;return a}l(c,b);Object.defineProperty(c.prototype,"outSR",{get:function(){a.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");return this.outSpatialReference},set:function(b){a.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");this.outSpatialReference=b},enumerable:!0,configurable:!0});c.prototype.toJSON=
function(){var a=this.geometries.map(function(a){return a.toJSON()}),b=this.geometries[0],c={};c.outSR=this.outSpatialReference.wkid||JSON.stringify(this.outSpatialReference.toJSON());c.inSR=b.spatialReference.wkid||JSON.stringify(b.spatialReference.toJSON());c.geometries=JSON.stringify({geometryType:m.getJsonType(b),geometries:a});this.transformation&&(c.transformation=this.transformation.wkid||JSON.stringify(this.transformation));n.isDefined(this.transformForward)&&(c.transformForward=this.transformForward);
return c};k([f.property()],c.prototype,"geometries",void 0);k([f.property({json:{read:{source:"outSR"}}})],c.prototype,"outSpatialReference",void 0);k([f.property({json:{read:!1}})],c.prototype,"outSR",null);k([f.property()],c.prototype,"transformation",void 0);k([f.property()],c.prototype,"transformForward",void 0);return c=k([f.subclass("esri.tasks.support.ProjectParameters")],c)}(f.declared(g))})},"esri/tasks/support/StatisticDefinition":function(){define(["../../core/Accessor"],function(b){return b.createSubclass({declaredClass:"esri.tasks.support.StatisticDefinition",
properties:{maxPointCount:null,maxRecordCount:null,maxVertexCount:null,onStatisticField:null,outStatisticFieldName:null,statisticType:null},toJSON:function(){return{statisticType:this.statisticType,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount}}})})},"esri/layers/graphics/controllers/OnDemandController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/HandleRegistry ../../../core/Logger ../../../core/Promise ../../../core/promiseUtils ../../../geometry/Extent ./support/TileSet ../../../views/2d/tiling/TileQueue ../../../views/2d/tiling/TileStrategy ../../../views/2d/tiling/TileInfoView ../../../views/2d/tiling/TileKey ../../support/GraphicsManager ../../support/TileInfo".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q){var u=a.getLogger("esri.views.2d.layers.MapImageLayerView2D"),z=function(){function a(){this.key=new p(0,0,0,0)}a.prototype.dispose=function(){};return a}();return function(a){function b(b){var c=a.call(this)||this;c._handles=new d;c._pendingQueries=new Map;c._tileRequests=new Map;c.layer=b.layer;c.layerView=b.layerView;c.graphics=b.graphics;c._tileInfo=q.create({spatialReference:c.layerView.view.spatialReference,size:512});c._tileInfoView=new y(c._tileInfo);
c._tileQueue=new x({tileInfoView:c._tileInfoView,process:function(a){return c._fetchTile(a)}});c._tileSet=new t({layer:c.layer,tileInfo:c._tileInfo});c._graphicsManager=new e({graphics:c.graphics,objectIdField:c.layer.objectIdField});c._tileStrategy=new v({cachePolicy:"purge",acquireTile:function(a){return c._acquireTile(a)},releaseTile:function(a){return c._releaseTile(a)},tileInfoView:c._tileInfoView});c._handles.add([c.layer.watch("definitionExpression",function(){return c._refresh()}),c.layer.on("edits",
function(a){return c._editsHandler(a)})],"layer");return c}l(b,a);b.prototype.destroy=function(){var a=this;this._pendingQueries.forEach(function(a){a.isFulfilled()||a.cancel()});this._tileStrategy.tiles.forEach(function(b){return a._releaseTile(b)});this._handles.destroy();this._graphicsManager.destroy();this._tileStrategy.destroy();this._tileQueue.clear();this._tileRequests.clear()};Object.defineProperty(b.prototype,"graphics",{set:function(a){var b=this,c=this._get("graphics");c!==a&&(this._handles.remove("graphics"),
c&&c.forEach(function(a){return a.layer=null}),a&&(a.forEach(function(a){return a.layer=b.layer}),this._handles.add([a.on("after-add",function(a){return a.item.layer=b.layer}),a.on("after-remove",function(a){return a.item.layer=null})],"graphics")),this._set("graphics",a))},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"updating",{get:function(){return 0<this._tileQueue.length},enumerable:!0,configurable:!0});b.prototype.update=function(a){var b=this;this._tileQueue.pause();this._tileQueue.state=
a.state;this._tileStrategy.update(a);this._graphicsManager.removeAll();this._tileStrategy.tiles.forEach(function(a){a.featureSet&&b._graphicsManager.add(a.featureSet.features,a.intentId)});this._tileQueue.resume();this.notifyChange("updating")};b.prototype._acquireTile=function(a){var b=this,c=new z;c.key.set(a);a=this._tileQueue.push(c.key).then(function(a){c.attached=!0;c.featureSet=a.featureSet;c.intentId=a.intentId;b._graphicsManager.removeIntent(c.intentId);b.layerView.requestUpdate()});this._tileRequests.set(c,
a);this.notifyChange("updating");return c};b.prototype._releaseTile=function(a){if(this._tileRequests.has(a)){var b=this._tileRequests.get(a);b.isFulfilled()||b.cancel();this._tileRequests.delete(a);this.layerView.requestUpdate()}};b.prototype._fetchTile=function(a){var b=this,c=this._graphicsManager.createIntentToAdd();a=this._tileSet.fetch(a).then(function(a){return{featureSet:a,intentId:c}});a.otherwise(function(a){b._graphicsManager.removeIntent(c);if(a&&"cancel"===a.dojoType)return r.reject(a);
a=new m("ondemandcontroller2d:tile-request-failed","Failed to query for features",{error:a});u.error(a);return r.reject(a)});return a};b.prototype._refresh=function(){var a=this;this._tileQueue.reset();this._tileStrategy.tiles.forEach(function(b){var c=a._graphicsManager.createIntentToAdd(),d=a._tileSet.fetch(b.key).then(function(d){a._graphicsManager.remove(b.featureSet.features);b.intentId=c;b.featureSet=d;a._graphicsManager.add(b.featureSet.features,b.intentId);return b});d.always(function(){return a._graphicsManager.removeIntent(c)});
return d});this.notifyChange("updating")};b.prototype._editsHandler=function(a){var b=this,c=function(a){return a.objectId},d=a.deletedFeatures.map(c);this._graphicsManager.delete(d);a=a.addedFeatures.concat(a.updatedFeatures).map(c);if(a.length){c=this.layer.createQuery();c.objectIds=a;c.outSpatialReference=this._tileInfo.spatialReference;var e=this._graphicsManager.createIntentToAdd(a);a=this.layer.queryFeatures(c);this._pendingQueries.set(e,a);this.notifyChange("updating");a.then(function(a){return b._refetchHandler(a,
e)}).always(function(){b._graphicsManager.removeIntent(e);b._pendingQueries.delete(e);b.notifyChange("updating")})}};b.prototype._refetchHandler=function(a,b){var c=this,d=a.features;if(d){var e=this._tileInfo.spatialReference;a=function(a){var b=a.key.extent,g=new w({xmin:b[0],ymin:b[1],xmax:b[2],ymax:b[3],spatialReference:e});d.forEach(function(b){b.geometry&&g.intersects(b.geometry)&&c._addFeatureToTile(b,a)})};for(var g=0,f=this._tileStrategy.tiles;g<f.length;g++)a(f[g]);this._graphicsManager.add(d,
b)}};b.prototype._addFeatureToTile=function(a,b){var c=b.featureSet.features||[],d=this.layer.objectIdField,e=a.attributes&&a.attributes[d],g;c.some(function(a){(a.attributes&&a.attributes[d])===e&&(g=a);return!!g});g?(g.geometry=a.geometry,g.attributes=a.attributes):c.push(a);b.featureSet.features=c};k([f.property()],b.prototype,"graphics",null);k([f.property()],b.prototype,"layer",void 0);k([f.property()],b.prototype,"layerView",void 0);k([f.property()],b.prototype,"updating",null);return b=k([f.subclass("esri.layers.graphics.controllers.OnDemandController2D")],
b)}(f.declared(n,c,g))})},"esri/layers/graphics/controllers/support/TileSet":function(){define(["require","exports","../../../../geometry/Extent"],function(b,h,l){return function(){function b(b){this.layer=b.layer;this.tileInfo=b.tileInfo}b.prototype.fetch=function(b){return this._queryTile(b)};b.prototype._queryTile=function(b){return this.layer.queryFeatures(this._createQuery(b))};b.prototype._createQuery=function(b){this.tileInfo.updateTileInfo(b);var f=this.tileInfo.spatialReference,h=b.extent,
g=h[0],d=h[1],a=h[2],h=h[3],c=this.layer.createQuery();c.geometry=new l({xmin:g,ymin:d,xmax:a,ymax:h,spatialReference:f});c.outSpatialReference=f;this._setResolutionParams(c,b);return c};b.prototype._setResolutionParams=function(b,h){var f=this.layer,g=f.geometryType;if("polyline"===g||"polygon"===g)h=this.tileInfo.lodAt(h.level).resolution,"polyline"===g&&(b.maxAllowableOffset=h),f.get("capabilities.query.supportsQuantization")&&(b.quantizationParameters={mode:"view",originPosition:"upperLeft",tolerance:h,
extent:f.fullExtent})};return b}()})},"esri/views/2d/tiling/TileQueue":function(){define(["require","exports","../../../core/QueueProcessor"],function(b,h,l){function k(b,d){b.length=0;d.forEach(function(a){return b.push(a)});return b}var f=new Set,n=[],m=new Map;return function(){function b(b){var a=this;this.tileInfoView=b.tileInfoView;this._queue=new l({concurrency:6,process:b.process,peeker:function(b){return a._peek(b)}})}Object.defineProperty(b.prototype,"length",{get:function(){return this._queue.length},
enumerable:!0,configurable:!0});b.prototype.clear=function(){this._queue.clear()};b.prototype.find=function(b,a){return this._queue.find(b)};b.prototype.has=function(b){return this._queue.has(b)};b.prototype.pause=function(){return this._queue.pause()};b.prototype.push=function(b){return this._queue.push(b)};b.prototype.reset=function(){return this._queue.reset()};b.prototype.resume=function(){return this._queue.resume()};b.prototype._peek=function(b){var a=this;if(!this.state)return b[0];var c=this.tileInfoView,
d=Number.NEGATIVE_INFINITY,g=Number.POSITIVE_INFINITY;b.forEach(function(b){var c=a.tileInfoView.getTileScale(b);m.has(c)||(m.set(c,[]),d=Math.max(c,d),g=Math.min(c,g));m.get(c).push(b);f.add(c)});var h=this.state.scale;m.has(h)||(k(n,f),n.sort(),h=n.reduce(function(a,b,c,d){return Math.abs(b-h)<Math.abs(a-h)?b:a},n[0]));h=Math.min(h,d);h=Math.max(h,g);b=m.get(h);var l=c.getClosestInfoForScale(h),v=l.getColumnForX(this.state.center[0]),y=l.getRowForY(this.state.center[1]);b.sort(function(a,b){var c=
l.denormalizeCol(a.col,a.world),d=l.denormalizeCol(b.col,b.world);return Math.sqrt((v-c)*(v-c)+(y-a.row)*(y-a.row))-Math.sqrt((v-d)*(v-d)+(y-b.row)*(y-b.row))});f.clear();m.clear();return b[0]};return b}()})},"esri/core/QueueProcessor":function(){define(["require","exports","dojo/Deferred","./Queue"],function(b,h,l,k){var f={};return function(){function b(b){this._apiPromises=new Map;this._resolvingPromises=new Map;this._isPaused=!1;this.concurrency=1;b.concurrency&&(this.concurrency=b.concurrency);
this._queue=new k(b.peeker?{peeker:b.peeker}:void 0);this.process=b.process}Object.defineProperty(b.prototype,"length",{get:function(){return this._resolvingPromises.size+this._queue.length},enumerable:!0,configurable:!0});b.prototype.clear=function(){this._queue.clear();var b=[];this._resolvingPromises.forEach(function(g){return b.push(g)});this._resolvingPromises.clear();b.forEach(function(b){return b.cancel()});b.length=0;this._apiPromises.forEach(function(g){return b.push(g)});this._apiPromises.clear();
b.forEach(function(b){return b.cancel()});this._isPaused=!1};b.prototype.find=function(b,g){var d=this,a=void 0;this._apiPromises.forEach(function(c,f){b.call(g,f)&&(a=d._apiPromises.get(f).promise)});return a};b.prototype.has=function(b){return this._apiPromises.has(b)};b.prototype.pause=function(){this._isPaused=!0};b.prototype.push=function(b){var g=this;if(this._apiPromises.has(b))return this._apiPromises.get(b).promise;var d=new l(function(a){g._resolvingPromises.has(b)?g._resolvingPromises.get(b).cancel(a):
(g._remove(b),g._scheduleNext())});this._add(b,d);this._scheduleNext();return d.promise};b.prototype.reset=function(){var b=[];this._resolvingPromises.forEach(function(g){return b.push(g)});this._resolvingPromises.clear();b.forEach(function(b){return b.cancel(f)})};b.prototype.resume=function(){this._isPaused=!1;this._scheduleNext()};b.prototype._scheduleNext=function(){this._isPaused||this._next()};b.prototype._next=function(){this._resolvingPromises.size!==this.concurrency&&this._process(this._queue.pop())};
b.prototype._process=function(b){var g=this;if(null!=b){var d=this._apiPromises.get(b),a=this.process(b);a&&"function"===typeof a.then?(this._resolvingPromises.set(b,a),a.then(function(a){d.resolve(a);g._remove(b);g._scheduleNext()},function(a){a===f?g._process(b):(d.reject(a),g._remove(b),g._scheduleNext())})):(d.resolve(a),this._remove(b));this._scheduleNext()}};b.prototype._add=function(b,g){this._apiPromises.set(b,g);this._queue.push(b)};b.prototype._remove=function(b){this._queue.remove(b);this._apiPromises.delete(b);
this._resolvingPromises.delete(b)};return b}()})},"esri/core/Queue":function(){define(["require","exports"],function(b,h){return function(){function b(b){this._items=[];this._itemSet=new Set;this._peeker=function(b){return b[0]};this._length=0;b&&b.peeker&&(this._peeker=b.peeker)}Object.defineProperty(b.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});b.prototype.clear=function(){this._itemSet.clear();this._length=this._items.length=0};b.prototype.peek=function(){if(0!==
this._length)return this._peeker(this._items)};b.prototype.push=function(b){this.contains(b)||this._add(b)};b.prototype.contains=function(b){return 0<this._length&&this._itemSet.has(b)};b.prototype.pop=function(){if(0!==this._length){var b=this.peek();this._remove(b);return b}};b.prototype.remove=function(b){this.contains(b)&&this._remove(b)};b.prototype._add=function(b){this._items.push(b);this._itemSet.add(b);this._length++};b.prototype._remove=function(b){this._itemSet.delete(b);this._items.splice(this._items.indexOf(b),
1);this._length--};return b}()})},"esri/views/2d/tiling/TileStrategy":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./TileKey"],function(b,h,l,k){var f=new k(0,0,0,0),n=new Map,m=[],g=[];return function(){function b(a){this._previousResolution=Number.POSITIVE_INFINITY;this.cachePolicy="keep";this.tileIndex=new Map;this.tiles=[];this.acquireTile=a.acquireTile;this.releaseTile=a.releaseTile;this.tileInfoView=a.tileInfoView;a.cachePolicy&&(this.cachePolicy=a.cachePolicy)}
b.prototype.destroy=function(){this.tileIndex.clear()};b.prototype.update=function(a){var b=this,d=this.tileIndex,h=this.tileInfoView.getTileCoverage(a.state);if(h){var k=h.spans,l=h.lodInfo,v=l.level,y=a.state.resolution,p=!a.stationary&&y>this._previousResolution;this._previousResolution=y;this.tiles.length=0;n.clear();var e=0,q=0;if(0<k.length)for(var u=0;u<k.length;u++){a=k[u];for(var z=a.row,C=a.colTo,B=a.colFrom;B<=C;B++)e++,a=f.set(v,z,l.normalizeCol(B),l.getWorldForColumn(B)).id,d.has(a)?
(y=d.get(a),y.attached?(n.set(a,y),q++):y.attached||p||this._addParentTile(a,n)):(y=this.acquireTile(f),this.tileIndex.set(a,y),p||this._addParentTile(a,n))}var F=q===e;g.length=0;m.length=0;d.forEach(function(a,c){f.set(c);if(!n.has(c)){var d=b.tileInfoView.intersects(h,f);!d||!p&&F?"purge"===b.cachePolicy?m.push(c):(f.level>v||!d)&&m.push(c):a.attached?g.push(c):p&&m.push(c)}});for(k=0;k<g.length;k++)a=g[k],(y=d.get(a))&&y.attached&&n.set(a,y);for(k=0;k<m.length;k++)a=m[k],y=d.get(a),this.releaseTile(y),
d["delete"](a);n.forEach(function(a){return b.tiles.push(a)});g.length=0;m.length=0;n.clear()}};b.prototype.clear=function(){var a=this,b=this.tileIndex;b.forEach(function(b){a.releaseTile(b)});b.clear()};b.prototype._addParentTile=function(a,b){for(var c=null;;){a=this.tileInfoView.getTileParentId(a);if(!a)break;if(this.tileIndex.has(a)&&(c=this.tileIndex.get(a))&&c.attached){b.has(c.key.id)||b.set(c.key.id,c);break}}};return b}()})},"esri/views/2d/tiling/TileKey":function(){define(["require","exports",
"../../../core/ObjectPool"],function(b,h,l){return function(){function b(b,h,k,g){"string"===typeof b?(b=b.split("/"),h=b[1],k=b[2],g=b[3],this.level=+b[0],this.row=+h,this.col=+k,this.world=+g||0):b&&"object"===typeof b?(this.level=b.level||0,this.row=b.row||0,this.col=b.col||0,this.world=b.world||0):(this.level=+b||0,this.row=+h||0,this.col=+k||0,this.world=+g||0)}b.from=function(f,h,k,g){return b.pool.acquire(f,h,k,g)};b.getId=function(b,h,k,g){return"object"===typeof b?b.level+"/"+b.row+"/"+b.col+
"/"+b.world:b+"/"+h+"/"+k+"/"+g};Object.defineProperty(b.prototype,"id",{get:function(){return b.getId(this)},enumerable:!0,configurable:!0});b.prototype.equals=function(b){return this.level===b.level&&this.row===b.row&&this.col===b.col&&this.world===b.world};b.prototype.release=function(){this.world=this.col=this.row=this.level=0};b.prototype.set=function(b,h,k,g){var d=typeof b;"object"===d?(this.level=b.level||0,this.row=b.row||0,this.col=b.col||0,this.world=b.world||0):"string"===d?(b=b.split("/"),
h=b[1],k=b[2],g=b[3],this.level=parseFloat(b[0]),this.row=parseFloat(h),this.col=parseFloat(k),this.world=parseFloat(g)):(this.level=b,this.row=h,this.col=k,this.world=g);return this};b.prototype.toString=function(){return this.level+"/"+this.row+"/"+this.col+"/"+this.world};b.pool=new l(b,!0,null,25,50);return b}()})},"esri/views/2d/tiling/TileInfoView":function(){define("require exports ./LODInfo ./TileKey ./TileSpan ./TileCoverage".split(" "),function(b,h,l,k,f,n){var m=function(){function b(a,
b,d,g,f,h,k,m){this.x=a;this.ymin=b;this.ymax=d;this.invM=g;this.leftAdjust=f;this.rightAdjust=h;this.leftBound=k;this.rightBound=m}b.create=function(a,c){a[1]>c[1]&&(m=[c,a],a=m[0],c=m[1]);m=a[0];a=a[1];var d=c[0];c=c[1];var g=d-m,f=c-a,f=0!==f?g/f:0,h=(Math.ceil(a)-a)*f,k=(Math.floor(a)-a)*f;return new b(m,Math.floor(a),Math.ceil(c),f,0>g?h:k,0>g?k:h,0>g?d:m,0>g?m:d);var m};b.prototype.incrRow=function(){this.x+=this.invM};b.prototype.getLeftCol=function(){return Math.max(this.x+this.leftAdjust,
this.leftBound)};b.prototype.getRightCol=function(){return Math.min(this.x+this.rightAdjust,this.rightBound)};return b}(),g=[[0,0],[0,0],[0,0],[0,0]];return function(){function b(a,b){var c=this;this.tileInfo=a;this.fullExtent=b;this.scales=[];this._lodInfos=null;this._infoByScale={};this._infoByLevel={};var d=a.lods.slice();d.sort(function(a,b){return b.scale-a.scale});var g=this._lodInfos=d.map(function(c){return l.create(a,c,b)});d.forEach(function(a,b){c._infoByLevel[a.level]=g[b];c._infoByScale[a.scale]=
g[b];c.scales[b]=a.scale},this);this._wrap=a.isWrappable}b.prototype.getTileBounds=function(a,b){var c=this._infoByLevel[b.level];return c?c.getTileBounds(a,b):a};b.prototype.getTileCoords=function(a,b){var c=this._infoByLevel[b.level];return c?c.getTileCoords(a,b):a};b.prototype.getTileCoverage=function(a){var b=this.getClosestInfoForScale(a.scale),d=n.pool.acquire(b),h=this._wrap,k;k=Infinity;var l=-Infinity,v,y,p=d.spans;g[0][0]=g[0][1]=g[1][1]=g[3][0]=0;g[1][0]=g[2][0]=a.size[0];g[2][1]=g[3][1]=
a.size[1];for(var e=0;e<g.length;e++){var q=g[e];a.toMap(q,q);q[0]=b.getColumnForX(q[0]);q[1]=b.getRowForY(q[1])}a=[];q=3;for(e=0;4>e;e++){if(g[e][1]!==g[q][1]){var u=m.create(g[e],g[q]);k=Math.min(u.ymin,k);l=Math.max(u.ymax,l);void 0===a[u.ymin]&&(a[u.ymin]=[]);a[u.ymin].push(u)}q=e}if(null==k||null==l||100<l-k)return null;for(q=[];k<l;){null!=a[k]&&(q=q.concat(a[k]));v=Infinity;y=-Infinity;for(e=q.length-1;0<=e;e--)u=q[e],v=Math.min(v,u.getLeftCol()),y=Math.max(y,u.getRightCol());v=Math.floor(v);
y=Math.floor(y);if(k>=b.first[1]&&k<=b.last[1])if(h)if(b.size[0]<b.worldSize[0])for(u=Math.floor(y/b.worldSize[0]),e=Math.floor(v/b.worldSize[0]);e<=u;e++)p.push(new f(k,Math.max(b.getFirstColumnForWorld(e),v),Math.min(b.getLastColumnForWorld(e),y)));else p.push(new f(k,v,y));else v>b.last[0]||y<b.first[0]||(v=Math.max(v,b.first[0]),y=Math.min(y,b.last[0]),p.push(new f(k,v,y)));k+=1;for(e=q.length-1;0<=e;e--)u=q[e],u.ymax>=k?u.incrRow():q.splice(e,1)}return d};b.prototype.getTileIdAtParent=function(a,
b){b=k.pool.acquire(b);var c=this._infoByLevel[b.level];if(a.resolution<c.resolution)throw Error("Cannot calculate parent tile. destination LOD's resolution "+a.resolution+" is not a parent resolution of "+c.resolution);return a.resolution===c.resolution?b.id:k.getId(a.level,Math.floor(b.row*c.resolution/a.resolution+.01),Math.floor(b.col*c.resolution/a.resolution+.01),b.world)};b.prototype.getTileParentId=function(a){a=k.pool.acquire(a);var b=this._lodInfos.indexOf(this._infoByLevel[a.level])-1;
if(0>b)return k.pool.release(a),null;b=this.getTileIdAtParent(this._lodInfos[b],a);k.pool.release(a);return b};b.prototype.getTileResolution=function(a){return(a=this._infoByLevel[a.level])?a.resolution:-1};b.prototype.getTileScale=function(a){return(a=this._infoByLevel[a.level])?a.scale:-1};b.prototype.intersects=function(a,b){var c=k.pool.acquire(b);b=this._infoByLevel[c.level];var d=a.lodInfo;if(d.resolution>b.resolution){var g=k.pool.acquire(this.getTileIdAtParent(d,c)),f=d.denormalizeCol(g.col,
g.world);b=a.spans.some(function(a){return a.row===g.row&&a.colFrom<=f&&a.colTo>=f});k.pool.release(c);k.pool.release(g);return b}if(d.resolution<b.resolution){var h=a.spans.reduce(function(a,b){a[0]=Math.min(a[0],b.row);a[1]=Math.max(a[1],b.row);a[2]=Math.min(a[2],b.colFrom);a[3]=Math.max(a[3],b.colTo);return a},[Infinity,-Infinity,Infinity,-Infinity]);a=h[0];var m=h[1],p=h[2],h=h[3],e=b.denormalizeCol(c.col,c.world),q=d.getColumnForX(b.getXForColumn(e)),n=d.getRowForY(b.getYForRow(c.row)),e=d.getColumnForX(b.getXForColumn(e+
1))-1;b=d.getRowForY(b.getYForRow(c.row+1))-1;k.pool.release(c);return!(q>h||e<p||n>m||b<a)}var l=d.denormalizeCol(c.col,c.world);b=a.spans.some(function(a){return a.row===c.row&&a.colFrom<=l&&a.colTo>=l});k.pool.release(c);return b};b.prototype.getClosestInfoForScale=function(a){var b=this.scales;this._infoByScale[a]||(a=b.reduce(function(b,c,d,g){return Math.abs(c-a)<Math.abs(b-a)?c:b},b[0]));return this._infoByScale[a]};return b}()})},"esri/views/2d/tiling/LODInfo":function(){define(["require",
"exports","./TileKey","../../../geometry/support/spatialReferenceUtils"],function(b,h,l,k){function f(b,f,g){b[0]=f;b[1]=g;return b}return function(){function b(b,g,d,a,c,f,h,k,l,n,y,p){this.level=b;this.resolution=g;this.scale=d;this.origin=a;this.first=c;this.last=f;this.size=h;this.norm=k;this.worldStart=l;this.worldEnd=n;this.worldSize=y;this.wrap=p}b.create=function(h,g,d){var a=k.getInfo(h.spatialReference),c=[h.origin.x,h.origin.y],m=[h.size[0]*g.resolution,h.size[1]*g.resolution],l=[-Infinity,
-Infinity],n=[Infinity,Infinity],x=[Infinity,Infinity];d&&(f(l,Math.max(0,Math.floor((d.xmin-c[0])/m[0])),Math.max(0,Math.floor((c[1]-d.ymax)/m[1]))),f(n,Math.max(0,Math.floor((d.xmax-c[0])/m[0])),Math.max(0,Math.floor((c[1]-d.ymin)/m[1]))),f(x,n[0]-l[0]+1,n[1]-l[1]+1));var v;h.isWrappable?(h=[Math.ceil(Math.round(2*a.origin[1]/g.resolution)/h.size[0]),x[1]],a=[Math.floor((a.origin[0]-c[0])/m[0]),l[1]],d=[h[0]+a[0]-1,n[1]],v=!0):(a=l,d=n,h=x,v=!1);return new b(g.level,g.resolution,g.scale,c,l,n,x,
m,a,d,h,v)};b.prototype.normalizeCol=function(b){if(!this.wrap)return b;var g=this.worldSize[0];return 0>b?g-1-Math.abs((b+1)%g):b%g};b.prototype.denormalizeCol=function(b,g){return this.wrap?this.worldSize[0]*g+b:b};b.prototype.getWorldForColumn=function(b){return this.wrap?Math.floor(b/this.worldSize[0]):0};b.prototype.getFirstColumnForWorld=function(b){return b*this.worldSize[0]+this.first[0]};b.prototype.getLastColumnForWorld=function(b){return b*this.worldSize[0]+this.first[0]+this.size[0]-1};
b.prototype.getColumnForX=function(b){return(b-this.origin[0])/this.norm[0]};b.prototype.getXForColumn=function(b){return this.origin[0]+b*this.norm[0]};b.prototype.getRowForY=function(b){return(this.origin[1]-b)/this.norm[1]};b.prototype.getYForRow=function(b){return this.origin[1]-b*this.norm[1]};b.prototype.getTileBounds=function(b,g){g=l.pool.acquire(g);var d=this.denormalizeCol(g.col,g.world),a=g.row,c=this.getXForColumn(d),f=this.getYForRow(a+1),d=this.getXForColumn(d+1),a=this.getYForRow(a);
b[0]=c;b[1]=f;b[2]=d;b[3]=a;l.pool.release(g);return b};b.prototype.getTileCoords=function(b,g){g=l.pool.acquire(g);f(b,this.getXForColumn(this.denormalizeCol(g.col,g.world)),this.getYForRow(g.row));l.pool.release(g);return b};return b}()})},"esri/views/2d/tiling/TileSpan":function(){define(["require","exports","../../../core/ObjectPool"],function(b,h,l){return function(){function b(b,h,k){this.row=b;this.colFrom=h;this.colTo=k}b.pool=new l(b,!0);return b}()})},"esri/views/2d/tiling/TileCoverage":function(){define(["require",
"exports","../../../core/ObjectPool","../../../core/ArrayPool","./TileSpan"],function(b,h,l,k,f){return function(){function b(b){this.lodInfo=b;this.spans=k.acquire()}b.prototype.release=function(){for(var b=0,g=this.spans;b<g.length;b++)f.pool.release(g[b]);k.release(this.spans)};b.prototype.forEach=function(b,g){var d=this.spans,a=this.lodInfo,c=a.level;if(0!==d.length)for(var f=0;f<d.length;f++)for(var h=d[f],k=h.row,m=h.colTo,h=h.colFrom;h<=m;h++)b.call(g,c,k,a.normalizeCol(h),a.getWorldForColumn(h))};
b.pool=new l(b,!0);return b}()})},"esri/layers/support/GraphicsManager":function(){define(["../../core/Accessor"],function(b){var h=0;return b.createSubclass({constructor:function(){this._deletedGraphicsIndex=new Set;this._intentsIndex=new Map},destroy:function(){this.removeAll();this._intentsIndex=this._deletedGraphicsIndex=null},properties:{graphics:null,indexById:{value:null,dependsOn:["graphics","objectIdField"],get:function(){return this._createIndexById(this.graphics&&this.graphics.toArray(),
this.objectIdField)}},numGraphics:{value:0,dependsOn:["indexById"],get:function(){return this.indexById?this.indexById.size:0}},objectIdField:null},_intentsIndex:null,_oldIndex:null,_deletedGraphicsIndex:null,beginPagedUpdate:function(){this._oldIndex=this.indexById;this.indexById=null;this.notifyChange("numGraphics")},addPage:function(b,h){this.add(b,h)},revertPagedUpdate:function(){var b=this._removeLeftOnly(this.indexById,this._oldIndex);this.indexById=this._oldIndex;this._oldIndex=null;this.graphics.removeMany(b);
this.notifyChange("numGraphics")},endPagedUpdate:function(){var b=this._removeLeftOnly(this._oldIndex,this.indexById);this._oldIndex=null;this.graphics.removeMany(b);this.notifyChange("numGraphics")},findGraphic:function(b){return(b=this.indexById&&this.indexById.get(b))&&b.graphic},removeAll:function(){this.indexById=this._oldIndex=null;this.graphics.removeAll();this.notifyChange("numGraphics")},add:function(b,h){b&&b.length&&(this.indexById=this.indexById||new Map,b=this._updateAndExtractNew(b,
this.indexById,this._oldIndex,h),this.graphics.removeMany(b.toRemove),this.graphics.addMany(b.toAdd),this.notifyChange("numGraphics"))},remove:function(b){this._remove(b,!1)},delete:function(b){this._remove(b,!0)},isDeleted:function(b){return this._deletedGraphicsIndex.has(b)},createIntentToAdd:function(b){b&&this._intentsIndex.forEach(function(f,h){b.forEach(function(b){f.ignoredIds.add(b)})},this);var k=h++;this._intentsIndex.set(k,{ignoredIds:new Set});return k},findIntent:function(b){return this._intentsIndex.get(b)},
removeIntent:function(b){this._intentsIndex.delete(b)},_createIndexById:function(b,h){var f;if(b&&b.length&&h){var k,m,g;f=new Map;for(k=0;m=b[k];k++)g=m.attributes&&m.attributes[h],null!=g&&f.set(g,{graphic:m,refCount:1})}return f},_updateAndExtractNew:function(b,h,f,n){var k=[],g=[],d=b?b.length:0,a=this.objectIdField,c=this.findIntent(n);for(n=0;n<d;n++){var l=b[n],w=l.attributes&&l.attributes[a];if(null!=w){var t=f&&f.get(w);(t=h.get(w)||t)?c&&c.ignoredIds.has(w)||(h.set(w,{graphic:l,refCount:t.refCount+
1}),g.push(t.graphic),k.push(l)):this.isDeleted(w)||(h.set(w,{graphic:l,refCount:1}),k.push(l))}else k.push(l)}return{toRemove:g,toAdd:k}},_remove:function(b,h){b=b||[];b="object"===typeof b[0]?b.map(function(b){return b.attributes&&b.attributes[this.objectIdField]}.bind(this)):b;var f=this._extractGraphics(b,this._oldIndex),k=this._extractGraphics(b,this.indexById);b.forEach(function(b){h&&this._deletedGraphicsIndex.add(b);this._removeFromIndex(b,this._oldIndex,h);this._removeFromIndex(b,this.indexById,
h)}.bind(this));this.graphics.removeMany(f.concat(k));this.notifyChange("numGraphics")},_removeFromIndex:function(b,h,f){if(h&&h.has(b))if(f)h.delete(b);else{f=h.get(b);var k=f.refCount-1;0===k?h.delete(b):f.refCount=k}},_removeLeftOnly:function(b,h){var f=[];b&&b.forEach(function(k,m){var g=k.graphic;!g||h&&h.has(m)||(--k.refCount,0===k.refCount&&b.delete(m),f.push(g))});return f},_extractGraphics:function(b,h){return b&&h?b.map(function(b){return(b=h.get(b))&&b.graphic}):[]}})})},"esri/layers/graphics/controllers/SnapshotController":function(){define("dojo/_base/lang ../../support/GraphicsManager ../../../core/Accessor ../../../core/Error ../../../core/Promise ../../../core/Evented ../../../core/HandleRegistry ../../../core/Logger ../../../core/promiseUtils ../../../geometry/support/scaleUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a){var c=g.getLogger("esri.layers.graphics.controllers.SnapshotController");return l.createSubclass([f,n],{declaredClass:"esri.layers.graphics.controllers.SnapshotController",constructor:function(){this._handles=new m;this._pendingQueries=new Map},initialize:function(){var a=this.layer.then(function(){this._verifyCapabilities()}.bind(this));this.addResolvingPromise(a);this.then(this._init.bind(this))},destroy:function(){this.cancelQuery();this._gManager&&(this._gManager.destroy(),
this._gManager=null);this._handles.destroy();this._pendingQueries=this._handles=null},_cancelErrorMsg:"SnapshotController: query cancelled",_featureResolution:{value:.25,scale:945},_gManager:null,_handles:null,_maxFeatures:{point:16E3,multipoint:8E3,polyline:4E3,polygon:4E3,multipatch:4E3},_source:null,_started:!1,properties:{_pendingQueries:null,updating:{value:!1,dependsOn:["_pendingQueries"],get:function(){return!!(this._pendingQueries&&0<this._pendingQueries.size)}},graphics:{value:null,set:function(a){this._get("graphics")!==
a&&(this._handles.remove("graphics"),a&&(this._collectionChanged({added:a.toArray()}),this._handles.add(a.on("change",this._collectionChanged.bind(this)),"graphics")),this._set("graphics",a))}},extent:{},hasAllFeatures:!1,hasFeatures:!1,layer:null,layerView:null,maxPageSize:null,pageSize:null,paginationEnabled:!1},update:function(a){this.startup()},startup:function(){this._started||(this._started=!0,this._resolutionParams=this._getResolutionParams(),this._queryFeatures())},refresh:function(){this.isResolved()&&
this._started&&this._queryFeatures()},cancelQuery:function(){this._pendingQueries&&(this._pendingQueries.forEach(function(a,b){a.isFulfilled()||a.cancel(Error(this._cancelErrorMsg))}.bind(this)),this._pendingQueries.clear(),this.notifyChange("updating"))},_init:function(){var a=this.layer;this.paginationEnabled=!!a.get("capabilities.query.supportsPagination");this._source=a.source;this.pageSize=null==this.maxPageSize?a.maxRecordCount:Math.min(a.maxRecordCount,this.maxPageSize);this._gManager=new h({graphics:this.graphics,
objectIdField:a.objectIdField});this._setupStateWatchers()},_getResolutionParams:function(){var b=this.layer,c=b.get("capabilities.query.supportsQuantization"),d;if("polyline"===b.geometryType||"polygon"===b.geometryType){var g=a.getMetersPerUnit(this.layerView.view.spatialReference);null!=g&&(d=this._featureResolution.scale,g=this._featureResolution.value/g,d=b.maxScale?b.maxScale:b.minScale?Math.min(d,b.minScale):Math.min(d,a.getScale(this.layerView.view,b.fullExtent)),d*=g/this._featureResolution.scale)}return d?
{maxAllowableOffset:c?null:d,quantizationParameters:c?{mode:"view",originPosition:"upperLeft",tolerance:d,extent:b.fullExtent}:null}:null},_setupStateWatchers:function(){this._handles.add([this.watch("extent",this.refresh.bind(this)),this.layer.watch("definitionExpression",this.refresh.bind(this)),this.layer.on("edits",this._editsHandler.bind(this))])},_createQueryParams:function(){var a=this.layerView,c=this.layer.createQuery();c.outSpatialReference=a.view.spatialReference;c.geometry=this.extent;
b.mixin(c,this._resolutionParams);this.paginationEnabled&&(c.start=0,c.num=this.pageSize);return c},_queryFeatures:function(){this.cancelQuery();this.hasAllFeatures=this.hasFeatures=!1;this._gManager.beginPagedUpdate();this.emit("query-start");this._executeQuery(this._createQueryParams())},_executeQuery:function(a){var b=this._source.queryFeatures(a),c=this._gManager.createIntentToAdd();this._querySetup(c,b);b.then(this._processFeatureSet.bind(this,a,c)).otherwise(this._queryError.bind(this,c)).always(this._queryTeardown.bind(this,
c))},_processFeatureSet:function(a,b,d){var g=d.exceededTransferLimit,f=d.features,h=this._maxFeatures[this.layer.geometryType]||0,p=f?f.length:0,e=this._gManager.numGraphics+p,k=e>=h;k&&(c.warn('Feature limit exceeded on layer "',this.layer.title,'". Not all features are shown.'),(h=e-h)&&f.splice(p-h,h));a=g&&this.paginationEnabled&&!k?this._queryNextPage(a):!1;f&&this._gManager.addPage(f,b);this.hasFeatures=!0;a||(this._gManager.endPagedUpdate(),this.hasAllFeatures=!g,this.emit("query-end",{success:!0}));
return d},_queryNextPage:function(a){a.start+=this.pageSize;this._executeQuery(a);return!0},_queryError:function(a,b){b&&"cancel"===b.dojoType&&!this.hasFeatures?this._gManager.revertPagedUpdate():this._gManager.endPagedUpdate();this.emit("query-end",{success:!1});if(b&&"cancel"===b.dojoType)return d.reject(b);a=new k("snapshotcontroller:tile-request-failed","Failed to query for features",{error:b});c.error(a);return d.reject(a)},_querySetup:function(a,b){this._pendingQueries.set(a,b);this.notifyChange("updating")},
_queryTeardown:function(a){this._gManager.removeIntent(a);this._pendingQueries.delete(a);this.notifyChange("updating")},_collectionChanged:function(a){var b,c,d;if(d=a.added)for(b=0;c=d[b];b++)c.layer=this.layer;if(d=a.removed)for(b=0;c=d[b];b++)c.layer=null},_editsHandler:function(a){var b=function(a){return a.objectId},c=a.deletedFeatures.map(b);this._gManager.delete(c);a=a.addedFeatures.concat(a.updatedFeatures).map(b);a.length&&(b=this._createQueryParams(),b.objectIds=a,b=this._source.queryFeatures(b),
a=this._gManager.createIntentToAdd(a),this._querySetup(a,b),b.then(this._processRefetch.bind(this,a)).otherwise(this._refetchError.bind(this,a)).always(this._queryTeardown.bind(this,a)))},_processRefetch:function(a,b){(b=b.features)&&this._gManager.add(b,a)},_refetchError:function(a,b){},_verifyCapabilities:function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new k("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",
{layer:this.layer});}})})},"esri/layers/graphics/sources/FeatureLayerSource":function(){define("dojo/_base/lang ../../../core/Accessor ../../../core/Promise ../../../core/urlUtils ../../../core/Error ../../../request ../../../tasks/QueryTask".split(" "),function(b,h,l,k,f,n,m){return h.createSubclass([l],{getDefaults:function(g){var d=this.inherited(arguments),a=g.layer;a&&(d=b.mixin(d,{url:a.url,layerId:a.layerId,gdbVersion:a.gdbVersion}));return d},initialize:function(){this.addResolvingPromise(this._fetchService())},
properties:{layer:{},layerId:{},gdbVersion:{},parsedUrl:{dependsOn:["url","layerId"],get:function(){var b=this.url?k.urlToObject(this.url):null;null!=this.layerId&&null!=b&&(b.path=k.join(b.path,this.layerId.toString()));return b}},queryTask:{dependsOn:["parsedUrl","gdbVersion"],get:function(){return new m({url:this.parsedUrl.path,gdbVersion:this.gdbVersion})}},url:{}},applyEdits:function(b){var d=b.addFeatures.map(this._serializeFeature.bind(this)),a=b.updateFeatures.map(this._serializeFeature.bind(this));
b=this._getFeatureIds(b.deleteFeatures);d={f:"json",adds:d.length?JSON.stringify(d):null,updates:a.length?JSON.stringify(a):null,deletes:b.length?b.join(","):null};return n(this.parsedUrl.path+"/applyEdits",{query:d,method:"post",responseType:"json",callbackParamName:"callback"}).then(this._createEditsResult.bind(this))},queryFeatures:function(b){return this.queryTask.execute(b)},queryObjectIds:function(b){return this.queryTask.executeForIds(b)},queryFeatureCount:function(b){return this.queryTask.executeForCount(b)},
queryExtent:function(b){return this.queryTask.executeForExtent(b)},_updateUrl:function(b){b&&(this.url=this.url.replace(/^http:/i,"https:"))},_fetchService:function(){return null==this.layerId?n(this.url,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(b){this._updateUrl(b.ssl);(b=b.data)&&b.layers&&b.layers[0]&&(this.layerId=b.layers[0].id);return this._fetchServiceLayer()}.bind(this)):this._fetchServiceLayer()},_fetchServiceLayer:function(){return n(this.parsedUrl.path,
{query:b.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"}).then(function(b){this._updateUrl(b.ssl);this.layerDefinition=b.data}.bind(this))},_serializeFeature:function(b){var d=b.geometry;b=b.attributes;return{geometry:d&&d.toJSON(),attributes:b}},_getFeatureIds:function(b){var d=this.layer.objectIdField,a=b[0],c=!(!a||null==a.objectId),g=!(!a||!a.attributes);return b.map(function(a){var b=null;c?b=a.objectId:g&&(b=a.attributes&&a.attributes[d]);return b},this)},
_createEditsResult:function(b){var d={};b=b.data;d.addFeatureResults=b.addResults?b.addResults.map(this._createFeatureEditResult.bind(this)):[];d.updateFeatureResults=b.updateResults?b.updateResults.map(this._createFeatureEditResult.bind(this)):[];d.deleteFeatureResults=b.deleteResults?b.deleteResults.map(this._createFeatureEditResult.bind(this)):[];return d},_createFeatureEditResult:function(b){var d=b.success?null:b.error||{};return{objectId:b.objectId,globalId:b.globalId,error:d?new f("feature-layer-source:edit-failure",
d.description,{code:d.code}):null}}})})},"esri/layers/graphics/sources/MemorySource":function(){define("../../../core/Collection ../../../core/Promise ../../../core/promiseUtils ../../../core/Error ../../../tasks/support/FeatureSet ../../../Graphic ../QueryEngine".split(" "),function(b,h,l,k,f,n,m){return b.ofType(n).createSubclass([h],{properties:{layer:{value:null},_queryEngine:{value:null,dependsOn:["layer.loaded"],get:function(){return this.get("layer.loaded")?new m({features:this,objectIdField:this.layer.objectIdField}):
null}}},queryFeatures:function(b){return this._queryEngine?this._queryEngine.queryFeatures(b).then(function(b){var a=new f;a.features=b;return a}):this._rejectQuery("Not ready to execute query")},queryObjectIds:function(b){return this._queryEngine?this._queryEngine.queryObjectIds(b):this._rejectQuery("Not ready to execute query")},queryFeatureCount:function(b){return this._queryEngine?this._queryEngine.queryFeatureCount(b):this._rejectQuery("Not ready to execute query")},queryExtent:function(b){return this._queryEngine?
this._queryEngine.queryExtent(b):this._rejectQuery("Not ready to execute query")},_rejectQuery:function(b){return l.reject(new k("MemorySource",b))}})})},"esri/layers/graphics/QueryEngine":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Error ../../core/promiseUtils ../../geometry/support/graphicsUtils".split(" "),function(b,h,l,k,f,n,m,g,d){return function(a){function b(){var b=
null!==a&&a.apply(this,arguments)||this;b.features=null;b.objectIdField=null;return b}l(b,a);b.prototype.queryFeatures=function(a){if(this.features)if(a)if(this._isSupportedQuery(a)){var b=this._createFilters(a);a=b.length?this._executeQuery(a,b):this._rejectQuery("Invalid query")}else a=this._rejectQuery("Unsupported query");else a=this._returnAllFeatures();else a=this._rejectQuery("Engine not initialized");return a};b.prototype.queryObjectIds=function(a){return this.objectIdField?this.queryFeatures(a).then(this._getObjectIds.bind(this)):
this._rejectQuery("Unsupported query")};b.prototype.queryFeatureCount=function(a){return this.queryFeatures(a).then(function(a){return a.length})};b.prototype.queryExtent=function(a){var b=this;return this.queryFeatures(a).then(function(a){return{count:a.length,extent:b._getExtent(a)}})};b.prototype._returnAllFeatures=function(){return g.resolve(this.features.toArray())};b.prototype._executeQuery=function(a,b){var c=this,d=this.features.filter(function(d){return b.every(function(b){return b.call(c,
d,a)})});return g.resolve(d.toArray())};b.prototype._isSupportedQuery=function(a){var b=!0;if(null!=a.distance||null!=a.geometryPrecision||a.groupByFieldsForStatistics&&a.groupByFieldsForStatistics.length||null!=a.maxAllowableOffset||a.multipatchOption||null!=a.num||a.orderByFields&&a.orderByFields.length||a.outFields&&a.outFields.length||a.outSpatialReference||a.outStatistics&&a.outStatistics.length||a.pixelSize||a.quantizationParameters||a.relationParam||a.returnDistinctValues||null!=a.start||a.text||
a.timeExtent||a.where||a.objectIds&&a.objectIds.length&&!this.objectIdField)b=!1;return b};b.prototype._createFilters=function(a){var b=[];a.objectIds&&a.objectIds.length&&b.push(this._createObjectIdFilter());a.geometry&&"extent"===a.geometry.type&&"intersects"===a.spatialRelationship&&b.push(this._createExtentFilter());return b};b.prototype._createExtentFilter=function(){return function(a,b){a=a.geometry;b=b.geometry;return a&&b.intersects(a)}};b.prototype._createObjectIdFilter=function(){var a=
this;return function(b,c){b=b.attributes;return-1<c.objectIds.indexOf(b&&b[a.objectIdField])}};b.prototype._rejectQuery=function(a){return g.reject(new m(this.declaredClass,a))};b.prototype._getObjectIds=function(a){var b=this.objectIdField,c=[];a.forEach(function(a){a=(a=a.attributes)&&a[b];null!=a&&c.push(a)});return c};b.prototype._getExtent=function(a){return a.length?d.graphicsExtent(a):null};k([f.property()],b.prototype,"features",void 0);k([f.property()],b.prototype,"objectIdField",void 0);
return b=k([f.subclass("esri.layers.graphics.QueryEngine")],b)}(f.declared(n))})},"esri/layers/TileLayer":function(){define("dojo/_base/lang dojo/io-query ../request ../core/urlUtils ../core/promiseUtils ../geometry/SpatialReference ./TiledLayer ./mixins/ArcGISMapService ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./support/arcgisLayers ./support/arcgisLayerUrl".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w,t){return m.createSubclass([g,d,
a,c,r],{declaredClass:"esri.layers.TileLayer",_mapsWithAttribution:"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(" "),_TILE_FORMATS:{PNG:"png",PNG8:"png",PNG24:"png",
PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"},_attributionServices:["services.arcgisonline.com/arcgis/rest/services","servicesdev.arcgisonline.com/arcgis/rest/services","servicesqa.arcgisonline.com/arcgis/rest/services"],normalizeCtorArgs:function(a,c){return"string"===typeof a?b.mixin({},{url:a},c):a},load:function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service","Map Service"]}).always(this._fetchService.bind(this)))},properties:{operationalLayerType:{get:function(){if(this.capabilities)return-1!==
this.capabilities.indexOf("Map")?"ArcGISTiledMapServiceLayer":"ArcGISTiledImageServiceLayer";var a=this.url||this.portalItem&&this.portalItem.url;return a&&/\/ImageServer(\/|\/?$)/i.test(a)?"ArcGISTiledImageServiceLayer":"ArcGISTiledMapServiceLayer"}},attributionDataUrl:{dependsOn:["parsedUrl"],get:function(){return this._getDefaultAttribution(this._getMapName(this.parsedUrl.path.toLowerCase()))}},popupTemplates:null,tileServers:{dependsOn:["parsedUrl"],value:null,cast:function(a){return Array.isArray(a)?
a.map(function(a){return k.urlToObject(a).path}):null},get:function(){return this._getDefaultTileServers(this.parsedUrl.path)}},type:{value:"tile",json:{read:!1}},spatialReference:{json:{read:{source:["spatialReference","tileInfo"],reader:function(a,b){return(a=a||b.tileInfo&&b.tileInfo.spatialReference)&&n.fromJSON(a)}}}}},getTileUrl:function(a,b,c){var d=this.tileServers,e=this.parsedUrl.query?h.objectToQuery(this.parsedUrl.query):"";this.token&&(e=e+(e?"\x26":"")+"token\x3d"+encodeURIComponent(this.token));
this.resampling&&!this.tilemapCache&&this.supportsBlankTile&&(e=e+(e?"\x26":"")+"blankTile\x3dfalse");this.refreshTimestamp&&(e=e+(e?"\x26":"")+"_ts\x3d"+this.refreshTimestamp);return(d&&d.length?d[b%d.length]:this.parsedUrl.path)+"/tile/"+a+"/"+b+"/"+c+(e?"?"+e:"")},_fetchService:function(){return f.resolve().then(function(){return this.resourceInfo||l(this.parsedUrl.path,{query:b.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"})}.bind(this)).then(function(a){a.ssl&&
(this.url=this.url.replace(/^http:/i,"https:"));this.read(a.data,{origin:"service",url:this.parsedUrl});if(10.1===this.version&&!t.isHostedAgolService(this.url))return w.fetchServerVersion(this.url).then(function(a){this.read({currentVersion:a})}.bind(this)).otherwise(function(){})}.bind(this))},_getMapName:function(a){return(a=a.match(/^(?:https?:)?\/\/(server|services)\.arcgisonline\.com\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i))&&a[2]},_getDefaultAttribution:function(a){if(a){var b;
a=a.toLowerCase();for(var c=0,d=this._mapsWithAttribution.length;c<d;c++)if(b=this._mapsWithAttribution[c],-1<b.toLowerCase().indexOf(a))return k.makeAbsolute("//static.arcgis.com/attribution/"+b)}},_getDefaultTileServers:function(a){var b=-1!==a.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),c=-1!==a.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return b||c?[a,a.replace(b?/server\.arcgisonline/i:/services\.arcgisonline/i,b?"services.arcgisonline":"server.arcgisonline")]:[]}})})},
"esri/layers/mixins/RefreshableLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),function(b,h,l,k,f,n){return function(b){function g(){var d=null!==b&&b.apply(this,arguments)||this;d.refreshInterval=0;return d}l(g,b);g.prototype.refresh=function(){this.emit("refresh")};k([f.property({json:{read:{source:"refreshInterval"},write:{target:"refreshInterval"},origins:{webScene:{read:!1,
write:!1}}}})],g.prototype,"refreshInterval",void 0);return g=k([f.subclass("esri.layers.mixins.RefreshableLayer")],g)}(f.declared(n))})},"esri/layers/support/arcgisLayers":function(){define("require exports dojo/_base/lang dojo/when ./arcgisLayerUrl ../../core/promiseUtils ../../core/requireUtils ../../request ../../core/Error ./arcgisLayerUrl".split(" "),function(b,h,l,k,f,n,m,g,d,a){function c(a,b){return a.sublayerIds.map(function(c){return new a.Constructor(l.mixin({},b,{layerId:c,sublayerTitleMode:"service-name"}))})}
function r(c){var g=a.parse(c);if(!g)return n.reject(new d("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:c}));var e=g.serverType,f=g.sublayer,h={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(e){case "MapServer":e=null!=f?"FeatureLayer":t(c).then(function(a){return a?"TileLayer":"MapImageLayer"});break;case "ImageServer":e=v(c).then(function(a){var b=a.tileInfo&&a.tileInfo.format;return a.tileInfo?b&&"LERC"===
b.toUpperCase()&&a.cacheType&&"elevation"===a.cacheType.toLowerCase()?"ElevationLayer":"TileLayer":"ImageryLayer"});break;case "SceneServer":e=v(g.url.path).then(function(a){var b={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer"};return a&&Array.isArray(a.layers)&&0<a.layers.length&&(a=a.layers[0].layerType,null!=b[a])?b[a]:"SceneLayer"});break;default:e=h[e]}var l={FeatureLayer:!0,SceneLayer:!0},r={parsedUrl:g,Constructor:null,sublayerIds:null},
y;return k(e).then(function(a){y=a;if(l[a]&&null==f)return w(c).then(function(a){1!==a.length&&(r.sublayerIds=a)})}).then(function(){return m.when(b,"../"+y)}).then(function(a){r.Constructor=a;return r})}function w(a){return v(a).then(function(a){return a&&Array.isArray(a.layers)?a.layers.map(function(a){return a.id}).reverse():[]})}function t(a){return v(a).then(function(a){return a.tileInfo})}function x(a,b){a=a.Constructor.prototype.declaredClass;return"esri.layers.FeatureLayer"===a||"esri.layers.StreamLayer"===
a?l.mixin({returnZ:!0,outFields:["*"]},b):b}function v(a){return g(a,{responseType:"json",callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(h,"__esModule",{value:!0});h.fromUrl=function(a){return r(a.url).then(function(d){var e=x(d,l.mixin({},a.properties,{url:a.url}));return d.sublayerIds?m.when(b,"../GroupLayer").then(function(a){var b=new a({title:d.parsedUrl.title});c(d,e).forEach(function(a){return b.add(a)});return n.resolve(b)}):n.resolve(new d.Constructor(e))})};
h.fetchServerVersion=function(a){if(!f.test(a))return n.reject();a=a.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return g(a,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){return a.data&&a.data.currentVersion?a.data.currentVersion:n.reject()})}})},"esri/layers/FeatureLayer":function(){define("require dojo/_base/lang dojo/io-query ../Graphic ../PopupTemplate ../request ../core/kebabDictionary ../core/MultiOriginJSONSupport ../core/Collection ../core/Error ../core/Logger ../core/lang ../core/HandleRegistry ../core/promiseUtils ../core/requireUtils ../core/urlUtils ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ../geometry/support/normalizeUtils ../symbols/SimpleMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleFillSymbol ../symbols/support/jsonUtils ../symbols/support/ElevationInfo ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/support/jsonUtils ../renderers/support/styleUtils ../renderers/support/typeUtils ../tasks/support/FeatureSet ../tasks/support/Query ./Layer ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/ScaleRangeLayer ./mixins/RefreshableLayer ./mixins/ArcGISService ./graphics/sources/MemorySource ./support/Field ./support/fieldUtils ./support/FeatureType ./support/FeatureTemplate ./support/LabelClass ./support/labelingInfo ./support/arcgisLayerUrl ./support/commonProperties".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q,u,z,C,B,F,D,E,I,J,U,P,H,K,G,S,O,da,N,M,ca,W,X,ga,fa,T,ka,ja){m=m({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});var ha=c.getLogger("esri.layers.FeatureLayer");c=function(a,b){a=P.fromJSON(b.featureSet);return new M({layer:this,items:a&&a.features||[]})};var sa=K.createSubclass([G,S,O,da,N,g],{declaredClass:"esri.layers.FeatureLayer",viewModulePaths:{"2d":"../views/2d/layers/FeatureLayerView2D",
"3d":"../views/3d/layers/FeatureLayerView3D"},constructor:function(){this._handles=new w},normalizeCtorArgs:function(a,b){return"string"===typeof a?h.mixin({},{url:a},b):a},load:function(){var b;b=this.source&&(Array.isArray(this.source)||this.source.isInstanceOf&&this.source.isInstanceOf(d));b=this.portalItem&&b?t.resolve():this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]}).always(function(){if(this.url&&null==this.layerId&&/FeatureServer\/*$/i.test(this.url))return this._fetchFirstLayerId().then(function(a){null!=
a&&(this.layerId=a)}.bind(this))}.bind(this)).then(function(){if(!this.url&&!this._hasMemorySource())throw new a("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.createGraphicsSource().then(this._initLayerProperties.bind(this))}.bind(this));this.addResolvingPromise(b)},_handles:null,properties:{advancedQueryCapabilities:{json:{origins:{service:{read:{source:["advancedQueryCapabilities","supportsStatistics","supportsAdvancedQueries"],
reader:function(a,b){return this._readAdvancedQueryCapabilities(b)}}}},read:{source:["layerDefinition.supportsAdvancedQueries","layerDefinition.supportsStatistics"],reader:function(a,b){return this._readAdvancedQueryCapabilities(b.layerDefinition)}}}},featureReduction:{json:{origins:{webScene:{read:{source:"layerDefinition.featureReduction"},write:{target:"layerDefinition.featureReduction"}}}}},allowGeometryUpdates:{json:{origins:{service:{read:{reader:function(a){return this._readAllowGeometryUpdates(a)}}}},
read:{source:"layerDefinition.allowGeometryUpdates",reader:function(a){return this._readAllowGeometryUpdates(a)}}}},allRenderers:{readOnly:!0,dependsOn:["loaded","renderer","fields"],get:function(){return this._getAllRenderers(this.renderer)}},capabilities:{json:{origins:{service:{read:{source:"advancedQueryCapabilities supportsStatistics supportsAdvancedQueries hasAttachments hasM hasZ supportsCalculate supportsTruncate supportsValidateSql supportsCoordinatesQuantization useStandardizedQueries ownershipBasedAccessControlForFeatures allowGeometryUpdates supportsApplyEditsWithGlobalIds supportsRollbackOnFailureParameter allowUpdateWithoutMValues supportsAttachmentsByUploadId capabilities".split(" "),
reader:function(a,b){return this._readCapabilities(a,b)}}}},read:{source:"layerDefinition.capabilities layerDefinition.advancedQueryCapabilities layerDefinition.supportsStatistics layerDefinition.supportsAdvancedQueries layerDefinition.hasAttachments layerDefinition.hasM layerDefinition.hasZ layerDefinition.supportsCalculate layerDefinition.supportsTruncate layerDefinition.supportsValidateSql layerDefinition.supportsCoordinatesQuantization layerDefinition.useStandardizedQueries layerDefinition.ownershipBasedAccessControlForFeatures layerDefinition.allowGeometryUpdates layerDefinition.supportsApplyEditsWithGlobalIds layerDefinition.supportsRollbackOnFailureParameter layerDefinition.allowUpdateWithoutMValues layerDefinition.supportsAttachmentsByUploadId".split(" "),
reader:function(a,b){return this._readCapabilities(b.layerDefinition.capabilities,b.layerDefinition)}}},dependsOn:["loaded"],get:function(){var a=this._get("capabilities");a||!this.loaded||this.hasService||(a={data:{supportsAttachment:!1,supportsM:!1,supportsZ:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!0,supportsDelete:!0,supportsEditing:!0,supportsQuery:!0,supportsUpdate:!0},query:{supportsStatistics:!1,supportsCentroid:!1,supportsDistance:!1,supportsDistinct:!1,
supportsExtent:!0,supportsGeometryProperties:!1,supportsOrderBy:!1,supportsPagination:!1,supportsQuantization:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsQueryByOthers:!1},queryRelated:{supportsPagination:!1,supportsCount:!1,supportsOrderBy:!1},editing:{supportsGeometryUpdate:!0,supportsGlobalId:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,
supportsUpdateByOthers:!1}});return a}},copyright:{value:null,json:{origins:{service:{read:{source:"copyrightText"}}},read:{source:"layerDefinition.copyrightText"}}},displayField:{value:null,json:{origins:{service:{read:{source:"displayField"}}},read:{source:"layerDefinition.displayField"}}},definitionExpression:{value:null,json:{origins:{service:{read:!1,write:!1}},read:{source:"layerDefinition.definitionExpression"},write:{target:"layerDefinition.definitionExpression"}}},defaultSymbol:{json:{read:B.read}},
elevationInfo:{type:F,value:null,json:{origins:{service:{read:{source:"elevationInfo"},write:{target:"elevationInfo",enabled:!1}}},read:{source:"layerDefinition.elevationInfo"},write:{target:"layerDefinition.elevationInfo"}}},fields:{value:null,type:[ca],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.fields"}}},fullExtent:{value:null,type:y,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}},gdbVersion:null,generalizeForScale:4E3,geometryType:{json:{origins:{service:{read:m.fromJSON}},
read:{source:"layerDefinition.geometryType",reader:m.fromJSON}}},hasAttachments:{value:!1,readOnly:!0,get:function(){return!this._hasMemorySource()&&this._get("hasAttachments")},json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasAttachments"}}},hasM:{value:!1,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}},hasZ:{value:!1,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}},heightModelInfo:{value:null,readOnly:!0,type:p},id:{json:{origins:{service:{read:!1},
portalItem:{read:!1}}}},isTable:{value:!1,readOnly:!0,json:{origins:{service:{read:{source:"type",reader:function(a){return"Table"===a}}}},read:{source:"layerDefinition.type",reader:function(a){return"Table"===a}}}},hasService:{dependsOn:["loaded","url","source"],readOnly:!0,get:function(){return!this._hasMemorySource()}},labelsVisible:{value:!1,json:{read:{source:["showLabels"],reader:function(a,b){return!!b.showLabels}},write:function(a,b){b.showLabels=!!a}}},labelingInfo:{value:null,type:[fa],
json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:T.reader},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:T.reader},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}},layerId:{json:{origins:{service:{read:{source:["id"],reader:function(a,b){return b.id}}}},read:!1}},legendEnabled:{value:!0,json:{read:{source:["showLegend"],reader:function(a,b){return null!=b.showLegend?b.showLegend:!0}},write:function(a,
b){b.showLegend=!!a}}},maxRecordCount:{value:null,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.maxRecordCount"}}},minScale:{json:{origins:{service:{read:{source:["minScale","effectiveMinScale"],reader:function(a,b){return b.effectiveMinScale||a}},write:{target:["minScale"],enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},maxScale:{json:{origins:{service:{read:{source:["maxScale","effectiveMaxScale"],reader:function(a,b){return b.effectiveMaxScale||
a}},write:{target:"maxScale",enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},objectIdField:{json:{origins:{service:{read:{source:["objectIdField","fields"],reader:function(a,b){return this._readObjectIdField(b)}}}},read:{source:["layerDefinition.objectIdField","layerDefinition.fields"],reader:function(a,b){return this._readObjectIdField(b.layerDefinition)}}}},operationalLayerType:"ArcGISFeatureLayer",outFields:{value:null,dependsOn:["requiredFields"],
get:function(){var a=this._get("outFields"),b=this.requiredFields;a?-1===a.indexOf("*")&&b.forEach(function(b){-1===a.indexOf(b)&&a.push(b)}):a=b;this.loaded&&(a=a.filter(function(a){return"*"===a||!!this.getField(a)},this),a=a.map(function(a){return"*"===a?a:this.getField(a).name},this),a=a.filter(function(a,b,c){return c.indexOf(a)===b}));return a},set:function(a){var b=this.requiredFields;a?-1===a.indexOf("*")&&b.forEach(function(b){-1===a.indexOf(b)&&a.push(b)}):a=b;this.loaded&&(a=a.filter(function(a){return"*"===
a||!!this.getField(a)},this),a=a.map(function(a){return"*"===a?a:this.getField(a).name},this));this._set("outFields",a)}},parsedUrl:{dependsOn:["layerId"],get:function(){var a=this.url?v.urlToObject(this.url):null;null!=this.layerId&&null!=a&&(a.path=v.join(a.path,this.layerId.toString()));return a}},popupEnabled:{value:!0,json:{read:{source:["disablePopup"],reader:function(a,b){return null!=b.disablePopup?!b.disablePopup:!0}},write:function(a,b){a||(b.disablePopup=!0)}}},popupTemplate:{value:null,
type:f,json:{read:{source:["popupInfo"],reader:function(a,b){return b.popupInfo?f.fromJSON(b.popupInfo):null}},write:function(a,b){a&&(b.popupInfo=a.toJSON())}}},relationships:null,renderer:{types:U.types,set:function(a){var b=this._getAllRenderers(a);W.fixRendererFields(b,this.fields);this._set("renderer",a)},json:{origins:{service:{read:{source:["drawingInfo.renderer","defaultSymbol","type"],reader:function(a,b,c){return this._readRenderer(null,b,c)}},write:{target:"drawingInfo.renderer",enabled:!1}}},
read:{source:["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol","layerDefinition.type"],reader:function(a,b,c){return this._readRenderer(null,b.layerDefinition,c)}},write:{target:"layerDefinition.drawingInfo.renderer"}}},requiredFields:{dependsOn:["allRenderers"],get:function(){var a=this.timeInfo,a=[this.objectIdField,this.typeIdField,this.editFieldsInfo&&this.editFieldsInfo.creatorField,a&&a.startTimeField,a&&a.endTimeField,this.trackIdField],b=[],c=[];this.allRenderers.forEach(function(a){b=
b.concat(a.requiredFields)});this.labelingInfo&&this.labelingInfo.length&&this.labelingInfo.forEach(function(a){c=c.concat(a.requiredFields)});a=a.concat(b);a=a.concat(c);return a.filter(function(a,b,c){return!!a&&c.indexOf(a)===b&&"function"!==typeof a})}},returnM:!1,returnZ:!1,screenSizePerspectiveEnabled:ja.screenSizePerspectiveEnabled,source:{json:{origins:{portalItem:{read:{source:["featureSet"],reader:c}},webMap:{read:{source:["featureSet"],reader:c}}}},cast:function(a){return a&&(Array.isArray(a)||
a.isInstanceOf&&a.isInstanceOf(d))?new M({layer:this,items:a}):a},set:function(a){var b=this._get("source");b!==a&&(b&&b.isInstanceOf&&b.isInstanceOf(M)&&this._resetMemorySource(b),a&&a.isInstanceOf&&a.isInstanceOf(M)&&this._initMemorySource(a),this._set("source",a))}},supportsCoordinatesQuantization:!1,serviceDefinitionExpression:{json:{origins:{service:{read:{source:["definitionExpression"],reader:function(a,b){return b.definitionExpression}}}}}},spatialReference:{json:{origins:{service:{read:{source:"extent",
reader:function(a){if(a&&a.spatialReference)return e.fromJSON(a.spatialReference)}}}},read:{source:"layerDefinition.extent",reader:function(a){if(a&&a.spatialReference)return e.fromJSON(a.spatialReference)}}}},templates:{type:[ga],json:{read:function(a,b){var c=b.editFieldsInfo;b=c&&c.creatorField;c=c&&c.editorField;a=a&&a.map(function(a){return ga.fromJSON(a)});this._fixTemplates(a,b);this._fixTemplates(a,c);return a}}},title:{json:{origins:{portalItem:{read:{source:["layerDefinition.title","layerDefinition.name",
"title"],reader:function(a,b){a=b.layerDefinition&&b.layerDefinition.name;b=b.title||b.layerDefinition&&b.layerDefinition.title;if(a)return this._readTitleFromName(a);if("item-title"===this.sublayerTitleMode&&b)return b}}},webMap:{read:{source:["layerDefinition.name","title"],reader:function(a,b){return(a=b.layerDefinition&&b.layerDefinition.name)?a:b.title}}},service:{read:{source:"name",reader:function(a,b){return this._readTitleFromName(a)}}}}}},sublayerTitleMode:{type:String,value:"item-title"},
trackIdField:{json:{read:{source:["timeInfo.trackIdField"],reader:function(a,b){return b.timeInfo.trackIdField}}}},type:{value:"feature",json:{read:!1}},typeIdField:{json:{origins:{service:{read:function(a,b){return this._readTypeIdField(a,b)}}},read:{source:"layerDefinition.typeIdField",reader:function(a,b){return this._readTypeIdField(a,b.layerDefinition)}}}},types:{json:{origins:{service:{read:function(a,b){return this._readTypes(a,b)}}},read:{source:"layerDefinition.types",reader:function(a,b){return this._readTypes(a,
b.layerDefinition)}}}},url:{set:function(a){var b=v.urlToObject(a),c=ka.parse(b.path);c&&null!=c.sublayer&&(null==this.layerId&&(this.layerId=c.sublayer),b=l.objectToQuery(b.query),a=c.url.path,b&&(a=a+"?"+b));this._set("url",a)},json:{write:function(a,b){a&&v.isProtocolRelative(a)&&(a="https:"+a);a&&(a=v.normalize(a),b.url=a);null!=this.layerId&&(a=v.urlToObject(a))&&(b.url=v.join(a.path,""+this.layerId),a.query&&Object.keys(a.query)&&(b.url+="?"+l.objectToQuery(a.query)))}}},userIsAdmin:!1,version:{json:{origins:{service:{read:{source:"currentVersion capabilities drawingInfo hasAttachments htmlPopupType relationships timeInfo typeIdField types".split(" "),
reader:function(a,b){return this._readVersion(b)}}},portalItem:{read:!1}},read:{source:"layerDefinition.currentVersion layerDefinition.capabilities layerDefinition.drawingInfo layerDefinition.hasAttachments layerDefinition.htmlPopupType layerDefinition.typeIdField layerDefinition.types".split(" "),reader:function(a,b){return this._readVersion(b.layerDefinition)}}}},visible:{json:{origins:{portalItem:{read:{source:["visibility","layerDefinition.defaultVisibility"],reader:function(a,b){if(b.layerDefinition&&
null!=b.layerDefinition.defaultVisibility)return!!b.layerDefinition.defaultVisibility;if(null!=b.visibility)return!!b.visibility}},write:{target:"layerDefinition.defaultVisibility"}}}}}},applyEdits:function(b){return this.load().then(function(){return this.source.applyEdits?this._processApplyEditsParams(b).then(function(a){return this.source.applyEdits(a).then(function(a){var b=function(a){return a.filter(function(a){return!a.error}).map(function(a){return r.clone(a)})},b={addedFeatures:b(a.addFeatureResults),
updatedFeatures:b(a.updateFeatureResults),deletedFeatures:b(a.deleteFeatureResults)};(b.addedFeatures.length||b.updatedFeatures.length||b.deletedFeatures.length)&&this.emit("edits",b);return a}.bind(this))}.bind(this)):t.reject(new a("FeatureLayer","Layer source does not support applyEdits capability"))}.bind(this))},createGraphicsSource:function(){return this._hasMemorySource()?(this.emit("graphics-source-create",{graphicsSource:this.source}),t.resolve(this.source)):x.when(b,"./graphics/sources/FeatureLayerSource").then(function(a){return new a({layer:this})}.bind(this)).then(function(a){this.emit("graphics-source-create",
{graphicsSource:a});return a}.bind(this))},createGraphicsController:function(a){var c=a.layerView,e=d.ofType(k),g=this.source,f=g&&g.isInstanceOf&&g.isInstanceOf(d),p=h.mixin(a.options||{},{layer:this,layerView:c,graphics:f?g:new e});return x.when(b,f?"./graphics/controllers/MemoryController":"2d"===c.view.type?"./graphics/controllers/AutoController2D":"./graphics/controllers/SnapshotController").then(function(a){return new a(p)}.bind(this)).then(function(a){this.emit("graphics-controller-create",
{graphicsController:a});return a}.bind(this))},createQuery:function(){var a=new H,b=this.get("capabilities.data");a.returnGeometry=!0;a.returnZ=b&&b.supportsZ&&this.returnZ||null;a.returnM=b&&b.supportsM&&this.returnM||null;a.outFields=this.outFields;a.where=this.definitionExpression||"1\x3d1";a.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null;return a},getFieldDomain:function(a,b){var c,d;b=(b=b&&b.feature)&&b.attributes;var e=this.typeIdField&&b&&b[this.typeIdField];null!=e&&
this.types&&this.types.some(function(b){return b.id==e?((c=b.domains&&b.domains[a])&&"inherited"===c.type&&(c=this._getLayerDomain(a),d=!0),!0):!1},this);d||c||(c=this._getLayerDomain(a));return c},getField:function(a,b){return W.getField(a,b||this.fields)},graphicChanged:function(a){this.emit("graphic-update",a)},queryFeatures:function(b){var c=this;return this.load().then(function(){b=b||c.createQuery();return c.source.queryFeatures?c.source.queryFeatures(b):t.reject(new a("FeatureLayer","Layer source does not support queryFeatures capability"))}).then(function(a){if(b.returnJSON)return a;
if(a&&a.features){var d=c.popupTemplate;a.features.forEach(function(a){a.popupTemplate=d;a.layer=c})}return a})},queryObjectIds:function(b){var c=this;return this.load().then(function(){b=b||c.createQuery();return c.source.queryObjectIds?c.source.queryObjectIds(b):t.reject(new a("FeatureLayer","Layer source does not support queryObjectIds capability"))})},queryFeatureCount:function(b){var c=this;return this.load().then(function(){b=b||c.createQuery();return c.source.queryFeatureCount?c.source.queryFeatureCount(b):
t.reject(new a("FeatureLayer","Layer source does not support queryFeatureCount capability"))})},queryExtent:function(b){var c=this;return this.load().then(function(){b=b||c.createQuery();return c.source.queryExtent?c.source.queryExtent(b):t.reject(new a("FeatureLayer","Layer source does not support queryExtent capability"))})},read:function(a,b){switch(b&&b.origin){case "web-map":this.inherited(arguments,[{outFields:["*"]},b]);break;case "web-scene":this.inherited(arguments,[{mode:sa.MODE_SNAPSHOT,
returnZ:!0,outFields:["*"]},b])}var c=a.featureCollection;if(c){var d=c.layers;d&&1===d.length&&(this.inherited(arguments,[d[0],b]),null!=c.showLegend&&this.inherited(arguments,[{showLegend:c.showLegend},b]))}this.inherited(arguments,[a,b]);return this},write:function(b,c){if(c&&"web-scene"===c.origin&&c.messages){if(!this.url)return c.messages.push(new a("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to web scenes",
{layer:this})),null;if(this.isTable)return c.messages.push(new a("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' using a Table source cannot written to web scenes",{layer:this})),null}return this.inherited(arguments)},_getLayerDomain:function(a){var b;this.fields&&this.fields.some(function(c){c.name===a&&(b=c.domain);return!!b});return b},_fetchFirstLayerId:function(){return n(this.url,{query:{f:"json"},callbackParamName:"callback",responseType:"json"}).then(function(a){if(a.data&&
Array.isArray(a.data.layers)&&0<a.data.layers.length)return a.data.layers[0].id})},_initLayerProperties:function(a){this.source||(this.source=a);a.url&&(this.url=a.url);a.layerDefinition&&this.read(a.layerDefinition,{origin:"service",url:this.parsedUrl});this._verifySource();this._verifyFields();this._addSymbolUrlTokens();W.fixRendererFields(this._getAllRenderers(this.renderer),this.fields);this.watch("token",function(){this._addSymbolUrlTokens()}.bind(this));return J.loadStyleRenderer(this,{origin:"service"})},
_findUrlBasedSymbols:function(){var a=this.renderer;if(!a)return[];var b=[];a.symbol&&b.push(a.symbol);a.defaultSymbol&&b.push(a.defaultSymbol);(a=a.classBreakInfos||a.uniqueValueInfos)&&a.forEach(function(a){a.symbol&&b.push(a.symbol)});return b.filter(function(a){return!!a.url})},_addSymbolUrlTokens:function(){var a=this.token;!this._hasMemorySource()&&a&&this._findUrlBasedSymbols().forEach(function(b){var c=b.url;if(c&&-1!==c.search(/https?\:/i)&&!/[?&]token=/.test(c)){var d=-1===c.indexOf("?")?
"?":"\x26";b.url=c+d+"token\x3d"+a}})},_getAllRenderers:function(a){var b=[];a&&[a,a.trackRenderer,a.observationRenderer,a.latestObservationRenderer].forEach(function(a){a&&(b.push(a),a.rendererInfos&&a.rendererInfos.forEach(function(a){a.renderer&&b.push(a.renderer)}))});return b},_verifyFields:function(){var a=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+a+")");this.isTable||this._hasMemorySource()||
-1!==a.search(/\/FeatureServer\//i)||this.fields&&this.fields.some(function(a){return"geometry"===a.type})||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+a+")")},_fixTemplates:function(a,b){a&&a.forEach(function(a){(a=a.prototype&&a.prototype.attributes)&&b&&delete a[b]})},_verifySource:function(){if(this._hasMemorySource()){if(this.url)throw new a("feature-layer:mixed-source-and-url",
"FeatureLayer cannot be created with both an in-memory source and a url");var b=["geometryType","fields","objectIdField"];if(!b.every(function(a){return this.hasOwnProperty(a)},this))throw new a("feature-layer:missing-property","FeatureLayer created as feature collection requires properties: "+b.join(),{requiredProperties:b});}else{if(this.isTable)throw new a("feature-layer:source-type-not-supported","The table feature service type is not yet supported",{sourceType:"Table"});if(!this.url)throw new a("feature-layer:source-or-url-required",
"FeatureLayer requires either a url, a valid portal item or a source");}},_initMemorySource:function(a){a.forEach(function(a){a.layer=this}.bind(this));this._handles.add([a.on("after-add",function(a){a.item.layer=this}.bind(this)),a.on("after-remove",function(a){a.item.layer=null}.bind(this))],"fl-source")},_resetMemorySource:function(a){a.forEach(function(a){a.layer=null}.bind(this));this._handles.remove("fl-source")},_hasMemorySource:function(){return!(this.url||!this.source)},_readTitleFromName:function(a){var b=
this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?ka.titleFromUrlAndName(this.url,a):a;if(a=a||this.url&&ka.parse(this.url).title)return"item-title-and-service-name"===this.sublayerTitleMode&&b&&(a=b+" - "+a),ka.cleanTitle(a)},_readAdvancedQueryCapabilities:function(a){return a.advancedQueryCapabilities||{supportsPagination:!1,supportsQueryWithDistance:!1,supportsReturningQueryExtent:!1,supportsStatistics:a.supportsStatistics,supportsOrderBy:a.supportsAdvancedQueries,
supportsDistinct:a.supportsAdvancedQueries}},_readAllowGeometryUpdates:function(a){return null==a?!0:a},_readCapabilities:function(a,b){return{data:this._readDataCapabilities(b),operations:this._readOperationsCapabilities(a,b),query:this._readQueryCapabilities(b),queryRelated:this._readQueryRelatedCapabilities(b),editing:this._readEditingCapabilities(b)}},_readBoolean:function(a,b,c){return!(a&&a.hasOwnProperty(b)?!a[b]:!c)},_readDataCapabilities:function(a){return{supportsAttachment:this._readBoolean(a,
"hasAttachments",!1),supportsM:this._readBoolean(a,"hasM",!1),supportsZ:this._readBoolean(a,"hasZ",!1)}},_readOperationsCapabilities:function(a,b){a=a?a.toLowerCase().split(",").map(function(a){return a.trim()}):[];var c=-1!==a.indexOf("editing"),d=c&&-1!==a.indexOf("create"),e=c&&-1!==a.indexOf("delete"),g=c&&-1!==a.indexOf("update");!c||d||e||g||(d=e=g=!0);return{supportsCalculate:this._readBoolean(b,"supportsCalculate",!1),supportsTruncate:this._readBoolean(b,"supportsTruncate",!1),supportsValidateSql:this._readBoolean(b,
"supportsValidateSql",!1),supportsAdd:d,supportsDelete:e,supportsEditing:c,supportsQuery:-1!==a.indexOf("query"),supportsUpdate:g}},_readQueryCapabilities:function(a){var b=a.advancedQueryCapabilities,c=a.ownershipBasedAccessControlForFeatures;return{supportsStatistics:this._readBoolean(b,"supportsStatistics",a.supportsStatistics),supportsCentroid:this._readBoolean(b,"supportsReturningGeometryCentroid",!1),supportsDistance:this._readBoolean(b,"supportsQueryWithDistance",!1),supportsDistinct:this._readBoolean(b,
"supportsDistinct",a.supportsAdvancedQueries),supportsExtent:this._readBoolean(b,"supportsReturningQueryExtent",!1),supportsGeometryProperties:this._readBoolean(b,"supportsReturningGeometryProperties",!1),supportsOrderBy:this._readBoolean(b,"supportsOrderBy",a.supportsAdvancedQueries),supportsPagination:this._readBoolean(b,"supportsPagination",!1),supportsQuantization:this._readBoolean(a,"supportsCoordinatesQuantization",!1),supportsResultType:this._readBoolean(b,"supportsQueryWithResultType",!1),
supportsSqlExpression:this._readBoolean(b,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:this._readBoolean(a,"useStandardizedQueries",!1),supportsQueryByOthers:this._readBoolean(c,"allowOthersToQuery",!0)}},_readQueryRelatedCapabilities:function(a){a=a.advancedQueryCapabilities;var b=this._readBoolean(a,"supportsAdvancedQueryRelated",!1);return{supportsPagination:this._readBoolean(a,"supportsQueryRelatedPagination",!1),supportsCount:b,supportsOrderBy:b}},_readEditingCapabilities:function(a){var b=
a.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:this._readBoolean(a,"allowGeometryUpdates",!0),supportsGlobalId:this._readBoolean(a,"supportsApplyEditsWithGlobalIds",!1),supportsRollbackOnFailure:this._readBoolean(a,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:this._readBoolean(a,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:this._readBoolean(a,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:this._readBoolean(b,"allowAnonymousToDelete",
!0),supportsDeleteByOthers:this._readBoolean(b,"allowOthersToDelete",!0),supportsUpdateByAnonymous:this._readBoolean(b,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:this._readBoolean(b,"allowOthersToUpdate",!0)}},_readObjectIdField:function(a){if(a.objectIdField)return a.objectIdField;if(a.fields)for(var b=0;b<a.fields.length;b++){var c=a.fields[b];if("esriFieldTypeOID"===c.type)return c.name}},_readRenderer:function(a,b,c){var d;if(a=b.drawingInfo&&b.drawingInfo.renderer||void 0)(a=I.read(a,
b,c)||void 0)||ha.error("Failed to create renderer",{rendererDefinition:b.drawingInfo.renderer,layer:this,context:c});else if(b.defaultSymbol)B.read(b.defaultSymbol,b,c),b.types&&b.types.length?(a=new E({defaultSymbol:d,field:b.typeIdField}),b.types.forEach(function(b){a.addUniqueValueInfo(b.id,B.read(b.symbol,b,c))})):a=new D({symbol:d});else if("Table"!==b.type){switch(b.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":d=new u;break;case "esriGeometryPolyline":d=new z;break;
case "esriGeometryPolygon":d=new C}a=d&&new D({symbol:d})}return a},_readTypeIdField:function(a,b){a&&(b=this.getField(a,b.fields))&&(a=b.name);return a},_readTypes:function(a,b){var c=(b=b.editFieldsInfo)&&b.creatorField,d=b&&b.editorField;return a&&a.map(function(a){a=new X(a);this._fixTemplates(a.templates,c);this._fixTemplates(a.templates,d);return a},this)},_readVersion:function(a){return a.currentVersion?a.currentVersion:a.hasOwnProperty("capabilities")||a.hasOwnProperty("drawingInfo")||a.hasOwnProperty("hasAttachments")||
a.hasOwnProperty("htmlPopupType")||a.hasOwnProperty("relationships")||a.hasOwnProperty("timeInfo")||a.hasOwnProperty("typeIdField")||a.hasOwnProperty("types")?10:9.3},_processApplyEditsParams:function(b){if(!b)return t.reject(new a("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"));b=h.mixin({},b);b.addFeatures=b.addFeatures||[];b.updateFeatures=b.updateFeatures||[];b.deleteFeatures=b.deleteFeatures||[];if(b.addFeatures.length||b.updateFeatures.length||
b.deleteFeatures.length){var c=function(a){var b=new k;b.geometry=a.geometry;b.attributes=a.attributes;return b};b.addFeatures=b.addFeatures.map(c);b.updateFeatures=b.updateFeatures.map(c);return this._normalizeGeometries(b).then(function(a){return t.resolve(a)})}return t.reject(new a("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"))},_normalizeGeometries:function(a){var b=a.addFeatures,c=a.updateFeatures,d=b.concat(c).map(function(a){return a.geometry});
return q.normalizeCentralMeridian(d).then(function(d){var e=b.length,g=c.length;d.slice(0,e).forEach(function(b,c){a.addFeatures[c].geometry=b});d.slice(e,e+g).forEach(function(b,c){a.updateFeatures[c].geometry=b});return a})}});return sa})},"esri/renderers/SimpleRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/lang ../symbols/support/jsonUtils ../symbols/support/typeUtils ./Renderer".split(" "),
function(b,h,l,k,f,n,m,g,d){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.symbol=null;b.type="simple";return b}l(b,a);d=b;b.prototype.writeSymbol=function(a,b,c,d){b[c]=m.write(a,{},d)};b.prototype.readSymbol=function(a,b,c){return m.read(a,b,c)};b.prototype.getSymbol=function(a,b){return this.symbol};b.prototype.getSymbols=function(){return this.symbol?[this.symbol]:[]};b.prototype.clone=function(){return new d({description:this.description,
label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:n.clone(this.visualVariables),authoringInfo:n.clone(this.authoringInfo)})};k([f.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);k([f.property({type:String,json:{write:!0}})],b.prototype,"label",void 0);k([f.property({types:g.types})],b.prototype,"symbol",void 0);k([f.writer("symbol")],b.prototype,"writeSymbol",null);k([f.reader("symbol")],b.prototype,"readSymbol",null);return b=d=k([f.subclass("esri.renderers.SimpleRenderer")],
b);var d}(f.declared(d))})},"esri/renderers/Renderer":function(){define("../core/declare ../core/Accessor ../core/JSONSupport ../core/kebabDictionary ../core/screenUtils ../core/lang ../core/Error ../support/arcadeUtils dojo/_base/lang ../Color ./support/utils".split(" "),function(b,h,l,k,f,n,m,g,d,a,c){var r=k({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),w=k({widthAndDepth:"width-and-depth"}),t=k({classedSize:"classed-size",classedColor:"classed-color",
univariateColorSize:"univariate-color-size"}),x=k({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),v=k({percentTotal:"percent-of-total"}),y=Math.PI;return b([h,l],{declaredClass:"esri.renderers.Renderer",properties:{authoringInfo:{value:null,json:{read:function(a,b){a&&(a=n.clone(a),a.type&&(a.type=t.fromJSON(a.type)),a.classificationMethod&&(a.classificationMethod=
x.fromJSON(a.classificationMethod)),a.visualVariables&&a.visualVariables.forEach(function(a){a.type&&(a.type=r.fromJSON(a.type));a.style&&(a.style=v.fromJSON(a.style))}));return a},write:function(a,b){a&&(a=n.clone(a),a.type&&(a.type=t.toJSON(a.type)),a.classificationMethod&&(a.classificationMethod=x.toJSON(a.classificationMethod)),a.visualVariables&&a.visualVariables.forEach(function(a){a.type&&(a.type=r.toJSON(a.type));a.style&&(a.style=v.toJSON(a.style))}));b.authoringInfo=a}}},requiredFields:{dependsOn:["visualVariables"],
get:function(){var a=Object.create(null);this.collectRequiredFields(a);return Object.keys(a)}},type:{readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}},visualVariables:{json:{read:{source:["visualVariables","rotationType","rotationExpression"],reader:function(a,b){return this._readVariables(a,b)}},write:function(a,b,c,d){var e=[];a.forEach(function(a,b){"size"===a.type?e.push(this._writeSizeInfo(a,d,b)):"color"===a.type?e.push(this._writeColorInfo(a,d,b)):"opacity"===a.type?e.push(this._writeOpacityInfo(a,
d,b)):"rotation"===a.type&&e.push(this._writeRotationInfo(a,d,b))},this);b.visualVariables=e}}}},constructor:function(){this._cache={}},_rotationRE:/^\[([^\]]+)\]$/i,_viewScaleRE:/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i,_visualVariablesSetter:function(a){var b=this._cache;this.visualVariables&&this.visualVariables.forEach(function(a,c){b.hasOwnProperty(c)&&(b[c]=null)},this);a&&a.some(function(a){return!!a.target})&&a.sort(function(a,b){return a.target===b.target?0:a.target?1:-1});a&&a.forEach(function(a,
c){"color"===a.type?b[c]=this._processColorInfo(a):"opacity"===a.type?b[c]=this._processOpacityInfo(a):"size"===a.type?b[c]=this._processSizeInfo(a):"rotation"===a.type&&(b[c]=this._processRotationInfo(a))},this);this._set("visualVariables",a)},getSymbol:function(a,b){},getVisualVariableValues:function(a,b){var c=this.visualVariables,e;c&&(e=c.map(function(c){var e,g=c.type,f=g+"Info";b=d.mixin({},b);b[f]=c;switch(g){case "size":e=this.getSize(a,b);break;case "color":e=this.getColor(a,b);break;case "opacity":e=
this.getOpacity(a,b);break;case "rotation":e=this.getRotationAngle(a,b)}return{variable:c,value:e}},this).filter(function(a){return null!=a.value},this));return e},hasVisualVariables:function(a,b){return a?!!this.getVisualVariablesForType(a,b):!!(this.getVisualVariablesForType("size",b)||this.getVisualVariablesForType("color",b)||this.getVisualVariablesForType("opacity",b)||this.getVisualVariablesForType("rotation",b))},getVisualVariablesForType:function(a,b){var c=this.visualVariables,d;c&&(d=c.filter(function(c){return c.type===
a&&("string"===typeof b?c.target===b:!1===b?!c.target:!0)}))&&0===d.length&&(d=void 0);return d},getSize:function(a,b){var c=this._getVarInfo(b&&b.sizeInfo,"size"),d=c.variable,c=this._cache[c.cacheKey],e=null;if(d)var g=d.minSize,e=d.maxSize,g="object"===typeof g&&g?this._getSize(a,g,c&&c.minSize,b):g,e="object"===typeof e&&e?this._getSize(a,e,c&&c.maxSize,b):e,e=this._getSize(a,d,c&&c.root,b,[g,e]);return e},getSizeRangeAtScale:function(a,b){var c;a=this._getVarInfo(a,"size");var d=this._cache[a.cacheKey],
e={scale:b};if((a=a.variable)&&b){b=a.minSize;var g=a.maxSize;a="object"===typeof b&&b?this._getSize({},b,d&&d.minSize,e):b;d="object"===typeof g&&g?this._getSize({},g,d&&d.maxSize,e):g;if(null!=a||null!=d)a>d&&(c=d,d=a,a=c),c={minSize:a,maxSize:d}}return c},getColor:function(a,b){var c=this._getVarInfo(b&&b.colorInfo,"color");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b)},getOpacity:function(a,b){var c=this._getVarInfo(b&&b.opacityInfo,"opacity");return this._getColorComponent(a,
c.variable,this._cache[c.cacheKey],b,!0)},getRotationAngle:function(a,b){var c=this._getVarInfo(b&&b.rotationInfo,"rotation"),e=c.variable,f=this._cache[c.cacheKey],h=e.axis||"heading",c="heading"===h&&"arithmetic"===e.rotationType?90:0,h="heading"===h&&"arithmetic"===e.rotationType?-1:1,e=e.field,f=f&&f.compiledFunc,k=a.attributes,p=0;if(e||f)f?p=g.executeFunction(f,g.createExecContext(a,g.getViewInfo(b))):d.isFunction(e)?p=e.apply(this,arguments):k&&(p=k[e]||0),p="number"!==typeof p||isNaN(p)?null:
c+h*p;return p},collectRequiredFields:function(a){var b=[];this.visualVariables&&(b=b.concat(this.visualVariables));b.forEach(function(b){b&&(b.field&&(a[b.field]=!0),b.normalizationField&&(a[b.normalizationField]=!0),b.valueExpression&&g.extractFieldNames(b.valueExpression).forEach(function(b){a[b]=!0}))})},_getVarInfo:function(a,b){var c;a&&a.type===b&&this.visualVariables?(c=this.visualVariables.indexOf(a),a=this.visualVariables[c]):this.visualVariables&&(a=(a=this.getVisualVariablesForType(b))&&
a[0],c=this.visualVariables.indexOf(a));return{variable:a,cacheKey:c}},_readSizeInfo:function(a){a.axis&&(a.axis=w.fromJSON(a.axis));return a},_readColorInfo:function(b){b&&(b.colors&&b.colors.forEach(function(c,g){d.isArray(c)?b.colors[g]=a.fromJSON(c):b.colors[g]=new a(c)}),b.stops&&b.stops.forEach(function(c,g){c.color&&d.isArray(c.color)?b.stops[g].color=a.fromJSON(c.color):c.color&&(b.stops[g].color=new a(c.color))}));return b},_readOpacityInfo:function(a){var b;a&&(b=d.mixin({},a),b.transparencyValues&&
(b.opacityValues=b.transparencyValues.map(function(a){return 1-a/100}),delete b.transparencyValues),b.stops&&(b.stops=b.stops.map(function(a){a=d.mixin({},a);a.opacity=1-a.transparency/100;delete a.transparency;return a})));return b},_readVariables:function(a,b){a&&(a=a.map(function(a){a=n.clone(a);a.type=r.fromJSON(a.type);"size"===a.type?a=this._readSizeInfo(a):"color"===a.type?a=this._readColorInfo(a):"opacity"===a.type&&(a=this._readOpacityInfo(a));return a},this));var c=b.rotationType;if(b=b.rotationExpression)c=
{type:"rotation",rotationType:c},(b=b.match(this._rotationRE))&&b[1]&&(c.field=b[1],a||(a=[]),a.push(c));return a},_createCache:function(a){var b=a&&a.valueExpression,c=g.createSyntaxTree(b),c=g.createFunction(c),d=!(!a||!a.expression)||this._viewScaleRE.test(b);return{ipData:this._interpolateData(a),hasExpr:!!b,compiledFunc:c,isScaleDriven:d}},_processColorInfo:function(b){b&&(b.colors&&b.colors.forEach(function(c,d){c instanceof a||(b.colors[d]=new a(c))}),b.stops&&b.stops.forEach(function(c,d){!c.color||
c.color instanceof a||(b.stops[d].color=new a(c.color))}),this._sortStops(b.stops));return this._createCache(b)},_processOpacityInfo:function(a){this._sortStops(a&&a.stops);return this._createCache(a)},_processSizeInfo:function(a){a.stops&&Array.isArray(a.stops)?a.stops=this._processSizeInfoStops(a.stops):(a.minSize=a.minSize&&this._processSizeInfoSize(a.minSize),a.maxSize=a.maxSize&&this._processSizeInfoSize(a.maxSize));return{root:this._createCache(a),minSize:this._createCache(a.minSize),maxSize:this._createCache(a.maxSize)}},
_processSizeInfoSize:function(a){"object"===typeof a?a.stops=this._processSizeInfoStops(a.stops):a=f.toPt(a);return a},_processSizeInfoStops:function(a){a&&Array.isArray(a)&&(a.forEach(function(a){a.size=f.toPt(a.size)}),this._sortStops(a));return a},_sortStops:function(a){a&&Array.isArray(a)&&a.sort(function(a,b){return a.value-b.value})},_processRotationInfo:function(a){return this._createCache(a)},_getSize:function(a,b,f,h,k){var e=a.attributes,p=b.field,q=b.stops,m=0,n=f&&f.hasExpr,l=f&&f.compiledFunc,
u=f&&f.ipData,r=f&&f.isScaleDriven,t="number"===typeof a,v=t?a:null;if(p||r||n){var w=h&&h.scale,z=k?k[0]:b.minSize,x=k?k[1]:b.maxSize,O=b.minDataValue,da=b.maxDataValue,N=b.valueUnit||"unknown",M=b.valueRepresentation,m=b.scaleBy,ca=b.normalizationField,W=e?parseFloat(e[ca]):void 0,X=h&&h.shape;r?v=null==w?this._getAverageValue(b):w:"number"!==typeof v&&(n?v=g.executeFunction(l,g.createExecContext(a,g.getViewInfo(h))):d.isFunction(p)?v=p.apply(this,arguments):e&&(v=e[p]));if(null==v||ca&&!t&&(isNaN(W)||
0===W))return null;isNaN(W)||t||(v/=W);if(q)x=this._lookupData(v,u),v=x[0],z=x[1],v===z?m=q[v].size:(v=q[v].size,q=q[z].size,m=v+(q-v)*x[2]);else if(null!=z&&null!=x&&null!=O&&null!=da)v<=O?m=z:v>=da?m=x:(q=(v-O)/(da-O),"area"===m&&X?(z=(v="circle"===X)?y*Math.pow(z/2,2):z*z,q=z+q*((v?y*Math.pow(x/2,2):x*x)-z),m=v?2*Math.sqrt(q/y):Math.sqrt(q)):m=z+q*(x-z));else if("unknown"===N)null!=z&&null!=O?(z&&O?(q=v/O,m="circle"===X?2*Math.sqrt(q*Math.pow(z/2,2)):"square"===X||"diamond"===X||"image"===X?Math.sqrt(q*
Math.pow(z,2)):q*z):m=v+(z||O),m=m<z?z:m,null!=x&&m>x&&(m=x)):m=v;else{q=(h&&h.resolution?h.resolution:1)*c.meterIn[N];if("area"===M)m=Math.sqrt(v/y)/q,m*=2;else if(m=v/q,"radius"===M||"distance"===M)m*=2;null!=z&&m<z&&(m=z);null!=x&&m>x&&(m=x)}}else b&&(m=q&&q[0]&&q[0].size,null==m&&(m=b.minSize));return m=isNaN(m)?0:m},_getAverageValue:function(a){var b=a.stops,c;b?(c=b[0].value,a=b[b.length-1].value):(c=a.minDataValue||0,a=a.maxDataValue||0);return(c+a)/2},_getColorComponent:function(a,b,c,f,h,
k){var e=a.attributes,p=b&&b.field,q="number"===typeof a,m=q?a:null,n=c&&c.hasExpr,l=c&&c.compiledFunc,u=c&&c.ipData,r;if(p||n){var t=b.normalizationField,y=e?parseFloat(e[t]):void 0;"number"!==typeof m&&(n?m=g.executeFunction(l,g.createExecContext(a,g.getViewInfo(f))):d.isFunction(p)?m=p.apply(this,arguments):e&&(m=e[p]));null==m||t&&!q&&(isNaN(y)||0===y)||(isNaN(y)||q||(m/=y),r=h?this._getOpacity(m,b,u):this._getColor(m,b,u))}else b&&(e=b.stops,h?(r=e&&e[0]&&e[0].opacity,null==r&&(r=b.opacityValues&&
b.opacityValues[0])):r=e&&e[0]&&e[0].color||b.colors&&b.colors[0]);k&&(k.data=m,k.value=r);return k||r},_interpolateData:function(a){var b;if(a)if(a.colors||a.opacityValues){var c=(a.colors||a.opacityValues).length,d=a.minDataValue,g=(a.maxDataValue-d)/(c-1);b=[];for(a=0;a<c;a++)b[a]=d+a*g}else a.stops&&(b=a.stops.map(function(a){return a.value}));return b},_getOpacity:function(a,b,c){a=this._lookupData(a,c);var d;b=b||this.opacityInfo;a&&(c=a[0],d=a[1],c===d?d=this._getOpacValue(b,c):(c=this._getOpacValue(b,
c),b=this._getOpacValue(b,d),d=c+(b-c)*a[2]));return d},_getOpacValue:function(a,b){return a.opacityValues?a.opacityValues[b]:a.stops[b].opacity},_getColor:function(b,c,d){b=this._lookupData(b,d);var e;c=c||this.colorInfo;b&&(e=b[0],d=b[1],e=e===d?this._getColorObj(c,e):a.blendColors(this._getColorObj(c,e),this._getColorObj(c,d),b[2]),e=new a(e));return e},_getColorObj:function(a,b){return a.colors?a.colors[b]:a.stops[b].color},_lookupData:function(a,b){var c;if(b){var d=0,e=b.length-1;b.some(function(b,
c){if(a<b)return e=c,!0;d=c;return!1});c=[d,e,(a-b[d])/(b[e]-b[d])]}return c},_processForContext:function(a,b,c){if(b&&"web-scene"===b.origin){var d=null!=a.expression,e=null!=a.valueExpressionTitle&&"rotation"===a.type;b.messages&&(d&&b.messages.push(new m("property:unsupported",a.type+"VisualVariable.expression is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+".expression",context:b})),e&&b.messages.push(new m("property:unsupported",
a.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+".valueExpressionTitle",context:b})));d&&delete a.expression;e&&delete a.valueExpressionTitle}else"size"===a.type&&this._convertExpressionToArcade(a)},_writeRotationInfo:function(a,b,c){a&&(a=d.mixin({},a),this._processForContext(a,b,"visualVariables["+c+"]"),a.type=r.toJSON(a.type),a=n.fixJson(a,!0));return a},_convertExpressionToArcade:function(a){a&&
a.expression&&(a.valueExpression="$view.scale")},_writeSizeInfo:function(a,b,c){if(a){a=d.mixin({},a);this._processForContext(a,b,"string"===typeof c?c:"visualVariables["+c+"]");var e=a.minSize,g=a.maxSize;e&&(a.minSize="number"===typeof e?e:this._writeSizeInfo(e,b,"visualVariables["+c+"].minSize"));g&&(a.maxSize="number"===typeof g?g:this._writeSizeInfo(g,b,"visualVariables["+c+"].maxSize"));b=a.legendOptions;c=a.axis;a.type=r.toJSON(a.type);c&&(a.axis=w.toJSON(c));b&&(a.legendOptions=d.mixin({},
b),b=b.customValues)&&(a.legendOptions.customValues=b.slice(0));a.stops&&(a.stops=a.stops.map(function(a){a=d.mixin({},a);null===a.label&&delete a.label;return a}));a=n.fixJson(a,!0)}return a},_writeColorInfo:function(b,c,g){b&&(b=d.mixin({},b),this._processForContext(b,c,"visualVariables["+g+"]"),b.type=r.toJSON(b.type),b.colors&&(b.colors=b.colors.map(function(b){return a.toJSON(b)})),b.stops&&(b.stops=b.stops.map(function(b){b=d.mixin({},b);b.color&&(b.color=a.toJSON(b.color));null===b.label&&
delete b.label;return b})),b.legendOptions&&(b.legendOptions=d.mixin({},b.legendOptions)),b=n.fixJson(b,!0));return b},_writeOpacityInfo:function(a,b,c){var e;a&&(e=d.mixin({},a),this._processForContext(e,b,"visualVariables["+c+"]"),e.type=r.toJSON(e.type),e.opacityValues&&(e.transparencyValues=e.opacityValues.map(function(a){return 100*(1-a)}),delete e.opacityValues),e.stops&&(e.stops=e.stops.map(function(a){a=d.mixin({},a);a.transparency=100*(1-a.opacity);delete a.opacity;null===a.label&&delete a.label;
return a})),e.legendOptions&&(e.legendOptions=d.mixin({},e.legendOptions)),e=n.fixJson(e,!0));return e}})})},"esri/support/arcadeUtils":function(){define(["require","exports","dojo/_base/lang","../arcade/arcade","../arcade/Dictionary"],function(b,h,l,k,f){function n(b){var a;try{a=b?k.parseScript(b):null}catch(c){a=null}return a}Object.defineProperty(h,"__esModule",{value:!0});var m=/^\$feature\./i,g={vars:{$feature:"any",$view:"any"},spatialReference:null};h.createSyntaxTree=n;h.createFunction=function(b,
a){a=a||l.clone(g);b="string"===typeof b?n(b):b;var c;try{c=b?k.compileScript(b,a):null}catch(r){c=null}return c};h.createExecContext=function(b,a){return{vars:{$feature:k.constructFeature(b),$view:a&&a.view},spatialReference:a&&a.sr}};h.createFeature=function(b){return k.constructFeature(b)};h.updateExecContext=function(b,a){b.vars.$feature=a};h.evalSyntaxTree=function(b,a){var c;try{c=k.executeScript(b,a,a.spatialReference)}catch(r){c=null}return c};h.executeFunction=function(b,a){var c;try{c=b?
b(a,a.spatialReference):null}catch(r){c=null}return c};h.extractFieldNames=function(b){if(!b)return[];b="string"===typeof b?n(b):b;var a=[];k.extractFieldLiterals(b).forEach(function(b){m.test(b)&&(b=b.replace(m,""),a.push(b))});a.sort();return a.filter(function(b,d){return 0===d||a[d-1]!==b})};h.dependsOnView=function(b){return k.referencesMember(b,"$view")};h.getViewInfo=function(b){if(b&&b.viewingMode&&null!=b.scale&&b.spatialReference)return{view:new f({viewingMode:b.viewingMode,scale:b.scale}),
sr:b.spatialReference}}})},"esri/arcade/arcade":function(){define("require exports ./arcadeRuntime ./parser ./Feature ./arcadeCompiler dojo/has dojo/Deferred".split(" "),function(b,h,l,k,f,n,m,g){Object.defineProperty(h,"__esModule",{value:!0});var d="disjoint intersects touches crosses within contains overlaps equals relate intersection union difference symmetricdifference clip cut area areageodetic length lengthgeodetic distance densify densifygeodetic generalize buffer buffergeodetic offset rotate issimple simplify multiparttosinglepart".split(" ");
h.compileScript=function(a,b){return m("csp-restrictions")?function(b,c){return l.executeScript(a,b,c)}:n.compileScript(a,b)};h.extend=function(a){l.extend(a);n.extend(a)};h.constructFeature=function(a){return f.fromFeature(a)};h.parseScript=function(a){return k.parseScript(a)};h.validateScript=function(a,b){return k.validateScript(a,b,"simple")};h.scriptCheck=function(a,b,d){return k.scriptCheck(a,b,d,"full")};h.parseAndExecuteScript=function(a,b,d){return l.executeScript(k.parseScript(a),b,d)};
h.executeScript=function(a,b,d){return l.executeScript(a,b,d)};h.referencesMember=function(a,b){return l.referencesMember(a,b)};h.referencesFunction=function(a,b){return l.referencesFunction(a,b)};h.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return k.extractFieldLiterals(a,b)};h.scriptUsesGeometryEngine=function(a){a=l.findFunctionCalls(a);for(var b=0;b<a.length;b++)if(-1<d.indexOf(a[b]))return!0;return!1};h.enableGeometrySupport=function(){var a=new g;b(["esri/geometry/geometryEngine",
"./functions/geomsync"],function(b,d){d.setGeometryEngine(b);a.resolve(!0)},function(b){a.reject(b)});return a.promise}})},"esri/arcade/arcadeRuntime":function(){define("require exports ../geometry/Polygon ../Graphic ../geometry/Polyline ../geometry/Point ../geometry/Extent ../geometry/Multipoint ../geometry/SpatialReference ./languageUtils ./treeAnalysis ./Dictionary ./Feature ./FunctionWrapper ./functions/date ./functions/string ./functions/maths ./functions/geometry ./functions/geomsync ./functions/stats ./ImmutablePathArray ./ImmutablePointArray ../geometry/Geometry".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q,u,z,C){function B(a,b){for(var c=[],d=0;d<b.arguments.length;d++)c.push(D(a,b.arguments[d]));return c}function F(a,b,c){try{return c(a,b,B(a,b))}catch(pa){throw pa;}}function D(b,d){try{switch(d.type){case "EmptyStatement":return a.voidOperation;case "VariableDeclarator":var e=null===d.init?null:D(b,d.init);e===a.voidOperation&&(e=null);var g=d.id.name.toLowerCase();null!==b.localScope?b.localScope[g]={value:e,valueset:!0,node:d.init}:b.globalScope[g]=
{value:e,valueset:!0,node:d.init};return a.voidOperation;case "VariableDeclaration":for(var f=0;f<d.declarations.length;f++)D(b,d.declarations[f]);return a.voidOperation;case "BlockStatement":var h;a:{for(var k=a.voidOperation,f=0;f<d.body.length;f++)if(k=D(b,d.body[f]),k instanceof a.ReturnResult||k===a.breakResult||k===a.continueResult){h=k;break a}h=k}return h;case "FunctionDeclaration":var p=d.id.name.toLowerCase();b.globalScope[p]={valueset:!0,node:null,value:new t(d,b)};return a.voidOperation;
case "ReturnStatement":var q;if(null===d.argument)q=new a.ReturnResult(a.voidOperation);else{var m=D(b,d.argument);q=new a.ReturnResult(m)}return q;case "IfStatement":var n;if("AssignmentExpression"===d.test.type||"UpdateExpression"===d.test.type)throw Error(c.nodeErrorMessage(d.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var l=D(b,d.test);if(!0===l)n=D(b,d.consequent);else if(!1===l)n=null!==d.alternate?D(b,d.alternate):a.voidOperation;else throw Error(c.nodeErrorMessage(d,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));
return n;case "ExpressionStatement":var u;if("AssignmentExpression"===d.expression.type||"UpdateExpression"===d.expression.type)u=D(b,d.expression);else{var y=D(b,d.expression);u=y===a.voidOperation?a.voidOperation:new a.ImplicitResult(y)}return u;case "AssignmentExpression":var v;var z=D(b,d.right),f=null,F="";if("MemberExpression"===d.left.type){f=D(b,d.left.object);F=!0===d.left.computed?D(b,d.left.property):d.left.property.name;if(a.isArray(f))if(a.isNumber(F)){0>F&&(F=f.length+F);if(0>F||F>f.length)throw Error("Assignment outside of array bounds");
if(F===f.length&&"\x3d"!==d.operator)throw Error("Invalid Parameter");f[F]=I(z,d.operator,f[F],d)}else throw Error("Invalid Parameter");else if(f instanceof r){if(!1===a.isString(F))throw Error("Dictionary accessor must be a string");if(!0===f.hasField(F))f.setField(F,I(z,d.operator,f.field(F),d));else{if("\x3d"!==d.operator)throw Error("Invalid Parameter");f.setField(F,I(z,d.operator,null,d))}}else if(f instanceof w){if(!1===a.isString(F))throw Error("Feature accessor must be a string");if(!0===
f.hasField(F))f.setField(F,I(z,d.operator,f.field(F),d));else{if("\x3d"!==d.operator)throw Error("Invalid Parameter");f.setField(F,I(z,d.operator,null,d))}}else{if(a.isImmutableArray(f))throw Error("Array is Immutable");throw Error("Invalid Parameter");}v=a.voidOperation}else if(f=d.left.name.toLowerCase(),null!==b.localScope&&void 0!==b.localScope[f])b.localScope[f]={value:I(z,d.operator,b.localScope[f].value,d),valueset:!0,node:d.right},v=a.voidOperation;else if(void 0!==b.globalScope[f])b.globalScope[f]=
{value:I(z,d.operator,b.globalScope[f].value,d),valueset:!0,node:d.right},v=a.voidOperation;else throw Error("Variable not recognised");return v;case "UpdateExpression":var x;var B,f=null,F="";if("MemberExpression"===d.argument.type){f=D(b,d.argument.object);F=!0===d.argument.computed?D(b,d.argument.property):d.argument.property.name;if(a.isArray(f))if(a.isNumber(F)){0>F&&(F=f.length+F);if(0>F||F>=f.length)throw Error("Assignment outside of array bounds");B=a.toNumber(f[F]);f[F]="++"===d.operator?
B+1:B-1}else throw Error("Invalid Parameter");else if(f instanceof r){if(!1===a.isString(F))throw Error("Dictionary accessor must be a string");if(!0===f.hasField(F))B=a.toNumber(f.field(F)),f.setField(F,"++"===d.operator?B+1:B-1);else throw Error("Invalid Parameter");}else if(f instanceof w){if(!1===a.isString(F))throw Error("Feature accessor must be a string");if(!0===f.hasField(F))B=a.toNumber(f.field(F)),f.setField(F,"++"===d.operator?B+1:B-1);else throw Error("Invalid Parameter");}else{if(a.isImmutableArray(f))throw Error("Array is Immutable");
throw Error("Invalid Parameter");}x=!1===d.prefix?B:"++"===d.operator?B+1:B-1}else if(f=d.argument.name.toLowerCase(),null!==b.localScope&&void 0!==b.localScope[f])B=a.toNumber(b.localScope[f].value),b.localScope[f]={value:"++"===d.operator?B+1:B-1,valueset:!0,node:d},x=!1===d.prefix?B:"++"===d.operator?B+1:B-1;else if(void 0!==b.globalScope[f])B=a.toNumber(b.globalScope[f].value),b.globalScope[f]={value:"++"===d.operator?B+1:B-1,valueset:!0,node:d},x=!1===d.prefix?B:"++"===d.operator?B+1:B-1;else throw Error("Variable not recognised");
return x;case "BreakStatement":return a.breakResult;case "ContinueStatement":return a.continueResult;case "ForStatement":null!==d.init&&D(b,d.init);F={testResult:!0,lastAction:a.voidOperation};do b:{v=b;z=d;x=F;if(null!==z.test){x.testResult=D(v,z.test);if(!1===x.testResult)break b;if(!0!==x.testResult)throw Error(c.nodeErrorMessage(z,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));}x.lastAction=D(v,z.body);x.lastAction===a.breakResult?x.testResult=!1:x.lastAction instanceof a.ReturnResult?x.testResult=
!1:null!==z.update&&D(v,z.update)}while(!0===F.testResult);f=F.lastAction instanceof a.ReturnResult?F.lastAction:a.voidOperation;return f;case "ForInStatement":return E(b,d);case "Identifier":return G(b,d);case "MemberExpression":return U(b,d);case "Literal":return d.value;case "ThisExpression":throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTED"));case "CallExpression":return S(b,d);case "UnaryExpression":return P(b,d);case "BinaryExpression":return H(b,d);case "LogicalExpression":return K(b,
d);case "ConditionalExpression":throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{for(f=[],F=0;F<d.elements.length;F++){var C=D(b,d.elements[F]);if(a.isFunctionParameter(C))throw Error(c.nodeErrorMessage(d,"RUNTIME","FUNCTIONCONTEXTILLEGAL"));C===a.voidOperation?f.push(null):f.push(C)}}catch(R){throw R;}return f;case "ObjectExpression":f={};for(F=0;F<d.properties.length;F++){var T=D(b,d.properties[F]);if(a.isFunctionParameter(T.value))throw Error("Illegal Argument");
if(!1===a.isString(T.key))throw Error("Illegal Argument");f[T.key.toString()]=T.value===a.voidOperation?null:T.value}var ka=new r(f);ka.immutable=!1;return ka;case "Property":return{key:"Identifier"===d.key.type?d.key.name:D(b,d.key),value:D(b,d.value)};case "Array":throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTED"));default:throw Error(c.nodeErrorMessage(d,"RUNTIME","UNREOGNISED"));}}catch(R){throw R;}}function E(b,d){var e=D(b,d.right);"VariableDeclaration"===d.left.type&&D(b,d.left);var g=
null,f="VariableDeclaration"===d.left.type?d.left.declarations[0].id.name:d.left.name;null!==b.localScope&&void 0!==b.localScope[f]&&(g=b.localScope[f]);null===g&&void 0!==b.globalScope[f]&&(g=b.globalScope[f]);if(null===g)throw Error(c.nodeErrorMessage(d,"RUNTIME","VARIABLENOTDECLARED"));if(a.isArray(e)||a.isString(e)){for(var e=e.length,h=0;h<e&&(g.value=h,f=D(b,d.body),f!==a.breakResult);h++)if(f instanceof a.ReturnResult)return f;return a.voidOperation}if(a.isImmutableArray(e)){for(h=0;h<e.length()&&
(g.value=h,f=D(b,d.body),f!==a.breakResult);h++)if(f instanceof a.ReturnResult)return f;return a.voidOperation}if(e instanceof r||e instanceof w)for(e=e.keys(),h=0;h<e.length&&(g.value=e[h],f=D(b,d.body),f!==a.breakResult);h++){if(f instanceof a.ReturnResult)return f}else return a.voidOperation}function I(b,d,e,f){switch(d){case "\x3d":return b===a.voidOperation?null:b;case "/\x3d":return a.toNumber(e)/a.toNumber(b);case "*\x3d":return a.toNumber(e)*a.toNumber(b);case "-\x3d":return a.toNumber(e)-
a.toNumber(b);case "+\x3d":return a.isString(e)||a.isString(b)?a.toString(e)+a.toString(b):a.toNumber(e)+a.toNumber(b);case "%\x3d":return a.toNumber(e)%a.toNumber(b);default:throw Error(c.nodeErrorMessage(f,"RUNTIME","OPERATORNOTRECOGNISED"));}}function J(b,d,e,f){d=d.toLowerCase();switch(d){case "hasz":return b=b.hasZ,void 0===b?!1:b;case "hasm":return b=b.hasM,void 0===b?!1:b;case "spatialreference":return d=b.spatialReference._arcadeCacheId,void 0===d&&(e=!0,Object.freeze&&Object.isFrozen(b.spatialReference)&&
(e=!1),e&&(fa++,d=b.spatialReference._arcadeCacheId=fa)),b=new r({wkt:b.spatialReference.wkt,wkid:b.spatialReference.wkid}),void 0!==d&&(b._arcadeCacheId="SPREF"+d.toString()),b}switch(b.type){case "extent":switch(d){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return b=b[d],void 0!==b?b:null;case "type":return"Extent"}break;case "polygon":switch(d){case "rings":return d=a.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===
d&&(fa++,d=fa,a.isVersion4?b.cache._arcadeCacheId=d:b.setCacheValue("_arcadeCacheId",d)),b=new u(b.rings,b.spatialReference,!0===b.hasZ,!0===b.hasM,d);case "type":return"Polygon"}break;case "point":switch(d){case "x":case "y":case "z":case "m":return void 0!==b[d]?b[d]:null;case "type":return"Point"}break;case "polyline":switch(d){case "paths":return d=a.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===d&&(fa++,d=fa,a.isVersion4?b.cache._arcadeCacheId=d:b.setCacheValue("_arcadeCacheId",
d)),b=new u(b.paths,b.spatialReference,!0===b.hasZ,!0===b.hasM,d);case "type":return"Polyline"}break;case "multipoint":switch(d){case "points":return d=a.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===d&&(fa++,d=fa,a.isVersion4?b.cache._arcadeCacheId=d:b.setCacheValue("_arcadeCacheId",d)),b=new z(b.points,b.spatialReference,!0===b.hasZ,!0===b.hasM,d,1);case "type":return"Multipoint"}}throw Error(c.nodeErrorMessage(f,"RUNTIME","PROPERTYNOTFOUND"));}function U(b,d){try{var e=
D(b,d.object);if(null===e)throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTFOUND"));if(!1===d.computed){if(e instanceof r||e instanceof w)return e.field(d.property.name);if(e instanceof C)return J(e,d.property.name,b,d);throw Error(c.nodeErrorMessage(d,"RUNTIME","INVALIDTYPE"));}var f=D(b,d.property);if(e instanceof r||e instanceof w){if(a.isString(f))return e.field(f)}else if(e instanceof C){if(a.isString(f))return J(e,f,b,d)}else if(a.isArray(e)){if(a.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>
f&&(f=e.length+f);if(f>=e.length||0>f)throw Error(c.nodeErrorMessage(d,"RUNTIME","OUTOFBOUNDS"));return e[f]}}else if(a.isString(e)){if(a.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=e.length+f);if(f>=e.length||0>f)throw Error(c.nodeErrorMessage(d,"RUNTIME","OUTOFBOUNDS"));return e[f]}}else if(a.isImmutableArray(e)&&a.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=e.length()+f);if(f>=e.length()||0>f)throw Error(c.nodeErrorMessage(d,"RUNTIME","OUTOFBOUNDS"));return e.get(f)}throw Error(c.nodeErrorMessage(d,
"RUNTIME","INVALIDTYPE"));}catch(ta){throw ta;}}function P(b,d){try{var e=D(b,d.argument);if(a.isBoolean(e)){if("!"===d.operator)return!e;if("-"===d.operator)return-1*a.toNumber(e);if("+"===d.operator)return 1*a.toNumber(e);throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===d.operator)return-1*a.toNumber(e);if("+"===d.operator)return 1*a.toNumber(e);throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}catch(pa){throw pa;}}function H(b,d){try{var e=
[D(b,d.left),D(b,d.right)],f=e[0],g=e[1];switch(d.operator){case "\x3d\x3d":return a.equalityTest(f,g);case "\x3d":return a.equalityTest(f,g);case "!\x3d":return!a.equalityTest(f,g);case "\x3c":return a.greaterThanLessThan(f,g,d.operator);case "\x3e":return a.greaterThanLessThan(f,g,d.operator);case "\x3c\x3d":return a.greaterThanLessThan(f,g,d.operator);case "\x3e\x3d":return a.greaterThanLessThan(f,g,d.operator);case "+":return a.isString(f)||a.isString(g)?a.toString(f)+a.toString(g):a.toNumber(f)+
a.toNumber(g);case "-":return a.toNumber(f)-a.toNumber(g);case "*":return a.toNumber(f)*a.toNumber(g);case "/":return a.toNumber(f)/a.toNumber(g);case "%":return a.toNumber(f)%a.toNumber(g);default:throw Error(c.nodeErrorMessage(d,"RUNTIME","OPERATORNOTRECOGNISED"));}}catch(Ba){throw Ba;}}function K(b,d){try{if("AssignmentExpression"===d.left.type||"UpdateExpression"===d.left.type)throw Error(c.nodeErrorMessage(d.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===d.right.type||
"UpdateExpression"===d.right.type)throw Error(c.nodeErrorMessage(d.right,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var e=D(b,d.left);if(a.isBoolean(e))switch(d.operator){case "||":if(!0===e)return e;var f=D(b,d.right);if(a.isBoolean(f))return f;throw Error(c.nodeErrorMessage(d,"RUNTIME","ONLYORORAND"));case "\x26\x26":if(!1===e)return e;f=D(b,d.right);if(a.isBoolean(f))return f;throw Error(c.nodeErrorMessage(d,"RUNTIME","ONLYORORAND"));default:throw Error(c.nodeErrorMessage(d,"RUNTIME","ONLYORORAND"));
}else throw Error(c.nodeErrorMessage(d,"RUNTIME","ONLYBOOLEAN"));}catch(ta){throw ta;}}function G(a,b){var d;try{var e=b.name.toLowerCase();if(null!==a.localScope&&void 0!==a.localScope[e])return d=a.localScope[e],!0!==d.valueset&&(d.value=D(a,d.node),d.valueset=!0),d.value;if(void 0!==a.globalScope[e])return d=a.globalScope[e],!0!==d.valueset&&(d.value=D(a,d.node),d.valueset=!0),d.value;throw Error(c.nodeErrorMessage(b,"RUNTIME","VARIABLENOTFOUND"));}catch(ta){throw ta;}}function S(b,d){try{if("Identifier"!==
d.callee.type)throw Error(c.nodeErrorMessage(d,"RUNTIME","ONLYNODESSUPPORTED"));if(null!==b.localScope&&void 0!==b.localScope[d.callee.name.toLowerCase()]){var e=b.localScope[d.callee.name.toLowerCase()];if(e.value instanceof a.NativeFunction)return e.value.fn(b,d);if(e.value instanceof t)return W(b,d,e.value.definition);throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTAFUNCTION"));}if(void 0!==b.globalScope[d.callee.name.toLowerCase()]){e=b.globalScope[d.callee.name.toLowerCase()];if(e.value instanceof
a.NativeFunction)return e.value.fn(b,d);if(e.value instanceof t)return W(b,d,e.value.definition);throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTAFUNCTION"));}throw Error(c.nodeErrorMessage(d,"RUNTIME","NOTFOUND"));}catch(pa){throw pa;}}function O(b){return null==b?"":a.isArray(b)||a.isImmutableArray(b)?"Array":a.isDate(b)?"Date":a.isString(b)?"String":a.isBoolean(b)?"Boolean":a.isNumber(b)?"Number":b instanceof r?"Dictionary":b instanceof w?"Feature":b instanceof n?"Point":b instanceof l?"Polygon":
b instanceof f?"Polyline":b instanceof g?"Multipoint":b instanceof m?"Extent":a.isFunctionParameter(b)?"Function":b===a.voidOperation?"":"number"===typeof b&&isNaN(b)?"Number":"Unrecognised Type"}function da(b,c,d,e){try{var f=D(b,c.arguments[d]);if(a.equalityTest(f,e))return D(b,c.arguments[d+1]);var g=c.arguments.length-d;return 1===g?D(b,c.arguments[d]):2===g?null:3===g?D(b,c.arguments[d+2]):da(b,c,d+2,e)}catch(oa){throw oa;}}function N(b,c,d,e){try{if(!0===e)return D(b,c.arguments[d+1]);if(3===
c.arguments.length-d)return D(b,c.arguments[d+2]);var f=D(b,c.arguments[d+2]);if(!1===a.isBoolean(f))throw Error("WHEN needs boolean test conditions");return N(b,c,d+2,f)}catch(Ba){throw Ba;}}function M(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];var e=M(a.slice(0,d),b);a=M(a.slice(d,c),b);for(c=[];0<e.length||0<a.length;)0<e.length&&0<a.length?(d=b(e[0],a[0]),isNaN(d)&&(d=0),0>=d?(c.push(e[0]),e=e.slice(1)):(c.push(a[0]),a=a.slice(1))):0<e.length?(c.push(e[0]),e=
e.slice(1)):0<a.length&&(c.push(a[0]),a=a.slice(1));return c}function ca(b,c,d){try{var e=b.body;if(d.length!==b.params.length)throw Error("Invalid Parameter calls to function.");for(var f=0;f<d.length;f++)c.localScope[b.params[f].name.toLowerCase()]={value:d[f],valueset:!0,node:null};var g=D(c,e);if(g instanceof a.ReturnResult)return g.value;if(g===a.breakResult)throw Error("Cannot Break from a Function");if(g===a.continueResult)throw Error("Cannot Continue from a Function");return g instanceof a.ImplicitResult?
g.value:g}catch(oa){throw oa;}}function W(a,b,c){return F(a,b,function(b,d,e){b={spatialReference:a.spatialReference,applicationCache:void 0===a.applicationCache?null:a.applicationCache,globalScope:a.globalScope,depthCounter:a.depthCounter+1,console:a.console,localScope:{}};if(64<b.depthCounter)throw Error("Exceeded maximum function depth");return ca(c,b,e)})}function X(a){return function(){var b={applicationCache:void 0===a.context.applicationCache?null:a.context.applicationCache,spatialReference:a.context.spatialReference,
console:a.context.console,localScope:{},depthCounter:a.context.depthCounter+1,globalScope:a.context.globalScope};if(64<b.depthCounter)throw Error("Exceeded maximum function depth");return ca(a.definition,b,arguments)}}function ga(a){console.log(a)}Object.defineProperty(h,"__esModule",{value:!0});var fa=0,T={};x.registerFunctions(T,F);v.registerFunctions(T,F);y.registerFunctions(T,F);p.registerFunctions(T,F);q.registerFunctions(T,F);e.registerFunctions(T,F);T["typeof"]=function(b,c){return F(b,c,function(b,
c,d){a.pcCheck(d,1,1);b=O(d[0]);if("Unrecognised Type"===b)throw Error("Unrecognised Type");return b})};T.iif=function(b,c){try{a.pcCheck(null===c.arguments?[]:c.arguments,3,3);var d=D(b,c.arguments[0]);if(!1===a.isBoolean(d))throw Error("IF Function must have a boolean test condition");return!0===d?D(b,c.arguments[1]):D(b,c.arguments[2])}catch(pa){throw pa;}};T.decode=function(a,b){try{if(2>b.arguments.length)throw Error("Missing Parameters");if(2===b.arguments.length)return D(a,b.arguments[1]);
if(0===(b.arguments.length-1)%2)throw Error("Must have a default value result.");var c=D(a,b.arguments[0]);return da(a,b,1,c)}catch(pa){throw pa;}};T.when=function(b,c){try{if(3>c.arguments.length)throw Error("Missing Parameters");if(0===c.arguments.length%2)throw Error("Must have a default value result.");var d=D(b,c.arguments[0]);if(!1===a.isBoolean(d))throw Error("WHEN needs boolean test conditions");return N(b,c,0,d)}catch(pa){throw pa;}};T.top=function(b,c){return F(b,c,function(b,c,d){a.pcCheck(d,
2,2);if(a.isArray(d[0]))return a.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,a.toNumber(d[1]));if(a.isImmutableArray(d[0]))return a.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,a.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};T.first=function(b,c){return F(b,c,function(b,c,d){a.pcCheck(d,1,1);return a.isArray(d[0])?0===d[0].length?null:d[0][0]:a.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};T.sort=function(b,c){return F(b,c,function(b,
c,d){a.pcCheck(d,1,2);b=d[0];a.isImmutableArray(b)&&(b=b.toArray());if(!1===a.isArray(b))throw Error("Illegal Argument");if(1<d.length){if(!1===a.isFunctionParameter(d[1]))throw Error("Illegal Argument");var e=X(d[1]);b=M(b,function(a,b){return e(a,b)})}else{if(0===b.length)return[];d={};for(c=0;c<b.length;c++){var f=O(b[c]);""!==f&&(d[f]=!0)}if(!0===d.Array||!0===d.Dictionary||!0===d.Feature||!0===d.Point||!0===d.Polygon||!0===d.Polyline||!0===d.Multipoint||!0===d.Extent||!0===d.Function)return b.slice(0);
c=0;var f="",g;for(g in d)c++,f=g;b=1<c||"String"===f?M(b,function(b,c){if(null===b||void 0===b||b===a.voidOperation)return null===c||void 0===c||c===a.voidOperation?0:1;if(null===c||void 0===c||c===a.voidOperation)return-1;b=a.toString(b);c=a.toString(c);return b<c?-1:b===c?0:1}):"Number"===f?M(b,function(a,b){return a-b}):"Boolean"===f?M(b,function(a,b){return a===b?0:b?-1:1}):"Date"===f?M(b,function(a,b){return b-a}):b.slice(0)}return b})};for(var ka in T)T[ka]={value:new a.NativeFunction(T[ka]),
valueset:!0,node:null};var ja=function(){};ja.prototype=T;ja.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null};ja.prototype.pi={value:Math.PI,valueset:!0,node:null};h.functionHelper={fixSpatialReference:a.fixSpatialReference,parseArguments:B,standardFunction:F};h.extend=function(b){for(var d={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:F,evaluateIdentifier:G,arcadeCustomFunctionHandler:X},e=0;e<b.length;e++)b[e].registerFunctions(d);for(var f in d.functions)T[f]=
{value:new a.NativeFunction(d.functions[f]),valueset:!0,node:null},ja.prototype[f]=T[f];for(e=0;e<d.signatures.length;e++)c.addFunctionDeclaration(d.signatures[e],"f")};h.executeScript=function(b,c,e){e||(e=new d(102100));var f=c.vars,g=c.customfunctions,h=new ja;f||(f={});g||(g={});var p=new r({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});p.immutable=!1;h.textformatting={value:p,valueset:!0,node:null};for(var q in g)h[q]={value:new a.NativeFunction(g[q]),
"native":!0,valueset:!0,node:null};for(q in f)h[q]=f[q]instanceof k?{value:new w(f[q]),valueset:!0,node:null}:{value:f[q],valueset:!0,node:null};b=D({spatialReference:e,globalScope:h,localScope:null,console:c.console?c.console:ga,depthCounter:1,applicationCache:void 0===c.applicationCache?null:c.applicationCache},b.body[0].body);b instanceof a.ReturnResult&&(b=b.value);b instanceof a.ImplicitResult&&(b=b.value);b===a.voidOperation&&(b=null);if(b===a.breakResult)throw Error("Cannot return BREAK");
if(b===a.continueResult)throw Error("Cannot return CONTINUE");if(b instanceof t)throw Error("Cannot return FUNCTION");if(b instanceof a.NativeFunction)throw Error("Cannot return FUNCTION");return b};h.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return c.findFieldLiterals(a,b)};h.validateScript=function(a,b){return c.validateScript(a,b,"simple")};h.referencesMember=function(a,b){return c.referencesMember(a,b)};h.referencesFunction=function(a,b){return c.referencesFunction(a,b)};h.findFunctionCalls=
function(a){return c.findFunctionCalls(a,!1)}})},"esri/arcade/languageUtils":function(){define("require exports ../geometry/Geometry ../moment dojo/number ./ImmutableArray ../kernel ./ImmutablePointArray ./ImmutablePathArray dojo/_base/array ../geometry/Point ../geometry/Polyline ../geometry/Polygon ../geometry/Extent ../geometry/Multipoint ./FunctionWrapper".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v){function y(a,b,c){if(""===b||null===b||void 0===b||b===c||b===c)return a;do a=a.replace(b,
c);while(-1!==a.indexOf(b));return a}function p(a){return a instanceof S||a instanceof v||a instanceof O}function e(a){return"string"===typeof a||a instanceof String}function q(a){return"boolean"===typeof a}function u(a){return"number"===typeof a}function z(a){return a instanceof Array}function C(a){return a instanceof Date}function B(a,b){if(!1===isNaN(a)){if(void 0===b||null===b||""===b)return a.toString();b=y(b,"\u2030","");b=y(b,"\u00a4","");return f.format(a,{pattern:b})}return a.toString()}
function F(a,b){a=k(a);return void 0===b||null===b||""===b?a.format():a.format(D(b))}function D(a){return a.replace(/(LTS)|L|l/g,function(a){return"["+a+"]"})}function E(a,b,c){switch(c){case "\x3e":return a>b;case "\x3c":return a<b;case "\x3e\x3d":return a>=b;case "\x3c\x3d":return a<=b}return!1}function I(a,b){if(a===b||null===a&&b===h.voidOperation||null===b&&a===h.voidOperation)return!0;if(C(a)&&C(b))return a.getTime()===b.getTime();if(a instanceof d||a instanceof g)return a.equalityTest(b);if(a instanceof
c&&b instanceof c){var e=void 0,f=void 0;h.isVersion4?(e=a.cache._arcadeCacheId,f=b.cache._arcadeCacheId):(e=a.getCacheValue("_arcadeCacheId"),f=b.getCacheValue("_arcadeCacheId"));if(void 0!==e&&null!==e)return e===f}return void 0!==a&&void 0!==b&&null!==a&&null!==b&&"object"===typeof a&&"object"===typeof b&&(a._arcadeCacheId===b._arcadeCacheId&&void 0!==a._arcadeCacheId&&null!==a._arcadeCacheId||a._underlyingGraphic===b._underlyingGraphic&&void 0!==a._underlyingGraphic&&null!==a._underlyingGraphic)?
!0:!1}function J(a,b){if(e(a))return a;if(null===a)return"";if(u(a))return B(a,b);if(q(a))return a.toString();if(C(a))return F(a,b);if(a instanceof l)return JSON.stringify(a.toJSON());if(z(a)){b=[];for(var c=0;c<a.length;c++)b[c]=P(a[c]);return"["+b.join(",")+"]"}if(a instanceof n){b=[];for(c=0;c<a.length();c++)b[c]=P(a.get(c));return"["+b.join(",")+"]"}return null!==a&&"object"===typeof a&&void 0!==a.castToText?a.castToText():p(a)?"object, Function":""}function U(a,b){if(e(a))return a;if(null===
a)return"";if(u(a))return B(a,b);if(q(a))return a.toString();if(C(a))return F(a,b);if(a instanceof l)return JSON.stringify(a.toJSON());if(z(a)){b=[];for(var c=0;c<a.length;c++)b[c]=P(a[c]);return"["+b.join(",")+"]"}if(a instanceof n){b=[];for(c=0;c<a.length();c++)b[c]=P(a.get(c));return"["+b.join(",")+"]"}return null!==a&&"object"===typeof a&&void 0!==a.castToText?a.castToText():p(a)?"object, Function":""}function P(a){if(null!==a){if(q(a)||u(a)||e(a))return JSON.stringify(a);if(a instanceof l||a instanceof
n||a instanceof Array)return U(a);if(a instanceof Date)return JSON.stringify(F(a,""));if(null!==a&&"object"===typeof a&&void 0!==a.castToText)return a.castToText()}return"null"}function H(a,b){return u(a)?a:null===a||""===a?0:C(a)?NaN:q(a)?a?1:0:z(a)||""===a||void 0===a?NaN:void 0!==b&&e(a)?(b=y(b,"\u2030",""),b=y(b,"\u00a4",""),f.parse(a,{pattern:b})):a===h.voidOperation?0:Number(a)}function K(b,c){var d;a.some(c.fields,function(a){a.name===b&&(d=a.domain);return!!d});return d}Object.defineProperty(h,
"__esModule",{value:!0});b=function(){return function(a){this.value=a}}();var G=function(){return function(a){this.value=a}}(),S=function(){return function(a){this.fn=a}}(),O=function(){return function(a){this.fn=a}}();h.NativeFunction=S;h.ImplicitResult=G;h.ReturnResult=b;h.SizzleFunction=O;h.isVersion4=0===m.version.indexOf("4.");h.voidOperation={type:"VOID"};h.breakResult={type:"BREAK"};h.continueResult={type:"CONTINUE"};h.multiReplace=y;h.isFunctionParameter=p;h.isSimpleType=function(a){return e(a)||
u(a)||C(a)||q(a)||null===a||a===h.voidOperation||"number"===typeof a?!0:!1};h.defaultUndefined=function(a,b){return void 0===a?b:a};h.isString=e;h.isBoolean=q;h.isNumber=u;h.isArray=z;h.isFeatureCursor=function(a){return a&&void 0!==a.isFeatureCursor};h.isImmutableArray=function(a){return a instanceof n};h.isDate=C;h.pcCheck=function(a,b,c){if(a.length<b||a.length>c)throw Error("Function called with wrong number of Parameters");};h.generateUUID=function(){var a=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,
function(b){var c=(a+16*Math.random())%16|0;a=Math.floor(a/16);return("x"===b?c:c&3|8).toString(16)})};h.formatNumber=B;h.formatDate=F;h.standardiseDateFormat=D;h.greaterThanLessThan=function(a,b,c){if(null===a){if(null===b||b===h.voidOperation)return E(null,null,c);if(u(b))return E(0,b,c);if(e(b)||q(b))return E(0,H(b),c);if(C(b))return E(0,b.getTime(),c)}if(a===h.voidOperation){if(null===b||b===h.voidOperation)return E(null,null,c);if(u(b))return E(0,b,c);if(e(b)||q(b))return E(0,H(b),c);if(C(b))return E(0,
b.getTime(),c)}else if(u(a)){if(u(b))return E(a,b,c);if(q(b))return E(a,H(b),c);if(null===b||b===h.voidOperation)return E(a,0,c);if(e(b))return E(a,H(b),c);if(C(b))return E(a,b.getTime(),c)}else if(e(a)){if(e(b))return E(J(a),J(b),c);if(C(b))return E(H(a),b.getTime(),c);if(u(b))return E(H(a),b,c);if(null===b||b===h.voidOperation)return E(H(a),0,c);if(q(b))return E(H(a),H(b),c)}else if(C(a)){if(C(b))return E(a,b,c);if(null===b||b===h.voidOperation)return E(a.getTime(),0,c);if(u(b))return E(a.getTime(),
b,c);if(q(b)||e(b))return E(a.getTime(),H(b),c)}else if(q(a)){if(q(b))return E(a,b,c);if(u(b))return E(H(a),H(b),c);if(C(b))return E(H(a),b.getTime(),c);if(null===b||b===h.voidOperation)return E(H(a),0,c);if(e(b))return E(H(a),H(b),c)}return!I(a,b)||"\x3c\x3d"!==c&&"\x3e\x3d"!==c?!1:!0};h.equalityTest=I;h.toString=J;h.toNumberArray=function(a){var b=[];if(!1===z(a))return null;if(a instanceof n){for(var c=0;c<a.length();c++)b[c]=H(a.get(c));return b}for(c=0;c<a.length;c++)b[c]=H(a[c]);return b};h.toStringExplicit=
U;h.toNumber=H;h.toDate=function(a,b){return C(a)?a:e(a)&&(a=k(a,[void 0===b||null===b||""===b?k.ISO_8601:b]),a.isValid())?a.toDate():null};h.toDateM=function(a,b){return C(a)?k(a):e(a)&&(a=k(a,[void 0===b||null===b||""===b?k.ISO_8601:b]),a.isValid())?a:null};h.toBoolean=function(a){if(q(a))return a;if(e(a)){if(a=a.toLowerCase(),"true"===a)return!0}else if(u(a))return 0===a||isNaN(a)?!1:!0;return!1};h.fixSpatialReference=function(a,b){if(null===a||void 0===a)return null;if(null===a.spatialReference||
void 0===a.spatialReference)a.spatialReference=b;return a};h.fixNullGeometry=function(a){return null===a?null:a instanceof c?"NaN"===a.x||null===a.x||isNaN(a.x)?null:a:a instanceof w?0===a.rings.length?null:a:a instanceof r?0===a.paths.length?null:a:a instanceof x?0===a.points.length?null:a:a instanceof t?"NaN"===a.xmin||null===a.xmin||isNaN(a.xmin)?null:a:null};h.getDomainValue=function(a,b){if(!a||!a.domain)return null;var c=null;b="string"===a.field.type||"esriFieldTypeString"===a.field.type?J(b):
H(b);for(var d=0;d<a.domain.codedValues.length;d++){var e=a.domain.codedValues[d];e.code===b&&(c=e)}return null===c?null:c.name};h.getDomainCode=function(a,b){if(!a||!a.domain)return null;var c=null;b=J(b);for(var d=0;d<a.domain.codedValues.length;d++){var e=a.domain.codedValues[d];e.name===b&&(c=e)}return null===c?null:c.code};h.getDomain=function(b,c,d,e){void 0===d&&(d=null);if(!c||!c.fields)return null;for(var f=null,g=0;g<c.fields.length;g++){var h=c.fields[g];h.name.toLowerCase()===b.toString().toLowerCase()&&
(f=h)}if(null===f)return null;var k,p;e||(e=d&&c.typeIdField&&d._field(c.typeIdField));null!=e&&a.some(c.types,function(a){return a.id===e?((k=a.domains&&a.domains[f.name])&&"inherited"===k.type&&(k=K(f.name,c),p=!0),!0):!1});p||k||(k=K(b,c));return{field:f,domain:k}}})},"esri/moment":function(){define(["require","exports","./plugins/moment!"],function(b,h,l){return l})},"esri/plugins/moment":function(){define(["require","exports","dojo/_base/kernel","moment/moment"],function(b,h,l,k){Object.defineProperty(h,
"__esModule",{value:!0});var f={ar:1,"ar-dz":1,"ar-kw":1,"ar-ly":1,"ar-ma":1,"ar-sa":1,"ar-tn":1,bs:1,cs:1,da:1,de:1,"de-at":1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,"en-ie":1,"en-nz":1,es:1,"es-do":1,et:1,fi:1,fr:1,"fr-ca":1,"fr-ch":1,he:1,hi:1,hr:1,id:1,it:1,ja:1,ko:1,lt:1,lv:1,nb:1,nl:1,"nl-be":1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,sr:1,"sr-cyrl":1,sv:1,th:1,tr:1,vi:1,"zh-cn":1,"zh-hk":1,"zh-tw":1};h.load=function(b,h,g){b=l.locale;var d=b in f;if(!d){var a=b.split("-");1<a.length&&a[0]in f&&(b=
a[0],d=!0)}d?h(["moment/locale/"+b],function(){g(k)}):g(k)}})},"moment/moment":function(){(function(b,h){"object"===typeof exports&&"undefined"!==typeof module?module.exports=h():"function"===typeof define&&define.amd?define(h):b.moment=h()})(this,function(){function b(){return Sb.apply(null,arguments)}function h(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function l(a){return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function k(a){return void 0===
a}function f(a){return"number"===typeof a||"[object Number]"===Object.prototype.toString.call(a)}function n(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function m(a,b){var c=[],d;for(d=0;d<a.length;++d)c.push(b(a[d],d));return c}function g(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function d(a,b){for(var c in b)g(b,c)&&(a[c]=b[c]);g(b,"toString")&&(a.toString=b.toString);g(b,"valueOf")&&(a.valueOf=b.valueOf);return a}function a(a,b,c,d){return Ja(a,
b,c,d,!0).utc()}function c(a){null==a._pf&&(a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1});return a._pf}function r(a){if(null==a._isValid){var b=c(a),d=ec.call(b.parsedDateParts,function(a){return null!=a}),d=!isNaN(a._d.getTime())&&0>b.overflow&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&
(!b.meridiem||b.meridiem&&d);a._strict&&(d=d&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour);if(null!=Object.isFrozen&&Object.isFrozen(a))return d;a._isValid=d}return a._isValid}function w(b){var e=a(NaN);null!=b?d(c(e),b):c(e).userInvalidated=!0;return e}function t(a,b){var d,e,f;k(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject);k(b._i)||(a._i=b._i);k(b._f)||(a._f=b._f);k(b._l)||(a._l=b._l);k(b._strict)||(a._strict=b._strict);k(b._tzm)||(a._tzm=b._tzm);k(b._isUTC)||
(a._isUTC=b._isUTC);k(b._offset)||(a._offset=b._offset);k(b._pf)||(a._pf=c(b));k(b._locale)||(a._locale=b._locale);if(0<Fb.length)for(d=0;d<Fb.length;d++)e=Fb[d],f=b[e],k(f)||(a[e]=f);return a}function x(a){t(this,a);this._d=new Date(null!=a._d?a._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));!1===Gb&&(Gb=!0,b.updateOffset(this),Gb=!1)}function v(a){return a instanceof x||null!=a&&null!=a._isAMomentObject}function y(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function p(a){a=+a;var b=0;
0!==a&&isFinite(a)&&(b=y(a));return b}function e(a,b,c){var d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0,g;for(g=0;g<d;g++)(c&&a[g]!==b[g]||!c&&p(a[g])!==p(b[g]))&&f++;return f+e}function q(a){!1===b.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function u(a,c){var e=!0;return d(function(){null!=b.deprecationHandler&&b.deprecationHandler(null,a);if(e){for(var d=[],f,g=0;g<arguments.length;g++){f="";if("object"===
typeof arguments[g]){f+="\n["+g+"] ";for(var h in arguments[0])f+=h+": "+arguments[0][h]+", ";f=f.slice(0,-2)}else f=arguments[g];d.push(f)}q(a+"\nArguments: "+Array.prototype.slice.call(d).join("")+"\n"+Error().stack);e=!1}return c.apply(this,arguments)},c)}function z(a,c){null!=b.deprecationHandler&&b.deprecationHandler(a,c);Tb[a]||(q(c),Tb[a]=!0)}function C(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function B(a,b){var c=d({},a),e;for(e in b)g(b,e)&&
(l(a[e])&&l(b[e])?(c[e]={},d(c[e],a[e]),d(c[e],b[e])):null!=b[e]?c[e]=b[e]:delete c[e]);for(e in a)g(a,e)&&!g(b,e)&&l(a[e])&&(c[e]=d({},c[e]));return c}function F(a){null!=a&&this.set(a)}function D(a,b){var c=a.toLowerCase();ob[c]=ob[c+"s"]=ob[b]=a}function E(a){return"string"===typeof a?ob[a]||ob[a.toLowerCase()]:void 0}function I(a){var b={},c,d;for(d in a)g(a,d)&&(c=E(d))&&(b[c]=a[d]);return b}function J(a){var b=[],c;for(c in a)b.push({unit:c,priority:Ca[c]});b.sort(function(a,b){return a.priority-
b.priority});return b}function U(a,c){return function(d){if(null!=d){if(this.isValid())this._d["set"+(this._isUTC?"UTC":"")+a](d);b.updateOffset(this,c);return this}return P(this,a)}}function P(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function H(a,b,c){var d=""+Math.abs(a);return(0<=a?c?"+":"":"-")+Math.pow(10,Math.max(0,b-d.length)).toString().substr(1)+d}function K(a,b,c,d){var e=d;"string"===typeof d&&(e=function(){return this[d]()});a&&(mb[a]=e);b&&(mb[b[0]]=function(){return H(e.apply(this,
arguments),b[1],b[2])});c&&(mb[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function G(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function S(a){var b=a.match(Ub),c,d;c=0;for(d=b.length;c<d;c++)b[c]=mb[b[c]]?mb[b[c]]:G(b[c]);return function(c){var e="",f;for(f=0;f<d;f++)e+=C(b[f])?b[f].call(c,a):b[f];return e}}function O(a,b){if(!a.isValid())return a.localeData().invalidDate();b=da(b,a.localeData());Hb[b]=Hb[b]||S(b);return Hb[b](a)}function da(a,
b){function c(a){return b.longDateFormat(a)||a}var d=5;for(wb.lastIndex=0;0<=d&&wb.test(a);)a=a.replace(wb,c),wb.lastIndex=0,--d;return a}function N(a,b,c){Ib[a]=C(b)?b:function(a,d){return a&&c?c:b}}function M(a,b){return g(Ib,a)?Ib[a](b._strict,b._locale):new RegExp(ca(a))}function ca(a){return W(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function W(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$\x26")}function X(a,b){var c,d=b;"string"===
typeof a&&(a=[a]);f(b)&&(d=function(a,c){c[b]=p(a)});for(c=0;c<a.length;c++)Jb[a[c]]=d}function ga(a,b){X(a,function(a,c,d,e){d._w=d._w||{};b(a,d._w,d,e)})}function fa(a,b){return(new Date(Date.UTC(a,b+1,0))).getUTCDate()}function T(a,b){var c;if(!a.isValid())return a;if("string"===typeof b)if(/^\d+$/.test(b))b=p(b);else if(b=a.localeData().monthsParse(b),!f(b))return a;c=Math.min(a.date(),fa(a.year(),b));a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c);return a}function ka(a){return null!=a?(T(this,
a),b.updateOffset(this,!0),this):P(this,"Month")}function ja(){function b(a,b){return b.length-a.length}var c=[],d=[],e=[],f,g;for(f=0;12>f;f++)g=a([2E3,f]),c.push(this.monthsShort(g,"")),d.push(this.months(g,"")),e.push(this.months(g,"")),e.push(this.monthsShort(g,""));c.sort(b);d.sort(b);e.sort(b);for(f=0;12>f;f++)c[f]=W(c[f]),d[f]=W(d[f]);for(f=0;24>f;f++)e[f]=W(e[f]);this._monthsShortRegex=this._monthsRegex=new RegExp("^("+e.join("|")+")","i");this._monthsStrictRegex=new RegExp("^("+d.join("|")+
")","i");this._monthsShortStrictRegex=new RegExp("^("+c.join("|")+")","i")}function ha(a){return 0===a%4&&0!==a%100||0===a%400}function sa(a,b,c,d,e,f,g){b=new Date(a,b,c,d,e,f,g);100>a&&0<=a&&isFinite(b.getFullYear())&&b.setFullYear(a);return b}function wa(a){var b=new Date(Date.UTC.apply(null,arguments));100>a&&0<=a&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a);return b}function pa(a,b,c){c=7+b-c;return-((7+wa(a,0,c).getUTCDay()-b)%7)+c-1}function ta(a,b,c,d,e){c=(7+c-d)%7;d=pa(a,d,e);d=1+
7*(b-1)+c+d;0>=d?(b=a-1,a=(ha(b)?366:365)+d):d>(ha(a)?366:365)?(b=a+1,a=d-(ha(a)?366:365)):(b=a,a=d);return{year:b,dayOfYear:a}}function Ba(a,b,c){var d=pa(a.year(),b,c),d=Math.floor((a.dayOfYear()-d-1)/7)+1;1>d?(a=a.year()-1,b=d+oa(a,b,c)):d>oa(a.year(),b,c)?(b=d-oa(a.year(),b,c),a=a.year()+1):(a=a.year(),b=d);return{week:b,year:a}}function oa(a,b,c){var d=pa(a,b,c);b=pa(a+1,b,c);return((ha(a)?366:365)-d+b)/7}function hb(b,c,d){var e,f;b=b.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=
[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],e=0;7>e;++e)f=a([2E3,1]).day(e),this._minWeekdaysParse[e]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[e]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[e]=this.weekdays(f,"").toLocaleLowerCase();if(d)c="dddd"===c?Aa.call(this._weekdaysParse,b):"ddd"===c?Aa.call(this._shortWeekdaysParse,b):Aa.call(this._minWeekdaysParse,b);else if("dddd"===c){c=Aa.call(this._weekdaysParse,b);if(-1!==c)return c;c=Aa.call(this._shortWeekdaysParse,
b);if(-1!==c)return c;c=Aa.call(this._minWeekdaysParse,b)}else if("ddd"===c){c=Aa.call(this._shortWeekdaysParse,b);if(-1!==c)return c;c=Aa.call(this._weekdaysParse,b);if(-1!==c)return c;c=Aa.call(this._minWeekdaysParse,b)}else{c=Aa.call(this._minWeekdaysParse,b);if(-1!==c)return c;c=Aa.call(this._weekdaysParse,b);if(-1!==c)return c;c=Aa.call(this._shortWeekdaysParse,b)}return-1!==c?c:null}function Qa(){function b(a,b){return b.length-a.length}var c=[],d=[],e=[],f=[],g,h,k,p;for(g=0;7>g;g++)h=a([2E3,
1]).day(g),k=this.weekdaysMin(h,""),p=this.weekdaysShort(h,""),h=this.weekdays(h,""),c.push(k),d.push(p),e.push(h),f.push(k),f.push(p),f.push(h);c.sort(b);d.sort(b);e.sort(b);f.sort(b);for(g=0;7>g;g++)d[g]=W(d[g]),e[g]=W(e[g]),f[g]=W(f[g]);this._weekdaysMinRegex=this._weekdaysShortRegex=this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i");this._weekdaysStrictRegex=new RegExp("^("+e.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i");this._weekdaysMinStrictRegex=
new RegExp("^("+c.join("|")+")","i")}function Ha(){return this.hours()%12||12}function ua(a,b){K(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function ya(a,b){return b._meridiemParse}function Fa(a){return a?a.toLowerCase().replace("_","-"):a}function ib(a){var b=null;if(!va[a]&&"undefined"!==typeof module&&module&&module.exports)try{b=xb._abbr,require("./locale/"+a),Ga(b)}catch(Pc){}return va[a]}function Ga(a,b){a&&(a=k(b)?Da(a):Ia(a,b))&&(xb=a);return xb._abbr}
function Ia(a,b){if(null!==b){var c=Vb;b.abbr=a;if(null!=va[a])z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=va[a]._config;else if(null!=b.parentLocale)if(null!=va[b.parentLocale])c=va[b.parentLocale]._config;else return pb[b.parentLocale]||(pb[b.parentLocale]=[]),pb[b.parentLocale].push({name:a,
config:b}),null;va[a]=new F(B(c,b));pb[a]&&pb[a].forEach(function(a){Ia(a.name,a.config)});Ga(a);return va[a]}delete va[a];return null}function Da(a){var b;a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr);if(!a)return xb;if(!h(a)){if(b=ib(a))return b;a=[a]}a:{b=0;for(var c,d,f,g;b<a.length;){g=Fa(a[b]).split("-");c=g.length;for(d=(d=Fa(a[b+1]))?d.split("-"):null;0<c;){if(f=ib(g.slice(0,c).join("-"))){a=f;break a}if(d&&d.length>=c&&e(g,d,!0)>=c-1)break;c--}b++}a=null}return a}function Ea(a){var b;
(b=a._a)&&-2===c(a).overflow&&(b=0>b[Xa]||11<b[Xa]?Xa:1>b[Sa]||b[Sa]>fa(b[Na],b[Xa])?Sa:0>b[xa]||24<b[xa]||24===b[xa]&&(0!==b[Oa]||0!==b[Ya]||0!==b[jb])?xa:0>b[Oa]||59<b[Oa]?Oa:0>b[Ya]||59<b[Ya]?Ya:0>b[jb]||999<b[jb]?jb:-1,c(a)._overflowDayOfYear&&(b<Na||b>Sa)&&(b=Sa),c(a)._overflowWeeks&&-1===b&&(b=fc),c(a)._overflowWeekday&&-1===b&&(b=gc),c(a).overflow=b);return a}function Pa(a){var b,d;b=a._i;var e=hc.exec(b)||ic.exec(b),f,g,h,k;if(e){c(a).iso=!0;b=0;for(d=yb.length;b<d;b++)if(yb[b][1].exec(e[1])){g=
yb[b][0];f=!1!==yb[b][2];break}if(null==g)a._isValid=!1;else{if(e[3]){b=0;for(d=Kb.length;b<d;b++)if(Kb[b][1].exec(e[3])){h=(e[2]||" ")+Kb[b][0];break}if(null==h){a._isValid=!1;return}}if(f||null==h){if(e[4])if(jc.exec(e[4]))k="Z";else{a._isValid=!1;return}a._f=g+(h||"")+(k||"");za(a)}else a._isValid=!1}}else a._isValid=!1}function $a(a){var b,d,e,f,g={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},h;
b=a._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,"");if(b=kc.exec(b)){d=b[1]?"ddd"+(5===b[1].length?", ":" "):"";e="D MMM "+(10<b[2].length?"YYYY ":"YY ");f="HH:mm"+(b[4]?":ss":"");if(b[1]){var k="Sun Mon Tue Wed Thu Fri Sat".split(" ")[(new Date(b[2])).getDay()];if(b[1].substr(0,3)!==k){c(a).weekdayMismatch=!0;a._isValid=!1;return}}switch(b[5].length){case 2:0===h?g=" +0000":(h="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(b[5][1].toUpperCase())-12,g=(0>h?" -":" +")+(""+
h).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:g=g[b[5]];break;default:g=g[" GMT"]}b[5]=g;a._i=b.splice(1).join("");a._f=d+e+f+" ZZ";za(a);c(a).rfc2822=!0}else a._isValid=!1}function Ra(a){var c=lc.exec(a._i);null!==c?a._d=new Date(+c[1]):(Pa(a),!1===a._isValid&&(delete a._isValid,$a(a),!1===a._isValid&&(delete a._isValid,b.createFromInputFallback(a))))}function Ma(a,b,c){return null!=a?a:null!=b?b:c}function R(a){var d,e=[],f;if(!a._d){f=new Date(b.now());f=a._useUTC?[f.getUTCFullYear(),
f.getUTCMonth(),f.getUTCDate()]:[f.getFullYear(),f.getMonth(),f.getDate()];if(a._w&&null==a._a[Sa]&&null==a._a[Xa]){var g,h,k,p,q,m;g=a._w;if(null!=g.GG||null!=g.W||null!=g.E){if(q=1,m=4,h=Ma(g.GG,a._a[Na],Ba(aa(),1,4).year),k=Ma(g.W,1),p=Ma(g.E,1),1>p||7<p)d=!0}else if(q=a._locale._week.dow,m=a._locale._week.doy,k=Ba(aa(),q,m),h=Ma(g.gg,a._a[Na],k.year),k=Ma(g.w,k.week),null!=g.d){if(p=g.d,0>p||6<p)d=!0}else if(null!=g.e){if(p=g.e+q,0>g.e||6<g.e)d=!0}else p=q;1>k||k>oa(h,q,m)?c(a)._overflowWeeks=
!0:null!=d?c(a)._overflowWeekday=!0:(d=ta(h,k,p,q,m),a._a[Na]=d.year,a._dayOfYear=d.dayOfYear)}if(null!=a._dayOfYear){d=Ma(a._a[Na],f[Na]);if(a._dayOfYear>(ha(d)?366:365)||0===a._dayOfYear)c(a)._overflowDayOfYear=!0;d=wa(d,0,a._dayOfYear);a._a[Xa]=d.getUTCMonth();a._a[Sa]=d.getUTCDate()}for(d=0;3>d&&null==a._a[d];++d)a._a[d]=e[d]=f[d];for(;7>d;d++)a._a[d]=e[d]=null==a._a[d]?2===d?1:0:a._a[d];24===a._a[xa]&&0===a._a[Oa]&&0===a._a[Ya]&&0===a._a[jb]&&(a._nextDay=!0,a._a[xa]=0);a._d=(a._useUTC?wa:sa).apply(null,
e);null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm);a._nextDay&&(a._a[xa]=24)}}function za(a){if(a._f===b.ISO_8601)Pa(a);else if(a._f===b.RFC_2822)$a(a);else{a._a=[];c(a).empty=!0;var d=""+a._i,e,f,h,k,p,q=d.length,m=0;h=da(a._f,a._locale).match(Ub)||[];for(e=0;e<h.length;e++){k=h[e];if(f=(d.match(M(k,a))||[])[0])p=d.substr(0,d.indexOf(f)),0<p.length&&c(a).unusedInput.push(p),d=d.slice(d.indexOf(f)+f.length),m+=f.length;if(mb[k]){if(f?c(a).empty=!1:c(a).unusedTokens.push(k),p=a,null!=
f&&g(Jb,k))Jb[k](f,p._a,p,k)}else a._strict&&!f&&c(a).unusedTokens.push(k)}c(a).charsLeftOver=q-m;0<d.length&&c(a).unusedInput.push(d);12>=a._a[xa]&&!0===c(a).bigHour&&0<a._a[xa]&&(c(a).bigHour=void 0);c(a).parsedDateParts=a._a.slice(0);c(a).meridiem=a._meridiem;d=a._a;e=xa;q=a._locale;h=a._a[xa];m=a._meridiem;null!=m&&(null!=q.meridiemHour?h=q.meridiemHour(h,m):null!=q.isPM&&((q=q.isPM(m))&&12>h&&(h+=12),q||12!==h||(h=0)));d[e]=h;R(a);Ea(a)}}function Va(a){if(!a._d){var b=I(a._i);a._a=m([b.year,
b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)});R(a)}}function Z(a){var b=a._i,e=a._f;a._locale=a._locale||Da(a._l);if(null===b||void 0===e&&""===b)return w({nullInput:!0});"string"===typeof b&&(a._i=b=a._locale.preparse(b));if(v(b))return new x(Ea(b));if(n(b))a._d=b;else if(h(e)){var f,g,k;if(0===a._f.length)c(a).invalidFormat=!0,a._d=new Date(NaN);else{for(b=0;b<a._f.length;b++)if(e=0,f=t({},a),null!=a._useUTC&&(f._useUTC=a._useUTC),f._f=a._f[b],
za(f),r(f)&&(e+=c(f).charsLeftOver,e+=10*c(f).unusedTokens.length,c(f).score=e,null==k||e<k))k=e,g=f;d(a,g||f)}}else e?za(a):La(a);r(a)||(a._d=null);return a}function La(a){var c=a._i;k(c)?a._d=new Date(b.now()):n(c)?a._d=new Date(c.valueOf()):"string"===typeof c?Ra(a):h(c)?(a._a=m(c.slice(0),function(a){return parseInt(a,10)}),R(a)):l(c)?Va(a):f(c)?a._d=new Date(c):b.createFromInputFallback(a)}function Ja(a,b,c,d,e){var f={};if(!0===c||!1===c)d=c,c=void 0;var g;if(g=l(a))a:{g=a;for(var k in g){g=
!1;break a}g=!0}if(g||h(a)&&0===a.length)a=void 0;f._isAMomentObject=!0;f._useUTC=f._isUTC=e;f._l=c;f._i=a;f._f=b;f._strict=d;a=new x(Ea(Z(f)));a._nextDay&&(a.add(1,"d"),a._nextDay=void 0);return a}function aa(a,b,c,d){return Ja(a,b,c,d,!1)}function bb(a,b){var c,d;1===b.length&&h(b[0])&&(b=b[0]);if(!b.length)return aa();c=b[0];for(d=1;d<b.length;++d)if(!b[d].isValid()||b[d][a](c))c=b[d];return c}function Q(a){for(var b in a)if(-1===qb.indexOf(b)||null!=a[b]&&isNaN(a[b]))return!1;b=!1;for(var c=0;c<
qb.length;++c)if(a[qb[c]]){if(b)return!1;parseFloat(a[qb[c]])!==p(a[qb[c]])&&(b=!0)}return!0}function la(a){a=I(a);var b=a.year||0,c=a.quarter||0,d=a.month||0,e=a.week||0,f=a.day||0,g=a.hour||0,h=a.minute||0,k=a.second||0,p=a.millisecond||0;this._isValid=Q(a);this._milliseconds=+p+1E3*k+6E4*h+36E5*g;this._days=+f+7*e;this._months=+d+3*c+12*b;this._data={};this._locale=Da();this._bubble()}function A(a){return a instanceof la}function ea(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function ia(a,
b){K(a,0,0,function(){var a=this.utcOffset(),c="+";0>a&&(a=-a,c="-");return c+H(~~(a/60),2)+b+H(~~a%60,2)})}function ma(a,b){a=(b||"").match(a);if(null===a)return null;a=((a[a.length-1]||[])+"").match(mc)||["-",0,0];b=+(60*a[1])+p(a[2]);return 0===b?0:"+"===a[0]?b:-b}function Y(a,c){return c._isUTC?(c=c.clone(),a=(v(a)||n(a)?a.valueOf():aa(a).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+a),b.updateOffset(c,!1),c):aa(a).local()}function ba(){return this.isValid()?this._isUTC&&0===this._offset:
!1}function L(a,b){var c=a,d=null;A(a)?c={ms:a._milliseconds,d:a._days,M:a._months}:f(a)?(c={},b?c[b]=a:c.milliseconds=a):(d=nc.exec(a))?(c="-"===d[1]?-1:1,c={y:0,d:p(d[Sa])*c,h:p(d[xa])*c,m:p(d[Oa])*c,s:p(d[Ya])*c,ms:p(ea(1E3*d[jb]))*c}):(d=oc.exec(a))?(c="-"===d[1]?-1:1,c={y:Wa(d[2],c),M:Wa(d[3],c),w:Wa(d[4],c),d:Wa(d[5],c),h:Wa(d[6],c),m:Wa(d[7],c),s:Wa(d[8],c)}):null==c?c={}:"object"===typeof c&&("from"in c||"to"in c)&&(d=aa(c.from),c=aa(c.to),d.isValid()&&c.isValid()?(c=Y(c,d),d.isBefore(c)?
c=nb(d,c):(c=nb(c,d),c.milliseconds=-c.milliseconds,c.months=-c.months),d=c):d={milliseconds:0,months:0},c={},c.ms=d.milliseconds,c.M=d.months);c=new la(c);A(a)&&g(a,"_locale")&&(c._locale=a._locale);return c}function Wa(a,b){a=a&&parseFloat(a.replace(",","."));return(isNaN(a)?0:a)*b}function nb(a,b){var c={milliseconds:0,months:0};c.months=b.month()-a.month()+12*(b.year()-a.year());a.clone().add(c.months,"M").isAfter(b)&&--c.months;c.milliseconds=+b-+a.clone().add(c.months,"M");return c}function lb(a,
b){return function(c,d){var e;null===d||isNaN(+d)||(z(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),e=c,c=d,d=e);c=L("string"===typeof c?+c:c,d);ub(this,c,a);return this}}function ub(a,c,d,e){var f=c._milliseconds,g=ea(c._days);c=ea(c._months);if(a.isValid()){e=null==e?!0:e;f&&a._d.setTime(a._d.valueOf()+f*d);if(g&&(f=P(a,"Date")+g*d,a.isValid()))a._d["set"+(a._isUTC?"UTC":
"")+"Date"](f);c&&T(a,P(a,"Month")+c*d);e&&b.updateOffset(a,g||c)}}function Ua(a){if(void 0===a)return this._locale._abbr;a=Da(a);null!=a&&(this._locale=a);return this}function sb(){return this._locale}function cb(a,b){K(0,[a,a.length],0,b)}function vb(a,b,c,d,e){var f;if(null==a)return Ba(this,d,e).year;f=oa(a,d,e);b>f&&(b=f);a=ta(a,b,c,d,e);a=wa(a.year,0,a.dayOfYear);this.year(a.getUTCFullYear());this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function Ob(a,b){b[jb]=p(1E3*("0."+
a))}function kb(a){return a}function fb(b,c,d,e){var f=Da();c=a().set(e,c);return f[d](c,b)}function Pb(a,b,c){f(a)&&(b=a,a=void 0);a=a||"";if(null!=b)return fb(a,b,c,"month");var d=[];for(b=0;12>b;b++)d[b]=fb(a,b,c,"month");return d}function Eb(a,b,c,d){"boolean"!==typeof a&&(c=b=a,a=!1);f(b)&&(c=b,b=void 0);b=b||"";var e=Da();a=a?e._week.dow:0;if(null!=c)return fb(b,(c+a)%7,d,"day");e=[];for(c=0;7>c;c++)e[c]=fb(b,(c+a)%7,d,"day");return e}function Qb(a,b,c,d){b=L(b,c);a._milliseconds+=d*b._milliseconds;
a._days+=d*b._days;a._months+=d*b._months;return a._bubble()}function Rb(a){return 0>a?Math.floor(a):Math.ceil(a)}function ab(a){return function(){return this.as(a)}}function gb(a){return function(){return this.isValid()?this._data[a]:NaN}}function dc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function tb(){if(!this.isValid())return this.localeData().invalidDate();var a=Lb(this._milliseconds)/1E3,b=Lb(this._days),c=Lb(this._months),d,e;d=y(a/60);e=y(d/60);a%=60;d%=60;var f=y(c/12),c=c%12,g=this.asSeconds();
return g?(0>g?"-":"")+"P"+(f?f+"Y":"")+(c?c+"M":"")+(b?b+"D":"")+(e||d||a?"T":"")+(e?e+"H":"")+(d?d+"M":"")+(a?a+"S":""):"P0D"}var Sb,ec=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;d<c;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1},Fb=b.momentProperties=[],Gb=!1,Tb={};b.suppressDeprecationWarnings=!1;b.deprecationHandler=null;var pc=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)g(a,b)&&c.push(b);return c},ob={},Ca={},Ub=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
wb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Hb={},mb={},Wb=/\d/,Ka=/\d\d/,Xb=/\d{3}/,Mb=/\d{4}/,zb=/[+-]?\d{6}/,ra=/\d\d?/,Yb=/\d\d\d\d?/,Zb=/\d\d\d\d\d\d?/,Ab=/\d{1,3}/,Nb=/\d{1,4}/,Bb=/[+-]?\d{1,6}/,qc=/\d+/,Cb=/[+-]?\d+/,rc=/Z|[+-]\d\d:?\d\d/gi,Db=/Z|[+-]\d\d(?::?\d\d)?/gi,rb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ib={},Jb={},Na=0,Xa=1,Sa=2,xa=3,Oa=4,Ya=5,jb=6,fc=7,gc=8,Aa=Array.prototype.indexOf?Array.prototype.indexOf:
function(a){var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1};K("M",["MM",2],"Mo",function(){return this.month()+1});K("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)});K("MMMM",0,0,function(a){return this.localeData().months(this,a)});D("month","M");Ca.month=8;N("M",ra);N("MM",ra,Ka);N("MMM",function(a,b){return b.monthsShortRegex(a)});N("MMMM",function(a,b){return b.monthsRegex(a)});X(["M","MM"],function(a,b){b[Xa]=p(a)-1});X(["MMM","MMMM"],function(a,b,d,e){e=
d._locale.monthsParse(a,e,d._strict);null!=e?b[Xa]=e:c(d).invalidMonth=a});var $b=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;K("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a});K(0,["YY",2],0,function(){return this.year()%100});K(0,["YYYY",4],0,"year");K(0,["YYYYY",5],0,"year");K(0,["YYYYYY",6,!0],0,"year");D("year","y");Ca.year=1;N("Y",Cb);N("YY",ra,Ka);N("YYYY",Nb,Mb);N("YYYYY",Bb,zb);N("YYYYYY",Bb,zb);X(["YYYYY","YYYYYY"],Na);X("YYYY",function(a,c){c[Na]=2===a.length?b.parseTwoDigitYear(a):
p(a)});X("YY",function(a,c){c[Na]=b.parseTwoDigitYear(a)});X("Y",function(a,b){b[Na]=parseInt(a,10)});b.parseTwoDigitYear=function(a){return p(a)+(68<p(a)?1900:2E3)};var ac=U("FullYear",!0);K("w",["ww",2],"wo","week");K("W",["WW",2],"Wo","isoWeek");D("week","w");D("isoWeek","W");Ca.week=5;Ca.isoWeek=5;N("w",ra);N("ww",ra,Ka);N("W",ra);N("WW",ra,Ka);ga(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=p(a)});K("d",0,"do","day");K("dd",0,0,function(a){return this.localeData().weekdaysMin(this,
a)});K("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)});K("dddd",0,0,function(a){return this.localeData().weekdays(this,a)});K("e",0,0,"weekday");K("E",0,0,"isoWeekday");D("day","d");D("weekday","e");D("isoWeekday","E");Ca.day=11;Ca.weekday=11;Ca.isoWeekday=11;N("d",ra);N("e",ra);N("E",ra);N("dd",function(a,b){return b.weekdaysMinRegex(a)});N("ddd",function(a,b){return b.weekdaysShortRegex(a)});N("dddd",function(a,b){return b.weekdaysRegex(a)});ga(["dd","ddd","dddd"],function(a,
b,d,e){e=d._locale.weekdaysParse(a,e,d._strict);null!=e?b.d=e:c(d).invalidWeekday=a});ga(["d","e","E"],function(a,b,c,d){b[d]=p(a)});K("H",["HH",2],0,"hour");K("h",["hh",2],0,Ha);K("k",["kk",2],0,function(){return this.hours()||24});K("hmm",0,0,function(){return""+Ha.apply(this)+H(this.minutes(),2)});K("hmmss",0,0,function(){return""+Ha.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)});K("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)});K("Hmmss",0,0,function(){return""+this.hours()+
H(this.minutes(),2)+H(this.seconds(),2)});ua("a",!0);ua("A",!1);D("hour","h");Ca.hour=13;N("a",ya);N("A",ya);N("H",ra);N("h",ra);N("k",ra);N("HH",ra,Ka);N("hh",ra,Ka);N("kk",ra,Ka);N("hmm",Yb);N("hmmss",Zb);N("Hmm",Yb);N("Hmmss",Zb);X(["H","HH"],xa);X(["k","kk"],function(a,b,c){a=p(a);b[xa]=24===a?0:a});X(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a);c._meridiem=a});X(["h","hh"],function(a,b,d){b[xa]=p(a);c(d).bigHour=!0});X("hmm",function(a,b,d){var e=a.length-2;b[xa]=p(a.substr(0,e));b[Oa]=
p(a.substr(e));c(d).bigHour=!0});X("hmmss",function(a,b,d){var e=a.length-4,f=a.length-2;b[xa]=p(a.substr(0,e));b[Oa]=p(a.substr(e,2));b[Ya]=p(a.substr(f));c(d).bigHour=!0});X("Hmm",function(a,b,c){c=a.length-2;b[xa]=p(a.substr(0,c));b[Oa]=p(a.substr(c))});X("Hmmss",function(a,b,c){c=a.length-4;var d=a.length-2;b[xa]=p(a.substr(0,c));b[Oa]=p(a.substr(c,2));b[Ya]=p(a.substr(d))});var sc=U("Hours",!0),Vb={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",
lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January February March April May June July August September October November December".split(" "),
monthsShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),week:{dow:0,doy:6},weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),meridiemParse:/[ap]\.?m?\.?/i},va={},pb={},xb,hc=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ic=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
jc=/Z|[+-]\d\d(?::?\d\d)?/,yb=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Kb=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",
/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],lc=/^\/?Date\((\-?\d+)/i,kc=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;b.createFromInputFallback=u("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))});b.ISO_8601=function(){};b.RFC_2822=function(){};var tc=u("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=aa.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:w()}),uc=u("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=aa.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?
this:a:w()}),qb="year quarter month week day hour minute second millisecond".split(" ");ia("Z",":");ia("ZZ","");N("Z",Db);N("ZZ",Db);X(["Z","ZZ"],function(a,b,c){c._useUTC=!0;c._tzm=ma(Db,a)});var mc=/([\+\-]|\d\d)/gi;b.updateOffset=function(){};var nc=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,oc=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;L.fn=la.prototype;L.invalid=function(){return L(NaN)};
var vc=lb(1,"add"),wc=lb(-1,"subtract");b.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";b.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var bc=u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});K(0,["gg",2],0,function(){return this.weekYear()%100});K(0,["GG",2],0,function(){return this.isoWeekYear()%100});cb("gggg","weekYear");cb("ggggg","weekYear");
cb("GGGG","isoWeekYear");cb("GGGGG","isoWeekYear");D("weekYear","gg");D("isoWeekYear","GG");Ca.weekYear=1;Ca.isoWeekYear=1;N("G",Cb);N("g",Cb);N("GG",ra,Ka);N("gg",ra,Ka);N("GGGG",Nb,Mb);N("gggg",Nb,Mb);N("GGGGG",Bb,zb);N("ggggg",Bb,zb);ga(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=p(a)});ga(["gg","GG"],function(a,c,d,e){c[e]=b.parseTwoDigitYear(a)});K("Q",0,"Qo","quarter");D("quarter","Q");Ca.quarter=7;N("Q",Wb);X("Q",function(a,b){b[Xa]=3*(p(a)-1)});K("D",["DD",2],"Do","date");
D("date","D");Ca.date=9;N("D",ra);N("DD",ra,Ka);N("Do",function(a,b){return a?b._dayOfMonthOrdinalParse||b._ordinalParse:b._dayOfMonthOrdinalParseLenient});X(["D","DD"],Sa);X("Do",function(a,b){b[Sa]=p(a.match(ra)[0],10)});var cc=U("Date",!0);K("DDD",["DDDD",3],"DDDo","dayOfYear");D("dayOfYear","DDD");Ca.dayOfYear=4;N("DDD",Ab);N("DDDD",Xb);X(["DDD","DDDD"],function(a,b,c){c._dayOfYear=p(a)});K("m",["mm",2],0,"minute");D("minute","m");Ca.minute=14;N("m",ra);N("mm",ra,Ka);X(["m","mm"],Oa);var xc=U("Minutes",
!1);K("s",["ss",2],0,"second");D("second","s");Ca.second=15;N("s",ra);N("ss",ra,Ka);X(["s","ss"],Ya);var yc=U("Seconds",!1);K("S",0,0,function(){return~~(this.millisecond()/100)});K(0,["SS",2],0,function(){return~~(this.millisecond()/10)});K(0,["SSS",3],0,"millisecond");K(0,["SSSS",4],0,function(){return 10*this.millisecond()});K(0,["SSSSS",5],0,function(){return 100*this.millisecond()});K(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});K(0,["SSSSSSS",7],0,function(){return 1E4*this.millisecond()});
K(0,["SSSSSSSS",8],0,function(){return 1E5*this.millisecond()});K(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});D("millisecond","ms");Ca.millisecond=16;N("S",Ab,Wb);N("SS",Ab,Ka);N("SSS",Ab,Xb);var db;for(db="SSSS";9>=db.length;db+="S")N(db,qc);for(db="S";9>=db.length;db+="S")X(db,Ob);var zc=U("Milliseconds",!1);K("z",0,0,"zoneAbbr");K("zz",0,0,"zoneName");var V=x.prototype;V.add=vc;V.calendar=function(a,c){a=a||aa();var d=Y(a,this).startOf("day"),d=b.calendarFormat(this,d)||"sameElse";
c=c&&(C(c[d])?c[d].call(this,a):c[d]);return this.format(c||this.localeData().calendar(d,this,aa(a)))};V.clone=function(){return new x(this)};V.diff=function(a,b,c){var d;if(!this.isValid())return NaN;a=Y(a,this);if(!a.isValid())return NaN;d=6E4*(a.utcOffset()-this.utcOffset());b=E(b);if("year"===b||"month"===b||"quarter"===b){d=12*(a.year()-this.year())+(a.month()-this.month());var e=this.clone().add(d,"months"),f;0>a-e?(f=this.clone().add(d-1,"months"),a=(a-e)/(e-f)):(f=this.clone().add(d+1,"months"),
a=(a-e)/(f-e));a=-(d+a)||0;"quarter"===b?a/=3:"year"===b&&(a/=12)}else a=this-a,a="second"===b?a/1E3:"minute"===b?a/6E4:"hour"===b?a/36E5:"day"===b?(a-d)/864E5:"week"===b?(a-d)/6048E5:a;return c?a:y(a)};V.endOf=function(a){a=E(a);if(void 0===a||"millisecond"===a)return this;"date"===a&&(a="day");return this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")};V.format=function(a){a||(a=this.isUtc()?b.defaultFormatUtc:b.defaultFormat);a=O(this,a);return this.localeData().postformat(a)};V.from=
function(a,b){return this.isValid()&&(v(a)&&a.isValid()||aa(a).isValid())?L({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};V.fromNow=function(a){return this.from(aa(),a)};V.to=function(a,b){return this.isValid()&&(v(a)&&a.isValid()||aa(a).isValid())?L({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};V.toNow=function(a){return this.to(aa(),a)};V.get=function(a){a=E(a);return C(this[a])?this[a]():this};V.invalidAt=function(){return c(this).overflow};
V.isAfter=function(a,b){a=v(a)?a:aa(a);if(!this.isValid()||!a.isValid())return!1;b=E(k(b)?"millisecond":b);return"millisecond"===b?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(b).valueOf()};V.isBefore=function(a,b){a=v(a)?a:aa(a);if(!this.isValid()||!a.isValid())return!1;b=E(k(b)?"millisecond":b);return"millisecond"===b?this.valueOf()<a.valueOf():this.clone().endOf(b).valueOf()<a.valueOf()};V.isBetween=function(a,b,c,d){d=d||"()";return("("===d[0]?this.isAfter(a,c):!this.isBefore(a,
c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))};V.isSame=function(a,b){a=v(a)?a:aa(a);if(!this.isValid()||!a.isValid())return!1;b=E(b||"millisecond");if("millisecond"===b)return this.valueOf()===a.valueOf();a=a.valueOf();return this.clone().startOf(b).valueOf()<=a&&a<=this.clone().endOf(b).valueOf()};V.isSameOrAfter=function(a,b){return this.isSame(a,b)||this.isAfter(a,b)};V.isSameOrBefore=function(a,b){return this.isSame(a,b)||this.isBefore(a,b)};V.isValid=function(){return r(this)};V.lang=
bc;V.locale=Ua;V.localeData=sb;V.max=uc;V.min=tc;V.parsingFlags=function(){return d({},c(this))};V.set=function(a,b){if("object"===typeof a){a=I(a);b=J(a);for(var c=0;c<b.length;c++)this[b[c].unit](a[b[c].unit])}else if(a=E(a),C(this[a]))return this[a](b);return this};V.startOf=function(a){a=E(a);switch(a){case "year":this.month(0);case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":case "date":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}"week"===
a&&this.weekday(0);"isoWeek"===a&&this.isoWeekday(1);"quarter"===a&&this.month(3*Math.floor(this.month()/3));return this};V.subtract=wc;V.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]};V.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}};V.toDate=function(){return new Date(this.valueOf())};V.toISOString=
function(){if(!this.isValid())return null;var a=this.clone().utc();return 0>a.year()||9999<a.year()?O(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):C(Date.prototype.toISOString)?this.toDate().toISOString():O(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")};V.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",b="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",b="Z");var a="["+a+'("]',c=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY";return this.format(a+
c+"-MM-DD[T]HH:mm:ss.SSS"+(b+'[")]'))};V.toJSON=function(){return this.isValid()?this.toISOString():null};V.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};V.unix=function(){return Math.floor(this.valueOf()/1E3)};V.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||0)};V.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};V.year=ac;V.isLeapYear=function(){return ha(this.year())};
V.weekYear=function(a){return vb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};V.isoWeekYear=function(a){return vb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)};V.quarter=V.quarters=function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)};V.month=ka;V.daysInMonth=function(){return fa(this.year(),this.month())};V.week=V.weeks=function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")};
V.isoWeek=V.isoWeeks=function(a){var b=Ba(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")};V.weeksInYear=function(){var a=this.localeData()._week;return oa(this.year(),a.dow,a.doy)};V.isoWeeksInYear=function(){return oa(this.year(),1,4)};V.date=cc;V.day=V.days=function(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=a){var c=this.localeData();"string"===typeof a&&(isNaN(a)?(a=c.weekdaysParse(a),a="number"===typeof a?a:null):a=parseInt(a,
10));return this.add(a-b,"d")}return b};V.weekday=function(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")};V.isoWeekday=function(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var b=this.localeData();a="string"===typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a;return this.day(this.day()%7?a:a-7)}return this.day()||7};V.dayOfYear=function(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/
864E5)+1;return null==a?b:this.add(a-b,"d")};V.hour=V.hours=sc;V.minute=V.minutes=xc;V.second=V.seconds=yc;V.millisecond=V.milliseconds=zc;V.utcOffset=function(a,c,d){var e=this._offset||0,f;if(!this.isValid())return null!=a?this:NaN;if(null!=a){if("string"===typeof a){if(a=ma(Db,a),null===a)return this}else 16>Math.abs(a)&&!d&&(a*=60);!this._isUTC&&c&&(f=15*-Math.round(this._d.getTimezoneOffset()/15));this._offset=a;this._isUTC=!0;null!=f&&this.add(f,"m");e!==a&&(!c||this._changeInProgress?ub(this,
L(a-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,b.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?e:15*-Math.round(this._d.getTimezoneOffset()/15)};V.utc=function(a){return this.utcOffset(0,a)};V.local=function(a){this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(15*-Math.round(this._d.getTimezoneOffset()/15),"m"));return this};V.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var a=
ma(rc,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this};V.hasAlignedHourOffset=function(a){if(!this.isValid())return!1;a=a?aa(a).utcOffset():0;return 0===(this.utcOffset()-a)%60};V.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};V.isLocal=function(){return this.isValid()?!this._isUTC:!1};V.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};V.isUtc=ba;V.isUTC=ba;V.zoneAbbr=function(){return this._isUTC?
"UTC":""};V.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};V.dates=u("dates accessor is deprecated. Use date instead.",cc);V.months=u("months accessor is deprecated. Use month instead",ka);V.years=u("years accessor is deprecated. Use year instead",ac);V.zone=u("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(a,b){return null!=a?("string"!==typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()});V.isDSTShifted=
u("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!k(this._isDSTShifted))return this._isDSTShifted;var b={};t(b,this);b=Z(b);if(b._a){var c=b._isUTC?a(b._a):aa(b._a);this._isDSTShifted=this.isValid()&&0<e(b._a,c.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var qa=F.prototype;qa.calendar=function(a,b,c){a=this._calendar[a]||this._calendar.sameElse;return C(a)?a.call(b,c):a};qa.longDateFormat=function(a){var b=
this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];if(b||!c)return b;this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)});return this._longDateFormat[a]};qa.invalidDate=function(){return this._invalidDate};qa.ordinal=function(a){return this._ordinal.replace("%d",a)};qa.preparse=kb;qa.postformat=kb;qa.relativeTime=function(a,b,c,d){var e=this._relativeTime[c];return C(e)?e(a,b,c,d):e.replace(/%d/i,a)};qa.pastFuture=function(a,b){a=this._relativeTime[0<a?
"future":"past"];return C(a)?a(b):a.replace(/%s/i,b)};qa.set=function(a){var b,c;for(c in a)b=a[c],C(b)?this[c]=b:this["_"+c]=b;this._config=a;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)};qa.months=function(a,b){return a?h(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||$b).test(b)?"format":"standalone"][a.month()]:h(this._months)?this._months:this._months.standalone};qa.monthsShort=
function(a,b){return a?h(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[$b.test(b)?"format":"standalone"][a.month()]:h(this._monthsShort)?this._monthsShort:this._monthsShort.standalone};qa.monthsParse=function(b,c,d){var e,f;if(this._monthsParseExact){a:{b=b.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],e=0;12>e;++e)f=a([2E3,e]),this._shortMonthsParse[e]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[e]=
this.months(f,"").toLocaleLowerCase();if(d)c="MMM"===c?Aa.call(this._shortMonthsParse,b):Aa.call(this._longMonthsParse,b);else if("MMM"===c){c=Aa.call(this._shortMonthsParse,b);if(-1!==c)break a;c=Aa.call(this._longMonthsParse,b)}else{c=Aa.call(this._longMonthsParse,b);if(-1!==c)break a;c=Aa.call(this._shortMonthsParse,b)}c=-1!==c?c:null}return c}this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(e=0;12>e;e++)if(f=a([2E3,e]),d&&!this._longMonthsParse[e]&&
(this._longMonthsParse[e]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[e]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),d||this._monthsParse[e]||(f="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[e]=new RegExp(f.replace(".",""),"i")),d&&"MMMM"===c&&this._longMonthsParse[e].test(b)||d&&"MMM"===c&&this._shortMonthsParse[e].test(b)||!d&&this._monthsParse[e].test(b))return e};qa.monthsRegex=function(a){if(this._monthsParseExact)return g(this,
"_monthsRegex")||ja.call(this),a?this._monthsStrictRegex:this._monthsRegex;g(this,"_monthsRegex")||(this._monthsRegex=rb);return this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex};qa.monthsShortRegex=function(a){if(this._monthsParseExact)return g(this,"_monthsRegex")||ja.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex;g(this,"_monthsShortRegex")||(this._monthsShortRegex=rb);return this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex};
qa.week=function(a){return Ba(a,this._week.dow,this._week.doy).week};qa.firstDayOfYear=function(){return this._week.doy};qa.firstDayOfWeek=function(){return this._week.dow};qa.weekdays=function(a,b){return a?h(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:h(this._weekdays)?this._weekdays:this._weekdays.standalone};qa.weekdaysMin=function(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin};qa.weekdaysShort=function(a){return a?
this._weekdaysShort[a.day()]:this._weekdaysShort};qa.weekdaysParse=function(b,c,d){var e,f;if(this._weekdaysParseExact)return hb.call(this,b,c,d);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(e=0;7>e;e++)if(f=a([2E3,1]).day(e),d&&!this._fullWeekdaysParse[e]&&(this._fullWeekdaysParse[e]=new RegExp("^"+this.weekdays(f,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[e]=new RegExp("^"+this.weekdaysShort(f,"").replace(".",
".?")+"$","i"),this._minWeekdaysParse[e]=new RegExp("^"+this.weekdaysMin(f,"").replace(".",".?")+"$","i")),this._weekdaysParse[e]||(f="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[e]=new RegExp(f.replace(".",""),"i")),d&&"dddd"===c&&this._fullWeekdaysParse[e].test(b)||d&&"ddd"===c&&this._shortWeekdaysParse[e].test(b)||d&&"dd"===c&&this._minWeekdaysParse[e].test(b)||!d&&this._weekdaysParse[e].test(b))return e};qa.weekdaysRegex=function(a){if(this._weekdaysParseExact)return g(this,
"_weekdaysRegex")||Qa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex;g(this,"_weekdaysRegex")||(this._weekdaysRegex=rb);return this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex};qa.weekdaysShortRegex=function(a){if(this._weekdaysParseExact)return g(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;g(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=rb);return this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:
this._weekdaysShortRegex};qa.weekdaysMinRegex=function(a){if(this._weekdaysParseExact)return g(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;g(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=rb);return this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex};qa.isPM=function(a){return"p"===(a+"").toLowerCase().charAt(0)};qa.meridiem=function(a,b,c){return 11<a?c?"pm":"PM":c?"am":"AM"};Ga("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,
ordinal:function(a){var b=a%10,b=1===p(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+b}});b.lang=u("moment.lang is deprecated. Use moment.locale instead.",Ga);b.langData=u("moment.langData is deprecated. Use moment.localeData instead.",Da);var Za=Math.abs,Ac=ab("ms"),Bc=ab("s"),Cc=ab("m"),Dc=ab("h"),Ec=ab("d"),Fc=ab("w"),Gc=ab("M"),Hc=ab("y"),Ic=gb("milliseconds"),Jc=gb("seconds"),Kc=gb("minutes"),Lc=gb("hours"),Mc=gb("days"),Nc=gb("months"),Oc=gb("years"),eb=Math.round,Ta={ss:44,
s:45,m:45,h:22,d:26,M:11},Lb=Math.abs,na=la.prototype;na.isValid=function(){return this._isValid};na.abs=function(){var a=this._data;this._milliseconds=Za(this._milliseconds);this._days=Za(this._days);this._months=Za(this._months);a.milliseconds=Za(a.milliseconds);a.seconds=Za(a.seconds);a.minutes=Za(a.minutes);a.hours=Za(a.hours);a.months=Za(a.months);a.years=Za(a.years);return this};na.add=function(a,b){return Qb(this,a,b,1)};na.subtract=function(a,b){return Qb(this,a,b,-1)};na.as=function(a){if(!this.isValid())return NaN;
var b,c=this._milliseconds;a=E(a);if("month"===a||"year"===a)return b=this._days+c/864E5,b=this._months+4800*b/146097,"month"===a?b:b/12;b=this._days+Math.round(146097*this._months/4800);switch(a){case "week":return b/7+c/6048E5;case "day":return b+c/864E5;case "hour":return 24*b+c/36E5;case "minute":return 1440*b+c/6E4;case "second":return 86400*b+c/1E3;case "millisecond":return Math.floor(864E5*b)+c;default:throw Error("Unknown unit "+a);}};na.asMilliseconds=Ac;na.asSeconds=Bc;na.asMinutes=Cc;na.asHours=
Dc;na.asDays=Ec;na.asWeeks=Fc;na.asMonths=Gc;na.asYears=Hc;na.valueOf=function(){return this.isValid()?this._milliseconds+864E5*this._days+this._months%12*2592E6+31536E6*p(this._months/12):NaN};na._bubble=function(){var a=this._milliseconds,b=this._days,c=this._months,d=this._data;0<=a&&0<=b&&0<=c||0>=a&&0>=b&&0>=c||(a+=864E5*Rb(146097*c/4800+b),c=b=0);d.milliseconds=a%1E3;a=y(a/1E3);d.seconds=a%60;a=y(a/60);d.minutes=a%60;a=y(a/60);d.hours=a%24;b+=y(a/24);a=y(4800*b/146097);c+=a;b-=Rb(146097*a/4800);
a=y(c/12);d.days=b;d.months=c%12;d.years=a;return this};na.get=function(a){a=E(a);return this.isValid()?this[a+"s"]():NaN};na.milliseconds=Ic;na.seconds=Jc;na.minutes=Kc;na.hours=Lc;na.days=Mc;na.weeks=function(){return y(this.days()/7)};na.months=Nc;na.years=Oc;na.humanize=function(a){if(!this.isValid())return this.localeData().invalidDate();var b=this.localeData(),c;c=!a;var d=L(this).abs(),e=eb(d.as("s")),f=eb(d.as("m")),g=eb(d.as("h")),h=eb(d.as("d")),k=eb(d.as("M")),d=eb(d.as("y")),e=e<=Ta.ss&&
["s",e]||e<Ta.s&&["ss",e]||1>=f&&["m"]||f<Ta.m&&["mm",f]||1>=g&&["h"]||g<Ta.h&&["hh",g]||1>=h&&["d"]||h<Ta.d&&["dd",h]||1>=k&&["M"]||k<Ta.M&&["MM",k]||1>=d&&["y"]||["yy",d];e[2]=c;e[3]=0<+this;e[4]=b;c=dc.apply(null,e);a&&(c=b.pastFuture(+this,c));return b.postformat(c)};na.toISOString=tb;na.toString=tb;na.toJSON=tb;na.locale=Ua;na.localeData=sb;na.toIsoString=u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",tb);na.lang=bc;K("X",0,0,"unix");K("x",0,0,"valueOf");
N("x",Cb);N("X",/[+-]?\d+(\.\d{1,3})?/);X("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))});X("x",function(a,b,c){c._d=new Date(p(a))});b.version="2.18.1";Sb=aa;b.fn=V;b.min=function(){var a=[].slice.call(arguments,0);return bb("isBefore",a)};b.max=function(){var a=[].slice.call(arguments,0);return bb("isAfter",a)};b.now=function(){return Date.now?Date.now():+new Date};b.utc=a;b.unix=function(a){return aa(1E3*a)};b.months=function(a,b){return Pb(a,b,"months")};b.isDate=n;b.locale=Ga;b.invalid=
w;b.duration=L;b.isMoment=v;b.weekdays=function(a,b,c){return Eb(a,b,c,"weekdays")};b.parseZone=function(){return aa.apply(null,arguments).parseZone()};b.localeData=Da;b.isDuration=A;b.monthsShort=function(a,b){return Pb(a,b,"monthsShort")};b.weekdaysMin=function(a,b,c){return Eb(a,b,c,"weekdaysMin")};b.defineLocale=Ia;b.updateLocale=function(a,b){if(null!=b){var c=Vb;null!=va[a]&&(c=va[a]._config);b=B(c,b);b=new F(b);b.parentLocale=va[a];va[a]=b;Ga(a)}else null!=va[a]&&(null!=va[a].parentLocale?
va[a]=va[a].parentLocale:null!=va[a]&&delete va[a]);return va[a]};b.locales=function(){return pc(va)};b.weekdaysShort=function(a,b,c){return Eb(a,b,c,"weekdaysShort")};b.normalizeUnits=E;b.relativeTimeRounding=function(a){return void 0===a?eb:"function"===typeof a?(eb=a,!0):!1};b.relativeTimeThreshold=function(a,b){if(void 0===Ta[a])return!1;if(void 0===b)return Ta[a];Ta[a]=b;"s"===a&&(Ta.ss=b-1);return!0};b.calendarFormat=function(a,b){a=a.diff(b,"days",!0);return-6>a?"sameElse":-1>a?"lastWeek":
0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse"};b.prototype=V;return b})},"esri/arcade/ImmutableArray":function(){define(["require","exports"],function(b,h){return function(){function b(b){void 0===b&&(b=[]);this._elements=b}b.prototype.length=function(){return this._elements.length};b.prototype.get=function(b){return this._elements[b]};b.prototype.toArray=function(){for(var b=[],f=0;f<this.length();f++)b.push(this.get(f));return b};return b}()})},"esri/arcade/ImmutablePointArray":function(){define("require exports ../core/tsSupport/extendsHelper ./ImmutableArray ../geometry/Point ../kernel".split(" "),
function(b,h,l,k,f,n){var m=0===n.version.indexOf("4.");return function(b){function d(a,c,d,f,g,h){a=b.call(this,a)||this;a._lazyPt=[];a._hasZ=!1;a._hasM=!1;a._spRef=c;a._hasZ=d;a._hasM=f;a._cacheId=g;a._partId=h;return a}l(d,b);d.prototype.get=function(a){if(void 0===this._lazyPt[a]){var b=this._elements[a];if(void 0===b)return;var d=this._hasZ,g=this._hasM,h=null,h=d&&!g?new f(b[0],b[1],b[2],void 0,this._spRef):g&&d?new f(b[0],b[1],void 0,b[2],this._spRef):d&&g?new f(b[0],b[1],b[2],b[3],this._spRef):
new f(b[0],b[1],this._spRef);m?h.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString():h.setCacheValue("_arcadeCacheId",this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString());this._lazyPt[a]=h}return this._lazyPt[a]};d.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof d?!1:a.getUniqueHash()===this.getUniqueHash()};d.prototype.getUniqueHash=function(){return this._cacheId.toString()+"-"+this._partId.toString()};return d}(k)})},
"esri/arcade/ImmutablePathArray":function(){define(["require","exports","../core/tsSupport/extendsHelper","./ImmutableArray","./ImmutablePointArray"],function(b,h,l,k,f){return function(b){function h(f,d,a,c,h){f=b.call(this,f)||this;f._lazyPath=[];f._hasZ=!1;f._hasM=!1;f._hasZ=a;f._hasM=c;f._spRef=d;f._cacheId=h;return f}l(h,b);h.prototype.get=function(b){if(void 0===this._lazyPath[b]){var d=this._elements[b];if(void 0===d)return;this._lazyPath[b]=new f(d,this._spRef,this._hasZ,this._hasM,this._cacheId,
b)}return this._lazyPath[b]};h.prototype.equalityTest=function(b){return b===this?!0:null===b||!1===b instanceof h?!1:b.getUniqueHash()===this.getUniqueHash()};h.prototype.getUniqueHash=function(){return this._cacheId.toString()};return h}(k)})},"esri/arcade/FunctionWrapper":function(){define(["require","exports"],function(b,h){return function(){return function(b,h){this.context=this.definition=null;this.definition=b;this.context=h}}()})},"esri/arcade/treeAnalysis":function(){define(["require","exports"],
function(b,h){function l(a,b,c,d){return"0"!==a.min&&c.length<Number(a.min)||"*"!==a.max&&c.length>Number(a.max)?-2:1}function k(a,b,c){if(null!==c.localScope&&void 0!==c.localScope[a.toLowerCase()]){var d=c.localScope[a.toLowerCase()];if("FormulaFunction"===d.type||"any"===d.type)return void 0===d.signature&&(d.signature={min:"0",max:"*"}),l(d.signature,a,b,c)}return void 0!==c.globalScope[a.toLowerCase()]&&(d=c.globalScope[a.toLowerCase()],"FormulaFunction"===d.type||"any"===d.type)?(void 0===d.signature&&
(d.signature={min:"0",max:"*"}),l(d.signature,a,b,c)):-1}function f(a,b){void 0===b&&(b=!0);var c=w(a,"SYNTAX","UNREOGNISED");try{switch(a.type){case "VariableDeclarator":return null!==a.init&&"FunctionExpression"===a.init.type?w(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"):"Identifier"!==a.id.type?w(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER"):null!==a.init?f(a.init,!1):"";case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(c=f(a.declarations[d],b),""!==c)return c;return"";case "ForInStatement":c=
f(a.left,b);if(""!==c)break;if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return w(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return w(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==a.left.type)return w(a,"SYNTAX","LEFTNOTVAR");c=f(a.right,b);if(""!==c)break;c=f(a.body,b);if(""!==c)break;return"";case "ForStatement":if(null!==a.test&&(c=f(a.test,b),""!==c))break;if(null!==a.init&&(c=f(a.init,b),""!==c))break;if(null!==a.update&&(c=f(a.update,b),""!==
c))break;if(null!==a.body&&(c=f(a.body,b),""!==c))break;return"";case "ContinueStatement":return"";case "EmptyStatement":return"";case "BreakStatement":return"";case "IfStatement":c=f(a.test,b);if(""!==c)break;if(null!==a.consequent&&(c=f(a.consequent,!1),""!==c))break;if(null!==a.alternate&&(c=f(a.alternate,!1),""!==c))break;return"";case "BlockStatement":for(var e=[],d=0;d<a.body.length;d++)"EmptyStatement"!==a.body[d].type&&e.push(a.body[d]);a.body=e;for(d=0;d<a.body.length;d++)if(c=f(a.body[d],
b),""!==c)return c;return"";case "FunctionDeclaration":return!1===b?w(a,"SYNTAX","GLOBALFUNCTIONSONLY"):"Identifier"!==a.id.type?w(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"):f(a.body,!1);case "ReturnStatement":return null!==a.argument?f(a.argument,b):"";case "UpdateExpression":return"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?w(a,"SYNTAX","ASSIGNMENTTOVARSONLY"):f(a.argument,b);case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return w(a,
"SYNTAX","ASSIGNMENTTOVARSONLY");c=f(a.left,b);if(""!==c)break;switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:return w(a,"SYNTAX","OPERATORNOTRECOGNISED")}return f(a.right,!1);case "ExpressionStatement":return f(a.expression,!1);case "Identifier":c="";break;case "MemberExpression":c=f(a.object,b);if(""!==c)break;return!0===a.computed?f(a.property,b):"";case "Literal":return"";case "ThisExpression":return w(a,"SYNTAX","NOTSUPPORTED");case "CallExpression":if("Identifier"!==
a.callee.type)return w(a,"SYNTAX","ONLYNODESSUPPORTED");c="";for(d=0;d<a.arguments.length;d++)if(c=f(a.arguments[d],b),""!==c)return c;return"";case "UnaryExpression":c=f(a.argument,b);break;case "BinaryExpression":c=f(a.left,b);if(""!==c)break;c=f(a.right,b);if(""!==c)break;switch(a.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:return w(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "LogicalExpression":c=
f(a.left,b);if(""!==c)break;c=f(a.right);if(""!==c)break;switch(a.operator){case "\x26\x26":case "||":break;default:return w(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "ConditionalExpression":return w(a,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":c="";for(d=0;d<a.elements.length&&(c=f(a.elements[d],b),""===c);d++);break;case "Array":return w(a,"SYNTAX","NOTSUPPORTED");case "ObjectExpression":c="";for(d=0;d<a.properties.length&&(c="",null!==a.properties[d].key&&("Literal"!==a.properties[d].key.type&&
"Identifier"!==a.properties[d].key.type&&(c=w(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[d].key.type&&(e=a.properties[d].key.value,"string"===typeof e||e instanceof String||(c=w(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")))),""===c&&(c=f(a.properties[d],b)),""===c);d++);break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return w(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(c=f(a.key,b),""!==c))break;c=f(a.value,b)}return c}catch(C){throw C;
}}function n(b,d){var e=w(b,"SYNTAX","UNREOGNISED"),f=null,g="";try{switch(b.type){case "VariableDeclarator":if(null!==b.init&&"FunctionExpression"===b.init.type)return w(b,"SYNTAX","FUNCTIONVARIABLEDECLARATOR");null!==d.localScope?void 0!==d.localScope[b.id.name.toLowerCase()]&&b.id.name.toLowerCase():void 0!==d.globalScope[b.id.name.toLowerCase()]&&b.id.name.toLowerCase();var h=null===b.init?"":n(b.init,d);if(""!==h)return h;null===d.localScope?d.globalScope[b.id.name.toLowerCase()]={type:"any"}:
d.localScope[b.id.name.toLowerCase()]={type:"any"};return"";case "FunctionDeclaration":f=a(b.id.name.toLowerCase(),b,d);g=c(b,d);if(""!==g)return g;if(null!==d.localScope)return w(b,"SYNTAX","GLOBALFUNCTIONSONLY");f.isnative=!1;d.globalScope[b.id.name.toLowerCase()]={type:"FormulaFunction",signature:[f]};return"";case "VariableDeclaration":for(var e="",p=0;p<b.declarations.length&&(e=n(b.declarations[p],d),""===e);p++);break;case "IfStatement":e=n(b.test,d);if(""!==e)break;if("AssignmentExpression"===
b.test.type||"UpdateExpression"===b.test.type)return w(b.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");if(null!==b.consequent&&(e=n(b.consequent,d),""!==e))break;if(null!==b.alternate&&(e=n(b.alternate,d),""!==e))break;return"";case "EmptyStatement":return"";case "BlockStatement":for(p=0;p<b.body.length;p++)if(e=n(b.body[p],d),""!==e)return e;return"";case "ReturnStatement":return null!==b.argument?n(b.argument,d):"";case "ForInStatement":if("VariableDeclaration"===b.left.type){if(1<b.left.declarations.length)return w(b,
"SYNTAX","ONLY1VAR");if(null!==b.left.declarations[0].init)return w(b,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==b.left.type)return w(b,"SYNTAX","LEFTNOTVAR");e=n(b.left,d);if(""!==e)break;e=n(b.right,d);if(""!==e)break;e=n(b.body,d);if(""!==e)break;return"";case "ForStatement":if(null!==b.init&&(e=n(b.init,d),""!==e))break;if(null!==b.test&&(e=n(b.test,d),""!==e))break;if(null!==b.body&&(e=n(b.body,d),""!==e))break;if(null!==b.update&&(e=n(b.update,d),""!==e))break;return"";case "BreakStatement":return"";
case "ContinueStatement":return"";case "UpdateExpression":if("Identifier"!==b.argument.type&&"MemberExpression"!==b.argument.type)return w(b,"SYNTAX","ASSIGNMENTTOVARSONLY");var m=!1;if("MemberExpression"===b.argument.type)return n(b.argument,d);null!==d.localScope&&void 0!==d.localScope[b.argument.name.toLowerCase()]&&(m=!0);void 0!==d.globalScope[b.argument.name.toLowerCase()]&&(m=!0);return!1===m?"Identifier "+b.argument.name+" has not been declared.":"";case "AssignmentExpression":if("Identifier"!==
b.left.type&&"MemberExpression"!==b.left.type)return w(b,"SYNTAX","ASSIGNMENTTOVARSONLY");var l=n(b.right,d);if(""!==l)return l;m=!1;if("MemberExpression"===b.left.type)return l=n(b.left,d),""!==l?l:"";null!==d.localScope&&void 0!==d.localScope[b.left.name.toLowerCase()]&&(m=!0);void 0!==d.globalScope[b.left.name.toLowerCase()]&&(m=!0);return!1===m?"Identifier "+b.left.name+" has not been declared.":"";case "ExpressionStatement":return n(b.expression,d);case "Identifier":var r=b.name.toLowerCase();
if(null!==d.localScope&&void 0!==d.localScope[r])return"";e=void 0!==d.globalScope[r]?"":w(b,"SYNTAX","VARIABLENOTFOUND");break;case "MemberExpression":e=n(b.object,d);if(""!==e)break;return!0===b.computed?n(b.property,d):"";case "Literal":return"";case "ThisExpression":e=w(b,"SYNTAX","NOTSUPPORTED");break;case "CallExpression":if("Identifier"!==b.callee.type)return w(b,"SYNTAX","ONLYNODESSUPPORTED");e="";for(p=0;p<b.arguments.length;p++)if(e=n(b.arguments[p],d),""!==e)return e;var t=k(b.callee.name,
b.arguments,d);-1===t&&(e=w(b,"SYNTAX","NOTFOUND"));-2===t&&(e=w(b,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":e=n(b.argument,d);break;case "BinaryExpression":e=n(b.left,d);if(""!==e)break;e=n(b.right,d);if(""!==e)break;return"";case "LogicalExpression":e=n(b.left,d);if(""!==e)break;if("AssignmentExpression"===b.left.type||"UpdateExpression"===b.left.type)return w(b.left,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");e=n(b.right,d);if(""!==e)break;return"AssignmentExpression"===b.right.type||
"UpdateExpression"===b.right.type?w(b.right,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"):"";case "ConditionalExpression":return w(b,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":e="";for(p=0;p<b.elements.length&&(e=n(b.elements[p],d),""===e);p++);break;case "ObjectExpression":e="";for(p=0;p<b.properties.length;p++){e="";if(null!==b.properties[p].key&&("Literal"!==b.properties[p].key.type&&"Identifier"!==b.properties[p].key.type&&(e=w(b,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===b.properties[p].key.type)){var y=
b.properties[p].key.value;"string"===typeof y||y instanceof String||(e=w(b,"SYNTAX","OBJECTPROPERTYMUSTBESTRING"))}""===e&&(e=n(b.properties[p],d));if(""!==e)break}break;case "Property":if("Literal"!==b.key.type&&"Identifier"!==b.key.type)return w(b,"SYNTAX","ONLYLITERAL");if("Identifier"!==b.key.type&&(e=n(b.key,d),""!==e))break;e=n(b.value,d);break;case "Array":return w(b,"SYNTAX","NOTSUPPORTED")}return e}catch(U){throw U;}}function m(a,b){var c=!1;try{switch(a.type){case "VariableDeclarator":return null!==
a.init?m(a.init,b):c;case "FunctionDeclaration":return m(a.body,b);case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(m(a.declarations[d],b))return!0;return c;case "IfStatement":return m(a.test,b)||null!==a.consequent&&m(a.consequent,b)||null!==a.alternate&&m(a.alternate,b)?!0:c;case "EmptyStatement":return c;case "BlockStatement":for(d=0;d<a.body.length;d++)if(m(a.body[d],b))return!0;return c;case "ReturnStatement":return null!==a.argument?m(a.argument,b):c;case "UpdateExpression":return m(a.argument,
b);case "AssignmentExpression":return(c=m(a.right,b))?c:m(a.left,b);case "ExpressionStatement":return m(a.expression,b);case "ForInStatement":return(c=m(a.left,b))||(c=m(a.right,b))?c:c=m(a.body,b);case "ForStatement":if(null!==a.init&&(c=m(a.init,b))||null!==a.test&&(c=m(a.test,b))||null!==a.body&&(c=m(a.body,b)))return c;null!==a.update&&(c=m(a.update,b));return c;case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return b.toLowerCase()===
a.name.toLowerCase();case "MemberExpression":if(c=m(a.object,b))return c;!0===a.computed&&(c=m(a.property,b));return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(d=0;d<a.arguments.length;d++)m(a.arguments[d],b)&&(c=!0);return c;case "ArrayExpression":for(d=0;d<a.elements.length;d++)m(a.elements[d],b)&&(c=!0);return c;case "UnaryExpression":return m(a.argument,b);case "BinaryExpression":return(c=m(a.left,b))?c:c=m(a.right,b);case "LogicalExpression":return(c=m(a.left,
b))?c:c=m(a.right,b);case "ObjectExpression":for(d=0;d<a.properties.length;d++)m(a.properties[d],b)&&(c=!0);return c;case "Property":return c=m(a.value,b);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(z){throw z;}}function g(a,b){var c=!1;try{switch(a.type){case "VariableDeclarator":return null!==a.init?g(a.init,b):c;case "FunctionDeclaration":return g(a.body,b);case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(g(a.declarations[d],b))return!0;
return c;case "IfStatement":return g(a.test,b)||null!==a.consequent&&g(a.consequent,b)||null!==a.alternate&&g(a.alternate,b)?!0:c;case "EmptyStatement":return c;case "BlockStatement":for(d=0;d<a.body.length;d++)if(g(a.body[d],b))return!0;return c;case "ReturnStatement":return null!==a.argument?g(a.argument,b):c;case "UpdateExpression":return g(a.argument,b);case "AssignmentExpression":return g(a.left,b)?!0:g(a.right,b);case "ExpressionStatement":return g(a.expression,b);case "ForInStatement":return(c=
g(a.left,b))||(c=g(a.right,b))?c:c=g(a.body,b);case "ForStatement":if(null!==a.init&&(c=g(a.init,b))||null!==a.test&&(c=g(a.test,b))||null!==a.body&&(c=g(a.body,b)))return c;null!==a.update&&(c=g(a.update,b));return c;case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return c;case "MemberExpression":if(c=g(a.object,b))return c;!0===a.computed&&(c=g(a.property,b));return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":if(a.callee.name.toLowerCase()===
b.toLowerCase())return!0;for(d=0;d<a.arguments.length;d++)g(a.arguments[d],b)&&(c=!0);return c;case "ArrayExpression":for(d=0;d<a.elements.length;d++)g(a.elements[d],b)&&(c=!0);return c;case "UnaryExpression":return g(a.argument,b);case "BinaryExpression":return(c=g(a.left,b))?c:c=g(a.right,b);case "LogicalExpression":return(c=g(a.left,b))?c:c=g(a.right,b);case "ConditionalExpression":return c;case "ObjectExpression":for(d=0;d<a.properties.length;d++)g(a.properties[d],b)&&(c=!0);return c;case "Property":return c=
g(a.value,b);case "Array":return c;default:return c}}catch(z){throw z;}}function d(a,b){var c=[],e;try{switch(a.type){case "VariableDeclarator":return null!==a.init?d(a.init,b):c;case "FunctionDeclaration":return d(a.body,b);case "VariableDeclaration":for(var f=0;f<a.declarations.length;f++)e=d(a.declarations[f],b),c=c.concat(e);return c;case "ForInStatement":return e=d(a.left,b),c=c.concat(e),e=d(a.right,b),c=c.concat(e),e=d(a.body,b),c=c.concat(e);case "ForStatement":return null!==a.init&&(e=d(a.init,
b),c=c.concat(e)),null!==a.test&&(e=d(a.test,b),c=c.concat(e)),null!==a.body&&(e=d(a.body,b),c=c.concat(e)),null!==a.update&&(e=d(a.update,b),c=c.concat(e)),c;case "IfStatement":return e=d(a.test,b),c=c.concat(e),null!==a.consequent&&(e=d(a.consequent,b),c=c.concat(e)),null!==a.alternate&&(e=d(a.alternate,b),c=c.concat(e)),c;case "EmptyStatement":return c;case "BlockStatement":for(f=0;f<a.body.length;f++)e=d(a.body[f],b),c=c.concat(e);return c;case "ReturnStatement":return null!==a.argument?d(a.argument,
b):c;case "UpdateExpression":return d(a.argument,b);case "AssignmentExpression":return c=d(a.left,b),c=c.concat(d(a.right,b));case "ExpressionStatement":return d(a.expression,b);case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return c;case "MemberExpression":if("Identifier"!==a.object.type)return c;if(!1===a.computed)c.push(a.object.name.toLowerCase()+"."+a.property.name.toLowerCase());else try{"Literal"===a.property.type&&"string"===typeof a.property.value&&
c.push(a.object.name.toLowerCase()+"."+a.property.value.toString().toLowerCase())}catch(C){}return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(f=0;f<a.arguments.length;f++)e=d(a.arguments[f],b),c=c.concat(e);return c;case "ArrayExpression":for(f=0;f<a.elements.length;f++)e=d(a.elements[f],b),c=c.concat(e);return c;case "UnaryExpression":return d(a.argument,b);case "ObjectExpression":for(f=0;f<a.properties.length;f++)e=d(a.properties[f],b),c=c.concat(e);return c;
case "Property":return d(a.value,b);case "BinaryExpression":return e=d(a.left,b),c=c.concat(e),e=d(a.right,b),c=c.concat(e);case "LogicalExpression":return e=d(a.left,b),c=c.concat(e),e=d(a.right,b),c=c.concat(e);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(C){throw C;}}function a(a,b,c){c=[];if(void 0!==b.params&&null!==b.params)for(var d=0;d<b.params.length;d++)c.push("any");return{name:a,"return":"any",params:c}}function c(a,b){b={globalScope:b.globalScope,
localScope:{}};for(var c=0;c<a.params.length;c++)b.localScope[a.params[c].name.toLowerCase()]={type:"any"};return n(a.body,b)}function r(a,b,c,d){var e={};if(void 0===a||null===a)a={};if(void 0===c||null===c)c={};e.infinity={type:"any"};e.textformatting={type:"any"};e.pi={type:"any"};for(var f in b)if("simple"!==d||"simple"===d&&"a"===b[f].av)e[f]={type:"FormulaFunction",signature:{min:b[f].min,max:b[f].max}},"simple"!==d&&(void 0!==b[f].fmin&&(e[f].signature.min=b[f].fmin),void 0!==b[f].fmax&&(e[f].signature.max=
b[f].fmax));for(b=0;b<c.length;b++)f=c[b],e[f.name]={type:"FormulaFunction",signature:f};for(f in a)e[f]=a[f],e[f].type="any";return e}function w(a,b,c){var d="";switch(b){case "SYNTAX":d="Syntax Error: ";break;case "RUNTIME":d="Runtime Error: ";break;default:d="Syntax Error: "}try{switch(a.type){case "IfStatement":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=" Assignments not be made in logical tests";break;case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;
case "UpdateExpression":case "AssignmentExpression":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=" Assignments not be made in logical tests";break;case "ASSIGNMENTTOVARSONLY":d+=" Assignments can only be made to identifiers"}break;case "ExpressionStatement":d+=" Assignments can only be made to identifiers";break;case "FunctionDeclaration":switch(c){case "GLOBALFUNCTIONSONLY":d+=" Functions cannot be declared as variables";break;case "FUNCTIONMUSTHAVEIDENTIFIER":d+=" Function Definition must have an identifier"}break;
case "VariableDeclaration":d+=" Only 1 variable can be declared at a time";break;case "VariableDeclarator":switch(c){case "FUNCTIONVARIABLEDECLARATOR":d+=" Functions cannot be declared as variables";break;case "VARIABLEMUSTHAVEIDENTIFIER":d+=" Variable Definition must have an identifier"}break;case "Identifier":d+=" Identifier Not Found. ";d+=a.name;break;case "ObjectExpression":switch(c){case "OBJECTPROPERTYMUSTBESTRING":d+=" Property name must be a string"}break;case "ForStatement":switch(c){case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=
" Non Boolean used as Condition"}break;case "ForInStatement":switch(c){case "ONLY1VAR":d+=" Can only declare 1 var for use with IN";break;case "CANNOTDECLAREVAL":d+=" Can only declare value for use with IN";break;case "LEFTNOVAR":d+="Must provide a variable to iterate with.";break;case "VARIABLENOTDECLARED":d+="Variable must be declared before it is used..";break;case "CANNOTITERATETHISTYPE":d+="This type cannot be used in an IN loop"}break;case "MemberExpression":switch(c){case "PROPERTYNOTFOUND":d+=
"Cannot find member property. ";d+=!1===a.computed?a.property.name:"";break;case "OUTOFBOUNDS":d+="Out of Bounds. ";d+=!1===a.computed?a.property.name:"";break;case "NOTFOUND":d+="Cannot call member method on null. ";d+=!1===a.computed?a.property.name:"";break;case "INVALIDTYPE":d+="Cannot call member property on object of this type. ",d+=!1===a.computed?a.property.name:""}break;case "Property":switch(c){case "ONLYLITERAL":d+="Property names must be literals or identifiers"}break;case "Literal":break;
case "ThisExpression":d+="THIS construct is not supported.";case "CallExpression":switch(c){case "WRONGSIGNATURE":d+="Function signature does not match: ";d+=a.callee.name;break;case "ONLYNODESUPPORTED":d+="Functions must be declared.";d+=a.callee.name;break;case "NOTAFUNCTION":d+="Not a Function: ";d+=a.callee.name;break;case "NOTFOUND":d+="Function Not Found: "+a.callee.name}break;case "UnaryExpression":switch(c){case "NOTSUPPORTEDUNARYOPERATOR":d+="Operator "+a.operator+" not allowed in this context. Only ! can be used with boolean, and - with a number";
break;case "NOTSUPPORTEDTYPE":d+="Unary operator "+a.operator+" cannot be used with this argument."}case "BinaryExpression":switch(c){case "OPERATORNOTRECOGNISED":d+="Binary Operator not recognised "+a.operator}break;case "LogicalExpression":switch(c){case "ONLYBOOLEAN":d+="Operator "+a.operator+" cannot be used. Only || or \x26\x26 are allowed values";break;case "ONLYORORAND":d+="Logical Expression "+a.operator+" being applied to parameters that are not boolean."}break;case "ConditionalExpression":d+=
"Conditional statements not supported.";break;case "ArrayExpression":switch(c){case "FUNCTIONCONTEXTILLEGAL":d+=" Cannot Put Function inside Array."}break;case "Array":d+="Expression contains unrecognised array structure.";break;default:d+="Expression contains unrecognised code structures."}}catch(z){throw z;}return d}function t(a,b,c){return{line:a.loc.start.line,character:a.loc.start.column,reason:w(a,b,c)}}function x(a,b,c,d,f){void 0===f&&(f=!0);b={globalScope:b.globalScope,localScope:{}};for(f=
0;f<a.params.length;f++)b.localScope[a.params[f].name.toLowerCase()]={type:"any"};v(a.body,b,c,d,!1)}function v(b,c,d,f,g){void 0===g&&(g=!0);if(null===b)throw Error("Unnexpexted Expression Syntax");w(b,"SYNTAX","UNREOGNISED");var e=null;try{switch(b.type){case "VariableDeclarator":if(null!==b.init&&"FunctionExpression"===b.init.type){f.push(t(b,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"));break}"Identifier"!==b.id.type?f.push(t(b,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER")):(null!==c.localScope?void 0!==c.localScope[b.id.name.toLowerCase()]&&
b.id.name.toLowerCase():void 0!==c.globalScope[b.id.name.toLowerCase()]&&b.id.name.toLowerCase(),null===c.localScope?c.globalScope[b.id.name.toLowerCase()]={type:"any"}:c.localScope[b.id.name.toLowerCase()]={type:"any"});null===b.init?"":v(b.init,c,d,f,g);break;case "FunctionDeclaration":!1===g&&f.push(t(b,"SYNTAX","GLOBALFUNCTIONSONLY"));"Identifier"!==b.id.type&&f.push(t(b,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"));e=a("",b,c);x(b,c,d,f,g);null!==c.localScope&&f.push(t(b,"SYNTAX","GLOBALFUNCTIONSONLY"));
e.isnative=!1;"Identifier"===b.id.type&&(c.globalScope[b.id.name.toLowerCase()]={type:"FormulaFunction",signature:[e]});break;case "VariableDeclaration":for(var h=0;h<b.declarations.length;h++)v(b.declarations[h],c,d,f,g);break;case "IfStatement":null!==b.test&&(v(b.test,c,d,f,g),"AssignmentExpression"!==b.test.type&&"UpdateExpression"!==b.test.type||f.push(t(b.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION")));null!==b.consequent&&v(b.consequent,c,d,f,g);null!==b.alternate&&v(b.alternate,c,d,
f,g);break;case "EmptyStatement":break;case "BlockStatement":if(null!==b.body)for(h=0;h<b.body.length;h++)v(b.body[h],c,d,f,g);break;case "ReturnStatement":null!==b.argument&&v(b.argument,c,d,f,g);break;case "ForInStatement":"VariableDeclaration"===b.left.type?(1<b.left.declarations.length&&f.push(t(b,"SYNTAX","ONLY1VAR")),null!==b.left.declarations[0].init&&f.push(t(b,"SYNTAX","CANNOTDECLAREVAL"))):"Identifier"!==b.left.type&&f.push(t(b,"SYNTAX","LEFTNOTVAR"));v(b.left,c,d,f,g);v(b.right,c,d,f,g);
v(b.body,c,d,f,g);break;case "ForStatement":null!==b.init&&v(b.init,c,d,f,g);null!==b.test&&v(b.test,c,d,f,g);null!==b.body&&v(b.body,c,d,f,g);null!==b.update&&v(b.update,c,d,f,g);break;case "BreakStatement":break;case "ContinueStatement":break;case "UpdateExpression":"Identifier"!==b.argument.type&&"MemberExpression"!==b.argument.type?f.push(t(b,"SYNTAX","ASSIGNMENTTOVARSONLY")):("Identifier"===b.argument.type&&(e=!1,!1===d&&(null!==c.localScope&&void 0!==c.localScope[b.argument.name.toLowerCase()]&&
(e=!0),void 0!==c.globalScope[b.argument.name.toLowerCase()]&&(e=!0),!1===e&&f.push({line:null===b?0:b.loc.start.line,character:null===b?0:b.loc.start.column,reason:"Identifier "+b.argument.name+" has not been declared."}))),"MemberExpression"===b.argument.type&&v(b.argument,c,d,f,g));break;case "AssignmentExpression":"Identifier"!==b.left.type&&"MemberExpression"!==b.left.type&&f.push(t(b,"SYNTAX","ASSIGNMENTTOVARSONLY"));switch(b.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;
default:f.push(t(b,"SYNTAX","OPERATORNOTRECOGNISED"))}v(b.right,c,d,f,g);e=!1;"Identifier"===b.left.type&&(null!==c.localScope&&void 0!==c.localScope[b.left.name.toLowerCase()]&&(e=!0),void 0!==c.globalScope[b.left.name.toLowerCase()]&&(e=!0),!1===d&&!1===e&&f.push({line:null===b?0:b.loc.start.line,character:null===b?0:b.loc.start.column,reason:"Identifier "+b.argument.name+" has not been declared."}));"MemberExpression"===b.left.type&&v(b.left,c,d,f,g);break;case "ExpressionStatement":v(b.expression,
c,d,f,g);break;case "Identifier":var p=b.name.toLowerCase();if(null!==c.localScope&&void 0!==c.localScope[p])break;void 0===c.globalScope[p]&&!1===d&&f.push(t(b,"SYNTAX","VARIABLENOTFOUND"));break;case "MemberExpression":v(b.object,c,d,f,g);!0===b.computed&&v(b.property,c,d,f,g);break;case "Literal":return"";case "ThisExpression":f.push(t(b,"SYNTAX","NOTSUPPORTED"));break;case "CallExpression":"Identifier"!==b.callee.type&&f.push(t(b,"SYNTAX","ONLYNODESSUPPORTED"));for(h=0;h<b.arguments.length;h++)v(b.arguments[h],
c,d,f,g);var m=k(b.callee.name,b.arguments,c);!1===d&&-1===m&&f.push(t(b,"SYNTAX","NOTFOUND"));-2===m&&f.push(t(b,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":v(b.argument,c,d,f,g);break;case "BinaryExpression":v(b.left,c,d,f,g);v(b.right,c,d,f,g);switch(b.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:f.push(t(b,"SYNTAX","OPERATORNOTRECOGNISED"))}break;case "LogicalExpression":switch(b.operator){case "\x26\x26":case "||":break;
default:f.push(t(b,"SYNTAX","OPERATORNOTRECOGNISED"))}v(b.left,c,d,f,g);"AssignmentExpression"!==b.left.type&&"UpdateExpression"!==b.left.type||f.push(t(b,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));v(b.right,c,d,f,g);"AssignmentExpression"!==b.right.type&&"UpdateExpression"!==b.right.type||f.push(t(b,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));break;case "ConditionalExpression":f.push(t(b,"SYNTAX","NOTSUPPORTED"));break;case "ArrayExpression":for(h=0;h<b.elements.length;h++)v(b.elements[h],
c,d,f,g);break;case "Array":f.push(t(b,"SYNTAX","NOTSUPPORTED"));case "ObjectExpression":for(h=0;h<b.properties.length;h++)v(b.properties[h],c,d,f,g);break;case "Property":"Literal"!==b.key.type&&"Identifier"!==b.key.type&&f.push(t(b,"SYNTAX","ONLYLITERAL"));"Literal"===b.key.type&&v(b.key,c,d,f,g);v(b.value,c,d,f,g);break;default:f.push(t(b,"SYNTAX","UNRECOGNISED"))}}catch(E){f.push({line:null===b?0:b.loc.start.line,character:null===b?0:b.loc.start.column,reason:"Unnexpected Syntax"})}}function y(a,
b){var c=[],d;try{switch(a.type){case "VariableDeclarator":return null!==a.init?y(a.init,b):c;case "FunctionDeclaration":return y(a.body,b);case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)d=y(a.declarations[e],b),c=c.concat(d);return c;case "ForInStatement":return d=y(a.left,b),c=c.concat(d),d=y(a.right,b),c=c.concat(d),d=y(a.body,b),c=c.concat(d);case "ForStatement":return null!==a.init&&(d=y(a.init,b),c=c.concat(d)),null!==a.test&&(d=y(a.test,b),c=c.concat(d)),null!==a.body&&
(d=y(a.body,b),c=c.concat(d)),null!==a.update&&(d=y(a.update,b),c=c.concat(d)),c;case "IfStatement":return d=y(a.test,b),c=c.concat(d),null!==a.consequent&&(d=y(a.consequent,b),c=c.concat(d)),null!==a.alternate&&(d=y(a.alternate,b),c=c.concat(d)),c;case "EmptyStatement":return c;case "BlockStatement":for(e=0;e<a.body.length;e++)d=y(a.body[e],b),c=c.concat(d);return c;case "ReturnStatement":return null!==a.argument?y(a.argument,b):c;case "UpdateExpression":return y(a.argument,b);case "AssignmentExpression":return c=
y(a.left,b),c=c.concat(y(a.right,b));case "ExpressionStatement":return y(a.expression,b);case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return c;case "MemberExpression":return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(e=0;e<a.arguments.length;e++)d=y(a.arguments[e],b),c=c.concat(d);c.push(a.callee.name.toLowerCase());return c;case "ArrayExpression":for(e=0;e<a.elements.length;e++)d=y(a.elements[e],
b),c=c.concat(d);return c;case "UnaryExpression":return y(a.argument,b);case "ObjectExpression":for(e=0;e<a.properties.length;e++)d=y(a.properties[e],b),c=c.concat(d);return c;case "Property":return y(a.value,b);case "BinaryExpression":return d=y(a.left,b),c=c.concat(d),d=y(a.right,b),c=c.concat(d);case "LogicalExpression":return d=y(a.left,b),c=c.concat(d),d=y(a.right,b),c=c.concat(d);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(C){throw C;}}Object.defineProperty(h,
"__esModule",{value:!0});h.functionDecls={concatenate:{min:"0",max:"*",av:"a"},split:{min:"2",max:"4",av:"a"},guid:{min:"0",max:"1",av:"a"},today:{min:"0",max:"0",av:"a"},now:{min:"0",max:"0",av:"a"},timestamp:{min:"0",max:"0",av:"a"},day:{min:"1",max:"1",av:"a"},month:{min:"1",max:"1",av:"a"},year:{min:"1",max:"1",av:"a"},hour:{min:"1",max:"1",av:"a"},second:{min:"1",max:"1",av:"a"},millisecond:{min:"1",max:"1",av:"a"},minute:{min:"1",max:"1",av:"a"},weekday:{min:"1",max:"1",av:"a"},toutc:{min:"1",
max:"1",av:"a"},tolocal:{min:"1",max:"1",av:"a"},date:{min:"0",max:"7",av:"a"},datediff:{min:"2",max:"3",av:"a"},dateadd:{min:"2",max:"3",av:"a"},trim:{min:"1",max:"1",av:"a"},text:{min:"1",max:"2",av:"a"},left:{min:"2",max:"2",av:"a"},right:{min:"2",max:"2",av:"a"},mid:{min:"2",max:"3",av:"a"},upper:{min:"1",max:"1",av:"a"},proper:{min:"1",max:"2",av:"a"},lower:{min:"1",max:"1",av:"a"},find:{min:"2",max:"3",av:"a"},iif:{min:"3",max:"3",av:"a"},decode:{min:"2",max:"*",av:"a"},when:{min:"2",max:"*",
av:"a"},defaultvalue:{min:"2",max:"2",av:"a"},isempty:{min:"1",max:"1",av:"a"},domaincode:{min:"3",max:"4",av:"a"},domainname:{min:"2",max:"4",av:"a"},polygon:{min:"1",max:"1",av:"a"},point:{min:"1",max:"1",av:"a"},polyline:{min:"1",max:"1",av:"a"},extent:{min:"1",max:"1",av:"a"},multipoint:{min:"1",max:"1",av:"a"},geometry:{min:"1",max:"1",av:"a"},count:{min:"0",max:"*",av:"a"},number:{min:"1",max:"2",av:"a"},acos:{min:"1",max:"1",av:"a"},asin:{min:"1",max:"1",av:"a"},atan:{min:"1",max:"1",av:"a"},
atan2:{min:"2",max:"2",av:"a"},ceil:{min:"1",max:"2",av:"a"},floor:{min:"1",max:"2",av:"a"},round:{min:"1",max:"2",av:"a"},cos:{min:"1",max:"1",av:"a"},exp:{min:"1",max:"1",av:"a"},log:{min:"1",max:"1",av:"a"},min:{min:"0",max:"*",av:"a"},constrain:{min:"3",max:"3",av:"a"},console:{min:"0",max:"*",av:"a"},max:{min:"0",max:"*",av:"a"},pow:{min:"2",max:"2",av:"a"},random:{min:"0",max:"0",av:"a"},sqrt:{min:"1",max:"1",av:"a"},sin:{min:"1",max:"1",av:"a"},tan:{min:"1",max:"1",av:"a"},abs:{min:"1",max:"1",
av:"a"},isnan:{min:"1",max:"1",av:"a"},stdev:{min:"0",max:"*",av:"a"},average:{min:"0",max:"*",av:"a"},mean:{min:"0",max:"*",av:"a"},sum:{min:"0",max:"*",av:"a"},variance:{min:"0",max:"*",av:"a"},distinct:{min:"0",max:"*",av:"a"},first:{min:"1",max:"1",av:"a"},top:{min:"2",max:"2",av:"a"},"boolean":{min:"1",max:"1",av:"a"},dictionary:{min:"0",max:"*",av:"a"},"typeof":{min:"1",max:"1",av:"a"},reverse:{min:"1",max:"1",av:"a"},replace:{min:"3",max:"4",av:"a"},sort:{min:"1",max:"2",av:"a"},feature:{min:"1",
max:"*",av:"a"},haskey:{min:"2",max:"2",av:"a"},indexof:{min:"2",max:"2",av:"a"},disjoint:{min:"2",max:"2",av:"a"},intersects:{min:"2",max:"2",av:"a"},touches:{min:"2",max:"2",av:"a"},crosses:{min:"2",max:"2",av:"a"},within:{min:"2",max:"2",av:"a"},contains:{min:"2",max:"2",av:"a"},overlaps:{min:"2",max:"2",av:"a"},equals:{min:"2",max:"2",av:"a"},relate:{min:"3",max:"3",av:"a"},intersection:{min:"2",max:"2",av:"a"},union:{min:"1",max:"2",av:"a"},difference:{min:"2",max:"2",av:"a"},symmetricdifference:{min:"2",
max:"2",av:"a"},clip:{min:"2",max:"2",av:"a"},cut:{min:"2",max:"2",av:"a"},area:{min:"1",max:"2",av:"a"},areageodetic:{min:"1",max:"2",av:"a"},length:{min:"1",max:"2",av:"a"},lengthgeodetic:{min:"1",max:"2",av:"a"},distance:{min:"2",max:"3",av:"a"},densify:{min:"2",max:"3",av:"a"},densifygeodetic:{min:"2",max:"3",av:"a"},generalize:{min:"2",max:"4",av:"a"},buffer:{min:"2",max:"3",av:"a"},buffergeodetic:{min:"2",max:"3",av:"a"},offset:{min:"2",max:"6",av:"a"},rotate:{min:"2",max:"3",av:"a"},issimple:{min:"1",
max:"1",av:"a"},simplify:{min:"1",max:"1",av:"a"},centroid:{min:"1",max:"1",av:"a"},multiparttosinglepart:{min:"1",max:"1",av:"a"},setgeometry:{min:"2",max:"2",av:"a"}};h.addFunctionDeclaration=function(a,b){var c=h.functionDecls[a.name.toLowerCase()];void 0===c?h.functionDecls[a.name.toLowerCase()]={min:a.min,max:a.max,av:b}:"a"===c.av&&"f"===b?(void 0!==c.fmin&&delete c.fmin,void 0!==c.fmax&&delete c.fmax,c.fmin=a.min,c.fmax=a.max):"f"===c.av&&"a"===b?(void 0===c.fmin&&(c.fmin=c.min),void 0===c.fmax&&
(c.fmax=c.max),c.min=a.min,c.max=a.max,c.av="a"):"f"===b?(c.fmin=a.min,c.fmax=a.max):"a"===b&&(c.min=a.min,c.max=a.max)};h.checkFunctionSignature=l;h.findFunction=k;h.validateLanguageNode=f;h.testValidityOfExpression=n;h.referencesMemberImpl=m;h.referencesMember=function(a,b){return!0===m(a.body[0].body,b.toLowerCase())?!0:!1};h.referencesFunctionImpl=g;h.referencesFunction=function(a,b){return!0===g(a.body[0].body,b)?!0:!1};h.findFieldLiteralsImpl=d;h.findFieldLiterals=function(a,b){return d(a.body[0].body,
b)};h.extractFunctionDeclaration=a;h.validateFunction=c;h.constructGlobalScope=r;h.validateScript=function(a,b,c){void 0===c&&(c="full");b={globalScope:r(b.vars,h.functionDecls,b.customFunctions,c),localScope:null};return n(a.body[0].body,b)};h.validateLanguage=function(a){return"BlockStatement"!==a.body[0].body.type?"Invalid formula content.":f(a.body[0].body)};h.nodeErrorMessage=w;h.makeError=t;h.extractAllIssuesInFunction=x;h.extractAllIssues=v;h.checkScript=function(a,b,c,d){void 0===d&&(d="full");
var e=[];if("BlockStatement"!==a.body[0].body.type)return[{line:0,character:0,reason:"Invalid Body"}];if(null===b||void 0===b)b={vars:{},customFunctions:[]};b={globalScope:r(b.vars,h.functionDecls,b.customFunctions,d),localScope:null};try{v(a.body[0].body,b,c,e)}catch(C){}return e};h.findFunctionCallsImpl=y;h.findFunctionCalls=function(a,b){return y(a.body[0].body,b)}})},"esri/arcade/Dictionary":function(){define(["require","exports","./languageUtils","../geometry/Geometry","./ImmutableArray"],function(b,
h,l,k,f){return function(){function b(f){this.attributes=null;this.plain=!1;this.immutable=!0;this.attributes=f instanceof b?f.attributes:void 0===f?{}:null===f?{}:f}b.prototype.field=function(b){var f=b.toLowerCase();b=this.attributes[b];if(void 0!==b)return b;for(var d in this.attributes)if(d.toLowerCase()===f)return this.attributes[d];throw Error("Field not Found");};b.prototype.setField=function(b,f){if(this.immutable)throw Error("Dictionary is Immutable");var d=b.toLowerCase();if(void 0===this.attributes[b])for(var a in this.attributes)if(a.toLowerCase()===
d){this.attributes[a]=f;return}this.attributes[b]=f};b.prototype.hasField=function(b){var f=b.toLowerCase();if(void 0!==this.attributes[b])return!0;for(var d in this.attributes)if(d.toLowerCase()===f)return!0;return!1};b.prototype.keys=function(){var b=[],f;for(f in this.attributes)b.push(f);return b=b.sort()};b.prototype.castToText=function(){var b="",g;for(g in this.attributes){""!==b&&(b+=",");var d=this.attributes[g];null==d?b+=JSON.stringify(g)+":null":l.isBoolean(d)||l.isNumber(d)||l.isString(d)?
b+=JSON.stringify(g)+":"+JSON.stringify(d):d instanceof k?b+=JSON.stringify(g)+":"+l.toStringExplicit(d):d instanceof f?b+=JSON.stringify(g)+":"+l.toStringExplicit(d):d instanceof Array?b+=JSON.stringify(g)+":"+l.toStringExplicit(d):d instanceof Date?b+=JSON.stringify(g)+":"+JSON.stringify(d):null!==d&&"object"===typeof d&&void 0!==d.castToText&&(b+=JSON.stringify(g)+":"+d.castToText())}return"{"+b+"}"};return b}()})},"esri/arcade/Feature":function(){define("require exports dojo/_base/lang ../geometry/Geometry ../Graphic ../geometry/support/jsonUtils ./Dictionary ./languageUtils ./ImmutableArray ../geometry/Point".split(" "),
function(b,h,l,k,f,n,m,g,d,a){return function(){function b(a,c,d){this._layer=this.attributes=this.geometry=null;this.immutable=this._datesfixed=!0;a instanceof b?(this.attributes=a.attributes,this.geometry=a.geometry,a._layer&&(this._layer=a._layer)):a instanceof f?(this.geometry=a.geometry,this.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes,a._layer?(this._layer=a._layer,this._datesfixed=!1):a.layer&&(this._layer=a.layer,this._datesfixed=!1)):a instanceof m?(this.attributes=
a.field("attributes"),null!==this.attributes&&(this.attributes=this.attributes instanceof m?this.attributes.attributes:null),this.geometry=a.field("geometry"),null!==this.geometry&&(this.geometry instanceof m?this.geometry=b.parseGeometryFromDictionary(this.geometry):this.geometry instanceof k||(this.geometry=null))):(c instanceof k||null===c?(this.geometry=c,this.attributes=void 0===a?{}:null===a?{}:a):"string"===typeof a?(a=JSON.parse(a),null!==a.geometry&&void 0!==a.geometry&&(this.geometry=n.fromJSON(a.geometry)),
this.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes):(void 0===a?this.attributes={}:null===a&&(this.attributes={}),this.geometry=null),void 0!==d&&(this._layer=d))}b.prototype.castToText=function(){var a="",b;for(b in this.attributes){""!==a&&(a+=",");var c=this.attributes[b];null==c?a+=JSON.stringify(b)+":null":g.isBoolean(c)||g.isNumber(c)||g.isString(c)?a+=JSON.stringify(b)+":"+JSON.stringify(c):c instanceof k?a+=JSON.stringify(b)+":"+g.toStringExplicit(c):c instanceof
d?a+=JSON.stringify(b)+":"+g.toStringExplicit(c):c instanceof Array?a+=JSON.stringify(b)+":"+g.toStringExplicit(c):c instanceof Date?a+=JSON.stringify(b)+":"+JSON.stringify(c):null!==c&&"object"===typeof c&&void 0!==c.castToText&&(a+=JSON.stringify(b)+":"+c.castToText())}return'{"geometry":'+(null===this.geometry?"null":g.toStringExplicit(this.geometry))+',"attributes":{'+a+"}}"};b.prototype._fixDates=function(){for(var a=[],b=0;b<this._layer.fields.length;b++){var c=this._layer.fields[b];"date"!==
c.type&&"esriFieldTypeDate"!==c.type||a.push(c.name)}0<a.length&&this._fixDateFields(a);this._datesfixed=!0};b.prototype._fixDateFields=function(a){this.attributes=l.mixin({},this.attributes);for(var b=0;b<a.length;b++){var c=this.attributes[a[b]];if(null!==c)if(void 0===c)for(var d in this.attributes){if(d.toLowerCase()===a[b]){c=this.attributes[d];null===c||c instanceof Date||(this.attributes[d]=new Date(c));break}}else c instanceof Date||(this.attributes[a[b]]=new Date(c))}};b.prototype.field=
function(a){!1===this._datesfixed&&this._fixDates();var b=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var c in this.attributes)if(c.toLowerCase()===b)return this.attributes[c];if(this._hasFieldDefinition(b))return null;throw Error("Field not Found");};b.prototype._hasFieldDefinition=function(a){if(null===this._layer)return!1;for(var b=0;b<this._layer.fields.length;b++)if(this._layer.fields[b].name.toLowerCase()===a)return!0;return!1};b.prototype._field=function(a){!1===this._datesfixed&&
this._fixDates();var b=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var c in this.attributes)if(c.toLowerCase()===b)return this.attributes[c];return null};b.prototype.setField=function(a,b){if(this.immutable)throw Error("Feature is Immutable");if(!1===g.isSimpleType(b))throw Error("Illegal Value Assignment to Feature");var c=a.toLowerCase();if(void 0===this.attributes[a])for(var d in this.attributes)if(d.toLowerCase()===c){this.attributes[d]=b;return}this.attributes[a]=b};b.prototype.hasField=
function(a){var b=a.toLowerCase();if(void 0!==this.attributes[a])return!0;for(var c in this.attributes)if(c.toLowerCase()===b)return!0;return this._hasFieldDefinition(b)?!0:!1};b.prototype.keys=function(){var a=[],b={},c;for(c in this.attributes)a.push(c),b[c.toLowerCase()]=1;if(null!==this._layer)for(c=0;c<this._layer.fields.length;c++){var d=this._layer.fields[c];1!==b[d.name.toLowerCase()]&&a.push(d.name)}return a=a.sort()};b.fromFeature=function(a){return new b(a)};b.parseGeometryFromDictionary=
function(a){a=b.convertDictionaryToJson(a,!0);void 0!==a.spatialreference&&(a.spatialReference=a.spatialreference,delete a.spatialreference);void 0!==a.rings&&(a.rings=this.fixPathArrays(a.rings,!0===a.hasZ,!0===a.hasM));void 0!==a.paths&&(a.paths=this.fixPathArrays(a.paths,!0===a.hasZ,!0===a.hasM));void 0!==a.points&&(a.points=this.fixPointArrays(a.points,!0===a.hasZ,!0===a.hasM));return n.fromJSON(a)};b.fixPathArrays=function(a,b,c){var f=[];if(a instanceof Array)for(var g=0;g<a.length;g++)f.push(this.fixPointArrays(a[g],
b,c));else if(a instanceof d)for(g=0;g<a.length();g++)f.push(this.fixPointArrays(a.get(g),b,c));return f};b.fixPointArrays=function(b,c,f){var g=[];if(b instanceof Array)for(var h=0;h<b.length;h++){var k=b[h];k instanceof a?c&&f?g.push([k.x,k.y,k.z,k.m]):c?g.push([k.x,k.y,k.z]):f?g.push([k.x,k.y,k.m]):g.push([k.x,k.y]):g.push(k)}else if(b instanceof d)for(h=0;h<b.length();h++)k=b.get(h),k instanceof a?c&&f?g.push([k.x,k.y,k.z,k.m]):c?g.push([k.x,k.y,k.z]):f?g.push([k.x,k.y,k.m]):g.push([k.x,k.y]):
g.push(k);return g};b.convertDictionaryToJson=function(a,c){void 0===c&&(c=!1);var d={},f;for(f in a.attributes){var g=a.attributes[f];g instanceof m&&(g=b.convertDictionaryToJson(g));c?d[f.toLowerCase()]=g:d[f]=g}return d};b.parseAttributesFromDictionary=function(a){var b={},c;for(c in a.attributes){var d=a.attributes[c];if(g.isSimpleType(d))b[c]=d;else throw Error("Illegal Argument");}return b};b.fromJson=function(a){var c=null;null!==a.geometry&&void 0!==a.geometry&&(c=n.fromJSON(a.geometry));
var d={};if(null!==a.attributes&&void 0!==a.attributes)for(var f in a.attributes){var h=a.attributes[f];if(g.isString(h)||g.isNumber(h)||g.isBoolean(h)||g.isDate(h))d[f]=h;else throw Error("Illegal Argument");}return new b(d,c)};b.prototype.domainValueLookup=function(a,b,c){if(null===this._layer||!this._layer.fields)return null;c=g.getDomain(a,this._layer,this,c);if(void 0===b)try{b=this.field(a)}catch(x){return null}return g.getDomainValue(c,b)};b.prototype.domainCodeLookup=function(a,b,c){if(null===
this._layer||!this._layer.fields)return null;a=g.getDomain(a,this._layer,this,c);return g.getDomainCode(a,b)};return b}()})},"esri/arcade/functions/date":function(){define(["require","exports","../../moment","../languageUtils"],function(b,h,l,k){function f(b){return null===b?b:isNaN(b.getTime())?null:b}Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(b,h){b.today=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,0,0);a=new Date;a.setHours(0,0,0,0);return a})};b.now=
function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,0,0);return new Date})};b.timestamp=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,0,0);a=new Date;return a=new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())})};b.toutc=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?null:new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),
a.getUTCSeconds(),a.getUTCMilliseconds())})};b.tolocal=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?null:l.utc([a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()]).toDate()})};b.day=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getDate()})};b.month=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:
a.getMonth()})};b.year=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getFullYear()})};b.hour=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getHours()})};b.second=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getSeconds()})};b.millisecond=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getMilliseconds()})};
b.minute=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getMinutes()})};b.weekday=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,1,1);a=k.toDate(d[0]);return null===a?NaN:a.getDay()})};b.date=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,0,7);if(3===d.length)return f(new Date(k.toNumber(d[0]),k.toNumber(d[1]),k.toNumber(d[2]),0,0,0,0));if(4===d.length)return f(new Date(k.toNumber(d[0]),k.toNumber(d[1]),k.toNumber(d[2]),k.toNumber(d[3]),
0,0,0));if(5===d.length)return f(new Date(k.toNumber(d[0]),k.toNumber(d[1]),k.toNumber(d[2]),k.toNumber(d[3]),k.toNumber(d[4]),0,0));if(6===d.length)return f(new Date(k.toNumber(d[0]),k.toNumber(d[1]),k.toNumber(d[2]),k.toNumber(d[3]),k.toNumber(d[4]),k.toNumber(d[5]),0));if(7===d.length)return f(new Date(k.toNumber(d[0]),k.toNumber(d[1]),k.toNumber(d[2]),k.toNumber(d[3]),k.toNumber(d[4]),k.toNumber(d[5]),k.toNumber(d[6])));if(2===d.length){a=k.toString(d[1]);if(""===a)return null;a=k.standardiseDateFormat(a);
d=l(k.toString(d[0]),a,!0);return!0===d.isValid()?d.toDate():null}if(1===d.length){if(k.isString(d[0])&&""===d[0].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;a=k.toNumber(d[0]);return!1===isNaN(a)?f(new Date(a)):k.toDate(d[0])}if(0===d.length)return new Date})};b.datediff=function(b,d){return h(b,d,function(a,b,d){k.pcCheck(d,2,3);a=k.toDateM(d[0]);b=k.toDateM(d[1]);if(null===a||null===b)return NaN;switch(k.toString(d[2]).toLowerCase()){case "days":case "day":case "d":return a.diff(b,
"days",!0);case "months":case "month":return a.diff(b,"months",!0);case "minutes":case "minute":case "m":return"M"===d[2]?a.diff(b,"months",!0):a.diff(b,"minutes",!0);case "seconds":case "second":case "s":return a.diff(b,"seconds",!0);case "milliseconds":case "millisecond":case "ms":return a.diff(b);case "hours":case "hour":case "h":return a.diff(b,"hours",!0);case "years":case "year":case "y":return a.diff(b,"years",!0);default:return a.diff(b)}})};b.dateadd=function(b,d){return h(b,d,function(a,
b,d){k.pcCheck(d,2,3);a=k.toDateM(d[0]);if(null===a)return null;b="milliseconds";switch(k.toString(d[2]).toLowerCase()){case "days":case "day":case "d":b="days";break;case "months":case "month":b="months";break;case "minutes":case "minute":case "m":b="M"===d[2]?"months":"minutes";break;case "seconds":case "second":case "s":b="seconds";break;case "milliseconds":case "millisecond":case "ms":b="milliseconds";break;case "hours":case "hour":case "h":b="hours";break;case "years":case "year":case "y":b=
"years"}a.add(k.toNumber(d[1]),b);return a.toDate()})}}})},"esri/arcade/functions/string":function(){define(["require","exports","../languageUtils","../Feature"],function(b,h,l,k){Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(b,h){b.trim=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,1,1);return l.toString(c[0]).trim()})};b.upper=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,1,1);return l.toString(c[0]).toUpperCase()})};b.proper=function(b,f){return h(b,
f,function(b,a,c){l.pcCheck(c,1,2);b=1;2===c.length&&"firstword"===l.toString(c[1]).toLowerCase()&&(b=2);a=/\s/;c=l.toString(c[0]);for(var d="",f=!0,g=0;g<c.length;g++){var h=c[g];a.test(h)?1===b&&(f=!0):h.toUpperCase()!==h.toLowerCase()&&(f?(h=h.toUpperCase(),f=!1):h=h.toLowerCase());d+=h}return d})};b.lower=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,1,1);return l.toString(c[0]).toLowerCase()})};b.guid=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,0,1);if(0<c.length)switch(l.toString(c[0]).toLowerCase()){case "digits":return l.generateUUID().replace("-",
"").replace("-","").replace("-","").replace("-","");case "digits-hyphen":return l.generateUUID();case "digits-hyphen-parentheses":return"("+l.generateUUID()+")"}return"{"+l.generateUUID()+"}"})};b.console=function(b,f){return h(b,f,function(d,a,c){0!==c.length&&(1===c.length?b.console(l.toString(c[0])):b.console(l.toString(c)));return l.voidOperation})};b.mid=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,2,3);b=l.toNumber(c[1]);if(isNaN(b))return"";0>b&&(b=0);if(2===c.length)return l.toString(c[0]).substr(b);
a=l.toNumber(c[2]);if(isNaN(a))return"";0>a&&(a=0);return l.toString(c[0]).substr(b,a)})};b.find=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,2,3);b=0;if(2<c.length){b=l.toNumber(l.defaultUndefined(c[2],0));if(isNaN(b))return-1;0>b&&(b=0)}return l.toString(c[1]).indexOf(l.toString(c[0]),b)})};b.left=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,2,2);b=l.toNumber(c[1]);if(isNaN(b))return"";0>b&&(b=0);return l.toString(c[0]).substr(0,b)})};b.right=function(b,f){return h(b,f,function(b,
a,c){l.pcCheck(c,2,2);b=l.toNumber(c[1]);if(isNaN(b))return"";0>b&&(b=0);return l.toString(c[0]).substr(-1*b,b)})};b.split=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,2,4);b=l.toNumber(l.defaultUndefined(c[2],-1));a=l.toBoolean(l.defaultUndefined(c[3],!1));-1===b||null===b||!0===a?c=l.toString(c[0]).split(l.toString(c[1])):(isNaN(b)&&(b=-1),-1>b&&(b=-1),c=l.toString(c[0]).split(l.toString(c[1]),b));if(!1===a)return c;a=[];for(var d=0;d<c.length&&!(-1!==b&&a.length>=b);d++)""!==c[d]&&void 0!==
c[d]&&a.push(c[d]);return a})};b.text=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,1,2);return l.toStringExplicit(c[0],c[1])})};b.concatenate=function(b,f){return h(b,f,function(b,a,c){b=[];if(1>c.length)return"";if(l.isArray(c[0])){a=l.defaultUndefined(c[2],"");for(var d=0;d<c[0].length;d++)b[d]=l.toStringExplicit(c[0][d],a);return 1<c.length?b.join(c[1]):b.join("")}if(l.isImmutableArray(c[0])){a=l.defaultUndefined(c[2],"");for(d=0;d<c[0].length();d++)b[d]=l.toStringExplicit(c[0].get(d),
a);return 1<c.length?b.join(c[1]):b.join("")}for(d=0;d<c.length;d++)b[d]=l.toStringExplicit(c[d]);return b.join("")})};b.reverse=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,1,1);if(l.isArray(c[0]))return b=c[0].slice(0),b.reverse(),b;if(l.isImmutableArray(c[0]))return b=c[0].toArray().slice(0),b.reverse(),b;throw Error("Invalid Parameter");})};b.replace=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,3,4);b=l.toString(c[0]);a=l.toString(c[1]);var d=l.toString(c[2]);return(4===c.length?
l.toBoolean(c[3]):1)?l.multiReplace(b,a,d):b.replace(a,d)})};b.domainname=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,2,4);if(c[0]instanceof k)return c[0].domainValueLookup(l.toString(c[1]),c[2],void 0===c[3]?void 0:l.toNumber(c[3]));throw Error("Invalid Parameter");})};b.domaincode=function(b,f){return h(b,f,function(b,a,c){l.pcCheck(c,3,4);if(c[0]instanceof k)return c[0].domainCodeLookup(l.toString(c[1]),c[2],void 0===c[3]?void 0:l.toNumber(c[3]));throw Error("Invalid Parameter");})}}})},
"esri/arcade/functions/maths":function(){define(["require","exports","../languageUtils","dojo/number"],function(b,h,l,k){function f(b,f,g){if("undefined"===typeof g||0===+g)return Math[b](f);f=+f;g=+g;if(isNaN(f)||"number"!==typeof g||0!==g%1)return NaN;f=f.toString().split("e");f=Math[b](+(f[0]+"e"+(f[1]?+f[1]-g:-g)));f=f.toString().split("e");return+(f[0]+"e"+(f[1]?+f[1]+g:g))}Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(b,h){function g(b,a,c){b=l.toNumber(b);return isNaN(b)?
b:isNaN(a)||isNaN(c)||a>c?NaN:b<a?a:b>c?c:b}b.number=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,2);a=d[0];return l.isNumber(a)?a:null===a?0:l.isDate(a)||l.isBoolean(a)?Number(a):l.isArray(a)?NaN:""===a||void 0===a?Number(a):l.isString(a)?void 0!==d[1]?(d=l.multiReplace(d[1],"\u2030",""),d=l.multiReplace(d,"\u00a4",""),k.parse(a,{pattern:d})):Number(a.trim()):Number(a)})};b.abs=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.abs(l.toNumber(d[0]))})};b.acos=function(b,
a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.acos(l.toNumber(d[0]))})};b.asin=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.asin(l.toNumber(d[0]))})};b.atan=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.atan(l.toNumber(d[0]))})};b.atan2=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,2,2);return Math.atan2(l.toNumber(d[0]),l.toNumber(d[1]))})};b.ceil=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,2);return 2===d.length?
(a=l.toNumber(d[1]),isNaN(a)&&(a=0),f("ceil",l.toNumber(d[0]),-1*a)):Math.ceil(l.toNumber(d[0]))})};b.round=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,2);return 2===d.length?(a=l.toNumber(d[1]),isNaN(a)&&(a=0),f("round",l.toNumber(d[0]),-1*a)):Math.round(l.toNumber(d[0]))})};b.floor=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,2);return 2===d.length?(a=l.toNumber(d[1]),isNaN(a)&&(a=0),f("floor",l.toNumber(d[0]),-1*a)):Math.floor(l.toNumber(d[0]))})};b.cos=function(b,a){return h(b,
a,function(a,b,d){l.pcCheck(d,1,1);return Math.cos(l.toNumber(d[0]))})};b.isnan=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return"number"===typeof d[0]&&isNaN(d[0])})};b.exp=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.exp(l.toNumber(d[0]))})};b.log=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.log(l.toNumber(d[0]))})};b.pow=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,2,2);return Math.pow(l.toNumber(d[0]),l.toNumber(d[1]))})};
b.random=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,0,0);return Math.random()})};b.sin=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.sin(l.toNumber(d[0]))})};b.sqrt=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.sqrt(l.toNumber(d[0]))})};b.tan=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return Math.tan(l.toNumber(d[0]))})};b.defaultvalue=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,2,2);return null===d[0]||""===
d[0]||void 0===d[0]?d[1]:d[0]})};b.isempty=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return null===d[0]||""===d[0]||void 0===d[0]?!0:!1})};b["boolean"]=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,1,1);return l.toBoolean(d[0])})};b.constrain=function(b,a){return h(b,a,function(a,b,d){l.pcCheck(d,3,3);a=l.toNumber(d[1]);b=l.toNumber(d[2]);if(l.isArray(d[0])){var c=[],f=0;for(d=d[0];f<d.length;f++)c.push(g(d[f],a,b));return c}if(l.isImmutableArray(d[0])){c=[];for(f=0;f<d[0].length();f++)c.push(g(d[0].get(f),
a,b));return c}return g(d[0],a,b)})}}})},"esri/arcade/functions/geometry":function(){define("require exports ../../geometry/Geometry ../../geometry/Polygon ../../geometry/Polyline ../../geometry/Point ../../geometry/Extent ../../geometry/Multipoint ../../geometry/support/jsonUtils ../languageUtils ../Dictionary ../Feature".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r){Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(b,h){b.polygon=function(b,f){return h(b,f,function(f,
g,e){a.pcCheck(e,1,1);f=null;if(e[0]instanceof c){if(f=a.fixSpatialReference(r.parseGeometryFromDictionary(e[0]),b.spatialReference),!1===f instanceof k)throw Error("Illegal Parameter");}else f=e[0]instanceof k?d.fromJSON(e[0].toJSON()):a.fixSpatialReference(new k(JSON.parse(e[0])),b.spatialReference);if(null!==f&&!1===f.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return a.fixNullGeometry(f)})};
b.polyline=function(b,g){return h(b,g,function(g,h,e){a.pcCheck(e,1,1);g=null;if(e[0]instanceof c){if(g=a.fixSpatialReference(r.parseGeometryFromDictionary(e[0]),b.spatialReference),!1===g instanceof f)throw Error("Illegal Parameter");}else g=e[0]instanceof f?d.fromJSON(e[0].toJSON()):a.fixSpatialReference(new f(JSON.parse(e[0])),b.spatialReference);if(null!==g&&!1===g.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return a.fixNullGeometry(g)})};b.point=function(b,f){return h(b,f,function(f,g,e){a.pcCheck(e,1,1);f=null;if(e[0]instanceof c){if(f=a.fixSpatialReference(r.parseGeometryFromDictionary(e[0]),b.spatialReference),!1===f instanceof n)throw Error("Illegal Parameter");}else f=e[0]instanceof n?d.fromJSON(e[0].toJSON()):a.fixSpatialReference(new n(JSON.parse(e[0])),b.spatialReference);if(null!==f&&!1===f.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return a.fixNullGeometry(f)})};b.multipoint=function(b,f){return h(b,f,function(f,h,e){a.pcCheck(e,1,1);f=null;if(e[0]instanceof c){if(f=a.fixSpatialReference(r.parseGeometryFromDictionary(e[0]),b.spatialReference),!1===f instanceof g)throw Error("Illegal Parameter");}else f=e[0]instanceof g?d.fromJSON(e[0].toJSON()):a.fixSpatialReference(new g(JSON.parse(e[0])),b.spatialReference);if(null!==f&&!1===f.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return a.fixNullGeometry(f)})};b.extent=function(b,l){return h(b,l,function(h,p,e){a.pcCheck(e,1,1);h=null;e[0]instanceof c?h=a.fixSpatialReference(r.parseGeometryFromDictionary(e[0]),b.spatialReference):e[0]instanceof n?(h={xmin:e[0].x,ymin:e[0].y,xmax:e[0].x,ymax:e[0].y,spatialReference:e[0].spatialReference.toJSON()},e[0].hasZ?(h.zmin=e[0].z,h.zmax=e[0].z):e[0].hasM&&(h.mmin=e[0].m,h.mmax=e[0].m),h=d.fromJSON(h)):h=e[0]instanceof k?d.fromJSON(e[0].extent.toJSON()):e[0]instanceof f?d.fromJSON(e[0].extent.toJSON()):
e[0]instanceof g?d.fromJSON(e[0].extent.toJSON()):e[0]instanceof m?d.fromJSON(e[0].toJSON()):a.fixSpatialReference(new m(JSON.parse(e[0])),b.spatialReference);if(null!==h&&!1===h.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return a.fixNullGeometry(h)})};b.geometry=function(b,f){return h(b,f,function(f,g,e){a.pcCheck(e,1,1);f=null;f=e[0]instanceof r?a.fixSpatialReference(e[0].geometry,b.spatialReference):
e[0]instanceof c?a.fixSpatialReference(r.parseGeometryFromDictionary(e[0]),b.spatialReference):a.fixSpatialReference(d.fromJSON(JSON.parse(e[0])),b.spatialReference);if(null!==f&&!1===f.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return a.fixNullGeometry(f)})};b.setgeometry=function(b,c){return h(b,c,function(b,c,d){a.pcCheck(d,2,2);if(d[0]instanceof r){if(!0===d[0].immutable)throw Error("Feature is Immutable");
if(d[1]instanceof l||null===d[1])d[0].geometry=d[1];else throw Error("Illegal Argument");}else throw Error("Illegal Argument");return a.voidOperation})};b.feature=function(b,d){return h(b,d,function(d,f,e){if(0===e.length)throw Error("Missing Parameters");d=null;if(1===e.length)if(a.isString(e[0]))d=r.fromJson(JSON.parse(e[0]));else if(e[0]instanceof r)d=new r(e[0]);else if(e[0]instanceof l)d=new r(null,e[0]);else if(e[0]instanceof c)d=e[0].hasField("geometry")?e[0].field("geometry"):null,f=e[0].hasField("attributes")?
e[0].field("attributes"):null,null!==d&&d instanceof c&&(d=r.parseGeometryFromDictionary(d)),null!==f&&(f=r.parseAttributesFromDictionary(f)),d=new r(f,d);else throw Error("Illegal Argument");else{if(2===e.length){f=d=null;if(null!==e[0])if(e[0]instanceof l)d=e[0];else if(d instanceof c)d=r.parseGeometryFromDictionary(e[0]);else throw Error("Illegal Argument");if(null!==e[1])if(e[1]instanceof c)f=r.parseAttributesFromDictionary(e[1]);else throw Error("Illegal Argument");}else{d=null;f={};if(null!==
e[0])if(e[0]instanceof l)d=e[0];else if(d instanceof c)d=r.parseGeometryFromDictionary(e[0]);else throw Error("Illegal Argument");for(var g=1;g<e.length;g+=2){var h=a.toString(e[g]),k=e[g+1];if(null===k||void 0===k||a.isString(k)||isNaN(k)||a.isDate(k)||a.isNumber(k)||a.isBoolean(k)){if(a.isFunctionParameter(k)||!1===a.isSimpleType(k))throw Error("Illegal Argument");f[h]=k===a.voidOperation?null:k}else throw Error("Illegal Argument");}}d=new r(f,d)}d.geometry=a.fixSpatialReference(d.geometry,b.spatialReference);
d.immutable=!1;return d})};b.dictionary=function(b,d){return h(b,d,function(b,d,e){if(0===e.length)throw Error("Missing Parameters");if(0!==e.length%2)throw Error("Missing Parameters");b={};for(d=0;d<e.length;d+=2){var f=a.toString(e[d]),g=e[d+1];if(null===g||void 0===g||a.isString(g)||isNaN(g)||a.isDate(g)||a.isNumber(g)||a.isBoolean(g)||a.isArray(g)||a.isImmutableArray(g)){if(a.isFunctionParameter(g))throw Error("Illegal Argument");b[f]=g===a.voidOperation?null:g}else throw Error("Illegal Argument");
}e=new c(b);e.immutable=!1;return e})};b.haskey=function(b,d){return h(b,d,function(b,d,e){a.pcCheck(e,2,2);b=a.toString(e[1]);if(e[0]instanceof r||e[0]instanceof c)return e[0].hasField(b);throw Error("Illegal Argument");})};b.indexof=function(b,c){return h(b,c,function(b,c,d){a.pcCheck(d,2,2);b=d[1];if(a.isArray(d[0])){for(c=0;c<d[0].length;c++)if(a.equalityTest(b,d[0][c]))return c;return-1}if(a.isImmutableArray(d[0])){var e=d[0].length();for(c=0;c<e;c++)if(a.equalityTest(b,d[0].get(c)))return c;
return-1}throw Error("Illegal Argument");})}}})},"esri/arcade/functions/geomsync":function(){define("require exports ../../geometry/Geometry ../../geometry/Polygon ../../geometry/Polyline ../../geometry/Point ../../geometry/Extent ../../geometry/Multipoint ../../geometry/support/jsonUtils ./centroid ../languageUtils ../kernel ../../kernel".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r,w){function t(a){return y?a.clone():d.fromJSON(a.toJSON())}function x(a){return 0===w.version.indexOf("4.")?k.fromExtent(a):
new k({spatialReference:a.spatialReference,rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]]})}Object.defineProperty(h,"__esModule",{value:!0});var v=null,y=0===w.version.indexOf("4.");h.setGeometryEngine=function(a){v=a};h.registerFunctions=function(b,e){function h(a){c.pcCheck(a,2,2);if(!(a[0]instanceof l&&a[1]instanceof l||a[0]instanceof l&&null===a[1]||a[1]instanceof l&&null===a[0]||null===a[0]&&null===a[1]))throw Error("Illegal Argument");}b.disjoint=function(a,
b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?!0:v.disjoint(c[0],c[1])})};b.intersects=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?!1:v.intersects(c[0],c[1])})};b.touches=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?!1:v.touches(c[0],c[1])})};b.crosses=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?!1:v.crosses(c[0],c[1])})};b.within=function(a,b){return e(a,b,function(a,
b,c){h(c);return null===c[0]||null===c[1]?!1:v.within(c[0],c[1])})};b.contains=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?!1:v.contains(c[0],c[1])})};b.overlaps=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?!1:v.overlaps(c[0],c[1])})};b.equals=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,2);return d[0]===d[1]?!0:d[0]instanceof l&&d[1]instanceof l?v.equals(d[0],d[1]):c.isDate(d[0])&&c.isDate(d[1])?d[0].getTime()===d[1].getTime():
!1})};b.relate=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,3,3);if(d[0]instanceof l&&d[1]instanceof l)return v.relate(d[0],d[1],c.toString(d[2]));if(d[0]instanceof l&&null===d[1]||d[1]instanceof l&&null===d[0]||null===d[0]&&null===d[1])return!1;throw Error("Illegal Argument");})};b.intersection=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]||null===c[1]?null:v.intersect(c[0],c[1])})};b.union=function(a,b){return e(a,b,function(b,d,e){b=[];if(0===e.length)throw Error("Function called with wrong number of Parameters");
if(1===e.length)if(c.isArray(e[0]))for(d=0;d<e[0].length;d++){if(null!==e[0][d])if(e[0][d]instanceof l)b.push(e[0][d]);else throw Error("Illegal Argument");}else if(c.isImmutableArray(e[0]))for(e=e[0].toArray(),d=0;d<e.length;d++){if(null!==e[d])if(e[d]instanceof l)b.push(e[d]);else throw Error("Illegal Argument");}else{if(e[0]instanceof l)return c.fixSpatialReference(t(e[0]),a.spatialReference);if(null===e[0])return null;throw Error("Illegal Argument");}else for(d=0;d<e.length;d++)if(null!==e[d])if(e[d]instanceof
l)b.push(e[d]);else throw Error("Illegal Argument");return 0===b.length?null:v.union(b)})};b.difference=function(a,b){return e(a,b,function(a,b,c){h(c);return null!==c[0]&&null===c[1]?t(c[0]):null===c[0]?null:v.difference(c[0],c[1])})};b.symmetricdifference=function(a,b){return e(a,b,function(a,b,c){h(c);return null===c[0]&&null===c[1]?null:null===c[0]?t(c[1]):null===c[1]?t(c[0]):v.symmetricDifference(c[0],c[1])})};b.clip=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,2);if(!(d[1]instanceof
m)&&null!==d[1])throw Error("Illegal Argument");if(null===d[0])return null;if(!(d[0]instanceof l))throw Error("Illegal Argument");return null===d[1]?null:v.clip(d[0],d[1])})};b.cut=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,2);if(!(d[1]instanceof f)&&null!==d[1])throw Error("Illegal Argument");if(null===d[0])return[];if(!(d[0]instanceof l))throw Error("Illegal Argument");return null===d[1]?[t(d[0])]:v.cut(d[0],d[1])})};b.area=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,1,
2);if(null===d[0])return 0;if(!(d[0]instanceof l))throw Error("Illegal Argument");return v.planarArea(d[0],r.convertSquareUnitsToCode(c.defaultUndefined(d[1],-1)))})};b.areageodetic=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof l))throw Error("Illegal Argument");return v.geodesicArea(d[0],r.convertSquareUnitsToCode(c.defaultUndefined(d[1],-1)))})};b.length=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,1,2);if(null===d[0])return 0;
if(!(d[0]instanceof l))throw Error("Illegal Argument");return v.planarLength(d[0],r.convertLinearUnitsToCode(c.defaultUndefined(d[1],-1)))})};b.lengthgeodetic=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof l))throw Error("Illegal Argument");return v.geodesicLength(d[0],r.convertLinearUnitsToCode(c.defaultUndefined(d[1],-1)))})};b.distance=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,3);if(!(d[0]instanceof l))throw Error("Illegal Argument");
if(!(d[1]instanceof l))throw Error("Illegal Argument");return v.distance(d[0],d[1],r.convertLinearUnitsToCode(c.defaultUndefined(d[2],-1)))})};b.densify=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof l))throw Error("Illegal Argument");a=c.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");if(0>=a)throw Error("Illegal Argument");return d[0]instanceof k||d[0]instanceof f?v.densify(d[0],a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],
-1))):d[0]instanceof m?v.densify(x(d[0]),a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],-1))):d[0]})};b.densifygeodetic=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof l))throw Error("Illegal Argument");a=c.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");if(0>=a)throw Error("Illegal Argument");return d[0]instanceof k||d[0]instanceof f?v.geodesicDensify(d[0],a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],-1))):d[0]instanceof
m?v.geodesicDensify(x(d[0]),a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],-1))):d[0]})};b.generalize=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,4);if(null===d[0])return null;if(!(d[0]instanceof l))throw Error("Illegal Argument");a=c.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");return v.generalize(d[0],a,c.toBoolean(c.defaultUndefined(d[2],!0)),r.convertLinearUnitsToCode(c.defaultUndefined(d[3],-1)))})};b.buffer=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,
2,3);if(null===d[0])return null;if(!(d[0]instanceof l))throw Error("Illegal Argument");a=c.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");return 0===a?t(d[0]):v.buffer(d[0],a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],-1)))})};b.buffergeodetic=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof l))throw Error("Illegal Argument");a=c.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");return 0===a?t(d[0]):v.geodesicBuffer(d[0],
a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],-1)))})};b.offset=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,6);if(null===d[0])return null;if(!(d[0]instanceof k||d[0]instanceof f))throw Error("Illegal Argument");a=c.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");b=c.toNumber(c.defaultUndefined(d[4],0));if(isNaN(b))throw Error("Illegal Argument");var e=c.toNumber(c.defaultUndefined(d[5],0));if(isNaN(e))throw Error("Illegal Argument");return v.offset(d[0],a,r.convertLinearUnitsToCode(c.defaultUndefined(d[2],
-1)),c.toString(c.defaultUndefined(d[3],"round")).toLowerCase(),b,e)})};b.rotate=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,2,3);a=d[0];if(null===a)return null;if(!(a instanceof l))throw Error("Illegal Argument");a instanceof m&&(a=k.fromExtent(a));b=c.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");d=c.defaultUndefined(d[2],null);if(null===d)return v.rotate(a,b);if(d instanceof n)return v.rotate(a,b,d);throw Error("Illegal Argument");})};b.centroid=function(b,d){return e(b,
d,function(d,e,h){c.pcCheck(h,1,1);if(null===h[0])return null;if(!(h[0]instanceof l))throw Error("Illegal Argument");return h[0]instanceof n?c.fixSpatialReference(t(h[0]),b.spatialReference):h[0]instanceof k?y?h[0].centroid:h[0].getCentroid():h[0]instanceof f?a.centroidPolyline(h[0]):h[0]instanceof g?a.centroidMultiPoint(h[0]):h[0]instanceof m?y?h[0].center:h[0].getExtent().getCenter():null})};b.multiparttosinglepart=function(a,b){return e(a,b,function(b,e,h){c.pcCheck(h,1,1);e=[];if(null===h[0])return null;
if(!(h[0]instanceof l))throw Error("Illegal Argument");if(h[0]instanceof n||h[0]instanceof m)return[c.fixSpatialReference(t(h[0]),a.spatialReference)];b=v.simplify(h[0]);if(b instanceof k){e=[];var p=[];for(h=0;h<b.rings.length;h++)if(b.isClockwise(b.rings[h])){var q=d.fromJSON({rings:[b.rings[h]],hasZ:b.hasZ,hazM:b.hasM,spatialReference:y?b.spatialReference.toJSON():b.spatialReference.toJson()});e.push(q)}else p.push({ring:b.rings[h],pt:b.getPoint(h,0)});for(b=0;b<p.length;b++)for(h=0;h<e.length;h++)if(e[h].contains(p[b].pt)){e[h].addRing(p[b].ring);
break}return e}if(b instanceof f){e=[];for(h=0;h<b.paths.length;h++)p=d.fromJSON({paths:[b.paths[h]],hasZ:b.hasZ,hazM:b.hasM,spatialReference:y?b.spatialReference.toJSON():b.spatialReference.toJson()}),e.push(p);return e}if(h[0]instanceof g){b=c.fixSpatialReference(t(h[0]),a.spatialReference);for(h=0;h<b.points.length;h++)e.push(b.getPoint(h));return e}return null})};b.issimple=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,1,1);if(null===d[0])return!0;if(d[0]instanceof l)return v.isSimple(d[0]);
throw Error("Illegal Argument");})};b.simplify=function(a,b){return e(a,b,function(a,b,d){c.pcCheck(d,1,1);if(null===d[0])return null;if(d[0]instanceof l)return v.simplify(d[0]);throw Error("Illegal Argument");})}}})},"esri/arcade/functions/centroid":function(){define(["require","exports","../../geometry/Point","../../kernel"],function(b,h,l,k){function f(b,d,a){var c={x:0,y:0};d&&(c.z=0);a&&(c.m=0);for(var f=0,g=b[0],h=0;h<b.length;h++){var k=b[h],l;a:if(k.length!==g.length)l=!1;else{for(l=0;l<k.length;l++)if(k[l]!==
g[l]){l=!1;break a}l=!0}if(l){l=n(g,k,d);var m=k,p=d,e=a,q={x:(g[0]+m[0])/2,y:(g[1]+m[1])/2};p&&(q.z=(g[2]+m[2])/2);p&&e?q.m=(g[3]+m[3])/2:e&&(q.m=(g[2]+m[2])/2);g=q;g.x*=l;g.y*=l;d&&(g.z*=l);a&&(g.m*=l);f+=l;g=k}}0<f?(c.x/=f,c.y/=f,d&&(c.z/=f),a&&(c.m/=f)):(c.x=b[0][0],c.y=b[0][1],d&&(c.z=b[0][2]),a&&d?c.m=b[0][3]:a&&(c.m=b[0][2]));return c}function n(b,d,a){var c=d[0]-b[0];b=d[1]-b[1];return a?(d=d[2]-d[2],Math.sqrt(c*c+b*b+d*d)):Math.sqrt(c*c+b*b)}Object.defineProperty(h,"__esModule",{value:!0});
var m=0===k.version.indexOf("4.");h.centroidPolyline=function(b){for(var d={x:0,y:0,spatialReference:m?b.spatialReference.toJSON():b.spatialReference.toJson()},a={x:0,y:0,spatialReference:m?b.spatialReference.toJSON():b.spatialReference.toJson()},c=0,g=0,h=0;h<b.paths.length;h++)if(0!==b.paths[h].length){var k;k=b.paths[h];var x=!0===b.hasZ;if(1>=k.length)k=0;else{for(var v=0,y=1;y<k.length-1;y++)v+=n(k[y-1],k[y],x);k=v}0===k?(x=f(b.paths[h],!0===b.hasZ,!0===b.hasM),d.x+=x.x,d.y+=x.y,!0===b.hasZ&&
(d.z+=x.z),!0===b.hasM&&(d.m+=x.m),++c):(x=f(b.paths[h],!0===b.hasZ,!0===b.hasM),a.x+=x.x*k,a.y+=x.y*k,!0===b.hasZ&&(a.z+=x.z*k),!0===b.hasM&&(a.m+=x.m*k),g+=k)}return 0<g?(a.x/=g,a.y/=g,!0===b.hasZ&&(a.z/=g),!0===b.hasM&&(a.m/=g),new l(a)):0<c?(d.x/=c,d.y/=c,!0===b.hasZ&&(a.z/=c),!0===b.hasM&&(d.m/=c),new l(d)):null};h.centroidMultiPoint=function(b){if(0===b.points.length)return null;for(var d=0,a=0,c=0,f=0,g=0;g<b.points.length;g++){var h=b.getPoint(g);!0===h.hasZ&&(c+=h.z);!0===h.hasM&&(f+=h.m);
d+=h.x;a+=h.y;f+=h.m}d={x:d/b.points.length,y:a/b.points.length,spatialReference:null};d.spatialReference=m?b.spatialReference.toJSON():b.spatialReference.toJson();!0===b.hasZ&&(d.z=c/b.points.length);!0===b.hasM&&(d.m=f/b.points.length);return new l(d)}})},"esri/arcade/kernel":function(){define(["require","exports","../geometry/Extent"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});h.errback=function(b){return function(f){b.reject(f)}};h.callback=function(b,f){return function(){try{b.apply(null,
arguments)}catch(n){f.reject(n)}}};h.convertSquareUnitsToCode=function(b){if(void 0===b)return null;if("number"===typeof b)return b;switch(b.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square_meters":return 109404;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 109413;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 109414;
case "acres":case "acre":case "ac":return 109402;case "hectares":case "hectare":case "ha":return 109401;case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 109442;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 109405}return null};h.shapeExtent=function(b){if(null===b)return null;switch(b.type){case "polygon":case "multipoint":case "polyline":return b.extent;case "point":return new l({xmin:b.x,
ymin:b.y,xmax:b.x,ymax:b.y,spatialReference:b.spatialReference});case "extent":return b}return null};h.convertLinearUnitsToCode=function(b){if(void 0===b)return null;if("number"===typeof b||"number"===typeof b)return b;switch(b.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square-meters":return 9001;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 9035;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 9036;
case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 9096;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 9002}return null};h.sameGeomType=function(b,f){return b===f||"point"===b&&"esriGeometryPoint"===f||"polyline"===b&&"esriGeometryPolyline"===f||"polygon"===b&&"esriGeometryPolygon"===f||"extent"===b&&"esriGeometryEnvelope"===f||"multipoint"===b&&"esriGeometryMultipoint"===
f||"point"===f&&"esriGeometryPoint"===b||"polyline"===f&&"esriGeometryPolyline"===b||"polygon"===f&&"esriGeometryPolygon"===b||"extent"===f&&"esriGeometryEnvelope"===b||"multipoint"===f&&"esriGeometryMultipoint"===b?!0:!1}})},"esri/arcade/functions/stats":function(){define(["require","exports","../languageUtils","./fieldStats"],function(b,h,l,k){function f(b,f,g,d){if(1===d.length){if(l.isArray(d[0]))return k.calculateStat(b,d[0],-1);if(l.isImmutableArray(d[0]))return k.calculateStat(b,d[0].toArray(),
-1)}return k.calculateStat(b,d,-1)}Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(b,h){b.stdev=function(b,d){return h(b,d,function(a,b,d){return f("stdev",a,b,d)})};b.variance=function(b,d){return h(b,d,function(a,b,d){return f("variance",a,b,d)})};b.average=function(b,d){return h(b,d,function(a,b,d){return f("mean",a,b,d)})};b.mean=function(b,d){return h(b,d,function(a,b,d){return f("mean",a,b,d)})};b.sum=function(b,d){return h(b,d,function(a,b,d){return f("sum",a,
b,d)})};b.min=function(b,d){return h(b,d,function(a,b,d){return f("min",a,b,d)})};b.max=function(b,d){return h(b,d,function(a,b,d){return f("max",a,b,d)})};b.distinct=function(b,d){return h(b,d,function(a,b,d){return f("distinct",a,b,d)})};b.count=function(b,d){return h(b,d,function(a,b,d){l.pcCheck(d,1,1);if(l.isArray(d[0])||l.isString(d[0]))return d[0].length;if(l.isImmutableArray(d[0]))return d[0].length();throw Error("Invalid Parameters for Count");})}}})},"esri/arcade/functions/fieldStats":function(){define(["require",
"exports","../languageUtils"],function(b,h,l){function k(b){for(var f=0,g=0;g<b.length;g++)f+=b[g];return f/b.length}function f(b){for(var f=k(b),g=0,d=0;d<b.length;d++)g+=Math.pow(f-b[d],2);return g/b.length}Object.defineProperty(h,"__esModule",{value:!0});h.decodeStatType=function(b){switch(b.toLowerCase()){case "distinct":return"distinct";case "avg":case "mean":return"avg";case "min":return"min";case "sum":return"sum";case "max":return"max";case "stdev":case "stddev":return"stddev";case "var":case "variance":return"var";
case "count":return"count"}return""};h.calculateStat=function(b,h,g){void 0===g&&(g=1E3);switch(b.toLowerCase()){case "distinct":a:{b=g;g=[];for(var d={},a=[],c=0;c<h.length;c++){if(void 0!==h[c]&&null!==h[c]&&h[c]!==l.voidOperation){var m=h[c];if(l.isNumber(m)||l.isString(m))void 0===d[m]&&(g.push(m),d[m]=1);else{for(var n=!1,t=0;t<a.length;t++)!0===l.equalityTest(a[t],m)&&(n=!0);!1===n&&(a.push(m),g.push(m))}}if(g.length>=b&&-1!==b){h=g;break a}}h=g}return h;case "avg":case "mean":return k(l.toNumberArray(h));
case "min":return Math.min.apply(Math,l.toNumberArray(h));case "sum":h=l.toNumberArray(h);for(g=b=0;g<h.length;g++)b+=h[g];return b;case "max":return Math.max.apply(Math,l.toNumberArray(h));case "stdev":case "stddev":return Math.sqrt(f(l.toNumberArray(h)));case "var":case "variance":return f(l.toNumberArray(h));case "count":return h.length}return 0}})},"esri/arcade/parser":function(){define(["require","exports","./treeAnalysis","./lib/esprima"],function(b,h,l,k){Object.defineProperty(h,"__esModule",
{value:!0});h.parseScript=function(b){b=k.parse("function _() { "+b+"\n}");if(null===b.body||void 0===b.body)throw Error("No formula provided.");if(0===b.body.length)throw Error("No formula provided.");if(0===b.body.length)throw Error("No formula provided.");if("BlockStatement"!==b.body[0].body.type)throw Error("Invalid formula content.");var f=l.validateLanguage(b);if(""!==f)throw Error(f);return b};h.scriptCheck=function(b,h,m,g){var d=[];try{var a=k.parse("function _() { "+b+"\n}",{tolerant:!0,
loc:!0}),c=a.errors;if(0<c.length)for(var f=0;f<c.length;f++)d.push({line:c[f].lineNumber,character:c[f].column,reason:c[f].description});var n=l.checkScript(a,h,m,g);for(h=0;h<n.length;h++)d.push(n[h])}catch(t){try{"Unexpected token }"===t.description?(t.index=("function _() { "+b+"\n}").length-1,d.push({line:t.lineNumber,character:t.column,reason:"Unexpected end of script"})):d.push({line:t.lineNumber,character:t.column,reason:t.description})}catch(x){}}return d};h.extractFieldLiterals=function(b,
h){void 0===h&&(h=!1);return l.findFieldLiterals(b,h)};h.validateScript=function(b,h,k){void 0===k&&(k="full");return l.validateScript(b,h,k)};h.referencesMember=function(b,h){return l.referencesMember(b,h)};h.referencesFunction=function(b,h){return l.referencesFunction(b,h)}})},"esri/arcade/lib/esprima":function(){(function(b,h){"function"===typeof define&&define.amd?define(["exports"],h):"undefined"!==typeof exports?h(exports):h(b.esprima={})})(this,function(b){function h(a,b){if(!a)throw Error("ASSERT: "+
b);}function l(a){return 48<=a&&57>=a}function k(a){return 0<="0123456789abcdefABCDEF".indexOf(a)}function f(a){return 0<="01234567".indexOf(a)}function n(a){return 10===a||13===a||8232===a||8233===a}function m(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||92===a||128<=a&&bb.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function g(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a||92===a||128<=a&&bb.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function d(a){a=
a.toLowerCase();switch(a.length){case 2:return"if"===a||"in"===a;case 3:return"var"===a||"for"===a;case 4:return"else"===a;case 5:return"break"===a;case 6:return"return"===a;case 8:return"function"===a.toLowerCase()||"continue"===a;default:return!1}}function a(a,b,c,d,e){h("number"===typeof c,"Comment must have valid position");ba.lastCommentStart>=c||(ba.lastCommentStart=c,a={type:a,value:b},L.range&&(a.range=[c,d]),L.loc&&(a.loc=e),L.comments.push(a),L.attachComment&&(L.leadingComments.push(a),
L.trailingComments.push(a)))}function c(b){var c,d,e;c=A-b;for(d={start:{line:ea,column:A-ia-b}};A<ma;)if(e=Q.charCodeAt(A),++A,n(e)){L.comments&&(b=Q.slice(c+b,A-1),d.end={line:ea,column:A-ia-1},a("Line",b,c,A-1,d));13===e&&10===Q.charCodeAt(A)&&++A;++ea;ia=A;return}L.comments&&(b=Q.slice(c+b,A),d.end={line:ea,column:A-ia},a("Line",b,c,A,d))}function r(){var b,d;for(d=0===A;A<ma;)if(b=Q.charCodeAt(A),32===b||9===b||11===b||12===b||160===b||5760<=b&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,
8199,8200,8201,8202,8239,8287,12288,65279].indexOf(b))++A;else if(n(b))++A,13===b&&10===Q.charCodeAt(A)&&++A,++ea,ia=A,d=!0;else if(47===b)if(b=Q.charCodeAt(A+1),47===b)++A,++A,c(2),d=!0;else if(42===b){++A;++A;a:{var e=b=void 0,f=void 0,f=void 0;L.comments&&(b=A-2,e={start:{line:ea,column:A-ia-2}});for(;A<ma;)if(f=Q.charCodeAt(A),n(f))13===f&&10===Q.charCodeAt(A+1)&&++A,++ea,++A,ia=A,A>=ma&&G();else{if(42===f&&47===Q.charCodeAt(A+1)){++A;++A;L.comments&&(f=Q.slice(b+2,A-2),e.end={line:ea,column:A-
ia},a("Block",f,b,A,e));break a}++A}G()}}else break;else if(d&&45===b)if(45===Q.charCodeAt(A+1)&&62===Q.charCodeAt(A+2))A+=3,c(3);else break;else if(60===b)if("!--"===Q.slice(A+1,A+4))++A,++A,++A,++A,c(4);else break;else break}function w(a){var b,c,d=0;b="u"===a?4:2;for(a=0;a<b;++a)if(A<ma&&k(Q[A]))c=Q[A++],d=16*d+"0123456789abcdef".indexOf(c.toLowerCase());else return"";return String.fromCharCode(d)}function t(){var a,b;a=Q.charCodeAt(A++);b=String.fromCharCode(a);92===a&&(117!==Q.charCodeAt(A)&&
G(),++A,(a=w("u"))&&"\\"!==a&&m(a.charCodeAt(0))||G(),b=a);for(;A<ma;){a=Q.charCodeAt(A);if(!g(a))break;++A;b+=String.fromCharCode(a);92===a&&(b=b.substr(0,b.length-1),117!==Q.charCodeAt(A)&&G(),++A,(a=w("u"))&&"\\"!==a&&g(a.charCodeAt(0))||G(),b+=a)}return b}function x(){var a=A,b=Q.charCodeAt(A),c,d=Q[A];switch(b){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++A,L.tokenize&&(40===b?L.openParenToken=L.tokens.length:123===b&&(L.openCurlyToken=
L.tokens.length)),{type:R.Punctuator,value:String.fromCharCode(b),lineNumber:ea,lineStart:ia,start:a,end:A};default:if(c=Q.charCodeAt(A+1),61===c)switch(b){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return A+=2,{type:R.Punctuator,value:String.fromCharCode(b)+String.fromCharCode(c),lineNumber:ea,lineStart:ia,start:a,end:A};case 33:case 61:return A+=2,61===Q.charCodeAt(A)&&++A,{type:R.Punctuator,value:Q.slice(a,A),lineNumber:ea,lineStart:ia,start:a,end:A}}}b=Q.substr(A,
4);if("\x3e\x3e\x3e\x3d"===b)return A+=4,{type:R.Punctuator,value:b,lineNumber:ea,lineStart:ia,start:a,end:A};b=b.substr(0,3);if("\x3e\x3e\x3e"===b||"\x3c\x3c\x3d"===b||"\x3e\x3e\x3d"===b)return A+=3,{type:R.Punctuator,value:b,lineNumber:ea,lineStart:ia,start:a,end:A};b=b.substr(0,2);if(d===b[1]&&0<="+-\x3c\x3e\x26|".indexOf(d)||"\x3d\x3e"===b)return A+=2,{type:R.Punctuator,value:b,lineNumber:ea,lineStart:ia,start:a,end:A};if(0<="\x3c\x3e\x3d!+-*%\x26|^/".indexOf(d))return++A,{type:R.Punctuator,value:d,
lineNumber:ea,lineStart:ia,start:a,end:A};G()}function v(){var a,b,c;c=Q[A];h(l(c.charCodeAt(0))||"."===c,"Numeric literal must start with a decimal digit or a decimal point");b=A;a="";if("."!==c){a=Q[A++];c=Q[A];if("0"===a){if("x"===c||"X"===c){++A;for(a="";A<ma&&k(Q[A]);)a+=Q[A++];0===a.length&&G();m(Q.charCodeAt(A))&&G();return{type:R.NumericLiteral,value:parseInt("0x"+a,16),lineNumber:ea,lineStart:ia,start:b,end:A}}if("b"===c||"B"===c){++A;for(c="";A<ma;){a=Q[A];if("0"!==a&&"1"!==a)break;c+=Q[A++]}0===
c.length&&G();A<ma&&(a=Q.charCodeAt(A),(m(a)||l(a))&&G());return{type:R.NumericLiteral,value:parseInt(c,2),lineNumber:ea,lineStart:ia,start:b,end:A}}if("o"===c||"O"===c||f(c)){f(c)?(c=!0,a="0"+Q[A++]):(c=!1,++A,a="");for(;A<ma&&f(Q[A]);)a+=Q[A++];c||0!==a.length||G();(m(Q.charCodeAt(A))||l(Q.charCodeAt(A)))&&G();return{type:R.NumericLiteral,value:parseInt(a,8),octal:c,lineNumber:ea,lineStart:ia,start:b,end:A}}c&&l(c.charCodeAt(0))&&G()}for(;l(Q.charCodeAt(A));)a+=Q[A++];c=Q[A]}if("."===c){for(a+=
Q[A++];l(Q.charCodeAt(A));)a+=Q[A++];c=Q[A]}if("e"===c||"E"===c){a+=Q[A++];c=Q[A];if("+"===c||"-"===c)a+=Q[A++];if(l(Q.charCodeAt(A)))for(;l(Q.charCodeAt(A));)a+=Q[A++];else G()}m(Q.charCodeAt(A))&&G();return{type:R.NumericLiteral,value:parseFloat(a),lineNumber:ea,lineStart:ia,start:b,end:A}}function y(){Y=null;r();P("Regular Expression language structures not supported")}function p(){r();y()}function e(){var a;a=L.tokens[L.tokens.length-1];if(!a)return p();if("Punctuator"===a.type){if("]"===a.value)return x();
if(")"===a.value)return a=L.tokens[L.openParenToken-1],!a||"Keyword"!==a.type||"if"!==a.value.toLowerCase()&&"while"!==a.value.toLowerCase()&&"for"!==a.value.toLowerCase()&&"with"!==a.value.toLowerCase()?x():p();if("}"===a.value){if(L.tokens[L.openCurlyToken-3]&&"Keyword"===L.tokens[L.openCurlyToken-3].type){if(a=L.tokens[L.openCurlyToken-4],!a)return x()}else if(L.tokens[L.openCurlyToken-4]&&"Keyword"===L.tokens[L.openCurlyToken-4].type){if(a=L.tokens[L.openCurlyToken-5],!a)return p()}else return x();
if(0<=Va.indexOf(a.value))return x()}return p()}return"Keyword"===a.type&&"this"!==a.value?p():x()}function q(){var a;r();if(A>=ma)return{type:R.EOF,lineNumber:ea,lineStart:ia,start:A,end:A};a=Q.charCodeAt(A);if(m(a)){var b;a=A;if(92===Q.charCodeAt(A))b=t();else a:{var c;for(b=A++;A<ma;){c=Q.charCodeAt(A);if(92===c){A=b;b=t();break a}if(g(c))++A;else break}b=Q.slice(b,A)}return{type:1===b.length?R.Identifier:d(b)?R.Keyword:"null"===b.toLowerCase()?R.NullLiteral:"true"===b.toLowerCase()||"false"===
b.toLowerCase()?R.BooleanLiteral:R.Identifier,value:b,lineNumber:ea,lineStart:ia,start:a,end:A}}if(40===a||41===a||59===a)return x();if(39===a||34===a){var p="",q,u,y;c=!1;var B,z;B=ea;z=ia;a=Q[A];h("'"===a||'"'===a,"String literal must starts with a quote");b=A;for(++A;A<ma;)if(q=Q[A++],q===a){a="";break}else if("\\"===q)if((q=Q[A++])&&n(q.charCodeAt(0)))++ea,"\r"===q&&"\n"===Q[A]&&++A,ia=A;else switch(q){case "u":case "x":if("{"===Q[A]){++A;u=q=void 0;q=Q[A];u=0;for("}"===q&&G();A<ma;){q=Q[A++];
if(!k(q))break;u=16*u+"0123456789abcdef".indexOf(q.toLowerCase())}(1114111<u||"}"!==q)&&G();q=65535>=u?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320);p+=q}else y=A,(u=w(q))?p+=u:(A=y,p+=q);break;case "n":p+="\n";break;case "r":p+="\r";break;case "t":p+="\t";break;case "b":p+="\b";break;case "f":p+="\f";break;case "v":p+="\x0B";break;default:f(q)?(u="01234567".indexOf(q),0!==u&&(c=!0),A<ma&&f(Q[A])&&(c=!0,u=8*u+"01234567".indexOf(Q[A++]),0<="0123".indexOf(q)&&
A<ma&&f(Q[A])&&(u=8*u+"01234567".indexOf(Q[A++]))),p+=String.fromCharCode(u)):p+=q}else if(n(q.charCodeAt(0)))break;else p+=q;""!==a&&G();return{type:R.StringLiteral,value:p,octal:c,startLineNumber:B,startLineStart:z,lineNumber:ea,lineStart:ia,start:b,end:A}}return 46===a?l(Q.charCodeAt(A+1))?v():x():l(a)?v():L.tokenize&&47===a?e():x()}function u(){var a,b,c;r();a={start:{line:ea,column:A-ia}};b=q();a.end={line:ea,column:A-ia};b.type!==R.EOF&&(c=Q.slice(b.start,b.end),a={type:za[b.type],value:c,range:[b.start,
b.end],loc:a},b.regex&&(a.regex={pattern:b.regex.pattern,flags:b.regex.flags}),L.tokens.push(a));return b}function z(){var a;a=Y;A=a.end;ea=a.lineNumber;ia=a.lineStart;Y="undefined"!==typeof L.tokens?u():q();A=a.end;ea=a.lineNumber;ia=a.lineStart;return a}function C(){var a,b,c;a=A;b=ea;c=ia;Y="undefined"!==typeof L.tokens?u():q();A=a;ea=b;ia=c}function B(){this.line=ea;this.column=A-ia}function F(){this.start=new B;this.end=null}function D(a){this.start=a.type===R.StringLiteral?{line:a.startLineNumber,
column:a.start-a.startLineStart}:{line:a.lineNumber,column:a.start-a.lineStart};this.end=null}function E(){A=Y.start;Y.type===R.StringLiteral?(ea=Y.startLineNumber,ia=Y.startLineStart):(ea=Y.lineNumber,ia=Y.lineStart);L.range&&(this.range=[A,0]);L.loc&&(this.loc=new F)}function I(a){L.range&&(this.range=[a.start,0]);L.loc&&(this.loc=new D(a))}function J(){var a,b,c,d;a=A;b=ea;c=ia;r();d=ea!==b;A=a;ea=b;ia=c;return d}function U(a,b,c){var d=Error("Line "+a+": "+c);d.index=b;d.lineNumber=a;d.column=
b-ia+1;d.description=c;return d}function P(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){h(c<b.length,"Message reference must be in range");return b[c]});throw U(ea,A,c);}function H(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){h(c<b.length,"Message reference must be in range");return b[c]});c=U(ea,A,c);if(L.errors)L.errors.push(c);else throw c;}function K(a,b){var c=aa.UnexpectedToken;a&&(c=b?b:a.type===R.EOF?aa.UnexpectedEOS:
a.type===R.Identifier?aa.UnexpectedIdentifier:a.type===R.NumericLiteral?aa.UnexpectedNumber:a.type===R.StringLiteral?aa.UnexpectedString:aa.UnexpectedToken);c=c.replace("%0",a?a.value:"ILLEGAL");return a&&"number"===typeof a.lineNumber?U(a.lineNumber,a.start,c):U(ea,A,c)}function G(a,b){throw K(a,b);}function S(a,b){a=K(a,b);if(L.errors)L.errors.push(a);else throw a;}function O(a){var b=z();b.type===R.Punctuator&&b.value===a||G(b)}function da(){var a;L.errors?(a=Y,a.type===R.Punctuator&&","===a.value?
z():a.type===R.Punctuator&&";"===a.value?(z(),S(a)):S(a,aa.UnexpectedToken)):O(",")}function N(a){var b=z();b.type===R.Keyword&&b.value.toLowerCase()===a.toLowerCase()||G(b)}function M(a){return Y.type===R.Punctuator&&Y.value===a}function ca(a){return Y.type===R.Keyword&&Y.value.toLowerCase()===a.toLowerCase()}function W(){var a;59===Q.charCodeAt(A)||M(";")?z():(a=ea,r(),ea===a&&(Y.type===R.EOF||M("}")||G(Y)))}function X(a){return a.type===Z.Identifier||a.type===Z.MemberExpression}function ga(a,b){var c,
d=new E;b=la;c=Da();la=b;return d.finishFunctionExpression(null,a,[],c)}function fa(){var a,b;a=la;la=!0;b=Pa();b=ga(b.params);la=a;return b}function T(){var a,b=new E;a=z();return a.type===R.StringLiteral||a.type===R.NumericLiteral?(la&&a.octal&&S(a,aa.StrictOctalLiteral),b.finishLiteral(a)):b.finishIdentifier(a.value)}function ka(){var a,b,c,d=new E;a=Y;if(a.type===R.Identifier)return b=T(),"get"!==a.value||M(":")||M("(")?"set"!==a.value||M(":")||M("(")?M(":")?(z(),a=ua(),d.finishProperty("init",
b,a,!1,!1)):M("(")?(a=fa(),d.finishProperty("init",b,a,!0,!1)):d.finishProperty("init",b,b,!1,!0):(b=T(),O("("),a=Y,a.type!==R.Identifier?(O(")"),S(a),a=ga([])):(c=[Fa()],O(")"),a=ga(c,a)),d.finishProperty("set",b,a,!1,!1)):(b=T(),O("("),O(")"),a=ga([]),d.finishProperty("get",b,a,!1,!1));if(a.type===R.EOF||a.type===R.Punctuator)G(a);else{b=T();if(M(":"))return z(),a=ua(),d.finishProperty("init",b,a,!1,!1);if(M("("))return a=fa(),d.finishProperty("init",b,a,!0,!1);G(z())}}function ja(a){var b=[],c,
d,e={},f=String,g=new E;for(!0!==a&&O("{");!M("}");)a=ka(),c=a.key.type===Z.Identifier?a.key.name:f(a.key.value),d="init"===a.kind?Ja.Data:"get"===a.kind?Ja.Get:Ja.Set,c="$"+c,Object.prototype.hasOwnProperty.call(e,c)?(e[c]===Ja.Data?la&&d===Ja.Data?H(aa.StrictDuplicateProperty):d!==Ja.Data&&H(aa.AccessorDataProperty):d===Ja.Data?H(aa.AccessorDataProperty):e[c]&d&&H(aa.AccessorGetSet),e[c]|=d):e[c]=d,b.push(a),M("}")||da();O("}");return g.finishObjectExpression(b)}function ha(){var a,b,c,d;if(M("("))return O("("),
M(")")?(z(),b=La.ArrowParameterPlaceHolder):(++ba.parenthesisCount,b=ya(),O(")")),b;if(M("[")){b=[];var e=new E;for(O("[");!M("]");)M(",")?(z(),b.push(null)):(b.push(ua()),M("]")||O(","));z();return e.finishArrayExpression(b)}if(M("{"))return ja();a=Y.type;d=new E;if(a===R.Identifier)c=d.finishIdentifier(z().value);else if(a===R.StringLiteral||a===R.NumericLiteral)la&&Y.octal&&S(Y,aa.StrictOctalLiteral),c=d.finishLiteral(z());else if(a===R.Keyword){if(ca("function")){d=null;var f;c=[];var g=[],h,
k=new E;N("function");M("(")||(d=Fa());f=Pa(b);c=f.params;g=f.defaults;a=f.stricted;b=f.firstRestricted;f.message&&(e=f.message);h=la;f=Da();la&&b&&G(b,e);la&&a&&S(a,e);la=h;return k.finishFunctionExpression(d,c,g,f)}ca("this")?(z(),c=d.finishThisExpression()):G(z())}else a===R.BooleanLiteral?(b=z(),b.value="true"===b.value.toLowerCase(),c=d.finishLiteral(b)):a===R.NullLiteral?(b=z(),b.value=null,c=d.finishLiteral(b)):M("/")||M("/\x3d")?(c="undefined"!==typeof L.tokens?d.finishLiteral(p()):d.finishLiteral(y()),
C()):G(z());return c}function sa(){var a=[];O("(");if(!M(")"))for(;A<ma;){a.push(ua());if(M(")"))break;da()}O(")");return a}function wa(){O(".");var a,b=new E;a=z();a.type===R.Identifier||a.type===R.Keyword||a.type===R.BooleanLiteral||a.type===R.NullLiteral||G(a);return b.finishIdentifier(a.value)}function pa(){var a;O("[");a=ya();O("]");return a}function ta(){var a,b,c=new E;N("new");var d;h(ba.allowIn,"callee of new expression always allow in keyword.");d=Y;for(a=ca("new")?ta():ha();;)if(M("["))b=
pa(),a=(new I(d)).finishMemberExpression("[",a,b);else if(M("."))b=wa(),a=(new I(d)).finishMemberExpression(".",a,b);else break;b=M("(")?sa():[];return c.finishNewExpression(a,b)}function Ba(){var a,b,c=Y,d,e=ba.allowIn;b=Y;ba.allowIn=!0;for(a=ca("new")?ta():ha();;)if(M("."))d=wa(),a=(new I(b)).finishMemberExpression(".",a,d);else if(M("("))d=sa(),a=(new I(b)).finishCallExpression(a,d);else if(M("["))d=pa(),a=(new I(b)).finishMemberExpression("[",a,d);else break;ba.allowIn=e;Y.type!==R.Punctuator||
!M("++")&&!M("--")||J()||(X(a)||H(aa.InvalidLHSInAssignment),b=z(),a=(new I(c)).finishPostfixExpression(b.value,a));return a}function oa(){var a,b,c;Y.type!==R.Punctuator&&Y.type!==R.Keyword?b=Ba():M("++")||M("--")?(c=Y,a=z(),b=oa(),X(b)||H(aa.InvalidLHSInAssignment),b=(new I(c)).finishUnaryExpression(a.value,b)):M("+")||M("-")||M("~")||M("!")?(c=Y,a=z(),b=oa(),b=(new I(c)).finishUnaryExpression(a.value,b)):ca("delete")||ca("void")||ca("typeof")?(c=Y,a=z(),b=oa(),b=(new I(c)).finishUnaryExpression(a.value,
b),la&&"delete"===b.operator&&b.argument.type===Z.Identifier&&H(aa.StrictDelete)):b=Ba();return b}function hb(a,b){var c=0;if(a.type!==R.Punctuator&&a.type!==R.Keyword)return 0;switch(a.value){case "||":c=1;break;case "\x26\x26":c=2;break;case "|":c=3;break;case "^":c=4;break;case "\x26":c=5;break;case "\x3d\x3d":case "!\x3d":case "\x3d\x3d\x3d":case "!\x3d\x3d":c=6;break;case "\x3c":case "\x3e":case "\x3c\x3d":case "\x3e\x3d":case "instanceof":c=7;break;case "in":c=b?7:0;break;case "\x3c\x3c":case "\x3e\x3e":case "\x3e\x3e\x3e":c=
8;break;case "+":case "-":c=9;break;case "*":case "/":case "%":c=11}return c}function Qa(){var a,b,c,d,e,f;a=Y;b=oa();if(b===La.ArrowParameterPlaceHolder)return b;c=Y;d=hb(c,ba.allowIn);if(0===d)return b;c.prec=d;z();a=[a,Y];f=oa();for(e=[b,c,f];0<(d=hb(Y,ba.allowIn));){for(;2<e.length&&d<=e[e.length-2].prec;)f=e.pop(),c=e.pop().value,b=e.pop(),a.pop(),b=(new I(a[a.length-1])).finishBinaryExpression(c,b,f),e.push(b);c=z();c.prec=d;e.push(c);a.push(Y);b=oa();e.push(b)}d=e.length-1;b=e[d];for(a.pop();1<
d;)b=(new I(a.pop())).finishBinaryExpression(e[d-1].value,e[d-2],b),d-=2;return b}function Ha(a){var b,c,d,e,f,g,h;e=[];f=[];g=0;h={paramSet:{}};b=0;for(c=a.length;b<c;b+=1)if(d=a[b],d.type===Z.Identifier)e.push(d),f.push(null),Ea(h,d,d.name);else if(d.type===Z.AssignmentExpression)e.push(d.left),f.push(d.right),++g,Ea(h,d.left,d.left.name);else return null;h.message===aa.StrictParamDupe&&(a=la?h.stricted:h.firstRestricted,G(a,h.message));0===g&&(f=[]);return{params:e,defaults:f,rest:null,stricted:h.stricted,
firstRestricted:h.firstRestricted,message:h.message}}function ua(){var a,b,c,d,e;a=ba.parenthesisCount;b=e=Y;var f,g;g=Y;c=Qa();c!==La.ArrowParameterPlaceHolder&&M("?")&&(z(),f=ba.allowIn,ba.allowIn=!0,b=ua(),ba.allowIn=f,O(":"),f=ua(),c=(new I(g)).finishConditionalExpression(c,b,f));if(c===La.ArrowParameterPlaceHolder||M("\x3d\x3e"))if(ba.parenthesisCount===a||ba.parenthesisCount===a+1)if(c.type===Z.Identifier?d=Ha([c]):c.type===Z.AssignmentExpression?d=Ha([c]):c.type===Z.SequenceExpression?d=Ha(c.expressions):
c===La.ArrowParameterPlaceHolder&&(d=Ha([])),d)return a=d,e=new I(e),O("\x3d\x3e"),d=la,c=M("{")?Da():ua(),la&&a.firstRestricted&&G(a.firstRestricted,a.message),la&&a.stricted&&S(a.stricted,a.message),la=d,e.finishArrowFunctionExpression(a.params,a.defaults,c,c.type!==Z.BlockStatement);Y.type!==R.Punctuator?a=!1:(a=Y.value,a="\x3d"===a||"*\x3d"===a||"/\x3d"===a||"%\x3d"===a||"+\x3d"===a||"-\x3d"===a||"\x3c\x3c\x3d"===a||"\x3e\x3e\x3d"===a||"\x3e\x3e\x3e\x3d"===a||"\x26\x3d"===a||"^\x3d"===a||"|\x3d"===
a);a&&(X(c)||H(aa.InvalidLHSInAssignment),b=z(),a=ua(),c=(new I(e)).finishAssignmentExpression(b.value,c,a));return c}function ya(){var a,b=Y;a=ua();if(M(",")){for(a=[a];A<ma&&M(",");)z(),a.push(ua());a=(new I(b)).finishSequenceExpression(a)}return a}function Fa(){var a,b=new E;a=z();a.type!==R.Identifier&&G(a);return b.finishIdentifier(a.value)}function ib(a){var b=null,c,d=new E;c=Fa();"const"===a?(O("\x3d"),b=ua()):M("\x3d")&&(z(),b=ua());return d.finishVariableDeclarator(c,b)}function Ga(a){var b=
[];do{b.push(ib(a));if(!M(","))break;z()}while(A<ma);return b}function Ia(a){var b=Y.type,c,d;b===R.EOF&&G(Y);if(b===R.Punctuator&&"{"===Y.value){if(a){O("{");var e=Y;a=A;c=ea;d=ia;z();b=M(":");Y=e;A=a;ea=c;ia=d;if((Y.type===R.Identifier||Y.type===R.StringLiteral)&&b)return ja(!0);a=new E;for(c=[];A<ma&&!M("}");){d=Ra();if("undefined"===typeof d)break;c.push(d)}O("}");return a.finishBlockStatement(c)}return ja()}a=new E;if(b===R.Punctuator)switch(Y.value){case ";":return a=new E,O(";"),a.finishEmptyStatement();
case "(":return c=ya(),W(),a.finishExpressionStatement(c)}else if(b===R.Keyword)switch(Y.value.toLowerCase()){case "break":return c=null,N("break"),59===Q.charCodeAt(A)?(z(),ba.inIteration||ba.inSwitch||P(aa.IllegalBreak),a=a.finishBreakStatement(null)):J()?(ba.inIteration||ba.inSwitch||P(aa.IllegalBreak),a=a.finishBreakStatement(null)):(Y.type===R.Identifier&&(c=Fa(),d="$"+c.name,Object.prototype.hasOwnProperty.call(ba.labelSet,d)||P(aa.UnknownLabel,c.name)),W(),null!==c||ba.inIteration||ba.inSwitch||
P(aa.IllegalBreak),a=a.finishBreakStatement(c)),a;case "continue":return c=null,N("continue"),59===Q.charCodeAt(A)?(z(),ba.inIteration||P(aa.IllegalContinue),a=a.finishContinueStatement(null)):J()?(ba.inIteration||P(aa.IllegalContinue),a=a.finishContinueStatement(null)):(Y.type===R.Identifier&&(c=Fa(),d="$"+c.name,Object.prototype.hasOwnProperty.call(ba.labelSet,d)||P(aa.UnknownLabel,c.name)),W(),null!==c||ba.inIteration||P(aa.IllegalContinue),a=a.finishContinueStatement(c)),a;case "for":var f,g,
h;g=ba.allowIn;f=b=e=null;N("for");O("(");if(M(";"))z();else{if(ca("var")){ba.allowIn=!1;var k=new E;f=z();h=Ga();f=k.finishVariableDeclaration(h,f.value);ba.allowIn=g;1===f.declarations.length&&ca("in")&&(z(),c=f,d=ya(),f=null)}else ba.allowIn=!1,f=ya(),ba.allowIn=g,ca("in")&&(X(f)||H(aa.InvalidLHSInForIn),z(),c=f,d=ya(),f=null);"undefined"===typeof c&&O(";")}"undefined"===typeof c&&(M(";")||(b=ya()),O(";"),M(")")||(e=ya()));O(")");h=ba.inIteration;ba.inIteration=!0;g=Ia(!0);ba.inIteration=h;return"undefined"===
typeof c?a.finishForStatement(f,b,e,g):a.finishForInStatement(c,d,g);case "function":return $a(a);case "if":return N("if"),O("("),c=ya(),O(")"),d=Ia(!0),ca("else")?(z(),b=Ia(!0)):b=null,a.finishIfStatement(c,d,b);case "return":return c=null,N("return"),ba.inFunctionBody||H(aa.IllegalReturn),32===Q.charCodeAt(A)&&m(Q.charCodeAt(A+1))?(c=ya(),W(),a=a.finishReturnStatement(c)):J()?a=a.finishReturnStatement(null):(M(";")||M("}")||Y.type===R.EOF||(c=ya()),W(),a=a.finishReturnStatement(c)),a;case "var":return N("var"),
c=Ga(),W(),a.finishVariableDeclaration(c,"var")}c=ya();if(c.type===Z.Identifier&&M(":"))return z(),b="$"+c.name,Object.prototype.hasOwnProperty.call(ba.labelSet,b)&&P(aa.Redeclaration,"Label",c.name),ba.labelSet[b]=!0,d=Ia(!1),delete ba.labelSet[b],a.finishLabeledStatement(c,d);W();return a.finishExpressionStatement(c)}function Da(){var a,b=[],c,d,e,f,g,h=new E;for(O("{");A<ma&&Y.type===R.StringLiteral;){c=Y;a=Ra();b.push(a);if(a.expression.type!==Z.Literal)break;a=Q.slice(c.start+1,c.end-1);"use strict"===
a?(la=!0,d&&S(d,aa.StrictOctalLiteral)):!d&&c.octal&&(d=c)}c=ba.labelSet;d=ba.inIteration;e=ba.inSwitch;f=ba.inFunctionBody;g=ba.parenthesizedCount;ba.labelSet={};ba.inIteration=!1;ba.inSwitch=!1;ba.inFunctionBody=!0;for(ba.parenthesizedCount=0;A<ma&&!M("}");){a=Ra();if("undefined"===typeof a)break;b.push(a)}O("}");ba.labelSet=c;ba.inIteration=d;ba.inSwitch=e;ba.inFunctionBody=f;ba.parenthesizedCount=g;return h.finishBlockStatement(b)}function Ea(a,b,c){c="$"+c;la?Object.prototype.hasOwnProperty.call(a.paramSet,
c)&&(a.stricted=b,a.message=aa.StrictParamDupe):!a.firstRestricted&&Object.prototype.hasOwnProperty.call(a.paramSet,c)&&(a.firstRestricted=b,a.message=aa.StrictParamDupe);a.paramSet[c]=!0}function Pa(a){a={params:[],defaultCount:0,defaults:[],firstRestricted:a};O("(");if(!M(")"))for(a.paramSet={};A<ma;){var b=a,c=void 0,d=void 0,e=void 0,c=Y,d=Fa();Ea(b,c,c.value);M("\x3d")&&(z(),e=ua(),++b.defaultCount);b.params.push(d);b.defaults.push(e);if(M(")"))break;O(",")}O(")");0===a.defaultCount&&(a.defaults=
[]);return{params:a.params,defaults:a.defaults,stricted:a.stricted,firstRestricted:a.firstRestricted,message:a.message}}function $a(){var a,b=[],c=[],d,e,f,g,h,k=new E;N("function");a=Fa();d=Pa(f);b=d.params;c=d.defaults;e=d.stricted;f=d.firstRestricted;d.message&&(g=d.message);h=la;d=Da();la&&f&&G(f,g);la&&e&&S(e,g);la=h;return k.finishFunctionDeclaration(a,b,c,d)}function Ra(){if(Y.type===R.Keyword)return"function"===Y.value.toLowerCase()?$a():Ia(!1);if(Y.type!==R.EOF)return Ia(!1)}function Ma(){var a,
b,c,d=[];for(a=0;a<L.tokens.length;++a)b=L.tokens[a],c={type:b.type,value:b.value},b.regex&&(c.regex={pattern:b.regex.pattern,flags:b.regex.flags}),L.range&&(c.range=b.range),L.loc&&(c.loc=b.loc),d.push(c);L.tokens=d}var R,za,Va,Z,La,Ja,aa,bb,Q,la,A,ea,ia,ma,Y,ba,L;R={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};za={};za[R.BooleanLiteral]="Boolean";za[R.EOF]="\x3cend\x3e";za[R.Identifier]="Identifier";za[R.Keyword]=
"Keyword";za[R.NullLiteral]="Null";za[R.NumericLiteral]="Numeric";za[R.Punctuator]="Punctuator";za[R.StringLiteral]="String";za[R.RegularExpression]="RegularExpression";Va="( { [ in typeof instanceof new return case delete throw void \x3d +\x3d -\x3d *\x3d /\x3d %\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d |\x3d ^\x3d , + - * / % ++ -- \x3c\x3c \x3e\x3e \x3e\x3e\x3e \x26 | ^ ! ~ \x26\x26 || ? : \x3d\x3d\x3d \x3d\x3d \x3e\x3d \x3c\x3d \x3c \x3e !\x3d !\x3d\x3d".split(" ");Z={AssignmentExpression:"AssignmentExpression",
ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",
Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator"};La={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}};Ja={Data:1,Get:2,Set:4};aa={UnexpectedToken:"Unexpected token %0",
UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",
NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",
StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",
StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};bb={NonAsciiIdentifierStart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/,
NonAsciiIdentifierPart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0-\u08b2\u08e4-\u0963\u0966-\u096f\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1ab0-\u1abd\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1cf8\u1cf9\u1d00-\u1df5\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua69d\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\ua9e0-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/};
I.prototype=E.prototype={processComment:function(){var a,b,c,d=L.bottomRightStack,e,f,g=d[d.length-1];if(!(this.type===Z.Program&&0<this.body.length)){if(0<L.trailingComments.length){c=[];for(e=L.trailingComments.length-1;0<=e;--e)f=L.trailingComments[e],f.range[0]>=this.range[1]&&(c.unshift(f),L.trailingComments.splice(e,1));L.trailingComments=[]}else g&&g.trailingComments&&g.trailingComments[0].range[0]>=this.range[1]&&(c=g.trailingComments,delete g.trailingComments);if(g)for(;g&&g.range[0]>=this.range[0];)a=
g,g=d.pop();if(a)a.leadingComments&&a.leadingComments[a.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=a.leadingComments,a.leadingComments=void 0);else if(0<L.leadingComments.length)for(b=[],e=L.leadingComments.length-1;0<=e;--e)f=L.leadingComments[e],f.range[1]<=this.range[0]&&(b.unshift(f),L.leadingComments.splice(e,1));b&&0<b.length&&(this.leadingComments=b);c&&0<c.length&&(this.trailingComments=c);d.push(this)}},finish:function(){L.range&&(this.range[1]=A);L.loc&&(this.loc.end=
new B,L.source&&(this.loc.source=L.source));L.attachComment&&this.processComment()},finishArrayExpression:function(a){this.type=Z.ArrayExpression;this.elements=a;this.finish();return this},finishAssignmentExpression:function(a,b,c){this.type=Z.AssignmentExpression;this.operator=a;this.left=b;this.right=c;this.finish();return this},finishBinaryExpression:function(a,b,c){this.type="||"===a||"\x26\x26"===a?Z.LogicalExpression:Z.BinaryExpression;this.operator=a;this.left=b;this.right=c;this.finish();
return this},finishBlockStatement:function(a){this.type=Z.BlockStatement;this.body=a;this.finish();return this},finishBreakStatement:function(a){this.type=Z.BreakStatement;this.label=a;this.finish();return this},finishCallExpression:function(a,b){this.type=Z.CallExpression;this.callee=a;this.arguments=b;this.finish();return this},finishConditionalExpression:function(a,b,c){this.type=Z.ConditionalExpression;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishContinueStatement:function(a){this.type=
Z.ContinueStatement;this.label=a;this.finish();return this},finishEmptyStatement:function(){this.type=Z.EmptyStatement;this.finish();return this},finishExpressionStatement:function(a){this.type=Z.ExpressionStatement;this.expression=a;this.finish();return this},finishForStatement:function(a,b,c,d){this.type=Z.ForStatement;this.init=a;this.test=b;this.update=c;this.body=d;this.finish();return this},finishForInStatement:function(a,b,c){this.type=Z.ForInStatement;this.left=a;this.right=b;this.body=c;
this.each=!1;this.finish();return this},finishFunctionDeclaration:function(a,b,c,d){this.type=Z.FunctionDeclaration;this.id=a;this.params=b;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishFunctionExpression:function(a,b,c,d){this.type=Z.FunctionExpression;this.id=a;this.params=b;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishIdentifier:function(a){this.type=Z.Identifier;this.name=
a;this.finish();return this},finishIfStatement:function(a,b,c){this.type=Z.IfStatement;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishLiteral:function(a){this.type=Z.Literal;this.value=a.value;this.raw=Q.slice(a.start,a.end);a.regex&&(this.regex=a.regex);this.finish();return this},finishMemberExpression:function(a,b,c){this.type=Z.MemberExpression;this.computed="["===a;this.object=b;this.property=c;this.finish();return this},finishObjectExpression:function(a){this.type=
Z.ObjectExpression;this.properties=a;this.finish();return this},finishPostfixExpression:function(a,b){this.type=Z.UpdateExpression;this.operator=a;this.argument=b;this.prefix=!1;this.finish();return this},finishProgram:function(a){this.type=Z.Program;this.body=a;this.finish();return this},finishProperty:function(a,b,c,d,e){this.type=Z.Property;this.key=b;this.value=c;this.kind=a;this.method=d;this.shorthand=e;this.finish();return this},finishReturnStatement:function(a){this.type=Z.ReturnStatement;
this.argument=a;this.finish();return this},finishUnaryExpression:function(a,b){this.type="++"===a||"--"===a?Z.UpdateExpression:Z.UnaryExpression;this.operator=a;this.argument=b;this.prefix=!0;this.finish();return this},finishVariableDeclaration:function(a,b){this.type=Z.VariableDeclaration;this.declarations=a;this.kind=b;this.finish();return this},finishVariableDeclarator:function(a,b){this.type=Z.VariableDeclarator;this.id=a;this.init=b;this.finish();return this}};b.version="2.0.0-dev";b.tokenize=
function(a,b){var c,d;c=String;"string"===typeof a||a instanceof String||(a=c(a));Q=a;A=0;ea=0<Q.length?1:0;ia=0;ma=Q.length;Y=null;ba={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1};L={};b=b||{};b.tokens=!0;L.tokens=[];L.tokenize=!0;L.openParenToken=-1;L.openCurlyToken=-1;L.range="boolean"===typeof b.range&&b.range;L.loc="boolean"===typeof b.loc&&b.loc;"boolean"===typeof b.comment&&b.comment&&(L.comments=[]);"boolean"===typeof b.tolerant&&b.tolerant&&(L.errors=
[]);try{C();if(Y.type===R.EOF)return L.tokens;for(z();Y.type!==R.EOF;)try{z()}catch(Ua){if(L.errors){L.errors.push(Ua);break}else throw Ua;}Ma();d=L.tokens;"undefined"!==typeof L.comments&&(d.comments=L.comments);"undefined"!==typeof L.errors&&(d.errors=L.errors)}catch(Ua){throw Ua;}finally{L={}}return d};b.parse=function(a,b){var c,d;d=String;"string"===typeof a||a instanceof String||(a=d(a));Q=a;A=0;ea=0<Q.length?1:0;ia=0;ma=Q.length;Y=null;ba={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,
inIteration:!1,inSwitch:!1,lastCommentStart:-1};L={};"undefined"!==typeof b&&(L.range="boolean"===typeof b.range&&b.range,L.loc="boolean"===typeof b.loc&&b.loc,L.attachComment="boolean"===typeof b.attachComment&&b.attachComment,L.loc&&null!==b.source&&void 0!==b.source&&(L.source=d(b.source)),"boolean"===typeof b.tokens&&b.tokens&&(L.tokens=[]),"boolean"===typeof b.comment&&b.comment&&(L.comments=[]),"boolean"===typeof b.tolerant&&b.tolerant&&(L.errors=[]),L.attachComment&&(L.range=!0,L.comments=
[],L.bottomRightStack=[],L.trailingComments=[],L.leadingComments=[]));try{var e;r();C();e=new E;la=!1;var f;a=[];for(var g,h,k;A<ma;){g=Y;if(g.type!==R.StringLiteral)break;f=Ra();a.push(f);if(f.expression.type!==Z.Literal)break;h=Q.slice(g.start+1,g.end-1);"use strict"===h?(la=!0,k&&S(k,aa.StrictOctalLiteral)):!k&&g.octal&&(k=g)}for(;A<ma;){f=Ra();if("undefined"===typeof f)break;a.push(f)}c=e.finishProgram(a);"undefined"!==typeof L.comments&&(c.comments=L.comments);"undefined"!==typeof L.tokens&&
(Ma(),c.tokens=L.tokens);"undefined"!==typeof L.errors&&(c.errors=L.errors)}catch(kb){throw kb;}finally{L={}}return c};b.Syntax=function(){var a,b={};"function"===typeof Object.create&&(b=Object.create(null));for(a in Z)Z.hasOwnProperty(a)&&(b[a]=Z[a]);"function"===typeof Object.freeze&&Object.freeze(b);return b}()})},"esri/arcade/arcadeCompiler":function(){define("require exports ../geometry/Polygon ../Graphic ../geometry/Polyline ../geometry/Point ../geometry/Extent ../geometry/Multipoint ../geometry/SpatialReference ./languageUtils ./treeAnalysis ./Dictionary ./Feature ./functions/date ./functions/string ./functions/maths ./functions/geometry ./functions/geomsync ./functions/stats ./ImmutablePathArray ./ImmutablePointArray ../geometry/Geometry".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e,q,u,z){function C(a,b,c){try{return c(a,null,b)}catch(ha){throw ha;}}function B(a,b){try{switch(b.type){case "EmptyStatement":return"lc.voidOperation";case "VariableDeclarator":return J(a,b);case "VariableDeclaration":for(var d=[],e=0;e<b.declarations.length;e++)d.push(B(a,b.declarations[e]));return d.join("\n")+" \n lastStatement\x3d  lc.voidOperation; \n";case "BlockStatement":return I(a,b);case "FunctionDeclaration":var e=b.id.name.toLowerCase(),f=
{applicationCache:void 0===a.applicationCache?null:a.applicationCache,spatialReference:a.spatialReference,console:a.console,symbols:a.symbols,localScope:{_SymbolsMap:{}},depthCounter:a.depthCounter+1,globalScope:a.globalScope};if(64<f.depthCounter)throw Error("Exceeded maximum function depth");for(var g="new lc.SizzleFunction( lang.functionDepthchecker(function() { var lastStatement \x3d lc.voidOperation; var lscope \x3d [];\n ",h=0;h<b.params.length;h++){var k=b.params[h].name.toLowerCase(),l=O(k,
a);f.localScope._SymbolsMap[k]=l;g+="lscope['"+l+"']\x3darguments["+h.toString()+"];\n"}g+=I(f,b.body)+"\n return lastStatement; }, runtimeCtx))";g+="\n lastStatement \x3d lc.voidOperation; \n";void 0!==a.globalScope[e]?d="gscope['"+e+"']\x3d"+g:void 0!==a.globalScope._SymbolsMap[e]?d="gscope['"+a.globalScope._SymbolsMap[e]+"']\x3d"+g:(l=O(e,a),a.globalScope._SymbolsMap[e]=l,d="gscope['"+l+"']\x3d"+g);return d;case "ReturnStatement":var p;p=null===b.argument?"return lc.voidOperation;":"return "+B(a,
b.argument)+";";return p;case "IfStatement":if("AssignmentExpression"===b.test.type||"UpdateExpression"===b.test.type)throw Error(c.nodeErrorMessage(b.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var m=B(a,b.test),q=da(a),n="var "+q+" \x3d "+m+";\n if ("+q+" \x3d\x3d\x3d true) {\n"+E(a,b.consequent)+"\n }\n",n=null!==b.alternate?n+("else if ("+q+"\x3d\x3d\x3dfalse)   { \n"+E(a,b.alternate)+"}\n"):n+("else if ("+q+"\x3d\x3d\x3dfalse) { \n lastStatement \x3d lc.voidOperation;\n }\n");return n+=
"else { lang.error({type: '"+b.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); \n}\n";case "ExpressionStatement":var t;t="AssignmentExpression"===b.expression.type?"lastStatement \x3d lc.voidOperation; "+B(a,b.expression)+" \n ":"lastStatement \x3d "+B(a,b.expression)+";";return t;case "AssignmentExpression":return D(a,b);case "UpdateExpression":return F(a,b);case "BreakStatement":return"break;";case "ContinueStatement":return"continue;";case "ForStatement":d="lastStatement \x3d lc.voidOperation; \n";
null!==b.init&&(d+=B(a,b.init));var u=da(a),v=da(a),d=d+("var "+u+" \x3d true;")+"\n do { ";null!==b.update&&(d+=" if ("+u+"\x3d\x3d\x3dfalse) {\n "+B(a,b.update)+"  \n}\n "+u+"\x3dfalse; \n");null!==b.test&&(d+="var "+v+" \x3d "+B(a,b.test)+";",d+="if ("+v+"\x3d\x3d\x3dfalse) { break; } else if ("+v+"!\x3d\x3dtrue) { lang.error({type: '"+b.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION');   }\n");d+=B(a,b.body);null!==b.update&&(d+="\n "+B(a,b.update));return d+("\n"+u+" \x3d true; \n} while(true);  lastStatement \x3d lc.voidOperation;");
case "ForInStatement":var r=da(a),y=da(a),x=da(a),z="var "+r+" \x3d "+B(a,b.right)+";\n";"VariableDeclaration"===b.left.type&&(z+=B(a,b.left));var w="VariableDeclaration"===b.left.type?b.left.declarations[0].id.name:b.left.name,w=w.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[w]?d="lscope['"+w+"']":void 0!==a.localScope._SymbolsMap[w]&&(d="lscope['"+a.localScope._SymbolsMap[w]+"']"));""===d&&(void 0!==a.globalScope[w]?d="gscope['"+w+"']":void 0!==a.globalScope._SymbolsMap[w]&&(d=
"gscope['"+a.globalScope._SymbolsMap[w]+"']"));z=z+("if ("+r+"\x3d\x3d\x3dnull) {  lastStatement \x3d lc.voidOperation; }\n ")+("else if (lc.isArray("+r+") || lc.isString("+r+")) {")+("var "+y+"\x3d"+r+".length; \n")+("for(var "+x+"\x3d0; "+x+"\x3c"+y+"; "+x+"++) {\n");z+=d+"\x3d"+x+";\n";z+=B(a,b.body);z+="\n}\n";z+=" lastStatement \x3d lc.voidOperation; \n";z+=" \n}\n";z+="else if (lc.isImmutableArray("+r+")) {";z=z+("var "+y+"\x3d"+r+".length(); \n")+("for(var "+x+"\x3d0; "+x+"\x3c"+y+"; "+x+"++) {\n");
z+=d+"\x3d"+x+";\n";z+=B(a,b.body);z+="\n}\n";z+=" lastStatement \x3d lc.voidOperation; \n";z+=" \n}\n";z+="else if (( "+r+" instanceof lang.Dictionary) || ( "+r+" instanceof lang.Feature)) {";z=z+("var "+y+"\x3d"+r+".keys(); \n")+("for(var "+x+"\x3d0; "+x+"\x3c"+y+".length; "+x+"++) {\n");z+=d+"\x3d"+y+"["+x+"];\n";z+=B(a,b.body);z+="\n}\n";z+=" lastStatement \x3d lc.voidOperation; \n";z+=" \n}\n";return z+"else { lastStatement \x3d lc.voidOperation; } \n";case "Identifier":return P(a,b);case "MemberExpression":var C;
try{d=void 0,d=!0===b.computed?B(a,b.property):"'"+b.property.name+"'",C="lang.member("+B(a,b.object)+","+d+")"}catch(Z){throw Z;}return C;case "Literal":return null===b.value||void 0===b.value?"null":JSON.stringify(b.value);case "ThisExpression":throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));case "CallExpression":try{if("Identifier"!==b.callee.type)throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYNODESSUPPORTED"));var T=b.callee.name.toLowerCase(),d="";null!==a.localScope&&(void 0!==
a.localScope[T]?d="lscope['"+T+"']":void 0!==a.localScope._SymbolsMap[T]&&(d="lscope['"+a.localScope._SymbolsMap[T]+"']"));""===d&&(void 0!==a.globalScope[T]?d="gscope['"+T+"']":void 0!==a.globalScope._SymbolsMap[T]&&(d="gscope['"+a.globalScope._SymbolsMap[T]+"']"));if(""!==d)for(e="[",f=0;f<b.arguments.length;f++)0<f&&(e+=", "),e+=B(a,b.arguments[f]);else throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTFOUND"));}catch(Z){throw Z;}return"lang.callfunc("+d+","+(e+"]")+",runtimeCtx)";case "UnaryExpression":var ka;
try{ka="lang.unary("+B(a,b.argument)+",'"+b.operator+"')"}catch(Z){throw Z;}return ka;case "BinaryExpression":var H;try{H="lang.binary("+B(a,b.left)+","+B(a,b.right)+",'"+b.operator+"')"}catch(Z){throw Z;}return H;case "LogicalExpression":var G;try{if("AssignmentExpression"===b.left.type||"UpdateExpression"===b.left.type)throw Error(c.nodeErrorMessage(b.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===b.right.type||"UpdateExpression"===b.right.type)throw Error(c.nodeErrorMessage(b.right,
"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("\x26\x26"===b.operator||"||"===b.operator)G="(lang.logicalCheck("+B(a,b.left)+") "+b.operator+" lang.logicalCheck("+B(a,b.right)+"))";else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}catch(Z){throw Z;}return G;case "ConditionalExpression":throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{d=[];for(e=0;e<b.elements.length;e++)"Literal"===b.elements[e].type?d.push(B(a,b.elements[e])):
d.push("lang.aCheck("+B(a,b.elements[e])+",'ArrayExpression')");g="["+d.join(",")+"]"}catch(Z){throw Z;}return g;case "ObjectExpression":d="lang.dictionary([";for(e=0;e<b.properties.length;e++){var h=b.properties[e],K="Identifier"===h.key.type?"'"+h.key.name+"'":B(a,h.key),U=B(a,h.value);0<e&&(d+=",");d+="lang.strCheck("+K+",'ObjectExpression'),lang.aCheck("+U+", 'ObjectExpression')"}return d+"])";case "Property":throw Error("Should not get here");case "Array":throw Error(c.nodeErrorMessage(b,"RUNTIME",
"NOTSUPPORTED"));default:throw Error(c.nodeErrorMessage(b,"RUNTIME","UNREOGNISED"));}}catch(Z){throw Z;}}function F(a,b){var c=null,d="";if("MemberExpression"===b.argument.type)return c=B(a,b.argument.object),d=!0===b.argument.computed?B(a,b.argument.property):"'"+b.argument.property.name+"'","lang.memberupdate("+c+","+d+",'"+b.operator+"',"+b.prefix+")";c=b.argument.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[c])return"lang.update(lscope, '"+c+"','"+b.operator+"',"+b.prefix+
")";if(void 0!==a.localScope._SymbolsMap[c])return"lang.update(lscope, '"+a.localScope._SymbolsMap[c]+"','"+b.operator+"',"+b.prefix+")"}if(void 0!==a.globalScope[c])return"lang.update(gscope, '"+c+"','"+b.operator+"',"+b.prefix+")";if(void 0!==a.globalScope._SymbolsMap[c])return"lang.update(gscope, '"+a.globalScope._SymbolsMap[c]+"','"+b.operator+"',"+b.prefix+")";throw Error("Variable not recognised");}function D(a,b){var c=B(a,b.right),d=null,e="";if("MemberExpression"===b.left.type)return d=B(a,
b.left.object),e=!0===b.left.computed?B(a,b.left.property):"'"+b.left.property.name+"'","lang.assignmember("+d+","+e+",'"+b.operator+"',"+c+");";d=b.left.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[d])return"lscope['"+d+"']\x3dlang.assign("+c+",'"+b.operator+"', lscope['"+d+"']); ";if(void 0!==a.localScope._SymbolsMap[d])return"lscope['"+a.localScope._SymbolsMap[d]+"']\x3dlang.assign("+c+",'"+b.operator+"', lscope['"+a.localScope._SymbolsMap[d]+"']); "}if(void 0!==a.globalScope[d])return"gscope['"+
d+"']\x3dlang.assign("+c+",'"+b.operator+"', gscope['"+d+"']); ";if(void 0!==a.globalScope._SymbolsMap[d])return"gscope['"+a.globalScope._SymbolsMap[d]+"']\x3dlang.assign("+c+",'"+b.operator+"', gscope['"+a.globalScope._SymbolsMap[d]+"']); ";throw Error("Variable not recognised");}function E(a,b){return"BlockStatement"===b.type?B(a,b):"ReturnStatement"===b.type?B(a,b):"BreakStatement"===b.type?B(a,b):"ContinueStatement"===b.type?B(a,b):"UpdateExpression"===b.type?"lastStatement \x3d "+B(a,b)+";":
"ExpressionStatement"===b.type?B(a,b):"ObjectExpression"===b.type?"lastStatement \x3d "+B(a,b)+";":B(a,b)}function I(a,b){for(var c="",d=0;d<b.body.length;d++)c="ReturnStatement"===b.body[d].type?c+(B(a,b.body[d])+" \n"):"BreakStatement"===b.body[d].type?c+(B(a,b.body[d])+" \n"):"ContinueStatement"===b.body[d].type?c+(B(a,b.body[d])+" \n"):"UpdateExpression"===b.body[d].type?c+("lastStatement \x3d "+B(a,b.body[d])+"; \n"):"ObjectExpression"===b.body[d].type?c+("lastStatement \x3d "+B(a,b.body[d])+
"; \n"):c+(B(a,b.body[d])+" \n");return c}function J(b,c){var d=null===c.init?null:B(b,c.init);d===a.voidOperation&&(d=null);c=c.id.name.toLowerCase();if(null!==b.localScope){if(void 0!==b.localScope[c])return"lscope['"+c+"']\x3d"+d+";";if(void 0!==b.localScope._SymbolsMap[c])return"lscope['"+b.localScope._SymbolsMap[c]+"']\x3d"+d+";";var e=O(c,b);b.localScope._SymbolsMap[c]=e;return"lscope['"+e+"']\x3d"+d+";"}if(void 0!==b.globalScope[c])return"gscope['"+c+"']\x3d"+d+";";if(void 0!==b.globalScope._SymbolsMap[c])return"gscope['"+
b.globalScope._SymbolsMap[c]+"']\x3d"+d+";";e=O(c,b);b.globalScope._SymbolsMap[c]=e;return"gscope['"+e+"']\x3d"+d+";"}function U(b,d,e){d=d.toLowerCase();switch(d){case "hasz":return b=b.hasZ,void 0===b?!1:b;case "hasm":return b=b.hasM,void 0===b?!1:b;case "spatialreference":return d=b.spatialReference._arcadeCacheId,void 0===d&&(e=!0,Object.freeze&&Object.isFrozen(b.spatialReference)&&(e=!1),e&&(ca++,d=b.spatialReference._arcadeCacheId=ca)),b=new r({wkt:b.spatialReference.wkt,wkid:b.spatialReference.wkid}),
void 0!==d&&(b._arcadeCacheId="SPREF"+d.toString()),b}switch(b.type){case "extent":switch(d){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return b=b[d],void 0!==b?b:null;case "type":return"Extent"}break;case "polygon":switch(d){case "rings":return d=a.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===d&&(ca++,d=ca,a.isVersion4?b.cache._arcadeCacheId=d:b.setCacheValue("_arcadeCacheId",d)),b=new q(b.rings,b.spatialReference,
!0===b.hasZ,!0===b.hasM,d);case "type":return"Polygon"}break;case "point":switch(d){case "x":case "y":case "z":case "m":return void 0!==b[d]?b[d]:null;case "type":return"Point"}break;case "polyline":switch(d){case "paths":return d=a.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===d&&(ca++,d=ca,a.isVersion4?b.cache._arcadeCacheId=d:b.setCacheValue("_arcadeCacheId",d)),b=new q(b.paths,b.spatialReference,!0===b.hasZ,!0===b.hasM,d);case "type":return"Polyline"}break;case "multipoint":switch(d){case "points":return d=
a.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===d&&(ca++,d=ca,a.isVersion4?b.cache._arcadeCacheId=d:b.setCacheValue("_arcadeCacheId",d)),b=new u(b.points,b.spatialReference,!0===b.hasZ,!0===b.hasM,d,1);case "type":return"Multipoint"}}throw Error(c.nodeErrorMessage(e,"RUNTIME","PROPERTYNOTFOUND"));}function P(a,b){try{var d=b.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[d])return"lscope['"+d+"']";if(void 0!==a.localScope._SymbolsMap[d])return"lscope['"+
a.localScope._SymbolsMap[d]+"']"}if(void 0!==a.globalScope[d])return"gscope['"+d+"']";if(void 0!==a.globalScope._SymbolsMap[d])return"gscope['"+a.globalScope._SymbolsMap[d]+"']";throw Error(c.nodeErrorMessage(b,"RUNTIME","VARIABLENOTFOUND"));}catch(ha){throw ha;}}function H(b){return null===b?"":a.isArray(b)||a.isImmutableArray(b)?"Array":a.isDate(b)?"Date":a.isString(b)?"String":a.isBoolean(b)?"Boolean":a.isNumber(b)?"Number":b instanceof r?"Dictionary":b instanceof w?"Feature":b instanceof n?"Point":
b instanceof l?"Polygon":b instanceof f?"Polyline":b instanceof g?"Multipoint":b instanceof m?"Extent":a.isFunctionParameter(b)?"Function":b===a.voidOperation?"":"number"===typeof b&&isNaN(b)?"Number":"Unrecognised Type"}function K(b,c,d,e){try{if(a.equalityTest(c[d],e))return c[d+1];var f=c.length-d;return 1===f?c[d]:2===f?null:3===f?c[d+2]:K(b,c,d+2,e)}catch(wa){throw wa;}}function G(b,c,d,e){try{if(!0===e)return c[d+1];if(3===c.length-d)return c[d+2];var f=c[d+2];if(!1===a.isBoolean(f))throw Error("WHEN needs boolean test conditions");
return G(b,c,d+2,f)}catch(wa){throw wa;}}function S(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];var e=S(a.slice(0,d),b);a=S(a.slice(d,c),b);for(c=[];0<e.length||0<a.length;)0<e.length&&0<a.length?(d=b(e[0],a[0]),isNaN(d)&&(d=0),0>=d?(c.push(e[0]),e=e.slice(1)):(c.push(a[0]),a=a.slice(1))):0<e.length?(c.push(e[0]),e=e.slice(1)):0<a.length&&(c.push(a[0]),a=a.slice(1));return c}function O(a,b){b.symbols.symbolCounter++;return"_T"+b.symbols.symbolCounter.toString()}function da(a){a.symbols.symbolCounter++;
return"_Tvar"+a.symbols.symbolCounter.toString()}function N(a,b,c){var d={};a||(a={});c||(c={});d._SymbolsMap={};d.textformatting=1;d.infinity=1;d.pi=1;for(var e in b)d[e]=1;for(e in c)d[e]=1;for(e in a)d[e]=1;return d}function M(a){console.log(a)}Object.defineProperty(h,"__esModule",{value:!0});var ca=0,W={};t.registerFunctions(W,C);x.registerFunctions(W,C);v.registerFunctions(W,C);y.registerFunctions(W,C);e.registerFunctions(W,C);p.registerFunctions(W,C);W["typeof"]=function(b,c){return C(b,c,function(b,
c,d){a.pcCheck(d,1,1);b=H(d[0]);if("Unrecognised Type"===b)throw Error("Unrecognised Type");return b})};W.iif=function(b,c){try{return C(b,c,function(b,c,d){a.pcCheck(d,3,3);if(!1===a.isBoolean(d[0]))throw Error("IF Function must have a boolean test condition");return d[0]?d[1]:d[2]})}catch(ja){throw ja;}};W.decode=function(a,b){try{return C(a,b,function(b,c,d){if(2>d.length)throw Error("Missing Parameters");if(2===d.length)return d[1];if(0===(d.length-1)%2)throw Error("Must have a default value result.");
return K(a,d,1,d[0])})}catch(ja){throw ja;}};W.when=function(b,c){try{return C(b,c,function(c,d,e){if(3>e.length)throw Error("Missing Parameters");if(0===e.length%2)throw Error("Must have a default value result.");c=e[0];if(!1===a.isBoolean(c))throw Error("WHEN needs boolean test conditions");return G(b,e,0,c)})}catch(ja){throw ja;}};W.top=function(b,c){return C(b,c,function(b,c,d){a.pcCheck(d,2,2);if(a.isArray(d[0]))return a.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,a.toNumber(d[1]));
if(a.isImmutableArray(d[0]))return a.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,a.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};W.first=function(b,c){return C(b,c,function(b,c,d){a.pcCheck(d,1,1);return a.isArray(d[0])?0===d[0].length?null:d[0][0]:a.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};W.sort=function(b,c){return C(b,c,function(b,c,d){a.pcCheck(d,1,2);c=d[0];a.isImmutableArray(c)&&(c=c.toArray());if(!1===a.isArray(c))throw Error("Illegal Argument");
if(1<d.length){if(!1===a.isFunctionParameter(d[1]))throw Error("Illegal Argument");c=S(c,function(a,c){return fa.callfunc(d[1],[a,c],b)})}else{if(0===c.length)return[];for(var e={},f=0;f<c.length;f++){var g=H(c[f]);""!==g&&(e[g]=!0)}if(!0===e.Array||!0===e.Dictionary||!0===e.Feature||!0===e.Point||!0===e.Polygon||!0===e.Polyline||!0===e.Multipoint||!0===e.Extent||!0===e.Function)return c.slice(0);var f=0,g="",h;for(h in e)f++,g=h;c=1<f||"String"===g?S(c,function(b,c){if(null===b||void 0===b||b===
a.voidOperation)return null===c||void 0===c||c===a.voidOperation?0:1;if(null===c||void 0===c||c===a.voidOperation)return-1;b=a.toString(b);c=a.toString(c);return b<c?-1:b===c?0:1}):"Number"===g?S(c,function(a,b){return a-b}):"Boolean"===g?S(c,function(a,b){return a===b?0:b?-1:1}):"Date"===g?S(c,function(a,b){return b-a}):c.slice(0)}return c})};for(var X in W)W[X]=new a.NativeFunction(W[X]);var ga=function(){};ga.prototype=W;h.functionHelper={fixSpatialReference:a.fixSpatialReference,parseArguments:function(a,
b){for(var c=[],d=0;d<b.arguments.length;d++)c.push(B(a,b.arguments[d]));return c},standardFunction:C};h.extend=function(b){for(var d={mode:"sync",compiled:!0,functions:{},signatures:[],standardFunction:C},e=0;e<b.length;e++)b[e].registerFunctions(d);for(var f in d.functions)W[f]=new a.NativeFunction(d.functions[f]),ga.prototype[f]=W[f];for(e=0;e<d.signatures.length;e++)c.addFunctionDeclaration(d.signatures[e],"f")};h.executeScript=function(a,b,c){return a(b,c)};h.extractFieldLiterals=function(a,
b){void 0===b&&(b=!1);return c.findFieldLiterals(a,b)};h.validateScript=function(a,b){return c.validateScript(a,b,"simple")};h.referencesMember=function(a,b){return c.referencesMember(a,b)};h.referencesFunction=function(a,b){return c.referencesFunction(a,b)};var fa={error:function(a,b,d){throw Error(c.nodeErrorMessage(a,b,d));},functionDepthchecker:function(a,b){return function(){b.depthCounte++;if(64<b.depthCounter)throw Error("Exceeded maximum function depth");var c=a.apply(this,arguments);b.depthCounte--;
return c}},aCheck:function(b,d){if(a.isFunctionParameter(b))throw Error(c.nodeErrorMessage({type:d},"RUNTIME","FUNCTIONCONTEXTILLEGAL"));return b===a.voidOperation?null:b},Dictionary:r,Feature:w,dictionary:function(b){for(var c={},d=0;d<b.length;d+=2){if(a.isFunctionParameter(b[d+1]))throw Error("Illegal Argument");if(!1===a.isString(b[d]))throw Error("Illegal Argument");c[b[d].toString()]=b[d+1]===a.voidOperation?null:b[d+1]}b=new r(c);b.immutable=!1;return b},strCheck:function(b,c){if(!1===a.isString(b))throw Error("Illegal Argument");
return b},unary:function(b,d){if(a.isBoolean(b)){if("!"===d)return!b;if("-"===d)return-1*a.toNumber(b);if("+"===d)return 1*a.toNumber(b);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===d)return-1*a.toNumber(b);if("+"===d)return 1*a.toNumber(b);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));},logicalCheck:function(b){if(!1===a.isBoolean(b))throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME",
"ONLYORORAND"));return b},logical:function(b,d,e){if(a.isBoolean(b)&&a.isBoolean(d))switch(e){case "||":return b||d;case "\x26\x26":return b&&d;default:throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));},binary:function(b,d,e){switch(e){case "\x3d\x3d":return a.equalityTest(b,d);case "\x3d":return a.equalityTest(b,d);case "!\x3d":return!a.equalityTest(b,d);case "\x3c":return a.greaterThanLessThan(b,
d,e);case "\x3e":return a.greaterThanLessThan(b,d,e);case "\x3c\x3d":return a.greaterThanLessThan(b,d,e);case "\x3e\x3d":return a.greaterThanLessThan(b,d,e);case "+":return a.isString(b)||a.isString(d)?a.toString(b)+a.toString(d):a.toNumber(b)+a.toNumber(d);case "-":return a.toNumber(b)-a.toNumber(d);case "*":return a.toNumber(b)*a.toNumber(d);case "/":return a.toNumber(b)/a.toNumber(d);case "%":return a.toNumber(b)%a.toNumber(d);default:throw Error(c.nodeErrorMessage({type:"BinaryExpression"},"RUNTIME",
"OPERATORNOTRECOGNISED"));}},assign:function(b,d,e){switch(d){case "\x3d":return b===a.voidOperation?null:b;case "/\x3d":return a.toNumber(e)/a.toNumber(b);case "*\x3d":return a.toNumber(e)*a.toNumber(b);case "-\x3d":return a.toNumber(e)-a.toNumber(b);case "+\x3d":return a.isString(e)||a.isString(b)?a.toString(e)+a.toString(b):a.toNumber(e)+a.toNumber(b);case "%\x3d":return a.toNumber(e)%a.toNumber(b);default:throw Error(c.nodeErrorMessage("AssignmentExpression","RUNTIME","OPERATORNOTRECOGNISED"));
}},update:function(b,c,d,e){var f=a.toNumber(b[c]);b[c]="++"===d?f+1:f-1;return!1===e?f:"++"===d?f+1:f-1},memberupdate:function(b,c,d,e){var f;if(a.isArray(b))if(a.isNumber(c)){0>c&&(c=b.length+c);if(0>c||c>=b.length)throw Error("Assignment outside of array bounds");f=a.toNumber(b[c]);b[c]="++"===d?f+1:f-1}else throw Error("Invalid Parameter");else if(b instanceof r){if(!1===a.isString(c))throw Error("Dictionary accessor must be a string");if(!0===b.hasField(c))f=a.toNumber(b.field(c)),b.setField(c,
"++"===d?f+1:f-1);else throw Error("Invalid Parameter");}else if(b instanceof w){if(!1===a.isString(c))throw Error("Feature accessor must be a string");if(!0===b.hasField(c))f=a.toNumber(b.field(c)),b.setField(c,"++"===d?f+1:f-1);else throw Error("Invalid Parameter");}else{if(a.isImmutableArray(b))throw Error("Array is Immutable");throw Error("Invalid Parameter");}return!1===e?f:"++"===d?f+1:f-1},assignmember:function(b,c,d,e){if(a.isArray(b))if(a.isNumber(c)){0>c&&(c=b.length+c);if(0>c||c>b.length)throw Error("Assignment outside of array bounds");
if(c===b.length&&"\x3d"!==d)throw Error("Invalid Parameter");b[c]=this.assign(e,d,b[c])}else throw Error("Invalid Parameter");else if(b instanceof r){if(!1===a.isString(c))throw Error("Dictionary accessor must be a string");if(!0===b.hasField(c))b.setField(c,this.assign(e,d,b.field(c)));else{if("\x3d"!==d)throw Error("Invalid Parameter");b.setField(c,this.assign(e,d,null))}}else if(b instanceof w){if(!1===a.isString(c))throw Error("Feature accessor must be a string");if(!0===b.hasField(c))b.setField(c,
this.assign(e,d,b.field(c)));else{if("\x3d"!==d)throw Error("Invalid Parameter");b.setField(c,this.assign(e,d,null))}}else{if(a.isImmutableArray(b))throw Error("Array is Immutable");throw Error("Invalid Parameter");}},member:function(b,d){if(null===b)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","NOTFOUND"));if(b instanceof r||b instanceof w){if(a.isString(d))return b.field(d)}else if(b instanceof z){if(a.isString(d))return U(b,d,"MemberExpression")}else if(a.isArray(b)){if(a.isNumber(d)&&
isFinite(d)&&Math.floor(d)===d){0>d&&(d=b.length+d);if(d>=b.length||0>d)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b[d]}}else if(a.isString(b)){if(a.isNumber(d)&&isFinite(d)&&Math.floor(d)===d){0>d&&(d=b.length+d);if(d>=b.length||0>d)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b[d]}}else if(a.isImmutableArray(b)&&a.isNumber(d)&&isFinite(d)&&Math.floor(d)===d){0>d&&(d=b.length()+d);if(d>=b.length()||0>d)throw Error(c.nodeErrorMessage("MemberExpression",
"RUNTIME","OUTOFBOUNDS"));return b.get(d)}throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","INVALIDTYPE"));},callfunc:function(b,c,d){return b instanceof a.NativeFunction?b.fn(d,c):b instanceof a.SizzleFunction?b.fn.apply(this,c):b.apply(this,c)}};h.compileScript=function(b,c){void 0===c&&(c=null);null===c&&(c={vars:{},customfunctions:{}});c={globalScope:N(c.vars,W,c.customfunctions),localScope:null,console:M,symbols:{symbolCounter:0}};b=B(c,b.body[0].body);""===b&&(b="lc.voidOperation;");
c={lc:a,lang:fa,postProcess:function(b){b instanceof a.ReturnResult&&(b=b.value);b instanceof a.ImplicitResult&&(b=b.value);b===a.voidOperation&&(b=null);if(b===a.breakResult)throw Error("Cannot return BREAK");if(b===a.continueResult)throw Error("Cannot return CONTINUE");if(a.isFunctionParameter(b))throw Error("Cannot return FUNCTION");return b},prepare:function(a,b){b||(b=new d({wkid:102100}));var c=a.vars,e=a.customfunctions,f=new ga;c||(c={});e||(e={});var g=new r({newline:"\n",tab:"\t",singlequote:"'",
doublequote:'"',forwardslash:"/",backwardslash:"\\"});g.immutable=!1;f._SymbolsMap={textformatting:1,infinity:1,pi:1};f.textformatting=g;f.infinity=Number.POSITIVE_INFINITY;f.pi=Math.PI;for(var h in e)f[h]=e[h],f._SymbolsMap[h]=1;for(h in c)f._SymbolsMap[h]=1,f[h]=c[h]instanceof k?new w(c[h]):c[h];return{spatialReference:b,globalScope:f,localScope:null,console:a.console?a.console:M,symbols:{symbolCounter:0},depthCounter:1,applicationCache:void 0===a.applicationCache?null:a.applicationCache}}};return(new Function("context",
"spatialReference","var runtimeCtx\x3dthis.prepare(context, spatialReference);\n var lc \x3d this.lc;  var lang \x3d this.lang; var gscope\x3druntimeCtx.globalScope; \n function mainBody() {\n var lastStatement\x3dlc.voidOperation;\n "+b+"\n return lastStatement; } \n return this.postProcess(mainBody());")).bind(c)}})},"esri/renderers/support/utils":function(){define("dojo/_base/lang dojo/_base/array dojo/date/locale ../../Color ../../core/numberUtils dojo/i18n!../nls/smartMapping dojo/i18n!dojo/cldr/nls/gregorian".split(" "),
function(b,h,l,k,f,n,m){function g(a){return a&&h.map(a,function(a){return new k(a)})}function d(a,b,d){var e="";0===b?e=c.lt+" ":b===d&&(e=c.gt+" ");return e+a}var a={},c={lte:"\x3c\x3d",gte:"\x3e\x3d",lt:"\x3c",gt:"\x3e",pct:"%"},r={millisecond:0,second:1,minute:2,hour:3,day:4,month:5,year:6},w={millisecond:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},second:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},minute:{dateOptions:{formatLength:"long"},
timeOptions:{formatLength:"short"}},hour:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},day:{selector:"date",dateOptions:{formatLength:"long"}},month:{selector:"date",dateOptions:{formatLength:"long"}},year:{selector:"date",dateOptions:{selector:"year"}}},t={formatLength:"short",fullYear:!0},x={formatLength:"short"};b.mixin(a,{meterIn:{inches:1/.0254,feet:1/.3048,"us-feet":3.28084,yards:1/.9144,miles:1/1609.344,"nautical-miles":1/1852,millimeters:1E3,centimeters:100,decimeters:10,
meters:1,kilometers:.001,"decimal-degrees":180/20015077},timelineDateFormatOptions:{selector:"date",dateOptions:{formatLength:"short",fullYear:!0}},formatDate:function(a,c){var d=[];null==a||a instanceof Date||(a=new Date(a));c=c||{};c=b.mixin({},c);var e=c.selector?c.selector.toLowerCase():null,f=!e||-1<e.indexOf("time"),e=!e||-1<e.indexOf("date");f&&(c.timeOptions=c.timeOptions||x,c.timeOptions&&(c.timeOptions=b.mixin({},c.timeOptions),c.timeOptions.selector=c.timeOptions.selector||"time",d.push(c.timeOptions)));
e&&(c.dateOptions=c.dateOptions||t,c.dateOptions&&(c.dateOptions=b.mixin({},c.dateOptions),c.dateOptions.selector=c.dateOptions.selector||"date",d.push(c.dateOptions)));d&&d.length?(d=h.map(d,function(b){return l.format(a,b)}),c=1==d.length?d[0]:m["dateTimeFormat-medium"].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(a,b){return d[b]})):c=l.format(a);return c},createColorStops:function(b){var c=b.values,g=b.colors,e=b.labelIndexes,k=b.isDate,l=b.dateFormatOptions;b=[];return b=h.map(c,function(b,
p){var m=null;if(!e||-1<h.indexOf(e,p)){var q;(q=k?a.formatDate(b,l):f.format(b))&&(m=d(q,p,c.length-1))}return{value:b,color:g[p],label:m}})},updateColorStops:function(b){var c=b.stops,g=b.changes,e=b.isDate,k=b.dateFormatOptions,l=[],m,n=h.map(c,function(a){return a.value});h.forEach(g,function(a){l.push(a.index);n[a.index]=a.value});m=f.round(n,{indexes:l});h.forEach(c,function(b,g){b.value=n[g];if(null!=b.label){var h,l=null;(h=e?a.formatDate(m[g],k):f.format(m[g]))&&(l=d(h,g,c.length-1));b.label=
l}})},createClassBreakLabel:function(a){var b=a.minValue,d=a.maxValue,e=a.isFirstBreak?"":c.gt+" ";a="percent-of-total"===a.normalizationType?c.pct:"";b=null==b?"":f.format(b);d=null==d?"":f.format(d);return e+b+a+" "+n.minToMax+" "+d+a},setLabelsForClassBreaks:function(b){var c=b.classBreaks,d=b.classificationMethod,e=b.normalizationType,g=[];c&&c.length&&("standard-deviation"===d?console.log("setLabelsForClassBreaks: cannot set labels for class breaks generated using 'standard-deviation' method."):
b.round?(g.push(c[0].minValue),h.forEach(c,function(a){g.push(a.maxValue)}),g=f.round(g),h.forEach(c,function(b,c){b.label=a.createClassBreakLabel({minValue:0===c?g[0]:g[c],maxValue:g[c+1],isFirstBreak:0===c,normalizationType:e})})):h.forEach(c,function(b,c){b.label=a.createClassBreakLabel({minValue:b.minValue,maxValue:b.maxValue,isFirstBreak:0===c,normalizationType:e})}))},updateClassBreak:function(b){var c=b.classBreaks,d=b.normalizationType,e=b.change,f=e.index,e=e.value,g=-1,h=-1,k=c.length;"standard-deviation"===
b.classificationMethod?console.log("updateClassBreak: cannot update labels for class breaks generated using 'standard-deviation' method."):(0===f?g=f:f===k?h=f-1:(h=f-1,g=f),-1<g&&g<k&&(b=c[g],b.minValue=e,b.label=a.createClassBreakLabel({minValue:b.minValue,maxValue:b.maxValue,isFirstBreak:0===g,normalizationType:d})),-1<h&&h<k&&(b=c[h],b.maxValue=e,b.label=a.createClassBreakLabel({minValue:b.minValue,maxValue:b.maxValue,isFirstBreak:0===h,normalizationType:d})))},calculateDateFormatInterval:function(a){var b,
c,d=a.length,f,g,k,l,m,n,t=Infinity,v;a=h.map(a,function(a){return new Date(a)});for(b=0;b<d-1;b++){f=a[b];k=[];m=Infinity;n="";for(c=b+1;c<d;c++)g=a[c],g=f.getFullYear()!==g.getFullYear()&&"year"||f.getMonth()!==g.getMonth()&&"month"||f.getDate()!==g.getDate()&&"day"||f.getHours()!==g.getHours()&&"hour"||f.getMinutes()!==g.getMinutes()&&"minute"||f.getSeconds()!==g.getSeconds()&&"second"||"millisecond",l=r[g],l<m&&(m=l,n=g),k.push(g);m<t&&(t=m,v=n)}return v},createUniqueValueLabel:function(b){var c=
b.value,d=b.fieldInfo,e=b.domain;b=b.dateFormatInterval;var g=String(c);(e=e&&e.codedValues?e.getName(c):null)?g=e:"number"===typeof c&&(g=d&&"date"===d.type?a.formatDate(c,b&&w[b]):f.format(c));return g},cloneColorVariable:function(a){var c;a&&(c=b.mixin({},a),c.colors=g(c.colors),c.stops=c.stops&&h.map(c.stops,function(a){a=b.mixin({},a);a.color&&(a.color=new k(a.color));return a}),c.legendOptions&&(c.legendOptions=b.mixin({},c.legendOptions)));return c},cloneOpacityVariable:function(a){var c;if(a){c=
b.mixin({},a);if(a=c.opacityValues)c.opacityValues=a.slice(0);if(a=c.stops)c.stops=h.map(a,function(a){return b.mixin({},a)});if(a=c.legendOptions)c.legendOptions=b.mixin({},a)}return c},cloneSizeVariable:function(c){var d;c&&(d=b.mixin({},c),d.stops&&(d.stops=h.map(d.stops,function(a){return b.mixin({},a)})),(c=d.minSize)&&"object"===typeof c&&(d.minSize=a.cloneSizeVariable(c)),(c=d.maxSize)&&"object"===typeof c&&(d.maxSize=a.cloneSizeVariable(c)),c=d.legendOptions)&&(d.legendOptions=b.mixin({},
c),c=c.customValues)&&(d.legendOptions.customValues=c.slice(0));return d}});return a})},"esri/core/numberUtils":function(){define(["dojo/number","dojo/i18n!dojo/cldr/nls/number"],function(b,h){function l(b,d){return b-d}var k=/^-?(\d+)(\.(\d+))?$/i,f=new RegExp("\\"+h.decimal+"0+$","g"),n=/(\d)0*$/g,m={numDigits:function(b){var d=String(b),a=d.match(k);b={integer:0,fractional:0};a&&a[1]?(b.integer=a[1].split("").length,b.fractional=a[3]?a[3].split("").length:0):-1<d.toLowerCase().indexOf("e")&&(a=
d.split("e"),d=a[0],a=a[1],d&&a&&(d=Number(d),a=Number(a),(b=0<a)||(a=Math.abs(a)),d=m.numDigits(d),b?(d.integer+=a,d.fractional=a>d.fractional?0:d.fractional-a):(d.fractional+=a,d.integer=a>d.integer?1:d.integer-a),b=d));return b},percentChange:function(b,d,a,c){var f={previous:null,next:null},g;null!=a&&(g=b-a,f.previous=Math.floor(Math.abs(100*(d-a-g)/g)));null!=c&&(g=c-b,f.next=Math.floor(Math.abs(100*(c-d-g)/g)));return f},round:function(b,d){b=b.slice(0);var a,c,f,g,h,k,n,y,p=d&&null!=d.tolerance?
d.tolerance:2,e=d&&d.indexes,q=d&&null!=d.strictBounds?d.strictBounds:!1;if(e)e.sort(l);else for(e=[],h=0;h<b.length;h++)e.push(h);for(h=0;h<e.length;h++)if(y=e[h],d=b[y],a=0===y?null:b[y-1],c=y===b.length-1?null:b[y+1],f=m.numDigits(d),f=f.fractional){k=0;for(n=!1;k<=f&&!n;){g=d;n=k;var u=void 0,z=void 0,u=Number(g.toFixed(n));u<g?z=u+1/Math.pow(10,n):(z=u,u-=1/Math.pow(10,n));u=Number(u.toFixed(n));z=Number(z.toFixed(n));g=[u,z];g=q&&0===h?g[1]:g[0];n=p;var u=m.percentChange(d,g,a,c),C=z=void 0,
z=void 0,z=null==u.previous||u.previous<=n,C=null==u.next||u.next<=n;n=z=z&&C||u.previous+u.next<=2*n;k++}n&&(b[y]=g)}return b},format:function(g,d){d=d||{places:20,round:-1};(g=b.format(g,d))&&(g=g.replace(n,"$1").replace(f,""));return g}};return m})},"esri/renderers/UniqueValueRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/lang ../core/urlUtils ../core/Logger ../core/Error ../core/arrayUtils ../portal/Portal ../support/arcadeUtils ../symbols/WebStyleSymbol ../symbols/support/jsonUtils ../symbols/support/styleUtils ../symbols/support/typeUtils ./Renderer ./support/diffUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p){var e=g.getLogger("esri.renderers.UniqueValueRenderer");return function(b){function g(c){c=b.call(this)||this;c._valueInfoMap={};c._isDefaultSymbolDerived=!1;c.type="unique-value";c.field=null;c.field2=null;c.field3=null;c.valueExpression=null;c.valueExpressionTitle=null;c.legendOptions=null;c.defaultLabel=null;c.fieldDelimiter=null;c.portal=null;c.styleOrigin=null;c.diff={uniqueValueInfos:function(b,c){if(b||c){if(!b||!c)return{type:"complete",oldValue:b,
newValue:c};for(var d=!1,e={type:"collection",added:[],removed:[],changed:[],unchanged:[]},f=function(f){var g=a.find(b,function(a){return a.value===c[f].value});g?p.diff(g,c[f])?e.changed.push({type:"complete",oldValue:g,newValue:c[f]}):e.unchanged.push({oldValue:g,newValue:c[f]}):e.added.push(c[f]);d=!0},g=0;g<c.length;g++)f(g);f=function(f){a.find(c,function(a){return a.value===b[f].value})||(e.removed.push(b[f]),d=!0)};for(g=0;g<b.length;g++)f(g);return d?e:void 0}}};c._set("uniqueValueInfos",
[]);return c}l(g,b);h=g;g.prototype.writeType=function(a,b,c,d){b.type="uniqueValue"};Object.defineProperty(g.prototype,"compiledFunc",{get:function(){return r.createFunction(this.valueExpression)},enumerable:!0,configurable:!0});g.prototype.readLegendOptions=function(a){return n.clone(a)};g.prototype.writeLegendOptions=function(a,b,c,e){e&&"web-scene"===e.origin?a&&e.messages&&e.messages.push(new d("property:unsupported",this.declaredClass+".legendOptions is not supported in Web Scene. Please remove this property to save the Web Scene.",
{instance:this,propertyName:"legendOptions",context:e})):b.legendOptions=n.clone(a)};Object.defineProperty(g.prototype,"defaultSymbol",{set:function(a){this._isDefaultSymbolDerived=!1;this._set("defaultSymbol",a)},enumerable:!0,configurable:!0});g.prototype.readDefaultSymbol=function(a,b,c){return t.read(a,b,c)};g.prototype.writeDefaultSymbol=function(a,b,c,d){!this._isDefaultSymbolDerived&&(a=t.write(a,{},d))&&(b.defaultSymbol=a)};g.prototype.readPortal=function(a,b,d){return d.portal||c.getDefault()};
g.prototype.readStyleOrigin=function(a,b,c){if(b.styleName)return Object.freeze({styleName:b.styleName});if(b.styleUrl)return a=m.read(b.styleUrl,c),Object.freeze({styleUrl:a})};g.prototype.writeStyleOrigin=function(a,b,c,d){a.styleName?b.styleName=a.styleName:a.styleUrl&&(b.styleUrl=m.write(a.styleUrl,d),m.isAbsolute(b.styleUrl)&&(b.styleUrl=m.normalize(b.styleUrl)))};Object.defineProperty(g.prototype,"uniqueValueInfos",{set:function(a){if(this.styleOrigin)e.error("#uniqueValueInfos\x3d","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
else{a=a?a.slice(0):[];for(var b=0;b<a.length;b++){var c=a[b];c.symbol=v.ensureType(c.symbol)}this._set("uniqueValueInfos",a);this._updateValueInfoMap()}},enumerable:!0,configurable:!0});g.prototype.readUniqueValueInfos=function(a,b,c){if(Array.isArray(a))return a.map(function(a){a=n.clone(a);a.symbol=t.read(a.symbol,b,c);return a})};g.prototype.writeUniqueValueInfos=function(a,b,c,d){this.styleOrigin||(b.uniqueValueInfos=(this.uniqueValueInfos||[]).map(function(a){a=n.clone(a);a.symbol&&(a.symbol=
t.write(a.symbol,{},d));a.value+="";return n.fixJson(a)}))};g.prototype.addUniqueValueInfo=function(a,b){this.styleOrigin?e.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(a="object"===typeof a?n.clone(a):{value:a,symbol:b},a.symbol=v.ensureType(a.symbol),this.uniqueValueInfos.push(a),this._valueInfoMap[a.value+""]=a)};g.prototype.removeUniqueValueInfo=function(a){if(this.styleOrigin)e.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
else for(var b=0;b<this.uniqueValueInfos.length;b++)if(this.uniqueValueInfos[b].value+""===a+""){delete this._valueInfoMap[a];this.uniqueValueInfos.splice(b,1);break}};g.prototype.getUniqueValueInfo=function(a,b){var c=this.field,d=a.attributes;if(this.valueExpression)c=r.executeFunction(this.compiledFunc,r.createExecContext(a,r.getViewInfo(b)));else if(this.field2){a=this.field2;b=this.field3;var e=[];c&&e.push(d[c]);a&&e.push(d[a]);b&&e.push(d[b]);c=e.join(this.fieldDelimiter||"")}else c=c&&"function"===
typeof c?c(a):d[c];return this._valueInfoMap[c+""]};g.prototype.getSymbol=function(a,b){return(a=this.getUniqueValueInfo(a,b))&&a.symbol||this.defaultSymbol};g.prototype.getSymbols=function(){for(var a=[],b=0,c=this.uniqueValueInfos;b<c.length;b++){var d=c[b];d.symbol&&a.push(d.symbol)}this.defaultSymbol&&a.push(this.defaultSymbol);return a};g.prototype.clone=function(){var a=new h({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:n.clone(this.defaultSymbol),
valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:n.clone(this.visualVariables),legendOptions:n.clone(this.legendOptions),authoringInfo:n.clone(this.authoringInfo)});this._isDefaultSymbolDerived&&(a._isDefaultSymbolDerived=!0);a._set("portal",this.portal);var b=n.clone(this.uniqueValueInfos);this.styleOrigin&&(a._set("styleOrigin",Object.freeze(n.clone(this.styleOrigin))),Object.freeze(b));a._set("uniqueValueInfos",
b);a._updateValueInfoMap();return a};g.prototype.collectRequiredFields=function(a){this.inherited(arguments);[this.field,this.field2,this.field3].forEach(function(b){b&&(a[b]=!0)});this.valueExpression&&r.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})};g.prototype.populateFromStyle=function(){var a=this;return x.fetchStyle(this.styleOrigin,{portal:this.portal}).then(function(b){var c=[];a._valueInfoMap={};b&&b.data&&Array.isArray(b.data.items)&&b.data.items.forEach(function(d){var e=
new w({styleUrl:b.styleUrl,styleName:b.styleName,portal:a.portal,name:d.name});a.defaultSymbol||d.name!==b.data.defaultItem||(a.defaultSymbol=e,a._isDefaultSymbolDerived=!0);e={value:d.name,symbol:e};c.push(e);a._valueInfoMap[d.name]=e});a._set("uniqueValueInfos",Object.freeze(c));!a.defaultSymbol&&a.uniqueValueInfos.length&&(a.defaultSymbol=a.uniqueValueInfos[0].symbol,a._isDefaultSymbolDerived=!0);return a})};g.prototype._updateValueInfoMap=function(){var a=this;this._valueInfoMap={};this.uniqueValueInfos.forEach(function(b){return a._valueInfoMap[b.value+
""]=b})};g.fromPortalStyle=function(a,b){var d=new h(b&&b.properties);d._set("styleOrigin",Object.freeze({styleName:a}));d._set("portal",b&&b.portal||c.getDefault());b=d.populateFromStyle();b.otherwise(function(b){e.error("#fromPortalStyle('"+a+"'[, ...])","Failed to create unique value renderer from style name",b)});return b};g.fromStyleUrl=function(a,b){b=new h(b&&b.properties);b._set("styleOrigin",Object.freeze({styleUrl:a}));b=b.populateFromStyle();b.otherwise(function(b){e.error("#fromStyleUrl('"+
a+"'[, ...])","Failed to create unique value renderer from style URL",b)});return b};k([f.property()],g.prototype,"type",void 0);k([f.writer("type")],g.prototype,"writeType",null);k([f.property({json:{read:{source:"field1"},write:{target:"field1"}}})],g.prototype,"field",void 0);k([f.property({json:{write:!0}})],g.prototype,"field2",void 0);k([f.property({json:{write:!0}})],g.prototype,"field3",void 0);k([f.property({json:{write:!0}})],g.prototype,"valueExpression",void 0);k([f.property({json:{write:!0}})],
g.prototype,"valueExpressionTitle",void 0);k([f.property({dependsOn:["valueExpression"]})],g.prototype,"compiledFunc",null);k([f.property({json:{write:!0}})],g.prototype,"legendOptions",void 0);k([f.reader("legendOptions")],g.prototype,"readLegendOptions",null);k([f.writer("legendOptions")],g.prototype,"writeLegendOptions",null);k([f.property({json:{write:!0}})],g.prototype,"defaultLabel",void 0);k([f.property({types:v.types})],g.prototype,"defaultSymbol",null);k([f.reader("defaultSymbol")],g.prototype,
"readDefaultSymbol",null);k([f.writer("defaultSymbol")],g.prototype,"writeDefaultSymbol",null);k([f.property({json:{write:!0}})],g.prototype,"fieldDelimiter",void 0);k([f.property({type:c,readOnly:!0})],g.prototype,"portal",void 0);k([f.reader("portal",["styleName"])],g.prototype,"readPortal",null);k([f.property({readOnly:!0,json:{write:!0}})],g.prototype,"styleOrigin",void 0);k([f.reader("styleOrigin",["styleName","styleUrl"])],g.prototype,"readStyleOrigin",null);k([f.writer("styleOrigin")],g.prototype,
"writeStyleOrigin",null);k([f.property()],g.prototype,"uniqueValueInfos",null);k([f.reader("uniqueValueInfos")],g.prototype,"readUniqueValueInfos",null);k([f.writer("uniqueValueInfos")],g.prototype,"writeUniqueValueInfos",null);k([f.property({dependsOn:["field","field2","field3","valueExpression"],readOnly:!0})],g.prototype,"requiredFields",void 0);return g=h=k([f.subclass("esri.renderers.UniqueValueRenderer")],g);var h}(f.declared(y))})},"esri/core/arrayUtils":function(){define([],function(){function b(b,
f){return-1===b.indexOf(f)}function h(b,f,h){return!b.some(f.bind(null,h))}var l={findIndex:function(b,f,h){for(var k=b.length,g,d=0;d<k;d++)if(g=b[d],f.call(h,g,d,b))return d;return-1},find:function(b,f,h){for(var k=b.length,g,d=0;d<k;d++)if(g=b[d],f.call(h,g,d,b))return g},equals:function(b,f,h){if(!b&&!f)return!0;if(!b||!f||b.length!=f.length)return!1;if(h)for(var k=0;k<b.length;k++){if(!h(b[k],f[k]))return!1}else for(h=0;h<b.length;h++)if(b[h]!==f[h])return!1;return!0},difference:function(k,f,
l){var m;l?(m=f.filter(h.bind(null,k,l)),k=k.filter(h.bind(null,f,l))):(m=f.filter(b.bind(null,k)),k=k.filter(b.bind(null,f)));return{added:m,removed:k}},intersect:function(b,f,h){return b&&f?h?b.filter(function(b){return-1<l.findIndex(f,function(f){return h(b,f)})}):b.filter(function(b){return-1<f.indexOf(b)}):[]},range:function(b,f){null==f&&(f=b,b=0);for(var h=Array(f-b),k=b;k<f;k++)h[k-b]=k;return h},constant:function(b,f){for(var h=Array(b),k=0;k<b;k++)h[k]=f;return h},binaryIndexOf:function(b,
f,h){for(var k=b.length,g=0,d=k-1;g<d;){var a=g+Math.floor((d-g)/2);f>b[a]?g=a+1:d=a}d=b[g];return h?f>=b[k-1]?-1:d===f?g:g-1:d===f?g:-1}};return l})},"esri/symbols/support/styleUtils":function(){define("require exports ../Symbol3D ./jsonUtils ./Thumbnail ./StyleOrigin ../../core/urlUtils ../../core/promiseUtils ../../core/Error ../../request ../../portal/Portal ../../portal/PortalQueryParams".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r){function w(a,b){return p(a).then(function(b){return{data:b.data,
baseUrl:m.removeFile(a),styleUrl:a}})}function t(a,b){b=b.portal||c.getDefault();var d,f=b.url+" - "+(b.user&&b.user.username)+" - "+a;e[f]||(e[f]=x(a,b).then(function(a){d=a;return a.fetchData()}).then(function(b){return{data:b,baseUrl:d.itemUrl,styleName:a}}));return e[f]}function x(a,b){return b.load().then(function(){var c=new r({disableExtraQuery:!0,query:"owner:"+q+" AND type:"+u+' AND typekeywords:"'+a+'"'});return b.queryItems(c)}).then(function(b){b=b.results;var c=null,e=a.toLowerCase();
if(b&&Array.isArray(b))for(var f=0;f<b.length;f++){var g=b[f];if(g.typeKeywords.some(function(a){return a.toLowerCase()===e})&&g.type===u&&g.owner===q){c=g;break}}if(c)return c.load();throw new d("symbolstyleutils:style-not-found","The style '"+a+"' could not be found",{styleName:a});})}function v(a,b){return a.styleUrl?w(a.styleUrl,b):a.styleName?t(a.styleName,b):g.reject(new d("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function y(a,
b,c){for(var e=a.data,h={portal:c.portal,url:m.urlToObject(a.baseUrl),origin:"portal-item"},q=function(d){if(d.name!==b)return"continue";var e=m.read(d.webRef,h),g={portal:c.portal,url:m.urlToObject(m.removeFile(e)),origin:"portal-item"};return{value:p(e).then(function(e){if((e=k.fromJSON(e.data,g))&&e.isInstanceOf(l)){if(d.thumbnail)if(d.thumbnail.href){var p=m.read(d.thumbnail.href,h);e.thumbnail=new f.default({url:p})}else d.thumbnail.imageData&&(e.thumbnail=new f.default({url:"data:image/png;base64,"+
d.thumbnail.imageData}));a.styleUrl?e.styleOrigin=new n({portal:c.portal,styleUrl:a.styleUrl,name:b}):a.styleName&&(e.styleOrigin=new n({portal:c.portal,styleName:a.styleName,name:b}))}return e})}},t=0,e=e.items;t<e.length;t++){var u=q(e[t]);if("object"===typeof u)return u.value}return g.reject(new d("symbolstyleutils:symbol-name-not-found","The symbol name '"+b+"' could not be found",{symbolName:b}))}function p(b){return a(m.normalize(b),{responseType:"json",query:{f:"json"}})}Object.defineProperty(h,
"__esModule",{value:!0});var e={};h.fetchStyle=v;h.resolveWebStyleSymbol=function(a,b){return a.name?v(a,b).then(function(c){return y(c,a.name,b)}):g.reject(new d("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))};h.fetchSymbolFromStyle=y;h.styleNameFromItem=function(a){var b=0;for(a=a.typeKeywords;b<a.length;b++){var c=a[b];if(/^Esri.*Style$/.test(c))return c}};var q="esri_en",u="Style"})},"esri/renderers/support/diffUtils":function(){define("require exports dojo/_base/lang ../../core/Accessor ../../core/Collection ../../core/accessorSupport/utils".split(" "),
function(b,h,l,k,f,n){function m(a){return a instanceof f?Object.keys(a.items):a instanceof k?n.getProperties(a).keys():a?Object.keys(a):[]}function g(a,b){return a instanceof f?a.items[b]:a[b]}function d(a,b){return Array.isArray(a)&&Array.isArray(b)?a.length!==b.length:!1}function a(a){return a?a.declaredClass:null}function c(b,f){var h=b.diff;if(h&&l.isFunction(h))return h(b,f);var k=m(b),n=m(f);if(0!==k.length||0!==n.length){if(!k.length||!n.length||d(b,f))return{type:"complete",oldValue:b,newValue:f};
var p=n.filter(function(a){return-1===k.indexOf(a)}),e=k.filter(function(a){return-1===n.indexOf(a)}),p=k.filter(function(a){return-1<n.indexOf(a)&&g(b,a)!==g(f,a)}).concat(p,e).sort();if((e=a(b))&&-1<r.indexOf(e)&&p.length)return{type:"complete",oldValue:b,newValue:f};var q,t;for(t in p){var e=p[t],w=g(b,e),C=g(f,e),B=void 0;l.isFunction(w)||l.isFunction(C)||w===C||null==w&&null==C||!(B=h&&h[e]&&l.isFunction(h[e])?h[e](w,C):"object"===typeof w&&"object"===typeof C&&a(w)===a(C)?c(w,C):{type:"complete",
oldValue:w,newValue:C})||(q=q||{type:"partial",diff:{}},q.diff[e]=B)}return q}}Object.defineProperty(h,"__esModule",{value:!0});var r=["esri.Color","esri.portal.Portal"];h.diff=function(b,d){if(!l.isFunction(b)&&!l.isFunction(d)&&(b||d))return!b||!d||"object"===typeof b&&"object"===typeof b&&a(b)!==a(d)?{type:"complete",oldValue:b,newValue:d}:c(b,d)}})},"esri/renderers/support/jsonUtils":function(){define(["../../core/Warning","../SimpleRenderer","../UniqueValueRenderer","../ClassBreaksRenderer"],
function(b,h,l,k){var f={simple:h,uniqueValue:l,classBreaks:k},n={fromJson:function(b){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(g){console.warn(g.stack)}return n.fromJSON(b)},read:function(h,g,d){if(h&&(h.styleName||h.styleUrl)&&"uniqueValue"!==h.type)return d&&d.messages&&d.messages.push(new b("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+h.type+"'",{definition:h,context:d})),null;if(g=h?f[h.type]||null:null)return g=
new g,g.read(h,d),g;d&&d.messages&&h&&d.messages.push(new b("renderer:unsupported","Renderers of type '"+(h.type||"unknown")+"' are not supported",{definition:h,context:d}));return null},fromJSON:function(b){var g=b?f[b.type]||null:null;return g?g.fromJSON(b):null}};return n})},"esri/renderers/ClassBreaksRenderer":function(){define("../core/declare ../core/lang ../core/kebabDictionary ../core/Error dojo/_base/array dojo/_base/lang ../support/arcadeUtils ../symbols/support/jsonUtils ../symbols/support/typeUtils ./Renderer".split(" "),
function(b,h,l,k,f,n,m,g,d,a){var c=l({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"}),r=l({esriClassifyNaturalBreaks:"natural-breaks",esriClassifyEqualInterval:"equal-interval",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyGeometricalInterval:"geometrical-interval"}),w=b(a,{declaredClass:"esri.renderers.ClassBreaksRenderer",properties:{backgroundFillSymbol:{value:null,json:{read:g.read,write:function(a,
b,c,d){if(a=g.write(a,{},d))b.backgroundFillSymbol=a}}},classBreakInfos:{set:function(a){a=a?a.slice(0):[];a.forEach(function(a){a.symbol=d.ensureType(a.symbol)});this._set("classBreakInfos",a)},json:{read:{source:["classBreakInfos","minValue"],reader:function(a,b,c){var d=b.minValue;if(a&&Array.isArray(a)){var f=a[0]&&null!=a[0].classMaxValue;return a.map(function(a){a=h.clone(a);if(f){var e=a.classMaxValue;a.minValue=d;d=a.maxValue=e}a.symbol=g.read(a.symbol,b,c);return a})}return a}},write:function(a,
b,c,d){a=this.classBreakInfos||[];c=a[0]&&a[0].minValue;b.minValue=-Infinity===c?-Number.MAX_VALUE:c;b.classBreakInfos=f.map(a,function(a){a=h.clone(a);a.symbol&&(a.symbol=g.write(a.symbol,{},d));a.classMaxValue=Infinity===a.maxValue?Number.MAX_VALUE:a.maxValue;delete a.minValue;delete a.maxValue;return h.fixJson(a)})}}},classificationMethod:{value:null,json:{read:r.fromJSON,write:function(a,b){if(a=r.toJSON(a))b.classificationMethod=a}}},defaultLabel:{value:null,json:{write:!0}},defaultSymbol:{types:d.types,
value:null,json:{read:g.read,write:function(a,b,c,d){if(a=g.write(a,{},d))b.defaultSymbol=a}}},valueExpression:{value:null,json:{write:!0}},valueExpressionTitle:{value:null,json:{write:!0}},compiledFunc:{dependsOn:["valueExpression"],get:function(){return m.createFunction(this.valueExpression)}},legendOptions:{value:null,json:{read:function(a){return h.clone(a)},write:function(a,b,c,d){d&&"web-scene"===d.origin?a&&d.messages&&d.messages.push(new k("property:unsupported",this.declaredClass+".legendOptions is not supported in Web Scene. Please remove this property to save the Web Scene.",
{instance:this,propertyName:"legendOptions",context:d})):b.legendOptions=h.clone(a)}}},field:{value:null,json:{write:!0}},isMaxInclusive:!0,normalizationField:{value:null,json:{write:!0}},normalizationTotal:{value:null,json:{write:!0}},normalizationType:{value:null,dependsOn:["normalizationField","normalizationTotal"],get:function(){var a=this._get("normalizationType"),b=!!this.normalizationField,c=null!=this.normalizationTotal;if(b||c)a=b&&"field"||c&&"percent-of-total",b&&c&&console.warn("warning: both normalizationField and normalizationTotal are set!");
else if("field"===a||"percent-of-total"===a)a=null;return a},json:{read:c.fromJSON,write:function(a,b){if(a=c.toJSON(a))b.normalizationType=a}}},requiredFields:{dependsOn:["field","normalizationField","valueExpression"]},type:{value:"class-breaks",json:{write:function(a,b){b.type="classBreaks"}}}},constructor:function(){this.classBreakInfos=[]},addClassBreakInfo:function(a,b,c){a=n.isObject(a)?h.clone(a):{minValue:a,maxValue:b,symbol:c};a.symbol=d.ensureType(a.symbol);this.classBreakInfos.push(a)},
removeClassBreakInfo:function(a,b){var c,d,f=this.classBreakInfos.length;for(d=0;d<f;d++)if(c=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],c[0]==a&&c[1]==b){this.classBreakInfos.splice(d,1);break}},getBreakIndex:function(a,b){var c=this.field,d=a.attributes,f=this.classBreakInfos.length,e=this.isMaxInclusive;if(this.valueExpression)a=m.executeFunction(this.compiledFunc,m.createExecContext(a,m.getViewInfo(b)));else if(n.isFunction(c))a=c(a);else if(a=parseFloat(d[c]),b=this.normalizationType)if(c=
parseFloat(this.normalizationTotal),d=parseFloat(d[this.normalizationField]),"log"===b)a=Math.log(a)*Math.LOG10E;else if("percent-of-total"===b&&!isNaN(c))a=a/c*100;else if("field"===b&&!isNaN(d)){if(isNaN(a)||isNaN(d))return-1;a/=d}if(null!=a&&!isNaN(a)&&"number"===typeof a)for(d=0;d<f;d++)if(b=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],b[0]<=a&&(e?a<=b[1]:a<b[1]))return d;return-1},getClassBreakInfo:function(a,b){a=this.getBreakIndex(a,b);return-1!==a?this.classBreakInfos[a]:
null},getSymbol:function(a,b){a=this.getBreakIndex(a,b);return-1<a?this.classBreakInfos[a].symbol:this.defaultSymbol},getSymbols:function(){var a=[];this.classBreakInfos.forEach(function(b){b.symbol&&a.push(b.symbol)});this.defaultSymbol&&a.push(this.defaultSymbol);return a},clone:function(){return new w({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),classificationMethod:this.classificationMethod,defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol&&
this.defaultSymbol.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:h.clone(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:h.clone(this.visualVariables),legendOptions:h.clone(this.legendOptions),authoringInfo:h.clone(this.authoringInfo)})},collectRequiredFields:function(a){this.inherited(arguments);
[this.field,this.normalizationField].forEach(function(b){b&&(a[b]=!0)});this.valueExpression&&m.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})}});return w})},"esri/renderers/support/styleUtils":function(){define(["require","exports","../../core/promiseUtils","../../core/Warning"],function(b,h,l,k){Object.defineProperty(h,"__esModule",{value:!0});h.loadStyleRenderer=function(b,h){var f=b&&b.getAtOrigin&&b.getAtOrigin("renderer",h.origin);return f&&"unique-value"===f.type&&f.styleOrigin?
f.populateFromStyle().otherwise(function(f){h&&h.messages&&h.messages.push(new k("renderer:style-reference","Failed to create unique value renderer from style reference: "+f.message,{error:f,context:h}));b.clear("renderer",h.origin)}).then(function(){return null}):l.resolve(null)}})},"esri/renderers/support/typeUtils":function(){define("require exports ../Renderer ../SimpleRenderer ../UniqueValueRenderer ../ClassBreaksRenderer".split(" "),function(b,h,l,k,f,n){Object.defineProperty(h,"__esModule",
{value:!0});h.types={key:"type",base:l,typeMap:{simple:k,"unique-value":f,"class-breaks":n}}})},"esri/layers/support/fieldUtils":function(){define(["require","exports","dojo/_base/lang"],function(b,h,l){function k(b,h,g){if(b)for(var d=0;d<b.length;d++){var a=b[d],c=l.getObject(a,!1,h);(c=c&&"function"!==typeof c&&f(c,g))&&l.setObject(a,c.name,h)}}function f(b,f){if(null!=f){b=b.toLowerCase();for(var g=0;g<f.length;g++){var d=f[g];if(d&&d.name.toLowerCase()===b)return d}}return null}Object.defineProperty(h,
"__esModule",{value:!0});h.fixRendererFields=function(b,f){if(null!=b&&null!=f){var g=0;for(b=Array.isArray(b)?b:[b];g<b.length;g++){var d=b[g];k(h.rendererFields,d,f);if(d.visualVariables)for(var a=0,d=d.visualVariables;a<d.length;a++)k(h.visualVariableFields,d[a],f)}}};h.getField=f;h.rendererFields="field field2 field3 normalizationField rotationInfo.field proportionalSymbolInfo.field proportionalSymbolInfo.normalizationField colorInfo.field colorInfo.normalizationField".split(" ");h.visualVariableFields=
["field","normalizationField"];h.numericTypes=["integer","small-integer","single","double"];h.isNumericField=function(b,f){return b?-1<h.numericTypes.indexOf(b.type)&&b.name!==f.objectIdField:!1};h.isStringField=function(b,f){return b?"string"===b.type&&b.name!==f.objectIdField:!1};h.isDateField=function(b){return b?"date"===b.type:!1}})},"esri/layers/support/FeatureType":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ./InheritedDomain ./RangeDomain ./CodedValueDomain ./FeatureTemplate ../../core/lang".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){return function(b){function h(a){a=b.call(this,a)||this;a.id=null;a.name=null;a.domains=null;a.templates=null;return a}l(h,b);h.prototype.readDomains=function(a){var b={},c;for(c in a)if(a.hasOwnProperty(c)){var f=a[c];switch(f.type){case "range":b[c]=g.fromJSON(f);break;case "codedValue":b[c]=d.fromJSON(f);break;case "inherited":b[c]=m.fromJSON(f)}}return b};h.prototype.writeDomains=function(a,b){var d={},f;for(f in a)a.hasOwnProperty(f)&&(d[f]=a[f]&&a[f].toJSON());
c.fixJson(d);b.domains=d};h.prototype.readTemplates=function(b){return b&&b.map(function(b){return new a(b)})};h.prototype.writeTemplates=function(a,b){b.templates=a&&a.map(function(a){return a.toJSON()})};k([f.property({json:{write:!0}})],h.prototype,"id",void 0);k([f.property({json:{write:!0}})],h.prototype,"name",void 0);k([f.property({json:{write:!0}})],h.prototype,"domains",void 0);k([f.reader("domains")],h.prototype,"readDomains",null);k([f.writer("domains")],h.prototype,"writeDomains",null);
k([f.property({json:{write:!0}})],h.prototype,"templates",void 0);k([f.reader("templates")],h.prototype,"readTemplates",null);k([f.writer("templates")],h.prototype,"writeTemplates",null);return h=k([f.subclass("esri.layers.support.FeatureType")],h)}(f.declared(n))})},"esri/layers/support/InheritedDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),function(b,h,l,k,f,n){return function(b){function g(d){d=
b.call(this,d)||this;d.type="inherited";return d}l(g,b);k([f.property()],g.prototype,"type",void 0);return g=k([f.subclass("esri.layers.support.InheritedDomain")],g)}(f.declared(n))})},"esri/layers/support/FeatureTemplate":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang".split(" "),function(b,h,l,k,f,n,m,g){var d=m({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",
esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});
return function(a){function b(b){b=a.call(this,b)||this;b.name=null;b.description=null;b.drawingTool=null;b.prototype=null;b.thumbnail=null;return b}l(b,a);b.prototype.writeDrawingTool=function(a,b){b.drawingTool=d.toJSON(a)};b.prototype.writePrototype=function(a,b){b.prototype=g.fixJson(g.clone(a),!0)};b.prototype.writeThumbnail=function(a,b){b.thumbnail=g.fixJson(g.clone(a))};k([f.property({json:{write:!0}})],b.prototype,"name",void 0);k([f.property({json:{write:!0}})],b.prototype,"description",
void 0);k([f.property({json:{read:d.fromJSON,write:!0}})],b.prototype,"drawingTool",void 0);k([f.writer("drawingTool")],b.prototype,"writeDrawingTool",null);k([f.property({json:{write:!0}})],b.prototype,"prototype",void 0);k([f.writer("prototype")],b.prototype,"writePrototype",null);k([f.property({json:{write:!0}})],b.prototype,"thumbnail",void 0);k([f.writer("thumbnail")],b.prototype,"writeThumbnail",null);return b=k([f.subclass("esri.layers.support.FeatureTemplate")],b)}(f.declared(n))})},"esri/layers/support/LabelClass":function(){define("../../core/JSONSupport ../../core/lang ../../core/kebabDictionary dojo/_base/lang dojo/number ./types ../../PopupTemplate ../../widgets/Popup/PopupRendererViewModel ../../support/arcadeUtils ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){function r(a){a=(a=d.createSyntaxTree(a))&&a.body&&a.body[0]&&a.body[0].body&&a.body[0].body.body;if(!a||1!==a.length)return null;a="ExpressionStatement"===a[0].type&&a[0].expression;if(!a||"MemberExpression"!==a.type)return null;var b=a.object;if(!b||"Identifier"!==b.type||"$feature"!==b.name)return null;a=a.property;if(!a)return null;switch(a.type){case "Literal":return a.value;case "Identifier":return a.name}return null}function w(a){return a?"service"===a.origin?
!1:!a.layer||!n.isOfType(a.layer,"map-image"):!0}var t=/__begin__/ig,x=/__end__/ig,v=/^__begin__/i,y=/__end__$/i,p=l({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",
esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",
esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"}),e=b.createSubclass({declaredClass:"esri.layers.support.LabelClass",properties:{name:{value:null,json:{write:!0}},labelExpression:{value:null,json:{read:function(a,b,c,d){b=b.labelExpressionInfo;
if(!b||!b.value&&!b.expression)return a},write:{allowNull:!0,writer:function(a,b,c,d){this.labelExpressionInfo&&w(d)&&(null!=this.labelExpressionInfo.value?a=this._templateStringToSql(this.labelExpressionInfo.value):null!=this.labelExpressionInfo.expression&&(d=r(this.labelExpressionInfo.expression))&&(a="["+d+"]"));null!=a&&(b[c]=a)}}}},labelExpressionInfo:{value:null,json:{read:function(a,b,c,d){a&&a.value&&(a=k.mixin(k.clone(a),{expression:this._convertTemplatedStringToArcade(a.value)}),delete a.value);
return a},write:{overridePolicy:function(a,b,c){return w(c)?{allowNull:!0}:{enabled:!1}},writer:function(a,b,c,d){if(null==a&&null!=this.labelExpression&&w(d))a={expression:this.getLabelExpressionArcade()};else if(a)a=h.fixJson(k.clone(a));else return;null!=a.value&&(a.expression=this._convertTemplatedStringToArcade(a.value));a.expression&&(delete a.value,b[c]=a)}}}},labelPlacement:{value:null,json:{read:function(a,b){return p.fromJSON(a)},write:function(a,b){if(a=p.toJSON(a))b.labelPlacement=a}}},
maxScale:{value:0,json:{write:function(a,b){if(a||this.minScale)b.maxScale=a}}},minScale:{value:0,json:{write:function(a,b){if(a||this.maxScale)b.minScale=a}}},requiredFields:{readOnly:!0,dependsOn:["labelExpression","labelExpressionInfo","where"],get:function(){var a=Object.create(null);this._collectRequiredFields(a);return Object.keys(a)}},symbol:{value:null,types:c.types,json:{read:a.read,write:function(b,c,d,e){c.symbol=a.write(b,{},e)}}},useCodedValues:{value:null,json:{write:!0}},where:{value:null,
json:{write:!0}}},getLabelExpression:function(){var a={expression:"",type:"none"};this.labelExpressionInfo?this.labelExpressionInfo.value?(a.expression=this.labelExpressionInfo.value,a.type="conventional"):this.labelExpressionInfo.expression&&(a.expression=this.labelExpressionInfo.expression,a.type="arcade"):null!=this.labelExpression&&(a.expression=this._sqlToTemplateString(this.labelExpression),a.type="conventional");return a},getLabelExpressionArcade:function(){var a=this.getLabelExpression();
if(!a)return null;switch(a.type){case "conventional":return this._convertTemplatedStringToArcade(a.expression);case "arcade":return a.expression}return null},getOptions:function(){var a={},b=this.labelExpressionInfo;if(b){var c=b.expression;c&&!b.value&&(a.hasArcadeExpression=!0,a.compiledArcadeFunc=d.createFunction(c))}return a},getLabelExpressionSingleField:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return(a=a.expression.match(q))&&a[1].trim()||
null;case "arcade":return r(a.expression)}return null},clone:function(){return new e({labelExpression:this.labelExpression,labelExpressionInfo:k.clone(this.labelExpressionInfo),labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,symbol:this.symbol.clone(),where:this.where,useCodedValues:this.useCodedValues})},_collectRequiredFields:function(a){this._collectLabelExpressionRequiredFields(this.getLabelExpression(),a);this._collectWhereRequiredFields(this.where,
a)},_sqlToTemplateString:function(a){return a.replace(/\[/g,"{").replace(/\]/g,"}")},_templateStringToSql:function(a){return a.replace(/\{/g,"[").replace(/\}/g,"]")},_collectWhereRequiredFields:function(a,b){null!=a&&(a=a.split(" "),3===a.length&&(b[a[0]]=!0),7===a.length&&(b[a[0]]=!0,b[a[4]]=!0))},_collectLabelExpressionRequiredFields:function(a,b){"arcade"===a.type?d.extractFieldNames(a.expression).forEach(function(a){b[a]=!0}):(a=a.expression.match(/{[^}]*}/g))&&a.forEach(function(a){b[a.slice(1,
-1)]=!0})},_convertTemplatedStringToArcade:function(a){a?(a=k.replace(a,function(a,b){return'__begin__$feature["'+b+'"]__end__'}),a=v.test(a)?a.replace(v,""):'"'+a,a=y.test(a)?a.replace(y,""):a+'"',a=a.replace(t,'" + ').replace(x,' + "')):a='""';return a}});e.evaluateWhere=function(a,b){var c=function(a,b,c){switch(b){case "\x3d":return a==c?!0:!1;case "\x3c\x3e":return a!=c?!0:!1;case "\x3e":return a>c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return a<c?!0:!1;case "\x3c\x3d":return a<=
c?!0:!1}return!1};try{if(null==a)return!0;var d=a.split(" ");if(3===d.length)return c(b[d[0]],d[1],d[2]);if(7===d.length){var e=c(b[d[0]],d[1],d[2]),f=d[3],g=c(b[d[4]],d[5],d[6]);switch(f){case "AND":return e&&g;case "OR":return e||g}}return!1}catch(I){console.log("Error.: can't parse \x3d "+a)}};e.buildLabelText=function(a,b,c,f){var g="";if(f&&f.hasArcadeExpression)f.compiledArcadeFunc&&(a=d.createExecContext(b),a=d.executeFunction(f.compiledArcadeFunc,a),null!=a&&(g=a.toString()));else var h=b&&
b.attributes||{},g=a.replace(/{[^}]*}/g,function(a){return e.formatField(a.slice(1,-1),a,h,c,f)});return g};e.formatField=function(a,b,c,d,e){var l=a.toLowerCase();for(a=0;a<d.length;a++)if(d[a].name.toLowerCase()===l){b=c[d[a].name];var p=d[a].domain;if(p&&k.isObject(p)){if("codedValue"==p.type)for(c=0;c<p.codedValues.length;c++)p.codedValues[c].code==b&&(b=p.codedValues[c].name);else"range"==p.type&&p.minValue<=b&&b<=p.maxValue&&(b=p.name);break}p=d[a].type;"date"==p?(p=e&&e.dateFormat||"shortDate",
p=m.prototype._dateFormatKebabDict.fromJSON(p),(p="DateFormat"+g.prototype._dateFormats[p])&&(b=h.substitute({myKey:b},"{myKey:"+p+"}"))):("integer"==p||"small-integer"==p||"long"==p||"double"==p)&&e&&e.numberFormat&&e.numberFormat.digitSeparator&&e.numberFormat.places&&(b=f.format(b,{places:e.numberFormat.places}))}return null==b?"":b};var q=/^\s*\{([^}]+)\}\s*$/i;return e})},"esri/widgets/Popup/PopupRendererViewModel":function(){define("../Widget ../../core/Accessor ../../core/Error ../../core/HandleRegistry ../../core/lang ../../core/urlUtils ../../core/promiseUtils ../../core/watchUtils ../../request ../../support/arcadeUtils ../../tasks/support/StatisticDefinition ../../tasks/support/Query ../../tasks/QueryTask dojo/_base/lang dojo/promise/all dojo/i18n!dojo/cldr/nls/number dojox/html/entities".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y){var p=/\'/g,e=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/ig,q=/^\s*expression\//i,u=/(\{([^\{\r\n]+)\})/g,z={attachments:"attachments",fields:"fields",media:"media",text:"text"},C={"short-date":"(datePattern: 'M/d/y', selector: 'date')","short-date-le":"(datePattern: 'd/M/y', selector: 'date')","long-month-day-year":"(datePattern: 'MMMM d, y', selector: 'date')","day-short-month-year":"(datePattern: 'd MMM y', selector: 'date')","long-date":"(datePattern: 'EEEE, MMMM d, y', selector: 'date')",
"short-date-short-time":"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-le-short-time":"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-short-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')","short-date-le-short-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')","short-date-long-time":"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')",
"short-date-le-long-time":"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')","short-date-long-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')","short-date-le-long-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')","long-month-year":"(datePattern: 'MMMM y', selector: 'date')","short-month-year":"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"};return h.createSubclass({declaredClass:"esri.widgets.Popup.PopupRendererViewModel",
properties:{content:{readOnly:!0},contentEnabled:!0,contentTypes:{readOnly:!0},formattedAttributes:{readOnly:!0},graphic:{},title:{readOnly:!0},view:{},waitingForContent:{readOnly:!0}},constructor:function(){this._handles=new k},initialize:function(){this._handles.add([g.init(this,["graphic","contentEnabled"],function(){this._updateGraphic(this.graphic,this.contentEnabled)}.bind(this))])},destroy:function(){this._handles.destroy();this._handles=null;this._clearRelatedInfo();this._cancelPromises();
this.graphic=null;this._set("title",null);this._set("content",null);this._set("waitingForContent",null)},content:null,contentEnabled:!0,contentTypes:z,formattedAttributes:null,graphic:null,title:"",view:null,waitingForContent:!1,_handles:null,_contentPromise:null,_contentElementPromises:null,_relatedRecordsPromise:null,_relatedRecordsQueryPromises:[],_relatedLayersInfo:null,_relatedInfo:null,_dateFormats:C,_addValuesToHref:function(a,b,c,d){b=this._trimString(b);return f.substitute(b&&"{"===b[0]?
c:d,a)},_cancelPromises:function(){this._contentElementPromises&&(this._contentElementPromises.forEach(function(a){a.cancel()},this),this._contentElementPromises=null);this._contentPromise&&(this._contentPromise.cancel(),this._contentPromise=null);this._relatedRecordsQueryPromises.forEach(function(a){a.cancel()});this._relatedRecordsQueryPromises.length=0;this._relatedRecordsPromise&&(this._relatedRecordsPromise.cancel(),this._relatedRecordsPromise=null)},_clearRelatedInfo:function(){this._relatedInfo=
this._relatedLayersInfo=null},_compileContent:function(a,c){var d=a.content;if(d&&(d.nodeName||d&&d&&"function"===typeof d.postMixInProperties&&"function"===typeof d.buildRendering&&"function"===typeof d.postCreate&&"function"===typeof d.startup||d&&d.isInstanceOf&&d.isInstanceOf(b)))return d;if("string"===typeof d)return this._compileText(a,{type:z.text,text:d}).text;if(Array.isArray(d))return d.map(function(b,d){d=(d=c&&c[d])&&d.value;switch(b.type){case z.attachments:return this._proxyAttachments(b,
d);case z.fields:return this._compileFields(a,b);case z.media:return this._compileMedia(a,b);case z.text:return this._compileText(a,b)}},this);if(d)try{throw new l(this.declaredClass+"::invalid content type.");}catch(E){console.warn(E.stack)}},_compileFields:function(a,b){b=t.clone(b);var c=(a=a.template)&&a.expressionInfos;a=a&&t.clone(a.fieldInfos);a=b.fieldInfos||a;var d=[];a&&a.forEach(function(a){var b=a.fieldName.toLowerCase();if(!a.hasOwnProperty("visible")||a.visible)b=this._isExpressionField(b)?
this._getExpressionInfo(c,b):null,a.label=b?b.title:a.label,d.push(a)},this);b.fieldInfos=d;return b},_compileMedia:function(a,b){b=t.clone(b);var c=b.mediaInfos,d=a.attributes,e=a.layer,g=this.formattedAttributes.global,h=a.substOptions,k,l;c&&(k=[],c.forEach(function(b){l=0;var c=b.value;switch(b.type){case "image":var p=c.sourceURL,p=p&&this._trimString(f.substitute(d,this._fixTokens(p,e)));l=!!p;break;case "pie-chart":case "line-chart":case "column-chart":case "bar-chart":var m,p=c.normalizeField;
c.fields=c.fields.map(function(a){return(m=this._getLayerFieldInfo(e,a))?m.name:a},this);p&&(m=this._getLayerFieldInfo(e,p),c.normalizeField=m?m.name:p);l=c.fields.some(function(a){return f.isDefined(d[a])||-1!==a.indexOf("relationships/")&&this._relatedInfo},this);break;default:return}if(l){b=t.clone(b);var c=b.value,p=b.title?this._processFieldsInLinks(this._fixTokens(b.title,e),d):"",q=b.caption?this._processFieldsInLinks(this._fixTokens(b.caption,e),d):"";b.title=p?this._trimString(f.substitute(g,
p,h)):"";b.caption=q?this._trimString(f.substitute(g,q,h)):"";if("image"===b.type)c.sourceURL=f.substitute(d,this._fixTokens(c.sourceURL,e)),c.linkURL&&(c.linkURL=this._trimString(f.substitute(d,this._fixTokens(c.linkURL,e))));else{var n,r=(p=a.template)&&p.fieldInfos;c.fields.forEach(function(a,b){if(-1!==a.indexOf("relationships/"))a=this._getRelatedChartInfos(e,r,a,c,d,h),Array.isArray(a)?c.fields=a:c.fields[b]=a;else{var f=d[a],f=void 0===f?null:f;n=d[c.normalizeField]||0;f&&n&&(f/=n);var g=r&&
this._getFieldInfo(r,a);c.fields[b]={y:f,tooltip:(g&&g.label||a)+":"+this._formatValue(f,{fieldInfos:r,fieldName:a,layer:e,substOptions:h,preventPlacesFormatting:!!n})}}},this)}k.push(b)}},this));b.mediaInfos=k;return b},_compileText:function(a,b){if((b=t.clone(b))&&b.text){var c=a.attributes,d=this.formattedAttributes.global,e=a.substOptions;a=this._processFieldsInLinks(this._fixTokens(b.text,a.layer),c);b.text=this._trimString(f.substitute(d,a,e))}return b},_compileTitle:function(a){var b="",c=
a.title,d=a.layer,e=a.attributes,g=a.substOptions,h=this.formattedAttributes.global;c&&("function"===typeof c&&(c=c.call(null,{graphic:a.graphic})),"string"===typeof c&&(a=this._processFieldsInLinks(this._fixTokens(c,d),e),b=this._trimString(f.substitute(h,a,g))));return b},_getExpressionInfo:function(a,b){if(this._isExpressionField(b)){b=b.replace(q,"");b=b.toLowerCase();var c;a.some(function(a){a.name.toLowerCase()===b&&(c=a);return!!c});return c}},_createGraphicInfo:function(a,b){var c=a.popupTemplate,
d=c&&c.title,e=c&&c.content,f=a.layer,g=f&&f._getDateOpts&&f._getDateOpts().properties,h=t.clone(a.attributes)||{};return{graphic:a,template:c,title:d,content:e,contentEnabled:b,layer:f,attributes:h,properties:g,substOptions:{dateFormat:{properties:g,formatter:"DateFormat"+C["short-date-short-time"]}}}},_fixTokens:function(a,b){return a.replace(u,function(a,c,d){return(a=this._getLayerFieldInfo(b,d))?"{"+a.name+"}":c}.bind(this))},_encodeAttributes:function(a){var b=t.clone(a)||{};Object.keys(b).forEach(function(a){var c=
b[a];"string"===typeof c&&(c=encodeURIComponent(c).replace(p,"\x26apos;"),b[a]=c)});return b},_formatAttributesToFieldInfos:function(a,b,c,d,e){a.forEach(function(f){var g=f.fieldName,h=this._getLayerFieldInfo(b,g);h&&(g=f.fieldName=h.name);e[g]=this._formatValue(e[g],{fieldInfos:a,fieldName:g,layer:b,substOptions:c});d&&f.format&&f.format.dateFormat&&(f=d.indexOf(g),-1<f&&d.splice(f,1))},this)},_getArcadeViewingMode:function(a){return a&&"local"===a.viewingMode?"localScene":"globalScene"},_formatAttributes:function(b,
c,d,e,g,h,k,l){var p=t.clone(g);k&&k.forEach(function(b){var c="expression/"+b.name;b=l[b.name];var d=this.view,d=d&&a.getViewInfo({viewingMode:"3d"===d.type?this._getArcadeViewingMode(d):"map",scale:d.scale,spatialReference:d.spatialReference});b=a.executeFunction(b&&b.compiledFunc,a.createExecContext(h,d));"string"===typeof b&&(b=y.encode(b));p[c]=b},this);this._relatedInfo&&Object.keys(this._relatedInfo).forEach(function(a){var b=this._relatedInfo[a];a=this._relatedLayersInfo[a];b&&(b.relatedFeatures.forEach(this._relatedFeaturesAttributes.bind(this,
a,g,p)),b.relatedStatsFeatures.forEach(this._relatedStatsAttributes.bind(this,a,g,p)))},this);b&&this._formatAttributesToFieldInfos(b,c,d,e,p);if(c){var m=c.typeIdField;Object.keys(g).forEach(function(a){if(-1===a.indexOf("relationships/")){var b=g[a];if(f.isDefined(b)){var d=this._getDomainName(c,h,a,b);f.isDefined(d)?p[a]=d:a===m&&(b=this._getTypeName(c,h,b),f.isDefined(b)&&(p[a]=b))}}},this)}return p},_formatValue:function(a,b){var c=b.fieldInfos,d=b.fieldName,e=b.substOptions,c=c&&this._getFieldInfo(c,
d),g=t.clone(c),c=b.preventPlacesFormatting;(b=this._getLayerFieldInfo(b.layer,d))&&"date"===b.type&&(b=g.format||{},b.dateFormat=b.dateFormat||"short-date-short-time",g.format=b);b=g&&g.format;d="number"===typeof a&&e.dateFormat.properties&&-1===e.dateFormat.properties.indexOf(d)&&(!b||!b.dateFormat);if(!f.isDefined(a)||!g||!f.isDefined(b))return d?this._forceLTR(a):a;var h="",k=[],g=b.hasOwnProperty("places")||b.hasOwnProperty("digitSeparator"),l=b.hasOwnProperty("digitSeparator")?b.digitSeparator:
!0;if(g)h="NumberFormat",f.isDefined(b.places)&&(!c||0<b.places)&&(k.push("places: "+Number(b.places)),h+="("+k.join(",")+")");else if(b.dateFormat)h="DateFormat"+C[b.dateFormat]||C["short-date-short-time"];else return d?this._forceLTR(a):a;a=f.substitute({myKey:a},"{myKey:"+h+"}",e)||"";g&&!l&&v.group&&(a=a.replace(new RegExp("\\"+v.group,"g"),""));return d?this._forceLTR(a):a},_forceLTR:function(a){return"\x26lrm;"+a},_getDomainName:function(a,b,c,d){return(a=a.getDomain&&a.getDomain(c,{feature:b}))&&
a.codedValues?a.getName(d):null},_getFieldInfo:function(a,b){b=b.toLowerCase();for(var c,d=0;d<a.length;d++){var e=a[d];if(e.fieldName&&e.fieldName.toLowerCase()===b){c=e;break}}return c},_getLayerFieldInfo:function(a,b){return b&&a&&a.getField?a.getField(b):null},_getTypeName:function(a,b){return(a=a.getType&&a.getType(b))&&a.name},_processFieldsInLinks:function(a,b){var c=this._encodeAttributes(b);a&&(a=a.replace(e,function(a,d,e){return this._addValuesToHref(a,d||e,b,c)}.bind(this)));return a},
_proxyAttachments:function(a,b){a=t.clone(a);b&&!(b instanceof l)&&b.attachmentInfos&&b.attachmentInfos.length&&(b=b.attachmentInfos.map(function(a){a.url=n.addProxy(a.url);return a},this),a.attachmentInfos=b);return a},_queryAttachments:function(a){var b=a.layer;if(!b)return m.resolve();"scene"===b.type&&b.companionFeatureLayer&&(b=b.companionFeatureLayer);var c=a.attributes;a=b&&b.objectIdField;c=c&&a&&c[a];if(a&&b.get("capabilities.data.supportsAttachment")&&c)return this._queryAttachmentInfos(b,
c)},_queryAttachmentInfos:function(a,b){var c=a.url+"/"+a.layerId+"/"+b+"/attachments",e=a.token||"";return d(c,{query:{f:"json",token:e},callbackParamName:"callback"}).then(function(a){a=a.data;a.attachmentInfos.forEach(function(a){a.url=c+"/"+a.id;e&&(a.url+="?token\x3d"+e);a.objectId=b});return a})},_queryContentElements:function(a){var b=a.content;if(!b||!Array.isArray(b))return m.resolve();var c=[],d={};b.forEach(function(b,e){b.type===z.attachments&&(b=this._queryAttachments(a))&&(d[e]=b,c.push(b))},
this);this._contentElementPromises=c;return 0===c.length?m.resolve():m.eachAlways(d).always(function(a){this._contentElementPromises=null;return a}.bind(this))},_trimString:function(a){return(a||"").trim()},_getContent:function(a){var b=a.template,b=b&&b.content;"function"===typeof b&&(b=b.call(null,{graphic:a.graphic}));return b&&"function"===typeof b.then?b:m.resolve(b)},_updateContent:function(a){var b;return a.contentEnabled?this._contentPromise=b=this._getContent(a).then(function(b){a.content=
b;return this._queryContentElements(a)}.bind(this)).then(function(b){this._set("content",this._compileContent(a,b))}.bind(this)).otherwise(function(a){console.log(this.declaredClass+"::error loading template",a)}.bind(this)).then(function(){this._contentPromise=null}.bind(this)):b=m.resolve()},_isExpressionField:function(a){return q.test(a)},_compileExpressions:function(b){if(b){var c={};b.forEach(function(b){c[b.name]={compiledFunc:a.createFunction(b.expression)}});return c}},_createFormattedAttributes:function(a){var b=
a.graphic,c=a.attributes,d=a.layer,e=a.template,f=e&&e.fieldInfos,g=e&&e.expressionInfos,h=this._compileExpressions(g),k=a.substOptions,l=a.properties,p={global:this._formatAttributes(f,d,k,l,c,b,g,h),content:[]};a=e&&e.content;Array.isArray(a)&&a.forEach(function(a,e){a.type===z.fields&&a.fieldInfos&&(p.content[e]=this._formatAttributes(a.fieldInfos,d,k,l,c,b,g,h))},this);return p},_queryGraphicInfo:function(a,b){var c=this._createGraphicInfo(a,b);return this._checkForRelatedRecords(c).then(function(){this._set("formattedAttributes",
this._createFormattedAttributes(c));this._set("title",this._compileTitle(c));return this._updateContent(c)}.bind(this))},_updateGraphic:function(a,b){this._handles&&(this._clearRelatedInfo(),this._cancelPromises(),this._set("title",""),this._set("content",null),this._set("formattedAttributes",null),this._set("waitingForContent",!1),a&&(this._set("waitingForContent",!0),this._relatedRecordsPromise=this._queryGraphicInfo(a,b).always(function(){this._relatedRecordsPromise=null;this._relatedRecordsQueryPromises.length=
0;this._set("waitingForContent",!1)}.bind(this))))},_getAllFieldInfos:function(a){var b=[],c=a.template,d=c&&c.fieldInfos;a=a.contentEnabled;d&&(b=b.concat(d));a&&(c=c&&c.content,Array.isArray(c)&&c.forEach(function(a){b=b.concat(a&&a.fieldInfos)},this));return b},_checkForRelatedRecords:function(a){var b=this._getAllFieldInfos(a).filter(function(a){return a&&a.fieldName&&-1!==a.fieldName.indexOf("relationships/")},this);return a.layer&&b&&0<b.length?this._getRelatedRecords({graphic:a.graphic,fieldsInfo:b}):
m.resolve()},_relatedFeaturesAttributes:function(a,b,c,d){Object.keys(d.attributes).forEach(function(e){if("esriRelCardinalityOneToOne"===a.relation.cardinality){var f=this._toRelatedFieldName([a.relation.id,e]);b[f]=c[f]=d.attributes[e]}},this)},_relatedStatsAttributes:function(a,b,c,d){Object.keys(d.attributes).forEach(function(e){var f=this._toRelatedFieldName([a.relation.id,e]);b[f]=c[f]=d.attributes[e]},this)},_getRelatedChartInfos:function(a,b,c,d,e,f){var g,h,k,l,p,m;g=[];m=this._fromRelatedFieldName(c);
p=m[0];h=this._relatedInfo[p];p=this._relatedLayersInfo[p];h&&h.relatedFeatures.forEach(function(h){var p=h.attributes,q;Object.keys(p).forEach(function(h){if(h===m[1]){q={};l=p[h];d.normalizeField&&(k=-1!==d.normalizeField.indexOf("relationships/")?p[this._fromRelatedFieldName(d.normalizeField)[1]]:e[d.normalizeField]);l&&k&&(l/=k);if(d.tooltipField)if(-1!==d.tooltipField.indexOf("relationships/"))h=this._fromRelatedFieldName(d.tooltipField)[1],h=p[h],q.tooltip=h+": "+this._formatValue(l,{fieldInfos:b,
fieldName:h,layer:a,substOptions:f,preventPlacesFormatting:!!k});else{if(h=this._getLayerFieldInfo(a,c))c=h.name;q.tooltip=c+": "+this._formatValue(l,{fieldInfos:b,fieldName:d.tooltipField,layer:a,substOptions:f,preventPlacesFormatting:!!k})}else q.tooltip=l;q.y=l;g.push(q)}},this)},this);return"esriRelCardinalityOneToMany"===p.relation.cardinality||"esriRelCardinalityManyToMany"===p.relation.cardinality?g:g[0]},_getRelatedRecords:function(a){var b=a.graphic;return this._relatedLayersInfo?this._queryRelatedLayers(b).then(function(a){this._setRelatedRecords(a);
return a}.bind(this)):this._getRelatedLayersInfo(a).then(function(a){Object.keys(a).forEach(function(b){a[b]&&(this._relatedLayersInfo[b].relatedLayerInfo=a[b].data)},this);return this._queryRelatedLayers(b).then(function(a){this._setRelatedRecords(a);return a}.bind(this))}.bind(this))},_getRelatedLayersInfo:function(a){var b=a.fieldsInfo,e,f={};e=a.graphic.layer;this._relatedLayersInfo||(this._relatedLayersInfo={});b.forEach(function(a){var b,d,f;b=this._fromRelatedFieldName(a.fieldName);d=b[0];
b=b[1];if(d){if(!this._relatedLayersInfo[d]){var g=e&&e.relationships;g&&g.some(function(a){if(a.id==d)return f=a,!0});f&&(this._relatedLayersInfo[d]={relation:f,relatedFields:[],outStatistics:[]})}this._relatedLayersInfo[d]&&(this._relatedLayersInfo[d].relatedFields.push(b),a.statisticType&&(a=new c({statisticType:a.statisticType,onStatisticField:b,outStatisticFieldName:b}),this._relatedLayersInfo[d].outStatistics.push(a)))}},this);Object.keys(this._relatedLayersInfo).forEach(function(a){var b;this._relatedLayersInfo[a]&&
(b=this._relatedLayersInfo[a].relation,b=e.url+"/"+b.relatedTableId,this._relatedLayersInfo[a].relatedLayerUrl=b,f[a]=d(b,{query:{f:"json"},callbackParamName:"callback"}))},this);return x(f)},_queryRelatedLayers:function(a){var b={};Object.keys(this._relatedLayersInfo).forEach(function(c){b[c]=this._queryRelatedLayer({graphic:a,relatedInfo:this._relatedLayersInfo[c]})},this);return x(b)},_queryRelatedLayer:function(a){var b,c,d,e,f,g,h,k,l;b=a.graphic;c=b.layer.layerId;h=a.relatedInfo;a=h.relatedLayerInfo;
k=h.relatedLayerUrl;l=h.relation;a&&a.relationships&&a.relationships.some(function(a){if(a.relatedTableId===parseInt(c,10))return d=a,!0});d&&(a.fields.some(function(a){if(a.name===d.keyField)return e=-1!==["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"].indexOf(a.type)?"number":"string",!0}),f="string"===e?d.keyField+"\x3d'"+b.attributes[l.keyField]+"'":d.keyField+"\x3d"+b.attributes[l.keyField],f=new r({where:f,outFields:h.relatedFields}),h.outStatistics&&
0<h.outStatistics.length&&a.supportsStatistics&&(g=new r({where:f.where,outFields:f.outFields,outStatistics:h.outStatistics})),a=new w({url:k}),f=[a.execute(f)],g&&f.push(a.execute(g)));this._relatedRecordsQueryPromises=this._relatedRecordsQueryPromises.concat(f);return x(f)},_setRelatedRecords:function(a){this._relatedInfo=[];Object.keys(a).forEach(function(b){if(a[b]){var c=a[b];this._relatedInfo[b]={relatedFeatures:c[0].features};f.isDefined(c[1])&&(this._relatedInfo[b].relatedStatsFeatures=c[1].features)}},
this)},_fromRelatedFieldName:function(a){return-1!==a.indexOf("relationships/")?a.split("/").slice(1):[]},_toRelatedFieldName:function(a){return a&&0<a.length?"relationships/"+a[0]+"/"+a[1]:""}})})},"esri/widgets/Widget":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/Evented ../core/HandleRegistry ../core/Logger ../core/watchUtils dojo/_base/lang dojo/dom ./libs/maquette/maquette ../core/Collection".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t){var x=d.getLogger("esri.widgets.Widget"),v=0;return function(b){function d(a,c){a=b.call(this)||this;a._attached=!1;a.className="";a.destroyed=!1;a.domNode=null;a.visible=!0;a._handles=new g;a.render=a.render.bind(a);return a}l(d,b);d.prototype.normalizeCtorArgs=function(a,b){a=c.mixin({},a);b&&(a.container=b);return a};d.prototype.initialize=function(){var b=this;this._handles.add(this._renderableProps.map(function(c){return a.init(b,c,function(a,b){var d=this;
t.isCollection(b)&&this._handles.remove(this.declaredClass+":"+c+"-collection-change-event-listener");t.isCollection(a)&&(a=a.on("change",function(){return d.scheduleRender()}),this._handles.add(a,this.declaredClass+":"+c+"-collection-change-event-listener"));this.scheduleRender()})}));this._delegatedEventNames.length&&this._handles.add(a.init(this,"viewModel",function(){b._get("viewModel")&&b._handles.remove("delegated-events");b._delegatedEventNames.map(function(a){return b.viewModel.on(a,function(c){b.emit(a,
c)})})}),"delegated-events");this.postInitialize();this._handles.add(a.whenOnce(this,"container",function(a){return b._attach(a)}))};d.prototype.postInitialize=function(){};d.prototype.destroy=function(){this.destroyed||(this.viewModel&&this.viewModel.destroy(),this._detach(this.container),this._handles.destroy(),this._set("destroyed",!0))};d.prototype.startup=function(){x.warn("Widget.startup() is deprecated and no longer needed")};Object.defineProperty(d.prototype,"container",{set:function(a){this._get("container")||
this._set("container",a)},enumerable:!0,configurable:!0});d.prototype.castContainer=function(a){return r.byId(a)};Object.defineProperty(d.prototype,"id",{get:function(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+v++},set:function(a){a&&this._set("id",a)},enumerable:!0,configurable:!0});d.prototype.scheduleRender=function(){this._projector.scheduleRender()};d.prototype.on=function(a,b){var c=this.inherited(arguments);this._handles.add(c);return c};d.prototype.own=
function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments));this._handles.add(a)};d.prototype.renderNow=function(){this._projector.renderNow()};d.prototype._attach=function(a){a&&(this._projector.merge(a,this.render),this._attached=!0)};d.prototype._detach=function(a){a&&this._attached&&(this._projector.detach(this.render),a.parentNode&&a.parentNode.removeChild(a),this._attached=!1)};k([f.shared(w.createProjector())],d.prototype,"_projector",void 0);k([f.shared([])],d.prototype,"_renderableProps",
void 0);k([f.shared([])],d.prototype,"_delegatedEventNames",void 0);k([f.property({value:null})],d.prototype,"container",null);k([f.cast("container")],d.prototype,"castContainer",null);k([f.property({readOnly:!0})],d.prototype,"destroyed",void 0);k([f.property({aliasOf:"container"})],d.prototype,"domNode",void 0);k([f.property({dependsOn:["container"]})],d.prototype,"id",null);k([f.property()],d.prototype,"viewModel",void 0);k([f.property()],d.prototype,"visible",void 0);return d=k([f.subclass("esri.widgets.Widget")],
d)}(f.declared(n,m))})},"esri/widgets/libs/maquette/maquette":function(){(function(b,h){"function"===typeof define&&define.amd?define(["exports"],h):"object"===typeof exports&&"string"!==typeof exports.nodeName?h(exports):h(b.maquette={})})(this,function(b){var h=[],l=function(a,b){var c={};Object.keys(a).forEach(function(b){c[b]=a[b]});b&&Object.keys(b).forEach(function(a){c[a]=b[a]});return c},k=function(a,b){return a.vnodeSelector!==b.vnodeSelector?!1:a.properties&&b.properties?a.properties.key!==
b.properties.key?!1:a.properties.bind===b.properties.bind:!a.properties&&!b.properties},f=function(a){return{vnodeSelector:"",properties:void 0,children:void 0,text:a.toString(),domNode:null}},n=function(a,b,c){for(var d=0,e=b.length;d<e;d++){var g=b[d];Array.isArray(g)?n(a,g,c):null!==g&&void 0!==g&&(g.hasOwnProperty("vnodeSelector")||(g=f(g)),c.push(g))}},m=function(){throw Error("Provide a transitions object to the projectionOptions to do animations");},g={namespace:void 0,eventHandlerInterceptor:void 0,
styleApplyer:function(a,b,c){a.style[b]=c},transitions:{enter:m,exit:m}},d=function(a){if("string"!==typeof a)throw Error("Style values must be strings");},a=function(a,b,c){if(b)for(var e=c.eventHandlerInterceptor,f=Object.keys(b),g=f.length,h=function(g){g=f[g];var h=b[g];if("className"===g)throw Error('Property "className" is not supported, use "class".');if("class"===g)h.split(/\s+/).forEach(function(b){return a.classList.add(b)});else if("classes"===g){var k=Object.keys(h),l=k.length;for(g=0;g<
l;g++){var p=k[g];h[p]&&a.classList.add(p)}}else if("styles"===g)for(k=Object.keys(h),l=k.length,g=0;g<l;g++){var p=k[g],m=h[p];m&&(d(m),c.styleApplyer(a,p,m))}else"key"!==g&&null!==h&&void 0!==h&&(k=typeof h,"function"===k?0===g.lastIndexOf("on",0)&&(e&&(h=e(g,h,a,b)),"oninput"===g&&function(){var a=h;h=function(b){a.apply(this,[b]);b.target["oninput-value"]=b.target.value}}(),a[g]=h):"string"===k&&"value"!==g&&"innerHTML"!==g?"http://www.w3.org/2000/svg"===c.namespace&&"href"===g?a.setAttributeNS("http://www.w3.org/1999/xlink",
g,h):a.setAttribute(g,h):a[g]=h)},k=0;k<g;k++)h(k)},c=function(a,b){var c=a.domNode;if(a.properties){var d=a.properties.exitAnimation;if(d){c.style.pointerEvents="none";var f=function(){c.parentNode&&c.parentNode.removeChild(c)};"function"===typeof d?d(c,f,a.properties):b.exit(a.domNode,a.properties,d,f);return}}c.parentNode&&c.parentNode.removeChild(c)},r=function(a,b,c,d){var e=a[b];if(""!==e.vnodeSelector){var f=e.properties;if(!(f&&(void 0===f.key?f.bind:f.key)))for(f=0;f<a.length;f++)if(f!==
b&&k(a[f],e)){if("added"===d)throw Error(c.vnodeSelector+" had a "+e.vnodeSelector+" child added, but there is now more than one. You must add unique key properties to make them distinguishable.");throw Error(c.vnodeSelector+" had a "+e.vnodeSelector+" child removed, but there were more than one. You must add unique key properties to make them distinguishable.");}}},w,t,x=function(b,c,d){var e=c.children;if(e)for(var f=0;f<e.length;f++)w(e[f],b,void 0,d);c.text&&(b.textContent=c.text);a(b,c.properties,
d);c.properties&&c.properties.afterCreate&&c.properties.afterCreate.apply(c.properties.bind||c.properties,[b,d,c.vnodeSelector,c.properties,c.children])};w=function(a,b,c,d){var e,f,g,h=0,k=a.vnodeSelector,p=b.ownerDocument;if(""===k)e=a.domNode=p.createTextNode(a.text),void 0!==c?b.insertBefore(e,c):b.appendChild(e);else{for(f=0;f<=k.length;++f)if(g=k.charAt(f),f===k.length||"."===g||"#"===g)g=k.charAt(h-1),h=k.slice(h,f),"."===g?e.classList.add(h):"#"===g?e.id=h:("svg"===h&&(d=l(d,{namespace:"http://www.w3.org/2000/svg"})),
void 0!==d.namespace?e=a.domNode=p.createElementNS(d.namespace,h):(e=a.domNode=a.domNode||p.createElement(h),"input"===h&&a.properties&&void 0!==a.properties.type&&e.setAttribute("type",a.properties.type)),void 0!==c?b.insertBefore(e,c):e.parentNode!==b&&b.appendChild(e)),h=f+1;x(e,a,d)}};t=function(a,b,e){var f=a.domNode;if(a===b)return!1;var g=!1;if(""===b.vnodeSelector){if(b.text!==a.text)return a=f.ownerDocument.createTextNode(b.text),f.parentNode.replaceChild(a,f),b.domNode=a,!0}else{0===b.vnodeSelector.lastIndexOf("svg",
0)&&(e=l(e,{namespace:"http://www.w3.org/2000/svg"}));a.text!==b.text&&(g=!0,void 0===b.text?f.removeChild(f.firstChild):f.textContent=b.text);var m;m=a.children;var p=b.children,n=e;if(m===p)m=!1;else{m=m||h;for(var p=p||h,v=m.length,x=p.length,y=n.transitions,I=0,J=0,U=!1;J<x;){var P=I<v?m[I]:void 0,H=p[J];if(void 0!==P&&k(P,H))U=t(P,H,n)||U,I++;else{b:{var P=m,K=H;if(""!==K.vnodeSelector)for(var G=I+1;G<P.length;G++)if(k(P[G],K)){P=G;break b}P=-1}if(0<=P){for(;I<P;I++)c(m[I],y),r(m,I,b,"removed");
U=t(m[P],H,n)||U;I=P+1}else w(H,f,I<v?m[I].domNode:void 0,n),P=y,H.properties&&(K=H.properties.enterAnimation)&&("function"===typeof K?K(H.domNode,H.properties):P.enter(H.domNode,H.properties,K)),r(p,J,b,"added")}J++}if(v>I)for(;I<v;I++)c(m[I],y),r(m,I,b,"removed");m=U}g=m||g;m=a.properties;p=b.properties;n=e;if(p){U=!1;v=Object.keys(p);x=v.length;for(y=0;y<x;y++)if(H=v[y],J=p[H],I=m[H],"class"===H){if(I!==J)throw Error('"class" property may not be updated. Use the "classes" property for conditional css classes.');
}else if("classes"===H)for(P=f.classList,K=Object.keys(J),G=K.length,H=0;H<G;H++){var S=K[H],O=!!J[S];O!==!!I[S]&&(U=!0,O?P.add(S):P.remove(S))}else if("styles"===H)for(P=Object.keys(J),K=P.length,H=0;H<K;H++)G=P[H],S=J[G],S!==I[G]&&(U=!0,S?(d(S),n.styleApplyer(f,G,S)):n.styleApplyer(f,G,""));else if(J||"string"!==typeof I||(J=""),"value"===H)P=f[H],P!==J&&(f["oninput-value"]?P===f["oninput-value"]:J!==I)&&(f[H]=J,f["oninput-value"]=void 0),J!==I&&(U=!0);else if(J!==I){U=typeof J;if("function"===
U)throw Error("Functions may not be updated on subsequent renders (property: "+H+"). Hint: declare event handler functions outside the render() function.");"string"===U&&"innerHTML"!==H?"http://www.w3.org/2000/svg"===n.namespace&&"href"===H?f.setAttributeNS("http://www.w3.org/1999/xlink",H,J):"role"===H&&""===J?f.removeAttribute(H):f.setAttribute(H,J):f[H]!==J&&(f[H]=J);U=!0}m=U}else m=void 0;g=m||g;b.properties&&b.properties.afterUpdate&&b.properties.afterUpdate.apply(b.properties.bind||b.properties,
[f,e,b.vnodeSelector,b.properties,b.children])}g&&b.properties&&b.properties.updateAnimation&&b.properties.updateAnimation(f,b.properties,a.properties);b.domNode=a.domNode;return!1};var v=function(a,b){return{update:function(c){if(a.vnodeSelector!==c.vnodeSelector)throw Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");t(a,c,b);a=c},domNode:a.domNode}};b.h=function(a){var b=arguments[1];if("string"!==typeof a)throw Error();
var c=1;!b||b.hasOwnProperty("vnodeSelector")||Array.isArray(b)||"object"!==typeof b?b=void 0:c=2;var d,g,h=arguments.length;if(h===c+1){var k=arguments[c];"string"===typeof k?d=k:void 0!==k&&null!==k&&1===k.length&&"string"===typeof k[0]&&(d=k[0])}if(void 0===d)for(g=[];c<h;c++)k=arguments[c],null!==k&&void 0!==k&&(Array.isArray(k)?n(a,k,g):k.hasOwnProperty("vnodeSelector")?g.push(k):g.push(f(k)));return{vnodeSelector:a,properties:b,children:g,text:""===d?void 0:d,domNode:null}};b.dom={create:function(a,
b){b=l(g,b);w(a,document.createElement("div"),void 0,b);return v(a,b)},append:function(a,b,c){c=l(g,c);w(b,a,void 0,c);return v(b,c)},insertBefore:function(a,b,c){c=l(g,c);w(b,a.parentNode,a,c);return v(b,c)},merge:function(a,b,c){c=l(g,c);b.domNode=a;x(a,b,c);return v(b,c)},replace:function(a,b,c){c=l(g,c);w(b,a.parentNode,a,c);a.parentNode.removeChild(a);return v(b,c)}};b.createCache=function(){var a,b;return{invalidate:function(){a=b=void 0},result:function(c,d){if(a)for(var e=0;e<c.length;e++)a[e]!==
c[e]&&(b=void 0);b||(b=d(),a=c);return b}}};b.createMapping=function(a,b,c){var d=[],e=[];return{results:e,map:function(f){for(var g=f.map(a),h=e.slice(),k=0,l=0;l<f.length;l++){var m=f[l],p=g[l];if(p===d[k])e[l]=h[k],c(m,h[k],l),k++;else{for(var n=!1,q=1;q<d.length+1;q++){var t=(k+q)%d.length;if(d[t]===p){e[l]=h[t];c(f[l],h[t],l);k=t+1;n=!0;break}}n||(e[l]=b(m,l))}}e.length=f.length;d=g}}};b.createProjector=function(a){var c,d=l(g,a);d.eventHandlerInterceptor=function(a,b,d,e){return function(){c.scheduleRender();
return b.apply(e.bind||this,arguments)}};var f=!0,h,k=!1,m=[],n=[],t=function(){h=void 0;if(f){f=!1;for(var a=0;a<m.length;a++){var b=n[a]();m[a].update(b)}f=!0}};return c={renderNow:t,scheduleRender:function(){h||k||(h=requestAnimationFrame(t))},stop:function(){h&&(cancelAnimationFrame(h),h=void 0);k=!0},resume:function(){k=!1;f=!0;c.scheduleRender()},append:function(a,c){m.push(b.dom.append(a,c(),d));n.push(c)},insertBefore:function(a,c){m.push(b.dom.insertBefore(a,c(),d));n.push(c)},merge:function(a,
c){m.push(b.dom.merge(a,c(),d));n.push(c)},replace:function(a,c){m.push(b.dom.replace(a,c(),d));n.push(c)},detach:function(a){for(var b=0;b<n.length;b++)if(n[b]===a)return n.splice(b,1),m.splice(b,1)[0];throw Error("renderMaquetteFunction was not found");}}}})},"dojox/html/entities":function(){define(["dojo/_base/lang"],function(b){var h=b.getObject("dojox.html.entities",!0),l=function(b,h){var f,g;if(h._encCache&&h._encCache.regexp&&h._encCache.mapper&&h.length==h._encCache.length)f=h._encCache.mapper,
g=h._encCache.regexp;else{f={};g=["["];var d;for(d=0;d<h.length;d++)f[h[d][0]]="\x26"+h[d][1]+";",g.push(h[d][0]);g.push("]");g=new RegExp(g.join(""),"g");h._encCache={mapper:f,regexp:g,length:h.length}}return b=b.replace(g,function(a){return f[a]})},k=function(b,h){var f,g;if(h._decCache&&h._decCache.regexp&&h._decCache.mapper&&h.length==h._decCache.length)f=h._decCache.mapper,g=h._decCache.regexp;else{f={};g=["("];var d;for(d=0;d<h.length;d++){var a="\x26"+h[d][1]+";";d&&g.push("|");f[a]=h[d][0];
g.push(a)}g.push(")");g=new RegExp(g.join(""),"g");h._decCache={mapper:f,regexp:g,length:h.length}}return b=b.replace(g,function(a){return f[a]})};h.html=[["\x26","amp"],['"',"quot"],["\x3c","lt"],["\x3e","gt"],["\u00a0","nbsp"]];h.latin=[["\u00a1","iexcl"],["\u00a2","cent"],["\u00a3","pound"],["\u20ac","euro"],["\u00a4","curren"],["\u00a5","yen"],["\u00a6","brvbar"],["\u00a7","sect"],["\u00a8","uml"],["\u00a9","copy"],["\u00aa","ordf"],["\u00ab","laquo"],["\u00ac","not"],["\u00ad","shy"],["\u00ae",
"reg"],["\u00af","macr"],["\u00b0","deg"],["\u00b1","plusmn"],["\u00b2","sup2"],["\u00b3","sup3"],["\u00b4","acute"],["\u00b5","micro"],["\u00b6","para"],["\u00b7","middot"],["\u00b8","cedil"],["\u00b9","sup1"],["\u00ba","ordm"],["\u00bb","raquo"],["\u00bc","frac14"],["\u00bd","frac12"],["\u00be","frac34"],["\u00bf","iquest"],["\u00c0","Agrave"],["\u00c1","Aacute"],["\u00c2","Acirc"],["\u00c3","Atilde"],["\u00c4","Auml"],["\u00c5","Aring"],["\u00c6","AElig"],["\u00c7","Ccedil"],["\u00c8","Egrave"],
["\u00c9","Eacute"],["\u00ca","Ecirc"],["\u00cb","Euml"],["\u00cc","Igrave"],["\u00cd","Iacute"],["\u00ce","Icirc"],["\u00cf","Iuml"],["\u00d0","ETH"],["\u00d1","Ntilde"],["\u00d2","Ograve"],["\u00d3","Oacute"],["\u00d4","Ocirc"],["\u00d5","Otilde"],["\u00d6","Ouml"],["\u00d7","times"],["\u00d8","Oslash"],["\u00d9","Ugrave"],["\u00da","Uacute"],["\u00db","Ucirc"],["\u00dc","Uuml"],["\u00dd","Yacute"],["\u00de","THORN"],["\u00df","szlig"],["\u00e0","agrave"],["\u00e1","aacute"],["\u00e2","acirc"],
["\u00e3","atilde"],["\u00e4","auml"],["\u00e5","aring"],["\u00e6","aelig"],["\u00e7","ccedil"],["\u00e8","egrave"],["\u00e9","eacute"],["\u00ea","ecirc"],["\u00eb","euml"],["\u00ec","igrave"],["\u00ed","iacute"],["\u00ee","icirc"],["\u00ef","iuml"],["\u00f0","eth"],["\u00f1","ntilde"],["\u00f2","ograve"],["\u00f3","oacute"],["\u00f4","ocirc"],["\u00f5","otilde"],["\u00f6","ouml"],["\u00f7","divide"],["\u00f8","oslash"],["\u00f9","ugrave"],["\u00fa","uacute"],["\u00fb","ucirc"],["\u00fc","uuml"],
["\u00fd","yacute"],["\u00fe","thorn"],["\u00ff","yuml"],["\u0192","fnof"],["\u0391","Alpha"],["\u0392","Beta"],["\u0393","Gamma"],["\u0394","Delta"],["\u0395","Epsilon"],["\u0396","Zeta"],["\u0397","Eta"],["\u0398","Theta"],["\u0399","Iota"],["\u039a","Kappa"],["\u039b","Lambda"],["\u039c","Mu"],["\u039d","Nu"],["\u039e","Xi"],["\u039f","Omicron"],["\u03a0","Pi"],["\u03a1","Rho"],["\u03a3","Sigma"],["\u03a4","Tau"],["\u03a5","Upsilon"],["\u03a6","Phi"],["\u03a7","Chi"],["\u03a8","Psi"],["\u03a9",
"Omega"],["\u03b1","alpha"],["\u03b2","beta"],["\u03b3","gamma"],["\u03b4","delta"],["\u03b5","epsilon"],["\u03b6","zeta"],["\u03b7","eta"],["\u03b8","theta"],["\u03b9","iota"],["\u03ba","kappa"],["\u03bb","lambda"],["\u03bc","mu"],["\u03bd","nu"],["\u03be","xi"],["\u03bf","omicron"],["\u03c0","pi"],["\u03c1","rho"],["\u03c2","sigmaf"],["\u03c3","sigma"],["\u03c4","tau"],["\u03c5","upsilon"],["\u03c6","phi"],["\u03c7","chi"],["\u03c8","psi"],["\u03c9","omega"],["\u03d1","thetasym"],["\u03d2","upsih"],
["\u03d6","piv"],["\u2022","bull"],["\u2026","hellip"],["\u2032","prime"],["\u2033","Prime"],["\u203e","oline"],["\u2044","frasl"],["\u2118","weierp"],["\u2111","image"],["\u211c","real"],["\u2122","trade"],["\u2135","alefsym"],["\u2190","larr"],["\u2191","uarr"],["\u2192","rarr"],["\u2193","darr"],["\u2194","harr"],["\u21b5","crarr"],["\u21d0","lArr"],["\u21d1","uArr"],["\u21d2","rArr"],["\u21d3","dArr"],["\u21d4","hArr"],["\u2200","forall"],["\u2202","part"],["\u2203","exist"],["\u2205","empty"],
["\u2207","nabla"],["\u2208","isin"],["\u2209","notin"],["\u220b","ni"],["\u220f","prod"],["\u2211","sum"],["\u2212","minus"],["\u2217","lowast"],["\u221a","radic"],["\u221d","prop"],["\u221e","infin"],["\u2220","ang"],["\u2227","and"],["\u2228","or"],["\u2229","cap"],["\u222a","cup"],["\u222b","int"],["\u2234","there4"],["\u223c","sim"],["\u2245","cong"],["\u2248","asymp"],["\u2260","ne"],["\u2261","equiv"],["\u2264","le"],["\u2265","ge"],["\u2282","sub"],["\u2283","sup"],["\u2284","nsub"],["\u2286",
"sube"],["\u2287","supe"],["\u2295","oplus"],["\u2297","otimes"],["\u22a5","perp"],["\u22c5","sdot"],["\u2308","lceil"],["\u2309","rceil"],["\u230a","lfloor"],["\u230b","rfloor"],["\u2329","lang"],["\u232a","rang"],["\u25ca","loz"],["\u2660","spades"],["\u2663","clubs"],["\u2665","hearts"],["\u2666","diams"],["\u0152","OElig"],["\u0153","oelig"],["\u0160","Scaron"],["\u0161","scaron"],["\u0178","Yuml"],["\u02c6","circ"],["\u02dc","tilde"],["\u2002","ensp"],["\u2003","emsp"],["\u2009","thinsp"],["\u200c",
"zwnj"],["\u200d","zwj"],["\u200e","lrm"],["\u200f","rlm"],["\u2013","ndash"],["\u2014","mdash"],["\u2018","lsquo"],["\u2019","rsquo"],["\u201a","sbquo"],["\u201c","ldquo"],["\u201d","rdquo"],["\u201e","bdquo"],["\u2020","dagger"],["\u2021","Dagger"],["\u2030","permil"],["\u2039","lsaquo"],["\u203a","rsaquo"]];h.encode=function(b,k){b&&(k?b=l(b,k):(b=l(b,h.html),b=l(b,h.latin)));return b};h.decode=function(b,l){b&&(l?b=k(b,l):(b=k(b,h.html),b=k(b,h.latin)));return b};return h})},"esri/layers/support/labelingInfo":function(){define(["require",
"exports","./LabelClass"],function(b,h,l){Object.defineProperty(h,"__esModule",{value:!0});var k=/\[([^\[\]]+)\]/ig;h.reader=function(b,h,m){var f=this;return b?b.map(function(b){var a=new l;a.read(b,m);if(a.labelExpression){var c=h.fields||h.layerDefinition&&h.layerDefinition.fields||f.fields;a.labelExpression=a.labelExpression.replace(k,function(a,b){a:if(c){a=b.toLowerCase();for(var d=0;d<c.length;d++){var f=c[d].name;if(f.toLowerCase()===a){b=f;break a}}}return"["+b+"]"})}return a}):null}})},
"esri/layers/support/commonProperties":function(){define(["require","exports","../../core/accessorSupport/write","../../core/accessorSupport/utils","../../core/accessorSupport/PropertyOrigin"],function(b,h,l,k,f){Object.defineProperty(h,"__esModule",{value:!0});h.screenSizePerspectiveEnabled={type:Boolean,value:!0,json:{origins:{webScene:{read:{source:["id","url","layerType"],reader:function(b,h){if(null==h.screenSizePerspective&&"defaults"===this.originOf("screenSizePerspectiveEnabled"))k.getProperties(this).store.set("screenSizePerspectiveEnabled",
!1,f.OriginId.DEFAULTS);else return h.screenSizePerspective}},write:{ignoreOrigin:!0,target:"screenSizePerspective",writer:function(b,f,g,d){"defaults"===this.originOf("screenSizePerspectiveEnabled")&&b?f[g]=b:l.willPropertyWrite(this,"screenSizePerspectiveEnabled",{},d)&&(f[g]=b)}}}}}}})},"esri/plugins/popupManager":function(){define(["../views/PopupManager"],function(b){return{add:function(h,l){h.popupManager||(h.popupManager=new b(l),h.popupManager.view=h)},remove:function(b){var h=b.popupManager;
h&&(h.destroy(),b.popupManager=null)}}})},"esri/views/PopupManager":function(){define("require ../core/promiseUtils dojo/_base/array dojo/on dojo/Deferred dojo/promise/all ../layers/support/layerUtils ../geometry/support/scaleUtils ../geometry/Extent ../tasks/support/Query ../layers/GroupLayer ../core/Accessor".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r){var w;return r.createSubclass({declaredClass:"esri.views.PopupManager",properties:{map:{dependsOn:["view.map"],readOnly:!0}},constructor:function(){this._featureLayersCache=
{}},destroy:function(){this._featureLayersCache={};this.view=null},_clickHandle:null,_featureLayersCache:null,enabled:!1,_enabledSetter:function(a){this._clickHandle&&(a?this._clickHandle.resume():this._clickHandle.pause());this._set("enabled",a)},_mapGetter:function(){return this.get("view.map")||null},view:null,_viewSetter:function(a){this._clickHandle&&(this._clickHandle.remove(),this._clickHandle=null);a&&(this._clickHandle=k.pausable(a,"click",this._clickHandler.bind(this)),this.enabled||this._clickHandle.pause());
this._set("view",a)},getMapLayer:function(a){var b;if(a&&(b=a.findLayerById())&&(a=b.id,this._featureLayersCache[a])){var c=a.lastIndexOf("_");-1<c&&(a=a.substring(0,c),b=this.map.findLayerById(a))}return b},_closePopup:function(){var a=this.get("view.popup");a&&(a.clear(),a.close())},_showPopup:function(b,k){function m(a){return e.allLayerViews.find(function(b){return b.layer===a})}function n(a){if(null==a)return!1;var b=m(a);return null==b?!1:a.loaded&&!b.suspended&&(a.popupEnabled&&a.popupTemplate||
"graphics"===a.type||"geo-rss"===a.type||"map-notes"===a.type||"kml"===a.type||b.getPopupData)}function p(a){return(a=m(a))&&a.hasDraped}var e=this.view,q=e.popup,t=this,r=[],x="3d"===e.type;l.forEach(this.map.layers.toArray(),function(a){a.isInstanceOf(c)?l.forEach(a.layers.toArray(),function(a){!n(a)||x&&!p(a)||r.push(a)}):!n(a)||x&&!p(a)||r.push(a)});0<e.graphics.length&&r.push(e.graphics);(k&&e.graphics.includes(k)?k.popupTemplate:!k||n(k.layer))||(k=null);if(r.length||k){var w=[],F=!!k,D=t._calculateClickTolerance(r),
E=b.mapPoint;if(E){var I=1;e.state&&(I=e.state.resolution);var J=e.basemapTerrain;J&&J.overlayManager&&(I=J.overlayManager.overlayPixelSizeInMapUnits(E));D*=I;J&&!J.spatialReference.equals(e.spatialReference)&&(D*=g.getMetersPerUnitForSR(J.spatialReference)/g.getMetersPerUnitForSR(e.spatialReference));var J=E.clone().offset(-D,-D),E=E.clone().offset(D,D),U=new d(Math.min(J.x,E.x),Math.min(J.y,E.y),Math.max(J.x,E.x),Math.max(J.y,E.y),e.spatialReference),E=function(c){var d;if("imagery"===c.type){d=
new a;d.geometry=b.mapPoint;var e=m(c),f={rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0};f.layerView=e;d=c.queryVisibleRasters(d,f).then(function(a){F=F||0<a.length;return a})}else if("csv"===c.type||!t._featureLayersCache[c.id]&&"function"!==typeof c.queryFeatures){if("map-image"===c.type||"wms"===c.type)return e=m(c),e.getPopupData(U);var f=[],g;"esri.core.Collection\x3cesri.Graphic\x3e"===c.declaredClass?(e=c,g=!0):"graphics"===c.type?(e=c.graphics,g=!0):(e=(e=m(c))&&e.loadedGraphics,
g=!1);e&&(f=e.filter(function(a){return a&&(!g||a.popupTemplate)&&a.visible&&U.intersects(a.geometry)}).toArray());0<f.length&&(F=!0,d="scene"===c.type?t._fetchSceneAttributes(c,f):h.resolve(f))}else e=c.createQuery(),e.geometry=U,d=c.queryFeatures(e).then(function(a){a=a.features;if(k&&k.layer===c&&c.objectIdField){var b=c.objectIdField,d=k.attributes[b];a=a.filter(function(a){return a.attributes[b]!==d})}if(!k&&"function"===typeof m(c).getGraphics3DGraphics){var e=[],f=m(c).getGraphics3DGraphics(),
g;for(g in f)e.push(f[g].graphic.attributes[c.objectIdField]);a=a.filter(function(a){return-1!==e.indexOf(a.attributes[c.objectIdField])})}F=F||0<a.length;return a});return d};if(x&&!k||!x)var w=r.map(E).filter(function(a){return!!a}),P=function(a){return a.reduce(function(a,b){return a.concat(b.items?P(b.items):b)},[])},w=P(w);k&&(k.layer&&"scene"===k.layer.type?w.unshift(this._fetchSceneAttributes(k.layer,[k])):k.popupTemplate&&(E=new f,w.unshift(E.resolve([k]))));l.some(w,function(a){return!a.isFulfilled()})||
F?w.length&&q.open({promises:w,location:b.mapPoint}):t._closePopup()}else t._closePopup()}else t._closePopup()},_fetchSceneAttributes:function(a,b){return this.view.whenLayerView(a).then(function(c){var d=this._getOutFields(a.popupTemplate),f=b.map(function(a){return c.whenGraphicAttributes(a,d).otherwise(function(){return a})});return h.eachAlways(f)}.bind(this)).then(function(a){return a.map(function(a){return a.value})})},_getSubLayerFeatureLayers:function(a,c){var d=c||new f,g=[];c=a.length;var h=
Math.floor(this.view.extent.width/this.view.width),e=this.view.scale,q=!1,t=this,r=0;a:for(;r<c;r++){var x=a[r],B=x.dynamicLayerInfos||x.layerInfos;if(B){var F=null;x._params&&(x._params.layers||x._params.dynamicLayers)&&(F=x.visibleLayers);for(var F=m._getVisibleLayers(B,F),D=m._getLayersForScale(e,B),E=B.length,I=0;I<E;I++){var J=B[I],U=J.id,P=x.popupTemplates[U];if(!J.subLayerIds&&P&&P.popupTemplate&&-1<l.indexOf(F,U)&&-1<l.indexOf(D,U)){if(!w){q=!0;break a}var H=x.id+"_"+U,K=this._featureLayersCache[H];
K&&K.loadError||(K||((K=P.layerUrl)||(K=J.source?this._getLayerUrl(x.url,"/dynamicLayer"):this._getLayerUrl(x.url,U)),K=new w(K,{id:H,drawMode:!1,mode:w.MODE_SELECTION,outFields:this._getOutFields(P.popupTemplate),resourceInfo:P.resourceInfo,source:J.source}),this._featureLayersCache[H]=K),K.setDefinitionExpression(x.layerDefinitions&&x.layerDefinitions[U]),K.setGDBVersion(x.gdbVersion),K.popupTemplate=P.popupTemplate,K.setMaxAllowableOffset(h),K.setUseMapTime(!!x.useMapTime),x.layerDrawingOptions&&
x.layerDrawingOptions[U]&&x.layerDrawingOptions[U].renderer&&K.setRenderer(x.layerDrawingOptions[U].renderer),g.push(K))}}}}if(q){var G=new f;b(["../layers/FeatureLayer"],function(a){w=a;G.resolve()});G.then(function(){t._getSubLayerFeatureLayers(a,d)})}else{var S=[];l.forEach(g,function(a){if(!a.loaded){var b=new f;k.once(a,"load, error",function(){b.resolve()});S.push(b.promise)}});S.length?n(S).then(function(){g=l.filter(g,function(a){return!a.loadError&&a.isVisibleAtScale(e)});d.resolve(g)}):
(g=l.filter(g,function(a){return a.isVisibleAtScale(e)}),d.resolve(g))}return d.promise},_getLayerUrl:function(a,b){var c=a.indexOf("?");return-1===c?a+"/"+b:a.substring(0,c)+"/"+b+a.substring(c)},_getOutFields:function(a){var b=["*"];if("esri.PopupTemplate"===a.declaredClass){var c=null==a.content||Array.isArray(a.content)&&a.content.every(function(a){return"attachments"===a.type||"fields"===a.type&&null==a.fieldInfos||"text"===a.type&&-1===a.text.indexOf("{")});a.fieldInfos&&!a.expressionInfos&&
c&&(b=[],l.forEach(a.fieldInfos,function(a){var c=a.fieldName&&a.fieldName.toLowerCase();c&&"shape"!==c&&0!==c.indexOf("relationships/")&&b.push(a.fieldName)}))}return b},_calculateClickTolerance:function(a){var b=6;l.forEach(a,function(a){if(a=a.renderer)"simple"===a.type?((a=a.symbol)&&a.xoffset&&(b=Math.max(b,Math.abs(a.xoffset))),a&&a.yoffset&&(b=Math.max(b,Math.abs(a.yoffset)))):"unique-value"!==a.type&&"class-breaks"!==a.type||l.forEach(a.uniqueValueInfos||a.classBreakInfos,function(a){(a=a.symbol)&&
a.xoffset&&(b=Math.max(b,Math.abs(a.xoffset)));a&&a.yoffset&&(b=Math.max(b,Math.abs(a.yoffset)))})});return b},_clickHandler:function(a){function b(a){return d.allLayerViews.find(function(b){return b.layer===a})}var d=this.view,f=a.screenPoint,g=this;if(0===a.button&&d.popup&&d.ready){var e="3d"===d.type,h=d.map.allLayers.some(function(a){if(a.isInstanceOf(c))return!1;var d;null==a?d=!1:(d=b(a),d=null==d?!1:a.loaded&&!d.suspended&&(a.popupEnabled&&a.popupTemplate||"graphics"===a.type||d.getPopupData));
d&&!(d=!e)&&(d=(a=b(a))&&a.hasDraped);return d?!0:!1});null!=f?this.view.hitTest(f.x,f.y).then(function(b){h||0<b.results.length?g._showPopup(a,0<b.results.length?b.results[0].graphic:null):g._closePopup()}):g._showPopup(a)}}})})},"esri/layers/support/layerUtils":function(){define(["dojo/_base/array"],function(b){return{_serializeLayerDefinitions:function(h){var l=[],k=!1,f=/[:;]/;if(h&&(b.forEach(h,function(b,g){b&&(l.push([g,b]),!k&&f.test(b)&&(k=!0))}),0<l.length)){var n;k?(n={},b.forEach(l,function(b){n[b[0]]=
b[1]}),n=JSON.stringify(n)):(n=[],b.forEach(l,function(b){n.push(b[0]+":"+b[1])}),n=n.join(";"));return n}return null},_serializeTimeOptions:function(h,l){if(h){var k=[];b.forEach(h,function(f,h){f&&(f=f.toJSON(),l&&-1!==b.indexOf(l,h)&&(f.useTime=!1),k.push('"'+h+'":'+JSON.stringify(f)))});if(k.length)return"{"+k.join(",")+"}"}},_getVisibleLayers:function(h,l){var k=[],f,n;if(!h)return k;if(l)for(k=l.concat(),n=0;n<h.length;n++)l=h[n],f=b.indexOf(h,l.id),l.subLayerIds&&-1<f&&(k.splice(f,1),k=k.concat(l.subLayerIds));
else k=this._getDefaultVisibleLayers(h);return k},_getDefaultVisibleLayers:function(h){var l=[],k;if(!h)return l;for(k=0;k<h.length;k++)0<=h[k].parentLayerId&&-1===b.indexOf(l,h[k].parentLayerId)&&b.some(h,function(b){return b.id===h[k].parentLayerId})||h[k].defaultVisibility&&l.push(h[k].id);return l},_getLayersForScale:function(h,l){var k=[];if(0<h&&l){var f;for(f=0;f<l.length;f++)if(!(0<=l[f].parentLayerId&&-1===b.indexOf(k,l[f].parentLayerId)&&b.some(l,function(b){return b.id===l[f].parentLayerId}))&&
0<=l[f].id){var n=!0,m=l[f].maxScale,g=l[f].minScale;if(0<m||0<g)0<m&&0<g?n=m<=h&&h<=g:0<m?n=m<=h:0<g&&(n=h<=g);n&&k.push(l[f].id)}}return k}}})},"esri/layers/GroupLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Layer ../core/MultiOriginJSONSupport ./mixins/PortalLayer ./mixins/OperationalLayer ../support/LayersMixin ../core/accessorSupport/utils ../core/accessorSupport/decorators".split(" "),function(b,h,l,k,f,n,m,g,d,a,c){return function(b){function d(a){a=
b.call(this)||this;a._visibilityHandles={};a.fullExtent=void 0;a.operationalLayerType="GroupLayer";a.spatialReference=void 0;a.type="group";a._visibilityWatcher=a._visibilityWatcher.bind(a);return a}l(d,b);d.prototype.initialize=function(){this._enforceVisibility(this.visibilityMode,this.visible);this.watch("visible",this._visibleWatcher.bind(this),!0)};d.prototype._writeLayers=function(a,b,c,d){var f=[];if(!a)return f;a.forEach(function(a){a.write&&(a=a.write(null,d))&&a.layerType&&f.push(a)});b.layers=
f};Object.defineProperty(d.prototype,"visibilityMode",{set:function(a){var b=this._get("visibilityMode")!==a;this._set("visibilityMode",a);b&&this._enforceVisibility(a,this.visible)},enumerable:!0,configurable:!0});d.prototype.load=function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]}));return this};d.prototype.layerAdded=function(a,b){a.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(a):"inherited"===
this.visibilityMode&&(a.visible=this.visible);this._visibilityHandles[a.uid]=a.watch("visible",this._visibilityWatcher,!0)};d.prototype.layerRemoved=function(a,b){if(b=this._visibilityHandles[a.uid])b.remove(),delete this._visibilityHandles[a.uid];this._enforceVisibility(this.visibilityMode,this.visible)};d.prototype._turnOffOtherLayers=function(a){this.layers.forEach(function(b){b!==a&&(b.visible=!1)})};d.prototype._enforceVisibility=function(b,c){if(a.getProperties(this).initialized){var d=this.layers,
f=d.find(function(a){return a.visible});switch(b){case "exclusive":d.length&&!f&&(f=d.getItemAt(0),f.visible=!0);this._turnOffOtherLayers(f);break;case "inherited":d.forEach(function(a){a.visible=c})}}};d.prototype._visibleWatcher=function(a){"inherited"===this.visibilityMode&&this.layers.forEach(function(b){b.visible=a})};d.prototype._visibilityWatcher=function(a,b,c,d){switch(this.visibilityMode){case "exclusive":a?this._turnOffOtherLayers(d):this._isAnyLayerVisible()||(d.visible=!0);break;case "inherited":d.visible=
this.visible}};d.prototype._isAnyLayerVisible=function(){return this.layers.some(function(a){return a.visible})};k([c.shared({"2d":"../views/layers/GroupLayerView","3d":"../views/layers/GroupLayerView"})],d.prototype,"viewModulePaths",void 0);k([c.property()],d.prototype,"fullExtent",void 0);k([c.property({json:{read:!1,write:{ignoreOrigin:!0}}})],d.prototype,"layers",void 0);k([c.writer("layers")],d.prototype,"_writeLayers",null);k([c.property()],d.prototype,"operationalLayerType",void 0);k([c.property({json:{write:!1}})],
d.prototype,"portalItem",void 0);k([c.property()],d.prototype,"spatialReference",void 0);k([c.property({json:{read:!1},readOnly:!0,value:"group"})],d.prototype,"type",void 0);k([c.property({json:{read:!1,write:!1}})],d.prototype,"url",void 0);k([c.property({value:"independent",json:{write:!0}})],d.prototype,"visibilityMode",null);return d=k([c.subclass("esri.layers.GroupLayer")],d)}(c.declared(f,d,n,g,m))})},"esri/portal/support/layersCreator":function(){define("require exports dojo/has ../../core/promiseUtils ../../core/requireUtils ../PortalItem ./portalLayers ../../layers/Layer ../../renderers/support/styleUtils ./mapNotesUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a){function c(a,c,e){var g,h;return f.when(b,"../../layers/"+c).then(function(b){var c={};a.itemId&&(c.portalItem={id:a.itemId,portal:e.context.portal});h=g=new b(c);h.read(a,e.context);return d.loadStyleRenderer(h,e.context).then(function(){return k.resolve(g)})})}function r(a,b){return w(a,b).then(function(d){return c(a,d,b)})}function w(b,c){var d=c.context,e=t(d),f=b.layerType||b.type;!f&&c&&c.defaultLayerType&&(f=c.defaultLayerType);c=e[f]||"UnknownLayer";if("Feature Collection"===
b.type){if(b.itemId)return(new n({id:b.itemId,portal:d&&d.portal})).load().then(m.selectLayerClassPath).then(function(a){return a.className})}else"ArcGISFeatureLayer"===f&&a.isMapNotesLayer(b)&&(c="MapNotesLayer");b.wmtsInfo&&(c="WMTSLayer");return k.resolve(c)}function t(a){switch(a.origin){case "web-scene":switch(a.layerContainerType){case "basemap":a=e;break;case "ground":a=p;break;default:a=y}break;default:switch(a.layerContainerType){case "basemap":a=u;break;default:a=q}}return a}function x(a,
b,c){return b&&b.filter?c.then(function(a){var c=b.filter(a);return void 0===c?k.resolve(a):c instanceof g?k.resolve(c):c}):c}function v(a,b,c){if(!b)return[];for(var d=[],e=[],f=0;f<b.length;f++){var g=b[f],h=r(g,c);d.push(h);e.push(null);if("GroupLayer"===g.layerType&&g.layers&&Array.isArray(g.layers)&&0<g.layers.length){g=g.layers.map(function(a){return r(a,c)});d.push.apply(d,g);for(var l=0;l<g.length;l++)e.push(h)}}var m={};return d.map(function(b,d){var f=function(a,b){m[b.id]=d;var c=a.findIndex(function(a){if(!a.id)return!1;
a=m[a.id];return void 0===a?!1:d<a});0>c&&(c=void 0);a.add(b,c)};return x(a,c,b).then(function(b){if(null===e[d])f(a,b);else return e[d].then(function(a){f(a.layers,b);return k.resolve(b)});return k.resolve(b)})})}Object.defineProperty(h,"__esModule",{value:!0});var y={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",
ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},p={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer"},e={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",
DefaultTileLayer:"TileLayer"},q={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",GeoRSS:"GeoRSSLayer",KML:"KMLLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},u={ArcGISImageServiceLayer:"ImageryLayer",
ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",bingLayer:"UnsupportedLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"};h.createLayer=r;h.processLayer=x;h.populateLayers=v;h.populateOperationalLayers=function(a,b,c){return v(a,b,c)}})},"esri/portal/support/portalLayers":function(){define("require exports dojo/_base/lang ../PortalItem ../../core/promiseUtils ../../core/requireUtils ../../request ../../core/Collection ../../core/Error ./mapNotesUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a){function c(a){switch(a.type){case "Map Service":return w(a);case "Feature Service":return t(a);case "Feature Collection":return v(a);case "Scene Service":return x(a);case "Image Service":return y(a);case "Stream Service":return{className:"StreamLayer"};case "Vector Tile Service":return{className:"VectorTileLayer"};case "KML":return{className:"KMLLayer"};case "WMTS":return{className:"WMTSLayer"};case "WMS":return{className:"WMSLayer"};default:return f.reject(new d("portal:unknown-item-type",
"Unknown item type '${type}'",{type:a.type}))}}function r(a){return n.when(b,"../../layers/"+a.className).then(function(b){return{constructor:b,properties:a.properties}})}function w(a){return p(a).then(function(a){return a?{className:"TileLayer"}:{className:"MapImageLayer"}})}function t(a){return e(a).then(function(a){if("object"===typeof a){var b={returnZ:!0,outFields:["*"]};null!=a.id&&(b.layerId=a.id);return{className:"FeatureLayer",properties:b}}return{className:"GroupLayer"}})}function x(a){return e(a).then(function(b){if("object"===
typeof b){var c={},d=void 0;null!=b.id?(c.layerId=b.id,d=a.url+"/layers/"+b.id):d=a.url;if(Array.isArray(a.typeKeywords)&&0<a.typeKeywords.length){b={IntegratedMesh:"IntegratedMeshLayer","3DObject":"SceneLayer",Point:"SceneLayer",PointCloud:"PointCloudLayer"};for(var e=0,f=Object.keys(b);e<f.length;e++){var g=f[e];if(-1!==a.typeKeywords.indexOf(g))return{className:b[g]}}}return q(d).then(function(a){var b="SceneLayer";null!=a&&"IntegratedMesh"===a.layerType?b="IntegratedMeshLayer":null!=a&&"PointCloud"===
a.layerType&&(b="PointCloudLayer");return{className:b,properties:c}})}return{className:"GroupLayer"}})}function v(b){return b.load().then(function(){return b.fetchData()}).then(function(b){if(b&&Array.isArray(b.layers)){if(a.isMapNotesLayer(b))return{className:"MapNotesLayer"};if(1===b.layers.length)return{className:"FeatureLayer"}}return{className:"GroupLayer"}})}function y(a){return p(a).then(function(b){var c=new g(a.typeKeywords);return b?c.find(function(a){return"elevation 3d layer"===a.toLowerCase()})?
{className:"ElevationLayer"}:{className:"TileLayer"}:{className:"ImageryLayer"}})}function p(a){return q(a.url).then(function(a){return a.tileInfo})}function e(a){return!a.url||a.url.match(/\/\d+$/)?f.resolve({}):a.load().then(function(){return a.fetchData()}).then(function(b){return b&&Array.isArray(b.layers)?1===b.layers.length?{id:b.layers[0].id}:!1:q(a.url).then(function(a){return a&&Array.isArray(a.layers)?1===a.layers.length?{id:a.layers[0].id}:!1:{}})})}function q(a){return m(a,{responseType:"json",
callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(h,"__esModule",{value:!0});h.fromItem=function(a){!a.portalItem||a.portalItem instanceof k||a.portalItem.constructor&&a.portalItem.constructor._meta||(a=l.mixin({},a,{portalItem:new k(a.portalItem)}));return a.portalItem.load().then(c).then(r).then(function(b){var c=l.mixin({portalItem:a.portalItem},b.properties);b=b.constructor;"esri.layers.FeatureLayer"===b.declaredClass&&(c.returnZ=!0,c.outFields=
["*"]);return f.resolve(new b(c))})};h.selectLayerClassPath=c})},"esri/portal/support/mapNotesUtils":function(){define(["require","exports"],function(b,h){Object.defineProperty(h,"__esModule",{value:!0});h.isMapNotesLayer=function(b){var h=["TITLE","DESCRIPTION","IMAGE_URL","IMAGE_LINK_URL"];if((b=b.layers||b.featureCollection&&b.featureCollection.layers)&&Array.isArray(b))return b=b[0],b.layerDefinition.fields&&b.layerDefinition.fields.forEach(function(b){b=h.indexOf(b.name);-1<b&&h.splice(b,1)}),
h.length?!1:!0}})},"esri/views/layers/LayerView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Evented ../../core/Identifiable ../../core/Promise ../../core/HandleRegistry ../../core/Logger".split(" "),function(b,h,l,k,f,n,m,g,d,a,c){return function(b){function d(){var c=null!==b&&b.apply(this,arguments)||this;c.handles=new a;c.parent=null;c.view=null;return c}l(d,
b);d.prototype.initialize=function(){var a=this;this.addResolvingPromise(this.layer);this.otherwise(function(b){if("layerview:create-error"!==b.name){var d=a.layer&&a.layer.id||"no id",f=a.layer&&a.layer.title||"no title";c.getLogger(a.declaredClass).error("#resolve()","Failed to resolve layer view (layer title: '"+f+"', id: '"+d+"')",b)}})};d.prototype.destroy=function(){this.layer=this.view=this.parent=null};Object.defineProperty(d.prototype,"layer",{get:function(){return this._get("layer")},set:function(a){this.handles.remove("layer");
a&&this.handles.add(a.on("refresh",this.refresh.bind(this)),"layer");this._set("layer",a)},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"suspended",{get:function(){return!this.canResume()},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"updating",{get:function(){return!this.suspended&&this.isUpdating()},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"visible",{get:function(){return!0===this.get("layer.visible")},set:function(a){void 0===a?
this._clearOverride("visible"):this._override("visible",a)},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"fullOpacity",{get:function(){var a=this.get("layer.opacity"),a=null!=a?a:1,b=this.get("parent.fullOpacity");return a*(null!=b?b:1)},enumerable:!0,configurable:!0});d.prototype.refresh=function(){};d.prototype.canResume=function(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.get("layer.loaded")&&this.visible||!1};d.prototype.isUpdating=function(){return!1};
k([f.property({value:null})],d.prototype,"layer",null);k([f.property()],d.prototype,"parent",void 0);k([f.property({readOnly:!0,dependsOn:["view","visible","layer.loaded","parent.suspended"]})],d.prototype,"suspended",null);k([f.property({type:Boolean,dependsOn:["suspended"],readOnly:!0})],d.prototype,"updating",null);k([f.property()],d.prototype,"view",void 0);k([f.property({dependsOn:["layer.visible"]})],d.prototype,"visible",null);k([f.property({dependsOn:["layer.opacity","parent.fullOpacity"]})],
d.prototype,"fullOpacity",null);return d=k([f.subclass("esri.views.layers.LayerView")],d)}(f.declared(n,m,g,d))})},"esri/views/View":function(){define("dojo/_base/lang ../Graphic ../core/Accessor ../core/Collection ../core/CollectionFlattener ../core/Evented ../core/HandleRegistry ../core/Promise ../core/watchUtils ../core/promiseUtils ../core/Scheduler ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ./LayerViewManager ./RefreshManager ./BasemapView ./GroundView ./support/DefaultsFromMap".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r,w,t,x,v,y,p,e){return l.createSubclass([g,n],{declaredClass:"esri.views.View",properties:{allLayerViews:{readOnly:!0},basemapView:{},animation:{},resizing:{},interacting:{},graphics:{type:k.ofType(h)},groundView:{},defaultsFromMap:e,heightModelInfo:{readOnly:!0,type:w,dependsOn:["map.heightModelInfo","defaultsFromMap.heightModelInfo"]},initialExtent:{readOnly:!0,type:r,dependsOn:["defaultsFromMap.extent"]},initialExtentRequired:{},layerViews:{type:k},map:{},ready:{readOnly:!0,
dependsOn:"map spatialReference width height initialExtentRequired initialExtent defaultsFromMap.isSpatialReferenceDone map.loaded".split(" ")},size:{readOnly:!0,dependsOn:["width","height"],get:function(){return[this.width,this.height]}},spatialReference:{type:t,dependsOn:["defaultsFromMap.spatialReference","defaultsFromMap.vcsWkid","defaultsFromMap.latestVcsWkid"]},stationary:{dependsOn:["animation","interacting","resizing"]},type:{},updating:{},padding:{},width:{},height:{}},constructor:function(a){this._viewHandles=
new m;this._viewHandles.add(this.watch("ready",function(a,b){this._currentSpatialReference=a?this.spatialReference:null;this.notifyChange("spatialReference");!a&&b&&this.layerViewManager.empty()}.bind(this)));this.allLayerViews=new f({root:this,rootCollectionNames:["basemapView.baseLayerViews","groundView.layerViews","layerViews","basemapView.referenceLayerViews"],getChildrenFunction:function(a){return a.layerViews}});this.defaultsFromMap=new e({view:this})},getDefaults:function(){return b.mixin(this.inherited(arguments),
{layerViews:[],graphics:[],padding:{left:0,top:0,right:0,bottom:0}})},initialize:function(){var a=this.validate().then(function(){this._isValid=!0;this.notifyChange("ready");return d.whenOnce(this,"ready")}.bind(this));this.addResolvingPromise(a);this.basemapView=new y({view:this});this.groundView=new p({view:this});this.layerViewManager=new x({view:this});this.refreshManager=new v({view:this});this._resetInitialViewPropertiesFromContent()},destroy:function(){this.destroyed||(this.basemapView.destroy(),
this.groundView.destroy(),this.destroyLayerViews(),this.refreshManager.destroy(),this.defaultsFromMap.destroy(),this.defaultsFromMap=null,this._viewHandles.destroy(),this.map=null)},destroyLayerViews:function(){this.layerViewManager.destroy()},_viewHandles:null,_isValid:!1,_readyCycleForced:!1,_userSpatialReference:null,_currentSpatialReference:null,animation:null,basemapView:null,groundView:null,graphics:null,_graphicsSetter:function(a){this._graphicsView&&(this._graphicsView.graphics=a);this._set("graphics",
a)},heightModelInfo:null,_heightModelInfoGetter:function(){return this.getDefaultHeightModelInfo()},interacting:!1,layerViews:null,map:null,_mapSetter:function(a){var b=this._get("map");a!==b&&(a&&a.load&&a.load(),this._forceReadyCycle(),this._resetInitialViewPropertiesFromContent(),this._set("map",a))},padding:null,_readyGetter:function(){return!!(this._isValid&&!this._readyCycleForced&&this.map&&0!==this.width&&0!==this.height&&this.spatialReference&&(!this.map.load||this.map.loaded)&&(this._currentSpatialReference||
!this.initialExtentRequired||this.initialExtent||this.defaultsFromMap&&this.defaultsFromMap.isSpatialReferenceDone)&&this.defaultsFromMap&&this.defaultsFromMap.isTileInfoDone&&this.isSpatialReferenceSupported(this.spatialReference))},spatialReference:null,_spatialReferenceGetter:function(){var a=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||null;a&&this.isHeightModelInfoRequired&&this.defaultsFromMap&&(a=a.clone(),a.vcsWkid=this.defaultsFromMap.vcsWkid,
a.latestVcsWkid=this.defaultsFromMap.latestVcsWkid);return a},_spatialReferenceSetter:function(a){this._userSpatialReference=a;this._set("spatialReference",a)},stationary:!0,_stationaryGetter:function(){return!this.animation&&!this.interacting&&!this.resizing},type:null,updating:!1,initialExtentRequired:!0,initialExtent:null,_initialExtentGetter:function(){return this.defaultsFromMap&&this.defaultsFromMap.extent},whenLayerView:function(a){return this.layerViewManager.whenLayerView(a)},getDefaultSpatialReference:function(){return this.get("defaultsFromMap.spatialReference")},
getDefaultHeightModelInfo:function(){return this.get("map.supportsHeightModelInfo")&&this.get("map.heightModelInfo")||this.get("defaultsFromMap.heightModelInfo")||null},validate:function(){return a.resolve()},isSpatialReferenceSupported:function(){return!0},isTileInfoRequired:function(){return!1},_resetInitialViewPropertiesFromContent:function(){if(this.defaultsFromMap){var a=this.defaultsFromMap.start.bind(this.defaultsFromMap);this.defaultsFromMap.reset();this._currentSpatialReference=null;this.notifyChange("spatialReference");
this._viewHandles.remove("defaultsFromMap");this._viewHandles.add([d.watch(this,"spatialReference",a),d.watch(this,"initialExtentRequired",a),c.schedule(a)],"defaultsFromMap")}},_forceReadyCycle:function(){this.ready&&(this._readyCycleForced=!0,d.whenFalseOnce(this,"ready",function(){this._readyCycleForced=!1;this.notifyChange("ready")}.bind(this)),this.notifyChange("ready"))}})})},"esri/views/LayerViewManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/Error ../core/HandleRegistry ../core/Scheduler ../core/promiseUtils ../core/watchUtils ./LayerViewFactory".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c,r){return function(b){function h(){var a=b.call(this)||this;a._promisesMap=new Map;a._layerViewsMap=new Map;a._handles=new g;a.factory=new r;a.ready=!1;a.layersToLayerViews=function(){var a=new Map;a.set("view.map.basemap.baseLayers","view.basemapView.baseLayerViews");a.set("view.map.ground.layers","view.groundView.layerViews");a.set("view.map.layers","view.layerViews");a.set("view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews");return a}();a._doWork=
a._doWork.bind(a);a.refresh=a.refresh.bind(a);a._handles.add(c.init(a,"view.ready",function(b){return a.ready=b}));a._handles.add(a.watch(["view.map.basemap","view.map.ground","view.map.layers","ready"],a.refresh),"watcher");return a}l(h,b);h.prototype.destroy=function(){this._handles&&(this.empty(),this.view=null,this.factory.destroy(),this.factory=null,this._handles.destroy(),this._map=this._layerViewsMap=this._promisesMap=this._handles=null)};h.prototype.empty=function(){this._layerViewsMap.forEach(this._disposeLayerView,
this);this._promisesMap.forEach(function(a){return a.cancel()});this._layerViewsMap.clear();this._promisesMap.clear();this._refreshCollections()};h.prototype.refresh=function(){var a=this._handles;a.remove("refresh");a.add(d.schedule(this._doWork),"refresh")};h.prototype.whenLayerView=function(b){this.refresh();this._doWork();return this._promisesMap.has(b)?this._promisesMap.get(b):a.reject(new m("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:b}))};h.prototype._doWork=
function(){var a=this,b=this._handles,c=this.get("view.map");this._map!==c&&(this.empty(),this._map=c);if(b.has("refresh")){b.remove("refresh");b.remove("collection-change");this.factory.paused=!this.ready;var d=this._map&&this._map.allLayers;d&&(d.forEach(this._createLayerView,this),this._refreshCollections(),this._promisesMap.forEach(function(b,c){d.includes(c)||a._disposeLayerView(a._layerViewsMap.get(c),c)}),b.add(d.on("change",this.refresh),"collection-change"))}};h.prototype._refreshCollections=
function(){var a=this;this.layersToLayerViews.forEach(function(b,c){a._populateLayerViewsOwners(a.get(c),a.get(b),a.view)})};h.prototype._populateLayerViewsOwners=function(a,b,c){var d=this;if(a&&b){var e=0;a.forEach(function(a){var f=d._layerViewsMap.get(a);f&&(f.layer=a,f.parent=c,b.getItemAt(e)!==f&&b.splice(e,0,f),a.layers&&d._populateLayerViewsOwners(a.layers,f.layerViews,f),e+=1)});e<b.length&&b.splice(e,b.length)}else b&&b.removeAll()};h.prototype._createLayerView=function(b){var c=this,d=
this.view,f=this.factory,e=this._layerViewsMap,g=this._promisesMap;e.has(b)?b.load():g.has(b)||(f=f.create(d,b).then(function(f){if(!c._map||!c._map.allLayers.some(function(a){return b===a}))throw new m("view:no-layerview-for-layer","The layer has been removed from the map",{layer:b});e.set(b,f);c._refreshCollections();b.emit("layerview-create",{view:d,layerView:f});d.emit("layerview-create",{layer:b,layerView:f});return a.resolve(f)}),g.set(b,f),f.always(this.refresh))};h.prototype._disposeLayerView=
function(a,b){if(this._promisesMap.has(b)&&(this._promisesMap.get(b).cancel(),this._promisesMap.delete(b),a)){b=a.layer;var c=a.view;this.factory.dispose(a);a.layer=a.parent=a.view=null;this._layerViewsMap.delete(b);b.emit("layerview-destroy",{view:c,layerView:a});c.emit("layerview-destroy",{layer:b,layerView:a})}};k([f.property()],h.prototype,"ready",void 0);k([f.property()],h.prototype,"view",void 0);return h=k([f.subclass("esri.views.LayerViewManager")],h)}(f.declared(n))})},"esri/views/LayerViewFactory":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/Deferred dojo/when ../core/Accessor ../core/Collection ../core/Error ../core/watchUtils".split(" "),
function(b,h,l,k,f,n,m,g,d,a,c){return function(b){function g(){var a=null!==b&&b.apply(this,arguments)||this;a.creationRequests=new d;a.paused=!0;return a}l(g,b);g.prototype.initialize=function(){var a=this;c.whenFalse(this,"paused",function(){a.creationRequests.toArray().forEach(a._processRequest,a)},!0)};g.prototype.destroy=function(){this.creationRequests.drain(function(a){return a.deferred.cancel(void 0)})};Object.defineProperty(g.prototype,"working",{get:function(){return 0<this.creationRequests.length},
enumerable:!0,configurable:!0});g.prototype.create=function(b,c){var d=this.getLayerViewPromise(c);if(d)return d;var f=this.creationRequests,g={deferred:new n(function(){var b=new a("cancelled:layerview-create","layerview creation cancelled",{layer:c});f.remove(g);g.creationPromise&&g.creationPromise.cancel(b);return b}),view:b,layer:c,started:!1,creationPromise:null};f.push(g);this.paused||this._processRequest(g);return g.deferred.promise};g.prototype.dispose=function(a){a.layer.destroyLayerView(a)};
g.prototype.getLayerViewPromise=function(a){var b=this.creationRequests&&this.creationRequests.find(function(b){return b.layer===a});return b&&b.deferred.promise};g.prototype._processRequest=function(b){var c=this;if(!b.started){b.started=!0;var d=b.deferred,f=b.layer,g=b.view;f.load().then(function(a){if(!d.isCanceled())return b.creationPromise=a.createLayerView(g),b.creationPromise}).then(function(a){return d.isCanceled()?a:b.creationPromise=m(a)}).otherwise(function(b){d.isCanceled()||d.reject(new a("layerview:create-error",
"layerview creation failed",{layer:f,error:b}))}).then(function(a){c.creationRequests&&c.creationRequests.remove(b);d.isFulfilled()?a&&c.dispose(a):d.resolve(a);return a})}};k([f.property()],g.prototype,"creationRequests",void 0);k([f.property()],g.prototype,"paused",void 0);k([f.property()],g.prototype,"view",void 0);k([f.property({dependsOn:["paused","creationRequests.length"],readOnly:!0})],g.prototype,"working",null);return g=k([f.subclass("esri.views.LayerViewFactory")],g)}(f.declared(g))})},
"esri/views/RefreshManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/HandleRegistry".split(" "),function(b,h,l,k,f,n,m){return function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a._handles=new m;a._currentTick=0;return a}l(d,b);d.prototype.initialize=function(){var a=this;this.view.allLayerViews.on("after-changes",function(){a.notifyChange("tickInterval");
a._handles.remove("layerViewsUpdating");a._handles.add(a._getLayerViewHandles(),"layerViewsUpdating")});this.watch("tickInterval",function(){return a._restartTicking()});this._restartTicking()};d.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null,this._intervalID&&clearInterval(this._intervalID),this._currentTick=0)};Object.defineProperty(d.prototype,"tickInterval",{get:function(){var a=this.view.allLayerViews.filter(function(a){return null!=a.refresh});return 6E4*
this._findCommonDevisorFromLayers(a)},enumerable:!0,configurable:!0});d.prototype._restartTicking=function(){var a=this;this._currentTick=0;this._intervalID&&clearInterval(this._intervalID);this._intervalID=setInterval(function(){a._currentTick+=a._interval;a.view.allLayerViews.filter(function(a){return!!a.refresh}).forEach(function(b){0===b.refreshInterval%a._currentTick&&b.refresh()})},this._interval)};d.prototype._getLayerViewHandles=function(){var a=this;return this.view.allLayerViews.filter(function(a){return!!a.refresh}).map(function(b){return b.watch("refreshInterval",
function(){return a.notifyChange("tickInterval")})})};d.prototype._findCommonDevisorFromLayers=function(a){var b=function(a,c){return isNaN(a)||isNaN(c)?0:0>=c?a:b(c,a%c)};return a.toArray().reduce(function(a,c){return b(c.refreshInterval,a)},0)};k([f.property()],d.prototype,"view",void 0);k([f.property({readOnly:!0})],d.prototype,"tickInterval",null);return d=k([f.subclass("esri.views.RefreshManager")],d)}(f.declared(n))})},"esri/views/BasemapView":function(){define(["../core/Accessor","../core/Collection",
"../core/watchUtils"],function(b,h,l){return b.createSubclass({declaredClass:"esri.views.BasemapView",properties:{view:{},baseLayerViews:{type:h},referenceLayerViews:{type:h}},constructor:function(){this._loadingHdl=l.init(this,"view.map.basemap",this._loadBasemap)},getDefaults:function(){return{baseLayerViews:[],referenceLayerViews:[]}},destroy:function(){this.view=null;this._loadingHdl&&(this._loadingHdl.remove(),this._loadingHdl=null)},_suspendedGetter:function(){return this.view?this.view.suspended:
!0},_loadBasemap:function(b){b&&b.load()}})})},"esri/views/GroundView":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/Collection ../core/watchUtils ../core/HandleRegistry".split(" "),function(b,h,l,k,f,n,m,g,d){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.handles=new d;b.layerViews=new m;return b}l(b,a);b.prototype.initialize=function(){this.handles.add(g.when(this,
"view.map.ground",function(a){return a.load()}))};b.prototype.destroy=function(){this.view=null;this.handles&&(this.handles.destroy(),this.handles=null)};Object.defineProperty(b.prototype,"suspended",{get:function(){return!this.view||this.view.suspended},enumerable:!0,configurable:!0});k([f.property()],b.prototype,"view",void 0);k([f.property({type:m})],b.prototype,"layerViews",void 0);k([f.property()],b.prototype,"suspended",null);return b=k([f.subclass("esri.views.GroundView")],b)}(f.declared(n))})},
"esri/views/support/DefaultsFromMap":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/arrayUtils ../../core/watchUtils ../../core/Accessor ../../core/HandleRegistry ../../portal/support/geometryServiceUtils ../../geometry/support/webMercatorUtils ../../geometry/support/heightModelInfoUtils".split(" "),function(b,h,l,k,f,n,m,g,d,a,c,r){return function(b){function g(){var a=null!==b&&b.apply(this,
arguments)||this;a._handles=new d;a._waitTask=null;a._isStarted=!1;a._spatialReferenceCandidates=null;a._extentCandidates=null;a.isSpatialReferenceDone=!1;a.isTileInfoDone=!1;a.isHeightModelInfoSearching=!1;a.spatialReference=null;a.extent=null;a.heightModelInfo=null;a.vcsWkid=null;a.latestVcsWkid=null;a.mapCollectionPaths=h.DefaultMapCollectionPaths.slice();a.tileInfo=null;return a}l(g,b);h=g;g.prototype.initialize=function(){var a=this;this.watch("mapCollectionPaths",function(){a._isStarted&&(a.reset(),
a.start())})};g.prototype.destroy=function(){this._set("view",null);this._handles&&(this._handles.destroy(),this._handles=null,this._isStarted=!1);this._cancelLoading()};g.prototype.reset=function(){this._handles.removeAll();this._isStarted=!1;this._set("isSpatialReferenceDone",!1);this._set("isTileInfoDone",!1);this._set("isHeightModelInfoSearching",!1);this._set("spatialReference",null);this._set("extent",null);this._set("heightModelInfo",null);this._set("vcsWkid",null);this._set("latestVcsWkid",
null);this._set("tileInfo",null);this._extentCandidates=this._spatialReferenceCandidates=null};g.prototype.start=function(){this._handles.removeAll();this._isStarted=!0;for(var a=this._updateLayerChange.bind(this),b=0,c=this.mapCollectionPaths;b<c.length;b++)this._handles.add(m.on(this.view,"map."+c[b],"change",a,a,a,!0))};g.prototype._ownerNameFromCollectionName=function(a){var b=a.lastIndexOf(".");return-1===b?"view":"view."+a.slice(0,b)};g.prototype._ensureLoadedOwnersFromCollectionName=function(a){a=
this._ownerNameFromCollectionName(a).split(".");for(var b,c=0;c<a.length;c++){b=this.get(a.slice(0,c+1).join("."));if(!b)break;if(b.load&&!b.isFulfilled())return{owner:null,loading:b.load()}}return{owner:b}};g.prototype._cancelLoading=function(){this._waitTask=null;this._extentProjectTask&&(this._extentProjectTask.cancel(),this._extentProjectTask=null)};g.prototype._updateWhen=function(a){var b=this,c=!0,d=!1,f=a.always(function(){c?d=!0:f===b._waitTask&&b._update()}),c=!1;d||(this._waitTask=f);return d};
g.prototype._updateLayerChange=function(){this.isSpatialReferenceDone&&!this.spatialReference&&this._set("isSpatialReferenceDone",!1);this._update()};g.prototype._update=function(){var a=this;this._cancelLoading();if(this.view){if(!this.isSpatialReferenceDone&&0!==this._processMapCollections(function(b){return a._processSpatialReferenceSource(b)})){var b=null,c=this._spatialReferenceCandidates;!c||1>c.length?b=this.defaultSpatialReference:(this.defaultSpatialReference&&1<c.length&&-1<n.findIndex(c,
function(b){return b.equals(a.defaultSpatialReference)})&&(c=[this.defaultSpatialReference]),b=c[0]);this._set("spatialReference",b);this._set("isSpatialReferenceDone",!0);b&&(this._processMapCollections(function(c){return a._findExtent(c,b)}),this.extent||this._projectExtentCandidate())}null==this.heightModelInfo&&this.view.isHeightModelInfoRequired&&(c=this._processMapCollections(function(b){return a._processHeightModelInfoSource(b)},function(a){return r.mayHaveHeightModelInfo(a)}),this._set("isHeightModelInfoSearching",
0===c));null==this.tileInfo&&(c=!1,this.view.isTileInfoRequired()&&(c=this._deriveTileInfo()),c||this._set("isTileInfoDone",!0))}};g.prototype._processMapCollections=function(a,b){for(var c=0,d=this.mapCollectionPaths;c<d.length;c++){var f="map."+d[c],g=this._ensureLoadedOwnersFromCollectionName(f);if(g.loading&&!this._updateWhen(g.loading))return 0;g=g.owner;if(!(!g||g.isRejected&&g.isRejected())&&(f=this.view.get(f))&&(f=this._processMapCollection(f,a,b),2!==f))return f}return 2};g.prototype._processMapCollection=
function(a,b,c){for(var d=0;d<a.length;d++){var f=a.getItemAt(d),g=null!=c&&!c(f);if(!g&&f.load&&!f.isFulfilled()&&!this._updateWhen(f.load()))return 0;if(!g&&(!f.load||f.isResolved())){if(b(f))return 1;if(f.layers&&(f=this._processMapCollection(f.layers,b),2!==f))return f}}return 2};g.prototype._processSpatialReferenceSource=function(a){a=this._getSupportedSpatialReferences(a);if(0===a.length)return!1;this._spatialReferenceCandidates?(a=n.intersect(a,this._spatialReferenceCandidates,function(a,b){return a.equals(b)}),
0<a.length&&(this._spatialReferenceCandidates=a)):this._spatialReferenceCandidates=a;return 1===this._spatialReferenceCandidates.length};g.prototype._findExtent=function(a,b){var c=a.fullExtents||(a.fullExtent?[a.fullExtent]:[]),d=n.find(c,function(a){return a.spatialReference.equals(b)});if(d)return this._set("extent",d),!0;0<this._getSupportedSpatialReferences(a).length&&(c=c.map(function(b){return{extent:b,layer:a}}),this._extentCandidates=(this._extentCandidates||[]).concat(c));return!1};g.prototype._projectExtentCandidate=
function(){var b=this;if(this._extentCandidates&&this._extentCandidates.length){var d=this.spatialReference,f=n.find(this._extentCandidates,function(a){return c.canProject(a.extent.spatialReference,d)});f?this._set("extent",c.project(f.extent,d)):(f=this._extentCandidates[0],this._extentProjectTask=a.projectGeometry(f.extent,d,f.layer.portalItem).then(function(a){b._set("extent",a)}))}};g.prototype._getSupportedSpatialReferences=function(a){var b=this;return(a.supportedSpatialReferences||(a.spatialReference?
[a.spatialReference]:[])).filter(function(c){return b.view.isSpatialReferenceSupported(c,a)})};g.prototype._processHeightModelInfoSource=function(a){var b=r.deriveHeightModelInfoFromLayer(a);return b?(this._set("heightModelInfo",b),this._set("isHeightModelInfoSearching",!1),a.spatialReference&&(this._set("vcsWkid",a.spatialReference.vcsWkid),this._set("latestVcsWkid",a.spatialReference.latestVcsWkid)),!0):!1};g.prototype._deriveTileInfo=function(){if(!this.isSpatialReferenceDone)return!0;var a=this.get("view.map");
if(!a)return!0;var b=a.basemap,c=b&&b.get("baseLayers.0"),a=a.get("layers.0"),d=!1,f=null;b?b.loaded?c?c.loaded?f=c.tileInfo:(this._updateWhen(c.load()),d=!0):a?a.loaded?f=a.tileInfo:(this._updateWhen(a.load()),d=!0):d=!0:(this._updateWhen(b.load()),d=!0):a&&(a.loaded?f=a.tileInfo:(this._updateWhen(a.load()),d=!0));f&&!f.spatialReference.equals(this.spatialReference)&&(f=null);d||this._set("tileInfo",f);return d};g.DefaultMapCollectionPaths=["basemap.baseLayers","layers","ground.layers","basemap.referenceLayers"];
k([f.property({readOnly:!0})],g.prototype,"isSpatialReferenceDone",void 0);k([f.property({readOnly:!0})],g.prototype,"isTileInfoDone",void 0);k([f.property({readOnly:!0})],g.prototype,"isHeightModelInfoSearching",void 0);k([f.property({constructOnly:!0})],g.prototype,"view",void 0);k([f.property({readOnly:!0})],g.prototype,"spatialReference",void 0);k([f.property({readOnly:!0})],g.prototype,"extent",void 0);k([f.property({readOnly:!0})],g.prototype,"heightModelInfo",void 0);k([f.property({readOnly:!0})],
g.prototype,"vcsWkid",void 0);k([f.property({readOnly:!0})],g.prototype,"latestVcsWkid",void 0);k([f.property()],g.prototype,"mapCollectionPaths",void 0);k([f.property()],g.prototype,"defaultSpatialReference",void 0);k([f.property({readOnly:!0})],g.prototype,"tileInfo",void 0);return g=h=k([f.subclass("esri.views.support.DefaultsFromMap")],g);var h}(f.declared(g))})},"esri/portal/support/geometryServiceUtils":function(){define("require exports ../Portal ../PortalItem ../../config ../../tasks/GeometryService ../../tasks/support/ProjectParameters ../../core/promiseUtils ../../core/Error".split(" "),
function(b,h,l,k,f,n,m,g,d){function a(a){void 0===a&&(a=null);if(f.geometryServiceUrl)return g.resolve(new n({url:f.geometryServiceUrl}));if(!a)return g.reject(new d("internal:geometry-service-url-not-configured"));var b;a.isInstanceOf(k)?b=a.portal||l.getDefault():a.isInstanceOf(l)&&(b=a);return b.load().then(function(a){if(a.helperServices&&a.helperServices.geometry&&a.helperServices.geometry.url)return g.resolve(new n({url:a.helperServices.geometry.url}));throw new d("internal:geometry-service-url-not-configured");
})}Object.defineProperty(h,"__esModule",{value:!0});h.create=a;h.projectGeometry=function(b,d,f){void 0===f&&(f=null);return a(f).then(function(a){var c=new m;c.geometries=[b];c.outSpatialReference=d;return a.project(c)}).then(function(a){return a&&Array.isArray(a)&&1===a.length?a[0]:g.reject()})}})},"esri/geometry/support/heightModelInfoUtils":function(){define(["require","exports","../../core/Error","../HeightModelInfo"],function(b,h,l,k){function f(a,b,d){if(n(a)&&n(b)){if(null==a||null==b)return 0;
if(d||a.heightUnit===b.heightUnit){if(a.heightModel!==b.heightModel)return 2;switch(a.heightModel){case "gravity-related-height":return 0;case "ellipsoidal":return a.vertCRS===b.vertCRS?0:3;default:return 4}}else return 1}else return 4}function n(a){return null==a||null!=a.heightModel&&null!=a.heightUnit}function m(a){return a.heightModelInfo?a.heightModelInfo:("hasZ"in a?!0===a.hasZ:g(a))?k.deriveUnitFromSR(d,a.spatialReference):null}function g(a){switch(a.type){case "elevation":case "integrated-mesh":case "point-cloud":case "scene":return!0;
default:return!1}}Object.defineProperty(h,"__esModule",{value:!0});h.validateWebSceneError=function(a,b){if(!a)return null;if(!n(a))return new l("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:a});var c=a.heightUnit;a=k.deriveUnitFromSR(a,b).heightUnit;return c!==a?new l("webscene:incompatible-height-unit","The vertical units of the scene ("+c+") must match the horizontal units of the scene ("+a+")",{verticalUnit:c,horizontalUnit:a}):
null};h.rejectLayerError=function(a,b,d){var c=m(a),h=f(c,b,d),n=null;if(c){var r=k.deriveUnitFromSR(c,a.spatialReference).heightUnit;d||r===c.heightUnit||(n=new l("layerview:unmatched-height-unit","The vertical units of the layer must match the horizontal units ("+r+")",{horizontalUnit:r}))}if(null==a.heightModelInfo&&null==a.spatialReference&&("hasZ"in a?!0===a.hasZ:g(a))||4===h||n)return new l("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",
{heightModelInfo:c,error:n});n=null;switch(h){case 1:a=c.heightUnit||"unknown";d=b.heightUnit||"unknown";n=new l("layerview:incompatible-height-unit","The vertical units of the layer ("+a+") must match the vertical units of the scene ("+d+")",{layerUnit:a,sceneUnit:d});break;case 2:a=c.heightModel||"unknown";d=b.heightModel||"unknown";n=new l("layerview:incompatible-height-model","The height model of the layer ("+a+") must match the height model of the scene ("+d+")",{layerHeightModel:a,sceneHeightModel:d});
break;case 3:a=c.vertCRS||"unknown",d=b.vertCRS||"unknown",n=new l("layerview:incompatible-vertical-datum","The vertical datum of the layer ("+a+") must match the vertical datum of the scene ("+d+")",{layerDatum:a,sceneDatum:d})}return n?new l("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:c,sceneHeightModelInfo:b,error:n}):null};h.deriveHeightModelInfoFromLayer=m;h.mayHaveHeightModelInfo=function(a){return null!=
a.layers||g(a)||void 0!==a.hasZ||void 0!==a.heightModelInfo};var d=new k({heightModel:"gravity-related-height"})})},"esri/views/ViewAnimation":function(){define("../core/declare dojo/Deferred ../core/Accessor ../core/Promise ../core/Scheduler ../core/Error".split(" "),function(b,h,l,k,f,n){var m={RUNNING:"running",FINISHED:"finished",STOPPED:"stopped"};b=b([l,k],{declaredClass:"esri.views.ViewAnimation",properties:{state:{value:null},target:{value:null}},constructor:function(){this._dfd=new h;this.addResolvingPromise(this._dfd.promise)},
initialize:function(){this.state=m.RUNNING},stop:function(){this.state!==m.STOPPED&&this.state!==m.FINISHED&&(this.state=m.STOPPED,f.schedule(this._dfd.reject.bind(this._dfd,new n("ViewAnimation stopped"))))},finish:function(){this.state!==m.STOPPED&&this.state!==m.FINISHED&&(this.state=m.FINISHED,f.schedule(this._dfd.resolve))}});b.State=m;return b})},"url:esri/core/request/iframe.html":'\x3c!DOCTYPE html\x3e\r\n\x3chtml\x3e\r\n\x3chead\x3e\r\n  \x3cmeta http-equiv\x3d"Content-Security-Policy" content\x3d"default-src \'none\'; script-src * \'unsafe-inline\'"\x3e\r\n\r\n  \x3cscript\x3e\r\n    var dojoConfig \x3d {\r\n      async: true,\r\n      baseUrl: "../../../dojo/",\r\n      has: {\r\n        "csp-restrictions": true,\r\n        "dojo-preload-i18n-Api": false\r\n      }\r\n    };\r\n  \x3c/script\x3e\r\n  \x3c!--\r\n  This src is relative to this page and assumes dojo is a sibling to esri.\r\n  It is updated when this file is set as the iframe\'s `srcdoc` value.\r\n  --\x3e\r\n  \x3cscript src\x3d"../../../dojo/dojo.js"\x3e\x3c/script\x3e\r\n\r\n  \x3cscript\x3e\r\n    function windowMessageHandler(event) {\r\n      window.removeEventListener("message", windowMessageHandler);\r\n\r\n      var port \x3d event.ports[0];\r\n\r\n      require([\r\n        "dojo/request/script"\r\n      ], function(script) {\r\n        port.postMessage("ready");\r\n\r\n        port.addEventListener("message", function(event) {\r\n          var data \x3d event.data;\r\n          script.get(data.url, data.options)\r\n              .then(function(response) {\r\n                port.postMessage({\r\n                  id: data.id,\r\n                  response: response\r\n                });\r\n              })\r\n              .otherwise(function(error) {\r\n                port.postMessage({\r\n                  id: data.id,\r\n                  isError: true,\r\n                  message: error.message\r\n                });\r\n              });\r\n        });\r\n        port.start();\r\n      });\r\n    }\r\n\r\n    window.addEventListener("message", windowMessageHandler);\r\n  \x3c/script\x3e\r\n\x3c/head\x3e\r\n\x3cbody\x3e\r\n\x3c/body\x3e\r\n\x3c/html\x3e\r\n',
"*now":function(b){b(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","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","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});require.boot&&require.apply(null,require.boot);