// 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:{"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),function(m,f,g,t,n,u,p,v,l,c,e,h,a,y,k,x,q,B,C,D,E,F,w){function z(b){return function(d){v[d?
"set":"remove"](this.domNode,b,d);this._set(b,d)}}a.add("dijit-legacy-requires",!y.isAsync);a.add("dojo-bidi",!1);a("dijit-legacy-requires")&&q(0,function(){m(["dijit/_base/manager"])});var A={};t=u("dijit._WidgetBase",[B,E],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:z("lang"),dir:"",_setDirAttr:z("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(b){this._set("ownerDocument",
b)},attributeMap:{},_blankGif:t.blankGif||m.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var b=this.constructor;if(!b._setterAttrs){var d=b.prototype,r=b._setterAttrs=[],b=b._onMap={},a;for(a in d.attributeMap)r.push(a);for(a in d)/^on/.test(a)&&(b[a.substring(2).toLowerCase()]=a),/^_set[A-Z](.*)Attr$/.test(a)&&(a=a.charAt(4).toLowerCase()+a.substr(5,a.length-9),d.attributeMap&&a in d.attributeMap||r.push(a))}},postscript:function(b,d){this.create(b,d)},create:function(b,d){this._introspect();
this.srcNodeRef=p.byId(d);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);b&&(this.params=b,k.mixin(this,b));this.postMixInProperties();this.id||(this.id=w.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=D.body(this.ownerDocument);w.add(this);
this.buildRendering();var a;if(this.domNode){this._applyAttributes();var c=this.srcNodeRef;c&&c.parentNode&&this.domNode!==c&&(c.parentNode.replaceChild(this.domNode,c),a=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();a&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var b={},d;for(d in this.params||{})b[d]=this._get(d);f.forEach(this.constructor._setterAttrs,function(d){if(!(d in b)){var a=this._get(d);a&&this.set(d,a)}},this);for(d in b)this.set(d,b[d])},
postMixInProperties:function(){},buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var b=this.baseClass.split(" ");this.isLeftToRight()||(b=b.concat(f.map(b,function(b){return b+"Rtl"})));l.add(this.domNode,b)}},postCreate:function(){},startup:function(){this._started||(this._started=!0,f.forEach(this.getChildren(),function(b){b._started||b._destroyed||!k.isFunction(b.startup)||(b.startup(),b._started=!0)}))},destroyRecursive:function(b){this._beingDestroyed=
!0;this.destroyDescendants(b);this.destroy(b)},destroy:function(b){function d(d){d.destroyRecursive?d.destroyRecursive(b):d.destroy&&d.destroy(b)}this._beingDestroyed=!0;this.uninitialize();f.forEach(this._connects,k.hitch(this,"disconnect"));f.forEach(this._supportingWidgets,d);this.domNode&&f.forEach(w.findWidgets(this.domNode,this.containerNode),d);this.destroyRendering(b);w.remove(this.id);this._destroyed=!0},destroyRendering:function(b){this.bgIframe&&(this.bgIframe.destroy(b),delete this.bgIframe);
this.domNode&&(b?v.remove(this.domNode,"widgetId"):c.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(b||c.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(b){f.forEach(this.getChildren(),function(d){d.destroyRecursive&&d.destroyRecursive(b)})},uninitialize:function(){return!1},_setStyleAttr:function(b){var d=this.domNode;k.isObject(b)?h.set(d,b):d.style.cssText=d.style.cssText?d.style.cssText+("; "+b):b;this._set("style",b)},_attrToDom:function(b,d,a){a=3<=
arguments.length?a:this.attributeMap[b];f.forEach(k.isArray(a)?a:[a],function(a){var r=this[a.node||a||"domNode"];switch(a.type||"attribute"){case "attribute":k.isFunction(d)&&(d=k.hitch(this,d));a=a.attribute?a.attribute:/^on[A-Z][a-zA-Z]*$/.test(b)?b.toLowerCase():b;r.tagName?v.set(r,a,d):r.set(a,d);break;case "innerText":r.innerHTML="";r.appendChild(this.ownerDocument.createTextNode(d));break;case "innerHTML":r.innerHTML=d;break;case "class":l.replace(r,d,this[b]);break;case "toggleClass":l.toggle(r,
a.className||b,d)}},this)},get:function(b){var d=this._getAttrNames(b);return this[d.g]?this[d.g]():this._get(b)},set:function(b,d){if("object"===typeof b){for(var a in b)this.set(a,b[a]);return this}a=this._getAttrNames(b);var c=this[a.s];if(k.isFunction(c))var q=c.apply(this,Array.prototype.slice.call(arguments,1));else{var c=this.focusNode&&!k.isFunction(this.focusNode)?"focusNode":"domNode",h=this[c]&&this[c].tagName,e;if((e=h)&&!(e=A[h])){e=this[c];var x={},g;for(g in e)x[g.toLowerCase()]=!0;
e=A[h]=x}g=e;a=b in this.attributeMap?this.attributeMap[b]:a.s in this?this[a.s]:g&&a.l in g&&"function"!=typeof d||/^aria-|^data-|^role$/.test(b)?c:null;null!=a&&this._attrToDom(b,d,a);this._set(b,d)}return q||this},_attrPairNames:{},_getAttrNames:function(b){var a=this._attrPairNames;if(a[b])return a[b];var c=b.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});return a[b]={n:b+"Node",s:"_set"+c+"Attr",g:"_get"+c+"Attr",l:c.toLowerCase()}},_set:function(a,d){var b=
this[a];this[a]=d;!this._created||b===d||b!==b&&d!==d||(this._watchCallbacks&&this._watchCallbacks(a,b,d),this.emit("attrmodified-"+a,{detail:{prevValue:b,newValue:d}}))},_get:function(a){return this[a]},emit:function(a,d,c){d=d||{};void 0===d.bubbles&&(d.bubbles=!0);void 0===d.cancelable&&(d.cancelable=!0);d.detail||(d.detail={});d.detail.widget=this;var b,r=this["on"+a];r&&(b=r.apply(this,c?c:[d]));this._started&&!this._beingDestroyed&&x.emit(this.domNode,a.toLowerCase(),d);return b},on:function(a,
d){var b=this._onMap(a);return b?g.after(this,b,d,!0):this.own(x(this.domNode,a,d))[0]},_onMap:function(a){var b=this.constructor,c=b._onMap;if(!c){var c=b._onMap={},e;for(e in b.prototype)/^on/.test(e)&&(c[e.replace(/^on/,"").toLowerCase()]=e)}return c["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?w.findWidgets(this.containerNode):[]},getParent:function(){return w.getEnclosingWidget(this.domNode.parentNode)},
connect:function(a,d,c){return this.own(n.connect(a,d,this,c))[0]},disconnect:function(a){a.remove()},subscribe:function(a,d){return this.own(C.subscribe(a,k.hitch(this,d)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():e.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=h.get(this.domNode,"display")},placeAt:function(a,d){var b=!a.tagName&&w.byId(a);!b||!b.addChild||d&&"number"!==typeof d?(b=b&&"domNode"in
b?b.containerNode&&!/after|before|replace/.test(d||"")?b.containerNode:b.domNode:p.byId(a,this.ownerDocument),c.place(this.domNode,b,d),!this._started&&(this.getParent()||{})._started&&this.startup()):b.addChild(this,d);return this},defer:function(a,d){var b=setTimeout(k.hitch(this,function(){b&&(b=null,this._destroyed||k.hitch(this,a)())}),d||0);return{remove:function(){b&&(clearTimeout(b),b=null);return null}}}});a("dojo-bidi")&&t.extend(F);return t})},"dijit/Destroyable":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare"],function(m,f,g){return g("dijit.Destroyable",null,{destroy:function(g){this._destroyed=!0},own:function(){var g=["destroyRecursive","destroy","remove"];m.forEach(arguments,function(n){function u(){t.remove();m.forEach(l,function(c){c.remove()})}var p,t=f.before(this,"destroy",function(c){n[p](c)}),l=[];n.then?(p="cancel",n.then(u,u)):m.forEach(g,function(c){"function"===typeof n[c]&&(p||(p=c),l.push(f.after(n,c,u,!0)))})},this);return arguments}})})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),
function(m,f,g,t,n,u,p,v){var l=f("dijit._TemplatedMixin",v,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(c){var e=this.declaredClass,h=this;return p.substitute(c,this,function(a,c){"!"==c.charAt(0)&&(a=t.getObject(c.substr(1),!1,h));if("undefined"==typeof a)throw Error(e+" template:"+c);return null==a?"":"!"==c.charAt(0)?a:this._escapeValue(""+a)},this)},_escapeValue:function(c){return c.replace(/["'<>&]/g,function(c){return{"\x26":"\x26amp;",
"\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[c]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=m(this.templatePath,{sanitize:!0}));var c=l.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),e;if(t.isString(c)){if(e=g.toDom(this._stringRepl(c),this.ownerDocument),1!=e.nodeType)throw Error("Invalid template: "+c);}else e=c.cloneNode(!0);this.domNode=e}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);
this._rendered=!0},_fillContent:function(c){var e=this.containerNode;if(c&&e)for(;c.hasChildNodes();)e.appendChild(c.firstChild)}});l._templateCache={};l.getCachedTemplate=function(c,e,h){var a=l._templateCache,f=c,k=a[f];if(k){try{if(!k.ownerDocument||k.ownerDocument==(h||document))return k}catch(x){}g.destroy(k)}c=p.trim(c);if(e||c.match(/\$\{([^\}]+)\}/g))return a[f]=c;e=g.toDom(c,h);if(1!=e.nodeType)throw Error("Invalid template: "+c);return a[f]=e};u("ie")&&n(window,"unload",function(){var c=
l._templateCache,e;for(e in c){var h=c[e];"object"==typeof h&&g.destroy(h);delete c[e]}});return l})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(m){return m.cache})},"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(m,f,g,t,n,u,p,v,l){var c=n.delegate(v,{mouseenter:u.enter,mouseleave:u.leave,keypress:g._keypress}),e;g=t("dijit._AttachMixin",
null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(c){for(var a=c;;)if(1==a.nodeType&&(this._processTemplateNode(a,function(a,c){return a.getAttribute(c)},this._attach)||this.searchContainerNode)&&a.firstChild)a=a.firstChild;else{if(a==c)break;for(;!a.nextSibling;)if(a=a.parentNode,a==c)return;a=
a.nextSibling}},_processTemplateNode:function(c,a,e){var k=!0,g=this.attachScope||this,q=a(c,"dojoAttachPoint")||a(c,"data-dojo-attach-point");if(q)for(var f=q.split(/\s*,\s*/);q=f.shift();)n.isArray(g[q])?g[q].push(c):g[q]=c,k="containerNode"!=q,this._attachPoints.push(q);if(a=a(c,"dojoAttachEvent")||a(c,"data-dojo-attach-event"))for(q=a.split(/\s*,\s*/),f=n.trim;a=q.shift();)if(a){var h=null;-1!=a.indexOf(":")?(h=a.split(":"),a=f(h[0]),h=f(h[1])):a=f(a);h||(h=a);this._attachEvents.push(e(c,a,n.hitch(g,
h)))}return k},_attach:function(g,a,f){a=a.replace(/^on/,"").toLowerCase();a="dijitclick"==a?e||(e=m("./a11yclick")):c[a]||a;return p(g,a,f)},_detachTemplateNodes:function(){var c=this.attachScope||this;f.forEach(this._attachPoints,function(a){delete c[a]});this._attachPoints=[];f.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});n.extend(l,{dojoAttachEvent:"",dojoAttachPoint:""});return g})},
"url:esri/dijit/templates/HomeButton.html":'\x3cdiv class\x3d"${theme}" role\x3d"presentation"\x3e\r\n    \x3cdiv class\x3d"${_css.container}"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"_homeNode" title\x3d"${_i18n.widgets.homeButton.home.title}" role\x3d"button" class\x3d"${_css.home}" tabindex\x3d"0"\x3e\x3cspan\x3e${_i18n.widgets.homeButton.home.button}\x3c/span\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',"*noref":1}});
define("esri/dijit/HomeButton","dojo/Evented dojo/_base/declare dojo/_base/lang dojo/has ../kernel dijit/_WidgetBase dijit/a11yclick dijit/_TemplatedMixin dojo/on dojo/Deferred dojo/text!./templates/HomeButton.html dojo/i18n!../nls/jsapi dojo/dom-class dojo/dom-style".split(" "),function(m,f,g,t,n,u,p,v,l,c,e,h,a,y){m=f("esri.dijit.HomeButton",[u,v,m],{templateString:e,options:{theme:"HomeButton",map:null,extent:null,fit:!1,visible:!0},constructor:function(a,c){var e=g.mixin({},this.options,a);this.domNode=
c;this._i18n=h;this.set("map",e.map);this.set("theme",e.theme);this.set("visible",e.visible);this.set("extent",e.extent);this.set("fit",e.fit);this.watch("theme",this._updateThemeWatch);this.watch("visible",this._visible);this._css={container:"homeContainer",home:"home",loading:"loading"}},postCreate:function(){this.inherited(arguments);this.own(l(this._homeNode,p,g.hitch(this,this.home)))},startup:function(){this.inherited(arguments);this.map||(this.destroy(),console.log("HomeButton::map required"));
if(this.map.loaded)this._init();else l.once(this.map,"load",g.hitch(this,function(){this._init()}))},destroy:function(){this.inherited(arguments)},home:function(){var a=new c,e=this.get("extent");this._showLoading();var f={extent:e};e?this.map.extent!==e?this.map.setExtent(e,this.get("fit")).then(g.hitch(this,function(){this._hideLoading();this.emit("home",f);a.resolve(f)}),g.hitch(this,function(c){c||(c=Error("HomeButton::Error setting map extent"));f.error=c;this.emit("home",f);a.reject(c)})):(this._hideLoading(),
this.emit("home",f),a.resolve(f)):(this._hideLoading(),e=Error("HomeButton::home extent is undefined"),f.error=e,this.emit("home",f),a.reject(e));return a.promise},show:function(){this.set("visible",!0)},hide:function(){this.set("visible",!1)},_init:function(){this._visible();this.get("extent")||this.set("extent",this.map.extent);this.set("loaded",!0);this.emit("load",{})},_showLoading:function(){a.add(this._homeNode,this._css.loading)},_hideLoading:function(){a.remove(this._homeNode,this._css.loading)},
_updateThemeWatch:function(c,e,f){a.remove(this.domNode,e);a.add(this.domNode,f)},_visible:function(){this.get("visible")?y.set(this.domNode,"display","block"):y.set(this.domNode,"display","none")}});t("extend-esri")&&g.setObject("dijit.HomeButton",m,n);return m});