/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */
//>>built
require({cache:{"esri/layers/FeatureType":function(){define("esri/layers/FeatureType",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/lang","esri/symbols/jsonUtils","esri/layers/RangeDomain","esri/layers/CodedValueDomain","esri/layers/InheritedDomain","esri/layers/FeatureTemplate"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){var _c=_1(null,{declaredClass:"esri.layers.FeatureType",constructor:function(_d){if(_d&&_2.isObject(_d)){this.id=_d.id;this.name=_d.name;var _e=_d.symbol;if(_e){this.symbol=_7.fromJson(_e);}var _f=_d.domains,_10,i;var _11=this.domains={};for(_10 in _f){if(_f.hasOwnProperty(_10)){var _12=_f[_10];switch(_12.type){case "range":_11[_10]=new _8(_12);break;case "codedValue":_11[_10]=new _9(_12);break;case "inherited":_11[_10]=new _a(_12);break;}}}var _13=_d.templates;if(_13){var _14=this.templates=[];for(i=0;i<_13.length;i++){_14.push(new _b(_13[i]));}}}},toJson:function(){var _15={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _16,_17=this.domains,_18=this.templates,_19=_6.fixJson;if(_17){var _1a=_15.domains={};for(_16 in _17){if(_17.hasOwnProperty(_16)){_1a[_16]=_17[_16]&&_17[_16].toJson();}}_19(_1a);}if(_18){_15.templates=_3.map(_18,function(_1b){return _1b.toJson();});}return _19(_15);}});if(_4("extend-esri")){_2.setObject("layers.FeatureType",_c,_5);}return _c;});},"dijit/hccss":function(){define("dijit/hccss",["dojo/dom-class","dojo/hccss","dojo/ready","dojo/_base/window"],function(_1c,has,_1d,win){_1d(90,function(){if(has("highcontrast")){_1c.add(win.body(),"dijit_a11y");}});return has;});},"dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_1e,_1f){return _1e("dijit._Contained",null,{_getSibling:function(_20){var _21=this.domNode;do{_21=_21[_20+"Sibling"];}while(_21&&_21.nodeType!=1);return _21&&_1f.byNode(_21);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});});},"dojox/grid/_View":function(){require({cache:{"url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n"}});define("dojox/grid/_View",["dojo","dijit/registry","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/_base/connect","dojo/_base/sniff","dojo/query","dojo/_base/window","dojo/text!./resources/View.html","dojo/dnd/Source","dijit/_Widget","dijit/_TemplatedMixin","dojox/html/metrics","./util","dojo/_base/html","./_Builder","dojo/dnd/Avatar","dojo/dnd/Manager"],function(_22,_23,_24,_25,_26,_27,_28,has,_29,win,_2a,_2b,_2c,_2d,_2e,_2f,_30,_31,_32,_33){var _34=function(_35,_36){return _35.style.cssText==undefined?_35.getAttribute("style"):_35.style.cssText;};var _37=_25("dojox.grid._View",[_2c,_2d],{defaultWidth:"18em",viewWidth:"",templateString:_2a,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:_31._HeaderBuilder,_contentBuilderClass:_31._ContentBuilder,postMixInProperties:function(){this.rowNodes={};},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");_2f.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);_2f.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!this.grid.isLeftToRight()){this.headerNodeContainer.style.width="";}},destroy:function(){_30.destroy(this.headerNode);delete this.headerNode;for(var i in this.rowNodes){this._cleanupRowWidgets(this.rowNodes[i]);_30.destroy(this.rowNodes[i]);}this.rowNodes={};if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(has("ie")||has("webkit")||has("opera")){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_38){var vs=(this.structure=_38);if(vs.width&&!isNaN(vs.width)){this.viewWidth=vs.width+"em";}else{this.viewWidth=vs.width||(vs.noscroll?"auto":this.viewWidth);}this._onBeforeRow=vs.onBeforeRow||function(){};this._onAfterRow=vs.onAfterRow||function(){};this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},_cleanupRowWidgets:function(_39){if(_39){_26.forEach(_29("[widgetId]",_39).map(_23.byNode),function(w){if(w._destroyOnRemove){w.destroy();delete w;}else{if(w.domNode&&w.domNode.parentNode){w.domNode.parentNode.removeChild(w.domNode);}}});}},onBeforeRow:function(_3a,_3b){this._onBeforeRow(_3a,_3b);if(_3a>=0){this._cleanupRowWidgets(this.getRowNode(_3a));}},onAfterRow:function(_3c,_3d,_3e){this._onAfterRow(_3c,_3d,_3e);var g=this.grid;_26.forEach(_29(".dojoxGridStubNode",_3e),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _3f=window.parseInt(_30.attr(n,"cellIdx"),10);var _40=g.getCell(_3f);var w=_23.byId(lw);if(w){n.parentNode.replaceChild(w.domNode,n);if(!w._started){w.startup();}_22.destroy(n);}else{n.innerHTML="";}}},this);},testFlexCells:function(){this.flexCells=false;for(var j=0,row;(row=this.structure.cells[j]);j++){for(var i=0,_41;(_41=row[i]);i++){_41.view=this;this.flexCells=this.flexCells||_41.isFlex();}}return this.flexCells;},updateStructure:function(){this.header.update();this.content.update();},getScrollbarWidth:function(){var _42=this.hasVScrollbar();var _43=_30.style(this.scrollboxNode,"overflow");if(this.noscroll||!_43||_43=="hidden"){_42=false;}else{if(_43=="scroll"){_42=true;}}return (_42?_2e.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?(h.firstChild.offsetWidth||_30.style(h.firstChild,"width")):0;},setColumnsWidth:function(_44){this.headerContentNode.firstChild.style.width=_44+"px";if(this.viewWidth){this.viewWidth=_44+"px";}},getWidth:function(){return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";},getContentWidth:function(){return Math.max(0,_30._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1;}var _45=this.grid.layout.cells;var _46=_27.hitch(this,function(_47,_48){!this.grid.isLeftToRight()&&(_48=!_48);var inc=_48?-1:1;var idx=this.header.getCellNodeIndex(_47)+inc;var _49=_45[idx];while(_49&&_49.getHeaderNode()&&_49.getHeaderNode().style.display=="none"){idx+=inc;_49=_45[idx];}if(_49){return _49.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _4a="dojoxGrid_bottomMarker";var _4b="dojoxGrid_topMarker";if(this.bottomMarker){_30.destroy(this.bottomMarker);}this.bottomMarker=_30.byId(_4a);if(this.topMarker){_30.destroy(this.topMarker);}this.topMarker=_30.byId(_4b);if(!this.bottomMarker){this.bottomMarker=_30.create("div",{"id":_4a,"class":"dojoxGridColPlaceBottom"},win.body());this._hide(this.bottomMarker);this.topMarker=_30.create("div",{"id":_4b,"class":"dojoxGridColPlaceTop"},win.body());this._hide(this.topMarker);}this.arrowDim=_30.contentBox(this.bottomMarker);var _4c=_30.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new _2b(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:_27.hitch(this,function(e){this.header.decorateEvent(e);if((this.header.overRightResizeArea(e)||this.header.overLeftResizeArea(e))&&this.header.canResize(e)&&!this.header.moveable){this.header.beginColumnResize(e);}else{if(this.grid.headerMenu){this.grid.headerMenu.onCancel(true);}if(e.button===(has("ie")<9?1:0)){_2b.prototype.onMouseDown.call(this.source,e);}}}),onMouseOver:_27.hitch(this,function(e){var src=this.source;if(src._getChildByEvent(e)){_2b.prototype.onMouseOver.apply(src,arguments);}}),_markTargetAnchor:_27.hitch(this,function(_4d){var src=this.source;if(src.current==src.targetAnchor&&src.before==_4d){return;}if(src.targetAnchor&&_46(src.targetAnchor,src.before)){src._removeItemClass(_46(src.targetAnchor,src.before),src.before?"After":"Before");}_2b.prototype._markTargetAnchor.call(src,_4d);var _4e=_4d?src.targetAnchor:_46(src.targetAnchor,src.before);var _4f=0;if(!_4e){_4e=src.targetAnchor;_4f=_30.contentBox(_4e).w+this.arrowDim.w/2+2;}var pos=_30.position(_4e,true);var _50=Math.floor(pos.x-this.arrowDim.w/2+_4f);_30.style(this.bottomMarker,"visibility","visible");_30.style(this.topMarker,"visibility","visible");_30.style(this.bottomMarker,{"left":_50+"px","top":(_4c+pos.y)+"px"});_30.style(this.topMarker,{"left":_50+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_46(src.targetAnchor,src.before)){src._addItemClass(_46(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:_27.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_46(src.targetAnchor,src.before)){src._removeItemClass(_46(src.targetAnchor,src.before),src.before?"After":"Before");}this._hide(this.bottomMarker);this._hide(this.topMarker);_2b.prototype._unmarkTargetAnchor.call(src);}),destroy:_27.hitch(this,function(){_28.disconnect(this._source_conn);_28.unsubscribe(this._source_sub);_2b.prototype.destroy.call(this.source);if(this.bottomMarker){_30.destroy(this.bottomMarker);delete this.bottomMarker;}if(this.topMarker){_30.destroy(this.topMarker);delete this.topMarker;}}),onDndCancel:_27.hitch(this,function(){_2b.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker);})});this._source_conn=_28.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=_28.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_hide:function(_51){_30.style(_51,{top:"-10000px","visibility":"hidden"});},_onDndDropBefore:function(_52,_53,_54){if(_33.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _55=this.grid.views.views;var _56=_55[_52.viewIndex];var _57=_55[this.index];if(_57!=_56){_56.convertColPctToFixed();_57.convertColPctToFixed();}},_onDndDrop:function(_58,_59,_5a){if(_33.manager().target!==this.source){if(_33.manager().source===this.source){this._removingColumn=true;}return;}this._hide(this.bottomMarker);this._hide(this.topMarker);var _5b=function(n){return n?_30.attr(n,"idx"):null;};var w=_30.marginBox(_59[0]).w;if(_58.viewIndex!==this.index){var _5c=this.grid.views.views;var _5d=_5c[_58.viewIndex];var _5e=_5c[this.index];if(_5d.viewWidth&&_5d.viewWidth!="auto"){_5d.setColumnsWidth(_5d.getColumnsWidth()-w);}if(_5e.viewWidth&&_5e.viewWidth!="auto"){_5e.setColumnsWidth(_5e.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!this.grid.isLeftToRight()&&(stb=!stb);var _5f=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_5f.moveColumn(_58.viewIndex,idx,_5b(_59[0]),_5b(stn),stb);},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}_2f.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode]);},_getHeaderContent:function(_60){var n=_60.name||_60.grid.getCellName(_60);if(/^\s+$/.test(n)){n="&nbsp;";}var ret=["<div class=\"dojoxGridSortNode"];if(_60.index!=_60.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_60.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_60.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\"presentation\"></div>","<div class=\"dojoxGridColCaption\">"]);}ret=ret.concat([n,"</div></div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_61){var _62=this._hasHScroll||false;if(this._hasHScroll==undefined||_61){if(this.noscroll){this._hasHScroll=false;}else{var _63=_30.style(this.scrollboxNode,"overflow");if(_63=="hidden"){this._hasHScroll=false;}else{if(_63=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_62!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_64){var _65=this._hasVScroll||false;if(this._hasVScroll==undefined||_64){if(this.noscroll){this._hasVScroll=false;}else{var _66=_30.style(this.scrollboxNode,"overflow");if(_66=="hidden"){this._hasVScroll=false;}else{if(_66=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_65!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _67=false;this.grid.initialWidth="";var _68=_29("th",this.headerContentNode);var _69=_26.map(_68,function(c,_6a){var w=c.style.width;_30.attr(c,"vIdx",_6a);if(w&&w.slice(-1)=="%"){_67=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return _30.contentBox(c).w;});if(_67){_26.forEach(this.grid.layout.cells,function(_6b,idx){if(_6b.view==this){var _6c=_6b.view.getHeaderCellNode(_6b.index);if(_6c&&_30.hasAttr(_6c,"vIdx")){var _6d=window.parseInt(_30.attr(_6c,"vIdx"));this.setColWidth(idx,_69[_6d]);_30.removeAttr(_6c,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_6e){if(!this.grid._autoHeight){var h=(this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10))||this.domNode.clientHeight;var _6f=this;var _70=function(){var v;for(var i in _6f.grid.views.views){v=_6f.grid.views.views[i];if(v!==_6f&&v.hasHScrollbar()){return true;}}return false;};if(_6e||(this.noscroll&&_70())){h-=_2e.getScrollbar().h;}_2f.setStyleHeightPx(this.scrollboxNode,h);}this.hasVScrollbar(true);},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();if(!this._removingColumn){w=Math.max(w,this.getColumnsWidth())+"px";}else{w=Math.min(w,this.getColumnsWidth())+"px";this._removingColumn=false;}var cn=this.contentNode;cn.style.width=w;this.hasHScrollbar(true);},setSize:function(w,h){var ds=this.domNode.style;var hs=this.headerNode.style;if(w){ds.width=w;hs.width=w;}ds.height=(h>=0?h+"px":"");},renderRow:function(_71){var _72=this.createRowNode(_71);this.buildRow(_71,_72);return _72;},createRowNode:function(_73){var _74=document.createElement("div");_74.className=this.classTag+"Row";if(this instanceof _24.grid._RowSelector){_30.attr(_74,"role","presentation");}else{_30.attr(_74,"role","row");if(this.grid.selectionMode!="none"){_74.setAttribute("aria-selected","false");}}_74[_2f.gridViewTag]=this.id;_74[_2f.rowIndexTag]=_73;this.rowNodes[_73]=_74;return _74;},buildRow:function(_75,_76){this.buildRowContent(_75,_76);this.styleRow(_75,_76);},buildRowContent:function(_77,_78){_78.innerHTML=this.content.generateHtml(_77,_77);if(this.flexCells&&this.contentWidth){_78.firstChild.style.width=this.contentWidth;}_2f.fire(this,"onAfterRow",[_77,this.structure.cells,_78]);},rowRemoved:function(_79){if(_79>=0){this._cleanupRowWidgets(this.getRowNode(_79));}this.grid.edit.save(this,_79);delete this.rowNodes[_79];},getRowNode:function(_7a){return this.rowNodes[_7a];},getCellNode:function(_7b,_7c){var row=this.getRowNode(_7b);if(row){return this.content.getCellNode(row,_7c);}},getHeaderCellNode:function(_7d){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_7d);}},styleRow:function(_7e,_7f){_7f._style=_34(_7f);this.styleRowNode(_7e,_7f);},styleRowNode:function(_80,_81){if(_81){this.doStyleRowNode(_80,_81);}},doStyleRowNode:function(_82,_83){this.grid.styleRowNode(_82,_83);},updateRow:function(_84){var _85=this.getRowNode(_84);if(_85){_85.style.height="";this.buildRow(_84,_85);}return _85;},updateRowStyles:function(_86){this.styleRowNode(_86,this.getRowNode(_86));},lastTop:0,firstScroll:0,_nativeScroll:false,doscroll:function(_87){if(has("ff")>=13){this._nativeScroll=true;}var _88=this.grid.isLeftToRight();if(this.firstScroll<2){if((!_88&&this.firstScroll==1)||(_88&&this.firstScroll===0)){var s=_30.marginBox(this.headerNodeContainer);if(has("ie")){this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";}else{if(has("mozilla")){this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=_88?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;}}}this.firstScroll++;}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;var top=this.scrollboxNode.scrollTop;if(top!==this.lastTop){this.grid.scrollTo(top);}this._nativeScroll=false;},setScrollTop:function(_89){this.lastTop=_89;if(!this._nativeScroll){this.scrollboxNode.scrollTop=_89;}return this.scrollboxNode.scrollTop;},doContentEvent:function(e){if(this.content.decorateEvent(e)){this.grid.onContentEvent(e);}},doHeaderEvent:function(e){if(this.header.decorateEvent(e)){this.grid.onHeaderEvent(e);}},dispatchContentEvent:function(e){return this.content.dispatchEvent(e);},dispatchHeaderEvent:function(e){return this.header.dispatchEvent(e);},setColWidth:function(_8a,_8b){this.grid.setCellWidth(_8a,_8b+"px");},update:function(){if(!this.domNode){return;}this.content.update();this.grid.update();var _8c=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=_8c;this.headerNode.scrollLeft=_8c;}});var _8d=_25("dojox.grid._GridAvatar",_32,{construct:function(){var dd=win.doc;var a=dd.createElement("table");a.cellPadding=a.cellSpacing="0";a.className="dojoxGridDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dd.createElement("tbody");var tr=dd.createElement("tr");var td=dd.createElement("td");var img=dd.createElement("td");tr.className="dojoxGridDndAvatarItem";img.className="dojoxGridDndAvatarItemImage";img.style.width="16px";var _8e=this.manager.source,_8f;if(_8e.creator){_8f=_8e._normalizedCreator(_8e.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{_8f=this.manager.nodes[0].cloneNode(true);var _90,_91;if(_8f.tagName.toLowerCase()=="tr"){_90=dd.createElement("table");_91=dd.createElement("tbody");_91.appendChild(_8f);_90.appendChild(_91);_8f=_90;}else{if(_8f.tagName.toLowerCase()=="th"){_90=dd.createElement("table");_91=dd.createElement("tbody");var r=dd.createElement("tr");_90.cellPadding=_90.cellSpacing="0";r.appendChild(_8f);_91.appendChild(r);_90.appendChild(_91);_8f=_90;}}}_8f.id="";td.appendChild(_8f);tr.appendChild(img);tr.appendChild(td);_30.style(tr,"opacity",0.9);b.appendChild(tr);a.appendChild(b);this.node=a;var m=_33.manager();this.oldOffsetY=m.OFFSET_Y;m.OFFSET_Y=1;},destroy:function(){_33.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments);}});var _92=_33.manager().makeAvatar;_33.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined&&!_30.hasClass(win.body(),"dijit_a11y")){return new _8d(this);}return _92.call(_33.manager());};return _37;});},"esri/toolbars/_Box":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dojo/dom-style","dojox/gfx/Moveable","dojox/gfx/matrix","esri/kernel","esri/lang","esri/geometry/Point","esri/geometry/Polyline","esri/geometry/webMercatorUtils","esri/geometry/jsonUtils","esri/graphic"],function(_93,_94,_95,_96,has,_97,_98,_99,_9a,_9b,_9c,_9d,_9e,_9f,_a0){var BOX=_93(null,{declaredClass:"esri.toolbars._Box",constructor:function(_a1,map,_a2,_a3,_a4,_a5){this._graphic=_a1;this._map=map;this._toolbar=_a2;this._scale=_a3;this._rotate=_a4;this._defaultEventArgs={};this._scaleEvent="Scale";this._rotateEvent="Rotate";this._uniformScaling=_a5;var _a6=_a2._options;this._markerSymbol=_a6.boxHandleSymbol;this._lineSymbol=_a6.boxLineSymbol;this._moveStartHandler=_94.hitch(this,this._moveStartHandler);this._firstMoveHandler=_94.hitch(this,this._firstMoveHandler);this._moveStopHandler=_94.hitch(this,this._moveStopHandler);this._moveHandler=_94.hitch(this,this._moveHandler);this._init();},destroy:function(){this._cleanUp();this._graphic=this._map=this._toolbar=this._markerSymbol=this._lineSymbol=null;},refresh:function(){this._draw();},suspend:function(){_95.forEach(this._getAllGraphics(),function(g){g.hide();});},resume:function(){_95.forEach(this._getAllGraphics(),function(g){g.show();});this._draw();},_init:function(){this._draw();},_cleanUp:function(){if(this._connects){_95.forEach(this._connects,_96.disconnect);}var _a7=this._toolbar._scratchGL;if(this._anchors){_95.forEach(this._anchors,function(_a8){_a7.remove(_a8.graphic);var mov=_a8.moveable;if(mov){mov.destroy();}});}if(this._box){_a7.remove(this._box);}this._box=this._anchors=this._connects=null;},_draw:function(){if(!this._graphic.getDojoShape()){this._cleanUp();return;}var map=this._map,_a9=this._toolbar._scratchGL;var _aa=this._getBoxCoords();var _ab=new _9d(map.spatialReference);var _ac=_94.clone(_95.filter(_aa,function(pt,_ad){return (_ad!==8&&_ad%2===0);}));if(_ac[0]){_ac.push([_ac[0][0],_ac[0][1]]);}_ab.addPath(_ac);if(this._rotate){_ab.addPath([_aa[1],_aa[8]]);}if(this._box){this._box.setGeometry(_ab);}else{this._box=new _a0(_ab,this._lineSymbol);_a9.add(this._box);}if(this._anchors){_95.forEach(this._anchors,function(_ae,_af){if(!this._scale){_af=8;}var _b0=new _9c(_aa[_af],map.spatialReference);_ae.graphic.setGeometry(_b0);var mov=_ae.moveable,_b1=_ae.graphic.getDojoShape();if(_b1){if(!mov){_ae.moveable=this._getMoveable(_ae.graphic,_af);}else{if(_b1!==mov.shape){mov.destroy();_ae.moveable=this._getMoveable(_ae.graphic,_af);}}}},this);}else{this._anchors=[];this._connects=[];_95.forEach(_aa,function(_b2,_b3){if(!this._scale&&_b3<8){return;}_b2=new _9c(_b2,map.spatialReference);var _b4=new _a0(_b2,this._markerSymbol);_a9.add(_b4);this._anchors.push({graphic:_b4,moveable:this._getMoveable(_b4,_b3)});},this);}},_getBoxCoords:function(_b5){var _b6=this._graphic,map=this._map,_b7=this._getTransformedBoundingBox(_b6),_b8=[],pt,_b9,_ba;_95.forEach(_b7,function(_bb,_bc,arr){pt=_bb;_b9=arr[_bc+1];if(!_b9){_b9=arr[0];}_ba={x:(pt.x+_b9.x)/2,y:(pt.y+_b9.y)/2};if(!_b5){pt=map.toMap(pt);_ba=map.toMap(_ba);}_b8.push([pt.x,pt.y]);_b8.push([_ba.x,_ba.y]);});if(this._rotate){var _bd=_94.clone(_b8[1]);_bd=_b5?{x:_bd[0],y:_bd[1]}:map.toScreen({x:_bd[0],y:_bd[1],spatialReference:map.spatialReference});_bd.y-=this._toolbar._options.rotateHandleOffset;if(!_b5){_bd=map.toMap(_bd);}_b8.push([_bd.x,_bd.y]);}return _b8;},_getTransformedBoundingBox:function(_be){var map=this._map,_bf=_be.geometry.getExtent(),_c0=_be.geometry.spatialReference,_c1=new _9c(_bf.xmin,_bf.ymax,_c0),_c2=new _9c(_bf.xmax,_bf.ymin,_c0);_c1=map.toScreen(_c1);_c2=map.toScreen(_c2);return [{x:_c1.x,y:_c1.y},{x:_c2.x,y:_c1.y},{x:_c2.x,y:_c2.y},{x:_c1.x,y:_c2.y}];},_getAllGraphics:function(){var _c3=[this._box];if(this._anchors){_95.forEach(this._anchors,function(_c4){_c3.push(_c4.graphic);});}_c3=_95.filter(_c3,_9b.isDefined);return _c3;},_getMoveable:function(_c5,_c6){var _c7=_c5.getDojoShape();if(!_c7){return;}var _c8=new _98(_c7);_c8._index=_c6;this._connects.push(_96.connect(_c8,"onMoveStart",this._moveStartHandler));this._connects.push(_96.connect(_c8,"onFirstMove",this._firstMoveHandler));this._connects.push(_96.connect(_c8,"onMoveStop",this._moveStopHandler));_c8.onMove=this._moveHandler;var _c9=_c7.getEventSource();if(_c9){_97.set(_c9,"cursor",this._toolbar._cursors["box"+_c6]);}return _c8;},_moveStartHandler:function(_ca){this._toolbar["on"+(_ca.host._index===8?this._rotateEvent:this._scaleEvent)+"Start"](this._graphic);},_firstMoveHandler:function(_cb){var _cc=_cb.host._index,_cd=(this._wrapOffset=_cb.host.shape._wrapOffsets[0]||0),_ce=this._graphic.getLayer()._div.getTransform(),mx=_99,_cf,_d0,_d1,_d2=_95.map(this._getBoxCoords(true),function(arr){return {x:arr[0]+_cd,y:arr[1]};});_d1={x:_d2[1].x,y:_d2[3].y};this._centerCoord=mx.multiplyPoint(mx.invert(_ce),_d1);if(_cc===8){_cf=mx.multiplyPoint(mx.invert(_ce),_d2[1]);this._startLine=[this._centerCoord,_cf];this._moveLine=_94.clone(this._startLine);}else{_cf=mx.multiplyPoint(mx.invert(_ce),_d2[_cc]);_d0=mx.multiplyPoint(mx.invert(_ce),_d2[(_cc+4)%8]);this._firstMoverToCenter=Math.sqrt((_cf.x-this._centerCoord.x)*(_cf.x-this._centerCoord.x)+(_cf.y-this._centerCoord.y)*(_cf.y-this._centerCoord.y));this._startBox=_d0;this._startBox.width=(_d2[4].x-_d2[0].x);this._startBox.height=(_d2[4].y-_d2[0].y);this._moveBox=_94.clone(this._startBox);this._xfactor=_cf.x>_d0.x?1:-1;this._yfactor=_cf.y>_d0.y?1:-1;if(_cc===1||_cc===5){this._xfactor=0;}else{if(_cc===3||_cc===7){this._yfactor=0;}}}this._toolbar._beginOperation("BOX");this._toolbar["on"+(_cc===8?this._rotateEvent:this._scaleEvent)+"FirstMove"](this._graphic);},_moveHandler:function(_d3,_d4){var _d5=_d3.host._index,_d6=this._defaultEventArgs,_d7,_d8,tx,pt,_d9,_da,_db,_dc=0,_dd=0,_de,_df,_e0;_d6.angle=0;_d6.scaleX=1;_d6.scaleY=1;if(_d5===8){_d7=this._startLine;_d8=this._moveLine;pt=_d8[1];pt.x+=_d4.dx;pt.y+=_d4.dy;_d9=this._getAngle(_d7,_d8);tx=_99.rotategAt(_d9,_d7[0]);this._graphic.getDojoShape().setTransform(tx);_d6.transform=tx;_d6.angle=_d9;_d6.around=_d7[0];}else{_d7=this._startBox;_d8=this._moveBox;_d8.width+=(_d4.dx*this._xfactor);_d8.height+=(_d4.dy*this._yfactor);if(this._uniformScaling){_de=_d8.x+this._xfactor*_d8.width;_df=_d8.y+this._yfactor*_d8.height;_e0=Math.sqrt((_de-this._centerCoord.x)*(_de-this._centerCoord.x)+(_df-this._centerCoord.y)*(_df-this._centerCoord.y));_da=_db=_e0/this._firstMoverToCenter;_dc=this._xfactor*_d7.width/2;_dd=this._yfactor*_d7.height/2;}else{_da=_d8.width/_d7.width;_db=_d8.height/_d7.height;}if(isNaN(_da)||_da===Infinity||_da===-Infinity){_da=1;}if(isNaN(_db)||_db===Infinity||_db===-Infinity){_db=1;}tx=_99.scaleAt(_da,_db,_d7.x+_dc,_d7.y+_dd);this._graphic.getDojoShape().setTransform(tx);_d6.transform=tx;_d6.scaleX=_da;_d6.scaleY=_db;_d6.around={x:_d7.x+_dc,y:_d7.y+_dd};}this._toolbar["on"+(_d5===8?this._rotateEvent:this._scaleEvent)](this._graphic,_d6);},_moveStopHandler:function(_e1){var _e2=this._graphic,_e3=this._toolbar,_e4=_e3._geo?_9e.geographicToWebMercator(_e2.geometry):_e2.geometry,_e5=_e4.spatialReference,_e6=_e2.getDojoShape(),_e7=_e6.getTransform(),_e8=_e2.getLayer()._div.getTransform();_e4=_e4.toJson();this._updateSegments(_e4.paths||_e4.rings,_e7,_e8,_e5);_e6.setTransform(null);_e4=_9f.fromJson(_e4);_e2.setGeometry(_e3._geo?_9e.webMercatorToGeographic(_e4,true):_e4);this._draw();this._startBox=this._moveBox=this._xfactor=this._yfactor=null;this._startLine=this._moveLine=null;_e3._endOperation("BOX");this._defaultEventArgs.transform=_e7;_e3["on"+(_e1.host._index===8?this._rotateEvent:this._scaleEvent)+"Stop"](this._graphic,this._defaultEventArgs);},_updateSegments:function(_e9,_ea,_eb,_ec){var mx=_99,map=this._map,_ed=this._wrapOffset||0;_95.forEach(_e9,function(_ee){_95.forEach(_ee,function(_ef){var _f0=map.toScreen({x:_ef[0],y:_ef[1],spatialReference:_ec},true);_f0.x+=_ed;_f0=mx.multiplyPoint([_eb,_ea,mx.invert(_eb)],_f0);_f0.x-=_ed;var _f1=map.toMap(_f0);_ef[0]=_f1.x;_ef[1]=_f1.y;});});},_getAngle:function(_f2,_f3){var _f4=Math.atan2(_f2[0].y-_f2[1].y,_f2[0].x-_f2[1].x)*180/Math.PI,_f5=Math.atan2(_f3[0].y-_f3[1].y,_f3[0].x-_f3[1].x)*180/Math.PI;return _f5-_f4;}});if(has("extend-esri")){_94.setObject("toolbars._Box",BOX,_9a);}return BOX;});},"esri/dijit/editing/TemplatePickerItem":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","dojo/sniff","dojo/dom-style","dijit/_Widget","dijit/_Templated","dojox/gfx","esri/symbols/jsonUtils","esri/kernel"],function(_f6,_f7,_f8,has,_f9,_fa,_fb,_fc,gfx,_fd,_fe){var TPI=_f6([_fb,_fc],{declaredClass:"esri.dijit.editing.TemplatePickerItem",templateString:"<div class='item' style='text-align: center;'>"+"<div class='itemSymbol' dojoAttachPoint='_surfaceNode'></div>"+"<div class='itemLabel'>${label}</div>"+"</div>",startup:function(){if(this._started){return;}this.inherited(arguments);this._surface=this._draw(this._surfaceNode,this.symbol,this.surfaceWidth,this.surfaceHeight,this.template);},_draw:function(_ff,_100,_101,_102,_103){if(!_100){return;}var _104=gfx.createSurface(_ff,_101,_102);if(has("ie")<9){var _105=_104.getEventSource();_fa.set(_105,"position","relative");_fa.set(_105.parentNode,"position","relative");}var _106=(!this.legendOverride&&this._getDrawingToolShape(_100,_103))||_fd.getShapeDescriptors(_100);var _107;try{_107=_104.createShape(_106.defaultShape).setFill(_106.fill).setStroke(_106.stroke);}catch(e){_104.clear();_104.destroy();return;}var bbox=_107.getBoundingBox(),_108=bbox.width,_109=bbox.height,_10a=-(bbox.x+(_108/2)),_10b=-(bbox.y+(_109/2)),dim=_104.getDimensions(),_10c={dx:_10a+dim.width/2,dy:_10b+dim.height/2};if(_108>_101||_109>_102){var _10d=_108>_109?_108:_109;var _10e=_101<_102?_101:_102;var _10f=(_10e-5)/_10d;_f7.mixin(_10c,{xx:_10f,yy:_10f});}_107.applyTransform(_10c);return _104;},_getDrawingToolShape:function(_110,_111){var _112,_113=_111?_111.drawingTool||null:null;switch(_113){case "esriFeatureEditToolArrow":_112={type:"path",path:"M 10,1 L 3,8 L 3,5 L -15,5 L -15,-2 L 3,-2 L 3,-5 L 10,1 E"};break;case "esriFeatureEditToolLeftArrow":_112={type:"path",path:"M -15,1 L -8,8 L -8,5 L 10,5 L 10,-2 L -8,-2 L -8,-5 L -15,1 E"};break;case "esriFeatureEditToolRightArrow":_112={type:"path",path:"M 10,1 L 3,8 L 3,5 L -15,5 L -15,-2 L 3,-2 L 3,-5 L 10,1 E"};break;case "esriFeatureEditToolUpArrow":_112={type:"path",path:"M 1,-10 L 8,-3 L 5,-3 L 5,15 L -2,15 L -2,-3 L -5,-3 L 1,-10 E"};break;case "esriFeatureEditToolDownArrow":_112={type:"path",path:"M 1,15 L 8,8 L 5,8 L 5,-10 L -2,-10 L -2,8 L -5,8 L 1,15 E"};break;case "esriFeatureEditToolTriangle":_112={type:"path",path:"M -10,14 L 2,-10 L 14,14 L -10,14 E"};break;case "esriFeatureEditToolRectangle":_112={type:"path",path:"M -10,-10 L 10,-10 L 10,10 L -10,10 L -10,-10 E"};break;case "esriFeatureEditToolCircle":_112={type:"circle",cx:0,cy:0,r:10};break;case "esriFeatureEditToolEllipse":_112={type:"ellipse",cx:0,cy:0,rx:10,ry:5};break;case "esriFeatureEditToolFreehand":if(_110.type==="simplelinesymbol"||_110.type==="cartographiclinesymbol"){_112={type:"path",path:"m -11, -7c-1.5,-3.75 7.25,-9.25 12.5,-7c5.25,2.25 6.75,9.75 3.75,12.75c-3,3 -3.25,2.5 -9.75,5.25c-6.5,2.75 -7.25,14.25 2,15.25c9.25,1 11.75,-4 13.25,-6.75c1.5,-2.75 3.5,-11.75 12,-6.5"};}else{_112={type:"path",path:"M 10,-13 c3.1,0.16667 4.42564,2.09743 2.76923,3.69231c-2.61025,2.87179 -5.61025,5.6718 -6.14358,6.20513c-0.66667,0.93333 -0.46667,1.2 -0.53333,1.93333c-0.00001,0.86666 0.6,1.66667 1.13334,2c1.03077,0.38462 2.8,0.93333 3.38974,1.70769c0.47693,0.42564 0.87693,0.75897 1.41026,1.75897c0.13333,1.06667 -0.46667,2.86667 -1.8,3.8c-0.73333,0.73333 -3.86667,2.66666 -4.86667,3.13333c-0.93333,0.8 -7.4,3.2 -7.6,3.06667c-1.06667,0.46667 -4.73333,1.13334 -5.2,1.26667c-1.6,0.33334 -4.6,0.4 -6.25128,0.05128c-1.41539,-0.18462 -2.34872,-2.31796 -1.41539,-4.45129c0.93333,-1.73333 1.86667,-3.13333 2.64615,-3.85641c1.28718,-1.47692 2.57437,-2.68204 3.88718,-3.54359c0.88718,-1.13845 1.8,-1.33333 2.26666,-2.45641c0.33334,-0.74359 0.37949,-1.7641 0.06667,-2.87692c-0.66666,-1.46666 -1.66666,-1.86666 -2.98975,-2.2c-1.27692,-0.26666 -2.12307,-0.64102 -3.27692,-1.46666c-0.66667,-1.00001 -1.01538,-3.01539 0.73333,-4.06667c1.73333,-1.2 3.6,-1.93333 4.93333,-2.2c1.33333,-0.46667 4.84104,-1.09743 5.84103,-1.23076c1.60001,-0.46667 6.02564,-0.50257 7.29231,-0.56924z"};}break;default:return null;}return {defaultShape:_112,fill:_110.getFill(),stroke:_110.getStroke()};},_repaint:function(_114){if(!_114){this._surface=this._draw(this._surfaceNode,this.symbol,this.surfaceWidth,this.surfaceHeight,this.template);return;}if(_114.getStroke&&_114.setStroke){_114.setStroke(_114.getStroke());}if(_114.getFill&&_114.setFill){_114.setFill(_114.getFill());}if(_114.children&&_f7.isArray(_114.children)){_f8.forEach(_114.children,this._repaint,this);}},destroy:function(){if(this._surface){this._surface.destroy();delete this._surface;}this.inherited(arguments);}});if(has("extend-esri")){_f7.setObject("dijit.editing.TemplatePickerItem",TPI,_fe);}return TPI;});},"esri/dijit/_EventedWidget":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/on","esri/Evented","dijit/_WidgetBase"],function(_115,lang,_116,on,_117,_118){var EWM=_115([_117,_118],{_onMap:function(_119){var _11a=this.constructor._onMap,_11b,_11c;if(!_11a){_11a=this.registerConnectEvents();}_119=_119.toLowerCase();if(_11a[_119]){_11b=this[_11a[_119].name];}else{_11c=this._onCamelCase(_119);if(this[_11c]){_11b=_11c;}}return _11b;},on:function(type,_11d){_117.prototype.on.apply(this,arguments);return this.inherited(arguments);},emit:function(type,_11e,_11f){var _120,_121,_122,_123=type.toLowerCase(),_124=this.constructor._onMap||this.registerConnectEvents();_121=this[this._onMap(_123)];_11e=_11e||{};if(!_11e.target){_11e.target=this;}if(_121&&_124&&_124[_123]){this._onObj2Arr(function(){_120=Array.prototype.slice.call(arguments);},_124[_123].argKeys)(_11e);_122=lang.mixin({},arguments);_122[2]=_120;_122[0]=_124[_123].name.replace(/^on/,"");}return this.inherited(_122||arguments);}});return EWM;});},"dojo/dnd/Selector":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/kernel","../_base/lang","../dom","../dom-construct","../mouse","../_base/NodeList","../on","../touch","./common","./Container"],function(_125,_126,_127,_128,lang,dom,_129,_12a,_12b,on,_12c,dnd,_12d){var _12e=_126("dojo.dnd.Selector",_12d,{constructor:function(node,_12f){if(!_12f){_12f={};}this.singular=_12f.singular;this.autoSync=_12f.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(on(this.node,_12c.press,lang.hitch(this,"onMouseDown")),on(this.node,_12c.release,lang.hitch(this,"onMouseUp")));},singular:false,getSelectedNodes:function(){var t=new _12b();var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(dom.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(dom.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=dom.byId(i);this.delItem(i);_129.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||_128.global;var s=this.selection,e=dnd._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){_12e.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=dnd._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}_125.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_130,data,_131,_132){var _133=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_133.call(this,item,hint);if(_130){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};_12e.superclass.insertNodes.call(this,data,_131,_132);this._normalizedCreator=_133;return this;},destroy:function(){_12e.superclass.destroy.call(this);this.selection=this.anchor=null;},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!dnd.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(_12a.isLeft(e)){_127.stop(e);}return;}if(!this.singular&&e.shiftKey){if(!dnd.getCopyKeyState(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0,node;for(;i<c.length;++i){node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(dnd.getCopyKeyState(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dnd.getCopyKeyState(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}_127.stop(e);},onMouseUp:function(){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=on(this.node,_12c.move,lang.hitch(this,"onMouseMove"));},onOutEvent:function(){if(this.onmousemoveEvent){this.onmousemoveEvent.remove();delete this.onmousemoveEvent;}},_removeSelection:function(){var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=dom.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});return _12e;});},"dojo/parser":function(){define(["require","./_base/kernel","./_base/lang","./_base/array","./_base/config","./_base/html","./_base/window","./_base/url","./_base/json","./aspect","./date/stamp","./Deferred","./has","./query","./on","./ready"],function(_134,dojo,_135,_136,_137,_138,_139,_13a,_13b,_13c,_13d,_13e,has,_13f,don,_140){new Date("X");var _141=0;_13c.after(_135,"extend",function(){_141++;},true);function _142(ctor){var map=ctor._nameCaseMap,_143=ctor.prototype;if(!map||map._extendCnt<_141){map=ctor._nameCaseMap={};for(var name in _143){if(name.charAt(0)==="_"){continue;}map[name.toLowerCase()]=name;}map._extendCnt=_141;}return map;};var _144={};function _145(_146){var ts=_146.join();if(!_144[ts]){var _147=[];for(var i=0,l=_146.length;i<l;i++){var t=_146[i];_147[_147.length]=(_144[t]=_144[t]||(_135.getObject(t)||(~t.indexOf("/")&&_134(t))));}var ctor=_147.shift();_144[ts]=_147.length?(ctor.createSubclass?ctor.createSubclass(_147):ctor.extend.apply(ctor,_147)):ctor;}return _144[ts];};var _148={_clearCache:function(){_141++;_144={};},_functionFromScript:function(_149,_14a){var _14b="",_14c="",_14d=(_149.getAttribute(_14a+"args")||_149.getAttribute("args")),_14e=_149.getAttribute("with");var _14f=(_14d||"").split(/\s*,\s*/);if(_14e&&_14e.length){_136.forEach(_14e.split(/\s*,\s*/),function(part){_14b+="with("+part+"){";_14c+="}";});}return new Function(_14f,_14b+_149.innerHTML+_14c);},instantiate:function(_150,_151,_152){_151=_151||{};_152=_152||{};var _153=(_152.scope||dojo._scopeName)+"Type",_154="data-"+(_152.scope||dojo._scopeName)+"-",_155=_154+"type",_156=_154+"mixins";var list=[];_136.forEach(_150,function(node){var type=_153 in _151?_151[_153]:node.getAttribute(_155)||node.getAttribute(_153);if(type){var _157=node.getAttribute(_156),_158=_157?[type].concat(_157.split(/\s*,\s*/)):[type];list.push({node:node,types:_158});}});return this._instantiate(list,_151,_152);},_instantiate:function(_159,_15a,_15b){var _15c=_136.map(_159,function(obj){var ctor=obj.ctor||_145(obj.types);if(!ctor){throw new Error("Unable to resolve constructor for: '"+obj.types.join()+"'");}return this.construct(ctor,obj.node,_15a,_15b,obj.scripts,obj.inherited);},this);if(!_15a._started&&!_15b.noStart){_136.forEach(_15c,function(_15d){if(typeof _15d.startup==="function"&&!_15d._started){_15d.startup();}});}return _15c;},construct:function(ctor,node,_15e,_15f,_160,_161){var _162=ctor&&ctor.prototype;_15f=_15f||{};var _163={};if(_15f.defaults){_135.mixin(_163,_15f.defaults);}if(_161){_135.mixin(_163,_161);}var _164;if(has("dom-attributes-explicit")){_164=node.attributes;}else{if(has("dom-attributes-specified-flag")){_164=_136.filter(node.attributes,function(a){return a.specified;});}else{var _165=/^input$|^img$/i.test(node.nodeName)?node:node.cloneNode(false),_166=_165.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,"");_164=_136.map(_166.split(/\s+/),function(name){var _167=name.toLowerCase();return {name:name,value:(node.nodeName=="LI"&&name=="value")||_167=="enctype"?node.getAttribute(_167):node.getAttributeNode(_167).value};});}}var _168=_15f.scope||dojo._scopeName,_169="data-"+_168+"-",hash={};if(_168!=="dojo"){hash[_169+"props"]="data-dojo-props";hash[_169+"type"]="data-dojo-type";hash[_169+"mixins"]="data-dojo-mixins";hash[_168+"type"]="dojoType";hash[_169+"id"]="data-dojo-id";}var i=0,item,_16a=[],_16b,_16c;while(item=_164[i++]){var name=item.name,_16d=name.toLowerCase(),_16e=item.value;switch(hash[_16d]||_16d){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":_16c=_16e;break;case "data-dojo-id":case "jsid":_16b=_16e;break;case "data-dojo-attach-point":case "dojoattachpoint":_163.dojoAttachPoint=_16e;break;case "data-dojo-attach-event":case "dojoattachevent":_163.dojoAttachEvent=_16e;break;case "class":_163["class"]=node.className;break;case "style":_163["style"]=node.style&&node.style.cssText;break;default:if(!(name in _162)){var map=_142(ctor);name=map[_16d]||name;}if(name in _162){switch(typeof _162[name]){case "string":_163[name]=_16e;break;case "number":_163[name]=_16e.length?Number(_16e):NaN;break;case "boolean":_163[name]=_16e.toLowerCase()!="false";break;case "function":if(_16e===""||_16e.search(/[^\w\.]+/i)!=-1){_163[name]=new Function(_16e);}else{_163[name]=_135.getObject(_16e,false)||new Function(_16e);}_16a.push(name);break;default:var pVal=_162[name];_163[name]=(pVal&&"length" in pVal)?(_16e?_16e.split(/\s*,\s*/):[]):(pVal instanceof Date)?(_16e==""?new Date(""):_16e=="now"?new Date():_13d.fromISOString(_16e)):(pVal instanceof _13a)?(dojo.baseUrl+_16e):_13b.fromJson(_16e);}}else{_163[name]=_16e;}}}for(var j=0;j<_16a.length;j++){var _16f=_16a[j].toLowerCase();node.removeAttribute(_16f);node[_16f]=null;}if(_16c){try{_16c=_13b.fromJson.call(_15f.propsThis,"{"+_16c+"}");_135.mixin(_163,_16c);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_16c+"'");}}_135.mixin(_163,_15e);if(!_160){_160=(ctor&&(ctor._noScript||_162._noScript)?[]:_13f("> script[type^='dojo/']",node));}var _170=[],_171=[],_172=[],ons=[];if(_160){for(i=0;i<_160.length;i++){var _173=_160[i];node.removeChild(_173);var _174=(_173.getAttribute(_169+"event")||_173.getAttribute("event")),prop=_173.getAttribute(_169+"prop"),_175=_173.getAttribute(_169+"method"),_176=_173.getAttribute(_169+"advice"),_177=_173.getAttribute("type"),nf=this._functionFromScript(_173,_169);if(_174){if(_177=="dojo/connect"){_170.push({method:_174,func:nf});}else{if(_177=="dojo/on"){ons.push({event:_174,func:nf});}else{_163[_174]=nf;}}}else{if(_177=="dojo/aspect"){_170.push({method:_175,advice:_176,func:nf});}else{if(_177=="dojo/watch"){_172.push({prop:prop,func:nf});}else{_171.push(nf);}}}}}var _178=ctor.markupFactory||_162.markupFactory;var _179=_178?_178(_163,node,ctor):new ctor(_163,node);if(_16b){_135.setObject(_16b,_179);}for(i=0;i<_170.length;i++){_13c[_170[i].advice||"after"](_179,_170[i].method,_135.hitch(_179,_170[i].func),true);}for(i=0;i<_171.length;i++){_171[i].call(_179);}for(i=0;i<_172.length;i++){_179.watch(_172[i].prop,_172[i].func);}for(i=0;i<ons.length;i++){don(_179,ons[i].event,ons[i].func);}return _179;},scan:function(root,_17a){var list=[],mids=[],_17b={};var _17c=(_17a.scope||dojo._scopeName)+"Type",_17d="data-"+(_17a.scope||dojo._scopeName)+"-",_17e=_17d+"type",_17f=_17d+"textdir",_180=_17d+"mixins";var node=root.firstChild;var _181=_17a.inherited;if(!_181){function _182(node,attr){return (node.getAttribute&&node.getAttribute(attr))||(node.parentNode&&_182(node.parentNode,attr));};_181={dir:_182(root,"dir"),lang:_182(root,"lang"),textDir:_182(root,_17f)};for(var key in _181){if(!_181[key]){delete _181[key];}}}var _183={inherited:_181};var _184;var _185;function _186(_187){if(!_187.inherited){_187.inherited={};var node=_187.node,_188=_186(_187.parent);var _189={dir:node.getAttribute("dir")||_188.dir,lang:node.getAttribute("lang")||_188.lang,textDir:node.getAttribute(_17f)||_188.textDir};for(var key in _189){if(_189[key]){_187.inherited[key]=_189[key];}}}return _187.inherited;};while(true){if(!node){if(!_183||!_183.node){break;}node=_183.node.nextSibling;_185=false;_183=_183.parent;_184=_183.scripts;continue;}if(node.nodeType!=1){node=node.nextSibling;continue;}if(_184&&node.nodeName.toLowerCase()=="script"){type=node.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_184.push(node);}node=node.nextSibling;continue;}if(_185){node=node.nextSibling;continue;}var type=node.getAttribute(_17e)||node.getAttribute(_17c);var _18a=node.firstChild;if(!type&&(!_18a||(_18a.nodeType==3&&!_18a.nextSibling))){node=node.nextSibling;continue;}var _18b;var ctor=null;if(type){var _18c=node.getAttribute(_180),_18d=_18c?[type].concat(_18c.split(/\s*,\s*/)):[type];try{ctor=_145(_18d);}catch(e){}if(!ctor){_136.forEach(_18d,function(t){if(~t.indexOf("/")&&!_17b[t]){_17b[t]=true;mids[mids.length]=t;}});}var _18e=ctor&&!ctor.prototype._noScript?[]:null;_18b={types:_18d,ctor:ctor,parent:_183,node:node,scripts:_18e};_18b.inherited=_186(_18b);list.push(_18b);}else{_18b={node:node,scripts:_184,parent:_183};}node=_18a;_184=_18e;_185=ctor&&ctor.prototype.stopParser&&!(_17a.template);_183=_18b;}var d=new _13e();if(mids.length){if(has("dojo-debug-messages")){console.warn("WARNING: Modules being Auto-Required: "+mids.join(", "));}_134(mids,function(){d.resolve(_136.filter(list,function(_18f){if(!_18f.ctor){try{_18f.ctor=_145(_18f.types);}catch(e){}}var _190=_18f.parent;while(_190&&!_190.types){_190=_190.parent;}var _191=_18f.ctor&&_18f.ctor.prototype;_18f.instantiateChildren=!(_191&&_191.stopParser&&!(_17a.template));_18f.instantiate=!_190||(_190.instantiate&&_190.instantiateChildren);return _18f.instantiate;}));});}else{d.resolve(list);}return d.promise;},_require:function(_192){var hash=_13b.fromJson("{"+_192.innerHTML+"}"),vars=[],mids=[],d=new _13e();for(var name in hash){vars.push(name);mids.push(hash[name]);}_134(mids,function(){for(var i=0;i<vars.length;i++){_135.setObject(vars[i],arguments[i]);}d.resolve(arguments);});return d.promise;},_scanAmd:function(root){var _193=new _13e(),_194=_193.promise;_193.resolve(true);var self=this;_13f("script[type='dojo/require']",root).forEach(function(node){_194=_194.then(function(){return self._require(node);});node.parentNode.removeChild(node);});return _194;},parse:function(_195,_196){var root;if(!_196&&_195&&_195.rootNode){_196=_195;root=_196.rootNode;}else{if(_195&&_135.isObject(_195)&&!("nodeType" in _195)){_196=_195;}else{root=_195;}}root=root?_138.byId(root):_139.body();_196=_196||{};var _197=_196.template?{template:true}:{},_198=[],self=this;var p=this._scanAmd(root,_196).then(function(){return self.scan(root,_196);}).then(function(_199){return _198=_198.concat(self._instantiate(_199,_197,_196));}).otherwise(function(e){console.error("dojo/parser::parse() error",e);throw e;});_135.mixin(_198,p);return _198;}};if(1){dojo.parser=_148;}if(_137.parseOnLoad){_140(100,_148,"parse");}return _148;});},"dojox/grid/DataSelection":function(){define("dojox/grid/DataSelection",["dojo/_base/declare","./_SelectionPreserver","./Selection"],function(_19a,_19b,_19c){return _19a("dojox.grid.DataSelection",_19c,{constructor:function(grid){if(grid.keepSelection){this.preserver=new _19b(this);}},destroy:function(){if(this.preserver){this.preserver.destroy();}},getFirstSelected:function(){var idx=_19c.prototype.getFirstSelected.call(this);if(idx==-1){return null;}return this.grid.getItem(idx);},getNextSelected:function(_19d){var _19e=this.grid.getItemIndex(_19d);var idx=_19c.prototype.getNextSelected.call(this,_19e);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _19f=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_19f.push(this.grid.getItem(i));}}return _19f;},addToSelection:function(_1a0){if(this.mode=="none"){return;}var idx=null;if(typeof _1a0=="number"||typeof _1a0=="string"){idx=_1a0;}else{idx=this.grid.getItemIndex(_1a0);}_19c.prototype.addToSelection.call(this,idx);},deselect:function(_1a1){if(this.mode=="none"){return;}var idx=null;if(typeof _1a1=="number"||typeof _1a1=="string"){idx=_1a1;}else{idx=this.grid.getItemIndex(_1a1);}_19c.prototype.deselect.call(this,idx);},deselectAll:function(_1a2){var idx=null;if(_1a2||typeof _1a2=="number"){if(typeof _1a2=="number"||typeof _1a2=="string"){idx=_1a2;}else{idx=this.grid.getItemIndex(_1a2);}_19c.prototype.deselectAll.call(this,idx);}else{this.inherited(arguments);}}});});},"dijit/_Container":function(){define("dijit/_Container",["dojo/_base/array","dojo/_base/declare","dojo/dom-construct"],function(_1a3,_1a4,_1a5){return _1a4("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_1a6,_1a7){var _1a8=this.containerNode;if(_1a7&&typeof _1a7=="number"){var _1a9=this.getChildren();if(_1a9&&_1a9.length>=_1a7){_1a8=_1a9[_1a7-1].domNode;_1a7="after";}}_1a5.place(_1a6.domNode,_1a8,_1a7);if(this._started&&!_1a6._started){_1a6.startup();}},removeChild:function(_1aa){if(typeof _1aa=="number"){_1aa=this.getChildren()[_1aa];}if(_1aa){var node=_1aa.domNode;if(node&&node.parentNode){node.parentNode.removeChild(node);}}},hasChildren:function(){return this.getChildren().length>0;},_getSiblingOfChild:function(_1ab,dir){var _1ac=this.getChildren(),idx=_1a3.indexOf(this.getChildren(),_1ab);return _1ac[idx+dir];},getIndexOfChild:function(_1ad){return _1a3.indexOf(this.getChildren(),_1ad);}});});},"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n","dojo/dnd/Manager":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../_base/window","../dom-class","../Evented","../has","../keys","../on","../topic","../touch","./common","./autoscroll","./Avatar"],function(_1ae,_1af,_1b0,lang,win,_1b1,_1b2,has,keys,on,_1b3,_1b4,dnd,_1b5,_1b6){var _1b7=_1af("dojo.dnd.Manager",[_1b2],{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:has("touch")?0:16,OFFSET_Y:has("touch")?-64:16,overSource:function(_1b8){if(this.avatar){this.target=(_1b8&&_1b8.targetState!="Disabled")?_1b8:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}_1b3.publish("/dnd/source/over",_1b8);},outSource:function(_1b9){if(this.avatar){if(this.target==_1b9){this.target=null;this.canDropFlag=false;this.avatar.update();_1b3.publish("/dnd/source/over",null);}}else{_1b3.publish("/dnd/source/over",null);}},startDrag:function(_1ba,_1bb,copy){_1b5.autoScrollStart(win.doc);this.source=_1ba;this.nodes=_1bb;this.copy=Boolean(copy);this.avatar=this.makeAvatar();win.body().appendChild(this.avatar.node);_1b3.publish("/dnd/start",_1ba,_1bb,this.copy);this.events=[on(win.doc,_1b4.move,lang.hitch(this,"onMouseMove")),on(win.doc,_1b4.release,lang.hitch(this,"onMouseUp")),on(win.doc,"keydown",lang.hitch(this,"onKeyDown")),on(win.doc,"keyup",lang.hitch(this,"onKeyUp")),on(win.doc,"dragstart",_1b0.stop),on(win.body(),"selectstart",_1b0.stop)];var c="dojoDnd"+(copy?"Copy":"Move");_1b1.add(win.body(),c);},canDrop:function(flag){var _1bc=Boolean(this.target&&flag);if(this.canDropFlag!=_1bc){this.canDropFlag=_1bc;this.avatar.update();}},stopDrag:function(){_1b1.remove(win.body(),["dojoDndCopy","dojoDndMove"]);_1ae.forEach(this.events,function(_1bd){_1bd.remove();});this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new _1b6(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){_1b5.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var copy=Boolean(this.source.copyState(dnd.getCopyKeyState(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}if(has("touch")){e.preventDefault();}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(dnd.getCopyKeyState(e)));_1b3.publish("/dnd/drop/before",this.source,this.nodes,copy,this.target,e);_1b3.publish("/dnd/drop",this.source,this.nodes,copy,this.target,e);}else{_1b3.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case keys.ESCAPE:_1b3.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();_1b1.replace(win.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"));}});dnd._manager=null;_1b7.manager=dnd.manager=function(){if(!dnd._manager){dnd._manager=new _1b7();}return dnd._manager;};return _1b7;});},"dijit/a11yclick":function(){define("dijit/a11yclick",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/has","dojo/_base/unload","dojo/_base/window"],function(on,_1be,keys,_1bf,has,_1c0,win){var _1c1=null;if(has("dom-addeventlistener")){win.doc.addEventListener("keydown",function(evt){_1c1=evt.target;},true);}else{(function(){var _1c2=function(evt){_1c1=evt.srcElement;};win.doc.attachEvent("onkeydown",_1c2);_1c0.addOnWindowUnload(function(){win.doc.detachEvent("onkeydown",_1c2);});})();}function _1c3(e){return (e.keyCode===keys.ENTER||e.keyCode===keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;};return function(node,_1c4){if(/input|button/i.test(node.nodeName)){return on(node,"click",_1c4);}else{var _1c5=[on(node,"keydown",function(e){if(_1c3(e)){_1c1=e.target;e.preventDefault();}}),on(node,"keyup",function(e){if(_1c3(e)&&e.target==_1c1){_1c1=null;on.emit(e.target,"click",{cancelable:true,bubbles:true});}}),on(node,"click",function(e){_1c4.call(this,e);})];if(has("touch")){var _1c6;_1c5.push(on(node,"touchend",function(e){var _1c7=e.target;_1c6=setTimeout(function(){_1c6=null;on.emit(_1c7,"click",{cancelable:true,bubbles:true});},600);}),on(node,"click",function(e){if(_1c6){clearTimeout(_1c6);}}));}return {remove:function(){_1be.forEach(_1c5,function(h){h.remove();});if(_1c6){clearTimeout(_1c6);_1c6=null;}}};}};return ret;});},"esri/toolbars/draw":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/Color","dojo/_base/window","dojo/has","dojo/keys","dojo/dom-construct","dojo/dom-style","esri/kernel","esri/sniff","esri/toolbars/_toolbar","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/graphic","esri/geometry/jsonUtils","esri/geometry/webMercatorUtils","esri/geometry/Polyline","esri/geometry/Polygon","esri/geometry/Multipoint","esri/geometry/Rect","dojo/i18n!esri/nls/jsapi"],function(_1c8,lang,_1c9,_1ca,_1cb,win,has,keys,_1cc,_1cd,_1ce,_1cf,_1d0,_1d1,_1d2,_1d3,_1d4,_1d5,_1d6,_1d7,_1d8,_1d9,Rect,_1da){var DRAW=_1c8(_1d0,{declaredClass:"esri.toolbars.Draw",_eventMap:{"draw-complete":true,"draw-end":["geometry"]},constructor:function(map,_1db){this.markerSymbol=new _1d1(_1d1.STYLE_SOLID,10,new _1d2(_1d2.STYLE_SOLID,new _1cb([255,0,0]),2),new _1cb([0,0,0,0.25]));this.lineSymbol=new _1d2(_1d2.STYLE_SOLID,new _1cb([255,0,0]),2);this.fillSymbol=new _1d3(_1d3.STYLE_SOLID,new _1d2(_1d2.STYLE_SOLID,new _1cb([255,0,0]),2),new _1cb([0,0,0,0.25]));this._points=[];this._defaultOptions={showTooltips:true,drawTime:75,tolerance:8,tooltipOffset:15};this._options=lang.mixin(lang.mixin({},this._defaultOptions),_1db||{});this._mouse=!has("esri-touch")&&!has("esri-pointer");if(!this._mouse){this._options.showTooltips=false;}this._onKeyDownHandler=lang.hitch(this,this._onKeyDownHandler);this._onMouseDownHandler=lang.hitch(this,this._onMouseDownHandler);this._onMouseUpHandler=lang.hitch(this,this._onMouseUpHandler);this._onClickHandler=lang.hitch(this,this._onClickHandler);this._onMouseMoveHandler=lang.hitch(this,this._onMouseMoveHandler);this._onMouseDragHandler=lang.hitch(this,this._onMouseDragHandler);this._onDblClickHandler=lang.hitch(this,this._onDblClickHandler);this._updateTooltip=lang.hitch(this,this._updateTooltip);this._hideTooltip=lang.hitch(this,this._hideTooltip);this._redrawGraphic=lang.hitch(this,this._redrawGraphic);},_geometryType:null,respectDrawingVertexOrder:false,setRespectDrawingVertexOrder:function(set){this.respectDrawingVertexOrder=set;},setMarkerSymbol:function(_1dc){this.markerSymbol=_1dc;},setLineSymbol:function(_1dd){this.lineSymbol=_1dd;},setFillSymbol:function(_1de){this.fillSymbol=_1de;},activate:function(_1df,_1e0){if(this._geometryType){this.deactivate();}var map=this.map,dc=_1ca.connect,Draw=DRAW;this._options=lang.mixin(lang.mixin({},this._options),_1e0||{});map.navigationManager.setImmediateClick(false);switch(_1df){case Draw.ARROW:case Draw.LEFT_ARROW:case Draw.RIGHT_ARROW:case Draw.UP_ARROW:case Draw.DOWN_ARROW:case Draw.TRIANGLE:case Draw.CIRCLE:case Draw.ELLIPSE:case Draw.RECTANGLE:this._deactivateMapTools(true,false,false,true);this._onClickHandler_connect=dc(map,"onClick",this._onClickHandler);this._onMouseDownHandler_connect=dc(map,!this._mouse?"onSwipeStart":"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler_connect=dc(map,!this._mouse?"onSwipeMove":"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler_connect=dc(map,!this._mouse?"onSwipeEnd":"onMouseUp",this._onMouseUpHandler);if(has("esri-touch")&&!has("esri-pointer")){this._onMouseDownHandler2_connect=dc(map,"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler2_connect=dc(map,"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler2_connect=dc(map,"onMouseUp",this._onMouseUpHandler);}break;case Draw.POINT:this._onClickHandler_connect=dc(map,"onClick",this._onClickHandler);break;case Draw.LINE:case Draw.EXTENT:case Draw.FREEHAND_POLYLINE:case Draw.FREEHAND_POLYGON:this._deactivateMapTools(true,false,false,true);this._onMouseDownHandler_connect=dc(map,!this._mouse?"onSwipeStart":"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler_connect=dc(map,!this._mouse?"onSwipeMove":"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler_connect=dc(map,!this._mouse?"onSwipeEnd":"onMouseUp",this._onMouseUpHandler);if(has("esri-touch")&&!has("esri-pointer")){this._onMouseDownHandler2_connect=dc(map,"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler2_connect=dc(map,"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler2_connect=dc(map,"onMouseUp",this._onMouseUpHandler);}break;case Draw.POLYLINE:case Draw.POLYGON:case Draw.MULTI_POINT:map.navigationManager.setImmediateClick(true);this._onClickHandler_connect=dc(map,"onClick",this._onClickHandler);this._onDblClickHandler_connect=dc(map,"onDblClick",this._onDblClickHandler);map.disableDoubleClickZoom();break;default:console.error("Unsupported geometry type: "+_1df);return;}this._onKeyDown_connect=dc(map,"onKeyDown",this._onKeyDownHandler);this._redrawConnect=dc(map,"onExtentChange",this._redrawGraphic);this._geometryType=_1df;this._toggleTooltip(true);if(map.snappingManager&&this._geometryType!=="freehandpolyline"&&this._geometryType!=="freehandpolygon"&&this._mouse){map.snappingManager._startSelectionLayerQuery();map.snappingManager._setUpSnapping();}this.onActivate(this._geometryType);},deactivate:function(){var map=this.map;this._clear();var ddc=_1ca.disconnect;ddc(this._onMouseMoveHandler_connect);ddc(this._onMouseDownHandler_connect);ddc(this._onMouseDragHandler_connect);ddc(this._onMouseUpHandler_connect);ddc(this._onMouseDownHandler2_connect);ddc(this._onMouseDragHandler2_connect);ddc(this._onMouseUpHandler2_connect);ddc(this._onClickHandler_connect);ddc(this._onDblClickHandler_connect);ddc(this._onKeyDown_connect);ddc(this._redrawConnect);this._onMouseDownHandler_connect=this._onMouseMoveHandler_connect=this._onMouseDragHandler_connect=this._onMouseUpHandler_connect=this._onMouseDownHandler2_connect=this._onMouseDragHandler2_connect=this._onMouseUpHandler2_connect=this._onClickHandler_connect=this._onDblClickHandler_connect=this._onKeyDown_connect=this._redrawConnect=null;if(map.snappingManager){map.snappingManager._stopSelectionLayerQuery();map.snappingManager._killOffSnapping();}switch(this._geometryType){case DRAW.CIRCLE:case DRAW.ELLIPSE:case DRAW.TRIANGLE:case DRAW.ARROW:case DRAW.LEFT_ARROW:case DRAW.RIGHT_ARROW:case DRAW.UP_ARROW:case DRAW.DOWN_ARROW:case DRAW.RECTANGLE:case DRAW.LINE:case DRAW.EXTENT:case DRAW.FREEHAND_POLYLINE:case DRAW.FREEHAND_POLYGON:this._activateMapTools(true,false,false,true);break;case this.POLYLINE:case this.POLYGON:case this.MULTI_POINT:map.enableDoubleClickZoom();break;}var _1e1=this._geometryType;this._geometryType=null;map.navigationManager.setImmediateClick(false);this._toggleTooltip(false);this.onDeactivate(_1e1);},_clear:function(){if(this._graphic){this.map.graphics.remove(this._graphic,true);}if(this._tGraphic){this.map.graphics.remove(this._tGraphic,true);}this._graphic=this._tGraphic=null;if(this.map.snappingManager){this.map.snappingManager._setGraphic(null);}this._points=[];},finishDrawing:function(){var _1e2,_1e3=this._points,map=this.map,_1e4=map.spatialReference,Draw=DRAW;_1e3=_1e3.slice(0,_1e3.length);switch(this._geometryType){case Draw.POLYLINE:if(!this._graphic||_1e3.length<2){return;}_1e2=new _1d7(_1e4);_1e2.addPath([].concat(_1e3));break;case Draw.POLYGON:if(!this._graphic||_1e3.length<3){return;}_1e2=new _1d8(_1e4);var ring=[].concat(_1e3,[_1e3[0].offset(0,0)]);if(!_1d8.prototype.isClockwise(ring)&&!this.respectDrawingVertexOrder){console.debug(this.declaredClass+" :  Polygons drawn in anti-clockwise direction will be reversed to be clockwise.");ring.reverse();}_1e2.addRing(ring);break;case Draw.MULTI_POINT:_1e2=new _1d9(_1e4);_1c9.forEach(_1e3,function(pt){_1e2.addPoint(pt);});break;}_1ca.disconnect(this._onMouseMoveHandler_connect);this._clear();this._setTooltipMessage(0);this._drawEnd(_1e2);},_drawEnd:function(_1e5){if(_1e5){var _1e6=this.map.spatialReference,geo;this.onDrawEnd(_1e5);if(_1e6){if(_1e6.isWebMercator()){geo=_1d6.webMercatorToGeographic(_1e5,true);}else{if(_1e6.wkid===4326){geo=_1d5.fromJson(_1e5.toJson());}}}this.onDrawComplete({geometry:_1e5,geographicGeometry:geo});}},_normalizeRect:function(_1e7,end,_1e8){var sx=_1e7.x,sy=_1e7.y,ex=end.x,ey=end.y,_1e9=Math.abs(sx-ex),_1ea=Math.abs(sy-ey);return {x:Math.min(sx,ex),y:Math.max(sy,ey),width:_1e9,height:_1ea,spatialReference:_1e8};},_onMouseDownHandler:function(evt){this._dragged=false;var _1eb;if(this.map.snappingManager){_1eb=this.map.snappingManager._snappingPoint;}var _1ec=_1eb||evt.mapPoint,Draw=DRAW,map=this.map,_1ed=map.spatialReference;this._points.push(_1ec.offset(0,0));switch(this._geometryType){case Draw.LINE:this._graphic=map.graphics.add(new _1d4(new _1d7({paths:[[[_1ec.x,_1ec.y],[_1ec.x,_1ec.y]]],spatialReference:_1ed}),this.lineSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;case Draw.EXTENT:break;case Draw.FREEHAND_POLYLINE:this._oldPoint=evt.screenPoint;var _1ee=new _1d7(_1ed);_1ee.addPath(this._points);this._graphic=map.graphics.add(new _1d4(_1ee,this.lineSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;case Draw.CIRCLE:case Draw.ELLIPSE:case Draw.TRIANGLE:case Draw.ARROW:case Draw.LEFT_ARROW:case Draw.RIGHT_ARROW:case Draw.UP_ARROW:case Draw.DOWN_ARROW:case Draw.RECTANGLE:case Draw.FREEHAND_POLYGON:this._oldPoint=evt.screenPoint;var _1ef=new _1d8(_1ed);_1ef.addRing(this._points);this._graphic=map.graphics.add(new _1d4(_1ef,this.fillSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;}if(has("esri-touch")){evt.preventDefault();}},_onMouseMoveHandler:function(evt){var _1f0;if(this.map.snappingManager){_1f0=this.map.snappingManager._snappingPoint;}var _1f1=this._points[this._points.length-1],end=_1f0||evt.mapPoint,_1f2=this._tGraphic,geom=_1f2.geometry;switch(this._geometryType){case DRAW.POLYLINE:case DRAW.POLYGON:geom.setPoint(0,0,{x:_1f1.x,y:_1f1.y});geom.setPoint(0,1,{x:end.x,y:end.y});_1f2.setGeometry(geom);break;}},_onMouseDragHandler:function(evt){if(has("esri-touch")&&!this._points.length){evt.preventDefault();return;}this._dragged=true;var _1f3;if(this.map.snappingManager){_1f3=this.map.snappingManager._snappingPoint;}var _1f4=this._points[0],end=_1f3||evt.mapPoint,map=this.map,_1f5=map.spatialReference,_1f6=this._graphic,Draw=DRAW,_1f7=map.toScreen(_1f4),_1f8=map.toScreen(end),pts=[],a=_1f8.x-_1f7.x,b=_1f8.y-_1f7.y,_1f9=60,d=Math.sqrt(a*a+b*b);switch(this._geometryType){case Draw.CIRCLE:this._hideTooltip();_1f6.geometry=_1d8.createCircle({center:_1f7,r:d,numberOfPoints:_1f9,map:map});_1f6.setGeometry(_1f6.geometry);break;case Draw.ELLIPSE:this._hideTooltip();_1f6.geometry=_1d8.createEllipse({center:_1f7,longAxis:a,shortAxis:b,numberOfPoints:_1f9,map:map});_1f6.setGeometry(_1f6.geometry);break;case Draw.TRIANGLE:this._hideTooltip();pts=[[0,-d],[0.8660254037844386*d,0.5*d],[-0.8660254037844386*d,0.5*d],[0,-d]];_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.ARROW:this._hideTooltip();var sina=b/d,cosa=a/d,tana=b/a;var f=cosa*0.25*d,e=0.25*d/tana,g=sina*0.25*d;pts=[[a,b],[a-f*(1+24/e),b+24*cosa-g],[a-f*(1+12/e),b+12*cosa-g],[-12*sina,12*cosa],[12*sina,-12*cosa],[a-f*(1-12/e),b-12*cosa-g],[a-f*(1-24/e),b-24*cosa-g],[a,b]];_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.LEFT_ARROW:this._hideTooltip();if(a<=0){pts=[[a,0],[0.75*a,b],[0.75*a,0.5*b],[0,0.5*b],[0,-0.5*b],[0.75*a,-0.5*b],[0.75*a,-b],[a,0]];}else{pts=[[0,0],[0.25*a,b],[0.25*a,0.5*b],[a,0.5*b],[a,-0.5*b],[0.25*a,-0.5*b],[0.25*a,-b],[0,0]];}_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.RIGHT_ARROW:this._hideTooltip();if(a>=0){pts=[[a,0],[0.75*a,b],[0.75*a,0.5*b],[0,0.5*b],[0,-0.5*b],[0.75*a,-0.5*b],[0.75*a,-b],[a,0]];}else{pts=[[0,0],[0.25*a,b],[0.25*a,0.5*b],[a,0.5*b],[a,-0.5*b],[0.25*a,-0.5*b],[0.25*a,-b],[0,0]];}_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.UP_ARROW:this._hideTooltip();if(b<=0){pts=[[0,b],[-a,0.75*b],[-0.5*a,0.75*b],[-0.5*a,0],[0.5*a,0],[0.5*a,0.75*b],[a,0.75*b],[0,b]];}else{pts=[[0,0],[-a,0.25*b],[-0.5*a,0.25*b],[-0.5*a,b],[0.5*a,b],[0.5*a,0.25*b],[a,0.25*b],[0,0]];}_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.DOWN_ARROW:this._hideTooltip();if(b>=0){pts=[[0,b],[-a,0.75*b],[-0.5*a,0.75*b],[-0.5*a,0],[0.5*a,0],[0.5*a,0.75*b],[a,0.75*b],[0,b]];}else{pts=[[0,0],[-a,0.25*b],[-0.5*a,0.25*b],[-0.5*a,b],[0.5*a,b],[0.5*a,0.25*b],[a,0.25*b],[0,0]];}_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.RECTANGLE:this._hideTooltip();pts=[[0,0],[a,0],[a,b],[0,b],[0,0]];_1f6.geometry=this._toPolygon(pts,_1f7.x,_1f7.y);_1f6.setGeometry(_1f6.geometry);break;case Draw.LINE:_1f6.setGeometry(lang.mixin(_1f6.geometry,{paths:[[[_1f4.x,_1f4.y],[end.x,end.y]]]}));break;case Draw.EXTENT:if(_1f6){map.graphics.remove(_1f6,true);}var rect=new Rect(this._normalizeRect(_1f4,end,_1f5));rect._originOnly=true;this._graphic=map.graphics.add(new _1d4(rect,this.fillSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;case Draw.FREEHAND_POLYLINE:this._hideTooltip();if(this._canDrawFreehandPoint(evt)===false){if(has("esri-touch")){evt.preventDefault();}return;}this._points.push(evt.mapPoint.offset(0,0));_1f6.geometry._insertPoints([end.offset(0,0)],0);_1f6.setGeometry(_1f6.geometry);break;case Draw.FREEHAND_POLYGON:this._hideTooltip();if(this._canDrawFreehandPoint(evt)===false){if(has("esri-touch")){evt.preventDefault();}return;}this._points.push(evt.mapPoint.offset(0,0));_1f6.geometry._insertPoints([end.offset(0,0)],0);_1f6.setGeometry(_1f6.geometry);break;}if(has("esri-touch")){evt.preventDefault();}},_canDrawFreehandPoint:function(evt){if(!this._oldPoint){return false;}var dx=this._oldPoint.x-evt.screenPoint.x;dx=(dx<0)?dx*-1:dx;var dy=this._oldPoint.y-evt.screenPoint.y;dy=(dy<0)?dy*-1:dy;var _1fa=this._options.tolerance;if(dx<_1fa&&dy<_1fa){return false;}var now=new Date();var _1fb=now-this._startTime;if(_1fb<this._options.drawTime){return false;}this._startTime=now;this._oldPoint=evt.screenPoint;return true;},_onMouseUpHandler:function(evt){if(!this._dragged){this._clear();return;}if(this._points.length===0){this._points.push(evt.mapPoint.offset(0,0));}var _1fc;if(this.map.snappingManager){_1fc=this.map.snappingManager._snappingPoint;}var _1fd=this._points[0],end=_1fc||evt.mapPoint,map=this.map,_1fe=map.spatialReference,Draw=DRAW,_1ff;switch(this._geometryType){case Draw.CIRCLE:case Draw.ELLIPSE:case Draw.TRIANGLE:case Draw.ARROW:case Draw.LEFT_ARROW:case Draw.RIGHT_ARROW:case Draw.UP_ARROW:case Draw.DOWN_ARROW:case Draw.RECTANGLE:_1ff=this._graphic.geometry;break;case Draw.LINE:_1ff=new _1d7({paths:[[[_1fd.x,_1fd.y],[end.x,end.y]]],spatialReference:_1fe});break;case Draw.EXTENT:_1ff=(new Rect(this._normalizeRect(_1fd,end,_1fe))).getExtent();break;case Draw.FREEHAND_POLYLINE:_1ff=new _1d7(_1fe);_1ff.addPath([].concat(this._points,[end.offset(0,0)]));break;case Draw.FREEHAND_POLYGON:_1ff=new _1d8(_1fe);var ring=[].concat(this._points,[end.offset(0,0),this._points[0].offset(0,0)]);if(!_1d8.prototype.isClockwise(ring)&&!this.respectDrawingVertexOrder){console.debug(this.declaredClass+" :  Polygons drawn in anti-clockwise direction will be reversed to be clockwise.");ring.reverse();}_1ff.addRing(ring);break;}if(has("esri-touch")){evt.preventDefault();}this._clear();this._drawEnd(_1ff);},_onClickHandler:function(evt){var _200;if(this.map.snappingManager){_200=this.map.snappingManager._snappingPoint;}var _201=_200||evt.mapPoint,map=this.map,_202=map.toScreen(_201),Draw=DRAW,pts,dx,dy,_203,geom,_204;this._points.push(_201.offset(0,0));switch(this._geometryType){case Draw.POINT:this._drawEnd(_201.offset(0,0));this._setTooltipMessage(0);break;case Draw.POLYLINE:if(this._points.length===1){var _205=new _1d7(map.spatialReference);_205.addPath(this._points);this._graphic=map.graphics.add(new _1d4(_205,this.lineSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}this._onMouseMoveHandler_connect=_1ca.connect(map,"onMouseMove",this._onMouseMoveHandler);this._tGraphic=map.graphics.add(new _1d4(new _1d7({paths:[[[_201.x,_201.y],[_201.x,_201.y]]],spatialReference:map.spatialReference}),this.lineSymbol),true);}else{this._graphic.geometry._insertPoints([_201.offset(0,0)],0);this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.lineSymbol);_203=this._tGraphic;geom=_203.geometry;geom.setPoint(0,0,_201.offset(0,0));geom.setPoint(0,1,_201.offset(0,0));_203.setGeometry(geom);}break;case Draw.POLYGON:if(this._points.length===1){_204=new _1d8(map.spatialReference);_204.addRing(this._points);this._graphic=map.graphics.add(new _1d4(_204,this.fillSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}this._onMouseMoveHandler_connect=_1ca.connect(map,"onMouseMove",this._onMouseMoveHandler);this._tGraphic=map.graphics.add(new _1d4(new _1d7({paths:[[[_201.x,_201.y],[_201.x,_201.y]]],spatialReference:map.spatialReference}),this.fillSymbol),true);}else{this._graphic.geometry._insertPoints([_201.offset(0,0)],0);this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.fillSymbol);_203=this._tGraphic;geom=_203.geometry;geom.setPoint(0,0,_201.offset(0,0));geom.setPoint(0,1,_201.offset(0,0));_203.setGeometry(geom);}break;case Draw.MULTI_POINT:var tps=this._points;if(tps.length===1){var _206=new _1d9(map.spatialReference);_206.addPoint(tps[tps.length-1]);this._graphic=map.graphics.add(new _1d4(_206,this.markerSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}}else{this._graphic.geometry.addPoint(tps[tps.length-1]);this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.markerSymbol);}break;case Draw.ARROW:pts=[[0,0],[-24,24],[-24,12],[-96,12],[-96,-12],[-24,-12],[-24,-24],[0,0]];dx=_202.x;dy=_202.y;this._addShape(pts,dx,dy);break;case Draw.LEFT_ARROW:pts=[[0,0],[24,24],[24,12],[96,12],[96,-12],[24,-12],[24,-24],[0,0]];dx=_202.x;dy=_202.y;this._addShape(pts,dx,dy);break;case Draw.RIGHT_ARROW:pts=[[0,0],[-24,24],[-24,12],[-96,12],[-96,-12],[-24,-12],[-24,-24],[0,0]];dx=_202.x;dy=_202.y;this._addShape(pts,dx,dy);break;case Draw.UP_ARROW:pts=[[0,0],[-24,24],[-12,24],[-12,96],[12,96],[12,24],[24,24],[0,0]];dx=_202.x;dy=_202.y;this._addShape(pts,dx,dy);break;case Draw.DOWN_ARROW:pts=[[0,0],[-24,-24],[-12,-24],[-12,-96],[12,-96],[12,-24],[24,-24],[0,0]];dx=_202.x;dy=_202.y;this._addShape(pts,dx,dy);break;case Draw.TRIANGLE:pts=[[0,-48],[41.56921938165306,24],[-41.56921938165306,24],[0,-48]];dx=_202.x;dy=_202.y;this._addShape(pts,dx,dy);break;case Draw.RECTANGLE:pts=[[0,-96],[96,-96],[96,0],[0,0],[0,-96]];dx=_202.x-48;dy=_202.y+48;this._addShape(pts,dx,dy);break;case Draw.CIRCLE:_204=new _1d8(map.spatialReference);this._graphic=map.graphics.add(new _1d4(_204,this.fillSymbol),true);this._graphic.geometry=_1d8.createCircle({center:_202,r:48,numberOfPoints:60,map:map});this._graphic.setGeometry(this._graphic.geometry);this._drawEnd(this._graphic.geometry);break;case Draw.ELLIPSE:_204=new _1d8(map.spatialReference);this._graphic=map.graphics.add(new _1d4(_204,this.fillSymbol),true);this._graphic.geometry=_1d8.createEllipse({center:_202,longAxis:48,shortAxis:24,numberOfPoints:60,map:map});this._graphic.setGeometry(this._graphic.geometry);this._drawEnd(this._graphic.geometry);break;}this._setTooltipMessage(this._points.length);},_addShape:function(path,dx,dy){var _207=this.map.graphics.add(new _1d4(this._toPolygon(path,dx,dy),this.fillSymbol),true);this._setTooltipMessage(0);var geom;if(_207){geom=_1d5.fromJson(_207.geometry.toJson());this.map.graphics.remove(_207,true);}this._drawEnd(geom);_207=geom=null;},_toPolygon:function(path,dx,dy){var map=this.map;var _208=new _1d8(map.spatialReference);_208.addRing(_1c9.map(path,function(pt){return map.toMap({x:pt[0]+dx,y:pt[1]+dy});}));return _208;},_onDblClickHandler:function(evt){var _209,_20a=this._points,map=this.map,_20b=map.spatialReference,Draw=DRAW;if(has("esri-touch")){_20a.push(evt.mapPoint);}_20a=_20a.slice(0,_20a.length);switch(this._geometryType){case Draw.POLYLINE:if(!this._graphic||_20a.length<2){_1ca.disconnect(this._onMouseMoveHandler_connect);this._clear();this._onClickHandler(evt);return;}_209=new _1d7(_20b);_209.addPath([].concat(_20a));break;case Draw.POLYGON:if(!this._graphic||_20a.length<2){_1ca.disconnect(this._onMouseMoveHandler_connect);this._clear();this._onClickHandler(evt);return;}_209=new _1d8(_20b);var ring=[].concat(_20a,[_20a[0].offset(0,0)]);if(!_1d8.prototype.isClockwise(ring)&&!this.respectDrawingVertexOrder){console.debug(this.declaredClass+" :  Polygons drawn in anti-clockwise direction will be reversed to be clockwise.");ring.reverse();}_209.addRing(ring);break;case Draw.MULTI_POINT:_209=new _1d9(_20b);_1c9.forEach(_20a,function(pt){_209.addPoint(pt);});break;}_1ca.disconnect(this._onMouseMoveHandler_connect);this._clear();this._setTooltipMessage(0);this._drawEnd(_209);},_onKeyDownHandler:function(evt){if(evt.keyCode===keys.ESCAPE){_1ca.disconnect(this._onMouseMoveHandler_connect);this._clear();this._setTooltipMessage(0);}},_toggleTooltip:function(show){if(!this._options.showTooltips){return;}if(show){if(this._tooltip){return;}var _20c=this.map.container;this._tooltip=_1cc.create("div",{"class":"tooltip"},_20c);this._tooltip.style.display="none";this._tooltip.style.position="fixed";this._setTooltipMessage(0);this._onTooltipMouseEnterHandler_connect=_1ca.connect(this.map,"onMouseOver",this._updateTooltip);this._onTooltipMouseLeaveHandler_connect=_1ca.connect(this.map,"onMouseOut",this._hideTooltip);this._onTooltipMouseMoveHandler_connect=_1ca.connect(this.map,"onMouseMove",this._updateTooltip);}else{if(this._tooltip){_1ca.disconnect(this._onTooltipMouseEnterHandler_connect);_1ca.disconnect(this._onTooltipMouseLeaveHandler_connect);_1ca.disconnect(this._onTooltipMouseMoveHandler_connect);_1cc.destroy(this._tooltip);this._tooltip=null;}}},_hideTooltip:function(){var _20d=this._tooltip;if(!_20d){return;}_20d.style.display="none";},_setTooltipMessage:function(_20e){var _20f=this._tooltip;if(!_20f){return;}var _210=_20e;var _211="";switch(this._geometryType){case DRAW.POINT:_211=_1da.toolbars.draw.addPoint;break;case DRAW.ARROW:case DRAW.LEFT_ARROW:case DRAW.RIGHT_ARROW:case DRAW.UP_ARROW:case DRAW.DOWN_ARROW:case DRAW.TRIANGLE:case DRAW.RECTANGLE:case DRAW.CIRCLE:case DRAW.ELLIPSE:_211=_1da.toolbars.draw.addShape;break;case DRAW.LINE:case DRAW.EXTENT:case DRAW.FREEHAND_POLYLINE:case DRAW.FREEHAND_POLYGON:_211=_1da.toolbars.draw.freehand;break;case DRAW.POLYLINE:case DRAW.POLYGON:_211=_1da.toolbars.draw.start;if(_210===1){_211=_1da.toolbars.draw.resume;}else{if(_210>=2){_211=_1da.toolbars.draw.complete;}}break;case DRAW.MULTI_POINT:_211=_1da.toolbars.draw.addMultipoint;if(_210>=1){_211=_1da.toolbars.draw.finish;}break;}_20f.innerHTML=_211;},_updateTooltip:function(evt){var _212=this._tooltip;if(!_212){return;}var px,py;if(evt.clientX||evt.pageY){px=evt.clientX;py=evt.clientY;}else{px=evt.clientX+win.body().scrollLeft-win.body().clientLeft;py=evt.clientY+win.body().scrollTop-win.body().clientTop;}_212.style.display="none";_1cd.set(_212,{left:(px+this._options.tooltipOffset)+"px",top:py+"px"});_212.style.display="";},_redrawGraphic:function(_213,_214,_215,lod){if(_215||this.map.wrapAround180){var g=this._graphic;if(g){g.setGeometry(g.geometry);}g=this._tGraphic;if(g){g.setGeometry(g.geometry);}}},onActivate:function(){},onDeactivate:function(){},onDrawComplete:function(){},onDrawEnd:function(){}});lang.mixin(DRAW,{POINT:"point",MULTI_POINT:"multipoint",LINE:"line",EXTENT:"extent",POLYLINE:"polyline",POLYGON:"polygon",FREEHAND_POLYLINE:"freehandpolyline",FREEHAND_POLYGON:"freehandpolygon",ARROW:"arrow",LEFT_ARROW:"leftarrow",RIGHT_ARROW:"rightarrow",UP_ARROW:"uparrow",DOWN_ARROW:"downarrow",TRIANGLE:"triangle",CIRCLE:"circle",ELLIPSE:"ellipse",RECTANGLE:"rectangle"});if(has("extend-esri")){lang.setObject("toolbars.Draw",DRAW,_1ce);}return DRAW;});},"dojox/grid/_RowSelector":function(){define("dojox/grid/_RowSelector",["dojo/_base/declare","./_View"],function(_216,_217){return _216("dojox.grid._RowSelector",_217,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden";},getWidth:function(){return this.viewWidth||this.defaultWidth;},buildRowContent:function(_218,_219){var w=this.contentWidth||0;_219.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){if(!("contentWidth" in this)&&this.contentNode&&this.contentNode.offsetWidth>0){this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth;}},doStyleRowNode:function(_21a,_21b){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_21a)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_21a)){n.push("dojoxGridRowbarSelected");}_21b.className=n.join(" ");},domouseover:function(e){this.grid.onMouseOverRow(e);},domouseout:function(e){if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}});});},"dojox/grid/_Layout":function(){define("dojox/grid/_Layout",["dojo/_base/kernel","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-geometry","./cells","./_RowSelector"],function(dojo,_21c,_21d,_21e,lang,_21f){return _21d("dojox.grid._Layout",null,{constructor:function(_220){this.grid=_220;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_221,_222,_223,_224,_225){var _226=this.structure[_221].cells[0];var _227=this.structure[_222].cells[0];var cell=null;var _228=0;var _229=0;for(var i=0,c;c=_226[i];i++){if(c.index==_223){_228=i;break;}}cell=_226.splice(_228,1)[0];cell.view=this.grid.views.views[_222];for(i=0,c=null;c=_227[i];i++){if(c.index==_224){_229=i;break;}}if(!_225){_229+=1;}_227.splice(_229,0,cell);var _22a=this.grid.getCell(this.grid.getSortIndex());if(_22a){_22a._currentlySorted=this.grid.getSortAsc();}this.cells=[];_223=0;var v;for(i=0;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0;c=cs[k];k++){c.index=_223;this.cells.push(c);if("_currentlySorted" in c){var si=_223+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_223++;}}}_21e.forEach(this.cells,function(c){var _22b=c.markup[2].split(" ");var _22c=parseInt(_22b[1].substring(5));if(_22c!=c.index){_22b[1]="idx=\""+c.index+"\"";c.markup[2]=_22b.join(" ");}});this.grid.setupHeaderMenu();},setColumnVisibility:function(_22d,_22e){var cell=this.cells[_22d];if(cell.hidden==_22e){cell.hidden=!_22e;var v=cell.view,w=v.viewWidth;if(w&&w!="auto"){v._togglingColumn=_21f.getMarginBox(cell.getHeaderNode()).w||0;}v.update();return true;}else{return false;}},addCellDef:function(_22f,_230,_231){var self=this;var _232=function(_233){var w=0;if(_233.colSpan>1){w=0;}else{w=_233.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _234={grid:this.grid,subrow:_22f,layoutIndex:_230,index:this.cells.length};if(_231&&_231 instanceof _21c.grid.cells._Base){var _235=lang.clone(_231);_234.unitWidth=_232(_235._props);_235=lang.mixin(_235,this._defaultCellProps,_231._props,_234);return _235;}var _236=_231.type||_231.cellType||this._defaultCellProps.type||this._defaultCellProps.cellType||_21c.grid.cells.Cell;if(lang.isString(_236)){_236=lang.getObject(_236);}_234.unitWidth=_232(_231);return new _236(lang.mixin({},this._defaultCellProps,_231,_234));},addRowDef:function(_237,_238){var _239=[];var _23a=0,_23b=0,_23c=true;for(var i=0,def,cell;(def=_238[i]);i++){cell=this.addCellDef(_237,i,def);_239.push(cell);this.cells.push(cell);if(_23c&&cell.relWidth){_23a+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_23b+=window.parseInt(w,10);}else{if(w=="auto"){_23c=false;}}}}}if(_23a&&_23c){_21e.forEach(_239,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_23a)*(100-_23b))+"%";}});}return _239;},addRowsDef:function(_23d){var _23e=[];if(lang.isArray(_23d)){if(lang.isArray(_23d[0])){for(var i=0,row;_23d&&(row=_23d[i]);i++){_23e.push(this.addRowDef(i,row));}}else{_23e.push(this.addRowDef(0,_23d));}}return _23e;},addViewDef:function(_23f){this._defaultCellProps=_23f.defaultCell||{};if(_23f.width&&_23f.width=="auto"){delete _23f.width;}return lang.mixin({},_23f,{cells:this.addRowsDef(_23f.rows||_23f.cells)});},setStructure:function(_240){this.fieldIndex=0;this.cells=[];var s=this.structure=[];if(this.grid.rowSelector){var sel={type:_21c._scopeName+".grid._RowSelector"};if(lang.isString(this.grid.rowSelector)){var _241=this.grid.rowSelector;if(_241=="false"){sel=null;}else{if(_241!="true"){sel["width"]=_241;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _242=function(def){return ("name" in def||"field" in def||"get" in def);};var _243=function(def){if(lang.isArray(def)){if(lang.isArray(def[0])||_242(def[0])){return true;}}return false;};var _244=function(def){return (def!==null&&lang.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_242(def))));};if(lang.isArray(_240)){var _245=false;for(var i=0,st;(st=_240[i]);i++){if(_244(st)){_245=true;break;}}if(!_245){s.push(this.addViewDef({cells:_240}));}else{for(i=0;(st=_240[i]);i++){if(_243(st)){s.push(this.addViewDef({cells:st}));}else{if(_244(st)){s.push(this.addViewDef(st));}}}}}else{if(_244(_240)){s.push(this.addViewDef(_240));}}this.cellCount=this.cells.length;this.grid.setupHeaderMenu();}});});},"esri/layers/RenderMode":function(){define("esri/layers/RenderMode",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","dojo/io/script","esri/kernel"],function(_246,_247,lang,_248,has,_249,_24a){var _24b=_247(null,{declaredClass:"esri.layers._RenderMode",constructor:function(){this._prefix="jsonp_"+(_246._scopeName||"dojo")+"IoScript";},initialize:function(map){this.map=map;this._init=true;},startup:function(){},propertyChangeHandler:function(type){},destroy:function(){this._init=false;},drawFeature:function(_24c){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _24d=this._featureMap[oid];if(_24d){_24d._count++;}},_decRefCount:function(oid){var _24e=this._featureMap[oid];if(_24e){_24e._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_24f){var fmap=this._featureMap,_250=fmap[oid],_251=this.featureLayer;if(!_250){fmap[oid]=_24f;_251._add(_24f);_24f._count=0;}return _250||_24f;},_removeFeatureIIf:function(oid){var _252=this._featureMap[oid],_253=this.featureLayer;if(_252){if(_252._count){return;}delete this._featureMap[oid];_253._remove(_252);}return _252;},_clearIIf:function(){var i,_254=this.featureLayer,_255=_254.graphics,_256=_254._selectedFeatures,_257=_254.objectIdField;for(i=_255.length-1;i>=0;i--){var _258=_255[i];var oid=_258.attributes[_257];if(oid in _256){_258._count=1;continue;}_258._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=_249[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||_249[this._prefix+id];if(dfd){try{dfd.cancel();_249._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){_249._validCheck(null);},_toggleVisibility:function(show){var _259=this.featureLayer,_25a=_259.graphics,_25b=show?"show":"hide",i,len=_25a.length;show=show&&_259._ager;for(i=0;i<len;i++){var _25c=_25a[i];_25c[_25b]();if(show){_259._repaint(_25c);}}},_applyTimeFilter:function(_25d){var _25e=this.featureLayer;if(!_25e.timeInfo||_25e.suspended){return;}if(!_25d){_25e._fireUpdateStart();}var _25f=_25e._trackManager;if(_25f){_25f.clearTracks();}var defn=_25e.getTimeDefinition(),_260=_25e._getOffsettedTE(_25e._mapTimeExtent);if(_260){_260=_25e._getTimeOverlap(defn,_260);if(_260){var _261=_25e._filterByTime(_25e.graphics,_260.startTime,_260.endTime);if(_25f){_25f.addFeatures(_261.match);}_248.forEach(_261.match,function(_262){var _263=_262._shape;if(!_262.visible){_262.show();_263=_262._shape;_263&&_263._moveToFront();}if(_25e._ager&&_263){_25e._repaint(_262);}});_248.forEach(_261.noMatch,function(_264){if(_264.visible){_264.hide();}});}else{this._toggleVisibility(false);}}else{if(_25f){_25f.addFeatures(_25e.graphics);}this._toggleVisibility(true);}if(_25f){_25f.moveLatestToFront();_25f.drawTracks();}if(!_25d){_25e._fireUpdateEnd();}}});if(has("extend-esri")){lang.setObject("layers._RenderMode",_24b,_24a);}return _24b;});},"dijit/BackgroundIframe":function(){define("dijit/BackgroundIframe",["require","./main","dojo/_base/config","dojo/dom-construct","dojo/dom-style","dojo/_base/lang","dojo/on","dojo/sniff","dojo/_base/window"],function(_265,_266,_267,_268,_269,lang,on,has,win){var _26a=new function(){var _26b=[];this.pop=function(){var _26c;if(_26b.length){_26c=_26b.pop();_26c.style.display="";}else{if(has("ie")<9){var burl=_267["dojoBlankHtmlUrl"]||_265.toUrl("dojo/resources/blank.html")||"javascript:\"\"";var html="<iframe src='"+burl+"' role='presentation'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_26c=win.doc.createElement(html);}else{_26c=_268.create("iframe");_26c.src="javascript:\"\"";_26c.className="dijitBackgroundIframe";_26c.setAttribute("role","presentation");_269.set(_26c,"opacity",0.1);}_26c.tabIndex=-1;}return _26c;};this.push=function(_26d){_26d.style.display="none";_26b.push(_26d);};}();_266.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(has("ie")||has("mozilla")){var _26e=(this.iframe=_26a.pop());node.appendChild(_26e);if(has("ie")<7||has("quirks")){this.resize(node);this._conn=on(node,"resize",lang.hitch(this,function(){this.resize(node);}));}else{_269.set(_26e,{width:"100%",height:"100%"});}}};lang.extend(_266.BackgroundIframe,{resize:function(node){if(this.iframe){_269.set(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"});}},destroy:function(){if(this._conn){this._conn.remove();this._conn=null;}if(this.iframe){_26a.push(this.iframe);delete this.iframe;}}});return _266.BackgroundIframe;});},"dojox/grid/_Grid":function(){require({cache:{"url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n"}});define("dojox/grid/_Grid",["dojo/_base/kernel","../main","dojo/_base/declare","./_Events","./_Scroller","./_Layout","./_View","./_ViewManager","./_RowManager","./_FocusManager","./_EditManager","./Selection","./_RowSelector","./util","dijit/_Widget","dijit/_TemplatedMixin","dijit/CheckedMenuItem","dojo/text!./resources/_Grid.html","dojo/string","dojo/_base/array","dojo/_base/lang","dojo/_base/sniff","dojox/html/metrics","dojo/_base/html","dojo/query","dojo/dnd/common","dojo/i18n!dijit/nls/loading"],function(dojo,_26f,_270,_271,_272,_273,_274,_275,_276,_277,_278,_279,_27a,util,_27b,_27c,_27d,_27e,_27f,_280,lang,has,_281,html,_282){if(!dojo.isCopyKey){dojo.isCopyKey=dojo.dnd.getCopyKeyState;}var _283=_270("dojox.grid._Grid",[_27b,_27c,_271],{templateString:_27e,classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,summary:"",_setSummaryAttr:"domNode",sortInfo:0,_placeholders:null,_layoutClass:_273,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex")){this.domNode.tabIndex="0";}this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");_281.initOnFontResize();this.connect(_281,"onFontResize","textSizeChanged");util.funnelEvents(this.domNode,this,"doKeyEvent",util.keyEvents);if(this.selectionMode!="none"){this.domNode.setAttribute("aria-multiselectable",this.selectionMode=="single"?"false":"true");}html.addClass(this.domNode,this.classTag);if(!this.isLeftToRight()){html.addClass(this.domNode,this.classTag+"Rtl");}if(this.rowHeight>0){html.addClass(this.viewsNode,this.classTag+"FixedRowHeight");}},postMixInProperties:function(){this.inherited(arguments);var _284=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=_27f.substitute(this.loadingMessage,_284);this.errorMessage=_27f.substitute(this.errorMessage,_284);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0;},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);if(this.domNode&&this.autoWidth&&this.initialWidth){this.domNode.style.width=this.initialWidth;}if(this.domNode&&!this.editable){html.attr(this.domNode,"aria-readonly","true");}},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;if(this.scroller){this.scroller.destroy();delete this.scroller;}this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.focus){this.focus.destroy();delete this.focus;}if(this.headerMenu&&this._placeholders.length){_280.forEach(this._placeholders,function(p){p.unReplace(true);});this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.inherited(arguments);},_setAutoHeightAttr:function(ah,_285){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);}}}if(typeof ah=="number"){if(isNaN(ah)){ah=false;}if(ah<0){ah=true;}else{if(ah===0){ah=false;}}}this.autoHeight=ah;if(typeof ah=="boolean"){this._autoHeight=ah;}else{if(typeof ah=="number"){this._autoHeight=(ah>=this.get("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_285){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},textSizeChanged:function(){this.render();},sizeChange:function(){this.update();},createManagers:function(){this.rows=new _276(this);this.focus=new _277(this);this.edit=new _278(this);},createSelection:function(){this.selection=new _279(this);},createScroller:function(){this.scroller=new _272();this.scroller.grid=this;this.scroller.renderRow=lang.hitch(this,"renderRow");this.scroller.removeRow=lang.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.update();},onResizeColumn:function(_286){},createViews:function(){this.views=new _275(this);this.views.createView=lang.hitch(this,"createView");},createView:function(_287,idx){var c=lang.getObject(_287);var view=new c({grid:this,index:idx});this.viewsNode.appendChild(view.domNode);this.viewsHeaderNode.appendChild(view.headerNode);this.views.addView(view);html.attr(this.domNode,"align",this.isLeftToRight()?"left":"right");return view;},buildViews:function(){for(var i=0,vs;(vs=this.layout.structure[i]);i++){this.createView(vs.type||_26f._scopeName+".grid._View",i).setStructure(vs);}this.scroller.setContentNodes(this.views.getContentNodes());},_setStructureAttr:function(_288){var s=_288;if(s&&lang.isString(s)){dojo.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0");s=lang.getObject(s);}this.structure=s;if(!s){if(this.layout.structure){s=this.layout.structure;}else{return;}}this.views.destroyViews();this.focus.focusView=null;if(s!==this.layout.structure){this.layout.setStructure(s);}this._structureChanged();},setStructure:function(_289){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(_289);},getColumnTogglingItems:function(){var _28a,_28b=[];_28a=_280.map(this.layout.cells,function(cell){if(!cell.menuItems){cell.menuItems=[];}var self=this;var item=new _27d({label:cell.name,checked:!cell.hidden,_gridCell:cell,onChange:function(_28c){if(self.layout.setColumnVisibility(this._gridCell.index,_28c)){var _28d=this._gridCell.menuItems;if(_28d.length>1){_280.forEach(_28d,function(item){if(item!==this){item.setAttribute("checked",_28c);}},this);}_28c=_280.filter(self.layout.cells,function(c){if(c.menuItems.length>1){_280.forEach(c.menuItems,"item.set('disabled', false);");}else{c.menuItems[0].set("disabled",false);}return !c.hidden;});if(_28c.length==1){_280.forEach(_28c[0].menuItems,"item.set('disabled', true);");}}},destroy:function(){var _28e=_280.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_28e,1);delete this._gridCell;_27d.prototype.destroy.apply(this,arguments);}});cell.menuItems.push(item);if(!cell.hidden){_28b.push(item);}return item;},this);if(_28b.length==1){_28b[0].set("disabled",true);}return _28a;},_setHeaderMenuAttr:function(menu){if(this._placeholders&&this._placeholders.length){_280.forEach(this._placeholders,function(p){p.unReplace(true);});this._placeholders=[];}if(this.headerMenu){this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.headerMenu=menu;if(!menu){return;}this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders){this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel);}},setHeaderMenu:function(menu){dojo.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(menu);},setupHeaderMenu:function(){if(this._placeholders&&this._placeholders.length){_280.forEach(this._placeholders,function(p){if(p._replaced){p.unReplace(true);}p.replace(this.getColumnTogglingItems());},this);}},_fetch:function(_28f){this.setScrollTop(0);},getItem:function(_290){return null;},showMessage:function(_291){if(_291){this.messagesNode.innerHTML=_291;this.messagesNode.style.display="";}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none";}},_structureChanged:function(){this.buildViews();if(this.autoRender&&this._started){this.render();}},hasLayout:function(){return this.layout.cells.length;},resize:function(_292,_293){this._pendingChangeSize=_292;this._pendingResultSize=_293;this.sizeChange();},_getPadBorder:function(){this._padBorder=this._padBorder||html._getPadBorderExtents(this.domNode);return this._padBorder;},_getHeaderHeight:function(){var vns=this.viewsHeaderNode.style,t=vns.display=="none"?0:this.views.measureHeader();vns.height=t+"px";this.views.normalizeHeaderNodeHeight();return t;},_resize:function(_294,_295){_294=_294||this._pendingChangeSize;_295=_295||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(!this.domNode){return;}var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _296=this._getPadBorder();var hh=undefined;var h;if(this._autoHeight){this.domNode.style.height="auto";}else{if(typeof this.autoHeight=="number"){h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.domNode.clientHeight<=_296.h){if(pn==document.body){this.domNode.style.height=this.defaultHeight;}else{if(this.height){this.domNode.style.height=this.height;}else{this.fitTo="parent";}}}}}if(_295){_294=_295;}if(!this._autoHeight&&_294){html.marginBox(this.domNode,_294);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){h=this._parentContentBoxHeight=(this._parentContentBoxHeight>0?this._parentContentBoxHeight:html._getContentBox(pn).h);this.domNode.style.height=Math.max(0,h)+"px";}}var _297=_280.some(this.views.views,function(v){return v.flexCells;});if(!this._autoHeight&&(h||html._getContentBox(this.domNode).h)===0){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";if(!_297&&hh===undefined){hh=this._getHeaderHeight();}}if(_297){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _298=(!this.initialWidth&&this.autoWidth);var w=_298?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_298){this.domNode.style.width=vw+"px";}},adaptHeight:function(_299){var t=_299===undefined?this._getHeaderHeight():_299;var h=(this._autoHeight?-1:Math.max(this.domNode.clientHeight-t,0)||0);this.views.onEach("setSize",[0,h]);this.views.onEach("adaptHeight");if(!this._autoHeight){var _29a=0,_29b=0;var _29c=_280.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_29a++;}else{_29b++;}return (!has);});if(_29a>0&&_29b>0){_280.forEach(_29c,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount"))){this.scroller.windowHeight=h;}else{this.scroller.windowHeight=Math.max(this.domNode.clientHeight-t,0);}},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.autoRender){this.render();}},render:function(){if(!this.domNode){return;}if(!this._started){return;}if(!this.hasLayout()){this.scroller.init(0,this.keepRows,this.rowsPerPage);return;}this.update=this.defaultUpdate;this._render();},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender();},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize();},postrender:function(){this.postresize();this.focus.initFocusView();html.setSelectable(this.domNode,this.selectable);},postresize:function(){if(this._autoHeight){var size=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=size;}},renderRow:function(_29d,_29e){this.views.renderRow(_29d,_29e,this._skipRowRenormalize);},rowRemoved:function(_29f){this.views.rowRemoved(_29f);},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true;},endUpdate:function(){this.updating=false;var i=this.invalidated,r;if(i.all){this.update();}else{if(i.rowCount!=undefined){this.updateRowCount(i.rowCount);}else{for(r in i){this.updateRow(Number(r));}}}this.invalidated=[];},defaultUpdate:function(){if(!this.domNode){return;}if(this.updating){this.invalidated.all=true;return;}this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(this.lastScrollTop);this.postrender();},update:function(){this.render();},updateRow:function(_2a0){_2a0=Number(_2a0);if(this.updating){this.invalidated[_2a0]=true;}else{this.views.updateRow(_2a0);this.scroller.rowHeightChanged(_2a0);}},updateRows:function(_2a1,_2a2){_2a1=Number(_2a1);_2a2=Number(_2a2);var i;if(this.updating){for(i=0;i<_2a2;i++){this.invalidated[i+_2a1]=true;}}else{for(i=0;i<_2a2;i++){this.views.updateRow(i+_2a1,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_2a1);}},updateRowCount:function(_2a3){if(this.updating){this.invalidated.rowCount=_2a3;}else{this.rowCount=_2a3;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_2a3);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_2a4){this.views.updateRowStyles(_2a4);},getRowNode:function(_2a5){if(this.focus.focusView&&!(this.focus.focusView instanceof _27a)){return this.focus.focusView.rowNodes[_2a5];}else{for(var i=0,_2a6;(_2a6=this.views.views[i]);i++){if(!(_2a6 instanceof _27a)){return _2a6.rowNodes[_2a5];}}}return null;},rowHeightChanged:function(_2a7){this.views.renormalizeRow(_2a7);this.scroller.rowHeightChanged(_2a7);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(has("ie")?100:50),scrollTo:function(_2a8){if(!this.fastScroll){this.setScrollTop(_2a8);return;}var _2a9=Math.abs(this.lastScrollTop-_2a8);this.lastScrollTop=_2a8;if(_2a9>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_2a8;this.views.setScrollTop(_2a8);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _2aa=this;this._pendingScroll=window.setTimeout(function(){delete _2aa._pendingScroll;_2aa.finishScrollJob();},200);}else{this.setScrollTop(_2a8);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_2ab){this.scroller.scroll(this.views.setScrollTop(_2ab));},scrollToRow:function(_2ac){this.setScrollTop(this.scroller.findScrollTop(_2ac)+1);},styleRowNode:function(_2ad,_2ae){if(_2ae){this.rows.styleRowNode(_2ad,_2ae);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_2af){return this.layout.cells[_2af];},setCellWidth:function(_2b0,_2b1){this.getCell(_2b0).unitWidth=_2b1;},getCellName:function(_2b2){return "Cell "+_2b2.index;},canSort:function(_2b3){},sort:function(){},getSortAsc:function(_2b4){_2b4=_2b4==undefined?this.sortInfo:_2b4;return Boolean(_2b4>0);},getSortIndex:function(_2b5){_2b5=_2b5==undefined?this.sortInfo:_2b5;return Math.abs(_2b5)-1;},setSortIndex:function(_2b6,_2b7){var si=_2b6+1;if(_2b7!=undefined){si*=(_2b7?1:-1);}else{if(this.getSortIndex()==_2b6){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_2b8){if(this.canSort(_2b8)){this.sortInfo=_2b8;this.sort();this.update();}},doKeyEvent:function(e){e.dispatch="do"+e.type;this.onKeyEvent(e);},_dispatch:function(m,e){if(m in this){return this[m](e);}return false;},dispatchKeyEvent:function(e){this._dispatch(e.dispatch,e);},dispatchContentEvent:function(e){this.edit.dispatchEvent(e)||e.sourceView.dispatchContentEvent(e)||this._dispatch(e.dispatch,e);},dispatchHeaderEvent:function(e){e.sourceView.dispatchHeaderEvent(e)||this._dispatch("doheader"+e.type,e);},dokeydown:function(e){this.onKeyDown(e);},doclick:function(e){if(e.cellNode){this.onCellClick(e);}else{this.onRowClick(e);}},dodblclick:function(e){if(e.cellNode){this.onCellDblClick(e);}else{this.onRowDblClick(e);}},docontextmenu:function(e){if(e.cellNode){this.onCellContextMenu(e);}else{this.onRowContextMenu(e);}},doheaderclick:function(e){if(e.cellNode){this.onHeaderCellClick(e);}else{this.onHeaderClick(e);}},doheaderdblclick:function(e){if(e.cellNode){this.onHeaderCellDblClick(e);}else{this.onHeaderDblClick(e);}},doheadercontextmenu:function(e){if(e.cellNode){this.onHeaderCellContextMenu(e);}else{this.onHeaderContextMenu(e);}},doStartEdit:function(_2b9,_2ba){this.onStartEdit(_2b9,_2ba);},doApplyCellEdit:function(_2bb,_2bc,_2bd){this.onApplyCellEdit(_2bb,_2bc,_2bd);},doCancelEdit:function(_2be){this.onCancelEdit(_2be);},doApplyEdit:function(_2bf){this.onApplyEdit(_2bf);},addRow:function(){this.updateRowCount(this.get("rowCount")+1);},removeSelectedRows:function(){if(this.allItemsSelected){this.updateRowCount(0);}else{this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));}this.selection.clear();}});_283.markupFactory=function(_2c0,node,ctor,_2c1){var _2c2=function(n){var w=html.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w,10)+"px";}return w;};if(!_2c0.structure&&node.nodeName.toLowerCase()=="table"){_2c0.structure=_282("> colgroup",node).map(function(cg){var sv=html.attr(cg,"span");var v={noscroll:(html.attr(cg,"noscroll")=="true")?true:false,__span:(!!sv?parseInt(sv,10):1),cells:[]};if(html.hasAttr(cg,"width")){v.width=_2c2(cg);}return v;});if(!_2c0.structure.length){_2c0.structure.push({__span:Infinity,cells:[]});}_282("thead > tr",node).forEach(function(tr,_2c3){var _2c4=0;var _2c5=0;var _2c6;var _2c7=null;_282("> th",tr).map(function(th){if(!_2c7){_2c6=0;_2c7=_2c0.structure[0];}else{if(_2c4>=(_2c6+_2c7.__span)){_2c5++;_2c6+=_2c7.__span;var _2c8=_2c7;_2c7=_2c0.structure[_2c5];}}var cell={name:lang.trim(html.attr(th,"name")||th.innerHTML),colSpan:parseInt(html.attr(th,"colspan")||1,10),type:lang.trim(html.attr(th,"cellType")||""),id:lang.trim(html.attr(th,"id")||"")};_2c4+=cell.colSpan;var _2c9=html.attr(th,"rowspan");if(_2c9){cell.rowSpan=_2c9;}if(html.hasAttr(th,"width")){cell.width=_2c2(th);}if(html.hasAttr(th,"relWidth")){cell.relWidth=window.parseInt(html.attr(th,"relWidth"),10);}if(html.hasAttr(th,"hidden")){cell.hidden=(html.attr(th,"hidden")=="true"||html.attr(th,"hidden")===true);}if(_2c1){_2c1(th,cell);}cell.type=cell.type?lang.getObject(cell.type):_26f.grid.cells.Cell;if(cell.type&&cell.type.markupFactory){cell.type.markupFactory(th,cell);}if(!_2c7.cells[_2c3]){_2c7.cells[_2c3]=[];}_2c7.cells[_2c3].push(cell);});});}return new ctor(_2c0,node);};return _283;});},"dijit/_WidgetsInTemplateMixin":function(){define("dijit/_WidgetsInTemplateMixin",["dojo/_base/array","dojo/_base/declare","dojo/parser"],function(_2ca,_2cb,_2cc){return _2cb("dijit._WidgetsInTemplateMixin",null,{_earlyTemplatedStartup:false,widgetsInTemplate:true,_beforeFillContent:function(){if(this.widgetsInTemplate){var node=this.domNode;var cw=(this._startupWidgets=_2cc.parse(node,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,scope:"dojo"}));if(!cw.isFulfilled()){throw new Error(this.declaredClass+": parser returned unfilled promise (probably waiting for module auto-load), "+"unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");}this._attachTemplateNodes(cw,function(n,p){return n[p];});}},startup:function(){_2ca.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);}});});},"esri/tasks/query":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils","esri/tasks/SpatialRelationship","dojo/has!extend-esri?esri/tasks/QueryTask","dojo/has!extend-esri?esri/tasks/RelationshipQuery","dojo/has!extend-esri?esri/tasks/StatisticDefinition"],function(_2cd,lang,_2ce,_2cf,has,_2d0,_2d1,_2d2){var _2d3=_2cd(null,{declaredClass:"esri.tasks.Query",constructor:function(){this.spatialRelationship=_2d3.SPATIAL_REL_INTERSECTS;},text:null,where:"",geometry:null,groupByFieldsForStatistics:null,objectIds:null,returnGeometry:false,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,pixelSize:null,toJson:function(_2d4){var json={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision},g=_2d4&&_2d4["geometry"]||this.geometry,ids=this.objectIds,_2d5=this.outFields,_2d6=this.outSpatialReference,_2d7=this.groupByFieldsForStatistics,_2d8=this.orderByFields,_2d9=this.outStatistics;if(g){json.geometry=g;json.geometryType=_2d1.getJsonType(g);json.inSR=g.spatialReference.wkid||_2cf.toJson(g.spatialReference.toJson());}if(ids){json.objectIds=ids.join(",");}if(_2d5){json.outFields=_2d5.join(",");}if(_2d7){json.groupByFieldsForStatistics=_2d7.join(",");}if(_2d8){json.orderByFields=_2d8.join(",");}if(_2d9){var _2da=[];_2ce.forEach(_2d9,function(item,idx){_2da.push(item.toJson());});json.outStatistics=_2cf.toJson(_2da);}if(_2d6!==null){json.outSR=_2d6.wkid||_2cf.toJson(_2d6.toJson());}else{if(g){json.outSR=g.spatialReference.wkid||_2cf.toJson(g.spatialReference.toJson());}}var _2db=this.timeExtent;json.time=_2db?_2db.toJson().join(","):null;var _2dc=this.relationParam;if(_2dc&&this.spatialRelationship===_2d3.SPATIAL_REL_RELATION){json.relationParam=_2dc;}json.pixelSize=this.pixelSize?_2cf.toJson(this.pixelSize.toJson()):null;json._ts=this._ts;return json;}});lang.mixin(_2d3,_2d2);if(has("extend-esri")){lang.setObject("tasks.Query",_2d3,_2d0);}return _2d3;});},"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(dojo){return dojo.dojox;});},"esri/layers/FeatureTemplate":function(){define("esri/layers/FeatureTemplate",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/lang","esri/graphic"],function(_2dd,lang,has,_2de,_2df,_2e0){var _2e1=_2dd(null,{declaredClass:"esri.layers.FeatureTemplate",constructor:function(json){if(json&&lang.isObject(json)){this.name=json.name;this.description=json.description;this.drawingTool=json.drawingTool;var _2e2=json.prototype;this.prototype=new _2e0(_2e2.geometry,null,_2e2.attributes);}},toJson:function(){return _2df.fixJson({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});lang.mixin(_2e1,{TOOL_AUTO_COMPLETE_POLYGON:"esriFeatureEditToolAutoCompletePolygon",TOOL_CIRCLE:"esriFeatureEditToolCircle",TOOL_ELLIPSE:"esriFeatureEditToolEllipse",TOOL_FREEHAND:"esriFeatureEditToolFreehand",TOOL_LINE:"esriFeatureEditToolLine",TOOL_NONE:"esriFeatureEditToolNone",TOOL_POINT:"esriFeatureEditToolPoint",TOOL_POLYGON:"esriFeatureEditToolPolygon",TOOL_RECTANGLE:"esriFeatureEditToolRectangle",TOOL_ARROW:"esriFeatureEditToolArrow",TOOL_TRIANGLE:"esriFeatureEditToolTriangle",TOOL_LEFT_ARROW:"esriFeatureEditToolLeftArrow",TOOL_RIGHT_ARROW:"esriFeatureEditToolRightArrow",TOOL_UP_ARROW:"esriFeatureEditToolUpArrow",TOOL_DOWN_ARROW:"esriFeatureEditToolDownArrow"});if(has("extend-esri")){lang.setObject("layers.FeatureTemplate",_2e1,_2de);}return _2e1;});},"dojo/dnd/Mover":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../sniff","../_base/window","../dom","../dom-geometry","../dom-style","../Evented","../on","../touch","./common","./autoscroll"],function(_2e3,_2e4,_2e5,lang,has,win,dom,_2e6,_2e7,_2e8,on,_2e9,dnd,_2ea){return _2e4("dojo.dnd.Mover",[_2e8],{constructor:function(node,e,host){this.node=dom.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=(this.host=host),d=node.ownerDocument;this.events=[on(d,_2e9.move,lang.hitch(this,"onFirstMove")),on(d,_2e9.move,lang.hitch(this,"onMouseMove")),on(d,_2e9.release,lang.hitch(this,"onMouseUp")),on(d,"dragstart",_2e5.stop),on(d.body,"selectstart",_2e5.stop)];_2ea.autoScrollStart(d);if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){_2ea.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY},e);_2e5.stop(e);},onMouseUp:function(e){if(has("webkit")&&has("mac")&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}_2e5.stop(e);},onFirstMove:function(e){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left))||0;t=Math.round(parseFloat(s.top))||0;break;default:s.position="absolute";var m=_2e6.getMarginBox(this.node);var b=win.doc.body;var bs=_2e7.getComputedStyle(b);var bm=_2e6.getMarginBox(b,bs);var bc=_2e6.getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this,e);}this.events.shift().remove();},destroy:function(){_2e3.forEach(this.events,function(_2eb){_2eb.remove();});var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});});},"esri/layers/FeatureEditResult":function(){define("esri/layers/FeatureEditResult",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel"],function(_2ec,lang,has,_2ed){var _2ee=_2ec(null,{declaredClass:"esri.layers.FeatureEditResult",constructor:function(json){if(json&&lang.isObject(json)){this.objectId=json.objectId;this.success=json.success;if(!json.success){var err=json.error;this.error=new Error();this.error.code=err.code;this.error.message=err.description;}}}});if(has("extend-esri")){lang.setObject("layers.FeatureEditResult",_2ee,_2ed);}return _2ee;});},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(lang){var _2ef={};lang.setObject("dojo.data.util.sorter",_2ef);_2ef.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};_2ef.createSortFunction=function(_2f0,_2f1){var _2f2=[];function _2f3(attr,dir,comp,s){return function(_2f4,_2f5){var a=s.getValue(_2f4,attr);var b=s.getValue(_2f5,attr);return dir*comp(a,b);};};var _2f6;var map=_2f1.comparatorMap;var bc=_2ef.basicComparator;for(var i=0;i<_2f0.length;i++){_2f6=_2f0[i];var attr=_2f6.attribute;if(attr){var dir=(_2f6.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_2f2.push(_2f3(attr,dir,comp,_2f1));}}return function(rowA,rowB){var i=0;while(i<_2f2.length){var ret=_2f2[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};return _2ef;});},"dojo/touch":function(){define(["./_base/kernel","./aspect","./dom","./_base/lang","./on","./has","./mouse","./domReady","./_base/window"],function(dojo,_2f7,dom,lang,on,has,_2f8,_2f9,win){var _2fa=navigator.msPointerEnabled;var _2fb;function _2fc(_2fd,_2fe,_2ff){if(_2fa&&_2ff){return function(node,_300){return on(node,_2ff,_300);};}else{if(has("touch")){return function(node,_301){var _302=on(node,_2fe,_301),_303=on(node,_2fd,function(evt){if(!_2fb||(new Date()).getTime()>_2fb+1000){_301.call(this,evt);}});return {remove:function(){_302.remove();_303.remove();}};};}else{return function(node,_304){return on(node,_2fd,_304);};}}};var _305,_306,_307;if(has("touch")&&!_2fa){_2f9(function(){_307=win.body();win.doc.addEventListener("touchstart",function(_308){_2fb=(new Date()).getTime();var _309=_307;_307=_308.target;if(_307.dojoElementFromPoint){_307=_307.dojoElementFromPoint(_308.changedTouches[0].clientX,_308.changedTouches[0].clientY);}if(_309){on.emit(_309,"dojotouchout",{target:_309,relatedTarget:_307,bubbles:true});}if(_307){on.emit(_307,"dojotouchover",{target:_307,relatedTarget:_309,bubbles:true});}},true);on(win.doc,"touchmove",function(_30a){_2fb=(new Date()).getTime();_306=_30a;var _30b=win.doc.elementFromPoint(_30a.clientX,_30a.clientY);if(_30b){var _30c=_30b;if(_30b.dojoElementFromPoint){_30b=_30b.dojoElementFromPoint(_30a.clientX,_30a.clientY);}if(_307!==_30b){if(_307){on.emit(_30c,"dojotouchout",{target:_307,relatedTarget:_30b,bubbles:true});}if(_30b){on.emit(_30c,"dojotouchover",{target:_30b,relatedTarget:_307,bubbles:true});}_307=_30b;}on.emit(_30c,"dojotouchmove",{target:_30b,bubbles:true});}});on(win.doc,"touchend",function(_30d){var node=win.doc.elementFromPoint(_30d.clientX,_30d.clientY);var _30e=node;if(node.dojoElementFromPoint){node=node.dojoElementFromPoint(_30d.clientX,_30d.clientY);}if(node){on.emit(_30e,"dojotouchend",lang.delegate(_30d,{target:node,bubbles:true}));}});});_305=function(node,_30f){return on(node,"dojotouchmove",function(_310){_30f(lang.delegate(_306,{target:_310.target,preventDefault:function(){_306.preventDefault();},stopPropagation:function(){_310.stopPropagation();}}));});};}var _311={press:_2fc("mousedown","touchstart","MSPointerDown"),move:_2fc("mousemove",_305,"MSPointerMove"),release:_2fc("mouseup","dojotouchend","MSPointerUp"),cancel:_2fc(_2f8.leave,"touchcancel",has("touch")?"MSPointerCancel":null),over:_2fc("mouseover","dojotouchover","MSPointerOver"),out:_2fc("mouseout","dojotouchout","MSPointerOut"),enter:_2f8._eventHandler(_2fc("mouseover","dojotouchover","MSPointerOver")),leave:_2f8._eventHandler(_2fc("mouseout","dojotouchout","MSPointerOut"))};1&&(dojo.touch=_311);return _311;});},"url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n","dojox/grid/Selection":function(){define("dojox/grid/Selection",["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-attr"],function(_312,_313,lang,_314){return _312("dojox.grid.Selection",null,{constructor:function(_315){this.grid=_315;this.selected=[];this.setMode(_315.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_316){return this.grid.onCanSelect(_316);},onCanDeselect:function(_317){return this.grid.onCanDeselect(_317);},onSelected:function(_318){},onDeselected:function(_319){},onChanging:function(){},onChanged:function(){},isSelected:function(_31a){if(this.mode=="none"){return false;}return this.selected[_31a];},getFirstSelected:function(){if(!this.selected.length||this.mode=="none"){return -1;}for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getNextSelected:function(_31b){if(this.mode=="none"){return -1;}for(var i=_31b+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _31c=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_31c.push(i);}}return _31c;},getSelectedCount:function(){var c=0;for(var i=0;i<this.selected.length;i++){if(this.selected[i]){c++;}}return c;},_beginUpdate:function(){if(this.updating===0){this.onChanging();}this.updating++;},_endUpdate:function(){this.updating--;if(this.updating===0){this.onChanged();}},select:function(_31d){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_31d);this.addToSelection(_31d);}else{this.toggleSelect(_31d);}},addToSelection:function(_31e){if(this.mode=="none"){return;}if(lang.isArray(_31e)){_313.forEach(_31e,this.addToSelection,this);return;}_31e=Number(_31e);if(this.selected[_31e]){this.selectedIndex=_31e;}else{if(this.onCanSelect(_31e)!==false){this.selectedIndex=_31e;var _31f=this.grid.getRowNode(_31e);if(_31f){_314.set(_31f,"aria-selected","true");}this._beginUpdate();this.selected[_31e]=true;this.onSelected(_31e);this._endUpdate();}}},deselect:function(_320){if(this.mode=="none"){return;}if(lang.isArray(_320)){_313.forEach(_320,this.deselect,this);return;}_320=Number(_320);if(this.selectedIndex==_320){this.selectedIndex=-1;}if(this.selected[_320]){if(this.onCanDeselect(_320)===false){return;}var _321=this.grid.getRowNode(_320);if(_321){_314.set(_321,"aria-selected","false");}this._beginUpdate();delete this.selected[_320];this.onDeselected(_320);this._endUpdate();}},setSelected:function(_322,_323){this[(_323?"addToSelection":"deselect")](_322);},toggleSelect:function(_324){if(lang.isArray(_324)){_313.forEach(_324,this.toggleSelect,this);return;}this.setSelected(_324,!this.selected[_324]);},_range:function(_325,inTo,func){var s=(_325>=0?_325:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_326,inTo){this._range(_326,inTo,lang.hitch(this,"addToSelection"));},deselectRange:function(_327,inTo){this._range(_327,inTo,lang.hitch(this,"deselect"));},insert:function(_328){this.selected.splice(_328,0,false);if(this.selectedIndex>=_328){this.selectedIndex++;}},remove:function(_329){this.selected.splice(_329,1);if(this.selectedIndex>=_329){this.selectedIndex--;}},deselectAll:function(_32a){for(var i in this.selected){if((i!=_32a)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_32b,_32c,_32d){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_32b);}else{if(!_32d||this.rangeStartIndex<0){this.rangeStartIndex=_32b;}if(!_32c){this.deselectAll(_32b);}if(_32d){this.selectRange(this.rangeStartIndex,_32b);}else{if(_32c){this.toggleSelect(_32b);}else{this.addToSelection(_32b);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey);},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate();}});});},"dijit/_CssStateMixin":function(){define("dijit/_CssStateMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-class","dojo/has","dojo/_base/lang","dojo/on","dojo/ready","dojo/_base/window","./registry"],function(_32e,_32f,dom,_330,has,lang,on,_331,win,_332){var _333=_32f("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);_32e.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active","_opened"],function(attr){this.watch(attr,lang.hitch(this,"_setStateClass"));},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._trackMouseState(this.domNode,this.baseClass);this._setStateClass();},_cssMouseEvent:function(_334){if(!this.disabled){switch(_334.type){case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":case "touchstart":this._set("active",true);break;case "mouseup":case "touchend":this._set("active",false);break;}}},_setStateClass:function(){var _335=this.baseClass.split(" ");function _336(_337){_335=_335.concat(_32e.map(_335,function(c){return c+_337;}),"dijit"+_337);};if(!this.isLeftToRight()){_336("Rtl");}var _338=this.checked=="mixed"?"Mixed":(this.checked?"Checked":"");if(this.checked){_336(_338);}if(this.state){_336(this.state);}if(this.selected){_336("Selected");}if(this._opened){_336("Opened");}if(this.disabled){_336("Disabled");}else{if(this.readOnly){_336("ReadOnly");}else{if(this.active){_336("Active");}else{if(this.hovering){_336("Hover");}}}}if(this.focused){_336("Focused");}var tn=this.stateNode||this.domNode,_339={};_32e.forEach(tn.className.split(" "),function(c){_339[c]=true;});if("_stateClasses" in this){_32e.forEach(this._stateClasses,function(c){delete _339[c];});}_32e.forEach(_335,function(c){_339[c]=true;});var _33a=[];for(var c in _339){_33a.push(c);}tn.className=_33a.join(" ");this._stateClasses=_335;},_subnodeCssMouseEvent:function(node,_33b,evt){if(this.disabled||this.readOnly){return;}function _33c(_33d){_330.toggle(node,_33b+"Hover",_33d);};function _33e(_33f){_330.toggle(node,_33b+"Active",_33f);};function _340(_341){_330.toggle(node,_33b+"Focused",_341);};switch(evt.type){case "mouseover":_33c(true);break;case "mouseout":_33c(false);_33e(false);break;case "mousedown":case "touchstart":_33e(true);break;case "mouseup":case "touchend":_33e(false);break;case "focus":case "focusin":_340(true);break;case "blur":case "focusout":_340(false);break;}},_trackMouseState:function(node,_342){node._cssState=_342;}});_331(function(){function _343(evt){if(!dom.isDescendant(evt.relatedTarget,evt.target)){for(var node=evt.target;node&&node!=evt.relatedTarget;node=node.parentNode){if(node._cssState){var _344=_332.getEnclosingWidget(node);if(_344){if(node==_344.domNode){_344._cssMouseEvent(evt);}else{_344._subnodeCssMouseEvent(node,node._cssState,evt);}}}}}};function _345(evt){evt.target=evt.srcElement;_343(evt);};var body=win.body(),_346=(has("touch")?[]:["mouseover","mouseout"]).concat(["mousedown","touchstart","mouseup","touchend"]);_32e.forEach(_346,function(type){if(body.addEventListener){body.addEventListener(type,_343,true);}else{body.attachEvent("on"+type,_345);}});on(body,"focusin, focusout",function(evt){var node=evt.target;if(node._cssState&&!node.getAttribute("widgetId")){var _347=_332.getEnclosingWidget(node);_347._subnodeCssMouseEvent(node,node._cssState,evt);}});});return _333;});},"dojox/gfx/Mover":function(){define("dojox/gfx/Mover",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/on","dojo/touch","dojo/_base/event"],function(lang,arr,_348,on,_349,_34a){return _348("dojox.gfx.Mover",null,{constructor:function(_34b,e,host){this.shape=_34b;this.lastX=e.clientX;this.lastY=e.clientY;var h=this.host=host,d=document,_34c=on(d,_349.move,lang.hitch(this,"onFirstMove"));this.events=[on(d,_349.move,lang.hitch(this,"onMouseMove")),on(d,_349.release,lang.hitch(this,"destroy")),on(d,"dragstart",lang.hitch(_34a,"stop")),on(d,"selectstart",lang.hitch(_34a,"stop")),_34c];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){var x=e.clientX;var y=e.clientY;this.host.onMove(this,{dx:x-this.lastX,dy:y-this.lastY});this.lastX=x;this.lastY=y;_34a.stop(e);},onFirstMove:function(){this.host.onFirstMove(this);this.events.pop().remove();},destroy:function(){arr.forEach(this.events,function(_34d){_34d.remove();});var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.shape=null;}});});},"dojox/grid/_RowManager":function(){define("dojox/grid/_RowManager",["dojo/_base/declare","dojo/_base/lang","dojo/dom-class"],function(_34e,lang,_34f){var _350=function(_351,_352){if(_351.style.cssText==undefined){_351.setAttribute("style",_352);}else{_351.style.cssText=_352;}};return _34e("dojox.grid._RowManager",null,{constructor:function(_353){this.grid=_353;},linesToEms:2,overRow:-2,prepareStylingRow:function(_354,_355){return {index:_354,node:_355,odd:Boolean(_354&1),selected:!!this.grid.selection.isSelected(_354),over:this.isOver(_354),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_356,_357){var row=this.prepareStylingRow(_356,_357);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_358){var i=_358;i.node.className=i.customClasses;var h=i.node.style.height;_350(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_359){this.grid.updateRowStyles(_359);},setOverRow:function(_35a){var last=this.overRow;this.overRow=_35a;if((last!=this.overRow)&&(lang.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_35b){return (this.overRow==_35b&&!_34f.contains(this.grid.domNode,"dojoxGridColumnResizing"));}});});},"dojo/hccss":function(){define(["require","./_base/config","./dom-class","./dom-style","./has","./ready","./_base/window"],function(_35c,_35d,_35e,_35f,has,_360,win){has.add("highcontrast",function(){var div=win.doc.createElement("div");div.style.cssText="border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;"+"background-image: url("+(_35d.blankGif||_35c.toUrl("./resources/blank.gif"))+");";win.body().appendChild(div);var cs=_35f.getComputedStyle(div),_361=cs.backgroundImage,hc=(cs.borderTopColor==cs.borderRightColor)||(_361&&(_361=="none"||_361=="url(invalid-url:)"));if(has("ie")<=8){div.outerHTML="";}else{win.body().removeChild(div);}return hc;});_360(90,function(){if(has("highcontrast")){_35e.add(win.body(),"dj_a11y");}});return has;});},"dojo/dnd/Avatar":function(){define(["../_base/declare","../_base/window","../dom","../dom-attr","../dom-class","../dom-construct","../hccss","../query"],function(_362,win,dom,_363,_364,_365,has,_366){return _362("dojo.dnd.Avatar",null,{constructor:function(_367){this.manager=_367;this.construct();},construct:function(){var a=_365.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_368=this.manager.source,node,b=_365.create("tbody",null,a),tr=_365.create("tr",null,b),td=_365.create("td",null,tr),k=Math.min(5,this.manager.nodes.length),i=0;if(has("highcontrast")){_365.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td);}_365.create("span",{innerHTML:_368.generateText?this._generateText():""},td);_363.set(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_368.creator){node=_368._normalizedCreator(_368.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _369=_365.create("table"),_36a=_365.create("tbody",null,_369);_36a.appendChild(node);node=_369;}}node.id="";tr=_365.create("tr",null,b);td=_365.create("td",null,tr);td.appendChild(node);_363.set(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){_365.destroy(this.node);this.node=false;},update:function(){_364.toggle(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag);if(has("highcontrast")){var icon=dom.byId("a11yIcon");var text="+";if(this.manager.canDropFlag&&!this.manager.copy){text="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){text="o";}else{if(!this.manager.canDropFlag){text="x";}}}icon.innerHTML=text;}_366(("tr.dojoDndAvatarHeader td span"+(has("highcontrast")?" span":"")),this.node).forEach(function(node){node.innerHTML=this.manager.source.generateText?this._generateText():"";},this);},_generateText:function(){return this.manager.nodes.length.toString();}});});},"dojox/grid/_Scroller":function(){define("dojox/grid/_Scroller",["dijit/registry","dojo/_base/declare","dojo/_base/lang","./util","dojo/_base/html"],function(_36b,_36c,lang,util,html){var _36d=function(_36e){var i=0,n,p=_36e.parentNode;while((n=p.childNodes[i++])){if(n==_36e){return i-1;}}return -1;};var _36f=function(_370){if(!_370){return;}dojo.forEach(_36b.toArray(),function(w){if(w.domNode&&html.isDescendant(w.domNode,_370,true)){w.destroy();}});};var _371=function(_372){var node=html.byId(_372);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _373=function(_374,_375){var _376=[];var i=0,n;while((n=_374.childNodes[i])){i++;if(_371(n)==_375){_376.push(n);}}return _376;};var _377=function(_378){return _373(_378,"div");};return _36c("dojox.grid._Scroller",null,{constructor:function(_379){this.setContentNodes(_379);this.pageHeights=[];this.pageNodes=[];this.stack=[];},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(_37a,_37b,_37c){switch(arguments.length){case 3:this.rowsPerPage=_37c;case 2:this.keepRows=_37b;case 1:this.rowCount=_37a;default:break;}this.defaultPageHeight=(this.grid.rowHeight>0?this.grid.rowHeight:this.defaultRowHeight)*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=lang.hitch(this,"onscroll");}},_getPageCount:function(_37d,_37e){return _37d?(Math.ceil(_37d/_37e)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_37f){this.keepRows=_37f;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_380){this.contentNodes=_380;this.colCount=(this.contentNodes?this.contentNodes.length:0);this.pageNodes=[];for(var i=0;i<this.colCount;i++){this.pageNodes[i]=[];}},getDefaultNodes:function(){return this.pageNodes[0]||[];},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();this._invalidating=false;},updateRowCount:function(_381){this.invalidateNodes();this.rowCount=_381;var _382=this.pageCount;if(_382===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_382){for(var i=_382-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_382){this.height+=this.defaultPageHeight*(this.pageCount-_382-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_383){return Boolean(this.getDefaultPageNode(_383));},measurePage:function(_384){if(this.grid.rowHeight){return ((_384+1)*this.rowsPerPage>this.rowCount?this.rowCount-_384*this.rowsPerPage:this.rowsPerPage)*this.grid.rowHeight;}var n=this.getDefaultPageNode(_384);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_385,_386){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_385].style.top=_386+"px";}},repositionPages:function(_387){var _388=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=_388[_387];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_387):0);for(var p=_387+1;p<=last;p++){n=_388[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_389){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_389]);}},preparePage:function(_38a,_38b){var p=(_38b?this.popPage():null);for(var i=0;i<this.colCount;i++){var _38c=this.pageNodes[i];var _38d=(p===null?this.createPageNode():this.invalidatePageNode(p,_38c));_38d.pageIndex=_38a;_38c[_38a]=_38d;}},renderPage:function(_38e){var _38f=[];var i,j;for(i=0;i<this.colCount;i++){_38f[i]=this.pageNodes[i][_38e];}for(i=0,j=_38e*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_38f);}},removePage:function(_390){for(var i=0,j=_390*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_391){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_391,this.pageNodes[i]);if(n){html.destroy(n);}}},pacify:function(_392){},pacifying:false,pacifyTicks:200,setPacifying:function(_393){if(this.pacifying!=_393){this.pacifying=_393;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _394=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _394;},endPacify:function(){this.setPacifying(false);},resize:function(){if(this.scrollboxNode){this.windowHeight=this.scrollboxNode.clientHeight;}for(var i=0;i<this.colCount;i++){util.setStyleHeightPx(this.contentNodes[i],Math.max(1,this.height));}var _395=(!this._invalidating);if(!_395){var ah=this.grid.get("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_395=true;}}if(_395){this.needPage(this.page,this.pageTop);}var _396=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _397=this.getPageHeight(this.page);this.averageRowHeight=(_397>0&&_396>0)?(_397/_396):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _398=this.pageCount-1;var _399=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_398]=_399;return _399;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_39a,_39b,_39c){if(this.pageExists(_39a)){var oh=this.getPageHeight(_39a);var h=(this.measurePage(_39a));if(h===undefined){h=oh;}this.pageHeights[_39a]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.get("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_39b)){if(!_39c){this.grid.sizeChange();}else{var ns=this.grid.viewsNode.style;ns.height=parseInt(ns.height)+h-oh+"px";this.repositionPages(_39a);}}else{this.repositionPages(_39a);}}return h;}return 0;},rowHeightChanged:function(_39d,_39e){this.updatePageHeight(Math.floor(_39d/this.rowsPerPage),false,_39e);},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");html.attr(p,"role","presentation");p.style.position="absolute";p.style[this.grid.isLeftToRight()?"left":"right"]="0";return p;},getPageHeight:function(_39f){var ph=this.pageHeights[_39f];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_3a0){return this.stack.push(_3a0);},popPage:function(){return this.stack.shift();},findPage:function(_3a1){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_3a1){break;}}this.page=i;this.pageTop=h;},buildPage:function(_3a2,_3a3,_3a4){this.preparePage(_3a2,_3a3);this.positionPage(_3a2,_3a4);this.installPage(_3a2);this.renderPage(_3a2);this.pushPage(_3a2);},needPage:function(_3a5,_3a6){var h=this.getPageHeight(_3a5),oh=h;if(!this.pageExists(_3a5)){this.buildPage(_3a5,(!this.grid._autoHeight&&this.keepPages&&(this.stack.length>=this.keepPages)),_3a6);h=this.updatePageHeight(_3a5,true);}else{this.positionPage(_3a5,_3a6);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_3a7){this.grid.scrollTop=_3a7;if(this.colCount){this.startPacify();this.findPage(_3a7);var h=this.height;var b=this.getScrollBottom(_3a7);for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){y+=this.needPage(p,y);}this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,_3a7);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_3a8){return (this.windowHeight>=0?_3a8+this.windowHeight:-1);},processNodeEvent:function(e,_3a9){var t=e.target;while(t&&(t!=_3a9)&&t.parentNode&&(t.parentNode.parentNode!=_3a9)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_3a9)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_36d(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_3aa,_3ab){},removeRow:function(_3ac){},getDefaultPageNode:function(_3ad){return this.getDefaultNodes()[_3ad];},positionPageNode:function(_3ae,_3af){},getPageNodePosition:function(_3b0){return _3b0.offsetTop;},invalidatePageNode:function(_3b1,_3b2){var p=_3b2[_3b1];if(p){delete _3b2[_3b1];this.removePage(_3b1,p);_36f(p);p.innerHTML="";}return p;},getPageRow:function(_3b3){return _3b3*this.rowsPerPage;},getLastPageRow:function(_3b4){return Math.min(this.rowCount,this.getPageRow(_3b4+1))-1;},getFirstVisibleRow:function(_3b5,_3b6,_3b7){if(!this.pageExists(_3b5)){return 0;}var row=this.getPageRow(_3b5);var _3b8=this.getDefaultNodes();var rows=_377(_3b8[_3b5]);for(var i=0,l=rows.length;i<l&&_3b6<_3b7;i++,row++){_3b6+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_3b9,_3ba,_3bb){if(!this.pageExists(_3b9)){return 0;}var _3bc=this.getDefaultNodes();var row=this.getLastPageRow(_3b9);var rows=_377(_3bc[_3b9]);for(var i=rows.length-1;i>=0&&_3ba>_3bb;i--,row--){_3ba-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_3bd){var _3be=this.getDefaultNodes();var rows=_377(_3be[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_3bd){this.offset=h-(t-_3bd);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_3bf){var _3c0=Math.floor(_3bf/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_3c0;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.page=_3c0;this.needPage(_3c0,this.pageTop);var _3c1=this.getDefaultNodes();var rows=_377(_3c1[_3c0]);var r=_3bf-this.rowsPerPage*_3c0;for(i=0,l=rows.length;i<l&&i<r;i++){t+=rows[i].offsetHeight;}return t;},dummy:0});});},"url:esri/dijit/editing/templates/TemplatePicker.html":"<div class=\"templatePicker\">\r\n\r\n  <table dojoType=\"dojox.grid.DataGrid\" noDataMessage=\"${emptyMessage}\" selectionMode=\"none\" autoHeight=\"${_rows}\" autoWidth=\"${_autoWidth}\"\r\n         query=\"{ query: '*' }\" dojoAttachPoint=\"grid\" class=\"grid\">\r\n  </table>\r\n  \r\n</div>","dojo/data/util/filter":function(){define(["../../_base/lang"],function(lang){var _3c2={};lang.setObject("dojo.data.util.filter",_3c2);_3c2.patternToRegExp=function(_3c3,_3c4){var rxp="^";var c=null;for(var i=0;i<_3c3.length;i++){c=_3c3.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_3c3.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_3c4){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};return _3c2;});},"esri/toolbars/_GraphicMover":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/json","dojo/has","dojo/dom-style","dojox/gfx/Moveable","dojox/gfx/Mover","dojox/gfx/matrix","esri/kernel","esri/geometry/webMercatorUtils","esri/geometry/ScreenPoint"],function(_3c5,lang,_3c6,_3c7,has,_3c8,_3c9,_3ca,_3cb,_3cc,_3cd,_3ce){var GM=_3c5(null,{declaredClass:"esri.toolbars._GraphicMover",constructor:function(_3cf,map,_3d0){this.graphic=_3cf;this.map=map;this.toolbar=_3d0;this._enableGraphicMover();this._moved=false;},refresh:function(_3d1){var _3d2=this.graphic.getDojoShape();if(_3d2&&(_3d1||!_3d2._hostGraphic)){this._disableGraphicMover();this._enableGraphicMover();}},destroy:function(){this._disableGraphicMover();},hasMoved:function(){return this._moved;},_enableGraphicMover:function(){var _3d3=this.graphic,_3d4=_3d3.getDojoShape();if(_3d4){_3d4._hostGraphic=_3d3;this._moveable=new _3c9(_3d4,{mover:GM.Mover});this._moveStartHandle=_3c6.connect(this._moveable,"onMoveStart",this,this._moveStartHandler);this._firstMoveHandle=_3c6.connect(this._moveable,"onFirstMove",this,this._firstMoveHandler);this._movingHandle=_3c6.connect(this._moveable,"onMoving",this,this._movingHandler);this._moveStopHandle=_3c6.connect(this._moveable,"onMoveStop",this,this._moveStopHandler);var node=_3d4.getEventSource();if(node){_3c8.set(node,"cursor",this.toolbar._cursors.move);}}},_disableGraphicMover:function(){var _3d5=this._moveable;if(_3d5){_3c6.disconnect(this._moveStartHandle);_3c6.disconnect(this._firstMoveHandle);_3c6.disconnect(this._movingHandle);_3c6.disconnect(this._moveStopHandle);var _3d6=_3d5.shape;if(_3d6){_3d6._hostGraphic=null;var node=_3d6.getEventSource();if(node){_3c8.set(node,"cursor",null);}}_3d5.destroy();}this._moveable=null;},_moveStartHandler:function(){var _3d7=this.graphic,map=this.map;this._startTx=_3d7.getDojoShape().getTransform();if(this.graphic.geometry.type==="point"){if(map.snappingManager){map.snappingManager._setUpSnapping();}}this.toolbar.onGraphicMoveStart(_3d7);},_firstMoveHandler:function(){this.toolbar._beginOperation("MOVE");this.toolbar.onGraphicFirstMove(this.graphic);},_movingHandler:function(_3d8){this.toolbar.onGraphicMove(this.graphic,_3d8.shape.getTransform());},_moveStopHandler:function(_3d9){var _3da=this.graphic,_3db=this.toolbar,map=this.map,mx=_3cb,_3dc=_3db._geo?_3cd.geographicToWebMercator(_3da.geometry):_3da.geometry,type=_3dc.type,_3dd=_3da.getDojoShape(),tx=_3dd.getTransform();if(_3c7.toJson(tx)!==_3c7.toJson(this._startTx)){this._moved=true;switch(type){case "point":var _3de=[tx,mx.invert(this._startTx)],_3df;if(map.snappingManager){_3df=map.snappingManager._snappingPoint;}_3dc=_3df||map.toMap(mx.multiplyPoint(_3de,map.toScreen(_3dc,true)));if(map.snappingManager){map.snappingManager._killOffSnapping();}break;case "polyline":_3dc=this._updatePolyGeometry(_3dc,_3dc.paths,tx);break;case "polygon":_3dc=this._updatePolyGeometry(_3dc,_3dc.rings,tx);break;}_3dd.setTransform(null);_3da.setGeometry(_3db._geo?_3cd.webMercatorToGeographic(_3dc,true):_3dc);}else{this._moved=false;}_3db._endOperation("MOVE");_3db.onGraphicMoveStop(_3da,tx);if(!this._moved){var e=_3d9.__e,_3e0=this.map.position,pt=new _3ce(e.pageX-_3e0.x,e.pageY-_3e0.y);_3db.onGraphicClick(_3da,{screenPoint:pt,mapPoint:this.map.toMap(pt)});}},_updatePolyGeometry:function(_3e1,_3e2,_3e3){var map=this.map,_3e4=_3e1.getPoint(0,0),_3e5=map.toMap(map.toScreen(_3e4).offset(_3e3.dx,_3e3.dy)),_3e6=_3e5.x-_3e4.x,_3e7=_3e5.y-_3e4.y,i,j,seg,_3e8;for(i=0;i<_3e2.length;i++){seg=_3e2[i];for(j=0;j<seg.length;j++){_3e8=_3e1.getPoint(i,j);_3e1.setPoint(i,j,_3e8.offset(_3e6,_3e7));}}return _3e1;}});GM.Mover=_3c5(_3ca,{declaredClass:"esri.toolbars._Mover",constructor:function(_3e9,e,host){this.__e=e;}});if(has("extend-esri")){lang.setObject("toolbars._GraphicMover",GM,_3cc);lang.setObject("toolbars._Mover",GM.Mover,_3cc);}return GM;});},"dijit/_KeyNavContainer":function(){define("dijit/_KeyNavContainer",["dojo/_base/kernel","./_Container","./_FocusMixin","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/_base/event","dojo/dom-attr","dojo/_base/lang"],function(_3ea,_3eb,_3ec,_3ed,keys,_3ee,_3ef,_3f0,lang){return _3ee("dijit._KeyNavContainer",[_3ec,_3eb],{tabIndex:"0",connectKeyNavHandlers:function(_3f1,_3f2){var _3f3=(this._keyNavCodes={});var prev=lang.hitch(this,"focusPrev");var next=lang.hitch(this,"focusNext");_3ed.forEach(_3f1,function(code){_3f3[code]=prev;});_3ed.forEach(_3f2,function(code){_3f3[code]=next;});_3f3[keys.HOME]=lang.hitch(this,"focusFirstChild");_3f3[keys.END]=lang.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){_3ea.deprecated("startupKeyNavChildren() call no longer needed","","2.0");},startup:function(){this.inherited(arguments);_3ed.forEach(this.getChildren(),lang.hitch(this,"_startupChild"));},addChild:function(_3f4,_3f5){this.inherited(arguments);this._startupChild(_3f4);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusLastChild:function(){this.focusChild(this._getLastFocusableChild());},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1));},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),true);},focusChild:function(_3f6,last){if(!_3f6){return;}if(this.focusedChild&&_3f6!==this.focusedChild){this._onChildBlur(this.focusedChild);}_3f6.set("tabIndex",this.tabIndex);_3f6.focus(last?"end":"start");this._set("focusedChild",_3f6);},_startupChild:function(_3f7){_3f7.set("tabIndex","-1");this.connect(_3f7,"_onFocus",function(){_3f7.set("tabIndex",this.tabIndex);});this.connect(_3f7,"_onBlur",function(){_3f7.set("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode||this.focusedChild){return;}this.focusFirstChild();_3f0.set(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){_3f0.set(this.domNode,"tabIndex",this.tabIndex);}this.focusedChild=null;this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();_3ef.stop(evt);}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1);},_getNextFocusableChild:function(_3f8,dir){if(_3f8){_3f8=this._getSiblingOfChild(_3f8,dir);}var _3f9=this.getChildren();for(var i=0;i<_3f9.length;i++){if(!_3f8){_3f8=_3f9[(dir>0)?0:(_3f9.length-1)];}if(_3f8.isFocusable()){return _3f8;}_3f8=this._getSiblingOfChild(_3f8,dir);}return null;}});});},"dojox/grid/_Events":function(){define("dojox/grid/_Events",["dojo/keys","dojo/dom-class","dojo/_base/declare","dojo/_base/event","dojo/_base/sniff"],function(keys,_3fa,_3fb,_3fc,has){return _3fb("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(e){this.dispatchKeyEvent(e);},onContentEvent:function(e){this.dispatchContentEvent(e);},onHeaderEvent:function(e){this.dispatchHeaderEvent(e);},onStyleRow:function(_3fd){var i=_3fd;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_3fd);this.edit.styleRow(_3fd);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var _3fe;switch(e.keyCode){case keys.ESCAPE:this.edit.cancel();break;case keys.ENTER:if(!this.edit.isEditing()){_3fe=this.focus.getHeaderIndex();if(_3fe>=0){this.setSortIndex(_3fe);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}_3fc.stop(e);}if(!e.shiftKey){var _3ff=this.edit.isEditing();this.edit.apply();if(!_3ff){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _400=this.focus.focusView||this.views.views[0];_400.content.decorateEvent(e);this.onRowClick(e);_3fc.stop(e);}break;case keys.SPACE:if(!this.edit.isEditing()){_3fe=this.focus.getHeaderIndex();if(_3fe>=0){this.setSortIndex(_3fe);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}_3fc.stop(e);}break;case keys.TAB:this.focus[e.shiftKey?"previousKey":"nextKey"](e);break;case keys.LEFT_ARROW:case keys.RIGHT_ARROW:if(!this.edit.isEditing()){var _401=e.keyCode;_3fc.stop(e);_3fe=this.focus.getHeaderIndex();if(_3fe>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_3fe,(_401==keys.LEFT_ARROW?-1:1)*5);}else{var _402=(_401==keys.LEFT_ARROW)?1:-1;if(this.isLeftToRight()){_402*=-1;}this.focus.move(0,_402);}}break;case keys.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_3fc.stop(e);this.focus.move(-1,0);}break;case keys.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_3fc.stop(e);this.focus.move(1,0);}break;case keys.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_3fc.stop(e);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1){this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0);}}break;case keys.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_3fc.stop(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;default:break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){_3fa.add(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){_3fa.remove(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}if(this._click.length>1&&this._click[0]==null){this._click.shift();}this.onRowClick(e);},onCellDblClick:function(e){var _403;if(this._click.length>1&&has("ie")){_403=this._click[1];}else{if(this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex){_403=this._click[0];}else{_403=e;}}this.focus.setFocusCell(_403.cell,_403.rowIndex);this.onRowClick(_403);this.edit.setEditCell(_403.cell,_403.rowIndex);this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_404,_405){this.edit.cellFocus(_404,_405);},onRowClick:function(e){this.edit.rowClick(e);this.selection.clickSelectEvent(e);},onRowDblClick:function(e){},onRowMouseOver:function(e){},onRowMouseOut:function(e){},onRowMouseDown:function(e){},onRowContextMenu:function(e){_3fc.stop(e);},onHeaderMouseOver:function(e){},onHeaderMouseOut:function(e){},onHeaderCellMouseOver:function(e){if(e.cellNode){_3fa.add(e.cellNode,this.cellOverClass);}},onHeaderCellMouseOut:function(e){if(e.cellNode){_3fa.remove(e.cellNode,this.cellOverClass);}},onHeaderCellMouseDown:function(e){},onHeaderClick:function(e){},onHeaderCellClick:function(e){this.setSortIndex(e.cell.index);this.onHeaderClick(e);},onHeaderDblClick:function(e){},onHeaderCellDblClick:function(e){this.onHeaderDblClick(e);},onHeaderCellContextMenu:function(e){this.onHeaderContextMenu(e);},onHeaderContextMenu:function(e){if(!this.headerMenu){_3fc.stop(e);}},onStartEdit:function(_406,_407){},onApplyCellEdit:function(_408,_409,_40a){},onCancelEdit:function(_40b){},onApplyEdit:function(_40c){},onCanSelect:function(_40d){return true;},onCanDeselect:function(_40e){return true;},onSelected:function(_40f){this.updateRowStyles(_40f);},onDeselected:function(_410){this.updateRowStyles(_410);},onSelectionChanged:function(){}});});},"dojo/dnd/autoscroll":function(){define(["../_base/lang","../sniff","../_base/window","../dom-geometry","../dom-style","../window"],function(lang,has,win,_411,_412,_413){var _414={};lang.setObject("dojo.dnd.autoscroll",_414);_414.getViewport=_413.getBox;_414.V_TRIGGER_AUTOSCROLL=32;_414.H_TRIGGER_AUTOSCROLL=32;_414.V_AUTOSCROLL_VALUE=16;_414.H_AUTOSCROLL_VALUE=16;var _415,doc=win.doc,_416=Infinity,_417=Infinity;_414.autoScrollStart=function(d){doc=d;_415=_413.getBox(doc);var html=win.body(doc).parentNode;_416=Math.max(html.scrollHeight-_415.h,0);_417=Math.max(html.scrollWidth-_415.w,0);};_414.autoScroll=function(e){var v=_415||_413.getBox(doc),html=win.body(doc).parentNode,dx=0,dy=0;if(e.clientX<_414.H_TRIGGER_AUTOSCROLL){dx=-_414.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-_414.H_TRIGGER_AUTOSCROLL){dx=Math.min(_414.H_AUTOSCROLL_VALUE,_417-html.scrollLeft);}}if(e.clientY<_414.V_TRIGGER_AUTOSCROLL){dy=-_414.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-_414.V_TRIGGER_AUTOSCROLL){dy=Math.min(_414.V_AUTOSCROLL_VALUE,_416-html.scrollTop);}}window.scrollBy(dx,dy);};_414._validNodes={"div":1,"p":1,"td":1};_414._validOverflow={"auto":1,"scroll":1};_414.autoScrollNodes=function(e){var b,t,w,h,rx,ry,dx=0,dy=0,_418,_419;for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in _414._validNodes)){var s=_412.getComputedStyle(n),_41a=(s.overflow.toLowerCase() in _414._validOverflow),_41b=(s.overflowX.toLowerCase() in _414._validOverflow),_41c=(s.overflowY.toLowerCase() in _414._validOverflow);if(_41a||_41b||_41c){b=_411.getContentBox(n,s);t=_411.position(n,true);}if(_41a||_41b){w=Math.min(_414.H_TRIGGER_AUTOSCROLL,b.w/2);rx=e.pageX-t.x;if(has("webkit")||has("opera")){rx+=win.body().scrollLeft;}dx=0;if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}_418=n.scrollLeft;n.scrollLeft=n.scrollLeft+dx;}}if(_41a||_41c){h=Math.min(_414.V_TRIGGER_AUTOSCROLL,b.h/2);ry=e.pageY-t.y;if(has("webkit")||has("opera")){ry+=win.body().scrollTop;}dy=0;if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}_419=n.scrollTop;n.scrollTop=n.scrollTop+dy;}}if(dx||dy){return;}}try{n=n.parentNode;}catch(x){n=null;}}_414.autoScroll(e);};return _414;});},"dijit/Destroyable":function(){define("dijit/Destroyable",["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(_41d,_41e,_41f){return _41f("dijit.Destroyable",null,{destroy:function(_420){this._destroyed=true;},own:function(){_41d.forEach(arguments,function(_421){var _422="destroyRecursive" in _421?"destroyRecursive":"destroy" in _421?"destroy":"remove";var odh=_41e.before(this,"destroy",function(_423){_421[_422](_423);});var hdh=_41e.after(_421,_422,function(){odh.remove();hdh.remove();},true);},this);return arguments;}});});},"esri/layers/FeatureLayer":function(){define("esri/layers/FeatureLayer",["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/_base/Deferred","dojo/date/locale","dojo/sniff","dojo/io-query","dojo/dom-construct","dojo/i18n","esri/kernel","esri/lang","esri/request","esri/deferredUtils","esri/SpatialReference","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/symbols/jsonUtils","esri/renderers/SimpleRenderer","esri/renderers/UniqueValueRenderer","esri/renderers/jsonUtils","esri/tasks/QueryTask","esri/tasks/query","esri/tasks/FeatureSet","esri/geometry/Extent","esri/geometry/jsonUtils","esri/geometry/normalizeUtils","esri/layers/GraphicsLayer","esri/layers/Field","esri/layers/TimeInfo","esri/layers/FeatureType","esri/layers/FeatureTemplate","esri/layers/FeatureEditResult","esri/layers/SnapshotMode","esri/layers/OnDemandMode","esri/layers/SelectionMode","esri/layers/TrackManager","dojo/i18n!esri/nls/jsapi","dojo/has!extend-esri?esri/layers/agscommon"],function(_424,_425,lang,_426,_427,_428,_429,has,ioq,_42a,i18n,_42b,_42c,_42d,_42e,_42f,_430,_431,_432,_433,_434,_435,_436,_437,_438,_439,_43a,_43b,_43c,_43d,_43e,_43f,_440,_441,_442,_443,_444,_445,_446){var _447=_424(_43d,{declaredClass:"esri.layers.FeatureLayer",invalidParams:"query contains one or more unsupported parameters",_eventMap:{"add-attachment-complete":["result"],"before-apply-edits":["adds","updates","deletes"],"delete-attachments-complete":["results"],"edits-complete":["adds","updates","deletes"],"query-attachment-infos-complete":["results"],"query-count-complete":["count"],"query-features-complete":["featureSet"],"query-ids-complete":["objectIds"],"query-related-features-complete":["featureSets"],"selection-complete":["features","method"],"update-end":["error","info"]},constructor:function(url,_448){this.i18n=i18n.getLocalization("esri","jsapi");this._outFields=_448&&_448.outFields;this._loadCallback=_448&&_448.loadCallback;var _449=_448&&_448._usePatch;this._usePatch=(_449===null||_449===undefined)?true:_449;this._trackIdField=_448&&_448.trackIdField;this.objectIdField=_448&&_448.objectIdField;this._maxOffset=_448&&_448.maxAllowableOffset;this._optEditable=_448&&_448.editable;this._optAutoGen=_448&&_448.autoGeneralize;this.editSummaryCallback=_448&&_448.editSummaryCallback;this.userId=_448&&_448.userId;this.userIsAdmin=_448&&_448.userIsAdmin;this.useMapTime=(_448&&_448.hasOwnProperty("useMapTime"))?(!!_448.useMapTime):true;this.source=_448&&_448.source;this.gdbVersion=_448&&_448.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var ctor=this.constructor,mode=this.mode=(_42c.isDefined(_448&&_448.mode)?_448.mode:ctor.MODE_ONDEMAND);switch(mode){case ctor.MODE_SNAPSHOT:this._mode=new _443(this);this._isSnapshot=true;break;case ctor.MODE_ONDEMAND:this._tileWidth=(_448&&_448.tileWidth)||512;this._tileHeight=(_448&&_448.tileHeight)||512;this._mode=new _444(this);var _44a=_448&&_448.latticeTiling;this.latticeTiling=_44a;break;case ctor.MODE_SELECTION:this._mode=new _445(this);this._isSelOnly=true;break;}this._initLayer=lang.hitch(this,this._initLayer);this._selectHandler=lang.hitch(this,this._selectHandler);this._editable=false;if(lang.isObject(url)&&url.layerDefinition){var json=url;this._collection=true;this.mode=ctor.MODE_SNAPSHOT;this._initLayer(json);return this;}this._task=new _437(this.url,{source:this.source,gdbVersion:this.gdbVersion});var _44b=this._url.path;this._fserver=false;if(_44b.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _44c=_448&&_448.resourceInfo;if(_44c){this._initLayer(_44c);}else{if(this.source){var _44d={source:this.source.toJson()};this._url.query=lang.mixin(this._url.query,{layer:_427.toJson(_44d)});}if(this.gdbVersion){this._url.query=lang.mixin(this._url.query,{gdbVersion:this.gdbVersion});}_42d({url:_44b,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}this.registerConnectEvents();},_initLayer:function(_44e,io){if(_44e||io){this._json=_44e;this._findCredential();var ssl=(this.credential&&this.credential.ssl)||(_44e&&_44e._ssl);if(ssl){this._useSSL();this._task._useSSL();}if(this._collection){this._mode=new _443(this);this._isSnapshot=true;this._featureSet=_44e.featureSet;this._nextId=_44e.nextObjectId;_44e=_44e.layerDefinition;}if(_44e.hasOwnProperty("capabilities")){var _44f=(this.capabilities=_44e.capabilities);if(_44f&&_44f.toLowerCase().indexOf("editing")!==-1){this._editable=true;}else{this._editable=false;}}else{if(!this._collection){this._editable=this._fserver;}}if(_42c.isDefined(this._optEditable)){this._editable=this._optEditable;delete this._optEditable;}this._json=_427.toJson(this._json);if(this.isEditable()){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_44e.geometryType==="esriGeometryPolyline")||(_44e.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_42c.isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}var _450=_44e.effectiveMinScale||_44e.minScale,_451=_44e.effectiveMaxScale||_44e.maxScale;if(!this._hasMin&&_450){this.setMinScale(_450);}if(!this._hasMax&&_451){this.setMaxScale(_451);}this.layerId=_44e.id;this.name=_44e.name;this.description=_44e.description;this.copyright=_44e.copyrightText;this.type=_44e.type;this.geometryType=_44e.geometryType;this.displayField=_44e.displayField;this.defaultDefinitionExpression=_44e.definitionExpression;this.fullExtent=new _43a(_44e.extent);this.initialExtent=new _43a(this.fullExtent.toJson());if(this.fullExtent.spatialReference){this.spatialReference=new _42f(this.fullExtent.spatialReference.toJson());}this.defaultVisibility=_44e.defaultVisibility;if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_44e.indexedFields;this.maxRecordCount=_44e.maxRecordCount;this.canModifyLayer=_44e.canModifyLayer;this.supportsStatistics=_44e.supportsStatistics;this.supportsAdvancedQueries=_44e.supportsAdvancedQueries;this.hasLabels=_44e.hasLabels;this.canScaleSymbols=_44e.canScaleSymbols;this.supportsRollbackOnFailure=_44e.supportsRollbackOnFailure;this.syncCanReturnChanges=_44e.syncCanReturnChanges;this.isDataVersioned=_44e.isDataVersioned;this.editFieldsInfo=_44e.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_44e.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_44e.relationships;this.allowGeometryUpdates=_42c.isDefined(_44e.allowGeometryUpdates)?_44e.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _452=(this.fields=[]),_453=_44e.fields,i;for(i=0;i<_453.length;i++){_452.push(new _43e(_453[i]));}if(!this.objectIdField){this.objectIdField=_44e.objectIdField;if(!this.objectIdField){_453=_44e.fields;for(i=0;i<_453.length;i++){var _454=_453[i];if(_454.type==="esriFieldTypeOID"){this.objectIdField=_454.name;break;}}}if(!this.objectIdField){console.debug("esri.layers.FeatureLayer: "+_42c.substitute({url:this.url},"objectIdField is not set [url: ${url}]"));}}if(!_42c.isDefined(this._nextId)){var _455=this.objectIdField,_456=-1;if(this._collection&&_455){var fset=this._featureSet,_457=fset&&fset.features,il=_457?_457.length:0,oid,attr;for(i=0;i<il;i++){attr=_457[i].attributes;oid=attr&&attr[_455];if(oid>_456){_456=oid;}}}this._nextId=(_456+1);}this.globalIdField=_44e.globalIdField;var _458=(this.typeIdField=_44e.typeIdField),_459;if(_458){_459=!this._getField(_458)&&this._getField(_458,true);if(_459){this.typeIdField=_459.name;}}this.visibilityField=_44e.visibilityField;var _45a=_44e.defaultSymbol;if(_45a){this.defaultSymbol=_433.fromJson(_45a);}var _45b=this.types=[],_45c=_44e.types,_45d,_45e,_45f,_460=this.editFieldsInfo,_461=_460&&_460.creatorField,_462=_460&&_460.editorField,fix=(_461||_462),_463=[];if(_45c){for(i=0;i<_45c.length;i++){_45d=new _440(_45c[i]);_45e=_45d.templates;if(fix&&_45e&&_45e.length){_463=_463.concat(_45e);}_45b.push(_45d);}}var _464=_44e.templates,_465,_466=this.templates=[];if(_464){for(i=0;i<_464.length;i++){_465=new _441(_464[i]);if(fix){_463.push(_465);}_466.push(_465);}}for(i=0;i<_463.length;i++){_45f=lang.getObject("prototype.attributes",false,_463[i]);if(_45f){if(_461){delete _45f[_461];}if(_462){delete _45f[_462];}}}var _467=_44e.timeInfo;if(_467){this.timeInfo=new _43f(_467);this._startTimeField=_467.startTimeField;this._endTimeField=_467.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_467.trackIdField=this._trackIdField;}else{this._trackIdField=_467.trackIdField;}}this.hasAttachments=(!this._collection&&_44e.hasAttachments)?true:false;this.htmlPopupType=_44e.htmlPopupType;var _468=_44e.drawingInfo,_469;if(!this.renderer){if(_468&&_468.renderer){_469=_468.renderer;this.setRenderer(_436.fromJson(_469));if(_469.type==="classBreaks"){this.renderer.setMaxInclusive(true);}if(!this._collection){var _46a=_469.type,_46b=[];_469=this.renderer;switch(_46a){case "simple":_46b.push(_469.symbol);break;case "uniqueValue":case "classBreaks":_46b.push(_469.defaultSymbol);_46b=_46b.concat(_426.map(_469.infos,function(info){return info.symbol;}));break;}_46b=_426.filter(_46b,_42c.isDefined);var _46c=this._url.path+"/images/",_46d=this._getToken();_426.forEach(_46b,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_46c+url;}if(_46d&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+_46d);}}});}}else{if(_45a){_45c=this.types;if(_45c.length>0){_469=new _435(this.defaultSymbol,this.typeIdField);_426.forEach(_45c,function(type){_469.addValue(type.id,type.symbol);});}else{_469=new _434(this.defaultSymbol);}this.setRenderer(_469);}else{if(!this._isTable){var _46e;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_46e=new _430();break;case "esriGeometryPolyline":_46e=new _431();break;case "esriGeometryPolygon":_46e=new _432();break;}this.setRenderer(_46e?new _434(_46e):null);}}}}var _46f=(_468&&_468.transparency)||0;if(!_42c.isDefined(this.opacity)&&_46f>0){this.opacity=1-(_46f/100);}this.version=_44e.currentVersion;if(!this.version){var ver;if("capabilities" in _44e||"drawingInfo" in _44e||"hasAttachments" in _44e||"htmlPopupType" in _44e||"relationships" in _44e||"timeInfo" in _44e||"typeIdField" in _44e||"types" in _44e){ver=10;}else{ver=9.3;}this.version=ver;}if((has("ie")||has("safari"))&&this.isEditable()&&this.version<10.02){this._ts=true;}this.loaded=true;this._fixRendererFields();this._checkFields();this._updateCaps();var _470=function(){this.onLoad(this);var _471=this._loadCallback;if(_471){delete this._loadCallback;_471(this);}};if(this._collection){this._fireUpdateStart();var _472=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new _439(_472));this._fcAdded=true;_470.call(this);}else{this._forceIdentity(_470);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _473=this.renderer;if(_473){this._ager=(_473.declaredClass.indexOf("TemporalRenderer")!==-1&&_473.observationAger&&_473.observationRenderer);var _474=_426.filter([_473,_473.observationRenderer,_473.latestObservationRenderer,_473.trackRenderer],_42c.isDefined);var _475=[];_426.forEach(_474,function(rnd){if(!lang.isFunction(rnd.attributeField)){_475.push(rnd.attributeField);}_475.push(rnd.attributeField2);_475.push(rnd.attributeField3);},this);this._rendererFields=_426.filter(_475,_42c.isDefined);}else{this._ager=false;this._rendererFields=[];}if(this.loaded&&this._rendererFields.length>0){this._fixRendererFields();this._checkFields(this._rendererFields);}if(this.loaded&&this._collection){this._typesDirty=true;}},_setMap:function(map){var div=this.inherited(arguments),mode=this._mode;if(mode){mode.initialize(map);}return div;},_unsetMap:function(map){var mode=this._mode;if(mode){mode.suspend();}if(this._trackManager){this._trackManager.destroy();this._trackManager=null;}_425.disconnect(this._zoomConnect);this._zoomConnect=null;this._toggleTime(false);this.inherited("_unsetMap",arguments);},refresh:function(){var mode=this._mode;if(mode){mode.refresh();}},getOutFields:function(){return _426.filter(this._getOutFields(),function(_476){return (_476==="*"||!!this._getField(_476));},this);},setEditable:function(_477){if(!this._collection){console.log("FeatureLayer:setEditable - this functionality is not yet supported for layer in a feature service");return this;}if(!this.loaded){this._optEditable=_477;return this;}var _478=this._editable;this._editable=_477;this._updateCaps();if(_478!==_477){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_479){var _47a={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this.isEditable()){return _47a;}var _47b=_479&&_479.feature,_47c=_479&&_479.userId,caps=_426.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),lang.trim),_47d=_426.indexOf(caps,"editing")>-1,_47e=_47d&&(_426.indexOf(caps,"create")>-1),_47f=_47d&&(_426.indexOf(caps,"update")>-1),_480=_47d&&(_426.indexOf(caps,"delete")>-1),_481=this.ownershipBasedAccessControlForFeatures,_482=this.editFieldsInfo,_483=_482&&_482.creatorField,_484=_482&&_482.realm,_485=_47b&&_47b.attributes,_486=(_485&&_483)?_485[_483]:undefined,_487,_488=!!this.userIsAdmin,_489=!_481||_488||!!(_481.allowOthersToUpdate||_481.allowUpdateToOthers),_48a=!_481||_488||!!(_481.allowOthersToDelete||_481.allowDeleteToOthers);if(_488||(_47d&&!(_47e||_47f||_480))){_47e=_47f=_480=true;}_487={"canCreate":_47e,"canUpdate":_47f,"canDelete":_480};if(_486===null){_487.canUpdate=_47f&&_489;_487.canDelete=_480&&_48a;}else{if(_486===""){return _487;}else{if(_486){_47c=_47c||this.getUserId();if(_47c&&_484){_47c=_47c+"@"+_484;}if(_47c.toLowerCase()===_486.toLowerCase()){return _487;}else{_487.canUpdate=_47f&&_489;_487.canDelete=_480&&_48a;}}}}return _487;},getUserId:function(){var _48b;if(this.loaded){_48b=(this.credential&&this.credential.userId)||this.userId||"";}return _48b;},setUserIsAdmin:function(_48c){this.userIsAdmin=_48c;},setEditSummaryCallback:function(_48d){this.editSummaryCallback=_48d;},getEditSummary:function(_48e,_48f,_490){_490=_42c.isDefined(_490)?_490:(new Date()).getTime();var _491="",info=this.getEditInfo(_48e,_48f,_490),_492=(_48f&&_48f.callback)||this.editSummaryCallback;if(_492){info=_492(_48e,info)||"";}if(lang.isString(info)){_491=info;}else{if(info){var _493=info.action,_494=info.userId,_495=info.timeValue,_496=0;if(_493){_496++;}if(_494){_496++;}if(_42c.isDefined(_495)){_496++;}if(_496>1){_491=(_493==="edit"?"edit":"create")+(_494?"User":"")+(_42c.isDefined(_495)?info.displayPattern:"");}}_491=_491&&_42c.substitute(info,this.i18n.layers.FeatureLayer[_491]);}return _491;},getEditInfo:function(_497,_498,_499){if(!this.loaded){return;}_499=_42c.isDefined(_499)?_499:(new Date()).getTime();var _49a=(_498&&_498.action)||"last",_49b=this.editFieldsInfo,_49c=_49b&&_49b.creatorField,_49d=_49b&&_49b.creationDateField,_49e=_49b&&_49b.editorField,_49f=_49b&&_49b.editDateField,_4a0=_49b&&_49b.realm,_4a1=_497&&_497.attributes,_4a2=(_4a1&&_49c)?_4a1[_49c]:undefined,_4a3=(_4a1&&_49d)?_4a1[_49d]:null,_4a4=(_4a1&&_49e)?_4a1[_49e]:undefined,_4a5=(_4a1&&_49f)?_4a1[_49f]:null,_4a6=this._getEditData(_4a2,_4a3,_499),_4a7=this._getEditData(_4a4,_4a5,_499),_4a8;switch(_49a){case "creation":_4a8=_4a6;break;case "edit":_4a8=_4a7;break;case "last":_4a8=_4a7||_4a6;break;}if(_4a8){_4a8.action=(_4a8===_4a7)?"edit":"creation";}return _4a8;},_getEditData:function(_4a9,_4aa,_4ab){var data,_4ac,_4ad,_4ae=60000,_4af=3600000,_4b0=2*_4af,_4b1=24*_4af,_4b2=7*_4b1;if(_42c.isDefined(_4aa)){_4ac=_4ab-_4aa;if(_4ac<0){_4ad="Full";}else{if(_4ac<_4ae){_4ad="Seconds";}else{if(_4ac<(2*_4ae)){_4ad="Minute";}else{if(_4ac<_4af){_4ad="Minutes";}else{if(_4ac<_4b0){_4ad="Hour";}else{if(_4ac<_4b1){_4ad="Hours";}else{if(_4ac<_4b2){_4ad="WeekDay";}else{_4ad="Full";}}}}}}}}if((_4a9!==undefined)||_4ad){data=data||{};data.userId=_4a9;if(_4ad){var _4b3=_429.format,_4b4=new Date(_4aa);data.minutes=Math.floor(_4ac/_4ae);data.hours=Math.floor(_4ac/_4af);data.weekDay=_4b3(_4b4,{datePattern:"EEEE",selector:"date"});data.formattedDate=_4b3(_4b4,{selector:"date"});data.formattedTime=_4b3(_4b4,{selector:"time"});data.displayPattern=_4ad;data.timeValue=_4aa;}}return data;},isEditable:function(){return !!(this._editable||this.userIsAdmin);},setMaxAllowableOffset:function(_4b5){if(!this.isEditable()){this._maxOffset=_4b5;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_4b6){if(!this.loaded){this._optAutoGen=_4b6;}else{if(!this.isEditable()&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_4b6;if(_4b6){var map=this._map;if(map&&map.loaded){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}else{delete this._maxOffset;}}}return this;},setGDBVersion:function(_4b7){if(!this._collection&&(_4b7!==this.gdbVersion)&&(_4b7||this.gdbVersion)){this.gdbVersion=_4b7;this._task.gdbVersion=_4b7;this._url.query=lang.mixin(this._url.query,{gdbVersion:_4b7});if(this.loaded){this.clearSelection();if(this._map){this.refresh();}}this.onGDBVersionChange();}return this;},setDefinitionExpression:function(expr){this._defnExpr=expr;var mode=this._mode;if(mode){mode.propertyChangeHandler(1);}return this;},getDefinitionExpression:function(){return this._defnExpr;},setTimeDefinition:function(_4b8){if(this._isSnapshot){this._timeDefn=_4b8;var mode=this._mode;if(mode){mode.propertyChangeHandler(2);}}else{console.log("FeatureLayer.setTimeDefinition: layer in on-demand or selection mode does not support time definitions. Layer id = "+this.id+", Layer URL = "+this.url);}return this;},getTimeDefinition:function(){return this._timeDefn;},setTimeOffset:function(_4b9,_4ba){this._timeOffset=_4b9;this._timeOffsetUnits=_4ba;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}return this;},setUseMapTime:function(use){this.useMapTime=use;this._toggleTime(!this.suspended);var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},selectFeatures:function(_4bb,_4bc,_4bd,_4be){_4bc=_4bc||this.constructor.SELECTION_NEW;var _4bf=this._getShallowClone(_4bb),map=this._map,_4c0,dfd=_42e._fixDfd(new _428(_42e._dfdCanceller));_4bf.outFields=this.getOutFields();_4bf.returnGeometry=true;if(map){_4bf.outSpatialReference=new _42f(map.spatialReference.toJson());}if(!this._applyQueryFilters(_4bf)){_4c0={features:[]};this._selectHandler(_4c0,_4bc,_4bd,_4be,dfd);return dfd;}var _4c1=this._canDoClientSideQuery(_4bf);if(_4c1){_4c0={features:this._doQuery(_4bf,_4c1)};this._selectHandler(_4c0,_4bc,_4bd,_4be,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+this.invalidParams);this._resolve([err],null,_4be,dfd,true);return dfd;}var self=this;if(this._ts){_4bf._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_4bf);temp.addCallbacks(function(_4c2){self._selectHandler(_4c2,_4bc,_4bd,_4be,dfd);},function(err){self._resolve([err],null,_4be,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _4c3=this._selectedFeatures,_4c4=[],item;for(item in _4c3){if(_4c3.hasOwnProperty(item)){_4c4.push(_4c3[item]);}}return _4c4;},clearSelection:function(_4c5){var _4c6=this._selectedFeatures,mode=this._mode,item;for(item in _4c6){if(_4c6.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_4c5){this.onSelectionClear();}return this;},setSelectionSymbol:function(_4c7){this._selectionSymbol=_4c7;if(_4c7){var _4c8=this._selectedFeatures,item;for(item in _4c8){if(_4c8.hasOwnProperty(item)){_4c8[item].setSymbol(_4c7);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_4c9,_4ca,_4cb,_4cc,_4cd){var _4ce=_4cd.assembly,dfd=_4cd.dfd;this._applyNormalized(adds,_4ce&&_4ce[0]);this._applyNormalized(_4c9,_4ce&&_4ce[1]);this.onBeforeApplyEdits(adds,_4c9,_4ca);var i,_4cf={},_4d0=this.objectIdField,_4d1={f:"json"},_4d2=false;if(this._collection){var _4d3={};_4d3.addResults=adds?_426.map(adds,function(){_4d2=true;return {objectId:this._nextId++,success:true};},this):null;_4d3.updateResults=_4c9?_426.map(_4c9,function(_4d4){_4d2=true;var oid=_4d4.attributes[_4d0];_4cf[oid]=_4d4;return {objectId:oid,success:true};},this):null;_4d3.deleteResults=_4ca?_426.map(_4ca,function(_4d5){_4d2=true;return {objectId:_4d5.attributes[_4d0],success:true};},this):null;if(_4d2){this._editHandler(_4d3,adds,_4cf,_4cb,_4cc,dfd);}return;}if(adds&&adds.length>0){_4d1.adds=this._convertFeaturesToJson(adds,0,1);_4d2=true;}if(_4c9&&_4c9.length>0){for(i=0;i<_4c9.length;i++){var _4d6=_4c9[i];_4cf[_4d6.attributes[_4d0]]=_4d6;}_4d1.updates=this._convertFeaturesToJson(_4c9,0,0,1);_4d2=true;}if(_4ca&&_4ca.length>0){var ids=[];for(i=0;i<_4ca.length;i++){ids.push(_4ca[i].attributes[_4d0]);}_4d1.deletes=ids.join(",");_4d2=true;}if(_4d2){var self=this;return _42d({url:this._url.path+"/applyEdits",content:lang.mixin(_4d1,this._url.query),callbackParamName:"callback",load:function(_4d7){self._editHandler(_4d7,adds,_4cf,_4cb,_4cc,dfd);},error:function(err){self._resolve([err],null,_4cc,dfd,true);}},{usePost:true});}},queryFeatures:function(_4d8,_4d9,_4da){return this._query("execute","onQueryFeaturesComplete",_4d8,_4d9,_4da);},queryRelatedFeatures:function(_4db,_4dc,_4dd){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",_4db,_4dc,_4dd);},queryIds:function(_4de,_4df,_4e0){return this._query("executeForIds","onQueryIdsComplete",_4de,_4df,_4e0);},queryCount:function(_4e1,_4e2,_4e3){return this._query("executeForCount","onQueryCountComplete",_4e1,_4e2,_4e3);},queryAttachmentInfos:function(_4e4,_4e5,_4e6){var url=this._url.path+"/"+_4e4+"/attachments",dfd=new _428(_42e._dfdCanceller),self=this;dfd._pendingDfd=_42d({url:url,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_4e7){var _4e8=_4e7.attachmentInfos,_4e9;_426.forEach(_4e8,function(info){_4e9=ioq.objectToQuery({gdbVersion:self._url.query&&self._url.query.gdbVersion,layer:self._url.query&&self._url.query.layer,token:self._getToken()});info.url=url+"/"+info.id+(_4e9?("?"+_4e9):"");info.objectId=_4e4;});self._resolve([_4e8],"onQueryAttachmentInfosComplete",_4e5,dfd);},error:function(err){self._resolve([err],null,_4e6,dfd,true);}});return dfd;},addAttachment:function(_4ea,_4eb,_4ec,_4ed){return this._sendAttachment("add",_4ea,_4eb,_4ec,_4ed);},updateAttachment:function(_4ee,_4ef,_4f0,_4f1,_4f2){_4f0.appendChild(_42a.create("input",{type:"hidden",name:"attachmentId",value:_4ef}));return this._sendAttachment("update",_4ee,_4f0,_4f1,_4f2);},deleteAttachments:function(_4f3,_4f4,_4f5,_4f6){var url=this._url.path+"/"+_4f3+"/deleteAttachments",dfd=new _428(_42e._dfdCanceller),self=this,_4f7={f:"json",attachmentIds:_4f4.join(",")};dfd._pendingDfd=_42d({url:url,content:lang.mixin(_4f7,this._url.query),callbackParamName:"callback",load:lang.hitch(this,function(_4f8){var _4f9=_4f8.deleteAttachmentResults;_4f9=_426.map(_4f9,function(_4fa){var res=new _442(_4fa);res.attachmentId=res.objectId;res.objectId=_4f3;return res;});self._resolve([_4f9],"onDeleteAttachmentsComplete",_4f5,dfd);}),error:function(err){self._resolve([err],null,_4f6,dfd,true);}},{usePost:true});return dfd;},addType:function(_4fb){var _4fc=this.types;if(_4fc){var _4fd=_426.some(_4fc,function(type){if(type.id==_4fb.id){return true;}return false;});if(_4fd){return false;}else{_4fc.push(_4fb);}}else{this.types=[_4fb];}this._typesDirty=true;return true;},deleteType:function(_4fe){if(!this._collection){return;}var _4ff=this.types;if(_4ff){var _500=-1;_426.some(_4ff,function(type,_501){if(type.id==_4fe){_500=_501;return true;}return false;});if(_500>-1){this._typesDirty=true;return _4ff.splice(_500,1)[0];}}},toJson:function(){var _502=this._json,json=lang.isString(_502)?_427.fromJson(_502):lang.clone(_502);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _503=json.layerDefinition,_504=this._collection;if(_504&&this._typesDirty){_503.types=_426.map(this.types||[],function(type){return type.toJson();});var _505=this.renderer,_506=_503.drawingInfo;if(_506&&_505&&_505.declaredClass.indexOf("TemporalRenderer")===-1){_506.renderer=_505.toJson();}}var _507=null;if(!(_504&&!this._fcAdded)){_507={geometryType:_503.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=lang.mixin({},json.featureSet||{},_507);if(_504){json.nextObjectId=this._nextId;_503.capabilities=this.capabilities;}return json;},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},onQueryCountComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},_forceIdentity:function(_508){var self=this,path=this._url&&this._url.path;if((this.ownershipBasedAccessControlForFeatures||this.userIsAdmin)&&!this._getToken()&&path&&_42b.id&&_42b.id._hasPortalSession()&&_42b.id._doPortalSignIn(path)){_42b.id.getCredential(path).then(function(){self._findCredential();_508.call(self);},function(){_508.call(self);});}else{_508.call(this);}},_updateCaps:function(){var _509=this._editable,_50a=lang.trim(this.capabilities||""),_50b=_426.map((_50a?_50a.split(","):[]),lang.trim),caps=_426.map((_50a?_50a.toLowerCase().split(","):[]),lang.trim),_50c=_426.indexOf(caps,"editing"),cap,i,_50d,_50e={"Create":_426.indexOf(caps,"create"),"Update":_426.indexOf(caps,"update"),"Delete":_426.indexOf(caps,"delete")};if(_509&&_50c===-1){_50b.push("Editing");}else{if(!_509&&_50c>-1){_50d=[_50c];for(cap in _50e){if(_50e[cap]>-1){_50d.push(_50e[cap]);}}_50d.sort();for(i=_50d.length-1;i>=0;i--){_50b.splice(_50d[i],1);}}}this.capabilities=_50b.join(",");},_counter:{value:0},_getUniqueId:function(){return this._counter.value++;},onSuspend:function(){this.inherited(arguments);this._toggleTime(false);var mode=this._mode;if(mode){mode.suspend();}},onResume:function(evt){this.inherited(arguments);this._toggleTime(true);this._updateMaxOffset();var mode=this._mode,map=this._map,_50f=this.renderer;if(evt.firstOccurrence){this.clearSelection();if(this.timeInfo){if(this._trackIdField||(_50f&&(_50f.latestObservationRenderer||_50f.trackRenderer))){this._trackManager=new _446(this);this._trackManager.initialize(map);}}this._zoomConnect=_425.connect(map,"onZoomEnd",this,this._updateMaxOffset);}if(mode){evt.firstOccurrence?mode.startup():mode.resume();}},_updateMaxOffset:function(){var map=this._map;if(map&&map.loaded){if(this._autoGeneralize){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}},_toggleTime:function(_510){var map=this._map;if(_510&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=_425.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;_425.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_511){this._mapTimeExtent=_511;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_512){var _513=this._timeOffset,_514=this._timeOffsetUnits;return (_512&&_513&&_514)?_512.offset(-1*_513,_514):_512;},_getTimeOverlap:function(_515,_516){if(_515&&_516){return _515.intersection(_516);}else{return _515||_516;}},_getTimeFilter:function(_517){var _518=this.getTimeDefinition(),_519=null,_51a;if(_518||_519){_51a=this._getTimeOverlap(_518,_519);if(!_51a){return [false];}}if(_517){_517=_51a?this._getTimeOverlap(_517,_51a):_517;if(!_517){return [false];}}else{_517=_51a;}return [true,_517];},_getAttributeFilter:function(_51b){var _51c=this.getDefinitionExpression();if(_51b){_51b=_51c?"("+_51c+") AND ("+_51b+")":_51b;}else{_51b=_51c;}return _51b;},_applyQueryFilters:function(_51d){_51d.where=this._getAttributeFilter(_51d.where);_51d.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _51e=this._getTimeFilter(_51d.timeExtent);if(!_51e[0]){return false;}else{_51d.timeExtent=_51e[1];}}return true;},_add:function(_51f){var _520=this._selectionSymbol,attr=_51f.attributes,_521=this.visibilityField;if(_520&&this._isSelOnly){_51f.setSymbol(_520);}if(_521&&attr&&attr.hasOwnProperty(_521)){_51f[attr[_521]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(_522){var _523=[],map=this._map;if(this._isTable||!map){return;}if(_522.text||(_522.where&&_522.where!==this.getDefinitionExpression())){return;}var _524=this._isSnapshot,_525=this._isSelOnly;var _526=_522.geometry;if(_526){if(!_525&&_522.spatialRelationship===_438.SPATIAL_REL_INTERSECTS&&(_526.type==="extent"&&(_524||map.extent.contains(_526)))){_523.push(1);}else{return;}}var ids=_522.objectIds;if(ids){if(_524){_523.push(2);}else{var len=ids.length,mode=this._mode,_527=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_527++;}}if(_527===len){_523.push(2);}else{return;}}}if(this.timeInfo){var _528=_522.timeExtent,_529=this._mapTimeExtent;if(_524){if(_528){_523.push(3);}}else{if(_525){if(_528){return;}}else{if(_529){if(_426.indexOf(_523,2)!==-1){if(_528){_523.push(3);}}else{return;}}else{if(_523.length>0){if(_528){_523.push(3);}}else{if(_528){return;}}}}}}return _523.length>0?_523:null;},_doQuery:function(_52a,_52b,_52c){var _52d=[],mode=this._mode,_52e=this.objectIdField,i,len,_52f;if(_426.indexOf(_52b,2)!==-1){_52d=[];var ids=_52a.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_52d.push(obj);}}if(_52d.length===0){return [];}}if(_426.indexOf(_52b,1)!==-1){_52f=_52d.length>0?_52d:this.graphics;len=_52f.length;var _530=_52a.geometry._normalize(null,true);_52d=[];for(i=0;i<len;i++){var _531=_52f[i],_532=_531.geometry;if(_532){if(this.normalization&&_530.length){if(_530[0].intersects(_532)||_530[1].intersects(_532)){_52d.push(_531);}}else{if(_530.intersects(_532)){_52d.push(_531);}}}}if(_52d.length===0){return [];}}if(_426.indexOf(_52b,3)!==-1){if(this.timeInfo){_52f=_52d.length>0?_52d:this.graphics;var time=_52a.timeExtent,_533=this._filterByTime(_52f,time.startTime,time.endTime);_52d=_533.match;}}if(_52c){return _426.map(_52d,function(obj){return obj.attributes[_52e];},this);}else{return _52d;}},_filterByTime:function(_534,_535,_536){var _537=this._startTimeField,_538=this._endTimeField,_539;if(!this._twoTimeFields){_539=_537||_538;}var _53a=_42c.isDefined,yea=[],nay=[],i,len=_534.length,_53b,_53c;_535=_535?_535.getTime():-Infinity;_536=_536?_536.getTime():Infinity;if(_539){for(i=0;i<len;i++){_53b=_534[i];_53c=_53b.attributes;var time=_53c[_539];if(time>=_535&&time<=_536){yea.push(_53b);}else{nay.push(_53b);}}}else{for(i=0;i<len;i++){_53b=_534[i];_53c=_53b.attributes;var _53d=_53c[_537],end=_53c[_538];_53d=_53a(_53d)?_53d:-Infinity;end=_53a(end)?end:Infinity;if((_53d>=_535&&_53d<=_536)||(end>=_535&&end<=_536)||(_535>=_53d&&_536<=end)){yea.push(_53b);}else{nay.push(_53b);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_53e,_53f,dfd,_540){if(_53e){this[_53e].apply(this,args);}if(_53f){_53f.apply(null,args);}if(dfd){_42e._resDfd(dfd,args,_540);}},_getShallowClone:function(_541){var _542=new _438(),prop;for(prop in _541){if(_541.hasOwnProperty(prop)){_542[prop]=_541[prop];}}return _542;},_query:function(type,_543,_544,_545,_546){var that=this,map=this._map,dfd=new _428(_42e._dfdCanceller),_547=_544;var _548=function(_549,_54a){if(!_54a&&type==="execute"&&!that._isTable){var _54b=_549.features,mode=that._mode,_54c=that.objectIdField,il=_54b.length,i;for(i=il-1;i>=0;i--){var oid=_54b[i].attributes[_54c];var _54d=mode._getFeature(oid);if(_54d){_54b.splice(i,1,_54d);}}}that._resolve([_549],_543,_545,dfd);};if(type!=="executeRelationshipQuery"){_547=this._getShallowClone(_544);_547.outFields=this.getOutFields();_547.returnGeometry=_544.hasOwnProperty("returnGeometry")?_544.returnGeometry:true;var _54e;if(map){_547.outSpatialReference=new _42f(map.spatialReference.toJson());}if(!this._applyQueryFilters(_547)){switch(type){case "execute":_54e=new _439({features:[]});break;case "executeForIds":_54e=[];break;case "executeForCount":_54e=0;break;}_548(_54e,true);return dfd;}var _54f=this._canDoClientSideQuery(_547);if(_54f){var _550=this._doQuery(_547,_54f,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_54e=new _439();_54e.features=_550;break;case "executeForIds":_54e=_550;break;case "executeForCount":_54e=_550.length;break;}_548(_54e,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+this.invalidParams);this._resolve([err],null,_546,dfd,true);return dfd;}if(this._ts){_547._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_547);temp.addCallbacks(_548,function(err){that._resolve([err],null,_546,dfd,true);});return dfd;},_convertFeaturesToJson:function(_551,_552,_553,_554){var json=[],_555=this._selectionSymbol,_556=this.visibilityField,i,_557,_558=this.objectIdField;if(this.loaded&&(_553||_554)){_557=_426.filter(this.fields,function(_559){return (_559.editable===false)&&(!_554||(_559.name!==_558));});}for(i=0;i<_551.length;i++){var _55a=_551[i],_55b={},_55c=_55a.geometry,attr=_55a.attributes,_55d=_55a.symbol;if(_55c&&(!_554||!this.loaded||this.allowGeometryUpdates)){_55b.geometry=_55c.toJson();}if(_556){_55b.attributes=attr=lang.mixin({},attr);attr[_556]=_55a.visible?1:0;}else{if(attr){_55b.attributes=lang.mixin({},attr);}}if(_55b.attributes&&_557&&_557.length){_426.forEach(_557,function(_55e){delete _55b.attributes[_55e.name];});}if(_55d&&(_55d!==_555)){_55b.symbol=_55d.toJson();}json.push(_55b);}return _552?json:_427.toJson(json);},_selectHandler:function(_55f,_560,_561,_562,dfd){var _563,ctor=this.constructor;switch(_560){case ctor.SELECTION_NEW:this.clearSelection(true);_563=true;break;case ctor.SELECTION_ADD:_563=true;break;case ctor.SELECTION_SUBTRACT:_563=false;break;}var i,_564=_55f.features,mode=this._mode,_565=[],_566=this.objectIdField,_567,oid;if(_563){for(i=0;i<_564.length;i++){_567=_564[i];oid=_567.attributes[_566];var _568=mode._addFeatureIIf(oid,_567);_565.push(_568);this._selectFeatureIIf(oid,_568,mode);}}else{for(i=0;i<_564.length;i++){_567=_564[i];oid=_567.attributes[_566];this._unSelectFeatureIIf(oid,mode);var _569=mode._removeFeatureIIf(oid);_565.push(_569||_567);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_565,_560,_55f.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_561,dfd);if(_55f.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_56a,mode){var _56b=this._selectedFeatures,_56c=_56b[oid];if(!_56c){mode._incRefCount(oid);_56b[oid]=_56a;if(!this._isTable){this._setSelectSymbol(_56a);}}return _56c||_56a;},_unSelectFeatureIIf:function(oid,mode){var _56d=this._selectedFeatures[oid];if(_56d){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(_56d);}}return _56d;},_isSelected:function(_56e){},_setSelectSymbol:function(_56f){var _570=this._selectionSymbol;if(_570&&!this._isSelOnly){_56f.setSymbol(_570);}},_setUnSelectSymbol:function(_571){var _572=this._selectionSymbol;if(_572&&!this._isSelOnly){if(_572===_571.symbol){_571.setSymbol(null,true);}}},_getOutFields:function(){var _573=_426.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(_574,_575,arr){return !!_574&&(_426.indexOf(arr,_574)===_575);});var _576=lang.clone(this._outFields);if(_576){if(_426.indexOf(_576,"*")!==-1){return _576;}_426.forEach(_573,function(_577){if(_426.indexOf(_576,_577)===-1){_576.push(_577);}});return _576;}else{return _573;}},_checkFields:function(_578){var _579=_578||this._getOutFields();_426.forEach(_579,function(_57a){if(_57a==="*"){return;}if(!this._getField(_57a)){console.debug("esri.layers.FeatureLayer: "+_42c.substitute({url:this.url,field:_57a},"unable to find '${field}' field in the layer 'fields' information [url: ${url}]"));}},this);if(!_578&&!this._isTable&&!this._fserver&&!this._collection){var _57b=_426.some(this.fields,function(_57c){return (_57c&&_57c.type==="esriFieldTypeGeometry")?true:false;});if(!_57b){console.debug("esri.layers.FeatureLayer: "+_42c.substitute({url:this.url},"unable to find a field of type 'esriFieldTypeGeometry' in the layer 'fields' information. If you are using a map service layer, features will not have geometry [url: ${url}]"));}}},_fixRendererFields:function(){var _57d=this.renderer;if(_57d&&this.fields.length>0){var _57e=_426.filter([_57d,_57d.observationRenderer,_57d.latestObservationRenderer,_57d.trackRenderer],_42c.isDefined);var _57f=[];_426.forEach(_57e,function(rnd){var _580,_581;_581=rnd.attributeField;if(_581&&!lang.isFunction(_581)){_580=!this._getField(_581)&&this._getField(_581,true);if(_580){rnd.attributeField=_580.name;}}_581=rnd.attributeField2;if(_581){_580=!this._getField(_581)&&this._getField(_581,true);if(_580){rnd.attributeField2=_580.name;}}_581=rnd.attributeField3;if(_581){_580=!this._getField(_581)&&this._getField(_581,true);if(_580){rnd.attributeField3=_580.name;}}if(!lang.isFunction(rnd.attributeField)){_57f.push(rnd.attributeField);}_57f.push(rnd.attributeField2);_57f.push(rnd.attributeField3);},this);this._rendererFields=_426.filter(_57f,_42c.isDefined);}},_getField:function(_582,_583){var _584=this.fields;if(!_584||_584.length===0){return null;}var _585;if(_583){_582=_582.toLowerCase();}_426.some(_584,function(_586){var _587=false;if(_583){_587=(_586&&_586.name.toLowerCase()===_582)?true:false;}else{_587=(_586&&_586.name===_582)?true:false;}if(_587){_585=_586;}return _587;});return _585;},_getDateOpts:function(){if(!this._dtOpts){var _588=_426.map(_426.filter(this.fields,function(_589){return !!(_589&&_589.type==="esriFieldTypeDate");}),function(_58a){return _58a.name;});this._dtOpts={properties:_588};}return this._dtOpts;},_applyNormalized:function(_58b,_58c){if(_58b&&_58c){_426.forEach(_58b,function(_58d,_58e){if(_58d&&_58c[_58e]){_58d.setGeometry(_58c[_58e]);}});}},_editHandler:function(_58f,adds,_590,_591,_592,dfd){var _593=_58f.addResults,_594=_58f.updateResults,_595=_58f.deleteResults,i,_596,oid,_597,attr,_598=this.objectIdField,mode=this._mode,_599=this._isTable;var _59a=this.editFieldsInfo,_59b=this.getOutFields()||[],_59c=_59a&&_59a.creatorField,_59d=_59a&&_59a.creationDateField,_59e=_59a&&_59a.editorField,_59f=_59a&&_59a.editDateField,_5a0=_59a&&_59a.realm;if(_426.indexOf(_59b,"*")===-1){if(_59c&&_426.indexOf(_59b,_59c)===-1){_59c=null;}if(_59d&&_426.indexOf(_59b,_59d)===-1){_59d=null;}if(_59e&&_426.indexOf(_59b,_59e)===-1){_59e=null;}if(_59f&&_426.indexOf(_59b,_59f)===-1){_59f=null;}}var _5a1=(_59d||_59f)?(new Date()).getTime():null,_5a2=(_59c||_59e)?this.getUserId():undefined;if(_5a2&&_5a0){_5a2=_5a2+"@"+_5a0;}if(_593){for(i=0;i<_593.length;i++){_593[i]=new _442(_593[i]);if(_599){continue;}_596=_593[i];if(_596.success){oid=_596.objectId;_597=adds[i];var gl=_597._graphicsLayer;if(gl&&gl!==this){gl.remove(_597);}attr=_597.attributes||{};attr[_598]=oid;if(_59c){attr[_59c]=_5a2;}if(_59e){attr[_59e]=_5a2;}if(_59d){attr[_59d]=_5a1;}if(_59f){attr[_59f]=_5a1;}_597.setAttributes(attr);if(mode._init){mode.drawFeature(_597);}}}}if(_594){for(i=0;i<_594.length;i++){_594[i]=new _442(_594[i]);if(_599){continue;}_596=_594[i];if(_596.success){oid=_596.objectId;_597=_590[oid];var _5a3=mode._getFeature(oid);if(_5a3){if(_5a3.geometry!==_597.geometry){_5a3.setGeometry(_43b.fromJson(_597.geometry.toJson()));}this._repaint(_5a3,oid);}_597=_5a3||_597;attr=_597.attributes||{};if(_59e){attr[_59e]=_5a2;}if(_59f){attr[_59f]=_5a1;}_597.setAttributes(attr);}}}if(_595){var _5a4=[];for(i=0;i<_595.length;i++){_595[i]=new _442(_595[i]);if(_599){continue;}_596=_595[i];if(_596.success){oid=_596.objectId;_597=mode._getFeature(oid);if(_597){if(this._unSelectFeatureIIf(oid,mode)){_5a4.push(_597);}_597._count=0;mode._removeFeatureIIf(oid);}}}if(_5a4.length>0){this.onSelectionComplete(_5a4,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_593,_594,_595],"onEditsComplete",_591,dfd);},_sendAttachment:function(type,_5a5,_5a6,_5a7,_5a8){var _5a9=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_5a5+"/"+_5a9,self=this;var dfd=_42d({url:url,form:_5a6,content:lang.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_5aa){var _5ab=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_5ac=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_5ad=new _442(_5aa[_5ab]);_5ad.attachmentId=_5ad.objectId;_5ad.objectId=_5a5;self._resolve([_5ad],_5ac,_5a7);return _5ad;}).addErrback(function(_5ae){self._resolve([_5ae],null,_5a8,null,true);});return dfd;},_repaint:function(_5af,oid,_5b0){oid=_42c.isDefined(oid)?oid:_5af.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_5af.setSymbol(_5af.symbol,_5b0);}},_getKind:function(_5b1){var _5b2=this._trackManager;if(_5b2){return _5b2.isLatestObservation(_5b1)?1:0;}return 0;}});lang.mixin(_447,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,POPUP_NONE:"esriServerHTMLPopupTypeNone",POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",POPUP_URL:"esriServerHTMLPopupTypeAsURL"});_43c._createWrappers(_447);if(has("extend-esri")){lang.setObject("layers.FeatureLayer",_447,_42b);}return _447;});},"dojox/gfx/Moveable":function(){define("dojox/gfx/Moveable",["dojo/_base/lang","dojo/_base/declare","dojo/_base/array","dojo/_base/event","dojo/topic","dojo/touch","dojo/dom-class","dojo/_base/window","./Mover","dojo/mouse"],function(lang,_5b3,arr,_5b4,_5b5,_5b6,_5b7,win,_5b8,_5b9){return _5b3("dojox.gfx.Moveable",null,{constructor:function(_5ba,_5bb){this.shape=_5ba;this.delay=(_5bb&&_5bb.delay>0)?_5bb.delay:0;this.mover=(_5bb&&_5bb.mover)?_5bb.mover:_5b8;this.leftButtonOnly=_5bb&&_5bb.leftButtonOnly;this.events=[this.shape.connect(_5b6.press,lang.hitch(this,"onMouseDown"))];},destroy:function(){arr.forEach(this.events,function(_5bc){_5bc.remove();});this.events=this.shape=null;},onMouseDown:function(e){if(this.delay){this.events.push(this.shape.connect(_5b6.move,lang.hitch(this,"onMouseMove")),this.shape.connect(_5b6.release,lang.hitch(this,"onMouseUp")));this._lastX=e.clientX;this._lastY=e.clientY;}else{if(!this.leftButtonOnly||_5b9.isLeft(e)){new this.mover(this.shape,e,this);}}_5b4.stop(e);},onMouseMove:function(e){var _5bd=e.clientX,_5be=e.clientY;if(Math.abs(_5bd-this._lastX)>this.delay||Math.abs(_5be-this._lastY)>this.delay){this.onMouseUp(e);new this.mover(this.shape,e,this);}_5b4.stop(e);},onMouseUp:function(e){this.events.pop().remove();},onMoveStart:function(_5bf){_5b5.publish("/gfx/move/start",_5bf);_5b7.add(win.body(),"dojoMove");},onMoveStop:function(_5c0){_5b5.publish("/gfx/move/stop",_5c0);_5b7.remove(win.body(),"dojoMove");},onFirstMove:function(_5c1){},onMove:function(_5c2,_5c3){this.onMoving(_5c2,_5c3);this.shape.applyLeftTransform(_5c3);this.onMoved(_5c2,_5c3);},onMoving:function(_5c4,_5c5){},onMoved:function(_5c6,_5c7){}});});},"dojox/html/metrics":function(){define("dojox/html/metrics",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/sniff","dojo/ready","dojo/_base/unload","dojo/_base/window","dojo/dom-geometry"],function(_5c8,lang,has,_5c9,_5ca,_5cb,_5cc){var dhm=lang.getObject("dojox.html.metrics",true);var _5cd=lang.getObject("dojox");dhm.getFontMeasurements=function(){var _5ce={"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};if(has("ie")){_5cb.doc.documentElement.style.fontSize="100%";}var div=_5cb.doc.createElement("div");var ds=div.style;ds.position="absolute";ds.left="-100px";ds.top="0";ds.width="30px";ds.height="1000em";ds.borderWidth="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";_5cb.body().appendChild(div);for(var p in _5ce){ds.fontSize=p;_5ce[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}_5cb.body().removeChild(div);div=null;return _5ce;};var _5cf=null;dhm.getCachedFontMeasurements=function(_5d0){if(_5d0||!_5cf){_5cf=dhm.getFontMeasurements();}return _5cf;};var _5d1=null,_5d2={};dhm.getTextBox=function(text,_5d3,_5d4){var m,s;if(!_5d1){m=_5d1=_5cb.doc.createElement("div");var c=_5cb.doc.createElement("div");c.appendChild(m);s=c.style;s.overflow="scroll";s.position="absolute";s.left="0px";s.top="-10000px";s.width="1px";s.height="1px";s.visibility="hidden";s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";_5cb.body().appendChild(c);}else{m=_5d1;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_5d3){for(var i in _5d3){if(i in _5d2){continue;}s[i]=_5d3[i];}}if(arguments.length>2&&_5d4){m.className=_5d4;}m.innerHTML=text;var box=_5cc.position(m);box.w=m.parentNode.scrollWidth;return box;};var _5d5={w:16,h:16};dhm.getScrollbar=function(){return {w:_5d5.w,h:_5d5.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_5d6){var f=dhm._fontResizeNode=_5cb.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";fs.display="none";if(has("ie")){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=f.contentWindow.parent[_5cd._scopeName].html.metrics._fontresize;}};}else{f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[_5cd._scopeName].html.metrics._fontresize;};}f.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}</script></head><body></body></html>'");_5cb.body().appendChild(f);dhm.initOnFontResize=function(){};};dhm.onFontResize=function(){};dhm._fontresize=function(){dhm.onFontResize();};_5ca.addOnUnload(function(){var f=dhm._fontResizeNode;if(f){if(has("ie")&&f.onresize){f.onresize=null;}else{if(f.contentWindow&&f.contentWindow.onresize){f.contentWindow.onresize=null;}}dhm._fontResizeNode=null;}});_5c9(function(){try{var n=_5cb.doc.createElement("div");n.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";_5cb.body().appendChild(n);_5d5.w=n.offsetWidth-n.clientWidth;_5d5.h=n.offsetHeight-n.clientHeight;_5cb.body().removeChild(n);delete n;}catch(e){}if("fontSizeWatch" in _5c8.config&&!!_5c8.config.fontSizeWatch){dhm.initOnFontResize();}});return dhm;});},"esri/layers/SelectionMode":function(){define("esri/layers/SelectionMode",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/layers/RenderMode"],function(_5d7,lang,has,_5d8,_5d9){var _5da=_5d7([_5d9],{declaredClass:"esri.layers._SelectionMode",constructor:function(_5db){this.featureLayer=_5db;this._featureMap={};},propertyChangeHandler:function(type){if(this._init&&type===0){this._applyTimeFilter();}},resume:function(){this.propertyChangeHandler(0);}});if(has("extend-esri")){lang.setObject("layers._SelectionMode",_5da,_5d8);}return _5da;});},"dojox/grid/_EditManager":function(){define("dojox/grid/_EditManager",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/sniff","./util"],function(lang,_5dc,_5dd,_5de,has,util){return _5dd("dojox.grid._EditManager",null,{constructor:function(_5df){this.grid=_5df;if(has("ie")){this.connections=[_5de.connect(document.body,"onfocus",lang.hitch(this,"_boomerangFocus"))];}else{this.connections=[_5de.connect(this.grid,"onBlur",this,"apply")];}},info:{},destroy:function(){_5dc.forEach(this.connections,_5de.disconnect);},cellFocus:function(_5e0,_5e1){if(this.grid.singleClickEdit||this.isEditRow(_5e1)){this.setEditCell(_5e0,_5e1);}else{this.apply();}if(this.isEditing()||(_5e0&&_5e0.editable&&_5e0.alwaysEditing)){this._focusEditor(_5e0,_5e1);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_5e2){if(_5e2.index==this.info.rowIndex){_5e2.customClasses+=" dojoxGridRowEditing";}},dispatchEvent:function(e){var c=e.cell,ed=(c&&c["editable"])?c:0;return ed&&ed.dispatchEvent(e.dispatch,e);},isEditing:function(){return this.info.rowIndex!==undefined;},isEditCell:function(_5e3,_5e4){return (this.info.rowIndex===_5e3)&&(this.info.cell.index==_5e4);},isEditRow:function(_5e5){return this.info.rowIndex===_5e5;},setEditCell:function(_5e6,_5e7){if(!this.isEditCell(_5e7,_5e6.index)&&this.grid.canEdit&&this.grid.canEdit(_5e6,_5e7)){this.start(_5e6,_5e7,this.isEditRow(_5e7)||_5e6.editable);}},_focusEditor:function(_5e8,_5e9){util.fire(_5e8,"focus",[_5e9]);},focusEditor:function(){if(this.isEditing()){this._focusEditor(this.info.cell,this.info.rowIndex);}},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>new Date().getTime();},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();this._catchBoomerang=0;}},_doCatchBoomerang:function(){if(has("ie")){this._catchBoomerang=new Date().getTime()+this._boomerangWindow;}},start:function(_5ea,_5eb,_5ec){if(!this._isValidInput()){return;}this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_5eb)){this.applyRowEdit();this.grid.updateRow(_5eb);}if(_5ec){this.info={cell:_5ea,rowIndex:_5eb};this.grid.doStartEdit(_5ea,_5eb);this.grid.updateRow(_5eb);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_5ea,_5eb);this._doCatchBoomerang();},_editorDo:function(_5ed){var c=this.info.cell;if(c&&c.editable){c[_5ed](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_5ee,_5ef,_5f0){if(this.grid.canEdit(_5ef,_5f0)){this.grid.doApplyCellEdit(_5ee,_5f0,_5ef.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()&&this._isValidInput()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_5f1,_5f2){var c=this.info.cell;if(this.isEditRow(_5f1)&&(!_5f2||c.view==_5f2)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_5f3,_5f4){var c=this.info.cell;if(this.isEditRow(_5f4)&&c.view==_5f3&&c.editable){c.restore(this.info.rowIndex);}},_isValidInput:function(){var w=(this.info.cell||{}).widget;if(!w||!w.isValid){return true;}w.focused=true;return w.isValid(true);}});});},"esri/layers/TrackManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/graphic","esri/geometry/Polyline","esri/layers/GraphicsLayer"],function(_5f5,lang,_5f6,has,_5f7,_5f8,_5f9,_5fa){var _5fb=_5f5(null,{declaredClass:"esri.layers._TrackManager",constructor:function(_5fc){this.layer=_5fc;this.trackMap={};},initialize:function(map){this.map=map;var _5fd=this.layer,_5fe=_5fd.renderer.trackRenderer;if(_5fe&&(_5fd.geometryType==="esriGeometryPoint")){var _5ff=(this.container=new _5fa._GraphicsLayer({id:_5fd.id+"_tracks",_child:true}));_5ff.loaded=true;_5ff.onLoad(_5ff);_5ff._setMap(map,_5fd._div);_5ff.setRenderer(_5fe);}},addFeatures:function(_600){var tkid,_601=this.trackMap,_602=this.layer,_603=_602._trackIdField;_5f6.forEach(_600,function(_604){var _605=_604.attributes;tkid=_605[_603];var ary=(_601[tkid]=(_601[tkid]||[]));ary.push(_604);});var _606=_602._startTimeField,_607=_602.objectIdField;var _608=function(a,b){var _609=a.attributes[_606],_60a=b.attributes[_606];if(_609===_60a){return (a.attributes[_607]<b.attributes[_607])?-1:1;}else{return (_609<_60a)?-1:1;}};for(tkid in _601){_601[tkid].sort(_608);}},drawTracks:function(){var _60b=this.container;if(!_60b){return;}var _60c=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_60d,_60e=this.layer._trackIdField,_60f;for(tkid in _60c){ary=_60c[tkid];path=[];for(i=ary.length-1;i>=0;i--){_60d=ary[i].geometry;if(_60d){path.push([_60d.x,_60d.y]);}}_60f={};_60f[_60e]=tkid;if(path.length>0){_60b.add(new _5f8(new _5f9({paths:[path],spatialReference:sr}),null,_60f));}}},moveLatestToFront:function(){_5f6.forEach(this.getLatestObservations(),function(_610){var _611=_610._shape;_611&&_611._moveToFront();this._repaint(_610,null,true);},this.layer);},getLatestObservations:function(){var _612=[];if(!this.layer.renderer.latestObservationRenderer){return _612;}var _613=this.trackMap,tkid;for(tkid in _613){var ary=_613[tkid];_612.push(ary[ary.length-1]);}return _612;},clearTracks:function(){var _614=this.getLatestObservations();this.trackMap={};var _615=this.container;if(_615){_615.clear();}_5f6.forEach(_614,function(_616){this._repaint(_616,null,true);},this.layer);},isLatestObservation:function(_617){var _618=this.layer._trackIdField;var _619=this.trackMap[_617.attributes[_618]];if(_619){return (_619[_619.length-1]===_617);}return false;},destroy:function(){var _61a=this.container;if(_61a){_61a.clear();_61a._unsetMap(this.map,this.layer._div);this.container=null;}this.map=null;this.layer=null;this.trackMap=null;}});if(has("extend-esri")){lang.setObject("layers._TrackManager",_5fb,_5f7);}return _5fb;});},"dijit/a11y":function(){define("dijit/a11y",["dojo/_base/array","dojo/_base/config","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-style","dojo/sniff","./main"],function(_61b,_61c,_61d,dom,_61e,_61f,has,_620){var _621=(_620._isElementShown=function(elem){var s=_61f.get(elem);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_61e.get(elem,"type")!="hidden");});_620.hasDefaultTabStop=function(elem){switch(elem.nodeName.toLowerCase()){case "a":return _61e.has(elem,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var body;try{var _622=elem.contentDocument;if("designMode" in _622&&_622.designMode=="on"){return true;}body=_622.body;}catch(e1){try{body=elem.contentWindow.document.body;}catch(e2){return false;}}return body&&(body.contentEditable=="true"||(body.firstChild&&body.firstChild.contentEditable=="true"));default:return elem.contentEditable=="true";}};var _623=(_620.isTabNavigable=function(elem){if(_61e.get(elem,"disabled")){return false;}else{if(_61e.has(elem,"tabIndex")){return _61e.get(elem,"tabIndex")>=0;}else{return _620.hasDefaultTabStop(elem);}}});_620._getTabNavigable=function(root){var _624,last,_625,_626,_627,_628,_629={};function _62a(node){return node&&node.tagName.toLowerCase()=="input"&&node.type&&node.type.toLowerCase()=="radio"&&node.name&&node.name.toLowerCase();};var _62b=function(_62c){for(var _62d=_62c.firstChild;_62d;_62d=_62d.nextSibling){if(_62d.nodeType!=1||(has("ie")<=9&&_62d.scopeName!=="HTML")||!_621(_62d)){continue;}if(_623(_62d)){var _62e=+_61e.get(_62d,"tabIndex");if(!_61e.has(_62d,"tabIndex")||_62e==0){if(!_624){_624=_62d;}last=_62d;}else{if(_62e>0){if(!_625||_62e<_626){_626=_62e;_625=_62d;}if(!_627||_62e>=_628){_628=_62e;_627=_62d;}}}var rn=_62a(_62d);if(_61e.get(_62d,"checked")&&rn){_629[rn]=_62d;}}if(_62d.nodeName.toUpperCase()!="SELECT"){_62b(_62d);}}};if(_621(root)){_62b(root);}function rs(node){return _629[_62a(node)]||node;};return {first:rs(_624),last:rs(last),lowest:rs(_625),highest:rs(_627)};};_620.getFirstInTabbingOrder=function(root,doc){var _62f=_620._getTabNavigable(dom.byId(root,doc));return _62f.lowest?_62f.lowest:_62f.first;};_620.getLastInTabbingOrder=function(root,doc){var _630=_620._getTabNavigable(dom.byId(root,doc));return _630.last?_630.last:_630.highest;};return {hasDefaultTabStop:_620.hasDefaultTabStop,isTabNavigable:_620.isTabNavigable,_getTabNavigable:_620._getTabNavigable,getFirstInTabbingOrder:_620.getFirstInTabbingOrder,getLastInTabbingOrder:_620.getLastInTabbingOrder};});},"esri/tasks/QueryTask":function(){define("esri/tasks/QueryTask",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/Deferred","dojo/_base/json","dojo/has","esri/kernel","esri/request","esri/deferredUtils","esri/geometry/normalizeUtils","esri/tasks/Task","esri/tasks/FeatureSet"],function(_631,lang,_632,_633,_634,has,_635,_636,_637,_638,Task,_639){var _63a=_631(Task,{declaredClass:"esri.tasks.QueryTask",_eventMap:{"complete":["featureSet"],"execute-for-count-complete":["count"],"execute-for-ids-complete":["objectIds"],"execute-relationship-query-complete":["featureSets"]},constructor:function(url,_63b){this._handler=lang.hitch(this,this._handler);this._relationshipQueryHandler=lang.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=lang.hitch(this,this._executeForIdsHandler);this._countHandler=lang.hitch(this,this._countHandler);this.source=_63b&&_63b.source;this.gdbVersion=_63b&&_63b.gdbVersion;this.registerConnectEvents();},__msigns:[{n:"execute",c:4,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForIds",c:3,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForCount",c:3,a:[{i:0,p:["geometry"]}],e:2}],onComplete:function(){},onExecuteRelationshipQueryComplete:function(){},onExecuteForIdsComplete:function(){},onExecuteForCountComplete:function(){},execute:function(_63c,_63d,_63e,_63f,_640){var _641=_640.assembly,_642=this._encode(lang.mixin({},this._url.query,{f:"json"},_63c.toJson(_641&&_641[0]))),_643=this._handler,_644=this._errorHandler;if(this.source){var _645={source:this.source.toJson()};_642.layer=_634.toJson(_645);}if(this.gdbVersion){_642.gdbVersion=this.gdbVersion;}return _636({url:this._url.path+"/query",content:_642,callbackParamName:"callback",load:function(r,i){_643(r,i,_63d,_63e,_640.dfd);},error:function(r){_644(r,_63e,_640.dfd);},callbackSuffix:_63f});},executeRelationshipQuery:function(_646,_647,_648){var _649=this._encode(lang.mixin({},this._url.query,{f:"json"},_646.toJson())),_64a=this._relationshipQueryHandler,_64b=this._errorHandler;if(this.gdbVersion){_649.gdbVersion=this.gdbVersion;}var dfd=new _633(_637._dfdCanceller);dfd._pendingDfd=_636({url:this._url.path+"/queryRelatedRecords",content:_649,callbackParamName:"callback",load:function(r,i){_64a(r,i,_647,_648,dfd);},error:function(r){_64b(r,_648,dfd);}});return dfd;},executeForIds:function(_64c,_64d,_64e,_64f){var _650=_64f.assembly,_651=this._encode(lang.mixin({},this._url.query,{f:"json",returnIdsOnly:true},_64c.toJson(_650&&_650[0]))),_652=this._executeForIdsHandler,_653=this._errorHandler;if(this.source){var _654={source:this.source.toJson()};_651.layer=_634.toJson(_654);}if(this.gdbVersion){_651.gdbVersion=this.gdbVersion;}return _636({url:this._url.path+"/query",content:_651,callbackParamName:"callback",load:function(r,i){_652(r,i,_64d,_64e,_64f.dfd);},error:function(r){_653(r,_64e,_64f.dfd);}});},executeForCount:function(_655,_656,_657,_658){var _659=_658.assembly,_65a=this._encode(lang.mixin({},this._url.query,{f:"json",returnIdsOnly:true,returnCountOnly:true},_655.toJson(_659&&_659[0]))),_65b=this._countHandler,_65c=this._errorHandler;if(this.source){var _65d={source:this.source.toJson()};_65a.layer=_634.toJson(_65d);}if(this.gdbVersion){_65a.gdbVersion=this.gdbVersion;}return _636({url:this._url.path+"/query",content:_65a,callbackParamName:"callback",load:function(r,i){_65b(r,i,_656,_657,_658.dfd);},error:function(r){_65c(r,_657,_658.dfd);}});},_handler:function(_65e,io,_65f,_660,dfd){try{var _661=new _639(_65e);this._successHandler([_661],"onComplete",_65f,dfd);}catch(err){this._errorHandler(err,_660,dfd);}},_relationshipQueryHandler:function(_662,io,_663,_664,dfd){try{var gt=_662.geometryType,sr=_662.spatialReference,_665={};_632.forEach(_662.relatedRecordGroups,function(gr){var _666={};_666.geometryType=gt;_666.spatialReference=sr;_666.features=gr.relatedRecords;var fset=new _639(_666);_665[gr.objectId]=fset;});this._successHandler([_665],"onExecuteRelationshipQueryComplete",_663,dfd);}catch(err){this._errorHandler(err,_664,dfd);}},_executeForIdsHandler:function(_667,io,_668,_669,dfd){try{this._successHandler([_667.objectIds],"onExecuteForIdsComplete",_668,dfd);}catch(err){this._errorHandler(err,_669,dfd);}},_countHandler:function(_66a,io,_66b,_66c,dfd){try{var _66d,_66e=_66a.features,ids=_66a.objectIds;if(ids){_66d=ids.length;}else{if(_66e){throw new Error("Unable to perform query. Please check your parameters.");}else{_66d=_66a.count;}}this._successHandler([_66d],"onExecuteForCountComplete",_66b,dfd);}catch(err){this._errorHandler(err,_66c,dfd);}}});_638._createWrappers(_63a);if(has("extend-esri")){lang.setObject("tasks.QueryTask",_63a,_635);}return _63a;});},"dijit/CheckedMenuItem":function(){require({cache:{"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n"}});define("dijit/CheckedMenuItem",["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(_66f,_670,_671,_672){return _66f("dijit.CheckedMenuItem",_671,{templateString:_672,checked:false,_setCheckedAttr:function(_673){_670.toggle(this.domNode,"dijitCheckedMenuItemChecked",_673);this.domNode.setAttribute("aria-checked",_673?"true":"false");this._set("checked",_673);},iconClass:"",onChange:function(){},_onClick:function(evt){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked);}this.onClick(evt);}});});},"esri/toolbars/_toolbar":function(){define("esri/toolbars/_toolbar",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/Evented"],function(_674,lang,has,_675,_676){var TB=_674([_676],{declaredClass:"esri.toolbars._Toolbar",constructor:function(map){this.map=map;},_cursors:{"move":"pointer","move-v":"pointer","move-gv":"pointer","box0":"nw-resize","box1":"n-resize","box2":"ne-resize","box3":"e-resize","box4":"se-resize","box5":"s-resize","box6":"sw-resize","box7":"w-resize","box8":"pointer"},_deactivateMapTools:function(nav,_677,_678,_679){var map=this.map;if(nav){this._mapNavState={isDoubleClickZoom:map.isDoubleClickZoom,isClickRecenter:map.isClickRecenter,isPan:map.isPan,isRubberBandZoom:map.isRubberBandZoom,isKeyboardNavigation:map.isKeyboardNavigation,isScrollWheelZoom:map.isScrollWheelZoom};map.disableDoubleClickZoom();map.disableClickRecenter();map.disablePan();map.disableRubberBandZoom();map.disableKeyboardNavigation();}if(_677){map.hideZoomSlider();}if(_678){map.hidePanArrows();}if(_679){map.graphics.disableMouseEvents();}},_activateMapTools:function(nav,_67a,_67b,_67c){var map=this.map,_67d=this._mapNavState;if(nav&&_67d){if(_67d.isDoubleClickZoom){map.enableDoubleClickZoom();}if(_67d.isClickRecenter){map.enableClickRecenter();}if(_67d.isPan){map.enablePan();}if(_67d.isRubberBandZoom){map.enableRubberBandZoom();}if(_67d.isKeyboardNavigation){map.enableKeyboardNavigation();}if(_67d.isScrollWheelZoom){map.enableScrollWheelZoom();}}if(_67a){map.showZoomSlider();}if(_67b){map.showPanArrows();}if(_67c){map.graphics.enableMouseEvents();}}});if(has("extend-esri")){lang.setObject("toolbars._Toolbar",TB,_675);}return TB;});},"esri/layers/GridLayout":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/SpatialReference","esri/geometry/Extent","esri/geometry/Polyline"],function(_67e,lang,_67f,has,_680,_681,_682,_683){var _684=_67e(null,{declaredClass:"esri.layers._GridLayout",constructor:function(_685,_686,_687,_688){this.origin=_685;this.cellWidth=_686.width;this.cellHeight=_686.height;this.mapWidth=_687.width;this.mapHeight=_687.height;this.srInfo=_688;},setResolution:function(_689){this._resolution=(_689.xmax-_689.xmin)/this.mapWidth;if(this.srInfo){var _68a=Math.round((2*this.srInfo.valid[1])/this._resolution),_68b=Math.round(_68a/this.cellWidth);this._frameStats=[_68b,0,_68b-1];}},getCellCoordinates:function(_68c){var res=this._resolution,_68d=this.origin;return {row:Math.floor((_68d.y-_68c.y)/(this.cellHeight*res)),col:Math.floor((_68c.x-_68d.x)/(this.cellWidth*res))};},normalize:function(col){var _68e=this._frameStats;if(_68e){var _68f=_68e[0],m180=_68e[1],p180=_68e[2];if(col<m180){col=col%_68f;col=col<m180?col+_68f:col;}else{if(col>p180){col=col%_68f;}}}return col;},intersects:function(_690,_691){var _692=this.srInfo;if(_692){return _67f.some(_691._getParts(_692),function(_693){return _690.intersects(_693.extent);});}else{return _690.intersects(_691);}},getCellExtent:function(row,col){var res=this._resolution,_694=this.origin,_695=this.cellWidth,_696=this.cellHeight;return new _682((col*_695*res)+_694.x,_694.y-((row+1)*_696*res),((col+1)*_695*res)+_694.x,_694.y-(row*_696*res),new _681(_694.spatialReference.toJson()));},getLatticeID:function(_697){var _698=this.getCellCoordinates({x:_697.xmin,y:_697.ymax}),_699=this.getCellCoordinates({x:_697.xmax,y:_697.ymin}),_69a=_698.row,_69b=_699.row,_69c=this.normalize(_698.col),_69d=this.normalize(_699.col);return _69a+"_"+_69b+"_"+_69c+"_"+_69d;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_69e,_69f){var _6a0=this.getCellCoordinates({x:_69e.xmin,y:_69e.ymax}),_6a1=this.getCellCoordinates({x:_69e.xmax,y:_69e.ymin}),_6a2=_6a0.row,_6a3=_6a1.row,_6a4=_6a0.col,_6a5=_6a1.col,_6a6=[],i,j,nj,_6a7=[],_6a8=[],len,xmin,xmax,ymin,ymax,_6a9=[],_6aa,_6ab;for(i=_6a2;i<=_6a3;i++){for(j=_6a4;j<=_6a5;j++){nj=this.normalize(j);_69e=this.getCellExtent(i,nj);_6a6.push({row:i,col:nj,extent:_69e,resolution:this._resolution});if(_69f){_6a7.push(_69e.xmin,_69e.xmax);_6a8.push(_69e.ymin,_69e.ymax);}}}_6a4=this.normalize(_6a4);_6a5=this.normalize(_6a5);_6a7.sort(this.sorter);_6a8.sort(this.sorter);len=_6a7.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_6a7[i]===_6a7[i+1]){_6a7.splice(i,1);}}}len=_6a8.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_6a8[i]===_6a8[i+1]){_6a8.splice(i,1);}}}if(_6a7.length&&_6a8.length){xmin=_6a7[0];xmax=_6a7[_6a7.length-1];ymin=_6a8[0];ymax=_6a8[_6a8.length-1];len=_6a7.length;for(i=0;i<len;i++){_6a9.push([[_6a7[i],ymax],[_6a7[i],ymin]]);}len=_6a8.length;for(i=0;i<len;i++){_6a9.push([[xmin,_6a8[i]],[xmax,_6a8[i]]]);}_6aa=new _683({paths:_6a9,spatialReference:this.origin.spatialReference.toJson()});_6ab=_6a2+"_"+_6a3+"_"+_6a4+"_"+_6a5;_6a6.push({latticeID:_6ab,lattice:_6aa,resolution:this._resolution});}return {minRow:_6a2,maxRow:_6a3,minCol:_6a4,maxCol:_6a5,cells:_6a6};}});if(has("extend-esri")){lang.setObject("layers._GridLayout",_684,_680);}return _684;});},"dijit/Menu":function(){define("dijit/Menu",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/event","dojo/dom","dojo/dom-attr","dojo/dom-geometry","dojo/dom-style","dojo/keys","dojo/_base/lang","dojo/on","dojo/sniff","dojo/_base/window","dojo/window","./popup","./DropDownMenu","dojo/ready"],function(_6ac,_6ad,_6ae,_6af,dom,_6b0,_6b1,_6b2,keys,lang,on,has,win,_6b3,pm,_6b4,_6b5){if(has("dijit-legacy-requires")){_6b5(0,function(){var _6b6=["dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"];_6ac(_6b6);});}return _6ae("dijit.Menu",_6b4,{constructor:function(){this._bindings=[];},targetNodeIds:[],selector:"",contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(this.ownerDocumentBody);}else{_6ad.forEach(this.targetNodeIds,this.bindDomNode,this);}this.inherited(arguments);},_iframeContentWindow:function(_6b7){return _6b3.get(this._iframeContentDocument(_6b7))||this._iframeContentDocument(_6b7)["__parent__"]||(_6b7.name&&win.doc.frames[_6b7.name])||null;},_iframeContentDocument:function(_6b8){return _6b8.contentDocument||(_6b8.contentWindow&&_6b8.contentWindow.document)||(_6b8.name&&win.doc.frames[_6b8.name]&&win.doc.frames[_6b8.name].document)||null;},bindDomNode:function(node){node=dom.byId(node,this.ownerDocument);var cn;if(node.tagName.toLowerCase()=="iframe"){var _6b9=node,_6ba=this._iframeContentWindow(_6b9);cn=win.body(_6ba.document);}else{cn=(node==win.body(this.ownerDocument)?this.ownerDocument.documentElement:node);}var _6bb={node:node,iframe:_6b9};_6b0.set(node,"_dijitMenu"+this.id,this._bindings.push(_6bb));var _6bc=lang.hitch(this,function(cn){var _6bd=this.selector,_6be=_6bd?function(_6bf){return on.selector(_6bd,_6bf);}:function(_6c0){return _6c0;},self=this;return [on(cn,_6be(this.leftClickToOpen?"click":"contextmenu"),function(evt){_6af.stop(evt);self._scheduleOpen(this,_6b9,{x:evt.pageX,y:evt.pageY});}),on(cn,_6be("keydown"),function(evt){if(evt.shiftKey&&evt.keyCode==keys.F10){_6af.stop(evt);self._scheduleOpen(this,_6b9);}})];});_6bb.connects=cn?_6bc(cn):[];if(_6b9){_6bb.onloadHandler=lang.hitch(this,function(){var _6c1=this._iframeContentWindow(_6b9);cn=win.body(_6c1.document);_6bb.connects=_6bc(cn);});if(_6b9.addEventListener){_6b9.addEventListener("load",_6bb.onloadHandler,false);}else{_6b9.attachEvent("onload",_6bb.onloadHandler);}}},unBindDomNode:function(_6c2){var node;try{node=dom.byId(_6c2,this.ownerDocument);}catch(e){return;}var _6c3="_dijitMenu"+this.id;if(node&&_6b0.has(node,_6c3)){var bid=_6b0.get(node,_6c3)-1,b=this._bindings[bid],h;while((h=b.connects.pop())){h.remove();}var _6c4=b.iframe;if(_6c4){if(_6c4.removeEventListener){_6c4.removeEventListener("load",b.onloadHandler,false);}else{_6c4.detachEvent("onload",b.onloadHandler);}}_6b0.remove(node,_6c3);delete this._bindings[bid];}},_scheduleOpen:function(_6c5,_6c6,_6c7){if(!this._openTimer){this._openTimer=this.defer(function(){delete this._openTimer;this._openMyself({target:_6c5,iframe:_6c6,coords:_6c7});},1);}},_openMyself:function(args){var _6c8=args.target,_6c9=args.iframe,_6ca=args.coords;this.currentTarget=_6c8;if(_6ca){if(_6c9){var ifc=_6b1.position(_6c9,true),_6cb=this._iframeContentWindow(_6c9),_6cc=_6b1.docScroll(_6cb.document);var cs=_6b2.getComputedStyle(_6c9),tp=_6b2.toPixelValue,left=(has("ie")&&has("quirks")?0:tp(_6c9,cs.paddingLeft))+(has("ie")&&has("quirks")?tp(_6c9,cs.borderLeftWidth):0),top=(has("ie")&&has("quirks")?0:tp(_6c9,cs.paddingTop))+(has("ie")&&has("quirks")?tp(_6c9,cs.borderTopWidth):0);_6ca.x+=ifc.x+left-_6cc.x;_6ca.y+=ifc.y+top-_6cc.y;}}else{_6ca=_6b1.position(_6c8,true);_6ca.x+=10;_6ca.y+=10;}var self=this;var _6cd=this._focusManager.get("prevNode");var _6ce=this._focusManager.get("curNode");var _6cf=!_6ce||(dom.isDescendant(_6ce,this.domNode))?_6cd:_6ce;function _6d0(){if(self.refocus&&_6cf){_6cf.focus();}pm.close(self);};pm.open({popup:this,x:_6ca.x,y:_6ca.y,onExecute:_6d0,onCancel:_6d0,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);pm.close(this);};},destroy:function(){_6ad.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});});},"dojo/dnd/Container":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/kernel","../_base/lang","../_base/window","../dom","../dom-class","../dom-construct","../Evented","../has","../on","../query","../ready","../touch","./common"],function(_6d1,_6d2,_6d3,_6d4,lang,win,dom,_6d5,_6d6,_6d7,has,on,_6d8,_6d9,_6da,dnd){var _6db=_6d2("dojo.dnd.Container",_6d7,{skipForm:false,allowNested:false,constructor:function(node,_6dc){this.node=dom.byId(node);if(!_6dc){_6dc={};}this.creator=_6dc.creator||null;this.skipForm=_6dc.skipForm;this.parent=_6dc.dropParent&&dom.byId(_6dc.dropParent);this.map={};this.current=null;this.containerState="";_6d5.add(this.node,"dojoDndContainer");if(!(_6dc&&_6dc._skipStartup)){this.startup();}this.events=[on(this.node,_6da.over,lang.hitch(this,"onMouseOver")),on(this.node,_6da.out,lang.hitch(this,"onMouseOut")),on(this.node,"dragstart",lang.hitch(this,"onSelectStart")),on(this.node,"selectstart",lang.hitch(this,"onSelectStart"))];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||_6d4.global;var m=this.map,e=dnd._empty;for(var i in m){if(i in e){continue;}f.call(o,m[i],i,this);}return o;},clearItems:function(){this.map={};},getAllNodes:function(){return _6d8((this.allowNested?"":"> ")+".dojoDndItem",this.parent);},sync:function(){var map={};this.getAllNodes().forEach(function(node){if(node.id){var item=this.getItem(node.id);if(item){map[node.id]=item;return;}}else{node.id=dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");map[node.id]={data:data||node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]};},this);this.map=map;return this;},insertNodes:function(data,_6dd,_6de){if(!this.parent.firstChild){_6de=null;}else{if(_6dd){if(!_6de){_6de=this.parent.firstChild;}}else{if(_6de){_6de=_6de.nextSibling;}}}var i,t;if(_6de){for(i=0;i<data.length;++i){t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});_6de.parentNode.insertBefore(t.node,_6de);}}else{for(i=0;i<data.length;++i){t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){_6d1.forEach(this.events,function(_6df){_6df.remove();});this.clearItems();this.node=this.parent=this.current=null;},markupFactory:function(_6e0,node,Ctor){_6e0._skipStartup=true;return new Ctor(node,_6e0);},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}}this.defaultCreator=dnd._defaultCreator(this.parent);this.sync();},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!dnd.isFormElement(e)){_6d3.stop(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_6e1){var _6e2="dojoDnd"+type;var _6e3=type.toLowerCase()+"State";_6d5.replace(this.node,_6e2+_6e1,_6e2+this[_6e3]);this[_6e3]=_6e1;},_addItemClass:function(node,type){_6d5.add(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){_6d5.remove(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _6e4=node.parentNode;_6e4;node=_6e4,_6e4=node.parentNode){if((_6e4==this.parent||this.allowNested)&&_6d5.contains(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator||this.defaultCreator).call(this,item,hint);if(!lang.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=dnd.getUniqueId();}_6d5.add(t.node,"dojoDndItem");return t;}});dnd._createNode=function(tag){if(!tag){return dnd._createSpan;}return function(text){return _6d6.create(tag,{innerHTML:text});};};dnd._createTrTd=function(text){var tr=_6d6.create("tr");_6d6.create("td",{innerHTML:text},tr);return tr;};dnd._createSpan=function(text){return _6d6.create("span",{innerHTML:text});};dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="tbody"||tag=="thead"?dnd._createTrTd:dnd._createNode(dnd._defaultCreatorNodes[tag]);return function(item,hint){var _6e5=item&&lang.isObject(item),data,type,n;if(_6e5&&item.tagName&&item.nodeType&&item.getAttribute){data=item.getAttribute("dndData")||item.innerHTML;type=item.getAttribute("dndType");type=type?type.split(/\s*,\s*/):["text"];n=item;}else{data=(_6e5&&item.data)?item.data:item;type=(_6e5&&item.type)?item.type:["text"];n=(hint=="avatar"?dnd._createSpan:c)(String(data));}if(!n.id){n.id=dnd.getUniqueId();}return {node:n,data:data,type:type};};};return _6db;});},"dojo/dnd/common":function(){define(["../_base/connect","../_base/kernel","../_base/lang","../dom"],function(_6e6,_6e7,lang,dom){var _6e8=lang.getObject("dojo.dnd",true);_6e8.getCopyKeyState=_6e6.isCopyKey;_6e8._uniqueId=0;_6e8.getUniqueId=function(){var id;do{id=_6e7._scopeName+"Unique"+(++_6e8._uniqueId);}while(dom.byId(id));return id;};_6e8._empty={};_6e8.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};return _6e8;});},"dojox/grid/_ViewManager":function(){define("dojox/grid/_ViewManager",["dojo/_base/declare","dojo/_base/sniff","dojo/dom-class"],function(_6e9,has,_6ea){return _6e9("dojox.grid._ViewManager",null,{constructor:function(_6eb){this.grid=_6eb;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_6ec){_6ec.idx=this.views.length;this.views.push(_6ec);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _6ed=[];for(var i=0,v;v=this.views[i];i++){_6ed.push(v.contentNode);}return _6ed;},forEach:function(_6ee){for(var i=0,v;v=this.views[i];i++){_6ee(v,i);}},onEach:function(_6ef,_6f0){_6f0=_6f0||[];for(var i=0,v;v=this.views[i];i++){if(_6ef in v){v[_6ef].apply(v,_6f0);}}},normalizeHeaderNodeHeight:function(){var _6f1=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_6f1.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_6f1);},normalizeRowNodeHeights:function(_6f2){var h=0;var _6f3=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_6f2.length<=1){return;}for(var i=0,n;(n=_6f2[i]);i++){if(!_6ea.contains(n,"dojoxGridNonNormalizedCell")){_6f3[i]=n.firstChild.offsetHeight;h=Math.max(h,_6f3[i]);}}h=(h>=0?h:0);if((has("mozilla")||has("ie")>8)&&h){h++;}}for(i=0;(n=_6f2[i]);i++){if(_6f3[i]!=h){n.firstChild.style.height=h+"px";}}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_6f4){var _6f5=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_6f4));i++){n.firstChild.style.height="";_6f5.push(n);}this.normalizeRowNodeHeights(_6f5);},getViewWidth:function(_6f6){return this.views[_6f6].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_6f7){_6f7.headerContentNode.style.height="";});var h=0;this.forEach(function(_6f8){h=Math.max(_6f8.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_6f9){h=Math.max(_6f9.domNode.offsetHeight,h);});return h;},findClient:function(_6fa){var c=this.grid.elasticView||-1;if(c<0){for(var i=1,v;(v=this.views[i]);i++){if(v.viewWidth){for(i=1;(v=this.views[i]);i++){if(!v.viewWidth){c=i;break;}}break;}}}if(c<0){c=Math.floor(this.views.length/2);}return c;},arrange:function(l,w){var i,v,vw,len=this.views.length,self=this;var c=(w<=0?len:this.findClient());var _6fb=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!self.grid.isLeftToRight()){ds.right=l+"px";if(has("ff")<4){hs.right=l+v.getScrollbarWidth()+"px";}else{hs.right=l+"px";}if(!has("webkit")){hs.width=parseInt(hs.width,10)-v.getScrollbarWidth()+"px";}}else{ds.left=l+"px";hs.left=l+"px";}ds.top=0+"px";hs.top=0;};for(i=0;(v=this.views[i])&&(i<c);i++){vw=this.getViewWidth(i);v.setSize(vw,0);_6fb(v,l);if(v.headerContentNode&&v.headerContentNode.firstChild){vw=v.getColumnsWidth()+v.getScrollbarWidth();}else{vw=v.domNode.offsetWidth;}l+=vw;}i++;var r=w;for(var j=len-1;(v=this.views[j])&&(i<=j);j--){vw=this.getViewWidth(j);v.setSize(vw,0);vw=v.domNode.offsetWidth;r-=vw;_6fb(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_6fb(v,l);}return l;},renderRow:function(_6fc,_6fd,_6fe){var _6ff=[];for(var i=0,v,n,_700;(v=this.views[i])&&(n=_6fd[i]);i++){_700=v.renderRow(_6fc);n.appendChild(_700);_6ff.push(_700);}if(!_6fe){this.normalizeRowNodeHeights(_6ff);}},rowRemoved:function(_701){this.onEach("rowRemoved",[_701]);},updateRow:function(_702,_703){for(var i=0,v;v=this.views[i];i++){v.updateRow(_702);}if(!_703){this.renormalizeRow(_702);}},updateRowStyles:function(_704){this.onEach("updateRowStyles",[_704]);},setScrollTop:function(_705){var top=_705;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_705);if(has("ie")&&v.headerNode&&v.scrollboxNode){v.headerNode.scrollLeft=v.scrollboxNode.scrollLeft;}}return top;},getFirstScrollingView:function(){for(var i=0,v;(v=this.views[i]);i++){if(v.hasHScrollbar()||v.hasVScrollbar()){return v;}}return null;}});});},"dijit/place":function(){define("dijit/place",["dojo/_base/array","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/window","dojo/window","./main"],function(_706,_707,_708,_709,win,_70a,_70b){function _70c(node,_70d,_70e,_70f){var view=_70a.getBox(node.ownerDocument);if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){win.body(node.ownerDocument).appendChild(node);}var best=null;_706.some(_70d,function(_710){var _711=_710.corner;var pos=_710.pos;var _712=0;var _713={w:{"L":view.l+view.w-pos.x,"R":pos.x-view.l,"M":view.w}[_711.charAt(1)],h:{"T":view.t+view.h-pos.y,"B":pos.y-view.t,"M":view.h}[_711.charAt(0)]};var s=node.style;s.left=s.right="auto";if(_70e){var res=_70e(node,_710.aroundCorner,_711,_713,_70f);_712=typeof res=="undefined"?0:res;}var _714=node.style;var _715=_714.display;var _716=_714.visibility;if(_714.display=="none"){_714.visibility="hidden";_714.display="";}var bb=_707.position(node);_714.display=_715;_714.visibility=_716;var _717={"L":pos.x,"R":pos.x-bb.w,"M":Math.max(view.l,Math.min(view.l+view.w,pos.x+(bb.w>>1))-bb.w)}[_711.charAt(1)],_718={"T":pos.y,"B":pos.y-bb.h,"M":Math.max(view.t,Math.min(view.t+view.h,pos.y+(bb.h>>1))-bb.h)}[_711.charAt(0)],_719=Math.max(view.l,_717),_71a=Math.max(view.t,_718),endX=Math.min(view.l+view.w,_717+bb.w),endY=Math.min(view.t+view.h,_718+bb.h),_71b=endX-_719,_71c=endY-_71a;_712+=(bb.w-_71b)+(bb.h-_71c);if(best==null||_712<best.overflow){best={corner:_711,aroundCorner:_710.aroundCorner,x:_719,y:_71a,w:_71b,h:_71c,overflow:_712,spaceAvailable:_713};}return !_712;});if(best.overflow&&_70e){_70e(node,best.aroundCorner,best.corner,best.spaceAvailable,_70f);}var l=_707.isBodyLtr(node.ownerDocument),s=node.style;s.top=best.y+"px";s[l?"left":"right"]=(l?best.x:view.w-best.x-best.w)+"px";s[l?"right":"left"]="auto";return best;};var _71d={at:function(node,pos,_71e,_71f){var _720=_706.map(_71e,function(_721){var c={corner:_721,pos:{x:pos.x,y:pos.y}};if(_71f){c.pos.x+=_721.charAt(1)=="L"?_71f.x:-_71f.x;c.pos.y+=_721.charAt(0)=="T"?_71f.y:-_71f.y;}return c;});return _70c(node,_720);},around:function(node,_722,_723,_724,_725){var _726=(typeof _722=="string"||"offsetWidth" in _722)?_707.position(_722,true):_722;if(_722.parentNode){var _727=_708.getComputedStyle(_722).position=="absolute";var _728=_722.parentNode;while(_728&&_728.nodeType==1&&_728.nodeName!="BODY"){var _729=_707.position(_728,true),pcs=_708.getComputedStyle(_728);if(/relative|absolute/.test(pcs.position)){_727=false;}if(!_727&&/hidden|auto|scroll/.test(pcs.overflow)){var _72a=Math.min(_726.y+_726.h,_729.y+_729.h);var _72b=Math.min(_726.x+_726.w,_729.x+_729.w);_726.x=Math.max(_726.x,_729.x);_726.y=Math.max(_726.y,_729.y);_726.h=_72a-_726.y;_726.w=_72b-_726.x;}if(pcs.position=="absolute"){_727=true;}_728=_728.parentNode;}}var x=_726.x,y=_726.y,_72c="w" in _726?_726.w:(_726.w=_726.width),_72d="h" in _726?_726.h:(_709.deprecated("place.around: dijit/place.__Rectangle: { x:"+x+", y:"+y+", height:"+_726.height+", width:"+_72c+" } has been deprecated.  Please use { x:"+x+", y:"+y+", h:"+_726.height+", w:"+_72c+" }","","2.0"),_726.h=_726.height);var _72e=[];function push(_72f,_730){_72e.push({aroundCorner:_72f,corner:_730,pos:{x:{"L":x,"R":x+_72c,"M":x+(_72c>>1)}[_72f.charAt(1)],y:{"T":y,"B":y+_72d,"M":y+(_72d>>1)}[_72f.charAt(0)]}});};_706.forEach(_723,function(pos){var ltr=_724;switch(pos){case "above-centered":push("TM","BM");break;case "below-centered":push("BM","TM");break;case "after-centered":ltr=!ltr;case "before-centered":push(ltr?"ML":"MR",ltr?"MR":"ML");break;case "after":ltr=!ltr;case "before":push(ltr?"TL":"TR",ltr?"TR":"TL");push(ltr?"BL":"BR",ltr?"BR":"BL");break;case "below-alt":ltr=!ltr;case "below":push(ltr?"BL":"BR",ltr?"TL":"TR");push(ltr?"BR":"BL",ltr?"TR":"TL");break;case "above-alt":ltr=!ltr;case "above":push(ltr?"TL":"TR",ltr?"BL":"BR");push(ltr?"TR":"TL",ltr?"BR":"BL");break;default:push(pos.aroundCorner,pos.corner);}});var _731=_70c(node,_72e,_725,{w:_72c,h:_72d});_731.aroundNodePos=_726;return _731;}};return _70b.place=_71d;});},"esri/tasks/Task":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","esri/kernel","esri/deferredUtils","esri/urlUtils","esri/Evented"],function(_732,lang,_733,has,_734,_735,_736,_737){var Task=_732(_737,{declaredClass:"esri.tasks._Task",_eventMap:{"error":["error"],"complete":["result"]},constructor:function(url){if(url&&lang.isString(url)){this._url=_736.urlToObject(this.url=url);}this.normalization=true;this._errorHandler=lang.hitch(this,this._errorHandler);this.registerConnectEvents();},_useSSL:function(){var _738=this._url,re=/^http:/i,rep="https:";if(this.url){this.url=this.url.replace(re,rep);}if(_738&&_738.path){_738.path=_738.path.replace(re,rep);}},_encode:function(_739,_73a,_73b){var _73c,type,_73d={},i,p,pl;for(i in _739){if(i==="declaredClass"){continue;}_73c=_739[i];type=typeof _73c;if(_73c!==null&&_73c!==undefined&&type!=="function"){if(lang.isArray(_73c)){_73d[i]=[];pl=_73c.length;for(p=0;p<pl;p++){_73d[i][p]=this._encode(_73c[p]);}}else{if(type==="object"){if(_73c.toJson){var json=_73c.toJson(_73b&&_73b[i]);if(_73c.declaredClass==="esri.tasks.FeatureSet"){if(json.spatialReference){json.sr=json.spatialReference;delete json.spatialReference;}}_73d[i]=_73a?json:_733.toJson(json);}}else{_73d[i]=_73c;}}}}return _73d;},_successHandler:function(args,_73e,_73f,dfd){if(_73e){this[_73e].apply(this,args);}if(_73f){_73f.apply(null,args);}if(dfd){_735._resDfd(dfd,args);}},_errorHandler:function(err,_740,dfd){this.onError(err);if(_740){_740(err);}if(dfd){dfd.errback(err);}},setNormalization:function(_741){this.normalization=_741;},onError:function(){}});if(has("extend-esri")){_734.Task=Task;}return Task;});},"esri/tasks/FeatureSet":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/lang","esri/graphic","esri/SpatialReference","esri/graphicsUtils","esri/geometry/jsonUtils","esri/symbols/jsonUtils"],function(_742,lang,_743,has,_744,_745,_746,_747,_748,_749,_74a){var _74b=_742(null,{declaredClass:"esri.tasks.FeatureSet",constructor:function(json){if(json){lang.mixin(this,json);var _74c=this.features,sr=json.spatialReference,_74d=_749.getGeometryType(json.geometryType);sr=(this.spatialReference=new _747(sr));this.geometryType=json.geometryType;if(json.fields){this.fields=json.fields;}_743.forEach(_74c,function(_74e,i){var _74f=_74e.geometry&&_74e.geometry.spatialReference;_74c[i]=new _746((_74d&&_74e.geometry)?new _74d(_74e.geometry):null,_74e.symbol&&_74a.fromJson(_74e.symbol),_74e.attributes);if(_74c[i].geometry&&!_74f){_74c[i].geometry.setSpatialReference(sr);}});}else{this.features=[];}},displayFieldName:null,geometryType:null,spatialReference:null,fieldAliases:null,toJson:function(_750){var json={};if(this.displayFieldName){json.displayFieldName=this.displayFieldName;}if(this.fields){json.fields=this.fields;}if(this.spatialReference){json.spatialReference=this.spatialReference.toJson();}else{if(this.features[0]&&this.features[0].geometry){json.spatialReference=this.features[0].geometry.spatialReference.toJson();}}if(this.features[0]){if(this.features[0].geometry){json.geometryType=_749.getJsonType(this.features[0].geometry);}json.features=_748._encodeGraphics(this.features,_750);}json.exceededTransferLimit=this.exceededTransferLimit;return _745.fixJson(json);}});if(has("extend-esri")){lang.setObject("tasks.FeatureSet",_74b,_744);}return _74b;});},"dijit/DropDownMenu":function(){require({cache:{"url:dijit/templates/Menu.html":"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t   data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n"}});define("dijit/DropDownMenu",["dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/text!./templates/Menu.html","./_OnDijitClickMixin","./_MenuBase"],function(_751,_752,keys,_753,_754,_755){return _751("dijit.DropDownMenu",[_755,_754],{templateString:_753,baseClass:"dijitMenu",postCreate:function(){this.inherited(arguments);var l=this.isLeftToRight();this._openSubMenuKey=l?keys.RIGHT_ARROW:keys.LEFT_ARROW;this._closeSubMenuKey=l?keys.LEFT_ARROW:keys.RIGHT_ARROW;this.connectKeyNavHandlers([keys.UP_ARROW],[keys.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);_752.stop(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{_752.stop(evt);}break;}}});});},"dojox/grid/cells":function(){define("dojox/grid/cells",["../main","./cells/_base"],function(_756){return _756.grid.cells;});},"dijit/_Widget":function(){define("dijit/_Widget",["dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/has","dojo/_base/kernel","dojo/_base/lang","dojo/query","dojo/ready","./registry","./_WidgetBase","./_OnDijitClickMixin","./_FocusMixin","dojo/uacss","./hccss"],function(_757,_758,_759,_75a,has,_75b,lang,_75c,_75d,_75e,_75f,_760,_761){function _762(){};function _763(_764){return function(obj,_765,_766,_767){if(obj&&typeof _765=="string"&&obj[_765]==_762){return obj.on(_765.substring(2).toLowerCase(),lang.hitch(_766,_767));}return _764.apply(_759,arguments);};};_757.around(_759,"connect",_763);if(_75b.connect){_757.around(_75b,"connect",_763);}var _768=_75a("dijit._Widget",[_75f,_760,_761],{onClick:_762,onDblClick:_762,onKeyDown:_762,onKeyPress:_762,onKeyUp:_762,onMouseDown:_762,onMouseMove:_762,onMouseOut:_762,onMouseOver:_762,onMouseLeave:_762,onMouseEnter:_762,onMouseUp:_762,constructor:function(_769){this._toConnect={};for(var name in _769){if(this[name]===_762){this._toConnect[name.replace(/^on/,"").toLowerCase()]=_769[name];delete _769[name];}}},postCreate:function(){this.inherited(arguments);for(var name in this._toConnect){this.on(name,this._toConnect[name]);}delete this._toConnect;},on:function(type,func){if(this[this._onMap(type)]===_762){return _759.connect(this.domNode,type.toLowerCase(),this,func);}return this.inherited(arguments);},_setFocusedAttr:function(val){this._focused=val;this._set("focused",val);},setAttribute:function(attr,_76a){_75b.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_76a);},attr:function(name,_76b){if(_758.isDebug){var _76c=arguments.callee._ach||(arguments.callee._ach={}),_76d=(arguments.callee.caller||"unknown caller").toString();if(!_76c[_76d]){_75b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_76d,"","2.0");_76c[_76d]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},getDescendants:function(){_75b.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?_75c("[widgetId]",this.containerNode).map(_75e.byNode):[];},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});if(has("dijit-legacy-requires")){_75d(0,function(){var _76e=["dijit/_base"];require(_76e);});}return _768;});},"dojo/cache":function(){define(["./_base/kernel","./text"],function(dojo){return dojo.cache;});},"dijit/_OnDijitClickMixin":function(){define("dijit/_OnDijitClickMixin",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/has","dojo/_base/unload","dojo/_base/window","./a11yclick"],function(on,_76f,keys,_770,has,_771,win,_772){var ret=_770("dijit._OnDijitClickMixin",null,{connect:function(obj,_773,_774){return this.inherited(arguments,[obj,_773=="ondijitclick"?_772:_773,_774]);}});ret.a11yclick=_772;return ret;});},"dijit/_FocusMixin":function(){define("dijit/_FocusMixin",["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(_775,_776,_777,lang){lang.extend(_776,{focused:false,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus();},_onBlur:function(){this.onBlur();}});return _777("dijit._FocusMixin",null,{_focusManager:_775});});},"dijit/_Templated":function(){define("dijit/_Templated",["./_WidgetBase","./_TemplatedMixin","./_WidgetsInTemplateMixin","dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/kernel"],function(_778,_779,_77a,_77b,_77c,lang,_77d){lang.extend(_778,{waiRole:"",waiState:""});return _77c("dijit._Templated",[_779,_77a],{widgetsInTemplate:false,constructor:function(){_77d.deprecated(this.declaredClass+": dijit._Templated deprecated, use dijit._TemplatedMixin and if necessary dijit._WidgetsInTemplateMixin","","2.0");},_attachTemplateNodes:function(_77e,_77f){this.inherited(arguments);var _780=lang.isArray(_77e)?_77e:(_77e.all||_77e.getElementsByTagName("*"));var x=lang.isArray(_77e)?0:-1;for(;x<_780.length;x++){var _781=(x==-1)?_77e:_780[x];var role=_77f(_781,"waiRole");if(role){_781.setAttribute("role",role);}var _782=_77f(_781,"waiState");if(_782){_77b.forEach(_782.split(/\s*,\s*/),function(_783){if(_783.indexOf("-")!=-1){var pair=_783.split("-");_781.setAttribute("aria-"+pair[0],pair[1]);}});}}}});});},"dijit/focus":function(){define("dijit/focus",["dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/Evented","dojo/_base/lang","dojo/on","dojo/ready","dojo/sniff","dojo/Stateful","dojo/_base/unload","dojo/_base/window","dojo/window","./a11y","./registry","./main"],function(_784,_785,dom,_786,_787,_788,lang,on,_789,has,_78a,_78b,win,_78c,a11y,_78d,_78e){var _78f=_785([_78a,_788],{curNode:null,activeStack:[],constructor:function(){var _790=lang.hitch(this,function(node){if(dom.isDescendant(this.curNode,node)){this.set("curNode",null);}if(dom.isDescendant(this.prevNode,node)){this.set("prevNode",null);}});_784.before(_787,"empty",_790);_784.before(_787,"destroy",_790);},registerIframe:function(_791){return this.registerWin(_791.contentWindow,_791);},registerWin:function(_792,_793){var _794=this;var _795=function(evt){_794._justMouseDowned=true;setTimeout(function(){_794._justMouseDowned=false;},0);if(has("ie")&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}_794._onTouchNode(_793||evt.target||evt.srcElement,"mouse");};var doc=has("ie")?_792.document.documentElement:_792.document;if(doc){if(has("ie")){_792.document.body.attachEvent("onmousedown",_795);var _796=function(evt){var tag=evt.srcElement.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}if(a11y.isTabNavigable(evt.srcElement)){_794._onFocusNode(_793||evt.srcElement);}else{_794._onTouchNode(_793||evt.srcElement);}};doc.attachEvent("onfocusin",_796);var _797=function(evt){_794._onBlurNode(_793||evt.srcElement);};doc.attachEvent("onfocusout",_797);return {remove:function(){_792.document.detachEvent("onmousedown",_795);doc.detachEvent("onfocusin",_796);doc.detachEvent("onfocusout",_797);doc=null;}};}else{doc.body.addEventListener("mousedown",_795,true);doc.body.addEventListener("touchstart",_795,true);var _798=function(evt){_794._onFocusNode(_793||evt.target);};doc.addEventListener("focus",_798,true);var _799=function(evt){_794._onBlurNode(_793||evt.target);};doc.addEventListener("blur",_799,true);return {remove:function(){doc.body.removeEventListener("mousedown",_795,true);doc.body.removeEventListener("touchstart",_795,true);doc.removeEventListener("focus",_798,true);doc.removeEventListener("blur",_799,true);doc=null;}};}}},_onBlurNode:function(node){if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);}this._clearFocusTimer=setTimeout(lang.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null);}),0);if(this._justMouseDowned){return;}if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);}this._clearActiveWidgetsTimer=setTimeout(lang.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([]);}),0);},_onTouchNode:function(node,by){if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);delete this._clearActiveWidgetsTimer;}var _79a=[];try{while(node){var _79b=_786.get(node,"dijitPopupParent");if(_79b){node=_78d.byId(_79b).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===win.body()){break;}node=_78c.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_79c=id&&_78d.byId(id);if(_79c&&!(by=="mouse"&&_79c.get("disabled"))){_79a.unshift(id);}node=node.parentNode;}}}}catch(e){}this._setStack(_79a,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);delete this._clearFocusTimer;}this._onTouchNode(node);if(node==this.curNode){return;}this.set("prevNode",this.curNode);this.set("curNode",node);},_setStack:function(_79d,by){var _79e=this.activeStack;this.set("activeStack",_79d);for(var _79f=0;_79f<Math.min(_79e.length,_79d.length);_79f++){if(_79e[_79f]!=_79d[_79f]){break;}}var _7a0;for(var i=_79e.length-1;i>=_79f;i--){_7a0=_78d.byId(_79e[i]);if(_7a0){_7a0._hasBeenBlurred=true;_7a0.set("focused",false);if(_7a0._focusManager==this){_7a0._onBlur(by);}this.emit("widget-blur",_7a0,by);}}for(i=_79f;i<_79d.length;i++){_7a0=_78d.byId(_79d[i]);if(_7a0){_7a0.set("focused",true);if(_7a0._focusManager==this){_7a0._onFocus(by);}this.emit("widget-focus",_7a0,by);}}},focus:function(node){if(node){try{node.focus();}catch(e){}}}});var _7a1=new _78f();_789(function(){var _7a2=_7a1.registerWin(_78c.get(win.doc));if(has("ie")){_78b.addOnWindowUnload(function(){if(_7a2){_7a2.remove();_7a2=null;}});}});_78e.focus=function(node){_7a1.focus(node);};for(var attr in _7a1){if(!/^_/.test(attr)){_78e.focus[attr]=typeof _7a1[attr]=="function"?lang.hitch(_7a1,attr):_7a1[attr];}}_7a1.watch(function(attr,_7a3,_7a4){_78e.focus[attr]=_7a4;});return _7a1;});},"dojox/grid/util":function(){define("dojox/grid/util",["../main","dojo/_base/lang","dojo/dom"],function(_7a5,lang,dom){var dgu=lang.getObject("grid.util",true,_7a5);dgu.na="...";dgu.rowIndexTag="gridRowIndex";dgu.gridViewTag="gridView";dgu.fire=function(ob,ev,args){var fn=ob&&ev&&ob[ev];return fn&&(args?fn.apply(ob,args):ob[ev]());};dgu.setStyleHeightPx=function(_7a6,_7a7){if(_7a7>=0){var s=_7a6.style;var v=_7a7+"px";if(_7a6&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_7a8,_7a9,_7aa,_7ab){var evts=(_7ab?_7ab:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_7a9.connect(_7a8,"on"+evts[i],_7aa);}};dgu.removeNode=function(_7ac){_7ac=dom.byId(_7ac);_7ac&&_7ac.parentNode&&_7ac.parentNode.removeChild(_7ac);return _7ac;};dgu.arrayCompare=function(inA,inB){for(var i=0,l=inA.length;i<l;i++){if(inA[i]!=inB[i]){return false;}}return (inA.length==inB.length);};dgu.arrayInsert=function(_7ad,_7ae,_7af){if(_7ad.length<=_7ae){_7ad[_7ae]=_7af;}else{_7ad.splice(_7ae,0,_7af);}};dgu.arrayRemove=function(_7b0,_7b1){_7b0.splice(_7b1,1);};dgu.arraySwap=function(_7b2,inI,inJ){var _7b3=_7b2[inI];_7b2[inI]=_7b2[inJ];_7b2[inJ]=_7b3;};return dgu;});},"dojox/grid/DataGrid":function(){define("dojox/grid/DataGrid",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/json","dojo/_base/sniff","dojo/_base/declare","./_Grid","./DataSelection","dojo/_base/html"],function(_7b4,_7b5,lang,json,has,_7b6,_7b7,_7b8,html){var _7b9=_7b6("dojox.grid.DataGrid",_7b7,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,keepSelection:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty={};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments);},destroy:function(){this.selection.destroy();this.inherited(arguments);},createSelection:function(){this.selection=new _7b8(this);},get:function(_7ba,_7bb){if(_7bb&&this.field=="_item"&&!this.fields){return _7bb;}else{if(_7bb&&this.fields){var ret=[];var s=this.grid.store;_7b5.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_7bb,f));});return ret;}else{if(!_7bb&&typeof _7ba==="string"){return this.inherited(arguments);}}}return (!_7bb?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_7bb:this.grid.store.getValue(_7bb,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _7bc=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_7bc=true;}if(!this.updating){this.beginUpdate();_7bc=true;}if(_7bc){var _7bd=this;this._endUpdateDelay=setTimeout(function(){delete _7bd._endUpdateDelay;_7bd.endUpdate();},this.updateDelay);}}},_onSet:function(item,_7be,_7bf,_7c0){this._checkUpdateStatus();var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_createItem:function(item,_7c1){var idty=this._hasIdentity?this.store.getIdentity(item):json.toJson(this.query)+":idx:"+_7c1+":sort:"+json.toJson(this.getSortProps());var o=this._by_idty[idty]={idty:idty,item:item};return o;},_addItem:function(item,_7c2,_7c3){this._by_idx[_7c2]=this._createItem(item,_7c2);if(!_7c3){this.updateRow(_7c2);}},_onNew:function(item,_7c4){this._checkUpdateStatus();var _7c5=this.get("rowCount");this._addingItem=true;this.updateRowCount(_7c5+1);this._addingItem=false;this._addItem(item,_7c5);this.showMessage();},_onDelete:function(item){this._checkUpdateStatus();var idx=this._getItemIndex(item,true);if(idx>=0){this._pages=[];this._bop=-1;this._eop=-1;var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.get("rowCount")-1);if(this.get("rowCount")===0){this.showMessage(this.noDataMessage);}}if(this.selection.isSelected(idx)){this.selection.deselect(idx);this.selection.selected.splice(idx,1);}},_onRevert:function(){this._refresh();},setStore:function(_7c6,_7c7,_7c8){if(this._requestsPending(0)){return;}this._setQuery(_7c7,_7c8);this._setStore(_7c6);this._refresh(true);},setQuery:function(_7c9,_7ca){if(this._requestsPending(0)){return;}this._setQuery(_7c9,_7ca);this._refresh(true);},setItems:function(_7cb){this.items=_7cb;this._setStore(this.store);this._refresh(true);},_setQuery:function(_7cc,_7cd){this.query=_7cc;this.queryOptions=_7cd||this.queryOptions;},_setStore:function(_7ce){if(this.store&&this._store_connects){_7b5.forEach(this._store_connects,this.disconnect,this);}this.store=_7ce;if(this.store){var f=this.store.getFeatures();var h=[];this._canEdit=!!f["dojo.data.api.Write"]&&!!f["dojo.data.api.Identity"];this._hasIdentity=!!f["dojo.data.api.Identity"];if(!!f["dojo.data.api.Notification"]&&!this.items){h.push(this.connect(this.store,"onSet","_onSet"));h.push(this.connect(this.store,"onNew","_onNew"));h.push(this.connect(this.store,"onDelete","_onDelete"));}if(this._canEdit){h.push(this.connect(this.store,"revert","_onRevert"));}this._store_connects=h;}},_onFetchBegin:function(size,req){if(!this.scroller){return;}if(this.rowCount!=size){if(req.isRender){this.scroller.init(size,this.keepRows,this.rowsPerPage);this.rowCount=size;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false;}else{this.updateRowCount(size);}}if(!size){this.views.render();this._resize();this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}},_onFetchComplete:function(_7cf,req){if(!this.scroller){return;}if(_7cf&&_7cf.length>0){_7b5.forEach(_7cf,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_7cf.length);if(req.isRender){this.setScrollTop(0);this.postrender();}else{if(this._lastScrollTop){this.setScrollTop(this._lastScrollTop);}}if(has("ie")){html.setSelectable(this.domNode,this.selectable);}}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;}this._pending_requests[req.start]=false;},_onFetchError:function(err,req){console.log(err);delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage);}this._pending_requests[req.start]=false;this.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_7d0,_7d1){_7d0=_7d0||0;if(this.store&&!this._pending_requests[_7d0]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_7d0]=true;try{if(this.items){var _7d2=this.items;var _7d3=this.store;this.rowsPerPage=_7d2.length;var req={start:_7d0,count:this.rowsPerPage,isRender:_7d1};this._onFetchBegin(_7d2.length,req);var _7d4=0;_7b5.forEach(_7d2,function(i){if(!_7d3.isItemLoaded(i)){_7d4++;}});if(_7d4===0){this._onFetchComplete(_7d2,req);}else{var _7d5=function(item){_7d4--;if(_7d4===0){this._onFetchComplete(_7d2,req);}};_7b5.forEach(_7d2,function(i){if(!_7d3.isItemLoaded(i)){_7d3.loadItem({item:i,onItem:_7d5,scope:this});}},this);}}else{this.store.fetch({start:_7d0,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_7d1,onBegin:lang.hitch(this,"_onFetchBegin"),onComplete:lang.hitch(this,"_onFetchComplete"),onError:lang.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_7d0,count:this.rowsPerPage});}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoaded=false;this._isLoading=false;},getItem:function(idx){var data=this._by_idx[idx];if(!data||(data&&!data.item)){this._preparePage(idx);return null;}return data.item;},getItemIndex:function(item){return this._getItemIndex(item,false);},_getItemIndex:function(item,_7d6){if(!_7d6&&!this.store.isItem(item)){return -1;}var idty=this._hasIdentity?this.store.getIdentity(item):null;for(var i=0,l=this._by_idx.length;i<l;i++){var d=this._by_idx[i];if(d&&((idty&&d.idty==idty)||(d.item===item))){return i;}}return -1;},filter:function(_7d7,_7d8){this.query=_7d7;if(_7d8){this._clearData();}this._fetch();},_getItemAttr:function(idx,attr){var item=this.getItem(idx);return (!item?this.fetchText:this.store.getValue(item,attr));},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_7d9){return this._pending_requests[_7d9];},_rowToPage:function(_7da){return (this.rowsPerPage?Math.floor(_7da/this.rowsPerPage):_7da);},_pageToRow:function(_7db){return (this.rowsPerPage?this.rowsPerPage*_7db:_7db);},_preparePage:function(_7dc){if((_7dc<this._bop||_7dc>=this._eop)&&!this._addingItem){var _7dd=this._rowToPage(_7dc);this._needPage(_7dd);this._bop=_7dd*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_7de){if(!this._pages[_7de]){this._pages[_7de]=true;this._requestPage(_7de);}},_requestPage:function(_7df){var row=this._pageToRow(_7df);var _7e0=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_7e0>0){this._requests++;if(!this._requestsPending(row)){setTimeout(lang.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_7e1){return _7e1.field;},_refresh:function(_7e2){this._clearData();this._fetch(0,_7e2);},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){if(this.sortFields){return this.sortFields;}return null;}else{var desc=c["sortDesc"];var si=!(this.sortInfo>0);if(typeof desc=="undefined"){desc=si;}else{desc=si?!desc:desc;}return [{attribute:c.field,descending:desc}];}},styleRowState:function(_7e3){if(this.store&&this.store.getState){var _7e4=this.store.getState(_7e3.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_7e4[s]){c=" dojoxGridRow-"+s;break;}}_7e3.customClasses+=c;}},onStyleRow:function(_7e5){this.styleRowState(_7e5);this.inherited(arguments);},canEdit:function(_7e6,_7e7){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _7e8={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_7e9,_7ea){if(!this._cache[_7ea]){this._cache[_7ea]=this._copyAttr(_7ea,_7e9.field);}this.onStartEdit(_7e9,_7ea);},doApplyCellEdit:function(_7eb,_7ec,_7ed){this.store.fetchItemByIdentity({identity:this._by_idx[_7ec].idty,onItem:lang.hitch(this,function(item){var _7ee=this.store.getValue(item,_7ed);if(typeof _7ee=="number"){_7eb=isNaN(_7eb)?_7eb:parseFloat(_7eb);}else{if(typeof _7ee=="boolean"){_7eb=_7eb=="true"?true:_7eb=="false"?false:_7eb;}else{if(_7ee instanceof Date){var _7ef=new Date(_7eb);_7eb=isNaN(_7ef.getTime())?_7eb:_7ef;}}}this.store.setValue(item,_7ed,_7eb);this.onApplyCellEdit(_7eb,_7ec,_7ed);})});},doCancelEdit:function(_7f0){var _7f1=this._cache[_7f0];if(_7f1){this.updateRow(_7f0);delete this._cache[_7f0];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_7f2,_7f3){var _7f4=this._cache[_7f2];this.onApplyEdit(_7f2);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=lang.hitch(this,function(_7f5){if(_7f5.length){_7b5.forEach(_7f5,this.store.deleteItem,this.store);this.selection.clear();}});if(this.allItemsSelected){this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:fx});}else{fx(this.selection.getSelected());}}}});_7b9.cell_markupFactory=function(_7f6,node,_7f7){var _7f8=lang.trim(html.attr(node,"field")||"");if(_7f8){_7f7.field=_7f8;}_7f7.field=_7f7.field||_7f7.name;var _7f9=lang.trim(html.attr(node,"fields")||"");if(_7f9){_7f7.fields=_7f9.split(",");}if(_7f6){_7f6(node,_7f7);}};_7b9.markupFactory=function(_7fa,node,ctor,_7fb){return _7b7.markupFactory(_7fa,node,ctor,lang.partial(_7b9.cell_markupFactory,_7fb));};return _7b9;});},"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n","dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(lang,_7fc){var _7fd={};lang.setObject("dojo.date.stamp",_7fd);_7fd.fromISOString=function(_7fe,_7ff){if(!_7fd._isoRegExp){_7fd._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _800=_7fd._isoRegExp.exec(_7fe),_801=null;if(_800){_800.shift();if(_800[1]){_800[1]--;}if(_800[6]){_800[6]*=1000;}if(_7ff){_7ff=new Date(_7ff);_7fc.forEach(_7fc.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _7ff["get"+prop]();}),function(_802,_803){_800[_803]=_800[_803]||_802;});}_801=new Date(_800[0]||1970,_800[1]||0,_800[2]||1,_800[3]||0,_800[4]||0,_800[5]||0,_800[6]||0);if(_800[0]<100){_801.setFullYear(_800[0]||1970);}var _804=0,_805=_800[7]&&_800[7].charAt(0);if(_805!="Z"){_804=((_800[8]||0)*60)+(Number(_800[9])||0);if(_805!="-"){_804*=-1;}}if(_805){_804-=_801.getTimezoneOffset();}if(_804){_801.setTime(_801.getTime()+_804*60000);}}return _801;};_7fd.toISOString=function(_806,_807){var _808=function(n){return (n<10)?"0"+n:n;};_807=_807||{};var _809=[],_80a=_807.zulu?"getUTC":"get",date="";if(_807.selector!="time"){var year=_806[_80a+"FullYear"]();date=["0000".substr((year+"").length)+year,_808(_806[_80a+"Month"]()+1),_808(_806[_80a+"Date"]())].join("-");}_809.push(date);if(_807.selector!="date"){var time=[_808(_806[_80a+"Hours"]()),_808(_806[_80a+"Minutes"]()),_808(_806[_80a+"Seconds"]())].join(":");var _80b=_806[_80a+"Milliseconds"]();if(_807.milliseconds){time+="."+(_80b<100?"0":"")+_808(_80b);}if(_807.zulu){time+="Z";}else{if(_807.selector!="time"){var _80c=_806.getTimezoneOffset();var _80d=Math.abs(_80c);time+=(_80c>0?"-":"+")+_808(Math.floor(_80d/60))+":"+_808(_80d%60);}}_809.push(time);}return _809.join("T");};return _7fd;});},"dojox/grid/_FocusManager":function(){define("dojox/grid/_FocusManager",["dojo/_base/array","dojo/_base/lang","dojo/_base/declare","dojo/_base/connect","dojo/_base/event","dojo/_base/sniff","dojo/query","./util","dojo/_base/html"],function(_80e,lang,_80f,_810,_811,has,_812,util,html){return _80f("dojox.grid._FocusManager",null,{constructor:function(_813){this.grid=_813;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(_810.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(_810.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(_810.connect(this.grid.domNode,"mousedown",this,"_mouseDown"));this._connects.push(_810.connect(this.grid.domNode,"mouseup",this,"_mouseUp"));this._connects.push(_810.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(_810.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(_810.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(_810.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(_810.connect(this.grid,"postrender",this,"_delayedHeaderFocus"));},destroy:function(){_80e.forEach(this._connects,_810.disconnect);_80e.forEach(this._headerConnects,_810.disconnect);delete this.grid;delete this.cell;},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders();},isFocusCell:function(_814,_815){return (this.cell==_814)&&(this.rowIndex==_815);},isLastFocusCell:function(){if(this.cell){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);}return false;},isFirstFocusCell:function(){if(this.cell){return (this.rowIndex===0)&&(this.cell.index===0);}return false;},isNoFocusCell:function(){return (this.rowIndex<0)||!this.cell;},isNavHeader:function(){return (!!this._colHeadNode);},getHeaderIndex:function(){if(this._colHeadNode){return _80e.indexOf(this._findHeaderCells(),this._colHeadNode);}else{return -1;}},_focusifyCellNode:function(_816){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){html.toggleClass(n,this.focusClass,_816);if(_816){var sl=this.scrollIntoView();try{if(has("webkit")||!this.grid.edit.isEditing()){util.fire(n,"focus");if(sl){this.cell.view.scrollboxNode.scrollLeft=sl;}}}catch(e){}}}},_delayedCellFocus:function(){if(this.isNavHeader()||!this.grid.focused){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){html.toggleClass(n,this.focusClass,true);if(this._colHeadNode){this.blurHeader();}util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();}},_initColumnHeaders:function(){_80e.forEach(this._headerConnects,_810.disconnect);this._headerConnects=[];var _817=this._findHeaderCells();for(var i=0;i<_817.length;i++){this._headerConnects.push(_810.connect(_817[i],"onfocus",this,"doColHeaderFocus"));this._headerConnects.push(_810.connect(_817[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _818=_812("th",this.grid.viewsHeaderNode);var _819=[];for(var i=0;i<_818.length;i++){var _81a=_818[i];var _81b=html.hasAttr(_81a,"tabIndex");var _81c=html.attr(_81a,"tabIndex");if(_81b&&_81c<0){_819.push(_81a);}}return _819;},_setActiveColHeader:function(_81d,_81e,_81f){this.grid.domNode.setAttribute("aria-activedescendant",_81d.id);if(_81f!=null&&_81f>=0&&_81f!=_81e){html.toggleClass(this._findHeaderCells()[_81f],this.focusClass,false);}html.toggleClass(_81d,this.focusClass,true);this._colHeadNode=_81d;this._colHeadFocusIdx=_81e;this._scrollHeader(this._colHeadFocusIdx);},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info||!info.s){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);if(info.n&&info.sr){if(info.n.offsetLeft+info.n.offsetWidth>info.sr.l+info.sr.w){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}}}if(info.r&&info.sr){if(rt+info.r.offsetHeight>info.sr.t+info.sr.h){this.grid.setScrollTop(rt+info.r.offsetHeight-info.sr.h);}else{if(rt<info.sr.t){this.grid.setScrollTop(rt);}}}return info.s.scrollLeft;},_scrollInfo:function(cell,_820){if(cell){var cl=cell,sbn=cl.view.scrollboxNode,sbnr={w:sbn.clientWidth,l:sbn.scrollLeft,t:sbn.scrollTop,h:sbn.clientHeight},rn=cl.view.getRowNode(this.rowIndex);return {c:cl,s:sbn,sr:sbnr,n:(_820?_820:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_821){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_821);if(!cell){return;}info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _822=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_822){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}else{if(has("ie")<=7&&cell&&cell.view.headerNode){cell.view.headerNode.scrollLeft=info.s.scrollLeft;}}}}},_isHeaderHidden:function(){var _823=this.focusView;if(!_823){for(var i=0,_824;(_824=this.grid.views.views[i]);i++){if(_824.headerNode){_823=_824;break;}}}return (_823&&html.getComputedStyle(_823.headerNode).display=="none");},colSizeAdjust:function(e,_825,_826){var _827=this._findHeaderCells();var view=this.focusView;if(!view||!view.header.tableMap.map){for(var i=0,_828;(_828=this.grid.views.views[i]);i++){if(_828.header.tableMap.map){view=_828;break;}}}var _829=_827[_825];if(!view||(_825==_827.length-1&&_825===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_829;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _82a={l:_826};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_82a);view.update();}},styleRow:function(_82b){return;},setFocusIndex:function(_82c,_82d){this.setFocusCell(this.grid.getCell(_82d),_82c);},setFocusCell:function(_82e,_82f){if(_82e&&!this.isFocusCell(_82e,_82f)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_82e;this.rowIndex=_82f;this._focusifyCellNode(true);}if(has("opera")){setTimeout(lang.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);}else{this.grid.onCellFocus(this.cell,this.rowIndex);}},next:function(){if(this.cell){var row=this.rowIndex,col=this.cell.index+1,cc=this.grid.layout.cellCount-1,rc=this.grid.rowCount-1;if(col>cc){col=0;row++;}if(row>rc){col=cc;row=rc;}if(this.grid.edit.isEditing()){var _830=this.grid.getCell(col);if(!this.isLastFocusCell()&&(!_830.editable||this.grid.canEdit&&!this.grid.canEdit(_830,row))){this.cell=_830;this.rowIndex=row;this.next();return;}}this.setFocusIndex(row,col);}},previous:function(){if(this.cell){var row=(this.rowIndex||0),col=(this.cell.index||0)-1;if(col<0){col=this.grid.layout.cellCount-1;row--;}if(row<0){row=0;col=0;}if(this.grid.edit.isEditing()){var _831=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_831.editable){this.cell=_831;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_832,_833){var _834=_833<0?-1:1;if(this.isNavHeader()){var _835=this._findHeaderCells();var _836=currentIdx=_80e.indexOf(_835,this._colHeadNode);currentIdx+=_833;while(currentIdx>=0&&currentIdx<_835.length&&_835[currentIdx].style.display=="none"){currentIdx+=_834;}if((currentIdx>=0)&&(currentIdx<_835.length)){this._setActiveColHeader(_835[currentIdx],currentIdx,_836);}}else{if(this.cell){var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_832));if(_832){if(_832>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_832<0){if(row<=sc.getPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop-sc.findScrollTop(r)-sc.findScrollTop(row));}}}}var cc=this.grid.layout.cellCount-1,i=this.cell.index,col=Math.min(cc,Math.max(0,i+_833));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_834;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}var n=cell.getNode(row);if(!n&&_832){if((row+_832)>=0&&(row+_832)<=rc){this.move(_832>0?++_832:--_832,_833);}return;}else{if((!n||html.style(n,"display")==="none")&&_833){if((col+_833)>=0&&(col+_833)<=cc){this.move(_832,_833>0?++_833:--_833);}return;}}this.setFocusIndex(row,col);if(_832){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){_811.stop(e);this.previous();}else{if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();_811.stop(e);}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){html.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null;}this._focusifyCellNode(false);}}},nextKey:function(e){var _837=(this.grid.rowCount===0);if(e.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();_811.stop(e);}else{if(this.isNavHeader()){this.blurHeader();if(!this.findAndFocusGridCell()){this.tabOut(this.grid.lastFocusNode);}this._colHeadNode=this._colHeadFocusIdx=null;}else{if(this.grid.edit.isEditing()){_811.stop(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_838){this.tabbingOut=true;_838.focus();},focusGridView:function(){util.fire(this.focusView,"focus");},focusGrid:function(_839){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _83a=true;var _83b=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_83b){var _83c=0;var cell=this.grid.getCell(_83c);if(cell.hidden){_83c=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_83c);}else{if(this.cell&&!_83b){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_83a=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _83a;},focusHeader:function(){var _83d=this._findHeaderCells();var _83e=this._colHeadFocusIdx;if(this._isHeaderHidden()){this.findAndFocusGridCell();}else{if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}}this._colHeadNode=_83d[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_83d.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_83d[this._colHeadFocusIdx];}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode;}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,_83e);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false);}else{this.findAndFocusGridCell();}},blurHeader:function(){html.removeClass(this._colHeadNode,this.focusClass);html.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var _83f=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_83f);this._contextMenuBindNode=_83f;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){_811.stop(e);return;}if(this._clickFocus){return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;_811.stop(e);},doBlur:function(e){_811.stop(e);},doContextMenu:function(e){if(!this.headerMenu){_811.stop(e);}},doLastNodeFocus:function(e){if(this.tabbingOut){this._focusifyCellNode(false);}else{if(this.grid.rowCount>0){if(this.isNoFocusCell()){this.setFocusIndex(0,0);}this._focusifyCellNode(true);}else{this.focusHeader();}}this.tabbingOut=false;_811.stop(e);},doLastNodeBlur:function(e){_811.stop(e);},doColHeaderFocus:function(e){this._setActiveColHeader(e.target,html.attr(e.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());_811.stop(e);},doColHeaderBlur:function(e){html.toggleClass(e.target,this.focusClass,false);},_mouseDown:function(e){this._clickFocus=dojo.some(this.grid.views.views,function(v){return v.scrollboxNode===e.target;});},_mouseUp:function(e){this._clickFocus=false;}});});},"esri/layers/SnapshotMode":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/SpatialReference","esri/tasks/query","esri/layers/RenderMode"],function(_840,lang,has,_841,_842,_843,_844){var _845=_840([_844],{declaredClass:"esri.layers._SnapshotMode",constructor:function(_846){this.featureLayer=_846;this._featureMap={};this._drawFeatures=lang.hitch(this,this._drawFeatures);this._queryErrorHandler=lang.hitch(this,this._queryErrorHandler);},startup:function(){if(this.featureLayer._collection){this._applyTimeFilter();}else{this._fetchAll();}},propertyChangeHandler:function(type){if(this._init){if(type){if(this.featureLayer._collection){console.log("FeatureLayer: layer created by value (from a feature collection) does not support definition expressions and time definitions. Layer id = "+this.featureLayer.id);}else{this._fetchAll();}}else{this._applyTimeFilter();}}},drawFeature:function(_847){var _848=this.featureLayer,_849=_848.objectIdField,oid=_847.attributes[_849];this._addFeatureIIf(oid,_847);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _84a=this.featureLayer;if(_84a._collection){_84a._fireUpdateStart();_84a._refresh(true);_84a._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_84b){var id="_"+_84b.name+_84b.layerId+_84b._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _84c=this.featureLayer;if(_84c._collection){return;}_84c._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_84d=this.featureLayer,_84e=_84d.getDefinitionExpression();var _84f=new _843();_84f.outFields=_84d.getOutFields();_84f.where=_84e||"1=1";_84f.returnGeometry=true;_84f.outSpatialReference=new _842(map.spatialReference.toJson());_84f.timeExtent=_84d.getTimeDefinition();_84f.maxAllowableOffset=_84d._maxOffset;if(_84d._ts){_84f._ts=(new Date()).getTime();}var _850;if(_84d._usePatch){_850=this._getRequestId(_84d);this._cancelPendingRequest(null,_850);}_84d._task.execute(_84f,this._drawFeatures,this._queryErrorHandler,_850);},_drawFeatures:function(_851){this._purgeRequests();var _852=_851.features,_853=this.featureLayer,_854=_853.objectIdField,i,len=_852.length,_855,oid;for(i=0;i<len;i++){_855=_852[i];oid=_855.attributes[_854];this._addFeatureIIf(oid,_855);this._incRefCount(oid);}this._applyTimeFilter(true);_853._fireUpdateEnd(null,_851.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_851.exceededTransferLimit){_853.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _856=this.featureLayer;_856._errorHandler(err);_856._fireUpdateEnd(err);}});if(has("extend-esri")){lang.setObject("layers._SnapshotMode",_845,_841);}return _845;});},"url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n","dijit/MenuItem":function(){require({cache:{"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"}});define("dijit/MenuItem",["dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/kernel","dojo/sniff","./_Widget","./_TemplatedMixin","./_Contained","./_CssStateMixin","dojo/text!./templates/MenuItem.html"],function(_857,dom,_858,_859,_85a,has,_85b,_85c,_85d,_85e,_85f){return _857("dijit.MenuItem",[_85b,_85c,_85d,_85e],{templateString:_85f,baseClass:"dijitMenuItem",label:"",_setLabelAttr:function(val){this.containerNode.innerHTML=val;this._set("label",val);if(this.textDir==="auto"){this.applyTextDir(this.focusNode,this.label);}},iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:false,_fillContent:function(_860){if(_860&&!("label" in this.params)){this.set("label",_860.innerHTML);}},buildRendering:function(){this.inherited(arguments);var _861=this.id+"_text";_858.set(this.containerNode,"id",_861);if(this.accelKeyNode){_858.set(this.accelKeyNode,"id",this.id+"_accel");_861+=" "+this.id+"_accel";}this.domNode.setAttribute("aria-labelledby",_861);dom.setSelectable(this.domNode,false);},onClick:function(){},focus:function(){try{if(has("ie")==8){this.containerNode.focus();}this.focusNode.focus();}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_862){_859.toggle(this.domNode,"dijitMenuItemSelected",_862);},setLabel:function(_863){_85a.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_863);},setDisabled:function(_864){_85a.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_864);},_setDisabledAttr:function(_865){this.focusNode.setAttribute("aria-disabled",_865?"true":"false");this._set("disabled",_865);},_setAccelKeyAttr:function(_866){this.accelKeyNode.style.display=_866?"":"none";this.accelKeyNode.innerHTML=_866;_858.set(this.containerNode,"colSpan",_866?"1":"2");this._set("accelKey",_866);},_setTextDirAttr:function(_867){if(!this._created||this.textDir!=_867){this._set("textDir",_867);this.applyTextDir(this.focusNode,this.label);}}});});},"url:dijit/templates/Menu.html":"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t   data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n","esri/tasks/SpatialRelationship":function(){define("esri/tasks/SpatialRelationship",["dojo/_base/lang","dojo/has","esri/kernel"],function(lang,has,_868){var _869={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"};if(has("extend-esri")){lang.setObject("tasks._SpatialRelationship",_869,_868);}return _869;});},"dijit/_MenuBase":function(){define("dijit/_MenuBase",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/lang","dojo/mouse","dojo/on","dojo/window","./a11yclick","./popup","./registry","./_Widget","./_KeyNavContainer","./_TemplatedMixin"],function(_86a,_86b,dom,_86c,_86d,lang,_86e,on,_86f,_870,pm,_871,_872,_873,_874){return _86b("dijit._MenuBase",[_872,_874,_873],{parentMenu:null,popupDelay:500,autoFocus:false,childSelector:function(node){var _875=_871.byNode(node);return node.parentNode==this.containerNode&&_875&&_875.focus;},postCreate:function(){var self=this,_876=typeof this.childSelector=="string"?this.childSelector:lang.hitch(this,"childSelector");this.own(on(this.containerNode,on.selector(_876,_86e.enter),function(){self.onItemHover(_871.byNode(this));}),on(this.containerNode,on.selector(_876,_86e.leave),function(){self.onItemUnhover(_871.byNode(this));}),on(this.containerNode,on.selector(_876,_870),function(evt){self.onItemClick(_871.byNode(this),evt);evt.stopPropagation();evt.preventDefault();}));this.inherited(arguments);},onExecute:function(){},onCancel:function(){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.onItemClick(this.focusedChild,evt);}else{var _877=this._getTopMenu();if(_877&&_877._isMenuBar){_877.focusNext();}}},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _878=this.currentPopup.parentMenu;if(_878.focusedChild){_878.focusedChild._setSelected(false);}_878.focusedChild=this.currentPopup.from_item;_878.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=this.defer("_openPopup",this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;item._set("hovering",true);},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _879=item.popup;if(_879){this._stopPendingCloseTimer(_879);_879._pendingClose_timer=this.defer(function(){_879._pendingClose_timer=null;if(_879.parentMenu){_879.parentMenu.currentPopup=null;}pm.close(_879);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}item._set("hovering",false);},_stopPopupTimer:function(){if(this.hover_timer){this.hover_timer=this.hover_timer.remove();}},_stopPendingCloseTimer:function(_87a){if(_87a._pendingClose_timer){_87a._pendingClose_timer=_87a._pendingClose_timer.remove();}},_stopFocusTimer:function(){if(this._focus_timer){this._focus_timer=this._focus_timer.remove();}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.disabled){return false;}if(item.popup){this._openPopup(evt.type=="keypress");}else{this.onExecute();item._onClick?item._onClick(evt):item.onClick(evt);}},_openPopup:function(_87b){this._stopPopupTimer();var _87c=this.focusedChild;if(!_87c){return;}var _87d=_87c.popup;if(!_87d.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);pm.close(this.currentPopup);}_87d.parentMenu=this;_87d.from_item=_87c;var self=this;pm.open({parent:this,popup:_87d,around:_87c.domNode,orient:this._orient||["after","before"],onCancel:function(){self.focusChild(_87c);self._cleanUp();_87c._setSelected(true);self.focusedChild=_87c;},onExecute:lang.hitch(this,"_cleanUp")});this.currentPopup=_87d;_87d.connect(_87d.domNode,"onmouseenter",lang.hitch(self,"_onPopupHover"));}if(_87b&&_87d.focus){_87d._focus_timer=this.defer(lang.hitch(_87d,function(){this._focus_timer=null;this.focus();}));}},_markActive:function(){this.isActive=true;_86d.replace(this.domNode,"dijitMenuActive","dijitMenuPassive");},onOpen:function(){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;_86d.replace(this.domNode,"dijitMenuPassive","dijitMenuActive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){if(_86a.indexOf(this._focusManager.activeStack,this.id)>=0){_86c.set(this.focusedChild.focusNode,"tabIndex",this.tabIndex);this.focusedChild.focusNode.focus();}pm.close(this.currentPopup);this.currentPopup=null;}if(this.focusedChild){this.focusedChild._setSelected(false);this.onItemUnhover(this.focusedChild);this.focusedChild=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this.onItemUnhover(this._hoveredChild);}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});});},"dijit/_TemplatedMixin":function(){define("dijit/_TemplatedMixin",["dojo/_base/lang","dojo/touch","./_WidgetBase","dojo/string","dojo/cache","dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/sniff","dojo/_base/unload"],function(lang,_87e,_87f,_880,_881,_882,_883,_884,has,_885){var _886=_883("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _887=this.declaredClass,_888=this;return _880.substitute(tmpl,this,function(_889,key){if(key.charAt(0)=="!"){_889=lang.getObject(key.substr(1),false,_888);}if(typeof _889=="undefined"){throw new Error(_887+" template:"+key);}if(_889==null){return "";}return key.charAt(0)=="!"?_889:_889.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){if(!this.templateString){this.templateString=_881(this.templatePath,{sanitize:true});}var _88a=_886.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument);var node;if(lang.isString(_88a)){node=_884.toDom(this._stringRepl(_88a),this.ownerDocument);if(node.nodeType!=1){throw new Error("Invalid template: "+_88a);}}else{node=_88a.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node,function(n,p){return n.getAttribute(p);});this._beforeFillContent();this._fillContent(this.srcNodeRef);},_beforeFillContent:function(){},_fillContent:function(_88b){var dest=this.containerNode;if(_88b&&dest){while(_88b.hasChildNodes()){dest.appendChild(_88b.firstChild);}}},_attachTemplateNodes:function(_88c,_88d){var _88e=lang.isArray(_88c)?_88c:(_88c.all||_88c.getElementsByTagName("*"));var x=lang.isArray(_88c)?0:-1;for(;x<0||_88e[x];x++){var _88f=(x==-1)?_88c:_88e[x];if(this.widgetsInTemplate&&(_88d(_88f,"dojoType")||_88d(_88f,"data-dojo-type"))){continue;}var _890=_88d(_88f,"dojoAttachPoint")||_88d(_88f,"data-dojo-attach-point");if(_890){var _891,_892=_890.split(/\s*,\s*/);while((_891=_892.shift())){if(lang.isArray(this[_891])){this[_891].push(_88f);}else{this[_891]=_88f;}this._attachPoints.push(_891);}}var _893=_88d(_88f,"dojoAttachEvent")||_88d(_88f,"data-dojo-attach-event");if(_893){var _894,_895=_893.split(/\s*,\s*/);var trim=lang.trim;while((_894=_895.shift())){if(_894){var _896=null;if(_894.indexOf(":")!=-1){var _897=_894.split(":");_894=trim(_897[0]);_896=trim(_897[1]);}else{_894=trim(_894);}if(!_896){_896=_894;}this._attachEvents.push(this.connect(_88f,_87e[_894]||_894,_896));}}}}},destroyRendering:function(){_882.forEach(this._attachPoints,function(_898){delete this[_898];},this);this._attachPoints=[];_882.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_886._templateCache={};_886.getCachedTemplate=function(_899,_89a,doc){var _89b=_886._templateCache;var key=_899;var _89c=_89b[key];if(_89c){try{if(!_89c.ownerDocument||_89c.ownerDocument==(doc||document)){return _89c;}}catch(e){}_884.destroy(_89c);}_899=_880.trim(_899);if(_89a||_899.match(/\$\{([^\}]+)\}/g)){return (_89b[key]=_899);}else{var node=_884.toDom(_899,doc);if(node.nodeType!=1){throw new Error("Invalid template: "+_899);}return (_89b[key]=node);}};if(has("ie")){_885.addOnWindowUnload(function(){var _89d=_886._templateCache;for(var key in _89d){var _89e=_89d[key];if(typeof _89e=="object"){_884.destroy(_89e);}delete _89d[key];}});}lang.extend(_87f,{dojoAttachEvent:"",dojoAttachPoint:""});return _886;});},"esri/dijit/editing/TemplatePicker":function(){define(["require","dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/html","dojo/_base/array","dojo/_base/json","dojo/_base/kernel","dojo/has","dojo/query","dojo/sniff","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dijit/_Widget","dijit/_Templated","dojo/data/ItemFileReadStore","dojox/grid/DataGrid","dojox/gfx","esri/layers/FeatureLayer","esri/symbols/PictureMarkerSymbol","esri/dijit/editing/TemplatePickerItem","esri/kernel","esri/lang","esri/request","esri/dijit/_EventedWidget","dojo/i18n!esri/nls/jsapi","dojo/text!esri/dijit/editing/templates/TemplatePicker.html"],function(_89f,_8a0,lang,_8a1,html,_8a2,_8a3,_8a4,has,_8a5,_8a6,_8a7,_8a8,_8a9,_8aa,_8ab,_8ac,_8ad,_8ae,gfx,_8af,_8b0,_8b1,_8b2,_8b3,_8b4,_8b5,_8b6,_8b7){var TP=_8a0([_8b5,_8ab,_8ac],{declaredClass:"esri.dijit.editing.TemplatePicker",widgetsInTemplate:true,templateString:_8b7,basePath:_89f.toUrl("esri/dijit/editing")+"/",featureLayers:null,items:null,grouping:true,showTooltip:false,maxLabelLength:0,rows:4,_rows:0,columns:3,surfaceWidth:30,surfaceHeight:30,emptyMessage:"",useLegend:true,legendCache:{},_uniqueId:{id:0},_assumedCellWidth:90,_initialAutoWidth:300,_initialAutoHeight:200,_ieTimer:150,constructor:function(_8b8,_8b9){_8b8=_8b8||{};if(!_8b8.items&&!_8b8.featureLayers){console.error("TemplatePicker: please provide 'featureLayers' or 'items' parameter in the constructor");}this._dojo14x=(_8a4.version.minor>=4);this._itemWidgets={};if(_8b8.featureLayers&&_8b8.featureLayers.length){this._flChanged=1;}this._nls=_8b6.widgets.templatePicker;this.emptyMessage=_8b8.emptyMessage||(this._nls&&this._nls.creationDisabled)||"";},postMixInProperties:function(){this.inherited(arguments);this._preprocess();},startup:function(){this.inherited(arguments);if(this.rows==="auto"&&this.columns==="auto"){var box=_8a9.getContentBox(this.domNode);if(!box.w){this.domNode.style.width=this._initialAutoWidth+"px";}if(!box.h){this.domNode.style.height=this._initialAutoHeight+"px";}box=_8a9.getContentBox(this.domNode);this._columns=Math.floor(box.w/this._assumedCellWidth)||1;}this._applyGridPatches();this._setGridLayout();_8a1.connect(this.grid,"onRowClick",this,this._rowClicked);this._setGridData();this._toggleTooltip();if(has("ie")<9){this._repaintItems=lang.hitch(this,this._repaintItems);setTimeout(this._repaintItems,this._ieTimer);}},destroy:function(){this.showTooltip=false;this._toggleTooltip();this._clearLegendInfo();this.featureLayers=this.items=this.grid=this._flItems=this._itItems=this._groupRowIndices=this._selectedCell=this._selectedInfo=this._selectedItem=null;this.inherited(arguments);},getSelected:function(){return this._selectedCell?this._selectedItem:null;},clearSelection:function(){var _8ba=this._selectedCell,info=this._selectedInfo;if(_8ba){this._rowClicked({cellNode:_8ba,rowIndex:info.selRow,cellIndex:info.selCol});}},update:function(_8bb){var _8bc=(this.rows==="auto"&&this.columns==="auto"&&_8bb)?true:false,grid=this.grid,box;if(_8bc){var _8bd=this.domNode,id=_8bd.id,_8be,item=_8a4.query("#"+id+".templatePicker div.item")[0];box=_8a9.getContentBox(_8bd);item=item&&item.parentNode;if(item){_8be=html.coords(item).w;}else{_8be=this._assumedCellWidth;}this._columns=Math.floor((box.w-grid.views.views[0].getScrollbarWidth())/_8be);this._columns=this._columns||1;}var _8bf=this._rows;this._preprocess();var _8c0=this._rows;this._setGridLayout();this._setGridData();if(_8c0!==_8bf){grid.set("autoHeight",this._rows,false);}if(_8bc){grid._resize({w:box.w,h:box.h});grid.viewsHeaderNode.style.display="none";}else{grid.update();}this._toggleTooltip();var self=this,_8c1=this.getSelected();if(_8c1){grid.store.fetch({onComplete:function(its){var _8c2=self._locate(_8c1,self._selectedInfo,its);var _8c3=_8c2&&grid.views.views[0].getCellNode(_8c2[0],_8c2[1]);if(_8c3){self._rowClicked({cellNode:_8c3,rowIndex:_8c2[0],cellIndex:_8c2[1]},true);}}});}if(has("ie")<9){setTimeout(this._repaintItems,this._ieTimer);}var _8c4=this.featureLayers,_8c5=this.items;if((!_8c4||!_8c4.length)&&(!_8c5||!_8c5.length)&&grid&&this.emptyMessage){grid.showMessage(this.emptyMessage);}},_eventMap:{"selection-change":true},onSelectionChange:function(){},_setUseLegendAttr:function(use){var _8c6=this.useLegend;if(!this._started||_8c6!==use){if(use){this._flChanged=1;}else{this._clearLegendInfo();}}this.useLegend=use;},_setFeatureLayersAttr:function(_8c7){var _8c8=this.featureLayers;if(!this._started||_8c8!==_8c7){this._flChanged=1;}this.featureLayers=_8c7;},_adjustRowsCols:function(_8c9){if(this.rows==="auto"&&this.columns==="auto"){if(!this._started){this._rows=false;this._columns=null;this._autoWidth=false;}return;}var len=0;this._rows=this.rows;this._columns=this.columns;if(this.rows==="auto"){if(this.featureLayers){if(this.grouping){len=_8c9.length;_8a2.forEach(_8c9,function(_8ca){len+=Math.ceil(_8ca.length/this.columns);},this);}else{_8a2.forEach(_8c9,function(_8cb){len+=_8cb.length;},this);len=Math.ceil(len/this.columns);}}else{len=Math.ceil(_8c9.length/this.columns);}this._rows=len;}else{if(this.columns==="auto"){if(this.featureLayers){if(this.grouping){len=3;}else{_8a2.forEach(_8c9,function(_8cc){len+=_8cc.length;},this);len=Math.ceil(len/this.rows);}}else{len=Math.ceil(_8c9.length/this.rows);}this._columns=len;}}},_preprocess:function(){if(this.items){this.grouping=false;}this._autoWidth=false;if(this.rows==="auto"||this.columns==="auto"){this._autoWidth=true;}var _8cd;if(this.featureLayers){if(this.useLegend&&this._flChanged){this._legendIndices=[];this._loadingIndices=[];this._legendSymbols={};this._ignoreLegends();this._loadingLegends=[];clearTimeout(this._legendTimer);this._legendTimer=null;this._processSelectionLayers();this._flChanged=0;}if(_8a2.every(this.featureLayers,function(_8ce){return _8ce.loaded;})){_8cd=this._flItems=this._getItemsFromLayers(this.featureLayers);this._adjustRowsCols(_8cd);}else{var _8cf=this.featureLayers.length;var _8d0=[];_8a2.forEach(this.featureLayers,function(_8d1){if(_8d1.loaded){_8cf--;_8d0.push(_8d1);}else{var _8d2=_8a1.connect(_8d1,"onLoad",this,function(_8d3){_8a1.disconnect(_8d2);_8d2=null;_8cf--;_8d0.push(_8d3);if(!_8cf){_8cd=this._flItems=this._getItemsFromLayers(_8d0);this._adjustRowsCols(_8cd);this.update();}});}},this);}}else{_8cd=this._itItems=this._getItemsFromItems(this.items);this._adjustRowsCols(_8cd);}},_processSelectionLayers:function(){var map,_8d4,info,_8d5,key,_8d6,_8d7,_8d8={};_8a2.forEach(this.featureLayers,function(_8d9,idx){if(_8d9.mode===_8af.MODE_SELECTION&&_8d9._map&&_8d9.url&&_8d9._params.drawMode&&!_8d9.source){_8d4=lang.trim(_8d9._url.path).replace(/\/(MapServer|FeatureServer).*/ig,"/MapServer").replace(/^https?:\/\//ig,"").toLowerCase();info=(_8d8[_8d4]=_8d8[_8d4]||{});_8d5=(info.featureLayers=info.featureLayers||{});_8d6=(info.indices=info.indices||[]);_8d5[idx]=_8d9;_8d6.push(idx);map=_8d9._map;}});if(map){_8a2.forEach(map.layerIds,function(_8da){_8da=map.getLayer(_8da);if(_8da&&_8da.url&&(_8da.getImageUrl||_8da.getTileUrl)&&_8da.loaded&&_8da.version>=10.1){_8d4=lang.trim(_8da._url.path).replace(/(\/MapServer).*/ig,"$1");key=_8d4.replace(/^https?:\/\//ig,"").toLowerCase();if(_8d8[key]&&(!_8d8[key].mapServiceUrl)){info=_8d8[key];info.mapServiceUrl=_8d4;info.mapServiceLayer=_8da;this._legendIndices=this._legendIndices.concat(info.indices);_8d7=this._fetchLegend({pickerInstance:this,info:info},key);if(_8d7.then){this._loadingIndices=this._loadingIndices.concat(info.indices);this._loadingLegends.push(_8d7);}else{this._processLegendResponse(_8d7,info);}}}},this);}},_fetchLegend:function(_8db,key){var _8dc=TP.prototype,_8dd=_8dc.legendCache[key];if(!_8dd){_8dd=(_8dc.legendCache[key]=_8b4({url:_8db.info.mapServiceUrl+"/legend",content:{f:"json"},callbackParamName:"callback"}));_8dd._contexts=[_8db];_8dd.addBoth(function(_8de){if(_8dd.canceled){return;}_8dc.legendCache[key]=_8de;var _8df=_8dd._contexts;_8dd._contexts=null;_8a2.forEach(_8df,function(ctxt){var _8e0=ctxt.pickerInstance,info=ctxt.info,_8e1;if(_8e0._destroyed){return;}_8a2.forEach(info.indices,function(idx){_8e1=_8a2.indexOf(_8e0._loadingIndices,idx);if(_8e1>-1){_8e0._loadingIndices.splice(_8e1,1);}});_8e1=_8a2.indexOf(_8e0._loadingLegends,_8dd);if(_8e1>-1){_8e0._loadingLegends.splice(_8e1,1);}_8e0._processLegendResponse(_8de,info);});});}else{if(_8dd.then){_8dd._contexts.push(_8db);}}return _8dd;},_clearLegendInfo:function(){clearTimeout(this._legendTimer);this._ignoreLegends();this._legendIndices=this._loadingIndices=this._legendSymbols=this._loadingLegends=this._legendTimer=null;},_ignoreLegends:function(){if(this._loadingLegends){_8a2.forEach(this._loadingLegends,function(_8e2){var _8e3=-1;_8a2.some(_8e2._contexts,function(ctxt,idx){if(ctxt.pickerInstance===this){_8e3=idx;}return (_8e3>-1);},this);if(_8e3>-1){_8e2._contexts.splice(_8e3,1);}},this);}},_processLegendResponse:function(_8e4,info){if(_8e4&&!(_8e4 instanceof Error)){_8a2.forEach(info.indices,function(idx){var _8e5=info.featureLayers[idx].layerId,i,_8e6=info.mapServiceUrl+"/"+_8e5+"/images/",_8e7=info.mapServiceLayer._getToken(),_8e8,obj,_8e9,url;if(this._legendSymbols[idx]){return;}_8e8=null;_8a2.some(_8e4.layers,function(_8ea){if(_8ea.layerId==_8e5){_8e8=_8ea;}return !!_8e8;});if(_8e8){obj=(this._legendSymbols[idx]={});_8a2.forEach(_8e8.legend,function(_8eb){_8e9=_8eb.values;if(_8e9&&_8e9.length){for(i=0;i<_8e9.length;i++){obj[_8e9[i]]=_8eb;}}else{obj.defaultSymbol=_8eb;}url=_8eb.url;if(url&&!_8eb._fixed){_8eb._fixed=1;if((url.search(/https?\:/)===-1)){_8eb.url=_8e6+url;}if(_8e7&&_8eb.url.search(/https?\:/)!==-1){_8eb.url+=(((_8eb.url.indexOf("?")>-1)?"&":"?")+"token="+_8e7);}}});}},this);}else{var _8ec;_8a2.forEach(info.indices,function(idx){_8ec=_8a2.indexOf(this._legendIndices,idx);if(_8ec>-1){this._legendIndices.splice(_8ec,1);}},this);}var self=this;if(self._started&&!self._legendTimer){self._legendTimer=setTimeout(function(){clearTimeout(self._legendTimer);self._legendTimer=null;if(!self._destroyed){self.update();}},0);}},_applyGridPatches:function(){var grid=this.grid;var _8ed=grid.adaptWidth,_8ee,i,view;grid.adaptWidth=function(){_8ee=this.views.views;for(i=0;view=_8ee[i];i++){_8aa.set(view.headerNode,"display","block");}_8ed.apply(this,arguments);for(i=0;view=_8ee[i];i++){_8aa.set(view.headerNode,"display","none");}};if(this._dojo14x){if(this.rows!=="auto"&&this.columns!=="auto"){var _8ef=_8a1.connect(grid,"_onFetchComplete",this,function(){_8a1.disconnect(_8ef);this.grid.set("autoHeight",this._rows);});}_8a1.connect(grid,"_onDelete",this,this._destroyItems);_8a1.connect(grid,"_clearData",this,this._destroyItems);_8a1.connect(grid,"destroy",this,this._destroyItems);var _8f0=grid.focus;if(_8f0&&_8f0.findAndFocusGridCell){_8f0.findAndFocusGridCell=function(){return false;};}}},_setGridLayout:function(){var _8f1=function(_8f2){return function(_8f3,_8f4){return this._cellGet(_8f2,_8f3,_8f4);};};var _8f5=lang.hitch(this,this._cellFormatter),_8f6=[],cols=this._columns,i;for(i=0;i<cols;i++){_8f6.push({field:"cell"+i,get:lang.hitch(this,_8f1(i)),formatter:_8f5});}var _8f7={cells:[_8f6]};if(this.grouping){var _8f8={field:"groupName",colSpan:cols,get:lang.hitch(this,this._cellGetGroup),formatter:lang.hitch(this,this._cellGroupFormatter)};_8f7.cells.push([_8f8]);}var grid=this.grid,_8f9=_8ae.prototype.rowsPerPage;grid.set("rowsPerPage",(this._rows>_8f9)?this._rows:_8f9);grid.set("structure",_8f7);},_setGridData:function(){var _8fa=[];if(this.grouping){this._groupRowIndices=[];var _8fb,_8fc,cols=this._columns;_8a2.forEach(this._flItems,function(_8fd,idx){_8fa.push({});var _8fe=(idx===0)?0:(_8fb+_8fc+1);this._groupRowIndices.push(_8fe);_8fb=_8fe;_8fc=Math.ceil(_8fd.length/cols);_8fa=_8fa.concat(this._getStoreItems(_8fd));},this);}else{if(this.featureLayers){_8a2.forEach(this._flItems,function(_8ff){_8fa=_8fa.concat(_8ff);});_8fa=this._getStoreItems(_8fa);}else{_8fa=this._getStoreItems(this._itItems);}}var _900=new _8ad({data:{items:_8fa}});this.grid.setStore(_900);},_toggleTooltip:function(){if(this.showTooltip){if(this.tooltip){return;}this.tooltip=_8a8.create("div",{"class":"tooltip"},this.domNode);this.tooltip.style.display="none";this.tooltip.style.position="fixed";var grid=this.grid;this._mouseOverConnect=_8a1.connect(grid,"onCellMouseOver",this,this._cellMouseOver);this._mouseOutConnect=_8a1.connect(grid,"onCellMouseOut",this,this._cellMouseOut);}else{if(this.tooltip){_8a1.disconnect(this._mouseOverConnect);_8a1.disconnect(this._mouseOutConnect);_8a8.destroy(this.tooltip);this.tooltip=null;}}},_rowClicked:function(evt,_901){var _902=evt.cellNode,row=evt.rowIndex,col=evt.cellIndex;var cell=this._getCellInfo(_902,row,col);if(!cell){return;}var _903=this.grid.store;if(_903.getValue(cell,"loadingCell")){return;}if(this._selectedCell){_8a7.remove(this._selectedCell,"selectedItem");}if(_902!==this._selectedCell){_8a7.add(_902,"selectedItem");this._selectedCell=_902;this._selectedItem={featureLayer:_903.getValue(cell,"layer"),type:_903.getValue(cell,"type"),template:_903.getValue(cell,"template"),symbolInfo:_903.getValue(cell,"symbolInfo"),item:this._getItem(cell)};this._selectedInfo={selRow:row,selCol:col,index1:_903.getValue(cell,"index1"),index2:_903.getValue(cell,"index2"),index:_903.getValue(cell,"index")};}else{this._selectedCell=this._selectedInfo=this._selectedItem=null;}if(!_901){this.onSelectionChange();}},_locate:function(_904,info,_905){var _906=this.grid.store,cols=new Array(this._columns);var _907,_908=info.index1,_909=info.index2,_90a=info.index,item=_904.item;_8a2.some(_905,function(_90b,_90c){return _8a2.some(cols,function(_90d,_90e){var cell=_906.getValue(_90b,"cell"+_90e);if(cell&&(item?(_90a===_906.getValue(cell,"index")):(_908===_906.getValue(cell,"index1")&&_909===_906.getValue(cell,"index2")))){_907=[_90c,_90e];return true;}else{return false;}});});return _907;},_getCellInfo:function(_90f,row,col){if(!_90f){return;}var grid=this.grid;var item=grid.getItem(row);var cell=grid.store.getValue(item,"cell"+col);return cell;},_getItem:function(cell){var _910=this.items;if(_910){return _910[this.grid.store.getValue(cell,"index")];}},_cellMouseOver:function(evt){var _911=this.tooltip;var _912=evt.cellNode,row=evt.rowIndex,col=evt.cellIndex;var cell=this._getCellInfo(_912,row,col);if(_911&&cell){var _913=this.grid.store;var _914=_913.getValue(cell,"template");var type=_913.getValue(cell,"type");var _915=_913.getValue(cell,"symbolInfo");var _916=_913.getValue(cell,"layer");var item=this._getItem(cell);var _917=(item&&(item.label+(item.description?(": "+item.description):"")))||(_914&&(_914.name+(_914.description?(": "+_914.description):"")))||(type&&type.name)||(_915&&(_915.label+(_915.description?(": "+_915.description):"")))||((_916&&_916.name+": ")+"Default");_911.style.display="none";_911.innerHTML=_917;var _918=html.coords(_912.firstChild);_8aa.set(_911,{left:(_918.x)+"px",top:(_918.y+_918.h+5)+"px"});_911.style.display="";}},_cellMouseOut:function(){var _919=this.tooltip;if(_919){_919.style.display="none";}},_destroyItems:function(){var _91a=this._itemWidgets,w;for(w in _91a){if(!_91a[w]){continue;}_91a[w].destroy();delete _91a[w];}},_repaintItems:function(){var _91b=this._itemWidgets,w;for(w in _91b){var _91c=_91b[w];if(_91c){_91c._repaint(_91c._surface);}}},_getStoreItems:function(_91d){var uid=this._uniqueId;_91d=_8a2.map(_91d,function(item){return lang.mixin({"surfaceId":"tpick-surface-"+(uid.id++)},item);});var len=_91d.length,_91e=0,obj={},k=0,prop,_91f=[],flag=true,cols=this._columns;while(_91e<len){flag=true;prop="cell"+k;obj[prop]=_91d[_91e];_91e++;k++;if(k%cols===0){flag=false;_91f.push(obj);obj={};k=0;}}if(flag&&len){_91f.push(obj);}return _91f;},_getItemsFromLayers:function(_920){var _921=[];_8a2.forEach(_920,function(_922,_923){_921.push(this._getItemsFromLayer(_922,_923));},this);return _921;},_getItemsFromLayer:function(_924,_925){var _926=[];if(this.useLegend&&_8a2.indexOf(this._loadingIndices,_925)>-1){return [{label:(this._nls&&this._nls.loading)||"",symbol:null,layer:_924,type:null,template:null,index1:_925,index2:0,loadingCell:1}];}var _927=[];_927=_927.concat(_924.templates);_8a2.forEach(_924.types,function(_928){var _929=_928.templates;_8a2.forEach(_929,function(_92a){_92a._type_=_928;});_927=_927.concat(_929);});_927=_8a2.filter(_927,_8b3.isDefined);var _92b=_924.renderer;if(_92b){var _92c=_92b.declaredClass.replace("esri.renderer.","");if(_927.length>0){_8a2.forEach(_927,function(_92d){var _92e=_92d.prototype;if(_92e){var _92f=_92b.getSymbol(_92e);if(_92f){var _930=null,pms,_931;if(this.useLegend&&_8a2.indexOf(this._legendIndices,_925)>-1){_931=this._legendSymbols&&this._legendSymbols[_925];if(_931){switch(_92c){case "SimpleRenderer":_930=_931.defaultSymbol;break;case "UniqueValueRenderer":_8a2.some(_92b.infos,function(info){if(info.symbol===_92f){_930=_931[info.value];}return !!_930;});break;case "ClassBreaksRenderer":_8a2.some(_92b.infos,function(info){if(info.symbol===_92f){_930=_931[info.maxValue];}return !!_930;});break;}}if(_930){pms=_8a3.fromJson(_8a3.toJson(_8b0.defaultProps));pms.url=_930.url;pms.imageData=_930.imageData;pms.contentType=_930.contentType;pms.width=_930.width;pms.height=_930.height;if(!_8b3.isDefined(pms.width)||!_8b3.isDefined(pms.height)){pms.width=15;pms.height=15;}_930=new _8b0(pms);}}_926.push({label:this._trimLabel(_92d.name),symbol:_930||_92f,legendOverride:!!_930,layer:_924,type:_92d._type_,template:_92d,index1:_925,index2:_926.length});}}delete _92d._type_;},this);}else{var _932=[];if(_92c==="TemporalRenderer"){_92b=_92b.observationRenderer;if(_92b){_92c=_92b.declaredClass.replace("esri.renderer.","");}}switch(_92c){case "SimpleRenderer":_932=[{symbol:_92b.symbol,label:_92b.label,description:_92b.description}];break;case "UniqueValueRenderer":case "ClassBreaksRenderer":_932=_92b.infos;break;}_926=_8a2.map(_932,function(info,idx){return {label:this._trimLabel(info.label),description:info.description,symbolInfo:lang.mixin({constructor:function(){}},info),symbol:info.symbol,layer:_924,index1:_925,index2:idx};},this);}}return _926;},_getItemsFromItems:function(_933){return _8a2.map(_933,function(item,idx){item=lang.mixin({index:idx},item);item.label=this._trimLabel(item.label);return item;},this);},_trimLabel:function(_934){var max=this.maxLabelLength;if(max&&_934){if(_934.length>max){_934=_934.substr(0,max)+"...";}}return _934||"";},_cellGet:function(_935,_936,_937){if(!_937){return "";}return this.grid.store.getValue(_937,"cell"+_935);},_cellFormatter:function(_938){if(_938){var _939=this._itemWidgets,_93a=this.grid.store;var sid=_93a.getValue(_938,"surfaceId");var w=_939[sid];if(!w){w=(_939[sid]=new _8b1({id:sid,label:_93a.getValue(_938,"label"),symbol:_93a.getValue(_938,"symbol"),legendOverride:_93a.getValue(_938,"legendOverride"),surfaceWidth:this.surfaceWidth,surfaceHeight:this.surfaceHeight,template:_93a.getValue(_938,"template")}));}return w||"";}else{return "";}},_cellGetGroup:function(_93b,_93c){if(!this._groupRowIndices){return "";}var _93d=_8a2.indexOf(this._groupRowIndices,_93b);if(!_93c||_93d===-1){return "";}return (this.featureLayers[_93d]&&this.featureLayers[_93d].name)||"";},_cellGroupFormatter:function(_93e){if(_93e){return "<div class='groupLabel'>"+_93e+"</div>";}else{return "";}}});if(has("extend-esri")){lang.setObject("dijit.editing.TemplatePicker",TP,_8b2);}return TP;});},"dojo/data/ItemFileReadStore":function(){define(["../_base/kernel","../_base/lang","../_base/declare","../_base/array","../_base/xhr","../Evented","./util/filter","./util/simpleFetch","../date/stamp"],function(_93f,lang,_940,_941,xhr,_942,_943,_944,_945){var _946=_940("dojo.data.ItemFileReadStore",[_942],{constructor:function(_947){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_947.url;this._ccUrl=_947.url;this.url=_947.url;this._jsonData=_947.data;this.data=null;this._datatypeMap=_947.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_948){return _945.fromISOString(_948);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(_947.urlPreventCache!==undefined){this.urlPreventCache=_947.urlPreventCache?true:false;}if(_947.hierarchical!==undefined){this.hierarchical=_947.hierarchical?true:false;}if(_947.clearOnClose){this.clearOnClose=true;}if("failOk" in _947){this.failOk=_947.failOk?true:false;}},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error(this.declaredClass+": Invalid item argument.");}},_assertIsAttribute:function(_949){if(typeof _949!=="string"){throw new Error(this.declaredClass+": Invalid attribute argument.");}},getValue:function(item,_94a,_94b){var _94c=this.getValues(item,_94a);return (_94c.length>0)?_94c[0]:_94b;},getValues:function(item,_94d){this._assertIsItem(item);this._assertIsAttribute(_94d);return (item[_94d]||[]).slice(0);},getAttributes:function(item){this._assertIsItem(item);var _94e=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_94e.push(key);}}return _94e;},hasAttribute:function(item,_94f){this._assertIsItem(item);this._assertIsAttribute(_94f);return (_94f in item);},containsValue:function(item,_950,_951){var _952=undefined;if(typeof _951==="string"){_952=_943.patternToRegExp(_951,false);}return this._containsValue(item,_950,_951,_952);},_containsValue:function(item,_953,_954,_955){return _941.some(this.getValues(item,_953),function(_956){if(_956!==null&&!lang.isObject(_956)&&_955){if(_956.toString().match(_955)){return true;}}else{if(_954===_956){return true;}}});},isItem:function(_957){if(_957&&_957[this._storeRefPropName]===this){if(this._arrayOfAllItems[_957[this._itemNumPropName]]===_957){return true;}}return false;},isItemLoaded:function(_958){return this.isItem(_958);},loadItem:function(_959){this._assertIsItem(_959.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},filter:function(_95a,_95b,_95c){var _95d=[],i,key;if(_95a.query){var _95e,_95f=_95a.queryOptions?_95a.queryOptions.ignoreCase:false;var _960={};for(key in _95a.query){_95e=_95a.query[key];if(typeof _95e==="string"){_960[key]=_943.patternToRegExp(_95e,_95f);}else{if(_95e instanceof RegExp){_960[key]=_95e;}}}for(i=0;i<_95b.length;++i){var _961=true;var _962=_95b[i];if(_962===null){_961=false;}else{for(key in _95a.query){_95e=_95a.query[key];if(!this._containsValue(_962,key,_95e,_960[key])){_961=false;}}}if(_961){_95d.push(_962);}}_95c(_95d,_95a);}else{for(i=0;i<_95b.length;++i){var item=_95b[i];if(item!==null){_95d.push(item);}}_95c(_95d,_95a);}},_fetchItems:function(_963,_964,_965){var self=this;if(this._loadFinished){this.filter(_963,this._getItemsArray(_963.queryOptions),_964);}else{if(this._jsonFileUrl!==this._ccUrl){_93f.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_963,filter:lang.hitch(self,"filter"),findCallback:lang.hitch(self,_964)});}else{this._loadInProgress=true;var _966={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _967=xhr.get(_966);_967.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;self.filter(_963,self._getItemsArray(_963.queryOptions),_964);self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_965(e,_963);}});_967.addErrback(function(_968){self._loadInProgress=false;_965(_968,_963);});var _969=null;if(_963.abort){_969=_963.abort;}_963.abort=function(){var df=_967;if(df&&df.fired===-1){df.cancel();df=null;}if(_969){_969.call(_963);}};}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;self.filter(_963,this._getItemsArray(_963.queryOptions),_964);}catch(e){_965(e,_963);}}else{_965(new Error(this.declaredClass+": No JSON source data was provided as either URL or a nested Javascript object."),_963);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _96a=this._queuedFetches[i],_96b=_96a.args,_96c=_96a.filter,_96d=_96a.findCallback;if(_96c){_96c(_96b,this._getItemsArray(_96b.queryOptions),_96d);}else{this.fetchItemByIdentity(_96b);}}this._queuedFetches=[];}},_getItemsArray:function(_96e){if(_96e&&_96e.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_96f){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){if(((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null))&&this.data==null){console.debug(this.declaredClass+": WARNING!  Data reload "+" information has not been provided."+"  Please set 'url' or 'data' to the appropriate value before"+" the next fetch");}this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[];}},_getItemsFromLoadedData:function(_970){var _971=false,self=this;function _972(_973){return (_973!==null)&&(typeof _973==="object")&&(!lang.isArray(_973)||_971)&&(!lang.isFunction(_973))&&(_973.constructor==Object||lang.isArray(_973))&&(typeof _973._reference==="undefined")&&(typeof _973._type==="undefined")&&(typeof _973._value==="undefined")&&self.hierarchical;};function _974(_975){self._arrayOfAllItems.push(_975);for(var _976 in _975){var _977=_975[_976];if(_977){if(lang.isArray(_977)){var _978=_977;for(var k=0;k<_978.length;++k){var _979=_978[k];if(_972(_979)){_974(_979);}}}else{if(_972(_977)){_974(_977);}}}}};this._labelAttr=_970.label;var i,item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_970.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];if(lang.isArray(item)){_971=true;}_974(item);item[this._rootItemPropName]=true;}var _97a={},key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _97b=item[key];if(_97b!==null){if(!lang.isArray(_97b)){item[key]=[_97b];}}else{item[key]=[null];}}_97a[key]=key;}}while(_97a[this._storeRefPropName]){this._storeRefPropName+="_";}while(_97a[this._itemNumPropName]){this._itemNumPropName+="_";}while(_97a[this._reverseRefMap]){this._reverseRefMap+="_";}var _97c;var _97d=_970.identifier;if(_97d){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_97d;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_97c=item[_97d];var _97e=_97c[0];if(!Object.hasOwnProperty.call(this._itemsByIdentity,_97e)){this._itemsByIdentity[_97e]=item;}else{if(this._jsonFileUrl){throw new Error(this.declaredClass+":  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_97d+"].  Value collided: ["+_97e+"]");}else{if(this._jsonData){throw new Error(this.declaredClass+":  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_97d+"].  Value collided: ["+_97e+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_97c=item[key];for(var j=0;j<_97c.length;++j){_97b=_97c[j];if(_97b!==null&&typeof _97b=="object"){if(("_type" in _97b)&&("_value" in _97b)){var type=_97b._type;var _97f=this._datatypeMap[type];if(!_97f){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(lang.isFunction(_97f)){_97c[j]=new _97f(_97b._value);}else{if(lang.isFunction(_97f.deserialize)){_97c[j]=_97f.deserialize(_97b._value);}else{throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_97b._reference){var _980=_97b._reference;if(!lang.isObject(_980)){_97c[j]=this._getItemByIdentity(_980);}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _981=this._arrayOfAllItems[k],_982=true;for(var _983 in _980){if(_981[_983]!=_980[_983]){_982=false;}}if(_982){_97c[j]=_981;}}}if(this.referenceIntegrity){var _984=_97c[j];if(this.isItem(_984)){this._addReferenceToMap(_984,item,key);}}}else{if(this.isItem(_97b)){if(this.referenceIntegrity){this._addReferenceToMap(_97b,item,key);}}}}}}}},_addReferenceToMap:function(_985,_986,_987){},getIdentity:function(item){var _988=this._features["dojo.data.api.Identity"];if(_988===Number){return item[this._itemNumPropName];}else{var _989=item[_988];if(_989){return _989[0];}}return null;},fetchItemByIdentity:function(_98a){var item,_98b;if(!this._loadFinished){var self=this;if(this._jsonFileUrl!==this._ccUrl){_93f.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null&&this._jsonData==null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_98a});}else{this._loadInProgress=true;var _98c={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _98d=xhr.get(_98c);_98d.addCallback(function(data){var _98e=_98a.scope?_98a.scope:_93f.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;item=self._getItemByIdentity(_98a.identity);if(_98a.onItem){_98a.onItem.call(_98e,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_98a.onError){_98a.onError.call(_98e,error);}}});_98d.addErrback(function(_98f){self._loadInProgress=false;if(_98a.onError){var _990=_98a.scope?_98a.scope:_93f.global;_98a.onError.call(_990,_98f);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;item=self._getItemByIdentity(_98a.identity);if(_98a.onItem){_98b=_98a.scope?_98a.scope:_93f.global;_98a.onItem.call(_98b,item);}}}}else{item=this._getItemByIdentity(_98a.identity);if(_98a.onItem){_98b=_98a.scope?_98a.scope:_93f.global;_98a.onItem.call(_98b,item);}}},_getItemByIdentity:function(_991){var item=null;if(this._itemsByIdentity){if(Object.hasOwnProperty.call(this._itemsByIdentity,_991)){item=this._itemsByIdentity[_991];}}else{if(Object.hasOwnProperty.call(this._arrayOfAllItems,_991)){item=this._arrayOfAllItems[_991];}}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _992=this._features["dojo.data.api.Identity"];if(_992===Number){return null;}else{return [_992];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl!==this._ccUrl){_93f.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){var _993={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};var _994=xhr.get(_993);_994.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}else{if(self._loadInProgress){throw new Error(this.declaredClass+":  Unable to perform a synchronous load, an async load is in progress.");}}}catch(e){console.log(e);throw e;}});_994.addErrback(function(_995){throw _995;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});lang.extend(_946,_944);return _946;});},"dojox/grid/_SelectionPreserver":function(){define("dojox/grid/_SelectionPreserver",["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array"],function(_996,_997,lang,_998){return _996("dojox.grid._SelectionPreserver",null,{constructor:function(_999){this.selection=_999;var grid=this.grid=_999.grid;this.reset();this._connects=[_997.connect(grid,"_setStore",this,"reset"),_997.connect(grid,"_addItem",this,"_reSelectById"),_997.connect(_999,"onSelected",lang.hitch(this,"_selectById",true)),_997.connect(_999,"onDeselected",lang.hitch(this,"_selectById",false)),_997.connect(_999,"deselectAll",this,"reset")];},destroy:function(){this.reset();_998.forEach(this._connects,_997.disconnect);delete this._connects;},reset:function(){this._selectedById={};},_reSelectById:function(item,_99a){if(item&&this.grid._hasIdentity){this.selection.selected[_99a]=this._selectedById[this.grid.store.getIdentity(item)];}},_selectById:function(_99b,_99c){if(this.selection.mode=="none"||!this.grid._hasIdentity){return;}var item=_99c,g=this.grid;if(typeof _99c=="number"||typeof _99c=="string"){var _99d=g._by_idx[_99c];item=_99d&&_99d.item;}if(item){this._selectedById[g.store.getIdentity(item)]=!!_99b;}return item;}});});},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(lang,_99e,_99f){var _9a0={};lang.setObject("dojo.data.util.simpleFetch",_9a0);_9a0.errorHandler=function(_9a1,_9a2){if(_9a2.onError){var _9a3=_9a2.scope||_99e.global;_9a2.onError.call(_9a3,_9a1,_9a2);}};_9a0.fetchHandler=function(_9a4,_9a5){var _9a6=_9a5.abort||null,_9a7=false,_9a8=_9a5.start?_9a5.start:0,_9a9=(_9a5.count&&(_9a5.count!==Infinity))?(_9a8+_9a5.count):_9a4.length;_9a5.abort=function(){_9a7=true;if(_9a6){_9a6.call(_9a5);}};var _9aa=_9a5.scope||_99e.global;if(!_9a5.store){_9a5.store=this;}if(_9a5.onBegin){_9a5.onBegin.call(_9aa,_9a4.length,_9a5);}if(_9a5.sort){_9a4.sort(_99f.createSortFunction(_9a5.sort,this));}if(_9a5.onItem){for(var i=_9a8;(i<_9a4.length)&&(i<_9a9);++i){var item=_9a4[i];if(!_9a7){_9a5.onItem.call(_9aa,item,_9a5);}}}if(_9a5.onComplete&&!_9a7){var _9ab=null;if(!_9a5.onItem){_9ab=_9a4.slice(_9a8,_9a9);}_9a5.onComplete.call(_9aa,_9ab,_9a5);}};_9a0.fetch=function(_9ac){_9ac=_9ac||{};if(!_9ac.store){_9ac.store=this;}this._fetchItems(_9ac,lang.hitch(this,"fetchHandler"),lang.hitch(this,"errorHandler"));return _9ac;};return _9a0;});},"dojox/grid/_Builder":function(){define("dojox/grid/_Builder",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/window","dojo/_base/event","dojo/_base/sniff","dojo/_base/connect","dojo/dnd/Moveable","dojox/html/metrics","./util","dojo/_base/html"],function(_9ad,_9ae,lang,win,_9af,has,_9b0,_9b1,_9b2,util,html){var dg=_9ad.grid;var _9b3=function(td){return td.cellIndex>=0?td.cellIndex:_9ae.indexOf(td.parentNode.cells,td);};var _9b4=function(tr){return tr.rowIndex>=0?tr.rowIndex:_9ae.indexOf(tr.parentNode.childNodes,tr);};var _9b5=function(_9b6,_9b7){return _9b6&&((_9b6.rows||0)[_9b7]||_9b6.childNodes[_9b7]);};var _9b8=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _9b9=function(_9ba,_9bb){for(var n=_9ba;n&&_9bb(n);n=n.parentNode){}return n;};var _9bc=function(_9bd){var name=_9bd.toUpperCase();return function(node){return node.tagName!=name;};};var _9be=util.rowIndexTag;var _9bf=util.gridViewTag;var _9c0=dg._Builder=lang.extend(function(view){if(view){this.view=view;this.grid=view.grid;}},{view:null,_table:"<table class=\"dojoxGridRowTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"",getTableArray:function(){var html=[this._table];if(this.view.viewWidth){html.push([" style=\"width:",this.view.viewWidth,";\""].join(""));}html.push(">");return html;},generateCellMarkup:function(_9c1,_9c2,_9c3,_9c4){var _9c5=[],html;if(_9c4){var _9c6=_9c1.index!=_9c1.grid.getSortIndex()?"":_9c1.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_9c1.id){_9c1.id=this.grid.id+"Hdr"+_9c1.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_9c6,"id=\"",_9c1.id,"\""];}else{var _9c7=this.grid.editable&&!_9c1.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_9c7];}if(_9c1.colSpan){html.push(" colspan=\"",_9c1.colSpan,"\"");}if(_9c1.rowSpan){html.push(" rowspan=\"",_9c1.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_9c1.classes){html.push(_9c1.classes," ");}if(_9c3){html.push(_9c3," ");}_9c5.push(html.join(""));_9c5.push("");html=["\" idx=\"",_9c1.index,"\" style=\""];if(_9c2&&_9c2[_9c2.length-1]!=";"){_9c2+=";";}html.push(_9c1.styles,_9c2||"",_9c1.hidden?"display:none;":"");if(_9c1.unitWidth){html.push("width:",_9c1.unitWidth,";");}_9c5.push(html.join(""));_9c5.push("");html=["\""];if(_9c1.attrs){html.push(" ",_9c1.attrs);}html.push(">");_9c5.push(html.join(""));_9c5.push("");_9c5.push(_9c4?"</th>":"</td>");return _9c5;},isCellNode:function(_9c8){return Boolean(_9c8&&_9c8!=win.doc&&html.attr(_9c8,"idx"));},getCellNodeIndex:function(_9c9){return _9c9?Number(html.attr(_9c9,"idx")):-1;},getCellNode:function(_9ca,_9cb){for(var i=0,row;((row=_9b5(_9ca.firstChild,i))&&row.cells);i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_9cb){return cell;}}}return null;},findCellTarget:function(_9cc,_9cd){var n=_9cc;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_9bf in n.offsetParent.parentNode&&n.offsetParent.parentNode[_9bf]!=this.view.id))&&(n!=_9cd)){n=n.parentNode;}return n!=_9cd?n:null;},baseDecorateEvent:function(e){e.dispatch="do"+e.type;e.grid=this.grid;e.sourceView=this.view;e.cellNode=this.findCellTarget(e.target,e.rowNode);e.cellIndex=this.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);},findTarget:function(_9ce,_9cf){var n=_9ce;while(n&&(n!=this.domNode)&&(!(_9cf in n)||(_9bf in n&&n[_9bf]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_9d0){return this.findTarget(_9d0,_9be);},isIntraNodeEvent:function(e){try{return (e.cellNode&&e.relatedTarget&&html.isDescendant(e.relatedTarget,e.cellNode));}catch(x){return false;}},isIntraRowEvent:function(e){try{var row=e.relatedTarget&&this.findRowTarget(e.relatedTarget);return !row&&(e.rowIndex==-1)||row&&(e.rowIndex==row.gridRowIndex);}catch(x){return false;}},dispatchEvent:function(e){if(e.dispatch in this){return this[e.dispatch](e);}return false;},domouseover:function(e){if(e.cellNode&&(e.cellNode!=this.lastOverCellNode)){this.lastOverCellNode=e.cellNode;this.grid.onMouseOver(e);}this.grid.onMouseOverRow(e);},domouseout:function(e){if(e.cellNode&&(e.cellNode==this.lastOverCellNode)&&!this.isIntraNodeEvent(e,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(e);if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}},domousedown:function(e){if(e.cellNode){this.grid.onMouseDown(e);}this.grid.onMouseDownRow(e);}});var _9d1=dg._ContentBuilder=lang.extend(function(view){_9c0.call(this,view);},_9c0.prototype,{update:function(){this.prepareHtml();},prepareHtml:function(){var _9d2=this.grid.get,_9d3=this.view.structure.cells;for(var j=0,row;(row=_9d3[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_9d2;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_9d4,_9d5){var html=this.getTableArray(),v=this.view,_9d6=v.structure.cells,item=this.grid.getItem(_9d5);util.fire(this.view,"onBeforeRow",[_9d5,_9d6]);for(var j=0,row;(row=_9d6[j]);j++){if(row.hidden||row.header){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,m,cc,cs;(cell=row[i]);i++){m=cell.markup;cc=cell.customClasses=[];cs=cell.customStyles=[];m[5]=cell.format(_9d5,item);m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_9be];this.baseDecorateEvent(e);e.cell=this.grid.getCell(e.cellIndex);return true;}});var _9d7=dg._HeaderBuilder=lang.extend(function(view){this.moveable=null;_9c0.call(this,view);},_9c0.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap){this.tableMap.mapRows(this.view.structure.cells);}else{this.tableMap=new dg._TableMap(this.view.structure.cells);}},generateHtml:function(_9d8,_9d9){var html=this.getTableArray(),_9da=this.view.structure.cells;util.fire(this.view,"onBeforeRow",[-1,_9da]);for(var j=0,row;(row=_9da[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_9db;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){if(cell.draggable){if(cell.headerClasses){if(cell.headerClasses.indexOf("dojoDndItem")==-1){cell.headerClasses+=" dojoDndItem";}}else{cell.headerClasses="dojoDndItem";}}if(cell.attrs){if(cell.attrs.indexOf("dndType='gridColumn_")==-1){cell.attrs+=" dndType='gridColumn_"+this.grid.id+"'";}}else{cell.attrs="dndType='gridColumn_"+this.grid.id+"'";}}_9db=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_9db[5]=(_9d9!=undefined?_9d9:_9d8(cell));_9db[3]=cell.customStyles.join(";");_9db[1]=cell.customClasses.join(" ");html.push(_9db.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(has("mozilla")||has("ie")>=9){n=_9b9(e.target,_9bc("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!this.grid.isLeftToRight()){table=_9b9(n,_9bc("table"));x-=(table&&table.offsetLeft)||0;}}n=_9b9(e.target,function(){if(!n||n==e.cellNode){return false;}x+=(n.offsetLeft<0?0:n.offsetLeft);return true;});return x;},decorateEvent:function(e){this.baseDecorateEvent(e);e.rowIndex=-1;e.cellX=this.getCellX(e);return true;},prepareResize:function(e,mod){do{var i=e.cellIndex;e.cellNode=(i?e.cellNode.parentNode.cells[i+mod]:null);e.cellIndex=(e.cellNode?this.getCellNodeIndex(e.cellNode):-1);}while(e.cellNode&&e.cellNode.style.display=="none");return Boolean(e.cellNode);},canResize:function(e){if(!e.cellNode||e.cellNode.colSpan>1){return false;}var cell=this.grid.getCell(e.cellIndex);return !cell.noresize&&cell.canResize();},overLeftResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return (e.cellIndex>0)&&(e.cellX>0&&e.cellX<this.overResizeWidth)&&this.prepareResize(e,-1);}var t=e.cellNode&&(e.cellX>0&&e.cellX<this.overResizeWidth);return t;},overRightResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return e.cellNode&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth);}return (e.cellIndex>0)&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth)&&this.prepareResize(e,-1);},domousemove:function(e){if(!this.moveable){var c=(this.overRightResizeArea(e)?"dojoxGridColResize":(this.overLeftResizeArea(e)?"dojoxGridColResize":""));if(c&&!this.canResize(e)){c="dojoxGridColNoResize";}html.toggleClass(e.sourceView.headerNode,"dojoxGridColNoResize",(c=="dojoxGridColNoResize"));html.toggleClass(e.sourceView.headerNode,"dojoxGridColResize",(c=="dojoxGridColResize"));if(c){_9af.stop(e);}}},domousedown:function(e){if(!this.moveable){if((this.overRightResizeArea(e)||this.overLeftResizeArea(e))&&this.canResize(e)){this.beginColumnResize(e);}else{this.grid.onMouseDown(e);this.grid.onMouseOverRow(e);}}},doclick:function(e){if(this._skipBogusClicks){_9af.stop(e);return true;}return false;},colResizeSetup:function(e,_9dc){var _9dd=html.contentBox(e.sourceView.headerNode);if(_9dc){this.lineDiv=document.createElement("div");var vw=html.position(e.sourceView.headerNode,true);var _9de=html.contentBox(e.sourceView.domNode);var l=e.pageX;if(!this.grid.isLeftToRight()&&has("ie")<8){l-=_9b2.getScrollbar().w;}html.style(this.lineDiv,{top:vw.y+"px",left:l+"px",height:(_9de.h+_9dd.h)+"px"});html.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;win.body().appendChild(this.lineDiv);}var _9df=[],_9e0=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_9e0[i]);i++){_9df.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=this.grid.isLeftToRight()?1:-1;var _9e1=e.grid.views.views;var _9e2=[];for(var j=view.idx+adj,_9e3;(_9e3=_9e1[j]);j=j+adj){_9e2.push({node:_9e3.headerNode,left:window.parseInt(_9e3.headerNode.style.left)});}var _9e4=view.headerContentNode.firstChild;var drag={scrollLeft:e.sourceView.headerNode.scrollLeft,view:view,node:e.cellNode,index:e.cellIndex,w:html.contentBox(e.cellNode).w,vw:_9dd.w,table:_9e4,tw:html.contentBox(_9e4).w,spanners:_9df,followers:_9e2};return drag;},beginColumnResize:function(e){this.moverDiv=document.createElement("div");html.style(this.moverDiv,{position:"absolute",left:0});win.body().appendChild(this.moverDiv);html.addClass(this.grid.domNode,"dojoxGridColumnResizing");var m=(this.moveable=new _9b1(this.moverDiv));var drag=this.colResizeSetup(e,true);m.onMove=lang.hitch(this,"doResizeColumn",drag);_9b0.connect(m,"onMoveStop",lang.hitch(this,function(){this.endResizeColumn(drag);if(drag.node.releaseCapture){drag.node.releaseCapture();}this.moveable.destroy();delete this.moveable;this.moveable=null;html.removeClass(this.grid.domNode,"dojoxGridColumnResizing");}));if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_9e5,_9e6,_9e7){var _9e8=_9e7.l;var data={deltaX:_9e8,w:_9e5.w+(this.grid.isLeftToRight()?_9e8:-_9e8),vw:_9e5.vw+_9e8,tw:_9e5.tw+_9e8};this.dragRecord={inDrag:_9e5,mover:_9e6,leftTop:_9e7};if(data.w>=this.minColWidth){if(!_9e6){this.doResizeNow(_9e5,data);}else{html.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_9e9){if(this.dragRecord){var _9ea=this.dragRecord.leftTop;var _9eb=this.grid.isLeftToRight()?_9ea.l:-_9ea.l;_9eb+=Math.max(_9e9.w+_9eb,this.minColWidth)-(_9e9.w+_9eb);if(has("webkit")&&_9e9.spanners.length){_9eb+=html._getPadBorderExtents(_9e9.spanners[0].node).w;}var data={deltaX:_9eb,w:_9e9.w+_9eb,vw:_9e9.vw+_9eb,tw:_9e9.tw+_9eb};this.doResizeNow(_9e9,data);delete this.dragRecord;}html.destroy(this.lineDiv);html.destroy(this.moverDiv);html.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_9e9.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_9e9.index);},doResizeNow:function(_9ec,data){_9ec.view.convertColPctToFixed();if(_9ec.view.flexCells&&!_9ec.view.testFlexCells()){var t=_9b8(_9ec.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_9ec.spanners[i]);i++){sw=s.width+data.deltaX;if(sw>0){s.node.style.width=sw+"px";_9ec.view.setColWidth(s.index,sw);}}if(this.grid.isLeftToRight()||!has("ie")){for(i=0;(f=_9ec.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_9ec.node.style.width=data.w+"px";_9ec.view.setColWidth(_9ec.index,data.w);_9ec.view.headerNode.style.width=data.vw+"px";_9ec.view.setColumnsWidth(data.tw);if(!this.grid.isLeftToRight()){_9ec.view.headerNode.scrollLeft=_9ec.scrollLeft+data.deltaX;}}});dg._TableMap=lang.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_9ed){var _9ee=_9ed.length;if(!_9ee){return;}this.map=[];var row;for(var k=0;(row=_9ed[k]);k++){this.map[k]=[];}for(var j=0;(row=_9ed[j]);j++){for(var i=0,x=0,cell,_9ef,_9f0;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_9f0=cell.rowSpan||1;_9ef=cell.colSpan||1;for(var y=0;y<_9f0;y++){for(var s=0;s<_9ef;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_9ef;}}},dumpMap:function(){for(var j=0,row,h="";(row=this.map[j]);j++,h=""){for(var i=0,cell;(cell=row[i]);i++){h+=cell.r+","+cell.c+"   ";}}},getMapCoords:function(_9f1,_9f2){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_9f2&&cell.r==_9f1){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_9f3,_9f4,_9f5){var row=_9f3&&_9f3.rows[_9f4];return row&&row.cells[_9f5];},_findOverlappingNodes:function(_9f6,_9f7,_9f8){var _9f9=[];var m=this.getMapCoords(_9f7,_9f8);for(var j=0,row;(row=this.map[j]);j++){if(j==m.j){continue;}var rw=row[m.i];var n=(rw?this.getNode(_9f6,rw.r,rw.c):null);if(n){_9f9.push(n);}}return _9f9;},findOverlappingNodes:function(_9fa){return this._findOverlappingNodes(_9b8(_9fa),_9b4(_9fa.parentNode),_9b3(_9fa));}});return {_Builder:_9c0,_HeaderBuilder:_9d7,_ContentBuilder:_9d1};});},"dojo/dnd/Source":function(){define(["../_base/array","../_base/connect","../_base/declare","../_base/kernel","../_base/lang","../dom-class","../dom-geometry","../mouse","../ready","../topic","./common","./Selector","./Manager"],function(_9fb,_9fc,_9fd,_9fe,lang,_9ff,_a00,_a01,_a02,_a03,dnd,_a04,_a05){if(!_9fe.isAsync){_a02(0,function(){var _a06=["dojo/dnd/AutoSource","dojo/dnd/Target"];require(_a06);});}var _a07=_9fd("dojo.dnd.Source",_a04,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(node,_a08){lang.mixin(this,lang.mixin({},_a08));var type=this.accept;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){_9ff.add(this.node,"dojoDndSource");}this.targetState="";if(this.accept){_9ff.add(this.node,"dojoDndTarget");}if(this.horizontal){_9ff.add(this.node,"dojoDndHorizontal");}this.topics=[_a03.subscribe("/dnd/source/over",lang.hitch(this,"onDndSourceOver")),_a03.subscribe("/dnd/start",lang.hitch(this,"onDndStart")),_a03.subscribe("/dnd/drop",lang.hitch(this,"onDndDrop")),_a03.subscribe("/dnd/cancel",lang.hitch(this,"onDndCancel"))];},checkAcceptance:function(_a09,_a0a){if(this==_a09){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_a0a.length;++i){var type=_a09.getItem(_a0a[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_a0b,self){if(_a0b){return true;}if(arguments.length<2){self=this==_a05.manager().target;}if(self){if(this.copyOnly){return this.selfCopy;}}else{return this.copyOnly;}return false;},destroy:function(){_a07.superclass.destroy.call(this);_9fb.forEach(this.topics,function(t){t.remove();});this.targetAnchor=null;},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}_a07.superclass.onMouseMove.call(this,e);var m=_a05.manager();if(!this.isDragging){if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _a0c=this.getSelectedNodes();if(_a0c.length){m.startDrag(this,_a0c,this.copyState(dnd.getCopyKeyState(e),true));}}}if(this.isDragging){var _a0d=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=_a00.position(this.current,true);}if(this.horizontal){_a0d=(e.pageX-this.targetBox.x<this.targetBox.w/2)==_a00.isBodyLtr(this.current.ownerDocument);}else{_a0d=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_a0d!=this.before){this._markTargetAnchor(_a0d);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}},onMouseDown:function(e){if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dnd.isFormElement(e))){this.mouseDown=true;this._lastX=e.pageX;this._lastY=e.pageY;_a07.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;_a07.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_a0e){if(this!==_a0e){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=_a05.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_a0f,_a10,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_a0f?(copy?"Copied":"Moved"):"");}var _a11=this.accept&&this.checkAcceptance(_a0f,_a10);this._changeState("Target",_a11?"":"Disabled");if(this==_a0f){_a05.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_a12,_a13,copy,_a14){if(this==_a14){this.onDrop(_a12,_a13,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_a15,_a16,copy){if(this!=_a15){this.onDropExternal(_a15,_a16,copy);}else{this.onDropInternal(_a16,copy);}},onDropExternal:function(_a17,_a18,copy){var _a19=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _a19.call(this,_a17.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node){var t=_a17.getItem(node.id);var n=node.cloneNode(true);n.id=dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node){var t=_a17.getItem(node.id);_a17.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_a17.selectNone();}this.insertNodes(true,_a18,this.before,this.current);if(!copy&&this.creator){_a17.deleteSelectedNodes();}this._normalizedCreator=_a19;},onDropInternal:function(_a1a,copy){var _a1b=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _a1b.call(this,this.getItem(node.id).data,hint);};}else{this._normalizedCreator=function(node){var t=this.getItem(node.id);var n=node.cloneNode(true);n.id=dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}}else{if(!this.current){return;}this._normalizedCreator=function(node){var t=this.getItem(node.id);return {node:node,data:t.data,type:t.type};};}this._removeSelection();this.insertNodes(true,_a1a,this.before,this.current);this._normalizedCreator=_a1b;},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){_a07.superclass.onOverEvent.call(this);_a05.manager().overSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOver();}},onOutEvent:function(){_a07.superclass.onOutEvent.call(this);_a05.manager().outSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOut();}},_markTargetAnchor:function(_a1c){if(this.current==this.targetAnchor&&this.before==_a1c){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_a1c;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(e.type!="touchstart"&&!_a01.isLeft(e)){return false;}if(!this.withHandles){return true;}for(var node=e.target;node&&node!==this.node;node=node.parentNode){if(_9ff.contains(node,"dojoDndHandle")){return true;}if(_9ff.contains(node,"dojoDndItem")||_9ff.contains(node,"dojoDndIgnore")){break;}}return false;}});return _a07;});},"esri/layers/OnDemandMode":function(){define(["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/geometry/Point","esri/tasks/query","esri/layers/RenderMode","esri/layers/GridLayout"],function(_a1d,_a1e,lang,_a1f,has,_a20,_a21,_a22,_a23,_a24){var _a25=_a1d([_a23],{declaredClass:"esri.layers._OnDemandMode",constructor:function(_a26){this.featureLayer=_a26;this._featureMap={};this._queryErrorHandler=lang.hitch(this,this._queryErrorHandler);},initialize:function(map){this.inherited(arguments);var _a27=this.featureLayer,_a28=_a27._srInfo;this._gridLayer=new _a24(new _a21(_a28?_a28.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_a27._tileWidth,height:_a27._tileHeight},{width:map.width,height:map.height},_a28);this._cellMap={};this._gridLayer.setResolution(map.extent);},startup:function(){this._ioQueue=[];if(!this.featureLayer.suspended){this._zoomHandler();this._enableConnectors();}},propertyChangeHandler:function(type){if(this._init){if(type<2){this._zoomHandler();}else{console.log("FeatureLayer: layer in on-demand mode does not support time definitions. Layer id = "+this.featureLayer.id+", Layer URL = "+this.featureLayer.url);}}},destroy:function(){this._disableConnectors();this.inherited(arguments);},drawFeature:function(_a29){var _a2a=this._gridLayer,geom=_a29.geometry,_a2b=[];if(!geom){return;}_a2b=_a2a.getCellsInExtent((geom.type==="point")?{xmin:geom.x,ymin:geom.y,xmax:geom.x,ymax:geom.y}:geom.getExtent(),false).cells;var _a2c=this._cellMap,i,cell,oid=_a29.attributes[this.featureLayer.objectIdField],_a2d,row,col;for(i=0;i<_a2b.length;i++){cell=_a2b[i];_a2d=cell.latticeID;row=cell.row;col=cell.col;if(_a2d){cell=(_a2c[_a2d]=(_a2c[_a2d]||cell));}else{_a2c[row]=_a2c[row]||{};cell=(_a2c[row][col]=(_a2c[row][col]||cell));}cell.features=cell.features||[];cell.features.push(_a29);this._addFeatureIIf(oid,_a29);this._incRefCount(oid);}},suspend:function(){if(!this._init){return;}this._disableConnectors();},resume:function(){if(!this._init){return;}this._enableConnectors();this._zoomHandler();},refresh:function(){this._zoomHandler();},_enableConnectors:function(){var map=this.map;this._zoomConnect=_a1e.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=_a1e.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=_a1e.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){_a1e.disconnect(this._zoomConnect);_a1e.disconnect(this._panConnect);_a1e.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _a2e=this.featureLayer,map=this.map;if(_a2e.suspended){return;}_a2e._fireUpdateStart();this._clearIIf();var _a2f=_a2e._trackManager;if(_a2f){_a2f.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_a30,cell){var id="_"+_a30.name+_a30.layerId+_a30._ulid+"_"+cell.resolution+"_"+(cell.latticeID||(cell.row+"_"+cell.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_a31){this._exceeds=false;var _a32=this.featureLayer,map=this.map,_a33=_a31||map.extent,_a34=this._gridLayer.getCellsInExtent(_a33,_a32.latticeTiling),_a35=_a34.cells;if(!_a32.isEditable()){var _a36=this._cellMap;_a35=_a1f.filter(_a35,function(cell){if(cell.lattice){if(_a36[cell.latticeID]){return false;}}else{if(_a36[cell.row]&&_a36[cell.row][cell.col]){return false;}}return true;});}var _a37=_a32.getOutFields(),_a38=_a32.getDefinitionExpression(),time=_a32._getOffsettedTE(_a32._mapTimeExtent),_a39=_a32._usePatch,_a3a=this._ioQueue,i,self=this,func=this._drawFeatures,cell,_a3b,_a3c;this._pending=this._pending||0;for(i=0;i<_a35.length;i++){cell=_a35[i];_a3b=new _a22();_a3b.geometry=cell.extent||cell.lattice;_a3b.outFields=_a37;_a3b.where=_a38;if(_a32.latticeTiling&&cell.extent){_a3b.spatialRelationship=_a22.SPATIAL_REL_CONTAINS;}_a3b.returnGeometry=true;_a3b.timeExtent=time;_a3b.maxAllowableOffset=_a32._maxOffset;if(_a32._ts){_a3b._ts=(new Date()).getTime();}_a3c=null;if(_a39){_a3c=this._getRequestId(_a32,cell);if(this._isPending(_a3c)){continue;}}this._pending++;_a3a.push(_a32._task.execute(_a3b,function(){var _a3d=cell;return function(_a3e){func.apply(self,[_a3e,_a3d]);};}.call(this),this._queryErrorHandler,_a3c));}this._removeOldCells(_a33);this._endCheck();},_drawFeatures:function(_a3f,cell){this._exceeds=this._exceeds||_a3f.exceededTransferLimit;this._finalizeIO();var _a40=this.featureLayer,map=this.map,_a41=map.extent,_a42=cell.extent,row=cell.row,col=cell.col,_a43=_a40.objectIdField,_a44=_a3f.features,_a45=this._gridLayer,_a46=this._cellMap,i,len,_a47=cell.latticeID,_a48=_a47?_a46[_a47]:(_a46[row]&&_a46[row][col]);if((cell.resolution!=_a45._resolution)||(_a47?(_a47!==_a45.getLatticeID(_a41)):(!_a45.intersects(_a42,_a41)))){if(_a48){this._removeCell(row,col,_a47);}}else{if(_a48){this._updateCell(_a48,_a44);}else{cell.features=_a44;if(_a47){_a46[_a47]=cell;}else{_a46[row]=_a46[row]||{};_a46[row][col]=cell;}len=_a44.length;for(i=0;i<len;i++){var _a49=_a44[i];var oid=_a49.attributes[_a43];this._addFeatureIIf(oid,_a49);this._incRefCount(oid);}}}this._endCheck();},_queryErrorHandler:function(err){this._finalizeIO();this.featureLayer._errorHandler(err);this._endCheck(true);},_finalizeIO:function(){this._purgeRequests();this._pending--;},_endCheck:function(_a4a){if(this._pending===0){this._processIOQueue();var _a4b=this.featureLayer,_a4c=_a4b._trackManager;if(_a4c){_a4c.clearTracks();_a4c.addFeatures(_a4b.graphics);if(_a4b._ager){_a1f.forEach(_a4b.graphics,function(_a4d){if(_a4d._shape){_a4b._repaint(_a4d);}});}_a4c.moveLatestToFront();_a4c.drawTracks();}this.featureLayer._fireUpdateEnd(_a4a&&new Error("FeatureLayer: an error occurred while updating the layer"),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_a4b.onQueryLimitExceeded();}}},_processIOQueue:function(_a4e){this._ioQueue=_a1f.filter(this._ioQueue,function(dfd){var keep=dfd.fired>-1?false:true;return keep;});if(_a4e){_a1f.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_a4f){var _a50=this._cellMap,_a51=this._gridLayer,_a52,_a53;for(_a52 in _a50){if(_a50[_a52]){var row=_a50[_a52],_a54=row.latticeID,_a55=0,_a56=0;if(_a54){_a55++;if(_a54!==_a51.getLatticeID(_a4f)){this._removeCell(null,null,_a54);_a56++;}}else{for(_a53 in row){if(row[_a53]){_a55++;var _a57=row[_a53].extent;if(!_a51.intersects(_a57,_a4f)){this._removeCell(_a52,_a53);_a56++;}}}}if(_a56===_a55){delete _a50[_a52];}}}},_updateCell:function(cell,_a58){var _a59=this.featureLayer,_a5a=_a59.objectIdField,_a5b=_a59._selectedFeatures,i,len=_a58.length;cell.features=cell.features||[];for(i=0;i<len;i++){var _a5c=_a58[i];var oid=_a5c.attributes[_a5a];var _a5d=this._addFeatureIIf(oid,_a5c);if(_a5d===_a5c){this._incRefCount(oid);cell.features.push(_a5d);}else{if(!(oid in _a5b)){_a5d.setGeometry(_a5c.geometry);_a5d.setAttributes(_a5c.attributes);}}}},_removeCell:function(row,col,_a5e){var _a5f=this._cellMap,_a60=this.featureLayer,_a61=_a60.objectIdField;var cell=_a5e?_a5f[_a5e]:(_a5f[row]&&_a5f[row][col]);if(cell){if(_a5e){delete _a5f[_a5e];}else{delete _a5f[row][col];}var _a62=cell.features,i;for(i=0;i<_a62.length;i++){var _a63=_a62[i];var oid=_a63.attributes[_a61];this._decRefCount(oid);if(oid in _a60._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});if(has("extend-esri")){lang.setObject("layers._OnDemandMode",_a25,_a20);}return _a25;});},"dijit/popup":function(){define("dijit/popup",["dojo/_base/array","dojo/aspect","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/on","dojo/sniff","./place","./BackgroundIframe","./main"],function(_a64,_a65,_a66,_a67,dom,_a68,_a69,_a6a,_a6b,_a6c,keys,lang,on,has,_a6d,_a6e,_a6f){function _a70(){if(this._popupWrapper){_a69.destroy(this._popupWrapper);delete this._popupWrapper;}};var _a71=_a67(null,{_stack:[],_beginZIndex:1000,_idGen:1,_createWrapper:function(_a72){var _a73=_a72._popupWrapper,node=_a72.domNode;if(!_a73){_a73=_a69.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},_a72.ownerDocumentBody);_a73.appendChild(node);var s=node.style;s.display="";s.visibility="";s.position="";s.top="0px";_a72._popupWrapper=_a73;_a65.after(_a72,"destroy",_a70,true);}return _a73;},moveOffScreen:function(_a74){var _a75=this._createWrapper(_a74);_a6b.set(_a75,{visibility:"hidden",top:"-9999px",display:""});},hide:function(_a76){var _a77=this._createWrapper(_a76);_a6b.set(_a77,"display","none");},getTopPopup:function(){var _a78=this._stack;for(var pi=_a78.length-1;pi>0&&_a78[pi].parent===_a78[pi-1].widget;pi--){}return _a78[pi];},open:function(args){var _a79=this._stack,_a7a=args.popup,_a7b=args.orient||["below","below-alt","above","above-alt"],ltr=args.parent?args.parent.isLeftToRight():_a6a.isBodyLtr(_a7a.ownerDocument),_a7c=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_a79.length&&(!args.parent||!dom.isDescendant(args.parent.domNode,_a79[_a79.length-1].widget.domNode))){this.close(_a79[_a79.length-1].widget);}var _a7d=this._createWrapper(_a7a);_a68.set(_a7d,{id:id,style:{zIndex:this._beginZIndex+_a79.length},"class":"dijitPopup "+(_a7a.baseClass||_a7a["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(has("ie")||has("mozilla")){if(!_a7a.bgIframe){_a7a.bgIframe=new _a6e(_a7d);}}var best=_a7c?_a6d.around(_a7d,_a7c,_a7b,ltr,_a7a.orient?lang.hitch(_a7a,"orient"):null):_a6d.at(_a7d,args,_a7b=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_a7d.style.display="";_a7d.style.visibility="visible";_a7a.domNode.style.visibility="visible";var _a7e=[];_a7e.push(on(_a7d,_a66._keypress,lang.hitch(this,function(evt){if(evt.charOrCode==keys.ESCAPE&&args.onCancel){_a6c.stop(evt);args.onCancel();}else{if(evt.charOrCode===keys.TAB){_a6c.stop(evt);var _a7f=this.getTopPopup();if(_a7f&&_a7f.onCancel){_a7f.onCancel();}}}})));if(_a7a.onCancel&&args.onCancel){_a7e.push(_a7a.on("cancel",args.onCancel));}_a7e.push(_a7a.on(_a7a.onExecute?"execute":"change",lang.hitch(this,function(){var _a80=this.getTopPopup();if(_a80&&_a80.onExecute){_a80.onExecute();}})));_a79.push({widget:_a7a,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_a7e});if(_a7a.onOpen){_a7a.onOpen(best);}return best;},close:function(_a81){var _a82=this._stack;while((_a81&&_a64.some(_a82,function(elem){return elem.widget==_a81;}))||(!_a81&&_a82.length)){var top=_a82.pop(),_a83=top.widget,_a84=top.onClose;if(_a83.onClose){_a83.onClose();}var h;while(h=top.handlers.pop()){h.remove();}if(_a83&&_a83.domNode){this.hide(_a83);}if(_a84){_a84();}}}});return (_a6f.popup=new _a71());});},"dojox/grid/cells/_base":function(){define("dojox/grid/cells/_base",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/event","dojo/_base/connect","dojo/_base/array","dojo/_base/sniff","dojo/dom","dojo/dom-attr","dojo/dom-construct","dijit/_Widget","../util"],function(dojo,_a85,lang,_a86,_a87,_a88,has,dom,_a89,_a8a,_a8b,util){var _a8c=_a85("dojox.grid._DeferredTextWidget",_a8b,{deferred:null,_destroyOnRemove:true,postCreate:function(){if(this.deferred){this.deferred.addBoth(lang.hitch(this,function(text){if(this.domNode){this.domNode.innerHTML=text;}}));}}});var _a8d=function(_a8e){try{util.fire(_a8e,"focus");util.fire(_a8e,"select");}catch(e){}};var _a8f=function(){setTimeout(lang.hitch.apply(dojo,arguments),0);};var _a90=_a85("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_a91){this._props=_a91||{};lang.mixin(this,_a91);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_a92,_a93){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_a92!=this.defaultValue&&f)?f.apply(s,_a93):_a92;if(typeof v=="undefined"){return this.defaultValue;}if(v&&v.addBoth){v=new _a8c({deferred:v},_a8a.create("span",{innerHTML:this.defaultValue}));}if(v&&v.declaredClass&&v.startup){return "<div class='dojoxGridStubNode' linkWidget='"+v.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";}return v;},format:function(_a94,_a95){var f,i=this.grid.edit.info,d=this.get?this.get(_a94,_a95):(this.value||this.defaultValue);d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&(?![a-z0-9]{1,8}\;)/ig,"&amp;").replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_a94&&i.cell==this))){return this.formatEditing(d,_a94);}else{return this._defaultFormat(d,[d,_a94,this]);}},formatEditing:function(_a96,_a97){},getNode:function(_a98){return this.view.getCellNode(_a98,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_a99){return (this.getNode(_a99)||0).firstChild||0;},canResize:function(){var uw=this.unitWidth;return uw&&(uw!=="auto");},isFlex:function(){var uw=this.unitWidth;return uw&&lang.isString(uw)&&(uw=="auto"||uw.slice(-1)=="%");},applyEdit:function(_a9a,_a9b){if(this.getNode(_a9b)){this.grid.edit.applyCellEdit(_a9a,this,_a9b);}},cancelEdit:function(_a9c){this.grid.doCancelEdit(_a9c);},_onEditBlur:function(_a9d){if(this.grid.edit.isEditCell(_a9d,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_a9e,_a9f){if(this.commitOnBlur){_a87.connect(_a9e,"onblur",function(e){setTimeout(lang.hitch(this,"_onEditBlur",_a9f),250);});}},needFormatNode:function(_aa0,_aa1){this._formatPending=true;_a8f(this,"_formatNode",_aa0,_aa1);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_aa2,_aa3){if(this._formatPending){this._formatPending=false;if(!has("ie")){dom.setSelectable(this.grid.domNode,true);}this.formatNode(this.getEditNode(_aa3),_aa2,_aa3);}},formatNode:function(_aa4,_aa5,_aa6){if(has("ie")){_a8f(this,"focus",_aa6,_aa4);}else{this.focus(_aa6,_aa4);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_aa7){return this.getEditNode(_aa7)[this._valueProp];},setValue:function(_aa8,_aa9){var n=this.getEditNode(_aa8);if(n){n[this._valueProp]=_aa9;}},focus:function(_aaa,_aab){_a8d(_aab||this.getEditNode(_aaa));},save:function(_aac){this.value=this.value||this.getValue(_aac);},restore:function(_aad){this.setValue(_aad,this.value);},_finish:function(_aae){dom.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_aaf){this.applyEdit(this.getValue(_aaf),_aaf);this._finish(_aaf);},cancel:function(_ab0){this.cancelEdit(_ab0);this._finish(_ab0);}});_a90.markupFactory=function(node,_ab1){var _ab2=lang.trim(_a89.get(node,"formatter")||"");if(_ab2){_ab1.formatter=lang.getObject(_ab2)||_ab2;}var get=lang.trim(_a89.get(node,"get")||"");if(get){_ab1.get=lang.getObject(get);}var _ab3=function(attr,cell,_ab4){var _ab5=lang.trim(_a89.get(node,attr)||"");if(_ab5){cell[_ab4||attr]=!(_ab5.toLowerCase()=="false");}};_ab3("sortDesc",_ab1);_ab3("editable",_ab1);_ab3("alwaysEditing",_ab1);_ab3("noresize",_ab1);_ab3("draggable",_ab1);var _ab6=lang.trim(_a89.get(node,"loadingText")||_a89.get(node,"defaultValue")||"");if(_ab6){_ab1.defaultValue=_ab6;}var _ab7=function(attr,cell,_ab8){var _ab9=lang.trim(_a89.get(node,attr)||"")||undefined;if(_ab9){cell[_ab8||attr]=_ab9;}};_ab7("styles",_ab1);_ab7("headerStyles",_ab1);_ab7("cellStyles",_ab1);_ab7("classes",_ab1);_ab7("headerClasses",_ab1);_ab7("cellClasses",_ab1);};var Cell=_a85("dojox.grid.cells.Cell",_a90,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_aba,_abb){this.needFormatNode(_aba,_abb);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_aba+"\">";},formatNode:function(_abc,_abd,_abe){this.inherited(arguments);this.registerOnBlur(_abc,_abe);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){_a86.stop(e);}}},_finish:function(_abf){this.inherited(arguments);var n=this.getEditNode(_abf);try{util.fire(n,"blur");}catch(e){}}});Cell.markupFactory=function(node,_ac0){_a90.markupFactory(node,_ac0);var _ac1=lang.trim(_a89.get(node,"keyFilter")||"");if(_ac1){_ac0.keyFilter=new RegExp(_ac1);}};var _ac2=_a85("dojox.grid.cells.RowIndex",Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_ac3){return _ac3+1;}});_ac2.markupFactory=function(node,_ac4){Cell.markupFactory(node,_ac4);};var _ac5=_a85("dojox.grid.cells.Select",Cell,{options:null,values:null,returnIndex:-1,constructor:function(_ac6){this.values=this.values||this.options;},formatEditing:function(_ac7,_ac8){this.needFormatNode(_ac7,_ac8);var h=["<select class=\"dojoxGridSelect\">"];for(var i=0,o,v;((o=this.options[i])!==undefined)&&((v=this.values[i])!==undefined);i++){v=v.replace?v.replace(/&/g,"&amp;").replace(/</g,"&lt;"):v;o=o.replace?o.replace(/&/g,"&amp;").replace(/</g,"&lt;"):o;h.push("<option",(_ac7==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},_defaultFormat:function(_ac9,_aca){var v=this.inherited(arguments);if(!this.formatter&&this.values&&this.options){var i=_a88.indexOf(this.values,v);if(i>=0){v=this.options[i];}}return v;},getValue:function(_acb){var n=this.getEditNode(_acb);if(n){var i=n.selectedIndex,o=n.options[i];return this.returnIndex>-1?i:o.value||o.innerHTML;}}});_ac5.markupFactory=function(node,cell){Cell.markupFactory(node,cell);var _acc=lang.trim(_a89.get(node,"options")||"");if(_acc){var o=_acc.split(",");if(o[0]!=_acc){cell.options=o;}}var _acd=lang.trim(_a89.get(node,"values")||"");if(_acd){var v=_acd.split(",");if(v[0]!=_acd){cell.values=v;}}};var _ace=_a85("dojox.grid.cells.AlwaysEdit",Cell,{alwaysEditing:true,_formatNode:function(_acf,_ad0){this.formatNode(this.getEditNode(_ad0),_acf,_ad0);},applyStaticValue:function(_ad1){var e=this.grid.edit;e.applyCellEdit(this.getValue(_ad1),this,_ad1);e.start(this,_ad1,true);}});_ace.markupFactory=function(node,cell){Cell.markupFactory(node,cell);};var Bool=_a85("dojox.grid.cells.Bool",_ace,{_valueProp:"checked",formatEditing:function(_ad2,_ad3){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_ad2?" checked=\"checked\"":"")+" style=\"width: auto\" />";},doclick:function(e){if(e.target.tagName=="INPUT"){this.applyStaticValue(e.rowIndex);}}});Bool.markupFactory=function(node,cell){_ace.markupFactory(node,cell);};return _a90;});},"esri/toolbars/edit":function(){define("esri/toolbars/edit",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/_base/Color","dojo/has","esri/kernel","esri/lang","esri/sniff","esri/toolbars/_toolbar","esri/toolbars/_Box","esri/toolbars/_GraphicMover","esri/toolbars/_VertexEditor","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol"],function(_ad4,lang,_ad5,_ad6,_ad7,has,_ad8,_ad9,_ada,_adb,Box,_adc,_add,_ade,_adf){var EDT=_ad4(_adb,{declaredClass:"esri.toolbars.Edit",constructor:function(map,_ae0){this._map=map;this._tool=0;if(this._map.loaded){this._scratchGL=map.graphics;}else{var _ae1=_ad5.connect(this._map,"onLoad",this,function(){_ad5.disconnect(_ae1);_ae1=null;this._scratchGL=this._map.graphics;});}var _ae2=has("esri-touch")||has("esri-pointer");this._defaultOptions=lang.mixin({vertexSymbol:new _ade(_ade.STYLE_CIRCLE,_ae2?20:12,new _adf(_adf.STYLE_SOLID,new _ad7([0,0,0,0.5]),1),new _ad7([128,128,128])),ghostVertexSymbol:new _ade(_ade.STYLE_CIRCLE,_ae2?18:10,new _adf(_adf.STYLE_SOLID,new _ad7([0,0,0,0.5]),1),new _ad7([255,255,255,0.75])),ghostLineSymbol:new _adf(_adf.STYLE_DOT,new _ad7([128,128,128]),2),allowDeleteVertices:true,allowAddVertices:true,rotateHandleOffset:_ae2?24:16,boxLineSymbol:new _adf(_adf.STYLE_DASH,new _ad7([64,64,64]),1),boxHandleSymbol:new _ade(_ade.STYLE_SQUARE,_ae2?16:9,new _adf(_adf.STYLE_SOLID,new _ad7([0,0,0,0.5]),1),new _ad7([255,255,255,0.75]))},_ae0||{});},activate:function(tool,_ae3,_ae4){this.deactivate();this._graphic=_ae3;this._options=lang.mixin(lang.mixin({},this._defaultOptions),_ae4||{});var MOVE=EDT.MOVE,EDIT=EDT.EDIT_VERTICES,_ae5=EDT.SCALE,_ae6=EDT.ROTATE,move=false,edit=false,box=false,map=this._map,_ae7=map.spatialReference,_ae8=_ae3.geometry.spatialReference;this._geo=!!(_ae7&&_ae8&&!_ae7.equals(_ae8)&&_ae7.isWebMercator()&&_ae8.wkid===4326);if((tool&MOVE)===MOVE){move=this._enableMove(_ae3);}var _ae9=((tool&_ae5)===_ae5),_aea=((tool&_ae6)===_ae6);if(_ae9||_aea){box=this._enableBoxEditing(_ae3,_ae9,_aea);}if((tool&EDIT)===EDIT){edit=this._enableVertexEditing(_ae3);}if(!(move||edit||box)){throw new Error("[esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.");}this._tool=tool;if(this._tool){this._mapPanEndHandle=_ad5.connect(map,"onPanEnd",this,this._mapPanEndHandler);this._mapExtChgHandle=_ad5.connect(map,"onExtentChange",this,this._mapExtentChangeHandler);this.onActivate(this._tool,_ae3);}if(map.snappingManager&&(move||edit)){map.snappingManager._startSelectionLayerQuery();}},deactivate:function(){var tool=this._tool,_aeb=this._graphic;if(!tool){return;}var _aec=!!this._modified;this._clear();_ad5.disconnect(this._mapPanEndHandle);_ad5.disconnect(this._mapExtChgHandle);this._mapPanEndHandle=this._mapExtChgHandle=null;this._graphic=this._geo=null;this.onDeactivate(tool,_aeb,{isModified:_aec});if(this._map.snappingManager){this._map.snappingManager._stopSelectionLayerQuery();}},refresh:function(){this._refreshMoveables(true);},getCurrentState:function(){return {tool:this._tool,graphic:this._graphic,isModified:!!this._modified};},onActivate:function(tool,_aed){},onDeactivate:function(tool,_aee,info){},onGraphicMoveStart:function(_aef){},onGraphicFirstMove:function(_af0){this._modified=true;},onGraphicMove:function(_af1,_af2){},onGraphicMoveStop:function(_af3,_af4){},onGraphicClick:function(_af5,info){},onVertexMoveStart:function(_af6,_af7){},onVertexFirstMove:function(_af8,_af9){this._modified=true;},onVertexMove:function(_afa,_afb,_afc){},onVertexMoveStop:function(_afd,_afe,_aff){},onVertexAdd:function(_b00,_b01){this._modified=true;},onVertexClick:function(_b02,_b03){},onVertexMouseOver:function(_b04,_b05){},onVertexMouseOut:function(_b06,_b07){},onVertexDelete:function(_b08,_b09){this._modified=true;},onScaleStart:function(_b0a){},onScaleFirstMove:function(_b0b){this._modified=true;},onScale:function(_b0c,info){},onScaleStop:function(_b0d,info){},onRotateStart:function(_b0e){},onRotateFirstMove:function(_b0f){this._modified=true;},onRotate:function(_b10,info){},onRotateStop:function(_b11,info){},_eventMap:{activate:["tool","graphic"],deactivate:["tool","graphic","info"],"graphic-move-start":["graphic"],"graphic-first-move":["graphic"],"graphic-move":["graphic","transform"],"graphic-move-stop":["graphic","transform"],"graphic-click":["graphic","info"],"vertex-move-start":["graphic","vertexinfo"],"vertex-first-move":["graphic","vertexinfo"],"vertex-move":["graphic","vertexinfo","transform"],"vertex-move-stop":["graphic","vertexinfo","transform"],"vertex-add":["graphic","vertexinfo"],"vertex-click":["graphic","vertexinfo"],"vertex-mouse-over":["graphic","vertexinfo"],"vertex-mouse-out":["graphic","vertexinfo"],"vertex-delete":["graphic","vertexinfo"],"scale-start":["graphic"],"scale-first-move":["graphic"],scale:["graphic","info"],"scale-stop":["graphic","info"],"rotate-start":["graphic"],"rotate-first-move":["graphic"],rotate:["graphic","info"],"rotate-stop":["graphic","info"]},_enableMove:function(_b12){var map=this._map,type=_b12.geometry.type;switch(type){case "point":case "polyline":case "polygon":this._graphicMover=new _adc(_b12,map,this);return true;case "multipoint":break;}return false;},_enableVertexEditing:function(_b13){var map=this._map,type=_b13.geometry.type;switch(type){case "point":break;case "multipoint":case "polyline":case "polygon":this._vertexEditor=_add.create(_b13,map,this);return true;}return false;},_enableBoxEditing:function(_b14,_b15,_b16){var map=this._map,type=_b14.geometry.type;switch(type){case "point":case "multipoint":break;case "polyline":case "polygon":this._boxEditor=new Box(_b14,map,this,_b15,_b16,this._options.uniformScaling);return true;}return false;},_disableMove:function(){var _b17=this._graphicMover;if(_b17){_b17.destroy();this._graphicMover=null;}},_disableVertexEditing:function(){var _b18=this._vertexEditor;if(_b18){_b18.destroy();this._vertexEditor=null;}},_disableBoxEditing:function(){var box=this._boxEditor;if(box){box.destroy();this._boxEditor=null;}},_clear:function(){this._disableMove();this._disableVertexEditing();this._disableBoxEditing();this._tool=0;this._modified=false;},_mapPanEndHandler:function(){this._refreshMoveables();},_mapExtentChangeHandler:function(e,d,_b19){if(_b19){this._refreshMoveables();}},_refreshMoveables:function(_b1a){var _b1b=_ad6.filter([this._graphicMover,this._vertexEditor,this._boxEditor],_ad9.isDefined);_ad6.forEach(_b1b,function(mov){mov.refresh(_b1a);});},_beginOperation:function(_b1c){_ad6.forEach(this._getAffectedTools(_b1c),function(tool){tool.suspend();});},_endOperation:function(_b1d){_ad6.forEach(this._getAffectedTools(_b1d),function(tool){tool.resume();});},_getAffectedTools:function(_b1e){var _b1f=[];switch(_b1e){case "MOVE":_b1f=[this._vertexEditor,this._boxEditor];break;case "VERTICES":_b1f=[this._boxEditor];break;case "BOX":_b1f=[this._vertexEditor];break;}_b1f=_ad6.filter(_b1f,_ad9.isDefined);return _b1f;}});lang.mixin(EDT,{MOVE:1,EDIT_VERTICES:2,SCALE:4,ROTATE:8});if(has("extend-esri")){lang.setObject("toolbars.Edit",EDT,_ad8);}return EDT;});},"esri/toolbars/_VertexMover":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/has","dojo/sniff","dojo/dom-style","dojox/gfx/Moveable","esri/kernel","esri/geometry/Point","esri/graphic","esri/geometry/webMercatorUtils"],function(_b20,lang,_b21,has,_b22,_b23,_b24,_b25,_b26,_b27,_b28){var VM=_b20(null,{declaredClass:"esri.toolbars.VertexMover",constructor:function(_b29,_b2a,_b2b,_b2c,_b2d,_b2e,_b2f,_b30){this.point=_b29;this.symbol=_b2a;this.relatedGraphic=_b2b;this.segIndex=_b2c;this.ptIndex=_b2d;this.segLength=_b2e;this.editor=_b2f;this.map=_b2f.map;this._scratchGL=_b2f.toolbar._scratchGL;this._placeholder=_b30||false;this._type=_b2b.geometry.type;this._init();this._enable();},refresh:function(_b31){if(_b31||this._needRefresh()){this._disable();this._enable();}},destroy:function(){this._disable();if(this.graphic){this._scratchGL.remove(this.graphic);}this.point=this.symbol=this.graphic=this.relatedGraphic=this.segIndex=this.ptIndex=this.segLength=this.editor=this.map=this._scratchGL=null;},_init:function(){var _b32=new _b26(this.point.toJson());var _b33=new _b27(_b32,this.symbol);switch(this._type){case "multipoint":_b33._shape=this.relatedGraphic.getDojoShape().children[this.ptIndex];break;case "polyline":case "polygon":this._scratchGL.add(_b33);break;}this.graphic=_b33;},_enable:function(){var _b34=this.graphic.getDojoShape();if(_b34){_b34._hasMover=true;this._moveable=this._getMoveable(_b34);var node=_b34.getEventSource();if(node){_b23.set(node,"cursor",this.editor.toolbar._cursors[this._placeholder?"move-gv":"move-v"]);}}},_disable:function(){var _b35=this._moveable;if(_b35){_b21.disconnect(this._startHandle);_b21.disconnect(this._firstHandle);_b21.disconnect(this._movingHandle);_b21.disconnect(this._stopHandle);var _b36=_b35.shape;if(_b36){var node=_b36.getEventSource();if(node){_b23.set(node,"cursor",null);}}_b35.destroy();this._moveable=null;}},_needRefresh:function(){var _b37=this.graphic.getDojoShape(),need=false;if(_b37){switch(this._type){case "multipoint":var _b38=this.relatedGraphic.getDojoShape();if(_b38){var _b39=_b38.children[this.ptIndex];if(_b37!==_b39){_b37=_b39;this.graphic._shape=_b37;need=true;}}break;case "polyline":case "polygon":need=!_b37._hasMover;break;}}return need;},_getMoveable:function(_b3a){var _b3b=new _b24(_b3a,_b22("mac")&&_b22("ff")&&!has("esri-touch")&&{leftButtonOnly:true});this._startHandle=_b21.connect(_b3b,"onMoveStart",this,this._moveStartHandler);this._firstHandle=_b21.connect(_b3b,"onFirstMove",this,this._firstMoveHandler);this._movingHandle=_b21.connect(_b3b,"onMoving",this,this._movingHandler);this._stopHandle=_b21.connect(_b3b,"onMoveStop",this,this._moveStopHandler);return _b3b;},_getPtIndex:function(){return this.ptIndex+(this._placeholder?1:0);},_getInfo:function(){return {graphic:this.graphic,isGhost:this._placeholder,segmentIndex:this.segIndex,pointIndex:this._getPtIndex()};},_moveStartHandler:function(_b3c){var map=this.map;if(map.snappingManager){map.snappingManager._setUpSnapping();}_b3c.shape.moveToFront();this.constructor.onMoveStart(this);this.editor.toolbar.onVertexMoveStart(this.relatedGraphic,this._getInfo());},_firstMoveHandler:function(_b3d){var _b3e=_b3d.shape;var _b3f=this._getControlEdges();var _b40=this._scratchGL._div;var i,_b41=[],_b42=_b3d.host.shape._wrapOffsets[0]||0;for(i=0;i<_b3f.length;i++){var edge=_b3f[i];edge.x1+=_b42;edge.x2+=_b42;_b41.push([_b40.createLine({x1:edge.x1,y1:edge.y1,x2:edge.x2,y2:edge.y2}).setStroke(this.editor._lineStroke),edge.x1,edge.y1,edge.x2,edge.y2]);}_b3e._lines=_b41;_b3d.shape.moveToFront();this.constructor.onFirstMove(this);this.editor.toolbar.onVertexFirstMove(this.relatedGraphic,this._getInfo());},_movingHandler:function(_b43){var _b44=_b43.shape,tx=_b44.getTransform();var i,_b45=_b44._lines;for(i=0;i<_b45.length;i++){var line=_b45[i];line[0].setShape({x1:line[1]+tx.dx,y1:line[2]+tx.dy,x2:line[3],y2:line[4]});}this.editor.toolbar.onVertexMove(this.relatedGraphic,this._getInfo(),tx);},_moveStopHandler:function(_b46){var _b47=_b46.shape,_b48=this.editor.toolbar,tx=_b47.getTransform(),map=this.map,host=this.graphic,_b49=_b48._geo?_b28.geographicToWebMercator(host.geometry):host.geometry;var i,_b4a=_b47._lines;if(_b4a){for(i=0;i<_b4a.length;i++){_b4a[i][0].removeShape();}_b47._lines=null;}var ph=false,_b4b=true,info=this._getInfo();if(tx&&(tx.dx||tx.dy)){if(this._placeholder){this._placeholder=false;ph=true;}}else{_b4b=false;}var _b4c;if(map.snappingManager){_b4c=map.snappingManager._snappingPoint;}var _b4d=_b4c||map.toMap(map.toScreen(_b49).offset(tx.dx,tx.dy));if(map.snappingManager){map.snappingManager._killOffSnapping();}_b47.setTransform(null);host.setGeometry(_b48._geo?_b28.webMercatorToGeographic(_b4d,true):_b4d);this.constructor.onMoveStop(this,tx);_b48.onVertexMoveStop(this.relatedGraphic,info,tx);if(!_b4b){_b48.onVertexClick(this.relatedGraphic,info);}if(ph){_b48.onVertexAdd(this.relatedGraphic,this._getInfo());}},_getControlEdges:function(){var map=this.map;var _b4e=this.relatedGraphic.geometry;var _b4f=this.segIndex,_b50=this.ptIndex,_b51=this.segLength;var _b52=this._scratchGL._div;var _b53=_b52.getTransform();var sdx=_b53.dx,sdy=_b53.dy;var pt=map.toScreen(this.graphic.geometry);var x=pt.x-sdx,y=pt.y-sdy;var _b54=[];var _b55=this.editor._getControlPoints(this,_b4e,_b4f,_b50,_b51);if(_b55[0]){_b54.push({x1:x,y1:y,x2:_b55[0].x-sdx,y2:_b55[0].y-sdy});}if(_b55[1]){_b54.push({x1:x,y1:y,x2:_b55[1].x-sdx,y2:_b55[1].y-sdy});}return _b54;}});if(has("extend-esri")){lang.setObject("toolbars.VertexMover",VM,_b25);}lang.mixin(VM,{onMoveStart:function(){},onFirstMove:function(){},onMoveStop:function(){}});return VM;});},"dijit/_WidgetBase":function(){define("dijit/_WidgetBase",["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","./registry"],function(_b56,_b57,_b58,_b59,_b5a,_b5b,dom,_b5c,_b5d,_b5e,_b5f,_b60,has,_b61,lang,on,_b62,_b63,_b64,win,_b65,_b66){has.add("dijit-legacy-requires",!_b61.isAsync);if(has("dijit-legacy-requires")){_b62(0,function(){var _b67=["dijit/_base/manager"];_b56(_b67);});}var _b68={};function _b69(obj){var ret={};for(var attr in obj){ret[attr.toLowerCase()]=true;}return ret;};function _b6a(attr){return function(val){_b5c[val?"set":"remove"](this.domNode,attr,val);this._set(attr,val);};};return _b5b("dijit._WidgetBase",[_b63,_b65],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:_b6a("lang"),dir:"",_setDirAttr:_b6a("dir"),textDir:"","class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(val){this._set("ownerDocument",val);},attributeMap:{},_blankGif:_b59.blankGif||_b56.toUrl("dojo/resources/blank.gif"),postscript:function(_b6b,_b6c){this.create(_b6b,_b6c);},create:function(_b6d,_b6e){this.srcNodeRef=dom.byId(_b6e);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_b6d){this.params=_b6d;lang.mixin(this,_b6d);}this.postMixInProperties();if(!this.id){this.id=_b66.getUniqueId(this.declaredClass.replace(/\./g,"_"));if(this.params){delete this.params.id;}}this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:win.doc);this.ownerDocumentBody=win.body(this.ownerDocument);_b66.add(this);this.buildRendering();var _b6f;if(this.domNode){this._applyAttributes();var _b70=this.srcNodeRef;if(_b70&&_b70.parentNode&&this.domNode!==_b70){_b70.parentNode.replaceChild(this.domNode,_b70);_b6f=true;}this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(_b6f){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var ctor=this.constructor,list=ctor._setterAttrs;if(!list){list=(ctor._setterAttrs=[]);for(var attr in this.attributeMap){list.push(attr);}var _b71=ctor.prototype;for(var _b72 in _b71){if(_b72 in this.attributeMap){continue;}var _b73="_set"+_b72.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();})+"Attr";if(_b73 in _b71){list.push(_b72);}}}var _b74={};for(var key in this.params||{}){_b74[key]=this[key];}_b57.forEach(list,function(attr){if(attr in _b74){}else{if(this[attr]){this.set(attr,this[attr]);}}},this);for(key in _b74){this.set(key,_b74[key]);}},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div");}if(this.baseClass){var _b75=this.baseClass.split(" ");if(!this.isLeftToRight()){_b75=_b75.concat(_b57.map(_b75,function(name){return name+"Rtl";}));}_b5d.add(this.domNode,_b75);}},postCreate:function(){},startup:function(){if(this._started){return;}this._started=true;_b57.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&lang.isFunction(obj.startup)){obj.startup();obj._started=true;}});},destroyRecursive:function(_b76){this._beingDestroyed=true;this.destroyDescendants(_b76);this.destroy(_b76);},destroy:function(_b77){this._beingDestroyed=true;this.uninitialize();function _b78(w){if(w.destroyRecursive){w.destroyRecursive(_b77);}else{if(w.destroy){w.destroy(_b77);}}};_b57.forEach(this._connects,lang.hitch(this,"disconnect"));_b57.forEach(this._supportingWidgets,_b78);if(this.domNode){_b57.forEach(_b66.findWidgets(this.domNode,this.containerNode),_b78);}this.destroyRendering(_b77);_b66.remove(this.id);this._destroyed=true;},destroyRendering:function(_b79){if(this.bgIframe){this.bgIframe.destroy(_b79);delete this.bgIframe;}if(this.domNode){if(_b79){_b5c.remove(this.domNode,"widgetId");}else{_b5e.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_b79){_b5e.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_b7a){_b57.forEach(this.getChildren(),function(_b7b){if(_b7b.destroyRecursive){_b7b.destroyRecursive(_b7a);}});},uninitialize:function(){return false;},_setStyleAttr:function(_b7c){var _b7d=this.domNode;if(lang.isObject(_b7c)){_b60.set(_b7d,_b7c);}else{if(_b7d.style.cssText){_b7d.style.cssText+="; "+_b7c;}else{_b7d.style.cssText=_b7c;}}this._set("style",_b7c);},_attrToDom:function(attr,_b7e,_b7f){_b7f=arguments.length>=3?_b7f:this.attributeMap[attr];_b57.forEach(lang.isArray(_b7f)?_b7f:[_b7f],function(_b80){var _b81=this[_b80.node||_b80||"domNode"];var type=_b80.type||"attribute";switch(type){case "attribute":if(lang.isFunction(_b7e)){_b7e=lang.hitch(this,_b7e);}var _b82=_b80.attribute?_b80.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);if(_b81.tagName){_b5c.set(_b81,_b82,_b7e);}else{_b81.set(_b82,_b7e);}break;case "innerText":_b81.innerHTML="";_b81.appendChild(this.ownerDocument.createTextNode(_b7e));break;case "innerHTML":_b81.innerHTML=_b7e;break;case "class":_b5d.replace(_b81,_b7e,this[attr]);break;}},this);},get:function(name){var _b83=this._getAttrNames(name);return this[_b83.g]?this[_b83.g]():this[name];},set:function(name,_b84){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _b85=this._getAttrNames(name),_b86=this[_b85.s];if(lang.isFunction(_b86)){var _b87=_b86.apply(this,Array.prototype.slice.call(arguments,1));}else{var _b88=this.focusNode&&!lang.isFunction(this.focusNode)?"focusNode":"domNode",_b89,map,tag;tag=this[_b88]&&this[_b88].tagName;if(tag){_b89=_b68[tag]||(_b68[tag]=_b69(this[_b88]));}map=name in this.attributeMap?this.attributeMap[name]:_b85.s in this?this[_b85.s]:((_b89&&_b85.l in _b89&&typeof _b84!="function")||/^aria-|^data-|^role$/.test(name))?_b88:null;if(map!=null){this._attrToDom(name,_b84,map);}this._set(name,_b84);}return _b87||this;},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();});return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr",l:uc.toLowerCase()});},_set:function(name,_b8a){var _b8b=this[name];this[name]=_b8a;if(this._created&&_b8a!==_b8b){if(this._watchCallbacks){this._watchCallbacks(name,_b8b,_b8a);}this.emit("attrmodified-"+name,{detail:{prevValue:_b8b,newValue:_b8a}});}},emit:function(type,_b8c,_b8d){_b8c=_b8c||{};if(_b8c.bubbles===undefined){_b8c.bubbles=true;}if(_b8c.cancelable===undefined){_b8c.cancelable=true;}if(!_b8c.detail){_b8c.detail={};}_b8c.detail.widget=this;var ret,_b8e=this["on"+type];if(_b8e){ret=_b8e.apply(this,_b8d?_b8d:[_b8c]);}if(this._started&&!this._beingDestroyed){on.emit(this.domNode,type.toLowerCase(),_b8c);}return ret;},on:function(type,func){var _b8f=this._onMap(type);if(_b8f){return _b58.after(this,_b8f,func,true);}return this.own(on(this.domNode,type,func))[0];},_onMap:function(type){var ctor=this.constructor,map=ctor._onMap;if(!map){map=(ctor._onMap={});for(var attr in ctor.prototype){if(/^on/.test(attr)){map[attr.replace(/^on/,"").toLowerCase()]=attr;}}}return map[typeof type=="string"&&type.toLowerCase()];},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getChildren:function(){return this.containerNode?_b66.findWidgets(this.containerNode):[];},getParent:function(){return _b66.getEnclosingWidget(this.domNode.parentNode);},connect:function(obj,_b90,_b91){return this.own(_b5a.connect(obj,_b90,this,_b91))[0];},disconnect:function(_b92){_b92.remove();},subscribe:function(t,_b93){return this.own(_b64.subscribe(t,lang.hitch(this,_b93)))[0];},unsubscribe:function(_b94){_b94.remove();},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_b5f.isBodyLtr(this.ownerDocument);},isFocusable:function(){return this.focus&&(_b60.get(this.domNode,"display")!="none");},placeAt:function(_b95,_b96){var _b97=!_b95.tagName&&_b66.byId(_b95);if(_b97&&_b97.addChild&&(!_b96||typeof _b96==="number")){_b97.addChild(this,_b96);}else{var ref=_b97?(_b97.containerNode&&!/after|before|replace/.test(_b96||"")?_b97.containerNode:_b97.domNode):dom.byId(_b95,this.ownerDocument);_b5e.place(this.domNode,ref,_b96);if(!this._started&&(this.getParent()||{})._started){this.startup();}}return this;},getTextDir:function(text,_b98){return _b98;},applyTextDir:function(){},defer:function(fcn,_b99){var _b9a=setTimeout(lang.hitch(this,function(){_b9a=null;if(!this._destroyed){lang.hitch(this,fcn)();}}),_b99||0);return {remove:function(){if(_b9a){clearTimeout(_b9a);_b9a=null;}return null;}};}});});},"dojo/dnd/Moveable":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../dom","../dom-class","../Evented","../on","../topic","../touch","./common","./Mover","../_base/window"],function(_b9b,_b9c,_b9d,lang,dom,_b9e,_b9f,on,_ba0,_ba1,dnd,_ba2,win){var _ba3=_b9c("dojo.dnd.Moveable",[_b9f],{handle:"",delay:0,skip:false,constructor:function(node,_ba4){this.node=dom.byId(node);if(!_ba4){_ba4={};}this.handle=_ba4.handle?dom.byId(_ba4.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_ba4.delay>0?_ba4.delay:0;this.skip=_ba4.skip;this.mover=_ba4.mover?_ba4.mover:_ba2;this.events=[on(this.handle,_ba1.press,lang.hitch(this,"onMouseDown")),on(this.handle,"dragstart",lang.hitch(this,"onSelectStart")),on(this.handle,"selectstart",lang.hitch(this,"onSelectStart"))];},markupFactory:function(_ba5,node,Ctor){return new Ctor(node,_ba5);},destroy:function(){_b9b.forEach(this.events,function(_ba6){_ba6.remove();});this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dnd.isFormElement(e)){return;}if(this.delay){this.events.push(on(this.handle,_ba1.move,lang.hitch(this,"onMouseMove")),on(this.handle,_ba1.release,lang.hitch(this,"onMouseUp")));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}_b9d.stop(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}_b9d.stop(e);},onMouseUp:function(e){for(var i=0;i<2;++i){this.events.pop().remove();}_b9d.stop(e);},onSelectStart:function(e){if(!this.skip||!dnd.isFormElement(e)){_b9d.stop(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_ba7){_ba0.publish("/dnd/move/start",_ba7);_b9e.add(win.body(),"dojoMove");_b9e.add(this.node,"dojoMoveItem");},onMoveStop:function(_ba8){_ba0.publish("/dnd/move/stop",_ba8);_b9e.remove(win.body(),"dojoMove");_b9e.remove(this.node,"dojoMoveItem");},onFirstMove:function(){},onMove:function(_ba9,_baa){this.onMoving(_ba9,_baa);var s=_ba9.node.style;s.left=_baa.l+"px";s.top=_baa.t+"px";this.onMoved(_ba9,_baa);},onMoving:function(){},onMoved:function(){}});return _ba3;});},"esri/toolbars/_VertexEditor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/has","dijit/Menu","dijit/MenuItem","esri/kernel","esri/toolbars/_VertexMover","esri/geometry/Point","esri/geometry/jsonUtils","dojo/i18n!esri/nls/jsapi"],function(_bab,lang,_bac,_bad,has,Menu,_bae,_baf,_bb0,_bb1,_bb2,_bb3){var GVE=_bab(null,{declaredClass:"esri.toolbars._GraphicVertexEditor",constructor:function(_bb4,map,_bb5){this.graphic=_bb4;this.map=map;this.toolbar=_bb5;var _bb6=_bb5._options;this._symbol1=_bb6.vertexSymbol;this._symbol2=_bb6.ghostVertexSymbol;var _bb7=_bb6.ghostLineSymbol;this._lineStroke={style:_bb7.style,width:_bb7.width,color:_bb7.color};this._canDel=_bb6.allowDeleteVertices;this._canAdd=_bb6.allowAddVertices;this._addControllers();},destroy:function(){this._removeControllers();},refresh:function(_bb8){if(_bb8){this._removeControllers();this._addControllers();}else{this._refresh(this._vertexMovers);this._refresh(this._mpVertexMovers);}},suspend:function(){if(!this._suspended){this._removeControllers();}this._suspended=true;},resume:function(){if(this._suspended){this._addControllers();}this._suspended=false;},_addControllers:function(){this._firstMoveHandle=_bac.connect(_bb0,"onFirstMove",this,this._firstMoveHandler);this._moveStopHandle=_bac.connect(_bb0,"onMoveStop",this,this._moveStopHandler);this._vertexMovers=this._add(this._getSegments(this.graphic.geometry),this._symbol1);if(this._canAdd){this._mpVertexMovers=this._add(this._getMidpointSegments(this.graphic.geometry),this._symbol2,true);}var _bb9=this._getGraphicsLayer();this._mouseOverHandle=_bac.connect(_bb9,"onMouseOver",this,this._mouseOverHandler);this._mouseOutHandle=_bac.connect(_bb9,"onMouseOut",this,this._mouseOutHandler);if(this._canDel){this._ctxMenu=new Menu({style:"font-size: 12px; margin-left: 5px; margin-top: 5px;"});var _bba=(this._ctxDelete=new _bae({label:_bb3.toolbars.edit.deleteLabel,iconClass:"vertexDeleteIcon",style:"outline: none;"}));this._deleteHandle=_bac.connect(_bba,"onClick",this,this._deleteHandler);this._ctxMenu.addChild(_bba);this._ctxMenu.startup();}},_removeControllers:function(){_bac.disconnect(this._firstMoveHandle);_bac.disconnect(this._moveStopHandle);_bac.disconnect(this._mouseOverHandle);_bac.disconnect(this._mouseOutHandle);_bac.disconnect(this._deleteHandle);if(this._ctxMenu){this._ctxDelete=null;this._unbindCtxNode();this._ctxMenu.destroyRecursive();}this._remove(this._vertexMovers);this._remove(this._mpVertexMovers);this._vertexMovers=this._mpVertexMovers=null;},_add:function(_bbb,_bbc,_bbd){var i,j,_bbe=this.graphic,_bbf=[];for(i=0;i<_bbb.length;i++){var _bc0=_bbb[i],_bc1=[];for(j=0;j<_bc0.length;j++){_bc1.push(new _bb0(_bc0[j],_bbc,_bbe,i,j,_bc0.length,this,_bbd));}_bbf.push(_bc1);}return _bbf;},_remove:function(_bc2){if(_bc2){_bad.forEach(_bc2,function(_bc3){_bad.forEach(_bc3,function(_bc4){_bc4.destroy();});});}},_refresh:function(_bc5){if(_bc5){_bad.forEach(_bc5,function(_bc6){_bad.forEach(_bc6,function(_bc7){_bc7.refresh();});});}},_isNew:function(_bc8){return (_bad.indexOf(this._vertexMovers[_bc8.segIndex],_bc8)===-1)?true:false;},_getGraphicsLayer:function(){return this.toolbar._scratchGL;},_deleteHandler:function(evt){var _bc9=this._selectedMover,_bca=_bc9.ptIndex;this._updateRelatedGraphic(_bc9,_bc9.relatedGraphic,_bc9.graphic.geometry,_bc9.segIndex,_bc9.ptIndex,_bc9.segLength,false,true);if(this._canAdd){this._deleteMidpoints(_bc9);}this._deleteVertex(_bc9);this.toolbar._endOperation("VERTICES");},_mouseOverHandler:function(evt){var _bcb=evt.graphic,_bcc=this._findMover(_bcb);if(_bcc){this.toolbar.onVertexMouseOver(this.graphic,_bcc._getInfo());if(!_bcc._placeholder){this._selectedMover=_bcc;if(this._canDel){this._bindCtxNode(_bcb.getDojoShape().getNode());}}}},_mouseOutHandler:function(evt){var _bcd=evt.graphic,_bce=this._findMover(_bcd);if(_bce){this.toolbar.onVertexMouseOut(this.graphic,_bce._getInfo());}},_bindCtxNode:function(node){this._unbindCtxNode();this._ctxDelete.set("disabled",(this._selectedMover.segLength<=this.minLength)?true:false);this._ctxMenu.bindDomNode(node);this._bindNode=node;},_unbindCtxNode:function(){var node=this._bindNode;if(node){this._ctxMenu.unBindDomNode(node);}},_findMover:function(_bcf){var i,_bd0=[],_bd1=this._mpVertexMovers;_bad.forEach(this._vertexMovers,function(_bd2){_bd0=_bd0.concat(_bd2);});if(_bd1){_bad.forEach(_bd1,function(_bd3){_bd0=_bd0.concat(_bd3);});}for(i=0;i<_bd0.length;i++){var _bd4=_bd0[i];if(_bd4.graphic===_bcf){return _bd4;}}},_firstMoveHandler:function(_bd5){if(!this._isNew(_bd5)&&this._canAdd){this._hideRelatedMidpoints(_bd5);}this.toolbar._beginOperation("VERTICES");},_moveStopHandler:function(_bd6,tx){var add=this._isNew(_bd6);if(!tx||!tx.dx&&!tx.dy){if(!add&&this._canAdd){this._showRelatedMidpoints(_bd6);}return;}this._updateRelatedGraphic(_bd6,_bd6.relatedGraphic,_bd6.graphic.geometry,_bd6.segIndex,_bd6.ptIndex,_bd6.segLength,add);if(this._canAdd){if(add){this._addMidpoints(_bd6);}else{this._repositionRelatedMidpoints(_bd6);this._showRelatedMidpoints(_bd6);}}this.toolbar._endOperation("VERTICES");},_showRelatedMidpoints:function(_bd7){var i,_bd8=this._getAdjacentMidpoints(_bd7.ptIndex,_bd7.segLength),_bd9=this._mpVertexMovers[_bd7.segIndex];for(i=0;i<_bd8.length;i++){var mvr=_bd9[_bd8[i]];mvr.graphic.show();mvr.refresh();}},_hideRelatedMidpoints:function(_bda){var i,_bdb=this._getAdjacentMidpoints(_bda.ptIndex,_bda.segLength),_bdc=this._mpVertexMovers[_bda.segIndex];for(i=0;i<_bdb.length;i++){_bdc[_bdb[i]].graphic.hide();}},_repositionRelatedMidpoints:function(_bdd){var i,_bde=this._getAdjacentMidpoints(_bdd.ptIndex,_bdd.segLength),_bdf=this._mpVertexMovers[_bdd.segIndex];for(i=0;i<_bde.length;i++){var _be0=this._getAdjacentVertices(_bde[i],_bdd.segLength);var _be1=_bdd.relatedGraphic.geometry.getPoint(_bdd.segIndex,_be0[0]),_be2=_bdd.relatedGraphic.geometry.getPoint(_bdd.segIndex,_be0[1]);var _be3=new _bb1({x:(_be1.x+_be2.x)/2,y:(_be1.y+_be2.y)/2,spatialReference:_be1.spatialReference.toJson()});_bdf[_bde[i]].graphic.setGeometry(_be3);}},_addMidpoints:function(_be4){var _be5=_be4.segIndex,_be6=_be4.ptIndex,_be7=_be4.segLength;var _be8=_be6+1;var i,_be9=_be7+1;this._mpVertexMovers[_be5].splice(_be6,1);var _bea=this._vertexMovers[_be5];for(i=0;i<_be8;i++){_bea[i].segLength+=1;}for(i=_be8;i<_bea.length;i++){_bea[i].ptIndex+=1;_bea[i].segLength+=1;}_be4.ptIndex=_be8;_be4.segLength=_bea.length+1;_bea.splice(_be8,0,_be4);_be4.graphic.setSymbol(this._symbol1);_bea=this._mpVertexMovers[_be5];for(i=0;i<_be6;i++){_bea[i].segLength+=1;}for(i=_be6;i<_be7-1;i++){_bea[i].ptIndex+=1;_bea[i].segLength+=1;}var _beb=this._getAdjacentVertices(_be6,_be9);var _bec=this._getAdjacentVertices(_be6+1,_be9);var _bed,_bee;_bed=_be4.relatedGraphic.geometry.getPoint(_be4.segIndex,_beb[0]);_bee=_be4.relatedGraphic.geometry.getPoint(_be4.segIndex,_beb[1]);var _bef=new _bb1({x:(_bed.x+_bee.x)/2,y:(_bed.y+_bee.y)/2,spatialReference:_bed.spatialReference.toJson()});_bed=_be4.relatedGraphic.geometry.getPoint(_be4.segIndex,_bec[0]);_bee=_be4.relatedGraphic.geometry.getPoint(_be4.segIndex,_bec[1]);var _bf0=new _bb1({x:(_bed.x+_bee.x)/2,y:(_bed.y+_bee.y)/2,spatialReference:_bed.spatialReference.toJson()});var mvr1=new _bb0(_bef,this._symbol2,this.graphic,_be4.segIndex,_be6,_be9,this,true);var mvr2=new _bb0(_bf0,this._symbol2,this.graphic,_be4.segIndex,_be6+1,_be9,this,true);_bea.splice(_be6,0,mvr1,mvr2);},_deleteVertex:function(_bf1){var i,_bf2=_bf1.segIndex,_bf3=_bf1.ptIndex;var _bf4=this._vertexMovers[_bf2];for(i=0;i<_bf3;i++){_bf4[i].segLength-=1;}for(i=_bf3+1;i<_bf4.length;i++){var mvr=_bf4[i];mvr.ptIndex-=1;mvr.segLength-=1;}_bf4.splice(_bf3,1);var info=_bf1._getInfo();_bf1.destroy();this.toolbar.onVertexDelete(this.graphic,info);}});lang.mixin(GVE,{create:function(_bf5,map,_bf6){var type=_bf5.geometry.type;switch(type){case "multipoint":return new GVE.MultipointVertexEditor(_bf5,map,_bf6);break;case "polyline":return new GVE.PolylineVertexEditor(_bf5,map,_bf6);break;case "polygon":return new GVE.PolygonVertexEditor(_bf5,map,_bf6);break;}}});GVE.MultipointVertexEditor=_bab(GVE,{declaredClass:"esri.toolbars._MultipointVertexEditor",minLength:1,constructor:function(){this._moveStartHandle=_bac.connect(_bb0,"onMoveStart",this,this._moveStartHandler);_bac.disconnect(this._firstMoveHandle);},destroy:function(){this.inherited(arguments);_bac.disconnect(this._moveStartHandle);},_getSegments:function(_bf7){var i,_bf8=_bf7.points,_bf9=[],sr=_bf7.spatialReference;for(i=0;i<_bf8.length;i++){var _bfa=_bf8[i];_bf9.push(new _bb1({x:_bfa[0],y:_bfa[1],spatialReference:sr.toJson()}));}return [_bf9];},_getMidpointSegments:function(_bfb){return [];},_getControlPoints:function(_bfc,_bfd,_bfe,_bff,_c00){return [];},_getGraphicsLayer:function(){return this.graphic._graphicsLayer;},_mouseOverHandler:function(evt){var _c01=evt.graphic,_c02=this._findMover(evt);if(_c02){this.toolbar.onVertexMouseOver(_c01,_c02._getInfo());this._selectedMover=_c02;if(this._canDel){this._bindCtxNode(_c02.graphic.getDojoShape().getNode());}}},_mouseOutHandler:function(evt){var _c03=evt.graphic,_c04=this._findMover(evt);if(_c04){this.toolbar.onVertexMouseOut(_c03,_c04._getInfo());}},_findMover:function(evt){var i,_c05=[].concat(this._vertexMovers[0]),_c06=evt.target;for(i=0;i<_c05.length;i++){var _c07=_c05[i];if(_c07.graphic.getDojoShape().getNode()===_c06){return _c07;}}},_moveStartHandler:function(_c08){var geom=_c08.relatedGraphic.geometry,_c09=_c08.ptIndex;var _c0a=_c08.segLength-1;var _c0b=geom.points;var _c0c=_c0b.splice(_c09,1);_c0b.push(_c0c[0]);var j,_c0d=this._vertexMovers[0];for(j=_c0a;j>_c09;j--){_c0d[j].ptIndex-=1;}_c0c=_c0d.splice(_c09,1);_c0d.push(_c0c[0]);_c0c[0].ptIndex=_c0a;},_moveStopHandler:function(_c0e){this._updateRelatedGraphic(_c0e,_c0e.relatedGraphic,_c0e.graphic.geometry,_c0e.segIndex,_c0e.ptIndex,_c0e.segLength);this.toolbar._endOperation("VERTICES");},_updateRelatedGraphic:function(_c0f,_c10,_c11,_c12,_c13,_c14,add,del){var geom=_c10.geometry;if(del){geom.removePoint(_c13);}else{geom.setPoint(_c13,_c11);}_c10.setGeometry(geom);},_deleteMidpoints:function(_c15){}});GVE.PolylineVertexEditor=_bab(GVE,{declaredClass:"esri.toolbars._PolylineVertexEditor",minLength:2,_getSegments:function(_c16){var i,j,_c17=_c16.paths,_c18=[];for(i=0;i<_c17.length;i++){var path=_c17[i],_c19=[];for(j=0;j<path.length;j++){_c19.push(_c16.getPoint(i,j));}_c18.push(_c19);}return _c18;},_getMidpointSegments:function(_c1a){var i,j,_c1b=_c1a.paths,_c1c=[],sr=_c1a.spatialReference;for(i=0;i<_c1b.length;i++){var path=_c1b[i],_c1d=[];for(j=0;j<path.length-1;j++){var _c1e=_c1a.getPoint(i,j),_c1f=_c1a.getPoint(i,j+1);var midX=(_c1e.x+_c1f.x)/2,midY=(_c1e.y+_c1f.y)/2;var _c20=new _bb1({x:midX,y:midY,spatialReference:sr.toJson()});_c1d.push(_c20);}_c1c.push(_c1d);}return _c1c;},_getControlPoints:function(_c21,_c22,_c23,_c24,_c25){var map=this.map,idx1,idx2,pt1,pt2;if(this._isNew(_c21)){idx1=_c24;idx2=_c24+1;if(idx1>=0){pt1=map.toScreen(_c22.getPoint(_c23,idx1));}if(idx2<=_c25){pt2=map.toScreen(_c22.getPoint(_c23,idx2));}}else{idx1=_c24-1;idx2=_c24+1;if(idx1>=0){pt1=map.toScreen(_c22.getPoint(_c23,idx1));}if(idx2<_c25){pt2=map.toScreen(_c22.getPoint(_c23,idx2));}}return [pt1,pt2];},_getAdjacentMidpoints:function(_c26,_c27){var _c28=[];var idx1=_c26-1;if(idx1>=0){_c28.push(idx1);}var idx2=_c26;if(idx2<_c27-1){_c28.push(idx2);}return _c28;},_getAdjacentVertices:function(_c29,_c2a){return [_c29,_c29+1];},_deleteMidpoints:function(_c2b){var _c2c=_c2b.segIndex,_c2d=_c2b.ptIndex,_c2e=_c2b.segLength;var _c2f=this._mpVertexMovers[_c2c],_c30=_c2f.length-1;var _c31=this._getAdjacentMidpoints(_c2d,_c2e).sort();var i,min=_c31[0];for(i=0;i<min;i++){_c2f[i].segLength-=1;}for(i=min+1;i<_c2f.length;i++){var mvr=_c2f[i];mvr.ptIndex-=1;mvr.segLength-=1;}if(_c31.length===1){_c2f.splice(min,1)[0].destroy();}else{var _c32=this._getAdjacentVertices(min,_c30);var _c33=_c2b.relatedGraphic.geometry.getPoint(_c2b.segIndex,_c32[0]);var _c34=_c2b.relatedGraphic.geometry.getPoint(_c2b.segIndex,_c32[1]);var _c35=new _bb1({x:(_c33.x+_c34.x)/2,y:(_c33.y+_c34.y)/2,spatialReference:_c33.spatialReference.toJson()});var mvr1=new _bb0(_c35,this._symbol2,this.graphic,_c2b.segIndex,min,_c30,this,true);var _c36=_c2f.splice(min,_c31.length,mvr1);for(i=0;i<_c36.length;i++){_c36[i].destroy();}}},_updateRelatedGraphic:function(_c37,_c38,_c39,_c3a,_c3b,_c3c,add,del){var geom=_c38.geometry;if(add){geom.insertPoint(_c3a,_c3b+1,_bb2.fromJson(_c39.toJson()));}else{if(del){geom.removePoint(_c3a,_c3b);}else{geom.setPoint(_c3a,_c3b,_bb2.fromJson(_c39.toJson()));}}_c38.setGeometry(geom);}});GVE.PolygonVertexEditor=_bab(GVE,{declaredClass:"esri.toolbars._PolygonVertexEditor",minLength:3,_getSegments:function(_c3d){var i,j,_c3e=_c3d.rings,_c3f=[];for(i=0;i<_c3e.length;i++){var ring=_c3e[i],_c40=[];for(j=0;j<ring.length-1;j++){_c40.push(_c3d.getPoint(i,j));}_c3f.push(_c40);}return _c3f;},_getMidpointSegments:function(_c41){var i,j,_c42=_c41.rings,_c43=[],sr=_c41.spatialReference;for(i=0;i<_c42.length;i++){var ring=_c42[i],_c44=[];for(j=0;j<ring.length-1;j++){var _c45=_c41.getPoint(i,j),_c46=_c41.getPoint(i,j+1);var midX=(_c45.x+_c46.x)/2,midY=(_c45.y+_c46.y)/2;var _c47=new _bb1({x:midX,y:midY,spatialReference:sr.toJson()});_c44.push(_c47);}_c43.push(_c44);}return _c43;},_getControlPoints:function(_c48,_c49,_c4a,_c4b,_c4c){var map=this.map,idx1,idx2,pt1,pt2;if(this._isNew(_c48)){idx1=_c4b;idx2=(_c4b+1)%_c4c;}else{idx1=_c4b-1;idx1=idx1<0?(_c4c+idx1)%_c4c:idx1;idx2=(_c4b+1)%_c4c;}pt1=map.toScreen(_c49.getPoint(_c4a,idx1));pt2=map.toScreen(_c49.getPoint(_c4a,idx2));return [pt1,pt2];},_getAdjacentMidpoints:function(_c4d,_c4e){var idx1=_c4d-1;idx1=idx1<0?(_c4e+idx1)%_c4e:idx1;var idx2=_c4d;return [idx1,idx2];},_getAdjacentVertices:function(_c4f,_c50){return [_c4f,(_c4f+1)%_c50];},_deleteMidpoints:function(_c51){var _c52=_c51.segIndex,_c53=_c51.ptIndex,_c54=_c51.segLength;var _c55=this._mpVertexMovers[_c52],_c56=_c55.length-1,_c57=this._getAdjacentMidpoints(_c53,_c54).sort(),_c58,_c59,_c5a,_c5b,i,mvr1,mvr,min=_c57[0],max=_c57[_c57.length-1];if(_c53===0){_c58=this._getAdjacentVertices(_c56-1,_c56);_c59=_c51.relatedGraphic.geometry.getPoint(_c51.segIndex,_c58[0]);_c5a=_c51.relatedGraphic.geometry.getPoint(_c51.segIndex,_c58[1]);_c5b=new _bb1({x:(_c59.x+_c5a.x)/2,y:(_c59.y+_c5a.y)/2,spatialReference:_c59.spatialReference.toJson()});mvr1=new _bb0(_c5b,this._symbol2,this.graphic,_c51.segIndex,_c56-1,_c56,this,true);_c55.splice(max,1,mvr1)[0].destroy();_c55.splice(min,1)[0].destroy();for(i=0;i<_c55.length-1;i++){mvr=_c55[i];mvr.ptIndex-=1;mvr.segLength-=1;}}else{_c58=this._getAdjacentVertices(min,_c56);_c59=_c51.relatedGraphic.geometry.getPoint(_c51.segIndex,_c58[0]);_c5a=_c51.relatedGraphic.geometry.getPoint(_c51.segIndex,_c58[1]);_c5b=new _bb1({x:(_c59.x+_c5a.x)/2,y:(_c59.y+_c5a.y)/2,spatialReference:_c59.spatialReference.toJson()});mvr1=new _bb0(_c5b,this._symbol2,this.graphic,_c51.segIndex,min,_c56,this,true);var _c5c=_c55.splice(min,_c57.length,mvr1);for(i=0;i<_c5c.length;i++){_c5c[i].destroy();}for(i=0;i<min;i++){_c55[i].segLength-=1;}for(i=min+1;i<_c55.length;i++){mvr=_c55[i];mvr.ptIndex-=1;mvr.segLength-=1;}}},_updateRelatedGraphic:function(_c5d,_c5e,_c5f,_c60,_c61,_c62,add,del){var geom=_c5e.geometry;if(add){geom.insertPoint(_c60,_c61+1,_bb2.fromJson(_c5f.toJson()));}else{if(del){geom.removePoint(_c60,_c61);if(_c61===0){geom.setPoint(_c60,_c62-1,_bb2.fromJson(geom.getPoint(_c60,0).toJson()));}}else{geom.setPoint(_c60,_c61,_bb2.fromJson(_c5f.toJson()));if(_c61===0){geom.setPoint(_c60,_c62,_bb2.fromJson(_c5f.toJson()));}}}_c5e.setGeometry(geom);}});if(has("extend-esri")){lang.setObject("toolbars._GraphicVertexEditor",GVE,_baf);lang.setObject("toolbars._MultipointVertexEditor",GVE.MultipointVertexEditor,_baf);lang.setObject("toolbars._PolylineVertexEditor",GVE.PolylineVertexEditor,_baf);lang.setObject("toolbars._PolygonVertexEditor",GVE.PolygonVertexEditor,_baf);}return GVE;});},"*now":function(r){r(["dojo/i18n!*preload*esri/dijit/editing/nls/TemplatePicker-all*[\"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/dijit/editing/TemplatePicker-all",["esri/layers/FeatureLayer","esri/toolbars/draw","esri/toolbars/edit","esri/dijit/editing/TemplatePicker"],function(_c63,Draw,Edit,_c64){return {};});