// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"dojo/fx/Toggler":function(){define(["../_base/lang","../_base/declare","../_base/fx","../aspect"],function(m,l,a,f){return l("dojo.fx.Toggler",null,{node:null,showFunc:a.fadeIn,hideFunc:a.fadeOut,showDuration:200,hideDuration:200,constructor:function(a){m.mixin(this,a);this.node=a.node;this._showArgs=m.mixin({},a);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=m.mixin({},a);this._hideArgs.node=this.node;
this._hideArgs.duration=this.hideDuration;this.hideAnim=this.hideFunc(this._hideArgs);f.after(this.showAnim,"beforeBegin",m.hitch(this.hideAnim,"stop",!0),!0);f.after(this.hideAnim,"beforeBegin",m.hitch(this.showAnim,"stop",!0),!0)},show:function(a){return this.showAnim.play(a||0)},hide:function(a){return this.hideAnim.play(a||0)}})})},"dijit/_base/manager":function(){define(["dojo/_base/array","dojo/_base/config","dojo/_base/lang","../registry","../main"],function(m,l,a,f,k){var n={};m.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),
function(a){n[a]=f[a]});a.mixin(n,{defaultDuration:l.defaultDuration||200});a.mixin(k,n);return k})},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(m,l,a){var f={},k={},n={length:0,add:function(a){if(k[a.id])throw Error("Tried to register widget with id\x3d\x3d"+a.id+" but that id is already registered");k[a.id]=a;this.length++},remove:function(a){k[a]&&(delete k[a],this.length--)},byId:function(a){return"string"==typeof a?k[a]:a},byNode:function(a){return k[a.getAttribute("widgetId")]},
toArray:function(){var a=[],p;for(p in k)a.push(k[p]);return a},getUniqueId:function(g){var p;do p=g+"_"+(g in f?++f[g]:f[g]=0);while(k[p]);return"dijit"==a._scopeName?p:a._scopeName+"_"+p},findWidgets:function(a,p){function d(a){for(a=a.firstChild;a;a=a.nextSibling)if(1==a.nodeType){var b=a.getAttribute("widgetId");b?(b=k[b])&&c.push(b):a!==p&&d(a)}}var c=[];d(a);return c},_destroyAll:function(){a._curFocus=null;a._prevFocus=null;a._activeStack=[];m.forEach(n.findWidgets(l.body()),function(a){a._destroyed||
(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})},getEnclosingWidget:function(a){for(;a;){var g=1==a.nodeType&&a.getAttribute("widgetId");if(g)return k[g];a=a.parentNode}return null},_hash:k};return a.registry=n})},"dijit/main":function(){define(["dojo/_base/kernel"],function(m){return m.dijit})},"esri/main":function(){define(["./kernel","dojo/i18n!./nls/jsapi","./config","./sniff"],function(m,l){m.bundle=l;return m})},"esri/kernel":function(){define(["dojo/_base/kernel","dojo/_base/config",
"dojo/has"],function(m,l,a){var f=function(){return this}(),k=f.location,n=k.pathname,g=k.protocol,k={version:"3.23",_appBaseUrl:g+"//"+k.host+n.substring(0,n.lastIndexOf(n.split("/")[n.split("/").length-1]))};l.noGlobals||(f.esri=k);m.isAsync||a.add("extend-esri",1);(k.dijit=k.dijit||{})._arcgisUrl=("http:"===g||"https:"===g?g:"http:")+"//www.arcgis.com/sharing/rest";return k})},"esri/config":function(){define(["dojo/_base/config","dojo/topic","dojo/has","./kernel"],function(m,l,a,f){var k=function(){return this}(),
n={defaults:{screenDPI:96,geometryService:null,kmlService:null,map:{width:400,height:400,layerNamePrefix:"layer",graphicsLayerNamePrefix:"graphicsLayer",slider:{left:"30px",top:"30px",width:null,height:"200px"},sliderLabel:{tick:5,labels:null,style:"width:2em; font-family:Verdana; font-size:75%;"},sliderChangeImmediate:!0,zoomSymbol:{color:[0,0,0,64],outline:{color:[255,0,0,255],width:1.25,style:"esriSLSSolid"},style:"esriSFSSolid"},zoomDuration:500,zoomRate:25,panDuration:350,panRate:25,logoLink:"http://www.esri.com"},
autoSpatialIndexing:k.Worker&&!1,io:{errorHandler:function(a,p){l.publish("esri.Error",[a])},proxyUrl:null,alwaysUseProxy:!1,useCors:"with-credentials",corsEnabledServers:"server.arcgisonline.com services.arcgisonline.com www.arcgis.com js.arcgis.com jsdev.arcgis.com jsqa.arcgis.com tiles.arcgis.com tiles1.arcgis.com tiles2.arcgis.com tiles3.arcgis.com tiles4.arcgis.com basemaps.arcgis.com basemapsbeta.arcgis.com elevation3d.arcgis.com services.arcgis.com services1.arcgis.com services2.arcgis.com services3.arcgis.com services4.arcgis.com services5.arcgis.com services6.arcgis.com services7.arcgis.com services8.arcgis.com services9.arcgis.com cdn.arcgis.com cdn-a.arcgis.com cdn-b.arcgis.com static.arcgis.com utility.arcgis.com utility.arcgisonline.com geocode.arcgis.com geoenrich.arcgis.com qaext.arcgis.com staticqa.arcgis.com tilesqa.arcgis.com servicesqa.arcgis.com servicesqa1.arcgis.com servicesqa2.arcgis.com servicesqa3.arcgis.com geocodeqa.arcgis.com geoenrichqa.arcgis.com dev.arcgis.com devext.arcgis.com localvtiles.arcgis.com staticdev.arcgis.com tilesdevext.arcgis.com elevation3ddev.arcgis.com servicesdev.arcgis.com servicesdev1.arcgis.com servicesdev2.arcgis.com servicesdev3.arcgis.com geocodedev.arcgis.com geoenrichdev.arcgis.com basemapsdev.arcgis.com basemapsbetadev.arcgis.com".split(" "),
corsDetection:k.cordova?!1:!0,corsDetectionTimeout:15,corsStatus:{},webTierAuthServers:[],proxyRules:[],postLength:2E3,timeout:6E4,useWorkers:"on-request",maxRequestWorkers:5,httpsDomains:"arcgis.com arcgisonline.com esrikr.com premiumservices.blackbridge.com esripremium.accuweather.com gbm.digitalglobe.com firstlook.digitalglobe.com msi.digitalglobe.com".split(" ")},workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}}}};a("extend-esri")&&(f.config=n);m.noGlobals||(k.esriConfig=n);return n})},
"esri/sniff":function(){define(["dojo/_base/sniff","./kernel"],function(m,l){var a=function(){return this}(),f=m("ff"),k=m("ie"),n=void 0===k&&7<=m("trident"),g=m("edge"),p=m("webkit"),d=m("opera"),c=m("chrome"),b=m("safari"),e=navigator.userAgent,h;(h=e.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i))&&m.add("esri-iphone",parseFloat(h[2].replace("_",".")));(h=e.match(/Android\s+(\d+\.\d+)/i))&&m.add("esri-android",parseFloat(h[1]));(h=e.match(/Fennec\/(\d+\.\d+)/i))&&m.add("esri-fennec",parseFloat(h[1]));
0<=e.indexOf("BlackBerry")&&0<=e.indexOf("WebKit")&&m.add("esri-blackberry",1);m.add("esri-touch",m("esri-iphone")||m("esri-android")||m("esri-blackberry")||6<=m("esri-fennec")||(f||p)&&document.createTouch?!0:!1);(h=e.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i))&&m.add("esri-mobile",h);m.add("esri-pointer",navigator.pointerEnabled||navigator.msPointerEnabled);l._getDOMAccessor=function(a){var b="";f?b="Moz":p?b="Webkit":k?b="ms":d&&(b="O");return b+a.charAt(0).toUpperCase()+
a.substr(1)};m.add("esri-phonegap",!!a.cordova);m.add("esri-cors",m("esri-phonegap")||a.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest);m.add("esri-file-upload",a.FormData&&a.FileList?!0:!1);m.add("esri-workers",a.Worker?!0:!1);m.add("esri-script-sandbox",function(){return"MessageChannel"in a&&"HTMLIFrameElement"in a&&"sandbox"in HTMLIFrameElement.prototype});m.add("esri-transforms",n||g||9<=k||3.5<=f||4<=c||3.1<=b||10.5<=d||3.2<=m("esri-iphone")||2.1<=m("esri-android"));m.add("esri-transitions",
n||g||10<=k||4<=f||4<=c||3.1<=b||10.5<=d||3.2<=m("esri-iphone")||2.1<=m("esri-android"));m.add("esri-transforms3d",n||g||10<=f||12<=c||4<=b||3.2<=m("esri-iphone")||3<=m("esri-android"));m.add("esri-url-encodes-apostrophe",function(){if(a.document)return!1;var b=a.document.createElement("a");b.href="?'";return-1<b.href.indexOf("?%27")});3>m("esri-android")&&(m.add("esri-transforms",!1,!1,!0),m.add("esri-transitions",!1,!1,!0),m.add("esri-transforms3d",!1,!1,!0));m.add("esri-will-change",m("esri-transforms")&&
(52<=c||11.1<=b));l._css=function(a){var e=m("esri-transforms3d");void 0!==a&&null!==a?e=a:e&&(c||b&&!m("esri-iphone"))&&(e=!1);var h=e?"translate3d(":"translate(",u=e?c?",-1px)":",0px)":")",q=e?"scale3d(":"scale(",g=e?",1)":")",v=e?"rotate3d(0,0,1,":"rotate(",t=e?"matrix3d(":"matrix(",n=e?",0,0,":",",l=e?",0,0,0,0,1,0,":",",E=e?",0,1)":")";return{names:{transition:p&&"-webkit-transition"||f&&"MozTransition"||d&&"OTransition"||k&&"msTransition"||"transition",transform:p&&"-webkit-transform"||f&&"MozTransform"||
d&&"OTransform"||k&&"msTransform"||"transform",transformName:p&&"-webkit-transform"||f&&"-moz-transform"||d&&"-o-transform"||k&&"-ms-transform"||"transform",origin:p&&"-webkit-transform-origin"||f&&"MozTransformOrigin"||d&&"OTransformOrigin"||k&&"msTransformOrigin"||"transformOrigin",endEvent:p&&"webkitTransitionEnd"||f&&"transitionend"||d&&"oTransitionEnd"||k&&"MSTransitionEnd"||"transitionend"},translate:function(a,b){return h+a+"px,"+b+"px"+u},scale:function(a){return q+a+","+a+g},rotate:function(a){return v+
a+"deg)"},matrix:function(a){return t+a.xx+","+a.xy+n+a.yx+","+a.yy+l+a.dx.toFixed(10)+(f?"px,":",")+a.dy.toFixed(10)+(f?"px":"")+E},getScaleFromMatrix:function(a){if(!a)return 1;a=a.toLowerCase();var b=-1<a.indexOf("matrix3d")?"matrix3d(":"matrix(";return Number(a.substring(b.length,a.indexOf(",")))}}};m("extend-esri")&&(l.isiPhone=m("esri-iphone"),l.isAndroid=m("esri-android"),l.isFennec=m("esri-fennec"),l.isBlackBerry=m("esri-blackberry"),l.isTouchEnabled=m("esri-touch"),l.isPointerEnabled=m("esri-pointer"),
l._hasCors=m("esri-cors"),l._hasFileUpload=m("esri-file-upload"),l._hasTransforms=m("esri-transforms"),l._hasTransitions=m("esri-transitions"),l._has3DTransforms=m("esri-transforms3d"));return m})},"esri/map":function(){define("require dojo/_base/kernel dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/event dojo/on dojo/aspect dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dijit/a11yclick dijit/registry ./kernel ./config ./sniff ./lang ./_coremap ./MapNavigationManager dojo/i18n!./nls/jsapi".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C,y,z,E){var B={up:"panUp",right:"panRight",down:"panDown",left:"panLeft"},R={upperRight:"panUpperRight",lowerRight:"panLowerRight",lowerLeft:"panLowerLeft",upperLeft:"panUpperLeft"},D=f.connect,H=f.disconnect,O=h.create,Y=r.set,T=k.hitch,F=t.getMarginBox,S=l.deprecated,K=k.mixin,Z=0;l=a(y,{declaredClass:"esri.Map",constructor:function(a,b){b=b||{};K(this,{_slider:null,_navDiv:null,_mapParams:K({attributionWidth:.45,slider:!0,nav:!1,logo:!0,sliderStyle:"small",
sliderPosition:"top-left",sliderOrientation:"vertical",autoResize:!0},b)});K(this,{isMapNavigation:null!=b.isMapNavigation?b.isMapNavigation:!0,isDoubleClickZoom:null!=b.isDoubleClickZoom?b.isDoubleClickZoom:!0,isClickRecenter:null!=b.isClickRecenter?b.isClickRecenter:!0,isPan:null!=b.isPan?b.isPan:!0,isRubberBandZoom:null!=b.isRubberBandZoom?b.isRubberBandZoom:!0,isPinchZoom:null!=b.isPinchZoom?b.isPinchZoom:!0,isKeyboardNavigation:null!=b.isKeyboardNavigation?b.isKeyboardNavigation:!0,isScrollWheel:null!=
b.isScrollWheel?b.isScrollWheel:!0,isShiftDoubleClickZoom:!1,isScrollWheelZoom:!1,isPanArrows:!1,isZoomSlider:!1});k.isFunction(q._css)&&(q._css=q._css(this._mapParams.force3DTransforms),this.force3DTransforms=this._mapParams.force3DTransforms);var c=v("esri-transforms")&&v("esri-transitions");this.navigationMode=this._mapParams.navigationMode||c&&"css-transforms"||"classic";"css-transforms"!==this.navigationMode||c||(this.navigationMode="classic");this.fadeOnZoom=C.isDefined(this._mapParams.fadeOnZoom)?
this._mapParams.fadeOnZoom:"css-transforms"===this.navigationMode;"css-transforms"!==this.navigationMode&&(this.fadeOnZoom=!1);this.setMapCursor("default");this.smartNavigation=b&&b.smartNavigation;if(!(C.isDefined(this.smartNavigation)||!v("mac")||v("esri-touch")||v("esri-pointer")||3.5>=v("ff"))){var e=navigator.userAgent.match(/Mac\s+OS\s+X\s+([\d]+)(\.|\_)([\d]+)\D/i);e&&C.isDefined(e[1])&&C.isDefined(e[3])&&(c=parseInt(e[1],10),e=parseInt(e[3],10),this.smartNavigation=10<c||10===c&&6<=e)}c=!0;
c=!1;this.showAttribution=C.isDefined(this._mapParams.showAttribution)?this._mapParams.showAttribution:c;this._onLoadHandler_connect=D(this,"onLoad",this,"_onLoadInitNavsHandler");var h=O("div",{"class":"esriControlsBR"+(this._mapParams.nav?" withPanArrows":"")},this.root);if(this.showAttribution)if(c=k.getObject("esri.dijit.Attribution",!1))this._initAttribution(c,h);else{var u=Z++,r=this;this._rids&&this._rids.push(u);m(["./dijit/Attribution"],function(a){var b=r._rids?n.indexOf(r._rids,u):-1;-1!==
b&&(r._rids.splice(b,1),r._initAttribution(a,h))})}this._mapParams.logo&&(c={},6===v("ie")&&(c.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled\x3d'true', sizingMethod\x3d'crop', src\x3d'"+m.toUrl("./images/map/logo-med.png")+"')"),this._ogol=O("div",{style:c,tabIndex:"0",title:"Esri"},h),this._setLogoSize(),this._onMapResizeLogo_connect=D(this,"onResize",this,"_setLogoSize"),this._ogol_connect=D(this._ogol,w,this,"_openLogoLink"));this.navigationManager=new z(this);b&&b.basemap&&
(this._onLoadFix=!0,this.setBasemap(b.basemap),this._onLoadFix=!1);if(this.autoResize=this._mapParams.autoResize)c=this._getEnclosingResizableWidget(this.container)||window,e=this.resize,this._rszSignal=p.pausable(c,"resize",e),this._oriSignal=p.pausable(window,"orientationchange",e),d.after(c,"resize",e,!0),this._startResizeTimer()},_startResizeTimer:function(){clearTimeout(this._persistentTimer);this._persistentTimer=setTimeout(this._timedResize,2*this.resizeDelay)},_getEnclosingResizableWidget:function(a){var b=
u.getEnclosingWidget(a);return b?b.resize?b:this._getEnclosingResizableWidget(a.parentNode):b},_setLogoSize:function(){this._ogol&&(25E4>this.root.clientWidth*this.root.clientHeight?(e.remove(this._ogol,"logo-med"),e.add(this._ogol,"logo-sm")):(e.remove(this._ogol,"logo-sm"),e.add(this._ogol,"logo-med")))},_initAttribution:function(a,b){var c=O("span",{"class":"esriAttribution"},b,"first");Y(c,"maxWidth",Math.floor(this.width*this._mapParams.attributionWidth)+"px");this._connects.push(D(c,w,function(){e.contains(this,
"esriAttributionOpen")?e.remove(this,"esriAttributionOpen"):this.scrollWidth>this.clientWidth&&e.add(this,"esriAttributionOpen")}));this.attribution=new a({map:this},c)},_cleanUp:function(){this.disableMapNavigation();this.navigationManager.destroy();var a=this._slider;a&&a.destroy&&!a._destroyed&&a.destroy();var a=this._navDiv,b=this.attribution;a&&h.destroy(a);b&&b.destroy();this._connects.push(this._slider_connect,this._ogol_connect,this._rszSignal,this._oriSignal);n.forEach(this._connects,H);
clearInterval(this._persistentTimer);this.attribution=this.navigationManager=this._rids=this._connects=this._slider_connect=this._ogol_connect=this._rszSignal=this._oriSignal=this._persistentTimer=null;this.inherited("_cleanUp",arguments)},_isPanningOrZooming:function(){return this.__panning||this.__zooming},_canZoom:function(a){var b=this.getLevel();return!this.__tileInfo||!(b===this.getMinZoom()&&0>a||b===this.getMaxZoom()&&0<a)},_onLoadInitNavsHandler:function(){this._evalMapNavigation();this._createNav();
if("small"===this._mapParams.sliderStyle||!this._createSlider)this._createSimpleSlider();else if(this._mapParams.slider){var a=-1!==this._getSliderClass(!0).indexOf("Horizontal"),a=[a?"dijit.form.HorizontalSlider":"dijit.form.VerticalSlider",a?"dijit.form.HorizontalRule":"dijit.form.VerticalRule",a?"dijit.form.HorizontalRuleLabels":"dijit.form.VerticalRuleLabels"];if(n.some(a,function(a){return!k.getObject(a,!1)})){var a=n.map(a,function(a){return a.replace(/\./g,"/")}),b=Z++,c=this;this._rids&&this._rids.push(b);
m(a,function(){var a=c._rids?n.indexOf(c._rids,b):-1;-1!==a&&(c._rids.splice(a,1),c._createSlider.apply(c,arguments))})}else a=n.map(a,function(a){return k.getObject(a,!1)}),this._createSlider.apply(this,a)}H(this._onLoadHandler_connect)},_createNav:function(){if(this._mapParams.nav){var a,b,c,d=e.add,q=this.id;this._navDiv=O("div",{id:q+"_navdiv"},this.root);d(this._navDiv,"navDiv");var h=this.width/2,v=this.height/2,u;for(c in B)b=B[c],a=O("div",{id:q+"_pan_"+c},this._navDiv),d(a,"fixedPan "+b),
"up"===c||"down"===c?(u=parseInt(F(a).w,10)/2,Y(a,{left:h-u+"px",zIndex:30})):(u=parseInt(F(a).h,10)/2,Y(a,{top:v-u+"px",zIndex:30})),this._connects.push(D(a,"onclick",T(this,this[b])));this._onMapResizeNavHandler_connect=D(this,"onResize",this,"_onMapResizeNavHandler");for(c in R)b=R[c],a=O("div",{id:q+"_pan_"+c,style:{zIndex:30}},this._navDiv),d(a,"fixedPan "+b),this._connects.push(D(a,"onclick",T(this,this[b])));this.isPanArrows=!0}},_onMapResizeNavHandler:function(a,b,e){a=this.id;b/=2;e/=2;var d=
c.byId,q,h,v;for(q in B)h=d(a+"_pan_"+q),"up"===q||"down"===q?(v=parseInt(F(h).w,10)/2,Y(h,"left",b-v+"px")):(v=parseInt(F(h).h,10)/2,Y(h,"top",e-v+"px"))},_createSimpleSlider:function(){if(this._mapParams.slider){var a=this._slider=O("div",{id:this.id+"_zoom_slider","class":this._getSliderClass(),style:{zIndex:30}}),b=O("div",{"class":"esriSimpleSliderIncrementButton",tabIndex:"0",role:"button"},a),d=O("div",{"class":"esriSimpleSliderDecrementButton",tabIndex:"0",role:"button"},a);this._addZoomButtonTooltips(b,
d);this._incButton=b;this._decButton=d;this._simpleSliderZoomHandler(null,null,null,this.getLevel());var q=E.widgets.zoomSlider;this._addZoomButtonIcon(b,"+",q.zoomIn);this._addZoomButtonIcon(d,"\x26minus;",q.zoomOut);8>v("ie")&&e.add(d,"dj_ie67Fix");this._connects.push(D(b,w,this,this._simpleSliderChangeHandler));this._connects.push(D(d,w,this,this._simpleSliderChangeHandler));(-1<this.getMaxZoom()||-1<this.getMinZoom())&&this._connects.push(D(this,"onZoomEnd",this,this._simpleSliderZoomHandler));
10>v("ie")&&c.setSelectable(a,!1);this.root.appendChild(a);this.isZoomSlider=!0}},_simpleSliderChangeHandler:function(a){g.stop(a);a=-1!==a.currentTarget.className.indexOf("IncrementButton")?!0:!1;this._extentUtil({numLevels:a?1:-1})},_simpleSliderZoomHandler:function(a,b,c,d){var q;a=this._incButton;b=this._decButton;-1<d&&d===this.getMaxZoom()?q=a:-1<d&&d===this.getMinZoom()&&(q=b);q?(e.add(q,"esriSimpleSliderDisabledButton"),e.remove(q===a?b:a,"esriSimpleSliderDisabledButton")):(e.remove(a,"esriSimpleSliderDisabledButton"),
e.remove(b,"esriSimpleSliderDisabledButton"))},_getSliderClass:function(a){a=a?"Large":"Simple";var b=this._mapParams.sliderOrientation,c=this._mapParams.sliderPosition||"",b=b&&"horizontal"===b.toLowerCase()?"esri"+a+"SliderHorizontal":"esri"+a+"SliderVertical";if(c)switch(c.toLowerCase()){case "top-left":c="esri"+a+"SliderTL";break;case "top-right":c="esri"+a+"SliderTR";break;case "bottom-left":c="esri"+a+"SliderBL";break;case "bottom-right":c="esri"+a+"SliderBR"}return"esri"+a+"Slider "+b+" "+
c},_addZoomButtonIcon:function(a,b,c){h.create("span",{"aria-hidden":"true",role:"presentation",innerHTML:b},a);h.create("span",{"class":"esriIconFallbackText",innerHTML:c},a)},_addZoomButtonTooltips:function(a,c){var e=E.widgets.zoomSlider;b.set(a,"title",e.zoomIn);b.set(c,"title",e.zoomOut)},_openLogoLink:function(a){window.open(x.defaults.map.logoLink,"_blank");g.stop(a)},enableMapNavigation:function(){this.isMapNavigation||(this.isMapNavigation=!0,this._evalMapNavigation())},disableMapNavigation:function(){this.isMapNavigation&&
(this.isMapNavigation=!1,this._evalMapNavigation())},_evalMapNavigation:function(){this.isMapNavigation?this.navigationManager.enableNavigation():this.navigationManager.disableNavigation()},_evalNavigationFeature:function(a){if(this.isMapNavigation&&this["is"+a])this.navigationManager["enable"+a]();else this.navigationManager["disable"+a]()},enableDoubleClickZoom:function(){this.isDoubleClickZoom||(this.isDoubleClickZoom=!0,this._evalNavigationFeature("DoubleClickZoom"))},disableDoubleClickZoom:function(){this.isDoubleClickZoom&&
(this.isDoubleClickZoom=!1,this._evalNavigationFeature("DoubleClickZoom"))},enableShiftDoubleClickZoom:function(){this.isShiftDoubleClickZoom||(S(this.declaredClass+": Map.(enable/disable)ShiftDoubleClickZoom deprecated. Shift-Double-Click zoom behavior will not be supported.",null,"v2.0"),this.navigationManager.enableShiftDoubleClickZoom(),this.isShiftDoubleClickZoom=!0)},disableShiftDoubleClickZoom:function(){this.isShiftDoubleClickZoom&&(S(this.declaredClass+": Map.(enable/disable)ShiftDoubleClickZoom deprecated. Shift-Double-Click zoom behavior will not be supported.",
null,"v2.0"),this.navigationManager.disableShiftDoubleClickZoom(),this.isShiftDoubleClickZoom=!1)},enableClickRecenter:function(){this.isClickRecenter||(this.isClickRecenter=!0,this._evalNavigationFeature("ClickRecenter"))},disableClickRecenter:function(){this.isClickRecenter&&(this.isClickRecenter=!1,this._evalNavigationFeature("ClickRecenter"))},enablePan:function(){this.isPan||(this.isPan=!0,this._evalNavigationFeature("Pan"))},disablePan:function(){this.isPan&&(this.isPan=!1,this._evalNavigationFeature("Pan"))},
enableRubberBandZoom:function(){this.isRubberBandZoom||(this.isRubberBandZoom=!0,this._evalNavigationFeature("RubberBandZoom"))},disableRubberBandZoom:function(){this.isRubberBandZoom&&(this.isRubberBandZoom=!1,this._evalNavigationFeature("RubberBandZoom"))},enablePinchZoom:function(){this.isPinchZoom||(this.isPinchZoom=!0,this._evalNavigationFeature("PinchZoom"))},disablePinchZoom:function(){this.isPinchZoom&&(this.isPinchZoom=!1,this._evalNavigationFeature("PinchZoom"))},enableKeyboardNavigation:function(){this.isKeyboardNavigation||
(this.isKeyboardNavigation=!0,this._evalNavigationFeature("KeyboardNavigation"))},disableKeyboardNavigation:function(){this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1,this._evalNavigationFeature("KeyboardNavigation"))},enableScrollWheel:function(){this.isScrollWheel||(this.isScrollWheel=!0,this._evalNavigationFeature("ScrollWheel"))},disableScrollWheel:function(){this.isScrollWheel&&(this.isScrollWheel=!1,this._evalNavigationFeature("ScrollWheel"))},enableScrollWheelZoom:function(){this.isScrollWheelZoom||
(this.navigationManager.enableScrollWheelZoom(),this.isScrollWheelZoom=!0)},disableScrollWheelZoom:function(){this.isScrollWheelZoom&&(this.navigationManager.disableScrollWheelZoom(),this.isScrollWheelZoom=!1)},enableScrollWheelPan:function(){this.isScrollWheelPan||this.navigationManager.enableScrollWheelPan()},disableScrollWheelPan:function(){this.isScrollWheelPan&&this.navigationManager.disableScrollWheelPan()},showPanArrows:function(){this._navDiv&&(this._navDiv.style.display="block",this.isPanArrows=
!0)},hidePanArrows:function(){this._navDiv&&(this._navDiv.style.display="none",this.isPanArrows=!1)},showZoomSlider:function(){this._slider&&(Y(this._slider.domNode||this._slider,"visibility","inherit"),this.isZoomSlider=!0)},hideZoomSlider:function(){this._slider&&(Y(this._slider.domNode||this._slider,"visibility","hidden"),this.isZoomSlider=!1)}});v("extend-esri")&&(q.Map=l);return l})},"dijit/a11yclick":function(){define(["dojo/keys","dojo/mouse","dojo/on","dojo/touch"],function(m,l,a,f){function k(a){if((a.keyCode===
m.ENTER||a.keyCode===m.SPACE)&&!/input|button|textarea/i.test(a.target.nodeName))for(a=a.target;a;a=a.parentNode)if(a.dojoClick)return!0}var n;a(document,"keydown",function(a){k(a)?(n=a.target,a.preventDefault()):n=null});a(document,"keyup",function(g){k(g)&&g.target==n&&(n=null,a.emit(g.target,"click",{cancelable:!0,bubbles:!0,ctrlKey:g.ctrlKey,shiftKey:g.shiftKey,metaKey:g.metaKey,altKey:g.altKey,_origType:g.type}))});var g=function(g,d){g.dojoClick=!0;return a(g,"click",d)};g.click=g;g.press=function(g,
d){var c=a(g,f.press,function(a){("mousedown"!=a.type||l.isLeft(a))&&d(a)}),b=a(g,"keydown",function(a){a.keyCode!==m.ENTER&&a.keyCode!==m.SPACE||d(a)});return{remove:function(){c.remove();b.remove()}}};g.release=function(g,d){var c=a(g,f.release,function(a){("mouseup"!=a.type||l.isLeft(a))&&d(a)}),b=a(g,"keyup",function(a){a.keyCode!==m.ENTER&&a.keyCode!==m.SPACE||d(a)});return{remove:function(){c.remove();b.remove()}}};g.move=f.move;return g})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),
function(m,l,a,f,k,n,g,p,d,c){function b(a,b,c){return r&&c?function(a,b){return n(a,c,b)}:u?function(c,e){var d=n(c,b,function(a){e.call(this,a);D=(new Date).getTime()}),q=n(c,a,function(a){(!D||(new Date).getTime()>D+1E3)&&e.call(this,a)});return{remove:function(){d.remove();q.remove()}}}:function(b,c){return n(b,a,c)}}function e(a){do if(void 0!==a.dojoClick)return a;while(a=a.parentNode)}function h(b,d,h){if(!p.isRight(b)){var u=e(b.target);if(x=!b.target.disabled&&u&&u.dojoClick)if(C=(v="useTarget"==
x)?u:b.target,v&&b.preventDefault(),y=b.changedTouches?b.changedTouches[0].pageX-c.global.pageXOffset:b.clientX,z=b.changedTouches?b.changedTouches[0].pageY-c.global.pageYOffset:b.clientY,E=("object"==typeof x?x.x:"number"==typeof x?x:0)||4,B=("object"==typeof x?x.y:"number"==typeof x?x:0)||4,!q){b=function(a){c.doc.addEventListener(a,function(b){var c=b.target;x&&!b._dojo_click&&(new Date).getTime()<=R+1E3&&("INPUT"!=c.tagName||!f.contains(c,"dijitOffScreen"))&&(b.stopPropagation(),b.stopImmediatePropagation&&
b.stopImmediatePropagation(),"click"==a&&("INPUT"!=c.tagName||"radio"==c.type&&(f.contains(c,"dijitCheckBoxInput")||f.contains(c,"mblRadioButton"))||"checkbox"==c.type&&(f.contains(c,"dijitCheckBoxInput")||f.contains(c,"mblCheckBox")))&&"TEXTAREA"!=c.tagName&&"AUDIO"!=c.tagName&&"VIDEO"!=c.tagName&&b.preventDefault())},!0)};var r=function(b){x=v?a.isDescendant(c.doc.elementFromPoint(b.changedTouches?b.changedTouches[0].pageX-c.global.pageXOffset:b.clientX,b.changedTouches?b.changedTouches[0].pageY-
c.global.pageYOffset:b.clientY),C):x&&(b.changedTouches?b.changedTouches[0].target:b.target)==C&&Math.abs((b.changedTouches?b.changedTouches[0].pageX-c.global.pageXOffset:b.clientX)-y)<=E&&Math.abs((b.changedTouches?b.changedTouches[0].pageY-c.global.pageYOffset:b.clientY)-z)<=B};q=!0;c.doc.addEventListener(d,function(a){p.isRight(a)||(r(a),v&&a.preventDefault())},!0);c.doc.addEventListener(h,function(b){if(!p.isRight(b)&&(r(b),x)){var c=function(a){var c=document.createEvent("MouseEvents");c._dojo_click=
!0;c.initMouseEvent(a,!0,!0,b.view,b.detail,d.screenX,d.screenY,d.clientX,d.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,null);return c};R=(new Date).getTime();var e=v?C:b.target;"LABEL"===e.tagName&&(e=a.byId(e.getAttribute("for"))||e);var d=b.changedTouches?b.changedTouches[0]:b,q=c("mousedown"),h=c("mouseup"),u=c("click");setTimeout(function(){n.emit(e,"mousedown",q);n.emit(e,"mouseup",h);n.emit(e,"click",u);R=(new Date).getTime()},0)}},!0);b("click");b("mousedown");b("mouseup")}}}var t=5>
g("ios"),r=g("pointer-events")||g("MSPointer"),w=function(){var a={},b;for(b in{down:1,move:1,up:1,cancel:1,over:1,out:1})a[b]=g("MSPointer")?"MSPointer"+b.charAt(0).toUpperCase()+b.slice(1):"pointer"+b;return a}(),u=g("touch-events"),q,x,v=!1,C,y,z,E,B,R,D,H;g("touch")&&(r?d(function(){c.doc.addEventListener(w.down,function(a){h(a,w.move,w.up)},!0)}):d(function(){function a(a){var b=k.delegate(a,{bubbles:!0});6<=g("ios")&&(b.touches=a.touches,b.altKey=a.altKey,b.changedTouches=a.changedTouches,b.ctrlKey=
a.ctrlKey,b.metaKey=a.metaKey,b.shiftKey=a.shiftKey,b.targetTouches=a.targetTouches);return b}H=c.body();c.doc.addEventListener("touchstart",function(a){D=(new Date).getTime();var b=H;H=a.target;n.emit(b,"dojotouchout",{relatedTarget:H,bubbles:!0});n.emit(H,"dojotouchover",{relatedTarget:b,bubbles:!0});h(a,"touchmove","touchend")},!0);n(c.doc,"touchmove",function(b){D=(new Date).getTime();var e=c.doc.elementFromPoint(b.pageX-(t?0:c.global.pageXOffset),b.pageY-(t?0:c.global.pageYOffset));e&&(H!==e&&
(n.emit(H,"dojotouchout",{relatedTarget:e,bubbles:!0}),n.emit(e,"dojotouchover",{relatedTarget:H,bubbles:!0}),H=e),n.emit(e,"dojotouchmove",a(b))||b.preventDefault())});n(c.doc,"touchend",function(b){D=(new Date).getTime();var e=c.doc.elementFromPoint(b.pageX-(t?0:c.global.pageXOffset),b.pageY-(t?0:c.global.pageYOffset))||c.body();n.emit(e,"dojotouchend",a(b))})}));l={press:b("mousedown","touchstart",w.down),move:b("mousemove","dojotouchmove",w.move),release:b("mouseup","dojotouchend",w.up),cancel:b(p.leave,
"touchcancel",r?w.cancel:null),over:b("mouseover","dojotouchover",w.over),out:b("mouseout","dojotouchout",w.out),enter:p._eventHandler(b("mouseover","dojotouchover",w.over)),leave:p._eventHandler(b("mouseout","dojotouchout",w.out))};return m.touch=l})},"esri/lang":function(){define("dojo/_base/array dojo/_base/json dojo/_base/kernel dojo/_base/lang dojo/date dojo/has dojo/number dojo/date/locale ./kernel".split(" "),function(m,l,a,f,k,n,g,p,d){function c(b,c,e){return[f.isString(b)?b.split(""):b,
c||a.global,f.isString(e)?new Function("item","index","array",e):e]}function b(a){return void 0!==a&&null!==a}function e(a){return b(a)?a:""}function h(a,c,d){var q=d.match(/([^\(]+)(\([^\)]+\))?/i),h=f.trim(q[1]);d=c[a];var q=l.fromJson((q[2]?f.trim(q[2]):"()").replace(/^\(/,"({").replace(/\)$/,"})")),u=q.utcOffset;if(-1===m.indexOf(r,h))h=f.getObject(h),f.isFunction(h)&&(d=h(d,a,c,q));else if("number"===typeof d||"string"===typeof d&&d&&!isNaN(Number(d)))switch(d=Number(d),h){case "NumberFormat":return g.format(d,
q);case "DateString":a=new Date(d);if(q.local||q.systemLocale)return q.systemLocale?a.toLocaleDateString()+(q.hideTime?"":" "+a.toLocaleTimeString()):a.toDateString()+(q.hideTime?"":" "+a.toTimeString());a=a.toUTCString();q.hideTime&&(a=a.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return a;case "DateFormat":return a=new Date(d),b(u)&&(a=k.add(a,"minute",a.getTimezoneOffset()-u)),p.format(a,q)}return e(d)}function t(a,b){var c;if(b)for(c in a)a.hasOwnProperty(c)&&(void 0===a[c]?delete a[c]:a[c]instanceof
Object&&t(a[c],!0));else for(c in a)a.hasOwnProperty(c)&&void 0===a[c]&&delete a[c];return a}var r=["NumberFormat","DateString","DateFormat"],w=/<\/?[^>]+>/g,u={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(w,"");else if("object"===b)for(var c in a)(b=a[c])&&"string"===typeof b&&(b=b.replace(w,"")),a[c]=b}return a},substitute:function(a,c,d){var q,u,r;b(d)&&(f.isObject(d)?(q=d.first,u=d.dateFormat,r=d.numberFormat):
q=d);if(c&&"${*}"!==c)return f.replace(c,f.hitch({obj:a},function(a,b){var c=b.split(":");return 1<c.length?(b=c[0],c.shift(),h(b,this.obj,c.join(":"))):u&&-1!==m.indexOf(u.properties||"",b)?h(b,this.obj,u.formatter||"DateString"):r&&-1!==m.indexOf(r.properties||"",b)?h(b,this.obj,r.formatter||"NumberFormat"):e(this.obj[b])}),/\$\{([^\}]+)\}/g);c=[];for(var v in a)if(d=a[v],u&&-1!==m.indexOf(u.properties||"",v)?d=h(v,a,u.formatter||"DateString"):r&&-1!==m.indexOf(r.properties||"",v)&&(d=h(v,a,r.formatter||
"NumberFormat")),c.push(v+" \x3d "+e(d)+"\x3cbr/\x3e"),q)break;return c.join("")},filter:function(a,b,e){b=c(a,e,b);e={};var d;a=b[0];for(d in a)b[2].call(b[d],a[d],d,a)&&(e[d]=a[d]);return e},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:b,fixJson:t};n("extend-esri")&&(f.mixin(d,u),d._isDefined=b,d._getParts=c,d._sanitize=
t);return u})},"dojo/date":function(){define(["./has","./_base/lang"],function(m,l){var a={getDaysInMonth:function(f){var k=f.getMonth();return 1==k&&a.isLeapYear(f)?29:[31,28,31,30,31,30,31,31,30,31,30,31][k]},isLeapYear:function(a){a=a.getFullYear();return!(a%400)||!(a%4)&&!!(a%100)},getTimezoneName:function(a){var f=a.toString(),n="",g=f.indexOf("(");if(-1<g)n=f.substring(++g,f.indexOf(")"));else if(g=/([A-Z\/]+) \d{4}$/,f=f.match(g))n=f[1];else if(f=a.toLocaleString(),g=/ ([A-Z\/]+)$/,f=f.match(g))n=
f[1];return"AM"==n||"PM"==n?"":n},compare:function(a,k,n){a=new Date(+a);k=new Date(+(k||new Date));"date"==n?(a.setHours(0,0,0,0),k.setHours(0,0,0,0)):"time"==n&&(a.setFullYear(0,0,0),k.setFullYear(0,0,0));return a>k?1:a<k?-1:0},add:function(a,k,n){var g=new Date(+a),f=!1,d="Date";switch(k){case "day":break;case "weekday":var c;(k=n%5)?c=parseInt(n/5):(k=0<n?5:-5,c=0<n?(n-5)/5:(n+5)/5);var b=a.getDay(),e=0;6==b&&0<n?e=1:0==b&&0>n&&(e=-1);b+=k;if(0==b||6==b)e=0<n?2:-2;n=7*c+k+e;break;case "year":d=
"FullYear";f=!0;break;case "week":n*=7;break;case "quarter":n*=3;case "month":f=!0;d="Month";break;default:d="UTC"+k.charAt(0).toUpperCase()+k.substring(1)+"s"}if(d)g["set"+d](g["get"+d]()+n);f&&g.getDate()<a.getDate()&&g.setDate(0);return g},difference:function(f,k,n){k=k||new Date;n=n||"day";var g=k.getFullYear()-f.getFullYear(),p=1;switch(n){case "quarter":f=f.getMonth();k=k.getMonth();p=Math.floor(k/3)+1+4*g-(Math.floor(f/3)+1);break;case "weekday":g=Math.round(a.difference(f,k,"day"));n=parseInt(a.difference(f,
k,"week"));if(0==g%7)g=5*n;else{var p=0,d=f.getDay(),c=k.getDay();n=parseInt(g/7);k=g%7;f=new Date(f);f.setDate(f.getDate()+7*n);f=f.getDay();if(0<g)switch(!0){case 6==d:p=-1;break;case 0==d:p=0;break;case 6==c:p=-1;break;case 0==c:p=-2;break;case 5<f+k:p=-2}else if(0>g)switch(!0){case 6==d:p=0;break;case 0==d:p=1;break;case 6==c:p=2;break;case 0==c:p=1;break;case 0>f+k:p=2}g=g+p-2*n}p=g;break;case "year":p=g;break;case "month":p=k.getMonth()-f.getMonth()+12*g;break;case "week":p=parseInt(a.difference(f,
k,"day")/7);break;case "day":p/=24;case "hour":p/=60;case "minute":p/=60;case "second":p/=1E3;case "millisecond":p*=k.getTime()-f.getTime()}return Math.round(p)}};l.mixin(l.getObject("dojo.date",!0),a);return a})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(m,l,a,f,k){var n={};m.setObject("dojo.number",n);n.format=function(a,d){d=m.mixin({},d||{});var c=l.normalizeLocale(d.locale),c=l.getLocalization("dojo.cldr","number",c);d.customs=
c;c=d.pattern||c[(d.type||"decimal")+"Format"];return isNaN(a)||Infinity==Math.abs(a)?null:n._applyPattern(a,c,d)};n._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;n._applyPattern=function(a,d,c){c=c||{};var b=c.customs.group,e=c.customs.decimal;d=d.split(";");var h=d[0];d=d[0>a?1:0]||"-"+h;if(-1!=d.indexOf("%"))a*=100;else if(-1!=d.indexOf("\u2030"))a*=1E3;else if(-1!=d.indexOf("\u00a4"))b=c.customs.currencyGroup||b,e=c.customs.currencyDecimal||e,d=d.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(a,
b,e,d){return(a=c[["symbol","currency","displayName"][e.length-1]]||c.currency||"")?b+a+d:""});else if(-1!=d.indexOf("E"))throw Error("exponential notation not supported");var g=n._numberPatternRE,h=h.match(g);if(!h)throw Error("unable to find a number expression in pattern: "+d);!1===c.fractional&&(c.places=0);return d.replace(g,n._formatAbsolute(a,h[0],{decimal:e,group:b,places:c.places,round:c.round}))};n.round=function(a,d,c){c=10/(c||10);return(c*+a).toFixed(d)/c};if(0==(.9).toFixed()){var g=
n.round;n.round=function(a,d,c){var b=Math.pow(10,-d||0),e=Math.abs(a);if(!a||e>=b)b=0;else if(e/=b,.5>e||.95<=e)b=0;return g(a,d,c)+(0<a?b:-b)}}n._formatAbsolute=function(a,d,c){c=c||{};!0===c.places&&(c.places=0);Infinity===c.places&&(c.places=6);d=d.split(".");var b="string"==typeof c.places&&c.places.indexOf(","),e=c.places;b?e=c.places.substring(b+1):0<=e||(e=(d[1]||[]).length);0>c.round||(a=n.round(a,e,c.round));a=String(Math.abs(a)).split(".");var h=a[1]||"";d[1]||c.places?(b&&(c.places=c.places.substring(0,
b)),b=void 0!==c.places?c.places:d[1]&&d[1].lastIndexOf("0")+1,b>h.length&&(a[1]=f.pad(h,b,"0",!0)),e<h.length&&(a[1]=h.substr(0,e))):a[1]&&a.pop();e=d[0].replace(",","");b=e.indexOf("0");-1!=b&&(b=e.length-b,b>a[0].length&&(a[0]=f.pad(a[0],b)),-1==e.indexOf("#")&&(a[0]=a[0].substr(a[0].length-b)));var e=d[0].lastIndexOf(","),g,r;-1!=e&&(g=d[0].length-e-1,d=d[0].substr(0,e),e=d.lastIndexOf(","),-1!=e&&(r=d.length-e-1));d=[];for(e=a[0];e;)b=e.length-g,d.push(0<b?e.substr(b):e),e=0<b?e.slice(0,b):"",
r&&(g=r,r=void 0);a[0]=d.reverse().join(c.group||",");return a.join(c.decimal||".")};n.regexp=function(a){return n._parseInfo(a).regexp};n._parseInfo=function(a){a=a||{};var d=l.normalizeLocale(a.locale),d=l.getLocalization("dojo.cldr","number",d),c=a.pattern||d[(a.type||"decimal")+"Format"],b=d.group,e=d.decimal,h=1;if(-1!=c.indexOf("%"))h/=100;else if(-1!=c.indexOf("\u2030"))h/=1E3;else{var g=-1!=c.indexOf("\u00a4");g&&(b=d.currencyGroup||b,e=d.currencyDecimal||e)}d=c.split(";");1==d.length&&d.push("-"+
d[0]);d=k.buildGroupRE(d,function(c){c="(?:"+k.escapeString(c,".")+")";return c.replace(n._numberPatternRE,function(c){var d={signed:!1,separator:a.strict?b:[b,""],fractional:a.fractional,decimal:e,exponent:!1};c=c.split(".");var q=a.places;1==c.length&&1!=h&&(c[1]="###");1==c.length||0===q?d.fractional=!1:(void 0===q&&(q=a.pattern?c[1].lastIndexOf("0")+1:Infinity),q&&void 0==a.fractional&&(d.fractional=!0),!a.places&&q<c[1].length&&(q+=","+c[1].length),d.places=q);c=c[0].split(",");1<c.length&&(d.groupSize=
c.pop().length,1<c.length&&(d.groupSize2=c.pop().length));return"("+n._realNumberRegexp(d)+")"})},!0);g&&(d=d.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(b,c,e,d){b=k.escapeString(a[["symbol","currency","displayName"][e.length-1]]||a.currency||"");if(!b)return"";c=c?"[\\s\\xa0]":"";d=d?"[\\s\\xa0]":"";return a.strict?c+b+d:(c&&(c+="*"),d&&(d+="*"),"(?:"+c+b+d+")?")}));return{regexp:d.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:b,decimal:e,factor:h}};n.parse=function(a,d){var c=n._parseInfo(d),
b=(new RegExp("^"+c.regexp+"$")).exec(a);if(!b)return NaN;var e=b[1];if(!b[1]){if(!b[2])return NaN;e=b[2];c.factor*=-1}e=e.replace(new RegExp("["+c.group+"\\s\\xa0]","g"),"").replace(c.decimal,".");return e*c.factor};n._realNumberRegexp=function(a){a=a||{};"places"in a||(a.places=Infinity);"string"!=typeof a.decimal&&(a.decimal=".");"fractional"in a&&!/^0/.test(a.places)||(a.fractional=[!0,!1]);"exponent"in a||(a.exponent=[!0,!1]);"eSigned"in a||(a.eSigned=[!0,!1]);var d=n._integerRegexp(a),c=k.buildGroupRE(a.fractional,
function(b){var c="";b&&0!==a.places&&(c="\\"+a.decimal,c=Infinity==a.places?"(?:"+c+"\\d+)?":c+("\\d{"+a.places+"}"));return c},!0),b=k.buildGroupRE(a.exponent,function(b){return b?"([eE]"+n._integerRegexp({signed:a.eSigned})+")":""}),d=d+c;c&&(d="(?:(?:"+d+")|(?:"+c+"))");return d+b};n._integerRegexp=function(a){a=a||{};"signed"in a||(a.signed=[!0,!1]);"separator"in a?"groupSize"in a||(a.groupSize=3):a.separator="";var d=k.buildGroupRE(a.signed,function(a){return a?"[-+]":""},!0),c=k.buildGroupRE(a.separator,
function(b){if(!b)return"(?:\\d+)";b=k.escapeString(b);" "==b?b="\\s":"\u00a0"==b&&(b="\\s\\xa0");var c=a.groupSize,d=a.groupSize2;return d?(b="(?:0|[1-9]\\d{0,"+(d-1)+"}(?:["+b+"]\\d{"+d+"})*["+b+"]\\d{"+c+"})",0<c-d?"(?:"+b+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":b):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+b+"]\\d{"+c+"})*)"},!0);return d+c};return n})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(m,l){var a=/[&<>'"\/]/g,f={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;",
"'":"\x26#x27;","/":"\x26#x2F;"},k={};l.setObject("dojo.string",k);k.escape=function(k){return k?k.replace(a,function(a){return f[a]}):""};k.rep=function(a,g){if(0>=g||!a)return"";for(var f=[];;){g&1&&f.push(a);if(!(g>>=1))break;a+=a}return f.join("")};k.pad=function(a,g,f,d){f||(f="0");a=String(a);g=k.rep(f,Math.ceil((g-a.length)/f.length));return d?a+g:g+a};k.substitute=function(a,g,f,d){d=d||m.global;f=f?l.hitch(d,f):function(a){return a};return a.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,
function(a,b,e){if(""==b)return"$";a=l.getObject(b,!1,g);e&&(a=l.getObject(e,!1,d).call(d,a,b));e=f(a,b);if("undefined"===typeof e)throw Error('string.substitute could not find key "'+b+'" in template');return e.toString()})};k.trim=String.prototype.trim?l.trim:function(a){a=a.replace(/^\s+/,"");for(var g=a.length-1;0<=g;g--)if(/\S/.test(a.charAt(g))){a=a.substring(0,g+1);break}return a};return k})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(m,l){var a={};l.setObject("dojo.regexp",
a);a.escapeString=function(a,k){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(a){return k&&-1!=k.indexOf(a)?a:"\\"+a})};a.buildGroupRE=function(f,k,n){if(!(f instanceof Array))return k(f);for(var g=[],p=0;p<f.length;p++)g.push(k(f[p]));return a.group(g.join("|"),n)};a.group=function(a,k){return"("+(k?"?:":"")+a+")"};return a})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),
function(m,l,a,f,k,n,g,p,d){function c(a,b,c,e){return e.replace(/([a-z])\1*/ig,function(d){var q,u,r=d.charAt(0);d=d.length;var v=["abbr","wide","narrow"];switch(r){case "G":q=b[4>d?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":q=a.getFullYear();switch(d){case 1:break;case 2:if(!c.fullYear){q=String(q);q=q.substr(q.length-2);break}default:u=!0}break;case "Q":case "q":q=Math.ceil((a.getMonth()+1)/3);u=!0;break;case "M":case "L":q=a.getMonth();3>d?(q+=1,u=!0):(r=["months","L"==r?"standAlone":
"format",v[d-3]].join("-"),q=b[r][q]);break;case "w":q=h._getWeekOfYear(a,0);u=!0;break;case "d":q=a.getDate();u=!0;break;case "D":q=h._getDayOfYear(a);u=!0;break;case "e":case "c":if(q=a.getDay(),2>d){q=(q-f.getFirstDayOfWeek(c.locale)+8)%7;break}case "E":q=a.getDay();3>d?(q+=1,u=!0):(r=["days","c"==r?"standAlone":"format",v[d-3]].join("-"),q=b[r][q]);break;case "a":r=12>a.getHours()?"am":"pm";q=c[r]||b["dayPeriods-format-wide-"+r];break;case "h":case "H":case "K":case "k":u=a.getHours();switch(r){case "h":q=
u%12||12;break;case "H":q=u;break;case "K":q=u%12;break;case "k":q=u||24}u=!0;break;case "m":q=a.getMinutes();u=!0;break;case "s":q=a.getSeconds();u=!0;break;case "S":q=Math.round(a.getMilliseconds()*Math.pow(10,d-3));u=!0;break;case "v":case "z":if(q=h._getZone(a,!0,c))break;d=4;case "Z":r=h._getZone(a,!1,c);r=[0>=r?"+":"-",g.pad(Math.floor(Math.abs(r)/60),2),g.pad(Math.abs(r)%60,2)];4==d&&(r.splice(0,0,"GMT"),r.splice(3,0,":"));q=r.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+
e);}u&&(q=g.pad(q,d));return q})}function b(a,b,c,e){var d=function(a){return a};b=b||d;c=c||d;e=e||d;var h=a.match(/(''|[^'])+/g),q="'"==a.charAt(0);l.forEach(h,function(a,e){a?(h[e]=(q?c:b)(a.replace(/''/g,"'")),q=!q):h[e]=""});return e(h.join(""))}function e(a,b,c,e){e=n.escapeString(e);c.strict||(e=e.replace(" a"," ?a"));return e.replace(/([a-z])\1*/ig,function(e){var d;d=e.charAt(0);var h=e.length,q="",r="";c.strict?(1<h&&(q="0{"+(h-1)+"}"),2<h&&(r="0{"+(h-2)+"}")):(q="0?",r="0{0,2}");switch(d){case "y":d=
"\\d{2,4}";break;case "M":case "L":2<h?(d=b["months-"+("L"==d?"standAlone":"format")+"-"+t[h-3]].slice(0).join("|"),c.strict||(d=d.replace(/\./g,""),d="(?:"+d+")\\.?")):d="1[0-2]|"+q+"[1-9]";break;case "D":d="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+q+"[1-9][0-9]|"+r+"[1-9]";break;case "d":d="3[01]|[12]\\d|"+q+"[1-9]";break;case "w":d="[1-4][0-9]|5[0-3]|"+q+"[1-9]";break;case "E":case "e":case "c":d=".+?";break;case "h":d="1[0-2]|"+q+"[1-9]";break;case "k":d="1[01]|"+q+"\\d";break;case "H":d="1\\d|2[0-3]|"+
q+"\\d";break;case "K":d="1\\d|2[0-4]|"+q+"[1-9]";break;case "m":case "s":d="[0-5]\\d";break;case "S":d="\\d{"+h+"}";break;case "a":h=c.am||b["dayPeriods-format-wide-am"];q=c.pm||b["dayPeriods-format-wide-pm"];d=h+"|"+q;c.strict||(h!=h.toLowerCase()&&(d+="|"+h.toLowerCase()),q!=q.toLowerCase()&&(d+="|"+q.toLowerCase()),-1!=d.indexOf(".")&&(d+="|"+d.replace(/\./g,"")));d=d.replace(/\./g,"\\.");break;default:d=".*"}a&&a.push(e);return"("+d+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var h={};m.setObject(d.id.replace(/\//g,
"."),h);h._getZone=function(b,c,e){return c?a.getTimezoneName(b):b.getTimezoneOffset()};h.format=function(a,e){e=e||{};var d=k.normalizeLocale(e.locale),q=e.formatLength||"short",d=h._getGregorianBundle(d),r=[],u=m.hitch(this,c,a,d,e);if("year"==e.selector)return b(d["dateFormatItem-yyyy"]||"yyyy",u);var g;"date"!=e.selector&&(g=e.timePattern||d["timeFormat-"+q])&&r.push(b(g,u));"time"!=e.selector&&(g=e.datePattern||d["dateFormat-"+q])&&r.push(b(g,u));return 1==r.length?r[0]:d["dateTimeFormat-"+q].replace(/\'/g,
"").replace(/\{(\d+)\}/g,function(a,b){return r[b]})};h.regexp=function(a){return h._parseInfo(a).regexp};h._parseInfo=function(a){a=a||{};var c=k.normalizeLocale(a.locale),c=h._getGregorianBundle(c),d=a.formatLength||"short",r=a.datePattern||c["dateFormat-"+d],u=a.timePattern||c["timeFormat-"+d],d="date"==a.selector?r:"time"==a.selector?u:c["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(a,b){return[u,r][b]}),g=[];return{regexp:b(d,m.hitch(this,e,g,c,a)),tokens:g,bundle:c}};h.parse=function(b,
c){var e=/[\u200E\u200F\u202A\u202E]/g,d=h._parseInfo(c),q=d.tokens,r=d.bundle,e=(new RegExp("^"+d.regexp.replace(e,"")+"$",d.strict?"":"i")).exec(b&&b.replace(e,""));if(!e)return null;var u=["abbr","wide","narrow"],g=[1970,0,1,0,0,0,0],w="",e=l.every(e,function(a,b){if(!b)return!0;var e=q[b-1],d=e.length,e=e.charAt(0);switch(e){case "y":if(2!=d&&c.strict)g[0]=a;else if(100>a)a=Number(a),e=""+(new Date).getFullYear(),d=100*e.substring(0,2),e=Math.min(Number(e.substring(2,4))+20,99),g[0]=a<e?d+a:d-
100+a;else{if(c.strict)return!1;g[0]=a}break;case "M":case "L":if(2<d){if(d=r["months-"+("L"==e?"standAlone":"format")+"-"+u[d-3]].concat(),c.strict||(a=a.replace(".","").toLowerCase(),d=l.map(d,function(a){return a.replace(".","").toLowerCase()})),a=l.indexOf(d,a),-1==a)return!1}else a--;g[1]=a;break;case "E":case "e":case "c":d=r["days-"+("c"==e?"standAlone":"format")+"-"+u[d-3]].concat();c.strict||(a=a.toLowerCase(),d=l.map(d,function(a){return a.toLowerCase()}));a=l.indexOf(d,a);if(-1==a)return!1;
break;case "D":g[1]=0;case "d":g[2]=a;break;case "a":d=c.am||r["dayPeriods-format-wide-am"];e=c.pm||r["dayPeriods-format-wide-pm"];if(!c.strict){var h=/\./g;a=a.replace(h,"").toLowerCase();d=d.replace(h,"").toLowerCase();e=e.replace(h,"").toLowerCase()}if(c.strict&&a!=d&&a!=e)return!1;w=a==e?"p":a==d?"a":"";break;case "K":24==a&&(a=0);case "h":case "H":case "k":if(23<a)return!1;g[3]=a;break;case "m":g[4]=a;break;case "s":g[5]=a;break;case "S":g[6]=a}return!0}),d=+g[3];"p"===w&&12>d?g[3]=d+12:"a"===
w&&12==d&&(g[3]=0);d=new Date(g[0],g[1],g[2],g[3],g[4],g[5],g[6]);c.strict&&d.setFullYear(g[0]);var f=q.join(""),t=-1!=f.indexOf("d"),f=-1!=f.indexOf("M");if(!e||f&&d.getMonth()>g[1]||t&&d.getDate()>g[2])return null;if(f&&d.getMonth()<g[1]||t&&d.getDate()<g[2])d=a.add(d,"hour",1);return d};var t=["abbr","wide","narrow"],r=[],w={};h.addCustomFormats=function(a,b){r.push({pkg:a,name:b});w={}};h._getGregorianBundle=function(a){if(w[a])return w[a];var b={};l.forEach(r,function(c){c=k.getLocalization(c.pkg,
c.name,a);b=m.mixin(b,c)},this);return w[a]=b};h.addCustomFormats(d.id.replace(/\/date\/locale$/,".cldr"),"gregorian");h.getNames=function(a,b,c,e){var d;e=h._getGregorianBundle(e);a=[a,c,b];"standAlone"==c&&(c=a.join("-"),d=e[c],1==d[0]&&(d=void 0));a[1]="format";return(d||e[a.join("-")]).concat()};h.isWeekend=function(a,b){var c=f.getWeekend(b),e=(a||new Date).getDay();c.end<c.start&&(c.end+=7,e<c.start&&(e+=7));return e>=c.start&&e<=c.end};h._getDayOfYear=function(b){return a.difference(new Date(b.getFullYear(),
0,1,b.getHours()),b)+1};h._getWeekOfYear=function(a,b){1==arguments.length&&(b=0);var c=(new Date(a.getFullYear(),0,1)).getDay(),e=(c-b+7)%7,e=Math.floor((h._getDayOfYear(a)+e-1)/7);c==b&&e++;return e};return h})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(m,l){var a={};m.setObject("dojo.cldr.supplemental",a);a.getFirstDayOfWeek=function(f){f={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}[a._region(f)];return void 0===f?1:f};a._region=function(a){a=l.normalizeLocale(a);a=a.split("-");var f=a[1];f?4==f.length&&(f=a[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"}[a[0]];return f};a.getWeekend=
function(f){var k=a._region(f);f={"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}[k];k={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}[k];void 0===f&&(f=6);void 0===k&&(k=0);return{start:f,end:k}};return a})},"esri/_coremap":function(){define("require module dojo/_base/kernel dojo/_base/declare dojo/_base/connect dojo/_base/Deferred dojo/_base/lang dojo/_base/array dojo/_base/event dojo/_base/unload dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/sniff dijit/registry dojox/gfx/matrix ./kernel ./config ./basemaps ./lang ./Evented ./fx ./deferredUtils ./tileUtils ./urlUtils ./PluginTarget ./Color ./arcade/Dictionary ./geometry/Point ./geometry/ScreenPoint ./geometry/Extent ./geometry/Rect ./geometry/mathUtils ./geometry/scaleUtils ./geometry/screenUtils ./geometry/webMercatorUtils ./layers/GraphicsLayer ./layers/TileInfo ./layers/LOD ./layers/ArcGISTiledMapServiceLayer ./layers/MapImageLayer ./layers/OpenStreetMapLayer ./layers/VectorTileLayer ./dijit/Popup ./plugins/popupManager dojo/uacss".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C,y,z,E,B,R,D,H,O,Y,T,F,S,K,Z,V,G,ea,L,W,ca,ua,ja,Q,P,sa,ga){function fa(a,b){var c=a.lods;c.sort(function(a,b){return a.scale>b.scale?-1:a.scale<b.scale?1:0});var e=[],c=p.filter(c,function(a){if(-1===ya(e,a.scale))return e.push(a.scale),!0}),d=b.lods=[],h;p.forEach(c,function(a,b){h=d[b]=new ua(a);h.level=b});b.tileInfo=new ca(Ca(a,{lods:d}))}var va,oa=ea.toMapPoint,Da=ea.toScreenPoint,Fa=k.connect,wa=k.disconnect,ma=g.hitch,ta=w.set,ya=p.indexOf,
Ca=g.mixin,pa=0,ka=C.defaults.map,Ea=ka.layerNamePrefix,Wa=ka.graphicsLayerNamePrefix,Oa=new RegExp("^"+Ea+"(\\d+)$"),Ia=new RegExp("^"+Wa+"(\\d+)$"),Ga=function(){},Ma=0;f=f([E,O],{declaredClass:"esri._CoreMap",resizeDelay:300,invalidExtent:"Map does not have a valid extent.",invalidGeometry:"Geometry (wkid: ${geometry}) cannot be converted to spatial reference of the map (wkid: ${map})",unknownBasemap:'Unable to find basemap definition for: "${basemapName}". Try one of these: ${list}',invalidBasemap:'Unable to add basemap: "${basemapName}".',
unknownLayerType:'Unknown basemap layer type: "${type}" found in basemap definition for: "${basemapName}".',visible:!0,_eventMap:{"basemap-change":!0,"extent-change":["extent","delta","levelChange","lod"],"layer-add":["layer"],"layer-add-result":["layer","error"],"layer-remove":["layer"],"layer-reorder":["layer","index"],"layer-resume":["layer"],"layer-suspend":["layer"],"layers-add-result":["layers"],"layers-removed":!0,"layers-reordered":["layerIds"],load:["map"],pan:["extent","delta"],"pan-end":["extent",
"delta"],"pan-start":["extent","screenPoint"],reposition:["x","y"],resize:["extent","width","height"],scale:["matrix","immediate"],"time-extent-change":["timeExtent"],"before-unload":["map"],unload:["map"],"update-end":["error"],"update-start":!0,zoom:["extent","zoomFactor","anchor"],"zoom-end":["extent","zoomFactor","anchor","level"],"zoom-start":["extent","zoomFactor","anchor","level"],click:!0,"dbl-click":!0,"key-down":!0,"key-up":!0,"mouse-down":!0,"mouse-drag":!0,"mouse-drag-end":!0,"mouse-drag-start":!0,
"mouse-move":!0,"mouse-out":!0,"mouse-over":!0,"mouse-up":!0,"mouse-wheel":!0,"basic-tap":!0,"double-tap":!0,"pinch-end":!0,"pinch-move":!0,"pinch-start":!0,"processed-double-tap":!0,"processed-tap":!0,"swipe-end":!0,"swipe-move":!0,"swipe-start":!0,tap:!0,"two-finger-tap":!0},constructor:function(a,d){d=d||{};this.registerConnectEvents();Ca(this,{_internalLayerIds:[],_layers:[],_layerDivs:[],_layerSize:0,_connects:[],_zoomAnimDiv:null,_zoomAnim:null,_layersDiv:null,_firstLayerId:null,_delta:null,
_cursor:null,_ratioW:1,_ratioH:1,_params:null,_minResolution:0,_maxResolution:0,cursor:null,layerIds:[],graphicsLayerIds:[],graphics:null,_labels:null,loaded:!1,__panning:!1,__zooming:!1,__container:null,root:null,__LOD:null,__tileInfo:null,__visibleRect:null,__visibleDelta:null,_rids:[]});var u=this.container=b.byId(a),g=this.id=e.get(u,"id")||q.getUniqueId(this.declaredClass);h.add(u,"map");var v=r.getContentBox(u),w=h.add,f=t.create;this.position=new S(0,0);this._reposition();var k=this.width=
0<v.w?v.w:ka.width,x=this.height=0<v.h?v.h:ka.height,p=this.root=f("div",{id:g+"_root",style:{width:k+"px",height:x+"px",direction:"ltr"}});w(p,"esriMapContainer");v=this.__container=f("div",{id:g+"_container"},p);ta(v,"position","absolute");w(v,"esriMapContainer");u.appendChild(p);u=this._params=Ca({slider:!0,nav:!1,zoom:-1,minZoom:-1,maxZoom:-1,scale:-1,minScale:0,maxScale:0,showInfoWindowOnClick:!0,displayGraphicsOnPan:!0,wrapAround180:!0,fitExtent:!1,optimizePanAnimation:!0},d);this.wrapAround180=
u.wrapAround180;this.optimizePanAnimation=u.optimizePanAnimation;this.setBackgroundColor(u.backgroundColor);z.isDefined(u.resizeDelay)&&(this.resizeDelay=u.resizeDelay);u.lods&&(fa({rows:512,cols:512,dpi:96,format:"JPEG",compressionQuality:75,origin:{x:-180,y:90},spatialReference:{wkid:4326},lods:u.lods},u),this.__tileInfo=u.tileInfo);this.extent=u.extent;this._extentUtil({mapCenter:u.center,targetLevel:u.zoom,targetScale:u.scale});this.__visibleRect=new Z(0,0,k,x);this.__visibleDelta=new Z(0,0,k,
x);g=this._layersDiv=f("div",{id:g+"_layers"});w(g,"esriMapLayers");v.appendChild(g);this._zoomAnimDiv=f("div",{style:{position:"absolute"}});u.infoWindow?this.infoWindow=u.infoWindow:(w=this.infoWindow=new ga(u.popupOptions,f("div")),w.startup(),w._ootb=!0,ta(w.domNode,"zIndex",40));if(u.showLabels){var n=this;m(["./layers/LabelLayer"],function(a){va=a;n._createLabelLayer()});this.on("load",function(){n._createLabelLayer()})}this.addPlugin(this._getAbsMid("./plugins/popupManager"),{enabled:u.showInfoWindowOnClick});
this._zoomStartHandler=ma(this,this._zoomStartHandler);this._zoomingHandler=ma(this,this._zoomingHandler);this._zoomEndHandler=ma(this,this._zoomEndHandler);this._panningHandler=ma(this,this._panningHandler);this._panEndHandler=ma(this,this._panEndHandler);this._endTranslate=ma(this,this._endTranslate);this._timedResize=ma(this,this._timedResize);this._execResize=ma(this,this._execResize);this._processLabelLayers=ma(this,this._processLabelLayers);this._updateLabelLayers=ma(this,this._updateLabelLayers);
this.resize=ma(this,this.resize);c.addOnWindowUnload(this,this.destroy)},_getAbsMid:function(a){return m.toAbsMid?m.toAbsMid(a):l.id.replace(/\/[^\/]*$/ig,"/")+a},_cleanUp:function(){var a=this.infoWindow;a&&(a._ootb&&a.destroy?a.destroy():a.unsetMap(this),delete this.infoWindow);wa(this._tsTimeExtentChange_connect);this.removePlugin("./plugins/popupManager");t.destroy(this.root);this.root=null},_addLayer:function(a,b,c){if(a.id){var e=a.id.match(a instanceof W?Ia:Oa);e&&e[1]&&(e=Number(e[1]),pa<=
e&&(pa=e+1))}var d=a.id||(a instanceof W?Wa:Ea)+pa++;a.id=d;this._layers[d]=a;var h,q;if(b===this.layerIds||b===this.graphicsLayerIds)h=this._layerSize,this._layerSize++;a._isRefLayer="top"===c;c=!z.isDefined(c)||0>c||c>b.length||"top"===c?b.length:c;0===h&&(this._firstLayerId=d);if(!a._isRefLayer)for(;(q=this.getLayer(b[c-1]))&&q._isRefLayer;)c--;b.splice(c,0,d);var r=ma(this,this._addLayerHandler),u=this;c=this._connects;e=function(){a.loaded?u._onLoadFix?(u._onLoadFix=!1,setTimeout(function(){r(a)},
0)):r(a):(u["_"+d+"_addtoken_load"]=Fa(a,"onLoad",u,"_addLayerHandler"),u["_"+d+"_addtoken_err"]=Fa(a,"onError",u,function(c){r(a,c,b)}))};this.loaded||0===h||a.loaded&&-1===ya(this.graphicsLayerIds,d)?e():c.push(Fa(this,"onLoad",e));return a},_addLayerHandler:function(a,b,c){var e=this.id,d=a.id,h=ya(a instanceof W?this.graphicsLayerIds:this.layerIds,d),q=h,r=!1,u=this._params;wa(this["_"+d+"_addtoken_load"]);wa(this["_"+d+"_addtoken_err"]);if(b)delete this._layers[d],-1!==h&&(c.splice(h,1),this.onLayerAddResult(a,
b));else{-1===h&&(h=ya(this._internalLayerIds,d),q=20+h,r=!0);if(d===this._firstLayerId){b=a.spatialReference;c=this.extent&&this.extent.spatialReference;!c||c.equals(b)||!a.tileInfo&&a.url||(c=null);c=this.spatialReference=c||b;this.wrapAround180=this.wrapAround180&&c&&c._isWrappable()?!0:!1;a.tileInfo&&(this.__tileInfo?(b=this.__tileInfo.lods,this.__tileInfo=Ca({},a.tileInfo),this.__tileInfo.lods=b):(fa(Ca({},a.tileInfo),u),this.__tileInfo=u.tileInfo));if(this.wrapAround180){b=this.__tileInfo;c=
c._getInfo();if(!b||Math.abs(c.origin[0]-b.origin.x)>c.dx)this.wrapAround180=!1;this.wrapAround180&&b&&D._addFrameInfo(b,c)}u.units=a.units;if((b=this.__tileInfo&&this.__tileInfo.lods)&&b.length){c=u.minScale;var h=u.maxScale,g=-1,v=-1,w=!1,f=!1,t;for(t=0;t<b.length;t++)0<c&&!w&&c>=b[t].scale&&(g=b[t].level,w=!0),0<h&&!f&&h>=b[t].scale&&(v=0<t?b[t-1].level:-1,f=!0);-1===u.minZoom&&(u.minZoom=0===c?b[0].level:g);-1===u.maxZoom&&(u.maxZoom=0===h?b[b.length-1].level:v);for(t=0;t<b.length;t++)u.minZoom===
b[t].level&&(u.minScale=b[t].scale,this._minResolution=b[t].resolution),u.maxZoom===b[t].level&&(u.maxScale=b[t].scale,this._maxResolution=b[t].resolution)}else u.minZoom=u.maxZoom=u.zoom=-1}a instanceof W?(this._gc||(this._gc=new W._GraphicsContainer,this._gc._setMap(this,this._layersDiv).id=e+"_gc"),q=a._setMap(this,this._gc._surface),q.id=e+"_"+d,this._layerDivs[d]=q,this._reorderLayers(this.graphicsLayerIds)):(q=a._setMap(this,this._layersDiv,q,this.__LOD),q.id=e+"_"+d,this._layerDivs[d]=q,this._reorderLayers(this.layerIds),
r||-1===a.declaredClass.indexOf("VETiledLayer")||this._onBingLayerAdd(a));d===this._firstLayerId&&(this.graphics=new W({id:e+"_graphics",displayOnPan:u.displayGraphicsOnPan}),this._addLayer(this.graphics,this._internalLayerIds,20));if(a===this.graphics){c=this._layers[this._firstLayerId];e=u.zoom;q=u.scale;b=u.center;c=c.initialExtent||c.fullExtent;this._firstLayerId=null;this.extent&&(this.extent=this._convertGeometry(this,this.extent));!this.extent&&c&&(b&&(b=this._convertGeometry(c,b)),b&&(c=c.centerAt(b),
b=null));if(b=this.extent||c&&new K(c.toJson()))-1<e?b=this.__getExtentForLevel(e,null,b).extent:0<q&&(b=G.getExtentForScale(this,q,b));if(!b){console.log("Map: "+this.invalidExtent);return}u=this._fixExtent(b,u.fitExtent);this.extent=u.extent;this.__LOD=u.lod;this.__setExtent(this.extent);this.loaded=!0;this.attr("data-loaded","");this.infoWindow.setMap(this);this.onLoad(this)}r||(this.onLayerAdd(a),this.onLayerAddResult(a));wa(this[d+"_addLayerHandler_connect"])}},_convertGeometry:function(a,b){var c=
a&&a.spatialReference,e=b&&b.spatialReference;c&&e&&!c.equals(e)&&(c._canProject(e)?c.isWebMercator()?b=L.geographicToWebMercator(b):4326===c.wkid&&(b=L.webMercatorToGeographic(b,!0)):(console.log("Map: "+z.substitute({geometry:e.wkid||e.wkt,map:c.wkid||c.wkt},this.invalidGeometry)),b=null));return b},_reorderLayers:function(a){var b=this.onLayerReorder,c=t.place,e=this._layerDivs,d=this._layers,h=this._gc?this._gc._surface.getEventSource():null;if(a===this.graphicsLayerIds)p.forEach(a,function(a,
q){var r=e[a];r&&(c(r.getEventSource(),h,q),b(d[a],q))});else{var q=this.graphics,r=q?q.id:null,g=this._layersDiv,v;p.forEach(a,function(a,h){v=e[a];a!==r&&v&&(c(v,g,h),b(d[a],h))});this._mapImageLyr&&this._placeMapImageLyr();h&&(h=9>u("ie")?h.parentNode:h,c(h,h.parentNode,a.length))}this.onLayersReordered([].concat(a))},_zoomStartHandler:function(){this.__zoomStart(this._zoomAnimDiv.startingExtent,this._zoomAnimDiv.anchor)},_zoomingHandler:function(a){var b=parseFloat(a.left),c=parseFloat(a.top);
a=new K(b,c-parseFloat(a.height),b+parseFloat(a.width),c,this.spatialReference);b=this.extent.getWidth()/a.getWidth();this.__zoom(a,b,this._zoomAnimDiv.anchor)},_zoomEndHandler:function(){var a=this._zoomAnimDiv,b=a.extent,c=this.extent.getWidth()/b.getWidth(),e=a.anchor,d=a.newLod,h=a.levelChange;a.extent=a.anchor=a.levelChange=a.startingExtent=a.newLod=this._delta=this._zoomAnim=null;this.__zoomEnd(b,c,e,d,h)},_panningHandler:function(a){if(isNaN(parseFloat(a.left))||isNaN(parseFloat(a.top))){var b=
Math.round,c=this._panAnim.node;a.left=-1*(this._delta.x-b(this.width/2))+"px";a.top=-1*(this._delta.y-b(this.height/2))+"px";w.set(c,"left",a.left);w.set(c,"top",a.top)}a=new S(parseFloat(a.left),parseFloat(a.top));b=this.toMap(a);this.onPan(this.extent.offset(this.extent.xmin-b.x,this.extent.ymax-b.y),a)},_panEndHandler:function(a){this.__panning=!1;var b=Math.round;a=new S(-b(parseFloat(a.style.left)),-b(parseFloat(a.style.top)));var b=a.x,c=a.y,e=this.__visibleRect,d=this.__visibleDelta;e.x+=
-b;e.y+=-c;d.x+=-b;d.y+=-c;ta(this._zoomAnimDiv,{left:"0px",top:"0px"});var e=this.extent,d=this._ratioW,h=this._ratioH,e=new K(e.xmin+b/d,e.ymin-c/h,e.xmax+b/d,e.ymax-c/h,this.spatialReference);a.setX(-a.x);a.setY(-a.y);this._delta=this._panAnim=null;this._updateExtent(e);this.onPanEnd(e,a);this._fireExtChg([e,a,!1,this.__LOD])},_fixExtent:function(a,b){for(var c=this._reshapeExtent(a),e=1.25;!0===b&&(c.extent.getWidth()<a.getWidth()||c.extent.getHeight()<a.getHeight())&&0<c.lod.level&&3>=e;)c=this._reshapeExtent(a.expand(e)),
e+=.25;return c},_getFrameWidth:function(){var a=-1,b=this.spatialReference._getInfo();this.__LOD?(b=this.__LOD._frameInfo)&&(a=b[3]):b&&(a=Math.round(2*b.valid[1]/(this.extent.getWidth()/this.width)));return a},_fixAspectRatio:function(a){var b=a.getWidth(),c=a.getHeight(),e=b/c,d=this.width/this.height,h=0,q=0;this.width>this.height?b>c?d>e?h=c*d-b:q=b/d-c:h=c*d-b:this.width<this.height?b<c?d>e?h=c*d-b:q=b/d-c:q=b/d-c:b<c?h=c-b:b>c&&(q=b/d-c);h&&(a.xmin-=h/2,a.xmax+=h/2);q&&(a.ymin-=q/2,a.ymax+=
q/2);return a},_reshapeExtent:function(a){a=this._fixAspectRatio(a);return this._getAdjustedExtent(a)},_getAdjustedExtent:function(a){if(this.__tileInfo)return D.getCandidateTileInfo(this,this.__tileInfo,a);var b=G.getScale(this,a),c=this.getMinScale(),e=this.getMaxScale();!c||b<=c?!e||b>=e||(a=G.getExtentForScale(this,e,a)):a=G.getExtentForScale(this,c,a);return{extent:a}},_onBingLayerAdd:function(a){this["__"+a.id+"_vis_connect"]=k.connect(a,"onVisibilityChange",this,"_toggleBingLogo");this._toggleBingLogo(a.visible)},
_onBingLayerRemove:function(a){k.disconnect(this["__"+a.id+"_vis_connect"]);delete this["__"+a.id+"_vis_connect"];var b=p.some(this.layerIds,function(b){return(a=this._layers[b])&&a.visible&&-1!==a.declaredClass.indexOf("VETiledLayer")},this);this._toggleBingLogo(b)},_toggleBingLogo:function(a){a&&!this._bingLogo?(a={left:this._mapParams&&this._mapParams.nav?"25px":""},6===u("ie")&&(a.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled\x3d'true', sizingMethod\x3d'crop', src\x3d'"+m.toUrl("./images/map/bing-logo-lg.png")+
"')"),a=this._bingLogo=t.create("div",{style:a},this.root),h.add(a,"bingLogo-lg")):!a&&this._bingLogo&&(t.destroy(this._bingLogo),delete this._bingLogo)},__panStart:function(a,b){var c=this._zoomAnim,e=this._panAnim;if(c&&c._active)c.stop(),c._fire("onEnd",[c.node]);else if(e&&e._active){e.stop();this._panAnim=null;var e=e.curve.getValue(e._getStep()),c=Math.round(parseFloat(e.left)),e=Math.round(parseFloat(e.top)),d=this.navigationManager._dragOrigin;this.__pan(c,e);d&&(d.x-=c,d.y-=e);return}this.__panning=
!0;this.onPanStart(this.extent,new S(a,b))},__pan:function(a,b){var c=this.extent,e=this._ratioW,d=this._ratioH;this.onPan(new K(c.xmin-a/e,c.ymin+b/d,c.xmax-a/e,c.ymax+b/d,this.spatialReference),new S(a,b))},__panEnd:function(a,b){var c=this.__visibleRect,e=this.__visibleDelta;c.x+=a;c.y+=b;e.x+=a;e.y+=b;var c=new S(a,b),e=this.extent,d=this._ratioW,h=this._ratioH,e=new K(e.xmin-a/d,e.ymin+b/h,e.xmax-a/d,e.ymax+b/h,this.spatialReference);this.__panning=!1;this._updateExtent(e);this.onPanEnd(e,c);
this._fireExtChg([e,c,!1,this.__LOD])},__zoomStart:function(a,b){this.__zooming=!0;this.onZoomStart(a,1,b,this.__LOD?this.__LOD.level:null)},__zoom:function(a,b,c){this.onZoom(a,b,c)},__zoomEnd:function(a,b,c,e,d){ta(this._layersDiv,{left:"0px",top:"0px"});this._delta=new S(0,0);this.__visibleRect.x=this.__visibleRect.y=0;a=new K(a);this.__LOD=e;this._ratioW=this.width/a.getWidth();this._ratioH=this.height/a.getHeight();var h=this._delta;this._delta=null;this.__zooming=!1;this._updateExtent(a,d);
this.onZoomEnd(a,b,c,e?e.level:null);this._fireExtChg([a,h,d,e])},_extentUtil:function(a,b,c,e,d){var h=new n,q,r,u,v,w,f,t,k,x,p,C=this.width,y=this.height,l,B,m;a&&(q=a.numLevels,r=a.targetLevel,l=z.isDefined(r),u=a.factor,v=a.mapAnchor,w=a.screenAnchor,f=a.mapCenter,B=a.levelOrFactor,t=a.targetScale,k=z.isDefined(t)&&0<t);b&&(x=b.dx,p=b.dy,f=b.mapCenter);g.isArray(f)&&(f=new F(f));var Z=this._panAnim;b=(a=this._stopAnim())?a.divExtent:this.extent;var O=this.__tileInfo,E=this._params;if(!this.loaded){if(c)b&&
(c=this._convertGeometry(b,c)),c&&(this.extent=c,E.zoom=E.scale=-1,E.center=null);else if(f||l||k){if(f)if(b){if(f=this._convertGeometry(b,f))this.extent=b.centerAt(f),E.center=null}else E.center=f;l&&-1<r?(E.zoom=r,E.scale=-1):k&&(E.scale=t,E.zoom=-1)}h.resolve();return h}if(f&&(f=this._convertGeometry(this,f),!f)||v&&(v=this._convertGeometry(this,v),!v)||c&&(c=this._convertGeometry(this,c),!c))return h.reject(),h;Z&&v&&w&&(v=oa(this.extent,C,y,w));a&&v&&w&&(v=oa(a.divExtent,C,y,w));l&&(O?(q=this.getMinZoom(),
l=this.getMaxZoom(),r<q?r=q:r>l&&(r=l),q=r-(a?a.level:this.getLevel())):(q=0<r?-1:1,m=B?r:null));if(!c)if(z.isDefined(q))O?(C=a?a.level:this.getLevel(),C=this.__getExtentForLevel(C+q,f,b).extent):(C=(a?a.end:this.extent).expand(m||(0<q?.5*q:2*-q)),m&&f&&(C=C.centerAt(f))),C&&(f?c=C:(x=v||b.getCenter(),y=C.getWidth(),p=C.getHeight(),C=x.x>=b.xmin&&x.x<=b.xmax?(x.x-b.xmin)/b.getWidth():.5,c=x.y>=b.ymin&&x.y<=b.ymax?(x.y-b.ymin)/b.getHeight():.5,C=x.x-C*y,x=x.y-c*p,c=new K(C,x,C+y,x+p,this.spatialReference)));
else if(k)c=G.getExtentForScale(this,t,b);else if(z.isDefined(u))c=b.expand(u);else if(x||p)a?(c=a.end,v=c.getCenter(),m=Da(c,C,y,v),m.x+=x,m.y+=p,m=oa(c,C,y,m),c=c.offset(m.x-v.x,m.y-v.y)):(x=new S(C/2+x,y/2+p),x=oa(b,C,y,x),y=b.getWidth(),p=b.getHeight(),C=x.x-y/2,x=x.y-p/2,c=new K(C,x,C+y,x+p,this.spatialReference));c||(f?(b=a?a.end:b,y=b.getWidth(),p=b.getHeight(),C=f.x-y/2,x=f.y-p/2,c=new K(C,x,C+y,x+p,this.spatialReference)):a&&(c=a.end));c?(this._extentDfd&&-1===this._extentDfd.fired&&(this._extentDfd.then(null,
Ga),this._extentDfd.reject()),this._extentDfd=h,this.__setExtent(c,null,w,e,a,d)):h.reject();return h},__setExtent:function(a,b,c,e,d,h){try{if(this._firstLayerId)this.extent=a;else{var q=!0,r=this.spatialReference,u=d?d.divExtent:this.extent,g=this._fixExtent(a,e||!1);a=g.extent;var v=a.getWidth(),w=a.getHeight(),f=Math.round;if(u)var t=f(1E6*u.getWidth()),x=f(1E6*v),k=f(1E6*u.getHeight()),p=f(1E6*w),q=t!==x||k!==p;var n,C,y=d&&d.rect,l=d&&d.divExtent;if(ka.zoomDuration&&q&&u){l=l||new K(u);y=y||
{left:u.xmin,top:u.ymax,width:u.getWidth(),height:u.getHeight()};C={left:a.xmin,top:a.ymax,width:v,height:w};var m=new F(a.xmin,a.ymax,r),z=new F(a.xmin,a.ymin,r),O=new F(this.extent.xmin,this.extent.ymax,r),E=new F(this.extent.xmin,this.extent.ymin,r);(n=V.getLineIntersection(O,m,E,z,r))||d||(q=!1)}this._ratioW=this.width/v;this._ratioH=this.height/w;var D=this._zoomAnimDiv;if(q)if(ta(this._layersDiv,{left:"0px",top:"0px"}),b=new S(0,0),this.__visibleRect.x=this.__visibleRect.y=0,y&&C){this._delta=
b;D.id="_zAD";D.startingExtent=l;D.extent=a;D.levelChange=q;D.newLod=g.lod;D.anchor=c?c:!n&&d?d.anchor:Da(this.extent,this.width,this.height,n);var ea=this.extent.getWidth()/a.getWidth();1024<(1>ea?1/ea:ea)?(this.__zoomStart(l,D.anchor),this.__zoom(l,1,D.anchor),this._fireOnScale(1,D.anchor,!0),this.__zoomEnd(a,ea,D.anchor,g.lod,q)):(this._zoomAnim=B.resize({node:D,start:y,end:C,duration:ka.zoomDuration,rate:ka.zoomRate,beforeBegin:d?null:this._zoomStartHandler,onAnimate:this._zoomingHandler,onEnd:this._zoomEndHandler}).play(),
this._fireOnScale(ea,D.anchor,h))}else this._updateExtent(a,q,h),this._fireExtChg([this.extent,b,q,this.__LOD=g.lod]);else if(!this.__panning)if(!1===this.loaded||h)this._updateExtent(a,q,h),this._fireExtChg([this.extent,b,q,this.__LOD=g.lod]);else{this.__panning=!0;y=(new Z(0,0,this.width,this.height,this.spatialReference)).getCenter();y.x=f(y.x);y.y=f(y.y);var G=this._delta=this.toScreen(a.getCenter()),fa=Math.abs(y.x-G.x),P=Math.abs(y.y-G.y);this.optimizePanAnimation&&(fa>2*this.width||P>2*this.height)?
(this.__panStart(0,0),this.__pan(0,0),this.__visibleRect.x=this.__visibleRect.y=this.__visibleDelta.x=this.__visibleDelta.y=0,this.__panning=!1,this._delta=null,this._updateExtent(a,!1,h),this.onPanEnd(this.extent,new S(0,0)),this._fireExtChg([this.extent,new S(0,0),!0,this.__LOD])):(this.onPanStart(this.extent,new S(0,0)),this._panAnim=B.slideTo({node:D,left:y.x-G.x,top:y.y-G.y,duration:ka.panDuration,rate:ka.panRate,onAnimate:this._panningHandler,onEnd:this._panEndHandler}),this._panAnim.play())}}}catch(Xa){console.log(Xa.stack),
console.error(Xa)}},_fireOnScale:function(a,b,c){if("css-transforms"===this.navigationMode){var e=this.__visibleDelta;this.onScale(x.scaleAt(a,{x:-1*(this.width/2-(b.x-e.x)),y:-1*(this.height/2-(b.y-e.y))}),c)}},_stopAnim:function(){var a=this._zoomAnim,b=this._panAnim;if(a&&a._active){a.stop();var b=a.curve.getValue(a._getStep()),c=parseFloat(b.left),e=parseFloat(b.top),a=a.node;return{anchor:a.anchor,start:a.startingExtent,end:a.extent,level:a.newLod&&a.newLod.level,rect:b,divExtent:new K(c,e-parseFloat(b.height),
c+parseFloat(b.width),e,this.spatialReference)}}b&&b._active&&(b.stop(),b._fire("onEnd",[b.node]))},__getExtentForLevel:function(a,b,c){var e=this.__tileInfo,e=e&&e.lods;a=z.isDefined(a)?a:0;c=c||this.extent;b=b||c&&c.getCenter();if(e){if(b){c=this.getMinZoom();var d=this.getMaxZoom();a>d&&(a=d);a<c&&(a=c);a=e[a];e=this.width*a.resolution/2;c=this.height*a.resolution/2;return{extent:new K(b.x-e,b.y-c,b.x+e,b.y+c,b.spatialReference),lod:a}}}else if(c)return{extent:c.expand(!a||1>a?1:a).centerAt(b)};
console.log("Map: "+this.invalidExtent)},_jobs:0,_incr:function(){1===++this._jobs&&(this.updating=!0,this.attr("data-updating",""),this.onUpdateStart())},_decr:function(){var a=--this._jobs;a?0>a&&(this._jobs=0):(this.updating=!1,this.attr("data-updating"),this.onUpdateEnd())},_fireEvent:function(a,b){this[a]&&this[a].apply(this,b)},_updateExtent:function(a,b,c){this.extent=a;a=this.spatialReference;this._viewInfo={view:new T({viewingMode:"map",scale:this.getScale()}),sr:a,_version:b?++Ma:Ma};(b||
c)&&this._setClipRect();this._calcGeographicExtent()},_calcGeographicExtent:function(){var a=this.spatialReference;a&&(a.isWebMercator()?this.geographicExtent=L.webMercatorToGeographic(this._getAvailExtent(),!0):4326===a.wkid&&(this.geographicExtent=new K(this._getAvailExtent().toJson())))},_fireExtChg:function(a){this.attr("data-zoom",this.getZoom());this.attr("data-scale",this.getScale());this._fireEvent("onExtentChange",a);if(a=this._extentDfd)delete this._extentDfd,a.resolve()},attr:function(a,
b){var c=this.container;c&&(null==b?c.removeAttribute(a):c.setAttribute(a,b));return this},onUpdateStart:function(){},onUpdateEnd:function(){},onLoad:function(){this._setClipRect();this._calcGeographicExtent()},onBeforeUnload:function(){},onUnload:function(){},onExtentChange:function(a,b,c){},onTimeExtentChange:function(){},onLayerAdd:function(){},onLayerAddResult:function(){},onLayersAddResult:function(){},onLayerRemove:function(){},onLayersRemoved:function(){},onLayerReorder:function(){},onLayersReordered:function(){},
onLayerSuspend:function(){},onLayerResume:function(){},onPanStart:function(){},onPan:function(){},onPanEnd:function(){},onScale:function(){},onZoomStart:function(){},onZoom:function(){},onZoomEnd:function(){},onResize:function(){this._setClipRect()},onReposition:function(){},destroy:function(){this._destroyed||(this.onBeforeUnload(this),this.removeAllLayers(),this._cleanUp(),clearTimeout(this._resizeTimerHandle),this._gc&&this._gc._cleanUp(),this._destroyed=!0,this.onUnload(this))},setCursor:function(a){ta(this.__container,
"cursor",this.cursor=a)},setMapCursor:function(a){this.setCursor(this._cursor=a)},resetMapCursor:function(){this.setCursor(this._cursor)},setBackgroundColor:function(a){a&&!a.declaredClass&&(a=new Y(a));this.backgroundColor=a||null;var b="";a&&(b=9>u("ie")?a.toHex():"rgba("+a.toRgba().join(",")+")");w.set(this.root,{backgroundColor:b})},setInfoWindow:function(a){var b=this.infoWindow;b&&b.unsetMap(this);this.infoWindow=a;this.loaded&&a&&a.setMap(this)},setInfoWindowOnClick:function(a){this._params.showInfoWindowOnClick=
a;this.popupManager&&this.popupManager.set("enabled",a)},getInfoWindowAnchor:function(a){return this.infoWindow&&this.infoWindow._getAnchor&&this.infoWindow._getAnchor(a)||"upperright"},toScreen:function(a,b){return Da(this.extent,this.width,this.height,a,b)},toMap:function(a){return oa(this.extent,this.width,this.height,a)},addLayer:function(a,b){a&&!this.getLayer(a.id)&&this._addLayer(a,a instanceof W?this.graphicsLayerIds:this.layerIds,b);return a},addLayers:function(a){var b=[],c=a.length,e,d,
h=a.length;e=k.connect(this,"onLayerAddResult",function(d,h){-1!==p.indexOf(a,d)&&(c--,b.push({layer:d,success:!h,error:h}),c||(k.disconnect(e),this.onLayersAddResult(b)))});for(d=0;d<h;d++)this.addLayer(a[d]);return this},removeLayer:function(a,b){var c=a.id,e=a instanceof W?this.graphicsLayerIds:this.layerIds,d=ya(e,c);0<=d&&(e.splice(d,1),a instanceof W?(wa(this["_gl_"+a.id+"_click_connect"]),a.loaded&&a._unsetMap(this,this._gc._surface)):a.loaded&&(a._unsetMap(this,this._layersDiv),-1!==a.declaredClass.indexOf("VETiledLayer")&&
this._onBingLayerRemove(a)),delete this._layers[c],delete this._layerDivs[c],b||this._reorderLayers(e),this.onLayerRemove(a))},removeAllLayers:function(){var a=this.layerIds,b;for(b=a.length-1;0<=b;b--)this.removeLayer(this._layers[a[b]],1);a=this.graphicsLayerIds;for(b=a.length-1;0<=b;b--)this.removeLayer(this._layers[a[b]],1);this.onLayersRemoved()},reorderLayer:function(b,c){g.isString(b)&&(a.deprecated(this.declaredClass+": Map.reorderLayer(/*String*/ id, /*Number*/ index) deprecated. Use Map.reorderLayer(/*Layer*/ layer, /*Number*/ index).",
null,"v2.0"),b=this.getLayer(b));var e=b.id,d,h=b instanceof W?this.graphicsLayerIds:this.layerIds;0>c?c=0:c>=h.length&&(c=h.length-1);d=ya(h,e);-1!==d&&d!==c&&(h.splice(d,1),h.splice(c,0,e),this._reorderLayers(h))},getLayer:function(a){return this._layers[a]},setExtent:function(a,b){a=new K(a.toJson());var c=a.getWidth(),e=a.getHeight();return 0===c&&0===e?this.centerAt(new F({x:a.xmin,y:a.ymin,spatialReference:a.spatialReference&&a.spatialReference.toJson()})):this._extentUtil(null,null,a,b)},centerAt:function(a){return this._extentUtil(null,
{mapCenter:a})},centerAndZoom:function(a,b){return this._extentUtil({targetLevel:b,mapCenter:a,levelOrFactor:!0})},getScale:function(){return this.__LOD?this.__LOD.scale:G.getScale(this)},getResolution:function(){return this.__LOD?this.__LOD.resolution:this.extent?this.extent.getWidth()/this.width:0},getResolutionInMeters:function(){return this.getResolution()*G.getUnitValueForSR(this.spatialReference)},getMinResolution:function(){return this._minResolution},getMaxResolution:function(){return this._maxResolution},
getMinScale:function(){return this._params.minScale},getMaxScale:function(){return this._params.maxScale},_getViewInfo:function(){return this._viewInfo},setScale:function(a){return this._extentUtil({targetScale:a})},getLayersVisibleAtScale:function(a){var b=[];(a=a||this.getScale())&&p.forEach(this.layerIds.concat(this.graphicsLayerIds),function(c){c=this.getLayer(c);c.isVisibleAtScale(a)&&b.push(c)},this);return b},getNumLevels:function(){var a=this.getMinZoom(),b=this.getMaxZoom();return a===b&&
0>a?0:b-a+1},getLevel:function(){return this.__LOD?this.__LOD.level:-1},setLevel:function(a){if(-1<a)return this._extentUtil({targetLevel:a})},getZoom:function(){return this.getLevel()},setZoom:function(a){return this.setLevel(a)},getMinZoom:function(){return this._params.minZoom},getMaxZoom:function(){return this._params.maxZoom},setBasemap:function(a){var b;g.isObject(a)?(b=a,a=b.title):b=y&&y[a];if(b){this._basemapDfd&&-1===this._basemapDfd.fired&&this._basemapDfd.cancel();var c=[],e=[],d=0;p.forEach(b.baseMapLayers||
b.layers,function(b){var h,q={id:b.id,displayLevels:b.displayLevels,opacity:z.isDefined(b.opacity)?b.opacity:null,visible:z.isDefined(b.visibility)?b.visibility:null};if(b.type)switch(b.type){case "OpenStreetMap":h=new P(q);break;case "VectorTile":h=H.normalize(b.url);h=new sa(h,q);break;default:console.log("Map.setBasemap: "+z.substitute({basemapName:a,type:b.type},this.unknownLayerType))}else h=H.normalize(b.url),h=new ja(h,q);h&&(c.push(h),e.push(b),b.isReference||d++)},this);if(c.length&&d){var h=
{basemapName:a,infos:e,layers:c};if(this.loaded){var q=this,r=new n(R._dfdCanceller),u=function(a){r._pendingLayers--;a=p.indexOf(h.layers,this);-1<a&&(a=r._layerEvents[a])&&(k.disconnect(a[0]),k.disconnect(a[1]));0>=r._pendingLayers&&(delete r._layerEvents,delete q._basemapDfd,0>r.fired&&r.callback(h))};this._basemapDfd=r;r._pendingLayers=0;r._layerEvents={};p.forEach(c,function(a,b){a&&(r._pendingLayers++,a.loaded?u(a):r._layerEvents[b]=[k.connect(a,"onLoad",a,u),k.connect(a,"onError",a,u)])});
r.addCallback(ma(this,this._basemapLoaded))}else this._basemapLoaded(h)}else console.log("Map.setBasemap: "+z.substitute({basemapName:a},this.invalidBasemap))}else{b=[];for(var v in y)b.push(v);console.log("Map.setBasemap: "+z.substitute({basemapName:a,list:b.join(",")},this.unknownBasemap))}},_basemapLoaded:function(a){var b=a.layers,c=a.infos,e=0,d=!0,h;this.loaded&&(p.forEach(b,function(a,b){a.loaded&&(c[b].isReference||e++)}),d=e);d&&(this.basemapLayerIds&&(h={basemapName:this._basemap,infos:y&&
y[this._basemap]&&y[this._basemap].baseMapLayers},h.basemapName||(p.forEach(this.basemapLayerIds,function(a){if(this.getLayer(a)instanceof P)return h.basemapName="osm",h.infos=y&&y.osm&&y.osm.baseMapLayers,!1},this),h.basemapName||(h=null))),this._removeBasemap(),this._basemap=a.basemapName,this.basemapLayerIds=this._addBasemap(b,c),this.attr("data-basemap",this.getBasemap()),this.emit("basemap-change",{current:a,previous:h}))},_addBasemap:function(a,b){var c=[],e=[],d=0;p.forEach(a,function(a,h){b[h].isReference?
c.push(a):(this.addLayer(a,d++),e.push(a.id))},this);c.length&&p.forEach(c,function(a){a.attr("data-reference",!0);this.addLayer(a,"top");e.push(a.id)},this);return e},_removeBasemap:function(){var a=this.basemapLayerIds,b;a&&a.length&&p.forEach(a,function(a){(b=this.getLayer(a))&&this.removeLayer(b)},this)},getBasemap:function(){return this._basemap||""},translate:function(a,b){a=a||0;b=b||0;if(!this._txTimer){this._tx=this._ty=0;var c=this.toScreen(this.extent.getCenter());this.__panStart(c.x,c.y)}this._tx+=
a;this._ty+=b;this.__pan(this._tx,this._ty);clearTimeout(this._txTimer);this._txTimer=setTimeout(this._endTranslate,150)},_endTranslate:function(){clearTimeout(this._txTimer);this._txTimer=null;var a=this._tx,b=this._ty;this._tx=this._ty=0;this.__panEnd(a,b)},setTimeExtent:function(a){a=(this.timeExtent=a)?new a.constructor(a.toJson()):null;this.onTimeExtentChange(a)},setTimeSlider:function(a){this.timeSlider&&(wa(this._tsTimeExtentChange_connect),this.timeSlider=this._tsTimeExtentChange_connect=
null);a&&(this.timeSlider=a,this.setTimeExtent(a.getCurrentTimeExtent()),this._tsTimeExtentChange_connect=Fa(a,"onTimeExtentChange",this,"setTimeExtent"))},setVisibility:function(a){if(this.visible!==a){this.visible=a;a||(this._display=this.container.style.display);this.container.style.display=a?this._display:"none";if(this.autoResize){var b=a?"resume":"pause";this._rszSignal[b]();this._oriSignal[b]()}a&&this.resize()}return this},resize:function(a){clearTimeout(this._resizeTimerHandle);this._destroyed||
(!0===a?this._execResize():this._resizeTimerHandle=setTimeout(this._execResize,this.resizeDelay))},_timedResize:function(){this._resizeTimerHandle||this._execResize()},_execResize:function(){clearTimeout(this._resizeTimerHandle);this._resizeTimerHandle=null;this.reposition();this._resize();this.autoResize&&this._startResizeTimer()},_resize:function(){var a=this.width,b=this.height,c=w.get(this.container,"display"),e=r.getContentBox(this.container);if(!("none"===c||0>=e.w||0>=e.h||a===e.w&&b===e.h)){if(c=
this._zoomAnim||this._panAnim)c.stop(),c._fire("onEnd",[c.node]);ta(this.root,{width:(this.width=e.w)+"px",height:(this.height=e.h)+"px"});e=this.width;c=this.height;this.attribution&&this.attribution.domNode&&w.set(this.attribution.domNode,"maxWidth",Math.floor(e*this._mapParams.attributionWidth)+"px");this.__visibleRect.update(this.__visibleRect.x,this.__visibleRect.y,e,c);this.__visibleDelta.update(this.__visibleDelta.x,this.__visibleDelta.y,e,c);var d=new Z(this.extent),a=(new Z(d.x,d.y,e/a*d.width,
c/b*d.height,this.spatialReference)).getExtent();this.onResize(a,e,c);this._extentUtil(null,null,a,null,!0)}},reposition:function(){var a=this.position,b=a.x,c=a.y;this._reposition();a=this.position;if(b!==a.x||c!==a.y)this.onReposition(a.x,a.y)},_reposition:function(){var a=r.position(this.container,!0),b=r.getPadBorderExtents(this.container);this.position.update(a.x+b.l,a.y+b.t)},_setClipRect:function(){delete this._clip;var a=7>=u("ie")||void 0===u("ie")&&7<=u("trident")?"rect(auto,auto,auto,auto)":
"auto";if(this.wrapAround180){var b=this.width,c=this.height,e=this._getFrameWidth(),d=b-e;0<d&&(a=d/2,a="rect(0px,"+(a+e)+"px,"+c+"px,"+a+"px)",c=this.extent.getWidth(),b=e/b*c,this._clip=[(c-b)/2,b])}ta(this.__container,"clip",a)},_getAvailExtent:function(){var a=this.extent,b=this._clip;if(b){if(!a._clip){var c=new Z(a);c.width=b[1];c.x+=b[0];a._clip=c.getExtent()}return a._clip}return a},_fixedPan:function(a,b){return this._extentUtil(null,{dx:a,dy:b})},panUp:function(){return this._fixedPan(0,
-.75*this.height)},panUpperRight:function(){return this._fixedPan(.75*this.width,-.75*this.height)},panRight:function(){return this._fixedPan(.75*this.width,0)},panLowerRight:function(){return this._fixedPan(.75*this.width,.75*this.height)},panDown:function(){return this._fixedPan(0,.75*this.height)},panLowerLeft:function(){return this._fixedPan(-.75*this.width,.75*this.height)},panLeft:function(){return this._fixedPan(-.75*this.width,0)},panUpperLeft:function(){return this._fixedPan(-.75*this.width,
-.75*this.height)},enableSnapping:function(a){a=a||{};if("esri.SnappingManager"===a.declaredClass)this.snappingManager=a;else{var b=pa++,c=this;this._rids&&this._rids.push(b);m(["./SnappingManager"],function(e){var d=c._rids?p.indexOf(c._rids,b):-1;-1!==d&&(c._rids.splice(d,1),c.snappingManager=new e(g.mixin({map:c},a)))})}return this.snappingManager},disableSnapping:function(){this.snappingManager&&this.snappingManager.destroy();this.snappingManager=null},_createLabelLayer:function(){!this._labels&&
va&&this.loaded&&(this._labels=new va({id:"_internal_LabelLayer"}),this._labels._setMap(this,this._gc._surface),this._processLabelLayers(),this.on("layers-reordered",this._processLabelLayers))},_processLabelLayers:function(){null==this._labelProcessor&&(this._labelProcessor=setTimeout(this._updateLabelLayers,0))},_updateLabelLayers:function(){this._labelProcessor=null;this._labels&&(this._labels.removeAllFeatureLayers(),p.forEach(this.graphicsLayerIds,function(a){a=this.getLayer(a);"function"===typeof a.applyEdits?
this._labels.addFeatureLayer(a):"esri.layers.WFSLayer"===a.declaredClass&&this._labels.addFeatureLayer(a)},this))},_getMapImageLyr:function(){this.loaded&&!this._mapImageLyr&&(this._mapImageLyr=new Q,this._mapImageLyr._setMap(this,this._layersDiv),this._placeMapImageLyr());return this._mapImageLyr},_placeMapImageLyr:function(){for(var a=this.layerIds,b=this._layerDivs,c=!1,e,d,h=a.length-1;0<=h;h--)if(e=a[h],d=this.getLayer(e),e=b[e],d&&e&&!d._isReference){t.place(this._mapImageLyr._div,e,"after");
c=!0;break}c||t.place(this._mapImageLyr._div,this._layersDiv,"first")}});u("extend-esri")&&(v._CoreMap=f);return f})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],function(m,l){var a=m.matrix={},f={};a._degToRad=function(a){return f[a]||(f[a]=Math.PI*a/180)};a._radToDeg=function(a){return a/Math.PI*180};a.Matrix2D=function(f){if(f)if("number"==typeof f)this.xx=this.yy=f;else if(f instanceof Array){if(0<f.length){for(var k=a.normalize(f[0]),g=1;g<f.length;++g){var p=k,d=a.normalize(f[g]),
k=new a.Matrix2D;k.xx=p.xx*d.xx+p.xy*d.yx;k.xy=p.xx*d.xy+p.xy*d.yy;k.yx=p.yx*d.xx+p.yy*d.yx;k.yy=p.yx*d.xy+p.yy*d.yy;k.dx=p.xx*d.dx+p.xy*d.dy+p.dx;k.dy=p.yx*d.dx+p.yy*d.dy+p.dy}l.mixin(this,k)}}else l.mixin(this,f)};l.extend(a.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});l.mixin(a,{identity:new a.Matrix2D,flipX:new a.Matrix2D({xx:-1}),flipY:new a.Matrix2D({yy:-1}),flipXY:new a.Matrix2D({xx:-1,yy:-1}),translate:function(f,n){return 1<arguments.length?new a.Matrix2D({dx:f,dy:n}):new a.Matrix2D({dx:f.x,
dy:f.y})},scale:function(f,n){return 1<arguments.length?new a.Matrix2D({xx:f,yy:n}):"number"==typeof f?new a.Matrix2D({xx:f,yy:f}):new a.Matrix2D({xx:f.x,yy:f.y})},rotate:function(f){var k=Math.cos(f);f=Math.sin(f);return new a.Matrix2D({xx:k,xy:-f,yx:f,yy:k})},rotateg:function(f){return a.rotate(a._degToRad(f))},skewX:function(f){return new a.Matrix2D({xy:Math.tan(f)})},skewXg:function(f){return a.skewX(a._degToRad(f))},skewY:function(f){return new a.Matrix2D({yx:Math.tan(f)})},skewYg:function(f){return a.skewY(a._degToRad(f))},
reflect:function(f,n){1==arguments.length&&(n=f.y,f=f.x);var g=f*f,k=n*n,d=g+k,c=2*f*n/d;return new a.Matrix2D({xx:2*g/d-1,xy:c,yx:c,yy:2*k/d-1})},project:function(f,n){1==arguments.length&&(n=f.y,f=f.x);var g=f*f,k=n*n,d=g+k,c=f*n/d;return new a.Matrix2D({xx:g/d,xy:c,yx:c,yy:k/d})},normalize:function(f){return f instanceof a.Matrix2D?f:new a.Matrix2D(f)},isIdentity:function(a){return 1==a.xx&&0==a.xy&&0==a.yx&&1==a.yy&&0==a.dx&&0==a.dy},clone:function(f){var k=new a.Matrix2D,g;for(g in f)"number"==
typeof f[g]&&"number"==typeof k[g]&&k[g]!=f[g]&&(k[g]=f[g]);return k},invert:function(f){f=a.normalize(f);var k=f.xx*f.yy-f.xy*f.yx;return f=new a.Matrix2D({xx:f.yy/k,xy:-f.xy/k,yx:-f.yx/k,yy:f.xx/k,dx:(f.xy*f.dy-f.yy*f.dx)/k,dy:(f.yx*f.dx-f.xx*f.dy)/k})},_multiplyPoint:function(a,f,g){return{x:a.xx*f+a.xy*g+a.dx,y:a.yx*f+a.yy*g+a.dy}},multiplyPoint:function(f,n,g){f=a.normalize(f);return"number"==typeof n&&"number"==typeof g?a._multiplyPoint(f,n,g):a._multiplyPoint(f,n.x,n.y)},multiplyRectangle:function(f,
n){var g=a.normalize(f);n=n||{x:0,y:0,width:0,height:0};if(a.isIdentity(g))return{x:n.x,y:n.y,width:n.width,height:n.height};var k=a.multiplyPoint(g,n.x,n.y),d=a.multiplyPoint(g,n.x,n.y+n.height),c=a.multiplyPoint(g,n.x+n.width,n.y),g=a.multiplyPoint(g,n.x+n.width,n.y+n.height),b=Math.min(k.x,d.x,c.x,g.x),e=Math.min(k.y,d.y,c.y,g.y);return{x:b,y:e,width:Math.max(k.x,d.x,c.x,g.x)-b,height:Math.max(k.y,d.y,c.y,g.y)-e}},multiply:function(f){for(var k=a.normalize(f),g=1;g<arguments.length;++g){var p=
k,d=a.normalize(arguments[g]),k=new a.Matrix2D;k.xx=p.xx*d.xx+p.xy*d.yx;k.xy=p.xx*d.xy+p.xy*d.yy;k.yx=p.yx*d.xx+p.yy*d.yx;k.yy=p.yx*d.xy+p.yy*d.yy;k.dx=p.xx*d.dx+p.xy*d.dy+p.dx;k.dy=p.yx*d.dx+p.yy*d.dy+p.dy}return k},_sandwich:function(f,n,g){return a.multiply(a.translate(n,g),f,a.translate(-n,-g))},scaleAt:function(f,n,g,p){switch(arguments.length){case 4:return a._sandwich(a.scale(f,n),g,p);case 3:return"number"==typeof g?a._sandwich(a.scale(f),n,g):a._sandwich(a.scale(f,n),g.x,g.y)}return a._sandwich(a.scale(f),
n.x,n.y)},rotateAt:function(f,n,g){return 2<arguments.length?a._sandwich(a.rotate(f),n,g):a._sandwich(a.rotate(f),n.x,n.y)},rotategAt:function(f,n,g){return 2<arguments.length?a._sandwich(a.rotateg(f),n,g):a._sandwich(a.rotateg(f),n.x,n.y)},skewXAt:function(f,n,g){return 2<arguments.length?a._sandwich(a.skewX(f),n,g):a._sandwich(a.skewX(f),n.x,n.y)},skewXgAt:function(f,n,g){return 2<arguments.length?a._sandwich(a.skewXg(f),n,g):a._sandwich(a.skewXg(f),n.x,n.y)},skewYAt:function(f,n,g){return 2<arguments.length?
a._sandwich(a.skewY(f),n,g):a._sandwich(a.skewY(f),n.x,n.y)},skewYgAt:function(f,n,g){return 2<arguments.length?a._sandwich(a.skewYg(f),n,g):a._sandwich(a.skewYg(f),n.x,n.y)}});m.Matrix2D=a.Matrix2D;return a})},"dojox/gfx/_base":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/Color dojo/_base/sniff dojo/_base/window dojo/_base/array dojo/dom dojo/dom-construct dojo/dom-geometry".split(" "),function(m,l,a,f,k,n,g,p,d){var c=l.getObject("dojox.gfx",!0),b=c._base={};c._hasClass=function(a,
b){var c=a.getAttribute("className");return c&&0<=(" "+c+" ").indexOf(" "+b+" ")};c._addClass=function(a,b){var c=a.getAttribute("className")||"";(!c||0>(" "+c+" ").indexOf(" "+b+" "))&&a.setAttribute("className",c+(c?" ":"")+b)};c._removeClass=function(a,b){var c=a.getAttribute("className");c&&a.setAttribute("className",c.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)"),"$1$2"))};b._getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,
large:0,"x-large":0,"xx-large":0},b,c;f("ie")&&(c=k.doc.documentElement.style.fontSize||"",c||(k.doc.documentElement.style.fontSize="100%"));var e=p.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},k.body());for(b in a)e.style.fontSize=b,a[b]=16*Math.round(12*e.offsetHeight/16)/12/1E3;f("ie")&&(k.doc.documentElement.style.fontSize=c);k.body().removeChild(e);return a};
var e=null;b._getCachedFontMeasurements=function(a){if(a||!e)e=b._getFontMeasurements();return e};var h=null,t={};b._getTextBox=function(a,b,c){var e,q,r=arguments.length,u;h||(h=p.create("div",{style:{position:"absolute",top:"-10000px",left:"0",visibility:"hidden"}},k.body()));e=h;e.className="";q=e.style;q.borderWidth="0";q.margin="0";q.padding="0";q.outline="0";if(1<r&&b)for(u in b)u in t||(q[u]=b[u]);2<r&&c&&(e.className=c);e.innerHTML=a;e.getBoundingClientRect?(q=e.getBoundingClientRect(),q=
{l:q.left,t:q.top,w:q.width||q.right-q.left,h:q.height||q.bottom-q.top}):q=d.getMarginBox(e);e.innerHTML="";return q};b._computeTextLocation=function(a,b,c,e){var d={};switch(a.align){case "end":d.x=a.x-b;break;case "middle":d.x=a.x-b/2;break;default:d.x=a.x}d.y=a.y-c*(e?.75:1);return d};b._computeTextBoundingBox=function(a){if(!c._base._isRendered(a))return{x:0,y:0,width:0,height:0};var e;e=a.getShape();var d=a.getFont()||c.defaultFont;a=a.getTextWidth();d=c.normalizedLength(d.size);e=b._computeTextLocation(e,
a,d,!0);return{x:e.x,y:e.y,width:a,height:d}};b._isRendered=function(a){for(a=a.parent;a&&a.getParent;)a=a.parent;return null!==a};var r=0;b._getUniqueId=function(){var a;do a=m._scopeName+"xUnique"+ ++r;while(g.byId(a));return a};var w=f("pointer-events")?"touchAction":f("MSPointer")?"msTouchAction":null;b._fixMsTouchAction=w?function(a){a.rawNode.style[w]="none"}:function(){};l.mixin(c,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,
width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",
join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var a={};return function(b){var e=a[b];if(e)return new e;e=a[b]=new Function;
e.prototype=c["default"+b];return new e}}(),normalizeColor:function(b){return b instanceof a?b:new a(b)},normalizeParameters:function(a,b){var c;if(b){var e={};for(c in a)c in b&&!(c in e)&&(a[c]=b[c])}return a},makeParameters:function(a,b){var c=null;if(!b)return l.delegate(a);var e={};for(c in a)c in e||(e[c]=l.clone(c in b?b[c]:a[c]));return e},formatNumber:function(a,b){var c=a.toString();if(0<=c.indexOf("e"))c=a.toFixed(4);else{var e=c.indexOf(".");0<=e&&5<c.length-e&&(c=a.toFixed(4))}return 0>
a?c:b?" "+c:c},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(a){var b=c.getDefault("Font");a=a.split(/\s+/);if(!(5>a.length)){b.style=a[0];b.variant=a[1];b.weight=a[2];var e=a[3].indexOf("/");b.size=0>e?a[3]:a[3].substring(0,e);var d=4;0>e&&("/"==a[4]?d=6:"/"==a[4].charAt(0)&&(d=5));d<a.length&&(b.family=a.slice(d).join(" "))}return b},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return c._base._getCachedFontMeasurements()["12pt"]/
12},pt2px:function(a){return a*c.px_in_pt()},px2pt:function(a){return a/c.px_in_pt()},normalizedLength:function(a){if(0===a.length)return 0;if(2<a.length){var b=c.px_in_pt(),e=parseFloat(a);switch(a.slice(-2)){case "px":return e;case "pt":return e*b;case "in":return 72*e*b;case "pc":return 12*e*b;case "mm":return e*c.mm_in_pt*b;case "cm":return e*c.cm_in_pt*b}}return parseFloat(a)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,
equalSources:function(a,b){return a&&b&&a===b},switchTo:function(a){var b="string"==typeof a?c[a]:a;b&&(n.forEach("Group Rect Ellipse Circle Line Polyline Image Text Path TextPath EsriPath Surface createSurface fixTarget".split(" "),function(a){c[a]=b[a]}),"string"==typeof a?c.renderer=a:n.some(["svg","vml","canvas","canvasWithEvents","silverlight"],function(a){return c.renderer=c[a]&&c[a].Surface===c.Surface?a:null}))}});return c})},"esri/basemaps":function(){define(["require","dojo/has","./kernel",
"dojo/i18n!./nls/jsapi"],function(m,l,a,f){m={streets:{title:f.basemaps.streets,thumbnailUrl:m.toUrl("./images/basemap/streets.jpg"),itemId:"d8855ee4d3d74413babfb0f41203b168",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"}]},satellite:{title:f.basemaps.satellite,thumbnailUrl:m.toUrl("./images/basemap/satellite.jpg"),itemId:"86de95d4e0244cba80f0fa2c9403a7b2",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"}]},
hybrid:{title:f.basemaps.hybrid,thumbnailUrl:m.toUrl("./images/basemap/hybrid.jpg"),itemId:"413fd05bbd7342f5991d5ec96f4f8b18",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},{url:"https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",isReference:!0}]},terrain:{title:f.basemaps.terrain,thumbnailUrl:m.toUrl("./images/basemap/terrain.jpg"),itemId:"aab054ab883c4a4094c72e949566ad40",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"},
{url:"https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",isReference:!0}]},topo:{title:f.basemaps.topo,thumbnailUrl:m.toUrl("./images/basemap/topo.jpg"),itemId:"6e03e8c26aad4b9c92a87c1063ddb0e3",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"}]},gray:{title:f.basemaps.gray,thumbnailUrl:m.toUrl("./images/basemap/gray.jpg"),itemId:"8b3b470883a744aeb60e5fff0a319ce7",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"},
{url:"https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",isReference:!0}]},"dark-gray":{title:f.basemaps["dark-gray"],thumbnailUrl:m.toUrl("./images/basemap/dark-gray.jpg"),itemId:"da65bacab5bd4defb576f839b6b28098",baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer"},{url:"https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",isReference:!0}]},
oceans:{title:f.basemaps.oceans,thumbnailUrl:m.toUrl("./images/basemap/oceans.jpg"),itemId:"48b8cec7ebf04b5fbdcaf70d09daff21",baseMapLayers:[{url:"https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"},{url:"https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",isReference:!0}]},"national-geographic":{title:f.basemaps["national-geographic"],thumbnailUrl:m.toUrl("./images/basemap/national-geographic.jpg"),itemId:"509e2d6b034246d692a461724ae2d62c",
baseMapLayers:[{url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer"}]},osm:{title:f.basemaps.osm,thumbnailUrl:m.toUrl("./images/basemap/osm.jpg"),itemId:"5d2bfa736f8448b3a1708e1f6be23eed",baseMapLayers:[{type:"OpenStreetMap"}]},"dark-gray-vector":{title:f.basemaps["dark-gray"],thumbnailUrl:m.toUrl("./images/basemap/dark-gray.jpg"),itemId:"c11ce4f7801740b2905eb03ddc963ac8",baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/c11ce4f7801740b2905eb03ddc963ac8/resources/styles/root.json",
type:"VectorTile"}]},"gray-vector":{title:f.basemaps.gray,thumbnailUrl:m.toUrl("./images/basemap/gray.jpg"),itemId:"8a2cba3b0ebf4140b7c0dc5ee149549a",baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/8a2cba3b0ebf4140b7c0dc5ee149549a/resources/styles/root.json",type:"VectorTile"}]},"streets-vector":{title:f.basemaps.streets,thumbnailUrl:m.toUrl("./images/basemap/streets.jpg"),itemId:"de26a3cf4cc9451298ea173c4b324736",baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",
type:"VectorTile"}]},"topo-vector":{title:f.basemaps.topo,thumbnailUrl:m.toUrl("./images/basemap/topo.jpg"),itemId:"7dc6cea0b1764a1f9af2e679f642f0f5",baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",type:"VectorTile"}]},"streets-night-vector":{title:f.basemaps["streets-night-vector"],thumbnailUrl:m.toUrl("./images/basemap/streets-night.jpg"),itemId:"86f556a2d1fd468181855a35e344567f",baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",
type:"VectorTile"}]},"streets-relief-vector":{title:f.basemaps["streets-relief-vector"],thumbnailUrl:m.toUrl("./images/basemap/streets-relief.jpg"),itemId:"b266e6d17fc345b498345613930fbd76",baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",type:"VectorTile"}]},"streets-navigation-vector":{title:f.basemaps["streets-navigation-vector"],thumbnailUrl:m.toUrl("./images/basemap/streets-navigation.jpg"),itemId:"63c47b7177f946b49902c24129b87252",
baseMapLayers:[{url:"https://www.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",type:"VectorTile"}]}};l("extend-esri")&&(a.basemaps=m);return m})},"esri/Evented":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Evented dojo/has ./kernel".split(" "),function(m,l,a,f,k,n){m=m([f],{declaredClass:"esri.Evented",registerConnectEvents:function(){var a=this.constructor,f=this.constructor._meta.parents,d=[{}],c={},b,e,h=function(a,
b){l.isArray(a)||(a=[a]);for(var c=0;c<a.length;c++){var e=a[c];e._meta&&e._meta.parents&&h(e._meta.parents,b);e.prototype._eventMap&&b.push(l.mixin({},e.prototype._eventMap))}return b};if(!a._onMap){h(f,d);d.push(this._eventMap);f=l.mixin.apply(this,d);for(b in this)/^on\w/.test(b)&&l.isFunction(this[b])&&(d=this._hyphenLower(b).toLowerCase(),f[d]||(c[d]={method:b}));for(e in f)b=this._onCamelCase(e),c[e]={method:b,argKeys:f[e]};a._onMap=c;return a._onMap}},on:function(f,p){if(-1<f.indexOf(",")){for(var d=
f.split(/\s*,\s*/),c=d.length,b=[];c--;)b.push(this.on(d[c],p));b.remove=function(){for(var a=0;a<b.length;a++)b[a].remove()};return b}var d=this.constructor._onMap||this.registerConnectEvents(),c="string"==typeof f&&f.toLowerCase(),e=this._onCamelCase(c),h=d&&d[c];return(e=h&&h.method||this[e]&&l.isFunction(this[e])&&e)?h&&l.isArray(h.argKeys)?(d=this._onArr2Obj(p,d[c].argKeys),a.after(this,e,d,!0)):a.after(this,e,function(a){a=a||{};a.target||(a.target=this);p.call(this,a)},!0):this.inherited(arguments)},
emit:function(a,f){var d,c,b,e,h=a.toLowerCase();e=this._onCamelCase(a);var g=this.constructor._onMap||this.registerConnectEvents();e=(b=g&&g[h]&&g[h].method||l.isFunction(this[e])&&e)&&this[b];b&&g&&g[h]&&this._onObj2Arr(function(){c=Array.prototype.slice.call(arguments)},g[h].argKeys)(f);f=f||{};f.target||(f.target=this);e&&(d=c&&c.length?c:[f],d=e.apply(this,d));this.inherited(arguments,[a,f]);return d},_onObj2Arr:function(a,f){if(f){var d=this;return function(c){var b,e=[],h=f.length;for(b=0;b<
h;b++)e[b]=c[f[b]];a.apply(d,e)}}return a},_onArr2Obj:function(a,f){if(f){var d=this;return function(){var c,b={},e=arguments.length;for(c=0;c<e;c++)b[f[c]]=arguments[c];b.target||(b.target=d);a.call(d,b)}}return a},_hyphenLower:function(a){return a.replace(/^on/,"").replace(/[A-Z](?=[a-z])/g,function(a,d){return(d?"-":"")+a.toLowerCase()})},_onCamelCase:function(a){return"on"+a.substr(0,1).toUpperCase()+a.substr(1).replace(/\-([a-z])/g,function(a,d){return d.toUpperCase()})}});k("extend-esri")&&
(n.Evented=m);return m})},"esri/fx":function(){define("dojo/_base/connect dojo/_base/fx dojo/_base/lang dojo/dom dojo/dom-geometry dojo/dom-style dojo/fx dojo/has ./kernel".split(" "),function(m,l,a,f,k,n,g,p,d){var c={animateRange:function(b){var c=b.range;return new l.Animation(a.mixin({curve:new l._Line(c.start,c.end)},b))},resize:function(b){var c=b.node=f.byId(b.node),d=b.start,g=b.end;d||(d=k.getMarginBox(c),c=k.getPadBorderExtents(c),d=b.start={left:d.l+c.l,top:d.t+c.t,width:d.w-c.w,height:d.h-
c.h});g||(g=b.anchor?b.anchor:{x:d.left,y:d.top},c=b.size,g=b.end={left:d.left-(c.width-d.width)*(g.x-d.left)/d.width,top:d.top-(c.height-d.height)*(g.y-d.top)/d.height,width:c.width,height:c.height});return l.animateProperty(a.mixin({properties:{left:{start:d.left,end:g.left},top:{start:d.top,end:g.top},width:{start:d.width,end:g.width},height:{start:d.height,end:g.height}}},b))},slideTo:function(b){var c=b.node=f.byId(b.node),d=n.getComputedStyle,g=null,r=null,w=function(){return function(){var a=
"absolute"==c.style.position?"absolute":"relative";g="absolute"==a?c.offsetTop:parseInt(d(c).top)||0;r="absolute"==a?c.offsetLeft:parseInt(d(c).left)||0;"absolute"!=a&&"relative"!=a&&(a=k.position(c,!0),g=a.y,r=a.x,c.style.position="absolute",c.style.top=g+"px",c.style.left=r+"px")}}();w();b=l.animateProperty(a.mixin({properties:{top:{start:g,end:b.top||0},left:{start:r,end:b.left||0}}},b));m.connect(b,"beforeBegin",b,w);return b},flash:function(b){b=a.mixin({end:"#f00",duration:500,count:1},b);b.duration/=
2*b.count;var c=f.byId(b.node),d=b.start;d||(d=n.getComputedStyle(c).backgroundColor);var t=b.end,r=[],w=b.count,c={node:c,duration:b.duration};for(b=0;b<w;b++)r.push(l.animateProperty(a.mixin({properties:{backgroundColor:{start:d,end:t}}},c))),r.push(l.animateProperty(a.mixin({properties:{backgroundColor:{start:t,end:d}}},c)));return g.chain(r)}};p("extend-esri")&&a.mixin(a.getObject("fx",!0,d),c);return c})},"dojo/fx":function(){define("./_base/lang ./Evented ./_base/kernel ./_base/array ./aspect ./_base/fx ./dom ./dom-style ./dom-geometry ./ready require".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b){a.isAsync||c(0,function(){b(["./fx/Toggler"])});a=a.fx={};c={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}};var e=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;f.forEach(this._animations,function(a){a&&("undefined"!=typeof a.duration&&(this.duration+=a.duration),a.delay&&(this.duration+=a.delay))},this)};e.prototype=new l;m.extend(e,{_onAnimate:function(){this._fire("onAnimate",
arguments)},_onEnd:function(){this._onAnimateCtx.remove();this._onEndCtx.remove();this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=k.after(this._current,"onAnimate",m.hitch(this,"_onAnimate"),!0),this._onEndCtx=k.after(this._current,"onEnd",m.hitch(this,"_onEnd"),!0),this._current.play(0,!0))},play:function(a,b){this._current||(this._current=this._animations[this._index=0]);if(!b&&"playing"==
this._current.status())return this;var c=k.after(this._current,"beforeBegin",m.hitch(this,function(){this._fire("beforeBegin")}),!0),e=k.after(this._current,"onBegin",m.hitch(this,function(a){this._fire("onBegin",arguments)}),!0),d=k.after(this._current,"onPlay",m.hitch(this,function(a){this._fire("onPlay",arguments);c.remove();e.remove();d.remove()}));this._onAnimateCtx&&this._onAnimateCtx.remove();this._onAnimateCtx=k.after(this._current,"onAnimate",m.hitch(this,"_onAnimate"),!0);this._onEndCtx&&
this._onEndCtx.remove();this._onEndCtx=k.after(this._current,"onEnd",m.hitch(this,"_onEnd"),!0);this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=k.after(this._current,"onPause",m.hitch(this,function(b){this._fire("onPause",arguments);a.remove()}),!0);this._current.pause()}return this},gotoPercent:function(a,b){this.pause();var c=this.duration*a;this._current=null;f.some(this._animations,function(a,b){if(c<=a.duration)return this._current=a,this._index=
b,!0;c-=a.duration;return!1},this);this._current&&this._current.gotoPercent(c/this._current.duration);b&&this.play();return this},stop:function(a){if(this._current){if(a){for(;this._index+1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var b=k.after(this._current,"onStop",m.hitch(this,function(a){this._fire("onStop",arguments);b.remove()}),!0);this._current.stop()}return this},status:function(){return this._current?this._current.status():
"stopped"},destroy:function(){this.stop();this._onAnimateCtx&&this._onAnimateCtx.remove();this._onEndCtx&&this._onEndCtx.remove()}});m.extend(e,c);a.chain=function(a){return new e(m.isArray(a)?a:Array.prototype.slice.call(a,0))};var h=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;f.forEach(a,function(a){var b=a.duration;a.delay&&(b+=a.delay);this.duration<b&&(this.duration=b);this._connects.push(k.after(a,"onEnd",m.hitch(this,"_onEnd"),!0))},this);this._pseudoAnimation=
new n.Animation({curve:[0,1],duration:this.duration});var b=this;f.forEach("beforeBegin onBegin onPlay onAnimate onPause onStop onEnd".split(" "),function(a){b._connects.push(k.after(b._pseudoAnimation,a,function(){b._fire(a,arguments)},!0))})};m.extend(h,{_doAction:function(a,b){f.forEach(this._animations,function(c){c[a].apply(c,b)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a,
b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,b){var c=this.duration*a;f.forEach(this._animations,function(a){a.gotoPercent(a.duration<c?1:c/a.duration,b)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},
destroy:function(){this.stop();f.forEach(this._connects,function(a){a.remove()})}});m.extend(h,c);a.combine=function(a){return new h(m.isArray(a)?a:Array.prototype.slice.call(a,0))};a.wipeIn=function(a){var b=a.node=g.byId(a.node),c=b.style,e;a=n.animateProperty(m.mixin({properties:{height:{start:function(){e=c.overflow;c.overflow="hidden";if("hidden"==c.visibility||"none"==c.display)return c.height="1px",c.display="",c.visibility="",1;var a=p.get(b,"height");return Math.max(a,1)},end:function(){return b.scrollHeight}}}},
a));var d=function(){c.height="auto";c.overflow=e};k.after(a,"onStop",d,!0);k.after(a,"onEnd",d,!0);return a};a.wipeOut=function(a){var b=(a.node=g.byId(a.node)).style,c;a=n.animateProperty(m.mixin({properties:{height:{end:1}}},a));k.after(a,"beforeBegin",function(){c=b.overflow;b.overflow="hidden";b.display=""},!0);var e=function(){b.overflow=c;b.height="auto";b.display="none"};k.after(a,"onStop",e,!0);k.after(a,"onEnd",e,!0);return a};a.slideTo=function(a){var b=null,c=null,e=function(a){return function(){var e=
p.getComputedStyle(a),h=e.position;b="absolute"==h?a.offsetTop:parseInt(e.top)||0;c="absolute"==h?a.offsetLeft:parseInt(e.left)||0;"absolute"!=h&&"relative"!=h&&(e=d.position(a,!0),b=e.y,c=e.x,a.style.position="absolute",a.style.top=b+"px",a.style.left=c+"px")}}(a.node=g.byId(a.node));e();a=n.animateProperty(m.mixin({properties:{top:a.top||0,left:a.left||0}},a));k.after(a,"beforeBegin",e,!0);return a};return a})},"esri/deferredUtils":function(){define(["dojo/_base/lang","dojo/has","./kernel"],function(m,
l,a){var f={_dfdCanceller:function(a){a.canceled=!0;var f=a._pendingDfd,g;a.isFulfilled()||!f||f.isFulfilled()||(f.cancel(),g=f.results&&f.results[1]);a._pendingDfd=null;return g},_fixDfd:function(a){var f=a.then;a.then=function(a,k,d){if(a){var c=a;a=function(a){return a&&a._argsArray?c.apply(null,a):c(a)}}return f.call(this,a,k,d)};return a},_resDfd:function(a,f,g){var k=f.length;1===k?g?a.errback(f[0]):a.callback(f[0]):1<k?(f._argsArray=!0,a.callback(f)):a.callback()}};l("extend-esri")&&m.mixin(a,
f);return f})},"esri/tileUtils":function(){define(["dojo/_base/array","dojo/has","./kernel","./geometry/Point","./geometry/Extent"],function(m,l,a,f,k){var n={_addFrameInfo:function(a,f){var d,c,b=2*f.origin[1],e=f.origin[0],h=a.origin.x,g=a.width,r;m.forEach(a.lods,function(a){d=Math.round(b/a.resolution);c=Math.ceil(d/g);r=Math.floor((e-h)/(g*a.resolution));a._frameInfo||(a._frameInfo=[c,r,r+c-1,d])})},getContainingTileCoords:function(a,f,d){var c=a.origin;d=d.resolution;return{row:Math.floor((c.y-
f.y)/(a.height*d)),col:Math.floor((f.x-c.x)/(a.width*d))}},getCandidateTileInfo:function(a,p,d){var c;c=a.width;for(var b=a.height,e=d.xmax-d.xmin,h=d.ymax-d.ymin,g=a.__tileInfo===p,r=g?a.getMinZoom():-1,g=g?a.getMaxZoom():-1,w=-1,u=p.lods,q=Math.abs,x,v,n,g=-1<g?g:u.length-1,r=-1<r?r:0;r<=g;r++)if(v=u[r])if(n=e>h?q(h-b*v.resolution):q(e-c*v.resolution),0>w||n<=w)x=v,w=n;else break;c=x;x=c.resolution;b=(d.xmin+d.xmax)/2;e=(d.ymin+d.ymax)/2;h=a.width/2*x;x*=a.height/2;b=new k(b-h,e-x,b+h,e+x,d.spatialReference);
d=new f(b.xmin,b.ymax,d.spatialReference);g=c.resolution;h=p.width;e=p.height;p=p.origin;a=a.__visibleDelta;x=Math.floor;u=h*g;q=e*g;g=x((p.y-d.y)/q);w=x((d.x-p.x)/u);r=p.y-g*q;p=x(Math.abs((d.x-(p.x+w*u))*h/u))+a.x;a=x(Math.abs((d.y-r)*e/q))+a.y;return{tile:{point:d,coords:{row:g,col:w},offsets:{x:p,y:a}},lod:c,extent:b}},getTileExtent:function(a,f,d,c){var b=a.origin;f=a.lods[f].resolution;var e=a.width,h=a.height;return new k(c*f*e+b.x,b.y-(d+1)*f*h,(c+1)*f*e+b.x,b.y-d*f*h,a.spatialReference)}};
l("extend-esri")&&(a.TileUtils=n);return n})},"esri/geometry/Point":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ../srUtils".split(" "),function(m,l,a,f,k,n,g,p){function d(a,b){89.99999<b?b=89.99999:-89.99999>b&&(b=-89.99999);var c=.017453292519943*b;return[111319.49079327169*a,3189068.5*Math.log((1+Math.sin(c))/(1-Math.sin(c)))]}function c(a,b,c){a=a/6378137*57.29577951308232;return c?[a,57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*
b/6378137)))]:[a-360*Math.floor((a+180)/360),57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*b/6378137)))]}var b={type:"point",x:0,y:0};m=m(g,{declaredClass:"esri.geometry.Point",constructor:function(a,c,d){l.mixin(this,b);l.isArray(a)?(this.x=a[0],this.y=a[1],this.spatialReference=c):l.isObject(a)?(l.mixin(this,a),k.isDefined(this.latitude)&&(this.y=this.latitude),k.isDefined(this.longitude)&&(this.x=this.longitude),this.spatialReference&&(this.spatialReference=p.createSpatialReference(this.spatialReference))):
(this.x=a,this.y=c,this.spatialReference=d);this.verifySR()},offset:function(a,b){return new this.constructor(this.x+a,this.y+b,this.spatialReference)},setX:function(a){this.x=a;this.clearCache();return this},setY:function(a){this.y=a;this.clearCache();return this},setLongitude:function(a){var b=this.spatialReference;b&&(b._isWebMercator()?this.setX(d(a,this.y)[0]):4326===b.wkid&&this.setX(a));return this},setLatitude:function(a){var b=this.spatialReference;b&&(b._isWebMercator()?this.setY(d(this.x,
a)[1]):4326===b.wkid&&this.setY(a));return this},getLongitude:function(){var a=this.spatialReference,b;a&&(a._isWebMercator()?b=c(this.x,this.y)[0]:4326===a.wkid&&(b=this.x));return b},getLatitude:function(){var a=this.spatialReference,b;a&&(a._isWebMercator()?b=c(this.x,this.y)[1]:4326===a.wkid&&(b=this.y));return b},update:function(a,b){this.x=a;this.y=b;this.clearCache();return this},normalize:function(){var a=this.x,b=this.spatialReference;if(b){var c=b._getInfo();c&&(a=this._normalizeX(a,c))}return new this.constructor(a,
this.y,b)},_normalizeX:function(a,b){var c=b.valid[0],e=b.valid[1],d=2*e;a>e?(c=Math.ceil(Math.abs(a-e)/d),a-=c*d):a<c&&(c=Math.ceil(Math.abs(a-c)/d),a+=c*d);return a},toJson:function(){var a={x:this.x,y:this.y},b=this.spatialReference;b&&(a.spatialReference=b.toJson());return a}});m.lngLatToXY=d;m.xyToLngLat=c;m.defaultProps=b;m.metersPerDegree=6378137*Math.PI/180;a("extend-esri")&&(l.setObject("geometry.Point",m,f),f.geometry.defaultPoint=b);return m})},"esri/SpatialReference":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ./kernel ./lang".split(" "),
function(m,l,a,f,k,n){var g=[-2.0037508342788905E7,2.0037508342788905E7],p=[-2.0037508342787E7,2.0037508342787E7];m=m(null,{declaredClass:"esri.SpatialReference",constructor:function(d){d&&(a.isObject(d)?a.mixin(this,d):a.isString(d)?this.wkt=d:this.wkid=d)},wkid:null,wkt:null,_info:{102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',
valid:g,origin:p,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:g,origin:p,
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:g,origin:p,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:g,origin:p,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}},_isWebMercator:function(){return-1!==l.indexOf([102113,102100,3857,3785],this.wkid)},_isWrappable:function(){return-1!==l.indexOf([102113,102100,3857,3785,4326],this.wkid)},_getInfo:function(){return this.wkid?this._info[this.wkid]:null},_canProject:function(a){var c=!1;a&&(c=this.isWebMercator()&&4326===a.wkid||a.isWebMercator()&&4326===this.wkid);return c},isWebMercator:function(){return this._isWebMercator()},equals:function(a){var c=!1;a&&(this===a&&
(c=!0),this.wkid||a.wkid?c=this.wkid===a.wkid||this.isWebMercator()&&a.isWebMercator()||this.wkid===a.latestWkid||a.wkid===this.latestWkid:this.wkt&&a.wkt&&(c=this.wkt.toUpperCase()===a.wkt.toUpperCase()));return c},toJson:function(){var a=null,c=n.isDefined;c(this.wkid)?a={wkid:this.wkid}:c(this.wkt)&&(a={wkt:this.wkt});a&&c(this.latestWkid)&&(a.latestWkid=this.latestWkid);return a}});f("extend-esri")&&(k.SpatialReference=m);return m})},"esri/geometry/Geometry":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/has","../kernel","../SpatialReference"],function(m,l,a,f,k){m=m(null,{declaredClass:"esri.geometry.Geometry",spatialReference:null,type:null,cache:void 0,setSpatialReference:function(a){this.spatialReference=a;return this},verifySR:function(){this.spatialReference||this.setSpatialReference(new k(4326))},getExtent:function(){return null},clearCache:function(){this.cache=void 0},getCacheValue:function(a){return this.cache&&this.cache[a]},setCacheValue:function(a,f){this.cache||
(this.cache={});this.cache[a]=f}});a("extend-esri")&&l.setObject("geometry.Geometry",m,f);return m})},"esri/srUtils":function(){define(["./SpatialReference","./ImageSpatialReference","./kernel","./sniff","dojo/_base/lang"],function(m,l,a,f,k){function n(a){var d=!1;a&&(a.ics||a.icsid)&&(d=!0);return d}var g={isICS:n,createSpatialReference:function(a){var d=null;a&&(d=n(a)?new l(a):new m(a));return d}};f("extend-esri")&&k.mixin(a,g);return g})},"esri/ImageSpatialReference":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ./kernel ./lang ./SpatialReference".split(" "),
function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.ImageSpatialReference",constructor:function(a){a&&l.isObject(a)&&l.mixin(this,a)},icsid:null,icsns:null,ics:null,_isWebMercator:function(){return!1},_isWrappable:function(){return!1},equals:function(a){var f=!1;if(a)if(this.icsid&&a.icsid){if(f=this.icsid===a.icsid,this.icsns||a.icsns)f=f&&this.icsns===a.icsns}else this.ics&&a.ics&&(f=this.ics===a.ics);return f},toJson:function(a){var f=null,d=k.isDefined;a=d(a)?a:!0;d(this.icsid)?(f={icsid:this.icsid},
d(this.icsns)&&(f.icsns=this.icsns)):d(this.ics)&&(f={ics:this.ics});d(this.url)&&d(f)&&a&&(f.url=this.url);return f}});a("extend-esri")&&(f.ImageSpatialReference=m);return m})},"esri/geometry/Extent":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ./Point ./webMercatorUtils ./mathUtils ../srUtils".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e){var h={type:"extent",xmin:0,ymin:0,xmax:0,ymax:0},t=m(p,{declaredClass:"esri.geometry.Extent",
constructor:function(b,c,d,q,f){a.mixin(this,h);a.isObject(b)?(a.mixin(this,b),this.spatialReference&&(this.spatialReference=e.createSpatialReference(this.spatialReference))):this.update(b,c,d,q,f);this.verifySR()},getWidth:function(){return Math.abs(this.xmax-this.xmin)},getHeight:function(){return Math.abs(this.ymax-this.ymin)},getCenter:function(){return new d((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2,this.spatialReference)},centerAt:function(a){var b=this.getCenter(),c=a.x-b.x;a=a.y-b.y;
return new t(this.xmin+c,this.ymin+a,this.xmax+c,this.ymax+a,this.spatialReference)},update:function(a,b,c,e,d){this.xmin=a;this.ymin=b;this.xmax=c;this.ymax=e;this.spatialReference=d;this.clearCache();return this},offset:function(a,b){return new t(this.xmin+a,this.ymin+b,this.xmax+a,this.ymax+b,this.spatialReference)},expand:function(a){var b=(1-a)/2;a=this.getWidth()*b;b*=this.getHeight();return new t(this.xmin+a,this.ymin+b,this.xmax-a,this.ymax-b,this.spatialReference)},intersects:function(a){if(!a)return!1;
var b=a.type,e=this.spatialReference,d=a.spatialReference;e&&d&&!e.equals(d)&&e._canProject(d)&&(a=e.isWebMercator()?c.geographicToWebMercator(a):c.webMercatorToGeographic(a,!0));switch(b){case "point":return this.contains(a);case "multipoint":return this._intersectsMultipoint(a);case "extent":return this._intersectsExtent(a);case "polygon":return this._intersectsPolygon(a);case "polyline":return this._intersectsPolyline(a)}},normalize:function(){var b=this._normalize(!1,!0);a.isArray(b)||(b=[b]);
return b},shiftCentralMeridian:function(){return this._normalize(!0)},bisect:function(){var a=this.spatialReference,b=a&&a._getInfo(),c=[],e=0;if(b&&this._isOutOfBounds(b)){var d=this,e=d.xmin,h=d.ymin,f=d.ymax,k=b.valid[0],p=b.valid[1];d.getWidth()>2*p&&(d=d.getCenter(),d=new t(d.x-p,h,d.x+p,f,new g(a.toJson())));var e=d.xmin-e,n=this._normalizeX(d.xmin,b),b=this._normalizeX(d.xmax,b);n.frameId===b.frameId?c.push(new t(n.x,h,b.x,f,new g(a.toJson()))):c.push(new t(n.x,h,p,f,new g(a.toJson())),new t(k,
h,b.x,f,new g(a.toJson())))}else c.push(this.getExtent());return{extents:c,marginLeft:e}},_intersectsMultipoint:function(a){var b=a.points.length,c;for(c=0;c<b;c++)if(this.contains(a.getPoint(c)))return!0;return!1},_intersectsExtent:function(a){var b,c,e,d,h=!1;this.xmin<=a.xmin?(b=a.xmin,this.xmax<b?h=!0:e=Math.min(this.xmax,a.xmax)-b):(b=this.xmin,a.xmax<b?h=!0:e=Math.min(this.xmax,a.xmax)-b);this.ymin<=a.ymin?(c=a.ymin,this.ymax<c?h=!0:d=Math.min(this.ymax,a.ymax)-c):(c=this.ymin,a.ymax<c?h=!0:
d=Math.min(this.ymax,a.ymax)-c);return h?null:new t(b,c,b+e,c+d,this.spatialReference)},_intersectsPolygon:function(a){var b=[this.xmin,this.ymax],c=[this.xmax,this.ymax],e=[this.xmin,this.ymin],h=[this.xmax,this.ymin],f=[b,c,e,h],b=[[e,b],[b,c],[c,h],[h,e]],e=a.rings,h=e.length,r,g=new d(0,0,this.spatialReference);r=f.length;for(c=0;c<r;c++)if(g.update(f[c][0],f[c][1]),a.contains(g))return!0;g.setSpatialReference(a.spatialReference);for(var t,k,c=0;c<h;c++)if(f=e[c],r=f.length){t=f[0];g.update(t[0],
t[1]);if(this.contains(g))return!0;for(a=1;a<r;a++){k=f[a];g.update(k[0],k[1]);if(this.contains(g)||this._intersectsLine([t,k],b))return!0;t=k}}return!1},_intersectsPolyline:function(a){var b=[[[this.xmin,this.ymin],[this.xmin,this.ymax]],[[this.xmin,this.ymax],[this.xmax,this.ymax]],[[this.xmax,this.ymax],[this.xmax,this.ymin]],[[this.xmax,this.ymin],[this.xmin,this.ymin]]],c,e=a.paths,h=e.length,f,r,g,t,k=new d(0,0,a.spatialReference);for(a=0;a<h;a++)if(f=e[a],r=f.length){g=f[0];k.update(g[0],g[1]);
if(this.contains(k))return!0;for(c=1;c<r;c++){t=f[c];k.update(t[0],t[1]);if(this.contains(k)||this._intersectsLine([g,t],b))return!0;g=t}}return!1},_intersectsLine:function(a,c){var e=b._getLineIntersection2,d,h=c.length;for(d=0;d<h;d++)if(e(a,c[d]))return!0;return!1},contains:function(a){if(!a)return!1;var b=a.type;if("point"===b){var c=this.spatialReference,e=a.spatialReference,b=a.x;a=a.y;c&&e&&!c.equals(e)&&c._canProject(e)&&(a=c.isWebMercator()?d.lngLatToXY(b,a):d.xyToLngLat(b,a,!0),b=a[0],a=
a[1]);return b>=this.xmin&&b<=this.xmax&&a>=this.ymin&&a<=this.ymax}return"extent"===b?this._containsExtent(a):!1},_containsExtent:function(a){var b=a.xmin,c=a.ymin,e=a.xmax,h=a.ymax,f=a.spatialReference;a=new d(b,c,f);b=new d(b,h,f);h=new d(e,h,f);c=new d(e,c,f);return this.contains(a)&&this.contains(b)&&this.contains(h)&&this.contains(c)?!0:!1},union:function(a){return new t(Math.min(this.xmin,a.xmin),Math.min(this.ymin,a.ymin),Math.max(this.xmax,a.xmax),Math.max(this.ymax,a.ymax),this.spatialReference)},
getExtent:function(){var a=this.spatialReference;return new t(this.xmin,this.ymin,this.xmax,this.ymax,a&&new g(a.toJson()))},_shiftCM:function(a){var b=this.getCacheValue("_shifted");if(!b){var b=new t(this.toJson()),e=b.spatialReference;if(a=a||e._getInfo()){var d=this._getCM(a);if(d){var h=e._isWebMercator()?c.webMercatorToGeographic(d):d;b.xmin-=d.x;b.xmax-=d.x;e._isWebMercator()||(h.x=this._normalizeX(h.x,a).x);b.setSpatialReference(new g(n.substitute({Central_Meridian:h.x},4326===e.wkid?a.altTemplate:
a.wkTemplate)))}}this.setCacheValue("_shifted",b)}return b},_getCM:function(a){var b;this._isOutOfBounds(a)&&(b=this.getCenter());return b},_isOutOfBounds:function(a){var b=a.valid[0];a=a.valid[1];var c=this.xmin,e=this.xmax;return!(c>=b&&c<=a&&e>=b&&e<=a)},_normalize:function(a,b,c){var e=new t(this.toJson()),d=e.spatialReference;if(d&&(c=c||d._getInfo())){var h=l.map(this._getParts(c),function(a){return a.extent});return 2<h.length?a?this._shiftCM(c):e.update(c.valid[0],e.ymin,c.valid[1],e.ymax,
d):2===h.length?a?this._shiftCM(c):b?h:{rings:l.map(h,function(a){return[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]}),spatialReference:d}:h[0]||e}return e},_getParts:function(a){var b=this.getCacheValue("_parts");if(!b){var b=[],c=this.xmin,e=this.xmax,d=this.ymin,h=this.ymax,f=this.spatialReference,g=this.getWidth(),r=c,k=e,p=0,n=0,l,m;a=a||f._getInfo();l=a.valid[0];m=a.valid[1];n=this._normalizeX(c,a);c=n.x;p=n.frameId;n=this._normalizeX(e,a);e=n.x;n=n.frameId;
a=c===e&&0<g;if(g>2*m){g=new t(r<k?c:e,d,m,h,f);c=new t(l,d,r<k?e:c,h,f);m=new t(0,d,m,h,f);d=new t(l,d,0,h,f);f=[];l=[];g.contains(m)&&f.push(p);g.contains(d)&&l.push(p);c.contains(m)&&f.push(n);c.contains(d)&&l.push(n);for(h=p+1;h<n;h++)f.push(h),l.push(h);b.push({extent:g,frameIds:[p]},{extent:c,frameIds:[n]},{extent:m,frameIds:f},{extent:d,frameIds:l})}else c>e||a?b.push({extent:new t(c,d,m,h,f),frameIds:[p]},{extent:new t(l,d,e,h,f),frameIds:[n]}):b.push({extent:new t(c,d,e,h,f),frameIds:[p]});
this.setCacheValue("_parts",b)}return b},_normalizeX:function(a,b){var c=0,e=b.valid[0],d=b.valid[1],h=2*d;a>d?(c=Math.ceil(Math.abs(a-d)/h),a-=c*h):a<e&&(c=Math.ceil(Math.abs(a-e)/h),a+=c*h,c=-c);return{x:a,frameId:c}},toJson:function(){var a={xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax},b=this.spatialReference;b&&(a.spatialReference=b.toJson());return a}});t.defaultProps=h;f("extend-esri")&&(a.setObject("geometry.Extent",t,k),k.geometry.defaultExtent=h);return t})},"esri/geometry/webMercatorUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/has ../kernel ../SpatialReference ./Point".split(" "),
function(m,l,a,f,k,n){function g(a,b,e,d){if("point"===a.type){var c=b(a.x,a.y,d);return new a.constructor(c[0],c[1],new k(e))}if("extent"===a.type){var c=b(a.xmin,a.ymin,d),h=b(a.xmax,a.ymax,d);return new a.constructor(c[0],c[1],h[0],h[1],new k(e))}if("polyline"===a.type||"polygon"===a.type){var c="polyline"===a.type,f=[],g;m.forEach(c?a.paths:a.rings,function(a){f.push(g=[]);m.forEach(a,function(a){g.push(b(a[0],a[1],d))})});return c?new a.constructor({paths:f,spatialReference:new k(e)}):new a.constructor({rings:f,
spatialReference:new k(e)})}if("multipoint"===a.type){var q=[];m.forEach(a.points,function(a){q.push(b(a[0],a[1],d))});return new a.constructor({points:q,spatialReference:new k(e)})}}function p(a,b){var c=a&&(null!=a.wkid?a:a.spatialReference),d=b&&(null!=b.wkid?b:b.spatialReference);return c&&d?d.equals(c)?!0:d._canProject(c):!1}var d={canProject:p,project:function(a,b){var c=a&&a.spatialReference,d=b&&(null!=b.wkid?b:b.spatialReference);c&&d?c.equals(d)?a=new a.constructor(a.toJson()):p(c,d)?d.isWebMercator()?
a=g(a,n.lngLatToXY,{wkid:102100}):4326===d.wkid&&(a=g(a,n.xyToLngLat,{wkid:4326})):a=null:a=null;return a},lngLatToXY:n.lngLatToXY,xyToLngLat:n.xyToLngLat,metersPerDegree:n.metersPerDegree,geographicToWebMercator:function(a){return g(a,n.lngLatToXY,{wkid:102100})},webMercatorToGeographic:function(a,b){return g(a,n.xyToLngLat,{wkid:4326},b)}};a("extend-esri")&&l.mixin(l.getObject("geometry",!0,f),d);return d})},"esri/geometry/mathUtils":function(){define(["dojo/_base/lang","dojo/has","../kernel","./Point"],
function(m,l,a,f){function k(a,c,b){return a instanceof f?new f(a.x+b*(c.x-a.x),a.y+b*(c.y-a.y)):[a[0]+b*(c[0]-a[0]),a[1]+b*(c[1]-a[1])]}function n(a,c){return 1E-8>Math.abs(a-c)}function g(a,c,b,e){var d,f=n(a[0],c[0])?1E10:(a[1]-c[1])/(a[0]-c[0]),g=n(b[0],e[0])?1E10:(b[1]-e[1])/(b[0]-e[0]),w=a[1]-f*a[0],u=b[1]-g*b[0];if(n(f,g)){if(n(w,u)){if(n(a[0],c[0]))if(Math.min(a[1],c[1])<Math.max(b[1],e[1])||Math.max(a[1],c[1])>Math.min(b[1],e[1]))a=(a[1]+c[1]+b[1]+e[1]-Math.min(a[1],c[1],b[1],e[1])-Math.max(a[1],
c[1],b[1],e[1]))/2,d=(a-w)/f;else return null;else if(Math.min(a[0],c[0])<Math.max(b[0],e[0])||Math.max(a[0],c[0])>Math.min(b[0],e[0]))d=(a[0]+c[0]+b[0]+e[0]-Math.min(a[0],c[0],b[0],e[0])-Math.max(a[0],c[0],b[0],e[0]))/2,a=f*d+w;else return null;return[d,a]}return null}n(f,1E10)?(d=a[0],a=g*d+u):n(g,1E10)?(d=b[0],a=f*d+w):(d=-(w-u)/(f-g),a=a[1]===c[1]?a[1]:b[1]===e[1]?b[1]:f*d+w);return[d,a]}var p={getLength:function(a,c){var b=c.x-a.x,e=c.y-a.y;return Math.sqrt(b*b+e*e)},_getLength:function(a,c){var b=
c[0]-a[0],e=c[1]-a[1];return Math.sqrt(b*b+e*e)},getPointOnLine:k,getMidpoint:function(a,c){return k(a,c,.5)},_equals:n,_getLineIntersection:g,getLineIntersection:function(a,c,b,e,h){(a=g([a.x,a.y],[c.x,c.y],[b.x,b.y],[e.x,e.y]))&&(a=new f(a[0],a[1],h));return a},_getLineIntersection2:function(a,c){var b=a[0],e=a[1],d=c[0],f=c[1],g=b[0],b=b[1],w=e[0],e=e[1],u=d[0],q=d[1],d=f[0]-u,u=g-u,k=w-g,f=f[1]-q,q=b-q,v=e-b,p=f*k-d*v;if(0===p)return!1;d=(d*q-f*u)/p;u=(k*q-v*u)/p;return 0<=d&&1>=d&&0<=u&&1>=u?
[g+d*(w-g),b+d*(e-b)]:!1},_pointLineDistance:function(a,c){var b=c[0],e=c[1],d=b[0],f=b[1],b=a[0],g=a[1],w=e[0]-d,u=e[1]-f,q=b-d,k=g-f,e=Math.sqrt,v=Math.pow,p=e(v(w,2)+v(u,2)),q=(q*w+k*u)/(p*p),f=f+q*u;return e(v(b-(d+q*w),2)+v(g-f,2))}};l("extend-esri")&&m.mixin(m.getObject("geometry",!0,a),p);return p})},"esri/urlUtils":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/url dojo/io-query ./kernel ./lang ./config ./sniff dojo/i18n!./nls/jsapi".split(" "),function(m,l,a,f,k,n,g,p,d){var c=
function(){return this}(),b={},e=g.defaults.io,h=/^[a-z][a-z0-9\+\-\.]*:/i,t=/^\s*http:/i,r=/^\s*https:/i,w=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;b.isHTTP=function(a){var b=c.location.protocol;return null==a?"http:"===b||"https:"===b:a?"https:"===b:"http:"===b};b.getProtocolForWebResource=function(a){return b.isHTTP()?c.location.protocol:a?"https:":"http:"};b.urlToObject=function(b){var c={},e=new a(b),d=b.indexOf("?");null===e.query?c={path:b,query:null}:(c.path=b.substring(0,d),c.query=
f.queryToObject(e.query));e.fragment&&(c.hash=e.fragment,null===e.query&&(c.path=c.path.substring(0,c.path.length-(e.fragment.length+1))));return c};b.getProxyUrl=function(a,h){var q=m.isString(a)?0===m.trim(a).toLowerCase().indexOf("https:"):a,f=e.proxyUrl,g,r,u=d.io.proxyNotSet;m.isString(a)&&(r=b.getProxyRule(a))&&(f=r.proxyUrl);if(!f)throw console.log(u),Error(u);q&&!1!==h&&0!==c.location.href.toLowerCase().indexOf("https:")&&(q=f,0!==q.toLowerCase().indexOf("http")&&(q=b.getAbsoluteUrl(q)),q=
q.replace(/^http:/i,"https:"),b.canUseXhr(q)&&(f=q,g=1));f=b.urlToObject(f);f._xo=g;return f};b.addProxy=function(a){var c=b.getProxyRule(a),d;c?d=b.urlToObject(c.proxyUrl):e.alwaysUseProxy&&(d=b.getProxyUrl());d&&(c=b.urlToObject(a),a=d.path+"?"+c.path,(d=f.objectToQuery(m.mixin(d.query||{},c.query)))&&(a+="?"+d));return a};b.addProxyRule=function(a){var c=a.urlPrefix=b.urlToObject(a.urlPrefix).path.replace(/([^\/])$/,"$1/").replace(/^https?:\/\//ig,"").toLowerCase(),d=e.proxyRules,h,f=d.length,
g,r=f;for(h=0;h<f;h++)if(g=d[h].urlPrefix,0===c.indexOf(g)){if(c.length===g)return-1;r=h;break}else 0===g.indexOf(c)&&(r=h+1);d.splice(r,0,a);return r};b.getProxyRule=function(a){var c=e.proxyRules,d=c.length,h=b.urlToObject(a).path.replace(/([^\/])$/,"$1/").replace(/^https?:\/\//ig,"").toLowerCase(),f;for(a=0;a<d;a++)if(0===h.indexOf(c[a].urlPrefix)){f=c[a];break}return f};b.hasSameOrigin=function(b,e,d){b=b.toLowerCase();e=e.toLowerCase();var h=c.location.href.toLowerCase();b=0===b.indexOf("http")?
new a(b):h=new a(h);e=0===e.indexOf("http")?new a(e):m.isString(h)?new a(h):h;return(d||b.scheme===e.scheme)&&b.host===e.host&&b.port===e.port};b.canUseXhr=function(a,c){var d=p("esri-phonegap")?!0:!1,h=b.hasSameOrigin,q=e.corsEnabledServers,f,g=-1;!d&&p("esri-cors")&&q&&q.length&&(d=l.some(q,function(b,c){var e=b&&"object"===typeof b?b.host:b;return e&&(f=0!==m.trim(e).toLowerCase().indexOf("http"),h(a,f?"http://"+e:e)||f&&h(a,"https://"+e))?(g=c,!0):!1}));return c?g:d};b.getAbsoluteUrl=function(a){var e=
b.getProtocolForWebResource();return m.isString(a)&&!h.test(a)?0===a.indexOf("//")?e+a:0===a.indexOf("/")?e+"//"+c.location.host+a:k._appBaseUrl+a:a};b.fixUrl=function(a){a=m.trim(a);a=b.getAbsoluteUrl(a);a=b.downgradeToHTTP(a);a=b.upgradeToHTTPS(a);return a=a.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")};b.normalize=function(a){return b.fixUrl(a)};b.downgradeToHTTP=function(a){return b.isHTTP(!1)&&r.test(a)&&b.hasSameOrigin(c.location.href,a,!0)&&!b.canUseXhr(a)?a.replace(r,"http:"):a};b.upgradeToHTTPS=
function(a){var e=g.defaults.io.httpsDomains,d=b.isHTTP(!1),h=b.isHTTP(!0);if(!t.test(a))return a;a=m.trim(a);var f=a.indexOf("/",7),f=-1===f?a:a.slice(0,f),f=f.toLowerCase().slice(7);if(d&&f===c.location.host&&(!w.test(a)||!b.canUseXhr(a)))return a;d=!1;if(h&&f===c.location.host)d=!0;else if(e)for(h=0;h<e.length;h++){var r=e[h];if(f===r||n.endsWith(f,"."+r)){d=!0;break}}d&&(a=a.replace(t,"https:"));return a};p("extend-esri")&&(m.mixin(k,b),k._getProxyUrl=b.getProxyUrl,k._getProxiedUrl=b.addProxy,
k._hasSameOrigin=b.hasSameOrigin,k._canDoXOXHR=b.canUseXhr,k._getAbsoluteUrl=b.getAbsoluteUrl,k.fixUrl=b.fixUrl);return b})},"dojo/_base/url":function(){define(["./kernel"],function(m){var l=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,a=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,f=function(){for(var k=arguments,n=[k[0]],g=1;g<k.length;g++)if(k[g]){var p=new f(k[g]+""),n=new f(n[0]+"");if(""==p.path&&!p.scheme&&!p.authority&&!p.query)null!=p.fragment&&(n.fragment=
p.fragment),p=n;else if(!p.scheme&&(p.scheme=n.scheme,!p.authority&&(p.authority=n.authority,"/"!=p.path.charAt(0)))){for(var n=(n.path.substring(0,n.path.lastIndexOf("/")+1)+p.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));p.path=n.join("/")}n=[];p.scheme&&n.push(p.scheme,":");p.authority&&n.push("//",p.authority);n.push(p.path);p.query&&n.push("?",
p.query);p.fragment&&n.push("#",p.fragment)}this.uri=n.join("");k=this.uri.match(l);this.scheme=k[2]||(k[1]?"":null);this.authority=k[4]||(k[3]?"":null);this.path=k[5];this.query=k[7]||(k[6]?"":null);this.fragment=k[9]||(k[8]?"":null);null!=this.authority&&(k=this.authority.match(a),this.user=k[3]||null,this.password=k[4]||null,this.host=k[6]||k[7],this.port=k[9]||null)};f.prototype.toString=function(){return this.uri};return m._Url=f})},"esri/PluginTarget":function(){define("require dojo/aspect dojo/_base/array dojo/_base/lang dojo/Deferred dojo/when".split(" "),
function(m,l,a,f,k,n){function g(){l.after(this.constructor._meta,"ctor",this._pluginsHandler,!0);this._plugins={}}g.prototype={addPlugin:function(a,d){var c=this,b=this._plugins,e=new k;try{m([a],function(h){a in b?e.resolve({id:b[a].declaredId||a.replace(/\//g,".")}):(b[a]=h,n(h.add(c,d),function(){var b={id:h.declaredId||a.replace(/\//g,".")};c.emit("plugin-add",b);e.resolve(b)},function(a){e.reject(a)}))})}catch(h){e.reject(h)}return e.promise},removePlugin:function(a){if(a in this._plugins){var d=
this._plugins[a];d.remove(this);delete this._plugins[a];this.emit("plugin-remove",{id:d.declaredId||a.replace(/\//g,".")})}},_pluginsHandler:function(){var f=this;a.some(arguments,function(a){if(a&&a.plugins&&a.plugins instanceof Array){a=a.plugins;var c,b,e;for(e=0;e<a.length;e++)c=a[e],b=c instanceof Object?c.id:c,f.addPlugin(b,c.options);return!0}})}};return g})},"esri/Color":function(){define(["dojo/_base/declare","dojo/_base/Color","dojo/has","./kernel"],function(m,l,a,f){m=m([l],{declaredClass:"esri.Color"});
m.toJsonColor=function(a){return a&&[a.r,a.g,a.b,1<a.a?a.a:Math.round(255*a.a)]};m.toDojoColor=function(a){return a&&new l([a[0],a[1],a[2],a[3]/255])};var k,n="named blendColors fromRgb fromHex fromArray fromString".split(" ");for(k=0;k<n.length;k++)m[n[k]]=l[n[k]];a("extend-esri")&&(f.Color=m);return m})},"esri/arcade/Dictionary":function(){define(["require","exports","./languageUtils","../geometry/Geometry","./ImmutableArray"],function(m,l,a,f,k){return function(){function n(a){this.attributes=
null;this.plain=!1;this.immutable=!0;this.attributes=a instanceof n?a.attributes:void 0===a?{}:null===a?{}:a}n.prototype.field=function(a){var f=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var d in this.attributes)if(d.toLowerCase()===f)return this.attributes[d];throw Error("Field not Found");};n.prototype.setField=function(a,f){if(this.immutable)throw Error("Dictionary is Immutable");var d=a.toLowerCase();if(void 0===this.attributes[a])for(var c in this.attributes)if(c.toLowerCase()===
d){this.attributes[c]=f;return}this.attributes[a]=f};n.prototype.hasField=function(a){var f=a.toLowerCase();if(void 0!==this.attributes[a])return!0;for(var d in this.attributes)if(d.toLowerCase()===f)return!0;return!1};n.prototype.keys=function(){var a=[],f;for(f in this.attributes)a.push(f);return a=a.sort()};n.prototype.castToText=function(){var g="",p;for(p in this.attributes){""!==g&&(g+=",");var d=this.attributes[p];null==d?g+=JSON.stringify(p)+":null":a.isBoolean(d)||a.isNumber(d)||a.isString(d)?
g+=JSON.stringify(p)+":"+JSON.stringify(d):d instanceof f?g+=JSON.stringify(p)+":"+a.toStringExplicit(d):d instanceof k?g+=JSON.stringify(p)+":"+a.toStringExplicit(d):d instanceof Array?g+=JSON.stringify(p)+":"+a.toStringExplicit(d):d instanceof Date?g+=JSON.stringify(p)+":"+JSON.stringify(d):null!==d&&"object"===typeof d&&void 0!==d.castToText&&(g+=JSON.stringify(p)+":"+d.castToText())}return"{"+g+"}"};return n}()})},"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(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w){function u(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 q(a){return a instanceof V||a instanceof w||a instanceof G}function x(a){return"string"===typeof a||a instanceof String}function v(a){return"boolean"===typeof a}function C(a){return"number"===typeof a}function y(a){return a instanceof Array}function z(a){return a instanceof Date}function E(a,b){if(!1===isNaN(a)){if(void 0===
b||null===b||""===b)return a.toString();b=u(b,"\u2030","");b=u(b,"\u00a4","");return k.format(a,{pattern:b})}return a.toString()}function B(a,b){var c=f(a);return void 0===b||null===b||""===b?c.format():c.format(R(b))}function R(a){return a.replace(/(LTS)|L|l/g,function(a){return"["+a+"]"})}function D(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 H(a,c){if(a===c||null===a&&c===l.voidOperation||null===c&&a===
l.voidOperation)return!0;if(z(a)&&z(c))return a.getTime()===c.getTime();if(a instanceof d||a instanceof p)return a.equalityTest(c);if(a instanceof b&&c instanceof b){var e=void 0,h=void 0;l.isVersion4?(e=a.cache._arcadeCacheId,h=c.cache._arcadeCacheId):(e=a.getCacheValue("_arcadeCacheId"),h=c.getCacheValue("_arcadeCacheId"));if(void 0!==e&&null!==e)return e===h}return void 0!==a&&void 0!==c&&null!==a&&null!==c&&"object"===typeof a&&"object"===typeof c&&(a._arcadeCacheId===c._arcadeCacheId&&void 0!==
a._arcadeCacheId&&null!==a._arcadeCacheId||a._underlyingGraphic===c._underlyingGraphic&&void 0!==a._underlyingGraphic&&null!==a._underlyingGraphic)?!0:!1}function O(b,c){if(x(b))return b;if(null===b)return"";if(C(b))return E(b,c);if(v(b))return b.toString();if(z(b))return B(b,c);if(b instanceof a)return JSON.stringify(b.toJson());if(y(b)){for(var e=[],d=0;d<b.length;d++)e[d]=T(b[d]);return"["+e.join(",")+"]"}if(b instanceof n){e=[];for(d=0;d<b.length();d++)e[d]=T(b.get(d));return"["+e.join(",")+"]"}return null!==
b&&"object"===typeof b&&void 0!==b.castToText?b.castToText():q(b)?"object, Function":""}function Y(b,c){if(x(b))return b;if(null===b)return"";if(C(b))return E(b,c);if(v(b))return b.toString();if(z(b))return B(b,c);if(b instanceof a)return b instanceof t?'{"xmin":'+b.xmin.toString()+',"ymin":'+b.ymin.toString()+","+(b.hasZ?'"zmin":'+b.zmin.toString()+",":"")+(b.hasM?'"mmin":'+b.mmin.toString()+",":"")+'"xmax":'+b.xmax.toString()+',"ymax":'+b.ymax.toString()+","+(b.hasZ?'"zmax":'+b.zmax.toString()+
",":"")+(b.hasM?'"mmax":'+b.mmax.toString()+",":"")+'"spatialReference":'+K(b.spatialReference)+"}":K(b.toJson(),function(a,b){return a.key===b.key?0:"spatialReference"===a.key?1:"spatialReference"===b.key||a.key<b.key?-1:a.key>b.key?1:0});if(y(b)){for(var e=[],d=0;d<b.length;d++)e[d]=T(b[d]);return"["+e.join(",")+"]"}if(b instanceof n){e=[];for(d=0;d<b.length();d++)e[d]=T(b.get(d));return"["+e.join(",")+"]"}return null!==b&&"object"===typeof b&&void 0!==b.castToText?b.castToText():q(b)?"object, Function":
""}function T(b){if(null!==b){if(v(b)||C(b)||x(b))return JSON.stringify(b);if(b instanceof a||b instanceof n||b instanceof Array)return Y(b);if(b instanceof Date)return JSON.stringify(B(b,""));if(null!==b&&"object"===typeof b&&void 0!==b.castToText)return b.castToText()}return"null"}function F(a,b){return C(a)?a:null===a||""===a?0:z(a)?NaN:v(a)?a?1:0:y(a)||""===a||void 0===a?NaN:void 0!==b&&x(a)?(b=u(b,"\u2030",""),b=u(b,"\u00a4",""),k.parse(a,{pattern:b})):a===l.voidOperation?0:Number(a)}function S(a,
b){var e;c.some(b.fields,function(b){b.name===a&&(e=b.domain);return!!e});return e}function K(a,b){b||(b={});"function"===typeof b&&(b={cmp:b});var c="boolean"===typeof b.cycles?b.cycles:!1,e=b.cmp&&function(a){return function(b){return function(c,e){return a({key:c,value:b[c]},{key:e,value:b[e]})}}}(b.cmp),d=[];return function Q(a){a&&a.toJson&&"function"===typeof a.toJson&&(a=a.toJson());if(void 0!==a){if("number"===typeof a)return isFinite(a)?""+a:"null";if("object"!==typeof a)return JSON.stringify(a);
var b,h;if(Array.isArray(a)){h="[";for(b=0;b<a.length;b++)b&&(h+=","),h+=Q(a[b])||"null";return h+"]"}if(null===a)return"null";if(-1!==d.indexOf(a)){if(c)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON");}var f=d.push(a)-1,q=Object.keys(a).sort(e&&e(a));h="";for(b=0;b<q.length;b++){var g=q[b],r=Q(a[g]);r&&(h&&(h+=","),h+=JSON.stringify(g)+":"+r)}d.splice(f,1);return"{"+h+"}"}}(a)}Object.defineProperty(l,"__esModule",{value:!0});m=function(){return function(a){this.value=
a}}();var Z=function(){return function(a){this.value=a}}(),V=function(){return function(a){this.fn=a}}(),G=function(){return function(a){this.fn=a}}();l.NativeFunction=V;l.ImplicitResult=Z;l.ReturnResult=m;l.SizzleFunction=G;l.isVersion4=0===g.version.indexOf("4.");l.voidOperation={type:"VOID"};l.breakResult={type:"BREAK"};l.continueResult={type:"CONTINUE"};l.multiReplace=u;l.isFunctionParameter=q;l.isSimpleType=function(a){return x(a)||C(a)||z(a)||v(a)||null===a||a===l.voidOperation||"number"===
typeof a?!0:!1};l.defaultUndefined=function(a,b){return void 0===a?b:a};l.isString=x;l.isBoolean=v;l.isNumber=C;l.isArray=y;l.isFeatureCursor=function(a){return a&&void 0!==a.isFeatureCursor};l.isImmutableArray=function(a){return a instanceof n};l.isDate=z;l.pcCheck=function(a,b,c){if(a.length<b||a.length>c)throw Error("Function called with wrong number of Parameters");};l.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)})};l.formatNumber=E;l.formatDate=B;l.standardiseDateFormat=R;l.greaterThanLessThan=function(a,b,c){if(null===a){if(null===b||b===l.voidOperation)return D(null,null,c);if(C(b))return D(0,b,c);if(x(b)||v(b))return D(0,F(b),c);if(z(b))return D(0,b.getTime(),c)}if(a===l.voidOperation){if(null===b||b===l.voidOperation)return D(null,null,c);if(C(b))return D(0,b,c);if(x(b)||v(b))return D(0,F(b),c);if(z(b))return D(0,b.getTime(),
c)}else if(C(a)){if(C(b))return D(a,b,c);if(v(b))return D(a,F(b),c);if(null===b||b===l.voidOperation)return D(a,0,c);if(x(b))return D(a,F(b),c);if(z(b))return D(a,b.getTime(),c)}else if(x(a)){if(x(b))return D(O(a),O(b),c);if(z(b))return D(F(a),b.getTime(),c);if(C(b))return D(F(a),b,c);if(null===b||b===l.voidOperation)return D(F(a),0,c);if(v(b))return D(F(a),F(b),c)}else if(z(a)){if(z(b))return D(a,b,c);if(null===b||b===l.voidOperation)return D(a.getTime(),0,c);if(C(b))return D(a.getTime(),b,c);if(v(b)||
x(b))return D(a.getTime(),F(b),c)}else if(v(a)){if(v(b))return D(a,b,c);if(C(b))return D(F(a),F(b),c);if(z(b))return D(F(a),b.getTime(),c);if(null===b||b===l.voidOperation)return D(F(a),0,c);if(x(b))return D(F(a),F(b),c)}return!H(a,b)||"\x3c\x3d"!==c&&"\x3e\x3d"!==c?!1:!0};l.equalityTest=H;l.toString=O;l.toNumberArray=function(a){var b=[];if(!1===y(a))return null;if(a instanceof n){for(var c=0;c<a.length();c++)b[c]=F(a.get(c));return b}for(c=0;c<a.length;c++)b[c]=F(a[c]);return b};l.toStringExplicit=
Y;l.toNumber=F;l.toDate=function(a,b){if(z(a))return a;if(x(a)){var c=f(a,[void 0===b||null===b||""===b?f.ISO_8601:b]);if(c.isValid())return c.toDate()}return null};l.toDateM=function(a,b){if(z(a))return f(a);if(x(a)){var c=f(a,[void 0===b||null===b||""===b?f.ISO_8601:b]);if(c.isValid())return c}return null};l.toBoolean=function(a){if(v(a))return a;if(x(a)){if(a=a.toLowerCase(),"true"===a)return!0}else if(C(a))return 0===a||isNaN(a)?!1:!0;return!1};l.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};l.fixNullGeometry=function(a){return null===a?null:a instanceof b?"NaN"===a.x||null===a.x||isNaN(a.x)?null:a:a instanceof h?0===a.rings.length?null:a:a instanceof e?0===a.paths.length?null:a:a instanceof r?0===a.points.length?null:a:a instanceof t?"NaN"===a.xmin||null===a.xmin||isNaN(a.xmin)?null:a:null};l.getDomainValue=function(a,b){if(!a||!a.domain)return null;var c=null;b="string"===
a.field.type||"esriFieldTypeString"===a.field.type?O(b):F(b);for(var e=0;e<a.domain.codedValues.length;e++){var d=a.domain.codedValues[e];d.code===b&&(c=d)}return null===c?null:c.name};l.getDomainCode=function(a,b){if(!a||!a.domain)return null;var c=null;b=O(b);for(var e=0;e<a.domain.codedValues.length;e++){var d=a.domain.codedValues[e];d.name===b&&(c=d)}return null===c?null:c.code};l.getDomain=function(a,b,e,d){void 0===e&&(e=null);if(!b||!b.fields)return null;for(var h=null,f=0;f<b.fields.length;f++){var q=
b.fields[f];q.name.toLowerCase()===a.toString().toLowerCase()&&(h=q)}if(null===h)return null;var g,r;d||(d=e&&b.typeIdField&&e._field(b.typeIdField));null!=d&&c.some(b.types,function(a){return a.id===d?((g=a.domains&&a.domains[h.name])&&"inherited"===g.type&&(g=S(h.name,b),r=!0),!0):!1});r||g||(g=S(a,b));return{field:h,domain:g}};l.stableStringify=K})},"esri/moment":function(){define(["require","exports","./plugins/moment!"],function(m,l,a){return a})},"esri/plugins/moment":function(){define(["require",
"exports","dojo/_base/kernel","moment/moment"],function(m,l,a,f){Object.defineProperty(l,"__esModule",{value:!0});var k={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,"es-us":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,sl:1,sr:1,"sr-cyrl":1,sv:1,th:1,tr:1,vi:1,"zh-cn":1,"zh-hk":1,"zh-tw":1};
l.load=function(n,g,p){n=a.locale;var d=n in k;if(!d){var c=n.split("-");1<c.length&&c[0]in k&&(n=c[0],d=!0)}d?g(["moment/locale/"+n],function(){p(f)}):p(f)}})},"moment/moment":function(){(function(m,l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l():"function"===typeof define&&define.amd?define(l):m.moment=l()})(this,function(){function m(){return Qb.apply(null,arguments)}function l(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function a(a){return null!=
a&&"[object Object]"===Object.prototype.toString.call(a)}function f(a){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(a).length;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function k(a){return void 0===a}function n(a){return"number"===typeof a||"[object Number]"===Object.prototype.toString.call(a)}function g(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function p(a,b){var c=[],e;for(e=0;e<a.length;++e)c.push(b(a[e],e));return c}
function d(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function c(a,b){for(var c in b)d(b,c)&&(a[c]=b[c]);d(b,"toString")&&(a.toString=b.toString);d(b,"valueOf")&&(a.valueOf=b.valueOf);return a}function b(a,b,c,e){return jb(a,b,c,e,!0).utc()}function e(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 h(a){if(null==a._isValid){var b=e(a),c=Rb.call(b.parsedDateParts,function(a){return null!=a}),c=!isNaN(a._d.getTime())&&0>b.overflow&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.weekdayMismatch&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);a._strict&&(c=c&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour);if(null!=Object.isFrozen&&Object.isFrozen(a))return c;a._isValid=c}return a._isValid}function t(a){var d=b(NaN);null!=a?c(e(d),
a):e(d).userInvalidated=!0;return d}function r(a,b){var c,d,h;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=e(b));k(b._locale)||(a._locale=b._locale);if(0<Bb.length)for(c=0;c<Bb.length;c++)d=Bb[c],h=b[d],k(h)||(a[d]=h);return a}function w(a){r(this,a);this._d=new Date(null!=
a._d?a._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));!1===Cb&&(Cb=!0,m.updateOffset(this),Cb=!1)}function u(a){return a instanceof w||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function x(a){a=+a;var b=0;0!==a&&isFinite(a)&&(b=q(a));return b}function v(a,b,c){var e=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),h=0,f;for(f=0;f<e;f++)(c&&a[f]!==b[f]||!c&&x(a[f])!==x(b[f]))&&h++;return h+d}function C(a){!1===m.suppressDeprecationWarnings&&
"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function y(a,b){var e=!0;return c(function(){null!=m.deprecationHandler&&m.deprecationHandler(null,a);if(e){for(var c=[],d,h=0;h<arguments.length;h++){d="";if("object"===typeof arguments[h]){d+="\n["+h+"] ";for(var f in arguments[0])d+=f+": "+arguments[0][f]+", ";d=d.slice(0,-2)}else d=arguments[h];c.push(d)}C(a+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+Error().stack);e=!1}return b.apply(this,arguments)},
b)}function z(a,b){null!=m.deprecationHandler&&m.deprecationHandler(a,b);Sb[a]||(C(b),Sb[a]=!0)}function E(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function B(b,e){var h=c({},b),f;for(f in e)d(e,f)&&(a(b[f])&&a(e[f])?(h[f]={},c(h[f],b[f]),c(h[f],e[f])):null!=e[f]?h[f]=e[f]:delete h[f]);for(f in b)d(b,f)&&!d(e,f)&&a(b[f])&&(h[f]=c({},h[f]));return h}function R(a){null!=a&&this.set(a)}function D(a,b){var c=a.toLowerCase();mb[c]=mb[c+"s"]=mb[b]=a}function H(a){return"string"===
typeof a?mb[a]||mb[a.toLowerCase()]:void 0}function O(a){var b={},c,e;for(e in a)d(a,e)&&(c=H(e))&&(b[c]=a[e]);return b}function Y(a){var b=[],c;for(c in a)b.push({unit:c,priority:Ha[c]});b.sort(function(a,b){return a.priority-b.priority});return b}function T(a,b,c){var e=""+Math.abs(a);return(0<=a?c?"+":"":"-")+Math.pow(10,Math.max(0,b-e.length)).toString().substr(1)+e}function F(a,b,c,e){var d=e;"string"===typeof e&&(d=function(){return this[e]()});a&&(kb[a]=d);b&&(kb[b[0]]=function(){return T(d.apply(this,
arguments),b[1],b[2])});c&&(kb[c]=function(){return this.localeData().ordinal(d.apply(this,arguments),a)})}function S(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function K(a){var b=a.match(Tb),c,e;c=0;for(e=b.length;c<e;c++)b[c]=kb[b[c]]?kb[b[c]]:S(b[c]);return function(c){var d="",h;for(h=0;h<e;h++)d+=E(b[h])?b[h].call(c,a):b[h];return d}}function Z(a,b){if(!a.isValid())return a.localeData().invalidDate();b=V(b,a.localeData());Db[b]=Db[b]||K(b);return Db[b](a)}function V(a,
b){function c(a){return b.longDateFormat(a)||a}var e=5;for(qb.lastIndex=0;0<=e&&qb.test(a);)a=a.replace(qb,c),qb.lastIndex=0,--e;return a}function G(a,b,c){Eb[a]=E(b)?b:function(a,e){return a&&c?c:b}}function ea(a,b){return d(Eb,a)?Eb[a](b._strict,b._locale):new RegExp(L(a))}function L(a){return W(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,e,d){return b||c||e||d}))}function W(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$\x26")}function ca(a,b){var c,e=b;"string"===
typeof a&&(a=[a]);n(b)&&(e=function(a,c){c[b]=x(a)});for(c=0;c<a.length;c++)Fb[a[c]]=e}function ua(a,b){ca(a,function(a,c,e,d){e._w=e._w||{};b(a,e._w,e,d)})}function ja(a){return 0===a%4&&0!==a%100||0===a%400}function Q(a,b){return function(c){return null!=c?(sa(this,a,c),m.updateOffset(this,b),this):P(this,a)}}function P(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function sa(a,b,c){if(a.isValid()&&!isNaN(c))if("FullYear"===b&&ja(a.year())&&1===a.month()&&29===a.date())a._d["set"+
(a._isUTC?"UTC":"")+b](c,a.month(),ga(c,a.month()));else a._d["set"+(a._isUTC?"UTC":"")+b](c)}function ga(a,b){if(isNaN(a)||isNaN(b))return NaN;var c=(b%12+12)%12;return 1===c?ja(a+(b-c)/12)?29:28:31-c%7%2}function fa(a,b){var c;if(!a.isValid())return a;if("string"===typeof b)if(/^\d+$/.test(b))b=x(b);else if(b=a.localeData().monthsParse(b),!n(b))return a;c=Math.min(a.date(),ga(a.year(),b));a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c);return a}function va(a){return null!=a?(fa(this,a),m.updateOffset(this,
!0),this):P(this,"Month")}function oa(){function a(a,b){return b.length-a.length}var c=[],e=[],d=[],h,f;for(h=0;12>h;h++)f=b([2E3,h]),c.push(this.monthsShort(f,"")),e.push(this.months(f,"")),d.push(this.months(f,"")),d.push(this.monthsShort(f,""));c.sort(a);e.sort(a);d.sort(a);for(h=0;12>h;h++)c[h]=W(c[h]),e[h]=W(e[h]);for(h=0;24>h;h++)d[h]=W(d[h]);this._monthsShortRegex=this._monthsRegex=new RegExp("^("+d.join("|")+")","i");this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i");this._monthsShortStrictRegex=
new RegExp("^("+c.join("|")+")","i")}function Da(a,b,c,e,d,h,f){b=new Date(a,b,c,e,d,h,f);100>a&&0<=a&&isFinite(b.getFullYear())&&b.setFullYear(a);return b}function Fa(a){var b=new Date(Date.UTC.apply(null,arguments));100>a&&0<=a&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a);return b}function wa(a,b,c){c=7+b-c;return-((7+Fa(a,0,c).getUTCDay()-b)%7)+c-1}function ma(a,b,c,e,d){c=(7+c-e)%7;e=wa(a,e,d);e=1+7*(b-1)+c+e;0>=e?(b=a-1,a=(ja(b)?366:365)+e):e>(ja(a)?366:365)?(b=a+1,a=e-(ja(a)?366:365)):
(b=a,a=e);return{year:b,dayOfYear:a}}function ta(a,b,c){var e=wa(a.year(),b,c),e=Math.floor((a.dayOfYear()-e-1)/7)+1;1>e?(a=a.year()-1,b=e+ya(a,b,c)):e>ya(a.year(),b,c)?(b=e-ya(a.year(),b,c),a=a.year()+1):(a=a.year(),b=e);return{week:b,year:a}}function ya(a,b,c){var e=wa(a,b,c);b=wa(a+1,b,c);return((ja(a)?366:365)-e+b)/7}function Ca(a,c,e){var d,h;a=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)h=b([2E3,1]).day(d),
this._minWeekdaysParse[d]=this.weekdaysMin(h,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(h,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(h,"").toLocaleLowerCase();if(e)c="dddd"===c?xa.call(this._weekdaysParse,a):"ddd"===c?xa.call(this._shortWeekdaysParse,a):xa.call(this._minWeekdaysParse,a);else if("dddd"===c){c=xa.call(this._weekdaysParse,a);if(-1!==c)return c;c=xa.call(this._shortWeekdaysParse,a);if(-1!==c)return c;c=xa.call(this._minWeekdaysParse,a)}else if("ddd"===
c){c=xa.call(this._shortWeekdaysParse,a);if(-1!==c)return c;c=xa.call(this._weekdaysParse,a);if(-1!==c)return c;c=xa.call(this._minWeekdaysParse,a)}else{c=xa.call(this._minWeekdaysParse,a);if(-1!==c)return c;c=xa.call(this._weekdaysParse,a);if(-1!==c)return c;c=xa.call(this._shortWeekdaysParse,a)}return-1!==c?c:null}function pa(){function a(a,b){return b.length-a.length}var c=[],e=[],d=[],h=[],f,q,g,r;for(f=0;7>f;f++)q=b([2E3,1]).day(f),g=this.weekdaysMin(q,""),r=this.weekdaysShort(q,""),q=this.weekdays(q,
""),c.push(g),e.push(r),d.push(q),h.push(g),h.push(r),h.push(q);c.sort(a);e.sort(a);d.sort(a);h.sort(a);for(f=0;7>f;f++)e[f]=W(e[f]),d[f]=W(d[f]),h[f]=W(h[f]);this._weekdaysMinRegex=this._weekdaysShortRegex=this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i");this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+e.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+c.join("|")+")","i")}function ka(){return this.hours()%12||12}
function Ea(a,b){F(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Wa(a,b){return b._meridiemParse}function Oa(a){return a?a.toLowerCase().replace("_","-"):a}function Ia(a){var b=null;if(!za[a]&&"undefined"!==typeof module&&module&&module.exports)try{b=rb._abbr,require("./locale/"+a),Ga(b)}catch(Wc){}return za[a]}function Ga(a,b){var c;a&&(c=k(b)?Ja(a):Ma(a,b))&&(rb=c);return rb._abbr}function Ma(a,b){if(null!==b){var c=Ub;b.abbr=a;if(null!=za[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=za[a]._config;else if(null!=b.parentLocale)if(null!=za[b.parentLocale])c=za[b.parentLocale]._config;else return nb[b.parentLocale]||(nb[b.parentLocale]=[]),nb[b.parentLocale].push({name:a,config:b}),null;za[a]=new R(B(c,b));nb[a]&&nb[a].forEach(function(a){Ma(a.name,
a.config)});Ga(a);return za[a]}delete za[a];return null}function Ja(a){var b;a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr);if(!a)return rb;if(!l(a)){if(b=Ia(a))return b;a=[a]}a:{b=0;for(var c,e,d,h;b<a.length;){h=Oa(a[b]).split("-");c=h.length;for(e=(e=Oa(a[b+1]))?e.split("-"):null;0<c;){if(d=Ia(h.slice(0,c).join("-"))){a=d;break a}if(e&&e.length>=c&&v(h,e,!0)>=c-1)break;c--}b++}a=null}return a}function ab(a){var b;(b=a._a)&&-2===e(a).overflow&&(b=0>b[Ya]||11<b[Ya]?Ya:1>b[Ua]||b[Ua]>ga(b[Ra],
b[Ya])?Ua:0>b[Aa]||24<b[Aa]||24===b[Aa]&&(0!==b[Sa]||0!==b[Za]||0!==b[hb])?Aa:0>b[Sa]||59<b[Sa]?Sa:0>b[Za]||59<b[Za]?Za:0>b[hb]||999<b[hb]?hb:-1,e(a)._overflowDayOfYear&&(b<Ra||b>Ua)&&(b=Ua),e(a)._overflowWeeks&&-1===b&&(b=kc),e(a)._overflowWeekday&&-1===b&&(b=lc),e(a).overflow=b);return a}function Ka(a,b,c){return null!=a?a:null!=b?b:c}function Ta(a){var b,c=[],d;if(!a._d){d=new Date(m.now());d=a._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()];
if(a._w&&null==a._a[Ua]&&null==a._a[Ya]){var h,f,q,g,r,v;h=a._w;if(null!=h.GG||null!=h.W||null!=h.E){if(r=1,v=4,f=Ka(h.GG,a._a[Ra],ta(I(),1,4).year),q=Ka(h.W,1),g=Ka(h.E,1),1>g||7<g)b=!0}else if(r=a._locale._week.dow,v=a._locale._week.doy,q=ta(I(),r,v),f=Ka(h.gg,a._a[Ra],q.year),q=Ka(h.w,q.week),null!=h.d){if(g=h.d,0>g||6<g)b=!0}else if(null!=h.e){if(g=h.e+r,0>h.e||6<h.e)b=!0}else g=r;1>q||q>ya(f,r,v)?e(a)._overflowWeeks=!0:null!=b?e(a)._overflowWeekday=!0:(b=ma(f,q,g,r,v),a._a[Ra]=b.year,a._dayOfYear=
b.dayOfYear)}if(null!=a._dayOfYear){b=Ka(a._a[Ra],d[Ra]);if(a._dayOfYear>(ja(b)?366:365)||0===a._dayOfYear)e(a)._overflowDayOfYear=!0;b=Fa(b,0,a._dayOfYear);a._a[Ya]=b.getUTCMonth();a._a[Ua]=b.getUTCDate()}for(b=0;3>b&&null==a._a[b];++b)a._a[b]=c[b]=d[b];for(;7>b;b++)a._a[b]=c[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[Aa]&&0===a._a[Sa]&&0===a._a[Za]&&0===a._a[hb]&&(a._nextDay=!0,a._a[Aa]=0);a._d=(a._useUTC?Fa:Da).apply(null,c);null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm);a._nextDay&&
(a._a[Aa]=24);a._w&&"undefined"!==typeof a._w.d&&a._w.d!==a._d.getDay()&&(e(a).weekdayMismatch=!0)}}function N(a){var b,c;b=a._i;var d=mc.exec(b)||nc.exec(b),h,f,q,g;if(d){e(a).iso=!0;b=0;for(c=sb.length;b<c;b++)if(sb[b][1].exec(d[1])){f=sb[b][0];h=!1!==sb[b][2];break}if(null==f)a._isValid=!1;else{if(d[3]){b=0;for(c=Gb.length;b<c;b++)if(Gb[b][1].exec(d[3])){q=(d[2]||" ")+Gb[b][0];break}if(null==q){a._isValid=!1;return}}if(h||null==q){if(d[4])if(oc.exec(d[4]))g="Z";else{a._isValid=!1;return}a._f=f+
(q||"")+(g||"");aa(a)}else a._isValid=!1}}else a._isValid=!1}function La(a){var b=pc.exec(a._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(b){var c=b[3],d=b[2],h=b[5],f=b[6],q=b[7],g=parseInt(b[4],10),c=[49>=g?2E3+g:999>=g?1900+g:g,Vb.indexOf(c),parseInt(d,10),parseInt(h,10),parseInt(f,10)];q&&c.push(parseInt(q,10));a:{if(q=b[1])if(q=Wb.indexOf(q),d=(new Date(c[0],c[1],c[2])).getDay(),q!==d){e(a).weekdayMismatch=!0;q=a._isValid=!1;break a}q=!0}q&&(a._a=c,(q=b[8])?b=qc[q]:b[9]?
b=0:(b=parseInt(b[10],10),q=b%100,b=(b-q)/100*60+q),a._tzm=b,a._d=Fa.apply(null,a._a),a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),e(a).rfc2822=!0)}else a._isValid=!1}function Ba(a){var b=rc.exec(a._i);null!==b?a._d=new Date(+b[1]):(N(a),!1===a._isValid&&(delete a._isValid,La(a),!1===a._isValid&&(delete a._isValid,m.createFromInputFallback(a))))}function aa(a){if(a._f===m.ISO_8601)N(a);else if(a._f===m.RFC_2822)La(a);else{a._a=[];e(a).empty=!0;var b=""+a._i,c,h,f,q,g,r=b.length,v=0;f=V(a._f,a._locale).match(Tb)||
[];for(c=0;c<f.length;c++){q=f[c];if(h=(b.match(ea(q,a))||[])[0])g=b.substr(0,b.indexOf(h)),0<g.length&&e(a).unusedInput.push(g),b=b.slice(b.indexOf(h)+h.length),v+=h.length;if(kb[q]){if(h?e(a).empty=!1:e(a).unusedTokens.push(q),g=a,null!=h&&d(Fb,q))Fb[q](h,g._a,g,q)}else a._strict&&!h&&e(a).unusedTokens.push(q)}e(a).charsLeftOver=r-v;0<b.length&&e(a).unusedInput.push(b);12>=a._a[Aa]&&!0===e(a).bigHour&&0<a._a[Aa]&&(e(a).bigHour=void 0);e(a).parsedDateParts=a._a.slice(0);e(a).meridiem=a._meridiem;
b=a._a;c=Aa;r=a._locale;f=a._a[Aa];v=a._meridiem;null!=v&&(null!=r.meridiemHour?f=r.meridiemHour(f,v):null!=r.isPM&&((r=r.isPM(v))&&12>f&&(f+=12),r||12!==f||(f=0)));b[c]=f;Ta(a);ab(a)}}function bb(a){if(!a._d){var b=O(a._i);a._a=p([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)});Ta(a)}}function Pa(a){var b=a._i,d=a._f;a._locale=a._locale||Ja(a._l);if(null===b||void 0===d&&""===b)return t({nullInput:!0});"string"===typeof b&&(a._i=b=a._locale.preparse(b));
if(u(b))return new w(ab(b));if(g(b))a._d=b;else if(l(d)){var f,q,v;if(0===a._f.length)e(a).invalidFormat=!0,a._d=new Date(NaN);else{for(b=0;b<a._f.length;b++)if(d=0,f=r({},a),null!=a._useUTC&&(f._useUTC=a._useUTC),f._f=a._f[b],aa(f),h(f)&&(d+=e(f).charsLeftOver,d+=10*e(f).unusedTokens.length,e(f).score=d,null==v||d<v))v=d,q=f;c(a,q||f)}}else d?aa(a):ha(a);h(a)||(a._d=null);return a}function ha(b){var c=b._i;k(c)?b._d=new Date(m.now()):g(c)?b._d=new Date(c.valueOf()):"string"===typeof c?Ba(b):l(c)?
(b._a=p(c.slice(0),function(a){return parseInt(a,10)}),Ta(b)):a(c)?bb(b):n(c)?b._d=new Date(c):m.createFromInputFallback(b)}function jb(b,c,e,d,h){var q={};if(!0===e||!1===e)d=e,e=void 0;if(a(b)&&f(b)||l(b)&&0===b.length)b=void 0;q._isAMomentObject=!0;q._useUTC=q._isUTC=h;q._l=e;q._i=b;q._f=c;q._strict=d;b=new w(ab(Pa(q)));b._nextDay&&(b.add(1,"d"),b._nextDay=void 0);return b}function I(a,b,c,e){return jb(a,b,c,e,!1)}function na(a,b){var c,e;1===b.length&&l(b[0])&&(b=b[0]);if(!b.length)return I();
c=b[0];for(e=1;e<b.length;++e)if(!b[e].isValid()||b[e][a](c))c=b[e];return c}function A(a){for(var b in a)if(-1===xa.call(ob,b)||null!=a[b]&&isNaN(a[b]))return!1;b=!1;for(var c=0;c<ob.length;++c)if(a[ob[c]]){if(b)return!1;parseFloat(a[ob[c]])!==x(a[ob[c]])&&(b=!0)}return!0}function ba(a){a=O(a);var b=a.year||0,c=a.quarter||0,e=a.month||0,d=a.week||0,h=a.day||0,f=a.hour||0,q=a.minute||0,g=a.second||0,r=a.millisecond||0;this._isValid=A(a);this._milliseconds=+r+1E3*g+6E4*q+36E5*f;this._days=+h+7*d;this._months=
+e+3*c+12*b;this._data={};this._locale=Ja();this._bubble()}function da(a){return a instanceof ba}function la(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function U(a,b){F(a,0,0,function(){var a=this.utcOffset(),c="+";0>a&&(a=-a,c="-");return c+T(~~(a/60),2)+b+T(~~a%60,2)})}function X(a,b){var c=(b||"").match(a);if(null===c)return null;var c=((c[c.length-1]||[])+"").match(sc)||["-",0,0],e=+(60*c[1])+x(c[2]);return 0===e?0:"+"===c[0]?e:-e}function J(a,b){var c,e;return b._isUTC?(c=b.clone(),e=(u(a)||
g(a)?a.valueOf():I(a).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+e),m.updateOffset(c,!1),c):I(a).local()}function Lb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Qa(a,b){var c=a,e=null;da(a)?c={ms:a._milliseconds,d:a._days,M:a._months}:n(a)?(c={},b?c[b]=a:c.milliseconds=a):(e=tc.exec(a))?(c="-"===e[1]?-1:1,c={y:0,d:x(e[Ua])*c,h:x(e[Aa])*c,m:x(e[Sa])*c,s:x(e[Za])*c,ms:x(la(1E3*e[hb]))*c}):(e=uc.exec(a))?(c="-"===e[1]?-1:1,c={y:fb(e[2],c),M:fb(e[3],c),w:fb(e[4],c),d:fb(e[5],
c),h:fb(e[6],c),m:fb(e[7],c),s:fb(e[8],c)}):null==c?c={}:"object"===typeof c&&("from"in c||"to"in c)&&(e=I(c.from),c=I(c.to),e.isValid()&&c.isValid()?(c=J(c,e),e.isBefore(c)?c=Mb(e,c):(c=Mb(c,e),c.milliseconds=-c.milliseconds,c.months=-c.months),e=c):e={milliseconds:0,months:0},c={},c.ms=e.milliseconds,c.M=e.months);c=new ba(c);da(a)&&d(a,"_locale")&&(c._locale=a._locale);return c}function fb(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Mb(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 gb(a,b){return function(c,e){var d;null===e||isNaN(+e)||(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."),d=c,c=e,e=d);d=Qa("string"===typeof c?+c:c,e);Nb(this,d,a);return this}}function Nb(a,b,c,e){var d=
b._milliseconds,h=la(b._days);b=la(b._months);a.isValid()&&(e=null==e?!0:e,b&&fa(a,P(a,"Month")+b*c),h&&sa(a,"Date",P(a,"Date")+h*c),d&&a._d.setTime(a._d.valueOf()+d*c),e&&m.updateOffset(a,h||b))}function Ab(a,b){var c=12*(b.year()-a.year())+(b.month()-a.month()),e=a.clone().add(c,"months"),d;0>b-e?(d=a.clone().add(c-1,"months"),e=(b-e)/(e-d)):(d=a.clone().add(c+1,"months"),e=(b-e)/(d-e));return-(c+e)||0}function Ob(a){if(void 0===a)return this._locale._abbr;a=Ja(a);null!=a&&(this._locale=a);return this}
function Pb(){return this._locale}function Xa(a,b){F(0,[a,a.length],0,b)}function Xb(a,b,c,e,d){var h;if(null==a)return ta(this,e,d).year;h=ya(a,e,d);b>h&&(b=h);a=ma(a,b,c,e,d);a=Fa(a.year,0,a.dayOfYear);this.year(a.getUTCFullYear());this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function vc(a,b){b[hb]=x(1E3*("0."+a))}function Yb(a){return a}function tb(a,c,e,d){var h=Ja();c=b().set(d,c);return h[e](c,a)}function Zb(a,b,c){n(a)&&(b=a,a=void 0);a=a||"";if(null!=b)return tb(a,b,c,
"month");var e=[];for(b=0;12>b;b++)e[b]=tb(a,b,c,"month");return e}function Hb(a,b,c,e){"boolean"!==typeof a&&(c=b=a,a=!1);n(b)&&(c=b,b=void 0);b=b||"";var d=Ja();a=a?d._week.dow:0;if(null!=c)return tb(b,(c+a)%7,e,"day");d=[];for(c=0;7>c;c++)d[c]=tb(b,(c+a)%7,e,"day");return d}function $b(a,b,c,e){b=Qa(b,c);a._milliseconds+=e*b._milliseconds;a._days+=e*b._days;a._months+=e*b._months;return a._bubble()}function ac(a){return 0>a?Math.floor(a):Math.ceil(a)}function cb(a){return function(){return this.as(a)}}
function ib(a){return function(){return this.isValid()?this._data[a]:NaN}}function wc(a,b,c,e,d){return d.relativeTime(b||1,!!c,a,e)}function lb(a){return(0<a)-(0>a)||+a}function ub(){if(!this.isValid())return this.localeData().invalidDate();var a=Ib(this._milliseconds)/1E3,b=Ib(this._days),c=Ib(this._months),e,d;e=q(a/60);d=q(e/60);a%=60;e%=60;var h=q(c/12),c=c%12,a=a?a.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var g=0>f?"-":"",r=lb(this._months)!==lb(f)?"-":"",v=lb(this._days)!==
lb(f)?"-":"",f=lb(this._milliseconds)!==lb(f)?"-":"";return g+"P"+(h?r+h+"Y":"")+(c?r+c+"M":"")+(b?v+b+"D":"")+(d||e||a?"T":"")+(d?f+d+"H":"")+(e?f+e+"M":"")+(a?f+a+"S":"")}var Qb,Rb;Rb=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,e=0;e<c;e++)if(e in b&&a.call(this,b[e],e,b))return!0;return!1};var Bb=m.momentProperties=[],Cb=!1,Sb={};m.suppressDeprecationWarnings=!1;m.deprecationHandler=null;var bc;bc=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)d(a,
b)&&c.push(b);return c};var mb={},Ha={},Tb=/(\[[^\[]*\])|(\\)?([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,qb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Db={},kb={},cc=/\d/,Na=/\d\d/,dc=/\d{3}/,Jb=/\d{4}/,vb=/[+-]?\d{6}/,ra=/\d\d?/,ec=/\d\d\d\d?/,fc=/\d\d\d\d\d\d?/,wb=/\d{1,3}/,Kb=/\d{1,4}/,xb=/[+-]?\d{1,6}/,xc=/\d+/,yb=/[+-]?\d+/,yc=/Z|[+-]\d\d:?\d\d/gi,zb=/Z|[+-]\d\d(?::?\d\d)?/gi,
pb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Eb={},Fb={},Ra=0,Ya=1,Ua=2,Aa=3,Sa=4,Za=5,hb=6,kc=7,lc=8;F("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a});F(0,["YY",2],0,function(){return this.year()%100});F(0,["YYYY",4],0,"year");F(0,["YYYYY",5],0,"year");F(0,["YYYYYY",6,!0],0,"year");D("year","y");Ha.year=1;G("Y",yb);G("YY",ra,Na);G("YYYY",Kb,Jb);G("YYYYY",xb,vb);G("YYYYYY",xb,vb);ca(["YYYYY","YYYYYY"],Ra);ca("YYYY",
function(a,b){b[Ra]=2===a.length?m.parseTwoDigitYear(a):x(a)});ca("YY",function(a,b){b[Ra]=m.parseTwoDigitYear(a)});ca("Y",function(a,b){b[Ra]=parseInt(a,10)});m.parseTwoDigitYear=function(a){return x(a)+(68<x(a)?1900:2E3)};var gc=Q("FullYear",!0),xa;xa=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};F("M",["MM",2],"Mo",function(){return this.month()+1});F("MMM",0,0,function(a){return this.localeData().monthsShort(this,
a)});F("MMMM",0,0,function(a){return this.localeData().months(this,a)});D("month","M");Ha.month=8;G("M",ra);G("MM",ra,Na);G("MMM",function(a,b){return b.monthsShortRegex(a)});G("MMMM",function(a,b){return b.monthsRegex(a)});ca(["M","MM"],function(a,b){b[Ya]=x(a)-1});ca(["MMM","MMMM"],function(a,b,c,d){d=c._locale.monthsParse(a,d,c._strict);null!=d?b[Ya]=d:e(c).invalidMonth=a});var hc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Vb="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");F("w",["ww",2],"wo",
"week");F("W",["WW",2],"Wo","isoWeek");D("week","w");D("isoWeek","W");Ha.week=5;Ha.isoWeek=5;G("w",ra);G("ww",ra,Na);G("W",ra);G("WW",ra,Na);ua(["w","ww","W","WW"],function(a,b,c,e){b[e.substr(0,1)]=x(a)});F("d",0,"do","day");F("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)});F("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)});F("dddd",0,0,function(a){return this.localeData().weekdays(this,a)});F("e",0,0,"weekday");F("E",0,0,"isoWeekday");D("day","d");D("weekday",
"e");D("isoWeekday","E");Ha.day=11;Ha.weekday=11;Ha.isoWeekday=11;G("d",ra);G("e",ra);G("E",ra);G("dd",function(a,b){return b.weekdaysMinRegex(a)});G("ddd",function(a,b){return b.weekdaysShortRegex(a)});G("dddd",function(a,b){return b.weekdaysRegex(a)});ua(["dd","ddd","dddd"],function(a,b,c,d){d=c._locale.weekdaysParse(a,d,c._strict);null!=d?b.d=d:e(c).invalidWeekday=a});ua(["d","e","E"],function(a,b,c,e){b[e]=x(a)});var Wb="Sun Mon Tue Wed Thu Fri Sat".split(" ");F("H",["HH",2],0,"hour");F("h",["hh",
2],0,ka);F("k",["kk",2],0,function(){return this.hours()||24});F("hmm",0,0,function(){return""+ka.apply(this)+T(this.minutes(),2)});F("hmmss",0,0,function(){return""+ka.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)});F("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)});F("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)});Ea("a",!0);Ea("A",!1);D("hour","h");Ha.hour=13;G("a",Wa);G("A",Wa);G("H",ra);G("h",ra);G("k",ra);G("HH",ra,Na);G("hh",ra,Na);
G("kk",ra,Na);G("hmm",ec);G("hmmss",fc);G("Hmm",ec);G("Hmmss",fc);ca(["H","HH"],Aa);ca(["k","kk"],function(a,b,c){a=x(a);b[Aa]=24===a?0:a});ca(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a);c._meridiem=a});ca(["h","hh"],function(a,b,c){b[Aa]=x(a);e(c).bigHour=!0});ca("hmm",function(a,b,c){var d=a.length-2;b[Aa]=x(a.substr(0,d));b[Sa]=x(a.substr(d));e(c).bigHour=!0});ca("hmmss",function(a,b,c){var d=a.length-4,h=a.length-2;b[Aa]=x(a.substr(0,d));b[Sa]=x(a.substr(d,2));b[Za]=x(a.substr(h));e(c).bigHour=
!0});ca("Hmm",function(a,b,c){c=a.length-2;b[Aa]=x(a.substr(0,c));b[Sa]=x(a.substr(c))});ca("Hmmss",function(a,b,c){c=a.length-4;var e=a.length-2;b[Aa]=x(a.substr(0,c));b[Sa]=x(a.substr(c,2));b[Za]=x(a.substr(e))});var zc=Q("Hours",!0),Ub={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:Vb,week:{dow:0,doy:6},weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysShort:Wb,meridiemParse:/[ap]\.?m?\.?/i},za={},nb={},rb,mc=/^\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)?)?$/,nc=/^\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)?)?$/,oc=/Z|[+-]\d\d(?::?\d\d)?/,sb=[["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}/]],Gb=[["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/]],rc=/^\/?Date\((\-?\d+)/i,pc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,qc={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};m.createFromInputFallback=y("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":""))});m.ISO_8601=function(){};m.RFC_2822=function(){};var Ac=y("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=I.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:t()}),Bc=y("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=I.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:
a:t()}),ob="year quarter month week day hour minute second millisecond".split(" ");U("Z",":");U("ZZ","");G("Z",zb);G("ZZ",zb);ca(["Z","ZZ"],function(a,b,c){c._useUTC=!0;c._tzm=X(zb,a)});var sc=/([\+\-]|\d\d)/gi;m.updateOffset=function(){};var tc=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,uc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Qa.fn=ba.prototype;Qa.invalid=
function(){return Qa(NaN)};var Cc=gb(1,"add"),Dc=gb(-1,"subtract");m.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";m.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ic=y("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)});F(0,["gg",2],0,function(){return this.weekYear()%100});F(0,["GG",2],0,function(){return this.isoWeekYear()%100});Xa("gggg","weekYear");
Xa("ggggg","weekYear");Xa("GGGG","isoWeekYear");Xa("GGGGG","isoWeekYear");D("weekYear","gg");D("isoWeekYear","GG");Ha.weekYear=1;Ha.isoWeekYear=1;G("G",yb);G("g",yb);G("GG",ra,Na);G("gg",ra,Na);G("GGGG",Kb,Jb);G("gggg",Kb,Jb);G("GGGGG",xb,vb);G("ggggg",xb,vb);ua(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,e){b[e.substr(0,2)]=x(a)});ua(["gg","GG"],function(a,b,c,e){b[e]=m.parseTwoDigitYear(a)});F("Q",0,"Qo","quarter");D("quarter","Q");Ha.quarter=7;G("Q",cc);ca("Q",function(a,b){b[Ya]=3*(x(a)-1)});
F("D",["DD",2],"Do","date");D("date","D");Ha.date=9;G("D",ra);G("DD",ra,Na);G("Do",function(a,b){return a?b._dayOfMonthOrdinalParse||b._ordinalParse:b._dayOfMonthOrdinalParseLenient});ca(["D","DD"],Ua);ca("Do",function(a,b){b[Ua]=x(a.match(ra)[0],10)});var jc=Q("Date",!0);F("DDD",["DDDD",3],"DDDo","dayOfYear");D("dayOfYear","DDD");Ha.dayOfYear=4;G("DDD",wb);G("DDDD",dc);ca(["DDD","DDDD"],function(a,b,c){c._dayOfYear=x(a)});F("m",["mm",2],0,"minute");D("minute","m");Ha.minute=14;G("m",ra);G("mm",ra,
Na);ca(["m","mm"],Sa);var Ec=Q("Minutes",!1);F("s",["ss",2],0,"second");D("second","s");Ha.second=15;G("s",ra);G("ss",ra,Na);ca(["s","ss"],Za);var Fc=Q("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)});F(0,["SS",2],0,function(){return~~(this.millisecond()/10)});F(0,["SSS",3],0,"millisecond");F(0,["SSSS",4],0,function(){return 10*this.millisecond()});F(0,["SSSSS",5],0,function(){return 100*this.millisecond()});F(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});F(0,["SSSSSSS",
7],0,function(){return 1E4*this.millisecond()});F(0,["SSSSSSSS",8],0,function(){return 1E5*this.millisecond()});F(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});D("millisecond","ms");Ha.millisecond=16;G("S",wb,cc);G("SS",wb,Na);G("SSS",wb,dc);var db;for(db="SSSS";9>=db.length;db+="S")G(db,xc);for(db="S";9>=db.length;db+="S")ca(db,vc);var Gc=Q("Milliseconds",!1);F("z",0,0,"zoneAbbr");F("zz",0,0,"zoneName");var M=w.prototype;M.add=Cc;M.calendar=function(a,b){var c=a||I(),e=J(c,this).startOf("day"),
e=m.calendarFormat(this,e)||"sameElse",d=b&&(E(b[e])?b[e].call(this,c):b[e]);return this.format(d||this.localeData().calendar(e,this,I(c)))};M.clone=function(){return new w(this)};M.diff=function(a,b,c){var e;if(!this.isValid())return NaN;a=J(a,this);if(!a.isValid())return NaN;e=6E4*(a.utcOffset()-this.utcOffset());b=H(b);switch(b){case "year":b=Ab(this,a)/12;break;case "month":b=Ab(this,a);break;case "quarter":b=Ab(this,a)/3;break;case "second":b=(this-a)/1E3;break;case "minute":b=(this-a)/6E4;break;
case "hour":b=(this-a)/36E5;break;case "day":b=(this-a-e)/864E5;break;case "week":b=(this-a-e)/6048E5;break;default:b=this-a}return c?b:q(b)};M.endOf=function(a){a=H(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")};M.format=function(a){a||(a=this.isUtc()?m.defaultFormatUtc:m.defaultFormat);a=Z(this,a);return this.localeData().postformat(a)};M.from=function(a,b){return this.isValid()&&(u(a)&&a.isValid()||I(a).isValid())?
Qa({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};M.fromNow=function(a){return this.from(I(),a)};M.to=function(a,b){return this.isValid()&&(u(a)&&a.isValid()||I(a).isValid())?Qa({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};M.toNow=function(a){return this.to(I(),a)};M.get=function(a){a=H(a);return E(this[a])?this[a]():this};M.invalidAt=function(){return e(this).overflow};M.isAfter=function(a,b){var c=u(a)?a:I(a);if(!this.isValid()||
!c.isValid())return!1;b=H(k(b)?"millisecond":b);return"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf()};M.isBefore=function(a,b){var c=u(a)?a:I(a);if(!this.isValid()||!c.isValid())return!1;b=H(k(b)?"millisecond":b);return"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf()};M.isBetween=function(a,b,c,e){e=e||"()";return("("===e[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===e[1]?this.isBefore(b,c):!this.isAfter(b,c))};
M.isSame=function(a,b){var c=u(a)?a:I(a);if(!this.isValid()||!c.isValid())return!1;b=H(b||"millisecond");if("millisecond"===b)return this.valueOf()===c.valueOf();c=c.valueOf();return this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf()};M.isSameOrAfter=function(a,b){return this.isSame(a,b)||this.isAfter(a,b)};M.isSameOrBefore=function(a,b){return this.isSame(a,b)||this.isBefore(a,b)};M.isValid=function(){return h(this)};M.lang=ic;M.locale=Ob;M.localeData=Pb;M.max=Bc;M.min=Ac;M.parsingFlags=
function(){return c({},e(this))};M.set=function(a,b){if("object"===typeof a){a=O(a);for(var c=Y(a),e=0;e<c.length;e++)this[c[e].unit](a[c[e].unit])}else if(a=H(a),E(this[a]))return this[a](b);return this};M.startOf=function(a){a=H(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};M.subtract=Dc;M.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]};M.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}};M.toDate=function(){return new Date(this.valueOf())};M.toISOString=function(){if(!this.isValid())return null;
var a=this.clone().utc();return 0>a.year()||9999<a.year()?Z(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):E(Date.prototype.toISOString)?this.toDate().toISOString():Z(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")};M.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+'[")]'))};
M.toJSON=function(){return this.isValid()?this.toISOString():null};M.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};M.unix=function(){return Math.floor(this.valueOf()/1E3)};M.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||0)};M.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};M.year=gc;M.isLeapYear=function(){return ja(this.year())};M.weekYear=function(a){return Xb.call(this,
a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};M.isoWeekYear=function(a){return Xb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)};M.quarter=M.quarters=function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)};M.month=va;M.daysInMonth=function(){return ga(this.year(),this.month())};M.week=M.weeks=function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")};M.isoWeek=M.isoWeeks=function(a){var b=
ta(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")};M.weeksInYear=function(){var a=this.localeData()._week;return ya(this.year(),a.dow,a.doy)};M.isoWeeksInYear=function(){return ya(this.year(),1,4)};M.date=jc;M.day=M.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};
M.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")};M.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};M.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")};M.hour=M.hours=zc;M.minute=M.minutes=Ec;M.second=M.seconds=Fc;M.millisecond=M.milliseconds=Gc;M.utcOffset=function(a,b,c){var e=this._offset||0,d;if(!this.isValid())return null!=a?this:NaN;if(null!=a){if("string"===typeof a){if(a=X(zb,a),null===a)return this}else 16>Math.abs(a)&&!c&&(a*=60);!this._isUTC&&b&&(d=15*-Math.round(this._d.getTimezoneOffset()/15));this._offset=a;this._isUTC=!0;null!=d&&this.add(d,"m");e!==a&&(!b||this._changeInProgress?Nb(this,Qa(a-e,"m"),1,!1):this._changeInProgress||
(this._changeInProgress=!0,m.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?e:15*-Math.round(this._d.getTimezoneOffset()/15)};M.utc=function(a){return this.utcOffset(0,a)};M.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};M.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var a=X(yc,this._i);null!=a?this.utcOffset(a):
this.utcOffset(0,!0)}return this};M.hasAlignedHourOffset=function(a){if(!this.isValid())return!1;a=a?I(a).utcOffset():0;return 0===(this.utcOffset()-a)%60};M.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};M.isLocal=function(){return this.isValid()?!this._isUTC:!1};M.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};M.isUtc=Lb;M.isUTC=Lb;M.zoneAbbr=function(){return this._isUTC?"UTC":""};M.zoneName=function(){return this._isUTC?
"Coordinated Universal Time":""};M.dates=y("dates accessor is deprecated. Use date instead.",jc);M.months=y("months accessor is deprecated. Use month instead",va);M.years=y("years accessor is deprecated. Use year instead",gc);M.zone=y("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()});M.isDSTShifted=y("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
function(){if(!k(this._isDSTShifted))return this._isDSTShifted;var a={};r(a,this);a=Pa(a);if(a._a){var c=a._isUTC?b(a._a):I(a._a);this._isDSTShifted=this.isValid()&&0<v(a._a,c.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var qa=R.prototype;qa.calendar=function(a,b,c){a=this._calendar[a]||this._calendar.sameElse;return E(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=Yb;qa.postformat=Yb;qa.relativeTime=function(a,b,c,e){var d=this._relativeTime[c];return E(d)?d(a,b,c,e):d.replace(/%d/i,a)};qa.pastFuture=function(a,b){var c=this._relativeTime[0<a?"future":"past"];return E(c)?c(b):c.replace(/%s/i,b)};qa.set=function(a){var b,c;for(c in a)b=a[c],E(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?l(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||hc).test(b)?"format":"standalone"][a.month()]:l(this._months)?this._months:this._months.standalone};qa.monthsShort=function(a,b){return a?l(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[hc.test(b)?
"format":"standalone"][a.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone};qa.monthsParse=function(a,c,e){var d,h;if(this._monthsParseExact){a:{a=a.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;12>d;++d)h=b([2E3,d]),this._shortMonthsParse[d]=this.monthsShort(h,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(h,"").toLocaleLowerCase();if(e)c="MMM"===c?xa.call(this._shortMonthsParse,a):
xa.call(this._longMonthsParse,a);else if("MMM"===c){c=xa.call(this._shortMonthsParse,a);if(-1!==c)break a;c=xa.call(this._longMonthsParse,a)}else{c=xa.call(this._longMonthsParse,a);if(-1!==c)break a;c=xa.call(this._shortMonthsParse,a)}c=-1!==c?c:null}return c}this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(d=0;12>d;d++)if(h=b([2E3,d]),e&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(h,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=
new RegExp("^"+this.monthsShort(h,"").replace(".","")+"$","i")),e||this._monthsParse[d]||(h="^"+this.months(h,"")+"|^"+this.monthsShort(h,""),this._monthsParse[d]=new RegExp(h.replace(".",""),"i")),e&&"MMMM"===c&&this._longMonthsParse[d].test(a)||e&&"MMM"===c&&this._shortMonthsParse[d].test(a)||!e&&this._monthsParse[d].test(a))return d};qa.monthsRegex=function(a){if(this._monthsParseExact)return d(this,"_monthsRegex")||oa.call(this),a?this._monthsStrictRegex:this._monthsRegex;d(this,"_monthsRegex")||
(this._monthsRegex=pb);return this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex};qa.monthsShortRegex=function(a){if(this._monthsParseExact)return d(this,"_monthsRegex")||oa.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex;d(this,"_monthsShortRegex")||(this._monthsShortRegex=pb);return this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex};qa.week=function(a){return ta(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?l(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:l(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(a,c,e){var d,h;if(this._weekdaysParseExact)return Ca.call(this,
a,c,e);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(d=0;7>d;d++)if(h=b([2E3,1]).day(d),e&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(h,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(h,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(h,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||
(h="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[d]=new RegExp(h.replace(".",""),"i")),e&&"dddd"===c&&this._fullWeekdaysParse[d].test(a)||e&&"ddd"===c&&this._shortWeekdaysParse[d].test(a)||e&&"dd"===c&&this._minWeekdaysParse[d].test(a)||!e&&this._weekdaysParse[d].test(a))return d};qa.weekdaysRegex=function(a){if(this._weekdaysParseExact)return d(this,"_weekdaysRegex")||pa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex;d(this,"_weekdaysRegex")||
(this._weekdaysRegex=pb);return this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex};qa.weekdaysShortRegex=function(a){if(this._weekdaysParseExact)return d(this,"_weekdaysRegex")||pa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=pb);return this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex};qa.weekdaysMinRegex=function(a){if(this._weekdaysParseExact)return d(this,
"_weekdaysRegex")||pa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=pb);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===x(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?
"rd":"th";return a+b}});m.lang=y("moment.lang is deprecated. Use moment.locale instead.",Ga);m.langData=y("moment.langData is deprecated. Use moment.localeData instead.",Ja);var $a=Math.abs,Hc=cb("ms"),Ic=cb("s"),Jc=cb("m"),Kc=cb("h"),Lc=cb("d"),Mc=cb("w"),Nc=cb("M"),Oc=cb("y"),Pc=ib("milliseconds"),Qc=ib("seconds"),Rc=ib("minutes"),Sc=ib("hours"),Tc=ib("days"),Uc=ib("months"),Vc=ib("years"),eb=Math.round,Va={ss:44,s:45,m:45,h:22,d:26,M:11},Ib=Math.abs,ia=ba.prototype;ia.isValid=function(){return this._isValid};
ia.abs=function(){var a=this._data;this._milliseconds=$a(this._milliseconds);this._days=$a(this._days);this._months=$a(this._months);a.milliseconds=$a(a.milliseconds);a.seconds=$a(a.seconds);a.minutes=$a(a.minutes);a.hours=$a(a.hours);a.months=$a(a.months);a.years=$a(a.years);return this};ia.add=function(a,b){return $b(this,a,b,1)};ia.subtract=function(a,b){return $b(this,a,b,-1)};ia.as=function(a){if(!this.isValid())return NaN;var b,c=this._milliseconds;a=H(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);}};ia.asMilliseconds=Hc;ia.asSeconds=Ic;ia.asMinutes=Jc;ia.asHours=Kc;ia.asDays=Lc;ia.asWeeks=Mc;ia.asMonths=Nc;ia.asYears=Oc;ia.valueOf=
function(){return this.isValid()?this._milliseconds+864E5*this._days+this._months%12*2592E6+31536E6*x(this._months/12):NaN};ia._bubble=function(){var a=this._milliseconds,b=this._days,c=this._months,e=this._data;0<=a&&0<=b&&0<=c||0>=a&&0>=b&&0>=c||(a+=864E5*ac(146097*c/4800+b),c=b=0);e.milliseconds=a%1E3;a=q(a/1E3);e.seconds=a%60;a=q(a/60);e.minutes=a%60;a=q(a/60);e.hours=a%24;b+=q(a/24);a=q(4800*b/146097);c+=a;b-=ac(146097*a/4800);a=q(c/12);e.days=b;e.months=c%12;e.years=a;return this};ia.clone=
function(){return Qa(this)};ia.get=function(a){a=H(a);return this.isValid()?this[a+"s"]():NaN};ia.milliseconds=Pc;ia.seconds=Qc;ia.minutes=Rc;ia.hours=Sc;ia.days=Tc;ia.weeks=function(){return q(this.days()/7)};ia.months=Uc;ia.years=Vc;ia.humanize=function(a){if(!this.isValid())return this.localeData().invalidDate();var b=this.localeData(),c;c=!a;var e=Qa(this).abs(),d=eb(e.as("s")),h=eb(e.as("m")),f=eb(e.as("h")),q=eb(e.as("d")),g=eb(e.as("M")),e=eb(e.as("y")),d=d<=Va.ss&&["s",d]||d<Va.s&&["ss",d]||
1>=h&&["m"]||h<Va.m&&["mm",h]||1>=f&&["h"]||f<Va.h&&["hh",f]||1>=q&&["d"]||q<Va.d&&["dd",q]||1>=g&&["M"]||g<Va.M&&["MM",g]||1>=e&&["y"]||["yy",e];d[2]=c;d[3]=0<+this;d[4]=b;c=wc.apply(null,d);a&&(c=b.pastFuture(+this,c));return b.postformat(c)};ia.toISOString=ub;ia.toString=ub;ia.toJSON=ub;ia.locale=Ob;ia.localeData=Pb;ia.toIsoString=y("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ub);ia.lang=ic;F("X",0,0,"unix");F("x",0,0,"valueOf");G("x",yb);G("X",/[+-]?\d+(\.\d{1,3})?/);
ca("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))});ca("x",function(a,b,c){c._d=new Date(x(a))});m.version="2.19.2";Qb=I;m.fn=M;m.min=function(){var a=[].slice.call(arguments,0);return na("isBefore",a)};m.max=function(){var a=[].slice.call(arguments,0);return na("isAfter",a)};m.now=function(){return Date.now?Date.now():+new Date};m.utc=b;m.unix=function(a){return I(1E3*a)};m.months=function(a,b){return Zb(a,b,"months")};m.isDate=g;m.locale=Ga;m.invalid=t;m.duration=Qa;m.isMoment=u;m.weekdays=
function(a,b,c){return Hb(a,b,c,"weekdays")};m.parseZone=function(){return I.apply(null,arguments).parseZone()};m.localeData=Ja;m.isDuration=da;m.monthsShort=function(a,b){return Zb(a,b,"monthsShort")};m.weekdaysMin=function(a,b,c){return Hb(a,b,c,"weekdaysMin")};m.defineLocale=Ma;m.updateLocale=function(a,b){if(null!=b){var c,e=Ub;c=Ia(a);null!=c&&(e=c._config);b=B(e,b);c=new R(b);c.parentLocale=za[a];za[a]=c;Ga(a)}else null!=za[a]&&(null!=za[a].parentLocale?za[a]=za[a].parentLocale:null!=za[a]&&
delete za[a]);return za[a]};m.locales=function(){return bc(za)};m.weekdaysShort=function(a,b,c){return Hb(a,b,c,"weekdaysShort")};m.normalizeUnits=H;m.relativeTimeRounding=function(a){return void 0===a?eb:"function"===typeof a?(eb=a,!0):!1};m.relativeTimeThreshold=function(a,b){if(void 0===Va[a])return!1;if(void 0===b)return Va[a];Va[a]=b;"s"===a&&(Va.ss=b-1);return!0};m.calendarFormat=function(a,b){var c=a.diff(b,"days",!0);return-6>c?"sameElse":-1>c?"lastWeek":0>c?"lastDay":1>c?"sameDay":2>c?"nextDay":
7>c?"nextWeek":"sameElse"};m.prototype=M;return m})},"esri/arcade/ImmutableArray":function(){define(["require","exports"],function(m,l){return function(){function a(a){void 0===a&&(a=[]);this._elements=a}a.prototype.length=function(){return this._elements.length};a.prototype.get=function(a){return this._elements[a]};a.prototype.toArray=function(){for(var a=[],k=0;k<this.length();k++)a.push(this.get(k));return a};return a}()})},"esri/arcade/ImmutablePointArray":function(){define("require exports ../core/tsSupport/extendsHelper ./ImmutableArray ../geometry/Point ../kernel".split(" "),
function(m,l,a,f,k,n){var g=0===n.version.indexOf("4.");return function(f){function d(a,b,e,d,g,r){a=f.call(this,a)||this;a._lazyPt=[];a._hasZ=!1;a._hasM=!1;a._spRef=b;a._hasZ=e;a._hasM=d;a._cacheId=g;a._partId=r;return a}a(d,f);d.prototype.get=function(a){if(void 0===this._lazyPt[a]){var b=this._elements[a];if(void 0===b)return;var c=this._hasZ,d=this._hasM,f=null,f=c&&!d?new k(b[0],b[1],b[2],void 0,this._spRef):d&&c?new k(b[0],b[1],void 0,b[2],this._spRef):c&&d?new k(b[0],b[1],b[2],b[3],this._spRef):
new k(b[0],b[1],this._spRef);g?f.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString():f.setCacheValue("_arcadeCacheId",this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString());this._lazyPt[a]=f}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}(f)})},
"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,a){l.__proto__=a}||function(l,a){for(var f in a)a.hasOwnProperty(f)&&(l[f]=a[f])};return function(l,a){function f(){this.constructor=l}m(l,a);l.prototype=null===a?Object.create(a):(f.prototype=a.prototype,new f)}}()})},"esri/arcade/ImmutablePathArray":function(){define(["require","exports","../core/tsSupport/extendsHelper","./ImmutableArray",
"./ImmutablePointArray"],function(m,l,a,f,k){return function(f){function g(a,d,c,b,e){a=f.call(this,a)||this;a._lazyPath=[];a._hasZ=!1;a._hasM=!1;a._hasZ=c;a._hasM=b;a._spRef=d;a._cacheId=e;return a}a(g,f);g.prototype.get=function(a){if(void 0===this._lazyPath[a]){var d=this._elements[a];if(void 0===d)return;this._lazyPath[a]=new k(d,this._spRef,this._hasZ,this._hasM,this._cacheId,a)}return this._lazyPath[a]};g.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof g?!1:
a.getUniqueHash()===this.getUniqueHash()};g.prototype.getUniqueHash=function(){return this._cacheId.toString()};return g}(f)})},"esri/geometry/Polyline":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ./Point ./Extent ../srUtils".split(" "),function(m,l,a,f,k,n,g,p,d,c,b){var e={type:"polyline",paths:null};m=m(p,{declaredClass:"esri.geometry.Polyline",constructor:function(c){a.mixin(this,e);this.paths=[];this._path=0;
c&&(a.isArray(c)?this.paths=a.isArray(c[0][0])?c:[c]:c.paths?a.mixin(this,c):this.spatialReference=c,this.spatialReference&&(this.spatialReference=b.createSpatialReference(this.spatialReference)));this.verifySR()},addPath:function(b){this.clearCache();this._path=this.paths.length;this.paths[this._path]=[];a.isArray(b[0])?l.forEach(b,this._addPointArr,this):l.forEach(b,this._addPoint,this);return this},_addPointArr:function(a){this.paths[this._path].push(a)},_addPoint:function(a){this.paths[this._path].push([a.x,
a.y])},_insertPoints:function(a,b){this.clearCache();this._path=b;this.paths[this._path]||(this.paths[this._path]=[]);l.forEach(a,this._addPoint,this)},_validateInputs:function(a,b){return null!==a&&void 0!==a&&(0>a||a>=this.paths.length)||null!==b&&void 0!==a&&(0>b||b>=this.paths[a].length)?!1:!0},getPoint:function(a,b){if(this._validateInputs(a,b))return new d(this.paths[a][b],this.spatialReference)},setPoint:function(a,b,c){if(this._validateInputs(a,b))return this.clearCache(),this.paths[a][b]=
[c.x,c.y],this},insertPoint:function(a,b,c){if(this._validateInputs(a)&&n.isDefined(b)&&0<=b&&b<=this.paths[a].length)return this.clearCache(),this.paths[a].splice(b,0,[c.x,c.y]),this},removePath:function(a){if(this._validateInputs(a,null)){this.clearCache();a=this.paths.splice(a,1)[0];var b,c=a.length,e=this.spatialReference;for(b=0;b<c;b++)a[b]=new d(a[b],e);return a}},removePoint:function(a,b){if(this._validateInputs(a,b))return this.clearCache(),new d(this.paths[a].splice(b,1)[0],this.spatialReference)},
getExtent:function(){var a;a=this.getCacheValue("_extent");var b=this.getCacheValue("_partwise");if(a)return a=new c(a),a._partwise=b,a;a=this.paths;var e=a.length;if(e&&a[0].length){var d,f,q,g,v,k,n,p,l=g=a[0][0][0],m=v=a[0][0][1],R=Math.min,D=Math.max,H=this.spatialReference,b=[],O,Y,T,F;for(k=0;k<e;k++){d=a[k];O=Y=d[0]&&d[0][0];T=F=d[0]&&d[0][1];p=d.length;for(n=0;n<p;n++)f=d[n],q=f[0],f=f[1],l=R(l,q),m=R(m,f),g=D(g,q),v=D(v,f),O=R(O,q),T=R(T,f),Y=D(Y,q),F=D(F,f);b.push(new c({xmin:O,ymin:T,xmax:Y,
ymax:F,spatialReference:H?H.toJson():null}))}a={xmin:l,ymin:m,xmax:g,ymax:v,spatialReference:H?H.toJson():null};b=1<b.length?b:null;this.setCacheValue("_extent",a);this.setCacheValue("_partwise",b);a=new c(a);a._partwise=b;return a}},toJson:function(){var b={paths:a.clone(this.paths)},c=this.spatialReference;c&&(b.spatialReference=c.toJson());return b}});m.defaultProps=e;f("extend-esri")&&(a.setObject("geometry.Polyline",m,k),k.geometry.defaultPolyline=e);return m})},"esri/geometry/Polygon":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../SpatialReference ./Geometry ./Point ./Extent ./mathUtils ../srUtils".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e){var h={type:"polygon",rings:null},t=m(p,{declaredClass:"esri.geometry.Polygon",constructor:function(b){a.mixin(this,h);this.rings=[];this._ring=0;b&&(a.isArray(b)?this.rings=a.isArray(b[0][0])?b:[b]:b.rings?a.mixin(this,b):this.spatialReference=b,this.spatialReference&&(this.spatialReference=e.createSpatialReference(this.spatialReference)));this.verifySR()},addRing:function(b){this.clearCache();this._ring=this.rings.length;this.rings[this._ring]=[];a.isArray(b[0])?
l.forEach(b,this._addPointArr,this):l.forEach(b,this._addPoint,this);return this},_addPointArr:function(a){this.rings[this._ring].push(a)},_addPoint:function(a){this.rings[this._ring].push([a.x,a.y])},_insertPoints:function(a,b){this.clearCache();this._ring=b;this.rings[this._ring]||(this.rings[this._ring]=[]);l.forEach(a,this._addPoint,this)},_validateInputs:function(a,b){return null!==a&&void 0!==a&&(0>a||a>=this.rings.length)||null!==b&&void 0!==a&&(0>b||b>=this.rings[a].length)?!1:!0},getPoint:function(a,
b){if(this._validateInputs(a,b))return new d(this.rings[a][b],this.spatialReference)},setPoint:function(a,b,c){if(this._validateInputs(a,b))return this.clearCache(),this.rings[a][b]=[c.x,c.y],this},insertPoint:function(a,b,c){if(this._validateInputs(a)&&n.isDefined(b)&&0<=b&&b<=this.rings[a].length)return this.clearCache(),this.rings[a].splice(b,0,[c.x,c.y]),this},removeRing:function(a){if(this._validateInputs(a,null)){this.clearCache();a=this.rings.splice(a,1)[0];var b,c=a.length,e=this.spatialReference;
for(b=0;b<c;b++)a[b]=new d(a[b],e);return a}},removePoint:function(a,b){if(this._validateInputs(a,b))return this.clearCache(),new d(this.rings[a].splice(b,1)[0],this.spatialReference)},getExtent:function(){var a;a=this.getCacheValue("_extent");var b=this.getCacheValue("_partwise");if(a)return a=new c(a),a._partwise=b,a;a=this.rings;var e=a.length;if(e&&a[0].length){var d,h,f,g,k,t,n,p,l=g=a[0][0][0],m=k=a[0][0][1],H=Math.min,O=Math.max,Y=this.spatialReference,b=[],T,F,S,K;for(t=0;t<e;t++){d=a[t];
T=F=d[0]&&d[0][0];S=K=d[0]&&d[0][1];p=d.length;for(n=0;n<p;n++)h=d[n],f=h[0],h=h[1],l=H(l,f),m=H(m,h),g=O(g,f),k=O(k,h),T=H(T,f),S=H(S,h),F=O(F,f),K=O(K,h);b.push(new c({xmin:T,ymin:S,xmax:F,ymax:K,spatialReference:Y?Y.toJson():null}))}a={xmin:l,ymin:m,xmax:g,ymax:k,spatialReference:Y?Y.toJson():null};b=1<b.length?b:null;this.setCacheValue("_extent",a);this.setCacheValue("_partwise",b);a=new c(a);a._partwise=b;return a}},contains:function(a){var b=this.rings,c,e=!1,h,f,g,r,k,t,n=b.length;c=this.spatialReference;
h=a.spatialReference;var p=a.x;a=a.y;c&&h&&!c.equals(h)&&c._canProject(h)&&(a=c.isWebMercator()?d.lngLatToXY(p,a):d.xyToLngLat(p,a,!0),p=a[0],a=a[1]);for(t=0;t<n;t++)for(c=b[t],g=c.length,k=r=0;k<g;k++)r++,r===g&&(r=0),h=c[k],f=c[r],(h[1]<a&&f[1]>=a||f[1]<a&&h[1]>=a)&&h[0]+(a-h[1])/(f[1]-h[1])*(f[0]-h[0])<p&&(e=!e);return e},getCentroid:function(){var a=this.getCacheValue("_centroid");if(void 0!==a)return a;var a=this.rings,b,c,e,h,f=[],g,k,t=Infinity,n=-Infinity,p=Infinity,m=-Infinity;l.forEach(a,
function(a){b=c=e=0;l.forEach(a,function(d,h){h<a.length-1&&(g=a[h+1],k=d[0]*g[1]-g[0]*d[1],b+=(d[0]+g[0])*k,c+=(d[1]+g[1])*k,e+=k,d[0]<t&&(t=d[0]),d[0]>n&&(n=d[0]),d[1]<p&&(p=d[1]),d[1]>m&&(m=d[1]))});0<e&&(e*=-1);e&&f.push([b,c,e/2])});f.sort(function(a,b){return a[2]-b[2]});b=c=void 0;f[0]&&(h=6*f[0][2],b=f[0][0]/h,c=f[0][1]/h,b<t||b>n||c<p||c>m)&&(b=c=void 0);if(void 0===b||void 0===c)if(a=a[0]&&a[0].length?this._getLineCentroid(a[0]):null)b=a.x,c=a.y;a=isNaN(b)||isNaN(c)?null:new d(b,c,this.spatialReference);
this.setCacheValue("_centroid",a);return a},_getLineCentroid:function(a){var c,e=0,d=0,h=0,f,g,r={x:0,y:0},k={x:0,y:0},t,n=a.length,p;for(t=0;t<n-1;t++)f=a[t],g=a[t+1],f&&g&&(r.x=f[0],r.y=f[1],k.x=g[0],k.y=g[1],c=b.getLength(r,k),0<c&&(e+=c,f=b.getMidpoint(f,g),d+=c*f[0],h+=c*f[1]));0<e?p={x:d/e,y:h/e}:a[0]&&(p={x:a[0][0],y:a[0][1]});return p},isClockwise:function(b){var c=0,e,d=b.length,h=a.isArray(b[0])?function(a,b){return a[0]*b[1]-b[0]*a[1]}:function(a,b){return a.x*b.y-b.x*a.y};for(e=0;e<d;e++)c+=
h(b[e],b[(e+1)%d]);return 0>=c/2},isSelfIntersecting:function(a){a=a||this;var c,e,d,h,f,g,r,k=a.rings.length,t;for(d=0;d<k;d++){for(c=0;c<a.rings[d].length-1;c++)for(f=[[a.rings[d][c][0],a.rings[d][c][1]],[a.rings[d][c+1][0],a.rings[d][c+1][1]]],e=d+1;e<k;e++)for(h=0;h<a.rings[e].length-1;h++)if(g=[[a.rings[e][h][0],a.rings[e][h][1]],[a.rings[e][h+1][0],a.rings[e][h+1][1]]],(r=b._getLineIntersection2(f,g))&&!(r[0]===f[0][0]&&r[1]===f[0][1]||r[0]===g[0][0]&&r[1]===g[0][1]||r[0]===f[1][0]&&r[1]===
f[1][1]||r[0]===g[1][0]&&r[1]===g[1][1]))return!0;h=a.rings[d].length;if(!(4>=h))for(c=0;c<h-3;c++)for(t=h-1,0===c&&(t=h-2),f=[[a.rings[d][c][0],a.rings[d][c][1]],[a.rings[d][c+1][0],a.rings[d][c+1][1]]],e=c+2;e<t;e++)if(g=[[a.rings[d][e][0],a.rings[d][e][1]],[a.rings[d][e+1][0],a.rings[d][e+1][1]]],(r=b._getLineIntersection2(f,g))&&!(r[0]===f[0][0]&&r[1]===f[0][1]||r[0]===g[0][0]&&r[1]===g[0][1]||r[0]===f[1][0]&&r[1]===f[1][1]||r[0]===g[1][0]&&r[1]===g[1][1]))return!0}return!1},toJson:function(){var b=
{rings:a.clone(this.rings)},c=this.spatialReference;c&&(b.spatialReference=c.toJson());return b}});t.defaultProps=h;t.createEllipse=function(a){var b=a.center.x,c=a.center.y,e=a.longAxis,d=a.shortAxis,h=a.numberOfPoints,f=a.map,g,r,k;a=[];var n=2*Math.PI/h;for(r=0;r<h;r++)g=Math.cos(r*n),k=Math.sin(r*n),g=f.toMap({x:e*g+b,y:d*k+c}),a.push(g);a.push(a[0]);b=new t(f.spatialReference);b.addRing(a);return b};t.createCircle=function(a){return t.createEllipse({center:a.center,longAxis:a.r,shortAxis:a.r,
numberOfPoints:a.numberOfPoints,map:a.map})};t.fromExtent=function(a){var b=a.normalize();a=a.spatialReference;return new t({rings:l.map(b,function(a){return[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]}),spatialReference:a?a.toJson():null})};f("extend-esri")&&(a.setObject("geometry.Polygon",t,k),k.geometry.defaultPolygon=h,k.geometry.createEllipse=t.createEllipse,k.geometry.createCircle=t.createCircle,k.geometry.isClockwise=t.prototype.isClockwise,k.geometry.polygonSelfIntersecting=
t.prototype.isSelfIntersecting);return t})},"esri/geometry/Multipoint":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../SpatialReference ./Geometry ./Point ./Extent ../srUtils".split(" "),function(m,l,a,f,k,n,g,p,d){var c={type:"multipoint",points:null};m=m(n,{declaredClass:"esri.geometry.Multipoint",constructor:function(a){l.mixin(this,c);this.points=[];a&&(a.points?l.mixin(this,a):this.spatialReference=a,this.spatialReference&&(this.spatialReference=d.createSpatialReference(this.spatialReference)));
this.verifySR()},addPoint:function(a){this.clearCache();l.isArray(a)?this.points.push(a):this.points.push([a.x,a.y]);return this},removePoint:function(a){if(this._validateInputs(a))return this.clearCache(),new g(this.points.splice(a,1)[0],this.spatialReference)},getExtent:function(){var a=this.getCacheValue("_extent");if(a)return new p(a);var a=this.points,c=a.length;if(c){var d=a[0],f,g,k=f=d[0],n=g=d[1],q=Math.min,x=Math.max,v=this.spatialReference,l,m;for(m=0;m<c;m++)d=a[m],l=d[0],d=d[1],k=q(k,
l),n=q(n,d),f=x(f,l),g=x(g,d);a={xmin:k,ymin:n,xmax:f,ymax:g,spatialReference:v?v.toJson():null};this.setCacheValue("_extent",a);return new p(a)}},_validateInputs:function(a){return null===a||0>a||a>=this.points.length?!1:!0},getPoint:function(a){if(this._validateInputs(a))return a=this.points[a],new g(a[0],a[1],this.spatialReference)},setPoint:function(a,c){if(this._validateInputs(a))return this.clearCache(),this.points[a]=[c.x,c.y],this},toJson:function(){var a={points:l.clone(this.points)},c=this.spatialReference;
c&&(a.spatialReference=c.toJson());return a}});m.defaultProps=c;a("extend-esri")&&(l.setObject("geometry.Multipoint",m,f),f.geometry.defaultMultipoint=c);return m})},"esri/arcade/FunctionWrapper":function(){define(["require","exports"],function(m,l){return function(){return function(a,f){this.context=this.definition=null;this.definition=a;this.context=f}}()})},"esri/geometry/ScreenPoint":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","./Point"],function(m,l,a,f,k){m=
m(k,{declaredClass:"esri.geometry.ScreenPoint",verifySR:function(){}});a("extend-esri")&&l.setObject("geometry.ScreenPoint",m,f);return m})},"esri/geometry/Rect":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../SpatialReference ./Geometry ./Point ./Extent ../srUtils".split(" "),function(m,l,a,f,k,n,g,p,d,c){function b(a){return new d(parseFloat(a.x),parseFloat(a.y)-parseFloat(a.height),parseFloat(a.x)+parseFloat(a.width),parseFloat(a.y),a.spatialReference)}
var e=m(g,{declaredClass:"esri.geometry.Rect",constructor:function(a,b,e,d,g){l.mixin(this,f.defaultRect);l.isObject(a)&&"extent"===a.type&&(b=a.ymax,e=a.getWidth(),d=a.getHeight(),g=a.spatialReference,a=a.xmin);l.isObject(a)?(l.mixin(this,a),this.spatialReference&&(this.spatialReference=c.createSpatialReference(this.spatialReference))):(this.x=a,this.y=b,this.width=e,this.height=d,this.spatialReference=g);this.verifySR()},getCenter:function(){return new p(this.x+this.width/2,this.y+this.height/2,
this.spatialReference)},offset:function(a,b){return new e(this.x+a,this.y+b,this.width,this.height,this.spatialReference)},intersects:function(a){return a.x+a.width<=this.x||a.y+a.height<=this.y||a.y>=this.y+this.height||a.x>=this.x+this.width?!1:!0},getExtent:function(){return b(this)},update:function(a,b,c,e,d){this.x=a;this.y=b;this.width=c;this.height=e;this.spatialReference=d;this.clearCache();return this}});a("extend-esri")&&(l.setObject("geometry.Rect",e,k),k.geometry._rectToExtent=b,k.geometry._extentToRect=
function(a){return new e(a)});return e})},"esri/geometry/scaleUtils":function(){define("dojo/_base/lang dojo/has ../kernel ../config ../lang ../WKIDUnitConversion".split(" "),function(m,l,a,f,k,n){function g(a,b,e){return a&&b?a.getWidth()/b*(e||d)*39.37*c.screenDPI:0}function p(a,e,f,g,k){return a.expand(g*e/(39.37*((k?f:b.values[b[f]])||d)*c.screenDPI)/a.getWidth())}var d=6370997*Math.PI/180,c=f.defaults,b=n,e={getUnitValueForSR:function(a){return this.getUnitValue(a)||d},getUnitValue:function(a){var c,
e,d;a&&("object"===typeof a?(c=a.wkid,e=a.wkt):"number"===typeof a?c=a:"string"===typeof a&&(e=a));c?d=b.values[b[c]]:e&&-1!==e.search(/^PROJCS/i)&&(a=/UNIT\[([^\]]+)\]\]$/i.exec(e))&&a[1]&&(d=parseFloat(a[1].split(",")[1]));return d},getScale:function(a,b,c){var d,h,f;1<arguments.length&&k.isDefined(b)&&!b.declaredClass?(d=a,h=b,b=null,f=e.getUnitValue(c)):(d=b||a.extent,h=a.width,f=e.getUnitValue(d&&d.spatialReference));return g(d,h,f)},getExtentForScale:function(a,b,c){return p(c||a.extent,a.width,
e.getUnitValue(a.spatialReference),b,!0)}};l("extend-esri")&&(m.mixin(m.getObject("geometry",!0,a),e),a.geometry._getScale=g,a.geometry._getExtentForScale=p);return e})},"esri/WKIDUnitConversion":function(){define(["dojo/has","./kernel"],function(m,l){var a,f={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,7142:0,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,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8058:0,8059:0,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,
8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,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(a=2E3;2045>=a;a++)f[a]=0;for(a=2056;2065>=a;a++)f[a]=0;for(a=2067;2135>=a;a++)f[a]=0;for(a=2137;2154>=a;a++)f[a]=0;for(a=2161;2170>=a;a++)f[a]=0;for(a=2172;2193>=a;a++)f[a]=0;for(a=2195;2198>=a;a++)f[a]=0;for(a=2200;2203>=a;a++)f[a]=0;for(a=2205;2217>=a;a++)f[a]=0;for(a=2222;2224>=a;a++)f[a]=1;for(a=2225;2250>=a;a++)f[a]=2;
for(a=2251;2253>=a;a++)f[a]=1;for(a=2257;2264>=a;a++)f[a]=2;for(a=2274;2279>=a;a++)f[a]=2;for(a=2280;2282>=a;a++)f[a]=1;for(a=2283;2289>=a;a++)f[a]=2;for(a=2290;2292>=a;a++)f[a]=0;for(a=2308;2313>=a;a++)f[a]=0;for(a=2315;2491>=a;a++)f[a]=0;for(a=2494;2866>=a;a++)f[a]=0;for(a=2867;2869>=a;a++)f[a]=1;for(a=2870;2888>=a;a++)f[a]=2;for(a=2891;2895>=a;a++)f[a]=2;for(a=2896;2898>=a;a++)f[a]=1;for(a=2902;2908>=a;a++)f[a]=2;for(a=2915;2920>=a;a++)f[a]=2;for(a=2921;2923>=a;a++)f[a]=1;for(a=2924;2930>=a;a++)f[a]=
2;for(a=2931;2962>=a;a++)f[a]=0;for(a=2964;2968>=a;a++)f[a]=2;for(a=2969;2973>=a;a++)f[a]=0;for(a=2975;2991>=a;a++)f[a]=0;for(a=2995;3051>=a;a++)f[a]=0;for(a=3054;3079>=a;a++)f[a]=0;for(a=3081;3088>=a;a++)f[a]=0;for(a=3092;3101>=a;a++)f[a]=0;for(a=3106;3138>=a;a++)f[a]=0;for(a=3146;3151>=a;a++)f[a]=0;for(a=3153;3166>=a;a++)f[a]=0;for(a=3168;3172>=a;a++)f[a]=0;for(a=3174;3203>=a;a++)f[a]=0;for(a=3294;3358>=a;a++)f[a]=0;for(a=3367;3403>=a;a++)f[a]=0;for(a=3408;3416>=a;a++)f[a]=0;for(a=3417;3438>=a;a++)f[a]=
2;for(a=3441;3446>=a;a++)f[a]=2;for(a=3447;3450>=a;a++)f[a]=0;for(a=3451;3459>=a;a++)f[a]=2;for(a=3460;3478>=a;a++)f[a]=0;for(a=3554;3559>=a;a++)f[a]=0;for(a=3560;3570>=a;a++)f[a]=2;for(a=3571;3581>=a;a++)f[a]=0;for(a=3594;3597>=a;a++)f[a]=0;for(a=3601;3604>=a;a++)f[a]=0;for(a=3637;3639>=a;a++)f[a]=0;for(a=3665;3667>=a;a++)f[a]=0;for(a=3693;3695>=a;a++)f[a]=0;for(a=3701;3727>=a;a++)f[a]=0;for(a=3728;3739>=a;a++)f[a]=2;for(a=3740;3751>=a;a++)f[a]=0;for(a=3753;3760>=a;a++)f[a]=2;for(a=3761;3773>=a;a++)f[a]=
0;for(a=3775;3777>=a;a++)f[a]=0;for(a=3779;3781>=a;a++)f[a]=0;for(a=3783;3785>=a;a++)f[a]=0;for(a=3788;3791>=a;a++)f[a]=0;for(a=3797;3802>=a;a++)f[a]=0;for(a=3814;3816>=a;a++)f[a]=0;for(a=3825;3829>=a;a++)f[a]=0;for(a=3832;3841>=a;a++)f[a]=0;for(a=3844;3852>=a;a++)f[a]=0;for(a=3873;3885>=a;a++)f[a]=0;for(a=3890;3893>=a;a++)f[a]=0;for(a=3907;3912>=a;a++)f[a]=0;for(a=3942;3950>=a;a++)f[a]=0;for(a=3968;3970>=a;a++)f[a]=0;for(a=3973;3976>=a;a++)f[a]=0;for(a=3986;3989>=a;a++)f[a]=0;for(a=3994;3997>=a;a++)f[a]=
0;for(a=4048;4051>=a;a++)f[a]=0;for(a=4056;4063>=a;a++)f[a]=0;for(a=4093;4096>=a;a++)f[a]=0;for(a=4390;4398>=a;a++)f[a]=0;for(a=4399;4413>=a;a++)f[a]=2;for(a=4418;4433>=a;a++)f[a]=2;for(a=4455;4457>=a;a++)f[a]=2;for(a=4484;4489>=a;a++)f[a]=0;for(a=4491;4554>=a;a++)f[a]=0;for(a=4568;4589>=a;a++)f[a]=0;for(a=4652;4656>=a;a++)f[a]=0;for(a=4766;4800>=a;a++)f[a]=0;for(a=5014;5016>=a;a++)f[a]=0;for(a=5069;5072>=a;a++)f[a]=0;for(a=5105;5130>=a;a++)f[a]=0;for(a=5173;5188>=a;a++)f[a]=0;for(a=5253;5259>=a;a++)f[a]=
0;for(a=5269;5275>=a;a++)f[a]=0;for(a=5292;5311>=a;a++)f[a]=0;for(a=5329;5331>=a;a++)f[a]=0;for(a=5343;5349>=a;a++)f[a]=0;for(a=5355;5357>=a;a++)f[a]=0;for(a=5387;5389>=a;a++)f[a]=0;for(a=5459;5463>=a;a++)f[a]=0;for(a=5479;5482>=a;a++)f[a]=0;for(a=5518;5520>=a;a++)f[a]=0;for(a=5530;5539>=a;a++)f[a]=0;for(a=5550;5552>=a;a++)f[a]=0;for(a=5562;5583>=a;a++)f[a]=0;for(a=5623;5625>=a;a++)f[a]=2;for(a=5631;5639>=a;a++)f[a]=0;for(a=5649;5653>=a;a++)f[a]=0;for(a=5663;5680>=a;a++)f[a]=0;for(a=5682;5685>=a;a++)f[a]=
0;for(a=5875;5877>=a;a++)f[a]=0;for(a=5921;5940>=a;a++)f[a]=0;for(a=6050;6125>=a;a++)f[a]=0;for(a=6244;6275>=a;a++)f[a]=0;for(a=6328;6348>=a;a++)f[a]=0;for(a=6350;6356>=a;a++)f[a]=0;for(a=6366;6372>=a;a++)f[a]=0;for(a=6381;6387>=a;a++)f[a]=0;for(a=6393;6404>=a;a++)f[a]=0;for(a=6480;6483>=a;a++)f[a]=0;for(a=6511;6514>=a;a++)f[a]=0;for(a=6579;6581>=a;a++)f[a]=0;for(a=6619;6624>=a;a++)f[a]=0;for(a=6625;6627>=a;a++)f[a]=2;for(a=6628;6632>=a;a++)f[a]=0;for(a=6634;6637>=a;a++)f[a]=0;for(a=6669;6692>=a;a++)f[a]=
0;for(a=6707;6709>=a;a++)f[a]=0;for(a=6720;6723>=a;a++)f[a]=0;for(a=6732;6738>=a;a++)f[a]=0;for(a=6931;6933>=a;a++)f[a]=0;for(a=6956;6959>=a;a++)f[a]=0;for(a=7005;7007>=a;a++)f[a]=0;for(a=7057;7070>=a;a++)f[a]=2;for(a=7074;7082>=a;a++)f[a]=0;for(a=7109;7118>=a;a++)f[a]=0;for(a=7119;7127>=a;a++)f[a]=1;for(a=7374;7376>=a;a++)f[a]=0;for(a=7528;7586>=a;a++)f[a]=0;for(a=7587;7645>=a;a++)f[a]=2;for(a=7755;7787>=a;a++)f[a]=0;for(a=7791;7795>=a;a++)f[a]=0;for(a=7799;7801>=a;a++)f[a]=0;for(a=7803;7805>=a;a++)f[a]=
0;for(a=7825;7831>=a;a++)f[a]=0;for(a=7845;7859>=a;a++)f[a]=0;for(a=8013;8032>=a;a++)f[a]=0;for(a=20002;20032>=a;a++)f[a]=0;for(a=20062;20092>=a;a++)f[a]=0;for(a=20135;20138>=a;a++)f[a]=0;for(a=20248;20258>=a;a++)f[a]=0;for(a=20348;20358>=a;a++)f[a]=0;for(a=20436;20440>=a;a++)f[a]=0;for(a=20822;20824>=a;a++)f[a]=0;for(a=20934;20936>=a;a++)f[a]=0;for(a=21035;21037>=a;a++)f[a]=0;for(a=21095;21097>=a;a++)f[a]=0;for(a=21148;21150>=a;a++)f[a]=0;for(a=21413;21423>=a;a++)f[a]=0;for(a=21473;21483>=a;a++)f[a]=
0;for(a=21780;21782>=a;a++)f[a]=0;for(a=21891;21894>=a;a++)f[a]=0;for(a=21896;21899>=a;a++)f[a]=0;for(a=22171;22177>=a;a++)f[a]=0;for(a=22181;22187>=a;a++)f[a]=0;for(a=22191;22197>=a;a++)f[a]=0;for(a=22234;22236>=a;a++)f[a]=0;for(a=22521;22525>=a;a++)f[a]=0;for(a=22991;22994>=a;a++)f[a]=0;for(a=23028;23038>=a;a++)f[a]=0;for(a=23830;23853>=a;a++)f[a]=0;for(a=23866;23872>=a;a++)f[a]=0;for(a=23877;23884>=a;a++)f[a]=0;for(a=23886;23894>=a;a++)f[a]=0;for(a=23946;23948>=a;a++)f[a]=0;for(a=24311;24313>=
a;a++)f[a]=0;for(a=24342;24347>=a;a++)f[a]=0;for(a=24370;24374>=a;a++)f[a]=10;for(a=24375;24381>=a;a++)f[a]=0;for(a=24718;24721>=a;a++)f[a]=0;for(a=24817;24821>=a;a++)f[a]=0;for(a=24877;24882>=a;a++)f[a]=0;for(a=24891;24893>=a;a++)f[a]=0;for(a=25391;25395>=a;a++)f[a]=0;for(a=25828;25838>=a;a++)f[a]=0;for(a=26191;26195>=a;a++)f[a]=0;for(a=26391;26393>=a;a++)f[a]=0;for(a=26701;26722>=a;a++)f[a]=0;for(a=26729;26799>=a;a++)f[a]=2;for(a=26801;26803>=a;a++)f[a]=2;for(a=26811;26813>=a;a++)f[a]=2;for(a=26847;26870>=
a;a++)f[a]=2;for(a=26891;26899>=a;a++)f[a]=0;for(a=26901;26923>=a;a++)f[a]=0;for(a=26929;26946>=a;a++)f[a]=0;for(a=26948;26998>=a;a++)f[a]=0;for(a=27037;27040>=a;a++)f[a]=0;for(a=27205;27232>=a;a++)f[a]=0;for(a=27258;27260>=a;a++)f[a]=0;for(a=27391;27398>=a;a++)f[a]=0;for(a=27561;27564>=a;a++)f[a]=0;for(a=27571;27574>=a;a++)f[a]=0;for(a=27581;27584>=a;a++)f[a]=0;for(a=27591;27594>=a;a++)f[a]=0;for(a=28191;28193>=a;a++)f[a]=0;for(a=28348;28358>=a;a++)f[a]=0;for(a=28402;28432>=a;a++)f[a]=0;for(a=28462;28492>=
a;a++)f[a]=0;for(a=29118;29122>=a;a++)f[a]=0;for(a=29168;29172>=a;a++)f[a]=0;for(a=29177;29185>=a;a++)f[a]=0;for(a=29187;29195>=a;a++)f[a]=0;for(a=29900;29903>=a;a++)f[a]=0;for(a=30161;30179>=a;a++)f[a]=0;for(a=30491;30494>=a;a++)f[a]=0;for(a=30729;30732>=a;a++)f[a]=0;for(a=31251;31259>=a;a++)f[a]=0;for(a=31265;31268>=a;a++)f[a]=0;for(a=31275;31279>=a;a++)f[a]=0;for(a=31281;31297>=a;a++)f[a]=0;for(a=31461;31469>=a;a++)f[a]=0;for(a=31491;31495>=a;a++)f[a]=0;for(a=31917;31922>=a;a++)f[a]=0;for(a=31965;32E3>=
a;a++)f[a]=0;for(a=32001;32003>=a;a++)f[a]=2;for(a=32005;32031>=a;a++)f[a]=2;for(a=32033;32060>=a;a++)f[a]=2;for(a=32064;32067>=a;a++)f[a]=2;for(a=32074;32077>=a;a++)f[a]=2;for(a=32081;32086>=a;a++)f[a]=0;for(a=32107;32130>=a;a++)f[a]=0;for(a=32133;32158>=a;a++)f[a]=0;for(a=32164;32167>=a;a++)f[a]=2;for(a=32180;32199>=a;a++)f[a]=0;for(a=32201;32260>=a;a++)f[a]=0;for(a=32301;32360>=a;a++)f[a]=0;for(a=32601;32662>=a;a++)f[a]=0;for(a=32664;32667>=a;a++)f[a]=2;for(a=32701;32761>=a;a++)f[a]=0;for(a=53001;53004>=
a;a++)f[a]=0;for(a=53008;53019>=a;a++)f[a]=0;for(a=53021;53032>=a;a++)f[a]=0;for(a=53042;53046>=a;a++)f[a]=0;for(a=53074;53080>=a;a++)f[a]=0;for(a=54001;54004>=a;a++)f[a]=0;for(a=54008;54019>=a;a++)f[a]=0;for(a=54021;54032>=a;a++)f[a]=0;for(a=54042;54046>=a;a++)f[a]=0;for(a=54048;54053>=a;a++)f[a]=0;for(a=54074;54080>=a;a++)f[a]=0;for(a=102001;102040>=a;a++)f[a]=0;for(a=102042;102063>=a;a++)f[a]=0;for(a=102065;102067>=a;a++)f[a]=0;for(a=102070;102117>=a;a++)f[a]=0;for(a=102122;102216>=a;a++)f[a]=
0;for(a=102221;102377>=a;a++)f[a]=0;for(a=102382;102388>=a;a++)f[a]=0;for(a=102389;102398>=a;a++)f[a]=2;for(a=102399;102444>=a;a++)f[a]=0;for(a=102445;102447>=a;a++)f[a]=2;for(a=102448;102458>=a;a++)f[a]=0;for(a=102459;102468>=a;a++)f[a]=2;for(a=102469;102496>=a;a++)f[a]=0;for(a=102500;102519>=a;a++)f[a]=1;for(a=102520;102524>=a;a++)f[a]=0;for(a=102525;102529>=a;a++)f[a]=2;for(a=102530;102568>=a;a++)f[a]=0;for(a=102570;102588>=a;a++)f[a]=0;for(a=102590;102598>=a;a++)f[a]=0;for(a=102601;102603>=a;a++)f[a]=
0;for(a=102605;102628>=a;a++)f[a]=0;for(a=102629;102646>=a;a++)f[a]=2;for(a=102648;102700>=a;a++)f[a]=2;for(a=102701;102703>=a;a++)f[a]=0;for(a=102707;102730>=a;a++)f[a]=2;for(a=102733;102758>=a;a++)f[a]=2;for(a=102767;102900>=a;a++)f[a]=0;for(a=102965;102969>=a;a++)f[a]=0;for(a=102971;102973>=a;a++)f[a]=0;for(a=102975;102989>=a;a++)f[a]=0;for(a=102990;102992>=a;a++)f[a]=1;for(a=102997;103002>=a;a++)f[a]=0;for(a=103003;103008>=a;a++)f[a]=2;for(a=103009;103011>=a;a++)f[a]=0;for(a=103012;103014>=a;a++)f[a]=
2;for(a=103019;103021>=a;a++)f[a]=0;for(a=103022;103024>=a;a++)f[a]=2;for(a=103029;103031>=a;a++)f[a]=0;for(a=103032;103034>=a;a++)f[a]=2;for(a=103065;103068>=a;a++)f[a]=0;for(a=103074;103076>=a;a++)f[a]=0;for(a=103077;103079>=a;a++)f[a]=1;for(a=103080;103082>=a;a++)f[a]=0;for(a=103083;103085>=a;a++)f[a]=2;for(a=103090;103093>=a;a++)f[a]=0;for(a=103097;103099>=a;a++)f[a]=0;for(a=103100;103102>=a;a++)f[a]=2;for(a=103107;103109>=a;a++)f[a]=0;for(a=103110;103112>=a;a++)f[a]=2;for(a=103113;103116>=a;a++)f[a]=
0;for(a=103117;103120>=a;a++)f[a]=2;for(a=103153;103157>=a;a++)f[a]=0;for(a=103158;103162>=a;a++)f[a]=2;for(a=103163;103165>=a;a++)f[a]=0;for(a=103166;103168>=a;a++)f[a]=1;for(a=103169;103171>=a;a++)f[a]=2;for(a=103186;103188>=a;a++)f[a]=0;for(a=103189;103191>=a;a++)f[a]=2;for(a=103192;103195>=a;a++)f[a]=0;for(a=103196;103199>=a;a++)f[a]=2;for(a=103200;103224>=a;a++)f[a]=0;for(a=103225;103227>=a;a++)f[a]=1;for(a=103232;103237>=a;a++)f[a]=0;for(a=103238;103243>=a;a++)f[a]=2;for(a=103244;103246>=a;a++)f[a]=
0;for(a=103247;103249>=a;a++)f[a]=2;for(a=103254;103256>=a;a++)f[a]=0;for(a=103257;103259>=a;a++)f[a]=2;for(a=103264;103266>=a;a++)f[a]=0;for(a=103267;103269>=a;a++)f[a]=2;for(a=103300;103375>=a;a++)f[a]=0;for(a=103381;103383>=a;a++)f[a]=0;for(a=103384;103386>=a;a++)f[a]=1;for(a=103387;103389>=a;a++)f[a]=0;for(a=103390;103392>=a;a++)f[a]=2;for(a=103397;103399>=a;a++)f[a]=0;for(a=103400;103471>=a;a++)f[a]=2;for(a=103476;103478>=a;a++)f[a]=0;for(a=103479;103481>=a;a++)f[a]=2;for(a=103486;103488>=a;a++)f[a]=
0;for(a=103489;103491>=a;a++)f[a]=2;for(a=103492;103495>=a;a++)f[a]=0;for(a=103496;103499>=a;a++)f[a]=2;for(a=103528;103543>=a;a++)f[a]=0;for(a=103544;103548>=a;a++)f[a]=2;for(a=103549;103551>=a;a++)f[a]=0;for(a=103552;103554>=a;a++)f[a]=1;for(a=103555;103557>=a;a++)f[a]=2;for(a=103558;103560>=a;a++)f[a]=0;for(a=103571;103573>=a;a++)f[a]=0;for(a=103574;103576>=a;a++)f[a]=2;for(a=103577;103580>=a;a++)f[a]=0;for(a=103581;103583>=a;a++)f[a]=2;for(a=103600;103694>=a;a++)f[a]=0;for(a=103700;103793>=a;a++)f[a]=
2;for(a=103794;103871>=a;a++)f[a]=0;for(a=103900;103971>=a;a++)f[a]=2;m("extend-esri")&&(l.WKIDUnitConversion=f);return f})},"esri/geometry/screenUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/sniff ../kernel ./Point ./ScreenPoint ./Polyline ./Polygon ./Multipoint ./Extent".split(" "),function(m,l,a,f,k,n,g,p,d,c){var b=function(){return 9>a("ie")?function(a,b,c,e,d,f,g,v,k){var h=[],q=Math.round,r,n=g.length,p,t,w,u,x,l;for(r=0;r<n;r++)if(p=g[r],u=v?v(p[0][0],p[0][1],k):p[0],1<(w=
p.length))for(x=q((u[0]-a)*c+d),l=q((b-u[1])*e+f),u=v?v(p[1][0],p[1][1],k):p[1],t=q((u[0]-a)*c+d),u=q((b-u[1])*e+f),h.push("M",x+","+l,"L",t+","+u),t=2;t<w;t++)u=v?v(p[t][0],p[t][1],k):p[t],x=q((u[0]-a)*c+d),l=q((b-u[1])*e+f),h.push(x+","+l);else x=q((u[0]-a)*c+d),l=q((b-u[1])*e+f),h.push("M",x+","+l);return h}:function(a,b,c,e,d,f,g,v,k,n){var h=[],q,r,p,t,w,u,x=Math.round;q=0;for(p=g?g.length:0;q<p;q++){w=g[q];h.push("M");r=0;for(t=w?w.length:0;r<t;r++)u=v?v(w[r][0],w[r][1],k):w[r],h.push(x((u[0]-
a)*c+d)+","+x((b-u[1])*e+f));n||h.push("Z")}return h}}(),e={toScreenPoint:function(a,b,c,e,d){var h=a.spatialReference,f=e.spatialReference,g=e.x;e=e.y;h&&f&&!h.equals(f)&&h._canProject(f)&&(h=h.isWebMercator()?k.lngLatToXY(g,e):k.xyToLngLat(g,e,!0),g=h[0],e=h[1]);g=(g-a.xmin)*(b/a.getWidth());e=(a.ymax-e)*(c/a.getHeight());d||(g=Math.round(g),e=Math.round(e));return new n(g,e)},toScreenGeometry:function(a,b,e,f){var h=a.xmin,q=a.ymax,r=b/a.getWidth(),v=e/a.getHeight(),n=m.forEach,t=Math.round;if(f instanceof
k)return new k(t((f.x-h)*r),t((q-f.y)*v));if(f instanceof d){a=new d;var w=a.points;n(f.points,function(a,b){w[b]=[t((a[0]-h)*r),t((q-a[1])*v)]});return a}if(f instanceof c)return new c(t((f.xmin-h)*r),t((q-f.ymin)*v),t((f.xmax-h)*r),t((q-f.ymax)*r));if(f instanceof g){a=new g;var l=a.paths,B;n(f.paths,function(a,b){B=l[b]=[];n(a,function(a,b){B[b]=[t((a[0]-h)*r),t((q-a[1])*v)]})});return a}if(f instanceof p){a=new p;var R=a.rings,D;n(f.rings,function(a,b){D=R[b]=[];n(a,function(a,b){D[b]=[t((a[0]-
h)*r),t((q-a[1])*v)]})});return a}},_toScreenPath:function(a,c,e,d,f,q){var h=d instanceof g,v=a.spatialReference,r=d.spatialReference,n,p;v&&r&&!v.equals(r)&&v._canProject(r)&&(v.isWebMercator()?n=k.lngLatToXY:(n=k.xyToLngLat,p=!0));return b(a.xmin,a.ymax,c/a.getWidth(),e/a.getHeight(),f,q,h?d.paths:d.rings,n,p,h)},toMapPoint:function(a,b,c,e){return new k(a.xmin+e.x/(b/a.getWidth()),a.ymax-e.y/(c/a.getHeight()),a.spatialReference)},toMapGeometry:function(a,b,e,f){var h=a.xmin,q=a.ymax,r=a.spatialReference,
v=b/a.getWidth(),n=e/a.getHeight(),t=m.forEach;if(f instanceof k)return new k(h+f.x/v,q-f.y/n,r);if(f instanceof d){a=new d(r);var w=a.points;t(f.points,function(a,b){w[b]=[h+a[0]/v,q-a[1]/n]});return a}if(f instanceof c)return new c(h+f.xmin/v,q-f.ymin/n,h+f.xmax/v,q-f.ymax/n,r);if(f instanceof g){a=new g(r);var l=a.paths,B;t(f.paths,function(a,b){B=l[b]=[];t(a,function(a,b){B[b]=[h+a[0]/v,q-a[1]/n]})});return a}if(f instanceof p){a=new p(r);var R=a.rings,D;t(f.rings,function(a,b){D=R[b]=[];t(a,
function(a,b){D[b]=[h+a[0]/v,q-a[1]/n]})});return a}}};a("extend-esri")&&l.mixin(l.getObject("geometry",!0,f),e);return e})},"esri/layers/GraphicsLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/window dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/dom dojox/gfx dojox/gfx/matrix ./gfxSniff!esri-svg?dojox/gfx/filters ./layer ../kernel ../lang ../sniff ../Color ../domUtils ../symbols/MarkerSymbol ../symbols/SimpleMarkerSymbol ../symbols/utils ../geometry/Point ../geometry/ScreenPoint ../geometry/Extent ../geometry/mathUtils ../geometry/screenUtils ../PluginTarget ./gfxSniff!esri-svg?dojox/gfx/svgext".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C,y,z,E,B,R,D){var H,O=-1!==c.renderer.toLowerCase().indexOf("svg"),Y=-1!==c.renderer.toLowerCase().indexOf("canvas");k=Y?"canvas-2d":c.renderer;var T=9>w("ie");x=10===w("ie");var F=void 0===w("ie")&&7==w("trident"),S=x||F,K=w("esri-touch");x=m(null,{declaredClass:"esri.layers._GraphicsContainer",_setMap:function(a,b){var e,d=this._connects=[];this._map=a;this._useWillChange="css-transforms"===a.navigationMode&&O&&w("esri-will-change");Y?(e=g.create("div",
{style:"overflow: visible; position: absolute;"},b),this._surface={getEventSource:function(){return e}},d.push(l.connect(e,"onmousedown",this,this._canvasDownHandler)),d.push(l.connect(e,"onmouseup",this,this._canvasUpHandler)),d.push(l.connect(e,"onclick",this,this._canvasClickHandler)),H.prototype._canvas=!0):(e=(this._surface=c.createSurface(b,a.width,a.height)).getEventSource(),this._useWillChange&&p.set(e,"will-change","transform"),p.set(e=T?e.parentNode:e,{overflow:"visible",position:"absolute"}));
d.push(l.connect(a,"onResize",this,"_onResizeHandler"));this._useWillChange&&(d.push(l.connect(a,"onPan",this,"_onPanHandler")),d.push(l.connect(a,"onPanEnd",this,"_onPanEndHandler")),d.push(l.connect(a,"onExtentChange",this,"_onExtentChangeHandler")));return e},_onPanHandler:function(a,b){var c=this._map.__visibleRect,e=c.x+b.x,c=c.y+b.y;this._panDx=e;this._panDy=c;p.set(this._surface.getEventSource(),t._css.names.transform,t._css.translate(e,c))},_onPanEndHandler:function(a,b){var c=this._map.__visibleRect,
e=c.x,c=c.y;this._panDx=e;this._panDy=c;p.set(this._surface.getEventSource(),t._css.names.transform,t._css.translate(e,c))},_onExtentChangeHandler:function(a,b,c,e){c&&(this._panDy=this._panDx=0,p.set(this._surface.getEventSource(),t._css.names.transform,t._css.translate(0,0)))},_getTransform:function(){return{dx:this._panDx||0,dy:this._panDy||0}},_onResizeHandler:function(a,b,c){a=this._surface.getEventSource();var e=this._map,d;T&&p.set(a=a.parentNode,{width:b+"px",height:c+"px",clip:"rect(0px "+
b+"px "+c+"px 0px)"});n.set(a,"width",b);n.set(a,"height",c);this._surface.declaredClass||f.forEach(a.childNodes,function(a){n.set(a,"width",b);n.set(a,"height",c)});e.loaded&&(e.graphics.suspended||(e.graphics._resized=!0),f.forEach(e.graphicsLayerIds,function(a){d=e.getLayer(a);d.suspended||(d._resized=!0,d._childLayer&&(d._childLayer._resized=!0));d._updateSVGFilters(null,null,b,c)}),e.graphics._updateSVGFilters(null,null,b,c),e._labels&&e._labels._updateSVGFilters(null,null,b,c))},_cleanUp:function(){f.forEach(this._connects,
l.disconnect,l);this._map=this._surface=null},_processEvent:function(a){var b=this._map;a.screenPoint=new z(a.pageX-b.position.x,a.pageY-b.position.y);a.mapPoint=b.toMap(a.screenPoint)},_canvasDownHandler:function(a){this._processEvent(a);this._downPt=a.screenPoint.x+","+a.screenPoint.y},_canvasUpHandler:function(a){this._processEvent(a);this._upPt=a.screenPoint.x+","+a.screenPoint.y},_tolerance:15,_isPrimaryMatch:function(a,b,c,e){if(!a.visible||!b)return!1;var d=b.getTransformedBoundingBox(),h;
return d?(h=new E(d[0].x,d[0].y,d[2].x,d[2].y),delete h.spatialReference,K?h.intersects(c):h.contains(e)):f.some(b.children||[],function(a){d=a.getTransformedBoundingBox();h=new E(d[0].x,d[0].y,d[2].x,d[2].y);delete h.spatialReference;return K?h.intersects(c):h.contains(e)})},_canvasClickHandler:function(a){if(this._downPt&&this._upPt&&this._downPt===this._upPt){this._processEvent(a);var b=this._map,c=f.map(b.graphicsLayerIds,function(a){return b.getLayer(a)});c.push(b.graphics);c.reverse();var c=
f.filter(c,function(a){return a.loaded&&a._mouseEvents&&!a.suspended&&(!r.isDefined(a.opacity)||0<a.opacity)}),e=a.screenPoint,d=this._tolerance,h=e.x-d,q=e.y+d,g=e.x+d,d=e.y-d,k=new E(h,d,g,q),h=b.toMap(new z(h,q)),g=b.toMap(new z(g,d)),q=h.spatialReference._getInfo(),v=new E(E.prototype._normalizeX(h.x,q).x,h.y,E.prototype._normalizeX(g.x,q).x,g.y,h.spatialReference),n;delete k.spatialReference;f.some(c,function(a){a=f.filter(a.graphics,function(a){return this._isPrimaryMatch(a,a.getDojoShape(),
k,e)||!(!a._bgShape||!this._isPrimaryMatch(a,a._bgShape,k,e))},this);a.reverse();if(0<a.length){var b;f.some(a,function(a){return a.geometry&&v.intersects(a.geometry)?(b=a,!0):!1});if(b)return n=b,!0}return!1},this);n&&(c=n.getLayer())&&(a.graphic=n,c.onClick(a))}}});H=m(h,{declaredClass:"esri.layers._GraphicsLayer",managedSuspension:!0,surfaceType:k,renderer:null,_eventMap:{"graphic-add":["graphic"],"graphic-remove":["graphic"],"renderer-change":["renderer"]},_suspendGraphics:!1,constructor:function(b,
c){b=b||{};if(a.isString(b)||a.isObject(b)&&(b.layerDefinition||b.query))b=c;this._params=a.mixin({displayOnPan:!0,drawMode:!0,styling:!0},b);var e=this._params.dataAttributes;"string"===typeof e&&(e=[e]);this.styling=O?this._params.styling:!0;this.dataAttributes=e;this.infoTemplate=b&&b.infoTemplate;this.graphics=[];this._draw=a.hitch(this,this._draw);this._refresh=a.hitch(this,this._refresh);this._acquireSVGMarker=a.hitch(this,this._acquireSVGMarker);this.registerConnectEvents()},getNode:function(){return this._div&&
this._div.getEventSource()},setDrawMode:function(a){this._params.drawMode=a},suspendGraphics:function(a){this._suspendGraphics=a;f.forEach(this.graphics,function(b){b._suspended=a})},_setMap:function(b,e){this.inherited(arguments);this._map=b;this._wrap=b.wrapAround180;this._srInfo=b.spatialReference._getInfo();this._svgFilters={};this._lineMarkers={};this._canvas?(e=c.createSurface(e.getEventSource(),b.width,b.height),p.set(e.rawNode,"position","absolute"),this._div=e.createGroup(),this._renderProto=
this._div.constructor.prototype._render,this._div._render=a.hitch(this,this._canvasRender)):this._div=e.createGroup();this._bgGroup=this._div.createGroup();this._div.getEventSource().id=this.id+"_layer";this._initOpacity();return this._div},_unsetMap:function(a,b){f.forEach(this.graphics,function(a){a._shape=null});this._canvas?(b=this._div.getParent(),b._parent={},g.destroy(b.rawNode),b.destroy()):(this._div.clear(),b.remove(this._div),g.destroy(this._div.getEventSource()));this._map=this._div=this._svgFilters=
this._lineMarkers=null;clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors();this.inherited(arguments)},_initOpacity:function(){var a=this.opacity;r.isDefined(a)&&1>a&&this.setOpacity(a,!0)},_onZoomStartHandler:function(){q.hide(this._div.getEventSource())},_onExtentChangeHandler:function(a,b,c,e){clearTimeout(this._wakeTimer);this._wakeTimer=null;c?(a=this._map.__visibleRect,b=this._div,this._evalSDRenderer(),this._refresh(!0),this._params._child||this._updateTransform(b,
a.x,a.y,!0),this._renderProto&&b.surface.pendingRender?this._dirty=!0:this.suspended||q.show(b.getEventSource())):this._resized&&(this._resized=!1,this._refresh(!1));if(0<this.graphics.length)this.onUpdate()},_canvasRender:function(){var a=this._div;this._dirty&&(delete this._dirty,this.suspended||q.show(a.getEventSource()));return this._renderProto.apply(a,arguments)},_refresh:function(a){var b=this.graphics,c=b.length,e,d=this._draw;for(e=0;e<c;e++)d(b[e],a)},refresh:function(){this._refresh(!0)},
redraw:function(){this._refresh(!0)},_getTransform:function(){var a={dx:0,dy:0};this._map&&(this._map._gc._useWillChange?a=this._map._gc._getTransform():this._div&&(a=this._div.getTransform()));return a},_onPanHandler:function(a,b){this._panDx=b.x;this._panDy=b.y;var c=this._map.__visibleRect;this._updateTransform(this._div,c.x+b.x,c.y+b.y);F&&this._updateSVGMarkers()},_onPanEndUpdateHandler:function(a,b){var c=this._map.__visibleRect;this._params._child||b.x===this._panDx&&b.y===this._panDy?(this._updateSVGFilters(-c.x,
-c.y),this._updateSVGMarkers()):this._updateTransform(this._div,c.x,c.y,!0);this._refresh(!1);if(this.graphics.length)this.onUpdate()},_onPanStartHandler:function(){q.hide(this._div.getEventSource())},_onPanEndHandler:function(){var a=this._map.__visibleRect,b=this._div;this._updateTransform(b,a.x,a.y,!0);this._refresh(!1);this._renderProto&&b.surface.pendingRender?this._dirty=!0:q.show(b.getEventSource());if(this.graphics.length)this.onUpdate()},_updateTransform:function(a,c,e,d){this._map._gc._useWillChange||
a.setTransform(b.translate({x:c,y:e}));d&&(this._updateSVGFilters(-c,-e),this._updateSVGMarkers())},onSuspend:function(){this.inherited(arguments);q.hide(this._div.getEventSource());clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors()},onResume:function(b){this.inherited(arguments);b.firstOccurrence&&this._evalSDRenderer();this._enableDrawConnectors();this._wakeTimer=this._wakeTimer||setTimeout(a.hitch(this,function(){this.suspended||this._map.__zooming||this._onExtentChangeHandler(null,
null,!0)}),0)},_enableDrawConnectors:function(){var a=this._map,b=l.connect;this._disableDrawConnectors();this._params.displayOnPan?(this._params._child||(this._onPanHandler_connect=b(a,"onPan",this,"_onPanHandler")),this._onPanEndHandler_connect=b(a,"onPanEnd",this,"_onPanEndUpdateHandler")):(this._onPanStartHandler_connect=b(a,"onPanStart",this,"_onPanStartHandler"),this._onPanEndHandler_connect=b(a,"onPanEnd",this,"_onPanEndHandler"));this._onZoomStartHandler_connect=b(a,"onZoomStart",this,"_onZoomStartHandler");
this._onExtentChangeHandler_connect=b(a,"onExtentChange",this,"_onExtentChangeHandler")},_disableDrawConnectors:function(){var a=l.disconnect;a(this._onExtentChangeHandler_connect);a(this._onZoomStartHandler_connect);a(this._onPanHandler_connect);a(this._onPanStartHandler_connect);a(this._onPanEndHandler_connect);this._onExtentChangeHandler_connect=this._onZoomStartHandler_connect=this._onPanHandler_connect=this._onPanStartHandler_connect=this._onPanEndHandler_connect=null},_updateExtent:function(a){var b=
a.geometry;if(!b)a._extent=null;else if(!(a._extent=b.getExtent())){var c,e;if("esri.geometry.Point"===b.declaredClass)c=b.x,e=b.y;else if("esri.geometry.Multipoint"===b.declaredClass)c=b.points[0][0],e=b.points[0][1];else{a._extent=null;return}a._extent=new E(c,e,c,e,b.spatialReference)}},_intersects:function(a,b,c){var e=a.spatialReference,d=b.spatialReference,h=e&&d&&!e.equals(d)&&e._canProject(d)&&4326===d.wkid;if(this._wrap&&!c){c=[];var e=a._getFrameWidth(),q=this._srInfo,g=a._clip?a._getAvailExtent():
a.extent,k,v,r,n,p=[];k=b._partwise;h&&(g=a.geographicExtent,q=d._getInfo());a=g._getParts(q);if(k&&k.length)for(b=[],d=0,h=k.length;d<h;d++)b=b.concat(k[d]._getParts(q));else b=b._getParts(q);d=0;for(h=b.length;d<h;d++)for(r=b[d],q=0,g=a.length;q<g;q++)if(n=a[q],n.extent.intersects(r.extent))for(k=0,v=r.frameIds.length;k<v;k++)c.push((n.frameIds[0]-r.frameIds[k])*e);d=0;for(h=c.length;d<h;d++)k=c[d],f.indexOf(c,k)===d&&p.push(k);return p.length?p:null}return(h?a.geographicExtent:a.extent).intersects(b)?
[0]:null},_defaultMarker:{type:"simplemarkersymbol",style:"square",size:1,xoffset:0,yoffset:0,angle:0},_draw:function(a,b){if(this._params.drawMode&&this._map&&!this.suspended&&!this._map.__zooming&&!this._resized)try{var c=a._extent,e,d,h=!O||this.styling,f=O&&this.dataAttributes,q=a.getDojoShape(),g;if(!a._suspended&&a.visible&&c&&(e=this._intersects(this._map,c,a.geometry._originOnly))&&(d=h?this._getSymbol(a):this._defaultMarker)){if(a._offsets&&a._offsets.join(",")===e.join(",")?g=!0:a._offsets=
e,!q||b||!g){var k=a.geometry.type,c={graphic:a},v=a._bgShape,r=h&&!a.symbol?this._getRenderer(a):null,n=r&&r.backgroundFillSymbol;if("point"===k)this._isInvalidShape(d,q)&&this._removeShape(a),a._shape=this._drawPoint(this._div,a.geometry,d,a.getDojoShape(),e,r,a),h&&this._symbolizePoint(a.getDojoShape(),d,r,a);else if("multipoint"===k)this._drawMarkers(a,d,e,r),h&&this._symbolizeMarkers(a,d,r);else{var p,k=d,t,u,w;h&&(k=(p="simplemarkersymbol"===d.type||"picturemarkersymbol"===d.type||"textsymbol"===
d.type?d:null)?n:d);h&&k&&-1<k.type.indexOf("fillsymbol")&&(t=this._bgGroup,w=!(!t||!p));v&&!w&&this._removeBgShape(a);k&&(!w&&this._isInvalidShape(k,a._shape)&&this._removeShape(a,!1),u=this._drawShape(a,e,t||this._div,w?v:a.getDojoShape()),h&&this._symbolizeShape(u,k,r,k===n,a),a[w?"_bgShape":"_shape"]=u);if(p){this._isInvalidShape(p,a._shape)&&this._removeShape(a,!1);var l=a.geometry.getCentroid();(u=l&&this._drawPoint(this._div,l,p,a._shape,e,r,a))&&this._symbolizePoint(u,p,r,a);a._shape=u}}Y||
(a._bgShape&&this._initNode(a,a._bgShape,a._bgShape!==v,c,f),a._shape&&this._initNode(a,a._shape,a._shape!==q,c,f));a._applyDataAttrs();c.node=a.getNode();this.onGraphicDraw(c)}}else q&&this._removeShape(a)}catch(wa){this._errorHandler(wa,a)}},_initNode:function(a,b,c,e,d){if(b=b&&b.getNode())b.e_graphic=a,this._addDataAttrs(a,d,b),c&&(e.node=b,this.onGraphicNodeAdd(e))},_removeShape:function(a,b,c){var e=a.getDojoShape(),d=e&&e.getNode();e&&!c&&(e.removeShape(),e.destroy());a._shape=a._offsets=null;
!1!==b&&this._removeBgShape(a,c);if(d&&(d.e_graphic=null,!Y))this.onGraphicNodeRemove({graphic:a,node:d})},_removeBgShape:function(a,b){var c=a._bgShape,e=c&&c.getNode();c&&!b&&(c.removeShape(),c.destroy());a._bgShape=null;if(e&&(e.e_graphic=null,!Y))this.onGraphicNodeRemove({graphic:a,node:e})},_addDataAttrs:function(a,b,c){var e=a.attributes,d,h=b?b.length:0,f=this._getRenderer(a);if(c&&e){for(d=0;d<h;d++)(c=b[d])&&a.attr("data-"+c,e[c]);!this.styling&&f&&(f.getBreakIndex?(b=f.getBreakIndex(a),
a.attr("data-class-break",-1!==b?b:null)):f.getUniqueValueInfo&&(b=f.getUniqueValueInfo(a),a.attr("data-unique-value",b?b.value:null)))}},_drawShape:function(a,b,c,e){a=a.geometry;var d=a.type,h=this._map,f=h.extent,q=h.width,g=h.height,h=h.__visibleRect,k=[],v,r;v="extent"===d;if("rect"===d||v)k={x:0,y:0,spatialReference:a.spatialReference},k.x=v?a.xmin:a.x,k.y=v?a.ymax:a.y,d=R.toScreenPoint(f,q,g,k),k.x=v?a.xmax:a.x+a.width,k.y=v?a.ymin:a.y+a.height,a=R.toScreenPoint(f,q,g,k),b={x:d.x-h.x+b[0],
y:d.y-h.y,width:Math.abs(a.x-d.x),height:Math.abs(a.y-d.y)},0===b.width&&(b.width=1),0===b.height&&(b.height=1),e=this._drawRect(c,e,b);else if("polyline"===d||"polygon"===d){v=0;for(r=b.length;v<r;v++)k=k.concat(R._toScreenPath(f,q,g,a,-h.x+b[v],-h.y));e=this._drawPath(c,e,k);this._rendererLimits&&("polyline"===d?this._clipPolyline(e,a):this._clipPolygon(e,a))}return e},_drawRect:function(a,b,c){return b?b.setShape(c):a.createRect(c)},_drawImage:function(a,b,c){return b?b.setShape(c):a.createImage(c)},
_drawCircle:function(a,b,c){return b?b.setShape(c):a.createCircle(c)},_drawPath:function(){return T?function(a,b,e,d){e=d?e:e.join(" ");if(b)return b.setShape(e);b=a.createObject(d?c.Path:c.EsriPath,e);a._overrideSize(b.getEventSource());return b}:function(a,b,c,e){c=e?c:c.join(" ");return b?b.setShape(c):a.createPath(c)}}(),_drawText:function(a,b,c){return b?b.setShape(c):a.createText(c)},_evalSDRenderer:function(a){var b=this._map,c=this.renderer,e,d=this._rndForScale;b&&b.loaded&&c&&c.getRendererInfo&&
(e="zoom"===c.rangeType?c.getRendererInfoByZoom(b.getZoom()):c.getRendererInfoByScale(b.getScale()));this._rndForScale=e&&e.renderer;a||this._rndForScale==d||this.emit("renderer-change",{renderer:this._rndForScale})},_getRenderer:function(a){var b=this._rndForScale||this.renderer;a&&b&&b.getObservationRenderer&&(b=b.getObservationRenderer(a));return b},_getSymbol:function(a){var b=this._getRenderer();return a.symbol||b&&b.getSymbol(a)},_getVariable:function(a,b,c){var e;a&&(e=(a=a.getVisualVariablesForType(b,
c))&&a[0]);return e},_applyOpacity:function(a,b,c,e){b=b.getOpacity(e,{opacityInfo:c});null!=b&&(a=new u(a),a.a=b);return a},_symbolizeShape:function(b,c,e,d,h){var f=c.getStroke(),q=c.getFill(),g=c.type,k,v,r=-1!==g.indexOf("linesymbol"),n=-1!==g.indexOf("fillsymbol")?null:this._getVariable(e,"sizeInfo",!1),p=this._getVariable(e,"colorInfo",!1),t=this._getVariable(e,"opacityInfo",!1),u=r?"none"!==c.style:c.outline&&"none"!==c.outline.style,w=r?null:this._getVariable(e,"sizeInfo","outline"),n=(n=
d?w:w||n)?e.getSize(h,{sizeInfo:n,resolution:this._map.getResolutionInMeters(),scale:this._map.getScale()}):null;d&&(p=t=null);(p||t)&&"picturefillsymbol"!==g&&(r?(k=f&&f.color,p&&(k=e.getColor(h,{colorInfo:p})||k),k&&t&&(k=this._applyOpacity(k,e,t,h))):q&&q.toCss&&(v=q,p&&(v=e.getColor(h,{colorInfo:p})||v),v&&t&&(v=this._applyOpacity(v,e,t,h))));b.setStroke(!u||null==n&&!k?f:a.mixin({},f,null!=n?{width:n}:null,k&&{color:k})).setFill(v||q);r&&C.applyLineMarker(b,c,k,this._acquireSVGMarker)},_smsToPath:function(){return T?
function(a,b,c,e,d,h,f,q,g){switch(b){case a.STYLE_SQUARE:return["M",d+","+f,"L",h+","+f,h+","+q,d+","+q,"X","E"];case a.STYLE_CROSS:return["M",c+","+f,"L",c+","+q,"M",d+","+e,"L",h+","+e,"E"];case a.STYLE_X:return["M",d+","+f,"L",h+","+q,"M",d+","+q,"L",h+","+f,"E"];case a.STYLE_DIAMOND:return["M",c+","+f,"L",h+","+e,c+","+q,d+","+e,"X","E"];case a.STYLE_TARGET:return["M",d+","+f,"L",h+","+f,h+","+q,d+","+q,d+","+f,"M",d-g+","+e,"L",d+","+e,"M",c+","+(f-g),"L",c+","+f,"M",h+g+","+e,"L",h+","+e,"M",
c+","+(q+g),"L",c+","+q,"E"]}}:function(a,b,c,e,d,h,f,q,g){switch(b){case a.STYLE_SQUARE:return["M",d+","+f,h+","+f,h+","+q,d+","+q,"Z"];case a.STYLE_CROSS:return["M",c+","+f,c+","+q,"M",d+","+e,h+","+e];case a.STYLE_X:return["M",d+","+f,h+","+q,"M",d+","+q,h+","+f];case a.STYLE_DIAMOND:return["M",c+","+f,h+","+e,c+","+q,d+","+e,"Z"];case a.STYLE_TARGET:return["M",d+","+f,h+","+f,h+","+q,d+","+q,d+","+f,"M",d-g+","+e,d+","+e,"M",c+","+(f-g),c+","+f,"M",h+g+","+e,h+","+e,"M",c+","+(q+g),c+","+q]}}}(),
_pathStyles:{square:1,cross:1,x:1,diamond:1,target:1},_typeMaps:{picturemarkersymbol:"image",picturefillsymbol:"path",simplefillsymbol:"path",simplelinesymbol:"path",cartographiclinesymbol:"path",textsymbol:"text"},_isInvalidShape:function(a,b){var c=b&&b.shape&&b.shape.type,e=a&&a.type,d=a&&a.style;"rect"===c&&(c="path");e&&(d=this._typeMaps[e]||d);this._pathStyles[d]&&(d="path");return"shieldlabelsymbol"===e?!0:!(!c||!d||c===d)},_reArialFont:/\s*(^|,)\s*arial\s*(,|$)\s*/i,_fallbackFont:"Arial",
_drawPoint:function(a,c,e,d,h,f,q){var g=e.type,k=this._map,r=k.__visibleRect,n=R.toScreenPoint(k.extent,k.width,k.height,c).offset(-r.x+h[0],-r.y),r=n.x,p=n.y,t;c=[];var u,w=this._getVariable(f,"rotationInfo",!1),w=w?f.getRotationAngle(q,{rotationInfo:w}):null,l=this._getVariable(f,"sizeInfo",!1),k=l?f.getSize(q,{sizeInfo:l,shape:e.style,resolution:k.getResolutionInMeters(),scale:k.getScale()}):q.size;w&&c.push(b.rotategAt(w,n));if(0!==e.xoffset||0!==e.yoffset)u=b.translate(e.xoffset,-e.yoffset),
c.push(u);0!==e.angle&&c.push(b.rotategAt(e.angle,n));if("simplemarkersymbol"===g)switch(t=e.style,f=Math.round,k=null!=k?k:e.size,t){case v.STYLE_SQUARE:case v.STYLE_CROSS:case v.STYLE_X:case v.STYLE_DIAMOND:e=isNaN(k)?16:k/2;t=this._drawPath(a,d,this._smsToPath(v,t,r,p,f(r-e),f(r+e),f(p-e),f(p+e)));break;case v.STYLE_TARGET:q=e._targetWidth/2;n=e._targetHeight/2;t=this._drawPath(a,d,this._smsToPath(v,t,r,p,f(r-q),f(r+q),f(p-n),f(p+n),e._spikeSize));break;case v.STYLE_PATH:t=this._drawPath(a,d,e.path,
!0);e=t.getBoundingBox();a=this._getScaleMatrix(e,k);1===a.xx&&1===a.yy||c.push(b.scaleAt(a.xx,a.yy,n));c.push(b.translate(-(e.x+e.width/2)+r,-(e.y+e.height/2)+p));break;default:e=isNaN(k)?16:k/2,t=this._drawCircle(a,d,{cx:r,cy:p,r:e})}else if("shieldlabelsymbol"===g)t=e.width,n=e.height,d=a.createGroup(),t=a.createImage({x:r-t/2,y:p-n/2,width:t,height:n,src:e.url}),d.add(t),null!=e.font&&(p+=.2*e.getHeight(),a=a.createText({type:"text",text:e.text,x:r,y:p,align:"middle",decoration:e.decoration,rotated:e.rotated,
kerning:e.kerning}),a.setFont(e.font),a.setFill(e.color),d.add(a)),t=d;else if("picturemarkersymbol"===g){if(null==k?(t=e.width,n=e.height):(n=k,t=e.width/e.height*n,u&&(null!=u.dx&&(u.dx=u.dx/e.width*t),null!=u.dy&&(u.dy=u.dy/e.height*n))),t=this._drawImage(a,d,{x:r-t/2,y:p-n/2,width:t,height:n,src:e.url}),O&&(a=t.getNode()))e=(e=this._getVariable(f,"opacityInfo",!1))?f.getOpacity(q,{opacityInfo:e}):null,null!=e?a.setAttribute("opacity",e):a.setAttribute("opacity",1)}else if("textsymbol"===g){if(f=
e.font){t=null!=k;q=f.family&&!this._reArialFont.test(f.family);if(t||q)f=new f.constructor(f.toJson());t&&f.setSize(k);q&&f.setFamily(f.family+","+this._fallbackFont)}t=this._drawText(a,d,{type:"text",text:e.text,x:r,y:p,align:e.getSVGAlign(),decoration:e.decoration||f&&f.decoration,rotated:e.rotated,kerning:e.kerning});f&&t.setFont(f);O&&(a=t.getNode(),r=e.getSVGBaseline(),p=e.getSVGBaselineShift(),a&&(a.setAttribute("dominant-baseline",r),p&&a.setAttribute("baseline-shift",p),this._applyHalo(t,
e.haloColor,e.haloSize)))}t.setTransform(b.multiply(c));t._wrapOffsets=h;return t},_acquireSVGMarker:function(a,b,c,e){a=this._getSVGMarkerId(b,e);var d=this._getSVGMarker(a);d||(d=C.createSVGMarker(b,a,c,e),this._div.getParent().defNode.appendChild(d),this._lineMarkers[a]=d);return d},_getSVGMarkerId:function(a,b){return"marker_"+this._map.id+"_"+a.r+"_"+a.g+"_"+a.b+"_"+b},_getSVGMarker:function(a){return this._lineMarkers[a]},_updateSVGMarkers:function(){if(O&&S){var a=this._lineMarkers,b;for(b in a){var c=
a[b];c.setAttribute("id",b+"_temp");c.setAttribute("id",b)}}},_applyHalo:function(a,b,c){var e=b&&c?this._getHaloId(b,c):null;a.setFilter(b&&c?w("webkit")||w("ff")?this._getDilateFilter(b,c,e):this._getOffsetFilter(b,c,e):null)},_getDilateFilter:function(a,b,c){var d=this._getSVGFilter(c);d||(d=this._createSVGFilter({id:c},[e.feMorphology({operator:"dilate",radius:b,result:"dilated"}),e.feFlood({"flood-color":a.toCss(!0)}),e.feComposite({in2:"dilated",operator:"in",result:"composite"}),e.feMerge("composite",
"SourceGraphic")]));return d},_getOffsetFilter:function(a,b,c){var d=this._getSVGFilter(c);if(!d){a=a.toCss(!0);var d=this._offsetPrimitives,h,f=d.length,q=[],g=[];for(h=0;h<f;h++){var k=d[h],r="offset"+k.dir,v="composite"+k.dir;g.push(v);q.push(e.feOffset({dx:k.dx*b,dy:k.dy*b,"in":"SourceAlpha",result:r}),e.feFlood({"flood-color":a}),e.feComposite({in2:r,operator:"in",result:v}))}g.push("SourceGraphic");q.push(e.feMerge.apply(e.feMerge,g));d=this._createSVGFilter({id:c},q)}return d},_offsetPrimitives:[{dir:"L",
dx:-1,dy:0},{dir:"TL",dx:-1,dy:-1},{dir:"T",dx:0,dy:-1},{dir:"TR",dx:1,dy:-1},{dir:"R",dx:1,dy:0},{dir:"BR",dx:1,dy:1},{dir:"B",dx:0,dy:1},{dir:"BL",dx:-1,dy:1}],_getHaloId:function(a,b){return"halo_"+this._map.id+"_"+this.id+"_"+a.r+"_"+a.g+"_"+a.b+"_"+a.a+"_"+b},_getSVGFilter:function(a){return this._svgFilters[a]},_createSVGFilter:function(a,b){var c=e.createFilter(a,b),d=this._map,h=d.__visibleRect;c.x=-h.x;c.y=-h.y;c.width=d.width;c.height=d.height;return this._svgFilters[a.id]=c},_updateSVGFilters:function(a,
b,c,e){var h=this._svgFilters,f,q,g;for(q in h)if(f=h[q]){if(g=d.byId(q))null!=a&&g.setAttribute("x",a),null!=b&&g.setAttribute("y",b),null!=c&&g.setAttribute("width",c),null!=e&&g.setAttribute("height",e);null!=a&&(f.x=a);null!=b&&(f.y=b);null!=c&&(f.width=c);null!=e&&(f.height=e)}},_getScaleMatrix:function(a,b){var c=a.width/a.height,e=1,d=1;isNaN(b)||(1<c?(e=b/a.width,d=b/c/a.height):(d=b/a.height,e=b*c/a.width));return{xx:e,yy:d}},_symbolizePoint:function(b,c,e,d){var h=c.type,f=c.style;if("shieldlabelsymbol"!==
h&&"picturemarkersymbol"!==h){var q=c.getStroke();c=c.getFill();var f=f===v.STYLE_X||f===v.STYLE_CROSS,g=q&&q.color,k=f?g:c;if(e){var r=this._getVariable(e,"colorInfo",!1),n=this._getVariable(e,"opacityInfo",!1);r&&(k=e.getColor(d,{colorInfo:r})||k);k&&n&&(k=this._applyOpacity(k,e,n,d));k&&(f?k!==g&&(q=q?a.mixin({},q):{},q.color=k):k!==c&&(c=k))}"textsymbol"===h?b.setFill(c):"simplemarkersymbol"===h&&b.setFill(c).setStroke(q)}},_drawMarkers:function(a,b,c,e){var d=a.geometry,h=d.points,f=a.getDojoShape()||
this._div.createGroup(),q,g,k=h.length,r=[],v=0,n,p=c?c.length:0;f.children[0]&&this._isInvalidShape(b,f.children[0])&&f.clear();for(g=0;g<k;g++)for(q=h[g],n=0;n<p;n++)r[0]=c[n],this._drawPoint(f,{x:q[0],y:q[1],spatialReference:d.spatialReference},b,f.children[v++],r,e,a);b=f.children.length;if(k*c.length<b)for(g=b-1;g>=k*c.length;g--)f.children[g].removeShape();a._shape=f},_symbolizeMarkers:function(a,b,c){var e=a.getDojoShape().children,d,h=e.length;for(d=0;d<h;d++)this._symbolizePoint(e[d],b,c,
a)},_errorHandler:function(a,b){a.message=b?"Unable to draw graphic (geometry:"+(b.geometry?b.geometry.declaredClass:null)+", symbol:"+(b.symbol?b.symbol.declaredClass:null)+"): "+a.message:"Unable to draw graphic (null): "+a.message;this.inherited(arguments)},_rendererLimits:function(){var a,b,c;T?(a=1E5,b=-1E5,c=1E5):w("chrome")&&6>w("chrome")&&(a=8150,b=-1E4,c=1E4);if(a)return{clipLimit:a,rangeMin:b,rangeMax:c,clipBBox:[-a,-a,a,a],clipSegments:[[[-a,-a],[a,-a]],[[a,-a],[a,a]],[[a,a],[-a,a]],[[-a,
a],[-a,-a]]]}}(),_clipPolyline:function(a,b){var c=this._getCorners(a,b),e=c.br,d=this._rendererLimits,h=d.rangeMin,q=d.rangeMax,g=d.clipBBox,k=d.clipSegments,d=this._isPointWithinRange,r=this._isPointWithinBBox,v=this._getClipperIntersection,n=this._getPlaneIndex;if(!d(c.tl,h,q)||!d(e,h,q)){T&&this._createSegments(a);var p=[];f.forEach(a.segments,function(a){a=a.args;var b=a.length,c=[],e;for(e=0;e<b;e+=2){var d=[a[e],a[e+1]],h=[a[e+2],a[e+3]],f=r(d,g),q=r(h,g);if(f^q){if(q=v([d,h],k))f?(e?c.push(q[1]):
c.push(d,q[1]),p.push(c),c=[]):c.push(q[1],h)}else f?e?c.push(h):c.push(d,h):(q=n(d,g),f=n(h,g),-1!==q&&-1!==f&&q!==f&&(d=v([d,h],k,!0),0<d.length&&(d[q]||(q=d[q[0]]?q[0]:q[1]),d[f]||(f=d[f[0]]?f[0]:f[1]),h=d[q],d=d[f],h&&c.push(h),d&&(c.push(d),p.push(c),c=[]))))}p.push(c)});a.setShape(this._getPathStringFromPaths(p))}},_clipPolygon:function(b,c){var e=this._getCorners(b,c),d=e.br,h=this._rendererLimits,q=h.clipLimit,g=h.rangeMin,k=h.rangeMax,r=h.clipBBox,v=h.clipSegments,h=this._isPointWithinRange,
n=this._isPointWithinBBox,p=this._getClipperIntersection,t=this._getPlaneIndex,u=B._pointLineDistance;h(e.tl,g,k)&&h(d,g,k)||(T&&this._createSegments(b),e=f.filter(b.segments,function(a){return a.args&&a.args.length}),e=f.map(e,function(b){var c=b.args,e=c.length,d=[];b=[];var h;for(h=0;h<e;h+=2){var g=[c[h],c[h+1]],k=[c[h+2],c[h+3]];if(h===e-2){d.push(g);break}var w=n(g,r),l=n(k,r);d.push(g);if(w^l){if(l=p([g,k],v))g=l[1],g[w?"inOut":"outIn"]=!0,d.push(g),b.push([w?"INOUT":"OUTIN",d.length-1,l[0]])}else if(!w){var w=
t(g,r),x=t(k,r);-1!==w&&-1!==x&&w!==x&&(l=p([g,k],v,!0),0<l.length?(l[w]||(w=l[w[0]]?w[0]:w[1]),l[x]||(x=l[x[0]]?x[0]:x[1]),g=l[w],k=l[x],g&&(g.outIn=!0,d.push(g),b.push(["OUTIN",d.length-1,w])),k&&(k.inOut=!0,d.push(k),b.push(["INOUT",d.length-1,x]))):a.isArray(w)&&a.isArray(x)&&(l=w.concat(x),l.sort(),"0123"===l.join("")&&(l=[],3===w[0]+w[1]?l.push([q,-q],[-q,q]):l.push([-q,-q],[q,q]),w=u(l[0],[g,k]),g=u(l[1],[g,k]),d.push(w<g?l[0]:l[1]))))}}var m=r[0],B=r[1],C=r[2],y=r[3];f.forEach(d,function(a){a[0]<
m&&(a[1]>=B&&a[1]<=y?a[0]=m:(a[0]=m,a[1]=a[1]<B?B:y))});f.forEach(d,function(a){a[1]<B&&(a[0]>=m&&a[0]<=C?a[1]=B:(a[1]=B,a[0]=a[0]<m?m:C))});f.forEach(d,function(a){a[0]>C&&(a[1]>=B&&a[1]<=y?a[0]=C:(a[0]=C,a[1]=a[1]<B?B:y))});f.forEach(d,function(a){a[1]>y&&(a[0]>=m&&a[0]<=C?a[1]=y:(a[1]=y,a[0]=a[0]<m?m:C))});c=0;e=b.length;if(0<e){do{k=b[c];h=b[(c+1)%e];if(k[2]===h[2]&&"INOUT"===k[0]&&"OUTIN"===h[0])if(g=k[1],h=h[1],g<h)for(g+=1;g<h;g++)d[g][2]=!0;else if(g>h){for(g+=1;g<d.length;g++)d[g][2]=!0;
for(g=0;g<h;g++)d[g][2]=!0}c=(c+1)%e}while(0!==c)}e=d[0];c=d[d.length-1];e[2]&&(c[2]=!0,f.some(b,function(b){return 1===b[1]?(d.splice(d.length-1,0,a.clone(d[1])),!0):!1}));d=f.filter(d,function(a){return a[2]?!1:!0});for(c=0;c<d.length-1;c++)e=d[c],(h=d[c+1])&&e[0]===h[0]&&e[1]===h[1]&&(h.outIn?e.outIn=!0:h.inOut&&(e.inOut=!0),d.splice(c+1,1));e=Math.abs;b=[];for(c=0;c<d.length-1;c++){k=d[c];g=k[0];k=k[1];w=e(g)===q;l=e(k)===q;h=d[c+1];x=h[0];h=h[1];var z=e(x)===q,O=e(h)===q;w&&O?b.push([c+1,[g,
h]]):l&&z&&b.push([c+1,[x,k]])}for(c=b.length-1;0<=c;c--)h=b[c],g=d[h[0]-1],e=d[h[0]],g.outIn||g.inOut||e.outIn||e.inOut||d.splice(h[0],0,h[1]);e=d[0];c=d[d.length-1];e[0]===c[0]&&e[1]===c[1]||d.push(e);return d}),b.setShape(this._getPathStringFromPaths(e)))},_getCorners:function(a,b){if(T){var c=this._map,e=b.getExtent(),d=e.spatialReference,h=c.toScreen(new y(e.xmin,e.ymax,d)),c=c.toScreen(new y(e.xmax,e.ymin,d));return{tl:h,br:c}}h=a.getTransformedBoundingBox();return{tl:h[0],br:h[2]}},_createSegments:function(a){a.shape.path=
a.vmlPath;a.segmented=!1;a._confirmSegmented();var b=a.segments;1<b.length&&(a.segments=f.filter(b,function(a,b,c){b=c[b+1];return"M"===a.action&&b&&"L"===b.action?(a.args=a.args.concat(b.args),!0):!1}))},_getPathStringFromPaths:function(a){T?(a=f.map(a,function(a){return"m "+f.map(a,function(a,b){return(1===b?"l ":"")+a.join(",")}).join(" ")}),a.push("e")):a=f.map(a,function(a){return"M "+f.map(a,function(a){return a.join(",")}).join(" ")});return a.join(" ")},_isPointWithinBBox:function(a,b){var c=
b[1],e=b[2],d=b[3],h=a[0],f=a[1];return h>b[0]&&h<e&&f>c&&f<d?!0:!1},_isPointWithinRange:function(a,b,c){var e=a.x;a=a.y;return e<b||a<b||e>c||a>c?!1:!0},_getClipperIntersection:function(a,b,c){var e,d=B._getLineIntersection2,h=Math.round,f={length:0};for(e=0;4>e;e++){var q=d(a,b[e]);if(q)if(q[0]=h(q[0]),q[1]=h(q[1]),c)f[e]=q,f.length++;else return[e,q]}return c?f:null},_getPlaneIndex:function(a,b){var c=a[0],e=a[1],d=b[0],h=b[1],f=b[2],q=b[3];return c<=d?e>=h&&e<=q?3:e<h?[0,3]:[2,3]:e<=h?c>=d&&c<=
f?0:c<d?[3,0]:[1,0]:c>=f?e>=h&&e<=q?1:e<h?[0,1]:[2,1]:e>=q?c>=d&&c<=f?2:c<d?[3,2]:[1,2]:-1},onGraphicAdd:function(){},onGraphicRemove:function(){},onGraphicNodeAdd:function(){},onGraphicNodeRemove:function(){},onGraphicDraw:function(){},onGraphicsClear:function(){},onRendererChange:function(){},onOpacityChange:function(){},onInfoTemplateChange:function(){},setInfoTemplate:function(a){this.infoTemplate=a;this.onInfoTemplateChange()},add:function(a,b){if(a._graphicsLayer===this)return a;a._suspended=
this._suspendGraphics;b||this.graphics.push(a);a._graphicsLayer=this;a._sourceLayer||(a._layer&&"esri.layers.GraphicsLayer"!==a._layer.declaredClass?a._sourceLayer=a._layer:"esri.layers.GraphicsLayer"!==this.declaredClass&&(a._sourceLayer=this));a._layer=this;this._updateExtent(a);this._draw(a);if(!b)this.onGraphicAdd(a);return a},remove:function(a,b,c){if(!b&&!c){b=this.graphics;if(-1===(a=f.indexOf(b,a)))return null;a=b.splice(a,1)[0]}a.getDojoShape()&&this._removeShape(a,null,c);a._shape=a._graphicsLayer=
null;this.onGraphicRemove(a);return a},clear:function(a,b){var c=this.graphics,e,d=!T;for(e=c.length-1;0<=e;e--)this.remove(c[e],null,d);this.graphics=[];this._destroyAllNodes();if(!b)this.onGraphicsClear()},_destroyAllNodes:function(){if(!T&&this._div){var a;this._childLayer&&(a=this._childLayer.getNode())&&a.parentNode&&a.parentNode.removeChild(a);this._bgGroup.clear();this._div.clear();this._bgGroup=this._div.createGroup();a&&this._div.getEventSource().appendChild(a);this._initOpacity()}},clearNodes:function(){var a=
this.graphics,b=a.length,c;for(c=0;c<b;c++)this._removeShape(a[c],!0,!0);this._destroyAllNodes()},_setIEOpacity:function(a,b){var c=a&&a.getNode();if(c){var e=a.strokeStyle,d=c.stroke;e&&d&&(d.opacity=e.color.a*b);e=a.fillStyle;d=c.fill;e&&d&&("tile"===d.type?p.set(c,"opacity",b):d.opacity=e.a*b)}},setOpacity:function(a,b){if(b||this.opacity!=a){var c=this._div;c&&(T?(f.forEach(this.graphics,function(b){this._setIEOpacity(b._shape,a);this._setIEOpacity(b._bgShape,a)},this),c._esriIeOpacity=a,this._bgGroup._esriIeOpacity=
a):this._canvas?p.set(c.getEventSource(),"opacity",a):c.getEventSource().setAttribute("opacity",a));this.opacity=a;if(!b)this.onOpacityChange(a)}},setRenderer:function(a){this.renderer=a;this._evalSDRenderer(!0);this.emit("renderer-change",{renderer:this._rndForScale||a})}});m=m([H,D],{declaredClass:"esri.layers.GraphicsLayer",constructor:function(){this.enableMouseEvents=a.hitch(this,this.enableMouseEvents);this.disableMouseEvents=a.hitch(this,this.disableMouseEvents);this._processEvent=a.hitch(this,
this._processEvent);this._initLayer()},_initLayer:function(){this.loaded=!0;this.onLoad(this)},_setMap:function(){var a=this.inherited("_setMap",arguments);this.enableMouseEvents();return a},_unsetMap:function(){this.disableMouseEvents();this.inherited("_unsetMap",arguments)},_processEvent:function(a){var b=this._map,c=a.target,e;a.screenPoint=new z(a.pageX-b.position.x,a.pageY-b.position.y);for(a.mapPoint=b.toMap(a.screenPoint);c&&!(e=c.e_graphic);)c=c.parentNode;if(e)return a.graphic=e,a},_onMouseOverHandler:function(a){if(this._processEvent(a))this.onMouseOver(a)},
_onMouseMoveHandler:function(a){if(this._processEvent(a))this.onMouseMove(a)},_onMouseDragHandler:function(a){if(this._processEvent(a))this.onMouseDrag(a)},_onMouseOutHandler:function(a){if(this._processEvent(a))this.onMouseOut(a)},_onMouseDownHandler:function(a){this._downGr=this._downPt=null;this._processEvent(a)&&(l.disconnect(this._onmousemove_connect),l.disconnect(this._onmousedrag_connect),this._onmousedrag_connect=l.connect(this._div.getEventSource(),"onmousemove",this,"_onMouseDragHandler"),
this._downGr=a.graphic,this._downPt=a.screenPoint.x+","+a.screenPoint.y,this.onMouseDown(a))},_onMouseUpHandler:function(a){this._upGr=this._upPt=null;this._processEvent(a)&&(l.disconnect(this._onmousedrag_connect),l.disconnect(this._onmousemove_connect),this._onmousemove_connect=l.connect(this._div.getEventSource(),"onmousemove",this,"_onMouseMoveHandler"),this._upGr=a.graphic,this._upPt=a.screenPoint.x+","+a.screenPoint.y,this.onMouseUp(a))},_onClickHandler:function(a){if(this._processEvent(a)){var b=
this._downGr,c=this._upGr;b&&c&&b===c&&this._downPt===this._upPt&&(T&&(t._ieGraphic=a.graphic),this.onClick(a))}},_onDblClickHandler:function(a){if(this._processEvent(a))this.onDblClick(a)},onMouseOver:function(){},onMouseMove:function(){},onMouseDrag:function(){},onMouseOut:function(){},onMouseDown:function(){},onMouseUp:function(){},onClick:function(){},onDblClick:function(){},enableMouseEvents:function(){if(!this._mouseEvents){var a=l.connect,b=this._div.getEventSource();Y||(this._onmouseover_connect=
a(b,"onmouseover",this,"_onMouseOverHandler"),this._onmousemove_connect=a(b,"onmousemove",this,"_onMouseMoveHandler"),this._onmouseout_connect=a(b,"onmouseout",this,"_onMouseOutHandler"),this._onmousedown_connect=a(b,"onmousedown",this,"_onMouseDownHandler"),this._onmouseup_connect=a(b,"onmouseup",this,"_onMouseUpHandler"),this._onclick_connect=a(b,"onclick",this,"_onClickHandler"),this._ondblclick_connect=a(b,"ondblclick",this,"_onDblClickHandler"));this._mouseEvents=!0}},disableMouseEvents:function(){if(this._mouseEvents){var a=
l.disconnect;a(this._onmouseover_connect);a(this._onmousemove_connect);a(this._onmousedrag_connect);a(this._onmouseout_connect);a(this._onmousedown_connect);a(this._onmouseup_connect);a(this._onclick_connect);a(this._ondblclick_connect);this._mouseEvents=!1}}});m._GraphicsContainer=x;m._GraphicsLayer=H;w("extend-esri")&&(a.setObject("layers.GraphicsLayer",m,t),a.setObject("layers._GraphicsContainer",x,t),a.setObject("layers._GraphicsLayer",H,t));return m})},"dojox/gfx":function(){define(["dojo/_base/lang",
"./gfx/_base","./gfx/renderer!"],function(m,l,a){l.switchTo(a);return l})},"dojox/gfx/renderer":function(){define(["./_base","dojo/_base/lang","dojo/_base/sniff","dojo/_base/window","dojo/_base/config"],function(m,l,a,f,k){var n=null;a.add("vml",function(a,f,d){d.innerHTML='\x3cv:shape adj\x3d"1"/\x3e';a="adj"in d.firstChild;d.innerHTML="";return a});return{load:function(g,p,d){function c(){p(["dojox/gfx/"+b],function(a){m.renderer=b;n=a;d(a)})}if(n&&"force"!=g)d(n);else{var b=k.forceGfxRenderer;
g=!b&&(l.isString(k.gfxRenderer)?k.gfxRenderer:"svg,vml,canvas,silverlight").split(",");for(var e,h;!b&&g.length;)switch(g.shift()){case "svg":"SVGAngle"in f.global&&(b="svg");break;case "vml":a("vml")&&(b="vml");break;case "silverlight":try{a("ie")?(e=new ActiveXObject("AgControl.AgControl"),e.IsVersionSupported("1.0"))&&(h=!0):navigator.plugins["Silverlight Plug-In"]&&(h=!0)}catch(t){h=!1}finally{e=null}h&&(b="silverlight");break;case "canvas":f.global.CanvasRenderingContext2D&&(b="canvas")}"canvas"===
b&&!1!==k.canvasEvents&&(b="canvasWithEvents");k.isDebug&&console.log("gfx renderer \x3d "+b);"svg"==b&&"undefined"!=typeof window.svgweb?window.svgweb.addOnLoad(c):c()}}}})},"esri/layers/gfxSniff":function(){define(["dojo/has","dojox/gfx"],function(m,l){m.add("esri-svg",function(){return-1!==l.renderer.toLowerCase().indexOf("svg")});return m})},"esri/layers/layer":function(){define("dojo/_base/declare dojo/_base/config dojo/_base/connect dojo/_base/lang dojo/_base/Deferred dojo/_base/json dojo/has ../Evented ../kernel ../lang ../request ../deferredUtils ../urlUtils ../SpatialReference ../geometry/Extent".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r){var w=m([p],{declaredClass:"esri.layers.Layer",_eventMap:{error:["error"],load:["layer"],"opacity-change":["opacity"],"update-end":["error"],"visibility-change":["visible"]},constructor:function(b,e){this._attrs={};b&&f.isString(b)?this._url=h.urlToObject(this.url=b):(this.url=this._url=null,(e=e||b)&&(e.layerDefinition||e.query)&&(e=null));this.spatialReference=new t(4326);this.initialExtent=new r(-180,-90,180,90,new t(4326));this._map=this._div=null;this.normalization=
!0;e&&(e.id&&(this.id=e.id),!1===e.visible&&(this.visible=!1),c.isDefined(e.opacity)&&(this.opacity=e.opacity),c.isDefined(e.minScale)&&this.setMinScale(e.minScale),c.isDefined(e.maxScale)&&this.setMaxScale(e.maxScale),this.attributionDataUrl=e.attributionDataUrl||"",this.hasAttributionData=!!this.attributionDataUrl,c.isDefined(e.showAttribution)&&(this.showAttribution=e.showAttribution),this.className=e.className,this.refreshInterval=e.refreshInterval||0);this._errorHandler=f.hitch(this,this._errorHandler);
this.refresh=f.hitch(this,this.refresh);if(this.managedSuspension){var d=this._setMap;this._setMap=function(b){var c=d.apply(this,arguments);this.evaluateSuspension();if(this.suspended&&!b.loaded)var e=a.connect(b,"onLoad",this,function(){a.disconnect(e);e=null;this.evaluateSuspension()});return c}}this.registerConnectEvents()},id:null,visible:!0,opacity:1,loaded:!1,loadError:null,minScale:0,maxScale:0,visibleAtMapScale:!1,suspended:!0,attributionDataUrl:"",hasAttributionData:!1,showAttribution:!0,
refreshInterval:0,_errorHandler:function(a){this.loaded||(this.loadError=a);this.onError(a)},_setMap:function(b,c,e,d){this._map=b;this._lyrZEHandle=a.connect(b,"onZoomEnd",this,this._processMapScale);if(b.loaded)this.visibleAtMapScale=this._isMapAtVisibleScale();else var h=a.connect(b,"onLoad",this,function(){a.disconnect(h);h=null;this._processMapScale()})},_unsetMap:function(b,c){a.disconnect(this._lyrZEHandle);this._toggleRT();this._map=this._lyrZEHandle=null;this._resumedOnce=void 0;this.suspended=
!0},_cleanUp:function(){this._map=this._div=null},_fireUpdateStart:function(){this.updating||(this.updating=!0,this.attr("data-updating",""),this._toggleRT(),this.onUpdateStart(),this._map&&this._map._incr())},_fireUpdateEnd:function(a,b){this.updating&&(this.updating=!1,this.attr("data-updating"),this._toggleRT(!0),this.onUpdateEnd(a,b),this._map&&this._map._decr())},_getToken:function(){var a=this._url,b=this.credential;return a&&a.query&&a.query.token||b&&b.token||void 0},_findCredential:function(){this.credential=
d.id&&this._url&&d.id.findCredential(this._url.path)},_useSSL:function(){var a=this._url,b=/^http:/i;this.url&&(this.url=this.url.replace(b,"https:"));a&&a.path&&(a.path=a.path.replace(b,"https:"))},refresh:function(){},show:function(){this.setVisibility(!0)},hide:function(){this.setVisibility(!1)},setMinScale:function(a){this.setScaleRange(a)},setMaxScale:function(a){this.setScaleRange(null,a)},setScaleRange:function(a,b){var e=c.isDefined(a),d=c.isDefined(b);this.loaded||(this._hasMin=this._hasMin||
e,this._hasMax=this._hasMax||d);var h=this.minScale,f=this.maxScale;this.minScale=(e?a:this.minScale)||0;this.maxScale=(d?b:this.maxScale)||0;if(h!==this.minScale||f!==this.maxScale)this.onScaleRangeChange(),this._processMapScale()},suspend:function(){this._suspended=!0;this.evaluateSuspension()},resume:function(){this._suspended=!1;this.evaluateSuspension()},canResume:function(){return this.loaded&&this._map&&this._map.loaded&&this.visible&&this.visibleAtMapScale&&!this._suspended},evaluateSuspension:function(){this.canResume()?
this.suspended&&this._resume():this.suspended||this._suspend()},_suspend:function(){this.suspended=!0;this.attr("data-suspended","");this._toggleRT();this.onSuspend();if(this._map)this._map.onLayerSuspend(this)},_resume:function(){this.suspended=!1;this.attr("data-suspended");var a=void 0===this._resumedOnce,b=this.className,c=this._attrs,e=this.getNode(),d;if(a){this._resumedOnce=!0;if(b&&e){var h=e.getAttribute("class")||"";(new RegExp("(^|\\s)"+b+"(\\s|$)","i")).test(h)||e.setAttribute("class",
h+((h?" ":"")+b))}if(c&&e)for(d in c)c.hasOwnProperty(d)&&e.setAttribute(d,c[d])}this._toggleRT(!0);this.onResume({firstOccurrence:a});if(this._map)this._map.onLayerResume(this)},_processMapScale:function(){var a=this.visibleAtMapScale;this.visibleAtMapScale=this._isMapAtVisibleScale();a!==this.visibleAtMapScale&&(this.onScaleVisibilityChange(),this.evaluateSuspension())},isVisibleAtScale:function(a){return a?w.prototype._isMapAtVisibleScale.apply(this,arguments):!1},_isMapAtVisibleScale:function(a,
b){if(!(a||this._map&&this._map.loaded))return!1;var c=this._map;a=a||c.getScale();var e=this.minScale,d=this.maxScale,h=!e,f=!d,q;b&&(q=c.width>c.height?c.width:c.height);h||(a<=e?h=!0:b&&(h=Math.abs(e-a)/e<1/q));f||(a>=d?f=!0:b&&(f=Math.abs(d-a)/d<1/q));return h&&f},getAttributionData:function(){var a=this.attributionDataUrl,c=new k(e._dfdCanceller);this.hasAttributionData&&a?(c._pendingDfd=b({url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}),c._pendingDfd.then(function(a){c.callback(a)},
function(a){c.errback(a)})):(a=Error("Layer does not have attribution data"),a.log=!!l.isDebug,c.errback(a));return c},getResourceInfo:function(){var a=this.resourceInfo;return f.isString(a)?n.fromJson(a):f.clone(a)},getMap:function(){return this._map},getNode:function(){return this._div},attr:function(a,b){var c=this.getNode();if("data-reference"===a&&11>g("ie"))return this;c&&(null==b?c.removeAttribute(a):c.setAttribute(a,b));this._attrs&&(null==b?delete this._attrs[a]:this._attrs[a]=b);return this},
setRefreshInterval:function(a){var b=this.refreshInterval;this.refreshInterval=a;this._toggleRT();a&&(this.updating||this.suspended||this._toggleRT(!0));if(b!==a)this.onRefreshIntervalChange();return this},_toggleRT:function(a){a&&this.refreshInterval?(clearTimeout(this._refreshT),this._refreshT=setTimeout(this.refresh,6E4*this.refreshInterval)):this._refreshT&&(clearTimeout(this._refreshT),this._refreshT=null)},setNormalization:function(a){this.normalization=a},setVisibility:function(a){this.visible!==
a&&(this.visible=a,this.onVisibilityChange(this.visible),this.evaluateSuspension());this.attr("data-hidden",a?null:"")},onLoad:function(){},onVisibilityChange:function(){},onScaleRangeChange:function(){},onScaleVisibilityChange:function(){},onSuspend:function(){},onResume:function(){},onUpdate:function(){},onUpdateStart:function(){},onUpdateEnd:function(){},onRefreshIntervalChange:function(){},onError:function(){}});g("extend-esri")&&f.setObject("layers.Layer",w,d);return w})},"esri/request":function(){define("require dojo/_base/array dojo/_base/config dojo/_base/Deferred dojo/_base/lang dojo/_base/url dojo/_base/xhr ./core/request/script dojo/request/iframe dojo/dom-construct dojo/io-query ./kernel ./config ./sniff ./lang ./urlUtils ./deferredUtils".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u){function q(a){a=new n(a);return(a.host+(a.port?":"+a.port:"")).toLowerCase()}function x(a){return this._xhr?this._xhr.getResponseHeader(a):null}function v(h,q,v,n){var u=!1,x=!1,m,B;r.isDefined(q)&&(k.isObject(q)?(u=!!q.useProxy,x=!!q.usePost,m=q.crossOrigin):u=!!q);h=k.mixin({},h);h._ssl&&(h.url=h.url.replace(/^http:/i,"https:"));10>t("ie")&&!T.test(h.url)&&(h.url=encodeURI(h.url));q=h.content;var y=h.url,C=v&&h.form,z=H;m=r.isDefined(m)?m:z.useCors;h.load=
function(b){var c;b&&(b.error?(c=k.mixin(Error(),b.error),c.log=!!a.isDebug):"error"===b.status&&(c=k.mixin(Error(),b),c.log=!!a.isDebug),c&&(h.failOk=!c.log,r.isDefined(c.httpCode)||(c.httpCode=c.code)));return c||b};h.error=function(b,c){c&&c.xhr&&c.xhr.abort();b instanceof Error||(b=k.mixin(Error(),b));b.log=!!a.isDebug;h.failOk=!b.log;z.errorHandler(b,c);return b};h._token&&(h.content=h.content||{},h.content.token=h._token);var O=0,E;q&&y&&(E=b.objectToQuery(q),O=E.length+y.length+1,t("esri-url-encodes-apostrophe")&&
(O=E.replace(/'/g,"%27").length+y.length+1));h.timeout=r.isDefined(h.timeout)?h.timeout:z.timeout;h.handleAs=h.handleAs||"json";try{var R,ga,fa=m&&w.canUseXhr(h.url)&&!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(h.url),F=w.hasSameOrigin(h.url,window.location.href)||fa,S=x||v||O>z.postLength?!0:!1,K=F||-1===h.handleAs.indexOf("json")||!h.callbackParamName||v?!1:!0,V=w.getProxyRule(h.url)||z.alwaysUseProxy||u||(!K||S)&&!F?!0:!1;v&&!t("esri-file-upload")&&!V&&fa&&(V=!0);if(V)if(R=w.getProxyUrl(y,
m),ga=R.path,R._xo&&(fa=!0),!S&&ga.length+1+O>z.postLength&&(S=!0),h.url=ga+"?"+y,S)h.content=k.mixin(R.query||{},q);else{var Z=b.objectToQuery(k.mixin(R.query||{},q));Z&&(h.url+="?"+Z);h.content=null}if(!K||S||V){var ma=h.headers;!fa||ma&&ma.hasOwnProperty("X-Requested-With")||(ma=h.headers=ma||{},ma["X-Requested-With"]=null);if(v){var ta=h.callbackParamName||"callback.html",ya=h.callbackElementName||"textarea",Ca,pa,ka,Ea,Wa=C.elements?C.elements.length:0,Oa;if(q=h.content)for(Ca in q.token&&-1<
y.toLowerCase().indexOf("/sharing/servers/")&&(y+=(-1===y.indexOf("?")?"?":"\x26")+"token\x3d"+q.token,h.url=V?ga+"?"+y:y,delete q.token),q)if(ka=q[Ca],r.isDefined(ka)){pa=null;for(Ea=0;Ea<Wa;Ea++)if(Oa=C.elements[Ea],Oa.name===Ca){pa=Oa;break}pa?pa.value=ka:n?C.append(Ca,ka):C.appendChild(c.create("input",{type:"hidden",name:Ca,value:ka}))}if(t("esri-file-upload"))l.forEach(C.elements,function(a){a.name===ta&&C.removeChild(a)}),h.contentType=!1,h.postData=n?C:new FormData(C),delete h.form;else{C.enctype=
"multipart/form-data";9>t("ie")&&(C.encoding="multipart/form-data");C.method="post";l.some(C.elements,function(a){return a.name===ta})||C.appendChild(c.create("input",{type:"hidden",name:ta,value:ya}));if(-1!==y.toLowerCase().indexOf("addattachment")||-1!==y.toLowerCase().indexOf("updateattachment"))y+=(-1===y.indexOf("?")?"?":"\x26")+ta+"\x3d"+ya,h.url=V?ga+"?"+y:y;delete h.content}}if(fa&&!h.hasOwnProperty("withCredentials")&&"with-credentials"===H.useCors){n=V?ga:y;var Ia=w.canUseXhr(n,!0),Ga=
-1<Ia?H.corsEnabledServers[Ia]:null;if(Ga&&Ga.hasOwnProperty("withCredentials"))Ga.withCredentials&&(h.withCredentials=!0);else if(e.id){var Ma=e.id.findServerInfo(n);Ma&&Ma.webTierAuth&&(h.withCredentials=!0)}}h=D?D(h):h;if(S){if(v&&!t("esri-file-upload")){B=new f(function(){Ja.cancel()});var Ja=d.post(h.url,h).then(function(a){B.resolve(a)}).otherwise(function(a){B.reject(a)});B.addCallback(function(a){return h.load(a)});B.addErrback(function(a){return h.error(a)});return B}!V&&t("safari")&&(h.url+=
(-1===h.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+Y++);return g.post(h)}return g.get(h)}h=D?D(h):h;h.jsonp=h.callbackParamName;h.query=h.content;B=new f(function(){ab.cancel()});var ab=p.get(h.url,h).then(function(a){B.resolve(a)}).otherwise(function(a){B.reject(a)});B.addCallback(function(a){return h.load(a)});B.addErrback(function(a){return h.error(a)});return B}catch(Ka){return B=new f,B.errback(h.error(Ka)),B}}function C(b){var c=H.corsStatus,e=w.canUseXhr(b,!0);-1<e&&H.corsEnabledServers.splice(e,
1);var d=new f;d.reject({log:!!a.isDebug});c[q(b)]=d.promise;return e}function y(a){var b=H.corsStatus;try{var c=q(a);if(H.corsDetection&&H.useCors&&t("esri-cors")&&a&&-1!==a.toLowerCase().indexOf("/rest/services")&&!w.hasSameOrigin(a,window.location.href)&&!w.canUseXhr(a)){if(b[c]&&!b[c].isCanceled())return b[c];var e=new f(u._dfdCanceller);b[c]=e.promise;var d=g.get({url:a.substring(0,a.toLowerCase().indexOf("/rest/")+6)+"info",content:{f:"json"},failOk:!0,handleAs:"json",headers:{"X-Requested-With":null},
timeout:1E3*H.corsDetectionTimeout});e._pendingDfd=d;d.then(function(b){b?(w.canUseXhr(a)||H.corsEnabledServers.push(c),e.resolve()):e.reject()},function(a){e.reject(a)});return e.promise}}catch(ea){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}return F}function z(a){D=a}function E(b,c,d,h){function f(b){b._pendingDfd=v(d,h,z,y);if(!b._pendingDfd){b.ioArgs=b._pendingDfd&&b._pendingDfd.ioArgs;var c=Error("Deferred object is missing");c.log=!!a.isDebug;b.errback(c);
b._pendingDfd=null;return b}b._pendingDfd.addCallback(function(a){b.ioArgs=b._pendingDfd&&b._pendingDfd.ioArgs;h.returnFullResponse&&(a={data:a,_xhr:b.ioArgs&&b.ioArgs.xhr,getHeader:x});b.callback(a);b._pendingDfd=null}).addErrback(function(a){var c,f,q;a&&(c=a.code,f=a.subcode,q=(q=a.messageCode)&&q.toUpperCase());if(a&&403==c&&(4==f||a.message&&-1<a.message.toLowerCase().indexOf("ssl")&&-1===a.message.toLowerCase().indexOf("permission"))){if(!d._ssl){d._ssl=d._sslFromServer=!0;E(b,!0,d,h);return}}else if(a&&
415==a.status){if(C(d.url),!d._err415){d._err415=1;E(b,!0,d,h);return}}else if(e.id&&-1!==l.indexOf(e.id._errorCodes,c)&&!e.id._isPublic(d.url)&&!n&&(403!=c||-1===l.indexOf(O,q)&&(!r.isDefined(f)||2==f&&d._token))){b._pendingDfd=e.id.getCredential(d.url,{token:d._token,error:a});b._pendingDfd.addCallback(function(a){d._token=a.token;d._credential=a;d._ssl=d._sslFromServer||a.ssl;E(b,!0,d,h)}).addErrback(function(a){b.errback(a);b._pendingDfd=null});return}b.ioArgs=b._pendingDfd&&b._pendingDfd.ioArgs;
b.isFulfilled()||b.errback(a);b._pendingDfd=null})}var k=d.form,n=h.disableIdentityLookup,p=h._preLookup,u=!1;if(t("esri-workers")&&!1!==H.useWorkers)if(!0===h.useWorkers||!0===H.useWorkers)u=!0;else if(h.workerOptions){var B=h.workerOptions;if(B.callback||B.worker&&B.worker.worker instanceof Worker)u=!0}var y=k&&t("esri-file-upload")&&k instanceof FormData,z=k&&(k.elements?l.some(k.elements,function(a){return"file"===a.type}):y),D=-1!==d.url.toLowerCase().indexOf("token\x3d")||d.content&&d.content.token||
z&&l.some(k.elements,function(a){return"token"===a.name})?1:0;if(!c){b.addCallback(function(a){if((/\/sharing\/rest\/accounts\/self/i.test(d.url)||/\/sharing\/rest\/portals\/self/i.test(d.url))&&!D&&!d._token&&a.user&&a.user.username){H.webTierAuthServers.push(q(d.url));a=H.corsEnabledServers;var b=w.canUseXhr(d.url,!0),c={host:q(d.url),withCredentials:!0};if(-1===b)a.push(c);else{var h=a[b];"object"===typeof h?h.withCredentials=!0:a.splice(b,1,c)}}if(a=d._credential)if(b=(b=e.id.findServerInfo(a.server))&&
b.owningSystemUrl)b=b.replace(/\/?$/,"/sharing"),(a=e.id.findCredential(b,a.userId))&&-1===e.id._getIdenticalSvcIdx(b,a)&&a.resources.splice(0,0,b)});b.addBoth(function(a){delete d._credential;!a||t("ie")&&a.nodeType||(a._ssl=d._ssl)});var Y=d.load,ga=d.error;Y&&b.addCallback(function(a){var c=b._pendingDfd,c=c&&c.ioArgs;return Y.call(c&&c.args,a,c)});ga&&b.addErrback(function(a){var c=b._pendingDfd,c=c&&c.ioArgs;return ga.call(c&&c.args,a,c)})}!e.id||D||d._token||e.id._isPublic(d.url)||n&&!p||!(c=
e.id.findCredential(d.url))||(d._token=c.token,d._ssl=c.ssl);u?h.workerOptions&&h.workerOptions.worker?(R||(R=g),g=h.workerOptions.worker,f(b)):m(["./workers/RequestClient"],function(a){R||(R=g);if(h.workerOptions){var c=h.workerOptions;g=a.getClient(c.callback,c.cbFunction)}else g=a.getClient();f(b)}):(R&&(g=R,R=null),f(b));return b}function B(a,b){a.url=w.fixUrl(a.url);b=b||{};var c=new f(u._dfdCanceller),e=y(a.url);c._pendingDfd=e;e.always(function(e){e&&"cancel"===e.dojoType?c.reject(e):E(c,!1,
a,b)});return c}var R=null,D,H=h.defaults.io,O=["COM_0056","COM_0057"],Y=0,T=/%[0-9A-F]{2}/i,F=function(){var a=new f;a.resolve();return a.promise}();B._makeRequest=v;B._processRequest=E;B._disableCors=C;B._detectCors=y;B.setRequestPreCallback=z;t("extend-esri")&&(e.request=B,e._makeRequest=v,e._processRequest=E,e._disableCors=C,e._detectCors=y,e.setRequestPreCallback=z);return B})},"esri/core/request/script":function(){define("require exports dojo/Deferred dojo/request/script dojo/text!./iframe.html ../sniff".split(" "),
function(m,l,a,f,k,n){function g(){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 b=m.toUrl("dojo/dojo.js"),c=k.replace("../../../dojo/dojo.js",b),b=b.slice(0,-7),c=c.replace("../../../dojo/",b);a.srcdoc=c}else c=m.toUrl("./iframe.html"),"http:"===window.location.protocol&&0===c.indexOf("https:")&&(c=c.replace("https:","http:")),a.src=c;document.body.appendChild(a);return a}function p(){var a=
new MessageChannel;a.port1.addEventListener("message",d);a.port1.start();return a}function d(a){var c=a.data;if("ready"===c){for(var c=0,e=r;c<e.length;c++)a=e[c],b(a,h);r=null}else if(a=w[c.id])delete w[c.id],c.isError?a.dfd.reject(Error(c.message)):a.dfd.resolve(c.response)}function c(a,b){a.addEventListener("load",function(){a.contentWindow.postMessage("init","*",[b.port2])})}function b(a,b){w[a.message.id]=a;b.port1.postMessage(a.message)}Object.defineProperty(l,"__esModule",{value:!0});var e,
h,t=0,r=[],w={};l.get=function(d,q){if(!n("esri-script-sandbox"))return f.get(d,q);var k=null;q&&(k={jsonp:q.jsonp,preventCache:q.preventCache,query:q.query,timeout:q.timeout});var v=new a(function(){if(r){var a=r.indexOf(l);-1<a&&r.splice(a,1)}else l.message.id in w&&delete w[l.message.id]}),l={dfd:v,message:{id:"id"+(++t+Math.random()),url:d,options:k}};e||(e=g(),h=p(),c(e,h));r?r.push(l):b(l,h);return v.promise}})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b){function e(a,b){a.canDelete&&u._remove(a.id,b.options.frameDoc,!0)}function h(a){z&&z.length&&(k.forEach(z,function(a){u._remove(a.id,a.frameDoc);a.frameDoc=null}),z=[]);return a.options.jsonp?!a.data:!0}function t(a){return!!this.scriptLoaded}function r(a){return(a=a.options.checkString)&&eval("typeof("+a+') !\x3d\x3d "undefined"')}function w(a,b){if(this.canDelete){var c=this.response.options;z.push({id:this.id,frameDoc:c.ioArgs?c.ioArgs.frameDoc:c.frameDoc});c.ioArgs&&
(c.ioArgs.frameDoc=null);c.frameDoc=null}b?this.reject(b):this.resolve(a)}function u(b,c,d){var f=a.parseArgs(b,a.deepCopy({},c));b=f.url;c=f.options;var k=a.deferred(f,e,h,c.jsonp?null:c.checkString?r:t,w);n.mixin(k,{id:q+x++,canDelete:!1});c.jsonp&&((new RegExp("[?\x26]"+c.jsonp+"\x3d")).test(b)||(b+=(~b.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+q+"_callbacks."+k.id),k.canDelete=!0,y[k.id]=function(a){f.data=a;k.handleResponse(f)});a.notify&&a.notify.emit("send",f,k.promise.cancel);
if(!c.canAttach||c.canAttach(k)){var p=u._attach(k.id,b,c.frameDoc,function(a){if(!(a instanceof Error)){var b=Error("Error loading "+(a.target?a.target.src:"script"));b.source=a;a=b}k.reject(a);u._remove(k.id,c.frameDoc,!0)});if(!c.jsonp&&!c.checkString)var m=g(p,v,function(a){if("load"===a.type||C.test(p.readyState))m.remove(),k.scriptLoaded=a})}l(k);return d?k:k.promise}c.add("script-readystatechange",function(a,b){return"undefined"!==typeof b.createElement("script").onreadystatechange&&("undefined"===
typeof a.opera||"[object Opera]"!==a.opera.toString())});var q=m.id.replace(/[\/\.\-]/g,"_"),x=0,v=c("script-readystatechange")?"readystatechange":"load",C=/complete|loaded/,y=f.global[q+"_callbacks"]={},z=[];u.get=u;u._attach=function(a,c,e,d){e=e||b.doc;var h=e.createElement("script");if(d)g.once(h,"error",d);h.type="text/javascript";try{h.src=c}catch(O){d&&d(h)}h.id=a;h.async=!0;h.charset="utf-8";return e.getElementsByTagName("head")[0].appendChild(h)};u._remove=function(a,b,c){d.destroy(p.byId(a,
b));y[a]&&(c?y[a]=function(){delete y[a]}:delete y[a])};u._callbacksProperty=q+"_callbacks";return u})},"esri/core/sniff":function(){define(["../sniff"],function(m){return m})},"dojo/request/iframe":function(){define("module require ./watch ./util ./handlers ../_base/lang ../io-query ../query ../has ../dom ../dom-construct ../_base/window ../NodeList-dom".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e){function h(a){return!this.isFulfilled()}function t(a){return!!this._finished}function r(a,b){if(!b)try{var c=
a.options,e=u.doc(u._frame),d=c.handleAs;if("html"!==d){if("xml"===d)if("html"===e.documentElement.tagName.toLowerCase()){p("a",e.documentElement).orphan();var h=e.documentElement.innerText||e.documentElement.textContent,h=h.replace(/>\s+</g,"\x3e\x3c");a.text=n.trim(h)}else a.data=e;else a.text=e.getElementsByTagName("textarea")[0].value;k(a)}else a.data=e}catch(D){b=D}b?this.reject(b):this._finished?this.resolve(a):this.reject(Error("Invalid dojo/request/iframe request state"))}function w(a){this._callNext()}
function u(b,c,e){var d=f.parseArgs(b,f.deepCreate(v,c),!0);b=d.url;c=d.options;if("GET"!==c.method&&"POST"!==c.method)throw Error(c.method+" not supported by dojo/request/iframe");u._frame||(u._frame=u.create(u._iframeName,x+"();"));b=f.deferred(d,null,h,t,r,w);b._callNext=function(){this._calledNext||(this._calledNext=!0,u._currentDfd=null,u._fireNextRequest())};b._legacy=e;u._dfdQueue.push(b);u._fireNextRequest();a(b);return e?b:b.promise}var q=m.id.replace(/[\/\.\-]/g,"_"),x=q+"_onload";e.global[x]||
(e.global[x]=function(){var a=u._currentDfd;if(a){var e=c.byId(a.response.options.form)||a._tmpForm;if(e){for(var d=a._contentToClean,h=0;h<d.length;h++)for(var f=d[h],q=0;q<e.childNodes.length;q++){var g=e.childNodes[q];if(g.name===f){b.destroy(g);break}}a._originalAction&&e.setAttribute("action",a._originalAction);a._originalMethod&&(e.setAttribute("method",a._originalMethod),e.method=a._originalMethod);a._originalTarget&&(e.setAttribute("target",a._originalTarget),e.target=a._originalTarget)}a._tmpForm&&
(b.destroy(a._tmpForm),delete a._tmpForm);a._finished=!0}else u._fireNextRequest()});var v={method:"POST"};u.create=function(a,c,h){if(e.global[a])return e.global[a];if(e.global.frames[a])return e.global.frames[a];h||(d("config-useXDomain")&&!d("config-dojoBlankHtmlUrl")&&console.warn("dojo/request/iframe: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set dojoConfig.dojoBlankHtmlUrl to the path on your domain to blank.html"),h=d("config-dojoBlankHtmlUrl")||
l.toUrl("dojo/resources/blank.html"));c=b.place('\x3ciframe id\x3d"'+a+'" name\x3d"'+a+'" src\x3d"'+h+'" onload\x3d"'+c+'" style\x3d"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden"\x3e',e.body());return e.global[a]=c};u.doc=function(a){if(a.contentDocument)return a.contentDocument;var b=a.name;if(b){var c=e.doc.getElementsByTagName("iframe");if(a.document&&c[b].contentWindow&&c[b].contentWindow.document)return c[b].contentWindow.document;if(e.doc.frames[b]&&e.doc.frames[b].document)return e.doc.frames[b].document}return null};
u.setSrc=function(a,b,c){a=e.global.frames[a.name];a.contentWindow&&(a=a.contentWindow);try{c?a.location.replace(b):a.location=b}catch(E){console.log("dojo/request/iframe.setSrc: ",E)}};u._iframeName=q+"_IoIframe";u._notifyStart=function(){};u._dfdQueue=[];u._currentDfd=null;u._fireNextRequest=function(){var a;try{if(!u._currentDfd&&u._dfdQueue.length){do a=u._currentDfd=u._dfdQueue.shift();while(a&&(a.canceled||a.isCanceled&&a.isCanceled())&&u._dfdQueue.length);if(!a||a.canceled||a.isCanceled&&a.isCanceled())u._currentDfd=
null;else{var d=a.response,h=d.options,k=a._contentToClean=[],r=c.byId(h.form),v=f.notify,p=h.data||null,t;a._legacy||"POST"!==h.method||r?"GET"===h.method&&r&&-1<d.url.indexOf("?")&&(t=d.url.slice(d.url.indexOf("?")+1),p=n.mixin(g.queryToObject(t),p)):r=a._tmpForm=b.create("form",{name:q+"_form",style:{position:"absolute",top:"-1000px",left:"-1000px"}},e.body());if(r){if(!a._legacy){var w=r;do w=w.parentNode;while(w&&w!==e.doc.documentElement);w||(r.style.position="absolute",r.style.left="-1000px",
r.style.top="-1000px",e.body().appendChild(r));r.name||(r.name=q+"_form")}if(p){var w=function(a,c){b.create("input",{type:"hidden",name:a,value:c},r);k.push(a)},l;for(l in p){var m=p[l];if(n.isArray(m)&&1<m.length)for(t=0;t<m.length;t++)w(l,m[t]);else r[l]?r[l].value=m:w(l,m)}}var x=r.getAttributeNode("action"),S=r.getAttributeNode("method"),K=r.getAttributeNode("target");d.url&&(a._originalAction=x?x.value:null,x?x.value=d.url:r.setAttribute("action",d.url));a._legacy?S&&S.value||(S?S.value=h.method:
r.setAttribute("method",h.method)):(a._originalMethod=S?S.value:null,S?S.value=h.method:r.setAttribute("method",h.method));a._originalTarget=K?K.value:null;K?K.value=u._iframeName:r.setAttribute("target",u._iframeName);r.target=u._iframeName;v&&v.emit("send",d,a.promise.cancel);u._notifyStart(d);r.submit()}else h="",d.options.data&&(h=d.options.data,"string"!==typeof h&&(h=g.objectToQuery(h))),w=d.url+(-1<d.url.indexOf("?")?"\x26":"?")+h,v&&v.emit("send",d,a.promise.cancel),u._notifyStart(d),u.setSrc(u._frame,
w,!0)}}}catch(Z){a.reject(Z)}};f.addCommonMethods(u,["GET","POST"]);return u})},"esri/domUtils":function(){define(["./kernel","dojo/_base/connect","dojo/_base/lang","dojo/dom-style","dojo/has"],function(m,l,a,f,k){var n={show:function(a){if(a=n.getNode(a))a.style.display="block"},getNode:function(a){return a&&a.domNode||a},hide:function(a){if(a=n.getNode(a))a.style.display="none"},toggle:function(a){if(a=n.getNode(a))a.style.display="none"===a.style.display?"block":"none"},documentBox:8>=k("ie")?
{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:{w:window.innerWidth,h:window.innerHeight},setScrollable:function(a){if(a=this.getNode(a)){var g=0,d=0,c=0,b=0,e=0,h=0;return[l.connect(a,"ontouchstart",function(f){g=f.touches[0].screenX;d=f.touches[0].screenY;c=a.scrollWidth;b=a.scrollHeight;e=a.clientWidth;h=a.clientHeight}),l.connect(a,"ontouchmove",function(k){k.preventDefault();var r=a.firstChild;r instanceof Text&&(r=a.childNodes[1]);var n=r._currentX||0,p=r._currentY||
0,n=n+(k.touches[0].screenX-g);0<n?n=0:0>n&&Math.abs(n)+e>c&&(n=-1*(c-e));r._currentX=n;p+=k.touches[0].screenY-d;0<p?p=0:0>p&&Math.abs(p)+h>b&&(p=-1*(b-h));r._currentY=p;f.set(r,{"-webkit-transition-property":"-webkit-transform","-webkit-transform":"translate("+n+"px, "+p+"px)"});g=k.touches[0].screenX;d=k.touches[0].screenY})]}}};k("extend-esri")&&a.mixin(m,n);return n})},"esri/symbols/MarkerSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ./Symbol".split(" "),
function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.symbol.MarkerSymbol",angle:0,xoffset:0,yoffset:0,size:12,constructor:function(a){a&&l.isObject(a)&&(this.size="auto"===this.size?this.size:f.pt2px(this.size),this.xoffset=f.pt2px(this.xoffset),this.yoffset=f.pt2px(this.yoffset),this.angle&&(this.angle*=-1))},setAngle:function(a){this.angle=a;return this},setSize:function(a){this.size=a;return this},setOffset:function(a,f){this.xoffset=a;this.yoffset=f;return this},toJson:function(){var a=f.px2pt(this.size),
a=isNaN(a)?void 0:a,k=f.px2pt(this.xoffset),k=isNaN(k)?void 0:k,d=f.px2pt(this.yoffset),d=isNaN(d)?void 0:d;return l.mixin(this.inherited("toJson",arguments),{size:"auto"===this.size?this.size:a,angle:this.angle&&-1*this.angle,xoffset:k,yoffset:d})}});a("extend-esri")&&l.setObject("symbol.MarkerSymbol",m,k);return m})},"esri/symbols/Symbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../Color".split(" "),function(m,l,a,f,k,n){m=m(null,{declaredClass:"esri.symbol.Symbol",
color:new n([0,0,0,1]),type:null,constructor:function(a){a&&l.isObject(a)&&(l.mixin(this,a),this.color&&k.isDefined(this.color[0])&&(this.color=n.toDojoColor(this.color)),(a=this.type)&&0===a.indexOf("esri")&&(this.type={esriSMS:"simplemarkersymbol",esriPMS:"picturemarkersymbol",esriSLS:"simplelinesymbol",esriCLS:"cartographiclinesymbol",esriSFS:"simplefillsymbol",esriPFS:"picturefillsymbol",esriTS:"textsymbol",esriSHD:"shieldlabelsymbol"}[a]))},setColor:function(a){this.color=a;return this},toJson:function(){return{color:n.toJsonColor(this.color)}}});
a("extend-esri")&&l.setObject("symbol.Symbol",m,f);return m})},"esri/symbols/SimpleMarkerSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./MarkerSymbol ./SimpleLineSymbol".split(" "),function(m,l,a,f,k,n,g,p,d){var c={STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_PATH:"path",STYLE_TARGET:"target"},b={style:c.STYLE_CIRCLE,color:[255,255,255,.25],size:12,angle:0,xoffset:0,
yoffset:0};m=m(p,{declaredClass:"esri.symbol.SimpleMarkerSymbol",type:"simplemarkersymbol",_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond",path:"esriSMSPath"},constructor:function(e,h,f,r){e?l.isString(e)?(this.style=e,h&&(this.size=h),f&&(this.outline=f),r&&(this.color=r)):(this.style=g.valueOf(this._styles,this.style),e.outline&&(this.outline=new d(e.outline))):(l.mixin(this,b),this.size=k.pt2px(this.size),this.outline=new d(this.outline),
this.color=new a(this.color));this.style||(this.style=c.STYLE_CIRCLE)},setStyle:function(a){this.style=a;return this},setPath:function(a){this.path=a;this.setStyle(c.STYLE_PATH);return this},setOutline:function(a){this.outline=a;return this},getStroke:function(){return this.outline&&this.outline.getStroke()},getFill:function(){return this.color},_setDim:function(a,b,c){this._targetWidth=a;this._targetHeight=b;this._spikeSize=c},getShapeDescriptors:function(){var a,d,f,g=this.style,n=(this.size||k.pt2px(b.size))/
2,p=0-n,q=0+n,l=0-n,v=0+n;switch(g){case c.STYLE_CIRCLE:a={type:"circle",cx:0,cy:0,r:n};d=this.getFill();if(f=this.getStroke())f.style=f.style||"Solid";break;case c.STYLE_CROSS:a={type:"path",path:"M "+p+",0 L "+q+",0 M 0,"+l+" L 0,"+v+" E"};d=null;f=this.getStroke();break;case c.STYLE_DIAMOND:a={type:"path",path:"M "+p+",0 L 0,"+l+" L "+q+",0 L 0,"+v+" L "+p+",0 Z"};d=this.getFill();f=this.getStroke();break;case c.STYLE_SQUARE:a={type:"path",path:"M "+p+","+v+" L "+p+","+l+" L "+q+","+l+" L "+q+
","+v+" L "+p+","+v+" Z"};d=this.getFill();f=this.getStroke();break;case c.STYLE_X:a={type:"path",path:"M "+p+","+v+" L "+q+","+l+" M "+p+","+l+" L "+q+","+v+" E"};d=null;f=this.getStroke();break;case c.STYLE_PATH:a={type:"path",path:this.path||""},d=this.getFill(),f=this.getStroke()}return{defaultShape:a,fill:d,stroke:f}},toJson:function(){var a=this.style,b=this.outline,c=l.mixin(this.inherited("toJson",arguments),{type:"esriSMS",style:this._styles[a]||"esriSMSCircle"});b&&(c.outline=b.toJson());
"x"===a||"cross"===a?delete c.color:"target"===a&&(c.style="esriSMSSquare",delete c.color,0<this._targetHeight&&0<this._targetWidth&&(c.size=k.px2pt(Math.max(this._targetHeight,this._targetWidth))));c.path=this.path;return g.fixJson(c)}});l.mixin(m,c);m.defaultProps=b;f("extend-esri")&&(l.setObject("symbol.SimpleMarkerSymbol",m,n),n.symbol.defaultSimpleMarkerSymbol=b);return m})},"esri/symbols/SimpleLineSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./LineSymbol".split(" "),
function(m,l,a,f,k,n,g,p){var d={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none",STYLE_SHORTDASH:"shortdash",STYLE_SHORTDOT:"shortdot",STYLE_SHORTDASHDOT:"shortdashdot",STYLE_SHORTDASHDOTDOT:"shortdashdotdot",STYLE_LONGDASH:"longdash",STYLE_LONGDASHDOT:"longdashdot"},c={color:[0,0,0,1],style:d.STYLE_SOLID,width:1};m=m(p,{declaredClass:"esri.symbol.SimpleLineSymbol",type:"simplelinesymbol",marker:null,_styles:{solid:"esriSLSSolid",
dash:"esriSLSDash",dot:"esriSLSDot",dashdot:"esriSLSDashDot",longdashdotdot:"esriSLSDashDotDot",none:"esriSLSNull",insideframe:"esriSLSInsideFrame",shortdash:"esriSLSShortDash",shortdot:"esriSLSShortDot",shortdashdot:"esriSLSShortDashDot",shortdashdotdot:"esriSLSShortDashDotDot",longdash:"esriSLSLongDash",longdashdot:"esriSLSLongDashDot"},constructor:function(b,e,h){b?l.isString(b)?(this.style=b,e&&(this.color=e),h&&(this.width=h)):(this.style=g.valueOf(this._styles,b.style)||d.STYLE_SOLID,this.marker=
b.marker):(l.mixin(this,c),this.color=new a(this.color),this.width=k.pt2px(this.width))},setStyle:function(a){this.style=a;return this},setMarker:function(a){this.marker=a},getStroke:function(){return this.style===d.STYLE_NULL||0===this.width?null:{color:this.color,style:this.style,width:this.width}},getFill:function(){return null},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -15,0 L 15,0 E"},fill:null,stroke:this.getStroke()}},toJson:function(){return g.fixJson(l.mixin(this.inherited("toJson",
arguments),{type:"esriSLS",style:this._styles[this.style],marker:this.marker?l.clone(this.marker):void 0}))}});l.mixin(m,d);m.defaultProps=c;f("extend-esri")&&(l.setObject("symbol.SimpleLineSymbol",m,n),n.symbol.defaultSimpleLineSymbol=c);return m})},"esri/symbols/LineSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ./Symbol".split(" "),function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.symbol.LineSymbol",constructor:function(a){l.isObject(a)?this.width=
f.pt2px(this.width):this.width=12},setWidth:function(a){this.width=a;return this},toJson:function(){var a=f.px2pt(this.width),a=isNaN(a)?void 0:a;return l.mixin(this.inherited("toJson",arguments),{width:a})}});a("extend-esri")&&l.setObject("symbol.LineSymbol",m,k);return m})},"esri/symbols/utils":function(){define(["dojo/_base/lang","dojo/_base/window","dojo/has","dojox/gfx","../kernel"],function(m,l,a,f,k){function n(a){a.removeAttribute("marker-start");a.removeAttribute("marker-end");a.removeAttribute("opacity")}
function g(a,b){for(var c in b)a.setAttribute(c,b[c])}function p(a,b,c){b="url(#"+b.getAttribute("id")+")";a.rawNode.setAttribute("marker-"+c,b)}var d=-1!==f.renderer.toLowerCase().indexOf("svg"),c=9===a("ie"),b={marker:{markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},spear:{marker:{end:{viewBox:"0 0 25.4 23.43",refX:"20",refY:"12.76"},start:{viewBox:"-25.4 0 25.4 23.43",refX:"-20",refY:"12.76"}},path:{common:{d:"M1.63 23.43 L5.37 16.6 L5.37 8.93 L1.63 2.09 L25.4 12.76 L1.63 23.43 Z",
"stroke-width":"0","fill-opacity":"1"},start:{transform:"matrix(-1, 0, 0, 1, 0, 0)"}}}};f={applyLineMarker:function(a,b,f,g){if(d&&!c){var e=a&&a.rawNode,h=b.marker;f=f||b.color;e&&"none"!==b.style&&f&&h&&"arrow"===h.style&&h.placement?e.getTotalLength&&0===e.getTotalLength()?n(e):(b=-1!==h.placement.indexOf("begin"),h=-1!==h.placement.indexOf("end"),b||h?(e.removeAttribute("stroke-opacity"),e.setAttribute("opacity",f.a),b?(b=g(a,f,"spear","start"),p(a,b,"start")):e.removeAttribute("marker-start"),
h?(f=g(a,f,"spear","end"),p(a,f,"end")):e.removeAttribute("marker-end")):n(e)):e&&n(e)}},createSVGMarker:function(a,c,d,f){d=b[d];var e=l.doc.createElementNS("http://www.w3.org/2000/svg","marker");e.setAttribute("id",c);g(e,b.marker);g(e,d.marker[f]);c=l.doc.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",a.toCss());g(c,d.path.common);g(c,d.path[f]);e.appendChild(c);return e}};a("extend-esri")&&m.setObject("renderer.utils",f,k);return f})},"esri/layers/TileInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../SpatialReference ../geometry/Point ./LOD".split(" "),
function(m,l,a,f,k,n,g,p,d){m=m(null,{declaredClass:"esri.layers.TileInfo",constructor:function(c){l.mixin(this,c);this.width=this.cols;this.height=this.rows;this._levelToLOD={};c=this.spatialReference;var b=this.origin;c&&(c=this.spatialReference=new g(c.toJson?c.toJson():c));b&&(this.origin=new p(b.toJson?b.toJson():b),!b.spatialReference&&c&&this.origin.setSpatialReference(new g(c.toJson())));this.lods=a.map(this.lods,function(a){return new d(a)});a.forEach(this.lods,function(a){this._levelToLOD[a.level]=
a},this);c=!1;var b=this.spatialReference,e=this.origin;if(b&&e){var h=b._getInfo();h&&(c=b._isWrappable()&&Math.abs(h.origin[0]-e.x)<=h.dx)}this.isWrappable=c},toJson:function(){return n.fixJson({rows:this.rows,cols:this.cols,dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin&&this.origin.toJson(),spatialReference:this.spatialReference&&this.spatialReference.toJson(),lods:this.lods&&a.map(this.lods,function(a){return a.toJson()})})},lodAt:function(a){return this._levelToLOD&&
this._levelToLOD[a]||null}});f("extend-esri")&&l.setObject("layers.TileInfo",m,k);return m})},"esri/layers/LOD":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(m,l,a,f,k){m=m(null,{declaredClass:"esri.layers.LOD",constructor:function(a){l.mixin(this,a)},toJson:function(){return k.fixJson({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})}});a("extend-esri")&&l.setObject("layers.LOD",m,f);return m})},"esri/layers/ArcGISTiledMapServiceLayer":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/has dojo/io-query ../kernel ../urlUtils ../SpatialReference ./TiledMapServiceLayer ./ArcGISMapServiceLayer ./TileInfo ./TimeInfo ./TileMap".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r){l=l([b,e],{declaredClass:"esri.layers.ArcGISTiledMapServiceLayer",_agolAttrs:"Canvas/World_Dark_Gray_Base Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Base Canvas/World_Light_Gray_Reference Elevation/World_Hillshade Ocean/World_Ocean_Base Ocean/World_Ocean_Reference Ocean_Basemap Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Transportation World_Imagery World_Street_Map World_Topo_Map".split(" "),
_isReference:!1,_referenceLayers:"Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Reference Ocean/World_Ocean_Reference Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Reference_Overlay Reference/World_Transportation".split(" "),constructor:function(b,c){c&&(c.roundrobin&&(m.deprecated(this.declaredClass+" : Constructor option 'roundrobin' deprecated. Use option 'tileServers'."),c.tileServers=c.roundrobin),this._setTileServers(c.tileServers),
this._loadCallback=c.loadCallback);this._params=a.mixin({},this._url.query);this._initLayer=a.hitch(this,this._initLayer);var e=c&&c.resourceInfo;e?this._initLayer(e):(this._load=a.hitch(this,this._load),this._load())},_TILE_FORMATS:{PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"},_setTileServers:function(a){if(a&&0<a.length){this.tileServers=a;var b,c=a.length;for(b=0;b<c;b++)a[b]=d.urlToObject(a[b]).path}},_initLayer:function(a,b){this.inherited(arguments);this.resourceInfo=
k.toJson(a);this.tileInfo=new h(a.tileInfo);!1!==this.resampling&&(a.capabilities&&-1<a.capabilities.indexOf("Tilemap")?(this.resampling=!0,this.tileMap=new r(this)):this.resampling=!!a.resampling);!this.spatialReference&&this.tileInfo.spatialReference&&(this.spatialReference=new c(this.tileInfo.spatialReference.toJson()));this.isPNG32="PNG24"===this.tileInfo.format||"PNG32"===this.tileInfo.format;a.timeInfo&&(this.timeInfo=new t(a.timeInfo));a.mensurationCapabilities&&(this.mensurationCapabilities=
a.mensurationCapabilities);var e=this._url.path,f=this._loadCallback,g=d.getProtocolForWebResource(!0),n=e.match(/^https?\:\/\/(server|services)\.arcgisonline\.com\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i),n=n&&n[2];if(!this.tileServers)if(a.tileServers)this._setTileServers(a.tileServers);else{var p=-1!==e.search(/^https?\:\/\/server\.arcgisonline\.com/i),l=-1!==e.search(/^https?\:\/\/services\.arcgisonline\.com/i);(p||l)&&this._setTileServers([e,e.replace(p?/server\.arcgisonline/i:
/services\.arcgisonline/i,p?"services.arcgisonline":"server.arcgisonline")])}if(n){n=n.toLowerCase();for(e=0;e<this._agolAttrs.length;e++)if(p=this._agolAttrs[e],p.toLowerCase()===n){this.hasAttributionData=!0;this.attributionDataUrl=this.attributionDataUrl||g+"//static.arcgis.com/attribution/"+p;break}for(e=0;e<this._referenceLayers.length;e++)if(p=this._referenceLayers[e],p.toLowerCase()===n){this._isReference=!0;break}}this.loaded=!0;this.onLoad(this);f&&(delete this._loadCallback,f(this))},getTileUrl:function(a,
b,c){var e=this.tileServers,h=this._getToken(),f=this._url.query;a=(e?e[b%e.length]:this._url.path)+"/tile/"+a+"/"+b+"/"+c;a=d.upgradeToHTTPS(a);this.resampling&&!this.tileMap&&(a+="?blankTile\x3dfalse");f&&(a=this.resampling&&!this.tileMap?a+("\x26"+g.objectToQuery(f)):a+("?"+g.objectToQuery(f)));!h||f&&f.token||(a+=(-1===a.indexOf("?")?"?":"\x26")+"token\x3d"+h);a=this.addTimestampToURL(a);return d.addProxy(a)}});n("extend-esri")&&a.setObject("layers.ArcGISTiledMapServiceLayer",l,p);return l})},
"esri/layers/TiledMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/url dojo/dom-construct dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/dom dojox/collections/ArrayList dojox/gfx/matrix ../kernel ../config ../sniff ../domUtils ../tileUtils ../geometry/Point ../geometry/Rect ../geometry/Extent ./layer".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C){m=m(C,{declaredClass:"esri.layers.TiledMapServiceLayer",constructor:function(b,
c){l.connect(this,"onLoad",this,"_initTiledLayer");this._lowestLevel=(this._displayLevels=c?c.displayLevels:null)?this._displayLevels[0]:0;this.resampling=c?c.resampling:void 0;this._resamplingTolerance=c?c.resamplingTolerance:null;this.exclusionAreas=c?c.exclusionAreas:null;var e=a.hitch;this._addImage=e(this,this._addImage);this._tileLoadHandler=e(this,this._tileLoadHandler);this._tileErrorHandler=e(this,this._tileErrorHandler);this._popTile=e(this,this._popTile);this._cleanUpRemovedImages=e(this,
this._cleanUpRemovedImages);this._fireOnUpdateEvent=e(this,this._fireOnUpdateEvent);this._transitionEnd=e(this,this._transitionEnd);this._tileMapCallback=e(this,this._tileMapCallback)},opacity:1,isPNG32:!1,_multiple:1,isResampling:!1,_initTiledLayer:function(){var a=this.tileInfo,b=a.lods;this.resampling=null!=this.resampling?this.resampling:!1;this._tileW=a.width;this._tileH=a.height;var c=this.scales=[],e=this._displayLevels,d=-Infinity,h=Infinity,g=this.fullExtent,k=new q(g.xmin,g.ymax),g=new q(g.xmax,
g.ymin),v=u.getContainingTileCoords,n,p,t,l=b.length;for(t=0;t<l;t++)p=b[t],n=v(a,k,p),p.startTileRow=0>n.row?0:n.row,p.startTileCol=0>n.col?0:n.col,n=v(a,g,p),p.endTileRow=n.row,p.endTileCol=n.col,e&&-1===f.indexOf(e,p.level)||(c[t]=p.scale,d=p.scale>d?p.scale:d,h=p.scale<h?p.scale:h);-Infinity===d||this._hasMin||this.setMinScale(d);Infinity===h||this._hasMax||this.setMaxScale(h);this.setExclusionAreas(this.exclusionAreas);this._patchIE=6<=r("ie")&&7>r("ie")&&(this.isPNG32||"Mixed"===a.format)},
isVisibleAtScale:function(a){return a?C.prototype._isMapAtVisibleScale.call(this,a,!0):!1},_isMapAtVisibleScale:function(a){var b=this.inherited(arguments,[a,!0]);if(b){var c;c=this._map;var b=this.scales,e=c.getScale(),d=!1,h=c.width>c.height?c.width:c.height;for(c=0;c<b.length;c++)if(Math.abs(b[c]-e)/b[c]<1/h){d=!0;break}b=d}return b},_setMap:function(a,b,c,e){this.inherited(arguments);this._map=a;var f=this._div=n.create("div",null,b),q=a.__visibleDelta,g=l.connect,k=h._css.names,r={position:"absolute",
width:a.width+"px",height:a.height+"px",overflow:"visible"},v=t.defaults.map.zoomDuration;"css-transforms"===a.navigationMode?(r[k.transform]=h._css.translate(-q.x,-q.y),d.set(f,r),delete r[k.transform],r[k.transition]=k.transformName+" "+v+"ms ease",d.set(this._active=n.create("div",null,f),r),this._active._remove=0,this._passives=[]):(r.left=-q.x+"px",r.top=-q.y+"px",d.set(f,r));this._onResizeHandler_connect=g(a,"onResize",this,"_onResizeHandler");this._opacityChangeHandler_connect=g(this,"onOpacityChange",
this,"_opacityChangeHandler");q=this.tileInfo;g=q.spatialReference;k=g._getInfo();(this._wrap=a.wrapAround180&&g._isWrappable()&&Math.abs(k.origin[0]-q.origin.x)<=k.dx)&&u._addFrameInfo(q,k);this.setExclusionAreas(this.exclusionAreas);this.evaluateSuspension();if(this.suspended&&!a.loaded)var p=l.connect(a,"onLoad",this,function(){l.disconnect(p);p=null;this.setExclusionAreas(this.exclusionAreas);this.evaluateSuspension()});return f},_unsetMap:function(a,b){this.suspended||this._suspendImpl();n.destroy(this._div);
this._map=this._div=null;var c=l.disconnect;c(this._onResizeHandler_connect);c(this._opacityChangeHandler_connect);this.inherited(arguments)},onSuspend:function(){this.inherited(arguments);this._suspendImpl()},_suspendImpl:function(){w.hide(this._div);clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors();var a=this._tiles,b=this._tileIds,c=this._loadingList,e,d,h=l.disconnect,f=n.destroy;c&&0<c.count&&(c.forEach(function(b){if(e=a[b])h(e._onload_connect),h(e._onerror_connect),
h(e._onabort_connect),e._onload_connect=e._onerror_connect=e._onabort_connect=null}),c.clear(),this._fireUpdateEnd());this._removeList.clear();for(c=b.length-1;0<=c;c--)(e=(d=b[c])&&a[d])&&f(e);if("css-transforms"===this._map.navigationMode){b=this._active;d=this._passives;var q;this._noDom=0;for(c=d.length-1;0<=c;c--)q=d[c],q._endHandle&&h(q._endHandle),q._matrix=q._multiply=q._endHandle=null,q._marked=q._remove=0,d.splice(c,1),f(q);b._matrix=b._multiply=null;b._marked=b._remove=0}this._tileIds=
this._tiles=this._tileBounds=this._ct=this._loadingList=this._removeList=this._standby=null},onResume:function(){this.inherited(arguments);this._tileIds=[];this._tiles=[];this._tileBounds=[];this._ct=null;this._removeList=new b;this._loadingList=new b;w.show(this._div);this._enableDrawConnectors();this._wakeTimer=this._wakeTimer||setTimeout(a.hitch(this,function(){this.suspended||this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD)}),0)},_enableDrawConnectors:function(){var a=this._map,
b=l.connect;if("css-transforms"===a.navigationMode){if(this._onScaleHandler_connect=b(a,"onScale",this,this._onScaleHandler),r("esri-mobile")){this._standby=[];var c=this,e=function(){c._noDom=1};this._onPanStartHandler_connect=b(a,"onPanStart",e);this._onZoomStartHandler_connect=b(a,"onZoomStart",e)}}else this._onZoomHandler_connect=b(a,"onZoom",this,"_onZoomHandler");this._onPanHandler_connect=b(a,"onPan",this,"_onPanHandler");this._onExtentChangeHandler_connect=b(a,"onExtentChange",this,"_onExtentChangeHandler")},
_disableDrawConnectors:function(){var a=l.disconnect;a(this._onPanHandler_connect);a(this._onZoomHandler_connect);a(this._onScaleHandler_connect);a(this._onExtentChangeHandler_connect);a(this._onPanStartHandler_connect);a(this._onZoomStartHandler_connect);this._onPanHandler_connect=this._onZoomHandler_connect=this._onScaleHandler_connect=this._onExtentChangeHandler_connect=this._onPanStartHandler_connect=this._onZoomStartHandler_connect=null},_onResizeHandler:function(a,b,c){a={width:b+"px",height:c+
"px"};b=d.set;b(this._div,a);if("css-transforms"===this._map.navigationMode)for(this._active&&b(this._active,a),c=this._passives.length-1;0<=c;c--)b(this._passives[c],a)},_onExtentChangeHandler:function(a,b,c,f){b=this._map;var q=this._standby,g;clearTimeout(this._wakeTimer);this._wakeTimer=null;if(!b._isPanningOrZooming()){if("css-transforms"===b.navigationMode){if(c)for(f=this._passives.length-1;0<=f;f--)g=this._passives[f],d.set(g,h._css.names.transition,"none"),g._marked?(this._passives.splice(f,
1),g.parentNode&&g.parentNode.removeChild(g),n.destroy(g)):0<g.childNodes.length&&(g._multiply=g._multiply?e.multiply(g._matrix,g._multiply):g._matrix);this._noDom=0;if(q&&q.length)for(f=q.length-1;0<=f;f--)g=q[f],d.set(g,"visibility","inherit"),this._popTile(g),q.splice(f,1)}this._fireUpdateStart();this._rrIndex=0;f=u.getCandidateTileInfo(b,this.tileInfo,a);a=b.__visibleDelta;if(!this._ct||f.lod.level!==this._ct.lod.level||c){g=f&&this._ct&&f.lod.level!==this._ct.lod.level;this._ct=f;var k=this._tiles,
r=this._tileIds,v=this._tileBounds,t=this._removeList,l,w=r.length;this._cleanUpRemovedImages();for(f=0;f<w;f++)q=r[f],l=k[q],v[q]=r[f]=null,"css-transforms"===b.navigationMode&&g&&l.parentNode&&b.fadeOnZoom&&(l._fadeOut=g,l.parentNode._remove++),t.add(l);c&&(this._tileIds=[],this._tiles=[],this._tileBounds=[])}f=a.x;c=a.y;"css-transforms"===b.navigationMode?(q={},q[h._css.names.transform]=h._css.translate(f,c),d.set(this._div,q)):d.set(this._div,{left:f+"px",top:c+"px"});this.__coords_dx=f;this.__coords_dy=
c;this._updateImages(new x(0,0,a.width,a.height));0===this._loadingList.count?(this._cleanUpRemovedImages(),this.onUpdate(),this._fireUpdateEnd()):this._fireOnUpdate=!0;c=this._tileW;k=this._tileH;a=new x(-a.x,-a.y,a.width,a.height);for(f=this._tileIds.length-1;0<=f;f--)(q=this._tileIds[f])?(g=this._tiles[q],r=p.getMarginBox(g),r=new x(r.l,r.t,c,k),"css-transforms"===b.navigationMode&&(r.x=g._left,r.y=g._top),a.intersects(r)?this._tileBounds[q]=r:(this._loadingList.contains(q)&&this._popTile(g),n.destroy(g),
this._tileIds.splice(f,1),delete this._tileBounds[q],delete this._tiles[q])):(this._tileIds.splice(f,1),delete this._tileBounds[q],delete this._tiles[q])}},_onPanHandler:function(a,b){var c=this._map,e=c.__visibleDelta.offset(b.x,b.y);this.__coords_dx=this.__coords_dy=0;"css-transforms"===c.navigationMode?(c={},c[h._css.names.transform]=h._css.translate(e.x,e.y),d.set(this._div,c),r("esri-mobile")||this._updateImages({x:-e.x,y:-e.y,width:e.width,height:e.height})):(d.set(this._div,{left:e.x+"px",
top:e.y+"px"}),this._updateImages({x:-e.x,y:-e.y,width:e.width,height:e.height}));0<this._loadingList.count&&(this._fireUpdateStart(),this._fireOnUpdate=!0)},_onScaleHandler:function(a,b){var c,f={},q=h._css.names,g=this._map,k=t.defaults.map.zoomDuration;for(c=this._passives.length-1;0<=c;c--){var r=this._passives[c];0===r.childNodes.length?(this._passives.splice(c,1),n.destroy(r)):("none"===r.style[q.transition]&&d.set(r,q.transition,q.transformName+" "+k+"ms ease"),d.set(r,q.transition,b?"none":
q.transformName+" "+k+"ms ease"),r._matrix=a,f[q.transform]=h._css.matrix(r._multiply?e.multiply(a,r._multiply):a),d.set(r,f))}this._active&&0===this._active.childNodes.length||(d.set(this._active,q.transition,b?"none":q.transformName+" "+k+"ms ease"),this._active._matrix=a,f[q.transform]=h._css.matrix(this._active._matrix),d.set(this._active,f),this._passives.push(this._active),f={position:"absolute",width:g.width+"px",height:g.height+"px",overflow:"visible"},f[q.transition]=q.transformName+" "+
k+"ms ease",d.set(this._active=n.create("div",null,this._div),f),this._active._remove=0,g.fadeOnZoom&&n.place(this._active,this._div,"first"))},_onZoomHandler:function(a,b,c){a=p.getMarginBox(this._div);c=c.offset(-a.l,-a.t);this._previousScale&&1!==b||(this._previousScale=1);var e,h=this._tileW*b,q=this._tileH*b,g=this._tileBounds,k=this._tiles,v=this._previousScale,n=this._multiple,t=d.set,l,w;if((a=r("ie"))&&8>a)f.forEach(this._tileIds,function(a){w="";e=g[a];l=k[a].style.margin.split(" ");f.forEach(l,
function(a){""!==w&&(w+=" ");a=parseFloat(a);w+=a/v*b+"px"});t(k[a],{left:e.x-(h-e.width)*(c.x-e.x)/e.width+"px",top:e.y-(q-e.height)*(c.y-e.y)/e.height+"px",margin:1!==n&&-1===w.indexOf("NaN")?w:"",zoom:b})});else{var m=h*n,x=q*n,u,C;f.forEach(this._tileIds,function(a){w="";e=g[a];u=e.x-(h-e.width)*(c.x-e.x)/e.width;C=e.y-(q-e.height)*(c.y-e.y)/e.height;l=k[a].style.margin.split(" ");f.forEach(l,function(a){""!==w&&(w+=" ");a=parseFloat(a);w+=a/v*b+"px"});t(k[a],{left:u+"px",top:C+"px",margin:1!==
n&&-1===w.indexOf("NaN")?w:"",width:m+"px",height:x+"px"})})}this._previousScale=b},_updateImages:function(a){if(this._ct){var b,c=this._tileW,e=this._tileH,d=this._ct;b=d.lod;var d=d.tile,h=d.offsets,q=d.coords,g=q.row,q=q.col,k=b.level,r=this.opacity,v=this._tileIds,n=this._loadingList,p=this._addImage,t=this._map.id,l=this.id,w=a.x,m=a.y,x=b.startTileRow,u=b.endTileRow,C=b.startTileCol,y=b.endTileCol,ja=f.indexOf,Q,P,sa=h.x-this.__coords_dx,ga=h.y-this.__coords_dy;P=c-sa+-a.x;var fa=e-ga+-a.y;
Q=Math.ceil;P=0<P?P%c:c-Math.abs(P)%c;fa=0<fa?fa%e:e-Math.abs(fa)%e;w=0<w?Math.floor((w+sa)/c):Q((w-(c-sa))/c);m=0<m?Math.floor((m+ga)/e):Q((m-(e-ga))/e);ga=w+Q((a.width-P)/c);a=m+Q((a.height-fa)/e);var va,oa,Da;this._wrap&&(va=b._frameInfo,oa=va[0],Da=va[1],va=va[2]);for(fa=w;fa<=ga;fa++)for(w=m;w<=a;w++)Q=g+w,P=q+fa,this._wrap&&(P<Da?(P%=oa,P=P<Da?P+oa:P):P>va&&(P%=oa)),!this._isExcluded(k,Q,P)&&Q>=x&&Q<=u&&P>=C&&P<=y&&(b=t+"_"+l+"_tile_"+k+"_"+w+"_"+fa,-1===ja(v,b)&&(n.add(b),v.push(b),p(k,w,Q,
fa,P,b,c,e,r,d,h)))}},_cleanUpRemovedImages:function(){var a=this._removeList,b=n.destroy,c,e=h._css.names;a.forEach(function(a){a._fadeOut||(a.style.filter="",a.style.zoom=1,b(a))});if("css-transforms"===this._map.navigationMode)for(c=this._passives.length-1;0<=c;c--){var f=this._passives[c];0===f.childNodes.length?(this._passives.splice(c,1),b(f)):this._map.fadeOnZoom&&!f._marked&&f._remove===f.childNodes.length&&(f._marked=1,2048>h._css.getScaleFromMatrix(d.get(f,e.transform))?(d.set(f,e.transition,
"opacity 0.65s"),d.set(f,"opacity",0),l.disconnect(f._endHandle),f._endHandle=l.connect(f,e.endEvent,this._transitionEnd)):this._transitionEnd({propertyName:"opacity",target:f}))}a.clear()},_transitionEnd:function(a){var b=a.target;"opacity"===a.propertyName&&(l.disconnect(b._endHandle),b._endHandle=null,a=f.indexOf(this._passives,b),-1<a&&this._passives.splice(a,1),b.parentNode&&b.parentNode.removeChild(b),n.destroy(b))},_addImage:function(b,c,e,f,q,k,r,v,p,t,w){if(this._patchIE)t=this._tiles[k]=
n.create("div"),t.id=k,g.add(t,"layerTile"),d.set(t,{left:r*f-w.x+"px",top:v*c-w.y+"px",width:r+"px",height:v+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'"+this.getTileUrl(b,e,q)+"', sizingMethod\x3d'scale')"}),1>p&&d.set(t,"opacity",p),b=t.appendChild(n.create("div")),d.set(b,{opacity:0,width:r+"px",height:v+"px"}),this._div.appendChild(t),t=null,this._loadingList.remove(k),this._fireOnUpdateEvent();else{t=this._tiles[k]=n.create("img");var m=l.connect;t.id=k;t._uid=b+
"_"+e+"_"+q;t.alt="";g.add(t,"layerTile");f=r*f-w.x;w=v*c-w.y;c=this._map;var x=h._css.names;r={width:r+"px",height:v+"px",visibility:"hidden"};"css-transforms"===c.navigationMode?(r[x.transform]=h._css.translate(f,w),d.set(t,r),t._left=f,t._top=w):(r.left=f+"px",r.top=w+"px",d.set(t,r));1>p&&d.set(t,"opacity",p);t._onload_connect=m(t,"onload",this,"_tileLoadHandler");t._onerror_connect=m(t,"onerror",a.hitch(this,"_tileErrorHandler",e,q));t._onabort_connect=m(t,"onabort",this,"_tileAbortHandler");
if(this.tileMap)this.tileMap.getTile(b,e,q,k,this._tileMapCallback);else if(k=this.getTileUrl(b,e,q,t))this._failedRequests&&this._failedRequests[k]?(d.set(t,this._failedRequests[k].css),t.src=this._failedRequests[k].src,this._multiple=parseInt(this._failedRequests[k].css.width)/this._tileW,this.isResampling=1!==this._multiple):(this._multiple=1,this.isResampling=!1,t.src=k);"css-transforms"===c.navigationMode?this._active.appendChild(t):this._div.appendChild(t);t=null}},_tileMapCallback:function(a,
b){var e,h;this.suspended||(h=this._tiles[b.id]||c.byId(b.id),e=b.level+"_"+b.row+"_"+b.col,h&&h._uid===e?(this._multiple=2*(b.level-a.level)||1,this.isResampling=1!==this._multiple,e=this.tileMap.style(a,b),d.set(h,e),h.src=this.getTileUrl(a.level,a.row,a.col)):this._popTile(b))},getTileUrl:function(a,b,c){},_reCheckTS:/[\?\&]_ts=/ig,_reReplaceTS:/([\?\&]_ts=)[0-9]+/ig,addTimestampToURL:function(a){var b=this._refreshTS;b&&(a=this._reCheckTS.test(a)?a.replace(this._reReplaceTS,"$$$1"+b):a+((-1===
a.indexOf("?")?"?":"\x26")+"_ts\x3d"+b));return a},refresh:function(){this.suspended||(this._refreshTS=(new Date).getTime(),this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD))},_popTile:function(a){var b=l.disconnect;b(a._onload_connect);b(a._onerror_connect);b(a._onabort_connect);a._onload_connect=a._onerror_connect=a._onabort_connect=null;this._loadingList.remove(a.id);this._fireOnUpdateEvent()},_tileLoadHandler:function(a){a=a.currentTarget;this._noDom?this._standby.push(a):
(d.set(a,"visibility","inherit"),this._popTile(a))},_tileAbortHandler:function(a){a=a.currentTarget;this.onError(Error("Unable to load tile: "+a.src));d.set(a,"visibility","hidden");this._popTile(a)},_tileErrorHandler:function(a,b,c){c=c.currentTarget;var e,h,f=!0;if(this.tileMap||!this.resampling)f=!1;else if(e=new k(c.src),e=e.path.split("/"),e=parseInt(e[e.length-3]),h=this._ct.lod.level-e+1,this._multiple=Math.pow(2,h),e===this._lowestLevel||0===this._resamplingTolerance||this._resamplingTolerance&&
Math.log(this._multiple)/Math.LN2>this._resamplingTolerance)f=!1;f?(this.isResampling=!0,this._resample(c,a,b)):(this.onError(Error("Unable to load tile: "+c.src)),d.set(c,"visibility","hidden"),this._popTile(c))},_resample:function(a,b,c){var e=(new k(a.src)).path.split("/"),h=this._multiple,f=parseInt(e[e.length-3])-1,q=parseInt(b/h),g=parseInt(c/h),e=c%h,v=b%h,q=this.getTileUrl(f,q,g);b=this.getTileUrl(f+Math.log(h)/Math.LN2,b,c);h={width:this._tileW*h+"px",height:this._tileH*h+"px",margin:"-"+
this._tileW*v+"px 0 0 "+("-"+this._tileH*e+"px")};this._failedRequests||(this._failedRequests={});this._failedRequests[b]={src:q,css:h};d.set(a,h);r("chrome")&&a.setAttribute("src",null);a.src=q},_fireOnUpdateEvent:function(){0===this._loadingList.count&&(this._cleanUpRemovedImages(),this._fireOnUpdate&&(this._fireOnUpdate=!1,this.onUpdate(),this._fireUpdateEnd()))},setOpacity:function(a){if(this.opacity!=a)this.onOpacityChange(this.opacity=a)},onOpacityChange:function(){},_opacityChangeHandler:function(a){var b=
d.set,c,e,h;if("css-transforms"===this._map.navigationMode){if(this._active)for(h=this._active.childNodes,c=h.length-1;0<=c;c--)b(h[c],"opacity",a);for(c=this._passives.length-1;0<=c;c--)for(h=this._passives[c].childNodes,e=h.length-1;0<=e;e--)b(h[e],"opacity",a)}else for(h=this._div.childNodes,c=h.length-1;0<=c;c--)b(h[c],"opacity",a)},setExclusionAreas:function(a){this.exclusionAreas=a;if(this.loaded&&this._map&&this._map.loaded){var b=this._map.spatialReference,c=this.tileInfo,e=c.origin,d=c.lods,
h=d[0].level,f=d[d.length-1].level,g,k,r,n,p,t,l,w,m;if(this.exclusionAreas&&this.exclusionAreas.length)for(this._exclusionsPerZoom=[],k=0,r=a.length;k<r;k++){if(g=a[k],(m=g.geometry)&&"extent"===m.type&&m.xmin<=m.xmax&&m.ymin<=m.ymax){if(!b.equals(m.spatialReference))if(b._canProject(m.spatialReference))b.isWebMercator()?(w=q.lngLatToXY(m.xmin,m.ymin),m=q.lngLatToXY(m.xmax,m.ymax)):(w=q.xyToLngLat(m.xmin,m.ymin,!0),m=q.xyToLngLat(m.xmax,m.ymax,!0)),m=new v(w[0],w[1],m[0],m[1],b);else continue;l=
-1;if(g.minZoom&&-1!==g.minZoom)l=g.minZoom;else if(g.minScale&&-1!==g.minScale)for(n=0,p=d.length;n<p;n++)if(d[n].scale<=g.minScale){l=d[n].level;break}l=Math.max(l,h);w=-1;if(g.maxZoom&&-1!==g.maxZoom)w=g.maxZoom;else if(g.maxScale&&-1!==g.maxScale)for(n=0,p=d.length;n<p;n++)if(d[n].scale<g.maxScale){w=d[n-1].level;break}else if(d[n].scale===g.maxScale){w=d[n].level;break}w=-1===w?f:Math.min(w,f);for(g=l;g<=w;g++){n=0;for(p=d.length;n<p;n++)if(d[n].level===g){t=d[n];break}t&&(this._exclusionsPerZoom[g]||
(this._exclusionsPerZoom[g]=[]),n=1/t.resolution/c.rows,p=1/t.resolution/c.cols,this._exclusionsPerZoom[g].push({rowFrom:Math.floor((e.y-m.ymax)*n),rowTo:Math.ceil((e.y-m.ymin)*n),colFrom:Math.floor((m.xmin-e.x)*p),colTo:Math.ceil((m.xmax-e.x)*p)}))}}}else this._exclusionsPerZoom=null;this.suspended||this._onExtentChangeHandler(this._map.extent,null,!0,this._map.__LOD)}},_isExcluded:function(a,b,c){var e,d,h;if(!this._exclusionsPerZoom)return!1;e=this._exclusionsPerZoom[a];if(!e)return!1;d=0;for(h=
e.length;d<h;d++)if(a=e[d],b>=a.rowFrom&&b<a.rowTo&&c>=a.colFrom&&c<a.colTo)return!0;return!1}});r("extend-esri")&&a.setObject("layers.TiledMapServiceLayer",m,h);return m})},"dojox/collections/ArrayList":function(){define(["dojo/_base/kernel","dojo/_base/array","./_base"],function(m,l,a){a.ArrayList=function(f){var k=[];f&&(k=k.concat(f));this.count=k.length;this.add=function(a){k.push(a);this.count=k.length};this.addRange=function(a){if(a.getIterator)for(a=a.getIterator();!a.atEnd();)this.add(a.get());
else for(var f=0;f<a.length;f++)k.push(a[f]);this.count=k.length};this.clear=function(){k.splice(0,k.length);this.count=0};this.clone=function(){return new a.ArrayList(k)};this.contains=function(a){for(var f=0;f<k.length;f++)if(k[f]==a)return!0;return!1};this.forEach=function(a,f){m.forEach(k,a,f)};this.getIterator=function(){return new a.Iterator(k)};this.indexOf=function(a){for(var f=0;f<k.length;f++)if(k[f]==a)return f;return-1};this.insert=function(a,f){k.splice(a,0,f);this.count=k.length};this.item=
function(a){return k[a]};this.remove=function(a){a=this.indexOf(a);0<=a&&k.splice(a,1);this.count=k.length};this.removeAt=function(a){k.splice(a,1);this.count=k.length};this.reverse=function(){k.reverse()};this.sort=function(a){a?k.sort(a):k.sort()};this.setByIndex=function(a,f){k[a]=f;this.count=k.length};this.toArray=function(){return[].concat(k)};this.toString=function(a){return k.join(a||",")}};return a.ArrayList})},"dojox/collections/_base":function(){define(["dojo/_base/kernel","dojo/_base/lang",
"dojo/_base/array"],function(m,l,a){m=l.getObject("dojox.collections",!0);m.DictionaryEntry=function(a,k){this.key=a;this.value=k;this.valueOf=function(){return this.value};this.toString=function(){return String(this.value)}};m.Iterator=function(f){var k=0;this.element=f[k]||null;this.atEnd=function(){return k>=f.length};this.get=function(){return this.atEnd()?null:this.element=f[k++]};this.map=function(k,g){return a.map(f,k,g)};this.reset=function(){k=0;this.element=f[k]}};m.DictionaryIterator=function(f){var k=
[],n={},g;for(g in f)n[g]||k.push(f[g]);var p=0;this.element=k[p]||null;this.atEnd=function(){return p>=k.length};this.get=function(){return this.atEnd()?null:this.element=k[p++]};this.map=function(d,c){return a.map(k,d,c)};this.reset=function(){p=0;this.element=k[p]}};return m})},"esri/layers/ArcGISMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../request ../SpatialReference ../geometry/Extent ./LayerInfo".split(" "),function(m,
l,a,f,k,n,g,p,d,c){m=m(null,{declaredClass:"esri.layers.ArcGISMapServiceLayer",infoTemplates:null,constructor:function(a,c){this.layerInfos=[];c&&(this.infoTemplates=c.infoTemplates||null);var b=this._params={},e=this._url.query?this._url.query.token:null;e&&(b.token=e)},setInfoTemplates:function(a){this.infoTemplates=a},_load:function(){g({url:this._url.path,content:l.mixin({f:"json"},this._params),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler})},spatialReference:null,
initialExtent:null,fullExtent:null,description:null,units:null,_initLayer:function(b,e){try{this._findCredential();(this.credential&&this.credential.ssl||b&&b._ssl)&&this._useSSL();this.description=b.description;this.copyright=b.copyrightText;this.spatialReference=b.spatialReference&&new p(b.spatialReference);this.initialExtent=b.initialExtent&&new d(b.initialExtent);this.fullExtent=b.fullExtent&&new d(b.fullExtent);this.units=b.units;this.maxRecordCount=b.maxRecordCount;this.maxImageHeight=b.maxImageHeight;
this.maxImageWidth=b.maxImageWidth;this.supportsDynamicLayers=b.supportsDynamicLayers;var h=this.layerInfos=[],f=b.layers,g=this._defaultVisibleLayers=[];a.forEach(f,function(a,b){h[b]=new c(a);a.defaultVisibility&&g.push(a.id)});this.visibleLayers||(this.visibleLayers=g);this.version=b.currentVersion;this.version||(this.version="capabilities"in b||"tables"in b?10:"supportedImageFormatTypes"in b?9.31:9.3);this.capabilities=b.capabilities;n.isDefined(b.minScale)&&!this._hasMin&&this.setMinScale(b.minScale);
n.isDefined(b.maxScale)&&!this._hasMax&&this.setMaxScale(b.maxScale)}catch(w){this._errorHandler(w)}}});f("extend-esri")&&l.setObject("layers.ArcGISMapServiceLayer",m,k);return m})},"esri/layers/LayerInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(m,l,a,f,k){m=m(null,{declaredClass:"esri.layers.LayerInfo",constructor:function(a){l.mixin(this,a)},toJson:function(){return k.fixJson({defaultVisibility:this.defaultVisibility,id:this.id,maxScale:this.maxScale,
minScale:this.minScale,name:this.name,parentLayerId:this.parentLayerId,subLayerIds:this.subLayerIds})}});a("extend-esri")&&l.setObject("layers.LayerInfo",m,f);return m})},"esri/layers/TimeInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../TimeExtent ./TimeReference ./LayerTimeOptions".split(" "),function(m,l,a,f,k,n,g){m=m(null,{declaredClass:"esri.layers.TimeInfo",constructor:function(a){null!==a&&(l.mixin(this,a),a.exportOptions&&(this.exportOptions=new g(a.exportOptions)),
this.timeExtent=null,a.timeExtent&&2===a.timeExtent.length&&(this.timeExtent=new k(a.timeExtent)),this.timeReference=new n(a.timeReference))}});l.mixin(m,{UNIT_CENTURIES:"esriTimeUnitsCenturies",UNIT_DAYS:"esriTimeUnitsDays",UNIT_DECADES:"esriTimeUnitsDecades",UNIT_HOURS:"esriTimeUnitsHours",UNIT_MILLISECONDS:"esriTimeUnitsMilliseconds",UNIT_MINUTES:"esriTimeUnitsMinutes",UNIT_MONTHS:"esriTimeUnitsMonths",UNIT_SECONDS:"esriTimeUnitsSeconds",UNIT_UNKNOWN:"esriTimeUnitsUnknown",UNIT_WEEKS:"esriTimeUnitsWeeks",
UNIT_YEARS:"esriTimeUnitsYears"});a("extend-esri")&&l.setObject("layers.TimeInfo",m,f);return m})},"esri/TimeExtent":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","./kernel"],function(m,l,a,f){var k=m(null,{declaredClass:"esri.TimeExtent",constructor:function(a){if(1<arguments.length)this._create(arguments[0],arguments[1]);else if(a)if(l.isArray(a)){var f=a[0],k=a[1];this.startTime=null===f||"null"===f?null:new Date(f);this.endTime=null===k||"null"===k?null:new Date(k)}else a instanceof
Date&&this._create(a,null)},offset:function(a,f){var g=new k,d=this.startTime,c=this.endTime;d&&(g.startTime=this._getOffsettedDate(d,a,f));c&&(g.endTime=this._getOffsettedDate(c,a,f));return g},intersection:function(a){return this._intersection(this,a)},toJson:function(){var a=[],f=this.startTime;a.push(f?f.getTime():"null");f=this.endTime;a.push(f?f.getTime():"null");return a},_create:function(a,f){this.startTime=a?new Date(a.getTime()):null;this.endTime=f?new Date(f.getTime()):null},_refData:{esriTimeUnitsMilliseconds:{getter:"getUTCMilliseconds",
setter:"setUTCMilliseconds",multiplier:1},esriTimeUnitsSeconds:{getter:"getUTCSeconds",setter:"setUTCSeconds",multiplier:1},esriTimeUnitsMinutes:{getter:"getUTCMinutes",setter:"setUTCMinutes",multiplier:1},esriTimeUnitsHours:{getter:"getUTCHours",setter:"setUTCHours",multiplier:1},esriTimeUnitsDays:{getter:"getUTCDate",setter:"setUTCDate",multiplier:1},esriTimeUnitsWeeks:{getter:"getUTCDate",setter:"setUTCDate",multiplier:7},esriTimeUnitsMonths:{getter:"getUTCMonth",setter:"setUTCMonth",multiplier:1},
esriTimeUnitsYears:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:1},esriTimeUnitsDecades:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:10},esriTimeUnitsCenturies:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:100}},_intersection:function(a,f){if(a&&f){var g=a.startTime,d=a.endTime,c=f.startTime,b=f.endTime,g=g?g.getTime():-Infinity,c=c?c.getTime():-Infinity,d=d?d.getTime():Infinity,b=b?b.getTime():Infinity,e,h;c>=g&&c<=d?e=c:g>=c&&g<=b&&(e=g);d>=c&&d<=b?h=
d:b>=g&&b<=d&&(h=b);if(isNaN(e)||isNaN(h))return null;g=new k;g.startTime=-Infinity===e?null:new Date(e);g.endTime=Infinity===h?null:new Date(h);return g}return null},_getOffsettedDate:function(a,f,k){var d=this._refData;a=new Date(a.getTime());f&&k&&(d=d[k],a[d.setter](a[d.getter]()+f*d.multiplier));return a}});a("extend-esri")&&(f.TimeExtent=k);return k})},"esri/layers/TimeReference":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(m,l,a,f){m=m(null,{declaredClass:"esri.layers.TimeReference",
constructor:function(a){a&&l.mixin(this,a)}});a("extend-esri")&&l.setObject("layers.TimeReference",m,f);return m})},"esri/layers/LayerTimeOptions":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(m,l,a,f,k){m=m(null,{declaredClass:"esri.layers.LayerTimeOptions",constructor:function(a){a&&l.mixin(this,a)},toJson:function(){return k.fixJson({timeDataCumulative:this.timeDataCumulative,timeOffset:this.timeOffset,timeOffsetUnits:this.timeOffsetUnits,
useTime:this.useTime})}});a("extend-esri")&&l.setObject("layers.LayerTimeOptions",m,f);return m})},"esri/layers/TileMap":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/io-query ../request ../urlUtils ../sniff".split(" "),function(m,l,a,f,k,n,g,p){var d=p("esri-iphone");return m(null,{declaredClass:"esri.layers.TileMap",constructor:function(a){this.layer=a;this._tileMaps={}},getTile:function(a,b,e,d,f){a={id:d,level:a,row:b,col:e};b=this._getResamplingBudget();
0<b?this._process({tile:a,requestedTile:a,callback:f,resamplingBudget:b}):(f||this.callback).call(this,a,a)},statusOf:function(a,b,e){var c=this._getResamplingBudget();a={level:a,row:b,col:e};if(0===c)return 1;for(;0<=c;){b=this._tileToTileMap(a);if(!this._tileMaps[b.uid])return-1;b=this._tileMaps[b.uid];if(!b.promise.isFulfilled())return-1;if(this._isTileAvailable(a,b))return 1;a=this._parentTile(a);if(!a)break;c--}return 0},style:function(a,b){if(a.level!==b.level||a.row!==b.row||a.col!==b.col){for(var c=
this.layer.tileInfo,h=c.lods,f=c.cols,c=c.rows,g,k,p=h.length-1;!g||!k;)g||h[p].level!==a.level||(g=h[p]),k||h[p].level!==b.level||(k=h[p]),p--;g=Math.round(g.resolution/k.resolution);k=b.col%g*-1*f;h=b.row%g*-1*c;g={width:f*g+"px",height:c*g+"px",margin:h+"px 0 0 "+k+"px","will-change":"transform"};d&&(k=0===k?0:-1*k,h=0===h?0:-1*h,g.clip="rect("+h+"px,"+(k+f)+"px,"+(h+c)+"px,"+k+"px)");return g}},_process:function(a){var b=a.tile,c=this._tileToTileMap(b),d=this._parentTile(b);this._getTileMap(c).then(l.hitch(this,
function(e){c=e;this._isTileAvailable(b,c)?(a.callback||this.callback).call(this,b,a.requestedTile):0<a.resamplingBudget&&d?(a.resamplingBudget--,a.tile=d,this._process(a)):(a.callback||this.callback).call(this,a.requestedTile,a.requestedTile)}),l.hitch(this,function(){(a.callback||this.callback).call(this,a.requestedTile,a.requestedTile)}))},_getTileMap:function(a){var b,c,d,g,k=null;this._tileMaps[a.uid]?(a=this._tileMaps[a.uid],b=a.promise):(this._tileMaps[a.uid]=a,c=new f,n({url:this._getTileMapUrl(a.level,
a.row,a.col),handleAs:"json",callbackParamName:"callback",timeout:3E3,load:function(b){l.mixin(a,b);if(a.data&&0<a.data.length){g=a.data.length;if(1===g)k=a.data[0];else for(k=a.data[0],d=1;d<g;d++)if(a.data[d]!==k){k=null;break}null!==k&&(delete a.data,a.value=k)}c.resolve(a)},error:function(a){c.reject()}}),b=a.promise=c.promise);return b},_parentTile:function(c){var b=this.layer.tileInfo.lods,e,d,f=null;a.some(b,function(a,b){return c.level===a.level?(e=a,d=b,!0):!1});0<d&&(b=b[d-1],f={id:c.id,
level:b.level,row:Math.floor(c.row*e.resolution/b.resolution+.01),col:Math.floor(c.col*e.resolution/b.resolution+.01)});return f},_tileToTileMap:function(a){var b=8*Math.floor(a.row/8),c=8*Math.floor(a.col/8);return{uid:a.level+"_"+b+"_"+c,level:a.level,row:b,col:c}},_isTileAvailable:function(a,b){var c,d;b.valid?void 0!==b.value?c=b.value:(c=b.location.left,d=b.location.top,c=(a.row-d)*b.location.width+(a.col-c),c=c<b.data.length?b.data[c]:0):c=0;return c},_getTileMapUrl:function(a,b,e){var c=this.layer,
d=c.tileServers,f=c._getToken(),g=c._url.query;a=(d?d[b%d.length]:c._url.path)+"/tilemap/"+a+"/"+b+"/"+e+"/8/8";g&&(a+="?"+k.objectToQuery(g));!f||g&&g.token||(a+=(-1===a.indexOf("?")?"?":"\x26")+"token\x3d"+f);return a=c.addTimestampToURL(a)},_getResamplingBudget:function(){var a=this.layer,b=0;a.resampling&&(b=a._resamplingTolerance,null===b||void 0===b)&&(b=a.tileInfo.lods.length);return b}})})},"esri/layers/MapImageLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/dom-style ../kernel ../config ../sniff ../domUtils ../geometry/Point ../geometry/webMercatorUtils ./layer".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h){var t=m([h],{declaredClass:"esri.layers.MapImageLayer","-chains-":{constructor:"manual"},constructor:function(b){this.inherited(arguments,[null,b]);this._mapImages=[];var c=a.hitch;this._panStart=c(this,this._panStart);this._pan=c(this,this._pan);this._extentChange=c(this,this._extentChange);this._zoom=c(this,this._zoom);this._zoomStart=c(this,this._zoomStart);this._scale=c(this,this._scale);this._resize=c(this,this._resize);l.connect(this,"onSuspend",this,this._onSuspend);
l.connect(this,"onResume",this,this._onResume);this.loaded=!0;this.onLoad(this)},opacity:1,addImage:function(a){var b=this._mapImages.push(a),b=b-1;a._idx=b;a._layer=this;this._div&&this._createImage(a,b)},removeImage:function(a){if(a){var b=a._idx,c=this._mapImages;if(c[b]===a){delete c[b];if(b=a._node)this._clearEvents(b),b.e_idx=b.e_bl=b.e_tr=b.e_l=b.e_t=b.e_w=b.e_h=null,b.parentNode&&(b.parentNode.removeChild(b),k.destroy(b));a._node=a._idx=a._layer=null}}},removeAllImages:function(){var a=this._mapImages,
b,c=a.length;for(b=0;b<c;b++){var e=a[b];e&&this.removeImage(e)}this._mapImages=[]},getImages:function(){var a=this._mapImages,b=[],c,e=a.length;for(c=0;c<e;c++)a[c]&&b.push(a[c]);return b},setOpacity:function(a){this.opacity!=a&&(this._opacityChanged(this.opacity=a),this.onOpacityChange())},onOpacityChange:function(){},_opacityChanged:function(a){var b=this._div,c,e;if(b)if(!d("ie")||8<d("ie"))n.set(b,"opacity",a);else for(e=b.childNodes,c=e.length,b=0;b<c;b++)n.set(e[b],"opacity",a)},_createImage:function(a,
b){var c=k.create("img");n.set(c,{position:"absolute"});1>a.opacity?n.set(c,"opacity",a.opacity):8>=d("ie")&&n.set(c,"opacity",this.opacity);!a.rotation||9>d("ie")||n.set(c,g._css.names.transform,g._css.rotate(360-a.rotation));a._node=c;c.e_idx=b;c.e_layer=this;c.e_load=l.connect(c,"onload",t.prototype._imageLoaded);c.e_error=l.connect(c,"onerror",t.prototype._imageError);c.e_abort=l.connect(c,"onabort",t.prototype._imageError);c.src=a.href},_imageLoaded:function(a,b){var c=b||a.target||a.currentTarget,
e=c.e_layer,d=e._mapImages[c.e_idx],h=e._map;h&&(h.__zooming||h.__panning||!e._sr)?e._standby.push(c):(e._clearEvents(c),d&&d._node===c&&h&&e._attach(d))},_imageError:function(a){a=a.target||a.currentTarget;var b=a.e_layer,c=b._mapImages[a.e_idx];b._clearEvents(a);c&&(c._node=null)},_clearEvents:function(a){var b=l.disconnect;b(a.e_load);b(a.e_error);b(a.e_abort);a.e_load=a.e_error=a.e_abort=a.e_layer=null},_attach:function(a){var c=a.extent,d=c.spatialReference,h=this._sr,f=this._div,g=a._node,k=
new b({x:c.xmin,y:c.ymin,spatialReference:d}),c=new b({x:c.xmax,y:c.ymax,spatialReference:d});h.equals(d)||(h.isWebMercator()&&4326===d.wkid?(k=e.geographicToWebMercator(k),c=e.geographicToWebMercator(c)):d.isWebMercator()&&4326===h.wkid&&(k=e.webMercatorToGeographic(k),c=e.webMercatorToGeographic(c)));g.e_bl=k;g.e_tr=c;a.visible&&(this._setPos(g,f._left,f._top),(this._active||f).appendChild(g))},_setPos:function(a,b,c){var e=a.e_bl,d=a.e_tr,h=this._map,e=h.toScreen(e),d=h.toScreen(d);b=e.x-b;c=d.y-
c;var f=Math.abs(d.x-e.x),e=Math.abs(e.y-d.y),d={width:f+"px",height:e+"px"},k=this._mapImages[a.e_idx];"css-transforms"===h.navigationMode?d[g._css.names.transform]=g._css.translate(b,c)+(k.rotation?" "+g._css.rotate(360-k.rotation):""):(d.left=b+"px",d.top=c+"px");n.set(a,d);a.e_l=b;a.e_t=c;a.e_w=f;a.e_h=e},managedSuspension:!0,_setMap:function(a,b){this.inherited(arguments);var e=this._div=k.create("div",null,b),h=g._css.names,f={position:"absolute"},v=a.__visibleDelta;if(!d("ie")||8<d("ie"))f.opacity=
this.opacity;"css-transforms"===a.navigationMode?(f[h.transform]=g._css.translate(v.x,v.y),n.set(e,f),e._left=v.x,e._top=v.y,f={position:"absolute",width:a.width+"px",height:a.height+"px",overflow:"visible"},this._active=k.create("div",null,e),n.set(this._active,f),this._passive=k.create("div",null,e),n.set(this._passive,f)):(e._left=0,e._top=0,n.set(e,f));this._standby=[];h=this._mapImages;v=h.length;for(f=0;f<v;f++){var r=h[f];r._node||this._createImage(r,r._idx)}c.hide(e);return e},_unsetMap:function(a,
b){this._disconnect();var c=this._div;if(c){var e=this._mapImages,d,h=e.length;for(d=0;d<h;d++){var f=e[d];if(f){var g=f._node;g&&(this._clearEvents(g),g.e_idx=g.e_bl=g.e_tr=g.e_l=g.e_t=g.e_w=g.e_h=null);f._node=null}}b.removeChild(c);k.destroy(c)}this._map=this._div=this._sr=this._active=this._passive=this._standby=null;this.inherited(arguments)},_onSuspend:function(){this._disconnect();c.hide(this._div)},_onResume:function(a){a.firstOccurrence&&(this._sr=this._map.spatialReference,this._processStandbyList());
a=this._map;var b=this._div,e=a.__visibleDelta;"css-transforms"===a.navigationMode&&(b._left=e.x,b._top=e.y,n.set(b,g._css.names.transform,g._css.translate(b._left,b._top)));this._redraw("css-transforms"===a.navigationMode);this._connect(a);c.show(b)},_connect:function(a){if(!this._connections){var b=l.connect,c="css-transforms"===a.navigationMode;this._connections=[b(a,"onPanStart",this._panStart),b(a,"onPan",this._pan),b(a,"onExtentChange",this._extentChange),c&&b(a,"onZoomStart",this._zoomStart),
c?b(a,"onScale",this._scale):b(a,"onZoom",this._zoom),c&&b(a,"onResize",this._resize)]}},_disconnect:function(){this._connections&&(f.forEach(this._connections,l.disconnect),this._connections=null)},_panStart:function(){this._panL=this._div._left;this._panT=this._div._top},_pan:function(a,b){var c=this._div;c._left=this._panL+b.x;c._top=this._panT+b.y;"css-transforms"===this._map.navigationMode?n.set(c,g._css.names.transform,g._css.translate(c._left,c._top)):n.set(c,{left:c._left+"px",top:c._top+
"px"})},_extentChange:function(a,b,c){c?this._redraw("css-transforms"===this._map.navigationMode):b&&this._pan(a,b);this._processStandbyList()},_processStandbyList:function(){var a,b=this._standby;if(b&&b.length)for(a=b.length-1;0<=a;a--)this._imageLoaded(null,b[a]),b.splice(a,1)},_redraw:function(a){if(a){a=this._passive;var b=g._css.names;n.set(a,b.transition,"none");this._moveImages(a,this._active);n.set(a,b.transform,"none")}a=this._active||this._div;var b=this._div._left,c=this._div._top,e,d=
a.childNodes.length,h;for(e=0;e<d;e++)h=a.childNodes[e],this._setPos(h,b,c)},_zoom:function(a,b,c){a=this._div;var e=a._left,d=a._top,h,f=a.childNodes.length,g;for(h=0;h<f;h++){g=a.childNodes[h];var k=g.e_w*b,r=g.e_h*b,p=(c.x-e-g.e_l)*(k-g.e_w)/g.e_w,t=(c.y-d-g.e_t)*(r-g.e_h)/g.e_h,p=isNaN(p)?0:p,t=isNaN(t)?0:t;n.set(g,{left:g.e_l-p+"px",top:g.e_t-t+"px",width:k+"px",height:r+"px"})}},_zoomStart:function(){this._moveImages(this._active,this._passive)},_moveImages:function(a,b){var c=a.childNodes,
e;e=c.length;if(0<e)for(--e;0<=e;e--)b.appendChild(c[e])},_scale:function(a,b){var c=g._css.names,e=this._passive;n.set(e,c.transition,b?"none":c.transformName+" "+p.defaults.map.zoomDuration+"ms ease");({})[c.transform]=g._css.matrix(a);n.set(e,c.transform,g._css.matrix(a))},_resize:function(a,b,c){n.set(this._active,{width:b+"px",height:c+"px"});n.set(this._passive,{width:b+"px",height:c+"px"})}});d("extend-esri")&&a.setObject("layers.MapImageLayer",t,g);return t})},"esri/layers/OpenStreetMapLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../urlUtils ../SpatialReference ../geometry/Extent ./TiledMapServiceLayer ./TileInfo".split(" "),
function(m,l,a,f,k,n,g,p,d){m=m(p,{declaredClass:"esri.layers.OpenStreetMapLayer",constructor:function(a){this.spatialReference=new n({wkid:102100});this.tileInfo=new d({rows:256,cols:256,dpi:96,format:"PNG8",compressionQuality:0,origin:{x:-2.0037508342787E7,y:2.0037508342787E7},spatialReference:{wkid:102100},lods:[{level:0,scale:5.91657527591555E8,resolution:156543.033928},{level:1,scale:2.95828763795777E8,resolution:78271.5169639999},{level:2,scale:1.47914381897889E8,resolution:39135.7584820001},
{level:3,scale:7.3957190948944E7,resolution:19567.8792409999},{level:4,scale:3.6978595474472E7,resolution:9783.93962049996},{level:5,scale:1.8489297737236E7,resolution:4891.96981024998},{level:6,scale:9244648.868618,resolution:2445.98490512499},{level:7,scale:4622324.434309,resolution:1222.99245256249},{level:8,scale:2311162.217155,resolution:611.49622628138},{level:9,scale:1155581.108577,resolution:305.748113140558},{level:10,scale:577790.554289,resolution:152.874056570411},{level:11,scale:288895.277144,
resolution:76.4370282850732},{level:12,scale:144447.638572,resolution:38.2185141425366},{level:13,scale:72223.819286,resolution:19.1092570712683},{level:14,scale:36111.909643,resolution:9.55462853563415},{level:15,scale:18055.954822,resolution:4.77731426794937},{level:16,scale:9027.977411,resolution:2.38865713397468},{level:17,scale:4513.988705,resolution:1.19432856685505},{level:18,scale:2256.994353,resolution:.597164283559817},{level:19,scale:1128.497176,resolution:.298582141647617}]});this.fullExtent=
new g({xmin:-2.003750834E7,ymin:-2.003750834E7,xmax:2.003750834E7,ymax:2.003750834E7,spatialReference:{wkid:102100}});this.initialExtent=new g({xmin:-2.003750834E7,ymin:-2.003750834E7,xmax:2.003750834E7,ymax:2.003750834E7,spatialReference:{wkid:102100}});this.tileServers=a&&a.tileServers||["//a.tile.openstreetmap.org","//b.tile.openstreetmap.org","//c.tile.openstreetmap.org"];this.serversLength=this.tileServers.length;this._displayLevels=a?a.displayLevels:null;this.copyright=a&&a.copyright||"Map data \u00a9 OpenStreetMap contributors, CC-BY-SA";
this.loaded=!0;this.onLoad(this);(a=a&&a.loadCallback)&&a(this)},getTileUrl:function(a,b,e){a=this.tileServers[b%this.serversLength]+"/"+a+"/"+e+"/"+b+".png";a=k.normalize(a);a=this.addTimestampToURL(a);return k.addProxy(a)}});a("extend-esri")&&l.setObject("layers.OpenStreetMapLayer",m,f);return m})},"esri/layers/VectorTileLayer":function(){(function(){var m=function(){var a;try{a=window.WebGLRenderingContext}catch(d){a=!1}var f;try{for(var k=document.createElement("canvas"),n=["webgl","experimental-webgl",
"webkit-3d","moz-webgl"],g=null,p=0;p<n.length;++p){try{g=k.getContext(n[p])}catch(d){}if(g)break}f=g}catch(d){f=!1}return a&&f?!0:!1}(),l=["dojo/_base/lang","dojo/has","dojo/Deferred","../sniff","./layer"];m&&l.push("./VectorTileLayerImpl");define(l,function(a,f,k,n,g,p){g=p?p:g.createSubclass({declaredClass:"esri.layers.VectorTileLayer",constructor:function(){var d=new k;d.reject(Error("esri.layers.VectorTileLayer is not supported"));d.promise.otherwise(a.hitch(this,function(a){this._errorHandler(a)}))}});
g.ACCESS_TOKEN=null;g.supported=function(){return m};f("extend-esri")&&a.setObject("layers.VectorTileLayer",g,n);return g})})()},"esri/dijit/Popup":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/kernel dojo/has dojo/window dojo/Stateful dojo/query dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dijit/registry ../kernel ../lang ../domUtils ../geometry/Polyline ../geometry/Polygon ../geometry/Multipoint ../geometry/normalizeUtils ../InfoWindowBase ../PopupBase dojo/i18n!../nls/jsapi dojo/NodeList-dom".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C,y,z,E,B,R){m=m([E,B,p],{declaredClass:"esri.dijit.Popup",offsetX:3,offsetY:3,zoomFactor:4,marginLeft:25,marginTop:25,highlight:!0,pagingControls:!0,pagingInfo:!0,keepHighlightOnHide:!1,popupWindow:!0,titleInBody:!0,anchor:"auto",visibleWhenEmpty:!0,hideDelay:1E3,location:null,constructor:function(a,d){this.initialize();l.mixin(this,a);this.domNode=c.byId(d);var h=this._nls=l.mixin({},R.widgets.popup),q=this.domNode;e.add(q,"esriPopup");(this._isRTL=
!t.isBodyLtr())&&r.set(q,"direction","rtl");b.set(q,"innerHTML","\x3cdiv class\x3d'esriPopupWrapper' style\x3d'position: absolute;'\x3e\x3cdiv class\x3d'sizer'\x3e\x3cdiv class\x3d'titlePane'\x3e\x3cdiv class\x3d'spinner hidden' title\x3d'"+h.NLS_searching+"...'\x3e\x3c/div\x3e\x3cdiv class\x3d'title'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton prev hidden' title\x3d'"+h.NLS_prevFeature+"'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton next hidden' title\x3d'"+h.NLS_nextFeature+"'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton maximize' title\x3d'"+
h.NLS_maximize+"'\x3e\x3c/div\x3e\x3cdiv class\x3d'titleButton close' title\x3d'"+h.NLS_close+"'\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'sizer content'\x3e\x3cdiv class\x3d'contentPane'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'sizer'\x3e\x3cdiv class\x3d'actionsPane'\x3e\x3cdiv class\x3d'actionList hidden'\x3e\x3ca title\x3d'"+h.NLS_zoomTo+"' class\x3d'action zoomTo' href\x3d'javascript:void(0);'\x3e\x3cspan\x3e"+h.NLS_zoomTo+"\x3c/span\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'pointer hidden'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'outerPointer hidden'\x3e\x3c/div\x3e");
this._sizers=k.query(".sizer",q);h=k.query(".titlePane",q)[0];this._title=k.query(".title",h)[0];this._prevFeatureButton=k.query(".prev",h)[0];this._nextFeatureButton=k.query(".next",h)[0];this._maxButton=k.query(".maximize",h)[0];this._spinner=k.query(".spinner",h)[0];this._contentPane=k.query(".contentPane",q)[0];this._positioner=k.query(".esriPopupWrapper",q)[0];this._pointer=k.query(".pointer",q)[0];this._outerPointer=k.query(".outerPointer",q)[0];this._actionList=k.query(".actionsPane .actionList",
q)[0];this._contentUpdateHandles={};this._eventConnections=[f.connect(k.query(".close",h)[0],"onclick",this,this.hide),f.connect(this._prevFeatureButton,"onclick",this,this.selectPrevious),f.connect(this._nextFeatureButton,"onclick",this,this.selectNext),f.connect(this._maxButton,"onclick",this,this._toggleSize),f.connect(k.query(".zoomTo",this._actionList)[0],"onclick",this,this._zoomToFeature),f.connect(this,"onClearFeatures",this,this._featuresCleared),f.connect(this,"onSelectionChange",this,this._featureSelected),
f.connect(this,"onDfdComplete",this,this._updateUI)];n("esri-touch")&&(q=x.setScrollable(this._contentPane),this._eventConnections.push(q[0],q[1]));this._toggleVisibility(!1)},onMaximize:function(){},onRestore:function(){},setMap:function(a){this.inherited(arguments);h.place(this.domNode,a.root);this.highlight&&this.enableHighlight(a);this._maxHeight=r.get(this._contentPane,"maxHeight")},unsetMap:function(){this.disableHighlight(this.map);this.inherited(arguments)},setTitle:function(a){this.popupWindow&&
(q.isDefined(a)&&""!==a||(a="\x26nbsp;"),this.destroyDijits(this._title),this.place(a,this._title),this.isShowing&&(this.startupDijits(this._title),this.reposition()))},setContent:function(a){this.popupWindow&&(q.isDefined(a)&&""!==a||(a="\x26nbsp;"),this._destroyContent(),this.place(a,this._contentPane),this.isShowing&&(this._startupContent(),this.reposition()))},show:function(a,b){if(this.popupWindow)if(this._delayHide=!1,a){var c=this.map,e;a.spatialReference?(this.location=a,e=c.toScreen(a)):
(this.location=c.toMap(a),e=a);var d=c._getFrameWidth();if(-1!==d&&(e.x%=d,0>e.x&&(e.x+=d),c.width>d))for(c=(c.width-d)/2;e.x<c;)e.x+=d;this._maximized?this.restore():this._setPosition(e);b&&b.closestFirst&&this.showClosestFirst(this.location);this.isShowing||(this._toggleVisibility(!0),this._followMap(),this.startupDijits(this._title),this._startupContent(),this.reposition(),this.showHighlight(),this.onShow())}else this._toggleVisibility(!0)},hide:function(){this.isShowing&&(this._toggleVisibility(!1),
this._unfollowMap(),this.keepHighlightOnHide||this.hideHighlight(),this.onHide())},resize:function(a,b){this.popupWindow&&(this._sizers.style({width:a+"px"}),r.set(this._contentPane,"maxHeight",b+"px"),this._maxHeight=b,this.isShowing&&this.reposition())},reposition:function(){this.popupWindow&&this.map&&this.location&&!this._maximized&&this.isShowing&&this._setPosition(this.map.toScreen(this.location))},addActions:function(b){return a.map(b,function(a){var b=h.create("a",{href:"javascript:void(0);",
className:"action "+a.className,title:a.title,innerHTML:a.title},this._actionList);f.connect(b,"onclick",a.callback);return{action:a,node:b}},this)},removeActions:function(b){a.forEach(b,function(a){h.destroy(a.node)})},getCurrentAnchor:function(){return this._anchor},maximize:function(){var a=this.map;if(a&&!this._maximized&&this.popupWindow){this._maximized=!0;var c=this._maxButton;e.remove(c,"maximize");e.add(c,"restore");b.set(c,"title",this._nls.NLS_restore);var c=this.marginLeft,d=this.marginTop,
h=a.width-2*c,a=a.height-2*d;r.set(this.domNode,{left:this._isRTL?null:c+"px",right:this._isRTL?c+"px":null,top:d+"px",bottom:null});r.set(this._positioner,{left:null,right:null,top:null,bottom:null});this._savedWidth=r.get(this._sizers[0],"width");this._savedHeight=r.get(this._contentPane,"maxHeight");this._sizers.style({width:h+"px"});r.set(this._contentPane,{maxHeight:a-65+"px",height:a-65+"px"});this._showPointer("");this._unfollowMap();e.add(this.domNode,"esriPopupMaximized");this.onMaximize()}},
restore:function(){if(this.map&&this._maximized&&this.popupWindow){this._maximized=!1;var a=this._maxButton;e.remove(a,"restore");e.add(a,"maximize");b.set(a,"title",this._nls.NLS_maximize);r.set(this._contentPane,"height",null);this.resize(this._savedWidth,this._savedHeight);this._savedWidth=this._savedHeight=null;this.show(this.location);this._followMap();e.remove(this.domNode,"esriPopupMaximized");this.onRestore()}},startup:function(){},destroy:function(){this.map&&this.unsetMap();this.cleanup();
this.isShowing&&this.hide();this.destroyDijits(this._title);this._destroyContent();a.forEach(this._eventConnections,f.disconnect);h.destroy(this.domNode);this._sizers=this._contentPane=this._actionList=this._positioner=this._pointer=this._outerPointer=this._title=this._prevFeatureButton=this._nextFeatureButton=this._spinner=this._eventConnections=this._pagerScope=this._targetLocation=this._nls=this._maxButton=null},selectNext:function(){this.select(this.selectedIndex+1)},selectPrevious:function(){this.select(this.selectedIndex-
1)},setFeatures:function(a,b){this._transientAnchor=b&&b.anchor;this.inherited(arguments);this._updateUI()},clearFeatures:function(a){a||(this._transientAnchor=null);this.inherited(arguments)},postscript:null,_highlightSetter:function(a){var b=this.highlight,c=this.map;this.highlight=a;if(c&&a!==b)if(a){if(this.enableHighlight(c),a=this.features&&this.features[this.selectedIndex])this.updateHighlight(c,a),this.showHighlight()}else this.disableHighlight(c)},_pagingControlsSetter:function(a){var b=
this.pagingControls,c=this.map;this.pagingControls=a;c&&a!==b&&this._updatePagingControls()},_pagingInfoSetter:function(a){var b=this.pagingInfo,c=this.map;this.pagingInfo=a;c&&a!==b&&this.features&&this.features.length&&this._updatePagingInfo()},_popupWindowSetter:function(a){var b=this.popupWindow,c=this.map;this.popupWindow=a;c&&a!==b&&(a?(this._updateUI(),this._updateWindow()):(this.hide(),this.showHighlight()))},_anchorSetter:function(a){var b=this.anchor;this.anchor=a;this.map&&a!==b&&this.reposition()},
_startupContent:function(){var b=this._contentPane;this.startupDijits(b);a.forEach(this._getPopupRendererDijits(b),function(a){if(!this._contentUpdateHandles[a.id]){var b=a.on("content-update",l.hitch(this,function(){this.reposition()}));this._contentUpdateHandles[a.id]=b}},this)},_destroyContent:function(){var b=this._contentPane;a.forEach(this._getPopupRendererDijits(b),function(a){var b=this._contentUpdateHandles[a.id];b&&(b.remove(),delete this._contentUpdateHandles[a.id])},this);this.destroyDijits(b)},
_getPopupRendererDijits:function(b){b=this.getDijits(b);return b=a.filter(b,function(a){return a&&a.set&&/_PopupRenderer/.test(a.declaredClass)})},_featuresCleared:function(){this.setTitle("\x26nbsp;");this.setContent("\x26nbsp;");this._setPagerCallbacks(this);this._updateUI();this.hideHighlight()},_featureSelected:function(){this._updateUI();this._updateWindow()},_updateWindow:function(){var a=this.selectedIndex;if(0<=a){var b=this.features[a].getContent();if(!this.titleInBody&&b&&l.isString(b.id)){var c=
w.byId(b.id);c&&c.set&&/_PopupRenderer/.test(c.declaredClass)&&c.set("showTitle",!1)}this.setContent(b);this.updateHighlight(this.map,this.features[a]);this.showHighlight()}},_toggleVisibility:function(a){this._setVisibility(a);this.isShowing=a},_setVisibility:function(a){e.toggle(this.domNode,"esriPopupVisible",a);e.toggle(this.domNode,"esriPopupHidden",!a)},_waitAndHide:function(a){var b=this;this._delayHide=!0;setTimeout(function(){b._delayHide&&(b._delayHide=!1,b.hide())},a)},_followMap:function(){this._unfollowMap();
var a=this.map;this._handles=[f.connect(a,"onPanStart",this,this._onPanStart),f.connect(a,"onPan",this,this._onPan),f.connect(a,"onZoomStart",this,this._onZoomStart),f.connect(a,"onExtentChange",this,this._onExtentChange)]},_unfollowMap:function(){var b=this._handles;b&&(a.forEach(b,f.disconnect),this._handles=null)},_onPanStart:function(){var a=this.domNode.style;this._panOrigin={left:a.left,top:a.top,right:a.right,bottom:a.bottom}},_onPan:function(a,b){var c=this._panOrigin,e=b.x,d=b.y,h=c.left,
f=c.top,q=c.right,c=c.bottom;h&&(h=parseFloat(h)+e+"px");f&&(f=parseFloat(f)+d+"px");q&&(q=parseFloat(q)-e+"px");c&&(c=parseFloat(c)-d+"px");r.set(this.domNode,{left:h,top:f,right:q,bottom:c})},_onZoomStart:function(){this._setVisibility(!1)},_onExtentChange:function(a,b,c){c&&(this._setVisibility(!0),this.show(this._targetLocation||this.location));this._targetLocation=null},_toggleSize:function(){this._maximized?this.restore():this.maximize()},_getTargetAnchor:function(){return this._transientAnchor||
this.anchor},_setPosition:function(a){var b=a.x,c=a.y;a=this.offsetX||0;var e=this.offsetY||0,d=0,h=0,f=t.position(this.map.container,!0),q=f.w,k=f.h,v="Left",p="bottom",n="right",l="top",m=t.getContentBox(this._positioner),x=m.w/2,w=m.h/2,u=r.get(this._sizers[0],"height")+this._maxHeight+r.get(this._sizers[2],"height"),C=u/2,B=0,y=0,z=b,fa=c,E=this._getTargetAnchor().toLowerCase();if("auto"===E){if(E=g.getBox)E=E(),B=Math.max(E.l,f.x),q=Math.min(E.l+E.w,f.x+f.w),y=Math.max(E.t,f.y),k=Math.min(E.t+
E.h,f.y+f.h),z+=f.x,fa+=f.y;f=fa-y>=u;u=k-fa>=u;E=q-z>=m.w;m=z-B>=m.w;fa-y>C&&k-fa>=C&&(E?(p="",v="Left",l="",n="right"):m&&(p="",v="Right",l="",n="left"));v&&p&&z-B>x&&q-z>=x&&(f?(v="",p="bottom",n="",l="top"):u&&(v="",p="top",n="",l="bottom"));v&&p&&(E&&f?(v="Left",p="bottom",n="right",l="top"):E&&u?(v="Left",p="top",n="right",l="bottom"):m&&u?(v="Right",p="top",n="left",l="bottom"):m&&f&&(v="Right",p="bottom",n="left",l="top"));this._anchor=l&&n?l+"-"+n:l||n}else p=v="",-1!==E.indexOf("top")?p=
"bottom":-1!==E.indexOf("bottom")&&(p="top"),-1!==E.indexOf("left")?v="Right":-1!==E.indexOf("right")&&(v="Left"),this._anchor=this._getTargetAnchor();n=p+v;switch(n){case "top":case "bottom":h=14;break;case "Left":case "Right":d=13;break;case "topLeft":case "topRight":case "bottomLeft":case "bottomRight":h=14,d=-16}r.set(this.domNode,{left:b+"px",top:c+"px",right:null,bottom:null});b={left:null,right:null,top:null,bottom:null};v?b[v.toLowerCase()]=d+a+"px":b.left=-x+"px";p?b[p]=h+e+"px":b.top=-w+
"px";r.set(this._positioner,b);this._showPointer(n)},_showPointer:function(a){e.remove(this._pointer,"top bottom right left topLeft topRight bottomRight bottomLeft hidden".split(" "));e.remove(this._outerPointer,["right","left","hidden"]);"Right"===a||"Left"===a?(a=a.toLowerCase(),e.add(this._outerPointer,a)):e.add(this._pointer,a)},_setPagerCallbacks:function(a,b,c){if(this.pagingControls&&(a!==this||this._pagerScope&&this._pagerScope!==this)&&a!==this._pagerScope){this._pagerScope=a;a===this&&(b=
this.selectPrevious,c=this.selectNext);var e=this._eventConnections;f.disconnect(e[1]);f.disconnect(e[2]);b&&(e[1]=f.connect(this._prevFeatureButton,"onclick",a,b));c&&(e[2]=f.connect(this._nextFeatureButton,"onclick",a,c))}},_getLocation:function(b){var c,e,d=b&&b.geometry;if(d)switch(d.type){case "point":c=d;b.isAggregate()&&(b=b.getChildGraphics(),e=b[0],b=(e=e.geometry&&e.geometry.spatialReference)&&new y({points:a.map(b,function(a){a=a.geometry;return[a.x,a.y]}),spatialReference:e.toJson()}),
e=z.getDenormalizedExtent(b));break;case "multipoint":c=d.getPoint(0);e=z.getDenormalizedExtent(d);break;case "polyline":case "polygon":c=d.getPoint(0,0),e=z.getDenormalizedExtent(d)}return[c,e]},_zoomToFeature:function(a){a.preventDefault();var b=this.features,c=this.selectedIndex;a=this.map;if(b)if(c=this._getLocation(b[c]),b=c[0],c=c[1],b||(b=this.location),c&&c.intersects(this.location)||(this.location=b),c&&c.getWidth()&&c.getHeight())a.setExtent(c,!0);else{var e=a.getNumLevels(),c=a.getLevel(),
d=a.getMaxZoom(),h=this.zoomFactor||1;0<e?c!==d&&(e=c+h,e>d&&(e=d),a.navigationManager._wheelZoom({value:e-c,mapPoint:b},!0)):a.navigationManager._wheelZoom({value:1/Math.pow(2,h)*2,mapPoint:b},!0)}},_updatePagingControls:function(){var a=this._prevFeatureButton,b=this._nextFeatureButton,c=this.selectedIndex,d=this.features?this.features.length:0;this.pagingControls&&1<d?(0===c?e.add(a,"hidden"):e.remove(a,"hidden"),c===d-1?e.add(b,"hidden"):e.remove(b,"hidden")):(e.add(a,"hidden"),e.add(b,"hidden"))},
_updatePagingInfo:function(){var a=this.features?this.features.length:0,b=this._nls,c="\x26nbsp;";this.pagingInfo&&1<a&&b.NLS_pagingInfo&&(c=q.substitute({index:this.selectedIndex+1,total:a},b.NLS_pagingInfo));a&&(b=this.getSelectedFeature(),a=b.getInfoTemplate(),b=b.getTitle(),a&&!/esri\.InfoTemplate/.test(a.declaredClass)&&this.titleInBody||!b||(c=b+("\x26nbsp;"===c?"":" "+c)));this.setTitle(c)},_updateUI:function(){if(this.popupWindow){var a=this.features,b=this.deferreds,c=a?a.length:0,d=this._spinner,
h=this._actionList,f=this._nls;this._updatePagingControls();this._updatePagingInfo();c?e.remove(h,"hidden"):e.add(h,"hidden");b&&b.length?a?e.remove(d,"hidden"):this.setContent("\x3cdiv style\x3d'text-align: center;'\x3e"+f.NLS_searching+"...\x3c/div\x3e"):e.add(d,"hidden");c||b&&b.length?this._delayHide=!1:(this.setContent("\x3cdiv style\x3d'text-align: center;'\x3e"+f.NLS_noInfo+".\x3c/div\x3e"),this.visibleWhenEmpty||this._waitAndHide(this.hideDelay))}}});n("extend-esri")&&l.setObject("dijit.Popup",
m,u);return m})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),function(m,l,a,f,k,n,g){l.add("rtl-adjust-position-for-verticalScrollBar",function(d,c){var b=a.body(c),e=g.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},b,"last"),h=g.create("div",{style:{overflow:"hidden",direction:"ltr"}},e,"last"),f=0!=
k.position(h).x;e.removeChild(h);b.removeChild(e);return f});l.add("position-fixed-support",function(d,c){var b=a.body(c),e=g.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},b,"last"),h=g.create("span",{style:{position:"fixed",left:"0",top:"0"}},e,"last"),f=k.position(h).x!=k.position(e).x;e.removeChild(h);b.removeChild(e);return f});var p={getBox:function(d){d=d||a.doc;var c="BackCompat"==d.compatMode?a.body(d):d.documentElement,b=k.docScroll(d);if(l("touch")){var e=
p.get(d);d=e.innerWidth||c.clientWidth;c=e.innerHeight||c.clientHeight}else d=c.clientWidth,c=c.clientHeight;return{l:b.x,t:b.y,w:d,h:c}},get:function(a){if(l("ie")&&p!==document.parentWindow){a.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var c=a._parentWindow;a._parentWindow=null;return c}return a.parentWindow||a.defaultView},scrollIntoView:function(d,c){try{d=f.byId(d);var b=d.ownerDocument||a.doc,e=a.body(b),h=b.documentElement||e.parentNode,g=l("ie")||l("trident"),
p=l("webkit");if(d!=e&&d!=h)if(!(l("mozilla")||g||p||l("opera")||l("trident")||l("edge"))&&"scrollIntoView"in d)d.scrollIntoView(!1);else{var m="BackCompat"==b.compatMode,u=Math.min(e.clientWidth||h.clientWidth,h.clientWidth||e.clientWidth),q=Math.min(e.clientHeight||h.clientHeight,h.clientHeight||e.clientHeight),b=p||m?e:h,x=c||k.position(d),v=d.parentNode,p=function(a){return 6>=g||7==g&&m?!1:l("position-fixed-support")&&"fixed"==n.get(a,"position").toLowerCase()},C=this,y=function(a,b,c){"BODY"==
a.tagName||"HTML"==a.tagName?C.get(a.ownerDocument).scrollBy(b,c):(b&&(a.scrollLeft+=b),c&&(a.scrollTop+=c))};if(!p(d))for(;v;){v==e&&(v=b);var z=k.position(v),E=p(v),B="rtl"==n.getComputedStyle(v).direction.toLowerCase();if(v==b)z.w=u,z.h=q,b==h&&(g||l("trident"))&&B&&(z.x+=b.offsetWidth-z.w),z.x=0,z.y=0;else{var R=k.getPadBorderExtents(v);z.w-=R.w;z.h-=R.h;z.x+=R.l;z.y+=R.t;var D=v.clientWidth,H=z.w-D;0<D&&0<H&&(B&&l("rtl-adjust-position-for-verticalScrollBar")&&(z.x+=H),z.w=D);D=v.clientHeight;
H=z.h-D;0<D&&0<H&&(z.h=D)}E&&(0>z.y&&(z.h+=z.y,z.y=0),0>z.x&&(z.w+=z.x,z.x=0),z.y+z.h>q&&(z.h=q-z.y),z.x+z.w>u&&(z.w=u-z.x));var O=x.x-z.x,Y=x.y-z.y,T=O+x.w-z.w,F=Y+x.h-z.h,S,K;0<T*O&&(v.scrollLeft||v==b||v.scrollWidth>v.offsetHeight)&&(S=Math[0>O?"max":"min"](O,T),B&&(8==g&&!m||5<=l("trident"))&&(S=-S),K=v.scrollLeft,y(v,S,0),S=v.scrollLeft-K,x.x-=S);0<F*Y&&(v.scrollTop||v==b||v.scrollHeight>v.offsetHeight)&&(S=Math.ceil(Math[0>Y?"max":"min"](Y,F)),K=v.scrollTop,y(v,0,S),S=v.scrollTop-K,x.y-=S);
v=v!=b&&!E&&v.parentNode}}}catch(Z){console.error("scrollIntoView: "+Z),d.scrollIntoView(!1)}}};m.setObject("dojo.window",p);return p})},"dojo/Stateful":function(){define(["./_base/declare","./_base/lang","./_base/array","./when"],function(m,l,a,f){return m("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(a){var f=this._attrPairNames;return f[a]?f[a]:f[a]={s:"_"+a+"Setter",g:"_"+a+"Getter"}},postscript:function(a){a&&this.set(a)},_get:function(a,f){return"function"===typeof this[f.g]?
this[f.g]():this[a]},get:function(a){return this._get(a,this._getAttrNames(a))},set:function(a,n){if("object"===typeof a){for(var g in a)a.hasOwnProperty(g)&&"_watchCallbacks"!=g&&this.set(g,a[g]);return this}g=this._getAttrNames(a);var k=this._get(a,g);g=this[g.s];var d;"function"===typeof g?d=g.apply(this,Array.prototype.slice.call(arguments,1)):this[a]=n;if(this._watchCallbacks){var c=this;f(d,function(){c._watchCallbacks(a,k,n)})}return this},_changeAttrValue:function(a,f){var g=this.get(a);this[a]=
f;this._watchCallbacks&&this._watchCallbacks(a,g,f);return this},watch:function(f,n){var g=this._watchCallbacks;if(!g)var k=this,g=this._watchCallbacks=function(a,c,d,f){var b=function(b){if(b){b=b.slice();for(var e=0,h=b.length;e<h;e++)b[e].call(k,a,c,d)}};b(g["_"+a]);f||b(g["*"])};n||"function"!==typeof f?f="_"+f:(n=f,f="*");var d=g[f];"object"!==typeof d&&(d=g[f]=[]);d.push(n);var c={};c.unwatch=c.remove=function(){var b=a.indexOf(d,n);-1<b&&d.splice(b,1)};return c}})})},"esri/geometry/normalizeUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/_base/Deferred dojo/has ../kernel ../config ../deferredUtils ./Extent ./Polyline ./Polygon ./webMercatorUtils ./jsonUtils".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e){function h(a,b){return Math.ceil((a-b)/(2*b))}function t(a,b){var c=a.paths||a.rings,e,d,h=c.length,f;for(e=0;e<h;e++)for(f=c[e].length,d=0;d<f;d++){var q=a.getPoint(e,d);a.setPoint(e,d,q.offset(b,0))}return a}function r(a,b){if(!(a instanceof d||a instanceof c))throw console.error("_straightLineDensify: the input geometry is neither polyline nor polygon"),Error("_straightLineDensify: the input geometry is neither polyline nor polygon");var e=a instanceof d,h=[],
f;m.forEach(e?a.paths:a.rings,function(a){h.push(f=[]);f.push([a[0][0],a[0][1]]);var c,e,d,q,g,k,v,p,n,r,t,l;for(g=0;g<a.length-1;g++){c=a[g][0];e=a[g][1];d=a[g+1][0];q=a[g+1][1];v=Math.sqrt((d-c)*(d-c)+(q-e)*(q-e));p=(q-e)/v;n=(d-c)/v;r=v/b;if(1<r){for(k=1;k<=r-1;k++)l=k*b,t=n*l+c,l=p*l+e,f.push([t,l]);k=(v+Math.floor(r-1)*b)/2;t=n*k+c;l=p*k+e;f.push([t,l])}f.push([d,q])}});return e?new d({paths:h,spatialReference:a.spatialReference}):new c({rings:h,spatialReference:a.spatialReference})}function w(a,
c,e){c&&(a=r(a,1E6),a=b.webMercatorToGeographic(a,!0));e&&(a=t(a,e));return a}function u(a,b,c){var e=a.x||a[0],d;e>b?(d=h(e,b),a.x?a=a.offset(-2*d*b,0):a[0]=e+-2*d*b):e<c&&(d=h(e,c),a.x?a=a.offset(-2*d*c,0):a[0]=e+-2*d*c);return a}function q(a,b){var c=-1;m.forEach(b.cutIndexes,function(e,d){var f=b.geometries[d];m.forEach(f.rings||f.paths,function(a,b){m.some(a,function(c){if(!(180>c[0])){c=0;var e,d=a.length,q;for(e=0;e<d;e++)q=a[e][0],c=q>c?q:c;c=Number(c.toFixed(9));c=-360*h(c,180);d=a.length;
for(e=0;e<d;e++)q=f.getPoint(b,e),f.setPoint(b,e,q.offset(c,0))}return!0})});e===c?f.rings?m.forEach(f.rings,function(b){a[e]=a[e].addRing(b)}):m.forEach(f.paths,function(b){a[e]=a[e].addPath(b)}):(c=e,a[e]=f)});return a}function x(f,g,k,v){var p=new a;p.addCallbacks(k,v);g=g||n.defaults.geometryService;var r=[],l=[],x,C,B,y,z,E,D,R,H=0;m.forEach(f,function(a){if(a)if(x||(x=a.spatialReference,C=x._getInfo(),y=(B=x._isWebMercator())?2.0037508342788905E7:180,z=B?-2.0037508342788905E7:-180,E=B?102100:
4326,D=new d({paths:[[[y,z],[y,y]]],spatialReference:{wkid:E}}),R=new d({paths:[[[z,z],[z,y]]],spatialReference:{wkid:E}})),C){var b=e.fromJson(a.toJson()),f=a.getExtent();"point"===a.type?r.push(u(b,y,z)):"multipoint"===a.type?(b.points=m.map(b.points,function(a){return u(a,y,z)}),r.push(b)):"extent"===a.type?(b=f._normalize(null,null,C),r.push(b.rings?new c(b):b)):f?(a=2*h(f.xmin,z)*y,b=0===a?b:t(b,a),f=f.offset(a,0),f.intersects(D)&&f.xmax!==y?(H=f.xmax>H?f.xmax:H,b=w(b,B),l.push(b),r.push("cut")):
f.intersects(R)&&f.xmin!==z?(H=2*f.xmax*y>H?2*f.xmax*y:H,b=w(b,B,360),l.push(b),r.push("cut")):r.push(b)):r.push(b)}else r.push(a);else r.push(a)});k=new d;v=h(H,y);for(var ca=-90,ua=v;0<v;){var ja=-180+360*v;k.addPath([[ja,ca],[ja,-1*ca]]);ca*=-1;v--}0<l.length&&0<ua?g?g.cut(l,k,function(a){l=q(l,a);var c=[];m.forEach(r,function(a,e){if("cut"===a){var d=l.shift();f[e].rings&&1<f[e].rings.length&&d.rings.length>=f[e].rings.length?(r[e]="simplify",c.push(d)):r[e]=!0===B?b.geographicToWebMercator(d):
d}});0<c.length?g.simplify(c,function(a){m.forEach(r,function(c,e){"simplify"===c&&(r[e]=!0===B?b.geographicToWebMercator(a.shift()):a.shift())});p.callback(r)},function(a){p.errback(a)}):p.callback(r)},function(a){p.errback(a)}):p.errback(Error("esri.geometry.normalizeCentralMeridian: 'geometryService' argument is missing.")):(m.forEach(r,function(a,c){if("cut"===a){var e=l.shift();r[c]=!0===B?b.geographicToWebMercator(e):e}}),p.callback(r));return p}function v(a,b,c,e){var d=!1,f;l.isObject(a)&&
a&&(l.isArray(a)?a.length&&((f=a[0]&&a[0].declaredClass)&&-1!==f.indexOf("Graphic")?(a=m.map(a,function(a){return a.geometry}),d=a.length?!0:!1):f&&-1!==f.indexOf("esri.geometry.")&&(d=!0)):(f=a.declaredClass)&&-1!==f.indexOf("FeatureSet")?(a=m.map(a.features||[],function(a){return a.geometry}),d=a.length?!0:!1):f&&-1!==f.indexOf("esri.geometry.")&&(d=!0));d&&b.push({index:c,property:e,value:a})}function C(a,b){var c=[];m.forEach(b,function(b){var e=b.i,d=a[e];b=b.p;var f;if(l.isObject(d)&&d)if(b)if("*"===
b[0])for(f in d)d.hasOwnProperty(f)&&v(d[f],c,e,f);else m.forEach(b,function(a){v(l.getObject(a,!1,d),c,e,a)});else v(d,c,e)});return c}function y(a,b){var c=0,e={};m.forEach(b,function(b){var d=b.index,f=b.property,h=b.value,q=h.length||1,g=a.slice(c,c+q);l.isArray(h)||(g=g[0]);c+=q;delete b.value;f?(e[d]=e[d]||{},e[d][f]=g):e[d]=g});return e}function z(a){for(var b=[],c=0,e=0,d=Math.min,f=Math.max,h=0;h<a.length;h++){for(var q=a[h],g=null,k=0;k<q.length;k++)g=q[k],b.push(g),0===k?e=c=g[0]:(c=d(c,
g[0]),e=f(e,g[0]));g&&b.push([(c+e)/2,0])}return b}var E={normalizeCentralMeridian:x,_foldCutResults:q,_prepareGeometryForCut:w,_offsetMagnitude:h,_pointNormalization:u,_updatePolyGeometry:t,_straightLineDensify:r,_createWrappers:function(b){var c=l.isObject(b)?b.prototype:l.getObject(b+".prototype");m.forEach(c.__msigns,function(b){var e=c[b.n];c[b.n]=function(){var c=this,d=[],f,h=new a(g._dfdCanceller);b.f&&g._fixDfd(h);for(f=0;f<b.c;f++)d[f]=arguments[f];var q={dfd:h};d.push(q);var k,v=[],p;c.normalization&&
!c._isTable&&(k=C(d,b.a),m.forEach(k,function(a){v=v.concat(a.value)}),v.length&&(p=x(v)));p?(h._pendingDfd=p,p.addCallbacks(function(a){h.canceled||(q.assembly=y(a,k),h._pendingDfd=e.apply(c,d))},function(a){var e=c.declaredClass;e&&-1!==e.indexOf("FeatureLayer")?c._resolve([a],null,d[b.e],h,!0):c._errorHandler(a,d[b.e],h)})):h._pendingDfd=e.apply(c,d);return h}})},_disassemble:C,_addToBucket:v,_reassemble:y,getDenormalizedExtent:function(a){if(!a)return null;var b=a.getExtent();if(!b)return null;
var c=a.spatialReference&&a.spatialReference._getInfo();if(!c)return b;var e=c.valid[0],c=c.valid[1],d=2*c,f=b.getWidth(),h=b.xmax,q=b.xmin;if("extent"===a.type||0===f||f<=c||f>d||h<e||q>c)return b;var g;switch(a.type){case "polygon":if(1<a.rings.length)g=z(a.rings);else return b;break;case "polyline":if(1<a.paths.length)g=z(a.paths);else return b;break;case "multipoint":g=a.points}a=Math.min;for(var e=Math.max,d=new p(b.toJson()),k=0;k<g.length;k++){var v=g[k][0];0>v?(v+=c,q=e(v,q)):(v-=c,h=a(v,
h))}d.xmin=h;d.xmax=q;return d.getWidth()<f?(d.xmin-=c,d.xmax-=c,d):b}};f("extend-esri")&&l.mixin(l.getObject("geometry",!0,k),E);return E})},"esri/geometry/jsonUtils":function(){define("dojo/_base/lang dojo/has ../kernel ./Point ./Polyline ./Polygon ./Multipoint ./Extent".split(" "),function(m,l,a,f,k,n,g,p){var d={fromJson:function(a){if(void 0!==a.x&&void 0!==a.y)return new f(a);if(void 0!==a.paths)return new k(a);if(void 0!==a.rings)return new n(a);if(void 0!==a.points)return new g(a);if(void 0!==
a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax)return new p(a)},getJsonType:function(a){return a instanceof f?"esriGeometryPoint":a instanceof k?"esriGeometryPolyline":a instanceof n?"esriGeometryPolygon":a instanceof p?"esriGeometryEnvelope":a instanceof g?"esriGeometryMultipoint":null},getGeometryType:function(a){return"esriGeometryPoint"===a?f:"esriGeometryPolyline"===a?k:"esriGeometryPolygon"===a?n:"esriGeometryEnvelope"===a?p:"esriGeometryMultipoint"===a?g:null}};l("extend-esri")&&
m.mixin(m.getObject("geometry",!0,a),d);return d})},"esri/InfoWindowBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/Deferred dojo/dom-construct dojo/has dijit/registry ./kernel ./lang ./geometry/ScreenPoint".split(" "),function(m,l,a,f,k,n,g,p,d,c,b){m=m(null,{declaredClass:"esri.InfoWindowBase",constructor:function(){var a=l.hitch;this.__set_title=a(this,this.__set_title);this.__err_title=a(this,this.__err_title);this.__set_content=a(this,
this.__set_content);this.__err_content=a(this,this.__err_content)},setMap:function(a){this.map=a},unsetMap:function(a){delete this.map},setTitle:function(){},setContent:function(){},show:function(){},hide:function(){},resize:function(){},onShow:function(){},onHide:function(){},place:function(a,b){c.isDefined(a)?l.isObject(a)?n.place(a,b,"only"):b.innerHTML=a:b.innerHTML=""},startupDijits:function(a){this._processDijits(a)},destroyDijits:function(a){this._processDijits(a,!0)},getDijits:function(a){var b=
[];a&&1===a.children.length&&(a=a.children[0])&&(b=(b=p.byNode(a))?[b]:p.findWidgets(a));return b},_processDijits:function(b,c){var e=this.getDijits(b);a.forEach(e,function(a){if(c){if(a._started&&!a._destroyed)try{a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy()}catch(w){console.debug("An error occurred when destroying a widget embedded within InfoWindow: "+w.message)}}else if(!a._started)try{a.startup()}catch(w){console.debug("An error occurred when starting a widget embedded within InfoWindow: "+
w.message)}})},__registerMapListeners:function(){this.__unregisterMapListeners();var a=this.map;this.__handles=[f.connect(a,"onPan",this,this.__onMapPan),f.connect(a,"onZoomStart",this,this.__onMapZmStart),f.connect(a,"onExtentChange",this,this.__onMapExtChg)]},__unregisterMapListeners:function(){var b=this.__handles;b&&(a.forEach(b,f.disconnect,f),this.__handles=null)},__onMapPan:function(a,b){this.move(b,!0)},__onMapZmStart:function(){this.__mcoords=this.mapCoords||this.map.toMap(new b(this.coords));
this.hide(null,!0)},__onMapExtChg:function(a,b,c){a=this.map;var e=this.mapCoords;e?this.show(e,null,!0):(b=c?a.toScreen(this.__mcoords):this.coords.offset(b&&b.x||0,b&&b.y||0),this.show(b,null,!0))},__setValue:function(a,b){this[a].innerHTML="";var e="_dfd"+a,d=this[e];d&&-1===d.fired&&(d.cancel(),this[e]=null);c.isDefined(b)&&(b instanceof k?(this[e]=b,b.addCallbacks(this["__set"+a],this["__err"+a])):this.__render(a,b))},__set_title:function(a){this._dfd_title=null;this.__render("_title",a)},__err_title:function(a){this._dfd_title=
null},__set_content:function(a){this._dfd_content=null;this.__render("_content",a)},__err_content:function(a){this._dfd_content=null},__render:function(a,b){var c=this[a];this.place(b,c);this.isShowing&&(this.startupDijits(c),"_title"===a&&this._adjustContentArea&&this._adjustContentArea())}});g("extend-esri")&&(d.InfoWindowBase=m);return m})},"esri/PopupBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Color dojo/_base/Deferred dojo/has ./kernel ./graphic ./geometry/Point ./geometry/jsonUtils ./geometry/mathUtils ./geometry/webMercatorUtils ./symbols/SimpleMarkerSymbol ./symbols/SimpleLineSymbol ./symbols/CartographicLineSymbol ./symbols/SimpleFillSymbol ./tasks/query ./Evented".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q){function x(a){return"sizeInfo"===a.type}m=m(q,{declaredClass:"esri.PopupBase",_featureLayers:{},_updateEndHandles:[],_evtMap:{"set-features":!0,"clear-features":!0,"selection-change":!0,"dfd-complete":!0},onSetFeatures:function(){},onClearFeatures:function(){},onSelectionChange:function(){},onDfdComplete:function(){},initialize:function(){this.count=0;this.selectedIndex=-1;this.on("clear-features",l.hitch(this,this._resetUpdateEndListeners));this.on("dfd-complete",
l.hitch(this,this._processFeatures));this.on("set-features",l.hitch(this,this._processFeatures))},cleanup:function(){this.features=this.deferreds=null;this._resetUpdateEndListeners()},setFeatures:function(b){if(b&&b.length){this.clearFeatures(!0);var c,e;b[0]instanceof k?e=b:c=b;c?this._updateFeatures(null,c):(this.deferreds=e,e=e.slice(0),a.forEach(e,function(a){a.addBoth(l.hitch(this,this._updateFeatures,a))},this))}},clearFeatures:function(a){this.features=this.deferreds=this._marked=null;this.count=
0;var b=this.selectedIndex;this.selectedIndex=-1;if(-1<b)this.onSelectionChange();this.onClearFeatures({isIntermediate:!!a})},getSelectedFeature:function(){var a=this.features;if(a)return a[this.selectedIndex]},select:function(a){0>a||a>=this.count||(this.selectedIndex=a,this.onSelectionChange())},enableHighlight:function(a){this._highlighted=a.graphics.add(new p(new d(0,0,a.spatialReference)));this._highlighted.attr("data-popup-highlight","");this._highlighted.hide();this.markerSymbol||(a=this.markerSymbol=
new h,a.setStyle(h.STYLE_TARGET),a._setDim(16,16,0),a.setOutline(new r(t.STYLE_SOLID,new f([0,255,255]),2,r.CAP_ROUND,r.JOIN_ROUND)),a.setColor(new f([0,0,0,0])));this.lineSymbol||(this.lineSymbol=new t(t.STYLE_SOLID,new f([0,255,255]),2));this.fillSymbol||(this.fillSymbol=new w(w.STYLE_NULL,new t(t.STYLE_SOLID,new f([0,255,255]),2),new f([0,0,0,0])));this.clusterFillSymbol||(this.clusterFillSymbol=new w(w.STYLE_SOLID,new t(t.STYLE_SOLID,new f([0,255,255]),1.33),null))},disableHighlight:function(a){var b=
this._highlighted;b&&(b.hide(),a.graphics.remove(b),delete this._highlighted);this.markerSymbol=this.lineSymbol=this.fillSymbol=null},showHighlight:function(){var a=this.features&&this.features[this.selectedIndex];this._highlighted&&a&&a.geometry&&this._highlighted.show()},hideHighlight:function(){this._highlighted&&this._highlighted.hide()},updateHighlight:function(a,b){var e=b.geometry,d=this._highlighted;if(e&&d){d.hide();!d._graphicsLayer&&a&&a.graphics.add(d);d.setGeometry(c.fromJson(e.toJson()));
var f;switch(e.type){case "point":case "multipoint":var h=b.getLayer(),e=b.symbol||h&&h._getSymbol(b);if(h&&e){var q,g,k=0,v=0,p=0;f=b.symbol?null:h._getRenderer(b);if(h=this._getSizeInfo(f))q=g=f.getSize(b,{sizeInfo:h,shape:e.style,resolution:a&&a.getResolutionInMeters&&a.getResolutionInMeters()});else if(null!=b.size)q=g=b.size;else switch(e.type){case "simplemarkersymbol":q=g=e.size||0;break;case "picturemarkersymbol":q=e.width||0,g=e.height||0}k=e.xoffset||0;v=e.yoffset||0;p=e.angle||0;f=this.markerSymbol;
f.setOffset(0,0);f.setAngle(0);q&&g&&f._setDim(q+4,g+4,0);f.setOffset(k,v);f.setAngle(p)}break;case "polyline":f=this.lineSymbol;break;case "polygon":f=this.fillSymbol}d.setSymbol(f)}else d&&d.hide()},showClosestFirst:function(a){var c=this.features;if(c&&c.length){if(1<c.length){var d,f=Infinity,h=-1,q,g=b.getLength,k,v=a.spatialReference,p,n;a=a.normalize();for(d=c.length-1;0<=d;d--)if(q=c[d].geometry){p=q.spatialReference;k=0;try{n="point"===q.type?q:q.getExtent().getCenter(),n=n.normalize(),v&&
p&&!v.equals(p)&&v._canProject(p)&&(n=v.isWebMercator()?e.geographicToWebMercator(n):e.webMercatorToGeographic(n)),k=g(a,n)}catch(T){}0<k&&k<f&&(f=k,h=d)}0<h&&(c.splice(0,0,c.splice(h,1)[0]),this.select(0))}}else this.deferreds&&(this._marked=a)},_unbind:function(b){b=a.indexOf(this.deferreds,b);if(-1!==b)return this.deferreds.splice(b,1),this.deferreds.length?1:(this.deferreds=null,2)},_fireComplete:function(a){var b=this._marked;b&&(this._marked=null,this.showClosestFirst(b));this.onDfdComplete(a)},
_updateFeatures:function(b,c){if(b){if(this.deferreds){var e=this._unbind(b);if(e)if(c&&c instanceof Error){if(this._fireComplete(c),2===e)this.onSetFeatures()}else if(c&&c.length)if(this.features){var d=a.filter(c,function(b){return-1===a.indexOf(this.features,b)},this);this.features=this.features.concat(d);this.count=this.features.length;this._fireComplete();if(2===e)this.onSetFeatures()}else{this.features=c;this.count=c.length;this.selectedIndex=0;this._fireComplete();if(2===e)this.onSetFeatures();
this.select(0)}else if(this._fireComplete(),2===e)this.onSetFeatures()}}else this.features=c,this.count=c.length,this.selectedIndex=0,this.onSetFeatures(),this.select(0)},_getSizeInfo:function(b){return b?b.sizeInfo||a.filter(b.visualVariables,x)[0]:null},_resetUpdateEndListeners:function(){this._featureLayers={};a.forEach(this._updateEndHandles,function(a){a.remove()});this._updateEndHandles=[]},_processFeatures:function(){a.forEach(this.features,function(a){(a=a.getLayer())&&!this._featureLayers[a.id]&&
(1===a.currentMode||0===a.currentMode&&6===a.mode)&&a.objectIdField&&a.hasXYFootprint&&a.queryFeatures&&("esriGeometryPolygon"===a.geometryType||"esriGeometryPolyline"===a.geometryType||a.hasXYFootprint())&&(this._featureLayers[a.id]=a,a=a.on("update-end",l.hitch(this,this._fLyrUpdateEndHandler)),this._updateEndHandles.push(a))},this)},_fLyrUpdateEndHandler:function(b){if(!b.error){var c=this,e=b.target,d=e.getSelectedFeatures(),f=0===e.currentMode&&6===e.mode,h={},q=[];a.forEach(this.features,function(a){if(a.getLayer()===
e){var b=a.attributes[e.objectIdField];h[b]=a;q.push(b)}});q.length&&(b=new u,b.objectIds=q,e.queryFeatures(b,function(b){a.forEach(b.features,function(b){var c=h[b.attributes[e.objectIdField]],q=!1;c.geometry!==b.geometry?(c.setGeometry(b.geometry),q=!0):f&&d&&-1!==a.indexOf(d,b)&&(q=!0);q&&this._highlighted&&c===this.getSelectedFeature()&&this._highlighted.setGeometry(b.geometry)},c)}))}}});n("extend-esri")&&(g.PopupBase=m);return m})},"esri/graphic":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ./kernel ./domUtils ./lang ./InfoTemplate ./geometry/jsonUtils ./symbols/jsonUtils".split(" "),
function(m,l,a,f,k,n,g,p,d){m=m(null,{declaredClass:"esri.Graphic",constructor:function(a,b,e,f){this._geomVersion=0;a&&!a.declaredClass?(this.geometry=a.geometry?p.fromJson(a.geometry):null,this.symbol=a.symbol?d.fromJson(a.symbol):null,this.attributes=a.attributes||null,this.infoTemplate=a.infoTemplate?new g(a.infoTemplate):null):(this.geometry=a,this.symbol=b,this.attributes=e,this.infoTemplate=f)},_geomVersion:null,_shape:null,_dataAttrs:null,_graphicsLayer:null,_suspended:!1,size:null,_visible:!0,
visible:!0,_aggregationSourceLayer:null,_aggregationInfo:null,setSize:function(a){this.size=a},getAggregationSourceLayer:function(){return this._aggregationSourceLayer},setAggregationSourceLayer:function(a){this._aggregationSourceLayer=a},isAggregate:function(){return!!this._aggregationInfo},getAggregationInfo:function(){return this._aggregationInfo},setAggregationInfo:function(a){this._aggregationInfo=a},getChildGraphics:function(){var a=this.getAggregationSourceLayer();return a?a.getChildGraphics(this):
[]},getDojoShape:function(){return this._shape},getShapes:function(){var a=[];this._shape&&a.push(this._shape);this._bgShape&&a.push(this._bgShape);return a},getNode:function(){var a=this._shape&&this._shape.getNode();return a&&a.nodeType?a:null},getNodes:function(){var a=this.getShapes(),b,e,d=a.length,f=[];for(e=0;e<d;e++)(b=a[e]&&a[e].getNode())&&b.nodeType&&f.push(b);return f},getLayer:function(){return this._layer},getSourceLayer:function(){return this._sourceLayer||this._layer},clone:function(){var a=
new this.constructor(this.toJson());a.visible=this.visible;a._visible=this._visible;a._layer=this._layer;a._sourceLayer=this._sourceLayer;a._aggregationSourceLayer=this._aggregationSourceLayer;a._aggregationInfo=this._aggregationInfo;return a},draw:function(){var a=this._graphicsLayer;a&&a._draw(this,!0);return this},setGeometry:function(a){this.geometry=a;this._geomVersion++;var b=this._graphicsLayer;b&&(b._updateExtent(this),b._draw(this,!0),a&&"polyline"===a.type&&b._updateSVGMarkers());return this},
setSymbol:function(a,b){var c=this._graphicsLayer,d=this._shape;this.symbol=a;c&&(b&&d&&c._removeShape(this),c._draw(this,!0));return this},setAttributes:function(a){this.attributes=a;this._clearCache();return this},setInfoTemplate:function(a){this.infoTemplate=a;return this},getInfoTemplate:function(){return this._getEffInfoTemplate()},_getEffInfoTemplate:function(){var a=this.getLayer();return this.infoTemplate||a&&a.infoTemplate},getTitle:function(){var a=this.getInfoTemplate(),b=a&&a.title;if(l.isFunction(b))b=
b.call(a,this);else if(l.isString(b))var e=(a=this.getLayer())&&a._getDateOpts,b=n.substitute(this.attributes,b,{first:!0,dateFormat:e&&e.call(a)});return b},getContent:function(){var a=this.getInfoTemplate(),b=a&&a.content;if(l.isFunction(b))b=b.call(a,this);else if(l.isString(b))var e=(a=this.getLayer())&&a._getDateOpts,b=n.substitute(this.attributes,b,{dateFormat:e&&e.call(a)});return b},attr:function(a,b){null==b||this._dataAttrs||(this._dataAttrs={});this._dataAttrs&&(this._dataAttrs[a]=b,this._setDataAttr(a,
b));return this},show:function(){this.visible=this._visible=!0;this.attr("data-hidden");var a,b,e;if(this.getShapes().length)for(a=this.getNodes(),e=a.length,b=0;b<e;b++)k.show(a[b]);else this._graphicsLayer&&this._graphicsLayer._draw(this,!0);return this},hide:function(){this.visible=this._visible=!1;this.attr("data-hidden","");var a=this._graphicsLayer,b,e;if(a)if("canvas-2d"===a.surfaceType)a._removeShape(this);else if(a=this.getNodes(),e=a.length)for(b=0;b<e;b++)k.hide(a[b]);return this},toJson:function(){var a=
{};this.geometry&&(a.geometry=this.geometry.toJson());this.attributes&&(a.attributes=l.mixin({},this.attributes));this.symbol&&(a.symbol=this.symbol.toJson());this.infoTemplate&&(a.infoTemplate=this.infoTemplate.toJson());return a},_setDataAttr:function(a,b){var c=this.getNodes(),d,f=c.length;for(d=0;d<f;d++)this._setDOMDataAttr(c[d],a,b)},_setDOMDataAttr:function(a,b,e){null==e?a.removeAttribute(b):a.setAttribute(b,e)},_applyDataAttrs:function(){var a=this._dataAttrs;if(a){var b=this.getNodes(),
e,d=b.length;for(e=0;e<d;e++)for(var f in a)this._setDOMDataAttr(b[e],f,a[f])}},_getViewInfo:function(a){return(a=(a=a||this.getLayer())&&a.getMap())&&a._getViewInfo()},_getDataValue:function(a,b,e,d,f){var c=b.id,h=this.attributes,g=a.field,q=b.isNumeric,k=null;if(c){var p=this._computedAttributes,n=this._computedVersion,l=this._computedGeomVersion;d=this._getViewInfo(d);var t=b.dependsOnView||b.isJSFunc,m=b.dependsOnGeometry,B=m&&!!f;p||(p=this._computedAttributes={});t&&!n&&(n=this._computedVersion=
{});m&&!l&&(l=this._computedGeomVersion={});var R=t&&n[c]!==d._version||m&&l[c]!==this._geomVersion,k=p[c];if(void 0===k||R||B)k=null,b.hasExpr?(k=e.createExecContext(this,d),(a=k.vars.$feature)&&f&&(a.geometry=f),k=e.executeFunction(b.compiledFunc,k)):b.isJSFunc?k=g(this,a):h&&(k=h[g],q&&this._isValidNumber(k)&&(b=a.normalizationType||"field",e=k,k=null,f=a.normalizationTotal,a=h[a.normalizationField],"log"===b&&0!==e?k=Math.log(e)*Math.LOG10E:"percent-of-total"===b&&this._isValidNumber(f)&&0!==
f?k=e/f*100:"field"===b&&this._isValidNumber(a)&&0!==a&&(k=e/a))),k=this._sanitizeValue(k,q),B||(p[c]=k,t&&(n[c]=d._version),m&&(l[c]=this._geomVersion))}else h&&(k=this._sanitizeValue(h[g],q));return k},_sanitizeValue:function(a,b){b&&!this._isValidNumber(a)&&(a=null);return a},_isValidNumber:function(a){return"number"===typeof a&&!isNaN(a)&&Infinity!==a&&-Infinity!==a},_clearCache:function(){this._computedAttributes=this._computedVersion=this._computedGeomVersion=null}});m.prototype.getShape=m.prototype.getDojoShape;
a("extend-esri")&&(f.Graphic=m);return m})},"esri/InfoTemplate":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","./kernel","./lang"],function(m,l,a,f,k){m=m(null,{declaredClass:"esri.InfoTemplate",constructor:function(a,f){a&&l.isObject(a)&&!l.isFunction(a)?l.mixin(this,a):(this.title=a||"${*}",this.content=f||"${*}")},setTitle:function(a){this.title=a;return this},setContent:function(a){this.content=a;return this},toJson:function(){return k.fixJson({title:this.title,content:this.content})}});
a("extend-esri")&&(f.InfoTemplate=m);return m})},"esri/symbols/jsonUtils":function(){define("dojo/_base/lang dojo/has ../kernel ./SimpleMarkerSymbol ./PictureMarkerSymbol ./SimpleLineSymbol ./CartographicLineSymbol ./SimpleFillSymbol ./PictureFillSymbol ./TextSymbol".split(" "),function(m,l,a,f,k,n,g,p,d,c){var b={fromJson:function(a){var b=null;switch(a.type){case "esriSMS":b=new f(a);break;case "esriPMS":b=new k(a);break;case "esriTS":b=new c(a);break;case "esriSLS":b=void 0!==a.cap?new g(a):new n(a);
break;case "esriCLS":b=new g(a);break;case "esriSFS":b=new p(a);break;case "esriPFS":b=new d(a)}return b},getShapeDescriptors:function(a){return a&&a.getShapeDescriptors?a.getShapeDescriptors():{defaultShape:null,fill:null,stroke:null}}};l("extend-esri")&&m.mixin(m.getObject("symbol",!0,a),b);return b})},"esri/symbols/PictureMarkerSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang ../urlUtils ./MarkerSymbol".split(" "),function(m,l,a,f,k,n,g,
p){var d={url:"",width:12,height:12,angle:0,xoffset:0,yoffset:0};m=m(p,{declaredClass:"esri.symbol.PictureMarkerSymbol",type:"picturemarkersymbol",constructor:function(c,b,e){c?l.isString(c)?(this.url=c,b&&(this.width=b),e&&(this.height=e)):(this.width=f.pt2px(c.width),this.height=f.pt2px(c.height),b=c.imageData,9>a("ie")||!b||(e=this.url,this.url="data:"+(c.contentType||"image")+";base64,"+b,this.imageData=e)):(l.mixin(this,d),this.width=f.pt2px(this.width),this.height=f.pt2px(this.height))},getStroke:function(){return null},
getFill:function(){return null},setWidth:function(a){this.width=a;return this},setHeight:function(a){this.height=a;return this},setUrl:function(a){a!==this.url&&(delete this.imageData,delete this.contentType);this.url=a;return this},getShapeDescriptors:function(){return{defaultShape:{type:"image",x:-Math.round(this.width/2),y:-Math.round(this.height/2),width:this.width,height:this.height,src:this.url||""},fill:null,stroke:null}},toJson:function(){var a=this.url,b=this.imageData;if(0===a.indexOf("data:"))var e=
a,a=b,b=e.indexOf(";base64,")+8,b=e.substr(b);!l.isString(a)||0!==a.indexOf("/")&&0!==a.indexOf("//")&&0!==a.indexOf("./")&&0!==a.indexOf("../")||(a=g.getAbsoluteUrl(a));var e=f.px2pt(this.width),e=isNaN(e)?void 0:e,d=f.px2pt(this.height),d=isNaN(d)?void 0:d,a=n.fixJson(l.mixin(this.inherited("toJson",arguments),{type:"esriPMS",url:a,imageData:b,contentType:this.contentType,width:e,height:d}));delete a.color;delete a.size;a.imageData||delete a.imageData;return a}});m.defaultProps=d;a("extend-esri")&&
(l.setObject("symbol.PictureMarkerSymbol",m,k),k.symbol.defaultPictureMarkerSymbol=d);return m})},"esri/symbols/CartographicLineSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./SimpleLineSymbol".split(" "),function(m,l,a,f,k,n,g,p){var d={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none",STYLE_INSIDE_FRAME:"insideframe",STYLE_SHORTDASH:"shortdash",
STYLE_SHORTDOT:"shortdot",STYLE_SHORTDASHDOT:"shortdashdot",STYLE_SHORTDASHDOTDOT:"shortdashdotdot",STYLE_LONGDASH:"longdash",STYLE_LONGDASHDOT:"longdashdot",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"},c={color:[0,0,0,1],style:d.STYLE_SOLID,width:1,cap:d.CAP_BUTT,join:d.JOIN_MITER,miterLimit:10};m=m(p,{declaredClass:"esri.symbol.CartographicLineSymbol",type:"cartographiclinesymbol",_caps:{butt:"esriLCSButt",round:"esriLCSRound",square:"esriLCSSquare"},
_joins:{miter:"esriLJSMiter",round:"esriLJSRound",bevel:"esriLJSBevel"},constructor:function(b,e,d,f,p,n){b?l.isString(b)?(this.style=b,e&&(this.color=e),void 0!==d&&(this.width=d),f&&(this.cap=f),p&&(this.join=p),void 0!==n&&(this.miterLimit=n)):(this.cap=g.valueOf(this._caps,b.cap),this.join=g.valueOf(this._joins,b.join),this.width=k.pt2px(b.width),this.miterLimit=k.pt2px(b.miterLimit)):(l.mixin(this,c),this.color=new a(this.color),this.width=k.pt2px(this.width),this.miterLimit=k.pt2px(this.miterLimit))},
setCap:function(a){this.cap=a;return this},setJoin:function(a){this.join=a;return this},setMiterLimit:function(a){this.miterLimit=a;return this},getStroke:function(){return l.mixin(this.inherited("getStroke",arguments),{cap:this.cap,join:this.join===d.JOIN_MITER?this.miterLimit:this.join})},getFill:function(){return null},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -15,0 L 15,0 E"},fill:null,stroke:this.getStroke()}},toJson:function(){var a=k.px2pt(this.miterLimit),a=isNaN(a)?
void 0:a;return g.fixJson(l.mixin(this.inherited("toJson",arguments),{type:"esriCLS",cap:this._caps[this.cap],join:this._joins[this.join],miterLimit:a}))}});l.mixin(m,d);m.defaultProps=c;f("extend-esri")&&(l.setObject("symbol.CartographicLineSymbol",m,n),n.symbol.defaultCartographicLineSymbol=c);return m})},"esri/symbols/SimpleFillSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has dojox/gfx/_base ../kernel ../lang ./FillSymbol ./SimpleLineSymbol require".split(" "),
function(m,l,a,f,k,n,g,p,d,c){var b={STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forwarddiagonal",STYLE_BACKWARD_DIAGONAL:"backwarddiagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonalcross",STYLE_FORWARDDIAGONAL:"forwarddiagonal",STYLE_BACKWARDDIAGONAL:"backwarddiagonal",STYLE_DIAGONALCROSS:"diagonalcross"},e={style:b.STYLE_SOLID,color:[0,0,0,.25]};m=m(p,{declaredClass:"esri.symbol.SimpleFillSymbol",type:"simplefillsymbol",
_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical",forwarddiagonal:"esriSFSForwardDiagonal",backwarddiagonal:"esriSFSBackwardDiagonal",cross:"esriSFSCross",diagonalcross:"esriSFSDiagonalCross"},constructor:function(b,c,f){b?l.isString(b)?(this.style=b,void 0!==c&&(this.outline=c),void 0!==f&&(this.color=f)):this.style=g.valueOf(this._styles,b.style):(l.mixin(this,e),this.outline=new d(this.outline),this.color=new a(this.color))},setStyle:function(a){this.style=
a;return this},getStroke:function(){return this.outline&&this.outline.getStroke()},getFill:function(){var a=this.style;return a===b.STYLE_NULL?null:a===b.STYLE_SOLID?this.color:l.mixin({},k.defaultPattern,{src:c.toUrl("../images/symbol/sfs/"+a+".png"),width:10,height:10})},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 Z"},fill:this.getFill(),stroke:this.getStroke()}},toJson:function(){return g.fixJson(l.mixin(this.inherited("toJson",
arguments),{type:"esriSFS",style:this._styles[this.style]}))}});l.mixin(m,b);m.defaultProps=e;f("extend-esri")&&(l.setObject("symbol.SimpleFillSymbol",m,n),n.symbol.defaultSimpleFillSymbol=e);return m})},"esri/symbols/FillSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ./Symbol ./SimpleLineSymbol".split(" "),function(m,l,a,f,k,n){m=m(k,{declaredClass:"esri.symbol.FillSymbol",constructor:function(a){a&&l.isObject(a)&&a.outline&&(this.outline=new n(a.outline))},setOutline:function(a){this.outline=
a;return this},toJson:function(){var a=this.inherited("toJson",arguments);this.outline&&(a.outline=this.outline.toJson());return a}});a("extend-esri")&&l.setObject("symbol.FillSymbol",m,f);return m})},"esri/symbols/PictureFillSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang ../urlUtils ./FillSymbol".split(" "),function(m,l,a,f,k,n,g,p){var d={xoffset:0,yoffset:0,width:12,height:12};m=m(p,{declaredClass:"esri.symbol.PictureFillSymbol",type:"picturefillsymbol",
xscale:1,yscale:1,xoffset:0,yoffset:0,constructor:function(c,b,e,h){c?l.isString(c)?(this.url=c,void 0!==b&&(this.outline=b),void 0!==e&&(this.width=e),void 0!==h&&(this.height=h)):(this.xoffset=f.pt2px(c.xoffset),this.yoffset=f.pt2px(c.yoffset),this.width=f.pt2px(c.width),this.height=f.pt2px(c.height),b=c.imageData,9>a("ie")||!b||(e=this.url,this.url="data:"+(c.contentType||"image")+";base64,"+b,this.imageData=e)):(l.mixin(this,d),this.width=f.pt2px(this.width),this.height=f.pt2px(this.height))},
setWidth:function(a){this.width=a;return this},setHeight:function(a){this.height=a;return this},setOffset:function(a,b){this.xoffset=a;this.yoffset=b;return this},setUrl:function(a){a!==this.url&&(delete this.imageData,delete this.contentType);this.url=a;return this},setXScale:function(a){this.xscale=a;return this},setYScale:function(a){this.yscale=a;return this},getStroke:function(){return this.outline&&this.outline.getStroke()},getFill:function(){return l.mixin({},f.defaultPattern,{src:this.url,
width:this.width*this.xscale,height:this.height*this.yscale,x:this.xoffset,y:this.yoffset})},getShapeDescriptors:function(){return{defaultShape:{type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 Z"},fill:this.getFill(),stroke:this.getStroke()}},toJson:function(){var a=this.url,b=this.imageData;if(0===a.indexOf("data:"))var e=a,a=b,b=e.indexOf(";base64,")+8,b=e.substr(b);!l.isString(a)||0!==a.indexOf("/")&&0!==a.indexOf("//")&&0!==a.indexOf("./")&&0!==a.indexOf("../")||(a=g.getAbsoluteUrl(a));
var e=f.px2pt(this.width),e=isNaN(e)?void 0:e,d=f.px2pt(this.height),d=isNaN(d)?void 0:d,k=f.px2pt(this.xoffset),k=isNaN(k)?void 0:k,p=f.px2pt(this.yoffset),p=isNaN(p)?void 0:p,a=n.fixJson(l.mixin(this.inherited("toJson",arguments),{type:"esriPFS",url:a,imageData:b,contentType:this.contentType,width:e,height:d,xoffset:k,yoffset:p,xscale:this.xscale,yscale:this.yscale}));a.imageData||delete a.imageData;return a}});m.defaultProps=d;a("extend-esri")&&(l.setObject("symbol.PictureFillSymbol",m,k),k.symbol.defaultPictureFillSymbol=
d);return m})},"esri/symbols/TextSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../lang ../Color ./Symbol ./Font".split(" "),function(m,l,a,f,k,n,g,p,d){var c={type:"textsymbol",x:0,y:0,text:"",rotated:!1,kerning:!0,color:[0,0,0,1],font:f.defaultFont,angle:0,xoffset:0,yoffset:0,horizontalAlignment:"center"},b={start:"left",middle:"center",end:"right"},e={left:"start",center:"middle",right:"end",justify:"start"},h={top:"text-before-edge",middle:"central",
baseline:"alphabetic",bottom:"text-after-edge"},t=document.createElement("canvas");m=m(p,{declaredClass:"esri.symbol.TextSymbol",angle:0,xoffset:0,yoffset:0,constructor:function(a,b,e){l.mixin(this,c);this.font=new d(this.font);this.color=new g(this.color);a&&(l.isObject(a)?(l.mixin(this,a),this.color&&n.isDefined(this.color[0])&&(this.color=g.toDojoColor(this.color)),this.type="textsymbol",this.font=new d(this.font),this.xoffset=f.pt2px(this.xoffset),this.yoffset=f.pt2px(this.yoffset),this.angle&&
(this.angle*=-1),this.haloSize&&(this.haloSize=f.pt2px(this.haloSize)),this.haloColor&&(this.haloColor=g.toDojoColor(this.haloColor))):(this.text=a,b&&(this.font=b),e&&(this.color=e)));this.setAlign(this.align||this.getSVGAlign())},setFont:function(a){this.font=a;return this},setSize:function(a){this.font.size=a;return this},setAngle:function(a){this.angle=a;return this},setOffset:function(a,b){this.xoffset=a;this.yoffset=b;return this},setHaloColor:function(a){this.haloColor=a;return this},setHaloSize:function(a){this.haloSize=
a;return this},setAlign:function(a){this.align=a;this.setHorizontalAlignment(a&&b[a.toLowerCase()]||"center");return this},setHorizontalAlignment:function(a){this.horizontalAlignment=a;return this},getSVGAlign:function(){var a=this.horizontalAlignment;return a=a&&e[a.toLowerCase()]||"middle"},setVerticalAlignment:function(a){this.verticalAlignment=a;return this},getSVGBaseline:function(){var a=this.verticalAlignment;return a&&h[a.toLowerCase()]||"alphabetic"},getSVGBaselineShift:function(){return"bottom"===
this.verticalAlignment?"super":null},setDecoration:function(a){this.decoration=a;this.font||this.setFont(new d);this.font.setDecoration(a);return this},setRotated:function(a){this.rotated=a;return this},setKerning:function(a){this.kerning=a;return this},setText:function(a){this.text=a;return this},getStroke:function(){return null},getFill:function(){return this.color},getWidth:function(){var a=t&&t.getContext&&t.getContext("2d");if(a){var b=this.font;a.font=(b.style?b.style:f.defaultFont.style)+" "+
(b.weight?b.weight:f.defaultFont.weight)+" "+(b.size?b.size:f.defaultFont.size)+"px "+(b.family?b.family:f.defaultFont.family);return a.measureText(this.text).width}var a=this.getHeight(),b=0,c,e;for(c=0;c<this.text.length;c++)e=this.text.charAt(c),b=e==e.toUpperCase()?b+.7*a:b+.5*a;return b},getHeight:function(){return f.normalizedLength(this.font.size)},getShapeDescriptors:function(){var a=this.font,b;a&&(b={},a.size&&(b.size=a.size),a.style&&(b.style=a.style),a.variant&&(b.variant=a.variant),a.decoration&&
(b.decoration=a.decoration),a.weight&&(b.weight=a.weight),a.family&&(b.family=a.family));return{defaultShape:{type:"text",text:this.text,x:0,y:this.getHeight()/4,align:"middle",decoration:this.decoration||a&&a.decoration,rotated:this.rotated,kerning:this.kerning},font:b,fill:this.getFill(),stroke:this.getStroke()}},toJson:function(){var a=f.px2pt(this.xoffset),b=f.px2pt(this.yoffset),c=f.px2pt(this.haloSize),a=isNaN(a)?void 0:a,b=isNaN(b)?void 0:b,c=isNaN(c)?void 0:c;return n.fixJson(l.mixin(this.inherited("toJson",
arguments),{type:"esriTS",backgroundColor:this.backgroundColor,borderLineColor:this.borderLineColor,borderLineSize:this.borderLineSize,haloSize:c,haloColor:this.haloColor&&g.toJsonColor(this.haloColor),verticalAlignment:this.verticalAlignment,horizontalAlignment:this.horizontalAlignment,rightToLeft:this.rightToLeft,width:this.width,angle:this.angle&&-1*this.angle,xoffset:a,yoffset:b,text:this.text,rotated:this.rotated,kerning:this.kerning,font:this.font.toJson()}))}});l.mixin(m,{ALIGN_START:"start",
ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});m.defaultProps=c;a("extend-esri")&&(l.setObject("symbol.TextSymbol",m,k),k.symbol.defaultTextSymbol=c);return m})},"esri/symbols/Font":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang".split(" "),function(m,l,a,f,k,n){m=m(null,{declaredClass:"esri.symbol.Font",constructor:function(g,k,
d,c,b){g?l.isObject(g)?l.mixin(this,g):(this.size=g,parseFloat(this.size)==this.size&&(this.size+="px"),void 0!==k&&(this.style=k),void 0!==d&&(this.variant=d),void 0!==c&&(this.weight=c),void 0!==b&&(this.family=b)):l.mixin(this,f.defaultFont);parseFloat(this.size)==this.size&&(this.size+="pt");9>a("ie")&&this.size&&l.isString(this.size)&&-1<this.size.indexOf("em")&&(this.size=f.pt2px(12*parseFloat(this.size))+"px");this.size=this._convert2PxSize(this.size)},setSize:function(a){this.size=this._convert2PxSize(a);
return this},_convert2PxSize:function(a){var g;parseFloat(a)==a?g=a:l.isString(a)&&(-1<a.indexOf("pt")?g=f.pt2px(parseFloat(a)):-1<a.indexOf("px")?g=parseFloat(a):-1<a.indexOf("em")?g=f.pt2px(12*parseFloat(a)):-1<a.indexOf("%")&&(g=f.pt2px(.12*parseFloat(a))));return g},setStyle:function(a){this.style=a;return this},setVariant:function(a){this.variant=a;return this},setWeight:function(a){this.weight=a;return this},setFamily:function(a){this.family=a;return this},setDecoration:function(a){this.decoration=
a;return this},toJson:function(){return n.fixJson({size:f.px2pt(this.size),style:this.style,decoration:this.decoration,weight:this.weight,family:this.family})}});l.mixin(m,{STYLE_NORMAL:"normal",STYLE_ITALIC:"italic",STYLE_OBLIQUE:"oblique",VARIANT_NORMAL:"normal",VARIANT_SMALLCAPS:"small-caps",WEIGHT_NORMAL:"normal",WEIGHT_BOLD:"bold",WEIGHT_BOLDER:"bolder",WEIGHT_LIGHTER:"lighter"});a("extend-esri")&&l.setObject("symbol.Font",m,k);return m})},"esri/tasks/query":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/has ../kernel ../geometry/jsonUtils ./SpatialRelationship dojo/has!extend-esri?./QueryTask dojo/has!extend-esri?./RelationshipQuery dojo/has!extend-esri?./StatisticDefinition".split(" "),
function(m,l,a,f,k,n,g,p){var d=m(null,{declaredClass:"esri.tasks.Query",constructor:function(){this.spatialRelationship=d.SPATIAL_REL_INTERSECTS},text:null,where:"",geometry:null,groupByFieldsForStatistics:null,objectIds:null,returnGeometry:!1,returnDistinctValues:!1,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,pixelSize:null,distance:null,units:null,resultOffset:null,resultRecordCount:null,resultType:null,sqlFormat:null,quantizationParameters:null,
_units:{meters:"esriSRUnit_Meter",kilometers:"esriSRUnit_Kilometer",feet:"esriSRUnit_Foot",miles:"esriSRUnit_StatuteMile","nautical-miles":"esriSRUnit_NauticalMile","us-nautical-miles":"esriSRUnit_USNauticalMile"},toJson:function(c){var b={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision,sqlFormat:this.sqlFormat},e=c&&c.geometry||this.geometry,h=this.objectIds,
k=this.outFields,p=this.outSpatialReference,n=this.groupByFieldsForStatistics,l=this.orderByFields,q=this.outStatistics;c=this.distance;e&&(b.geometry=e,b.geometryType=g.getJsonType(e),b.inSR=e.spatialReference.wkid||f.toJson(e.spatialReference.toJson()));h&&(b.objectIds=h.join(","));k&&(b.outFields=k.join(","));this.returnDistinctValues&&(b.returnDistinctValues=!0);n&&(b.groupByFieldsForStatistics=n.join(","));l&&(b.orderByFields=l.join(","));if(q){var m=[];a.forEach(q,function(a){m.push(a.toJson())});
b.outStatistics=f.toJson(m)}p?b.outSR=p.wkid||f.toJson(p.toJson()):e&&(b.outSR=e.spatialReference.wkid||f.toJson(e.spatialReference.toJson()));e=this.timeExtent;b.time=e?e.toJson().join(","):null;(e=this.relationParam)&&this.spatialRelationship===d.SPATIAL_REL_RELATION&&(b.relationParam=e);c&&(b.distance=this.distance,this.hasOwnProperty("units")?b.units=this._units[this.units]||this._units.meters:(console.warn("esri/tasks/query::no distance unit provided, defaulting to meters"),b.units=this._units.meters));
this.hasOwnProperty("start")&&(b.resultOffset=this.start,b.resultRecordCount=10,""===b.where&&(b.where="1\x3d1"));this.hasOwnProperty("num")&&(b.resultRecordCount=this.num);b.resultType=this.resultType;b.pixelSize=this.pixelSize?f.toJson(this.pixelSize.toJson()):null;b.multipatchOption=this.multipatchOption;this.quantizationParameters&&(b.quantizationParameters=f.toJson(this.quantizationParameters));b._ts=this._ts;return b}});l.mixin(d,p);k("extend-esri")&&l.setObject("tasks.Query",d,n);return d})},
"esri/tasks/SpatialRelationship":function(){define(["dojo/_base/lang","dojo/has","../kernel"],function(m,l,a){var f={SPATIAL_REL_INTERSECTS:"esriSpatialRelIntersects",SPATIAL_REL_CONTAINS:"esriSpatialRelContains",SPATIAL_REL_CROSSES:"esriSpatialRelCrosses",SPATIAL_REL_ENVELOPEINTERSECTS:"esriSpatialRelEnvelopeIntersects",SPATIAL_REL_INDEXINTERSECTS:"esriSpatialRelIndexIntersects",SPATIAL_REL_OVERLAPS:"esriSpatialRelOverlaps",SPATIAL_REL_TOUCHES:"esriSpatialRelTouches",SPATIAL_REL_WITHIN:"esriSpatialRelWithin",
SPATIAL_REL_RELATION:"esriSpatialRelRelation"};l("extend-esri")&&m.setObject("tasks._SpatialRelationship",f,a);return f})},"esri/plugins/popupManager":function(){define(["../PopupManager"],function(m){return{add:function(l,a){l.popupManager||(l.popupManager=new m(a),l.popupManager.setMap(l))},remove:function(l){var a=l.popupManager;a&&(a.unsetMap(),l.popupManager=void 0)}}})},"esri/PopupManager":function(){define("./geometry/Extent ./geometry/ScreenPoint ./kernel ./layerUtils ./tasks/query dijit/registry dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/_base/lang dojo/has dojo/on dojo/promise/all dojo/Stateful require".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r){var w;p=p(t,{declaredClass:"esri.PopupManager",enabled:!1,map:null,_mapClickHandle:null,_featureLayersCache:{},constructor:function(a){this._mapClickHandler=c.hitch(this,this._mapClickHandler)},setMap:function(a){if(this.map)if(a!==this.map)this.unsetMap();else return;this.map=a;this._setupClickHandler()},unsetMap:function(){this.map&&(this.map=null);this._mapClickHandle&&(this._mapClickHandle.remove(),this._mapClickHandle=null)},getMapLayer:function(a){var b;
if(a&&(b=a.getLayer())&&(a=b.id,this._featureLayersCache[a])){var c=a.lastIndexOf("_");-1<c&&(a=a.substring(0,c),b=this.map.getLayer(a))}return b},_enabledSetter:function(a){this.enabled=a;this._setupClickHandler()},_setupClickHandler:function(){this._mapClickHandle&&(this._mapClickHandle.remove(),this._mapClickHandle=null);this.enabled&&this.map&&(this._mapClickHandle=this.map.on("click",this._mapClickHandler))},_mapClickHandler:function(a){var b=this.map.infoWindow,c=a.graphic;b&&this.map.loaded&&
(b.clearFeatures&&b.setFeatures?this._showPopup(a):c&&c.getInfoTemplate()&&this._showInfoWindow(c,a.mapPoint))},_showPopup:function(a){var b=this.map,c=b.infoWindow,e=this,f=[],h=[b.graphics].concat(g.map(b.graphicsLayerIds,b.getLayer,b));g.forEach(h,function(a){a&&a.loaded&&a.infoTemplate&&!a.suspended&&f.push(a)});var p=[];g.forEach(b.layerIds,function(a){(a=b.getLayer(a))&&a.loaded&&!a.suspended&&(e._isImageServiceLayer(a)&&a.infoTemplate?f.push(a):"esri.layers.WMSLayer"===a.declaredClass&&a.getFeatureInfoURL?
f.push(a):"esri.layers.ArcGISDynamicMapServiceLayer"!==a.declaredClass&&"esri.layers.ArcGISTiledMapServiceLayer"!==a.declaredClass||!a.infoTemplates||p.push(a))});this._getSubLayerFeatureLayers(p).then(function(h){f=f.concat(h);var q=null;a.graphic&&a.graphic.getInfoTemplate()&&!e._isImageServiceLayer(a.graphic._layer)&&(q=a.graphic);if(f.length||q){var p=e._calculateClickTolerance(f),n=a.screenPoint;h=b.toMap(new l(n.x-p,n.y+p));var p=b.toMap(new l(n.x+p,n.y-p)),v=new m(h.x,h.y,p.x,p.y,b.spatialReference);
if(v=v.intersects(b.extent)){var r=new k,t=!!q,x=!0;h=g.map(f,function(c){r.timeExtent=c.useMapTime?b.timeExtent:null;var f=e._isReductionEnabled(c);c=f?c.getFeatureReductionLayer():c;var h;if(e._isImageServiceLayer(c))r.geometry=a.mapPoint,x=!1,h=c.queryVisibleRasters(r,{rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0}),h.addCallback(function(){var a=c.getVisibleRasters();t=t||0<a.length;return a});else if("esri.layers.WMSLayer"===c.declaredClass){h=new d;var k=c._getPopupGraphic(b,
a.screenPoint);k?(h.resolve([k]),t=!0):h.resolve([])}else e._featureLayersCache[c.id]||"function"===typeof c.queryFeatures&&(0===c.currentMode||1===c.currentMode)?(r.geometry=v,h=c.queryFeatures(r),h.addCallback(function(a){a=a.features;a=g.filter(a,function(a){return a.visible});t=t||0<a.length;return a})):(h=new d,k=g.filter(c.graphics,function(a){return a&&a.visible&&v.intersects(a.geometry)}),f&&e._isParentLayer(c,q)&&(f=e._findGraphicById(k,q,"cluster_id"))&&(q=f),t=t||0<k.length,h.resolve(k));
return h});q&&(p=new d,p.resolve([q]),h.unshift(p));g.some(h,function(a){return!a.isFulfilled()})||t?(c.setFeatures(h),c.show(a.mapPoint,{closestFirst:x})):(c.hide(),c.clearFeatures())}}})},_getSubLayerFeatureLayers:function(a,b){var c=b||new d,q=[],k=a.length,p=Math.floor(this.map.extent.getWidth()/this.map.width),n=this.map.getScale(),l=!1,t=this,m=0;a:for(;m<k;m++){var u=a[m],H=u.dynamicLayerInfos||u.layerInfos;if(H){var O=null;u._params&&(u._params.layers||u._params.dynamicLayers)&&(O=u.visibleLayers);
for(var O=f._getVisibleLayers(H,O),Y=f._getLayersForScale(n,H),T=H.length,F=0;F<T;F++){var S=H[F],K=S.id,Z=u.infoTemplates[K];if(!S.subLayerIds&&Z&&Z.infoTemplate&&-1<g.indexOf(O,K)&&-1<g.indexOf(Y,K)){if(!w){l=!0;break a}var V=u.id+"_"+K,G=this._featureLayersCache[V];G&&G.loadError||(G||((G=Z.layerUrl)||(G=S.source?this._getLayerUrl(u.url,"/dynamicLayer"):this._getLayerUrl(u.url,K)),G=new w(G,{id:V,drawMode:!1,mode:w.MODE_SELECTION,outFields:this._getOutFields(Z.infoTemplate),resourceInfo:Z.resourceInfo,
source:S.source}),this._featureLayersCache[V]=G),G.setDefinitionExpression(u.layerDefinitions&&u.layerDefinitions[K]),G.setGDBVersion(u.gdbVersion),G.setInfoTemplate(Z.infoTemplate),G.setMaxAllowableOffset(p),G.setUseMapTime(!!u.useMapTime),u.layerDrawingOptions&&u.layerDrawingOptions[K]&&u.layerDrawingOptions[K].renderer&&G.setRenderer(u.layerDrawingOptions[K].renderer),q.push(G))}}}}if(l){var ea=new d;r(["./layers/FeatureLayer"],function(a){w=a;ea.resolve()});ea.then(function(){t._getSubLayerFeatureLayers(a,
c)})}else{var L=[];g.forEach(q,function(a){if(!a.loaded){var b=new d;e.once(a,"load, error",function(){b.resolve()});L.push(b.promise)}});L.length?h(L).then(function(){q=g.filter(q,function(a){return!a.loadError&&a.isVisibleAtScale(n)});c.resolve(q)}):(q=g.filter(q,function(a){return a.isVisibleAtScale(n)}),c.resolve(q))}return c.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;a.info&&"esri.dijit.PopupTemplate"===
a.declaredClass?(b=[],g.forEach(a.info.fieldInfos,function(a){var c=a.fieldName&&a.fieldName.toLowerCase();c&&"shape"!==c&&0!==c.indexOf("relationships/")&&b.push(a.fieldName)})):b=["*"];return b},_calculateClickTolerance:function(a){var b=6,c,e;g.forEach(a,function(a){if(c=a.renderer)"esri.renderer.SimpleRenderer"===c.declaredClass?((e=c.symbol)&&e.xoffset&&(b=Math.max(b,Math.abs(e.xoffset))),e&&e.yoffset&&(b=Math.max(b,Math.abs(e.yoffset)))):"esri.renderer.UniqueValueRenderer"!==c.declaredClass&&
"esri.renderer.ClassBreaksRenderer"!==c.declaredClass||g.forEach(c.infos,function(a){(e=a.symbol)&&e.xoffset&&(b=Math.max(b,Math.abs(e.xoffset)));e&&e.yoffset&&(b=Math.max(b,Math.abs(e.yoffset)))})});return b},_showInfoWindow:function(a,b){var e=this.map.infoWindow,d=a.geometry,d=d&&"point"===d.type?d:b,f=a.getContent();e.setTitle(a.getTitle());if(f&&c.isString(f.id)){var h=n.byId(f.id);h&&h.set&&/_PopupRenderer/.test(h.declaredClass)&&h.set("showTitle",!1)}e.setContent(f);e.show(d)},_findGraphicById:function(a,
b,c){var e,d=(b=b.attributes)&&b[c];g.some(a,function(a){var b=a.attributes;b&&b[c]===d&&(e=a);return!!e});return e},_isParentLayer:function(a,b){var c=b&&b.getLayer();return a&&c===a},_isReductionEnabled:function(a){return a&&a.isFeatureReductionActive&&a.isFeatureReductionActive()},_isImageServiceLayer:function(a){return"esri.layers.ArcGISImageServiceLayer"===a.declaredClass||"esri.layers.ArcGISImageServiceVectorLayer"===a.declaredClass}});b("extend-esri")&&(a.PopupManager=p);return p})},"esri/layerUtils":function(){define(["dojo/_base/lang",
"dojo/_base/array","dojo/_base/json","dojo/has","./kernel"],function(m,l,a,f,k){var n={_serializeLayerDefinitions:function(f,k){var d=[],c=/[:;]/;if(f&&(l.forEach(f,function(a,b){a&&(d.push([b,a]),!k&&c.test(a)&&(k=!0))}),0<d.length)){var b;k?(b={},l.forEach(d,function(a){b[a[0]]=a[1]}),b=a.toJson(b)):(b=[],l.forEach(d,function(a){b.push(a[0]+":"+a[1])}),b=b.join(";"));return b}return null},_serializeTimeOptions:function(f,k){if(f){var d=[];l.forEach(f,function(c,b){if(c){var e=c.toJson();k&&-1!==
l.indexOf(k,b)&&(e.useTime=!1);d.push('"'+b+'":'+a.toJson(e))}});if(d.length)return"{"+d.join(",")+"}"}},_getVisibleLayers:function(a,f){var d=[],c,b,e;if(!a)return d;if(f)for(d=f.concat(),e=0;e<a.length;e++)c=a[e],b=l.indexOf(a,c.id),c.subLayerIds&&-1<b&&(d.splice(b,1),d=d.concat(c.subLayerIds));else d=this._getDefaultVisibleLayers(a);return d},_getDefaultVisibleLayers:function(a){var f=[],d;if(!a)return f;for(d=0;d<a.length;d++)0<=a[d].parentLayerId&&-1===l.indexOf(f,a[d].parentLayerId)&&l.some(a,
function(c){return c.id===a[d].parentLayerId})||a[d].defaultVisibility&&f.push(a[d].id);return f},_getLayersForScale:function(a,f){var d=[];if(0<a&&f){var c;for(c=0;c<f.length;c++)if(!(0<=f[c].parentLayerId&&-1===l.indexOf(d,f[c].parentLayerId)&&l.some(f,function(a){return a.id===f[c].parentLayerId}))&&0<=f[c].id){var b=!0,e=f[c].maxScale,h=f[c].minScale;if(0<e||0<h)0<e&&0<h?b=e<=a&&a<=h:0<e?b=e<=a:0<h&&(b=a<=h);b&&d.push(f[c].id)}}return d}};f("extend-esri")&&m.mixin(k,n);return n})},"dojo/promise/all":function(){define(["../_base/array",
"../Deferred","../when"],function(m,l,a){var f=m.some;return function(k){var n,g;k instanceof Array?g=k:k&&"object"===typeof k&&(n=k);var p,d=[];if(n){g=[];for(var c in n)Object.hasOwnProperty.call(n,c)&&(d.push(c),g.push(n[c]));p={}}else g&&(p=[]);if(!g||!g.length)return(new l).resolve(p);var b=new l;b.promise.always(function(){p=d=null});var e=g.length;f(g,function(c,f){n||d.push(f);a(c,function(a){b.isFulfilled()||(p[d[f]]=a,0===--e&&b.resolve(p))},b.reject);return b.isFulfilled()});return b.promise}})},
"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./domReady","./sniff","./_base/window"],function(m,l,a,f,k){var n=k.doc.documentElement;k=f("ie");var g=f("trident"),p=f("opera"),d=Math.floor,c=f("ff"),b=m.boxModel.replace(/-/,""),p={dj_quirks:f("quirks"),dj_opera:p,dj_khtml:f("khtml"),dj_webkit:f("webkit"),dj_safari:f("safari"),dj_chrome:f("chrome"),dj_edge:f("edge"),dj_gecko:f("mozilla"),dj_ios:f("ios"),dj_android:f("android")};k&&(p.dj_ie=!0,p["dj_ie"+d(k)]=!0,p.dj_iequirks=f("quirks"));
g&&(p.dj_trident=!0,p["dj_trident"+d(g)]=!0);c&&(p["dj_ff"+d(c)]=!0);p["dj_"+b]=!0;var e="",h;for(h in p)p[h]&&(e+=h+" ");n.className=l.trim(n.className+" "+e);a(function(){if(!m.isBodyLtr()){var a="dj_rtl dijitRtl "+e.replace(/ /g,"-rtl ");n.className=l.trim(n.className+" "+a+"dj_rtl dijitRtl "+e.replace(/ /g,"-rtl "))}});return f})},"esri/MapNavigationManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/event dojo/mouse dojo/keys dijit/focus ./kernel ./MouseEvents ./TouchEvents ./PointerEvents ./config ./sniff ./lang ./fx ./graphic ./tileUtils ./geometry/ScreenPoint ./geometry/Extent ./geometry/Rect ./geometry/mathUtils ./symbols/SimpleFillSymbol".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C,y,z){var E=f.connect,B=f.disconnect,R=t("chrome"),D=t("safari"),H=[g.NUMPAD_PLUS,61,187,g.NUMPAD_MINUS,173,189,g.UP_ARROW,g.NUMPAD_8,g.RIGHT_ARROW,g.NUMPAD_6,g.DOWN_ARROW,g.NUMPAD_2,g.LEFT_ARROW,g.NUMPAD_4,g.PAGE_UP,g.NUMPAD_9,g.PAGE_DOWN,g.NUMPAD_3,g.END,g.NUMPAD_1,g.HOME,g.NUMPAD_7];m=m(null,{declaredClass:"esri.MapNavigationManager",eventModel:"",constructor:function(a,d){this.map=a;l.mixin(this,d);var f=a.__container;t("esri-pointer")?(this.pointerEvents=
new e(f,{map:a}),this.eventModel="pointer"):t("esri-touch")?(t("ios")||(this.mouseEvents=new c(f,{map:a})),this.touchEvents=new b(f,{map:a,mouseEvents:this.mouseEvents}),this.eventModel="touch"):(this.mouseEvents=new c(f,{map:a}),this.eventModel="mouse");this._zoomRect=new u(null,new z(h.defaults.map.zoomSymbol));this._keyDx=this._keyDy=0;this._adjustPinch=l.hitch(this,this._adjustPinch);this._adjustPinchEnd=l.hitch(this,this._adjustPinchEnd)},_panInit:function(a){var b=this.mouseEvents;n.isLeft(a)&&
this.map.isPan&&!a.shiftKey&&(this._dragOrigin=new x(0,0),l.mixin(this._dragOrigin,a.screenPoint),B(this._panStartHandle),B(this._panHandle),B(this._panEndHandle),this._panStartHandle=E(b,"onMouseDragStart",this,this._panStart),this._panHandle=E(b,"onMouseDrag",this,this._pan),this._panEndHandle=E(b,"onMouseUp",this,this._panEnd),R||D)&&(a.preventDefault(),p.curNode&&p.curNode.blur())},_panStart:function(a){this.map.setCursor("move");this.map.__panStart(a.screenPoint.x,a.screenPoint.y)},_pan:function(a){this.map.__pan(a.screenPoint.x-
this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y)},_panEnd:function(a){B(this._panStartHandle);B(this._panHandle);B(this._panEndHandle);this._panStartHandle=this._panHandle=this._panEndHandle=null;var b=this.map;b.__panning&&(b.__panEnd(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y),b.resetMapCursor())},_zoomInit:function(a){var b=this.map,c=this.pointerEvents||this.mouseEvents;(n.isLeft(a)||a.pointerType)&&b.isRubberBandZoom&&a.shiftKey&&(b.setCursor("crosshair"),this._dragOrigin=
l.mixin({},a.screenPoint),this._zoomDir=a.ctrlKey||a.metaKey?-1:1,this.pointerEvents?(this._zoomHandle=E(c,"onSwipeMove",this,this._zoom),this._zoomEndHandle=E(c,"onSwipeEnd",this,this._zoomEnd)):(this._zoomHandle=E(c,"onMouseDrag",this,this._zoom),this._zoomEndHandle=E(c,"onMouseUp",this,this._zoomEnd)),R&&a.preventDefault())},_zoom:function(a){var b=this.map,c=this._normalizeRect(a).offset(b.__visibleRect.x,b.__visibleRect.y);a=b.graphics;var e=this._zoomRect;e.geometry||b.setCursor("crosshair");
e.geometry&&a.remove(e,!0);var d=b.toMap(new x(c.x,c.y)),c=b.toMap(new x(c.x+c.width,c.y+c.height)),c=new C(d.x,d.y,c.x-d.x,d.y-c.y,b.spatialReference);c._originOnly=!0;e.setGeometry(c);a.add(e,!0)},_zoomEnd:function(a){var b=this._zoomRect,c=this.map,e=c.extent,d=c.spatialReference;B(this._zoomHandle);B(this._zoomEndHandle);this._zoomHandle=this._zoomEndHandle=null;if(c._canZoom(this._zoomDir)&&b.getDojoShape()){c.graphics.remove(b);b.geometry=null;a=this._normalizeRect(a);a.x+=c.__visibleRect.x;
a.y+=c.__visibleRect.y;if(-1===this._zoomDir){var f=e.getWidth();a=(f*c.width/a.width-f)/2;d=new v(e.xmin-a,e.ymin-a,e.xmax+a,e.ymax+a,d)}else e=c.toMap({x:a.x,y:a.y+a.height}),a=c.toMap({x:a.x+a.width,y:a.y}),d=new v(e.x,e.y,a.x,a.y,d);c._extentUtil(null,null,d)}b.getDojoShape()&&c.graphics.remove(b,!0);this._zoomDir=0;c.resetMapCursor()},_wheelZoom:function(a,b){var c=this.map;if(!b){if(c.smartNavigation&&!a.shiftKey&&!c._isPanningOrZooming()){c.disableScrollWheelZoom();this._setScrollWheelPan(!0);
this._wheelPan(a);return}var e=a.timeStamp;if(!r.isDefined(e)||0>=e)e=(new Date).getTime();if(100>(this._mwts?e-this._mwts:e))return;this._mwts=e}c._canZoom(a.value)&&c._extentUtil({numLevels:a.value,mapAnchor:a.mapPoint,screenAnchor:a.screenPoint})},_wheelPan:function(a){var b=this.map;if(a.shiftKey&&!b._isPanningOrZooming())this._setScrollWheelPan(!1),b.enableScrollWheelZoom(),this._wheelZoom(a);else{var c=0,e=0;t("ff")?a.axis===a.HORIZONTAL_AXIS?c=-a.detail:e=-a.detail:(c=a.wheelDeltaX,e=a.wheelDeltaY);
b.translate(c,e)}},_setScrollWheelPan:function(a){this.map.isScrollWheelPan=a;this.mouseEvents.enableMouseWheel(a);B(this._mwMacHandle);this._mwMacHandle=null;a&&(this._mwMacHandle=E(this.mouseEvents,"onMouseWheel",this,this._wheelPan))},_recenter:function(a){a.shiftKey&&!this.map._isPanningOrZooming()&&this.map.centerAt(a.mapPoint)},_recenterZoom:function(a){a.shiftKey&&!this.map._isPanningOrZooming()&&(a.value=a.ctrlKey||a.metaKey?-1:1,this._wheelZoom(a,!0))},_dblClickZoom:function(a){this.map._isPanningOrZooming()||
(a.value=1,this._wheelZoom(a,!0))},_twoFingerTap:function(a){this.map._isPanningOrZooming()||(a.value=-1,this._wheelZoom(a,!0))},_keyDown:function(b){var c=b.keyCode,e=this.map;if(-1!==a.indexOf(H,c)){if(c===g.NUMPAD_PLUS||61===c||187===c)e._extentUtil({numLevels:1});else if(c===g.NUMPAD_MINUS||173===c||189===c)e._extentUtil({numLevels:-1});else{e.__panning||e.__panStart(0,0);switch(c){case g.UP_ARROW:case g.NUMPAD_8:this._keyDy+=10;break;case g.RIGHT_ARROW:case g.NUMPAD_6:this._keyDx-=10;break;case g.DOWN_ARROW:case g.NUMPAD_2:this._keyDy-=
10;break;case g.LEFT_ARROW:case g.NUMPAD_4:this._keyDx+=10;break;case g.PAGE_UP:case g.NUMPAD_9:this._keyDx-=10;this._keyDy+=10;break;case g.PAGE_DOWN:case g.NUMPAD_3:this._keyDx-=10;this._keyDy-=10;break;case g.END:case g.NUMPAD_1:this._keyDx+=10;this._keyDy-=10;break;case g.HOME:case g.NUMPAD_7:this._keyDx+=10;this._keyDy+=10;break;default:return}e.__pan(this._keyDx,this._keyDy)}k.stop(b)}},_keyEnd:function(a){var b=this.map;b.__panning&&a.keyCode!==g.SHIFT&&(b.__panEnd(this._keyDx,this._keyDy),
this._keyDx=this._keyDy=0)},_swipeInit:function(a){var b=this.map,b=b._zoomAnim||b._panAnim;if(a.shiftKey)return!1;b&&b._active&&(b.stop(),b._fire("onEnd",[b.node]));this._dragOrigin=new x(0,0);l.mixin(this._dragOrigin,a.screenPoint);B(this._swipeHandle);B(this._swipeEndHandle);this._swipeHandle=E(this.touchEvents||this.pointerEvents,"onSwipeMove",this,this._swipe);this._swipeEndHandle=E(this.touchEvents||this.pointerEvents,"onSwipeEnd",this,this._swipeEnd)},_swipe:function(a){var b=this.map;b.__panning?
(this._panX=a.screenPoint.x,this._panY=a.screenPoint.y,b.__pan(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y)):(b.setCursor("move"),b.__panStart(a.screenPoint.x,a.screenPoint.y))},_swipeEnd:function(a){B(this._swipeHandle);B(this._swipeEndHandle);this._swipeHandle=this._swipeEndHandle=null;var b=this.map;b.__panning&&(b.resetMapCursor(),b.__panEnd(a.screenPoint.x-this._dragOrigin.x,a.screenPoint.y-this._dragOrigin.y))},_pinchInit:function(a){var b=this.map,c=b._zoomAnim||b._panAnim;
c&&c._active?(c.stop(),c._fire("onEnd",[c.node])):b.__panning&&(a.screenPoint=new x(this._panX,this._panY),a.mapPoint=b.toMap(a.screenPoint),this._swipeEnd(a));B(this._pinchHandle);B(this._pinchEndHandle);this._pinchHandle=E(this.touchEvents||this.pointerEvents,"onPinchMove",this,this._pinch);this._pinchEndHandle=E(this.touchEvents||this.pointerEvents,"onPinchEnd",this,this._pinchEnd)},_pinch:function(a){var b=this.map;if(a.screenPoints){this.currLength=y.getLength(a.screenPoints[0],a.screenPoints[1]);
var c;b.__zooming?(c=this.currLength/this._length,this._zoomStartExtent=this.__scaleExtent(b.extent,c,this._dragOrigin),b.__zoom(this._zoomStartExtent,c,this._dragOrigin)):(this._dragOrigin=new x((a.screenPoints[0].x+a.screenPoints[1].x)/2,(a.screenPoints[0].y+a.screenPoints[1].y)/2),this._length=this.currLength,b.__zoomStart(b.extent,this._dragOrigin));this._pinchScale=c;b._fireOnScale(this.currLength/this._length,this._dragOrigin,!0)}},_pinchEnd:function(a){a=this.map;B(this._pinchHandle);B(this._pinchEndHandle);
this._pinchHandle=this._pinchEndHandle=null;this._pinchScale=0;if(a.__zooming&&null===a._zoomAnim){var b=this.currLength/this._length,c=a.extent.getWidth();this._zoomAnimAnchor=a.toMap(this._dragOrigin);this._zoomStartExtent=this.__scaleExtent(a.extent,1/b,this._zoomAnimAnchor);if(a.__tileInfo){var e=q.getCandidateTileInfo(a,a.__tileInfo,this._zoomStartExtent),d=a.__getExtentForLevel(e.lod.level,this._zoomAnimAnchor),f=a.getMinZoom(),g=a.getMaxZoom(),k=d.extent,d=d.lod,p=c/k.getWidth(),n=e.lod.level;
1>b?p>b&&n--:p<b&&n++;n<f?n=f:n>g&&(n=g);n!==e.lod.level&&(d=a.__getExtentForLevel(n,this._zoomAnimAnchor),k=d.extent,d=d.lod);this._zoomEndExtent=k;this._zoomEndLod=d;a._zoomAnim=w.animateRange({range:{start:c/this._zoomStartExtent.getWidth(),end:p},duration:h.defaults.map.zoomDuration,rate:h.defaults.map.zoomRate,onAnimate:this._adjustPinch,onEnd:this._adjustPinchEnd});a._zoomAnim.play();a._fireOnScale(a.extent.getWidth()/this._zoomEndExtent.getWidth(),this._dragOrigin)}else this._zoomEndExtent=
this._zoomStartExtent,a._fireOnScale(a.extent.getWidth()/this._zoomEndExtent.getWidth(),this._dragOrigin),this._adjustPinchEnd()}},_adjustPinch:function(a){var b=this.__scaleExtent(this.map.extent,a,this._zoomAnimAnchor);this.map.__zoom(b,a,this._dragOrigin)},_adjustPinchEnd:function(){var a=this.map,b=a.extent.getWidth()/this._zoomEndExtent.getWidth(),c=this.__scaleExtent(a.extent,1/b,this._zoomAnimAnchor),e=this._dragOrigin,d=this._zoomEndLod;this._zoomStartExtent=this._zoomEndExtent=this._zoomEndLod=
this._dragOrigin=a._zoomAnim=this._zoomAnimAnchor=null;a.__zoomEnd(c,b,e,d,!0)},__scaleExtent:function(a,b,c){c=c||a.getCenter();b=a.expand(b);var e=a.xmin-(b.getWidth()-a.getWidth())*(c.x-a.xmin)/a.getWidth();c=a.ymax-(b.getHeight()-a.getHeight())*(c.y-a.ymax)/a.getHeight();return new v(e,c-b.getHeight(),e+b.getWidth(),c,a.spatialReference)},_normalizeRect:function(a){a=a.screenPoint;var b=this._dragOrigin.x,c=this._dragOrigin.y;a=new C((a.x<b?a.x:b)-this.map.__visibleRect.x,(a.y<c?a.y:c)-this.map.__visibleRect.y,
Math.abs(a.x-b),Math.abs(a.y-c));delete a.spatialReference;0===a.width&&(a.width=1);0===a.height&&(a.height=1);return a},setImmediateClick:function(a){switch(this.eventModel){case "mouse":this.mouseEvents.setImmediateClick(a);break;case "touch":this.touchEvents.setImmediateTap(a);this.mouseEvents&&this.mouseEvents.setImmediateClick(a);break;case "pointer":this.pointerEvents.setImmediateTap(a)}},enablePan:function(){this.disablePan();switch(this.eventModel){case "mouse":this._panInitHandle=E(this.mouseEvents,
"onMouseDown",this,this._panInit);break;case "touch":this._panInitHandle=E(this.mouseEvents,"onMouseDown",this,this._panInit);this._swipeInitHandle=E(this.touchEvents,"onSwipeStart",this,this._swipeInit);break;case "pointer":this._swipeInitHandle=E(this.pointerEvents,"onSwipeStart",this,this._swipeInit)}},disablePan:function(){B(this._panInitHandle);this._panInitHandle=null;B(this._swipeInitHandle);this._swipeInitHandle=null},enableRubberBandZoom:function(){this.disableRubberBandZoom();this._zoomInitHandle=
this.pointerEvents?E(this.pointerEvents,"onSwipeStart",this,this._zoomInit):E(this.mouseEvents,"onMouseDown",this,this._zoomInit)},disableRubberBandZoom:function(){B(this._zoomInitHandle);this._zoomInitHandle=null},enablePinchZoom:function(){this.disablePinchZoom();if("touch"===this.eventModel||"pointer"===this.eventModel)this._pinchInitHandle=E(this.touchEvents||this.pointerEvents,"onPinchStart",this,this._pinchInit)},disablePinchZoom:function(){B(this._pinchInitHandle);this._pinchInitHandle=null},
enableScrollWheelZoom:function(){this.disableScrollWheelZoom();this._wheelHandle=E(this.mouseEvents||this.pointerEvents,"onMouseWheel",this,this._wheelZoom)},disableScrollWheelZoom:function(){B(this._wheelHandle);this._wheelHandle=null},enableScrollWheelPan:function(){var a=this.map;a&&a.loaded&&a.smartNavigation&&(this.disableScrollWheelPan(),this._setScrollWheelPan(!0))},disableScrollWheelPan:function(){var a=this.map;a&&a.loaded&&a.smartNavigation&&this._setScrollWheelPan(!1)},enableDoubleClickZoom:function(){this.disableDoubleClickZoom();
switch(this.eventModel){case "mouse":this._dblClickHandle=E(this.mouseEvents,"onDblClick",this,this._dblClickZoom);break;case "touch":this._dblClickHandle=E(this.mouseEvents,"onDblClick",this,this._dblClickZoom);this._dblTapHandle=E(this.touchEvents,"onDoubleTap",this,this._dblClickZoom);this._zoomOutHandle=E(this.touchEvents,"onTwoFingerTap",this,this._twoFingerTap);break;case "pointer":this._dblTapHandle=E(this.pointerEvents,"onDoubleTap",this,this._dblClickZoom),this._zoomOutHandle=E(this.pointerEvents,
"onTwoFingerTap",this,this._twoFingerTap)}},disableDoubleClickZoom:function(){B(this._dblClickHandle);B(this._zoomOutHandle);this._dblTapHandle&&B(this._dblTapHandle);this._dblClickHandle=this._zoomOutHandle=this._dblTapHandle=null},enableShiftDoubleClickZoom:function(){this.disableShiftDoubleClickZoom();this._sDblClickHandle=E(this.pointerEvents||this.mouseEvents,"onDblClick",this,this._recenterZoom)},disableShiftDoubleClickZoom:function(){B(this._sDblClickHandle);this._sDblClickHandle=null},enableClickRecenter:function(){this.disableClickRecenter();
this._recenterHandle=E(this.pointerEvents||this.mouseEvents,"onClick",this,this._recenter)},disableClickRecenter:function(){B(this._recenterHandle);this._recenterHandle=null},enableKeyboardNavigation:function(){this.disableKeyboardNavigation();this._keyHandle=E(this.pointerEvents||this.mouseEvents,"onKeyDown",this,this._keyDown);this._keyEndHandle=E(this.pointerEvents||this.mouseEvents,"onKeyUp",this,this._keyEnd)},disableKeyboardNavigation:function(){B(this._keyHandle);B(this._keyEndHandle);this._keyHandle=
this._keyEndHandle=null},enableScrollWheel:function(){var a=this.map;a&&(a.smartNavigation?this.enableScrollWheelPan():a.enableScrollWheelZoom())},disableScrollWheel:function(){var a=this.map;a&&(a.disableScrollWheelZoom(),a.smartNavigation&&this.disableScrollWheelPan())},enableNavigation:function(){var a=this.map;a&&a.loaded&&(a._evalNavigationFeature("DoubleClickZoom"),a._evalNavigationFeature("ClickRecenter"),a._evalNavigationFeature("Pan"),a._evalNavigationFeature("RubberBandZoom"),a._evalNavigationFeature("PinchZoom"),
a._evalNavigationFeature("KeyboardNavigation"),a._evalNavigationFeature("ScrollWheel"))},disableNavigation:function(){var a=this.map;a&&a.loaded&&(a._evalNavigationFeature("DoubleClickZoom"),a._evalNavigationFeature("ClickRecenter"),a._evalNavigationFeature("Pan"),a._evalNavigationFeature("RubberBandZoom"),a._evalNavigationFeature("PinchZoom"),a._evalNavigationFeature("KeyboardNavigation"),a._evalNavigationFeature("ScrollWheel"))},destroy:function(){this.touchEvents&&this.touchEvents.destroy();this.mouseEvents&&
this.mouseEvents.destroy();this.pointerEvents&&this.pointerEvents.destroy();var a,b=[this._panInitHandle,this._panStartHandle,this._panHandle,this._panEndHandle,this._zoomInitHandle,this._zoomHandle,this._zoomEndHandle,this._wheelHandle,this._mwMacHandle,this._dblClickHandle,this._zoomOutHandle,this._recenterHandle,this._sDblClickHandle,this._dblTapHandle,this._keyHandle,this._keyEndHandle,this._swipeInitHandle,this._swipeHandle,this._swipeEndHandle,this._pinchInitHandle,this._pinchHandle,this._pinchEndHandle];
for(a=0;a<b.length;a++)B(b[a]);this.map=this.touchEvents=this.mouseEvents=this.eventModel=this.pointerEvents=this._zoomRect=this._dragOrigin=this._panInitHandle=this._panStartHandle=this._panHandle=this._panEndHandle=this._zoomInitHandle=this._zoomHandle=this._zoomEndHandle=this._wheelHandle=this._mwMacHandle=this._dblClickHandle=this._zoomOutHandle=this._recenterHandle=this._sDblClickHandle=this._dblTapHandle=this._keyHandle=this._keyEndHandle=this._swipeInitHandle=this._swipeHandle=this._swipeEndHandle=
this._pinchInitHandle=this._pinchHandle=this._pinchEndHandle=null}});t("extend-esri")&&(d.MapNavigationManager=m);return m})},"dijit/focus":function(){define("dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/Evented dojo/_base/lang dojo/on dojo/domReady dojo/sniff dojo/Stateful dojo/_base/window dojo/window ./a11y ./registry ./main".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u){var q,x,v=new (l([e,g],{curNode:null,activeStack:[],constructor:function(){var b=
p.hitch(this,function(b){a.isDescendant(this.curNode,b)&&this.set("curNode",null);a.isDescendant(this.prevNode,b)&&this.set("prevNode",null)});m.before(n,"empty",b);m.before(n,"destroy",b)},registerIframe:function(a){return this.registerWin(a.contentWindow,a)},registerWin:function(a,c){var e=this,f=a.document&&a.document.body;if(f){var h=b("pointer-events")?"pointerdown":b("MSPointer")?"MSPointerDown":b("touch-events")?"mousedown, touchstart":"mousedown",q=d(a.document,h,function(a){a&&a.target&&
null==a.target.parentNode||e._onTouchNode(c||a.target,"mouse")}),g=d(f,"focusin",function(a){if(a.target.tagName){var b=a.target.tagName.toLowerCase();"#document"!=b&&"body"!=b&&(r.isFocusable(a.target)?e._onFocusNode(c||a.target):e._onTouchNode(c||a.target))}}),k=d(f,"focusout",function(a){e._onBlurNode(c||a.target)});return{remove:function(){q.remove();g.remove();k.remove();f=q=g=k=null}}}},_onBlurNode:function(a){a=(new Date).getTime();a<q+100||(this._clearFocusTimer&&clearTimeout(this._clearFocusTimer),
this._clearFocusTimer=setTimeout(p.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null)}),0),this._clearActiveWidgetsTimer&&clearTimeout(this._clearActiveWidgetsTimer),a<x+100||(this._clearActiveWidgetsTimer=setTimeout(p.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([])}),0)))},_onTouchNode:function(a,b){x=(new Date).getTime();this._clearActiveWidgetsTimer&&(clearTimeout(this._clearActiveWidgetsTimer),delete this._clearActiveWidgetsTimer);k.contains(a,
"dijitPopup")&&(a=a.firstChild);var c=[];try{for(;a;){var e=f.get(a,"dijitPopupParent");if(e)a=w.byId(e).domNode;else if(a.tagName&&"body"==a.tagName.toLowerCase()){if(a===h.body())break;a=t.get(a.ownerDocument).frameElement}else{var d=a.getAttribute&&a.getAttribute("widgetId"),q=d&&w.byId(d);!q||"mouse"==b&&q.get("disabled")||c.unshift(d);a=a.parentNode}}}catch(H){}this._setStack(c,b)},_onFocusNode:function(a){a&&9!=a.nodeType&&(q=(new Date).getTime(),this._clearFocusTimer&&(clearTimeout(this._clearFocusTimer),
delete this._clearFocusTimer),this._onTouchNode(a),a!=this.curNode&&(this.set("prevNode",this.curNode),this.set("curNode",a)))},_setStack:function(a,b){var c=this.activeStack,e=c.length-1,d=a.length-1;if(a[d]!=c[e]){this.set("activeStack",a);var f;for(f=e;0<=f&&c[f]!=a[f];f--)if(e=w.byId(c[f]))e._hasBeenBlurred=!0,e.set("focused",!1),e._focusManager==this&&e._onBlur(b),this.emit("widget-blur",e,b);for(f++;f<=d;f++)if(e=w.byId(a[f]))e.set("focused",!0),e._focusManager==this&&e._onFocus(b),this.emit("widget-focus",
e,b)}},focus:function(a){if(a)try{a.focus()}catch(z){}}}));c(function(){var a=v.registerWin(t.get(document));b("ie")&&d(window,"unload",function(){a&&(a.remove(),a=null)})});u.focus=function(a){v.focus(a)};for(var C in v)/^_/.test(C)||(u.focus[C]="function"==typeof v[C]?p.hitch(v,C):v[C]);v.watch(function(a,b,c){u.focus[a]=c});return v})},"dijit/a11y":function(){define("dojo/_base/array dojo/dom dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/sniff ./main".split(" "),function(m,l,a,f,k,n,g){var p=
{_isElementShown:function(d){var c=f.get(d);return"hidden"!=c.visibility&&"collapsed"!=c.visibility&&"none"!=c.display&&"hidden"!=a.get(d,"type")},hasDefaultTabStop:function(d){switch(d.nodeName.toLowerCase()){case "a":return a.has(d,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var c;try{var b=d.contentDocument;if("designMode"in b&&"on"==b.designMode)return!0;c=b.body}catch(e){try{c=d.contentWindow.document.body}catch(h){return!1}}return c&&
("true"==c.contentEditable||c.firstChild&&"true"==c.firstChild.contentEditable);default:return"true"==d.contentEditable}},effectiveTabIndex:function(d){if(!a.get(d,"disabled"))return a.has(d,"tabIndex")?+a.get(d,"tabIndex"):p.hasDefaultTabStop(d)?0:void 0},isTabNavigable:function(a){return 0<=p.effectiveTabIndex(a)},isFocusable:function(a){return-1<=p.effectiveTabIndex(a)},_getTabNavigable:function(d){function c(a){return a&&"input"==a.tagName.toLowerCase()&&a.type&&"radio"==a.type.toLowerCase()&&
a.name&&a.name.toLowerCase()}function b(a){return q[c(a)]||a}var e,f,g,k,l,m,q={},x=p._isElementShown,v=p.effectiveTabIndex,C=function(b){for(b=b.firstChild;b;b=b.nextSibling)if(!(1!=b.nodeType||9>=n("ie")&&"HTML"!==b.scopeName)&&x(b)){var d=v(b);if(0<=d){if(0==d)e||(e=b),f=b;else if(0<d){if(!g||d<k)k=d,g=b;if(!l||d>=m)m=d,l=b}d=c(b);a.get(b,"checked")&&d&&(q[d]=b)}"SELECT"!=b.nodeName.toUpperCase()&&C(b)}};x(d)&&C(d);return{first:b(e),last:b(f),lowest:b(g),highest:b(l)}},getFirstInTabbingOrder:function(a,
c){var b=p._getTabNavigable(l.byId(a,c));return b.lowest?b.lowest:b.first},getLastInTabbingOrder:function(a,c){var b=p._getTabNavigable(l.byId(a,c));return b.last?b.last:b.highest}};k.mixin(g,p);return p})},"esri/MouseEvents":function(){define("dojo/_base/declare dojo/_base/html dojo/_base/lang dojo/_base/sniff dojo/_base/connect dojo/_base/event ./kernel ./Evented ./geometry/Point ./geometry/ScreenPoint".split(" "),function(m,l,a,f,k,n,g,p,d,c){var b=k.connect,e=k.disconnect;m=m([p],{declaredClass:"esri.MouseEvents",
doubleClickDuration:300,minWheelValue:1,maxWheelValue:1,mozWheelDivisor:-1!==f("mac")?1:3,wheelDivisor:2>f("chrome")?360:120,preventPageScroll:!0,map:null,constructor:function(c,e){this.node=c;a.mixin(this,e);var d=function(a){n.stop(a);return!1};f("mozilla")&&l.style(c,"MozUserSelect","none");this._handles=[b(c,"onselectstart",d),b(c,"ondragstart",d),b(c,"onmouseenter",this,this._onMouseEnterHandler),b(c,"onmouseleave",this,this._onMouseLeaveHandler),b(c,"onmousedown",this,this._onMouseDownHandler),
b(c,"onclick",this,this._onClickHandler),b(c,"ondblclick",this,this._onDblClickHandler)];this._onMouseMoveHandler_connect=b(c,"onmousemove",this,this._onMouseMoveHandler);this._onMouseUpHandler_connect=b(c,"onmouseup",this,this._onMouseUpHandler);this._fireClickEvent=a.hitch(this,this._fireClickEvent);this._initialDuration=this.doubleClickDuration;this.preventPageScroll=(d=this.map)?d.isScrollWheelZoom||d.isScrollWheelPan:this.preventPageScroll;this.enableMouseWheel(!1)},_fire:function(a,b){if(!this._preventClick||
"onClick"!==a&&"onDblClick"!==a){if(this[a])this[a](b);if(this.map&&this.map[a])this.map[a](b)}},_processEvent:function(a){a=n.fix(a,a.target);var b=this.map,e=b&&b.position;e&&("DOMMouseScroll"===a.type&&3>f("ff")?a.screenPoint=new c(window.scrollX+a.screenX-e.x,window.scrollY+a.screenY-e.y):a.screenPoint=new c(a.pageX-e.x,a.pageY-e.y),a.mapPoint=b.extent?b.toMap(a.screenPoint):new d);a.numPoints=0;return a},_onMouseEnterHandler:function(a){e(this._onKeyDown_connect);e(this._onKeyUp_connect);this._onKeyDown_connect=
b(document,"onkeydown",this,this._onKeyDownHandler);this._onKeyUp_connect=b(document,"onkeyup",this,this._onKeyUpHandler);this._fire("onMouseOver",this._processEvent(a))},_onMouseLeaveHandler:function(a){e(this._onKeyDown_connect);e(this._onKeyUp_connect);this._onKeyDown_connect=this._onKeyUp_connect=null;this._fire("onMouseOut",this._processEvent(a))},_onMouseMoveHandler:function(a){this._dragEnd?this._dragEnd=!1:this._fire("onMouseMove",this._processEvent(a))},_onMouseDownHandler:function(a){e(this._onMouseMoveHandler_connect);
this._onMouseMoveHandler_connect=null;this.node.setCapture&&this.node.setCapture(!1);e(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=b(document,"onmousemove",this,this._onMouseDragHandler);this._startX=a.pageX;this._startY=a.pageY;this._fire("onMouseDown",this._processEvent(a))},_onMouseUpHandler:function(a){var c=this.node;c.releaseCapture&&c.releaseCapture();e(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=null;e(this._onMouseMoveHandler_connect);this._onMouseMoveHandler_connect=
b(c,"onmousemove",this,this._onMouseMoveHandler);this._fire("onMouseUp",this._processEvent(a))},_onMouseDragHandler:function(a){e(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=b(document,"onmousemove",this,this._onMouseDraggingHandler);e(this._onMouseUpHandler_connect);this._onMouseUpHandler_connect=b(document,"onmouseup",this,this._onDragMouseUpHandler);this._docLeaveConnect=b(document,"onmouseout",this,this._onDocMouseOut);this._fire("onMouseDragStart",this._processEvent(a))},
_onMouseDraggingHandler:function(a){n.stop(a);this._fire("onMouseDrag",this._processEvent(a))},_onDragMouseUpHandler:function(a){var c=this.node;c.releaseCapture&&c.releaseCapture();this._dragEnd=!0;e(this._docLeaveConnect);e(this._onMouseDragHandler_connect);e(this._onMouseUpHandler_connect);this._docLeaveConnect=this._onMouseDragHandler_connect=null;this._onMouseMoveHandler_connect=b(c,"onmousemove",this,this._onMouseMoveHandler);this._onMouseUpHandler_connect=b(c,"onmouseup",this,this._onMouseUpHandler);
a=this._processEvent(a);this._fire("onMouseDragEnd",a);this._fire("onMouseUp",a)},_onDocMouseOut:function(a){var b=9>f("ie")?a.toElement:a.relatedTarget,c=b&&b.nodeName.toLowerCase();(!b||(f("chrome")||f("safari"))&&"html"===c)&&this._onDragMouseUpHandler(a)},_onClickHandler:function(a){a=this._processEvent(a);if(a.pageX===this._startX&&a.pageY===this._startY){clearTimeout(this._clickTimer);var b={},c="movementX"in a,e;for(e in a)if(!c||"webkitMovementX"!==e&&"webkitMovementY"!==e)b[e]=a[e];this._clickEvent=
b;this._clickTimer=setTimeout(this._fireClickEvent,this.doubleClickDuration)}},_fireClickEvent:function(){clearTimeout(this._clickTimer);9>f("ie")&&(this._clickEvent.graphic=g._ieGraphic,delete g._ieGraphic);this._fire("onClick",this._clickEvent)},_onDblClickHandler:function(a){clearTimeout(this._clickTimer);this._fire("onDblClick",this._processEvent(a))},_onMouseWheelHandler:function(a){var b=this.map;(b?b.isScrollWheelZoom||b.isScrollWheelPan:this.preventPageScroll)&&n.stop(a);var b=f("ff")||f("mozilla")?
-a.detail/this.mozWheelDivisor:a.wheelDelta/this.wheelDivisor,c=Math.abs(b),c=c<=this.minWheelValue?this.minWheelValue:this.maxWheelValue;a.value=0>b?-c:c;this._fire("onMouseWheel",this._processEvent(a))},_onKeyDownHandler:function(a){this._fire("onKeyDown",a)},_onKeyUpHandler:function(a){this._fire("onKeyUp",a)},enableMouseWheel:function(a){e(this._scrollHandle);this._scrollHandle=b(this.node,f("ff")||f("mozilla")?a?"MozMousePixelScroll":"DOMMouseScroll":"onmousewheel",this,this._onMouseWheelHandler)},
setImmediateClick:function(a){this.doubleClickDuration=a?0:this._initialDuration},preventClickEvents:function(a){this._preventClick=a},destroy:function(){var a=this._handles.concat([this._onMouseMoveHandler_connect,this._onMouseUpHandler_connect,this._onMouseDragHandler_connect,this._scrollHandle,this._onKeyDown_connect,this._onKeyUp_connect,this._docLeaveConnect]),b;for(b=0;b<a.length;b++)e(a[b]);clearTimeout(this._clickTimer);this.node=this.map=this._handles=this._clickEvent=this._onMouseMoveHandler_connect=
this._onMouseUpHandler_connect=this._onMouseDragHandler_connect=this._scrollHandle=this._onKeyDown_connect=this._onKeyUp_connect=this._docLeaveConnect=null}});f("extend-esri")&&(g.MouseEvents=m);return m})},"esri/TouchEvents":function(){define("dojo/_base/declare dojo/_base/html dojo/_base/lang dojo/_base/sniff dojo/dom ./kernel ./Evented ./geometry/Point ./geometry/ScreenPoint".split(" "),function(m,l,a,f,k,n,g,p,d){m=m([g],{declaredClass:"esri.TouchEvents",tapRadius:8,doubleTapRadius:10,tapStartTolerance:50,
doubleTapDuration:300,map:null,constructor:function(c,b){this.node=c;a.mixin(this,b);l.setSelectable(c,!1);this._touchStart=a.hitch(this,this._touchStart);this._touchMove=a.hitch(this,this._touchMove);this._touchEnd=a.hitch(this,this._touchEnd);this._touchCancel=a.hitch(this,this._touchCancel);this._fireClickEvent=a.hitch(this,this._fireClickEvent);c.addEventListener("touchstart",this._touchStart,!1);c.addEventListener("touchmove",this._touchMove,!1);c.addEventListener("touchend",this._touchEnd,!1);
c.addEventListener("touchcancel",this._touchCancel,!1);this.map&&f("ios")&&(this._mouseOver=a.hitch(this,this._mouseOver),this._mouseOut=a.hitch(this,this._mouseOut),this._mouseDown=a.hitch(this,this._mouseDown),this._mouseUp=a.hitch(this,this._mouseUp),this._mouseClick=a.hitch(this,this._mouseClick),c.addEventListener("mouseover",this._mouseOver,!1),c.addEventListener("mouseout",this._mouseOut,!1),c.addEventListener("mousedown",this._mouseDown,!1),c.addEventListener("mouseup",this._mouseUp,!1),c.addEventListener("click",
this._mouseClick,!1));this._numTouches=0;this._nodeTouches=[];this._touches={};this._touchIds=[];this._taps=[];this._immediate=!1},_touchStart:function(a){var b=this._touches,c,d=a.changedTouches.length,g,k,p,n,q=(new Date).getTime();this._touchStartTS=q;if(!(f("android")&&f("safari")&&1===a.targetTouches.length&&a.touches.length===a.targetTouches.length&&a.targetTouches.length===a.changedTouches.length&&0===a.changedTouches[0].identifier&&b[a.changedTouches[0].identifier])){this._addTouch(a);for(c=
0;c<d;c++)g=a.changedTouches[c],k=b[g.identifier]={},k.startX=g.pageX,k.startY=g.pageY,k.startTS=q,-1===this._touchIds.indexOf(g.identifier)&&this._touchIds.push(g.identifier);this._swipeActive&&(p=this._nodeTouches[0]);this._pinchActive&&(n=this._nodeTouches[1]);1===this._numTouches?this._swipeActive?(this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,p))):this._pinchActive&&(this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(a,[p,n]))):2===this._numTouches?
this._swipeActive&&(p&&(k=b[this._touchIds[0]],k.startX=p.pageX,k.startY=p.pageY,k.moved=!1),this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,p))):this._swipeActive?(this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,p))):this._pinchActive&&(this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(a,[p,n])))}},_touchMove:function(a){a.preventDefault();this._updateTouch(a);var b=this._touches,c,d=a.changedTouches.length,g,k,p,n;if(!(f("android")&&
f("safari")&&1===a.targetTouches.length&&a.touches.length===a.targetTouches.length&&a.targetTouches.length===a.changedTouches.length&&0===a.changedTouches[0].identifier&&b[a.changedTouches[0].identifier]&&1<this._touchIds.length)){for(c=0;c<d;c++)if(g=a.changedTouches[c],k=b[g.identifier])p=Math.abs(g.pageX-k.startX),g=Math.abs(g.pageY-k.startY),!k.moved&&(p>=this.tapRadius||g>=this.tapRadius)&&(k.moved=k.absMoved=!0),n=n?n:k.moved;1===this._numTouches?(b=a.changedTouches[0],this._swipeActive?this._fire("onSwipeMove",
this._processTouchEvent(a,b)):n&&(this._swipeActive=!0,this._fire("onSwipeStart",this._processTouchEvent(a,b)))):2===this._numTouches&&(c=this._nodeTouches[0],d=this._nodeTouches[1],this._pinchActive?this._fire("onPinchMove",this._processTouchEvent(a,[c,d])):n&&(n=b[c.identifier],k=b[d.identifier],b=Math.abs(n.startX-k.startX),n=Math.abs(n.startY-k.startY),k=Math.abs(c.pageX-d.pageX),p=Math.abs(c.pageY-d.pageY),Math.abs(Math.sqrt(k*k+p*p)-Math.sqrt(b*b+n*n))>=2*this.tapRadius&&(this._pinchActive=
!0,this._fire("onPinchStart",this._processTouchEvent(a,[c,d])))))}},_touchEnd:function(a){this._removeTouch(a);var b=this._touches,c=a.changedTouches,d,f=c.length,g,k,p=(new Date).getTime(),q=this._touchIds;for(d=0;d<f;d++)if(k=b[c[d].identifier])k.absMoved&&(g=!0),k.pageX=c[d].pageX,k.pageY=c[d].pageY,k.endTS=p;if(0===this._numTouches)if(this._touches={},this._touchIds=[],this._swipeActive)this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(a,c[0]));else if(this._pinchActive)this._pinchActive=
!1,this._fire("onPinchEnd",this._processTouchEvent(a,c));else{if(!g){f=Infinity;g=-Infinity;var p=Infinity,n=-Infinity,v=this.tapStartTolerance,l=[],m=!0;for(d=0;d<q.length;d++)k=b[q[d]],l.push(k),k.startTS<f&&(f=k.startTS),k.startTS>g&&(g=k.startTS),k.endTS<p&&(p=k.endTS),k.endTS>n&&(n=k.endTS),delete b[q[d]];1===l.length&&c[0]&&(b=Math.abs(c[0].pageY-l[0].startY),Math.abs(c[0].pageX-l[0].startX)>=this.tapRadius||b>=this.tapRadius)&&(m=!1);m&&Math.abs(g-f)<=v&&Math.abs(n-p)<=v&&this._basicTap(a,
l)}}else 1===this._numTouches&&this._pinchActive&&(d=this._nodeTouches[0],k=b[d.identifier],k.startX=d.pageX,k.startY=d.pageY,this._pinchActive=k.moved=!1,this._fire("onPinchEnd",this._processTouchEvent(a,[c[0],d])))},_touchCancel:function(a){this._numTouches&&this._touchEnd(a)},_basicTap:function(a,b){var c=(new Date).getTime(),d=this;a=this._processTouchEvent(a,b);this._taps.push({touchInfos:b,ts:c,event:a});2<this._taps.length&&this._taps.shift();this._fire("onBasicTap",a);clearTimeout(this._tapTimer);
this._immediate?this._analyzeTap(!0):this._tapTimer=setTimeout(function(){var a=d;d=null;clearTimeout(a._tapTimer);a._analyzeTap()},2===this._taps.length?this.doubleTapDuration/2:this.doubleTapDuration)},_analyzeTap:function(a){var b=this._taps,c=b[0],d=b[1],f=c.touchInfos,g=d&&d.touchInfos;b.length&&(a||(this._taps=[]),c&&d?f.length===g.length?d.ts-c.ts<=this.doubleTapDuration?(1===f.length?(a=Math.abs(f[0].startX-g[0].startX),f=Math.abs(f[0].startY-g[0].startY),f=a<=this.doubleTapRadius&&f<=this.doubleTapRadius):
f=!0,f?this._processedDoubleTap(b):this._processedTap(d)):this._processedTap(d):this._processedTap(d):this._processedTap(c||d))},_processedTap:function(a){var b=a.event;this._fire("onProcessedTap",b);1===a.touchInfos.length?this._fire("onTap",this._fixEvent(b)):2===a.touchInfos.length&&this._fire("onTwoFingerTap",b)},_processedDoubleTap:function(a){var b=1===a[1].touchInfos.length,c;b&&(c=[this._fixEvent(a[0].event),this._fixEvent(a[1].event)],c[1].relatedEvents=c);a=[a[0].event,a[1].event];a[1].relatedEvents=
a;this._fire("onProcessedDoubleTap",a[1]);b&&(this._fire("onDoubleTap",c[1]),this._fire("onDblClick",c[1]))},_addTouch:function(a){var b=a.changedTouches,c=this._nodeTouches,d,f,g;this._numTouches+=b.length;for(a=0;a<b.length;a++){f=c.length;g=!1;for(d=0;d<f&&!(g=c[d].identifier===b[a].identifier);d++);g?this._numTouches--:c.push(b[a])}for(a=c.length-1;0<=a;a--)k.isDescendant(c[a].target,document.body)||(c.splice(a,1),this._numTouches--);0>this._numTouches&&(this._numTouches=0)},_removeTouch:function(a){var b=
[],c=[],d=a.changedTouches,f=this._nodeTouches;this._numTouches-=d.length;0>this._numTouches&&(this._numTouches=0);for(a=0;a<d.length;a++)b.push(d[a].identifier);for(a=f.length-1;0<=a;a--)-1!==b.indexOf(f[a].identifier)&&c.push(f.splice(a,1)[0]);return c},_updateTouch:function(a){var b=[],c,d=a.changedTouches,f=this._nodeTouches;for(a=0;a<d.length;a++)b.push(d[a].identifier);for(a=0;a<f.length;a++)c=b.indexOf(f[a].identifier),-1!==c&&f.splice(a,1,d[c])},_mouseOver:function(a){this._fire("onMouseOver",
this._processMouseEvent(a))},_mouseOut:function(a){this._fire("onMouseOut",this._processMouseEvent(a))},_mouseDown:function(a){this._fire("onMouseDown",this._processMouseEvent(a))},_mouseUp:function(a){this._fire("onMouseUp",this._processMouseEvent(a))},_mouseClick:function(a){clearTimeout(this._clickTimer);300<(new Date).getTime()-this._touchStartTS?this._fire("onClick",this._processMouseEvent(a)):(this._clickEvent=a,this._clickTimer=setTimeout(this._fireClickEvent,this.doubleTapDuration))},_fireClickEvent:function(){clearTimeout(this._clickTimer);
this._fire("onClick",this._processMouseEvent(this._clickEvent))},_fire:function(a,b){"onDblClick"===a&&clearTimeout(this._clickTimer);if("onDblClick"===a&&this.mouseEvents){this.mouseEvents.preventClickEvents(!0);var c=this;setTimeout(function(){c.mouseEvents.preventClickEvents(!1)},350)}if(this[a])this[a](b);if(this.map&&this.map[a])this.map[a](b)},_fixEvent:function(a){var b={},c;for(c in a)b[c]=a[c];this.map&&(b.screenPoint=b.screenPoints[0],b.mapPoint=b.mapPoints[0]);return b},_processTouchEvent:function(c,
b){var e=this.map,f=e&&e.position,g=0;if(f&&b)if(a.isArray(b)){var k,n;c.screenPoints=[];c.mapPoints=[];for(k=0;k<b.length;k++)b[k]?(n=new d(b[k].pageX-f.x,b[k].pageY-f.y),c.screenPoints.push(n),c.mapPoints.push(e.extent?e.toMap(n):new p)):g++}else c.screenPoint=new d(b.pageX-f.x,b.pageY-f.y),c.mapPoint=e.extent?e.toMap(c.screenPoint):new p;c.numPoints=b?a.isArray(b)?b.length-g:1:0;return c},_processMouseEvent:function(a){var b=this.map,c=b&&b.position;c&&(a.screenPoint=new d(a.pageX-c.x,a.pageY-
c.y),a.mapPoint=b.extent?b.toMap(a.screenPoint):new p);return a},setImmediateTap:function(a){this._immediate=a},destroy:function(){var a=this.node;a.removeEventListener("touchstart",this._touchStart,!1);a.removeEventListener("touchmove",this._touchMove,!1);a.removeEventListener("touchend",this._touchEnd,!1);a.removeEventListener("touchcancel",this._touchCancel,!1);this.map&&(a.removeEventListener("mouseover",this._mouseOver,!1),a.removeEventListener("mouseout",this._mouseOut,!1),a.removeEventListener("mousedown",
this._mouseDown,!1),a.removeEventListener("mouseup",this._mouseUp,!1),a.removeEventListener("click",this._mouseClick,!1));l.setSelectable(a,!0);clearTimeout(this._tapTimer);clearTimeout(this._clickTimer);this.node=this.map=this._numTouches=this._nodeTouches=this._touches=this._touchIds=this._taps=null}});f("extend-esri")&&(n.TouchEvents=m);return m})},"esri/PointerEvents":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ./kernel ./Evented ./geometry/Point ./geometry/ScreenPoint".split(" "),
function(m,l,a,f,k,n,g,p){m=m([n],{declaredClass:"esri.PointerEvents",tapRadius:8,clickRadius:2,doubleTapRadius:10,tapStartTolerance:50,doubleTapDuration:300,minWheelValue:1,maxWheelValue:1,mozWheelDivisor:-1!==f("mac")?1:3,wheelDivisor:120,preventPageScroll:!0,_dragging:!1,constructor:function(a,c){this.node=a;l.mixin(this,c);void 0!==a.style.msTouchAction?a.style.msTouchAction="none":void 0!==a.style.touchAction&&(a.style.touchAction="none");var b=navigator.msPointerEnabled,e=function(a){a.preventDefault()};
a.addEventListener("selectstart",e,!1);a.addEventListener("dragstart",e,!1);this._pointerDown=l.hitch(this,this._pointerDown);this._pointerMove=l.hitch(this,this._pointerMove);this._pointerUp=l.hitch(this,this._pointerUp);this._pointerCancel=l.hitch(this,this._pointerCancel);a.addEventListener(b?"MSPointerDown":"pointerdown",this._pointerDown,!1);a.addEventListener(b?"MSPointerMove":"pointermove",this._pointerMove,!1);a.addEventListener(b?"MSPointerUp":"pointerup",this._pointerUp,!1);a.addEventListener(b?
"MSPointerCancel":"pointercancel",this._pointerCancel,!1);this.map&&(this._mouseOver=l.hitch(this,this._mouseOver),this._mouseOut=l.hitch(this,this._mouseOut),this._mouseLeave=l.hitch(this,this._mouseLeave),this._mouseDown=l.hitch(this,this._mouseDown),this._mouseUp=l.hitch(this,this._mouseUp),this._mouseClick=l.hitch(this,this._mouseClick),this._mouseWheel=l.hitch(this,this._mouseWheel),this._mouseMove=l.hitch(this,this._mouseMove),this._mouseEnter=l.hitch(this,this._mouseEnter),this._onKeyDown=
l.hitch(this,this._onKeyDown),this._onKeyUp=l.hitch(this,this._onKeyUp),a.addEventListener("mouseover",this._mouseOver,!1),a.addEventListener("mouseout",this._mouseOut,!1),a.addEventListener("mouseleave",this._mouseLeave,!1),a.addEventListener("mousedown",this._mouseDown,!1),a.addEventListener("mouseup",this._mouseUp,!1),a.addEventListener("click",this._mouseClick,!1),a.addEventListener("mousewheel",this._mouseWheel,!1),a.addEventListener("mousemove",this._mouseMove,!1),a.addEventListener("mouseenter",
this._mouseEnter,!1));this._numTouches=0;this._touches={};this._touchIds=[];this._taps=[];this._immediate=!1},_pointerDown:function(d){if(-1<a.indexOf(this._touchIds,d.pointerId))this._pointerUp(d);else{var c=this._touches,b=d.target,e=d.pointerId,f=this._touchIds,g,k=(new Date).getTime();g=c[e]={};g.pointerId=e;g.startX=g.pageX=d.pageX;g.startY=g.pageY=d.pageY;g.startTS=k;f.push(e);this._numTouches++;b.setPointerCapture?b.setPointerCapture(e):b.msSetPointerCapture&&b.msSetPointerCapture(e);b=c[f[0]];
c=c[f[1]];1!==this._numTouches&&(2===this._numTouches?this._swipeActive&&(b&&(b.startX=b.pageX,b.startY=b.pageY,b.moved=!1),this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(d,b))):this._swipeActive?(this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(d,b))):this._pinchActive&&(this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(d,[b,c]))))}},_pointerMove:function(a){var c=this._touches,b=this._touchIds,e,d,f;if((e=c[a.pointerId])&&(e.pageX!==a.pageX||
e.pageY!==a.pageY))if(e.pageX=a.pageX,e.pageY=a.pageY,d=Math.abs(e.pageX-e.startX),f=Math.abs(e.pageY-e.startY),!e.moved&&(d>=this.tapRadius||f>=this.tapRadius)&&(e.moved=e.absMoved=!0),1===this._numTouches)this._swipeActive?this._fire("onSwipeMove",this._processTouchEvent(a,a)):e.moved&&(this._swipeActive=!0,this._fire("onSwipeStart",this._processTouchEvent(a,a)));else if(2===this._numTouches)if(e=c[b[0]],c=c[b[1]],this._pinchActive)this._fire("onPinchMove",this._processTouchEvent(a,[e,c]));else if(e.moved||
c.moved){b=Math.abs(e.startX-c.startX);d=Math.abs(e.startY-c.startY);f=Math.abs(e.pageX-c.pageX);var g=Math.abs(e.pageY-c.pageY);Math.abs(Math.sqrt(f*f+g*g)-Math.sqrt(b*b+d*d))>=2*this.tapRadius&&(this._pinchActive=!0,this._fire("onPinchStart",this._processTouchEvent(a,[e,c])))}},_pointerUp:function(d){var c=this._touches,b,e=this.node,f=d.target,g=d.pointerId,k=this._touchIds,p=k.slice(0),n=a.map(p,function(a){return c[a]}),q=(new Date).getTime();if(b=c[g])if(b.pageX=d.pageX,b.pageY=d.pageY,b.endTS=
q,this._numTouches--,f.releasePointerCapture?f.releasePointerCapture(g):f.msReleasePointerCapture&&f.msReleasePointerCapture(g),0===this._numTouches)if(this._touches={},this._touchIds=[],this._swipeActive)this._swipeActive=!1,this._fire("onSwipeEnd",this._processTouchEvent(d,d));else if(this._pinchActive)this._pinchActive=!1,this._fire("onPinchEnd",this._processTouchEvent(d,d));else{if(!b.absMoved){var f=Infinity,g=-Infinity,k=Infinity,q=-Infinity,l=this.tapStartTolerance,v;for(v=0;v<p.length;v++)b=
n[v],b.startTS<f&&(f=b.startTS),b.startTS>g&&(g=b.startTS),b.endTS<k&&(k=b.endTS),b.endTS>q&&(q=b.endTS);Math.abs(g-f)<=l&&Math.abs(q-k)<=l&&this._basicTap(d,n)}}else 1===this._numTouches&&this._pinchActive&&(k.splice(a.indexOf(k,d.pointerId),1),delete c[d.pointerId],b=c[k[0]],b.startX=b.pageX,b.startY=b.pageY,b.moved=!1,document.msElementsFromPoint&&(p=document.msElementsFromPoint(b.pageX,b.pageY),a.some(p,function(a){return a===e})||(this._touches={},this._touchIds=[],this._numTouches=0)),this._pinchActive=
!1,this._fire("onPinchEnd",this._processTouchEvent(d,[d,b])))},_pointerCancel:function(a){this._numTouches&&this._pointerUp(a)},_basicTap:function(a,c){var b=(new Date).getTime(),e=this,d=this._immediate;a=this._processTouchEvent(a,c);this._taps.push({touchInfos:c,ts:b,event:a});2<this._taps.length&&this._taps.shift();this._fire("onBasicTap",a);clearTimeout(this._tapTimer);b=2===this._taps.length?this.doubleTapDuration/2:this.doubleTapDuration;this._tapTimer=setTimeout(function(){var a=e;e=null;clearTimeout(a._tapTimer);
a._analyzeTap(d)},d?0:b)},_analyzeTap:function(a){var c=this._taps,b=c[0],e=c[1],d=b.touchInfos,f=e&&e.touchInfos;c.length&&(a||(this._taps=[]),b&&e?d.length===f.length?e.ts-b.ts<=this.doubleTapDuration?(1===d.length?(a=Math.abs(d[0].startX-f[0].startX),d=Math.abs(d[0].startY-f[0].startY),d=a<=this.doubleTapRadius&&d<=this.doubleTapRadius):d=!0,d?this._processedDoubleTap(c):this._processedTap(e)):this._processedTap(e):this._processedTap(e):this._processedTap(b||e))},_processedTap:function(a){var c=
a.event;this._fire("onProcessedTap",c);1===a.touchInfos.length?this._fire("onTap",this._fixEvent(c)):2===a.touchInfos.length&&this._fire("onTwoFingerTap",c)},_processedDoubleTap:function(a){var c=1===a[1].touchInfos.length,b;c&&(b=[this._fixEvent(a[0].event),this._fixEvent(a[1].event)],b[1].relatedEvents=b);a=[a[0].event,a[1].event];a[1].relatedEvents=a;this._fire("onProcessedDoubleTap",a[1]);c&&(this._fire("onDoubleTap",b[1]),this._fire("onDblClick",b[1]))},_mouseOver:function(a){this._fire("onMouseOver",
this._processMouseEvent(a))},_mouseMove:function(a){this._dragging?this._fire("onMouseDrag",this._processMouseEvent(a)):this._fire("onMouseMove",this._processMouseEvent(a))},_mouseOut:function(a){this._fire("onMouseOut",this._processMouseEvent(a))},_mouseLeave:function(a){document.removeEventListener("keydown",this._onKeyDown,!1);document.removeEventListener("keyup",this._onKeyUp,!1);this._fire("onMouseOut",this._processMouseEvent(event))},_mouseDown:function(a){this._downX=a.pageX;this._downY=a.pageY;
this._fire("onMouseDown",this._processMouseEvent(a));0===a.button&&(this._dragging=!0,this._fire("onMouseDragStart",this._processMouseEvent(a)))},_mouseUp:function(a){this._dragging&&(this._dragging=!1,this._fire("onMouseDragEnd",this._processMouseEvent(a)));this._fire("onMouseUp",this._processMouseEvent(a))},_mouseClick:function(a){Math.abs(a.pageX-this._downX)<=this.clickRadius&&Math.abs(a.pageY-this._downY)<=this.clickRadius&&this._fire("onClick",this._processMouseEvent(a))},_mouseWheel:function(a){var c=
this.map;(c?c.isScrollWheelZoom||c.isScrollWheelPan:this.preventPageScroll)&&a.preventDefault();var c=a.wheelDelta?a.wheelDelta/this.wheelDivisor:-a.detail/this.mozWheelDivisor,b=Math.abs(c),b=b<=this.minWheelValue?this.minWheelValue:this.maxWheelValue;a.value=0>c?-b:b;this._fire("onMouseWheel",this._processMouseEvent(a))},_mouseEnter:function(a){document.removeEventListener("keydown",this._onKeyDown,!1);document.removeEventListener("keyup",this._onKeyUp,!1);document.addEventListener("keydown",this._onKeyDown,
!1);document.addEventListener("keyup",this._onKeyUp,!1);this._fire("onMouseEnter",this._processMouseEvent(a))},_onKeyDown:function(a){this._fire("onKeyDown",a)},_onKeyUp:function(a){this._fire("onKeyUp",a)},_fire:function(a,c){if(this[a])this[a](c);if(this.map&&this.map[a])this.map[a](c)},_fixEvent:function(a){var c={},b;for(b in a)c[b]=a[b];c.preventDefault=function(){a.preventDefault()};c.stopPropagation=function(){a.stopPropagation()};this.map&&(c.screenPoint=c.screenPoints[0],c.mapPoint=c.mapPoints[0]);
return c},_processTouchEvent:function(a,c){var b=this.map,e=b&&b.position,d=0;if(e&&c)if(l.isArray(c)){var f,k;a.screenPoints=[];a.mapPoints=[];for(f=0;f<c.length;f++)c[f]?(k=new p(c[f].pageX-e.x,c[f].pageY-e.y),a.screenPoints.push(k),a.mapPoints.push(b.extent?b.toMap(k):new g)):d++}else a.screenPoint=new p(c.pageX-e.x,c.pageY-e.y),a.mapPoint=b.extent?b.toMap(a.screenPoint):new g;a.numPoints=c?l.isArray(c)?c.length-d:1:0;return a},_processMouseEvent:function(a){var c=this.map,b=c&&c.position;b&&(a.screenPoint=
new p(a.pageX-b.x,a.pageY-b.y),a.mapPoint=c.extent?c.toMap(a.screenPoint):new g);return a},setImmediateTap:function(a){this._immediate=a},destroy:function(){var a=this.node;a.removeEventListener("MSPointerDown",this._pointerDown,!1);a.removeEventListener("MSPointerMove",this._pointerMove,!1);a.removeEventListener("MSPointerUp",this._pointerUp,!1);a.removeEventListener("MSPointerCancel",this._pointerCancel,!1);this.map&&(a.removeEventListener("mouseover",this._mouseOver,!1),a.removeEventListener("mousemove",
this._mouseMove,!1),a.removeEventListener("mouseout",this._mouseOut,!1),a.removeEventListener("mouseleave",this._mouseLeave,!1),a.removeEventListener("mousedown",this._mouseDown,!1),a.removeEventListener("mouseup",this._mouseUp,!1),a.removeEventListener("click",this._mouseClick,!1),a.removeEventListener("mouseenter",this._mouseEnter,!1));clearTimeout(this._tapTimer);this.node=this.map=this._numTouches=this._touches=this._touchIds=this._taps=null}});f("extend-esri")&&(k.PointerEvents=m);return m})},
"esri/geometry":function(){define("./units ./SpatialReference ./geometry/Geometry ./geometry/Point ./geometry/ScreenPoint ./geometry/Multipoint ./geometry/Polyline ./geometry/Polygon ./geometry/Extent ./geometry/Rect ./geometry/geodesicUtils ./geometry/jsonUtils ./geometry/mathUtils ./geometry/normalizeUtils ./geometry/scaleUtils ./geometry/screenUtils ./geometry/webMercatorUtils".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u){return{units:m,SpatialReference:l,Geometry:a,Point:f,ScreenPoint:k,
Multipoint:n,Polyline:g,Polygon:p,Extent:d,Rect:c,geodesicUtils:b,jsonUtils:e,mathUtils:h,normalizeUtils:t,scaleUtils:r,screenUtils:w,webMercatorUtils:u}})},"esri/units":function(){define(["dojo/has","./kernel"],function(m,l){var a={CENTIMETERS:"esriCentimeters",DECIMAL_DEGREES:"esriDecimalDegrees",DEGREE_MINUTE_SECONDS:"esriDegreeMinuteSeconds",DECIMETERS:"esriDecimeters",FEET:"esriFeet",FEET_US:"esriFeetUS",INCHES:"esriInches",KILOMETERS:"esriKilometers",METERS:"esriMeters",MILES:"esriMiles",MILES_US:"esriMilesUS",
MILLIMETERS:"esriMillimeters",NAUTICAL_MILES:"esriNauticalMiles",POINTS:"esriPoints",UNKNOWN:"esriUnknownUnits",YARDS:"esriYards",YARDS_US:"esriYardsUS",ACRES:"esriAcres",ACRES_US:"esriAcresUS",ARES:"esriAres",SQUARE_KILOMETERS:"esriSquareKilometers",SQUARE_MILES:"esriSquareMiles",SQUARE_MILES_US:"esriSquareMilesUS",SQUARE_FEET:"esriSquareFeet",SQUARE_FEET_US:"esriSquareFeetUS",SQUARE_METERS:"esriSquareMeters",HECTARES:"esriHectares",SQUARE_YARDS:"esriSquareYards",SQUARE_YARDS_US:"esriSquareYardsUS",
SQUARE_INCHES:"esriSquareInches",SQUARE_MILLIMETERS:"esriSquareMillimeters",SQUARE_CENTIMETERS:"esriSquareCentimeters",SQUARE_DECIMETERS:"esriSquareDecimeters",SQUARE_NAUTICAL_MILES:"esriSquareNauticalMiles",METERS_PER_SECOND:"esriMetersPerSecond",KILOMETERS_PER_HOUR:"esriKilometersPerHour",KNOTS:"esriKnots",FEET_PER_SECOND:"esriFeetPerSecond",MILES_PER_HOUR:"esriMilesPerHour",RADIANS:"esriDURadians"};m("extend-esri")&&(l.Units=a);return a})},"esri/geometry/geodesicUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/has ../kernel ../SpatialReference ./Point ./Polyline ./Polygon".split(" "),
function(m,l,a,f,k,n,g,p){function d(a){return!!(a&&a.wkid&&u[a.wkid])}function c(a){return d(a)?u[a.wkid]:u[4326]}function b(a){var b=a.spatialReference,e=c(b),d=e.a,e=e.eSq,f=Math.sqrt(e),h=Math.sin(a.y*w);return new n(d*a.x*w,0<e?d*(1-e)*(h/(1-e*h*h)-1/(2*f)*Math.log((1-f*h)/(1+f*h)))*.5:d*h,b)}function e(a,b,e,d,f){var h=c(f),g=h.a,q=h.b,h=h.f,k=Math.sin(e);e=Math.cos(e);var p=(1-h)*Math.tan(a);a=1/Math.sqrt(1+p*p);for(var v=p*a,l=Math.atan2(p,e),p=a*k,m=p*p,r=1-m,g=r*(g*g-q*q)/(q*q),t=1+g/16384*
(4096+g*(-768+g*(320-175*g))),x=g/1024*(256+g*(-128+g*(74-47*g))),g=d/(q*t),u=2*Math.PI,C,y,G,ea;1E-12<Math.abs(g-u);)G=Math.cos(2*l+g),C=Math.sin(g),y=Math.cos(g),ea=x*C*(G+x/4*(y*(-1+2*G*G)-x/6*G*(-3+4*C*C)*(-3+4*G*G))),u=g,g=d/(q*t)+ea;d=v*C-a*y*e;q=h/16*r*(4+h*(4-3*r));return new n((b+(Math.atan2(C*k,a*y-v*C*e)-(1-q)*h*p*(g+q*C*(G+q*y*(-1+2*G*G)))))/w,Math.atan2(v*y+a*C*e,(1-h)*Math.sqrt(m+d*d))/w,f)}function h(a,b,e,d,f){var h=c(f),g=h.a;f=h.b;var q=h.f,k=d-b,p=Math.atan((1-q)*Math.tan(a)),n=
Math.atan((1-q)*Math.tan(e)),v=Math.sin(p),p=Math.cos(p),l=Math.sin(n),n=Math.cos(n),m=k,r,t=1E3,x,w,u,C,y,L,W;do{u=Math.sin(m);C=Math.cos(m);w=Math.sqrt(n*u*n*u+(p*l-v*n*C)*(p*l-v*n*C));if(0===w)return 0;C=v*l+p*n*C;y=Math.atan2(w,C);L=p*n*u/w;x=1-L*L;u=C-2*v*l/x;isNaN(u)&&(u=0);W=q/16*x*(4+q*(4-3*x));r=m;m=k+(1-W)*q*L*(y+W*w*(u+W*C*(-1+2*u*u)))}while(1E-12<Math.abs(m-r)&&0<--t);if(0===t)return f=d-b,{azimuth:Math.atan2(Math.sin(f)*Math.cos(e),Math.cos(a)*Math.sin(e)-Math.sin(a)*Math.cos(e)*Math.cos(f)),
geodesicDistance:Math.acos(Math.sin(a)*Math.sin(e)+Math.cos(a)*Math.cos(e)*Math.cos(d-b))*h.radius};a=x*(g*g-f*f)/(f*f);b=a/1024*(256+a*(-128+a*(74-47*a)));return{azimuth:Math.atan2(n*Math.sin(m),p*l-v*n*Math.cos(m)),geodesicDistance:f*(1+a/16384*(4096+a*(-768+a*(320-175*a))))*(y-b*w*(u+b/4*(C*(-1+2*u*u)-b/6*u*(-3+4*w*w)*(-3+4*u*u)))),reverseAzimuth:Math.atan2(p*Math.sin(m),p*l*Math.cos(m)-v*n)}}function t(a,b){if(!(a instanceof g||a instanceof p))throw console.error("_geodesicDensify: the input geometry is neither polyline nor polygon"),
Error("_geodesicDensify: the input geometry is neither polyline nor polygon");var d=a.spatialReference,f=c(d).radius/1E4;b<f&&(b=f);var f=a instanceof g,q=[],k;m.forEach(f?a.paths:a.rings,function(a){q.push(k=[]);k.push([a[0][0],a[0][1]]);var c,f,g,p,n,v;c=a[0][0]*w;f=a[0][1]*w;for(n=0;n<a.length-1;n++)if(g=a[n+1][0]*w,p=a[n+1][1]*w,c!==g||f!==p){p=h(f,c,p,g,d);g=p.azimuth;p=p.geodesicDistance;var l=p/b;if(1<l){for(v=1;v<=l-1;v++){var m=e(f,c,g,v*b,d);k.push([m.x,m.y])}v=e(f,c,g,(p+Math.floor(l-1)*
b)/2,d);k.push([v.x,v.y])}f=e(f,c,g,p,d);k.push([f.x,f.y]);c=f.x*w;f=f.y*w}});return f?new g({paths:q,spatialReference:d}):new p({rings:q,spatialReference:d})}var r={esriMeters:1,esriKilometers:1E3,esriYards:.9144,esriFeet:.3048,esriMiles:1609.344,esriNauticalMiles:1852,esriInches:.0254,esriDecimeters:.1,esriCentimeters:.01,esriMillimeters:.001,esriSquareMeters:1,esriSquareKilometers:1E6,esriSquareYards:.83612736,esriSquareFeet:.09290304,esriSquareMiles:2589988.110336,esriAcres:4046.8564224,esriHectares:1E4,
esriAres:100,esriSquareInches:6.4516E-4,esriSquareMillimeters:1E-6,esriSquareCentimeters:1E-4,esriSquareDecimeters:.01},w=Math.PI/180,u={4326:{a:6378137,b:6356752.31424518,f:1/298.257223563,eSq:.006694379990197414,radius:6371008.771415059},104900:{a:2439700,b:2439700,f:0,eSq:0,radius:2439700},104901:{a:6051E3,b:6051E3,f:0,eSq:0,radius:6051E3},104902:{a:6051800,b:6051800,f:0,eSq:0,radius:6051800},104903:{a:1737400,b:1737400,f:0,eSq:0,radius:1737400},104904:{a:3393400,b:3375730,f:1/192.04301075,eSq:.01038722,
radius:3387510},104905:{a:3396190,b:3376200,f:1/169.89444722,eSq:.01173737,radius:3389526.6666666665},104906:{a:6200,b:6200,f:0,eSq:0,radius:6200},104907:{a:11100,b:11100,f:0,eSq:0,radius:11100},104912:{a:2409300,b:2409300,f:0,eSq:0,radius:2409300},104915:{a:1562090,b:1562090,f:0,eSq:0,radius:1562090},104916:{a:2632345,b:2632345,f:0,eSq:0,radius:2632345},104918:{a:1821460,b:1821460,f:0,eSq:0,radius:1821460},104929:{a:249400,b:249400,f:0,eSq:0,radius:249400},104943:{a:2575E3,b:2575E3,f:0,eSq:0,radius:2575E3},
104971:{a:3396190,b:3396190,f:0,eSq:0,radius:3396190},104972:{a:47E4,b:47E4,f:0,eSq:0,radius:47E4},104973:{a:255E3,b:255E3,f:0,eSq:0,radius:255E3},104974:{a:2439400,b:2439400,f:0,eSq:0,radius:2439400}};k={isSupported:d,getSpheroidInfo:c,geodesicDensify:t,geodesicLengths:function(a,b){var c=[];m.forEach(a,function(a,e){var d=0,f=a.spatialReference;m.forEach(a.paths,function(a,b){var c=0,e,g,q,k,p;for(e=1;e<a.length;e++)if(g=a[e-1][0]*w,q=a[e][0]*w,k=a[e-1][1]*w,p=a[e][1]*w,k!==p||g!==q)g=h(k,g,p,q,
f),c+=g.geodesicDistance;d+=c});d/=r[b];c.push(d)});return c},geodesicAreas:function(a,e){var d=[],f=[];m.forEach(a,function(a,b){var e=.0015696101447650193*c(a.spatialReference).radius;d.push(t(a,e))});m.forEach(d,function(a,c){var d=0,h=a.spatialReference;m.forEach(a.rings,function(a,c){var e=b(new n(a[0][0],a[0][1],h)),f=b(new n(a[a.length-1][0],a[a.length-1][1],h)),g=f.x*e.y-e.x*f.y,q;for(q=0;q<a.length-1;q++)e=b(new n(a[q+1][0],a[q+1][1],h)),f=b(new n(a[q][0],a[q][1],h)),g+=f.x*e.y-e.x*f.y;d+=
g});d/=r[e];f.push(d/-2)});return f},_unitsDictionary:r,_toEqualAreaPoint:b,_directGeodeticSolver:e,_inverseGeodeticSolver:h};a("extend-esri")&&l.mixin(l.getObject("geometry",!0,f),k);return k})},"esri/symbol":function(){define("./symbols/Symbol ./symbols/MarkerSymbol ./symbols/SimpleMarkerSymbol ./symbols/PictureMarkerSymbol ./symbols/LineSymbol ./symbols/SimpleLineSymbol ./symbols/CartographicLineSymbol ./symbols/FillSymbol ./symbols/SimpleFillSymbol ./symbols/PictureFillSymbol ./symbols/Font ./symbols/TextSymbol ./symbols/jsonUtils".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h){return{Symbol:m,MarkerSymbol:l,SimpleMarkerSymbol:a,PictureMarkerSymbol:f,LineSymbol:k,SimpleLineSymbol:n,CartographicLineSymbol:g,FillSymbol:p,SimpleFillSymbol:d,PictureFillSymbol:c,Font:b,TextSymbol:e,jsonUtils:h}})},"esri/renderer":function(){define("./renderers/Renderer ./renderers/SimpleRenderer ./renderers/UniqueValueRenderer ./renderers/ClassBreaksRenderer ./renderers/TemporalRenderer ./renderers/SymbolAger ./renderers/TimeClassBreaksAger ./renderers/TimeRampAger ./renderers/StretchRenderer ./renderers/jsonUtils".split(" "),
function(m,l,a,f,k,n,g,p,d,c){return{Renderer:m,SimpleRenderer:l,UniqueValueRenderer:a,ClassBreaksRenderer:f,TemporalRenderer:k,SymbolAger:n,TimeClassBreaksAger:g,TimeRampAger:p,StretchRenderer:d,jsonUtils:c}})},"esri/renderers/Renderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has dojox/gfx/_base ../kernel ../Color ../layers/support/attributeUtils ../support/expressionUtils".split(" "),function(m,l,a,f,k,n,g,p,d){var c=Math.PI;m=m(null,{declaredClass:"esri.renderer.Renderer",
constructor:function(a){this._cache={};if(a&&!a.declaredClass){this.rotationInfo=a.rotationInfo;if(!this.rotationInfo){var b=a.rotationType,c=a.rotationExpression;if(b||c)this.rotationInfo={type:b,expression:c}}this.setRotationInfo(this.rotationInfo);this.setSizeInfo(this._readSizeInfo(a.sizeInfo));this.setColorInfo(this._readColorInfo(a.colorInfo));this.setOpacityInfo(this._readOpacityInfo(a.transparencyInfo));this.setVisualVariables(this._readVariables(a.visualVariables));this.setAuthoringInfo(a.authoringInfo)}this.getSymbol=
l.hitch(this,this.getSymbol)},getSymbol:function(a){},_readSizeInfo:function(b){if(b){var c=b.minSize,d=b.maxSize;c&&(b.minSize="number"===typeof c?k.pt2px(c):this._readSizeInfo(c));d&&(b.maxSize="number"===typeof d?k.pt2px(d):this._readSizeInfo(d));b.stops&&a.forEach(b.stops,function(a){a.size&&"number"===typeof a.size&&(a.size=k.pt2px(a.size))})}return b},_readColorInfo:function(b){b&&(a.forEach(b.colors,function(a,c){l.isArray(a)&&(b.colors[c]=g.toDojoColor(a))}),a.forEach(b.stops,function(a,c){a.color&&
l.isArray(a.color)&&(b.stops[c].color=g.toDojoColor(a.color))}));return b},_readOpacityInfo:function(b){var c;b&&(c=l.mixin({},b),c.transparencyValues&&(c.opacityValues=a.map(c.transparencyValues,function(a){return 1-a/100}),delete c.transparencyValues),c.stops&&(c.stops=a.map(c.stops,function(a){a=l.mixin({},a);a.opacity=1-a.transparency/100;delete a.transparency;return a})));return c},_readVariables:function(b){b&&(b=a.map(b,function(a){"sizeInfo"===a.type?a=this._readSizeInfo(a):"colorInfo"===
a.type?a=this._readColorInfo(a):"transparencyInfo"===a.type&&(a=this._readOpacityInfo(a),a.type="opacityInfo");return a},this));return b},setAuthoringInfo:function(a){this.authoringInfo=a},setRotationInfo:function(a){if(a=this.rotationInfo="string"===typeof a?{field:a}:a){if(a.expression&&!l.isFunction(a.expression)&&!a.field){var b=a.expression.match(this.rotationRE);b&&b[1]&&(a.field=b[1])}a.rotationType=a.type}this._cache.rotationInfo=this._processRotationInfo(a);return this},rotationRE:/^\[([^\]]+)\]$/i,
_processRotationInfo:function(a){return this._createCache(a)},getRotationAngle:function(a,c){var b=this._getVarInfo(c&&c.rotationInfo,"rotationInfo"),e=b.variable,b=this._cache[b.cacheKey],d="arithmetic"===this._getRotationType(e),f=b&&b.hasExpr,g=null;if(e.field||f)g=this._getDataValue(a,e,null,b),null!=g&&(g=(g+(d?-90:0))*(d?-1:1));return g},_getRotationType:function(a){return a&&("rotationInfo"===a.type?a.rotationType:a.type)},_getDataValue:function(a,c,f,g,k){g||(g=this._getVarInfo(c,f),c=g.variable,
g=this._cache[g.cacheKey],"sizeInfo"===f&&(g=g.root));return a._getDataValue(c,g,d,k)},setVisualVariables:function(b){var c=this._cache;a.forEach(this.visualVariables,function(a,b){c.hasOwnProperty(b)&&(c[b]=null)},this);this.visualVariables=b;a.some(b,function(a){return!!a.target})&&b.sort(function(a,b){return a.target===b.target?0:a.target?1:-1});a.forEach(b,function(a,b){"colorInfo"===a.type?c[b]=this._processColorInfo(a):"opacityInfo"===a.type?c[b]=this._processOpacityInfo(a):"sizeInfo"===a.type?
c[b]=this._processSizeInfo(a):"rotationInfo"===a.type&&(c[b]=this._processRotationInfo(a))},this);return this},getVisualVariableValues:function(b){var c=this.visualVariables,d;c&&(d=a.map(c,function(a){var c;switch(a.type){case "sizeInfo":c=this.getSize(b,{sizeInfo:a});break;case "colorInfo":c=this.getColor(b,{colorInfo:a});break;case "opacityInfo":c=this.getOpacity(b,{opacityInfo:a});break;case "rotationInfo":c=this.getRotationAngle(b,{rotationInfo:a})}return{variable:a,value:c}},this));return d},
getFieldsUsedInExpressions:function(){var b=[];a.forEach(this._getCacheObjects(),function(a){a.syntaxTree&&(b=b.concat(d.extractFieldNames(a.syntaxTree)))});b.sort();return a.filter(b,function(a,c){return 0===c||b[c-1]!==a})},hasGeometryOperations:function(){return a.some(this._getCacheObjects(),function(a){return a.syntaxTree?d.hasGeometryOperations(a.syntaxTree):!1})},hasVisualVariables:function(a,c){return a?!!this.getVisualVariablesForType(a,c):!!(this.getVisualVariablesForType("sizeInfo",c)||
this.getVisualVariablesForType("colorInfo",c)||this.getVisualVariablesForType("opacityInfo",c)||this.getVisualVariablesForType("rotationInfo",c))},getVisualVariablesForType:function(b,c){var e=this.visualVariables,d;!c&&this[b]?("rotationInfo"===b&&(this[b].rotationType=this[b].type),d=[this[b]]):e&&(d=a.filter(e,function(a){return a.type===b&&("string"===typeof c?a.target===c:!1===c?!a.target:!0)}))&&0===d.length&&(d=void 0);return d},setSizeInfo:function(a){this.sizeInfo=this.proportionalSymbolInfo=
a;this._cache.sizeInfo=this._processSizeInfo(a);return this},_processSizeInfo:function(a){return a&&{root:this._createCache(a),minSize:this._createCache(a.minSize),maxSize:this._createCache(a.maxSize)}},_convertExpressionToArcade:function(a){a&&a.expression&&(a.valueExpression="$view.scale")},_getVarInfo:function(b,c){var e;b&&b.type===c?(e=a.indexOf(this.visualVariables,b),b=this.visualVariables[e]):(e=c,b=this[c]);return{variable:b,cacheKey:e}},setProportionalSymbolInfo:function(a){this.setSizeInfo(a);
return this},getSize:function(a,c){var b=this._getVarInfo(c&&c.sizeInfo,"sizeInfo"),e=b.variable,b=this._cache[b.cacheKey],d=null;if(e)var f=e.minSize,d=e.maxSize,f="object"===typeof f&&f?this._getSize(a,f,b&&b.minSize,c):f,d="object"===typeof d&&d?this._getSize(a,d,b&&b.maxSize,c):d,d=this._getSize(a,e,b&&b.root,c,[f,d]);return d},_getSize:function(a,e,d,f,g){var b=e.stops,h=0,q=d&&d.hasExpr,k=d&&d.ipData,p=d&&d.isScaleDriven,n="object"===typeof a&&!!a,l="number"===typeof a?a:null;if(e.field||p||
q){var m=f&&f.scale,q=g?g[0]:e.minSize;g=g?g[1]:e.maxSize;var r=e.minDataValue,t=e.maxDataValue,R=e.valueUnit||"unknown",D=e.valueRepresentation,H=e.scaleBy,O=f&&f.shape;p?l=m:"number"!==typeof l&&n&&(l=this._getDataValue(a,e,null,d));if(!this._isValidNumber(l))return null;if(b)q=this._lookupData(l,k),l=q[0],g=q[1],l===g?h=b[l].size:(l=b[l].size,b=b[g].size,h=l+(b-l)*q[2]);else if(null!=q&&null!=g&&null!=r&&null!=t)l<=r?h=q:l>=t?h=g:(b=(l-r)/(t-r),"area"===H&&O?(q=(l="circle"===O)?c*Math.pow(q/2,
2):q*q,b=q+b*((l?c*Math.pow(g/2,2):g*g)-q),h=l?2*Math.sqrt(b/c):Math.sqrt(b)):h=q+b*(g-q));else if("unknown"===R)null!=q&&null!=r&&(q&&r?(b=l/r,h="circle"===O?2*Math.sqrt(b*Math.pow(q/2,2)):"square"===O||"diamond"===O||"image"===O?Math.sqrt(b*Math.pow(q,2)):b*q):h=l+(q||r),h=h<q?q:h,null!=g&&h>g&&(h=g));else{b=(f&&f.resolution?f.resolution:1)*this._meterIn[R];if("area"===D)h=Math.sqrt(l/c)/b,h*=2;else if(h=l/b,"radius"===D||"distance"===D)h*=2;null!=q&&h<q&&(h=q);null!=g&&h>g&&(h=g)}}else h=b&&b[0]&&
b[0].size,null==h&&(h=e.minSize);return h=isNaN(h)?0:h},getSizeRangeAtScale:function(a,c){var b,e=this._getVarInfo(a,"sizeInfo"),d=this._cache[e.cacheKey],f={scale:c};if((a=e.variable)&&c){var e=a.minSize,g=a.maxSize,q=a.stops;q&&q.length?(e=q[0].size,d=q[q.length-1].size):(e="object"===typeof e&&e?this._getSize({},e,d&&d.minSize,f):e,d="object"===typeof g&&g?this._getSize({},g,d&&d.maxSize,f):g);if(null!=e||null!=d)e>d&&(b=d,d=e,e=b),b={minSize:e,maxSize:d}}return b},setColorInfo:function(a){this.colorInfo=
a;this._cache.colorInfo=this._processColorInfo(a);return this},_createCache:function(a,c){var b=p.createAttributeCache(a,c);b&&(b.ipData=this._interpolateData(a));return b},_getCacheObjects:function(a){var b;a=a||this._cache;var c=[];for(b in a){var d=a[b];a.hasOwnProperty(b)&&d&&"object"===typeof d&&(d.hasOwnProperty("idSource")?c.push(d):c=c.concat(this._getCacheObjects(d)))}return c},_processColorInfo:function(b){b&&(a.forEach(b.colors,function(a,c){l.isArray(a)&&(b.colors[c]=new g(a))}),a.forEach(b.stops,
function(a,c){a.color&&l.isArray(a.color)&&(b.stops[c].color=new g(a.color))}));return this._createCache(b)},getColor:function(a,c){var b=this._getVarInfo(c&&c.colorInfo,"colorInfo");return this._getColorComponent(a,b.variable,this._cache[b.cacheKey])},setOpacityInfo:function(a){this.opacityInfo=a;this._cache.opacityInfo=this._processOpacityInfo(a);return this},_processOpacityInfo:function(a){return this._createCache(a)},getOpacity:function(a,c){var b=this._getVarInfo(c&&c.opacityInfo,"opacityInfo");
return this._getColorComponent(a,b.variable,this._cache[b.cacheKey],!0)},_getColorComponent:function(a,c,d,f,g){var b="number"===typeof a?a:null,e=d&&d.hasExpr,h=d&&d.ipData,k;c&&c.field||e?("number"!==typeof b&&"object"===typeof a&&a&&(b=this._getDataValue(a,c,null,d)),this._isValidNumber(b)||(b=null),null!=b&&(k=f?this._getOpacity(b,c,h):this._getColor(b,c,h))):c&&(a=c.stops,f?(k=a&&a[0]&&a[0].opacity,null==k&&(k=c.opacityValues&&c.opacityValues[0])):k=a&&a[0]&&a[0].color||c.colors&&c.colors[0]);
g&&(g.data=b,g.value=k);return g||k},_isValidNumber:function(a){return"number"===typeof a&&!isNaN(a)&&Infinity!==a&&-Infinity!==a},_interpolateData:function(b){var c;if(b)if(b.colors||b.opacityValues){var d=(b.colors||b.opacityValues).length,f=b.minDataValue,g=(b.maxDataValue-f)/(d-1);c=[];for(b=0;b<d;b++)c[b]=f+b*g}else b.stops&&(c=a.map(b.stops,function(a){return a.value}));return c},_getOpacity:function(a,c,d){a=this._lookupData(a,d);var b;c=c||this.opacityInfo;a&&(d=a[0],b=a[1],d===b?b=this._getOpacValue(c,
d):(d=this._getOpacValue(c,d),c=this._getOpacValue(c,b),b=d+(c-d)*a[2]));return b},_getOpacValue:function(a,c){return a.opacityValues?a.opacityValues[c]:a.stops[c].opacity},_getColor:function(a,c,d){a=this._lookupData(a,d);var b;c=c||this.colorInfo;a&&(b=a[0],d=a[1],b=b===d?this._getColorObj(c,b):g.blendColors(this._getColorObj(c,b),this._getColorObj(c,d),a[2]));return b},_getColorObj:function(a,c){return a.colors?a.colors[c]:a.stops[c].color},_lookupData:function(b,c){var e;if(c){var d=0,f=c.length-
1;a.some(c,function(a,c){if(b<a)return f=c,!0;d=c;return!1});e=[d,f,(b-c[d])/(c[f]-c[d])]}return e},_meterIn:{inches:1/.0254,feet:1/.3048,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},_writeSizeInfo:function(b){if(b){b=l.mixin({},b);this._convertExpressionToArcade(b);var c=b.minSize,d=b.maxSize;c&&(b.minSize="number"===typeof c?k.px2pt(c):this._writeSizeInfo(c));d&&(b.maxSize="number"===
typeof d?k.px2pt(d):this._writeSizeInfo(d));if(c=b.legendOptions)if(b.legendOptions=l.mixin({},c),c=c.customValues)b.legendOptions.customValues=c.slice(0);b.stops&&(b.stops=a.map(b.stops,function(a){a=l.mixin({},a);a.size&&"number"===typeof a.size&&(a.size=k.px2pt(a.size));return a}))}return b},_writeColorInfo:function(b){b&&(b=l.mixin({},b),b.colors&&(b.colors=a.map(b.colors,function(a){return g.toJsonColor(a)})),b.stops&&(b.stops=a.map(b.stops,function(a){a=l.mixin({},a);a.color&&(a.color=g.toJsonColor(a.color));
return a})),b.legendOptions&&(b.legendOptions=l.mixin({},b.legendOptions)));return b},_writeOpacityInfo:function(b){var c;b&&(c=l.mixin({},b),c.opacityValues&&(c.transparencyValues=a.map(c.opacityValues,function(a){return 100*(1-a)}),delete c.opacityValues),c.stops&&(c.stops=a.map(c.stops,function(a){a=l.mixin({},a);a.transparency=100*(1-a.opacity);delete a.opacity;return a})),c.legendOptions&&(c.legendOptions=l.mixin({},c.legendOptions)));return c},toJson:function(b){var c=this.visualVariables,d=
l.clone(this.authoringInfo),f=b&&b.useLegacyRotationProperties,g=(b=(b=this.getVisualVariablesForType("rotationInfo",!1))&&b[0])&&b.field,k;b&&(b===this.rotationInfo||f)&&(k=b.expression||g&&(l.isFunction(g)?g:"["+g+"]"));c&&(c=a.map(c,function(a){"sizeInfo"===a.type?a=this._writeSizeInfo(a):"colorInfo"===a.type?a=this._writeColorInfo(a):"opacityInfo"===a.type?(a=this._writeOpacityInfo(a),a.type="transparencyInfo"):"rotationInfo"===a.type&&(a=f?null:l.mixin({},a));return a},this),c=a.filter(c,function(a){return null!=
a}));d&&a.forEach(d.visualVariables,function(a){"opacityInfo"===a.type&&(a.type="transparencyInfo")});return{rotationType:k&&(this._getRotationType(b)||"geographic"),rotationExpression:k,colorInfo:this._writeColorInfo(this.colorInfo),transparencyInfo:this._writeOpacityInfo(this.opacityInfo),sizeInfo:this._writeSizeInfo(this.sizeInfo),visualVariables:c,authoringInfo:d}}});f("extend-esri")&&l.setObject("renderer.Renderer",m,n);return m})},"esri/layers/support/attributeUtils":function(){define("dojo/_base/lang dojo/has dojox/encoding/digests/_base dojox/encoding/digests/MD5 ../../kernel ../../support/expressionUtils".split(" "),
function(m,l,a,f,k,n){var g={viewScaleRE:/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i,getAttributeId:function(g){return"string"===typeof g?f(g,a.outputTypes.Hex):null},getAttributeIdSource:function(a){if(!a)return null;var d=a.field,c=a.valueExpression,b=null;if(c)b=c;else if(m.isFunction(d))b=d.toString();else if(d){var e=(c=a.normalizationField)?"field":a.normalizationType;a=parseFloat(a.normalizationTotal);if(e)if(e=e.toLowerCase(),b=d.toLowerCase()+",norm:"+e,c)b+=","+c.toLowerCase();else if("percent-of-total"===
e){d=a;if("number"!==typeof d||isNaN(d)||Infinity===d||-Infinity===d||0===a)a=null;b+=","+a}}return b},createAttributeCache:function(a,d){if(!a)return null;var c=a.valueExpression,b=n.createSyntaxTree(c),e=g.getAttributeIdSource(a);return{attributeInfo:a,isNumeric:!d,idSource:e,id:g.getAttributeId(e),hasExpr:!!c,compiledFunc:n.createFunction(b),syntaxTree:b,isScaleDriven:!!a.expression||g.viewScaleRE.test(c),dependsOnView:b?n.dependsOnView(b):!1,dependsOnGeometry:b?n.hasGeometryOperations(b):!1,isJSFunc:m.isFunction(a.field)}}};
l("extend-esri")&&m.setObject("layers.support.attributeUtils",g,k);return g})},"dojox/encoding/digests/_base":function(){define(["dojo/_base/lang"],function(m){m=m.getObject("dojox.encoding.digests",!0);m.outputTypes={Base64:0,Hex:1,String:2,Raw:3};m.addWords=function(l,a){var f=(l&65535)+(a&65535);return(l>>16)+(a>>16)+(f>>16)<<16|f&65535};m.stringToWord=function(l){for(var a=[],f=0,k=8*l.length;f<k;f+=8)a[f>>5]|=(l.charCodeAt(f/8)&255)<<f%32;return a};m.wordToString=function(l){for(var a=[],f=0,
k=32*l.length;f<k;f+=8)a.push(String.fromCharCode(l[f>>5]>>>f%32&255));return a.join("")};m.wordToHex=function(l){for(var a=[],f=0,k=4*l.length;f<k;f++)a.push("0123456789abcdef".charAt(l[f>>2]>>f%4*8+4&15)+"0123456789abcdef".charAt(l[f>>2]>>f%4*8&15));return a.join("")};m.wordToBase64=function(l){for(var a=[],f=0,k=4*l.length;f<k;f+=3)for(var n=(l[f>>2]>>f%4*8&255)<<16|(l[f+1>>2]>>(f+1)%4*8&255)<<8|l[f+2>>2]>>(f+2)%4*8&255,g=0;4>g;g++)8*f+6*g>32*l.length?a.push("\x3d"):a.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>
6*(3-g)&63));return a.join("")};m.stringToUtf8=function(l){for(var a="",f=-1,k,n;++f<l.length;)k=l.charCodeAt(f),n=f+1<l.length?l.charCodeAt(f+1):0,55296<=k&&56319>=k&&56320<=n&&57343>=n&&(k=65536+((k&1023)<<10)+(n&1023),f++),127>=k?a+=String.fromCharCode(k):2047>=k?a+=String.fromCharCode(192|k>>>6&31,128|k&63):65535>=k?a+=String.fromCharCode(224|k>>>12&15,128|k>>>6&63,128|k&63):2097151>=k&&(a+=String.fromCharCode(240|k>>>18&7,128|k>>>12&63,128|k>>>6&63,128|k&63));return a};return m})},"dojox/encoding/digests/MD5":function(){define(["./_base"],
function(m){function l(a,d){return a<<d|a>>>32-d}function a(a,d,c,b,e,f){return m.addWords(l(m.addWords(m.addWords(d,a),m.addWords(b,f)),e),c)}function f(f,d,c,b,e,h,g){return a(d&c|~d&b,f,d,e,h,g)}function k(f,d,c,b,e,h,g){return a(d&b|c&~b,f,d,e,h,g)}function n(f,d,c,b,e,h,g){return a(c^(d|~b),f,d,e,h,g)}function g(g,d){g[d>>5]|=128<<d%32;g[(d+64>>>9<<4)+14]=d;for(var c=1732584193,b=-271733879,e=-1732584194,h=271733878,p=0;p<g.length;p+=16)var l=c,w=b,u=e,q=h,c=f(c,b,e,h,g[p+0],7,-680876936),h=
f(h,c,b,e,g[p+1],12,-389564586),e=f(e,h,c,b,g[p+2],17,606105819),b=f(b,e,h,c,g[p+3],22,-1044525330),c=f(c,b,e,h,g[p+4],7,-176418897),h=f(h,c,b,e,g[p+5],12,1200080426),e=f(e,h,c,b,g[p+6],17,-1473231341),b=f(b,e,h,c,g[p+7],22,-45705983),c=f(c,b,e,h,g[p+8],7,1770035416),h=f(h,c,b,e,g[p+9],12,-1958414417),e=f(e,h,c,b,g[p+10],17,-42063),b=f(b,e,h,c,g[p+11],22,-1990404162),c=f(c,b,e,h,g[p+12],7,1804603682),h=f(h,c,b,e,g[p+13],12,-40341101),e=f(e,h,c,b,g[p+14],17,-1502002290),b=f(b,e,h,c,g[p+15],22,1236535329),
c=k(c,b,e,h,g[p+1],5,-165796510),h=k(h,c,b,e,g[p+6],9,-1069501632),e=k(e,h,c,b,g[p+11],14,643717713),b=k(b,e,h,c,g[p+0],20,-373897302),c=k(c,b,e,h,g[p+5],5,-701558691),h=k(h,c,b,e,g[p+10],9,38016083),e=k(e,h,c,b,g[p+15],14,-660478335),b=k(b,e,h,c,g[p+4],20,-405537848),c=k(c,b,e,h,g[p+9],5,568446438),h=k(h,c,b,e,g[p+14],9,-1019803690),e=k(e,h,c,b,g[p+3],14,-187363961),b=k(b,e,h,c,g[p+8],20,1163531501),c=k(c,b,e,h,g[p+13],5,-1444681467),h=k(h,c,b,e,g[p+2],9,-51403784),e=k(e,h,c,b,g[p+7],14,1735328473),
b=k(b,e,h,c,g[p+12],20,-1926607734),c=a(b^e^h,c,b,g[p+5],4,-378558),h=a(c^b^e,h,c,g[p+8],11,-2022574463),e=a(h^c^b,e,h,g[p+11],16,1839030562),b=a(e^h^c,b,e,g[p+14],23,-35309556),c=a(b^e^h,c,b,g[p+1],4,-1530992060),h=a(c^b^e,h,c,g[p+4],11,1272893353),e=a(h^c^b,e,h,g[p+7],16,-155497632),b=a(e^h^c,b,e,g[p+10],23,-1094730640),c=a(b^e^h,c,b,g[p+13],4,681279174),h=a(c^b^e,h,c,g[p+0],11,-358537222),e=a(h^c^b,e,h,g[p+3],16,-722521979),b=a(e^h^c,b,e,g[p+6],23,76029189),c=a(b^e^h,c,b,g[p+9],4,-640364487),h=
a(c^b^e,h,c,g[p+12],11,-421815835),e=a(h^c^b,e,h,g[p+15],16,530742520),b=a(e^h^c,b,e,g[p+2],23,-995338651),c=n(c,b,e,h,g[p+0],6,-198630844),h=n(h,c,b,e,g[p+7],10,1126891415),e=n(e,h,c,b,g[p+14],15,-1416354905),b=n(b,e,h,c,g[p+5],21,-57434055),c=n(c,b,e,h,g[p+12],6,1700485571),h=n(h,c,b,e,g[p+3],10,-1894986606),e=n(e,h,c,b,g[p+10],15,-1051523),b=n(b,e,h,c,g[p+1],21,-2054922799),c=n(c,b,e,h,g[p+8],6,1873313359),h=n(h,c,b,e,g[p+15],10,-30611744),e=n(e,h,c,b,g[p+6],15,-1560198380),b=n(b,e,h,c,g[p+13],
21,1309151649),c=n(c,b,e,h,g[p+4],6,-145523070),h=n(h,c,b,e,g[p+11],10,-1120210379),e=n(e,h,c,b,g[p+2],15,718787259),b=n(b,e,h,c,g[p+9],21,-343485551),c=m.addWords(c,l),b=m.addWords(b,w),e=m.addWords(e,u),h=m.addWords(h,q);return[c,b,e,h]}m.MD5=function(a,d){var c=d||m.outputTypes.Base64,b=g(m.stringToWord(a),8*a.length);switch(c){case m.outputTypes.Raw:return b;case m.outputTypes.Hex:return m.wordToHex(b);case m.outputTypes.String:return m.wordToString(b);default:return m.wordToBase64(b)}};m.MD5._hmac=
function(a,d,c){c=c||m.outputTypes.Base64;var b=m.stringToWord(d);16<b.length&&(b=g(b,8*d.length));var e=[];d=[];for(var f=0;16>f;f++)e[f]=b[f]^909522486,d[f]=b[f]^1549556828;a=g(e.concat(m.stringToWord(a)),512+8*a.length);a=g(d.concat(a),640);switch(c){case m.outputTypes.Raw:return a;case m.outputTypes.Hex:return m.wordToHex(a);case m.outputTypes.String:return m.wordToString(a);default:return m.wordToBase64(a)}};return m.MD5})},"esri/support/expressionUtils":function(){define(["dojo/_base/lang",
"dojo/_base/array","dojo/has","../kernel","../arcade/arcade"],function(m,l,a,f,k){var n={vars:{$feature:"any",$view:"any"}},g=/^\$feature\./i,p={_getSyntaxTree:function(a,c){return"string"===typeof a?p.createSyntaxTree(a,c):a},createSyntaxTree:function(a,c){c=c||m.clone(n);var b;try{b=a?k.parseScript(a,c):null}catch(e){b=null}return b},createFunction:function(a,c){c=c||m.clone(n);var b=p._getSyntaxTree(a,c),d;try{d=b?k.compileScript(b,c):null}catch(h){d=null}return d},createExecContext:function(a,
c){return{vars:{$feature:k.constructFeature(a),$view:c&&c.view},spatialReference:c&&c.sr}},evalSyntaxTree:function(a,c){var b;try{b=k.executeScript(a,c,c.spatialReference)}catch(e){b=null}return b},executeFunction:function(a,c){var b;try{b=a?a(c,c.spatialReference):null}catch(e){b=null}return b},extractFieldNames:function(a,c){var b=p._getSyntaxTree(a,c),b=k.extractFieldLiterals(b),d=[];l.forEach(b,function(a){g.test(a)&&(a=a.replace(g,""),d.push(a))});d.sort();return l.filter(d,function(a,b){return 0===
b||d[b-1]!==a})},dependsOnView:function(a){return k.referencesMember(a,"$view")},hasGeometryOperations:function(a){return(a=p._getSyntaxTree(a))?k.scriptUsesGeometryEngine(a):!1},enableGeometryOperations:function(){return k.enableGeometrySupport()}};a("extend-esri")&&m.setObject("renderer.expressionUtils",p,f);return p})},"esri/arcade/arcade":function(){define("require exports ./arcadeRuntime ./parser ./Feature ./arcadeCompiler dojo/has dojo/Deferred".split(" "),function(m,l,a,f,k,n,g,p){Object.defineProperty(l,
"__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(" ");l.compileScript=function(c,b){return g("csp-restrictions")?function(b,d){return a.executeScript(c,b,d)}:n.compileScript(c,b)};l.extend=function(c){a.extend(c);n.extend(c)};
l.constructFeature=function(a){return k.fromFeature(a)};l.parseScript=function(a){return f.parseScript(a)};l.validateScript=function(a,b){return f.validateScript(a,b,"simple")};l.scriptCheck=function(a,b,d){return f.scriptCheck(a,b,d,"full")};l.parseAndExecuteScript=function(c,b,d){return a.executeScript(f.parseScript(c),b,d)};l.executeScript=function(c,b,d){return a.executeScript(c,b,d)};l.referencesMember=function(c,b){return a.referencesMember(c,b)};l.referencesFunction=function(c,b){return a.referencesFunction(c,
b)};l.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return f.extractFieldLiterals(a,b)};l.scriptUsesGeometryEngine=function(c){c=a.findFunctionCalls(c);for(var b=0;b<c.length;b++)if(-1<d.indexOf(c[b]))return!0;return!1};l.enableGeometrySupport=function(){var a=new p;m(["esri/geometry/geometryEngine","./functions/geomsync"],function(b,c){c.setGeometryEngine(b);a.resolve(!0)},function(b){a.reject(b)});return a.promise}})},"esri/arcade/arcadeRuntime":function(){define("require exports ../geometry/Polygon ../geometry/Polyline ../geometry/Point ../geometry/Extent ../geometry/Multipoint ../SpatialReference ./languageUtils ./treeAnalysis ./Dictionary ./Feature ./FunctionWrapper ./functions/date ./functions/string ./functions/maths ./functions/geometry ./functions/geomsync ./functions/stats ./ImmutablePathArray ./ImmutablePointArray ../geometry/Geometry".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C,y){function z(a,b){for(var c=[],d=0;d<b.arguments.length;d++)c.push(B(a,b.arguments[d]));return c}function E(a,b,c){try{return c(a,b,z(a,b))}catch(oa){throw oa;}}function B(a,f){try{switch(f.type){case "EmptyStatement":return d.voidOperation;case "VariableDeclarator":var g=null===f.init?null:B(a,f.init);g===d.voidOperation&&(g=null);var q=f.id.name.toLowerCase();null!==a.localScope?a.localScope[q]={value:g,valueset:!0,node:f.init}:a.globalScope[q]=
{value:g,valueset:!0,node:f.init};return d.voidOperation;case "VariableDeclaration":for(var k=0;k<f.declarations.length;k++)B(a,f.declarations[k]);return d.voidOperation;case "BlockStatement":var n;a:{for(var p=d.voidOperation,k=0;k<f.body.length;k++)if(p=B(a,f.body[k]),p instanceof d.ReturnResult||p===d.breakResult||p===d.continueResult){n=p;break a}n=p}return n;case "FunctionDeclaration":var l=f.id.name.toLowerCase();a.globalScope[l]={valueset:!0,node:null,value:new h(f,a)};return d.voidOperation;
case "ReturnStatement":var v;if(null===f.argument)v=new d.ReturnResult(d.voidOperation);else{var m=B(a,f.argument);v=new d.ReturnResult(m)}return v;case "IfStatement":var r;if("AssignmentExpression"===f.test.type||"UpdateExpression"===f.test.type)throw Error(c.nodeErrorMessage(f.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var x=B(a,f.test);if(!0===x)r=B(a,f.consequent);else if(!1===x)r=null!==f.alternate?B(a,f.alternate):d.voidOperation;else throw Error(c.nodeErrorMessage(f,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));
return r;case "ExpressionStatement":var t;if("AssignmentExpression"===f.expression.type||"UpdateExpression"===f.expression.type)t=B(a,f.expression);else{var w=B(a,f.expression);t=w===d.voidOperation?d.voidOperation:new d.ImplicitResult(w)}return t;case "AssignmentExpression":var u;var C=B(a,f.right),k=null,y="";if("MemberExpression"===f.left.type){k=B(a,f.left.object);y=!0===f.left.computed?B(a,f.left.property):f.left.property.name;if(d.isArray(k))if(d.isNumber(y)){0>y&&(y=k.length+y);if(0>y||y>k.length)throw Error("Assignment outside of array bounds");
if(y===k.length&&"\x3d"!==f.operator)throw Error("Invalid Parameter");k[y]=D(C,f.operator,k[y],f)}else throw Error("Invalid Parameter");else if(k instanceof b){if(!1===d.isString(y))throw Error("Dictionary accessor must be a string");if(!0===k.hasField(y))k.setField(y,D(C,f.operator,k.field(y),f));else{if("\x3d"!==f.operator)throw Error("Invalid Parameter");k.setField(y,D(C,f.operator,null,f))}}else if(k instanceof e){if(!1===d.isString(y))throw Error("Feature accessor must be a string");if(!0===
k.hasField(y))k.setField(y,D(C,f.operator,k.field(y),f));else{if("\x3d"!==f.operator)throw Error("Invalid Parameter");k.setField(y,D(C,f.operator,null,f))}}else{if(d.isImmutableArray(k))throw Error("Array is Immutable");throw Error("Invalid Parameter");}u=d.voidOperation}else if(k=f.left.name.toLowerCase(),null!==a.localScope&&void 0!==a.localScope[k])a.localScope[k]={value:D(C,f.operator,a.localScope[k].value,f),valueset:!0,node:f.right},u=d.voidOperation;else if(void 0!==a.globalScope[k])a.globalScope[k]=
{value:D(C,f.operator,a.globalScope[k].value,f),valueset:!0,node:f.right},u=d.voidOperation;else throw Error("Variable not recognised");return u;case "UpdateExpression":var Q;var P,k=null,y="";if("MemberExpression"===f.argument.type){k=B(a,f.argument.object);y=!0===f.argument.computed?B(a,f.argument.property):f.argument.property.name;if(d.isArray(k))if(d.isNumber(y)){0>y&&(y=k.length+y);if(0>y||y>=k.length)throw Error("Assignment outside of array bounds");P=d.toNumber(k[y]);k[y]="++"===f.operator?
P+1:P-1}else throw Error("Invalid Parameter");else if(k instanceof b){if(!1===d.isString(y))throw Error("Dictionary accessor must be a string");if(!0===k.hasField(y))P=d.toNumber(k.field(y)),k.setField(y,"++"===f.operator?P+1:P-1);else throw Error("Invalid Parameter");}else if(k instanceof e){if(!1===d.isString(y))throw Error("Feature accessor must be a string");if(!0===k.hasField(y))P=d.toNumber(k.field(y)),k.setField(y,"++"===f.operator?P+1:P-1);else throw Error("Invalid Parameter");}else{if(d.isImmutableArray(k))throw Error("Array is Immutable");
throw Error("Invalid Parameter");}Q=!1===f.prefix?P:"++"===f.operator?P+1:P-1}else if(k=f.argument.name.toLowerCase(),null!==a.localScope&&void 0!==a.localScope[k])P=d.toNumber(a.localScope[k].value),a.localScope[k]={value:"++"===f.operator?P+1:P-1,valueset:!0,node:f},Q=!1===f.prefix?P:"++"===f.operator?P+1:P-1;else if(void 0!==a.globalScope[k])P=d.toNumber(a.globalScope[k].value),a.globalScope[k]={value:"++"===f.operator?P+1:P-1,valueset:!0,node:f},Q=!1===f.prefix?P:"++"===f.operator?P+1:P-1;else throw Error("Variable not recognised");
return Q;case "BreakStatement":return d.breakResult;case "ContinueStatement":return d.continueResult;case "ForStatement":null!==f.init&&B(a,f.init);y={testResult:!0,lastAction:d.voidOperation};do b:{u=a;C=f;Q=y;if(null!==C.test){Q.testResult=B(u,C.test);if(!1===Q.testResult)break b;if(!0!==Q.testResult)throw Error(c.nodeErrorMessage(C,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));}Q.lastAction=B(u,C.body);Q.lastAction===d.breakResult?Q.testResult=!1:Q.lastAction instanceof d.ReturnResult?Q.testResult=
!1:null!==C.update&&B(u,C.update)}while(!0===y.testResult);k=y.lastAction instanceof d.ReturnResult?y.lastAction:d.voidOperation;return k;case "ForInStatement":return R(a,f);case "Identifier":return S(a,f);case "MemberExpression":return O(a,f);case "Literal":return f.value;case "ThisExpression":throw Error(c.nodeErrorMessage(f,"RUNTIME","NOTSUPPORTED"));case "CallExpression":return K(a,f);case "UnaryExpression":return Y(a,f);case "BinaryExpression":return T(a,f);case "LogicalExpression":return F(a,
f);case "ConditionalExpression":throw Error(c.nodeErrorMessage(f,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{for(k=[],y=0;y<f.elements.length;y++){var z=B(a,f.elements[y]);if(d.isFunctionParameter(z))throw Error(c.nodeErrorMessage(f,"RUNTIME","FUNCTIONCONTEXTILLEGAL"));z===d.voidOperation?k.push(null):k.push(z)}}catch(Ta){throw Ta;}return k;case "ObjectExpression":k={};for(y=0;y<f.properties.length;y++){var ga=B(a,f.properties[y]);if(d.isFunctionParameter(ga.value))throw Error("Illegal Argument");
if(!1===d.isString(ga.key))throw Error("Illegal Argument");k[ga.key.toString()]=ga.value===d.voidOperation?null:ga.value}var fa=new b(k);fa.immutable=!1;return fa;case "Property":return{key:"Identifier"===f.key.type?f.key.name:B(a,f.key),value:B(a,f.value)};case "Array":throw Error(c.nodeErrorMessage(f,"RUNTIME","NOTSUPPORTED"));default:throw Error(c.nodeErrorMessage(f,"RUNTIME","UNREOGNISED"));}}catch(Ta){throw Ta;}}function R(a,f){var h=B(a,f.right);"VariableDeclaration"===f.left.type&&B(a,f.left);
var g=null,q="VariableDeclaration"===f.left.type?f.left.declarations[0].id.name:f.left.name;null!==a.localScope&&void 0!==a.localScope[q]&&(g=a.localScope[q]);null===g&&void 0!==a.globalScope[q]&&(g=a.globalScope[q]);if(null===g)throw Error(c.nodeErrorMessage(f,"RUNTIME","VARIABLENOTDECLARED"));if(d.isArray(h)||d.isString(h)){for(var h=h.length,k=0;k<h&&(g.value=k,q=B(a,f.body),q!==d.breakResult);k++)if(q instanceof d.ReturnResult)return q;return d.voidOperation}if(d.isImmutableArray(h)){for(k=0;k<
h.length()&&(g.value=k,q=B(a,f.body),q!==d.breakResult);k++)if(q instanceof d.ReturnResult)return q;return d.voidOperation}if(h instanceof b||h instanceof e)for(h=h.keys(),k=0;k<h.length&&(g.value=h[k],q=B(a,f.body),q!==d.breakResult);k++){if(q instanceof d.ReturnResult)return q}else return d.voidOperation}function D(a,b,e,f){switch(b){case "\x3d":return a===d.voidOperation?null:a;case "/\x3d":return d.toNumber(e)/d.toNumber(a);case "*\x3d":return d.toNumber(e)*d.toNumber(a);case "-\x3d":return d.toNumber(e)-
d.toNumber(a);case "+\x3d":return d.isString(e)||d.isString(a)?d.toString(e)+d.toString(a):d.toNumber(e)+d.toNumber(a);case "%\x3d":return d.toNumber(e)%d.toNumber(a);default:throw Error(c.nodeErrorMessage(f,"RUNTIME","OPERATORNOTRECOGNISED"));}}function H(a,e,f,h){e=e.toLowerCase();switch(e){case "hasz":return a=a.hasZ,void 0===a?!1:a;case "hasm":return a=a.hasM,void 0===a?!1:a;case "spatialreference":return e=a.spatialReference._arcadeCacheId,void 0===e&&(f=!0,Object.freeze&&Object.isFrozen(a.spatialReference)&&
(f=!1),f&&(ja++,e=a.spatialReference._arcadeCacheId=ja)),a=new b({wkt:a.spatialReference.wkt,wkid:a.spatialReference.wkid}),void 0!==e&&(a._arcadeCacheId="SPREF"+e.toString()),a}switch(a.type){case "extent":switch(e){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return a=a[e],void 0!==a?a:null;case "type":return"Extent"}break;case "polygon":switch(e){case "rings":return e=d.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===
e&&(ja++,e=ja,d.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new v(a.rings,a.spatialReference,!0===a.hasZ,!0===a.hasM,e);case "type":return"Polygon"}break;case "point":switch(e){case "x":case "y":case "z":case "m":return void 0!==a[e]?a[e]:null;case "type":return"Point"}break;case "polyline":switch(e){case "paths":return e=d.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(ja++,e=ja,d.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",
e)),a=new v(a.paths,a.spatialReference,!0===a.hasZ,!0===a.hasM,e);case "type":return"Polyline"}break;case "multipoint":switch(e){case "points":return e=d.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(ja++,e=ja,d.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new C(a.points,a.spatialReference,!0===a.hasZ,!0===a.hasM,e,1);case "type":return"Multipoint"}}throw Error(c.nodeErrorMessage(h,"RUNTIME","PROPERTYNOTFOUND"));}function O(a,f){try{var h=
B(a,f.object);if(null===h)throw Error(c.nodeErrorMessage(f,"RUNTIME","NOTFOUND"));if(!1===f.computed){if(h instanceof b||h instanceof e)return h.field(f.property.name);if(h instanceof y)return H(h,f.property.name,a,f);throw Error(c.nodeErrorMessage(f,"RUNTIME","INVALIDTYPE"));}var g=B(a,f.property);if(h instanceof b||h instanceof e){if(d.isString(g))return h.field(g)}else if(h instanceof y){if(d.isString(g))return H(h,g,a,f)}else if(d.isArray(h)){if(d.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>
g&&(g=h.length+g);if(g>=h.length||0>g)throw Error(c.nodeErrorMessage(f,"RUNTIME","OUTOFBOUNDS"));return h[g]}}else if(d.isString(h)){if(d.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>g&&(g=h.length+g);if(g>=h.length||0>g)throw Error(c.nodeErrorMessage(f,"RUNTIME","OUTOFBOUNDS"));return h[g]}}else if(d.isImmutableArray(h)&&d.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>g&&(g=h.length()+g);if(g>=h.length()||0>g)throw Error(c.nodeErrorMessage(f,"RUNTIME","OUTOFBOUNDS"));return h.get(g)}throw Error(c.nodeErrorMessage(f,
"RUNTIME","INVALIDTYPE"));}catch(Da){throw Da;}}function Y(a,b){try{var e=B(a,b.argument);if(d.isBoolean(e)){if("!"===b.operator)return!e;if("-"===b.operator)return-1*d.toNumber(e);if("+"===b.operator)return 1*d.toNumber(e);throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===b.operator)return-1*d.toNumber(e);if("+"===b.operator)return 1*d.toNumber(e);throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}catch(oa){throw oa;}}function T(a,b){try{var e=
[B(a,b.left),B(a,b.right)],f=e[0],h=e[1];switch(b.operator){case "\x3d\x3d":return d.equalityTest(f,h);case "\x3d":return d.equalityTest(f,h);case "!\x3d":return!d.equalityTest(f,h);case "\x3c":return d.greaterThanLessThan(f,h,b.operator);case "\x3e":return d.greaterThanLessThan(f,h,b.operator);case "\x3c\x3d":return d.greaterThanLessThan(f,h,b.operator);case "\x3e\x3d":return d.greaterThanLessThan(f,h,b.operator);case "+":return d.isString(f)||d.isString(h)?d.toString(f)+d.toString(h):d.toNumber(f)+
d.toNumber(h);case "-":return d.toNumber(f)-d.toNumber(h);case "*":return d.toNumber(f)*d.toNumber(h);case "/":return d.toNumber(f)/d.toNumber(h);case "%":return d.toNumber(f)%d.toNumber(h);default:throw Error(c.nodeErrorMessage(b,"RUNTIME","OPERATORNOTRECOGNISED"));}}catch(Fa){throw Fa;}}function F(a,b){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"));var e=B(a,b.left);if(d.isBoolean(e))switch(b.operator){case "||":if(!0===e)return e;var f=B(a,b.right);if(d.isBoolean(f))return f;throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYORORAND"));case "\x26\x26":if(!1===e)return e;f=B(a,b.right);if(d.isBoolean(f))return f;throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYORORAND"));default:throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYORORAND"));
}else throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYBOOLEAN"));}catch(Da){throw Da;}}function S(a,b){var e;try{var d=b.name.toLowerCase();if(null!==a.localScope&&void 0!==a.localScope[d])return e=a.localScope[d],!0!==e.valueset&&(e.value=B(a,e.node),e.valueset=!0),e.value;if(void 0!==a.globalScope[d])return e=a.globalScope[d],!0!==e.valueset&&(e.value=B(a,e.node),e.valueset=!0),e.value;throw Error(c.nodeErrorMessage(b,"RUNTIME","VARIABLENOTFOUND"));}catch(Da){throw Da;}}function K(a,b){try{if("Identifier"!==
b.callee.type)throw Error(c.nodeErrorMessage(b,"RUNTIME","ONLYNODESSUPPORTED"));if(null!==a.localScope&&void 0!==a.localScope[b.callee.name.toLowerCase()]){var e=a.localScope[b.callee.name.toLowerCase()];if(e.value instanceof d.NativeFunction)return e.value.fn(a,b);if(e.value instanceof h)return W(a,b,e.value.definition);throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTAFUNCTION"));}if(void 0!==a.globalScope[b.callee.name.toLowerCase()]){e=a.globalScope[b.callee.name.toLowerCase()];if(e.value instanceof
d.NativeFunction)return e.value.fn(a,b);if(e.value instanceof h)return W(a,b,e.value.definition);throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTAFUNCTION"));}throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTFOUND"));}catch(oa){throw oa;}}function Z(c){return null==c?"":d.isArray(c)||d.isImmutableArray(c)?"Array":d.isDate(c)?"Date":d.isString(c)?"String":d.isBoolean(c)?"Boolean":d.isNumber(c)?"Number":c instanceof b?"Dictionary":c instanceof e?"Feature":c instanceof k?"Point":c instanceof a?"Polygon":
c instanceof f?"Polyline":c instanceof g?"Multipoint":c instanceof n?"Extent":d.isFunctionParameter(c)?"Function":c===d.voidOperation?"":"number"===typeof c&&isNaN(c)?"Number":"Unrecognised Type"}function V(a,b,c,e){try{var f=B(a,b.arguments[c]);if(d.equalityTest(f,e))return B(a,b.arguments[c+1]);var h=b.arguments.length-c;return 1===h?B(a,b.arguments[c]):2===h?null:3===h?B(a,b.arguments[c+2]):V(a,b,c+2,e)}catch(wa){throw wa;}}function G(a,b,c,e){try{if(!0===e)return B(a,b.arguments[c+1]);if(3===
b.arguments.length-c)return B(a,b.arguments[c+2]);var f=B(a,b.arguments[c+2]);if(!1===d.isBoolean(f))throw Error("WHEN needs boolean test conditions");return G(a,b,c+2,f)}catch(Fa){throw Fa;}}function ea(a,b){var c=a.length,e=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];for(var d=ea(a.slice(0,e),b),c=ea(a.slice(e,c),b),e=[];0<d.length||0<c.length;)if(0<d.length&&0<c.length){var f=b(d[0],c[0]);isNaN(f)&&(f=0);0>=f?(e.push(d[0]),d=d.slice(1)):(e.push(c[0]),c=c.slice(1))}else 0<d.length?(e.push(d[0]),
d=d.slice(1)):0<c.length&&(e.push(c[0]),c=c.slice(1));return e}function L(a,b,c){try{var e=a.body;if(c.length!==a.params.length)throw Error("Invalid Parameter calls to function.");for(var f=0;f<c.length;f++)b.localScope[a.params[f].name.toLowerCase()]={value:c[f],valueset:!0,node:null};var h=B(b,e);if(h instanceof d.ReturnResult)return h.value;if(h===d.breakResult)throw Error("Cannot Break from a Function");if(h===d.continueResult)throw Error("Cannot Continue from a Function");return h instanceof
d.ImplicitResult?h.value:h}catch(wa){throw wa;}}function W(a,b,c){return E(a,b,function(b,e,d){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 L(c,b,d)})}function ca(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 L(a.definition,b,arguments)}}function ua(a){console.log(a)}Object.defineProperty(l,"__esModule",{value:!0});var ja=0,Q={};t.registerFunctions(Q,E);r.registerFunctions(Q,E);w.registerFunctions(Q,E);u.registerFunctions(Q,E);x.registerFunctions(Q,E);q.registerFunctions(Q,
E);Q["typeof"]=function(a,b){return E(a,b,function(a,b,c){d.pcCheck(c,1,1);a=Z(c[0]);if("Unrecognised Type"===a)throw Error("Unrecognised Type");return a})};Q.iif=function(a,b){try{d.pcCheck(null===b.arguments?[]:b.arguments,3,3);var c=B(a,b.arguments[0]);if(!1===d.isBoolean(c))throw Error("IF Function must have a boolean test condition");return!0===c?B(a,b.arguments[1]):B(a,b.arguments[2])}catch(oa){throw oa;}};Q.decode=function(a,b){try{if(2>b.arguments.length)throw Error("Missing Parameters");
if(2===b.arguments.length)return B(a,b.arguments[1]);if(0===(b.arguments.length-1)%2)throw Error("Must have a default value result.");var c=B(a,b.arguments[0]);return V(a,b,1,c)}catch(oa){throw oa;}};Q.when=function(a,b){try{if(3>b.arguments.length)throw Error("Missing Parameters");if(0===b.arguments.length%2)throw Error("Must have a default value result.");var c=B(a,b.arguments[0]);if(!1===d.isBoolean(c))throw Error("WHEN needs boolean test conditions");return G(a,b,0,c)}catch(oa){throw oa;}};Q.top=
function(a,b){return E(a,b,function(a,b,c){d.pcCheck(c,2,2);if(d.isArray(c[0]))return d.toNumber(c[1])>=c[0].length?c[0].slice(0):c[0].slice(0,d.toNumber(c[1]));if(d.isImmutableArray(c[0]))return d.toNumber(c[1])>=c[0].length()?c[0].slice(0):c[0].slice(0,d.toNumber(c[1]));throw Error("Top cannot accept this parameter type");})};Q.first=function(a,b){return E(a,b,function(a,b,c){d.pcCheck(c,1,1);return d.isArray(c[0])?0===c[0].length?null:c[0][0]:d.isImmutableArray(c[0])?0===c[0].length()?null:c[0].get(0):
null})};Q.sort=function(a,b){return E(a,b,function(a,b,c){d.pcCheck(c,1,2);a=c[0];d.isImmutableArray(a)&&(a=a.toArray());if(!1===d.isArray(a))throw Error("Illegal Argument");if(1<c.length){if(!1===d.isFunctionParameter(c[1]))throw Error("Illegal Argument");var e=ca(c[1]);a=ea(a,function(a,b){return e(a,b)})}else{if(0===a.length)return[];c={};for(b=0;b<a.length;b++){var f=Z(a[b]);""!==f&&(c[f]=!0)}if(!0===c.Array||!0===c.Dictionary||!0===c.Feature||!0===c.Point||!0===c.Polygon||!0===c.Polyline||!0===
c.Multipoint||!0===c.Extent||!0===c.Function)return a.slice(0);b=0;var f="",h;for(h in c)b++,f=h;a=1<b||"String"===f?ea(a,function(a,b){if(null===a||void 0===a||a===d.voidOperation)return null===b||void 0===b||b===d.voidOperation?0:1;if(null===b||void 0===b||b===d.voidOperation)return-1;var c=d.toString(a),e=d.toString(b);return c<e?-1:c===e?0:1}):"Number"===f?ea(a,function(a,b){return a-b}):"Boolean"===f?ea(a,function(a,b){return a===b?0:b?-1:1}):"Date"===f?ea(a,function(a,b){return b-a}):a.slice(0)}return a})};
for(var P in Q)Q[P]={value:new d.NativeFunction(Q[P]),valueset:!0,node:null};var sa=function(){};sa.prototype=Q;sa.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null};sa.prototype.pi={value:Math.PI,valueset:!0,node:null};l.functionHelper={fixSpatialReference:d.fixSpatialReference,parseArguments:z,standardFunction:E};l.extend=function(a){for(var b={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:E,evaluateIdentifier:S,arcadeCustomFunctionHandler:ca},e=0;e<
a.length;e++)a[e].registerFunctions(b);for(var f in b.functions)Q[f]={value:new d.NativeFunction(b.functions[f]),valueset:!0,node:null},sa.prototype[f]=Q[f];for(e=0;e<b.signatures.length;e++)c.addFunctionDeclaration(b.signatures[e],"f")};l.executeScript=function(a,c,f){f||(f=new p(102100));var g=c.vars,q=c.customfunctions,k=new sa;g||(g={});q||(q={});var n=new b({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});n.immutable=!1;k.textformatting={value:n,valueset:!0,
node:null};for(var l in q)k[l]={value:new d.NativeFunction(q[l]),"native":!0,valueset:!0,node:null};for(l in g)k[l]=g[l]&&"esri.Graphic"===g[l].declaredClass?{value:new e(g[l]),valueset:!0,node:null}:{value:g[l],valueset:!0,node:null};a=B({spatialReference:f,globalScope:k,localScope:null,console:c.console?c.console:ua,depthCounter:1,applicationCache:void 0===c.applicationCache?null:c.applicationCache},a.body[0].body);a instanceof d.ReturnResult&&(a=a.value);a instanceof d.ImplicitResult&&(a=a.value);
a===d.voidOperation&&(a=null);if(a===d.breakResult)throw Error("Cannot return BREAK");if(a===d.continueResult)throw Error("Cannot return CONTINUE");if(a instanceof h)throw Error("Cannot return FUNCTION");if(a instanceof d.NativeFunction)throw Error("Cannot return FUNCTION");return a};l.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return c.findFieldLiterals(a,b)};l.validateScript=function(a,b){return c.validateScript(a,b,"simple")};l.referencesMember=function(a,b){return c.referencesMember(a,
b)};l.referencesFunction=function(a,b){return c.referencesFunction(a,b)};l.findFunctionCalls=function(a){return c.findFunctionCalls(a,!1)}})},"esri/arcade/treeAnalysis":function(){define(["require","exports"],function(m,l){function a(a,b,c,e){return"0"!==a.min&&c.length<Number(a.min)||"*"!==a.max&&c.length>Number(a.max)?-2:1}function f(b,c,e){if(null!==e.localScope&&void 0!==e.localScope[b.toLowerCase()]){var d=e.localScope[b.toLowerCase()];if("FormulaFunction"===d.type||"any"===d.type)return void 0===
d.signature&&(d.signature={min:"0",max:"*"}),a(d.signature,b,c,e)}return void 0!==e.globalScope[b.toLowerCase()]&&(d=e.globalScope[b.toLowerCase()],"FormulaFunction"===d.type||"any"===d.type)?(void 0===d.signature&&(d.signature={min:"0",max:"*"}),a(d.signature,b,c,e)):-1}function k(a,b){void 0===b&&(b=!0);var c=h(a,"SYNTAX","UNREOGNISED");try{switch(a.type){case "VariableDeclarator":return null!==a.init&&"FunctionExpression"===a.init.type?h(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"):"Identifier"!==
a.id.type?h(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER"):null!==a.init?k(a.init,!1):"";case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)if(c=k(a.declarations[e],b),""!==c)return c;return"";case "ForInStatement":c=k(a.left,b);if(""!==c)break;if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return h(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return h(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==a.left.type)return h(a,"SYNTAX","LEFTNOTVAR");
c=k(a.right,b);if(""!==c)break;c=k(a.body,b);if(""!==c)break;return"";case "ForStatement":if(null!==a.test&&(c=k(a.test,b),""!==c))break;if(null!==a.init&&(c=k(a.init,b),""!==c))break;if(null!==a.update&&(c=k(a.update,b),""!==c))break;if(null!==a.body&&(c=k(a.body,b),""!==c))break;return"";case "ContinueStatement":return"";case "EmptyStatement":return"";case "BreakStatement":return"";case "IfStatement":c=k(a.test,b);if(""!==c)break;if(null!==a.consequent&&(c=k(a.consequent,!1),""!==c))break;if(null!==
a.alternate&&(c=k(a.alternate,!1),""!==c))break;return"";case "BlockStatement":for(var d=[],e=0;e<a.body.length;e++)"EmptyStatement"!==a.body[e].type&&d.push(a.body[e]);a.body=d;for(e=0;e<a.body.length;e++)if(c=k(a.body[e],b),""!==c)return c;return"";case "FunctionDeclaration":return!1===b?h(a,"SYNTAX","GLOBALFUNCTIONSONLY"):"Identifier"!==a.id.type?h(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"):k(a.body,!1);case "ReturnStatement":return null!==a.argument?k(a.argument,b):"";case "UpdateExpression":return"Identifier"!==
a.argument.type&&"MemberExpression"!==a.argument.type?h(a,"SYNTAX","ASSIGNMENTTOVARSONLY"):k(a.argument,b);case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return h(a,"SYNTAX","ASSIGNMENTTOVARSONLY");c=k(a.left,b);if(""!==c)break;switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:return h(a,"SYNTAX","OPERATORNOTRECOGNISED")}return k(a.right,!1);case "ExpressionStatement":return k(a.expression,!1);
case "Identifier":c="";break;case "MemberExpression":c=k(a.object,b);if(""!==c)break;return!0===a.computed?k(a.property,b):"";case "Literal":return"";case "ThisExpression":return h(a,"SYNTAX","NOTSUPPORTED");case "CallExpression":if("Identifier"!==a.callee.type)return h(a,"SYNTAX","ONLYNODESSUPPORTED");c="";for(e=0;e<a.arguments.length;e++)if(c=k(a.arguments[e],b),""!==c)return c;return"";case "UnaryExpression":c=k(a.argument,b);break;case "BinaryExpression":c=k(a.left,b);if(""!==c)break;c=k(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 h(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "LogicalExpression":c=k(a.left,b);if(""!==c)break;c=k(a.right);if(""!==c)break;switch(a.operator){case "\x26\x26":case "||":break;default:return h(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "ConditionalExpression":return h(a,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":c=
"";for(e=0;e<a.elements.length&&(c=k(a.elements[e],b),""===c);e++);break;case "Array":return h(a,"SYNTAX","NOTSUPPORTED");case "ObjectExpression":c="";for(e=0;e<a.properties.length&&(c="",null!==a.properties[e].key&&("Literal"!==a.properties[e].key.type&&"Identifier"!==a.properties[e].key.type&&(c=h(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[e].key.type&&(d=a.properties[e].key.value,"string"===typeof d||d instanceof String||(c=h(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")))),
""===c&&(c=k(a.properties[e],b)),""===c);e++);break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return h(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(c=k(a.key,b),""!==c))break;c=k(a.value,b)}return c}catch(z){throw z;}}function n(a,e){var d=h(a,"SYNTAX","UNREOGNISED"),g=null,k="";try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type)return h(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR");a.id.name.toLowerCase();var q=null===
a.init?"":n(a.init,e);if(""!==q)return q;null===e.localScope?e.globalScope[a.id.name.toLowerCase()]={type:"any"}:e.localScope[a.id.name.toLowerCase()]={type:"any"};return"";case "FunctionDeclaration":g=c(a.id.name.toLowerCase(),a,e);k=b(a,e);if(""!==k)return k;if(null!==e.localScope)return h(a,"SYNTAX","GLOBALFUNCTIONSONLY");g.isnative=!1;e.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[g]};return"";case "VariableDeclaration":for(var d="",p=0;p<a.declarations.length&&(d=n(a.declarations[p],
e),""===d);p++);break;case "IfStatement":d=n(a.test,e);if(""!==d)break;if("AssignmentExpression"===a.test.type||"UpdateExpression"===a.test.type)return h(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");if(null!==a.consequent&&(d=n(a.consequent,e),""!==d))break;if(null!==a.alternate&&(d=n(a.alternate,e),""!==d))break;return"";case "EmptyStatement":return"";case "BlockStatement":for(p=0;p<a.body.length;p++)if(d=n(a.body[p],e),""!==d)return d;return"";case "ReturnStatement":return null!==a.argument?
n(a.argument,e):"";case "ForInStatement":if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return h(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return h(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==a.left.type)return h(a,"SYNTAX","LEFTNOTVAR");d=n(a.left,e);if(""!==d)break;d=n(a.right,e);if(""!==d)break;d=n(a.body,e);if(""!==d)break;return"";case "ForStatement":if(null!==a.init&&(d=n(a.init,e),""!==d))break;if(null!==a.test&&(d=n(a.test,e),""!==d))break;
if(null!==a.body&&(d=n(a.body,e),""!==d))break;if(null!==a.update&&(d=n(a.update,e),""!==d))break;return"";case "BreakStatement":return"";case "ContinueStatement":return"";case "UpdateExpression":if("Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type)return h(a,"SYNTAX","ASSIGNMENTTOVARSONLY");var l=!1;if("MemberExpression"===a.argument.type)return n(a.argument,e);null!==e.localScope&&void 0!==e.localScope[a.argument.name.toLowerCase()]&&(l=!0);void 0!==e.globalScope[a.argument.name.toLowerCase()]&&
(l=!0);return!1===l?"Identifier "+a.argument.name+" has not been declared.":"";case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return h(a,"SYNTAX","ASSIGNMENTTOVARSONLY");var m=n(a.right,e);if(""!==m)return m;l=!1;if("MemberExpression"===a.left.type)return m=n(a.left,e),""!==m?m:"";null!==e.localScope&&void 0!==e.localScope[a.left.name.toLowerCase()]&&(l=!0);void 0!==e.globalScope[a.left.name.toLowerCase()]&&(l=!0);return!1===l?"Identifier "+a.left.name+
" has not been declared.":"";case "ExpressionStatement":return n(a.expression,e);case "Identifier":var r=a.name.toLowerCase();if(null!==e.localScope&&void 0!==e.localScope[r])return"";d=void 0!==e.globalScope[r]?"":h(a,"SYNTAX","VARIABLENOTFOUND");break;case "MemberExpression":d=n(a.object,e);if(""!==d)break;return!0===a.computed?n(a.property,e):"";case "Literal":return"";case "ThisExpression":d=h(a,"SYNTAX","NOTSUPPORTED");break;case "CallExpression":if("Identifier"!==a.callee.type)return h(a,"SYNTAX",
"ONLYNODESSUPPORTED");d="";for(p=0;p<a.arguments.length;p++)if(d=n(a.arguments[p],e),""!==d)return d;var t=f(a.callee.name,a.arguments,e);-1===t&&(d=h(a,"SYNTAX","NOTFOUND"));-2===t&&(d=h(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":d=n(a.argument,e);break;case "BinaryExpression":d=n(a.left,e);if(""!==d)break;d=n(a.right,e);if(""!==d)break;return"";case "LogicalExpression":d=n(a.left,e);if(""!==d)break;if("AssignmentExpression"===a.left.type||"UpdateExpression"===a.left.type)return h(a.left,
"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");d=n(a.right,e);if(""!==d)break;return"AssignmentExpression"===a.right.type||"UpdateExpression"===a.right.type?h(a.right,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"):"";case "ConditionalExpression":return h(a,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":d="";for(p=0;p<a.elements.length&&(d=n(a.elements[p],e),""===d);p++);break;case "ObjectExpression":d="";for(p=0;p<a.properties.length;p++){d="";if(null!==a.properties[p].key&&("Literal"!==a.properties[p].key.type&&
"Identifier"!==a.properties[p].key.type&&(d=h(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[p].key.type)){var w=a.properties[p].key.value;"string"===typeof w||w instanceof String||(d=h(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING"))}""===d&&(d=n(a.properties[p],e));if(""!==d)break}break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return h(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(d=n(a.key,e),""!==d))break;d=n(a.value,e);break;case "Array":return h(a,
"SYNTAX","NOTSUPPORTED")}return d}catch(Y){throw Y;}}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 e=0;e<a.declarations.length;e++)if(g(a.declarations[e],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(e=0;e<a.body.length;e++)if(g(a.body[e],
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(c=g(a.right,b))?c:g(a.left,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 b.toLowerCase()===a.name.toLowerCase();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":for(e=0;e<a.arguments.length;e++)g(a.arguments[e],b)&&(c=!0);return c;case "ArrayExpression":for(e=0;e<a.elements.length;e++)g(a.elements[e],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 "ObjectExpression":for(e=0;e<a.properties.length;e++)g(a.properties[e],b)&&(c=!0);return c;case "Property":return c=g(a.value,b);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(y){throw y;}}function p(a,b){var c=!1;try{switch(a.type){case "VariableDeclarator":return null!==a.init?p(a.init,b):c;case "FunctionDeclaration":return p(a.body,
b);case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)if(p(a.declarations[e],b))return!0;return c;case "IfStatement":return p(a.test,b)||null!==a.consequent&&p(a.consequent,b)||null!==a.alternate&&p(a.alternate,b)?!0:c;case "EmptyStatement":return c;case "BlockStatement":for(e=0;e<a.body.length;e++)if(p(a.body[e],b))return!0;return c;case "ReturnStatement":return null!==a.argument?p(a.argument,b):c;case "UpdateExpression":return p(a.argument,b);case "AssignmentExpression":return p(a.left,
b)?!0:p(a.right,b);case "ExpressionStatement":return p(a.expression,b);case "ForInStatement":return(c=p(a.left,b))||(c=p(a.right,b))?c:c=p(a.body,b);case "ForStatement":if(null!==a.init&&(c=p(a.init,b))||null!==a.test&&(c=p(a.test,b))||null!==a.body&&(c=p(a.body,b)))return c;null!==a.update&&(c=p(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=p(a.object,b))return c;!0===a.computed&&
(c=p(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(e=0;e<a.arguments.length;e++)p(a.arguments[e],b)&&(c=!0);return c;case "ArrayExpression":for(e=0;e<a.elements.length;e++)p(a.elements[e],b)&&(c=!0);return c;case "UnaryExpression":return p(a.argument,b);case "BinaryExpression":return(c=p(a.left,b))?c:c=p(a.right,b);case "LogicalExpression":return(c=p(a.left,b))?c:c=p(a.right,b);case "ConditionalExpression":return c;
case "ObjectExpression":for(e=0;e<a.properties.length;e++)p(a.properties[e],b)&&(c=!0);return c;case "Property":return c=p(a.value,b);case "Array":return c;default:return c}}catch(y){throw y;}}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(z){}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(z){throw z;}}function c(a,b,c){c=[];if(void 0!==b.params&&null!==b.params)for(var e=0;e<b.params.length;e++)c.push("any");
return{name:a,"return":"any",params:c}}function b(a,b){for(var c={globalScope:b.globalScope,localScope:{}},e=0;e<a.params.length;e++)c.localScope[a.params[e].name.toLowerCase()]={type:"any"};return n(a.body,c)}function e(a,b,c,e){var d={};if(void 0===a||null===a)a={};if(void 0===c||null===c)c={};d.infinity={type:"any"};d.textformatting={type:"any"};d.pi={type:"any"};for(var f in b)if("simple"!==e||"simple"===e&&"a"===b[f].av)d[f]={type:"FormulaFunction",signature:{min:b[f].min,max:b[f].max}},"simple"!==
e&&(void 0!==b[f].fmin&&(d[f].signature.min=b[f].fmin),void 0!==b[f].fmax&&(d[f].signature.max=b[f].fmax));for(b=0;b<c.length;b++)f=c[b],d[f.name]={type:"FormulaFunction",signature:f};for(f in a)d[f]=a[f],d[f].type="any";return d}function h(a,b,c){var e="";switch(b){case "SYNTAX":e="Syntax Error: ";break;case "RUNTIME":e="Runtime Error: ";break;default:e="Syntax Error: "}try{switch(a.type){case "IfStatement":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":e+=" Assignments not be made in logical tests";
break;case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":e+=" Non Boolean used as Condition"}break;case "UpdateExpression":case "AssignmentExpression":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":e+=" Assignments not be made in logical tests";break;case "ASSIGNMENTTOVARSONLY":e+=" Assignments can only be made to identifiers"}break;case "ExpressionStatement":e+=" Assignments can only be made to identifiers";break;case "FunctionDeclaration":switch(c){case "GLOBALFUNCTIONSONLY":e+=" Functions cannot be declared as variables";
break;case "FUNCTIONMUSTHAVEIDENTIFIER":e+=" Function Definition must have an identifier"}break;case "VariableDeclaration":e+=" Only 1 variable can be declared at a time";break;case "VariableDeclarator":switch(c){case "FUNCTIONVARIABLEDECLARATOR":e+=" Functions cannot be declared as variables";break;case "VARIABLEMUSTHAVEIDENTIFIER":e+=" Variable Definition must have an identifier"}break;case "Identifier":e+=" Identifier Not Found. ";e+=a.name;break;case "ObjectExpression":switch(c){case "OBJECTPROPERTYMUSTBESTRING":e+=
" Property name must be a string"}break;case "ForStatement":switch(c){case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":e+=" Non Boolean used as Condition"}break;case "ForInStatement":switch(c){case "ONLY1VAR":e+=" Can only declare 1 var for use with IN";break;case "CANNOTDECLAREVAL":e+=" Can only declare value for use with IN";break;case "LEFTNOVAR":e+="Must provide a variable to iterate with.";break;case "VARIABLENOTDECLARED":e+="Variable must be declared before it is used..";break;case "CANNOTITERATETHISTYPE":e+=
"This type cannot be used in an IN loop"}break;case "MemberExpression":switch(c){case "PROPERTYNOTFOUND":e+="Cannot find member property. ";e+=!1===a.computed?a.property.name:"";break;case "OUTOFBOUNDS":e+="Out of Bounds. ";e+=!1===a.computed?a.property.name:"";break;case "NOTFOUND":e+="Cannot call member method on null. ";e+=!1===a.computed?a.property.name:"";break;case "INVALIDTYPE":e+="Cannot call member property on object of this type. ",e+=!1===a.computed?a.property.name:""}break;case "Property":switch(c){case "ONLYLITERAL":e+=
"Property names must be literals or identifiers"}break;case "Literal":break;case "ThisExpression":e+="THIS construct is not supported.";case "CallExpression":switch(c){case "WRONGSIGNATURE":e+="Function signature does not match: ";e+=a.callee.name;break;case "ONLYNODESUPPORTED":e+="Functions must be declared.";e+=a.callee.name;break;case "NOTAFUNCTION":e+="Not a Function: ";e+=a.callee.name;break;case "NOTFOUND":e+="Function Not Found: "+a.callee.name}break;case "UnaryExpression":switch(c){case "NOTSUPPORTEDUNARYOPERATOR":e+=
"Operator "+a.operator+" not allowed in this context. Only ! can be used with boolean, and - with a number";break;case "NOTSUPPORTEDTYPE":e+="Unary operator "+a.operator+" cannot be used with this argument."}case "BinaryExpression":switch(c){case "OPERATORNOTRECOGNISED":e+="Binary Operator not recognised "+a.operator}break;case "LogicalExpression":switch(c){case "ONLYBOOLEAN":e+="Operator "+a.operator+" cannot be used. Only || or \x26\x26 are allowed values";break;case "ONLYORORAND":e+="Logical Expression "+
a.operator+" being applied to parameters that are not boolean."}break;case "ConditionalExpression":e+="Conditional statements not supported.";break;case "ArrayExpression":switch(c){case "FUNCTIONCONTEXTILLEGAL":e+=" Cannot Put Function inside Array."}break;case "Array":e+="Expression contains unrecognised array structure.";break;default:e+="Expression contains unrecognised code structures."}}catch(y){throw y;}return e}function t(a,b,c){return{line:a.loc.start.line,character:a.loc.start.column,reason:h(a,
b,c)}}function r(a,b,c,e,d){void 0===d&&(d=!0);b={globalScope:b.globalScope,localScope:{}};for(d=0;d<a.params.length;d++)b.localScope[a.params[d].name.toLowerCase()]={type:"any"};w(a.body,b,c,e,!1)}function w(a,b,e,d,h){void 0===h&&(h=!0);if(null===a)throw Error("Unnexpexted Expression Syntax");var g=null;try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type){d.push(t(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"));break}"Identifier"!==a.id.type?d.push(t(a,"SYNTAX",
"VARIABLEMUSTHAVEIDENTIFIER")):(a.id.name.toLowerCase(),null===b.localScope?b.globalScope[a.id.name.toLowerCase()]={type:"any"}:b.localScope[a.id.name.toLowerCase()]={type:"any"});null===a.init?"":w(a.init,b,e,d,h);break;case "FunctionDeclaration":!1===h&&d.push(t(a,"SYNTAX","GLOBALFUNCTIONSONLY"));"Identifier"!==a.id.type&&d.push(t(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"));g=c("",a,b);r(a,b,e,d,h);null!==b.localScope&&d.push(t(a,"SYNTAX","GLOBALFUNCTIONSONLY"));g.isnative=!1;"Identifier"===a.id.type&&
(b.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[g]});break;case "VariableDeclaration":for(var k=0;k<a.declarations.length;k++)w(a.declarations[k],b,e,d,h);break;case "IfStatement":null!==a.test&&(w(a.test,b,e,d,h),"AssignmentExpression"!==a.test.type&&"UpdateExpression"!==a.test.type||d.push(t(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION")));null!==a.consequent&&w(a.consequent,b,e,d,h);null!==a.alternate&&w(a.alternate,b,e,d,h);break;case "EmptyStatement":break;case "BlockStatement":if(null!==
a.body)for(k=0;k<a.body.length;k++)w(a.body[k],b,e,d,h);break;case "ReturnStatement":null!==a.argument&&w(a.argument,b,e,d,h);break;case "ForInStatement":"VariableDeclaration"===a.left.type?(1<a.left.declarations.length&&d.push(t(a,"SYNTAX","ONLY1VAR")),null!==a.left.declarations[0].init&&d.push(t(a,"SYNTAX","CANNOTDECLAREVAL"))):"Identifier"!==a.left.type&&d.push(t(a,"SYNTAX","LEFTNOTVAR"));w(a.left,b,e,d,h);w(a.right,b,e,d,h);w(a.body,b,e,d,h);break;case "ForStatement":null!==a.init&&w(a.init,b,
e,d,h);null!==a.test&&w(a.test,b,e,d,h);null!==a.body&&w(a.body,b,e,d,h);null!==a.update&&w(a.update,b,e,d,h);break;case "BreakStatement":break;case "ContinueStatement":break;case "UpdateExpression":"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?d.push(t(a,"SYNTAX","ASSIGNMENTTOVARSONLY")):("Identifier"===a.argument.type&&(g=!1,!1===e&&(null!==b.localScope&&void 0!==b.localScope[a.argument.name.toLowerCase()]&&(g=!0),void 0!==b.globalScope[a.argument.name.toLowerCase()]&&(g=
!0),!1===g&&d.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+a.argument.name+" has not been declared."}))),"MemberExpression"===a.argument.type&&w(a.argument,b,e,d,h));break;case "AssignmentExpression":"Identifier"!==a.left.type&&"MemberExpression"!==a.left.type&&d.push(t(a,"SYNTAX","ASSIGNMENTTOVARSONLY"));switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:d.push(t(a,"SYNTAX","OPERATORNOTRECOGNISED"))}w(a.right,
b,e,d,h);g=!1;"Identifier"===a.left.type&&(null!==b.localScope&&void 0!==b.localScope[a.left.name.toLowerCase()]&&(g=!0),void 0!==b.globalScope[a.left.name.toLowerCase()]&&(g=!0),!1===e&&!1===g&&d.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+a.argument.name+" has not been declared."}));"MemberExpression"===a.left.type&&w(a.left,b,e,d,h);break;case "ExpressionStatement":w(a.expression,b,e,d,h);break;case "Identifier":var p=a.name.toLowerCase();
if(null!==b.localScope&&void 0!==b.localScope[p])break;void 0===b.globalScope[p]&&!1===e&&d.push(t(a,"SYNTAX","VARIABLENOTFOUND"));break;case "MemberExpression":w(a.object,b,e,d,h);!0===a.computed&&w(a.property,b,e,d,h);break;case "Literal":return"";case "ThisExpression":d.push(t(a,"SYNTAX","NOTSUPPORTED"));break;case "CallExpression":"Identifier"!==a.callee.type&&d.push(t(a,"SYNTAX","ONLYNODESSUPPORTED"));for(k=0;k<a.arguments.length;k++)w(a.arguments[k],b,e,d,h);var n=f(a.callee.name,a.arguments,
b);!1===e&&-1===n&&d.push(t(a,"SYNTAX","NOTFOUND"));-2===n&&d.push(t(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":w(a.argument,b,e,d,h);break;case "BinaryExpression":w(a.left,b,e,d,h);w(a.right,b,e,d,h);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:d.push(t(a,"SYNTAX","OPERATORNOTRECOGNISED"))}break;case "LogicalExpression":switch(a.operator){case "\x26\x26":case "||":break;
default:d.push(t(a,"SYNTAX","OPERATORNOTRECOGNISED"))}w(a.left,b,e,d,h);"AssignmentExpression"!==a.left.type&&"UpdateExpression"!==a.left.type||d.push(t(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));w(a.right,b,e,d,h);"AssignmentExpression"!==a.right.type&&"UpdateExpression"!==a.right.type||d.push(t(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));break;case "ConditionalExpression":d.push(t(a,"SYNTAX","NOTSUPPORTED"));break;case "ArrayExpression":for(k=0;k<a.elements.length;k++)w(a.elements[k],
b,e,d,h);break;case "Array":d.push(t(a,"SYNTAX","NOTSUPPORTED"));case "ObjectExpression":for(k=0;k<a.properties.length;k++)w(a.properties[k],b,e,d,h);break;case "Property":"Literal"!==a.key.type&&"Identifier"!==a.key.type&&d.push(t(a,"SYNTAX","ONLYLITERAL"));"Literal"===a.key.type&&w(a.key,b,e,d,h);w(a.value,b,e,d,h);break;default:d.push(t(a,"SYNTAX","UNRECOGNISED"))}}catch(D){d.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Unnexpected Syntax"})}}function u(a,
b){var c=[],e;try{switch(a.type){case "VariableDeclarator":return null!==a.init?u(a.init,b):c;case "FunctionDeclaration":return u(a.body,b);case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)e=u(a.declarations[d],b),c=c.concat(e);return c;case "ForInStatement":return e=u(a.left,b),c=c.concat(e),e=u(a.right,b),c=c.concat(e),e=u(a.body,b),c=c.concat(e);case "ForStatement":return null!==a.init&&(e=u(a.init,b),c=c.concat(e)),null!==a.test&&(e=u(a.test,b),c=c.concat(e)),null!==a.body&&
(e=u(a.body,b),c=c.concat(e)),null!==a.update&&(e=u(a.update,b),c=c.concat(e)),c;case "IfStatement":return e=u(a.test,b),c=c.concat(e),null!==a.consequent&&(e=u(a.consequent,b),c=c.concat(e)),null!==a.alternate&&(e=u(a.alternate,b),c=c.concat(e)),c;case "EmptyStatement":return c;case "BlockStatement":for(d=0;d<a.body.length;d++)e=u(a.body[d],b),c=c.concat(e);return c;case "ReturnStatement":return null!==a.argument?u(a.argument,b):c;case "UpdateExpression":return u(a.argument,b);case "AssignmentExpression":return c=
u(a.left,b),c=c.concat(u(a.right,b));case "ExpressionStatement":return u(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(d=0;d<a.arguments.length;d++)e=u(a.arguments[d],b),c=c.concat(e);c.push(a.callee.name.toLowerCase());return c;case "ArrayExpression":for(d=0;d<a.elements.length;d++)e=u(a.elements[d],
b),c=c.concat(e);return c;case "UnaryExpression":return u(a.argument,b);case "ObjectExpression":for(d=0;d<a.properties.length;d++)e=u(a.properties[d],b),c=c.concat(e);return c;case "Property":return u(a.value,b);case "BinaryExpression":return e=u(a.left,b),c=c.concat(e),e=u(a.right,b),c=c.concat(e);case "LogicalExpression":return e=u(a.left,b),c=c.concat(e),e=u(a.right,b),c=c.concat(e);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(z){throw z;}}Object.defineProperty(l,
"__esModule",{value:!0});l.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"}};l.addFunctionDeclaration=function(a,b){var c=l.functionDecls[a.name.toLowerCase()];void 0===c?l.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)};l.checkFunctionSignature=a;l.findFunction=f;l.validateLanguageNode=k;l.testValidityOfExpression=n;l.referencesMemberImpl=g;l.referencesMember=function(a,b){return!0===g(a.body[0].body,b.toLowerCase())?!0:!1};l.referencesFunctionImpl=p;l.referencesFunction=function(a,b){return!0===p(a.body[0].body,b)?!0:!1};l.findFieldLiteralsImpl=d;l.findFieldLiterals=function(a,b){return d(a.body[0].body,
b)};l.extractFunctionDeclaration=c;l.validateFunction=b;l.constructGlobalScope=e;l.validateScript=function(a,b,c){void 0===c&&(c="full");b={globalScope:e(b.vars,l.functionDecls,b.customFunctions,c),localScope:null};return n(a.body[0].body,b)};l.validateLanguage=function(a){return"BlockStatement"!==a.body[0].body.type?"Invalid formula content.":k(a.body[0].body)};l.nodeErrorMessage=h;l.makeError=t;l.extractAllIssuesInFunction=r;l.extractAllIssues=w;l.checkScript=function(a,b,c,d){void 0===d&&(d="full");
var f=[];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:e(b.vars,l.functionDecls,b.customFunctions,d),localScope:null};try{w(a.body[0].body,b,c,f)}catch(z){}return f};l.findFunctionCallsImpl=u;l.findFunctionCalls=function(a,b){return u(a.body[0].body,b)}})},"esri/arcade/Feature":function(){define("require exports dojo/_base/lang ../geometry/Geometry ../geometry/jsonUtils ./Dictionary ./languageUtils ./ImmutableArray ../geometry/Point".split(" "),
function(m,l,a,f,k,n,g,p,d){return function(){function c(a,e,d){this._layer=this.attributes=this.geometry=null;this.immutable=this._datesfixed=!0;a instanceof c?(this.attributes=a.attributes,this.geometry=a.geometry,a._layer&&(this._layer=a._layer)):a&&"esri.Graphic"===a.declaredClass?(this.geometry=a.geometry,this.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes,a._sourceLayer?(this._layer=a._sourceLayer,this._datesfixed=!1):a._layer?(this._layer=a._layer,this._datesfixed=
!1):a.layer&&(this._layer=a.layer,this._datesfixed=!1)):a instanceof n?(this.attributes=a.field("attributes"),null!==this.attributes&&(this.attributes=this.attributes instanceof n?this.attributes.attributes:null),this.geometry=a.field("geometry"),null!==this.geometry&&(this.geometry instanceof n?this.geometry=c.parseGeometryFromDictionary(this.geometry):this.geometry instanceof f||(this.geometry=null))):(e instanceof f||null===e?(this.geometry=e,this.attributes=void 0===a?{}:null===a?{}:a):"string"===
typeof a?(a=JSON.parse(a),null!==a.geometry&&void 0!==a.geometry&&(this.geometry=k.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))}c.prototype.castToText=function(){var a="",c;for(c in this.attributes){""!==a&&(a+=",");var d=this.attributes[c];null==d?a+=JSON.stringify(c)+":null":g.isBoolean(d)||g.isNumber(d)||g.isString(d)?a+=JSON.stringify(c)+
":"+JSON.stringify(d):d instanceof f?a+=JSON.stringify(c)+":"+g.toStringExplicit(d):d instanceof p?a+=JSON.stringify(c)+":"+g.toStringExplicit(d):d instanceof Array?a+=JSON.stringify(c)+":"+g.toStringExplicit(d):d instanceof Date?a+=JSON.stringify(c)+":"+JSON.stringify(d):null!==d&&"object"===typeof d&&void 0!==d.castToText&&(a+=JSON.stringify(c)+":"+d.castToText())}return'{"geometry":'+(null===this.geometry?"null":g.toStringExplicit(this.geometry))+',"attributes":{'+a+"}}"};c.prototype._fixDates=
function(){for(var a=[],c=0;c<this._layer.fields.length;c++){var d=this._layer.fields[c];"date"!==d.type&&"esriFieldTypeDate"!==d.type||a.push(d.name)}0<a.length&&this._fixDateFields(a);this._datesfixed=!0};c.prototype._fixDateFields=function(b){this.attributes=a.mixin({},this.attributes);for(var c=0;c<b.length;c++){var d=this.attributes[b[c]];if(null!==d)if(void 0===d)for(var f in this.attributes){if(f.toLowerCase()===b[c]){d=this.attributes[f];null===d||d instanceof Date||(this.attributes[f]=new Date(d));
break}}else d instanceof Date||(this.attributes[b[c]]=new Date(d))}};c.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");};c.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};c.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};c.prototype.setField=function(a,c){if(this.immutable)throw Error("Feature is Immutable");if(!1===g.isSimpleType(c))throw Error("Illegal Value Assignment to Feature");var b=a.toLowerCase();if(void 0===this.attributes[a])for(var e in this.attributes)if(e.toLowerCase()===
b){this.attributes[e]=c;return}this.attributes[a]=c};c.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};c.prototype.keys=function(){var a=[],c={},d;for(d in this.attributes)a.push(d),c[d.toLowerCase()]=1;if(null!==this._layer)for(d=0;d<this._layer.fields.length;d++){var f=this._layer.fields[d];1!==c[f.name.toLowerCase()]&&a.push(f.name)}return a=a.sort()};
c.fromFeature=function(a){return new c(a)};c.parseGeometryFromDictionary=function(a){a=c.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 k.fromJson(a)};c.fixPathArrays=function(a,
c,d){var b=[];if(a instanceof Array)for(var e=0;e<a.length;e++)b.push(this.fixPointArrays(a[e],c,d));else if(a instanceof p)for(e=0;e<a.length();e++)b.push(this.fixPointArrays(a.get(e),c,d));return b};c.fixPointArrays=function(a,c,f){var b=[];if(a instanceof Array)for(var e=0;e<a.length;e++){var h=a[e];h instanceof d?c&&f?b.push([h.x,h.y,h.z,h.m]):c?b.push([h.x,h.y,h.z]):f?b.push([h.x,h.y,h.m]):b.push([h.x,h.y]):b.push(h)}else if(a instanceof p)for(e=0;e<a.length();e++)h=a.get(e),h instanceof d?c&&
f?b.push([h.x,h.y,h.z,h.m]):c?b.push([h.x,h.y,h.z]):f?b.push([h.x,h.y,h.m]):b.push([h.x,h.y]):b.push(h);return b};c.convertDictionaryToJson=function(a,e){void 0===e&&(e=!1);var b={},d;for(d in a.attributes){var f=a.attributes[d];f instanceof n&&(f=c.convertDictionaryToJson(f));e?b[d.toLowerCase()]=f:b[d]=f}return b};c.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};c.fromJson=
function(a){var b=null;null!==a.geometry&&void 0!==a.geometry&&(b=k.fromJson(a.geometry));var d={};if(null!==a.attributes&&void 0!==a.attributes)for(var f in a.attributes){var p=a.attributes[f];if(g.isString(p)||g.isNumber(p)||g.isBoolean(p)||g.isDate(p))d[f]=p;else throw Error("Illegal Argument");}return new c(d,b)};c.prototype.domainValueLookup=function(a,c,d){if(null===this._layer||!this._layer.fields)return null;d=g.getDomain(a,this._layer,this,d);if(void 0===c)try{c=this.field(a)}catch(t){return null}return g.getDomainValue(d,
c)};c.prototype.domainCodeLookup=function(a,c,d){if(null===this._layer||!this._layer.fields)return null;a=g.getDomain(a,this._layer,this,d);return g.getDomainCode(a,c)};return c}()})},"esri/arcade/functions/date":function(){define(["require","exports","../../moment","../languageUtils"],function(m,l,a,f){function k(a){return null===a?a:isNaN(a.getTime())?null:a}Object.defineProperty(l,"__esModule",{value:!0});l.registerFunctions=function(n,g){n.today=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,
0,0);a=new Date;a.setHours(0,0,0,0);return a})};n.now=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,0,0);return new Date})};n.timestamp=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,0,0);a=new Date;return a=new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())})};n.toutc=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?null:new Date(a.getUTCFullYear(),a.getUTCMonth(),
a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())})};n.tolocal=function(k,d){return g(k,d,function(c,b,e){f.pcCheck(e,1,1);c=f.toDate(e[0]);return null===c?null:a.utc([c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds()]).toDate()})};n.day=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?NaN:a.getDate()})};n.month=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,
1,1);a=f.toDate(e[0]);return null===a?NaN:a.getMonth()})};n.year=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?NaN:a.getFullYear()})};n.hour=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?NaN:a.getHours()})};n.second=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?NaN:a.getSeconds()})};n.millisecond=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=
f.toDate(e[0]);return null===a?NaN:a.getMilliseconds()})};n.minute=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?NaN:a.getMinutes()})};n.weekday=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,1,1);a=f.toDate(e[0]);return null===a?NaN:a.getDay()})};n.date=function(p,d){return g(p,d,function(c,b,e){f.pcCheck(e,0,7);if(3===e.length)return k(new Date(f.toNumber(e[0]),f.toNumber(e[1]),f.toNumber(e[2]),0,0,0,0));if(4===e.length)return k(new Date(f.toNumber(e[0]),
f.toNumber(e[1]),f.toNumber(e[2]),f.toNumber(e[3]),0,0,0));if(5===e.length)return k(new Date(f.toNumber(e[0]),f.toNumber(e[1]),f.toNumber(e[2]),f.toNumber(e[3]),f.toNumber(e[4]),0,0));if(6===e.length)return k(new Date(f.toNumber(e[0]),f.toNumber(e[1]),f.toNumber(e[2]),f.toNumber(e[3]),f.toNumber(e[4]),f.toNumber(e[5]),0));if(7===e.length)return k(new Date(f.toNumber(e[0]),f.toNumber(e[1]),f.toNumber(e[2]),f.toNumber(e[3]),f.toNumber(e[4]),f.toNumber(e[5]),f.toNumber(e[6])));if(2===e.length){c=f.toString(e[1]);
if(""===c)return null;c=f.standardiseDateFormat(c);e=a(f.toString(e[0]),c,!0);return!0===e.isValid()?e.toDate():null}if(1===e.length){if(f.isString(e[0])&&""===e[0].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;c=f.toNumber(e[0]);return!1===isNaN(c)?k(new Date(c)):f.toDate(e[0])}if(0===e.length)return new Date})};n.datediff=function(a,d){return g(a,d,function(a,b,e){f.pcCheck(e,2,3);a=f.toDateM(e[0]);b=f.toDateM(e[1]);if(null===a||null===b)return NaN;switch(f.toString(e[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"===e[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)}})};n.dateadd=function(a,d){return g(a,d,function(a,
b,e){f.pcCheck(e,2,3);a=f.toDateM(e[0]);if(null===a)return null;b="milliseconds";switch(f.toString(e[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"===e[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(f.toNumber(e[1]),b);return a.toDate()})}}})},"esri/arcade/functions/string":function(){define(["require","exports","../languageUtils","../Feature"],function(m,l,a,f){Object.defineProperty(l,"__esModule",{value:!0});l.registerFunctions=function(k,n){k.trim=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,1,1);return a.toString(b[0]).trim()})};k.upper=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,1,1);return a.toString(b[0]).toUpperCase()})};k.proper=function(f,k){return n(f,
k,function(d,c,b){a.pcCheck(b,1,2);d=1;2===b.length&&"firstword"===a.toString(b[1]).toLowerCase()&&(d=2);c=/\s/;b=a.toString(b[0]);for(var e="",f=!0,g=0;g<b.length;g++){var k=b[g];c.test(k)?1===d&&(f=!0):k.toUpperCase()!==k.toLowerCase()&&(f?(k=k.toUpperCase(),f=!1):k=k.toLowerCase());e+=k}return e})};k.lower=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,1,1);return a.toString(b[0]).toLowerCase()})};k.guid=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,0,1);if(0<b.length)switch(a.toString(b[0]).toLowerCase()){case "digits":return a.generateUUID().replace("-",
"").replace("-","").replace("-","").replace("-","");case "digits-hyphen":return a.generateUUID();case "digits-hyphen-parentheses":return"("+a.generateUUID()+")"}return"{"+a.generateUUID()+"}"})};k.console=function(f,k){return n(f,k,function(d,c,b){0!==b.length&&(1===b.length?f.console(a.toString(b[0])):f.console(a.toString(b)));return a.voidOperation})};k.mid=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,2,3);d=a.toNumber(b[1]);if(isNaN(d))return"";0>d&&(d=0);if(2===b.length)return a.toString(b[0]).substr(d);
c=a.toNumber(b[2]);if(isNaN(c))return"";0>c&&(c=0);return a.toString(b[0]).substr(d,c)})};k.find=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,2,3);d=0;if(2<b.length){d=a.toNumber(a.defaultUndefined(b[2],0));if(isNaN(d))return-1;0>d&&(d=0)}return a.toString(b[1]).indexOf(a.toString(b[0]),d)})};k.left=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,2,2);d=a.toNumber(b[1]);if(isNaN(d))return"";0>d&&(d=0);return a.toString(b[0]).substr(0,d)})};k.right=function(f,k){return n(f,k,function(d,
c,b){a.pcCheck(b,2,2);d=a.toNumber(b[1]);if(isNaN(d))return"";0>d&&(d=0);return a.toString(b[0]).substr(-1*d,d)})};k.split=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,2,4);d=a.toNumber(a.defaultUndefined(b[2],-1));c=a.toBoolean(a.defaultUndefined(b[3],!1));-1===d||null===d||!0===c?b=a.toString(b[0]).split(a.toString(b[1])):(isNaN(d)&&(d=-1),-1>d&&(d=-1),b=a.toString(b[0]).split(a.toString(b[1]),d));if(!1===c)return b;c=[];for(var e=0;e<b.length&&!(-1!==d&&c.length>=d);e++)""!==b[e]&&void 0!==
b[e]&&c.push(b[e]);return c})};k.text=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,1,2);return a.toStringExplicit(b[0],b[1])})};k.concatenate=function(f,k){return n(f,k,function(d,c,b){d=[];if(1>b.length)return"";if(a.isArray(b[0])){c=a.defaultUndefined(b[2],"");for(var e=0;e<b[0].length;e++)d[e]=a.toStringExplicit(b[0][e],c);return 1<b.length?d.join(b[1]):d.join("")}if(a.isImmutableArray(b[0])){c=a.defaultUndefined(b[2],"");for(e=0;e<b[0].length();e++)d[e]=a.toStringExplicit(b[0].get(e),
c);return 1<b.length?d.join(b[1]):d.join("")}for(e=0;e<b.length;e++)d[e]=a.toStringExplicit(b[e]);return d.join("")})};k.reverse=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,1,1);if(a.isArray(b[0]))return d=b[0].slice(0),d.reverse(),d;if(a.isImmutableArray(b[0]))return d=b[0].toArray().slice(0),d.reverse(),d;throw Error("Invalid Parameter");})};k.replace=function(f,k){return n(f,k,function(d,c,b){a.pcCheck(b,3,4);d=a.toString(b[0]);c=a.toString(b[1]);var e=a.toString(b[2]);return(4===b.length?
a.toBoolean(b[3]):1)?a.multiReplace(d,c,e):d.replace(c,e)})};k.domainname=function(g,k){return n(g,k,function(d,c,b){a.pcCheck(b,2,4);if(b[0]instanceof f)return b[0].domainValueLookup(a.toString(b[1]),b[2],void 0===b[3]?void 0:a.toNumber(b[3]));throw Error("Invalid Parameter");})};k.domaincode=function(g,k){return n(g,k,function(d,c,b){a.pcCheck(b,3,4);if(b[0]instanceof f)return b[0].domainCodeLookup(a.toString(b[1]),b[2],void 0===b[3]?void 0:a.toNumber(b[3]));throw Error("Invalid Parameter");})}}})},
"esri/arcade/functions/maths":function(){define(["require","exports","../languageUtils","dojo/number"],function(m,l,a,f){function k(a,f,k){if("undefined"===typeof k||0===+k)return Math[a](f);f=+f;k=+k;if(isNaN(f)||"number"!==typeof k||0!==k%1)return NaN;f=f.toString().split("e");f=Math[a](+(f[0]+"e"+(f[1]?+f[1]-k:-k)));f=f.toString().split("e");return+(f[0]+"e"+(f[1]?+f[1]+k:k))}Object.defineProperty(l,"__esModule",{value:!0});l.registerFunctions=function(n,g){function p(d,c,b){d=a.toNumber(d);return isNaN(d)?
d:isNaN(c)||isNaN(b)||c>b?NaN:d<c?c:d>b?b:d}n.number=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,2);b=d[0];return a.isNumber(b)?b:null===b?0:a.isDate(b)||a.isBoolean(b)?Number(b):a.isArray(b)?NaN:""===b||void 0===b?Number(b):a.isString(b)?void 0!==d[1]?(d=a.multiReplace(d[1],"\u2030",""),d=a.multiReplace(d,"\u00a4",""),f.parse(b,{pattern:d})):Number(b.trim()):Number(b)})};n.abs=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.abs(a.toNumber(d[0]))})};n.acos=function(d,
c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.acos(a.toNumber(d[0]))})};n.asin=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.asin(a.toNumber(d[0]))})};n.atan=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.atan(a.toNumber(d[0]))})};n.atan2=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,2,2);return Math.atan2(a.toNumber(d[0]),a.toNumber(d[1]))})};n.ceil=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,2);return 2===d.length?
(b=a.toNumber(d[1]),isNaN(b)&&(b=0),k("ceil",a.toNumber(d[0]),-1*b)):Math.ceil(a.toNumber(d[0]))})};n.round=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,2);return 2===d.length?(b=a.toNumber(d[1]),isNaN(b)&&(b=0),k("round",a.toNumber(d[0]),-1*b)):Math.round(a.toNumber(d[0]))})};n.floor=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,2);return 2===d.length?(b=a.toNumber(d[1]),isNaN(b)&&(b=0),k("floor",a.toNumber(d[0]),-1*b)):Math.floor(a.toNumber(d[0]))})};n.cos=function(d,c){return g(d,
c,function(b,c,d){a.pcCheck(d,1,1);return Math.cos(a.toNumber(d[0]))})};n.isnan=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return"number"===typeof d[0]&&isNaN(d[0])})};n.exp=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.exp(a.toNumber(d[0]))})};n.log=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.log(a.toNumber(d[0]))})};n.pow=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,2,2);return Math.pow(a.toNumber(d[0]),a.toNumber(d[1]))})};
n.random=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,0,0);return Math.random()})};n.sin=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.sin(a.toNumber(d[0]))})};n.sqrt=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.sqrt(a.toNumber(d[0]))})};n.tan=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return Math.tan(a.toNumber(d[0]))})};n.defaultvalue=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,2,2);return null===d[0]||""===
d[0]||void 0===d[0]?d[1]:d[0]})};n.isempty=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return null===d[0]||""===d[0]||void 0===d[0]?!0:!1})};n["boolean"]=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,1,1);return a.toBoolean(d[0])})};n.constrain=function(d,c){return g(d,c,function(b,c,d){a.pcCheck(d,3,3);b=a.toNumber(d[1]);c=a.toNumber(d[2]);if(a.isArray(d[0])){var e=[],f=0;for(d=d[0];f<d.length;f++)e.push(p(d[f],b,c));return e}if(a.isImmutableArray(d[0])){e=[];for(f=0;f<d[0].length();f++)e.push(p(d[0].get(f),
b,c));return e}return p(d[0],b,c)})}}})},"esri/arcade/functions/geometry":function(){define("require exports ../../geometry/Geometry ../../geometry/Polygon ../../geometry/Polyline ../../geometry/Point ../../geometry/Extent ../../geometry/Multipoint ../../geometry/jsonUtils ../languageUtils ../Dictionary ../Feature".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e){Object.defineProperty(l,"__esModule",{value:!0});l.registerFunctions=function(h,l){h.polygon=function(a,g){return l(a,g,function(g,h,k){c.pcCheck(k,
1,1);g=null;if(k[0]instanceof b){if(g=c.fixSpatialReference(e.parseGeometryFromDictionary(k[0]),a.spatialReference),!1===g instanceof f)throw Error("Illegal Parameter");}else g=k[0]instanceof f?d.fromJson(k[0].toJson()):c.fixSpatialReference(new f(JSON.parse(k[0])),a.spatialReference);if(null!==g&&!1===g.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return c.fixNullGeometry(g)})};h.polyline=
function(a,f){return l(a,f,function(f,g,h){c.pcCheck(h,1,1);f=null;if(h[0]instanceof b){if(f=c.fixSpatialReference(e.parseGeometryFromDictionary(h[0]),a.spatialReference),!1===f instanceof k)throw Error("Illegal Parameter");}else f=h[0]instanceof k?d.fromJson(h[0].toJson()):c.fixSpatialReference(new k(JSON.parse(h[0])),a.spatialReference);if(null!==f&&!1===f.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return c.fixNullGeometry(f)})};h.point=function(a,f){return l(a,f,function(f,g,h){c.pcCheck(h,1,1);f=null;if(h[0]instanceof b){if(f=c.fixSpatialReference(e.parseGeometryFromDictionary(h[0]),a.spatialReference),!1===f instanceof n)throw Error("Illegal Parameter");}else f=h[0]instanceof n?d.fromJson(h[0].toJson()):c.fixSpatialReference(new n(JSON.parse(h[0])),a.spatialReference);if(null!==f&&!1===f.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return c.fixNullGeometry(f)})};h.multipoint=function(a,f){return l(a,f,function(f,g,h){c.pcCheck(h,1,1);f=null;if(h[0]instanceof b){if(f=c.fixSpatialReference(e.parseGeometryFromDictionary(h[0]),a.spatialReference),!1===f instanceof p)throw Error("Illegal Parameter");}else f=h[0]instanceof p?d.fromJson(h[0].toJson()):c.fixSpatialReference(new p(JSON.parse(h[0])),a.spatialReference);if(null!==f&&!1===f.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return c.fixNullGeometry(f)})};h.extent=function(a,h){return l(a,h,function(h,l,m){c.pcCheck(m,1,1);h=null;m[0]instanceof b?h=c.fixSpatialReference(e.parseGeometryFromDictionary(m[0]),a.spatialReference):m[0]instanceof n?(h={xmin:m[0].x,ymin:m[0].y,xmax:m[0].x,ymax:m[0].y,spatialReference:m[0].spatialReference.toJson()},m[0].hasZ?(h.zmin=m[0].z,h.zmax=m[0].z):m[0].hasM&&(h.mmin=m[0].m,h.mmax=m[0].m),h=d.fromJson(h)):h=m[0]instanceof f?d.fromJson(m[0].getExtent().toJson()):m[0]instanceof k?d.fromJson(m[0].getExtent().toJson()):
m[0]instanceof p?d.fromJson(m[0].getExtent().toJson()):m[0]instanceof g?d.fromJson(m[0].toJson()):c.fixSpatialReference(new g(JSON.parse(m[0])),a.spatialReference);if(null!==h&&!1===h.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return c.fixNullGeometry(h)})};h.geometry=function(a,f){return l(a,f,function(f,h,g){c.pcCheck(g,1,1);f=null;f=g[0]instanceof e?c.fixSpatialReference(g[0].geometry,
a.spatialReference):g[0]instanceof b?c.fixSpatialReference(e.parseGeometryFromDictionary(g[0]),a.spatialReference):c.fixSpatialReference(d.fromJson(JSON.parse(g[0])),a.spatialReference);if(null!==f&&!1===f.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return c.fixNullGeometry(f)})};h.setgeometry=function(b,d){return l(b,d,function(b,d,f){c.pcCheck(f,2,2);if(f[0]instanceof e){if(!0===f[0].immutable)throw Error("Feature is Immutable");
if(f[1]instanceof a||null===f[1])f[0].geometry=f[1];else throw Error("Illegal Argument");}else throw Error("Illegal Argument");return c.voidOperation})};h.feature=function(d,f){return l(d,f,function(f,h,g){if(0===g.length)throw Error("Missing Parameters");f=null;if(1===g.length)if(c.isString(g[0]))f=e.fromJson(JSON.parse(g[0]));else if(g[0]instanceof e)f=new e(g[0]);else if(g[0]instanceof a)f=new e(null,g[0]);else if(g[0]instanceof b)f=g[0].hasField("geometry")?g[0].field("geometry"):null,h=g[0].hasField("attributes")?
g[0].field("attributes"):null,null!==f&&f instanceof b&&(f=e.parseGeometryFromDictionary(f)),null!==h&&(h=e.parseAttributesFromDictionary(h)),f=new e(h,f);else throw Error("Illegal Argument");else{if(2===g.length){h=f=null;if(null!==g[0])if(g[0]instanceof a)f=g[0];else if(f instanceof b)f=e.parseGeometryFromDictionary(g[0]);else throw Error("Illegal Argument");if(null!==g[1])if(g[1]instanceof b)h=e.parseAttributesFromDictionary(g[1]);else throw Error("Illegal Argument");}else{f=null;h={};if(null!==
g[0])if(g[0]instanceof a)f=g[0];else if(f instanceof b)f=e.parseGeometryFromDictionary(g[0]);else throw Error("Illegal Argument");for(var k=1;k<g.length;k+=2){var n=c.toString(g[k]),p=g[k+1];if(null===p||void 0===p||c.isString(p)||isNaN(p)||c.isDate(p)||c.isNumber(p)||c.isBoolean(p)){if(c.isFunctionParameter(p)||!1===c.isSimpleType(p))throw Error("Illegal Argument");h[n]=p===c.voidOperation?null:p}else throw Error("Illegal Argument");}}f=new e(h,f)}f.geometry=c.fixSpatialReference(f.geometry,d.spatialReference);
f.immutable=!1;return f})};h.dictionary=function(a,d){return l(a,d,function(a,d,e){if(0===e.length)throw Error("Missing Parameters");if(0!==e.length%2)throw Error("Missing Parameters");a={};for(d=0;d<e.length;d+=2){var f=c.toString(e[d]),g=e[d+1];if(null===g||void 0===g||c.isString(g)||isNaN(g)||c.isDate(g)||c.isNumber(g)||c.isBoolean(g)||c.isArray(g)||c.isImmutableArray(g)){if(c.isFunctionParameter(g))throw Error("Illegal Argument");a[f]=g===c.voidOperation?null:g}else throw Error("Illegal Argument");
}e=new b(a);e.immutable=!1;return e})};h.haskey=function(a,d){return l(a,d,function(a,d,f){c.pcCheck(f,2,2);a=c.toString(f[1]);if(f[0]instanceof e||f[0]instanceof b)return f[0].hasField(a);throw Error("Illegal Argument");})};h.indexof=function(a,b){return l(a,b,function(a,b,d){c.pcCheck(d,2,2);a=d[1];if(c.isArray(d[0])){for(b=0;b<d[0].length;b++)if(c.equalityTest(a,d[0][b]))return b;return-1}if(c.isImmutableArray(d[0])){var e=d[0].length();for(b=0;b<e;b++)if(c.equalityTest(a,d[0].get(b)))return b;
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/jsonUtils ./centroid ../languageUtils ../kernel ../../kernel".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e,h){function t(a){return u?a.clone():d.fromJson(a.toJson())}function r(a){return 0===h.version.indexOf("4.")?f.fromExtent(a):
new f({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(l,"__esModule",{value:!0});var w=null,u=0===h.version.indexOf("4.");l.setGeometryEngine=function(a){w=a};l.registerFunctions=function(h,l){function m(c){b.pcCheck(c,2,2);if(!(c[0]instanceof a&&c[1]instanceof a||c[0]instanceof a&&null===c[1]||c[1]instanceof a&&null===c[0]||null===c[0]&&null===c[1]))throw Error("Illegal Argument");}h.disjoint=function(a,
b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!0:w.disjoint(c[0],c[1])})};h.intersects=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:w.intersects(c[0],c[1])})};h.touches=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:w.touches(c[0],c[1])})};h.crosses=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:w.crosses(c[0],c[1])})};h.within=function(a,b){return l(a,b,function(a,
b,c){m(c);return null===c[0]||null===c[1]?!1:w.within(c[0],c[1])})};h.contains=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:w.contains(c[0],c[1])})};h.overlaps=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:w.overlaps(c[0],c[1])})};h.equals=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,2,2);return e[0]===e[1]?!0:e[0]instanceof a&&e[1]instanceof a?w.equals(e[0],e[1]):b.isDate(e[0])&&b.isDate(e[1])?e[0].getTime()===e[1].getTime():
!1})};h.relate=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,3,3);if(e[0]instanceof a&&e[1]instanceof a)return w.relate(e[0],e[1],b.toString(e[2]));if(e[0]instanceof a&&null===e[1]||e[1]instanceof a&&null===e[0]||null===e[0]&&null===e[1])return!1;throw Error("Illegal Argument");})};h.intersection=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?null:w.intersect(c[0],c[1])})};h.union=function(c,d){return l(c,d,function(d,e,f){d=[];if(0===f.length)throw Error("Function called with wrong number of Parameters");
if(1===f.length)if(b.isArray(f[0]))for(e=0;e<f[0].length;e++){if(null!==f[0][e])if(f[0][e]instanceof a)d.push(f[0][e]);else throw Error("Illegal Argument");}else if(b.isImmutableArray(f[0]))for(f=f[0].toArray(),e=0;e<f.length;e++){if(null!==f[e])if(f[e]instanceof a)d.push(f[e]);else throw Error("Illegal Argument");}else{if(f[0]instanceof a)return b.fixSpatialReference(t(f[0]),c.spatialReference);if(null===f[0])return null;throw Error("Illegal Argument");}else for(e=0;e<f.length;e++)if(null!==f[e])if(f[e]instanceof
a)d.push(f[e]);else throw Error("Illegal Argument");return 0===d.length?null:w.union(d)})};h.difference=function(a,b){return l(a,b,function(a,b,c){m(c);return null!==c[0]&&null===c[1]?t(c[0]):null===c[0]?null:w.difference(c[0],c[1])})};h.symmetricdifference=function(a,b){return l(a,b,function(a,b,c){m(c);return null===c[0]&&null===c[1]?null:null===c[0]?t(c[1]):null===c[1]?t(c[0]):w.symmetricDifference(c[0],c[1])})};h.clip=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,2,2);if(!(e[1]instanceof
g)&&null!==e[1])throw Error("Illegal Argument");if(null===e[0])return null;if(!(e[0]instanceof a))throw Error("Illegal Argument");return null===e[1]?null:w.clip(e[0],e[1])})};h.cut=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,2,2);if(!(e[1]instanceof k)&&null!==e[1])throw Error("Illegal Argument");if(null===e[0])return[];if(!(e[0]instanceof a))throw Error("Illegal Argument");return null===e[1]?[t(e[0])]:w.cut(e[0],e[1])})};h.area=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,1,
2);if(null===f[0])return 0;if(!(f[0]instanceof a))throw Error("Illegal Argument");return w.planarArea(f[0],e.convertSquareUnitsToCode(b.defaultUndefined(f[1],-1)))})};h.areageodetic=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,1,2);if(null===f[0])return 0;if(!(f[0]instanceof a))throw Error("Illegal Argument");return w.geodesicArea(f[0],e.convertSquareUnitsToCode(b.defaultUndefined(f[1],-1)))})};h.length=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,1,2);if(null===f[0])return 0;
if(!(f[0]instanceof a))throw Error("Illegal Argument");return w.planarLength(f[0],e.convertLinearUnitsToCode(b.defaultUndefined(f[1],-1)))})};h.lengthgeodetic=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,1,2);if(null===f[0])return 0;if(!(f[0]instanceof a))throw Error("Illegal Argument");return w.geodesicLength(f[0],e.convertLinearUnitsToCode(b.defaultUndefined(f[1],-1)))})};h.distance=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,2,3);if(!(f[0]instanceof a))throw Error("Illegal Argument");
if(!(f[1]instanceof a))throw Error("Illegal Argument");return w.distance(f[0],f[1],e.convertLinearUnitsToCode(b.defaultUndefined(f[2],-1)))})};h.densify=function(c,d){return l(c,d,function(c,d,h){b.pcCheck(h,2,3);if(null===h[0])return null;if(!(h[0]instanceof a))throw Error("Illegal Argument");c=b.toNumber(h[1]);if(isNaN(c))throw Error("Illegal Argument");if(0>=c)throw Error("Illegal Argument");return h[0]instanceof f||h[0]instanceof k?w.densify(h[0],c,e.convertLinearUnitsToCode(b.defaultUndefined(h[2],
-1))):h[0]instanceof g?w.densify(r(h[0]),c,e.convertLinearUnitsToCode(b.defaultUndefined(h[2],-1))):h[0]})};h.densifygeodetic=function(c,d){return l(c,d,function(c,d,h){b.pcCheck(h,2,3);if(null===h[0])return null;if(!(h[0]instanceof a))throw Error("Illegal Argument");c=b.toNumber(h[1]);if(isNaN(c))throw Error("Illegal Argument");if(0>=c)throw Error("Illegal Argument");return h[0]instanceof f||h[0]instanceof k?w.geodesicDensify(h[0],c,e.convertLinearUnitsToCode(b.defaultUndefined(h[2],-1))):h[0]instanceof
g?w.geodesicDensify(r(h[0]),c,e.convertLinearUnitsToCode(b.defaultUndefined(h[2],-1))):h[0]})};h.generalize=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,2,4);if(null===f[0])return null;if(!(f[0]instanceof a))throw Error("Illegal Argument");c=b.toNumber(f[1]);if(isNaN(c))throw Error("Illegal Argument");return w.generalize(f[0],c,b.toBoolean(b.defaultUndefined(f[2],!0)),e.convertLinearUnitsToCode(b.defaultUndefined(f[3],-1)))})};h.buffer=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,
2,3);if(null===f[0])return null;if(!(f[0]instanceof a))throw Error("Illegal Argument");c=b.toNumber(f[1]);if(isNaN(c))throw Error("Illegal Argument");return 0===c?t(f[0]):w.buffer(f[0],c,e.convertLinearUnitsToCode(b.defaultUndefined(f[2],-1)))})};h.buffergeodetic=function(c,d){return l(c,d,function(c,d,f){b.pcCheck(f,2,3);if(null===f[0])return null;if(!(f[0]instanceof a))throw Error("Illegal Argument");c=b.toNumber(f[1]);if(isNaN(c))throw Error("Illegal Argument");return 0===c?t(f[0]):w.geodesicBuffer(f[0],
c,e.convertLinearUnitsToCode(b.defaultUndefined(f[2],-1)))})};h.offset=function(a,c){return l(a,c,function(a,c,d){b.pcCheck(d,2,6);if(null===d[0])return null;if(!(d[0]instanceof f||d[0]instanceof k))throw Error("Illegal Argument");a=b.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");c=b.toNumber(b.defaultUndefined(d[4],10));if(isNaN(c))throw Error("Illegal Argument");var h=b.toNumber(b.defaultUndefined(d[5],0));if(isNaN(h))throw Error("Illegal Argument");return w.offset(d[0],a,e.convertLinearUnitsToCode(b.defaultUndefined(d[2],
-1)),b.toString(b.defaultUndefined(d[3],"round")).toLowerCase(),c,h)})};h.rotate=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,2,3);c=e[0];if(null===c)return null;if(!(c instanceof a))throw Error("Illegal Argument");c instanceof g&&(c=f.fromExtent(c));d=b.toNumber(e[1]);if(isNaN(d))throw Error("Illegal Argument");e=b.defaultUndefined(e[2],null);if(null===e)return w.rotate(c,d);if(e instanceof n)return w.rotate(c,d,e);throw Error("Illegal Argument");})};h.centroid=function(d,e){return l(d,
e,function(e,h,l){b.pcCheck(l,1,1);if(null===l[0])return null;if(!(l[0]instanceof a))throw Error("Illegal Argument");return l[0]instanceof n?b.fixSpatialReference(t(l[0]),d.spatialReference):l[0]instanceof f?u?l[0].centroid:l[0].getCentroid():l[0]instanceof k?c.centroidPolyline(l[0]):l[0]instanceof p?c.centroidMultiPoint(l[0]):l[0]instanceof g?u?l[0].center:l[0].getExtent().getCenter():null})};h.multiparttosinglepart=function(c,e){return l(c,e,function(e,h,l){b.pcCheck(l,1,1);h=[];if(null===l[0])return null;
if(!(l[0]instanceof a))throw Error("Illegal Argument");if(l[0]instanceof n||l[0]instanceof g)return[b.fixSpatialReference(t(l[0]),c.spatialReference)];e=w.simplify(l[0]);if(e instanceof f){h=[];var m=[];for(l=0;l<e.rings.length;l++)if(e.isClockwise(e.rings[l])){var q=d.fromJson({rings:[e.rings[l]],hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference.toJson()});h.push(q)}else m.push({ring:e.rings[l],pt:e.getPoint(l,0)});for(e=0;e<m.length;e++)for(l=0;l<h.length;l++)if(h[l].contains(m[e].pt)){h[l].addRing(m[e].ring);
break}return h}if(e instanceof k){h=[];for(l=0;l<e.paths.length;l++)m=d.fromJson({paths:[e.paths[l]],hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference.toJson()}),h.push(m);return h}if(l[0]instanceof p){e=b.fixSpatialReference(t(l[0]),c.spatialReference);for(l=0;l<e.points.length;l++)h.push(e.getPoint(l));return h}return null})};h.issimple=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,1,1);if(null===e[0])return!0;if(e[0]instanceof a)return w.isSimple(e[0]);throw Error("Illegal Argument");
})};h.simplify=function(c,d){return l(c,d,function(c,d,e){b.pcCheck(e,1,1);if(null===e[0])return null;if(e[0]instanceof a)return w.simplify(e[0]);throw Error("Illegal Argument");})}}})},"esri/arcade/functions/centroid":function(){define(["require","exports","../../geometry/Point","../../kernel"],function(m,l,a,f){function k(a,f,d){var c={x:0,y:0};f&&(c.z=0);d&&(c.m=0);for(var b=0,e=a[0],h=0;h<a.length;h++){var g=a[h],k;a:if(g.length!==e.length)k=!1;else{for(k=0;k<g.length;k++)if(g[k]!==e[k]){k=!1;
break a}k=!0}if(!1===k){k=n(e,g,f);var l=g,p=f,m=d,x={x:(e[0]+l[0])/2,y:(e[1]+l[1])/2};p&&(x.z=(e[2]+l[2])/2);p&&m?x.m=(e[3]+l[3])/2:m&&(x.m=(e[2]+l[2])/2);e=x;e.x*=k;e.y*=k;c.x+=e.x;c.y+=e.y;f&&(e.z*=k,c.z+=e.z);d&&(e.m*=k,c.m+=e.m);b+=k;e=g}}0<b?(c.x/=b,c.y/=b,f&&(c.z/=b),d&&(c.m/=b)):(c.x=a[0][0],c.y=a[0][1],f&&(c.z=a[0][2]),d&&f?c.m=a[0][3]:d&&(c.m=a[0][2]));return c}function n(a,f,d){var c=f[0]-a[0];a=f[1]-a[1];return d?(f=f[2]-f[2],Math.sqrt(c*c+a*a+f*f)):Math.sqrt(c*c+a*a)}Object.defineProperty(l,
"__esModule",{value:!0});f.version.indexOf("4.");l.centroidPolyline=function(f){for(var g={x:0,y:0,spatialReference:f.spatialReference.toJson()},d={x:0,y:0,spatialReference:f.spatialReference.toJson()},c=0,b=0,e=0;e<f.paths.length;e++)if(0!==f.paths[e].length){var h;h=f.paths[e];var l=!0===f.hasZ;if(1>=h.length)h=0;else{for(var m=0,w=1;w<h.length;w++)m+=n(h[w-1],h[w],l);h=m}0===h?(l=k(f.paths[e],!0===f.hasZ,!0===f.hasM),g.x+=l.x,g.y+=l.y,!0===f.hasZ&&(g.z+=l.z),!0===f.hasM&&(g.m+=l.m),++c):(l=k(f.paths[e],
!0===f.hasZ,!0===f.hasM),d.x+=l.x*h,d.y+=l.y*h,!0===f.hasZ&&(d.z+=l.z*h),!0===f.hasM&&(d.m+=l.m*h),b+=h)}return 0<b?(d.x/=b,d.y/=b,!0===f.hasZ&&(d.z/=b),!0===f.hasM&&(d.m/=b),new a(d)):0<c?(g.x/=c,g.y/=c,!0===f.hasZ&&(d.z/=c),!0===f.hasM&&(g.m/=c),new a(g)):null};l.centroidMultiPoint=function(f){if(0===f.points.length)return null;for(var g=0,d=0,c=0,b=0,e=0;e<f.points.length;e++){var h=f.getPoint(e);!0===h.hasZ&&(c+=h.z);!0===h.hasM&&(b+=h.m);g+=h.x;d+=h.y;b+=h.m}g={x:g/f.points.length,y:d/f.points.length,
spatialReference:null};g.spatialReference=f.spatialReference.toJson();!0===f.hasZ&&(g.z=c/f.points.length);!0===f.hasM&&(g.m=b/f.points.length);return new a(g)}})},"esri/arcade/kernel":function(){define(["require","exports","../geometry/Extent"],function(m,l,a){Object.defineProperty(l,"__esModule",{value:!0});l.errback=function(a){return function(f){a.reject(f)}};l.callback=function(a,k){return function(){try{a.apply(null,arguments)}catch(n){k.reject(n)}}};l.convertSquareUnitsToCode=function(a){if(void 0===
a)return null;if("number"===typeof a)return a;switch(a.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};l.shapeExtent=function(f){if(null===f)return null;switch(f.type){case "polygon":case "multipoint":case "polyline":return f.extent;case "point":return new a({xmin:f.x,ymin:f.y,xmax:f.x,ymax:f.y,
spatialReference:f.spatialReference});case "extent":return f}return null};l.convertLinearUnitsToCode=function(a){if(void 0===a)return null;if("number"===typeof a||"number"===typeof a)return a;switch(a.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};l.sameGeomType=function(a,k){return a===k||"point"===a&&"esriGeometryPoint"===k||"polyline"===a&&"esriGeometryPolyline"===k||"polygon"===a&&"esriGeometryPolygon"===k||"extent"===a&&"esriGeometryEnvelope"===k||"multipoint"===a&&"esriGeometryMultipoint"===
k||"point"===k&&"esriGeometryPoint"===a||"polyline"===k&&"esriGeometryPolyline"===a||"polygon"===k&&"esriGeometryPolygon"===a||"extent"===k&&"esriGeometryEnvelope"===a||"multipoint"===k&&"esriGeometryMultipoint"===a?!0:!1}})},"esri/arcade/functions/stats":function(){define(["require","exports","../languageUtils","./fieldStats"],function(m,l,a,f){function k(k,g,l,d){if(1===d.length){if(a.isArray(d[0]))return f.calculateStat(k,d[0],-1);if(a.isImmutableArray(d[0]))return f.calculateStat(k,d[0].toArray(),
-1)}return f.calculateStat(k,d,-1)}Object.defineProperty(l,"__esModule",{value:!0});l.registerFunctions=function(f,g){f.stdev=function(a,d){return g(a,d,function(a,b,d){return k("stdev",a,b,d)})};f.variance=function(a,d){return g(a,d,function(a,b,d){return k("variance",a,b,d)})};f.average=function(a,d){return g(a,d,function(a,b,d){return k("mean",a,b,d)})};f.mean=function(a,d){return g(a,d,function(a,b,d){return k("mean",a,b,d)})};f.sum=function(a,d){return g(a,d,function(a,b,d){return k("sum",a,
b,d)})};f.min=function(a,d){return g(a,d,function(a,b,d){return k("min",a,b,d)})};f.max=function(a,d){return g(a,d,function(a,b,d){return k("max",a,b,d)})};f.distinct=function(a,d){return g(a,d,function(a,b,d){return k("distinct",a,b,d)})};f.count=function(f,d){return g(f,d,function(c,b,d){a.pcCheck(d,1,1);if(a.isArray(d[0])||a.isString(d[0]))return d[0].length;if(a.isImmutableArray(d[0]))return d[0].length();throw Error("Invalid Parameters for Count");})}}})},"esri/arcade/functions/fieldStats":function(){define(["require",
"exports","../languageUtils"],function(m,l,a){function f(a){for(var f=0,k=0;k<a.length;k++)f+=a[k];return f/a.length}function k(a){for(var g=f(a),k=0,d=0;d<a.length;d++)k+=Math.pow(g-a[d],2);return k/a.length}Object.defineProperty(l,"__esModule",{value:!0});l.decodeStatType=function(a){switch(a.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""};l.calculateStat=function(l,g,p){void 0===p&&(p=1E3);switch(l.toLowerCase()){case "distinct":a:{l=p;p=[];for(var d={},c=[],b=0;b<g.length;b++){if(void 0!==g[b]&&null!==g[b]&&g[b]!==a.voidOperation){var e=g[b];if(a.isNumber(e)||a.isString(e))void 0===d[e]&&(p.push(e),d[e]=1);else{for(var h=!1,n=0;n<c.length;n++)!0===a.equalityTest(c[n],e)&&(h=!0);!1===h&&(c.push(e),p.push(e))}}if(p.length>=l&&-1!==l){g=p;break a}}g=p}return g;case "avg":case "mean":return f(a.toNumberArray(g));
case "min":return Math.min.apply(Math,a.toNumberArray(g));case "sum":g=a.toNumberArray(g);for(p=l=0;p<g.length;p++)l+=g[p];return l;case "max":return Math.max.apply(Math,a.toNumberArray(g));case "stdev":case "stddev":return Math.sqrt(k(a.toNumberArray(g)));case "var":case "variance":return k(a.toNumberArray(g));case "count":return g.length}return 0}})},"esri/arcade/parser":function(){define(["require","exports","./treeAnalysis","./lib/esprima"],function(m,l,a,f){Object.defineProperty(l,"__esModule",
{value:!0});l.parseScript=function(k){k=f.parse("function _() { "+k+"\n}");if(null===k.body||void 0===k.body)throw Error("No formula provided.");if(0===k.body.length)throw Error("No formula provided.");if(0===k.body.length)throw Error("No formula provided.");if("BlockStatement"!==k.body[0].body.type)throw Error("Invalid formula content.");var l=a.validateLanguage(k);if(""!==l)throw Error(l);return k};l.scriptCheck=function(k,l,g,p){var d=[];try{var c=f.parse("function _() { "+k+"\n}",{tolerant:!0,
loc:!0}),b=c.errors;if(0<b.length)for(var e=0;e<b.length;e++)d.push({line:b[e].lineNumber,character:b[e].column,reason:b[e].description});var h=a.checkScript(c,l,g,p);for(l=0;l<h.length;l++)d.push(h[l])}catch(t){try{"Unexpected token }"===t.description?(t.index=("function _() { "+k+"\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(r){}}return d};l.extractFieldLiterals=function(f,
l){void 0===l&&(l=!1);return a.findFieldLiterals(f,l)};l.validateScript=function(f,l,g){void 0===g&&(g="full");return a.validateScript(f,l,g)};l.referencesMember=function(f,l){return a.referencesMember(f,l)};l.referencesFunction=function(f,l){return a.referencesFunction(f,l)}})},"esri/arcade/lib/esprima":function(){(function(m,l){"function"===typeof define&&define.amd?define(["exports"],l):"undefined"!==typeof exports?l(exports):l(m.esprima={})})(this,function(m){function l(a,b){if(!a)throw Error("ASSERT: "+
b);}function a(a){return 48<=a&&57>=a}function f(a){return 0<="0123456789abcdefABCDEF".indexOf(a)}function k(a){return 0<="01234567".indexOf(a)}function n(a){return 10===a||13===a||8232===a||8233===a}function g(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||92===a||128<=a&&jb.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function p(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a||92===a||128<=a&&jb.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 c(a,b,c,d,e){l("number"===typeof c,"Comment must have valid position");X.lastCommentStart>=c||(X.lastCommentStart=c,a={type:a,value:b},J.range&&(a.range=[c,d]),J.loc&&(a.loc=e),J.comments.push(a),J.attachComment&&(J.leadingComments.push(a),J.trailingComments.push(a)))}
function b(a){var b,d,e;b=A-a;for(d={start:{line:ba,column:A-da-a}};A<la;)if(e=I.charCodeAt(A),++A,n(e)){J.comments&&(a=I.slice(b+a,A-1),d.end={line:ba,column:A-da-1},c("Line",a,b,A-1,d));13===e&&10===I.charCodeAt(A)&&++A;++ba;da=A;return}J.comments&&(a=I.slice(b+a,A),d.end={line:ba,column:A-da},c("Line",a,b,A,d))}function e(){var a,d;for(d=0===A;A<la;)if(a=I.charCodeAt(A),32===a||9===a||11===a||12===a||160===a||5760<=a&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,
12288,65279].indexOf(a))++A;else if(n(a))++A,13===a&&10===I.charCodeAt(A)&&++A,++ba,da=A,d=!0;else if(47===a)if(a=I.charCodeAt(A+1),47===a)++A,++A,b(2),d=!0;else if(42===a){++A;++A;a:{var e=a=void 0,f=void 0,f=void 0;J.comments&&(a=A-2,e={start:{line:ba,column:A-da-2}});for(;A<la;)if(f=I.charCodeAt(A),n(f))13===f&&10===I.charCodeAt(A+1)&&++A,++ba,++A,da=A,A>=la&&K();else{if(42===f&&47===I.charCodeAt(A+1)){++A;++A;J.comments&&(f=I.slice(a+2,A-2),e.end={line:ba,column:A-da},c("Block",f,a,A,e));break a}++A}K()}}else break;
else if(d&&45===a)if(45===I.charCodeAt(A+1)&&62===I.charCodeAt(A+2))A+=3,b(3);else break;else if(60===a)if("!--"===I.slice(A+1,A+4))++A,++A,++A,++A,b(4);else break;else break}function h(a){var b,c,d=0;b="u"===a?4:2;for(a=0;a<b;++a)if(A<la&&f(I[A]))c=I[A++],d=16*d+"0123456789abcdef".indexOf(c.toLowerCase());else return"";return String.fromCharCode(d)}function t(){var a,b;a=I.charCodeAt(A++);b=String.fromCharCode(a);92===a&&(117!==I.charCodeAt(A)&&K(),++A,(a=h("u"))&&"\\"!==a&&g(a.charCodeAt(0))||K(),
b=a);for(;A<la;){a=I.charCodeAt(A);if(!p(a))break;++A;b+=String.fromCharCode(a);92===a&&(b=b.substr(0,b.length-1),117!==I.charCodeAt(A)&&K(),++A,(a=h("u"))&&"\\"!==a&&p(a.charCodeAt(0))||K(),b+=a)}return b}function r(){var a=A,b=I.charCodeAt(A),c,d=I[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,J.tokenize&&(40===b?J.openParenToken=J.tokens.length:123===b&&(J.openCurlyToken=J.tokens.length)),{type:N.Punctuator,value:String.fromCharCode(b),
lineNumber:ba,lineStart:da,start:a,end:A};default:if(c=I.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:N.Punctuator,value:String.fromCharCode(b)+String.fromCharCode(c),lineNumber:ba,lineStart:da,start:a,end:A};case 33:case 61:return A+=2,61===I.charCodeAt(A)&&++A,{type:N.Punctuator,value:I.slice(a,A),lineNumber:ba,lineStart:da,start:a,end:A}}}b=I.substr(A,4);if("\x3e\x3e\x3e\x3d"===b)return A+=4,{type:N.Punctuator,
value:b,lineNumber:ba,lineStart:da,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:N.Punctuator,value:b,lineNumber:ba,lineStart:da,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:N.Punctuator,value:b,lineNumber:ba,lineStart:da,start:a,end:A};if(0<="\x3c\x3e\x3d!+-*%\x26|^/".indexOf(d))return++A,{type:N.Punctuator,value:d,lineNumber:ba,lineStart:da,start:a,end:A};K()}function w(){var b,
c,d;d=I[A];l(a(d.charCodeAt(0))||"."===d,"Numeric literal must start with a decimal digit or a decimal point");c=A;b="";if("."!==d){b=I[A++];d=I[A];if("0"===b){if("x"===d||"X"===d){++A;for(b="";A<la&&f(I[A]);)b+=I[A++];0===b.length&&K();g(I.charCodeAt(A))&&K();return{type:N.NumericLiteral,value:parseInt("0x"+b,16),lineNumber:ba,lineStart:da,start:c,end:A}}if("b"===d||"B"===d){++A;for(d="";A<la;){b=I[A];if("0"!==b&&"1"!==b)break;d+=I[A++]}0===d.length&&K();A<la&&(b=I.charCodeAt(A),(g(b)||a(b))&&K());
return{type:N.NumericLiteral,value:parseInt(d,2),lineNumber:ba,lineStart:da,start:c,end:A}}if("o"===d||"O"===d||k(d)){k(d)?(d=!0,b="0"+I[A++]):(d=!1,++A,b="");for(;A<la&&k(I[A]);)b+=I[A++];d||0!==b.length||K();(g(I.charCodeAt(A))||a(I.charCodeAt(A)))&&K();return{type:N.NumericLiteral,value:parseInt(b,8),octal:d,lineNumber:ba,lineStart:da,start:c,end:A}}d&&a(d.charCodeAt(0))&&K()}for(;a(I.charCodeAt(A));)b+=I[A++];d=I[A]}if("."===d){for(b+=I[A++];a(I.charCodeAt(A));)b+=I[A++];d=I[A]}if("e"===d||"E"===
d){b+=I[A++];d=I[A];if("+"===d||"-"===d)b+=I[A++];if(a(I.charCodeAt(A)))for(;a(I.charCodeAt(A));)b+=I[A++];else K()}g(I.charCodeAt(A))&&K();return{type:N.NumericLiteral,value:parseFloat(b),lineNumber:ba,lineStart:da,start:c,end:A}}function u(){U=null;e();T("Regular Expression language structures not supported")}function q(){e();u()}function x(){var a;a=J.tokens[J.tokens.length-1];if(!a)return q();if("Punctuator"===a.type){if("]"===a.value)return r();if(")"===a.value)return a=J.tokens[J.openParenToken-
1],!a||"Keyword"!==a.type||"if"!==a.value.toLowerCase()&&"while"!==a.value.toLowerCase()&&"for"!==a.value.toLowerCase()&&"with"!==a.value.toLowerCase()?r():q();if("}"===a.value){if(J.tokens[J.openCurlyToken-3]&&"Keyword"===J.tokens[J.openCurlyToken-3].type){if(a=J.tokens[J.openCurlyToken-4],!a)return r()}else if(J.tokens[J.openCurlyToken-4]&&"Keyword"===J.tokens[J.openCurlyToken-4].type){if(a=J.tokens[J.openCurlyToken-5],!a)return q()}else return r();if(0<=Ba.indexOf(a.value))return r()}return q()}return"Keyword"===
a.type&&"this"!==a.value?q():r()}function v(){var b;e();if(A>=la)return{type:N.EOF,lineNumber:ba,lineStart:da,start:A,end:A};b=I.charCodeAt(A);if(g(b)){var c;b=A;if(92===I.charCodeAt(A))c=t();else a:{var m;for(c=A++;A<la;){m=I.charCodeAt(A);if(92===m){A=c;c=t();break a}if(p(m))++A;else break}c=I.slice(c,A)}return{type:1===c.length?N.Identifier:d(c)?N.Keyword:"null"===c.toLowerCase()?N.NullLiteral:"true"===c.toLowerCase()||"false"===c.toLowerCase()?N.BooleanLiteral:N.Identifier,value:c,lineNumber:ba,
lineStart:da,start:b,end:A}}if(40===b||41===b||59===b)return r();if(39===b||34===b){var q="",v,u,Q;m=!1;var P,y;P=ba;y=da;b=I[A];l("'"===b||'"'===b,"String literal must starts with a quote");c=A;for(++A;A<la;)if(v=I[A++],v===b){b="";break}else if("\\"===v)if((v=I[A++])&&n(v.charCodeAt(0)))++ba,"\r"===v&&"\n"===I[A]&&++A,da=A;else switch(v){case "u":case "x":if("{"===I[A]){++A;u=v=void 0;v=I[A];u=0;for("}"===v&&K();A<la;){v=I[A++];if(!f(v))break;u=16*u+"0123456789abcdef".indexOf(v.toLowerCase())}(1114111<
u||"}"!==v)&&K();v=65535>=u?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320);q+=v}else Q=A,(u=h(v))?q+=u:(A=Q,q+=v);break;case "n":q+="\n";break;case "r":q+="\r";break;case "t":q+="\t";break;case "b":q+="\b";break;case "f":q+="\f";break;case "v":q+="\x0B";break;default:k(v)?(u="01234567".indexOf(v),0!==u&&(m=!0),A<la&&k(I[A])&&(m=!0,u=8*u+"01234567".indexOf(I[A++]),0<="0123".indexOf(v)&&A<la&&k(I[A])&&(u=8*u+"01234567".indexOf(I[A++]))),q+=String.fromCharCode(u)):
q+=v}else if(n(v.charCodeAt(0)))break;else q+=v;""!==b&&K();return{type:N.StringLiteral,value:q,octal:m,startLineNumber:P,startLineStart:y,lineNumber:ba,lineStart:da,start:c,end:A}}return 46===b?a(I.charCodeAt(A+1))?w():r():a(b)?w():J.tokenize&&47===b?x():r()}function C(){var a,b,c;e();a={start:{line:ba,column:A-da}};b=v();a.end={line:ba,column:A-da};b.type!==N.EOF&&(c=I.slice(b.start,b.end),a={type:La[b.type],value:c,range:[b.start,b.end],loc:a},b.regex&&(a.regex={pattern:b.regex.pattern,flags:b.regex.flags}),
J.tokens.push(a));return b}function y(){var a;a=U;A=a.end;ba=a.lineNumber;da=a.lineStart;U="undefined"!==typeof J.tokens?C():v();A=a.end;ba=a.lineNumber;da=a.lineStart;return a}function z(){var a,b,c;a=A;b=ba;c=da;U="undefined"!==typeof J.tokens?C():v();A=a;ba=b;da=c}function E(){this.line=ba;this.column=A-da}function B(){this.start=new E;this.end=null}function R(a){this.start=a.type===N.StringLiteral?{line:a.startLineNumber,column:a.start-a.startLineStart}:{line:a.lineNumber,column:a.start-a.lineStart};
this.end=null}function D(){A=U.start;U.type===N.StringLiteral?(ba=U.startLineNumber,da=U.startLineStart):(ba=U.lineNumber,da=U.lineStart);J.range&&(this.range=[A,0]);J.loc&&(this.loc=new B)}function H(a){J.range&&(this.range=[a.start,0]);J.loc&&(this.loc=new R(a))}function O(){var a,b,c,d;a=A;b=ba;c=da;e();d=ba!==b;A=a;ba=b;da=c;return d}function Y(a,b,c){var d=Error("Line "+a+": "+c);d.index=b;d.lineNumber=a;d.column=b-da+1;d.description=c;return d}function T(a){var b,c;b=Array.prototype.slice.call(arguments,
1);c=a.replace(/%(\d)/g,function(a,c){l(c<b.length,"Message reference must be in range");return b[c]});throw Y(ba,A,c);}function F(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){l(c<b.length,"Message reference must be in range");return b[c]});c=Y(ba,A,c);if(J.errors)J.errors.push(c);else throw c;}function S(a,b){var c=ha.UnexpectedToken;a&&(c=b?b:a.type===N.EOF?ha.UnexpectedEOS:a.type===N.Identifier?ha.UnexpectedIdentifier:a.type===N.NumericLiteral?ha.UnexpectedNumber:
a.type===N.StringLiteral?ha.UnexpectedString:ha.UnexpectedToken);c=c.replace("%0",a?a.value:"ILLEGAL");return a&&"number"===typeof a.lineNumber?Y(a.lineNumber,a.start,c):Y(ba,A,c)}function K(a,b){throw S(a,b);}function Z(a,b){var c=S(a,b);if(J.errors)J.errors.push(c);else throw c;}function V(a){var b=y();b.type===N.Punctuator&&b.value===a||K(b)}function G(){var a;J.errors?(a=U,a.type===N.Punctuator&&","===a.value?y():a.type===N.Punctuator&&";"===a.value?(y(),Z(a)):Z(a,ha.UnexpectedToken)):V(",")}
function ea(a){var b=y();b.type===N.Keyword&&b.value.toLowerCase()===a.toLowerCase()||K(b)}function L(a){return U.type===N.Punctuator&&U.value===a}function W(a){return U.type===N.Keyword&&U.value.toLowerCase()===a.toLowerCase()}function ca(){var a;59===I.charCodeAt(A)||L(";")?y():(a=ba,e(),ba===a&&(U.type===N.EOF||L("}")||K(U)))}function ua(a){return a.type===aa.Identifier||a.type===aa.MemberExpression}function ja(a,b){var c,d,e=new D;c=na;d=Ga();na=c;return e.finishFunctionExpression(null,a,[],d)}
function Q(){var a,b;a=na;na=!0;b=Ja();b=ja(b.params);na=a;return b}function P(){var a,b=new D;a=y();return a.type===N.StringLiteral||a.type===N.NumericLiteral?(na&&a.octal&&Z(a,ha.StrictOctalLiteral),b.finishLiteral(a)):b.finishIdentifier(a.value)}function sa(){var a,b,c,d=new D;a=U;if(a.type===N.Identifier)return b=P(),"get"!==a.value||L(":")||L("(")?"set"!==a.value||L(":")||L("(")?L(":")?(y(),a=pa(),d.finishProperty("init",b,a,!1,!1)):L("(")?(a=Q(),d.finishProperty("init",b,a,!0,!1)):d.finishProperty("init",
b,b,!1,!0):(b=P(),V("("),a=U,a.type!==N.Identifier?(V(")"),Z(a),a=ja([])):(c=[Ea()],V(")"),a=ja(c,a)),d.finishProperty("set",b,a,!1,!1)):(b=P(),V("("),V(")"),a=ja([]),d.finishProperty("get",b,a,!1,!1));if(a.type===N.EOF||a.type===N.Punctuator)K(a);else{b=P();if(L(":"))return y(),a=pa(),d.finishProperty("init",b,a,!1,!1);if(L("("))return a=Q(),d.finishProperty("init",b,a,!0,!1);K(y())}}function ga(a){var b=[],c,d,e={},f=String,h=new D;for(!0!==a&&V("{");!L("}");)a=sa(),c=a.key.type===aa.Identifier?
a.key.name:f(a.key.value),d="init"===a.kind?Pa.Data:"get"===a.kind?Pa.Get:Pa.Set,c="$"+c,Object.prototype.hasOwnProperty.call(e,c)?(e[c]===Pa.Data?na&&d===Pa.Data?F(ha.StrictDuplicateProperty):d!==Pa.Data&&F(ha.AccessorDataProperty):d===Pa.Data?F(ha.AccessorDataProperty):e[c]&d&&F(ha.AccessorGetSet),e[c]|=d):e[c]=d,b.push(a),L("}")||G();V("}");return h.finishObjectExpression(b)}function fa(){var a,b,c,d;if(L("("))return V("("),L(")")?(y(),b=bb.ArrowParameterPlaceHolder):(++X.parenthesisCount,b=ka(),
V(")")),b;if(L("[")){b=[];var e=new D;for(V("[");!L("]");)L(",")?(y(),b.push(null)):(b.push(pa()),L("]")||V(","));y();return e.finishArrayExpression(b)}if(L("{"))return ga();a=U.type;d=new D;if(a===N.Identifier)c=d.finishIdentifier(y().value);else if(a===N.StringLiteral||a===N.NumericLiteral)na&&U.octal&&Z(U,ha.StrictOctalLiteral),c=d.finishLiteral(y());else if(a===N.Keyword){if(W("function")){d=null;var f;c=[];var h=[],g,k=new D;ea("function");L("(")||(d=Ea());f=Ja(b);c=f.params;h=f.defaults;a=f.stricted;
b=f.firstRestricted;f.message&&(e=f.message);g=na;f=Ga();na&&b&&K(b,e);na&&a&&Z(a,e);na=g;return k.finishFunctionExpression(d,c,h,f)}W("this")?(y(),c=d.finishThisExpression()):K(y())}else a===N.BooleanLiteral?(b=y(),b.value="true"===b.value.toLowerCase(),c=d.finishLiteral(b)):a===N.NullLiteral?(b=y(),b.value=null,c=d.finishLiteral(b)):L("/")||L("/\x3d")?(c="undefined"!==typeof J.tokens?d.finishLiteral(q()):d.finishLiteral(u()),z()):K(y());return c}function va(){var a=[];V("(");if(!L(")"))for(;A<la;){a.push(pa());
if(L(")"))break;G()}V(")");return a}function oa(){V(".");var a,b=new D;a=y();a.type===N.Identifier||a.type===N.Keyword||a.type===N.BooleanLiteral||a.type===N.NullLiteral||K(a);return b.finishIdentifier(a.value)}function Da(){var a;V("[");a=ka();V("]");return a}function Fa(){var a,b,c=new D;ea("new");var d;l(X.allowIn,"callee of new expression always allow in keyword.");d=U;for(a=W("new")?Fa():fa();;)if(L("["))b=Da(),a=(new H(d)).finishMemberExpression("[",a,b);else if(L("."))b=oa(),a=(new H(d)).finishMemberExpression(".",
a,b);else break;b=L("(")?va():[];return c.finishNewExpression(a,b)}function wa(){var a,b,c=U,d,e=X.allowIn;b=U;X.allowIn=!0;for(a=W("new")?Fa():fa();;)if(L("."))d=oa(),a=(new H(b)).finishMemberExpression(".",a,d);else if(L("("))d=va(),a=(new H(b)).finishCallExpression(a,d);else if(L("["))d=Da(),a=(new H(b)).finishMemberExpression("[",a,d);else break;X.allowIn=e;U.type!==N.Punctuator||!L("++")&&!L("--")||O()||(ua(a)||F(ha.InvalidLHSInAssignment),b=y(),a=(new H(c)).finishPostfixExpression(b.value,a));
return a}function ma(){var a,b,c;U.type!==N.Punctuator&&U.type!==N.Keyword?b=wa():L("++")||L("--")?(c=U,a=y(),b=ma(),ua(b)||F(ha.InvalidLHSInAssignment),b=(new H(c)).finishUnaryExpression(a.value,b)):L("+")||L("-")||L("~")||L("!")?(c=U,a=y(),b=ma(),b=(new H(c)).finishUnaryExpression(a.value,b)):W("delete")||W("void")||W("typeof")?(c=U,a=y(),b=ma(),b=(new H(c)).finishUnaryExpression(a.value,b),na&&"delete"===b.operator&&b.argument.type===aa.Identifier&&F(ha.StrictDelete)):b=wa();return b}function ta(a,
b){var c=0;if(a.type!==N.Punctuator&&a.type!==N.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 ya(){var a,b,c,d,e,f;a=U;b=ma();if(b===bb.ArrowParameterPlaceHolder)return b;c=U;d=ta(c,X.allowIn);if(0===d)return b;c.prec=d;y();a=[a,U];f=ma();for(e=[b,c,f];0<(d=ta(U,X.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 H(a[a.length-1])).finishBinaryExpression(c,b,f),e.push(b);c=y();c.prec=d;e.push(c);a.push(U);b=ma();e.push(b)}d=e.length-1;b=e[d];for(a.pop();1<d;)b=(new H(a.pop())).finishBinaryExpression(e[d-1].value,e[d-2],b),d-=2;return b}
function Ca(a){var b,c,d,e,f,h,g;e=[];f=[];h=0;g={paramSet:{}};b=0;for(c=a.length;b<c;b+=1)if(d=a[b],d.type===aa.Identifier)e.push(d),f.push(null),Ma(g,d,d.name);else if(d.type===aa.AssignmentExpression)e.push(d.left),f.push(d.right),++h,Ma(g,d.left,d.left.name);else return null;g.message===ha.StrictParamDupe&&(a=na?g.stricted:g.firstRestricted,K(a,g.message));0===h&&(f=[]);return{params:e,defaults:f,rest:null,stricted:g.stricted,firstRestricted:g.firstRestricted,message:g.message}}function pa(){var a,
b,c,d,e;a=X.parenthesisCount;b=e=U;var f,h;h=U;c=ya();c!==bb.ArrowParameterPlaceHolder&&L("?")&&(y(),f=X.allowIn,X.allowIn=!0,b=pa(),X.allowIn=f,V(":"),f=pa(),c=(new H(h)).finishConditionalExpression(c,b,f));if(c===bb.ArrowParameterPlaceHolder||L("\x3d\x3e"))if(X.parenthesisCount===a||X.parenthesisCount===a+1)if(c.type===aa.Identifier?d=Ca([c]):c.type===aa.AssignmentExpression?d=Ca([c]):c.type===aa.SequenceExpression?d=Ca(c.expressions):c===bb.ArrowParameterPlaceHolder&&(d=Ca([])),d)return a=d,e=
new H(e),V("\x3d\x3e"),d=na,c=L("{")?Ga():pa(),na&&a.firstRestricted&&K(a.firstRestricted,a.message),na&&a.stricted&&Z(a.stricted,a.message),na=d,e.finishArrowFunctionExpression(a.params,a.defaults,c,c.type!==aa.BlockStatement);U.type!==N.Punctuator?a=!1:(a=U.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&&(ua(c)||F(ha.InvalidLHSInAssignment),b=y(),a=pa(),
c=(new H(e)).finishAssignmentExpression(b.value,c,a));return c}function ka(){var a,b=U;a=pa();if(L(",")){for(a=[a];A<la&&L(",");)y(),a.push(pa());a=(new H(b)).finishSequenceExpression(a)}return a}function Ea(){var a,b=new D;a=y();a.type!==N.Identifier&&K(a);return b.finishIdentifier(a.value)}function Wa(a){var b=null,c,d=new D;c=Ea();"const"===a?(V("\x3d"),b=pa()):L("\x3d")&&(y(),b=pa());return d.finishVariableDeclarator(c,b)}function Oa(a){var b=[];do{b.push(Wa(a));if(!L(","))break;y()}while(A<la);
return b}function Ia(a){var b=U.type,c,d;b===N.EOF&&K(U);if(b===N.Punctuator&&"{"===U.value){if(a){V("{");var e=U;a=A;c=ba;d=da;y();b=L(":");U=e;A=a;ba=c;da=d;if((U.type===N.Identifier||U.type===N.StringLiteral)&&b)return ga(!0);a=new D;for(c=[];A<la&&!L("}");){d=Ka();if("undefined"===typeof d)break;c.push(d)}V("}");return a.finishBlockStatement(c)}return ga()}a=new D;if(b===N.Punctuator)switch(U.value){case ";":return a=new D,V(";"),a.finishEmptyStatement();case "(":return c=ka(),ca(),a.finishExpressionStatement(c)}else if(b===
N.Keyword)switch(U.value.toLowerCase()){case "break":return c=null,ea("break"),59===I.charCodeAt(A)?(y(),X.inIteration||X.inSwitch||T(ha.IllegalBreak),a=a.finishBreakStatement(null)):O()?(X.inIteration||X.inSwitch||T(ha.IllegalBreak),a=a.finishBreakStatement(null)):(U.type===N.Identifier&&(c=Ea(),d="$"+c.name,Object.prototype.hasOwnProperty.call(X.labelSet,d)||T(ha.UnknownLabel,c.name)),ca(),null!==c||X.inIteration||X.inSwitch||T(ha.IllegalBreak),a=a.finishBreakStatement(c)),a;case "continue":return c=
null,ea("continue"),59===I.charCodeAt(A)?(y(),X.inIteration||T(ha.IllegalContinue),a=a.finishContinueStatement(null)):O()?(X.inIteration||T(ha.IllegalContinue),a=a.finishContinueStatement(null)):(U.type===N.Identifier&&(c=Ea(),d="$"+c.name,Object.prototype.hasOwnProperty.call(X.labelSet,d)||T(ha.UnknownLabel,c.name)),ca(),null!==c||X.inIteration||T(ha.IllegalContinue),a=a.finishContinueStatement(c)),a;case "for":var f,h,k;h=X.allowIn;f=b=e=null;ea("for");V("(");if(L(";"))y();else{if(W("var")){X.allowIn=
!1;var l=new D;f=y();k=Oa();f=l.finishVariableDeclaration(k,f.value);X.allowIn=h;1===f.declarations.length&&W("in")&&(y(),c=f,d=ka(),f=null)}else X.allowIn=!1,f=ka(),X.allowIn=h,W("in")&&(ua(f)||F(ha.InvalidLHSInForIn),y(),c=f,d=ka(),f=null);"undefined"===typeof c&&V(";")}"undefined"===typeof c&&(L(";")||(b=ka()),V(";"),L(")")||(e=ka()));V(")");k=X.inIteration;X.inIteration=!0;h=Ia(!0);X.inIteration=k;return"undefined"===typeof c?a.finishForStatement(f,b,e,h):a.finishForInStatement(c,d,h);case "function":return ab(a);
case "if":return ea("if"),V("("),c=ka(),V(")"),d=Ia(!0),W("else")?(y(),b=Ia(!0)):b=null,a.finishIfStatement(c,d,b);case "return":return c=null,ea("return"),X.inFunctionBody||F(ha.IllegalReturn),32===I.charCodeAt(A)&&g(I.charCodeAt(A+1))?(c=ka(),ca(),a=a.finishReturnStatement(c)):O()?a=a.finishReturnStatement(null):(L(";")||L("}")||U.type===N.EOF||(c=ka()),ca(),a=a.finishReturnStatement(c)),a;case "var":return ea("var"),c=Oa(),ca(),a.finishVariableDeclaration(c,"var")}c=ka();if(c.type===aa.Identifier&&
L(":"))return y(),b="$"+c.name,Object.prototype.hasOwnProperty.call(X.labelSet,b)&&T(ha.Redeclaration,"Label",c.name),X.labelSet[b]=!0,d=Ia(!1),delete X.labelSet[b],a.finishLabeledStatement(c,d);ca();return a.finishExpressionStatement(c)}function Ga(){var a,b=[],c,d,e,f,h,g=new D;for(V("{");A<la&&U.type===N.StringLiteral;){c=U;a=Ka();b.push(a);if(a.expression.type!==aa.Literal)break;a=I.slice(c.start+1,c.end-1);"use strict"===a?(na=!0,d&&Z(d,ha.StrictOctalLiteral)):!d&&c.octal&&(d=c)}c=X.labelSet;
d=X.inIteration;e=X.inSwitch;f=X.inFunctionBody;h=X.parenthesizedCount;X.labelSet={};X.inIteration=!1;X.inSwitch=!1;X.inFunctionBody=!0;for(X.parenthesizedCount=0;A<la&&!L("}");){a=Ka();if("undefined"===typeof a)break;b.push(a)}V("}");X.labelSet=c;X.inIteration=d;X.inSwitch=e;X.inFunctionBody=f;X.parenthesizedCount=h;return g.finishBlockStatement(b)}function Ma(a,b,c){c="$"+c;na?Object.prototype.hasOwnProperty.call(a.paramSet,c)&&(a.stricted=b,a.message=ha.StrictParamDupe):!a.firstRestricted&&Object.prototype.hasOwnProperty.call(a.paramSet,
c)&&(a.firstRestricted=b,a.message=ha.StrictParamDupe);a.paramSet[c]=!0}function Ja(a){a={params:[],defaultCount:0,defaults:[],firstRestricted:a};V("(");if(!L(")"))for(a.paramSet={};A<la;){var b=a,c=void 0,d=void 0,e=void 0,c=U,d=Ea();Ma(b,c,c.value);L("\x3d")&&(y(),e=pa(),++b.defaultCount);b.params.push(d);b.defaults.push(e);if(L(")"))break;V(",")}V(")");0===a.defaultCount&&(a.defaults=[]);return{params:a.params,defaults:a.defaults,stricted:a.stricted,firstRestricted:a.firstRestricted,message:a.message}}
function ab(){var a,b=[],c=[],d,e,f,h,g,k=new D;ea("function");a=Ea();d=Ja(f);b=d.params;c=d.defaults;e=d.stricted;f=d.firstRestricted;d.message&&(h=d.message);g=na;d=Ga();na&&f&&K(f,h);na&&e&&Z(e,h);na=g;return k.finishFunctionDeclaration(a,b,c,d)}function Ka(){if(U.type===N.Keyword)return"function"===U.value.toLowerCase()?ab():Ia(!1);if(U.type!==N.EOF)return Ia(!1)}function Ta(){var a,b,c,d=[];for(a=0;a<J.tokens.length;++a)b=J.tokens[a],c={type:b.type,value:b.value},b.regex&&(c.regex={pattern:b.regex.pattern,
flags:b.regex.flags}),J.range&&(c.range=b.range),J.loc&&(c.loc=b.loc),d.push(c);J.tokens=d}var N,La,Ba,aa,bb,Pa,ha,jb,I,na,A,ba,da,la,U,X,J;N={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};La={};La[N.BooleanLiteral]="Boolean";La[N.EOF]="\x3cend\x3e";La[N.Identifier]="Identifier";La[N.Keyword]="Keyword";La[N.NullLiteral]="Null";La[N.NumericLiteral]="Numeric";La[N.Punctuator]="Punctuator";La[N.StringLiteral]="String";La[N.RegularExpression]=
"RegularExpression";Ba="( { [ 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(" ");aa={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"};bb={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}};Pa={Data:1,Get:2,Set:4};ha={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"};jb={NonAsciiIdentifierStart:RegExp("[\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:RegExp("[\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]")};
H.prototype=D.prototype={processComment:function(){var a,b,c,d=J.bottomRightStack,e,f,h=d[d.length-1];if(!(this.type===aa.Program&&0<this.body.length)){if(0<J.trailingComments.length){c=[];for(e=J.trailingComments.length-1;0<=e;--e)f=J.trailingComments[e],f.range[0]>=this.range[1]&&(c.unshift(f),J.trailingComments.splice(e,1));J.trailingComments=[]}else h&&h.trailingComments&&h.trailingComments[0].range[0]>=this.range[1]&&(c=h.trailingComments,delete h.trailingComments);if(h)for(;h&&h.range[0]>=this.range[0];)a=
h,h=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<J.leadingComments.length)for(b=[],e=J.leadingComments.length-1;0<=e;--e)f=J.leadingComments[e],f.range[1]<=this.range[0]&&(b.unshift(f),J.leadingComments.splice(e,1));b&&0<b.length&&(this.leadingComments=b);c&&0<c.length&&(this.trailingComments=c);d.push(this)}},finish:function(){J.range&&(this.range[1]=A);J.loc&&(this.loc.end=
new E,J.source&&(this.loc.source=J.source));J.attachComment&&this.processComment()},finishArrayExpression:function(a){this.type=aa.ArrayExpression;this.elements=a;this.finish();return this},finishAssignmentExpression:function(a,b,c){this.type=aa.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?aa.LogicalExpression:aa.BinaryExpression;this.operator=a;this.left=b;this.right=c;this.finish();
return this},finishBlockStatement:function(a){this.type=aa.BlockStatement;this.body=a;this.finish();return this},finishBreakStatement:function(a){this.type=aa.BreakStatement;this.label=a;this.finish();return this},finishCallExpression:function(a,b){this.type=aa.CallExpression;this.callee=a;this.arguments=b;this.finish();return this},finishConditionalExpression:function(a,b,c){this.type=aa.ConditionalExpression;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishContinueStatement:function(a){this.type=
aa.ContinueStatement;this.label=a;this.finish();return this},finishEmptyStatement:function(){this.type=aa.EmptyStatement;this.finish();return this},finishExpressionStatement:function(a){this.type=aa.ExpressionStatement;this.expression=a;this.finish();return this},finishForStatement:function(a,b,c,d){this.type=aa.ForStatement;this.init=a;this.test=b;this.update=c;this.body=d;this.finish();return this},finishForInStatement:function(a,b,c){this.type=aa.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=aa.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=aa.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=aa.Identifier;
this.name=a;this.finish();return this},finishIfStatement:function(a,b,c){this.type=aa.IfStatement;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishLiteral:function(a){this.type=aa.Literal;this.value=a.value;this.raw=I.slice(a.start,a.end);a.regex&&(this.regex=a.regex);this.finish();return this},finishMemberExpression:function(a,b,c){this.type=aa.MemberExpression;this.computed="["===a;this.object=b;this.property=c;this.finish();return this},finishObjectExpression:function(a){this.type=
aa.ObjectExpression;this.properties=a;this.finish();return this},finishPostfixExpression:function(a,b){this.type=aa.UpdateExpression;this.operator=a;this.argument=b;this.prefix=!1;this.finish();return this},finishProgram:function(a){this.type=aa.Program;this.body=a;this.finish();return this},finishProperty:function(a,b,c,d,e){this.type=aa.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=aa.ReturnStatement;
this.argument=a;this.finish();return this},finishUnaryExpression:function(a,b){this.type="++"===a||"--"===a?aa.UpdateExpression:aa.UnaryExpression;this.operator=a;this.argument=b;this.prefix=!0;this.finish();return this},finishVariableDeclaration:function(a,b){this.type=aa.VariableDeclaration;this.declarations=a;this.kind=b;this.finish();return this},finishVariableDeclarator:function(a,b){this.type=aa.VariableDeclarator;this.id=a;this.init=b;this.finish();return this}};m.version="2.0.0-dev";m.tokenize=
function(a,b){var c,d;c=String;"string"===typeof a||a instanceof String||(a=c(a));I=a;A=0;ba=0<I.length?1:0;da=0;la=I.length;U=null;X={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1};J={};b=b||{};b.tokens=!0;J.tokens=[];J.tokenize=!0;J.openParenToken=-1;J.openCurlyToken=-1;J.range="boolean"===typeof b.range&&b.range;J.loc="boolean"===typeof b.loc&&b.loc;"boolean"===typeof b.comment&&b.comment&&(J.comments=[]);"boolean"===typeof b.tolerant&&b.tolerant&&(J.errors=
[]);try{z();if(U.type===N.EOF)return J.tokens;for(y();U.type!==N.EOF;)try{y()}catch(gb){if(J.errors){J.errors.push(gb);break}else throw gb;}Ta();d=J.tokens;"undefined"!==typeof J.comments&&(d.comments=J.comments);"undefined"!==typeof J.errors&&(d.errors=J.errors)}catch(gb){throw gb;}finally{J={}}return d};m.parse=function(a,b){var c,d;d=String;"string"===typeof a||a instanceof String||(a=d(a));I=a;A=0;ba=0<I.length?1:0;da=0;la=I.length;U=null;X={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,
inIteration:!1,inSwitch:!1,lastCommentStart:-1};J={};"undefined"!==typeof b&&(J.range="boolean"===typeof b.range&&b.range,J.loc="boolean"===typeof b.loc&&b.loc,J.attachComment="boolean"===typeof b.attachComment&&b.attachComment,J.loc&&null!==b.source&&void 0!==b.source&&(J.source=d(b.source)),"boolean"===typeof b.tokens&&b.tokens&&(J.tokens=[]),"boolean"===typeof b.comment&&b.comment&&(J.comments=[]),"boolean"===typeof b.tolerant&&b.tolerant&&(J.errors=[]),J.attachComment&&(J.range=!0,J.comments=
[],J.bottomRightStack=[],J.trailingComments=[],J.leadingComments=[]));try{var f;e();z();f=new D;na=!1;var h;d=[];for(var g,k,l;A<la;){g=U;if(g.type!==N.StringLiteral)break;h=Ka();d.push(h);if(h.expression.type!==aa.Literal)break;k=I.slice(g.start+1,g.end-1);"use strict"===k?(na=!0,l&&Z(l,ha.StrictOctalLiteral)):!l&&g.octal&&(l=g)}for(;A<la;){h=Ka();if("undefined"===typeof h)break;d.push(h)}c=f.finishProgram(d);"undefined"!==typeof J.comments&&(c.comments=J.comments);"undefined"!==typeof J.tokens&&
(Ta(),c.tokens=J.tokens);"undefined"!==typeof J.errors&&(c.errors=J.errors)}catch(Xa){throw Xa;}finally{J={}}return c};m.Syntax=function(){var a,b={};"function"===typeof Object.create&&(b=Object.create(null));for(a in aa)aa.hasOwnProperty(a)&&(b[a]=aa[a]);"function"===typeof Object.freeze&&Object.freeze(b);return b}()})},"esri/arcade/arcadeCompiler":function(){define("require exports ../geometry/Polygon ../geometry/Polyline ../geometry/Point ../geometry/Extent ../geometry/Multipoint ../SpatialReference ./languageUtils ./treeAnalysis ./Dictionary ./Feature ./functions/date ./functions/string ./functions/maths ./functions/geometry ./functions/geomsync ./functions/stats ./ImmutablePathArray ./ImmutablePointArray ../geometry/Geometry".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x,v,C){function y(a,b,c){try{return c(a,null,b)}catch(ga){throw ga;}}function z(a,b){try{switch(b.type){case "EmptyStatement":return"lc.voidOperation";case "VariableDeclarator":return H(a,b);case "VariableDeclaration":for(var d=[],e=0;e<b.declarations.length;e++)d.push(z(a,b.declarations[e]));return d.join("\n")+" \n lastStatement\x3d  lc.voidOperation; \n";case "BlockStatement":return D(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 h="new lc.SizzleFunction( lang.functionDepthchecker(function() { var lastStatement \x3d lc.voidOperation; var lscope \x3d [];\n ",g=0;g<b.params.length;g++){var k=b.params[g].name.toLowerCase(),l=Z(k,a);f.localScope._SymbolsMap[k]=
l;h+="lscope['"+l+"']\x3darguments["+g.toString()+"];\n"}h+=D(f,b.body)+"\n return lastStatement; }, runtimeCtx))";h+="\n lastStatement \x3d lc.voidOperation; \n";void 0!==a.globalScope[e]?d="gscope['"+e+"']\x3d"+h:void 0!==a.globalScope._SymbolsMap[e]?d="gscope['"+a.globalScope._SymbolsMap[e]+"']\x3d"+h:(l=Z(e,a),a.globalScope._SymbolsMap[e]=l,d="gscope['"+l+"']\x3d"+h);return d;case "ReturnStatement":var n;n=null===b.argument?"return lc.voidOperation;":"return "+z(a,b.argument)+";";return n;case "IfStatement":if("AssignmentExpression"===
b.test.type||"UpdateExpression"===b.test.type)throw Error(c.nodeErrorMessage(b.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var p=z(a,b.test),m=V(a),q="var "+m+" \x3d "+p+";\n if ("+m+" \x3d\x3d\x3d true) {\n"+R(a,b.consequent)+"\n }\n",q=null!==b.alternate?q+("else if ("+m+"\x3d\x3d\x3dfalse)   { \n"+R(a,b.alternate)+"}\n"):q+("else if ("+m+"\x3d\x3d\x3dfalse) { \n lastStatement \x3d lc.voidOperation;\n }\n");return q+="else { lang.error({type: '"+b.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); \n}\n";
case "ExpressionStatement":var r;r="AssignmentExpression"===b.expression.type?"lastStatement \x3d lc.voidOperation; "+z(a,b.expression)+" \n ":"lastStatement \x3d "+z(a,b.expression)+";";return r;case "AssignmentExpression":return B(a,b);case "UpdateExpression":return E(a,b);case "BreakStatement":return"break;";case "ContinueStatement":return"continue;";case "ForStatement":d="lastStatement \x3d lc.voidOperation; \n";null!==b.init&&(d+=z(a,b.init));var t=V(a),w=V(a),d=d+("var "+t+" \x3d true;")+"\n do { ";
null!==b.update&&(d+=" if ("+t+"\x3d\x3d\x3dfalse) {\n "+z(a,b.update)+"  \n}\n "+t+"\x3dfalse; \n");null!==b.test&&(d+="var "+w+" \x3d "+z(a,b.test)+";",d+="if ("+w+"\x3d\x3d\x3dfalse) { break; } else if ("+w+"!\x3d\x3dtrue) { lang.error({type: '"+b.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION');   }\n");d+=z(a,b.body);null!==b.update&&(d+="\n "+z(a,b.update));return d+("\n"+t+" \x3d true; \n} while(true);  lastStatement \x3d lc.voidOperation;");case "ForInStatement":var v=V(a),u=V(a),
Q=V(a),x="var "+v+" \x3d "+z(a,b.right)+";\n";"VariableDeclaration"===b.left.type&&(x+=z(a,b.left));var P="VariableDeclaration"===b.left.type?b.left.declarations[0].id.name:b.left.name,P=P.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[P]?d="lscope['"+P+"']":void 0!==a.localScope._SymbolsMap[P]&&(d="lscope['"+a.localScope._SymbolsMap[P]+"']"));""===d&&(void 0!==a.globalScope[P]?d="gscope['"+P+"']":void 0!==a.globalScope._SymbolsMap[P]&&(d="gscope['"+a.globalScope._SymbolsMap[P]+"']"));
x=x+("if ("+v+"\x3d\x3d\x3dnull) {  lastStatement \x3d lc.voidOperation; }\n ")+("else if (lc.isArray("+v+") || lc.isString("+v+")) {")+("var "+u+"\x3d"+v+".length; \n")+("for(var "+Q+"\x3d0; "+Q+"\x3c"+u+"; "+Q+"++) {\n");x+=d+"\x3d"+Q+";\n";x+=z(a,b.body);x+="\n}\n";x+=" lastStatement \x3d lc.voidOperation; \n";x+=" \n}\n";x+="else if (lc.isImmutableArray("+v+")) {";x=x+("var "+u+"\x3d"+v+".length(); \n")+("for(var "+Q+"\x3d0; "+Q+"\x3c"+u+"; "+Q+"++) {\n");x+=d+"\x3d"+Q+";\n";x+=z(a,b.body);x+=
"\n}\n";x+=" lastStatement \x3d lc.voidOperation; \n";x+=" \n}\n";x+="else if (( "+v+" instanceof lang.Dictionary) || ( "+v+" instanceof lang.Feature)) {";x=x+("var "+u+"\x3d"+v+".keys(); \n")+("for(var "+Q+"\x3d0; "+Q+"\x3c"+u+".length; "+Q+"++) {\n");x+=d+"\x3d"+u+"["+Q+"];\n";x+=z(a,b.body);x+="\n}\n";x+=" lastStatement \x3d lc.voidOperation; \n";x+=" \n}\n";return x+"else { lastStatement \x3d lc.voidOperation; } \n";case "Identifier":return Y(a,b);case "MemberExpression":var y;try{d=void 0,d=
!0===b.computed?z(a,b.property):"'"+b.property.name+"'",y="lang.member("+z(a,b.object)+","+d+")"}catch(Ba){throw Ba;}return y;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 C=b.callee.name.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[C]?
d="lscope['"+C+"']":void 0!==a.localScope._SymbolsMap[C]&&(d="lscope['"+a.localScope._SymbolsMap[C]+"']"));""===d&&(void 0!==a.globalScope[C]?d="gscope['"+C+"']":void 0!==a.globalScope._SymbolsMap[C]&&(d="gscope['"+a.globalScope._SymbolsMap[C]+"']"));if(""!==d)for(e="[",f=0;f<b.arguments.length;f++)0<f&&(e+=", "),e+=z(a,b.arguments[f]);else throw Error(c.nodeErrorMessage(b,"RUNTIME","NOTFOUND"));}catch(Ba){throw Ba;}return"lang.callfunc("+d+","+(e+"]")+",runtimeCtx)";case "UnaryExpression":var F;
try{F="lang.unary("+z(a,b.argument)+",'"+b.operator+"')"}catch(Ba){throw Ba;}return F;case "BinaryExpression":var G;try{G="lang.binary("+z(a,b.left)+","+z(a,b.right)+",'"+b.operator+"')"}catch(Ba){throw Ba;}return G;case "LogicalExpression":var K;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)K="(lang.logicalCheck("+z(a,b.left)+") "+b.operator+" lang.logicalCheck("+z(a,b.right)+"))";else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}catch(Ba){throw Ba;}return K;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(z(a,b.elements[e])):
d.push("lang.aCheck("+z(a,b.elements[e])+",'ArrayExpression')");h="["+d.join(",")+"]"}catch(Ba){throw Ba;}return h;case "ObjectExpression":d="lang.dictionary([";for(e=0;e<b.properties.length;e++){var g=b.properties[e],O="Identifier"===g.key.type?"'"+g.key.name+"'":z(a,g.key),L=z(a,g.value);0<e&&(d+=",");d+="lang.strCheck("+O+",'ObjectExpression'),lang.aCheck("+L+", '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(Ba){throw Ba;}}function E(a,b){var c=null,d="";if("MemberExpression"===b.argument.type)return c=z(a,b.argument.object),d=!0===b.argument.computed?z(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 B(a,b){var c=z(a,b.right),d=null,e="";if("MemberExpression"===b.left.type)return d=z(a,
b.left.object),e=!0===b.left.computed?z(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 R(a,b){return"BlockStatement"===b.type?z(a,b):"ReturnStatement"===b.type?z(a,b):"BreakStatement"===b.type?z(a,b):"ContinueStatement"===b.type?z(a,b):"UpdateExpression"===b.type?"lastStatement \x3d "+z(a,b)+";":
"ExpressionStatement"===b.type?z(a,b):"ObjectExpression"===b.type?"lastStatement \x3d "+z(a,b)+";":z(a,b)}function D(a,b){for(var c="",d=0;d<b.body.length;d++)c="ReturnStatement"===b.body[d].type?c+(z(a,b.body[d])+" \n"):"BreakStatement"===b.body[d].type?c+(z(a,b.body[d])+" \n"):"ContinueStatement"===b.body[d].type?c+(z(a,b.body[d])+" \n"):"UpdateExpression"===b.body[d].type?c+("lastStatement \x3d "+z(a,b.body[d])+"; \n"):"ObjectExpression"===b.body[d].type?c+("lastStatement \x3d "+z(a,b.body[d])+
"; \n"):c+(z(a,b.body[d])+" \n");return c}function H(a,b){var c=null===b.init?null:z(a,b.init);c===d.voidOperation&&(c=null);var e=b.id.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[e])return"lscope['"+e+"']\x3d"+c+";";if(void 0!==a.localScope._SymbolsMap[e])return"lscope['"+a.localScope._SymbolsMap[e]+"']\x3d"+c+";";var f=Z(e,a);a.localScope._SymbolsMap[e]=f;return"lscope['"+f+"']\x3d"+c+";"}if(void 0!==a.globalScope[e])return"gscope['"+e+"']\x3d"+c+";";if(void 0!==a.globalScope._SymbolsMap[e])return"gscope['"+
a.globalScope._SymbolsMap[e]+"']\x3d"+c+";";f=Z(e,a);a.globalScope._SymbolsMap[e]=f;return"gscope['"+f+"']\x3d"+c+";"}function O(a,e,f){e=e.toLowerCase();switch(e){case "hasz":return a=a.hasZ,void 0===a?!1:a;case "hasm":return a=a.hasM,void 0===a?!1:a;case "spatialreference":return e=a.spatialReference._arcadeCacheId,void 0===e&&(f=!0,Object.freeze&&Object.isFrozen(a.spatialReference)&&(f=!1),f&&(L++,e=a.spatialReference._arcadeCacheId=L)),a=new b({wkt:a.spatialReference.wkt,wkid:a.spatialReference.wkid}),
void 0!==e&&(a._arcadeCacheId="SPREF"+e.toString()),a}switch(a.type){case "extent":switch(e){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return a=a[e],void 0!==a?a:null;case "type":return"Extent"}break;case "polygon":switch(e){case "rings":return e=d.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(L++,e=L,d.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new x(a.rings,a.spatialReference,
!0===a.hasZ,!0===a.hasM,e);case "type":return"Polygon"}break;case "point":switch(e){case "x":case "y":case "z":case "m":return void 0!==a[e]?a[e]:null;case "type":return"Point"}break;case "polyline":switch(e){case "paths":return e=d.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(L++,e=L,d.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new x(a.paths,a.spatialReference,!0===a.hasZ,!0===a.hasM,e);case "type":return"Polyline"}break;case "multipoint":switch(e){case "points":return e=
d.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(L++,e=L,d.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new v(a.points,a.spatialReference,!0===a.hasZ,!0===a.hasM,e,1);case "type":return"Multipoint"}}throw Error(c.nodeErrorMessage(f,"RUNTIME","PROPERTYNOTFOUND"));}function Y(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(ga){throw ga;}}function T(c){return null===c?"":d.isArray(c)||d.isImmutableArray(c)?"Array":d.isDate(c)?"Date":d.isString(c)?"String":d.isBoolean(c)?"Boolean":d.isNumber(c)?"Number":c instanceof b?"Dictionary":c instanceof e?"Feature":c instanceof k?"Point":
c instanceof a?"Polygon":c instanceof f?"Polyline":c instanceof g?"Multipoint":c instanceof n?"Extent":d.isFunctionParameter(c)?"Function":c===d.voidOperation?"":"number"===typeof c&&isNaN(c)?"Number":"Unrecognised Type"}function F(a,b,c,e){try{if(d.equalityTest(b[c],e))return b[c+1];var f=b.length-c;return 1===f?b[c]:2===f?null:3===f?b[c+2]:F(a,b,c+2,e)}catch(va){throw va;}}function S(a,b,c,e){try{if(!0===e)return b[c+1];if(3===b.length-c)return b[c+2];var f=b[c+2];if(!1===d.isBoolean(f))throw Error("WHEN needs boolean test conditions");
return S(a,b,c+2,f)}catch(va){throw va;}}function K(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];for(var e=K(a.slice(0,d),b),c=K(a.slice(d,c),b),d=[];0<e.length||0<c.length;)if(0<e.length&&0<c.length){var f=b(e[0],c[0]);isNaN(f)&&(f=0);0>=f?(d.push(e[0]),e=e.slice(1)):(d.push(c[0]),c=c.slice(1))}else 0<e.length?(d.push(e[0]),e=e.slice(1)):0<c.length&&(d.push(c[0]),c=c.slice(1));return d}function Z(a,b){b.symbols.symbolCounter++;return"_T"+b.symbols.symbolCounter.toString()}
function V(a){a.symbols.symbolCounter++;return"_Tvar"+a.symbols.symbolCounter.toString()}function G(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 ea(a){console.log(a)}Object.defineProperty(l,"__esModule",{value:!0});var L=0,W={};h.registerFunctions(W,y);t.registerFunctions(W,y);r.registerFunctions(W,y);w.registerFunctions(W,y);q.registerFunctions(W,y);u.registerFunctions(W,y);
W["typeof"]=function(a,b){return y(a,b,function(a,b,c){d.pcCheck(c,1,1);a=T(c[0]);if("Unrecognised Type"===a)throw Error("Unrecognised Type");return a})};W.iif=function(a,b){try{return y(a,b,function(a,b,c){d.pcCheck(c,3,3);if(!1===d.isBoolean(c[0]))throw Error("IF Function must have a boolean test condition");return c[0]?c[1]:c[2]})}catch(sa){throw sa;}};W.decode=function(a,b){try{return y(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 F(a,d,1,d[0])})}catch(sa){throw sa;}};W.when=function(a,b){try{return y(a,b,function(b,c,e){if(3>e.length)throw Error("Missing Parameters");if(0===e.length%2)throw Error("Must have a default value result.");b=e[0];if(!1===d.isBoolean(b))throw Error("WHEN needs boolean test conditions");return S(a,e,0,b)})}catch(sa){throw sa;}};W.top=function(a,b){return y(a,b,function(a,b,c){d.pcCheck(c,2,2);if(d.isArray(c[0]))return d.toNumber(c[1])>=c[0].length?
c[0].slice(0):c[0].slice(0,d.toNumber(c[1]));if(d.isImmutableArray(c[0]))return d.toNumber(c[1])>=c[0].length()?c[0].slice(0):c[0].slice(0,d.toNumber(c[1]));throw Error("Top cannot accept this parameter type");})};W.first=function(a,b){return y(a,b,function(a,b,c){d.pcCheck(c,1,1);return d.isArray(c[0])?0===c[0].length?null:c[0][0]:d.isImmutableArray(c[0])?0===c[0].length()?null:c[0].get(0):null})};W.sort=function(a,b){return y(a,b,function(a,b,c){d.pcCheck(c,1,2);b=c[0];d.isImmutableArray(b)&&(b=
b.toArray());if(!1===d.isArray(b))throw Error("Illegal Argument");if(1<c.length){if(!1===d.isFunctionParameter(c[1]))throw Error("Illegal Argument");b=K(b,function(b,d){return ja.callfunc(c[1],[b,d],a)})}else{if(0===b.length)return[];for(var e={},f=0;f<b.length;f++){var h=T(b[f]);""!==h&&(e[h]=!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 b.slice(0);var f=0,h="",g;for(g in e)f++,h=g;b=
1<f||"String"===h?K(b,function(a,b){if(null===a||void 0===a||a===d.voidOperation)return null===b||void 0===b||b===d.voidOperation?0:1;if(null===b||void 0===b||b===d.voidOperation)return-1;var c=d.toString(a),e=d.toString(b);return c<e?-1:c===e?0:1}):"Number"===h?K(b,function(a,b){return a-b}):"Boolean"===h?K(b,function(a,b){return a===b?0:b?-1:1}):"Date"===h?K(b,function(a,b){return b-a}):b.slice(0)}return b})};for(var ca in W)W[ca]=new d.NativeFunction(W[ca]);var ua=function(){};ua.prototype=W;l.functionHelper=
{fixSpatialReference:d.fixSpatialReference,parseArguments:function(a,b){for(var c=[],d=0;d<b.arguments.length;d++)c.push(z(a,b.arguments[d]));return c},standardFunction:y};l.extend=function(a){for(var b={mode:"sync",compiled:!0,functions:{},signatures:[],standardFunction:y},e=0;e<a.length;e++)a[e].registerFunctions(b);for(var f in b.functions)W[f]=new d.NativeFunction(b.functions[f]),ua.prototype[f]=W[f];for(e=0;e<b.signatures.length;e++)c.addFunctionDeclaration(b.signatures[e],"f")};l.executeScript=
function(a,b,c){return a(b,c)};l.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return c.findFieldLiterals(a,b)};l.validateScript=function(a,b){return c.validateScript(a,b,"simple")};l.referencesMember=function(a,b){return c.referencesMember(a,b)};l.referencesFunction=function(a,b){return c.referencesFunction(a,b)};var ja={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(a,b){if(d.isFunctionParameter(a))throw Error(c.nodeErrorMessage({type:b},"RUNTIME","FUNCTIONCONTEXTILLEGAL"));return a===d.voidOperation?null:a},Dictionary:b,Feature:e,dictionary:function(a){for(var c={},e=0;e<a.length;e+=2){if(d.isFunctionParameter(a[e+1]))throw Error("Illegal Argument");if(!1===d.isString(a[e]))throw Error("Illegal Argument");c[a[e].toString()]=a[e+1]===d.voidOperation?null:a[e+1]}a=new b(c);a.immutable=!1;
return a},strCheck:function(a,b){if(!1===d.isString(a))throw Error("Illegal Argument");return a},unary:function(a,b){if(d.isBoolean(a)){if("!"===b)return!a;if("-"===b)return-1*d.toNumber(a);if("+"===b)return 1*d.toNumber(a);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===b)return-1*d.toNumber(a);if("+"===b)return 1*d.toNumber(a);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));},logicalCheck:function(a){if(!1===
d.isBoolean(a))throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));return a},logical:function(a,b,e){if(d.isBoolean(a)&&d.isBoolean(b))switch(e){case "||":return a||b;case "\x26\x26":return a&&b;default:throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));},binary:function(a,b,e){switch(e){case "\x3d\x3d":return d.equalityTest(a,b);case "\x3d":return d.equalityTest(a,
b);case "!\x3d":return!d.equalityTest(a,b);case "\x3c":return d.greaterThanLessThan(a,b,e);case "\x3e":return d.greaterThanLessThan(a,b,e);case "\x3c\x3d":return d.greaterThanLessThan(a,b,e);case "\x3e\x3d":return d.greaterThanLessThan(a,b,e);case "+":return d.isString(a)||d.isString(b)?d.toString(a)+d.toString(b):d.toNumber(a)+d.toNumber(b);case "-":return d.toNumber(a)-d.toNumber(b);case "*":return d.toNumber(a)*d.toNumber(b);case "/":return d.toNumber(a)/d.toNumber(b);case "%":return d.toNumber(a)%
d.toNumber(b);default:throw Error(c.nodeErrorMessage({type:"BinaryExpression"},"RUNTIME","OPERATORNOTRECOGNISED"));}},assign:function(a,b,e){switch(b){case "\x3d":return a===d.voidOperation?null:a;case "/\x3d":return d.toNumber(e)/d.toNumber(a);case "*\x3d":return d.toNumber(e)*d.toNumber(a);case "-\x3d":return d.toNumber(e)-d.toNumber(a);case "+\x3d":return d.isString(e)||d.isString(a)?d.toString(e)+d.toString(a):d.toNumber(e)+d.toNumber(a);case "%\x3d":return d.toNumber(e)%d.toNumber(a);default:throw Error(c.nodeErrorMessage("AssignmentExpression",
"RUNTIME","OPERATORNOTRECOGNISED"));}},update:function(a,b,c,e){var f=d.toNumber(a[b]);a[b]="++"===c?f+1:f-1;return!1===e?f:"++"===c?f+1:f-1},memberupdate:function(a,c,f,h){var g;if(d.isArray(a))if(d.isNumber(c)){0>c&&(c=a.length+c);if(0>c||c>=a.length)throw Error("Assignment outside of array bounds");g=d.toNumber(a[c]);a[c]="++"===f?g+1:g-1}else throw Error("Invalid Parameter");else if(a instanceof b){if(!1===d.isString(c))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(c))g=
d.toNumber(a.field(c)),a.setField(c,"++"===f?g+1:g-1);else throw Error("Invalid Parameter");}else if(a instanceof e){if(!1===d.isString(c))throw Error("Feature accessor must be a string");if(!0===a.hasField(c))g=d.toNumber(a.field(c)),a.setField(c,"++"===f?g+1:g-1);else throw Error("Invalid Parameter");}else{if(d.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}return!1===h?g:"++"===f?g+1:g-1},assignmember:function(a,c,f,h){if(d.isArray(a))if(d.isNumber(c)){0>
c&&(c=a.length+c);if(0>c||c>a.length)throw Error("Assignment outside of array bounds");if(c===a.length&&"\x3d"!==f)throw Error("Invalid Parameter");a[c]=this.assign(h,f,a[c])}else throw Error("Invalid Parameter");else if(a instanceof b){if(!1===d.isString(c))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(c))a.setField(c,this.assign(h,f,a.field(c)));else{if("\x3d"!==f)throw Error("Invalid Parameter");a.setField(c,this.assign(h,f,null))}}else if(a instanceof e){if(!1===d.isString(c))throw Error("Feature accessor must be a string");
if(!0===a.hasField(c))a.setField(c,this.assign(h,f,a.field(c)));else{if("\x3d"!==f)throw Error("Invalid Parameter");a.setField(c,this.assign(h,f,null))}}else{if(d.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}},member:function(a,f){if(null===a)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","NOTFOUND"));if(a instanceof b||a instanceof e){if(d.isString(f))return a.field(f)}else if(a instanceof C){if(d.isString(f))return O(a,f,"MemberExpression")}else if(d.isArray(a)){if(d.isNumber(f)&&
isFinite(f)&&Math.floor(f)===f){0>f&&(f=a.length+f);if(f>=a.length||0>f)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return a[f]}}else if(d.isString(a)){if(d.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=a.length+f);if(f>=a.length||0>f)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return a[f]}}else if(d.isImmutableArray(a)&&d.isNumber(f)&&isFinite(f)&&Math.floor(f)===f){0>f&&(f=a.length()+f);if(f>=a.length()||0>f)throw Error(c.nodeErrorMessage("MemberExpression",
"RUNTIME","OUTOFBOUNDS"));return a.get(f)}throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","INVALIDTYPE"));},callfunc:function(a,b,c){return a instanceof d.NativeFunction?a.fn(c,b):a instanceof d.SizzleFunction?a.fn.apply(this,b):a.apply(this,b)}};l.compileScript=function(a,c){void 0===c&&(c=null);null===c&&(c={vars:{},customfunctions:{}});var f={globalScope:G(c.vars,W,c.customfunctions),localScope:null,console:ea,symbols:{symbolCounter:0}},f=z(f,a.body[0].body);""===f&&(f="lc.voidOperation;");
var h={lc:d,lang:ja,postProcess:function(a){a instanceof d.ReturnResult&&(a=a.value);a instanceof d.ImplicitResult&&(a=a.value);a===d.voidOperation&&(a=null);if(a===d.breakResult)throw Error("Cannot return BREAK");if(a===d.continueResult)throw Error("Cannot return CONTINUE");if(d.isFunctionParameter(a))throw Error("Cannot return FUNCTION");return a},prepare:function(a,c){c||(c=new p({wkid:102100}));var d=a.vars,f=a.customfunctions,h=new ua;d||(d={});f||(f={});var g=new b({newline:"\n",tab:"\t",singlequote:"'",
doublequote:'"',forwardslash:"/",backwardslash:"\\"});g.immutable=!1;h._SymbolsMap={textformatting:1,infinity:1,pi:1};h.textformatting=g;h.infinity=Number.POSITIVE_INFINITY;h.pi=Math.PI;for(var k in f)h[k]=f[k],h._SymbolsMap[k]=1;for(k in d)h._SymbolsMap[k]=1,h[k]=d[k]&&"esri.Graphic"===d[k].declaredClass?new e(d[k]):d[k];return{spatialReference:c,globalScope:h,localScope:null,console:a.console?a.console:ea,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 "+f+"\n return lastStatement; } \n return this.postProcess(mainBody());")).bind(h)}})},"esri/renderers/SimpleRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../symbols/jsonUtils ./Renderer".split(" "),
function(m,l,a,f,k,n,g){m=m(g,{declaredClass:"esri.renderer.SimpleRenderer",constructor:function(a){if(a&&!a.declaredClass){var d=a;this.symbol=(a=d.symbol)&&(a.declaredClass?a:n.fromJson(a));this.label=d.label;this.description=d.description}else this.symbol=a},getSymbol:function(a){return this.symbol},toJson:function(){var a=l.mixin(this.inherited(arguments),{type:"simple",label:this.label,description:this.description,symbol:this.symbol&&this.symbol.toJson()});return k.fixJson(a)}});a("extend-esri")&&
l.setObject("renderer.SimpleRenderer",m,f);return m})},"esri/renderers/UniqueValueRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../symbols/jsonUtils ./Renderer ../support/expressionUtils".split(" "),function(m,l,a,f,k,n,g,p,d){m=m(p,{declaredClass:"esri.renderer.UniqueValueRenderer",constructor:function(a,b,d,f,k){this.values=[];this._symbols={};this.infos=[];a&&!a.declaredClass?(b=a,this.defaultSymbol=(a=b.defaultSymbol)&&(a.declaredClass?
a:g.fromJson(a)),this.attributeField=b.field1,this.attributeField2=b.field2,this.attributeField3=b.field3,this.fieldDelimiter=b.fieldDelimiter,this.defaultLabel=b.defaultLabel,this.setValueExpression(b.valueExpression),this.valueExpressionTitle=b.valueExpressionTitle,this.legendOptions=b.legendOptions,b.backgroundFillSymbol&&(this.backgroundFillSymbol=g.fromJson(b.backgroundFillSymbol)),l.forEach(b.uniqueValueInfos,this._addValueInfo,this)):(this.defaultSymbol=a,this.attributeField=b,this.attributeField2=
d,this.attributeField3=f,this.fieldDelimiter=k);this._multiple=!!this.attributeField2},addValue:function(c,b){var d=a.isObject(c)?c:{value:c,symbol:b};this._addValueInfo(d)},removeValue:function(a){var b=l.indexOf(this.values,a);-1!==b&&(this.values.splice(b,1),delete this._symbols[a],this.infos.splice(b,1))},getUniqueValueInfo:function(c){var b=this.attributeField,d=c.attributes,f,g;this.valueExpression?b=this._getDataValue(c,this._uvInfo,null,this._cache.uvInfo):this._multiple?(c=this.attributeField2,
f=this.attributeField3,g=[],b&&g.push(d[b]),c&&g.push(d[c]),f&&g.push(d[f]),b=g.join(this.fieldDelimiter||"")):b=a.isFunction(b)?b(c):d[b];return this._symbols[b]},setValueExpression:function(a){this.valueExpression=a;this._uvInfo={valueExpression:a};this._cache.uvInfo=this._createCache(this._uvInfo,!0)},getFieldsUsedInExpressions:function(){var a=this.inherited(arguments);this.valueExpression&&(a=a.concat(d.extractFieldNames(this.valueExpression)));a.sort();return l.filter(a,function(b,c){return 0===
c||a[c-1]!==b})},getSymbol:function(a){return(a=this.getUniqueValueInfo(a))&&a.symbol||this.defaultSymbol},_addValueInfo:function(a){var b=a.value;this.values.push(b);this.infos.push(a);var c=a.symbol;c&&!c.declaredClass&&(a.symbol=g.fromJson(c));this._symbols[b]=a},toJson:function(){var c=n.fixJson,b;b={type:"uniqueValue",field1:this.attributeField,field2:this.attributeField2,field3:this.attributeField3,fieldDelimiter:this.fieldDelimiter,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,
legendOptions:a.clone(this.legendOptions),defaultSymbol:this.defaultSymbol&&this.defaultSymbol.toJson(),defaultLabel:this.defaultLabel,uniqueValueInfos:l.map(this.infos||[],function(b){b=a.mixin({},b);b.symbol=b.symbol&&b.symbol.toJson();b.value+="";return c(b)})};this.backgroundFillSymbol&&(b.backgroundFillSymbol=this.backgroundFillSymbol.toJson());b=a.mixin(this.inherited(arguments),b);return c(b)}});f("extend-esri")&&a.setObject("renderer.UniqueValueRenderer",m,k);return m})},"esri/renderers/ClassBreaksRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../symbols/jsonUtils ./Renderer ../support/expressionUtils".split(" "),
function(m,l,a,f,k,n,g,p,d){m=m(p,{declaredClass:"esri.renderer.ClassBreaksRenderer",constructor:function(a,b){this.breaks=[];this._symbols={};this.infos=[];this.isMaxInclusive=!0;if(a&&!a.declaredClass){var c=a;this.attributeField=c.field;this.setValueExpression(c.valueExpression);this.valueExpressionTitle=c.valueExpressionTitle;this.legendOptions=c.legendOptions;this.defaultSymbol=(a=c.defaultSymbol)&&(a.declaredClass?a:g.fromJson(a));this.backgroundFillSymbol=(a=c.backgroundFillSymbol)&&(a.declaredClass?
a:g.fromJson(a));this._copy(["defaultLabel","classificationMethod:rest","normalizationType:rest","normalizationField","normalizationTotal"],c,this);var d=c.minValue;(c=c.classBreakInfos)&&c[0]&&n.isDefined(c[0].classMaxValue)&&l.forEach(c,function(a){var b=a.classMaxValue;a.minValue=d;d=a.maxValue=b},this);l.forEach(c,this._addBreakInfo,this)}else this.defaultSymbol=a,this.attributeField=b},addBreak:function(c,b,d){c=a.isObject(c)?c:{minValue:c,maxValue:b,symbol:d};this._addBreakInfo(c)},removeBreak:function(a,
b){var c,d=this.breaks,f,g=d.length,k=this._symbols;for(f=0;f<g;f++)if(c=d[f],c[0]==a&&c[1]==b){d.splice(f,1);delete k[a+"-"+b];this.infos.splice(f,1);break}},clearBreaks:function(){this.breaks=[];this._symbols={};this.infos=[]},getBreakIndex:function(c){var b=this.attributeField,d=c.attributes,f=this.breaks,g=f.length,k=this.isMaxInclusive;if(this.valueExpression)c=this._getDataValue(c,this._cbInfo,null,this._cache.cbInfo);else if(a.isFunction(b))c=b(c);else{c=parseFloat(d[b]);var b=this.normalizationType,
l;if(b)if(l=parseFloat(this.normalizationTotal),d=parseFloat(d[this.normalizationField]),"log"===b)c=Math.log(c)*Math.LOG10E;else if("percent-of-total"===b&&!isNaN(l))c=c/l*100;else if("field"===b){if(isNaN(c)||isNaN(d))return-1;c/=d}}if(null!=c&&!isNaN(c)&&"number"===typeof c)for(d=0;d<g;d++)if(b=f[d],b[0]<=c&&(k?c<=b[1]:c<b[1]))return d;return-1},getBreakInfo:function(a){a=this.getBreakIndex(a);return-1!==a?this.infos[a]:null},getSymbol:function(a){return(a=this.breaks[this.getBreakIndex(a)])?this._symbols[a[0]+
"-"+a[1]]:this.defaultSymbol},setMaxInclusive:function(a){this.isMaxInclusive=a},setValueExpression:function(a){this.valueExpression=a;this._cbInfo={valueExpression:a};this._cache.cbInfo=this._createCache(this._cbInfo)},getFieldsUsedInExpressions:function(){var a=this.inherited(arguments);this.valueExpression&&(a=a.concat(d.extractFieldNames(this.valueExpression)));a.sort();return l.filter(a,function(b,c){return 0===c||a[c-1]!==b})},isContinuousRenderer:function(){var a=!1;if(this.infos&&1===this.infos.length)var b=
this.attributeField,d=this.normalizationField,f=this.valueExpression,a=this.getVisualVariablesForType("colorInfo",!1)||[],g=this.getVisualVariablesForType("sizeInfo",!1)||[],k=this.getVisualVariablesForType("opacityInfo",!1)||[],a=a.concat(g).concat(k),a=l.some(a,function(a){return(a.field===b||a.valueExpression===f)&&a.normalizationField==d});return a},_normalizationTypeEnums:[["field","esriNormalizeByField"],["log","esriNormalizeByLog"],["percent-of-total","esriNormalizeByPercentOfTotal"]],_classificationMethodEnums:[["natural-breaks",
"esriClassifyNaturalBreaks"],["equal-interval","esriClassifyEqualInterval"],["quantile","esriClassifyQuantile"],["standard-deviation","esriClassifyStandardDeviation"],["geometrical-interval","esriClassifyGeometricalInterval"],["defined-interval","esriClassifyDefinedInterval"]],_copy:function(a,b,d){l.forEach(a,function(a){var c=a.split(":"),e,f,h;1<c.length&&(a=c[0],e=this["_"+a+"Enums"],"rest"===c[1]?(f="1",h="0"):"sdk"===c[1]&&(f="0",h="1"));c=b[a];if(void 0!==c&&(d[a]=c,e&&f)){var g,k=e.length;
for(g=0;g<k;g++)if(e[g][f]===c){d[a]=e[g][h];break}}},this)},_addBreakInfo:function(a){var b=a.minValue,c=a.maxValue;this.breaks.push([b,c]);this.infos.push(a);var d=a.symbol;d&&!d.declaredClass&&(a.symbol=g.fromJson(d));this._symbols[b+"-"+c]=a.symbol},toJson:function(){var c=this.infos||[],b=n.fixJson,d=c[0]&&c[0].minValue,f=this.backgroundFillSymbol,c=a.mixin(this.inherited(arguments),{type:"classBreaks",field:this.attributeField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,
legendOptions:a.clone(this.legendOptions),defaultSymbol:this.defaultSymbol&&this.defaultSymbol.toJson(),backgroundFillSymbol:f&&f.toJson(),minValue:-Infinity===d?-Number.MAX_VALUE:d,classBreakInfos:l.map(c,function(c){c=a.mixin({},c);c.symbol=c.symbol&&c.symbol.toJson();c.classMaxValue=Infinity===c.maxValue?Number.MAX_VALUE:c.maxValue;delete c.minValue;delete c.maxValue;return b(c)})});this._copy(["defaultLabel","classificationMethod:sdk","normalizationType:sdk","normalizationField","normalizationTotal"],
this,c);c.hasOwnProperty("normalizationType")&&!c.normalizationType&&delete c.normalizationType;c.hasOwnProperty("classificationMethod")&&!c.classificationMethod&&delete c.classificationMethod;return b(c)}});f("extend-esri")&&a.setObject("renderer.ClassBreaksRenderer",m,k);return m})},"esri/renderers/TemporalRenderer":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","./Renderer"],function(m,l,a,f,k){m=m(k,{declaredClass:"esri.renderer.TemporalRenderer",constructor:function(a,
f,k,d){this.observationRenderer=a;this.latestObservationRenderer=f;this.trackRenderer=k;this.observationAger=d},getSymbol:function(a){var f=a.getLayer(),k=this.getObservationRenderer(a),d=k&&k.getSymbol(a),c=this.observationAger;f.timeInfo&&f._map.timeExtent&&k===this.observationRenderer&&c&&d&&(d=c.getAgedSymbol(d,a));return d},getObservationRenderer:function(a){return 0===a.getLayer()._getKind(a)?this.observationRenderer:this.latestObservationRenderer||this.observationRenderer},toJson:function(){var a=
{type:"temporal"};a.observationRenderer=this.observationRenderer.toJson();this.latestObservationRenderer&&(a.latestObservationRenderer=this.latestObservationRenderer.toJson());this.trackRenderer&&(a.trackRenderer=this.trackRenderer.toJson());this.observationAger&&(a.observationAger=this.observationAger.toJson());return a}});a("extend-esri")&&l.setObject("renderer.TemporalRenderer",m,f);return m})},"esri/renderers/SymbolAger":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],
function(m,l,a,f){m=m(null,{declaredClass:"esri.renderer.SymbolAger",getAgedSymbol:function(a,f){},_setSymbolSize:function(a,f){switch(a.type){case "simplemarkersymbol":a.setSize(f);break;case "picturemarkersymbol":a.setWidth(f);a.setHeight(f);break;case "simplelinesymbol":case "cartographiclinesymbol":a.setWidth(f);break;case "simplefillsymbol":case "picturefillsymbol":a.outline&&a.outline.setWidth(f)}}});a("extend-esri")&&l.setObject("renderer.SymbolAger",m,f);return m})},"esri/renderers/TimeClassBreaksAger":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has dojo/date ../kernel ../lang ../symbols/jsonUtils ../Color ./SymbolAger".split(" "),
function(m,l,a,f,k,n,g,p,d,c){var b=m(c,{declaredClass:"esri.renderer.TimeClassBreaksAger",constructor:function(a,b){this.infos=a;this.timeUnits=b||"day";a.sort(function(a,b){return a.minAge<b.minAge?-1:a.minAge>b.minAge?1:0})},getAgedSymbol:function(a,b){var c=b.getLayer(),d=b.attributes,e=g.isDefined;a=p.fromJson(a.toJson());var f=c._map.timeExtent.endTime;if(!f)return a;var h=k.difference(new Date(d[c._startTimeField]),f,this.timeUnits);l.some(this.infos,function(b){if(h>=b.minAge&&h<=b.maxAge){var c=
b.color,d=b.size;b=b.alpha;c&&a.setColor(c);e(d)&&this._setSymbolSize(a,d);e(b)&&a.color&&(a.color.a=b);return!0}},this);return a},toJson:function(){var a={agerClassBreakInfos:[]},b,c,f;a.timeUnits=this._getRestUnits(this.timeUnits);for(b=0;b<this.infos.length;b+=1)c=this.infos[b],f={},f.oldestAge=Infinity===c.maxAge?null:c.maxAge,f.size=c.size,c.color&&(f.color=d.toJsonColor(c.color)),c.alpha&&(f.alpha=Math.round(255*c.alpha)),a.agerClassBreakInfos[b]=f;return a},_getRestUnits:function(a){var c=
"esriTimeUnitsDays";switch(a){case b.UNIT_SECONDS:c="esriTimeUnitsSeconds";break;case b.UNIT_MILLISECONDS:c="esriTimeUnitsMilliseconds";break;case b.UNIT_HOURS:c="esriTimeUnitsHours";break;case b.UNIT_MINUTES:c="esriTimeUnitsMinutes";break;case b.UNIT_MONTHS:c="esriTimeUnitsMonths";break;case b.UNIT_WEEKS:c="esriTimeUnitsWeeks";break;case b.UNIT_YEARS:c="esriTimeUnitsYears"}return c}});a.mixin(b,{UNIT_DAYS:"day",UNIT_HOURS:"hour",UNIT_MILLISECONDS:"millisecond",UNIT_MINUTES:"minute",UNIT_MONTHS:"month",
UNIT_SECONDS:"second",UNIT_WEEKS:"week",UNIT_YEARS:"year"});f("extend-esri")&&a.setObject("renderer.TimeClassBreaksAger",b,n);return b})},"esri/renderers/TimeRampAger":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/has ../kernel ../symbols/jsonUtils ../Color ./SymbolAger".split(" "),function(m,l,a,f,k,n,g,p){m=m(p,{declaredClass:"esri.renderer.TimeRampAger",constructor:function(a,c,b){this.colorRange=a;this.sizeRange=c;this.alphaRange=b},getAgedSymbol:function(d,c){var b=
c.getLayer(),e=c.attributes;d=n.fromJson(d.toJson());var f=b._map.timeExtent,g=f.startTime,f=f.endTime;if(!g||!f)return d;g=g.getTime();f=f.getTime();b=new Date(e[b._startTimeField]);b=b.getTime();b<g&&(b=g);g=f===g?1:(b-g)/(f-g);if(b=this.sizeRange)e=b[0],f=b[1],b=Math.abs(f-e)*g,this._setSymbolSize(d,e<f?e+b:e-b);if(b=this.colorRange){var f=b[0],k=b[1],l=Math.round,e=new a,p=f.r,m=k.r,b=Math.abs(m-p)*g;e.r=l(p<m?p+b:p-b);p=f.g;m=k.g;b=Math.abs(m-p)*g;e.g=l(p<m?p+b:p-b);p=f.b;m=k.b;b=Math.abs(m-
p)*g;e.b=l(p<m?p+b:p-b);f=f.a;k=k.a;b=Math.abs(k-f)*g;e.a=f<k?f+b:f-b;d.setColor(e)}e=d.color;(b=this.alphaRange)&&e&&(f=b[0],k=b[1],b=Math.abs(k-f)*g,e.a=f<k?f+b:f-b);return d},toJson:function(){var a={};this.sizeRange&&(a.sizeRange=this.sizeRange);this.colorRange&&(a.colorRange=[g.toJsonColor(this.colorRange[0]),g.toJsonColor(this.colorRange[1])]);this.alphaRange&&(a.alphaRange=[Math.round(255*this.alphaRange[0]),Math.round(255*this.alphaRange[1])]);return a}});f("extend-esri")&&l.setObject("renderer.TimeRampAger",
m,k);return m})},"esri/renderers/StretchRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ../layers/RasterFunction ./colorRampUtils".split(" "),function(m,l,a,f,k,n,g,p){var d={TYPE_NONE:"none",TYPE_STANDARDDEVIATION:"standardDeviation",TYPE_HISTOGRAMEQUALIZATION:"histogramEqualization",TYPE_MINMAX:"minMax",TYPE_PERCENTCLIP:"percentClip",TYPE_SIGMOID:"sigmoid"};m=m(null,{declaredClass:"esri.renderer.StretchRenderer",constructor:function(c){c=
c||{};this.stretchType=d.TYPE_NONE;this.dra=!0;this.statistics=[];this.gamma=[];this.computeGamma=this.useGamma=!1;this.sigmoidStrengthLevel=this.numberOfStandardDeviations=this.minPercent=this.maxPercent=this.min=this.max=null;a.mixin(this,c);this.colorRamp=p.fromJson(c.colorRamp)},toJson:function(){var c={type:"rasterStretch",stretchType:this.stretchType,colorRamp:this.colorRamp&&this.colorRamp.toJson(),min:this.min,max:this.max,numberOfStandardDeviations:this.numberOfStandardDeviations,statistics:a.clone(this.statistics),
dra:this.dra,minPercent:this.minPercent,maxPercent:this.maxPercent,useGamma:this.useGamma,gamma:a.clone(this.gamma),computeGamma:this.computeGamma,sigmoidStrengthLevel:this.sigmoidStrengthLevel};return n.fixJson(c)},toRenderingRule:function(a){a=a||{};var b=new g;b.functionName="Stretch";var c=this._convertStretchTypeEnumToIndex(this.stretchType),d={StretchType:c,Statistics:this.statistics,DRA:this.dra,UseGamma:this.useGamma,Gamma:this.gamma,ComputeGamma:this.computeGamma};n.isDefined(this.min)&&
(d.Min=this.min);n.isDefined(this.min)&&(d.Max=this.max);3===c?(d.NumberOfStandardDeviations=this.numberOfStandardDeviations,b.outputPixelType="U8"):6===c?(d.MinPercent=parseFloat(this.minPercent),d.MaxPercent=parseFloat(this.maxPercent),b.outputPixelType="U8"):5===c?b.outputPixelType="U8":9===c&&(d.SigmoidStrengthLevel=this.sigmoidStrengthLevel);b.functionArguments=d;b.variableName="Raster";return this.colorRamp?(c=new g,d=p.getColorRampName(this.colorRamp),c.functionArguments=d?{colorRamp:d}:a.convertToColormap?
{Colormap:p.convertColorRampToColormap(this.colorRamp,256)}:{colorRamp:this.colorRamp.toJson()},c.variableName="Raster",c.functionName="Colormap",c.functionArguments.Raster=b,c):b},_convertStretchTypeEnumToIndex:function(a){var b=0;a===d.TYPE_STANDARDDEVIATION?b=3:a===d.TYPE_HISTOGRAMEQUALIZATION?b=4:a===d.TYPE_MINMAX?b=5:a===d.TYPE_PERCENTCLIP?b=6:a===d.TYPE_SIGMOID&&(b=9);return b},_convertStretchTypeIndexToEnum:function(a){var b=0;3===a?b=d.TYPE_STANDARDDEVIATION:4===a?b=d.TYPE_HISTOGRAMEQUALIZATION:
5===a?b=d.TYPE_MINMAX:6===a?b=d.TYPE_PERCENTCLIP:9===a&&(b=d.TYPE_SIGMOID);return b}});a.mixin(m,d);f("extend-esri")&&a.setObject("renderer.StretchRenderer",m,k);return m})},"esri/layers/RasterFunction":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(m,l,a,f,k){var n=m(null,{declaredClass:"esri.layers.RasterFunction",functionName:null,arguments:null,functionArguments:null,variableName:null,outputPixelType:null,constructor:function(a){if(l.isObject(a)){var f=
0;this.functionName=a.rasterFunction;this.functionArguments=l.clone(a.rasterFunctionArguments||a.arguments);l.mixin(this,a);if(a=this.functionArguments)if(a.Raster=this._toRasterFunction(a.Raster),a.Raster2=this._toRasterFunction(a.Raster2),a.DEM=this._toRasterFunction(a.DEM),a.FillRaster=this._toRasterFunction(a.FillRaster),a.Rasters&&a.Rasters.length)for(f=0;f<a.Rasters.length;f++)a.Rasters[f]=this._toRasterFunction(a.Rasters[f])}},_toRasterFunction:function(a){return a&&(a.rasterFunction||a.functionName)?
new n(a):a},_rfToJson:function(a){a&&"esri.layers.RasterFunction"===a.declaredClass&&(a=a.toJson());return a},toJson:function(){var a=l.clone(this.functionArguments||this.arguments);if(a&&(a.Raster=this._rfToJson(a.Raster),a.Raster2=this._rfToJson(a.Raster2),a.DEM=this._rfToJson(a.DEM),a.FillRaster=this._rfToJson(a.FillRaster),a.Rasters&&a.Rasters.length)){var f,d=[];for(f=0;f<a.Rasters.length;f++)d.push(this._rfToJson(a.Rasters[f]));a.Rasters=d}return k.filter({rasterFunction:this.functionName,rasterFunctionArguments:a,
variableName:this.variableName,outputPixelType:this.outputPixelType?this.outputPixelType:null},function(a){if(null!==a&&void 0!==a)return!0})}});a("extend-esri")&&l.setObject("layers.RasterFunction",n,f);return n})},"esri/renderers/colorRampUtils":function(){define("dojo/_base/lang dojo/_base/array dojo/store/Memory ../tasks/AlgorithmicColorRamp ../tasks/MultipartColorRamp ../Color ./colorUtils".split(" "),function(m,l,a,f,k,n,g){function p(a,b,d){if(a){b=b||h;d=d||t;var e=null,f=a.declaredClass,
g,k;if((g="string"===typeof a?a:a.name)&&l.some(d,function(a){if(a.name===g)return e=a.id,!0})&&e)return e;"esri.tasks.AlgorithmicColorRamp"===f?l.some(b,function(b){if(c(a.fromColor.toRgb(),b.fromColor)&&c(a.toColor.toRgb(),b.toColor))return e=b.id,!0},this):"esri.tasks.MultipartColorRamp"===f&&l.some(b,function(b){if(a.colorRamps&&b.colorRamps&&a.colorRamps.length===b.colorRamps.length&&(k=a.colorRamps,!l.some(b.colorRamps,function(a,b){if(!c(k[b].fromColor.toRgb(),a.fromColor)||!c(k[b].toColor.toRgb(),
a.toColor))return!0},this))){if(e)return!0;e=b.id}},this);return e}}function d(a){var b=new f,c=a.algorithm;b.fromColor=n.toDojoColor(a.fromColor);b.toColor=n.toDojoColor(a.toColor);"esriCIELabAlgorithm"===c?b.algorithm="cie-lab":"esriHSVAlgorithm"===c?b.algorithm="hsv":"esriLabLChAlgorithm"===c&&(b.algorithm="lab-lch");return b}function c(a,b){return a&&b&&a.length&&b.length&&a.length===b.length?!l.some(a,function(a,c){if(a>b[c]+2||a<b[c]-2)return!0}):!1}function b(a,b,c){a=g.toLAB(a);b=g.toLAB(b);
return g.toRGB({l:a.l*(1-c)+c*b.l,a:a.a*(1-c)+c*b.a,b:a.b*(1-c)+c*b.b})}var e={},h=[{id:"none",selected:!0},{id:"aspect_predefined",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,
57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"blackToWhite_predefined",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blueBright_predefined",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blueLightToDark_predefined",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blueGreenBright_predefined",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blueGreenLightToDark_predefined",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brownLightToDark_predefined",fromColor:[240,236,170],toColor:[102,
72,48]},{id:"brownToBlueGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brownToBlueGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficientBias_predefined",fromColor:[214,214,255],toColor:[0,57,148]},{id:"coldToHotDiverging_predefined",type:"multipart",colorRamps:[{fromColor:[69,
117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"conditionNumber_predefined",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyanToPurple_predefined",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyanLightToBlueDark_predefined",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,
131,224],toColor:[9,9,145]}]},{id:"distance_predefined",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1_predefined",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2_predefined",type:"multipart",
colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors_predefined",fromColor:[255,235,214],toColor:[196,10,10]},{id:"grayLightToDark_predefined",fromColor:[219,219,219],toColor:[69,69,69]},{id:"greenBright_predefined",
fromColor:[204,255,204],toColor:[14,204,14]},{id:"greenLightToDark_predefined",fromColor:[220,245,233],toColor:[34,102,51]},{id:"greenToBlue_predefined",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orangeBright_predefined",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orangeLightToDark_predefined",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partialSpectrum_predefined",type:"multipart",colorRamps:[{fromColor:[242,
241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partialSpectrum1Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partialSpectrum2Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[115,
77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pinkToYellowGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pinkToYellowGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,
15]}]},{id:"precipitation_predefined",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction_predefined",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purpleBright_predefined",fromColor:[255,204,255],toColor:[199,
0,199]},{id:"purpleToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purpleToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purpleBlueBright_predefined",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purpleBlueLightToDark_predefined",fromColor:[229,213,242],toColor:[93,44,112]},
{id:"purpleRedBright_predefined",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purpleRedLightToDark_predefined",fromColor:[250,215,246],toColor:[143,17,57]},{id:"redBright_predefined",fromColor:[255,204,204],toColor:[219,0,0]},{id:"redLightToDark_predefined",fromColor:[255,224,224],toColor:[143,10,10]},{id:"redToBlueDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"redToBlueDivergingDark_predefined",
type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"redToGreen_predefined",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"redToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"redToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,
21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope_predefined",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrumFullBright_predefined",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrumFullDark_predefined",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,
153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrumFullLight_predefined",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface_predefined",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},
{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature_predefined",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"whiteToBlack_predefined",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellowToDarkRed_predefined",
type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellowToGreenToDarkBlue_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellowToRed_predefined",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellowGreenBright_predefined",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellowGreenLightToDark_predefined",
fromColor:[215,240,175],toColor:[96,107,45]}],t=[{name:"Aspect",id:"aspect_predefined"},{name:"Black to White",id:"blackToWhite_predefined"},{name:"Blue Bright",id:"blueBright_predefined"},{name:"Blue Light to Dark",id:"blueLightToDark_predefined"},{name:"Blue-Green Bright",id:"blueGreenBright_predefined"},{name:"Blue-Green Light to Dark",id:"blueGreenLightToDark_predefined"},{name:"Brown Light to Dark",id:"brownLightToDark_predefined"},{name:"Brown to Blue Green Diverging, Bright",id:"brownToBlueGreenDivergingBright_predefined"},
{name:"Brown to Blue Green Diverging, Dark",id:"brownToBlueGreenDivergingDark_predefined"},{name:"Coefficient Bias",id:"coefficientBias_predefined"},{name:"Cold to Hot Diverging",id:"coldToHotDiverging_predefined"},{name:"Condition Number",id:"conditionNumber_predefined"},{name:"Cyan to Purple",id:"cyanToPurple_predefined"},{name:"Cyan-Light to Blue-Dark",id:"cyanLightToBlueDark_predefined"},{name:"Distance",id:"distance_predefined"},{id:"elevation1_predefined",name:"Elevation #1"},{id:"elevation2_predefined",
name:"Elevation #2"},{id:"errors_predefined",name:"Errors"},{id:"grayLightToDark_predefined",name:"Gray Light to Dark"},{id:"greenBright_predefined",name:"Green Bright"},{id:"greenLightToDark_predefined",name:"Green Light to Dark"},{name:"Green to Blue",id:"greenToBlue_predefined"},{name:"Orange Bright",id:"orangeBright_predefined"},{name:"Orange Light to Dark",id:"orangeLightToDark_predefined"},{id:"partialSpectrum_predefined",name:"Partial Spectrum"},{id:"partialSpectrum1Diverging_predefined",name:"Partial Spectrum 1 Diverging",
type:"multipart"},{id:"partialSpectrum2Diverging_predefined",name:"Partial Spectrum 2 Diverging"},{name:"Pink to YellowGreen Diverging, Bright",id:"pinkToYellowGreenDivergingBright_predefined"},{name:"Pink to YellowGreen Diverging, Dark",id:"pinkToYellowGreenDivergingDark_predefined"},{id:"precipitation_predefined",name:"Precipitation"},{id:"prediction_predefined",name:"Prediction"},{name:"Purple Bright",id:"purpleBright_predefined"},{id:"purpleToGreenDivergingBright_predefined",name:"Purple to Green Diverging, Bright"},
{id:"purpleToGreenDivergingDark_predefined",name:"Purple to Green Diverging, Dark"},{name:"Purple-Blue Bright",id:"purpleBlueBright_predefined"},{name:"Purple-Blue Light to Dark",id:"purpleBlueLightToDark_predefined"},{name:"Purple-Red Bright",id:"purpleRedBright_predefined"},{name:"Purple-Red Light to Dark",id:"purpleRedLightToDark_predefined"},{name:"Red Bright",id:"redBright_predefined"},{name:"Red Light to Dark",id:"redLightToDark_predefined"},{id:"redToBlueDivergingBright_predefined",name:"Red to Blue Diverging, Bright"},
{id:"redToBlueDivergingDark_predefined",name:"Red to Blue Diverging, Dark"},{id:"redToGreen_predefined",name:"Red to Green"},{id:"redToGreenDivergingBright_predefined",name:"Red to Green Diverging, Bright"},{id:"redToGreenDivergingDark_predefined",name:"Red to Green Diverging, Dark"},{name:"Slope",id:"slope_predefined"},{id:"spectrumFullBright_predefined",name:"Spectrum-Full Bright"},{id:"spectrumFullDark_predefined",name:"Spectrum-Full Dark"},{id:"spectrumFullLight_predefined",name:"Spectrum-Full Light"},
{id:"surface_predefined",name:"Surface"},{id:"temperature_predefined",name:"Temperature"},{name:"White to Black",id:"whiteToBlack_predefined"},{id:"yellowToDarkRed_predefined",name:"Yellow to Dark Red"},{id:"yellowToGreenToDarkBlue_predefined",name:"Yellow to Green to Dark Blue"},{name:"Yellow to Red",id:"yellowToRed_predefined"},{name:"Yellow-Green Bright",id:"yellowGreenBright_predefined"},{name:"Yellow-Green Light to Dark",id:"yellowGreenLightToDark_predefined"}],r=new a({data:t});m.mixin(e,{predefinedColorRamps:h,
predefinedColorRampNameMap:t,getColorRampName:function(a){return(a=p(a))?(a=r.query({id:a}),a[0]?a[0].name:null):null},fromJson:function(a){var b=null;if(!a)return b;"multipart"===a.type?(b=new k,b.colorRamps=l.map(a.colorRamps,function(a){return d(a)},this)):"algorithmic"===a.type&&(b=d(a));return b},colorsEqual:c,getColorRampId:p,convertColorRampToColormap:function(a,c){if(a&&c){for(var d=a.colorRamps?a.colorRamps.length:1,e=[],f=[],h,k,n,p,m,r=0,w=0,r=0;r<d;r++)e[r]={},e[r].start=w,e[r].end=w+
1/d,w=e[r].end;for(r=0;r<c;r++)p=(r+.5)/c,l.forEach(e,function(c,d){p>=c.start&&p<c.end&&(m=(p-c.start)/(c.end-c.start),1<e.length?(h=g.getDojoColor(a.colorRamps[d].fromColor),k=g.getDojoColor(a.colorRamps[d].toColor)):(h=g.getDojoColor(a.fromColor),k=g.getDojoColor(a.toColor)),n=b(h,k,m),f.push([r,n.r,n.g,n.b]))},this);return f}},interpolateLabColor:b});return e})},"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(m,l,a){return m("dojo.store.Memory",
null,{constructor:function(a){for(var f in a)this[f]=a[f];this.setData(this.data||[])},data:null,idProperty:"id",index:null,queryEngine:a,get:function(a){return this.data[this.index[a]]},getIdentity:function(a){return a[this.idProperty]},put:function(a,k){var f=this.data,g=this.index,l=this.idProperty,l=a[l]=k&&"id"in k?k.id:l in a?a[l]:Math.random();if(l in g){if(k&&!1===k.overwrite)throw Error("Object already exists");f[g[l]]=a}else g[l]=f.push(a)-1;return l},add:function(a,k){(k=k||{}).overwrite=
!1;return this.put(a,k)},remove:function(a){var f=this.index,l=this.data;if(a in f)return l.splice(f[a],1),this.setData(l),!0},query:function(a,k){return l(this.queryEngine(a,k)(this.data))},setData:function(a){a.items?(this.idProperty=a.identifier||this.idProperty,a=this.data=a.items):this.data=a;this.index={};for(var f=0,l=a.length;f<l;f++)this.index[a[f][this.idProperty]]=f}})})},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../when"],function(m,l,
a){var f=function(k){function n(l){k[l]=function(){var d=arguments,c=a(k,function(a){Array.prototype.unshift.call(d,a);return f(m[l].apply(m,d))});if("forEach"!==l||g)return c}}if(!k)return k;var g=!!k.then;g&&(k=l.delegate(k));n("forEach");n("filter");n("map");null==k.total&&(k.total=a(k,function(a){return a.length}));return k};l.setObject("dojo.store.util.QueryResults",f);return f})},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(m){return function(l,a){function f(f){f=
m.filter(f,l);var g=a&&a.sort;g&&f.sort("function"==typeof g?g:function(a,c){for(var b,d=0;b=g[d];d++){var f=a[b.attribute],k=c[b.attribute],f=null!=f?f.valueOf():f,k=null!=k?k.valueOf():k;if(f!=k)return!!b.descending==(null==f||f>k)?-1:1}return 0});if(a&&(a.start||a.count)){var k=f.length;f=f.slice(a.start||0,(a.start||0)+(a.count||Infinity));f.total=k}return f}switch(typeof l){default:throw Error("Can not query with a "+typeof l);case "object":case "undefined":var k=l;l=function(a){for(var f in k){var l=
k[f];if(l&&l.test){if(!l.test(a[f],a))return!1}else if(l!=a[f])return!1}return!0};break;case "string":if(!this[l])throw Error("No filter function "+l+" was found in store");l=this[l];case "function":}f.matches=l;return f}})},"esri/tasks/AlgorithmicColorRamp":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../Color ./ColorRamp".split(" "),function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.tasks.AlgorithmicColorRamp",type:"algorithmic",fromColor:null,toColor:null,algorithm:null,
toJson:function(){var a;switch(this.algorithm&&this.algorithm.toLowerCase()){case "cie-lab":a="esriCIELabAlgorithm";break;case "hsv":a="esriHSVAlgorithm";break;case "lab-lch":a="esriLabLChAlgorithm"}a={type:"algorithmic",algorithm:a};a.fromColor=k.toJsonColor(this.fromColor);a.toColor=k.toJsonColor(this.toColor);return a}});a("extend-esri")&&l.setObject("tasks.AlgorithmicColorRamp",m,f);return m})},"esri/tasks/ColorRamp":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],
function(m,l,a,f){m=m(null,{declaredClass:"esri.tasks.ColorRamp",type:null});a("extend-esri")&&l.setObject("tasks.ColorRamp",m,f);return m})},"esri/tasks/MultipartColorRamp":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../symbols/Symbol ./ColorRamp".split(" "),function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.tasks.MultipartColorRamp",type:"multipart",constructor:function(){this.colorRamps=[]},addColorRamp:function(a){this.colorRamps.push(a)},toJson:function(){return{type:"multipart",
colorRamps:a.map(this.colorRamps,function(a){return a.toJson()})}}});f("extend-esri")&&l.setObject("tasks.MultipartColorRamp",m,k);return m})},"esri/renderers/colorUtils":function(){define(["dojo/_base/Color","dojo/_base/array"],function(m,l){var a={COEF_RGB2XYZ:[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],COEF_XYZ2RGB:[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],matrixProduct:function(a,f){var g=[],k,d;if(a[0].length!==f.length)throw"dimensions do not match";
var c=a.length,b=a[0].length,e=0;for(k=0;k<c;k++){for(d=e=0;d<b;d++)e+=a[k][d]*f[d];g.push(e)}return g},rgb2xyz:function(a){a=[a.r/255,a.g/255,a.b/255].map(function(a){return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)});a=this.matrixProduct(this.COEF_RGB2XYZ,a);return{x:100*a[0],y:100*a[1],z:100*a[2]}},xyz2rgb:function(a){a=this.matrixProduct(this.COEF_XYZ2RGB,[a.x/100,a.y/100,a.z/100]).map(function(a){return Math.min(1,Math.max(.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055,0))});return{r:Math.round(255*
a[0]),g:Math.round(255*a[1]),b:Math.round(255*a[2])}},xyz2lab:function(a){a=[a.x/95.047,a.y/100,a.z/108.883].map(function(a){return a>Math.pow(6/29,3)?Math.pow(a,1/3):1/3*Math.pow(29/6,2)*a+4/29});return{l:116*a[1]-16,a:500*(a[0]-a[1]),b:200*(a[1]-a[2])}},lab2xyz:function(a){var f=a.l;a=[(f+16)/116+a.a/500,(f+16)/116,(f+16)/116-a.b/200].map(function(a){return a>6/29?Math.pow(a,3):3*Math.pow(6/29,2)*(a-4/29)});return{x:95.047*a[0],y:100*a[1],z:108.883*a[2]}},lab2lch:function(a){var f=a.l,g=a.a,k=a.b;
a=Math.sqrt(g*g+k*k);g=Math.atan2(k,g);g=0<g?g:g+2*Math.PI;return{l:f,c:a,h:g}},lch2lab:function(a){var f=a.c,g=a.h;return{l:a.l,a:f*Math.cos(g),b:f*Math.sin(g)}},rgb2lab:function(a){return this.xyz2lab(this.rgb2xyz(a))},lab2rgb:function(a){return this.xyz2rgb(this.lab2xyz(a))},rgb2lch:function(a){return this.lab2lch(this.xyz2lab(this.rgb2xyz(a)))},lch2rgb:function(a){return this.xyz2rgb(this.lab2xyz(this.lch2lab(a)))}},f={rgb2hsv:function(a){var f=a.r,g=a.g;a=a.b;var k=Math.max(f,g,a),d=k-Math.min(f,
g,a),c;0===d?c=0:k===f?c=(g-a)/d%6:k===g?c=(a-f)/d+2:k===a&&(c=(f-g)/d+4);0>c&&(c+=6);return{h:60*c,s:100*(0===d?0:d/k),v:100/255*k}},hsv2rgb:function(a){var f=(a.h+360)%360/60,g=a.v/100*255;a=a.s/100*g;var k=a*(1-Math.abs(f%2-1));switch(Math.floor(f)){case 0:f={r:a,g:k,b:0};break;case 1:f={r:k,g:a,b:0};break;case 2:f={r:0,g:a,b:k};break;case 3:f={r:0,g:k,b:a};break;case 4:f={r:k,g:0,b:a};break;case 5:case 6:f={r:a,g:0,b:k};break;default:f={r:0,g:0,b:0}}f.r=Math.round(f.r+g-a);f.g=Math.round(f.g+
g-a);f.b=Math.round(f.b+g-a);return f}};return{toRGB:function(k){var l;void 0!==k.r&&void 0!==k.g&&void 0!==k.b?l=k:void 0!==k.l&&void 0!==k.c&&void 0!==k.h?l=a.lch2rgb(k):void 0!==k.l&&void 0!==k.a&&void 0!==k.b?l=a.lab2rgb(k):void 0!==k.x&&void 0!==k.y&&void 0!==k.z?l=a.xyz2rgb(k):void 0!==k.h&&void 0!==k.s&&void 0!==k.v&&(l=f.hsv2rgb(k));return l},toHSV:function(a){if(void 0!==a.h&&void 0!==a.s&&void 0!==a.v)return a;a=this.toRGB(a);return f.rgb2hsv(a)},toLAB:function(f){return void 0!==f.l&&void 0!==
f.a&&void 0!==f.b?f:a.rgb2lab(this.toRGB(f))},toLCH:function(f){return void 0!==f.l&&void 0!==f.c&&void 0!==f.h?f:a.rgb2lch(this.toRGB(f))},toXYZ:function(f){return void 0!==f.x&&void 0!==f.y&&void 0!==f.z?f:a.rgb2xyz(this.toRGB(f))},getDojoColor:function(a){if(a){if(Array.isArray(a))return m.fromArray(a);if(void 0!==a.r&&void 0!==a.g&&void 0!==a.b)return a}},correctRGBLimits:function(a){var f=[a.r,a.g,a.b];l.forEach(f,function(a,k){0>f[k]?f[k]=0:255<f[k]&&(f[k]=255);f[k]=Math.floor(f[k])});return{r:f[0],
g:f[1],b:f[2],a:1}}}})},"esri/renderers/jsonUtils":function(){define("dojo/_base/array dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../Color ../symbols/jsonUtils ./SimpleRenderer ./UniqueValueRenderer ./ClassBreaksRenderer ./VectorFieldRenderer ./DotDensityRenderer ./ScaleDependentRenderer ./TimeClassBreaksAger ./TimeRampAger ./TemporalRenderer ./HeatmapRenderer ./StretchRenderer".split(" "),function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q){var x={fromJson:function(a){var e;switch(a.type||""){case "simple":e=
new p(a);break;case "uniqueValue":e=new d(a);break;case "classBreaks":e=new c(a);break;case "vectorField":e=new b(a);break;case "scaleDependent":e=this._scaleDependentFromJson(a);break;case "dotDensity":e=this._dotDensityFromJson(a);break;case "temporal":e=this._temporalFromJson(a);break;case "heatmap":e=this._heatmapFromJson(a);break;case "rasterStretch":e=new q(a)}return e},_scaleDependentFromJson:function(a){var b={},c=a.minScale;b.rendererInfos=m.map(a.rendererInfos,function(a){var b=a.maxScale;
a={minScale:c,maxScale:b,renderer:a.renderer&&this.fromJson(a.renderer)};c=b;return a},this);return new h(b)},_dotDensityFromJson:function(a){a.backgroundColor&&l.isArray(a.backgroundColor)&&(a.backgroundColor=n.toDojoColor(a.backgroundColor));0<a.dotSize&&(a.dotSize=f.pt2px(a.dotSize));a.fields&&m.forEach(a.fields,function(a){a&&l.isArray(a.color)&&(a.color=n.toDojoColor(a.color))});a.legendOptions&&(a.legendOptions.backgroundColor&&l.isArray(a.legendOptions.backgroundColor)&&(a.legendOptions.backgroundColor=
n.toDojoColor(a.legendOptions.backgroundColor)),a.legendOptions.outline&&(a.legendOptions.outline=g.fromJson(a.legendOptions.outline)));a.outline&&(a.outline=g.fromJson(a.outline));return new e(a)},_temporalFromJson:function(a){var b,c,d;a=a||{};b=this.fromJson(a.observationRenderer);c=a.latestObservationRenderer?this.fromJson(a.latestObservationRenderer):null;d=a.trackRenderer?this.fromJson(a.trackRenderer):null;a=this._agerFromJson(a.observationAger);return new w(b,c,d,a)},_agerFromJson:function(a){var b;
a=a||{};a.colorRange||a.sizeRange||a.alphaRange?b=this._timeRampFromJson(a):a.agerClassBreakInfos&&(b=this._timeClassBreaksFromJson(a));return b},_timeRampFromJson:function(a){var b,c,d;a.colorRange&&1<a.colorRange.length&&(b=[n.toDojoColor(a.colorRange[0]),n.toDojoColor(a.colorRange[1])]);a.sizeRange&&1<a.sizeRange.length&&(c=[a.sizeRange[0],a.sizeRange[1]]);a.alphaRange&&1<a.alphaRange.length&&(d=[a.alphaRange[0]/255,a.alphaRange[1]/255]);return new r(b,c,d)},_timeClassBreaksFromJson:function(a){var b=
a.agerClassBreakInfos,c,d,e=[],f;c=t.UNIT_DAYS;switch(a.timeUnits){case "esriTimeUnitsSeconds":c=t.UNIT_SECONDS;break;case "esriTimeUnitsMilliseconds":c=t.UNIT_MILLISECONDS;break;case "esriTimeUnitsHours":c=t.UNIT_HOURS;break;case "esriTimeUnitsMinutes":c=t.UNIT_MINUTES;break;case "esriTimeUnitsMonths":c=t.UNIT_MONTHS;break;case "esriTimeUnitsWeeks":c=t.UNIT_WEEKS;break;case "esriTimeUnitsYears":c=t.UNIT_YEARS}for(f=0;f<b.length;f+=1)a=b[f],d={minAge:0,maxAge:a.oldestAge||Infinity},a.color&&(d.color=
n.toDojoColor(a.color)),a.alpha&&(d.alpha=a.alpha/255),d.size=a.size,e[f]=d;return new t(e,c)},_heatmapFromJson:function(a){var b=a.colorStops;b&&b instanceof Array&&m.forEach(b,function(a){a.color=n.toDojoColor(a.color)});return new u(a)}};a("extend-esri")&&l.mixin(l.getObject("renderer",!0,k),x);return x})},"esri/renderers/VectorFieldRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/_base/array ../kernel ../lang ../Color ./Renderer ./ClassBreaksRenderer ../symbols/SimpleMarkerSymbol ../symbols/PictureMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/jsonUtils require".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t){var r=m(p,{declaredClass:"esri.renderer.VectorFieldRenderer",iconFolderPath:"../images/symbol/sfs/",constructor:function(a){n.isDefined(a)||(a={});a.attributeField=a.attributeField||"Magnitude";a.rotationInfo=a.rotationInfo||this._getRotationInfo(a);m.safeMixin(this,a);this.setRotationInfo(this.rotationInfo);this.style=this.style||r.STYLE_SINGLE_ARROW;this.singleArrowSymbol&&(this.singleArrowSymbol=this.singleArrowSymbol.declaredClass?this.singleArrowSymbol:h.fromJson(this.singleArrowSymbol));
this.renderer=new d(this._getDefaultSymbol(),a.attributeField);this._updateRenderer(this.style);this.flowRepresentation=this.flowRepresentation||this.FLOW_FROM},getSymbol:function(a){return this.renderer&&this.renderer.getSymbol(a)},setVisualVariables:function(a){a=f.filter(a,function(a){if("sizeInfo"===a.type)return n.isDefined(this._updateSizeInfo(a))},this);this.inherited(arguments);return this},setSizeInfo:function(a){this._updateSizeInfo(a);this.inherited(arguments);return this},setProportionalSymbolInfo:function(a){this.setSizeInfo(a);
return this},setColorInfo:function(a){return this},_updateRenderer:function(a){return n.isDefined(this.renderer)?a===r.STYLE_SINGLE_ARROW?this._createSingleArrowRenderer():a===r.STYLE_BEAUFORT_KN?this._createBeaufortKnotsRenderer():a===r.STYLE_BEAUFORT_METER?this._createBeaufortMeterRenderer():a===r.STYLE_BEAUFORT_FEET?this._createBeaufortFeetRenderer():a===r.STYLE_BEAUFORT_MILE?this._createBeaufortMilesRenderer():a===r.STYLE_BEAUFORT_KM?this._createBeaufortKilometersRenderer():a===r.STYLE_OCEAN_CURRENT_M?
this._createCurrentMeterRenderer():a===r.STYLE_OCEAN_CURRENT_KN?this._createCurrentKnotsRenderer():a===r.STYLE_SCALAR?this._createSimpleScalarRenderer():a===r.STYLE_WIND_BARBS?this._createWindBarbsRenderer():this._createClassifiedArrowRenderer():Error("Invalid Renderer!")},_updateSizeInfo:function(a){return a&&n.isDefined(a.minSize)&&n.isDefined(a.maxSize)&&n.isDefined(a.minDataValue)&&n.isDefined(a.maxDataValue)?(this.style===r.STYLE_WIND_BARBS&&(a.minSize=a.maxSize),a.field=a.field||"Magnitude",
a.type="sizeInfo",a):null},_createClassifiedArrowRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new g([56,168,0]));var a=[0,1E-6,3.5,7,10.5,14];if(n.isDefined(this.minDataValue)&&n.isDefined(this.maxDataValue)){var b=(this.maxDataValue-this.minDataValue)/5,a=[],c,d;d=this.minDataValue;for(c=0;6>c;c++)a[c]=d,d+=b}this._addBreaks(a,[[56,168,0],[139,309,0],[255,255,0],[255,128,0],[255,0,0]])},_createSingleArrowRenderer:function(){this.renderer.defaultSymbol=this.singleArrowSymbol||
this._getDefaultSymbol()},_createBeaufortMeterRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new g([214,47,39]));this._addBreaks([0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7],[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createBeaufortKnotsRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new g([214,47,39]));this._addBreaks([0,
1,3,6,10,16,21,27,33,40,47,55,63],[[40,146,199],[89,162,186],[129,179,171],[160,194,155],[191,212,138],[218,230,119],[250,250,100],[252,213,83],[252,179,102],[250,141,52],[247,110,42],[240,71,29]])},_createBeaufortFeetRenderer:function(){var a=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];f.forEach(a,function(b,c){a[c]*=3.28084});this.renderer.defaultSymbol=this._getDefaultSymbol(new g([214,47,39]));this._addBreaks(a,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],
[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createBeaufortMilesRenderer:function(){var a=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];f.forEach(a,function(b,c){a[c]*=2.23694});this.renderer.defaultSymbol=this._getDefaultSymbol(new g([214,47,39]));this._addBreaks(a,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createBeaufortKilometersRenderer:function(){var a=
[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];f.forEach(a,function(b,c){a[c]*=3.6});this.renderer.defaultSymbol=this._getDefaultSymbol(new g([214,47,39]));this._addBreaks(a,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])},_createCurrentMeterRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new g([177,177,177]));this._addBreaks([0,.5,1,1.5,2],[[78,26,
153],[179,27,26],[202,128,26],[177,177,177]])},_createCurrentKnotsRenderer:function(){this.renderer.defaultSymbol=this._getDefaultSymbol(new g([177,177,177]));this._addBreaks([0,.25,.5,1,1.5,2,2.5,3,3.5,4],[[0,0,0],[0,37,100],[78,26,153],[151,0,100],[179,27,26],[177,78,26],[202,128,26],[177,179,52],[177,177,177]])},_createSimpleScalarRenderer:function(){this.renderer.defaultSymbol=new b({url:t.toUrl(this.iconFolderPath+"scalar.png"),height:20,width:20,type:"esriPMS",angle:0})},_createWindBarbsRenderer:function(){var a=
[],d,f;for(d=0;150>=d;d+=5)a.push(d);f="M20 20 M5 20 A15 15 0 1 0 35 20 A15 15 0 1 0 5 20 M20 20 M10 20 A10 10 0 1 0 30 20 A10 10 0 1 0 10 20;M25 0 L25 40 M25 35 L17.5 37.5;M25 0 L25 40 L10 45 L25 40;M25 0 L25 40 L10 45 L25 40 M25 35 L17.5 37.5;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L17.5 32.5;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30;M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5;M25 0 L25 40 L10 40 L25 35;M25 0 L25 40 L10 40 L25 35 M25 30 L17.5 32.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L17.5 17.5;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20;M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20 L25 15 M25 10 L17.5 12.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L17.5 27.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L17.5 22.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L17.5 17.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L10 15;M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L10 15 M25 10 M25 5 L17.5 7.5".split(";");
var h=new b({url:t.toUrl(this.iconFolderPath+"windbarb.png"),height:20,width:20,type:"esriPMS",angle:0});this.renderer.defaultSymbol=h;for(d=0;d<a.length-1;d++)0===d?this.renderer.addBreak({minValue:a[d],maxValue:a[d+1],symbol:h}):this.renderer.addBreak({minValue:a[d],maxValue:a[d+1],symbol:(new c).setPath(f[d]).setOutline((new e).setWidth(1.5)).setSize(20).setColor(new g([0,0,0,255]))})},_getDefaultSymbol:function(a){return(new c).setPath("M14,32 14,18 9,23 16,3 22,23 17,18 17,32 z").setOutline((new e).setWidth(0)).setSize(20).setColor(a||
new g([0,92,230]))},_getRotationInfo:function(a){var b=a&&a.flowRepresentation||r.FLOW_FROM,c=a&&a.rotationField||"Direction",d=r.FLOW_FROM;return{field:function(a){a=a.attributes[c];return b===d?a:a+180},type:"geographic"}},_addBreaks:function(a,b){if(!n.isDefined(this.renderer))return Error("Invalid Renderer!");if(!(a&&b&&a.length&&b.length&&a.length>=b.length))return Error("AddBreaks: Input arguments break values and colors not valid");var c;for(c=0;c<b.length;c++)this.renderer.addBreak({minValue:a[c],
maxValue:a[c+1],symbol:this._getDefaultSymbol(new g(b[c]))})},toJson:function(){var a=l.mixin(this.inherited(arguments),{type:"vectorField",style:this.style,attributeField:this.attributeField,flowRepresentation:this.flowRepresentation});this.renderer&&this.renderer.defaultSymbol&&this.style===r.STYLE_SINGLE_ARROW&&(a.singleArrowSymbol=this.renderer.defaultSymbol.toJson());return n.fixJson(a)}});l.mixin(r,{STYLE_WIND_BARBS:"wind_speed",STYLE_SINGLE_ARROW:"single_arrow",STYLE_CLASSIFIED_ARROW:"classified_arrow",
STYLE_BEAUFORT_KN:"beaufort_kn",STYLE_BEAUFORT_METER:"beaufort_m",STYLE_BEAUFORT_MILE:"beaufort_mi",STYLE_BEAUFORT_FEET:"beaufort_ft",STYLE_BEAUFORT_KM:"beaufort_km",STYLE_OCEAN_CURRENT_M:"ocean_current_m",STYLE_OCEAN_CURRENT_KN:"ocean_current_kn",STYLE_SCALAR:"simple_scalar"},{FLOW_FROM:"flow_from",FLOW_TO:"flow_to"});a("extend-esri")&&l.setObject("renderer.VectorFieldRenderer",r,k);return r})},"esri/renderers/DotDensityRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/has dojox/gfx/_base ../kernel ../lang ../Color ./Renderer ../symbols/PictureFillSymbol ../geometry/ScreenPoint ../geometry/Point".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h){m=m(c,{declaredClass:"esri.renderer.DotDensityRenderer",constructor:function(a){this.dotSize=a.dotSize||3;this.dotValue=a.dotValue;this.fields=a.fields;this.outline=a.outline;this.backgroundColor=a.backgroundColor;this.exactCount=a.exactCount||!0;this.dotShape=a.dotShape||"square";this.legendOptions=a.legendOptions;this._exactCountMinArea=1E4;this._currentMapScale=this._map=this._canvas=null;this._symbolMap={};this._currentGraphic=this._currentResolution=this._objectIdField=
null;this._supportsCanvas=window.CanvasRenderingContext2D?!0:!1;window.CanvasRenderingContext2D||console.log("The DotDensityRenderer requires a Canvas enabled Browser.  IE8 and less does not support Canvas.")},getSymbol:function(a){var c,d;this._currentGraphic=a;if(!this._supportsCanvas)return null;this._map||(this._map=a.getLayer()._map,this._objectIdField=a.getLayer().objectIdField,this._currentMapScale=this._map.getScale(),this._currentResolution=this._map.extent.getWidth()/this._map.width,this._map.on("zoom-end",
l.hitch(this,function(a){this._currentMapScale=this._map.getScale();this._currentResolution=a.extent.getWidth()/this._map.width;this._symbolMap[this._currentMapScale]={}})));if(this._symbolMap[this._currentMapScale]&&this._symbolMap[this._currentMapScale][a.attributes[this._objectIdField]])return c=this._symbolMap[this._currentMapScale][a.attributes[this._objectIdField]],d=this._getShapeProperties(a),c.setOffset(d.dx,d.dy),c;c=this._generateFieldsCount(this.fields,a.attributes,this.dotValue);d=this._getShapeProperties(a);
if(!d.width||!d.height)return null;c=new b(this._generateImageSrc(d.width,d.height,c,d.minXY,d.maxXY),this.outline,d.width,d.height);c.setOffset(d.dx,d.dy);this._symbolMap[this._currentMapScale]||(this._symbolMap[this._currentMapScale]={});return this._symbolMap[this._currentMapScale][a.attributes[this._objectIdField]]=c},_generateFieldsCount:function(a,b,c){var d,e;for(e=a.length-1;0<=e;e--)d=b[a[e].name]/c,a[e].numPoints=Math.round(d);return a},_getShapeProperties:function(a){var b,c,d,e;b=a.geometry.getExtent();
b.contains(this._map.extent)&&(b=this._map.extent);d=Math.ceil(b.getWidth()/this._currentResolution);e=Math.ceil(b.getHeight()/this._currentResolution);c=this._map.toScreen(new h(b.xmin,b.ymin,b.spatialReference));b=this._map.toScreen(new h(b.xmax,b.ymax,b.spatialReference));a=a.getLayer().getNode().getCTM();return{minXY:c,maxXY:b,dx:(c.x-a.e)%d,dy:(b.y-a.f)%e,width:d,height:e}},_generateImageSrc:function(a,b,c,d,e,f){var h=this.dotSize,g,k,l;this._canvas?(this._canvas.width=a,this._canvas.height=
b):this._canvas=this._initCanvas(a,b);g=this._canvas.getContext("2d");if(f=f||this.backgroundColor)g.fillStyle=f.toCss(!0),g.fillRect(0,0,a,b),g.fill();for(f=c.length-1;0<=f;f--)for(g.fillStyle=c[f].color.toCss(!0),k=c[f].numPoints-1;0<=k;k--)l=this._getRandomPoint(a,b,d,e),"square"===this.dotShape?g.fillRect(l.x,l.y,h,h):"circle"===this.dotShape&&(g.beginPath(),g.arc(l.x,l.y,h/2,0,2*Math.PI,!0)),g.fill();return this._canvas.toDataURL()},_initCanvas:function(a,b){var c=f.create("canvas",{id:"canvas",
width:a+"px",height:b+"px",style:"position: absolute; left: -10000px; top: 0px;"},null);document.body.appendChild(c);return c},_getRandomInt:function(a,b){return Math.floor(Math.random()*(b-a+1)+a)},_getRandomPoint:function(a,b,c,d){var f={},h=this.outline&&this.outline.width?this.outline.width:0;if(!0===this.exactCount&&a*b>this._exactCountMinArea){a=!1;do f.x=this._getRandomInt(c.x,d.x),f.y=this._getRandomInt(d.y,c.y),a=new e(f.x,f.y),a=this._checkPointShapeBounds(a,this.dotSize+h,this._currentGraphic.geometry),
!0===a&&(f.x-=c.x,f.y-=d.y);while(!1===a)}else f.x=this._getRandomInt(0,a),f.y=this._getRandomInt(0,b);return f},_checkPointShapeBounds:function(a,b,c){var d=null,d=!1,e=!0,f=0;do{switch(f){case 1:a.x+=b;break;case 2:a.y+=b;break;case 3:a.x-=b}d=this._map.toMap(a);d=c.contains(d);!1===d&&(e=!1);f+=1}while(3>=f&&!0===e);return d},setDotSize:function(a){0<a&&(this.dotSize=a)},setDotValue:function(a){0<a&&(this.dotValue=a)},setOutline:function(a){this.outline=a},setBackgroundColor:function(a){this.backgroundColor=
a},toJson:function(){var b=l.mixin(this.inherited(arguments),{type:"dotDensity",backgroundColor:d.toJsonColor(this.backgroundColor),dotShape:this.dotShape,dotSize:0<this.dotSize?n.px2pt(this.dotSize):0,dotValue:this.dotValue,fields:a.map(this.fields,function(a){return p.fixJson({color:d.toJsonColor(a.color),name:a.name})}),legendOptions:this.legendOptions&&p.fixJson({backgroundColor:d.toJsonColor(this.legendOptions.backgroundColor),dotCoverage:this.legendOptions.dotCoverage,outline:this.legendOptions.outline&&
this.legendOptions.outline.toJson(),valueUnit:this.legendOptions.valueUnit}),outline:this.outline&&this.outline.toJson()});return p.fixJson(b)}});k("extend-esri")&&l.setObject("renderer.DotDensityRenderer",m,g);return m})},"esri/renderers/ScaleDependentRenderer":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/has ../kernel ../lang ./Renderer".split(" "),function(m,l,a,f,k,n,g){m=m(g,{declaredClass:"esri.renderer.ScaleDependentRenderer",constructor:function(a){this.setRendererInfos(a&&
a.rendererInfos||[])},setRendererInfos:function(a){this.rendererInfos=a;this._setRangeType();return this},getSymbol:function(a){var d=this.getRendererInfo(a);return d&&d.renderer&&d.renderer.getSymbol(a)},getRendererInfo:function(a){a=a.getLayer().getMap();return"zoom"===this.rangeType?this.getRendererInfoByZoom(a.getZoom()):this.getRendererInfoByScale(a.getScale())},getRendererInfoByZoom:function(a){var d,c=this.rendererInfos,b,e=0;do d=c[e],a>=d.minZoom&&a<=d.maxZoom&&(b=d),e++;while(!b&&e<c.length);
return b},getRendererInfoByScale:function(a){var d,c=this.rendererInfos,b,e=0,f,g,k,l;do d=c[e],f=d.minScale,g=d.maxScale,k=!f,l=!g,!k&&a<=f&&(k=!0),!l&&a>=g&&(l=!0),k&&l&&(b=d),e++;while(!b&&e<c.length);return b},addRendererInfo:function(a){var d,c=0,b,e=this.rendererInfos,f=a.hasOwnProperty("minZoom")?"minZoom":"minScale",g=e.length;do{b=e[c];if(g===c||a[f]<b[f])e.splice(c,0,a),this._setRangeType(),d=!0;c++}while(!d&&c<g);return this},_setRangeType:function(){var a=this.rendererInfos;if(a=a&&a[0])this.rangeType=
a.hasOwnProperty("minZoom")?"zoom":a.hasOwnProperty("minScale")?"scale":""},toJson:function(){if("zoom"===this.rangeType)return null;var f=this.rendererInfos||[],d=f[0]&&f[0].minScale,f=a.mixin(this.inherited(arguments),{type:"scaleDependent",minScale:0<d?d:0,rendererInfos:l.map(f,function(a){return n.fixJson({maxScale:0<a.maxScale?a.maxScale:0,renderer:a.renderer&&a.renderer.toJson()})})});return n.fixJson(f)}});f("extend-esri")&&a.setObject("renderer.ScaleDependentRenderer",m,k);return m})},"esri/renderers/HeatmapRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct ../sniff ../kernel ../lang ../symbols/PictureMarkerSymbol ../Color ./Renderer".split(" "),
function(m,l,a,f,k,n,g,p,d,c){m=m([c],{declaredClass:"esri.renderer.HeatmapRenderer",colors:null,blurRadius:10,maxPixelIntensity:100,minPixelIntensity:0,field:null,fieldOffset:null,colorStops:null,constructor:function(a){(this._supportsCanvas=window.CanvasRenderingContext2D?!0:!1)?("string"==typeof a&&(a=JSON.parse(a)),l.mixin(this,a),this._canvas=null,this.colors||this.colorStops||(this.colorStops=[{ratio:0,color:"rgba(255, 140, 0, 0)"},{ratio:.75,color:"rgba(255, 140, 0, 1)"},{ratio:.9,color:"rgba(255, 0,   0, 1)"}]),
this.gradient=this._generateGradient(this.colorStops||this.colors)):console.log("The HeatmapRenderer requires a Canvas enabled Browser.  IE8 and less does not support Canvas.")},getSymbol:function(a){if(!this._supportsCanvas)return!1;var b=a.attributes.imageData;a=a.attributes.size;if(!a)return null;var c=this._getContext(a[0],a[1]),d=c.getImageData(0,0,a[0],a[1]);window.ArrayBuffer&&b instanceof ArrayBuffer?b=window.Uint8ClampedArray?new Uint8ClampedArray(b):new Uint8Array(b):b.BYTES_PER_ELEMENT&&
1!==b.BYTES_PER_ELEMENT&&(b=window.Uint8ClampedArray?new Uint8ClampedArray(b.buffer):new Uint8Array(b.buffer));if(window.CanvasPixelArray&&d.data instanceof window.CanvasPixelArray)for(var f=d.data,g=f.length;g--;)f[g]=b[g];else d.data.set(b);c.putImageData(d,0,0);return new p(c.canvas.toDataURL(),a[0],a[1])},setColors:function(a){a&&(a instanceof Array||a.colors)&&(this.gradient=this._generateGradient(a.colors||a),this.colors=a);return this},setColorStops:function(a){a&&(a instanceof Array||a.colorStops)&&
(this.gradient=this._generateGradient(a.colorStops||a),this.colorStops=a);return this},setMaxPixelIntensity:function(a){this.maxPixelIntensity=a;return this},setMinPixelIntensity:function(a){this.minPixelIntensity=a;return this},setField:function(a){this.field=a;return this},setFieldOffset:function(a){this.fieldOffset=a;return this},setBlurRadius:function(a){this.blurRadius=a;return this},getStats:function(){},getHistogramData:function(){},toJson:function(){var b=l.mixin(this.inherited(arguments),
{type:"heatmap",blurRadius:this.blurRadius,colorStops:this._colorsToStops(this.colorStops||this.colors),maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity,field:this.field});null!=this.fieldOffset&&(b.fieldOffset=this.fieldOffset);a.forEach(b.colorStops,function(a){a.color=d.toJsonColor(a.color)});return g.fixJson(b)},_getContext:function(a,c){this._canvas?(this._canvas.width=a,this._canvas.height=c):this._canvas=this._initCanvas(a,c);return this._canvas.getContext("2d")},
_initCanvas:function(a,c){var b=f.create("canvas",{id:"hm_canvas-"+Math.floor(1E3*Math.random()),style:"position: absolute; left: 0px; top: -10000px;"},null);b.width=a;b.height=c;document.body.appendChild(b);return b},_generateGradient:function(a,c){c||(c=512);for(var b=this._colorsToStops(a),d=this._getContext(1,c||512),e=d.createLinearGradient(0,0,0,c),f=0,g;f<b.length;f++)g=b[f],e.addColorStop(g.ratio,g.color.toCss(!0));d.fillStyle=e;d.fillRect(0,0,1,c);return d.getImageData(0,0,1,c).data},_colorsToStops:function(b){var c=
[];if(!b[0])return c;if(null!=b[0].ratio)c=a.map(b,function(a){return{ratio:a.ratio,color:this._toColor(a.color)}},this);else if(null!=b[0].value){var d=Infinity,c=-Infinity,f=0,g;for(g=0;g<b.length;g++){var k=b[g].value;k<d&&(d=k);k>c&&(c=k)}f=c-d;this.maxPixelIntensity=c;this.minPixelIntensity=d;c=a.map(b,function(a){var b=a.value;a=this._toColor(a.color);return{value:b,ratio:(b-d)/f,color:a}},this)}else var l=b.length-1,c=a.map(b,function(a,b){return{color:this._toColor(a),ratio:b/l}},this);return c},
_toColor:function(a){a.toRgba||a.declaredClass||(a=new d(a));return a}});k("extend-esri")&&l.setObject("renderer.HeatmapRenderer",m,n);return m})},"esri/utils":function(){define("./domUtils ./lang ./urlUtils ./request ./tileUtils ./graphicsUtils ./deferredUtils ./layerUtils ./geometry/normalizeUtils".split(" "),function(){return{}})},"esri/graphicsUtils":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","./kernel","./geometry/Extent"],function(m,l,a,f,k){var n={graphicsExtent:function(a){if(!a||
!a.length)return null;var f=a[0].geometry,d=f.getExtent(),c,b,e=a.length;null===d&&(d=new k(f.x,f.y,f.x,f.y,f.spatialReference));for(b=1;b<e;b++)c=(f=a[b].geometry).getExtent(),null===c&&(c=new k(f.x,f.y,f.x,f.y,f.spatialReference)),d=d.union(c);return 0>d.getWidth()&&0>d.getHeight()?null:d},getGeometries:function(a){return l.map(a,function(a){return a.geometry})},_encodeGraphics:function(a,f){var d=[],c,b,e;l.forEach(a,function(a,g){c=a.toJson();b={};c.geometry&&(e=f&&f[g],b.geometry=e&&e.toJson()||
c.geometry);c.attributes&&(b.attributes=c.attributes);d[g]=b});return d}};a("extend-esri")&&m.mixin(f,n);return n})},"esri/layers/graphics":function(){define(["./GraphicsLayer","../graphic","../renderer"],function(){return{}})},"esri/layers/agstiled":function(){define(["./agscommon","./ArcGISTiledMapServiceLayer"],function(){return{}})},"esri/layers/agscommon":function(){define("./ArcGISMapServiceLayer ./LayerInfo ./TimeInfo ./LayerTimeOptions ./TimeReference ./Field ./Domain ./RangeDomain ./CodedValueDomain ./InheritedDomain ./LayerSource ./LayerMapSource ./LayerDataSource ./DataSource ./TableDataSource ./QueryDataSource ./JoinDataSource ./RasterDataSource ./DynamicLayerInfo ./LayerDrawingOptions ../geometry ../utils".split(" "),
function(){return{}})},"esri/layers/Field":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ./RangeDomain ./CodedValueDomain".split(" "),function(m,l,a,f,k,n){m=m(null,{declaredClass:"esri.layers.Field",constructor:function(a){if(a&&l.isObject(a)&&(this.name=a.name,this.type=a.type,this.alias=a.alias,this.length=a.length,this.editable=a.editable,this.nullable=a.nullable,(a=a.domain)&&l.isObject(a)))switch(a.type){case "range":this.domain=new k(a);break;case "codedValue":this.domain=
new n(a)}}});a("extend-esri")&&l.setObject("layers.Field",m,f);return m})},"esri/layers/RangeDomain":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./Domain".split(" "),function(m,l,a,f,k,n){m=m([n],{declaredClass:"esri.layers.RangeDomain",constructor:function(a){a&&l.isObject(a)&&(this.minValue=a.range[0],this.maxValue=a.range[1])},toJson:function(){var a=this.inherited(arguments);a.range=[this.minValue,this.maxValue];return k.fixJson(a)}});a("extend-esri")&&l.setObject("layers.RangeDomain",
m,f);return m})},"esri/layers/Domain":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../lang"],function(m,l,a,f,k){m=m(null,{declaredClass:"esri.layers.Domain",constructor:function(a){a&&l.isObject(a)&&(this.name=a.name,this.type=a.type)},toJson:function(){return k.fixJson({name:this.name,type:this.type})}});a("extend-esri")&&l.setObject("layers.Domain",m,f);return m})},"esri/layers/CodedValueDomain":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ./Domain".split(" "),
function(m,l,a,f,k,n,g){m=m([g],{declaredClass:"esri.layers.CodedValueDomain",constructor:function(a){a&&l.isObject(a)&&(this.codedValues=a.codedValues)},getName:function(f){var d;a.some(this.codedValues,function(a){a.code==f&&(d=a.name);return!!d});return d},toJson:function(){var a=this.inherited(arguments);a.codedValues=l.clone(this.codedValues);return n.fixJson(a)}});f("extend-esri")&&l.setObject("layers.CodedValueDomain",m,k);return m})},"esri/layers/InheritedDomain":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/has","../kernel","./Domain"],function(m,l,a,f,k){m=m([k],{declaredClass:"esri.layers.InheritedDomain"});a("extend-esri")&&l.setObject("layers.InheritedDomain",m,f);return m})},"esri/layers/LayerSource":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(m,l,a,f){m=m(null,{declaredClass:"esri.layers.LayerSource",type:null,constructor:function(a){a&&l.mixin(this,a)},toJson:function(){}});a("extend-esri")&&l.setObject("layers.LayerSource",
m,f);return m})},"esri/layers/LayerMapSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./LayerSource".split(" "),function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.layers.LayerMapSource",type:"mapLayer",toJson:function(){return k.fixJson({type:"mapLayer",mapLayerId:this.mapLayerId,gdbVersion:this.gdbVersion})}});a("extend-esri")&&l.setObject("layers.LayerMapSource",m,f);return m})},"esri/layers/LayerDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./LayerSource ./TableDataSource ./QueryDataSource ./JoinDataSource ./RasterDataSource".split(" "),
function(m,l,a,f,k,n,g,p,d,c){m=m(n,{declaredClass:"esri.layers.LayerDataSource",type:"dataLayer",constructor:function(a){if(a&&a.dataSource){switch(a.dataSource.type){case "table":a=new g(a.dataSource);break;case "queryTable":a=new p(a.dataSource);break;case "joinTable":a=new d(a.dataSource);break;case "raster":a=new c(a.dataSource);break;default:a=a.dataSource}this.dataSource=a}},toJson:function(){var a={type:"dataLayer",dataSource:this.dataSource&&this.dataSource.toJson()};return k.fixJson(a)}});
a("extend-esri")&&l.setObject("layers.LayerDataSource",m,f);return m})},"esri/layers/TableDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource".split(" "),function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.layers.TableDataSource",toJson:function(){return k.fixJson({type:"table",workspaceId:this.workspaceId,dataSourceName:this.dataSourceName,gdbVersion:this.gdbVersion})}});a("extend-esri")&&l.setObject("layers.TableDataSource",m,f);return m})},"esri/layers/DataSource":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/has","../kernel"],function(m,l,a,f){m=m(null,{declaredClass:"esri.layers.DataSource",constructor:function(a){a&&l.mixin(this,a)},toJson:function(){}});a("extend-esri")&&l.setObject("layers.DataSource",m,f);return m})},"esri/layers/QueryDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource ../SpatialReference".split(" "),function(m,l,a,f,k,n,g){m=m(n,{declaredClass:"esri.layers.QueryDataSource",constructor:function(a){a&&(a.oidFields&&
l.isString(a.oidFields)&&(this.oidFields=a.oidFields.split(",")),a.spatialReference&&(this.spatialReference=new g(a.spatialReference)))},toJson:function(){var a={type:"queryTable",workspaceId:this.workspaceId,query:this.query,oidFields:this.oidFields&&this.oidFields.join(),spatialReference:this.spatialReference&&this.spatialReference.toJson()};if(this.geometryType){var d;d="point"===this.geometryType.toLowerCase()?"esriGeometryPoint":"multipoint"===this.geometryType.toLowerCase()?"esriGeometryMultipoint":
"polyline"===this.geometryType.toLowerCase()?"esriGeometryPolyline":"polygon"===this.geometryType.toLowerCase()?"esriGeometryPolygon":this.geometryType;a.geometryType=d}return k.fixJson(a)}});a("extend-esri")&&l.setObject("layers.QueryDataSource",m,f);return m})},"esri/layers/JoinDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource ./LayerMapSource ./TableDataSource ./QueryDataSource ./RasterDataSource".split(" "),function(m,l,a,f,k,n,g,p,d,c){var b=
m(n,{declaredClass:"esri.layers.JoinDataSource",constructor:function(a){a&&(a.leftTableSource&&(this.leftTableSource=this._createLayerSource(a.leftTableSource)),a.rightTableSource&&(this.rightTableSource=this._createLayerSource(a.rightTableSource)))},_createLayerSource:function(a){var e;if("mapLayer"===a.type)e=new g(a);else{e={type:"dataLayer"};var f;switch(a.dataSource.type){case "table":f=new p(a.dataSource);break;case "queryTable":f=new d(a.dataSource);break;case "joinTable":f=new b(a.dataSource);
break;case "raster":f=new c(a.dataSource);break;default:f=a.dataSource}e.dataSource=f;e.toJson=function(){var a={type:"dataLayer",dataSource:f.toJson()};return k.fixJson(a)}}return e},toJson:function(){var a={type:"joinTable",leftTableSource:this.leftTableSource&&this.leftTableSource.toJson(),rightTableSource:this.rightTableSource&&this.rightTableSource.toJson(),leftTableKey:this.leftTableKey,rightTableKey:this.rightTableKey},b;b="left-outer-join"===this.joinType.toLowerCase()?"esriLeftOuterJoin":
"left-inner-join"===this.joinType.toLowerCase()?"esriLeftInnerJoin":this.joinType;a.joinType=b;return k.fixJson(a)}});a("extend-esri")&&l.setObject("layers.JoinDataSource",b,f);return b})},"esri/layers/RasterDataSource":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./DataSource".split(" "),function(m,l,a,f,k,n){m=m(n,{declaredClass:"esri.layers.RasterDataSource",toJson:function(){return k.fixJson({type:"raster",workspaceId:this.workspaceId,dataSourceName:this.dataSourceName})}});
a("extend-esri")&&l.setObject("layers.RasterDataSource",m,f);return m})},"esri/layers/DynamicLayerInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ./LayerInfo ./LayerMapSource ./LayerDataSource".split(" "),function(m,l,a,f,k,n,g,p){m=m(n,{declaredClass:"esri.layers.DynamicLayerInfo",defaultVisibility:!0,parentLayerId:-1,maxScale:0,minScale:0,constructor:function(a){a&&(a.source?a="mapLayer"===a.source.type?new g(a.source):new p(a.source):(a=new g,a.mapLayerId=
this.id),this.source=a)},toJson:function(){var a=this.inherited(arguments);a.source=this.source&&this.source.toJson();return k.fixJson(a)}});a("extend-esri")&&l.setObject("layers.DynamicLayerInfo",m,f);return m})},"esri/layers/LayerDrawingOptions":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../renderers/jsonUtils ./LabelClass".split(" "),function(m,l,a,f,k,n,g,p){m=m(null,{declaredClass:"esri.layers.LayerDrawingOptions",constructor:function(d){if(d&&
(l.mixin(this,d),d.renderer&&(this.renderer=g.fromJson(d.renderer)),d.labelingInfo&&0<d.labelingInfo.length)){this.labelingInfo=[];var c;a.forEach(d.labelingInfo,function(a){c=new p(a);this.labelingInfo.push(c)},this)}},toJson:function(){var d={renderer:this.renderer&&this.renderer.toJson(),transparency:this.transparency,scaleSymbols:this.scaleSymbols,showLabels:this.showLabels};this.labelingInfo&&0<this.labelingInfo.length&&(d.labelingInfo=[],a.forEach(this.labelingInfo,function(a){d.labelingInfo.push(a.toJson())}));
return n.fixJson(d)}});f("extend-esri")&&l.setObject("layers.LayerDrawingOptions",m,k);return m})},"esri/layers/LabelClass":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojox/gfx/_base ../kernel ../lang ../symbols/TextSymbol ../symbols/ShieldLabelSymbol".split(" "),function(m,l,a,f,k,n,g,p){var d=RegExp("__begin__","ig"),c=RegExp("__end__","ig"),b=/^__begin__/i,e=/__end__$/i;m=m(null,{declaredClass:"esri.layers.LabelClass",labelPlacement:null,labelExpression:null,format:null,fieldInfos:null,
useCodedValues:null,symbol:null,maxScale:0,minScale:0,where:null,sizeInfo:null,_labelPlacementLookup:{"above-center":"esriServerPointLabelPlacementAboveCenter","above-left":"esriServerPointLabelPlacementAboveLeft","above-right":"esriServerPointLabelPlacementAboveRight","below-center":"esriServerPointLabelPlacementBelowCenter","below-left":"esriServerPointLabelPlacementBelowLeft","below-right":"esriServerPointLabelPlacementBelowRight","center-center":"esriServerPointLabelPlacementCenterCenter","center-left":"esriServerPointLabelPlacementCenterLeft",
"center-right":"esriServerPointLabelPlacementCenterRight","above-after":"esriServerLinePlacementAboveAfter","above-along":"esriServerLinePlacementAboveAlong","above-before":"esriServerLinePlacementAboveBefore","above-start":"esriServerLinePlacementAboveStart","above-end":"esriServerLinePlacementAboveEnd","below-after":"esriServerLinePlacementBelowAfter","below-along":"esriServerLinePlacementBelowAlong","below-before":"esriServerLinePlacementBelowBefore","below-start":"esriServerLinePlacementBelowStart",
"below-end":"esriServerLinePlacementBelowEnd","center-after":"esriServerLinePlacementCenterAfter","center-along":"esriServerLinePlacementCenterAlong","center-before":"esriServerLinePlacementCenterBefore","center-start":"esriServerLinePlacementCenterStart","center-end":"esriServerLinePlacementCenterEnd","always-horizontal":"esriServerPolygonPlacementAlwaysHorizontal"},constructor:function(a){a&&(l.mixin(this,a),this._labelPlacementLookup.hasOwnProperty(this.labelPlacement)||(this.labelPlacement=n.valueOf(this._labelPlacementLookup,
a.labelPlacement)),a.format&&(this.format=a.format),a.fieldInfos&&(this.fieldInfos=a.fieldInfos),a.symbol&&(this.symbol="esriSHD"===a.symbol.type?new p(a.symbol):new g(a.symbol)),a=this.sizeInfo)&&(a.minSize&&(a.minSize=f.pt2px(a.minSize)),a.maxSize&&(a.maxSize=f.pt2px(a.maxSize)))},getSymbol:function(){return this.symbol},toJson:function(){var a=this.sizeInfo;a&&(a=l.mixin({},a),a.minSize&&(a.minSize=f.px2pt(a.minSize)),a.maxSize&&(a.maxSize=f.px2pt(a.maxSize)));var b=n.fixJson(this.labelExpressionInfo&&
l.clone(this.labelExpressionInfo));this._processLabelExpressionInfo(b);a={name:this.name,labelExpression:this.labelExpression,labelExpressionInfo:b,format:this.format||void 0,fieldInfos:this.fieldInfos||void 0,useCodedValues:this.useCodedValues,maxScale:this.maxScale,minScale:this.minScale,where:this.where,sizeInfo:a||void 0,labelPlacement:this._labelPlacementLookup.hasOwnProperty(this.labelPlacement)?this._labelPlacementLookup[this.labelPlacement]:this.labelPlacement,symbol:this.symbol&&this.symbol.toJson()};
return n.fixJson(a)},_processLabelExpressionInfo:function(a){a&&a.value&&(a.expression=this._convertTemplatedStringToArcade(a.value))},_convertTemplatedStringToArcade:function(a){var f;a&&(f=l.replace(a,function(a,b){return'__begin__$feature["'+b+'"]__end__'}),f=b.test(f)?f.replace(b,""):'"'+f,f=e.test(f)?f.replace(e,""):f+'"',f=f.replace(d,'" + ').replace(c,' + "'));return f}});a("extend-esri")&&l.setObject("layers.LabelClass",m,k);return m})},"esri/symbols/ShieldLabelSymbol":function(){define("dojo/_base/declare dojo/_base/lang dojo/sniff dojox/gfx/_base ../kernel ../lang ../urlUtils ./MarkerSymbol ./Font".split(" "),
function(m,l,a,f,k,n,g,p,d){var c={url:"",width:12,height:12,angle:0,xoffset:0,yoffset:0};m=m(p,{declaredClass:"esri.symbol.ShieldLabelSymbol",type:"shieldlabelsymbol",color:[255,255,255,1],width:32,height:32,font:f.defaultFont,constructor:function(b,d,g,k,m){b?l.isString(b)?(this.url=b,d&&(this.color=d),g&&(this.width=g),k&&(this.height=k),void 0!==m&&(this.font=m)):(this.width=f.pt2px(b.width),this.height=f.pt2px(b.height),d=b.imageData,9>a("ie")||!d||(g=this.url,this.url="data:"+(b.contentType||
"image")+";base64,"+d,this.imageData=g)):l.mixin(this,c)},getStroke:function(){return null},getFill:function(){return this.color},setWidth:function(a){this.width=a;return this},setHeight:function(a){this.height=a;return this},setUrl:function(a){a!==this.url&&(delete this.imageData,delete this.contentType);this.url=a;return this},setFont:function(a){this.font=a;return this},setText:function(a){this.text=a;return this},getWidth:function(){return this.width},getHeight:function(){return this.height},
getShapeDescriptors:function(){return{defaultShape:{type:"image",x:-Math.round(this.width/2),y:-Math.round(this.height/2),width:this.width,height:this.height,src:this.url||""},fill:null,stroke:null}},toJson:function(){var a=this.url,c=this.imageData;if(0===a.indexOf("data:"))var h=a,a=c,c=h.indexOf(";base64,")+8,c=h.substr(c);var a=g.getAbsoluteUrl(a),h=f.px2pt(this.width),h=isNaN(h)?void 0:h,k=f.px2pt(this.height),k=isNaN(k)?void 0:k,a=n.fixJson(l.mixin(this.inherited("toJson",arguments),{type:"esriSHD",
url:a,imageData:c,contentType:this.contentType,width:h,height:k}));this.font?(c=new d(this.font),a.font=c.toJson()):a.font=null;delete a.size;a.imageData||delete a.imageData;return a}});m.defaultProps=c;a("extend-esri")&&(l.setObject("symbol.ShieldLabelSymbol",m,k),k.symbol.defaultShieldLabelSymbol=c);return m})},"esri/layers/agsdynamic":function(){define(["./agscommon","./ArcGISDynamicMapServiceLayer","../_time"],function(){return{}})},"esri/layers/ArcGISDynamicMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/sniff dojo/io-query ../kernel ../config ../request ../urlUtils ../layerUtils ../geometry/scaleUtils ./DynamicMapServiceLayer ./ArcGISMapServiceLayer ./TimeInfo ./LayerTimeOptions ./ImageParameters ./DynamicLayerInfo ./LayerMapSource".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h,t,r,w,u,q,x){m=m([h,t],{declaredClass:"esri.layers.ArcGISDynamicMapServiceLayer",_eventMap:{"visible-layers-change":["visibleLayers"]},constructor:function(a,b,c){a=b&&b.imageParameters;var d=l.hitch;if(a){var e=a.layerDefinitions;e&&this.setLayerDefinitions(e);a.layerOption===u.LAYER_OPTION_SHOW&&(this.visibleLayers=[].concat(a.layerIds),this.onVisibleLayersChange(this.visibleLayers))}this._setIsPNG32=d(this,this._setIsPNG32);this.dpi=a&&a.dpi||96;this.imageFormat=
a&&a.format||"png8";this.imageTransparency=a&&!1===a.transparent?!1:!0;this._setIsPNG32();this.gdbVersion=b&&b.gdbVersion;this._params.gdbVersion=this.gdbVersion;e=a&&a.layerDefinitions;l.mixin(this._params,this._url.query,{dpi:this.dpi,transparent:this.imageTransparency,format:this.imageFormat},a?a.toJson():{});e&&(this._params.layerDefs=e);this.getImageUrl=d(this,this.getImageUrl);this._initLayer=d(this,this._initLayer);this._load=d(this,this._load);this.useMapImage=b?b.useMapImage:!1;this._loadCallback=
b&&b.loadCallback;(b=b&&b.resourceInfo)?this._initLayer(b):void 0!==c&&!1!==c||this._load();this.registerConnectEvents()},disableClientCaching:!1,layerDefinitions:null,_initLayer:function(a,b){this.inherited(arguments);a.timeInfo&&(this.timeInfo=new r(a.timeInfo));this.loaded=!0;this.onLoad(this);var c=this._loadCallback;c&&(delete this._loadCallback,c(this))},getImageUrl:function(a,e,g,h){var k=this._url.path+"/export?",m=this._params,q=m.token=this._getToken(),r=a.spatialReference.wkid||f.toJson(a.spatialReference.toJson()),
v=this._errorHandler;delete m._ts;l.mixin(m,{bbox:a.xmin+","+a.ymin+","+a.xmax+","+a.ymax,bboxSR:r,imageSR:r,size:e+","+g},this.disableClientCaching?{_ts:(new Date).getTime()}:{});m.layerDefs&&(a=b._serializeLayerDefinitions(m.layerDefs,10.5<=this.version),m=l.mixin({},m),delete m.layerDefs,m.layerDefs=a);a=c.addProxy(k+n.objectToQuery(l.mixin({},m,{f:"image"})));a.length>p.defaults.io.postLength||this.useMapImage?this._jsonRequest=d({url:k,content:l.mixin(m,{f:"json"}),callbackParamName:"callback",
load:function(a){a=a.href;q&&(a+=-1===a.indexOf("?")?"?token\x3d"+q:"\x26token\x3d"+q);h(c.addProxy(a))},error:v}):h(a)},_setIsPNG32:function(){var a=this.imageFormat.toLowerCase(),b=k("ie");this.isPNG32=b&&6===b&&("png32"===a||"png24"===a)&&this.imageTransparency},_setTime:function(c){var d=this.timeInfo;c=this._params.time=c?c.toJson().join(","):null;if(10.02>this.version&&d)if(c)this._params.layerTimeOptions=b._serializeTimeOptions(this.layerTimeOptions);else{var e=this.layerInfos;if(e){var f=
this.layerTimeOptions,g=f?f.slice(0):[],h=[];a.forEach(e,function(a){a.subLayerIds||h.push(a.id)});h.length&&(a.forEach(h,function(a){if(!g[a]){var b=new w;b.useTime=!1;g[a]=b}}),this._params.layerTimeOptions=b._serializeTimeOptions(g,h))}}10.02<=this.version&&d&&!c&&!d.hasLiveData&&(this._params.time="null,null")},setDPI:function(a,b){this.dpi=this._params.dpi=a;b||this.refresh(!0)},setImageFormat:function(a,b){this.imageFormat=this._params.format=a;this._setIsPNG32();b||this.refresh(!0)},setImageTransparency:function(a,
b){this.imageTransparency=this._params.transparent=a;this._setIsPNG32();b||this.refresh(!0)},setVisibleLayers:function(a,b){this.visibleLayers=a;this._params.layers=u.LAYER_OPTION_SHOW+":"+(a.length?a.join():"-1");this._updateDynamicLayers();b||this.refresh(!0);this.onVisibleLayersChange(this.visibleLayers)},onVisibleLayersChange:function(){},setDefaultVisibleLayers:function(a){this.visibleLayers=this._defaultVisibleLayers;this._params.layers=null;this._updateDynamicLayers();a||this.refresh(!0);this.onVisibleLayersChange(this.visibleLayers)},
setLayerDefinitions:function(a,b){this.layerDefinitions=a;this._params.layerDefs=a;this._updateDynamicLayers();b||this.refresh(!0)},setDefaultLayerDefinitions:function(a){this.layerDefinitions=this._params.layerDefs=null;this._updateDynamicLayers();a||this.refresh(!0)},setDisableClientCaching:function(a){this.disableClientCaching=a},setLayerTimeOptions:function(a,c){this.layerTimeOptions=a;this._params.layerTimeOptions=b._serializeTimeOptions(a);this._updateDynamicLayers();c||this.refresh(!0)},refresh:function(a){if(a)this.inherited(arguments);
else{var b=this.disableClientCaching;this.disableClientCaching=!0;this.inherited(arguments);this.disableClientCaching=b}},setLayerDrawingOptions:function(a,b){this.layerDrawingOptions=a;this._updateDynamicLayers();b||this.refresh(!0)},setDynamicLayerInfos:function(a,c){a&&0<a.length?(this.dynamicLayerInfos=a,this.visibleLayers=b._getDefaultVisibleLayers(a),this.onVisibleLayersChange(this.visibleLayers)):this.dynamicLayerInfos=this.layerDrawingOptions=null;this._updateDynamicLayers();c||this.refresh(!0)},
createDynamicLayerInfosFromLayerInfos:function(){var b=[],c;a.forEach(this.layerInfos,function(a){c=new q(a.toJson());c.source=new x({mapLayerId:a.id});b.push(c)});return b},_onDynamicLayersChange:function(){},_updateDynamicLayers:function(){if(this.dynamicLayerInfos&&0<this.dynamicLayerInfos.length||this.layerDrawingOptions&&0<this.layerDrawingOptions.length){this.dynamicLayerInfos&&0!==this.dynamicLayerInfos.length||(this.dynamicLayerInfos=this.createDynamicLayerInfosFromLayerInfos());var c;c=this.dynamicLayerInfos;
var d=[],g=this._map&&e.getScale(this._map),h=this.visibleLayers,k=g?b._getLayersForScale(g,c):h;a.forEach(c,function(b){if(!b.subLayerIds){var c,e=b.id;if(-1!==a.indexOf(h,e)&&-1!==a.indexOf(k,e)){c={id:e,name:b.name};c.source=b.source&&b.source.toJson();var f;this.layerDefinitions&&this.layerDefinitions[e]&&(f=this.layerDefinitions[e]);f&&(c.definitionExpression=f);var g;this.layerDrawingOptions&&this.layerDrawingOptions[e]&&(g=this.layerDrawingOptions[e]);g&&(c.drawingInfo=g.toJson());var l;this.layerTimeOptions&&
this.layerTimeOptions[e]&&(l=this.layerTimeOptions[e]);l&&(c.layerTimeOptions=l.toJson());c.minScale=b.minScale||0;c.maxScale=b.maxScale||0;d.push(c)}}},this);c=f.toJson(d);this._params.dynamicLayers&&this._params.dynamicLayers.length===c.length&&this._params.dynamicLayers===c||(this._params.dynamicLayers=c,this._onDynamicLayersChange(this._params.dynamicLayers))}else this._params.dynamicLayers?(this._params.dynamicLayers=null,this._onDynamicLayersChange(null)):this._params.dynamicLayers=null},_onExtentChangeHandler:function(a,
b,c){c&&this._updateDynamicLayers();this.inherited(arguments)},_setMap:function(a,b,c){this._map=a;this._updateDynamicLayers();return this.inherited(arguments)},onGDBVersionChange:function(){},setGDBVersion:function(a,b){this.gdbVersion=a;this._params.gdbVersion=a;this.onGDBVersionChange();b||this.refresh(!0)},exportMapImage:function(a,c){var d=l.hitch(this,function(){var d=p.defaults.map,e=a&&a.layerDefinitions;a=a?a.toJson(this.normalization):{};e&&(a.layerDefs=e);a=l.mixin({size:d.width+","+d.height},
this._params,a,{f:"json"});delete a._ts;a.layerDefs&&(d=b._serializeLayerDefinitions(a.layerDefs,10.5<=this.version),delete a.layerDefs,a.layerDefs=d);this._exportMapImage(this._url.path+"/export",a,c)});if(this.loaded)d();else this.on("load",d)}});k("extend-esri")&&l.setObject("layers.ArcGISDynamicMapServiceLayer",m,g);return m})},"esri/layers/DynamicMapServiceLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/dom-construct dojo/dom-style dojox/gfx/matrix ../kernel ../config ../sniff ../request ../domUtils ./layer ./MapImage".split(" "),
function(m,l,a,f,k,n,g,p,d,c,b,e,h){var t=p.defaults.map.zoomDuration;m=m(e,{declaredClass:"esri.layers.DynamicMapServiceLayer",_eventMap:{"map-image-export":["mapImage"]},constructor:function(b,c){this.useMapTime=c&&c.hasOwnProperty("useMapTime")?!!c.useMapTime:!0;this.extentProcessor=c&&c.extentProcessor;var d=a.hitch;this._exportMapImageHandler=d(this,this._exportMapImageHandler);this._imgSrcFunc=d(this,this._imgSrcFunc);this._divAlphaImageFunc=d(this,this._divAlphaImageFunc);this._tileLoadHandler=
d(this,this._tileLoadHandler);this._tileErrorHandler=d(this,this._tileErrorHandler);this.registerConnectEvents()},opacity:1,isPNG32:!1,_setMap:function(a,b,c){this.inherited(arguments);this._map=a;var e=this._div=f.create("div",null,b),h=g._css.names,m={position:"absolute",width:a.width+"px",height:a.height+"px",overflow:"visible",opacity:this.opacity},n=d("ie"),p=l.connect,r=a.__visibleDelta;8===n&&delete m.opacity;"css-transforms"===a.navigationMode?(this._isChildLayer||(m[h.transform]=g._css.translate(r.x,
r.y),k.set(e,m)),this._left=r.x,this._top=r.y):(m.left="0px",m.top="0px",k.set(e,m),this._left=this._top=0);k.set(e,m);this._onResizeHandler_connect=p(a,"onResize",this,"_onResizeHandler");this._opacityChangeHandler_connect=p(this,"onOpacityChange",this,"_opacityChangeHandler");this._img_loading=null;this._dragOrigin={x:0,y:0};this.evaluateSuspension();if(this.suspended&&!a.loaded)var u=l.connect(a,"onLoad",this,function(){l.disconnect(u);u=null;this.evaluateSuspension()});this.extentProcessor&&(this._panEndEvalHandle=
l.connect(a,"onPanEnd",this,this.evaluateSuspension),this._zoomEndEvalHandle=l.connect(a,"onZoomEnd",this,this.evaluateSuspension));return e},_unsetMap:function(a,b){this._img&&this._clearEventListeners(this._img);this._img_loading&&this._clearEventListeners(this._img_loading);f.destroy(this._div);this._map=this._div=this._img=this._img_loading=null;var c=l.disconnect;c(this._onResizeHandler_connect);c(this._opacityChangeHandler_connect);c(this._panEndEvalHandle);c(this._zoomEndEvalHandle);this._panEndEvalHandle=
this._zoomEndEvalHandle=this._onResizeHandler_connect=this._opacityChangeHandler_connect=null;this._fireUpdateEnd();this._toggleTime();clearTimeout(this._wakeTimer);this._wakeTimer=null;this._disableDrawConnectors();this.inherited(arguments)},_onResizeHandler:function(a,b,c){k.set(this._div,{width:b+"px",height:c+"px"});this._onExtentChangeHandler(a)},onSuspend:function(){this.inherited(arguments);this._fireUpdateEnd();this._toggleTime();b.hide(this._div);clearTimeout(this._wakeTimer);this._wakeTimer=
null;this._disableDrawConnectors()},onResume:function(){this.inherited(arguments);var b=this._map;this._toggleTime();"css-transforms"===b.navigationMode&&(b=b.__visibleDelta,this._left=b.x,this._top=b.y,this._isChildLayer||k.set(this._div,g._css.names.transform,g._css.translate(this._left,this._top)));this._enableDrawConnectors();this._wakeTimer=this._wakeTimer||setTimeout(a.hitch(this,function(){this.suspended||this._onExtentChangeHandler(this._map.extent,null,!0)}),0)},canResume:function(){var a=
this.inherited(arguments);if(a){var b=this._map.extent;this.extentProcessor&&b&&(a=!!this.extentProcessor({layer:this,extent:b,width:this._map.width}).extent)}return a},_enableDrawConnectors:function(){var a=l.connect,b=this._map;b&&(this._onPanHandler_connect=a(b,"onPan",this,"_onPanHandler"),this._onExtentChangeHandler_connect=a(b,"onExtentChange",this,"_onExtentChangeHandler"),"css-transforms"===b.navigationMode?this._onScaleHandler_connect=a(b,"onScale",this,this._onScaleHandler):this._onZoomHandler_connect=
a(b,"onZoom",this,"_onZoomHandler"))},_disableDrawConnectors:function(){var a=l.disconnect;a(this._onPanHandler_connect);a(this._onExtentChangeHandler_connect);a(this._onZoomHandler_connect);a(this._onScaleHandler_connect);this._onPanHandler_connect=this._onExtentChangeHandler_connect=this._onZoomHandler_connect=this._onScaleHandler_connect=null},_toggleTime:function(){var a=this._map;this.timeInfo&&this.useMapTime&&a&&!this.suspended?(this._timeConnect||(this._timeConnect=l.connect(a,"onTimeExtentChange",
this,this._onTimeExtentChangeHandler)),this._setTime(a.timeExtent)):(l.disconnect(this._timeConnect),this._timeConnect=null,this._setTime(null))},_setTime:function(a){this._params&&(this._params.time=a?a.toJson().join(","):null)},_onPanHandler:function(a,b){this._panDx=b.x;this._panDy=b.y;var c=this._dragOrigin,d=this._map.__visibleDelta,e=this._img;e&&("css-transforms"===this._map.navigationMode?(this._left=d.x+b.x,this._top=d.y+b.y,this._isChildLayer||k.set(this._div,g._css.names.transform,g._css.translate(this._left,
this._top))):k.set(e,{left:c.x+b.x+"px",top:c.y+b.y+"px"}))},_onExtentChangeHandler:function(a,b,c){if(!this.suspended){clearTimeout(this._wakeTimer);this._wakeTimer=null;var e=this._map,h=this._img,m=h&&h.style,p=this._dragOrigin;!b||c||!h||b.x===this._panDx&&b.y===this._panDy||("css-transforms"===e.navigationMode?(b=e.__visibleDelta,this._left=b.x,this._top=b.y,this._isChildLayer||k.set(this._div,g._css.names.transform,g._css.translate(this._left,this._top))):k.set(h,{left:p.x+b.x+"px",top:p.y+
b.y+"px"}));h?(p.x=parseInt(m.left,10),p.y=parseInt(m.top,10)):p.x=p.y=0;"css-transforms"===e.navigationMode&&c&&h&&(k.set(h,g._css.names.transition,"none"),h._multiply=h._multiply?n.multiply(h._matrix,h._multiply):h._matrix);this._fireUpdateStart();if(c=this._img_loading)if(this._clearEventListeners(c),f.destroy(c),this._img_loading=null,c=this._jsonRequest){try{c.cancel()}catch(H){}this._jsonRequest=null}var r=e.width;c=e.height;b=r;var u=0;10<=this.version&&e.wrapAround180&&(a=a._normalize(!0));
this.extentProcessor&&(u=this.extentProcessor({layer:this,extent:a,width:b}),a=u.extent,b=u.width,u=u.marginLeft||0);if(this.isPNG32)h=this._img_loading=f.create("div"),h.id=e.id+"_"+this.id+"_"+(new Date).getTime(),k.set(h,{position:"absolute",left:"0px",top:"0px",width:b+"px",height:c+"px"}),e=h.appendChild(f.create("div")),k.set(e,{opacity:0,width:b+"px",height:c+"px"}),this.getImageUrl(a,b,c,this._divAlphaImageFunc),h=null;else{var w=this._img_loading=f.create("img"),B=g._css.names,R=d("ie"),
D={position:"absolute",width:b+"px",height:c+"px"};8===R&&(D.opacity=this.opacity);null!=u&&0!==u&&(D.marginLeft=u+"px");"css-transforms"===e.navigationMode?(D[B.transform]=g._css.translate(-this._left,-this._top),w._tdx=-this._left,w._tdy=-this._top,D[B.transition]=B.transformName+" "+t+"ms ease",this.extentProcessor&&(D[B.origin]=r/2-u+"px "+c/2+"px")):(D.left="0px",D.top="0px");w.id=e.id+"_"+this.id+"_"+(new Date).getTime();k.set(w,D);w._onload_connect=l.connect(w,"onload",this,"_onLoadHandler");
w._onerror_connect=l.connect(w,"onerror",this,"_onErrorHandler");w._onabort_connect=l.connect(w,"onabort",this,"_onErrorHandler");this._startRect={left:p.x,top:p.y,width:h?parseInt(m.width,10):b,height:h?parseInt(m.height,10):c,marginLeft:h?parseInt(m.marginLeft||"0",10):u,zoom:m&&m.zoom?parseFloat(m.zoom):1};this.getImageUrl(a,b,c,this._imgSrcFunc);w=null}}},_onTimeExtentChangeHandler:function(a){this.suspended||(this._setTime(a),this.refresh(!0))},getImageUrl:function(a,b,c,d){},_imgSrcFunc:function(a){this._img_loading.src=
a},_divAlphaImageFunc:function(a){k.set(this._img_loading,"filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'"+a+"', sizingMethod\x3d'scale')");this._onLoadHandler({currentTarget:this._img_loading})},_onLoadHandler:function(a){a=a.currentTarget;var c=this._map;this._clearEventListeners(a);!c||c.__panning||c.__zooming?f.destroy(a):(this._img&&this._div.removeChild(this._img),this._img=a,c=a.style,this._startRect={left:0,top:0,width:parseInt(c.width,10),height:parseInt(c.height,10),
marginLeft:parseInt(c.marginLeft||"0",10),zoom:1},this._div.appendChild(a),this.suspended||b.show(this._div),this._img_loading=null,a=this._dragOrigin,a.x=a.y=0,this.onUpdate());this._fireUpdateEnd()},_onErrorHandler:function(a){a=a.currentTarget;k.set(a,"visibility","hidden");this._clearEventListeners(a);a=Error("Unable to load image: "+a.src);this.onError(a);this._fireUpdateEnd(a)},_clearEventListeners:function(a){l.disconnect(a._onload_connect);l.disconnect(a._onerror_connect);l.disconnect(a._onabort_connect);
a._onload_connect=a._onerror_connect=a._onabort_connect=null},setUseMapTime:function(a,b){this.useMapTime=a;this._toggleTime();b||this.refresh(!0)},refresh:function(){this._map&&this._onExtentChangeHandler(this._map.extent)},_onScaleHandler:function(a,b){var c={},d=g._css.names,e=this._img;if(e){k.set(e,d.transition,b?"none":d.transformName+" "+t+"ms ease");e._matrix=a;a=e._multiply?n.multiply(a,e._multiply):a;if(e._tdx||e._tdy)a=n.multiply(a,{xx:1,xy:0,yx:0,yy:1,dx:e._tdx,dy:e._tdy});c[d.transform]=
g._css.matrix(a);k.set(e,c)}},_onZoomHandler:function(a,b,c){a=this._startRect;var e=a.width*b,f=a.height*b,g=a.marginLeft*b,h=this._img,l=d("ie");h&&(l&&8>l?k.set(h,{left:a.left-(e-a.width)*(c.x-a.left)/a.width+"px",top:a.top-(f-a.height)*(c.y-a.top)/a.height+"px",zoom:b*a.zoom}):k.set(h,{left:a.left-(e-a.width)*(c.x-a.left)/a.width+"px",top:a.top-(f-a.height)*(c.y-a.top)/a.height+"px",width:e+"px",height:f+"px"}),null!=g&&0!==g&&k.set(h,{marginLeft:g+"px"}))},_exportMapImage:function(a,b,d){var e=
this._exportMapImageHandler;b.token=this._getToken();c({url:a,content:b,callbackParamName:"callback",load:function(a,b){e(a,b,d)},error:p.defaults.io.errorHandler})},_exportMapImageHandler:function(a,b,c){a=new h(a);this.onMapImageExport(a);c&&c(a)},onMapImageExport:function(){},setOpacity:function(a){if(this.opacity!=a)this.onOpacityChange(this.opacity=a)},onOpacityChange:function(){},_opacityChangeHandler:function(a){var b=8===d("ie")?this._img:this._div;k.set(b,"opacity",a)}});d("extend-esri")&&
a.setObject("layers.DynamicMapServiceLayer",m,g);return m})},"esri/layers/MapImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/has ../kernel ../domUtils ../geometry/Extent".split(" "),function(m,l,a,f,k,n,g){m=m(null,{declaredClass:"esri.layers.MapImage",constructor:function(a){l.mixin(this,a);this.extent=new g(this.extent)},visible:!0,opacity:1,getLayer:function(){return this._layer},getNode:function(){return this._node},show:function(){if(!this.visible){this.visible=
!0;var a=this._node,d=this._layer,c;if(a){if(c=d&&d._div)d.suspended||d._setPos(a,c._left,c._top),(d._active||c).appendChild(a);n.show(a)}}},hide:function(){if(this.visible){this.visible=!1;var a=this._node;a&&(n.hide(a),a.parentNode&&a.parentNode.removeChild(a))}},setOpacity:function(f){var d=this._node;this.opacity=f;d&&a.set(d,"opacity",f)}});f("extend-esri")&&l.setObject("layers.MapImage",m,k);return m})},"esri/layers/ImageParameters":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../lang ../layerUtils".split(" "),
function(m,l,a,f,k,n,g,p){l=l(null,{declaredClass:"esri.layers.ImageParameters",constructor:function(){this.layerDefinitions=[]},bbox:null,extent:null,width:null,height:null,dpi:null,format:null,imageSpatialReference:null,layerOption:null,layerIds:null,transparent:null,timeExtent:null,layerTimeOptions:null,toJson:function(a){this.bbox&&m.deprecated(this.declaredClass+" : Property 'bbox' deprecated. Use property 'extent'.");var c=this.bbox||this.extent,c=c&&a&&c._normalize(!0);a=this.layerOption;var b=
c?c.spatialReference.wkid||f.toJson(c.spatialReference.toJson()):null,d=this.imageSpatialReference,c={dpi:this.dpi,format:this.format,transparent:this.transparent,size:null!==this.width&&null!==this.height?this.width+","+this.height:null,bbox:c?c.xmin+","+c.ymin+","+c.xmax+","+c.ymax:null,bboxSR:b,layers:a?a+":"+this.layerIds.join(","):null,imageSR:d?d.wkid||f.toJson(d.toJson()):b};c.layerDefs=p._serializeLayerDefinitions(this.layerDefinitions);a=this.timeExtent;c.time=a?a.toJson().join(","):null;
c.layerTimeOptions=p._serializeTimeOptions(this.layerTimeOptions);return g.filter(c,function(a){if(null!==a)return!0})}});a.mixin(l,{LAYER_OPTION_SHOW:"show",LAYER_OPTION_HIDE:"hide",LAYER_OPTION_INCLUDE:"include",LAYER_OPTION_EXCLUDE:"exclude"});k("extend-esri")&&a.setObject("layers.ImageParameters",l,n);return l})},"esri/_time":function(){define(["./TimeExtent"],function(){return{}})},"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(m){m(['dojo/i18n!*preload*esri/nls/jsapi*["ar","az","ca","cs","da","de-de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ro","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});define("esri/jsapi","dojo/fx/Toggler dojo/_base/html dijit/_base/manager ./main ./map ./geometry ./symbol ./renderer ./utils ./layers/graphics ./layers/agstiled ./layers/agsdynamic".split(" "),function(){return{}});