/*
 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:{"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(_1,_2,_3){var _4=null;return _1("dojo.store.Memory",_4,{constructor:function(_5){for(var i in _5){this[i]=_5[i];}this.setData(this.data||[]);},data:null,idProperty:"id",index:null,queryEngine:_3,get:function(id){return this.data[this.index[id]];},getIdentity:function(_6){return _6[this.idProperty];},put:function(_7,_8){var _9=this.data,_a=this.index,_b=this.idProperty;var id=_7[_b]=(_8&&"id" in _8)?_8.id:_b in _7?_7[_b]:Math.random();if(id in _a){if(_8&&_8.overwrite===false){throw new Error("Object already exists");}_9[_a[id]]=_7;}else{_a[id]=_9.push(_7)-1;}return id;},add:function(_c,_d){(_d=_d||{}).overwrite=false;return this.put(_c,_d);},remove:function(id){var _e=this.index;var _f=this.data;if(id in _e){_f.splice(_e[id],1);this.setData(_f);return true;}},query:function(_10,_11){return _2(this.queryEngine(_10,_11)(this.data));},setData:function(_12){if(_12.items){this.idProperty=_12.identifier;_12=this.data=_12.items;}else{this.data=_12;}this.index={};for(var i=0,l=_12.length;i<l;i++){this.index[_12[i][this.idProperty]]=i;}}});});},"esri/layers/OnDemandMode":function(){define("esri/layers/OnDemandMode",["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(_13,_14,_15,_16,has,_17,_18,_19,_1a,_1b){var _1c=_13([_1a],{declaredClass:"esri.layers._OnDemandMode",constructor:function(_1d){this.featureLayer=_1d;this._featureMap={};this._queryErrorHandler=_15.hitch(this,this._queryErrorHandler);},initialize:function(map){this.inherited(arguments);var _1e=this.featureLayer,_1f=_1e._srInfo;this._gridLayer=new _1b(new _18(_1f?_1f.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_1e._tileWidth,height:_1e._tileHeight},{width:map.width,height:map.height},_1f);this._cellMap={};this._gridLayer.setResolution(map.extent);},startup:function(){this._ioQueue=[];if(!this.featureLayer.suspended){this._zoomHandler();this._enableConnectors();}},propertyChangeHandler:function(_20){if(this._init){if(_20<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(_21){var _22=this._gridLayer,_23=_21.geometry,_24=[];if(!_23){return;}_24=_22.getCellsInExtent((_23.type==="point")?{xmin:_23.x,ymin:_23.y,xmax:_23.x,ymax:_23.y}:_23.getExtent(),false).cells;var _25=this._cellMap,i,_26,oid=_21.attributes[this.featureLayer.objectIdField],_27,row,col;for(i=0;i<_24.length;i++){_26=_24[i];_27=_26.latticeID;row=_26.row;col=_26.col;if(_27){_26=(_25[_27]=(_25[_27]||_26));}else{_25[row]=_25[row]||{};_26=(_25[row][col]=(_25[row][col]||_26));}_26.features=_26.features||[];_26.features.push(_21);this._addFeatureIIf(oid,_21);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=_14.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=_14.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=_14.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){_14.disconnect(this._zoomConnect);_14.disconnect(this._panConnect);_14.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _28=this.featureLayer,map=this.map;if(_28.suspended){return;}_28._fireUpdateStart();this._clearIIf();var _29=_28._trackManager;if(_29){_29.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_2a,_2b){var id="_"+_2a.name+_2a.layerId+_2a._ulid+"_"+_2b.resolution+"_"+(_2b.latticeID||(_2b.row+"_"+_2b.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_2c){this._exceeds=false;var _2d=this.featureLayer,map=this.map,_2e=_2c||map.extent,_2f=this._gridLayer.getCellsInExtent(_2e,_2d.latticeTiling),_30=_2f.cells;if(!_2d.isEditable()){var _31=this._cellMap;_30=_16.filter(_30,function(_32){if(_32.lattice){if(_31[_32.latticeID]){return false;}}else{if(_31[_32.row]&&_31[_32.row][_32.col]){return false;}}return true;});}var _33=_2d.getOutFields(),_34=_2d.getDefinitionExpression(),_35=_2d._getOffsettedTE(_2d._mapTimeExtent),_36=_2d._usePatch,_37=this._ioQueue,i,_38=this,_39=this._drawFeatures,_3a,_3b,_3c;this._pending=this._pending||0;for(i=0;i<_30.length;i++){_3a=_30[i];_3b=new _19();_3b.geometry=_3a.extent||_3a.lattice;_3b.outFields=_33;_3b.where=_34;if(_2d.latticeTiling&&_3a.extent){_3b.spatialRelationship=_19.SPATIAL_REL_CONTAINS;}_3b.returnGeometry=true;_3b.timeExtent=_35;_3b.maxAllowableOffset=_2d._maxOffset;if(_2d._ts){_3b._ts=(new Date()).getTime();}_3c=null;if(_36){_3c=this._getRequestId(_2d,_3a);if(this._isPending(_3c)){continue;}}this._pending++;_37.push(_2d._task.execute(_3b,function(){var _3d=_3a;return function(_3e){_39.apply(_38,[_3e,_3d]);};}.call(this),this._queryErrorHandler,_3c));}this._removeOldCells(_2e);this._endCheck();},_drawFeatures:function(_3f,_40){this._exceeds=this._exceeds||_3f.exceededTransferLimit;this._finalizeIO();var _41=this.featureLayer,map=this.map,_42=map.extent,_43=_40.extent,row=_40.row,col=_40.col,_44=_41.objectIdField,_45=_3f.features,_46=this._gridLayer,_47=this._cellMap,i,len,_48=_40.latticeID,_49=_48?_47[_48]:(_47[row]&&_47[row][col]);if((_40.resolution!=_46._resolution)||(_48?(_48!==_46.getLatticeID(_42)):(!_46.intersects(_43,_42)))){if(_49){this._removeCell(row,col,_48);}}else{if(_49){this._updateCell(_49,_45);}else{_40.features=_45;if(_48){_47[_48]=_40;}else{_47[row]=_47[row]||{};_47[row][col]=_40;}len=_45.length;for(i=0;i<len;i++){var _4a=_45[i];var oid=_4a.attributes[_44];this._addFeatureIIf(oid,_4a);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(_4b){if(this._pending===0){this._processIOQueue();var _4c=this.featureLayer,_4d=_4c._trackManager;if(_4d){_4d.clearTracks();_4d.addFeatures(_4c.graphics);if(_4c._ager){_16.forEach(_4c.graphics,function(_4e){if(_4e._shape){_4c._repaint(_4e);}});}_4d.moveLatestToFront();_4d.drawTracks();}this.featureLayer._fireUpdateEnd(_4b&&new Error("FeatureLayer: an error occurred while updating the layer"),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_4c.onQueryLimitExceeded();}}},_processIOQueue:function(_4f){this._ioQueue=_16.filter(this._ioQueue,function(dfd){var _50=dfd.fired>-1?false:true;return _50;});if(_4f){_16.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_51){var _52=this._cellMap,_53=this._gridLayer,_54,_55;for(_54 in _52){if(_52[_54]){var row=_52[_54],_56=row.latticeID,_57=0,_58=0;if(_56){_57++;if(_56!==_53.getLatticeID(_51)){this._removeCell(null,null,_56);_58++;}}else{for(_55 in row){if(row[_55]){_57++;var _59=row[_55].extent;if(!_53.intersects(_59,_51)){this._removeCell(_54,_55);_58++;}}}}if(_58===_57){delete _52[_54];}}}},_updateCell:function(_5a,_5b){var _5c=this.featureLayer,_5d=_5c.objectIdField,_5e=_5c._selectedFeatures,i,len=_5b.length;_5a.features=_5a.features||[];for(i=0;i<len;i++){var _5f=_5b[i];var oid=_5f.attributes[_5d];var _60=this._addFeatureIIf(oid,_5f);if(_60===_5f){this._incRefCount(oid);_5a.features.push(_60);}else{if(!(oid in _5e)){_60.setGeometry(_5f.geometry);_60.setAttributes(_5f.attributes);}}}},_removeCell:function(row,col,_61){var _62=this._cellMap,_63=this.featureLayer,_64=_63.objectIdField;var _65=_61?_62[_61]:(_62[row]&&_62[row][col]);if(_65){if(_61){delete _62[_61];}else{delete _62[row][col];}var _66=_65.features,i;for(i=0;i<_66.length;i++){var _67=_66[i];var oid=_67.attributes[_64];this._decRefCount(oid);if(oid in _63._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});if(has("extend-esri")){_15.setObject("layers._OnDemandMode",_1c,_17);}return _1c;});},"dijit/CalendarLite":function(){require({cache:{"url:dijit/templates/Calendar.html":"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" aria-labelledby=\"${id}_mddb ${id}_year\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div data-dojo-attach-point=\"monthNode\">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr role=\"row\">\n\t\t\t${!dayCellsHtml}\n\t\t</tr>\n\t</thead>\n\t<tbody data-dojo-attach-point=\"dateRowsNode\" data-dojo-attach-event=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t\t${!dateRowsHtml}\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\" role=\"presentation\">\n\t\t\t\t<div class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span data-dojo-attach-point=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\" role=\"button\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" role=\"button\" id=\"${id}_year\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\" role=\"button\"></span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"}});define("dijit/CalendarLite",["dojo/_base/array","dojo/_base/declare","dojo/cldr/supplemental","dojo/date","dojo/date/locale","dojo/date/stamp","dojo/dom","dojo/dom-class","dojo/_base/event","dojo/_base/lang","dojo/sniff","dojo/string","./_WidgetBase","./_TemplatedMixin","dojo/text!./templates/Calendar.html","./hccss"],function(_68,_69,_6a,_6b,_6c,_6d,dom,_6e,_6f,_70,has,_71,_72,_73,_74){var _75=_69("dijit.CalendarLite",[_72,_73],{templateString:_74,dowTemplateString:"<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\">${d}</span></th>",dateTemplateString:"<td class=\"dijitReset\" role=\"gridcell\" data-dojo-attach-point=\"dateCells\"><span class=\"dijitCalendarDateLabel\" data-dojo-attach-point=\"dateLabels\"></span></td>",weekTemplateString:"<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">${d}${d}${d}${d}${d}${d}${d}</tr>",value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",currentFocus:new Date(),baseClass:"dijitCalendar",_isValidDate:function(_76){return _76&&!isNaN(_76)&&typeof _76=="object"&&_76.toString()!=this.constructor.prototype.value.toString();},_getValueAttr:function(){if(this.value&&!isNaN(this.value)){var _77=new this.dateClassObj(this.value);_77.setHours(0,0,0,0);if(_77.getDate()<this.value.getDate()){_77=this.dateModule.add(_77,"hour",1);}return _77;}else{return null;}},_setValueAttr:function(_78,_79){if(typeof _78=="string"){_78=_6d.fromISOString(_78);}_78=this._patchDate(_78);if(this._isValidDate(_78)&&!this.isDisabledDate(_78,this.lang)){this._set("value",_78);this.set("currentFocus",_78);this._markSelectedDates([_78]);if(this._created&&(_79||typeof _79=="undefined")){this.onChange(this.get("value"));}}else{this._set("value",null);this._markSelectedDates([]);}},_patchDate:function(_7a){if(_7a){_7a=new this.dateClassObj(_7a);_7a.setHours(1,0,0,0);}return _7a;},_setText:function(_7b,_7c){while(_7b.firstChild){_7b.removeChild(_7b.firstChild);}_7b.appendChild(_7b.ownerDocument.createTextNode(_7c));},_populateGrid:function(){var _7d=new this.dateClassObj(this.currentFocus);_7d.setDate(1);var _7e=_7d.getDay(),_7f=this.dateModule.getDaysInMonth(_7d),_80=this.dateModule.getDaysInMonth(this.dateModule.add(_7d,"month",-1)),_81=new this.dateClassObj(),_82=_6a.getFirstDayOfWeek(this.lang);if(_82>_7e){_82-=7;}this._date2cell={};_68.forEach(this.dateCells,function(_83,idx){var i=idx+_82;var _84=new this.dateClassObj(_7d),_85,_86="dijitCalendar",adj=0;if(i<_7e){_85=_80-_7e+i+1;adj=-1;_86+="Previous";}else{if(i>=(_7e+_7f)){_85=i-_7e-_7f+1;adj=1;_86+="Next";}else{_85=i-_7e+1;_86+="Current";}}if(adj){_84=this.dateModule.add(_84,"month",adj);}_84.setDate(_85);if(!this.dateModule.compare(_84,_81,"date")){_86="dijitCalendarCurrentDate "+_86;}if(this.isDisabledDate(_84,this.lang)){_86="dijitCalendarDisabledDate "+_86;_83.setAttribute("aria-disabled","true");}else{_86="dijitCalendarEnabledDate "+_86;_83.removeAttribute("aria-disabled");_83.setAttribute("aria-selected","false");}var _87=this.getClassForDate(_84,this.lang);if(_87){_86=_87+" "+_86;}_83.className=_86+"Month dijitCalendarDateTemplate";var _88=_84.valueOf();this._date2cell[_88]=_83;_83.dijitDateValue=_88;this._setText(this.dateLabels[idx],_84.getDateLocalized?_84.getDateLocalized(this.lang):_84.getDate());},this);},_populateControls:function(){var _89=new this.dateClassObj(this.currentFocus);_89.setDate(1);this.monthWidget.set("month",_89);var y=_89.getFullYear()-1;var d=new this.dateClassObj();_68.forEach(["previous","current","next"],function(_8a){d.setFullYear(y++);this._setText(this[_8a+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));},this);},goToToday:function(){this.set("value",new this.dateClassObj());},constructor:function(_8b){this.dateModule=_8b.datePackage?_70.getObject(_8b.datePackage,false):_6b;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=_8b.datePackage?_70.getObject(_8b.datePackage+".locale",false):_6c;},_createMonthWidget:function(){return _75._MonthWidget({id:this.id+"_mw",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);},buildRendering:function(){var d=this.dowTemplateString,_8c=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),_8d=_6a.getFirstDayOfWeek(this.lang);this.dayCellsHtml=_71.substitute([d,d,d,d,d,d,d].join(""),{d:""},function(){return _8c[_8d++%7];});var r=_71.substitute(this.weekTemplateString,{d:this.dateTemplateString});this.dateRowsHtml=[r,r,r,r,r,r].join("");this.dateCells=[];this.dateLabels=[];this.inherited(arguments);dom.setSelectable(this.domNode,false);var _8e=new this.dateClassObj(this.currentFocus);this.monthWidget=this._createMonthWidget();this.set("currentFocus",_8e,false);},postCreate:function(){this.inherited(arguments);this._connectControls();},_connectControls:function(){var _8f=_70.hitch(this,function(_90,_91,_92){this.connect(this[_90],"onclick",function(){this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,_91,_92));});});_8f("incrementMonth","month",1);_8f("decrementMonth","month",-1);_8f("nextYearLabelNode","year",1);_8f("previousYearLabelNode","year",-1);},_setCurrentFocusAttr:function(_93,_94){var _95=this.currentFocus,_96=this._getNodeByDate(_95);_93=this._patchDate(_93);this._set("currentFocus",_93);if(!this._date2cell||this.dateModule.difference(_95,_93,"month")!=0){this._populateGrid();this._populateControls();this._markSelectedDates([this.value]);}var _97=this._getNodeByDate(_93);_97.setAttribute("tabIndex",this.tabIndex);if(this.focused||_94){_97.focus();}if(_96&&_96!=_97){if(has("webkit")){_96.setAttribute("tabIndex","-1");}else{_96.removeAttribute("tabIndex");}}},focus:function(){this._setCurrentFocusAttr(this.currentFocus,true);},_onDayClick:function(evt){_6f.stop(evt);for(var _98=evt.target;_98&&!_98.dijitDateValue;_98=_98.parentNode){}if(_98&&!_6e.contains(_98,"dijitCalendarDisabledDate")){this.set("value",_98.dijitDateValue);}},_getNodeByDate:function(_99){_99=this._patchDate(_99);return _99&&this._date2cell?this._date2cell[_99.valueOf()]:null;},_markSelectedDates:function(_9a){function _9b(_9c,_9d){_6e.toggle(_9d,"dijitCalendarSelectedDate",_9c);_9d.setAttribute("aria-selected",_9c?"true":"false");};_68.forEach(this._selectedCells||[],_70.partial(_9b,false));this._selectedCells=_68.filter(_68.map(_9a,this._getNodeByDate,this),function(n){return n;});_68.forEach(this._selectedCells,_70.partial(_9b,true));},onChange:function(){},isDisabledDate:function(){},getClassForDate:function(){}});_75._MonthWidget=_69("dijit.CalendarLite._MonthWidget",_72,{_setMonthAttr:function(_9e){var _9f=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_9e),_a0=(has("ie")==6?"":"<div class='dijitSpacer'>"+_68.map(_9f,function(s){return "<div>"+s+"</div>";}).join("")+"</div>");this.domNode.innerHTML=_a0+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_9f[_9e.getMonth()]+"</div>";}});return _75;});},"dojox/date/islamic/locale":function(){define("dojox/date/islamic/locale",["../..","dojo/_base/lang","dojo/_base/array","dojo/date","dojo/i18n","dojo/regexp","dojo/string","./Date","dojo/i18n!dojo/cldr/nls/islamic"],function(_a1,_a2,arr,dd,_a3,_a4,_a5,_a6,_a7){var _a8=_a2.getObject("date.islamic.locale",true,_a1);function _a9(_aa,_ab,_ac,_ad,_ae){return _ae.replace(/([a-z])\1*/ig,function(_af){var s,pad;var c=_af.charAt(0);var l=_af.length;var _b0=["abbr","wide","narrow"];switch(c){case "G":s=_ab["eraAbbr"][0];break;case "y":s=String(_aa.getFullYear());break;case "M":var m=_aa.getMonth();if(l<3){s=m+1;pad=true;}else{var _b1=["months","format",_b0[l-3]].join("-");s=_ab[_b1][m];}break;case "d":s=_aa.getDate(true);pad=true;break;case "E":var d=_aa.getDay();if(l<3){s=d+1;pad=true;}else{var _b2=["days","format",_b0[l-3]].join("-");s=_ab[_b2][d];}break;case "a":var _b3=(_aa.getHours()<12)?"am":"pm";s=_ab["dayPeriods-format-wide-"+_b3];break;case "h":case "H":case "K":case "k":var h=_aa.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_aa.getMinutes();pad=true;break;case "s":s=_aa.getSeconds();pad=true;break;case "S":s=Math.round(_aa.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "z":s=dd.getTimezoneName(_aa.toGregorian());if(s){break;}l=4;case "Z":var _b4=_aa.toGregorian().getTimezoneOffset();var tz=[(_b4<=0?"+":"-"),_a5.pad(Math.floor(Math.abs(_b4)/60),2),_a5.pad(Math.abs(_b4)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+_ae);}if(pad){s=_a5.pad(s,l);}return s;});};_a8.format=function(_b5,_b6){_b6=_b6||{};var _b7=_a3.normalizeLocale(_b6.locale);var _b8=_b6.formatLength||"short";var _b9=_a8._getIslamicBundle(_b7);var str=[];var _ba=_a2.hitch(this,_a9,_b5,_b9,_b7,_b6.fullYear);if(_b6.selector=="year"){var _bb=_b5.getFullYear();return _bb;}if(_b6.selector!="time"){var _bc=_b6.datePattern||_b9["dateFormat-"+_b8];if(_bc){str.push(_bd(_bc,_ba));}}if(_b6.selector!="date"){var _be=_b6.timePattern||_b9["timeFormat-"+_b8];if(_be){str.push(_bd(_be,_ba));}}var _bf=str.join(" ");return _bf;};_a8.regexp=function(_c0){return _a8._parseInfo(_c0).regexp;};_a8._parseInfo=function(_c1){_c1=_c1||{};var _c2=_a3.normalizeLocale(_c1.locale);var _c3=_a8._getIslamicBundle(_c2);var _c4=_c1.formatLength||"short";var _c5=_c1.datePattern||_c3["dateFormat-"+_c4];var _c6=_c1.timePattern||_c3["timeFormat-"+_c4];var _c7;if(_c1.selector=="date"){_c7=_c5;}else{if(_c1.selector=="time"){_c7=_c6;}else{_c7=(typeof (_c6)=="undefined")?_c5:_c5+" "+_c6;}}var _c8=[];var re=_bd(_c7,_a2.hitch(this,_c9,_c8,_c3,_c1));return {regexp:re,tokens:_c8,bundle:_c3};};_a8.parse=function(_ca,_cb){_ca=_ca.replace(/[\u200E\u200F\u202A\u202E]/g,"");if(!_cb){_cb={};}var _cc=_a8._parseInfo(_cb);var _cd=_cc.tokens,_a7=_cc.bundle;var _ce=_cc.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");var re=new RegExp("^"+_ce+"$");var _cf=re.exec(_ca);var _d0=_a3.normalizeLocale(_cb.locale);if(!_cf){return null;}var _d1,_d2;var _d3=[1389,0,1,0,0,0,0];var _d4="";var _d5=0;var _d6=["abbr","wide","narrow"];var _d7=arr.every(_cf,function(v,i){if(!i){return true;}var _d8=_cd[i-1];var l=_d8.length;switch(_d8.charAt(0)){case "y":_d3[0]=Number(v);break;case "M":if(l>2){var _d9=_a7["months-format-"+_d6[l-3]].concat();if(!_cb.strict){v=v.replace(".","").toLowerCase();_d9=arr.map(_d9,function(s){return s?s.replace(".","").toLowerCase():s;});}v=arr.indexOf(_d9,v);if(v==-1){return false;}_d5=l;}else{v--;}_d3[1]=Number(v);break;case "D":_d3[1]=0;case "d":_d3[2]=Number(v);break;case "a":var am=_cb.am||_a7["dayPeriods-format-wide-am"],pm=_cb.pm||_a7["dayPeriods-format-wide-pm"];if(!_cb.strict){var _da=/\./g;v=v.replace(_da,"").toLowerCase();am=am.replace(_da,"").toLowerCase();pm=pm.replace(_da,"").toLowerCase();}if(_cb.strict&&v!=am&&v!=pm){return false;}_d4=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":_d3[3]=Number(v);break;case "m":_d3[4]=Number(v);break;case "s":_d3[5]=Number(v);break;case "S":_d3[6]=Number(v);}return true;});var _db=+_d3[3];if(_d4==="p"&&_db<12){_d3[3]=_db+12;}else{if(_d4==="a"&&_db==12){_d3[3]=0;}}var _dc=new _a6(_d3[0],_d3[1],_d3[2],_d3[3],_d3[4],_d3[5],_d3[6]);return _dc;};function _bd(_dd,_de,_df,_e0){var _e1=function(x){return x;};_de=_de||_e1;_df=_df||_e1;_e0=_e0||_e1;var _e2=_dd.match(/(''|[^'])+/g);var _e3=_dd.charAt(0)=="'";arr.forEach(_e2,function(_e4,i){if(!_e4){_e2[i]="";}else{_e2[i]=(_e3?_df:_de)(_e4);_e3=!_e3;}});return _e0(_e2.join(""));};function _c9(_e5,_e6,_e7,_e8){_e8=_a4.escapeString(_e8);var _e9=_a3.normalizeLocale(_e7.locale);return _e8.replace(/([a-z])\1*/ig,function(_ea){var s;var c=_ea.charAt(0);var l=_ea.length;var p2="",p3="";if(_e7.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d+";break;case "M":s=(l>2)?"\\S+ ?\\S+":p2+"[1-9]|1[0-2]";break;case "d":s="[12]\\d|"+p2+"[1-9]|3[01]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s=p2+"\\d|[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_e7.am||_e6["dayPeriods-format-wide-am"],pm=_e7.pm||_e6["dayPeriods-format-wide-pm"];if(_e7.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_e5){_e5.push(_ea);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};var _eb=[];_a8.addCustomFormats=function(_ec,_ed){_eb.push({pkg:_ec,name:_ed});};_a8._getIslamicBundle=function(_ee){var _ef={};arr.forEach(_eb,function(_f0){var _f1=_a3.getLocalization(_f0.pkg,_f0.name,_ee);_ef=_a2.mixin(_ef,_f1);},this);return _ef;};_a8.addCustomFormats("dojo.cldr","islamic");_a8.getNames=function(_f2,_f3,_f4,_f5,_f6){var _f7;var _f8=_a8._getIslamicBundle(_f5);var _f9=[_f2,_f4,_f3];if(_f4=="standAlone"){var key=_f9.join("-");_f7=_f8[key];if(_f7[0]==1){_f7=undefined;}}_f9[1]="format";return (_f7||_f8[_f9.join("-")]).concat();};_a8.weekDays=_a8.getNames("days","wide","format");_a8.months=_a8.getNames("months","wide","format");return _a8;});},"dijit/Calendar":function(){define("dijit/Calendar",["dojo/_base/array","dojo/date","dojo/date/locale","dojo/_base/declare","dojo/dom-attr","dojo/dom-class","dojo/_base/event","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/sniff","./CalendarLite","./_Widget","./_CssStateMixin","./_TemplatedMixin","./form/DropDownButton"],function(_fa,_fb,_fc,_fd,_fe,_ff,_100,_101,keys,lang,has,_102,_103,_104,_105,_106){var _107=_fd("dijit.Calendar",[_102,_103,_104],{cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},setValue:function(_108){_101.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",_108);},_createMonthWidget:function(){return new _107._MonthDropDownButton({id:this.id+"_mddb",tabIndex:-1,onMonthSelect:lang.hitch(this,"_onMonthSelect"),lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onkeydown","_onKeyDown");this.connect(this.dateRowsNode,"onmouseover","_onDayMouseOver");this.connect(this.dateRowsNode,"onmouseout","_onDayMouseOut");this.connect(this.dateRowsNode,"onmousedown","_onDayMouseDown");this.connect(this.dateRowsNode,"onmouseup","_onDayMouseUp");},_onMonthSelect:function(_109){var date=new this.dateClassObj(this.currentFocus);date.setDate(1);date.setMonth(_109);var _10a=this.dateModule.getDaysInMonth(date);var _10b=this.currentFocus.getDate();date.setDate(Math.min(_10b,_10a));this._setCurrentFocusAttr(date);},_onDayMouseOver:function(evt){var node=_ff.contains(evt.target,"dijitCalendarDateLabel")?evt.target.parentNode:evt.target;if(node&&((node.dijitDateValue&&!_ff.contains(node,"dijitCalendarDisabledDate"))||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){_ff.add(node,"dijitCalendarHoveredDate");this._currentNode=node;}},_onDayMouseOut:function(evt){if(!this._currentNode){return;}if(evt.relatedTarget&&evt.relatedTarget.parentNode==this._currentNode){return;}var cls="dijitCalendarHoveredDate";if(_ff.contains(this._currentNode,"dijitCalendarActiveDate")){cls+=" dijitCalendarActiveDate";}_ff.remove(this._currentNode,cls);this._currentNode=null;},_onDayMouseDown:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue&&!_ff.contains(node,"dijitCalendarDisabledDate")){_ff.add(node,"dijitCalendarActiveDate");this._currentNode=node;}},_onDayMouseUp:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue){_ff.remove(node,"dijitCalendarActiveDate");}},handleKey:function(evt){var _10c=-1,_10d,_10e=this.currentFocus;switch(evt.keyCode){case keys.RIGHT_ARROW:_10c=1;case keys.LEFT_ARROW:_10d="day";if(!this.isLeftToRight()){_10c*=-1;}break;case keys.DOWN_ARROW:_10c=1;case keys.UP_ARROW:_10d="week";break;case keys.PAGE_DOWN:_10c=1;case keys.PAGE_UP:_10d=evt.ctrlKey||evt.altKey?"year":"month";break;case keys.END:_10e=this.dateModule.add(_10e,"month",1);_10d="day";case keys.HOME:_10e=new this.dateClassObj(_10e);_10e.setDate(1);break;case keys.ENTER:case keys.SPACE:this.set("value",this.currentFocus);break;default:return true;}if(_10d){_10e=this.dateModule.add(_10e,_10d,_10c);}this._setCurrentFocusAttr(_10e);return false;},_onKeyDown:function(evt){if(!this.handleKey(evt)){_100.stop(evt);}},onValueSelected:function(){},onChange:function(_10f){this.onValueSelected(_10f);},getClassForDate:function(){}});_107._MonthDropDownButton=_fd("dijit.Calendar._MonthDropDownButton",_106,{onMonthSelect:function(){},postCreate:function(){this.inherited(arguments);this.dropDown=new _107._MonthDropDown({id:this.id+"_mdd",onChange:this.onMonthSelect});},_setMonthAttr:function(_110){var _111=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_110);this.dropDown.set("months",_111);this.containerNode.innerHTML=(has("ie")==6?"":"<div class='dijitSpacer'>"+this.dropDown.domNode.innerHTML+"</div>")+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_111[_110.getMonth()]+"</div>";}});_107._MonthDropDown=_fd("dijit.Calendar._MonthDropDown",[_103,_105],{months:[],templateString:"<div class='dijitCalendarMonthMenu dijitMenu' "+"data-dojo-attach-event='onclick:_onClick,onmouseover:_onMenuHover,onmouseout:_onMenuHover'></div>",_setMonthsAttr:function(_112){this.domNode.innerHTML=_fa.map(_112,function(_113,idx){return _113?"<div class='dijitCalendarMonthLabel' month='"+idx+"'>"+_113+"</div>":"";}).join("");},_onClick:function(evt){this.onChange(_fe.get(evt.target,"month"));},onChange:function(){},_onMenuHover:function(evt){_ff.toggle(evt.target,"dijitCalendarMonthLabelHover",evt.type=="mouseover");}});return _107;});},"dijit/_editor/RichText":function(){define("dijit/_editor/RichText",["dojo/_base/array","dojo/_base/config","dojo/_base/declare","dojo/_base/Deferred","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dojo/query","dojo/ready","dojo/sniff","dojo/topic","dojo/_base/unload","dojo/_base/url","dojo/_base/window","../_Widget","../_CssStateMixin","./selection","./range","./html","../focus","../main"],function(_114,_115,_116,_117,dom,_118,_119,_11a,_11b,_11c,_11d,_11e,keys,lang,on,_11f,_120,has,_121,_122,_123,win,_124,_125,_126,_127,_128,_129,_12a){var _12b=_116("dijit._editor.RichText",[_124,_125],{constructor:function(_12c){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};if(_12c&&lang.isString(_12c.value)){this.value=_12c.value;}this.onLoadDeferred=new _117();},baseClass:"dijitEditor",inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){if("textarea"===this.domNode.tagName.toLowerCase()){console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");}this.contentPreFilters=[lang.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);if(has("mozilla")){this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters);this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters);}if(has("webkit")){this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters);this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters);}if(has("ie")){this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters);this.contentDomPostFilters=[lang.hitch(this,this._stripBreakerNodes)].concat(this.contentDomPostFilters);}this.inherited(arguments);_121.publish(_12a._scopeName+"._editor.RichText::init",this);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var exec=lang.hitch(this,function(cmd,arg){return function(){return !this.execCommand(cmd,arg);};});var _12d={b:exec("bold"),i:exec("italic"),u:exec("underline"),a:exec("selectall"),s:function(){this.save(true);},m:function(){this.isTabIndent=!this.isTabIndent;},"1":exec("formatblock","h1"),"2":exec("formatblock","h2"),"3":exec("formatblock","h3"),"4":exec("formatblock","h4"),"\\":exec("insertunorderedlist")};if(!has("ie")){_12d.Z=exec("redo");}var key;for(key in _12d){this.addKeyHandler(key,true,false,_12d[key]);}},events:["onKeyPress","onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(_12b._editorCommandsLocalized){this._local2NativeFormatNames=_12b._local2NativeFormatNames;this._native2LocalFormatNames=_12b._native2LocalFormatNames;return;}_12b._editorCommandsLocalized=true;_12b._local2NativeFormatNames={};_12b._native2LocalFormatNames={};this._local2NativeFormatNames=_12b._local2NativeFormatNames;this._native2LocalFormatNames=_12b._native2LocalFormatNames;var _12e=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];var _12f="",_130,i=0;while((_130=_12e[i++])){if(_130.charAt(1)!=="l"){_12f+="<"+_130+"><span>content</span></"+_130+"><br/>";}else{_12f+="<"+_130+"><li>content</li></"+_130+"><br/>";}}var _131={position:"absolute",top:"0px",zIndex:10,opacity:0.01};var div=_11a.create("div",{style:_131,innerHTML:_12f});this.ownerDocumentBody.appendChild(div);var _132=lang.hitch(this,function(){var node=div.firstChild;while(node){try{this._sCall("selectElement",[node.firstChild]);var _133=node.tagName.toLowerCase();this._local2NativeFormatNames[_133]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_133]]=_133;node=node.nextSibling.nextSibling;}catch(e){}}_11a.destroy(div);});this.defer(_132);},open:function(_134){if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){this.onLoadDeferred=new _117();}if(!this.isClosed){this.close();}_121.publish(_12a._scopeName+"._editor.RichText::open",this);if(arguments.length===1&&_134.nodeName){this.domNode=_134;}var dn=this.domNode;var html;if(lang.isString(this.value)){html=this.value;delete this.value;dn.innerHTML="";}else{if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){var ta=(this.textarea=dn);this.name=ta.name;html=ta.value;dn=this.domNode=this.ownerDocument.createElement("div");dn.setAttribute("widgetId",this.id);ta.removeAttribute("widgetId");dn.cssText=ta.cssText;dn.className+=" "+ta.className;_11a.place(dn,ta,"before");var _135=lang.hitch(this,function(){_11c.set(ta,{display:"block",position:"absolute",top:"-1000px"});if(has("ie")){var s=ta.style;this.__overflow=s.overflow;s.overflow="hidden";}});if(has("ie")){this.defer(_135,10);}else{_135();}if(ta.form){var _136=ta.value;this.reset=function(){var _137=this.getValue();if(_137!==_136){this.replaceValue(_136);}};on(ta.form,"submit",lang.hitch(this,function(){_118.set(ta,"disabled",this.disabled);ta.value=this.getValue();}));}}else{html=_128.getChildrenHtml(dn);dn.innerHTML="";}}this.value=html;if(dn.nodeName&&dn.nodeName==="LI"){dn.innerHTML=" <br>";}this.header=dn.ownerDocument.createElement("div");dn.appendChild(this.header);this.editingArea=dn.ownerDocument.createElement("div");dn.appendChild(this.editingArea);this.footer=dn.ownerDocument.createElement("div");dn.appendChild(this.footer);if(!this.name){this.name=this.id+"_AUTOGEN";}if(this.name!==""&&(!_115["useXDomain"]||_115["allowXdRichTextSave"])){var _138=dom.byId(_12a._scopeName+"._editor.RichText.value");if(_138&&_138.value!==""){var _139=_138.value.split(this._SEPARATOR),i=0,dat;while((dat=_139[i++])){var data=dat.split(this._NAME_CONTENT_SEP);if(data[0]===this.name){html=data[1];_139=_139.splice(i,1);_138.value=_139.join(this._SEPARATOR);break;}}}if(!_12b._globalSaveHandler){_12b._globalSaveHandler={};_122.addOnUnload(function(){var id;for(id in _12b._globalSaveHandler){var f=_12b._globalSaveHandler[id];if(lang.isFunction(f)){f();}}});}_12b._globalSaveHandler[this.id]=lang.hitch(this,"_saveContent");}this.isClosed=false;var ifr=(this.editorObject=this.iframe=this.ownerDocument.createElement("iframe"));ifr.id=this.id+"_iframe";ifr.style.border="none";ifr.style.width="100%";if(this._layoutMode){ifr.style.height="100%";}else{if(has("ie")>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}}ifr.frameBorder=0;ifr._loadFunc=lang.hitch(this,function(w){this.window=w;this.document=this.window.document;if(has("ie")){this._localizeEditorCommands();}this.onLoad(html);});var src=this._getIframeDocTxt(),s="javascript: '"+src.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'";ifr.setAttribute("src",s);this.editingArea.appendChild(ifr);if(has("safari")<=4){src=ifr.getAttribute("src");if(!src||src.indexOf("javascript")===-1){this.defer(function(){ifr.setAttribute("src",s);});}}if(dn.nodeName==="LI"){dn.lastChild.style.marginTop="-1.2em";}_119.add(this.domNode,this.baseClass);},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var _13a=_11c.getComputedStyle(this.domNode);var html="";var _13b=true;if(has("ie")||has("webkit")||(!this.height&&!has("mozilla"))){html="<div id='dijitEditorBody'></div>";_13b=false;}else{if(has("mozilla")){this._cursorToStart=true;html="&#160;";}}var font=[_13a.fontWeight,_13a.fontSize,_13a.fontFamily].join(" ");var _13c=_13a.lineHeight;if(_13c.indexOf("px")>=0){_13c=parseFloat(_13c)/parseFloat(_13a.fontSize);}else{if(_13c.indexOf("em")>=0){_13c=parseFloat(_13c);}else{_13c="normal";}}var _13d="";var self=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(_13e){_13e=_13e.replace(/^;/ig,"")+";";var s=_13e.split(":")[0];if(s){s=lang.trim(s);s=s.toLowerCase();var i;var sC="";for(i=0;i<s.length;i++){var c=s.charAt(i);switch(c){case "-":i++;c=s.charAt(i).toUpperCase();default:sC+=c;}}_11c.set(self.domNode,sC,"");}_13d+=_13e+";";});var _13f=_11f("label[for=\""+this.id+"\"]");return [this.isLeftToRight()?"<html>\n<head>\n":"<html dir='rtl'>\n<head>\n",(has("mozilla")&&_13f.length?"<title>"+_13f[0].innerHTML+"</title>\n":""),"<meta http-equiv='Content-Type' content='text/html'>\n","<style>\n","\tbody,html {\n","\t\tbackground:transparent;\n","\t\tpadding: 1px 0 0 0;\n","\t\tmargin: -1px 0 0 0;\n",((has("webkit"))?"\t\twidth: 100%;\n":""),((has("webkit"))?"\t\theight: 100%;\n":""),"\t}\n","\tbody{\n","\t\ttop:0px;\n","\t\tleft:0px;\n","\t\tright:0px;\n","\t\tfont:",font,";\n",((this.height||has("opera"))?"":"\t\tposition: fixed;\n"),"\t\tmin-height:",this.minHeight,";\n","\t\tline-height:",_13c,";\n","\t}\n","\tp{ margin: 1em 0; }\n",(!_13b&&!this.height?"\tbody,html {overflow-y: hidden;}\n":""),"\t#dijitEditorBody{overflow-x: auto; overflow-y:"+(this.height?"auto;":"hidden;")+" outline: 0px;}\n","\tli > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; }\n",(!has("ie")?"\tli{ min-height:1.2em; }\n":""),"</style>\n",this._applyEditingAreaStyleSheets(),"\n","</head>\n<body ",(_13b?"id='dijitEditorBody' ":""),"onload='frameElement && frameElement._loadFunc(window,document)' ","style='"+_13d+"'>",html,"</body>\n</html>"].join("");},_applyEditingAreaStyleSheets:function(){var _140=[];if(this.styleSheets){_140=this.styleSheets.split(";");this.styleSheets="";}_140=_140.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var text="",i=0,url;while((url=_140[i++])){var _141=(new _123(win.global.location,url)).toString();this.editingAreaStyleSheets.push(_141);text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_141+"\"/>";}return text;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)==="."||(url.charAt(0)!=="/"&&!uri.host)){url=(new _123(win.global.location,url)).toString();}if(_114.indexOf(this.editingAreaStyleSheets,url)>-1){return;}this.editingAreaStyleSheets.push(url);this.onLoadDeferred.then(lang.hitch(this,function(){if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head=this.document.getElementsByTagName("head")[0];var _142=this.document.createElement("link");_142.rel="stylesheet";_142.type="text/css";_142.href=url;head.appendChild(_142);}}));},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)==="."||(url.charAt(0)!=="/"&&!uri.host)){url=(new _123(win.global.location,url)).toString();}var _143=_114.indexOf(this.editingAreaStyleSheets,url);if(_143===-1){return;}delete this.editingAreaStyleSheets[_143];_11f("link:[href=\""+url+"\"]",this.window.document).orphan();},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_144){_144=!!_144;this._set("disabled",_144);if(!this.isLoaded){return;}if(has("ie")||has("webkit")||has("opera")){var _145=has("ie")&&(this.isLoaded||!this.focusOnLoad);if(_145){this.editNode.unselectable="on";}this.editNode.contentEditable=!_144;if(_145){this.defer(function(){if(this.editNode){this.editNode.unselectable="off";}});}}else{try{this.document.designMode=(_144?"off":"on");}catch(e){return;}if(!_144&&this._mozSettingProps){var ps=this._mozSettingProps;var n;for(n in ps){if(ps.hasOwnProperty(n)){try{this.document.execCommand(n,false,ps[n]);}catch(e2){}}}}}this._disabledOK=true;},onLoad:function(html){if(!this.window.__registeredWindow){this.window.__registeredWindow=true;this._iframeRegHandle=_129.registerIframe(this.iframe);}if(!has("ie")&&!has("webkit")&&(this.height||has("mozilla"))){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;var _146=this;if(has("ie")){this.tabStop=_11a.create("div",{tabIndex:-1},this.editingArea);this.iframe.onfocus=function(){_146.editNode.setActive();};}}this.focusNode=this.editNode;var _147=this.events.concat(this.captureEvents);var ap=this.iframe?this.document:this.editNode;_114.forEach(_147,function(item){this.connect(ap,item.toLowerCase(),item);},this);this.connect(ap,"onmouseup","onClick");if(has("ie")){this.connect(this.document,"onmousedown","_onIEMouseDown");this.editNode.style.zoom=1;}else{this.connect(this.document,"onmousedown",function(){delete this._cursorToStart;});}if(has("webkit")){this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");this.connect(this.document,"onmousedown",function(e){var t=e.target;if(t&&(t===this.document.body||t===this.document)){this.defer("placeCursorAtEnd");}});}if(has("ie")){try{this.document.execCommand("RespectVisibilityInDesign",true,null);}catch(e){}}this.isLoaded=true;this.set("disabled",this.disabled);var _148=lang.hitch(this,function(){this.setValue(html);if(this.onLoadDeferred){this.onLoadDeferred.resolve(true);}this.onDisplayChanged();if(this.focusOnLoad){_120(lang.hitch(this,"defer","focus",this.updateInterval));}this.value=this.getValue(true);});if(this.setValueDeferred){this.setValueDeferred.then(_148);}else{_148();}},onKeyDown:function(e){if(e.keyCode===keys.TAB&&this.isTabIndent){_11d.stop(e);if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){this.execCommand((e.shiftKey?"outdent":"indent"));}}if(has("ie")){if(e.keyCode==keys.TAB&&!this.isTabIndent){if(e.shiftKey&&!e.ctrlKey&&!e.altKey){this.iframe.focus();}else{if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.tabStop.focus();}}}else{if(e.keyCode===keys.BACKSPACE&&this.document.selection.type==="Control"){_11d.stop(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}}if(has("ff")){if(e.keyCode===keys.PAGE_UP||e.keyCode===keys.PAGE_DOWN){if(this.editNode.clientHeight>=this.editNode.scrollHeight){e.preventDefault();}}}return true;},onKeyUp:function(){},setDisabled:function(_149){_11e.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);this.set("disabled",_149);},_setValueAttr:function(_14a){this.setValue(_14a);},_setDisableSpellCheckAttr:function(_14b){if(this.document){_118.set(this.document.body,"spellcheck",!_14b);}else{this.onLoadDeferred.then(lang.hitch(this,function(){_118.set(this.document.body,"spellcheck",!_14b);}));}this._set("disableSpellCheck",_14b);},onKeyPress:function(e){var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_14c=this._keyHandlers[c],args=arguments;if(_14c&&!e.altKey){_114.some(_14c,function(h){if(!(h.shift^e.shiftKey)&&!(h.ctrl^(e.ctrlKey||e.metaKey))){if(!h.handler.apply(this,args)){e.preventDefault();}return true;}},this);}if(!this._onKeyHitch){this._onKeyHitch=lang.hitch(this,"onKeyPressed");}this.defer("_onKeyHitch",1);return true;},addKeyHandler:function(key,ctrl,_14d,_14e){if(!lang.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({shift:_14d||false,ctrl:ctrl||false,handler:_14e});},onKeyPressed:function(){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onIEMouseDown:function(){if(!this.focused&&!this.disabled){this.focus();}},_onBlur:function(e){this.inherited(arguments);var _14f=this.getValue(true);if(_14f!==this.value){this.onChange(_14f);}this._set("value",_14f);},_onFocus:function(e){if(!this.disabled){if(!this._disabledOK){this.set("disabled",false);}this.inherited(arguments);}},blur:function(){if(!has("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus){this.window.document.documentElement.focus();}else{if(this.ownerDocumentBody.focus){this.ownerDocumentBody.focus();}}},focus:function(){if(!this.isLoaded){this.focusOnLoad=true;return;}if(this._cursorToStart){delete this._cursorToStart;if(this.editNode.childNodes){this.placeCursorAtStart();return;}}if(!has("ie")){_129.focus(this.iframe);}else{if(this.editNode&&this.editNode.focus){this.iframe.fireEvent("onfocus",document.createEventObject());}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(){if(this._updateTimer){this._updateTimer.remove();}this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval);},onNormalizedDisplayChanged:function(){delete this._updateTimer;},onChange:function(){},_normalizeCommand:function(cmd,_150){var _151=cmd.toLowerCase();if(_151==="formatblock"){if(has("safari")&&_150===undefined){_151="heading";}}else{if(_151==="hilitecolor"&&!has("mozilla")){_151="backcolor";}}return _151;},_qcaCache:{},queryCommandAvailable:function(_152){var ca=this._qcaCache[_152];if(ca!==undefined){return ca;}return (this._qcaCache[_152]=this._queryCommandAvailable(_152));},_queryCommandAvailable:function(_153){var ie=1;var _154=1<<1;var _155=1<<2;var _156=1<<3;function _157(_158){return {ie:Boolean(_158&ie),mozilla:Boolean(_158&_154),webkit:Boolean(_158&_155),opera:Boolean(_158&_156)};};var _159=null;switch(_153.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":_159=_157(_154|ie|_155|_156);break;case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":_159=_157(_154|ie|_156|_155);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_159=_157(ie);break;case "cut":case "copy":case "paste":_159=_157(ie|_154|_155|_156);break;case "inserttable":_159=_157(_154|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_159=_157(ie|_154);break;default:return false;}return (has("ie")&&_159.ie)||(has("mozilla")&&_159.mozilla)||(has("webkit")&&_159.webkit)||(has("opera")&&_159.opera);},execCommand:function(_15a,_15b){var _15c;this.focus();_15a=this._normalizeCommand(_15a,_15b);if(_15b!==undefined){if(_15a==="heading"){throw new Error("unimplemented");}else{if((_15a==="formatblock")&&has("ie")){_15b="<"+_15b+">";}}}var _15d="_"+_15a+"Impl";if(this[_15d]){_15c=this[_15d](_15b);}else{_15b=arguments.length>1?_15b:null;if(_15b||_15a!=="createlink"){_15c=this.document.execCommand(_15a,false,_15b);}}this.onDisplayChanged();return _15c;},queryCommandEnabled:function(_15e){if(this.disabled||!this._disabledOK){return false;}_15e=this._normalizeCommand(_15e);var _15f="_"+_15e+"EnabledImpl";if(this[_15f]){return this[_15f](_15e);}else{return this._browserQueryCommandEnabled(_15e);}},queryCommandState:function(_160){if(this.disabled||!this._disabledOK){return false;}_160=this._normalizeCommand(_160);try{return this.document.queryCommandState(_160);}catch(e){return false;}},queryCommandValue:function(_161){if(this.disabled||!this._disabledOK){return false;}var r;_161=this._normalizeCommand(_161);if(has("ie")&&_161==="formatblock"){r=this._native2LocalFormatNames[this.document.queryCommandValue(_161)];}else{if(has("mozilla")&&_161==="hilitecolor"){var _162;try{_162=this.document.queryCommandValue("styleWithCSS");}catch(e){_162=false;}this.document.execCommand("styleWithCSS",false,true);r=this.document.queryCommandValue(_161);this.document.execCommand("styleWithCSS",false,_162);}else{r=this.document.queryCommandValue(_161);}}return r;},_sCall:function(name,args){return win.withGlobal(this.window,name,_126,args);},placeCursorAtStart:function(){this.focus();var _163=false;if(has("mozilla")){var _164=this.editNode.firstChild;while(_164){if(_164.nodeType===3){if(_164.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_163=true;this._sCall("selectElement",[_164]);break;}}else{if(_164.nodeType===1){_163=true;var tg=_164.tagName?_164.tagName.toLowerCase():"";if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){this._sCall("selectElement",[_164]);}else{this._sCall("selectElementChildren",[_164]);}break;}}_164=_164.nextSibling;}}else{_163=true;this._sCall("selectElementChildren",[this.editNode]);}if(_163){this._sCall("collapse",[true]);}},placeCursorAtEnd:function(){this.focus();var _165=false;if(has("mozilla")){var last=this.editNode.lastChild;while(last){if(last.nodeType===3){if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_165=true;this._sCall("selectElement",[last]);break;}}else{if(last.nodeType===1){_165=true;this._sCall("selectElement",[last.lastChild||last]);break;}}last=last.previousSibling;}}else{_165=true;this._sCall("selectElementChildren",[this.editNode]);}if(_165){this._sCall("collapse",[false]);}},getValue:function(_166){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_166);},_getValueAttr:function(){return this.getValue(true);},setValue:function(html){if(!this.isLoaded){this.onLoadDeferred.then(lang.hitch(this,function(){this.setValue(html);}));return;}this._cursorToStart=true;if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=html;}else{html=this._preFilterContent(html);var node=this.isClosed?this.domNode:this.editNode;if(html&&has("mozilla")&&html.toLowerCase()==="<p></p>"){html="<p>&#160;</p>";}if(!html&&has("webkit")){html="&#160;";}node.innerHTML=html;this._preDomFilterContent(node);}this.onDisplayChanged();this._set("value",this.getValue(true));},replaceValue:function(html){if(this.isClosed){this.setValue(html);}else{if(this.window&&this.window.getSelection&&!has("mozilla")){this.setValue(html);}else{if(this.window&&this.window.getSelection){html=this._preFilterContent(html);this.execCommand("selectall");if(!html){this._cursorToStart=true;html="&#160;";}this.execCommand("inserthtml",html);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(html);}}}}this._set("value",this.getValue(true));},_preFilterContent:function(html){var ec=html;_114.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;_114.forEach(this.contentDomPreFilters,function(ef){if(ef&&lang.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_167){var ec;if(!lang.isString(dom)){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_167){dom=lang.clone(dom);}_114.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}ec=_128.getChildrenHtml(dom);}else{ec=dom;}if(!lang.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){ec="";}_114.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(){var _168=dom.byId(_12a._scopeName+"._editor.RichText.value");if(_168){if(_168.value){_168.value+=this._SEPARATOR;}_168.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(true);}},escapeXml:function(str,_169){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_169){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(node){_11e.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",2);return _128.getNodeHtml(node);},getNodeChildrenHtml:function(dom){_11e.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return _128.getChildrenHtml(dom);},close:function(save){if(this.isClosed){return;}if(!arguments.length){save=true;}if(save){this._set("value",this.getValue(true));}if(this.interval){clearInterval(this.interval);}if(this._webkitListener){this.disconnect(this._webkitListener);delete this._webkitListener;}if(has("ie")){this.iframe.onfocus=null;}this.iframe._loadFunc=null;if(this._iframeRegHandle){this._iframeRegHandle.remove();delete this._iframeRegHandle;}if(this.textarea){var s=this.textarea.style;s.position="";s.left=s.top="";if(has("ie")){s.overflow=this.__overflow;this.__overflow=null;}this.textarea.value=this.value;_11a.destroy(this.domNode);this.domNode=this.textarea;}else{this.domNode.innerHTML=this.value;}delete this.iframe;_119.remove(this.domNode,this.baseClass);this.isClosed=true;this.isLoaded=false;delete this.editNode;delete this.focusNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;},destroy:function(){if(!this.isClosed){this.close(false);}if(this._updateTimer){this._updateTimer.remove();}this.inherited(arguments);if(_12b._globalSaveHandler){delete _12b._globalSaveHandler[this.id];}},_removeMozBogus:function(html){return html.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");},_removeWebkitBogus:function(html){html=html.replace(/\sclass="webkit-block-placeholder"/gi,"");html=html.replace(/\sclass="apple-style-span"/gi,"");html=html.replace(/<meta charset=\"utf-8\" \/>/gi,"");return html;},_normalizeFontStyle:function(html){return html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");},_preFixUrlAttributes:function(html){return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");},_browserQueryCommandEnabled:function(_16a){if(!_16a){return false;}var elem=has("ie")?this.document.selection.createRange():this.document;try{return elem.queryCommandEnabled(_16a);}catch(e){return false;}},_createlinkEnabledImpl:function(){var _16b=true;if(has("opera")){var sel=this.window.getSelection();if(sel.isCollapsed){_16b=true;}else{_16b=this.document.queryCommandEnabled("createlink");}}else{_16b=this._browserQueryCommandEnabled("createlink");}return _16b;},_unlinkEnabledImpl:function(){var _16c=true;if(has("mozilla")||has("webkit")){_16c=this._sCall("hasAncestorElement",["a"]);}else{_16c=this._browserQueryCommandEnabled("unlink");}return _16c;},_inserttableEnabledImpl:function(){var _16d=true;if(has("mozilla")||has("webkit")){_16d=true;}else{_16d=this._browserQueryCommandEnabled("inserttable");}return _16d;},_cutEnabledImpl:function(){var _16e=true;if(has("webkit")){var sel=this.window.getSelection();if(sel){sel=sel.toString();}_16e=!!sel;}else{_16e=this._browserQueryCommandEnabled("cut");}return _16e;},_copyEnabledImpl:function(){var _16f=true;if(has("webkit")){var sel=this.window.getSelection();if(sel){sel=sel.toString();}_16f=!!sel;}else{_16f=this._browserQueryCommandEnabled("copy");}return _16f;},_pasteEnabledImpl:function(){var _170=true;if(has("webkit")){return true;}else{_170=this._browserQueryCommandEnabled("paste");}return _170;},_inserthorizontalruleImpl:function(_171){if(has("ie")){return this._inserthtmlImpl("<hr>");}return this.document.execCommand("inserthorizontalrule",false,_171);},_unlinkImpl:function(_172){if((this.queryCommandEnabled("unlink"))&&(has("mozilla")||has("webkit"))){var a=this._sCall("getAncestorElement",["a"]);this._sCall("selectElement",[a]);return this.document.execCommand("unlink",false,null);}return this.document.execCommand("unlink",false,_172);},_hilitecolorImpl:function(_173){var _174;var _175=this._handleTextColorOrProperties("hilitecolor",_173);if(!_175){if(has("mozilla")){this.document.execCommand("styleWithCSS",false,true);console.log("Executing color command.");_174=this.document.execCommand("hilitecolor",false,_173);this.document.execCommand("styleWithCSS",false,false);}else{_174=this.document.execCommand("hilitecolor",false,_173);}}return _174;},_backcolorImpl:function(_176){if(has("ie")){_176=_176?_176:null;}var _177=this._handleTextColorOrProperties("backcolor",_176);if(!_177){_177=this.document.execCommand("backcolor",false,_176);}return _177;},_forecolorImpl:function(_178){if(has("ie")){_178=_178?_178:null;}var _179=false;_179=this._handleTextColorOrProperties("forecolor",_178);if(!_179){_179=this.document.execCommand("forecolor",false,_178);}return _179;},_inserthtmlImpl:function(_17a){_17a=this._preFilterContent(_17a);var rv=true;if(has("ie")){var _17b=this.document.selection.createRange();if(this.document.selection.type.toUpperCase()==="CONTROL"){var n=_17b.item(0);while(_17b.length){_17b.remove(_17b.item(0));}n.outerHTML=_17a;}else{_17b.pasteHTML(_17a);}_17b.select();}else{if(has("mozilla")&&!_17a.length){this._sCall("remove");}else{rv=this.document.execCommand("inserthtml",false,_17a);}}return rv;},_boldImpl:function(_17c){var _17d=false;if(has("ie")){this._adaptIESelection();_17d=this._adaptIEFormatAreaAndExec("bold");}if(!_17d){_17d=this.document.execCommand("bold",false,_17c);}return _17d;},_italicImpl:function(_17e){var _17f=false;if(has("ie")){this._adaptIESelection();_17f=this._adaptIEFormatAreaAndExec("italic");}if(!_17f){_17f=this.document.execCommand("italic",false,_17e);}return _17f;},_underlineImpl:function(_180){var _181=false;if(has("ie")){this._adaptIESelection();_181=this._adaptIEFormatAreaAndExec("underline");}if(!_181){_181=this.document.execCommand("underline",false,_180);}return _181;},_strikethroughImpl:function(_182){var _183=false;if(has("ie")){this._adaptIESelection();_183=this._adaptIEFormatAreaAndExec("strikethrough");}if(!_183){_183=this.document.execCommand("strikethrough",false,_182);}return _183;},_superscriptImpl:function(_184){var _185=false;if(has("ie")){this._adaptIESelection();_185=this._adaptIEFormatAreaAndExec("superscript");}if(!_185){_185=this.document.execCommand("superscript",false,_184);}return _185;},_subscriptImpl:function(_186){var _187=false;if(has("ie")){this._adaptIESelection();_187=this._adaptIEFormatAreaAndExec("subscript");}if(!_187){_187=this.document.execCommand("subscript",false,_186);}return _187;},_fontnameImpl:function(_188){var _189;if(has("ie")){_189=this._handleTextColorOrProperties("fontname",_188);}if(!_189){_189=this.document.execCommand("fontname",false,_188);}return _189;},_fontsizeImpl:function(_18a){var _18b;if(has("ie")){_18b=this._handleTextColorOrProperties("fontsize",_18a);}if(!_18b){_18b=this.document.execCommand("fontsize",false,_18a);}return _18b;},_insertorderedlistImpl:function(_18c){var _18d=false;if(has("ie")){_18d=this._adaptIEList("insertorderedlist",_18c);}if(!_18d){_18d=this.document.execCommand("insertorderedlist",false,_18c);}return _18d;},_insertunorderedlistImpl:function(_18e){var _18f=false;if(has("ie")){_18f=this._adaptIEList("insertunorderedlist",_18e);}if(!_18f){_18f=this.document.execCommand("insertunorderedlist",false,_18e);}return _18f;},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header);},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer);},_getNodeChildrenHeight:function(node){var h=0;if(node&&node.childNodes){var i;for(i=0;i<node.childNodes.length;i++){var size=_11b.position(node.childNodes[i]);h+=size.h;}}return h;},_isNodeEmpty:function(node,_190){if(node.nodeType===1){if(node.childNodes.length>0){return this._isNodeEmpty(node.childNodes[0],_190);}return true;}else{if(node.nodeType===3){return (node.nodeValue.substring(_190)==="");}}return false;},_removeStartingRangeFromRange:function(node,_191){if(node.nextSibling){_191.setStart(node.nextSibling,0);}else{var _192=node.parentNode;while(_192&&_192.nextSibling==null){_192=_192.parentNode;}if(_192){_191.setStart(_192.nextSibling,0);}}return _191;},_adaptIESelection:function(){var _193=_127.getSelection(this.window);if(_193&&_193.rangeCount&&!_193.isCollapsed){var _194=_193.getRangeAt(0);var _195=_194.startContainer;var _196=_194.startOffset;while(_195.nodeType===3&&_196>=_195.length&&_195.nextSibling){_196=_196-_195.length;_195=_195.nextSibling;}var _197=null;while(this._isNodeEmpty(_195,_196)&&_195!==_197){_197=_195;_194=this._removeStartingRangeFromRange(_195,_194);_195=_194.startContainer;_196=0;}_193.removeAllRanges();_193.addRange(_194);}},_adaptIEFormatAreaAndExec:function(_198){var _199=_127.getSelection(this.window);var doc=this.document;var rs,ret,_19a,txt,_19b,_19c,_19d,_19e;if(_198&&_199&&_199.isCollapsed){var _19f=this.queryCommandValue(_198);if(_19f){var _1a0=this._tagNamesForCommand(_198);_19a=_199.getRangeAt(0);var fs=_19a.startContainer;if(fs.nodeType===3){var _1a1=_19a.endOffset;if(fs.length<_1a1){ret=this._adjustNodeAndOffset(rs,_1a1);fs=ret.node;_1a1=ret.offset;}}var _1a2;while(fs&&fs!==this.editNode){var _1a3=fs.tagName?fs.tagName.toLowerCase():"";if(_114.indexOf(_1a0,_1a3)>-1){_1a2=fs;break;}fs=fs.parentNode;}if(_1a2){rs=_19a.startContainer;var _1a4=doc.createElement(_1a2.tagName);_11a.place(_1a4,_1a2,"after");if(rs&&rs.nodeType===3){var _1a5,_1a6;var _1a7=_19a.endOffset;if(rs.length<_1a7){ret=this._adjustNodeAndOffset(rs,_1a7);rs=ret.node;_1a7=ret.offset;}txt=rs.nodeValue;_19b=doc.createTextNode(txt.substring(0,_1a7));var _1a8=txt.substring(_1a7,txt.length);if(_1a8){_19c=doc.createTextNode(_1a8);}_11a.place(_19b,rs,"before");if(_19c){_19d=doc.createElement("span");_19d.className="ieFormatBreakerSpan";_11a.place(_19d,rs,"after");_11a.place(_19c,_19d,"after");_19c=_19d;}_11a.destroy(rs);var _1a9=_19b.parentNode;var _1aa=[];var _1ab;while(_1a9!==_1a2){var tg=_1a9.tagName;_1ab={tagName:tg};_1aa.push(_1ab);var _1ac=doc.createElement(tg);if(_1a9.style){if(_1ac.style){if(_1a9.style.cssText){_1ac.style.cssText=_1a9.style.cssText;_1ab.cssText=_1a9.style.cssText;}}}if(_1a9.tagName==="FONT"){if(_1a9.color){_1ac.color=_1a9.color;_1ab.color=_1a9.color;}if(_1a9.face){_1ac.face=_1a9.face;_1ab.face=_1a9.face;}if(_1a9.size){_1ac.size=_1a9.size;_1ab.size=_1a9.size;}}if(_1a9.className){_1ac.className=_1a9.className;_1ab.className=_1a9.className;}if(_19c){_1a5=_19c;while(_1a5){_1a6=_1a5.nextSibling;_1ac.appendChild(_1a5);_1a5=_1a6;}}if(_1ac.tagName==_1a9.tagName){_19d=doc.createElement("span");_19d.className="ieFormatBreakerSpan";_11a.place(_19d,_1a9,"after");_11a.place(_1ac,_19d,"after");}else{_11a.place(_1ac,_1a9,"after");}_19b=_1a9;_19c=_1ac;_1a9=_1a9.parentNode;}if(_19c){_1a5=_19c;if(_1a5.nodeType===1||(_1a5.nodeType===3&&_1a5.nodeValue)){_1a4.innerHTML="";}while(_1a5){_1a6=_1a5.nextSibling;_1a4.appendChild(_1a5);_1a5=_1a6;}}var _1ad;if(_1aa.length){_1ab=_1aa.pop();var _1ae=doc.createElement(_1ab.tagName);if(_1ab.cssText&&_1ae.style){_1ae.style.cssText=_1ab.cssText;}if(_1ab.className){_1ae.className=_1ab.className;}if(_1ab.tagName==="FONT"){if(_1ab.color){_1ae.color=_1ab.color;}if(_1ab.face){_1ae.face=_1ab.face;}if(_1ab.size){_1ae.size=_1ab.size;}}_11a.place(_1ae,_1a4,"before");while(_1aa.length){_1ab=_1aa.pop();var _1af=doc.createElement(_1ab.tagName);if(_1ab.cssText&&_1af.style){_1af.style.cssText=_1ab.cssText;}if(_1ab.className){_1af.className=_1ab.className;}if(_1ab.tagName==="FONT"){if(_1ab.color){_1af.color=_1ab.color;}if(_1ab.face){_1af.face=_1ab.face;}if(_1ab.size){_1af.size=_1ab.size;}}_1ae.appendChild(_1af);_1ae=_1af;}_19e=doc.createTextNode(".");_19d.appendChild(_19e);_1ae.appendChild(_19e);_1ad=_127.create(this.window);_1ad.setStart(_19e,0);_1ad.setEnd(_19e,_19e.length);_199.removeAllRanges();_199.addRange(_1ad);this._sCall("collapse",[false]);_19e.parentNode.innerHTML="";}else{_19d=doc.createElement("span");_19d.className="ieFormatBreakerSpan";_19e=doc.createTextNode(".");_19d.appendChild(_19e);_11a.place(_19d,_1a4,"before");_1ad=_127.create(this.window);_1ad.setStart(_19e,0);_1ad.setEnd(_19e,_19e.length);_199.removeAllRanges();_199.addRange(_1ad);this._sCall("collapse",[false]);_19e.parentNode.innerHTML="";}if(!_1a4.firstChild){_11a.destroy(_1a4);}return true;}}return false;}else{_19a=_199.getRangeAt(0);rs=_19a.startContainer;if(rs&&rs.nodeType===3){var _1a1=_19a.startOffset;if(rs.length<_1a1){ret=this._adjustNodeAndOffset(rs,_1a1);rs=ret.node;_1a1=ret.offset;}txt=rs.nodeValue;_19b=doc.createTextNode(txt.substring(0,_1a1));var _1a8=txt.substring(_1a1);if(_1a8!==""){_19c=doc.createTextNode(txt.substring(_1a1));}_19d=doc.createElement("span");_19e=doc.createTextNode(".");_19d.appendChild(_19e);if(_19b.length){_11a.place(_19b,rs,"after");}else{_19b=rs;}_11a.place(_19d,_19b,"after");if(_19c){_11a.place(_19c,_19d,"after");}_11a.destroy(rs);var _1ad=_127.create(this.window);_1ad.setStart(_19e,0);_1ad.setEnd(_19e,_19e.length);_199.removeAllRanges();_199.addRange(_1ad);doc.execCommand(_198);_11a.place(_19d.firstChild,_19d,"before");_11a.destroy(_19d);_1ad.setStart(_19e,0);_1ad.setEnd(_19e,_19e.length);_199.removeAllRanges();_199.addRange(_1ad);this._sCall("collapse",[false]);_19e.parentNode.innerHTML="";return true;}}}else{return false;}},_adaptIEList:function(_1b0){var _1b1=_127.getSelection(this.window);if(_1b1.isCollapsed){if(_1b1.rangeCount&&!this.queryCommandValue(_1b0)){var _1b2=_1b1.getRangeAt(0);var sc=_1b2.startContainer;if(sc&&sc.nodeType==3){if(!_1b2.startOffset){var _1b3="ul";if(_1b0==="insertorderedlist"){_1b3="ol";}var list=this.document.createElement(_1b3);var li=_11a.create("li",null,list);_11a.place(list,sc,"before");li.appendChild(sc);_11a.create("br",null,list,"after");var _1b4=_127.create(this.window);_1b4.setStart(sc,0);_1b4.setEnd(sc,sc.length);_1b1.removeAllRanges();_1b1.addRange(_1b4);this._sCall("collapse",[true]);return true;}}}}return false;},_handleTextColorOrProperties:function(_1b5,_1b6){var _1b7=_127.getSelection(this.window);var doc=this.document;var rs,ret,_1b8,txt,_1b9,_1ba,_1bb,_1bc;_1b6=_1b6||null;if(_1b5&&_1b7&&_1b7.isCollapsed){if(_1b7.rangeCount){_1b8=_1b7.getRangeAt(0);rs=_1b8.startContainer;if(rs&&rs.nodeType===3){var _1bd=_1b8.startOffset;if(rs.length<_1bd){ret=this._adjustNodeAndOffset(rs,_1bd);rs=ret.node;_1bd=ret.offset;}txt=rs.nodeValue;_1b9=doc.createTextNode(txt.substring(0,_1bd));var _1be=txt.substring(_1bd);if(_1be!==""){_1ba=doc.createTextNode(txt.substring(_1bd));}_1bb=doc.createElement("span");_1bc=doc.createTextNode(".");_1bb.appendChild(_1bc);var _1bf=doc.createElement("span");_1bb.appendChild(_1bf);if(_1b9.length){_11a.place(_1b9,rs,"after");}else{_1b9=rs;}_11a.place(_1bb,_1b9,"after");if(_1ba){_11a.place(_1ba,_1bb,"after");}_11a.destroy(rs);var _1c0=_127.create(this.window);_1c0.setStart(_1bc,0);_1c0.setEnd(_1bc,_1bc.length);_1b7.removeAllRanges();_1b7.addRange(_1c0);if(has("webkit")){var _1c1="color";if(_1b5==="hilitecolor"||_1b5==="backcolor"){_1c1="backgroundColor";}_11c.set(_1bb,_1c1,_1b6);this._sCall("remove",[]);_11a.destroy(_1bf);_1bb.innerHTML="&#160;";this._sCall("selectElement",[_1bb]);this.focus();}else{this.execCommand(_1b5,_1b6);_11a.place(_1bb.firstChild,_1bb,"before");_11a.destroy(_1bb);_1c0.setStart(_1bc,0);_1c0.setEnd(_1bc,_1bc.length);_1b7.removeAllRanges();_1b7.addRange(_1c0);this._sCall("collapse",[false]);_1bc.parentNode.removeChild(_1bc);}return true;}}}return false;},_adjustNodeAndOffset:function(node,_1c2){while(node.length<_1c2&&node.nextSibling&&node.nextSibling.nodeType===3){_1c2=_1c2-node.length;node=node.nextSibling;}return {"node":node,"offset":_1c2};},_tagNamesForCommand:function(_1c3){if(_1c3==="bold"){return ["b","strong"];}else{if(_1c3==="italic"){return ["i","em"];}else{if(_1c3==="strikethrough"){return ["s","strike"];}else{if(_1c3==="superscript"){return ["sup"];}else{if(_1c3==="subscript"){return ["sub"];}else{if(_1c3==="underline"){return ["u"];}}}}}}return [];},_stripBreakerNodes:function(node){if(!this.isLoaded){return;}_11f(".ieFormatBreakerSpan",node).forEach(function(b){while(b.firstChild){_11a.place(b.firstChild,b,"before");}_11a.destroy(b);});return node;}});return _12b;});},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(_1c4){return function(_1c5,_1c6){switch(typeof _1c5){default:throw new Error("Can not query with a "+typeof _1c5);case "object":case "undefined":var _1c7=_1c5;_1c5=function(_1c8){for(var key in _1c7){var _1c9=_1c7[key];if(_1c9&&_1c9.test){if(!_1c9.test(_1c8[key],_1c8)){return false;}}else{if(_1c9!=_1c8[key]){return false;}}}return true;};break;case "string":if(!this[_1c5]){throw new Error("No filter function "+_1c5+" was found in store");}_1c5=this[_1c5];case "function":}function _1ca(_1cb){var _1cc=_1c4.filter(_1cb,_1c5);var _1cd=_1c6&&_1c6.sort;if(_1cd){_1cc.sort(typeof _1cd=="function"?_1cd:function(a,b){for(var sort,i=0;sort=_1cd[i];i++){var _1ce=a[sort.attribute];var _1cf=b[sort.attribute];if(_1ce!=_1cf){return !!sort.descending==(_1ce==null||_1ce>_1cf)?-1:1;}}return 0;});}if(_1c6&&(_1c6.start||_1c6.count)){var _1d0=_1cc.length;_1cc=_1cc.slice(_1c6.start||0,(_1c6.start||0)+(_1c6.count||Infinity));_1cc.total=_1d0;}return _1cc;};_1ca.matches=_1c5;return _1ca;};});},"dijit/_editor/html":function(){define("dijit/_editor/html",["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(_1d1,lang,has){var _1d2={};lang.setObject("dijit._editor.html",_1d2);var _1d3=_1d2.escapeXml=function(str,_1d4){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_1d4){str=str.replace(/'/gm,"&#39;");}return str;};_1d2.getNodeHtml=function(node){var _1d5=[];_1d2.getNodeHtmlHelper(node,_1d5);return _1d5.join("");};_1d2.getNodeHtmlHelper=function(node,_1d6){switch(node.nodeType){case 1:var _1d7=node.nodeName.toLowerCase();if(!_1d7||_1d7.charAt(0)=="/"){return "";}_1d6.push("<",_1d7);var _1d8=[],_1d9={};var attr;if(has("dom-attributes-explicit")||has("dom-attributes-specified-flag")){var i=0;while((attr=node.attributes[i++])){var n=attr.name;if(n.substr(0,3)!=="_dj"&&(!has("dom-attributes-specified-flag")||attr.specified)&&!(n in _1d9)){var v=attr.value;if(n=="src"||n=="href"){if(node.getAttribute("_djrealurl")){v=node.getAttribute("_djrealurl");}}if(has("ie")===8&&n==="style"){v=v.replace("HEIGHT:","height:").replace("WIDTH:","width:");}_1d8.push([n,v]);_1d9[n]=v;}}}else{var _1da=/^input$|^img$/i.test(node.nodeName)?node:node.cloneNode(false);var s=_1da.outerHTML;var _1db=/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi;var _1dc=s.match(_1db);s=s.substr(0,s.indexOf(">"));_1d1.forEach(_1dc,function(attr){if(attr){var idx=attr.indexOf("=");if(idx>0){var key=attr.substring(0,idx);if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(node.getAttribute("_djrealurl")){_1d8.push([key,node.getAttribute("_djrealurl")]);return;}}var val,_1dd;switch(key){case "style":val=node.style.cssText.toLowerCase();break;case "class":val=node.className;break;case "width":if(_1d7==="img"){_1dd=/width=(\S+)/i.exec(s);if(_1dd){val=_1dd[1];}break;}case "height":if(_1d7==="img"){_1dd=/height=(\S+)/i.exec(s);if(_1dd){val=_1dd[1];}break;}default:val=node.getAttribute(key);}if(val!=null){_1d8.push([key,val.toString()]);}}}}},this);}_1d8.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});var j=0;while((attr=_1d8[j++])){_1d6.push(" ",attr[0],"=\"",(typeof attr[1]==="string"?_1d3(attr[1],true):attr[1]),"\"");}switch(_1d7){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":_1d6.push(" />");break;case "script":_1d6.push(">",node.innerHTML,"</",_1d7,">");break;default:_1d6.push(">");if(node.hasChildNodes()){_1d2.getChildrenHtmlHelper(node,_1d6);}_1d6.push("</",_1d7,">");}break;case 4:case 3:_1d6.push(_1d3(node.nodeValue,true));break;case 8:_1d6.push("<!--",_1d3(node.nodeValue,true),"-->");break;default:_1d6.push("<!-- Element not recognized - Type: ",node.nodeType," Name: ",node.nodeName,"-->");}};_1d2.getChildrenHtml=function(node){var _1de=[];_1d2.getChildrenHtmlHelper(node,_1de);return _1de.join("");};_1d2.getChildrenHtmlHelper=function(dom,_1df){if(!dom){return;}var _1e0=dom["childNodes"]||dom;var _1e1=!has("ie")||_1e0!==dom;var node,i=0;while((node=_1e0[i++])){if(!_1e1||node.parentNode==dom){_1d2.getNodeHtmlHelper(node,_1df);}}};return _1d2;});},"dijit/form/DateTextBox":function(){define("dijit/form/DateTextBox",["dojo/_base/declare","../Calendar","./_DateTimeTextBox"],function(_1e2,_1e3,_1e4){return _1e2("dijit.form.DateTextBox",_1e4,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:_1e3,_selector:"date",value:new Date("")});});},"dijit/_editor/plugins/TextColor":function(){define("dijit/_editor/plugins/TextColor",["require","dojo/colors","dojo/_base/declare","dojo/_base/lang","../_Plugin","../../form/DropDownButton"],function(_1e5,_1e6,_1e7,lang,_1e8,_1e9){var _1ea=_1e7("dijit._editor.plugins.TextColor",_1e8,{buttonClass:_1e9,useDefaultCommand:false,_initButton:function(){this.inherited(arguments);var self=this;this.button.loadDropDown=function(_1eb){_1e5(["../../ColorPalette"],lang.hitch(this,function(_1ec){this.dropDown=new _1ec({dir:self.editor.dir,ownerDocument:self.editor.ownerDocument,value:self.value,onChange:function(_1ed){self.editor.execCommand(self.command,_1ed);}});_1eb();}));};},updateState:function(){var _1ee=this.editor;var _1ef=this.command;if(!_1ee||!_1ee.isLoaded||!_1ef.length){return;}if(this.button){var _1f0=this.get("disabled");this.button.set("disabled",_1f0);if(_1f0){return;}var _1f1;try{_1f1=_1ee.queryCommandValue(_1ef)||"";}catch(e){_1f1="";}}if(_1f1==""){_1f1="#000000";}if(_1f1=="transparent"){_1f1="#ffffff";}if(typeof _1f1=="string"){if(_1f1.indexOf("rgb")>-1){_1f1=_1e6.fromRgb(_1f1).toHex();}}else{_1f1=((_1f1&255)<<16)|(_1f1&65280)|((_1f1&16711680)>>>16);_1f1=_1f1.toString(16);_1f1="#000000".slice(0,7-_1f1.length)+_1f1;}this.value=_1f1;var _1f2=this.button.dropDown;if(_1f2&&_1f1!==_1f2.get("value")){_1f2.set("value",_1f1,false);}}});_1e8.registry["foreColor"]=function(){return new _1ea({command:"foreColor"});};_1e8.registry["hiliteColor"]=function(){return new _1ea({command:"hiliteColor"});};return _1ea;});},"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(_1f3,_1f4,lang,_1f5,_1f6,_1f7,_1f8,has,ioq,_1f9,i18n,_1fa,_1fb,_1fc,_1fd,_1fe,_1ff,_200,_201,_202,_203,_204,_205,_206,_207,_208,_209,_20a,_20b,_20c,_20d,_20e,_20f,_210,_211,_212,_213,_214,_215){var _216=_1f3(_20c,{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,_217){this.i18n=i18n.getLocalization("esri","jsapi");this._outFields=_217&&_217.outFields;this._loadCallback=_217&&_217.loadCallback;var _218=_217&&_217._usePatch;this._usePatch=(_218===null||_218===undefined)?true:_218;this._trackIdField=_217&&_217.trackIdField;this.objectIdField=_217&&_217.objectIdField;this._maxOffset=_217&&_217.maxAllowableOffset;this._optEditable=_217&&_217.editable;this._optAutoGen=_217&&_217.autoGeneralize;this.editSummaryCallback=_217&&_217.editSummaryCallback;this.userId=_217&&_217.userId;this.userIsAdmin=_217&&_217.userIsAdmin;this.useMapTime=(_217&&_217.hasOwnProperty("useMapTime"))?(!!_217.useMapTime):true;this.source=_217&&_217.source;this.gdbVersion=_217&&_217.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var ctor=this.constructor,mode=this.mode=(_1fb.isDefined(_217&&_217.mode)?_217.mode:ctor.MODE_ONDEMAND);switch(mode){case ctor.MODE_SNAPSHOT:this._mode=new _212(this);this._isSnapshot=true;break;case ctor.MODE_ONDEMAND:this._tileWidth=(_217&&_217.tileWidth)||512;this._tileHeight=(_217&&_217.tileHeight)||512;this._mode=new _213(this);var _219=_217&&_217.latticeTiling;this.latticeTiling=_219;break;case ctor.MODE_SELECTION:this._mode=new _214(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 _206(this.url,{source:this.source,gdbVersion:this.gdbVersion});var _21a=this._url.path;this._fserver=false;if(_21a.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _21b=_217&&_217.resourceInfo;if(_21b){this._initLayer(_21b);}else{if(this.source){var _21c={source:this.source.toJson()};this._url.query=lang.mixin(this._url.query,{layer:_1f6.toJson(_21c)});}if(this.gdbVersion){this._url.query=lang.mixin(this._url.query,{gdbVersion:this.gdbVersion});}_1fc({url:_21a,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}this.registerConnectEvents();},_initLayer:function(_21d,io){if(_21d||io){this._json=_21d;this._findCredential();var ssl=(this.credential&&this.credential.ssl)||(_21d&&_21d._ssl);if(ssl){this._useSSL();this._task._useSSL();}if(this._collection){this._mode=new _212(this);this._isSnapshot=true;this._featureSet=_21d.featureSet;this._nextId=_21d.nextObjectId;_21d=_21d.layerDefinition;}if(_21d.hasOwnProperty("capabilities")){var _21e=(this.capabilities=_21d.capabilities);if(_21e&&_21e.toLowerCase().indexOf("editing")!==-1){this._editable=true;}else{this._editable=false;}}else{if(!this._collection){this._editable=this._fserver;}}if(_1fb.isDefined(this._optEditable)){this._editable=this._optEditable;delete this._optEditable;}this._json=_1f6.toJson(this._json);if(this.isEditable()){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_21d.geometryType==="esriGeometryPolyline")||(_21d.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_1fb.isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}var _21f=_21d.effectiveMinScale||_21d.minScale,_220=_21d.effectiveMaxScale||_21d.maxScale;if(!this._hasMin&&_21f){this.setMinScale(_21f);}if(!this._hasMax&&_220){this.setMaxScale(_220);}this.layerId=_21d.id;this.name=_21d.name;this.description=_21d.description;this.copyright=_21d.copyrightText;this.type=_21d.type;this.geometryType=_21d.geometryType;this.displayField=_21d.displayField;this.defaultDefinitionExpression=_21d.definitionExpression;this.fullExtent=new _209(_21d.extent);this.initialExtent=new _209(this.fullExtent.toJson());if(this.fullExtent.spatialReference){this.spatialReference=new _1fe(this.fullExtent.spatialReference.toJson());}this.defaultVisibility=_21d.defaultVisibility;if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_21d.indexedFields;this.maxRecordCount=_21d.maxRecordCount;this.canModifyLayer=_21d.canModifyLayer;this.supportsStatistics=_21d.supportsStatistics;this.supportsAdvancedQueries=_21d.supportsAdvancedQueries;this.hasLabels=_21d.hasLabels;this.canScaleSymbols=_21d.canScaleSymbols;this.supportsRollbackOnFailure=_21d.supportsRollbackOnFailure;this.syncCanReturnChanges=_21d.syncCanReturnChanges;this.isDataVersioned=_21d.isDataVersioned;this.editFieldsInfo=_21d.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_21d.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_21d.relationships;this.allowGeometryUpdates=_1fb.isDefined(_21d.allowGeometryUpdates)?_21d.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _221=(this.fields=[]),_222=_21d.fields,i;for(i=0;i<_222.length;i++){_221.push(new _20d(_222[i]));}if(!this.objectIdField){this.objectIdField=_21d.objectIdField;if(!this.objectIdField){_222=_21d.fields;for(i=0;i<_222.length;i++){var _223=_222[i];if(_223.type==="esriFieldTypeOID"){this.objectIdField=_223.name;break;}}}if(!this.objectIdField){console.debug("esri.layers.FeatureLayer: "+_1fb.substitute({url:this.url},"objectIdField is not set [url: ${url}]"));}}if(!_1fb.isDefined(this._nextId)){var _224=this.objectIdField,_225=-1;if(this._collection&&_224){var fset=this._featureSet,_226=fset&&fset.features,il=_226?_226.length:0,oid,attr;for(i=0;i<il;i++){attr=_226[i].attributes;oid=attr&&attr[_224];if(oid>_225){_225=oid;}}}this._nextId=(_225+1);}this.globalIdField=_21d.globalIdField;var _227=(this.typeIdField=_21d.typeIdField),_228;if(_227){_228=!this._getField(_227)&&this._getField(_227,true);if(_228){this.typeIdField=_228.name;}}this.visibilityField=_21d.visibilityField;var _229=_21d.defaultSymbol;if(_229){this.defaultSymbol=_202.fromJson(_229);}var _22a=this.types=[],_22b=_21d.types,_22c,_22d,_22e,_22f=this.editFieldsInfo,_230=_22f&&_22f.creatorField,_231=_22f&&_22f.editorField,fix=(_230||_231),_232=[];if(_22b){for(i=0;i<_22b.length;i++){_22c=new _20f(_22b[i]);_22d=_22c.templates;if(fix&&_22d&&_22d.length){_232=_232.concat(_22d);}_22a.push(_22c);}}var _233=_21d.templates,_234,_235=this.templates=[];if(_233){for(i=0;i<_233.length;i++){_234=new _210(_233[i]);if(fix){_232.push(_234);}_235.push(_234);}}for(i=0;i<_232.length;i++){_22e=lang.getObject("prototype.attributes",false,_232[i]);if(_22e){if(_230){delete _22e[_230];}if(_231){delete _22e[_231];}}}var _236=_21d.timeInfo;if(_236){this.timeInfo=new _20e(_236);this._startTimeField=_236.startTimeField;this._endTimeField=_236.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_236.trackIdField=this._trackIdField;}else{this._trackIdField=_236.trackIdField;}}this.hasAttachments=(!this._collection&&_21d.hasAttachments)?true:false;this.htmlPopupType=_21d.htmlPopupType;var _237=_21d.drawingInfo,_238;if(!this.renderer){if(_237&&_237.renderer){_238=_237.renderer;this.setRenderer(_205.fromJson(_238));if(_238.type==="classBreaks"){this.renderer.setMaxInclusive(true);}if(!this._collection){var _239=_238.type,_23a=[];_238=this.renderer;switch(_239){case "simple":_23a.push(_238.symbol);break;case "uniqueValue":case "classBreaks":_23a.push(_238.defaultSymbol);_23a=_23a.concat(_1f5.map(_238.infos,function(info){return info.symbol;}));break;}_23a=_1f5.filter(_23a,_1fb.isDefined);var _23b=this._url.path+"/images/",_23c=this._getToken();_1f5.forEach(_23a,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_23b+url;}if(_23c&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+_23c);}}});}}else{if(_229){_22b=this.types;if(_22b.length>0){_238=new _204(this.defaultSymbol,this.typeIdField);_1f5.forEach(_22b,function(type){_238.addValue(type.id,type.symbol);});}else{_238=new _203(this.defaultSymbol);}this.setRenderer(_238);}else{if(!this._isTable){var _23d;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_23d=new _1ff();break;case "esriGeometryPolyline":_23d=new _200();break;case "esriGeometryPolygon":_23d=new _201();break;}this.setRenderer(_23d?new _203(_23d):null);}}}}var _23e=(_237&&_237.transparency)||0;if(!_1fb.isDefined(this.opacity)&&_23e>0){this.opacity=1-(_23e/100);}this.version=_21d.currentVersion;if(!this.version){var ver;if("capabilities" in _21d||"drawingInfo" in _21d||"hasAttachments" in _21d||"htmlPopupType" in _21d||"relationships" in _21d||"timeInfo" in _21d||"typeIdField" in _21d||"types" in _21d){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 _23f=function(){this.onLoad(this);var _240=this._loadCallback;if(_240){delete this._loadCallback;_240(this);}};if(this._collection){this._fireUpdateStart();var _241=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new _208(_241));this._fcAdded=true;_23f.call(this);}else{this._forceIdentity(_23f);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _242=this.renderer;if(_242){this._ager=(_242.declaredClass.indexOf("TemporalRenderer")!==-1&&_242.observationAger&&_242.observationRenderer);var _243=_1f5.filter([_242,_242.observationRenderer,_242.latestObservationRenderer,_242.trackRenderer],_1fb.isDefined);var _244=[];_1f5.forEach(_243,function(rnd){if(!lang.isFunction(rnd.attributeField)){_244.push(rnd.attributeField);}_244.push(rnd.attributeField2);_244.push(rnd.attributeField3);},this);this._rendererFields=_1f5.filter(_244,_1fb.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;}_1f4.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 _1f5.filter(this._getOutFields(),function(_245){return (_245==="*"||!!this._getField(_245));},this);},setEditable:function(_246){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=_246;return this;}var _247=this._editable;this._editable=_246;this._updateCaps();if(_247!==_246){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_248){var _249={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this.isEditable()){return _249;}var _24a=_248&&_248.feature,_24b=_248&&_248.userId,caps=_1f5.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),lang.trim),_24c=_1f5.indexOf(caps,"editing")>-1,_24d=_24c&&(_1f5.indexOf(caps,"create")>-1),_24e=_24c&&(_1f5.indexOf(caps,"update")>-1),_24f=_24c&&(_1f5.indexOf(caps,"delete")>-1),_250=this.ownershipBasedAccessControlForFeatures,_251=this.editFieldsInfo,_252=_251&&_251.creatorField,_253=_251&&_251.realm,_254=_24a&&_24a.attributes,_255=(_254&&_252)?_254[_252]:undefined,_256,_257=!!this.userIsAdmin,_258=!_250||_257||!!(_250.allowOthersToUpdate||_250.allowUpdateToOthers),_259=!_250||_257||!!(_250.allowOthersToDelete||_250.allowDeleteToOthers);if(_257||(_24c&&!(_24d||_24e||_24f))){_24d=_24e=_24f=true;}_256={"canCreate":_24d,"canUpdate":_24e,"canDelete":_24f};if(_255===null){_256.canUpdate=_24e&&_258;_256.canDelete=_24f&&_259;}else{if(_255===""){return _256;}else{if(_255){_24b=_24b||this.getUserId();if(_24b&&_253){_24b=_24b+"@"+_253;}if(_24b.toLowerCase()===_255.toLowerCase()){return _256;}else{_256.canUpdate=_24e&&_258;_256.canDelete=_24f&&_259;}}}}return _256;},getUserId:function(){var _25a;if(this.loaded){_25a=(this.credential&&this.credential.userId)||this.userId||"";}return _25a;},setUserIsAdmin:function(_25b){this.userIsAdmin=_25b;},setEditSummaryCallback:function(_25c){this.editSummaryCallback=_25c;},getEditSummary:function(_25d,_25e,_25f){_25f=_1fb.isDefined(_25f)?_25f:(new Date()).getTime();var _260="",info=this.getEditInfo(_25d,_25e,_25f),_261=(_25e&&_25e.callback)||this.editSummaryCallback;if(_261){info=_261(_25d,info)||"";}if(lang.isString(info)){_260=info;}else{if(info){var _262=info.action,_263=info.userId,_264=info.timeValue,_265=0;if(_262){_265++;}if(_263){_265++;}if(_1fb.isDefined(_264)){_265++;}if(_265>1){_260=(_262==="edit"?"edit":"create")+(_263?"User":"")+(_1fb.isDefined(_264)?info.displayPattern:"");}}_260=_260&&_1fb.substitute(info,this.i18n.layers.FeatureLayer[_260]);}return _260;},getEditInfo:function(_266,_267,_268){if(!this.loaded){return;}_268=_1fb.isDefined(_268)?_268:(new Date()).getTime();var _269=(_267&&_267.action)||"last",_26a=this.editFieldsInfo,_26b=_26a&&_26a.creatorField,_26c=_26a&&_26a.creationDateField,_26d=_26a&&_26a.editorField,_26e=_26a&&_26a.editDateField,_26f=_26a&&_26a.realm,_270=_266&&_266.attributes,_271=(_270&&_26b)?_270[_26b]:undefined,_272=(_270&&_26c)?_270[_26c]:null,_273=(_270&&_26d)?_270[_26d]:undefined,_274=(_270&&_26e)?_270[_26e]:null,_275=this._getEditData(_271,_272,_268),_276=this._getEditData(_273,_274,_268),_277;switch(_269){case "creation":_277=_275;break;case "edit":_277=_276;break;case "last":_277=_276||_275;break;}if(_277){_277.action=(_277===_276)?"edit":"creation";}return _277;},_getEditData:function(_278,_279,_27a){var data,_27b,_27c,_27d=60000,_27e=3600000,_27f=2*_27e,_280=24*_27e,_281=7*_280;if(_1fb.isDefined(_279)){_27b=_27a-_279;if(_27b<0){_27c="Full";}else{if(_27b<_27d){_27c="Seconds";}else{if(_27b<(2*_27d)){_27c="Minute";}else{if(_27b<_27e){_27c="Minutes";}else{if(_27b<_27f){_27c="Hour";}else{if(_27b<_280){_27c="Hours";}else{if(_27b<_281){_27c="WeekDay";}else{_27c="Full";}}}}}}}}if((_278!==undefined)||_27c){data=data||{};data.userId=_278;if(_27c){var _282=_1f8.format,_283=new Date(_279);data.minutes=Math.floor(_27b/_27d);data.hours=Math.floor(_27b/_27e);data.weekDay=_282(_283,{datePattern:"EEEE",selector:"date"});data.formattedDate=_282(_283,{selector:"date"});data.formattedTime=_282(_283,{selector:"time"});data.displayPattern=_27c;data.timeValue=_279;}}return data;},isEditable:function(){return !!(this._editable||this.userIsAdmin);},setMaxAllowableOffset:function(_284){if(!this.isEditable()){this._maxOffset=_284;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_285){if(!this.loaded){this._optAutoGen=_285;}else{if(!this.isEditable()&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_285;if(_285){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(_286){if(!this._collection&&(_286!==this.gdbVersion)&&(_286||this.gdbVersion)){this.gdbVersion=_286;this._task.gdbVersion=_286;this._url.query=lang.mixin(this._url.query,{gdbVersion:_286});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(_287){if(this._isSnapshot){this._timeDefn=_287;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(_288,_289){this._timeOffset=_288;this._timeOffsetUnits=_289;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(_28a,_28b,_28c,_28d){_28b=_28b||this.constructor.SELECTION_NEW;var _28e=this._getShallowClone(_28a),map=this._map,_28f,dfd=_1fd._fixDfd(new _1f7(_1fd._dfdCanceller));_28e.outFields=this.getOutFields();_28e.returnGeometry=true;if(map){_28e.outSpatialReference=new _1fe(map.spatialReference.toJson());}if(!this._applyQueryFilters(_28e)){_28f={features:[]};this._selectHandler(_28f,_28b,_28c,_28d,dfd);return dfd;}var _290=this._canDoClientSideQuery(_28e);if(_290){_28f={features:this._doQuery(_28e,_290)};this._selectHandler(_28f,_28b,_28c,_28d,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+this.invalidParams);this._resolve([err],null,_28d,dfd,true);return dfd;}var self=this;if(this._ts){_28e._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_28e);temp.addCallbacks(function(_291){self._selectHandler(_291,_28b,_28c,_28d,dfd);},function(err){self._resolve([err],null,_28d,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _292=this._selectedFeatures,_293=[],item;for(item in _292){if(_292.hasOwnProperty(item)){_293.push(_292[item]);}}return _293;},clearSelection:function(_294){var _295=this._selectedFeatures,mode=this._mode,item;for(item in _295){if(_295.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_294){this.onSelectionClear();}return this;},setSelectionSymbol:function(_296){this._selectionSymbol=_296;if(_296){var _297=this._selectedFeatures,item;for(item in _297){if(_297.hasOwnProperty(item)){_297[item].setSymbol(_296);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_298,_299,_29a,_29b,_29c){var _29d=_29c.assembly,dfd=_29c.dfd;this._applyNormalized(adds,_29d&&_29d[0]);this._applyNormalized(_298,_29d&&_29d[1]);this.onBeforeApplyEdits(adds,_298,_299);var i,_29e={},_29f=this.objectIdField,_2a0={f:"json"},_2a1=false;if(this._collection){var _2a2={};_2a2.addResults=adds?_1f5.map(adds,function(){_2a1=true;return {objectId:this._nextId++,success:true};},this):null;_2a2.updateResults=_298?_1f5.map(_298,function(_2a3){_2a1=true;var oid=_2a3.attributes[_29f];_29e[oid]=_2a3;return {objectId:oid,success:true};},this):null;_2a2.deleteResults=_299?_1f5.map(_299,function(_2a4){_2a1=true;return {objectId:_2a4.attributes[_29f],success:true};},this):null;if(_2a1){this._editHandler(_2a2,adds,_29e,_29a,_29b,dfd);}return;}if(adds&&adds.length>0){_2a0.adds=this._convertFeaturesToJson(adds,0,1);_2a1=true;}if(_298&&_298.length>0){for(i=0;i<_298.length;i++){var _2a5=_298[i];_29e[_2a5.attributes[_29f]]=_2a5;}_2a0.updates=this._convertFeaturesToJson(_298,0,0,1);_2a1=true;}if(_299&&_299.length>0){var ids=[];for(i=0;i<_299.length;i++){ids.push(_299[i].attributes[_29f]);}_2a0.deletes=ids.join(",");_2a1=true;}if(_2a1){var self=this;return _1fc({url:this._url.path+"/applyEdits",content:lang.mixin(_2a0,this._url.query),callbackParamName:"callback",load:function(_2a6){self._editHandler(_2a6,adds,_29e,_29a,_29b,dfd);},error:function(err){self._resolve([err],null,_29b,dfd,true);}},{usePost:true});}},queryFeatures:function(_2a7,_2a8,_2a9){return this._query("execute","onQueryFeaturesComplete",_2a7,_2a8,_2a9);},queryRelatedFeatures:function(_2aa,_2ab,_2ac){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",_2aa,_2ab,_2ac);},queryIds:function(_2ad,_2ae,_2af){return this._query("executeForIds","onQueryIdsComplete",_2ad,_2ae,_2af);},queryCount:function(_2b0,_2b1,_2b2){return this._query("executeForCount","onQueryCountComplete",_2b0,_2b1,_2b2);},queryAttachmentInfos:function(_2b3,_2b4,_2b5){var url=this._url.path+"/"+_2b3+"/attachments",dfd=new _1f7(_1fd._dfdCanceller),self=this;dfd._pendingDfd=_1fc({url:url,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_2b6){var _2b7=_2b6.attachmentInfos,_2b8;_1f5.forEach(_2b7,function(info){_2b8=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+(_2b8?("?"+_2b8):"");info.objectId=_2b3;});self._resolve([_2b7],"onQueryAttachmentInfosComplete",_2b4,dfd);},error:function(err){self._resolve([err],null,_2b5,dfd,true);}});return dfd;},addAttachment:function(_2b9,_2ba,_2bb,_2bc){return this._sendAttachment("add",_2b9,_2ba,_2bb,_2bc);},updateAttachment:function(_2bd,_2be,_2bf,_2c0,_2c1){_2bf.appendChild(_1f9.create("input",{type:"hidden",name:"attachmentId",value:_2be}));return this._sendAttachment("update",_2bd,_2bf,_2c0,_2c1);},deleteAttachments:function(_2c2,_2c3,_2c4,_2c5){var url=this._url.path+"/"+_2c2+"/deleteAttachments",dfd=new _1f7(_1fd._dfdCanceller),self=this,_2c6={f:"json",attachmentIds:_2c3.join(",")};dfd._pendingDfd=_1fc({url:url,content:lang.mixin(_2c6,this._url.query),callbackParamName:"callback",load:lang.hitch(this,function(_2c7){var _2c8=_2c7.deleteAttachmentResults;_2c8=_1f5.map(_2c8,function(_2c9){var res=new _211(_2c9);res.attachmentId=res.objectId;res.objectId=_2c2;return res;});self._resolve([_2c8],"onDeleteAttachmentsComplete",_2c4,dfd);}),error:function(err){self._resolve([err],null,_2c5,dfd,true);}},{usePost:true});return dfd;},addType:function(_2ca){var _2cb=this.types;if(_2cb){var _2cc=_1f5.some(_2cb,function(type){if(type.id==_2ca.id){return true;}return false;});if(_2cc){return false;}else{_2cb.push(_2ca);}}else{this.types=[_2ca];}this._typesDirty=true;return true;},deleteType:function(_2cd){if(!this._collection){return;}var _2ce=this.types;if(_2ce){var _2cf=-1;_1f5.some(_2ce,function(type,_2d0){if(type.id==_2cd){_2cf=_2d0;return true;}return false;});if(_2cf>-1){this._typesDirty=true;return _2ce.splice(_2cf,1)[0];}}},toJson:function(){var _2d1=this._json,json=lang.isString(_2d1)?_1f6.fromJson(_2d1):lang.clone(_2d1);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _2d2=json.layerDefinition,_2d3=this._collection;if(_2d3&&this._typesDirty){_2d2.types=_1f5.map(this.types||[],function(type){return type.toJson();});var _2d4=this.renderer,_2d5=_2d2.drawingInfo;if(_2d5&&_2d4&&_2d4.declaredClass.indexOf("TemporalRenderer")===-1){_2d5.renderer=_2d4.toJson();}}var _2d6=null;if(!(_2d3&&!this._fcAdded)){_2d6={geometryType:_2d2.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=lang.mixin({},json.featureSet||{},_2d6);if(_2d3){json.nextObjectId=this._nextId;_2d2.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(_2d7){var self=this,path=this._url&&this._url.path;if((this.ownershipBasedAccessControlForFeatures||this.userIsAdmin)&&!this._getToken()&&path&&_1fa.id&&_1fa.id._hasPortalSession()&&_1fa.id._doPortalSignIn(path)){_1fa.id.getCredential(path).then(function(){self._findCredential();_2d7.call(self);},function(){_2d7.call(self);});}else{_2d7.call(this);}},_updateCaps:function(){var _2d8=this._editable,_2d9=lang.trim(this.capabilities||""),_2da=_1f5.map((_2d9?_2d9.split(","):[]),lang.trim),caps=_1f5.map((_2d9?_2d9.toLowerCase().split(","):[]),lang.trim),_2db=_1f5.indexOf(caps,"editing"),cap,i,_2dc,_2dd={"Create":_1f5.indexOf(caps,"create"),"Update":_1f5.indexOf(caps,"update"),"Delete":_1f5.indexOf(caps,"delete")};if(_2d8&&_2db===-1){_2da.push("Editing");}else{if(!_2d8&&_2db>-1){_2dc=[_2db];for(cap in _2dd){if(_2dd[cap]>-1){_2dc.push(_2dd[cap]);}}_2dc.sort();for(i=_2dc.length-1;i>=0;i--){_2da.splice(_2dc[i],1);}}}this.capabilities=_2da.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,_2de=this.renderer;if(evt.firstOccurrence){this.clearSelection();if(this.timeInfo){if(this._trackIdField||(_2de&&(_2de.latestObservationRenderer||_2de.trackRenderer))){this._trackManager=new _215(this);this._trackManager.initialize(map);}}this._zoomConnect=_1f4.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(_2df){var map=this._map;if(_2df&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=_1f4.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;_1f4.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_2e0){this._mapTimeExtent=_2e0;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_2e1){var _2e2=this._timeOffset,_2e3=this._timeOffsetUnits;return (_2e1&&_2e2&&_2e3)?_2e1.offset(-1*_2e2,_2e3):_2e1;},_getTimeOverlap:function(_2e4,_2e5){if(_2e4&&_2e5){return _2e4.intersection(_2e5);}else{return _2e4||_2e5;}},_getTimeFilter:function(_2e6){var _2e7=this.getTimeDefinition(),_2e8=null,_2e9;if(_2e7||_2e8){_2e9=this._getTimeOverlap(_2e7,_2e8);if(!_2e9){return [false];}}if(_2e6){_2e6=_2e9?this._getTimeOverlap(_2e6,_2e9):_2e6;if(!_2e6){return [false];}}else{_2e6=_2e9;}return [true,_2e6];},_getAttributeFilter:function(_2ea){var _2eb=this.getDefinitionExpression();if(_2ea){_2ea=_2eb?"("+_2eb+") AND ("+_2ea+")":_2ea;}else{_2ea=_2eb;}return _2ea;},_applyQueryFilters:function(_2ec){_2ec.where=this._getAttributeFilter(_2ec.where);_2ec.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _2ed=this._getTimeFilter(_2ec.timeExtent);if(!_2ed[0]){return false;}else{_2ec.timeExtent=_2ed[1];}}return true;},_add:function(_2ee){var _2ef=this._selectionSymbol,attr=_2ee.attributes,_2f0=this.visibilityField;if(_2ef&&this._isSelOnly){_2ee.setSymbol(_2ef);}if(_2f0&&attr&&attr.hasOwnProperty(_2f0)){_2ee[attr[_2f0]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(_2f1){var _2f2=[],map=this._map;if(this._isTable||!map){return;}if(_2f1.text||(_2f1.where&&_2f1.where!==this.getDefinitionExpression())){return;}var _2f3=this._isSnapshot,_2f4=this._isSelOnly;var _2f5=_2f1.geometry;if(_2f5){if(!_2f4&&_2f1.spatialRelationship===_207.SPATIAL_REL_INTERSECTS&&(_2f5.type==="extent"&&(_2f3||map.extent.contains(_2f5)))){_2f2.push(1);}else{return;}}var ids=_2f1.objectIds;if(ids){if(_2f3){_2f2.push(2);}else{var len=ids.length,mode=this._mode,_2f6=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_2f6++;}}if(_2f6===len){_2f2.push(2);}else{return;}}}if(this.timeInfo){var _2f7=_2f1.timeExtent,_2f8=this._mapTimeExtent;if(_2f3){if(_2f7){_2f2.push(3);}}else{if(_2f4){if(_2f7){return;}}else{if(_2f8){if(_1f5.indexOf(_2f2,2)!==-1){if(_2f7){_2f2.push(3);}}else{return;}}else{if(_2f2.length>0){if(_2f7){_2f2.push(3);}}else{if(_2f7){return;}}}}}}return _2f2.length>0?_2f2:null;},_doQuery:function(_2f9,_2fa,_2fb){var _2fc=[],mode=this._mode,_2fd=this.objectIdField,i,len,_2fe;if(_1f5.indexOf(_2fa,2)!==-1){_2fc=[];var ids=_2f9.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_2fc.push(obj);}}if(_2fc.length===0){return [];}}if(_1f5.indexOf(_2fa,1)!==-1){_2fe=_2fc.length>0?_2fc:this.graphics;len=_2fe.length;var _2ff=_2f9.geometry._normalize(null,true);_2fc=[];for(i=0;i<len;i++){var _300=_2fe[i],_301=_300.geometry;if(_301){if(this.normalization&&_2ff.length){if(_2ff[0].intersects(_301)||_2ff[1].intersects(_301)){_2fc.push(_300);}}else{if(_2ff.intersects(_301)){_2fc.push(_300);}}}}if(_2fc.length===0){return [];}}if(_1f5.indexOf(_2fa,3)!==-1){if(this.timeInfo){_2fe=_2fc.length>0?_2fc:this.graphics;var time=_2f9.timeExtent,_302=this._filterByTime(_2fe,time.startTime,time.endTime);_2fc=_302.match;}}if(_2fb){return _1f5.map(_2fc,function(obj){return obj.attributes[_2fd];},this);}else{return _2fc;}},_filterByTime:function(_303,_304,_305){var _306=this._startTimeField,_307=this._endTimeField,_308;if(!this._twoTimeFields){_308=_306||_307;}var _309=_1fb.isDefined,yea=[],nay=[],i,len=_303.length,_30a,_30b;_304=_304?_304.getTime():-Infinity;_305=_305?_305.getTime():Infinity;if(_308){for(i=0;i<len;i++){_30a=_303[i];_30b=_30a.attributes;var time=_30b[_308];if(time>=_304&&time<=_305){yea.push(_30a);}else{nay.push(_30a);}}}else{for(i=0;i<len;i++){_30a=_303[i];_30b=_30a.attributes;var _30c=_30b[_306],end=_30b[_307];_30c=_309(_30c)?_30c:-Infinity;end=_309(end)?end:Infinity;if((_30c>=_304&&_30c<=_305)||(end>=_304&&end<=_305)||(_304>=_30c&&_305<=end)){yea.push(_30a);}else{nay.push(_30a);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_30d,_30e,dfd,_30f){if(_30d){this[_30d].apply(this,args);}if(_30e){_30e.apply(null,args);}if(dfd){_1fd._resDfd(dfd,args,_30f);}},_getShallowClone:function(_310){var _311=new _207(),prop;for(prop in _310){if(_310.hasOwnProperty(prop)){_311[prop]=_310[prop];}}return _311;},_query:function(type,_312,_313,_314,_315){var that=this,map=this._map,dfd=new _1f7(_1fd._dfdCanceller),_316=_313;var _317=function(_318,_319){if(!_319&&type==="execute"&&!that._isTable){var _31a=_318.features,mode=that._mode,_31b=that.objectIdField,il=_31a.length,i;for(i=il-1;i>=0;i--){var oid=_31a[i].attributes[_31b];var _31c=mode._getFeature(oid);if(_31c){_31a.splice(i,1,_31c);}}}that._resolve([_318],_312,_314,dfd);};if(type!=="executeRelationshipQuery"){_316=this._getShallowClone(_313);_316.outFields=this.getOutFields();_316.returnGeometry=_313.hasOwnProperty("returnGeometry")?_313.returnGeometry:true;var _31d;if(map){_316.outSpatialReference=new _1fe(map.spatialReference.toJson());}if(!this._applyQueryFilters(_316)){switch(type){case "execute":_31d=new _208({features:[]});break;case "executeForIds":_31d=[];break;case "executeForCount":_31d=0;break;}_317(_31d,true);return dfd;}var _31e=this._canDoClientSideQuery(_316);if(_31e){var _31f=this._doQuery(_316,_31e,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_31d=new _208();_31d.features=_31f;break;case "executeForIds":_31d=_31f;break;case "executeForCount":_31d=_31f.length;break;}_317(_31d,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+this.invalidParams);this._resolve([err],null,_315,dfd,true);return dfd;}if(this._ts){_316._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_316);temp.addCallbacks(_317,function(err){that._resolve([err],null,_315,dfd,true);});return dfd;},_convertFeaturesToJson:function(_320,_321,_322,_323){var json=[],_324=this._selectionSymbol,_325=this.visibilityField,i,_326,_327=this.objectIdField;if(this.loaded&&(_322||_323)){_326=_1f5.filter(this.fields,function(_328){return (_328.editable===false)&&(!_323||(_328.name!==_327));});}for(i=0;i<_320.length;i++){var _329=_320[i],_32a={},_32b=_329.geometry,attr=_329.attributes,_32c=_329.symbol;if(_32b&&(!_323||!this.loaded||this.allowGeometryUpdates)){_32a.geometry=_32b.toJson();}if(_325){_32a.attributes=attr=lang.mixin({},attr);attr[_325]=_329.visible?1:0;}else{if(attr){_32a.attributes=lang.mixin({},attr);}}if(_32a.attributes&&_326&&_326.length){_1f5.forEach(_326,function(_32d){delete _32a.attributes[_32d.name];});}if(_32c&&(_32c!==_324)){_32a.symbol=_32c.toJson();}json.push(_32a);}return _321?json:_1f6.toJson(json);},_selectHandler:function(_32e,_32f,_330,_331,dfd){var _332,ctor=this.constructor;switch(_32f){case ctor.SELECTION_NEW:this.clearSelection(true);_332=true;break;case ctor.SELECTION_ADD:_332=true;break;case ctor.SELECTION_SUBTRACT:_332=false;break;}var i,_333=_32e.features,mode=this._mode,_334=[],_335=this.objectIdField,_336,oid;if(_332){for(i=0;i<_333.length;i++){_336=_333[i];oid=_336.attributes[_335];var _337=mode._addFeatureIIf(oid,_336);_334.push(_337);this._selectFeatureIIf(oid,_337,mode);}}else{for(i=0;i<_333.length;i++){_336=_333[i];oid=_336.attributes[_335];this._unSelectFeatureIIf(oid,mode);var _338=mode._removeFeatureIIf(oid);_334.push(_338||_336);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_334,_32f,_32e.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_330,dfd);if(_32e.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_339,mode){var _33a=this._selectedFeatures,_33b=_33a[oid];if(!_33b){mode._incRefCount(oid);_33a[oid]=_339;if(!this._isTable){this._setSelectSymbol(_339);}}return _33b||_339;},_unSelectFeatureIIf:function(oid,mode){var _33c=this._selectedFeatures[oid];if(_33c){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(_33c);}}return _33c;},_isSelected:function(_33d){},_setSelectSymbol:function(_33e){var _33f=this._selectionSymbol;if(_33f&&!this._isSelOnly){_33e.setSymbol(_33f);}},_setUnSelectSymbol:function(_340){var _341=this._selectionSymbol;if(_341&&!this._isSelOnly){if(_341===_340.symbol){_340.setSymbol(null,true);}}},_getOutFields:function(){var _342=_1f5.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(_343,_344,arr){return !!_343&&(_1f5.indexOf(arr,_343)===_344);});var _345=lang.clone(this._outFields);if(_345){if(_1f5.indexOf(_345,"*")!==-1){return _345;}_1f5.forEach(_342,function(_346){if(_1f5.indexOf(_345,_346)===-1){_345.push(_346);}});return _345;}else{return _342;}},_checkFields:function(_347){var _348=_347||this._getOutFields();_1f5.forEach(_348,function(_349){if(_349==="*"){return;}if(!this._getField(_349)){console.debug("esri.layers.FeatureLayer: "+_1fb.substitute({url:this.url,field:_349},"unable to find '${field}' field in the layer 'fields' information [url: ${url}]"));}},this);if(!_347&&!this._isTable&&!this._fserver&&!this._collection){var _34a=_1f5.some(this.fields,function(_34b){return (_34b&&_34b.type==="esriFieldTypeGeometry")?true:false;});if(!_34a){console.debug("esri.layers.FeatureLayer: "+_1fb.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 _34c=this.renderer;if(_34c&&this.fields.length>0){var _34d=_1f5.filter([_34c,_34c.observationRenderer,_34c.latestObservationRenderer,_34c.trackRenderer],_1fb.isDefined);var _34e=[];_1f5.forEach(_34d,function(rnd){var _34f,_350;_350=rnd.attributeField;if(_350&&!lang.isFunction(_350)){_34f=!this._getField(_350)&&this._getField(_350,true);if(_34f){rnd.attributeField=_34f.name;}}_350=rnd.attributeField2;if(_350){_34f=!this._getField(_350)&&this._getField(_350,true);if(_34f){rnd.attributeField2=_34f.name;}}_350=rnd.attributeField3;if(_350){_34f=!this._getField(_350)&&this._getField(_350,true);if(_34f){rnd.attributeField3=_34f.name;}}if(!lang.isFunction(rnd.attributeField)){_34e.push(rnd.attributeField);}_34e.push(rnd.attributeField2);_34e.push(rnd.attributeField3);},this);this._rendererFields=_1f5.filter(_34e,_1fb.isDefined);}},_getField:function(_351,_352){var _353=this.fields;if(!_353||_353.length===0){return null;}var _354;if(_352){_351=_351.toLowerCase();}_1f5.some(_353,function(_355){var _356=false;if(_352){_356=(_355&&_355.name.toLowerCase()===_351)?true:false;}else{_356=(_355&&_355.name===_351)?true:false;}if(_356){_354=_355;}return _356;});return _354;},_getDateOpts:function(){if(!this._dtOpts){var _357=_1f5.map(_1f5.filter(this.fields,function(_358){return !!(_358&&_358.type==="esriFieldTypeDate");}),function(_359){return _359.name;});this._dtOpts={properties:_357};}return this._dtOpts;},_applyNormalized:function(_35a,_35b){if(_35a&&_35b){_1f5.forEach(_35a,function(_35c,_35d){if(_35c&&_35b[_35d]){_35c.setGeometry(_35b[_35d]);}});}},_editHandler:function(_35e,adds,_35f,_360,_361,dfd){var _362=_35e.addResults,_363=_35e.updateResults,_364=_35e.deleteResults,i,_365,oid,_366,attr,_367=this.objectIdField,mode=this._mode,_368=this._isTable;var _369=this.editFieldsInfo,_36a=this.getOutFields()||[],_36b=_369&&_369.creatorField,_36c=_369&&_369.creationDateField,_36d=_369&&_369.editorField,_36e=_369&&_369.editDateField,_36f=_369&&_369.realm;if(_1f5.indexOf(_36a,"*")===-1){if(_36b&&_1f5.indexOf(_36a,_36b)===-1){_36b=null;}if(_36c&&_1f5.indexOf(_36a,_36c)===-1){_36c=null;}if(_36d&&_1f5.indexOf(_36a,_36d)===-1){_36d=null;}if(_36e&&_1f5.indexOf(_36a,_36e)===-1){_36e=null;}}var _370=(_36c||_36e)?(new Date()).getTime():null,_371=(_36b||_36d)?this.getUserId():undefined;if(_371&&_36f){_371=_371+"@"+_36f;}if(_362){for(i=0;i<_362.length;i++){_362[i]=new _211(_362[i]);if(_368){continue;}_365=_362[i];if(_365.success){oid=_365.objectId;_366=adds[i];var gl=_366._graphicsLayer;if(gl&&gl!==this){gl.remove(_366);}attr=_366.attributes||{};attr[_367]=oid;if(_36b){attr[_36b]=_371;}if(_36d){attr[_36d]=_371;}if(_36c){attr[_36c]=_370;}if(_36e){attr[_36e]=_370;}_366.setAttributes(attr);if(mode._init){mode.drawFeature(_366);}}}}if(_363){for(i=0;i<_363.length;i++){_363[i]=new _211(_363[i]);if(_368){continue;}_365=_363[i];if(_365.success){oid=_365.objectId;_366=_35f[oid];var _372=mode._getFeature(oid);if(_372){if(_372.geometry!==_366.geometry){_372.setGeometry(_20a.fromJson(_366.geometry.toJson()));}this._repaint(_372,oid);}_366=_372||_366;attr=_366.attributes||{};if(_36d){attr[_36d]=_371;}if(_36e){attr[_36e]=_370;}_366.setAttributes(attr);}}}if(_364){var _373=[];for(i=0;i<_364.length;i++){_364[i]=new _211(_364[i]);if(_368){continue;}_365=_364[i];if(_365.success){oid=_365.objectId;_366=mode._getFeature(oid);if(_366){if(this._unSelectFeatureIIf(oid,mode)){_373.push(_366);}_366._count=0;mode._removeFeatureIIf(oid);}}}if(_373.length>0){this.onSelectionComplete(_373,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_362,_363,_364],"onEditsComplete",_360,dfd);},_sendAttachment:function(type,_374,_375,_376,_377){var _378=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_374+"/"+_378,self=this;var dfd=_1fc({url:url,form:_375,content:lang.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_379){var _37a=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_37b=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_37c=new _211(_379[_37a]);_37c.attachmentId=_37c.objectId;_37c.objectId=_374;self._resolve([_37c],_37b,_376);return _37c;}).addErrback(function(_37d){self._resolve([_37d],null,_377,null,true);});return dfd;},_repaint:function(_37e,oid,_37f){oid=_1fb.isDefined(oid)?oid:_37e.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_37e.setSymbol(_37e.symbol,_37f);}},_getKind:function(_380){var _381=this._trackManager;if(_381){return _381.isLatestObservation(_380)?1:0;}return 0;}});lang.mixin(_216,{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"});_20b._createWrappers(_216);if(has("extend-esri")){lang.setObject("layers.FeatureLayer",_216,_1fa);}return _216;});},"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(dojo){return dojo.dojox;});},"esri/dijit/editing/Util":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel"],function(lang,_382,has,_383){var util={};util={findFeatures:function(ids,_384,_385){var _386=_384.objectIdField;var _387=_384.graphics;var _388=_382.filter(_387,function(_389){return _382.some(ids,function(id){return _389.attributes[_386]===id.objectId;});});if(_385){_385(_388);}else{return _388;}},getSelection:function(_38a){var _38b=[];_382.forEach(_38a,function(_38c){var _38d=_38c.getSelectedFeatures();_382.forEach(_38d,function(_38e){_38b.push(_38e);});});return _38b;}};if(has("extend-esri")){lang.setObject("dijit.editing.Util.LayerHelper",util,_383);}return util;});},"dijit/form/SimpleTextarea":function(){define("dijit/form/SimpleTextarea",["dojo/_base/declare","dojo/dom-class","dojo/sniff","./TextBox"],function(_38f,_390,has,_391){return _38f("dijit.form.SimpleTextarea",_391,{baseClass:"dijitTextBox dijitTextArea",rows:"3",cols:"20",templateString:"<textarea ${!nameAttrSetting} data-dojo-attach-point='focusNode,containerNode,textbox' autocomplete='off'></textarea>",postMixInProperties:function(){if(!this.value&&this.srcNodeRef){this.value=this.srcNodeRef.value;}this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);if(has("ie")&&this.cols){_390.add(this.textbox,"dijitTextAreaCols");}},filter:function(_392){if(_392){_392=_392.replace(/\r/g,"");}return this.inherited(arguments);},_onInput:function(e){if(this.maxLength){var _393=parseInt(this.maxLength);var _394=this.textbox.value.replace(/\r/g,"");var _395=_394.length-_393;if(_395>0){var _396=this.textbox;if(_396.selectionStart){var pos=_396.selectionStart;var cr=0;if(has("opera")){cr=(this.textbox.value.substring(0,pos).match(/\r/g)||[]).length;}this.textbox.value=_394.substring(0,pos-_395-cr)+_394.substring(pos-cr);_396.setSelectionRange(pos-_395,pos-_395);}else{if(this.ownerDocument.selection){_396.focus();var _397=this.ownerDocument.selection.createRange();_397.moveStart("character",-_395);_397.text="";_397.select();}}}}this.inherited(arguments);}});});},"dijit/form/MappedTextBox":function(){define("dijit/form/MappedTextBox",["dojo/_base/declare","dojo/dom-construct","./ValidationTextBox"],function(_398,_399,_39a){return _398("dijit.form.MappedTextBox",_39a,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting="";},_setNameAttr:null,serialize:function(val){return val.toString?val.toString():"";},toString:function(){var val=this.filter(this.get("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);this.valueNode=_399.place("<input type='hidden'"+(this.name?" name=\""+this.name.replace(/"/g,"&quot;")+"\"":"")+"/>",this.textbox,"after");},reset:function(){this.valueNode.value="";this.inherited(arguments);}});});},"url:dijit/form/templates/Spinner.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\tdata-dojo-attach-point=\"upArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\tdata-dojo-attach-point=\"downArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' data-dojo-attach-point=\"textbox,focusNode\" type=\"${type}\" data-dojo-attach-event=\"onkeypress:_onKeyPress\"\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\n\t/></div\n></div>\n","dojox/date/islamic/Date":function(){define("dojox/date/islamic/Date",["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(lang,_39b,dd){var _39c=_39b("dojox.date.islamic.Date",null,{_date:0,_month:0,_year:0,_hours:0,_minutes:0,_seconds:0,_milliseconds:0,_day:0,_GREGORIAN_EPOCH:1721425.5,_ISLAMIC_EPOCH:1948439.5,constructor:function(){var len=arguments.length;if(!len){this.fromGregorian(new Date());}else{if(len==1){var arg0=arguments[0];if(typeof arg0=="number"){arg0=new Date(arg0);}if(arg0 instanceof Date){this.fromGregorian(arg0);}else{if(arg0==""){this._date=new Date("");}else{this._year=arg0._year;this._month=arg0._month;this._date=arg0._date;this._hours=arg0._hours;this._minutes=arg0._minutes;this._seconds=arg0._seconds;this._milliseconds=arg0._milliseconds;}}}else{if(len>=3){this._year+=arguments[0];this._month+=arguments[1];this._date+=arguments[2];this._hours+=arguments[3]||0;this._minutes+=arguments[4]||0;this._seconds+=arguments[5]||0;this._milliseconds+=arguments[6]||0;}}}},getDate:function(){return this._date;},getMonth:function(){return this._month;},getFullYear:function(){return this._year;},getDay:function(){return this.toGregorian().getDay();},getHours:function(){return this._hours;},getMinutes:function(){return this._minutes;},getSeconds:function(){return this._seconds;},getMilliseconds:function(){return this._milliseconds;},setDate:function(date){date=parseInt(date);if(date>0&&date<=this.getDaysInIslamicMonth(this._month,this._year)){this._date=date;}else{var _39d;if(date>0){for(_39d=this.getDaysInIslamicMonth(this._month,this._year);date>_39d;date-=_39d,_39d=this.getDaysInIslamicMonth(this._month,this._year)){this._month++;if(this._month>=12){this._year++;this._month-=12;}}this._date=date;}else{for(_39d=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1);date<=0;_39d=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1)){this._month--;if(this._month<0){this._year--;this._month+=12;}date+=_39d;}this._date=date;}}return this;},setFullYear:function(year){this._year=+year;},setMonth:function(_39e){this._year+=Math.floor(_39e/12);if(_39e>0){this._month=Math.floor(_39e%12);}else{this._month=Math.floor(((_39e%12)+12)%12);}},setHours:function(){var _39f=arguments.length;var _3a0=0;if(_39f>=1){_3a0=parseInt(arguments[0]);}if(_39f>=2){this._minutes=parseInt(arguments[1]);}if(_39f>=3){this._seconds=parseInt(arguments[2]);}if(_39f==4){this._milliseconds=parseInt(arguments[3]);}while(_3a0>=24){this._date++;var _3a1=this.getDaysInIslamicMonth(this._month,this._year);if(this._date>_3a1){this._month++;if(this._month>=12){this._year++;this._month-=12;}this._date-=_3a1;}_3a0-=24;}this._hours=_3a0;},_addMinutes:function(_3a2){_3a2+=this._minutes;this.setMinutes(_3a2);this.setHours(this._hours+parseInt(_3a2/60));return this;},_addSeconds:function(_3a3){_3a3+=this._seconds;this.setSeconds(_3a3);this._addMinutes(parseInt(_3a3/60));return this;},_addMilliseconds:function(_3a4){_3a4+=this._milliseconds;this.setMilliseconds(_3a4);this._addSeconds(parseInt(_3a4/1000));return this;},setMinutes:function(_3a5){this._minutes=_3a5%60;return this;},setSeconds:function(_3a6){this._seconds=_3a6%60;return this;},setMilliseconds:function(_3a7){this._milliseconds=_3a7%1000;return this;},toString:function(){if(isNaN(this._date)){return "Invalidate Date";}else{var x=new Date();x.setHours(this._hours);x.setMinutes(this._minutes);x.setSeconds(this._seconds);x.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+x.toTimeString();}},toGregorian:function(){var _3a8=this._year;var _3a9=this._month;var _3aa=this._date;var _3ab=_3aa+Math.ceil(29.5*_3a9)+(_3a8-1)*354+Math.floor((3+(11*_3a8))/30)+this._ISLAMIC_EPOCH-1;var wjd=Math.floor(_3ab-0.5)+0.5,_3ac=wjd-this._GREGORIAN_EPOCH,_3ad=Math.floor(_3ac/146097),dqc=this._mod(_3ac,146097),cent=Math.floor(dqc/36524),_3ae=this._mod(dqc,36524),quad=Math.floor(_3ae/1461),_3af=this._mod(_3ae,1461),_3b0=Math.floor(_3af/365),year=(_3ad*400)+(cent*100)+(quad*4)+_3b0;if(!(cent==4||_3b0==4)){year++;}var _3b1=this._GREGORIAN_EPOCH+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400);var _3b2=wjd-_3b1;var tjd=(this._GREGORIAN_EPOCH-1)+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((739/12)+((dd.isLeapYear(new Date(year,3,1))?-1:-2))+1);var _3b3=((wjd<tjd)?0:(dd.isLeapYear(new Date(year,3,1))?1:2));var _3b4=Math.floor((((_3b2+_3b3)*12)+373)/367);var tjd2=(this._GREGORIAN_EPOCH-1)+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((((367*_3b4)-362)/12)+((_3b4<=2)?0:(dd.isLeapYear(new Date(year,_3b4,1))?-1:-2))+1);var day=(wjd-tjd2)+1;var _3b5=new Date(year,(_3b4-1),day,this._hours,this._minutes,this._seconds,this._milliseconds);return _3b5;},fromGregorian:function(_3b6){var date=new Date(_3b6);var _3b7=date.getFullYear(),_3b8=date.getMonth(),gDay=date.getDate();var _3b9=(this._GREGORIAN_EPOCH-1)+(365*(_3b7-1))+Math.floor((_3b7-1)/4)+(-Math.floor((_3b7-1)/100))+Math.floor((_3b7-1)/400)+Math.floor((((367*(_3b8+1))-362)/12)+(((_3b8+1)<=2)?0:(dd.isLeapYear(date)?-1:-2))+gDay);_3b9=Math.floor(_3b9)+0.5;var days=_3b9-this._ISLAMIC_EPOCH;var _3ba=Math.floor((30*days+10646)/10631);var _3bb=Math.ceil((days-29-this._yearStart(_3ba))/29.5);_3bb=Math.min(_3bb,11);var hDay=Math.ceil(days-this._monthStart(_3ba,_3bb))+1;this._date=hDay;this._month=_3bb;this._year=_3ba;this._hours=date.getHours();this._minutes=date.getMinutes();this._seconds=date.getSeconds();this._milliseconds=date.getMilliseconds();this._day=date.getDay();return this;},valueOf:function(){return this.toGregorian().valueOf();},_yearStart:function(year){return (year-1)*354+Math.floor((3+11*year)/30);},_monthStart:function(year,_3bc){return Math.ceil(29.5*_3bc)+(year-1)*354+Math.floor((3+11*year)/30);},_civilLeapYear:function(year){return (14+11*year)%30<11;},getDaysInIslamicMonth:function(_3bd,year){var _3be=0;_3be=29+((_3bd+1)%2);if(_3bd==11&&this._civilLeapYear(year)){_3be++;}return _3be;},_mod:function(a,b){return a-(b*Math.floor(a/b));}});_39c.getDaysInIslamicMonth=function(_3bf){return new _39c().getDaysInIslamicMonth(_3bf.getMonth(),_3bf.getFullYear());};return _39c;});},"dijit/_editor/range":function(){define("dijit/_editor/range",["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/window","../main"],function(_3c0,_3c1,lang,win,_3c2){_3c2.range={};_3c2.range.getIndex=function(node,_3c3){var ret=[],retR=[];var _3c4=node;var _3c5,n;while(node!=_3c3){var i=0;_3c5=node.parentNode;while((n=_3c5.childNodes[i++])){if(n===node){--i;break;}}ret.unshift(i);retR.unshift(i-_3c5.childNodes.length);node=_3c5;}if(ret.length>0&&_3c4.nodeType==3){n=_3c4.previousSibling;while(n&&n.nodeType==3){ret[ret.length-1]--;n=n.previousSibling;}n=_3c4.nextSibling;while(n&&n.nodeType==3){retR[retR.length-1]++;n=n.nextSibling;}}return {o:ret,r:retR};};_3c2.range.getNode=function(_3c6,_3c7){if(!lang.isArray(_3c6)||_3c6.length==0){return _3c7;}var node=_3c7;_3c0.every(_3c6,function(i){if(i>=0&&i<node.childNodes.length){node=node.childNodes[i];}else{node=null;return false;}return true;});return node;};_3c2.range.getCommonAncestor=function(n1,n2,root){root=root||n1.ownerDocument.body;var _3c8=function(n){var as=[];while(n){as.unshift(n);if(n!==root){n=n.parentNode;}else{break;}}return as;};var n1as=_3c8(n1);var n2as=_3c8(n2);var m=Math.min(n1as.length,n2as.length);var com=n1as[0];for(var i=1;i<m;i++){if(n1as[i]===n2as[i]){com=n1as[i];}else{break;}}return com;};_3c2.range.getAncestor=function(node,_3c9,root){root=root||node.ownerDocument.body;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(_3c9.test(name)){return node;}node=node.parentNode;}return null;};_3c2.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;_3c2.range.getBlockAncestor=function(node,_3ca,root){root=root||node.ownerDocument.body;_3ca=_3ca||_3c2.range.BlockTagNames;var _3cb=null,_3cc;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(!_3cb&&_3ca.test(name)){_3cb=node;}if(!_3cc&&(/^(?:BODY|TD|TH|CAPTION)$/).test(name)){_3cc=node;}node=node.parentNode;}return {blockNode:_3cb,blockContainer:_3cc||node.ownerDocument.body};};_3c2.range.atBeginningOfContainer=function(_3cd,node,_3ce){var _3cf=false;var _3d0=(_3ce==0);if(!_3d0&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(0,_3ce))){_3d0=true;}}if(_3d0){var _3d1=node;_3cf=true;while(_3d1&&_3d1!==_3cd){if(_3d1.previousSibling){_3cf=false;break;}_3d1=_3d1.parentNode;}}return _3cf;};_3c2.range.atEndOfContainer=function(_3d2,node,_3d3){var _3d4=false;var _3d5=(_3d3==(node.length||node.childNodes.length));if(!_3d5&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(_3d3))){_3d5=true;}}if(_3d5){var _3d6=node;_3d4=true;while(_3d6&&_3d6!==_3d2){if(_3d6.nextSibling){_3d4=false;break;}_3d6=_3d6.parentNode;}}return _3d4;};_3c2.range.adjacentNoneTextNode=function(_3d7,next){var node=_3d7;var len=(0-_3d7.length)||0;var prop=next?"nextSibling":"previousSibling";while(node){if(node.nodeType!=3){break;}len+=node.length;node=node[prop];}return [node,len];};_3c2.range.create=function(win){win=win||window;if(win.getSelection){return win.document.createRange();}else{return new _3c2.range.W3CRange();}};_3c2.range.getSelection=function(_3d8,_3d9){if(_3d8.getSelection){return _3d8.getSelection();}else{var s=new _3c2.range.ie.selection(_3d8);if(!_3d9){s._getCurrentSelection();}return s;}};if(!window.getSelection){_3c2.range.ie={cachedSelection:{},selection:function(_3da){this._ranges=[];this.addRange=function(r,_3db){this._ranges.push(r);if(!_3db){r._select();}this.rangeCount=this._ranges.length;};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0;};var _3dc=function(){var r=_3da.document.selection.createRange();var type=_3da.document.selection.type.toUpperCase();if(type=="CONTROL"){return new _3c2.range.W3CRange(_3c2.range.ie.decomposeControlRange(r));}else{return new _3c2.range.W3CRange(_3c2.range.ie.decomposeTextRange(r));}};this.getRangeAt=function(i){return this._ranges[i];};this._getCurrentSelection=function(){this.removeAllRanges();var r=_3dc();if(r){this.addRange(r,true);this.isCollapsed=r.collapsed;}else{this.isCollapsed=true;}};},decomposeControlRange:function(_3dd){var _3de=_3dd.item(0),_3df=_3dd.item(_3dd.length-1);var _3e0=_3de.parentNode,_3e1=_3df.parentNode;var _3e2=_3c2.range.getIndex(_3de,_3e0).o[0];var _3e3=_3c2.range.getIndex(_3df,_3e1).o[0]+1;return [_3e0,_3e2,_3e1,_3e3];},getEndPoint:function(_3e4,end){var _3e5=_3e4.duplicate();_3e5.collapse(!end);var _3e6="EndTo"+(end?"End":"Start");var _3e7=_3e5.parentElement();var _3e8,_3e9,_3ea;if(_3e7.childNodes.length>0){_3c0.every(_3e7.childNodes,function(node,i){var _3eb;if(node.nodeType!=3){_3e5.moveToElementText(node);if(_3e5.compareEndPoints(_3e6,_3e4)>0){if(_3ea&&_3ea.nodeType==3){_3e8=_3ea;_3eb=true;}else{_3e8=_3e7;_3e9=i;return false;}}else{if(i==_3e7.childNodes.length-1){_3e8=_3e7;_3e9=_3e7.childNodes.length;return false;}}}else{if(i==_3e7.childNodes.length-1){_3e8=node;_3eb=true;}}if(_3eb&&_3e8){var _3ec=_3c2.range.adjacentNoneTextNode(_3e8)[0];if(_3ec){_3e8=_3ec.nextSibling;}else{_3e8=_3e7.firstChild;}var _3ed=_3c2.range.adjacentNoneTextNode(_3e8);_3ec=_3ed[0];var _3ee=_3ed[1];if(_3ec){_3e5.moveToElementText(_3ec);_3e5.collapse(false);}else{_3e5.moveToElementText(_3e7);}_3e5.setEndPoint(_3e6,_3e4);_3e9=_3e5.text.length-_3ee;return false;}_3ea=node;return true;});}else{_3e8=_3e7;_3e9=0;}if(!end&&_3e8.nodeType==1&&_3e9==_3e8.childNodes.length){var _3ef=_3e8.nextSibling;if(_3ef&&_3ef.nodeType==3){_3e8=_3ef;_3e9=0;}}return [_3e8,_3e9];},setEndPoint:function(_3f0,_3f1,_3f2){var _3f3=_3f0.duplicate(),node,len;if(_3f1.nodeType!=3){if(_3f2>0){node=_3f1.childNodes[_3f2-1];if(node){if(node.nodeType==3){_3f1=node;_3f2=node.length;}else{if(node.nextSibling&&node.nextSibling.nodeType==3){_3f1=node.nextSibling;_3f2=0;}else{_3f3.moveToElementText(node.nextSibling?node:_3f1);var _3f4=node.parentNode;var _3f5=_3f4.insertBefore(node.ownerDocument.createTextNode(" "),node.nextSibling);_3f3.collapse(false);_3f4.removeChild(_3f5);}}}}else{_3f3.moveToElementText(_3f1);_3f3.collapse(true);}}if(_3f1.nodeType==3){var _3f6=_3c2.range.adjacentNoneTextNode(_3f1);var _3f7=_3f6[0];len=_3f6[1];if(_3f7){_3f3.moveToElementText(_3f7);_3f3.collapse(false);if(_3f7.contentEditable!="inherit"){len++;}}else{_3f3.moveToElementText(_3f1.parentNode);_3f3.collapse(true);_3f3.move("character",1);_3f3.move("character",-1);}_3f2+=len;if(_3f2>0){if(_3f3.move("character",_3f2)!=_3f2){console.error("Error when moving!");}}}return _3f3;},decomposeTextRange:function(_3f8){var _3f9=_3c2.range.ie.getEndPoint(_3f8);var _3fa=_3f9[0],_3fb=_3f9[1];var _3fc=_3f9[0],_3fd=_3f9[1];if(_3f8.htmlText.length){if(_3f8.htmlText==_3f8.text){_3fd=_3fb+_3f8.text.length;}else{_3f9=_3c2.range.ie.getEndPoint(_3f8,true);_3fc=_3f9[0],_3fd=_3f9[1];}}return [_3fa,_3fb,_3fc,_3fd];},setRange:function(_3fe,_3ff,_400,_401,_402,_403){var _404=_3c2.range.ie.setEndPoint(_3fe,_3ff,_400);_3fe.setEndPoint("StartToStart",_404);if(!_403){var end=_3c2.range.ie.setEndPoint(_3fe,_401,_402);}_3fe.setEndPoint("EndToEnd",end||_404);return _3fe;}};_3c1("dijit.range.W3CRange",null,{constructor:function(){if(arguments.length>0){this.setStart(arguments[0][0],arguments[0][1]);this.setEnd(arguments[0][2],arguments[0][3]);}else{this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}},_updateInternal:function(){if(this.startContainer!==this.endContainer){this.commonAncestorContainer=_3c2.range.getCommonAncestor(this.startContainer,this.endContainer);}else{this.commonAncestorContainer=this.startContainer;}this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);},setStart:function(node,_405){_405=parseInt(_405);if(this.startContainer===node&&this.startOffset==_405){return;}delete this._cachedBookmark;this.startContainer=node;this.startOffset=_405;if(!this.endContainer){this.setEnd(node,_405);}else{this._updateInternal();}},setEnd:function(node,_406){_406=parseInt(_406);if(this.endContainer===node&&this.endOffset==_406){return;}delete this._cachedBookmark;this.endContainer=node;this.endOffset=_406;if(!this.startContainer){this.setStart(node,_406);}else{this._updateInternal();}},setStartAfter:function(node,_407){this._setPoint("setStart",node,_407,1);},setStartBefore:function(node,_408){this._setPoint("setStart",node,_408,0);},setEndAfter:function(node,_409){this._setPoint("setEnd",node,_409,1);},setEndBefore:function(node,_40a){this._setPoint("setEnd",node,_40a,0);},_setPoint:function(what,node,_40b,ext){var _40c=_3c2.range.getIndex(node,node.parentNode).o;this[what](node.parentNode,_40c.pop()+ext);},_getIERange:function(){var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();_3c2.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return r;},getBookmark:function(){this._getIERange();return this._cachedBookmark;},_select:function(){var r=this._getIERange();r.select();},deleteContents:function(){var s=this.startContainer,r=this._getIERange();if(s.nodeType===3&&!this.startOffset){this.setStartBefore(s);}r.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=true;},cloneRange:function(){var r=new _3c2.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);r._body=this._body;return r;},detach:function(){this._body=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}});}return _3c2.range;});},"dijit/form/_DateTimeTextBox":function(){require({cache:{"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n"}});define("dijit/form/_DateTimeTextBox",["dojo/date","dojo/date/locale","dojo/date/stamp","dojo/_base/declare","dojo/_base/lang","./RangeBoundTextBox","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(date,_40d,_40e,_40f,lang,_410,_411,_412){new Date("X");var _413=_40f("dijit.form._DateTimeTextBox",[_410,_411],{templateString:_412,hasDownArrow:true,cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},pattern:_40d.regexp,datePackage:"",postMixInProperties:function(){this.inherited(arguments);this._set("type","text");},compare:function(val1,val2){var _414=this._isInvalidDate(val1);var _415=this._isInvalidDate(val2);return _414?(_415?0:-1):(_415?1:date.compare(val1,val2,this._selector));},forceWidth:true,format:function(_416,_417){if(!_416){return "";}return this.dateLocaleModule.format(_416,_417);},"parse":function(_418,_419){return this.dateLocaleModule.parse(_418,_419)||(this._isEmpty(_418)?null:undefined);},serialize:function(val,_41a){if(val.toGregorian){val=val.toGregorian();}return _40e.toISOString(val,_41a);},dropDownDefaultValue:new Date(),value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(_41b){this.dateModule=_41b.datePackage?lang.getObject(_41b.datePackage,false):date;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=_41b.datePackage?lang.getObject(_41b.datePackage+".locale",false):_40d;this._set("pattern",this.dateLocaleModule.regexp);this._invalidDate=this.constructor.prototype.value.toString();},buildRendering:function(){this.inherited(arguments);if(!this.hasDownArrow){this._buttonNode.style.display="none";}if(!this.hasDownArrow){this._buttonNode=this.domNode;this.baseClass+=" dijitComboBoxOpenOnClick";}},_setConstraintsAttr:function(_41c){_41c.selector=this._selector;_41c.fullYear=true;var _41d=_40e.fromISOString;if(typeof _41c.min=="string"){_41c.min=_41d(_41c.min);}if(typeof _41c.max=="string"){_41c.max=_41d(_41c.max);}this.inherited(arguments);},_isInvalidDate:function(_41e){return !_41e||isNaN(_41e)||typeof _41e!="object"||_41e.toString()==this._invalidDate;},_setValueAttr:function(_41f,_420,_421){if(_41f!==undefined){if(typeof _41f=="string"){_41f=_40e.fromISOString(_41f);}if(this._isInvalidDate(_41f)){_41f=null;}if(_41f instanceof Date&&!(this.dateClassObj instanceof Date)){_41f=new this.dateClassObj(_41f);}}this.inherited(arguments);if(this.value instanceof Date){this.filterString="";}if(this.dropDown){this.dropDown.set("value",_41f,false);}},_set:function(attr,_422){if(attr=="value"&&this.value instanceof Date&&this.compare(_422,this.value)==0){return;}this.inherited(arguments);},_setDropDownDefaultValueAttr:function(val){if(this._isInvalidDate(val)){val=new this.dateClassObj();}this.dropDownDefaultValue=val;},openDropDown:function(_423){if(this.dropDown){this.dropDown.destroy();}var _424=lang.isString(this.popupClass)?lang.getObject(this.popupClass,false):this.popupClass,_425=this,_426=this.get("value");this.dropDown=new _424({onChange:function(_427){_425.set("value",_427,true);},id:this.id+"_popup",dir:_425.dir,lang:_425.lang,value:_426,currentFocus:!this._isInvalidDate(_426)?_426:this.dropDownDefaultValue,constraints:_425.constraints,filterString:_425.filterString,datePackage:_425.params.datePackage,isDisabledDate:function(date){return !_425.rangeCheck(date,_425.constraints);}});this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(_428,_429){this._setValueAttr(this.parse(_428,this.constraints),_429,_428);}});return _413;});},"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(_42a,_42b,lang,_42c,has,_42d,_42e){var _42f=_42b(null,{declaredClass:"esri.layers._RenderMode",constructor:function(){this._prefix="jsonp_"+(_42a._scopeName||"dojo")+"IoScript";},initialize:function(map){this.map=map;this._init=true;},startup:function(){},propertyChangeHandler:function(type){},destroy:function(){this._init=false;},drawFeature:function(_430){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _431=this._featureMap[oid];if(_431){_431._count++;}},_decRefCount:function(oid){var _432=this._featureMap[oid];if(_432){_432._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_433){var fmap=this._featureMap,_434=fmap[oid],_435=this.featureLayer;if(!_434){fmap[oid]=_433;_435._add(_433);_433._count=0;}return _434||_433;},_removeFeatureIIf:function(oid){var _436=this._featureMap[oid],_437=this.featureLayer;if(_436){if(_436._count){return;}delete this._featureMap[oid];_437._remove(_436);}return _436;},_clearIIf:function(){var i,_438=this.featureLayer,_439=_438.graphics,_43a=_438._selectedFeatures,_43b=_438.objectIdField;for(i=_439.length-1;i>=0;i--){var _43c=_439[i];var oid=_43c.attributes[_43b];if(oid in _43a){_43c._count=1;continue;}_43c._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=_42d[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||_42d[this._prefix+id];if(dfd){try{dfd.cancel();_42d._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){_42d._validCheck(null);},_toggleVisibility:function(show){var _43d=this.featureLayer,_43e=_43d.graphics,_43f=show?"show":"hide",i,len=_43e.length;show=show&&_43d._ager;for(i=0;i<len;i++){var _440=_43e[i];_440[_43f]();if(show){_43d._repaint(_440);}}},_applyTimeFilter:function(_441){var _442=this.featureLayer;if(!_442.timeInfo||_442.suspended){return;}if(!_441){_442._fireUpdateStart();}var _443=_442._trackManager;if(_443){_443.clearTracks();}var defn=_442.getTimeDefinition(),_444=_442._getOffsettedTE(_442._mapTimeExtent);if(_444){_444=_442._getTimeOverlap(defn,_444);if(_444){var _445=_442._filterByTime(_442.graphics,_444.startTime,_444.endTime);if(_443){_443.addFeatures(_445.match);}_42c.forEach(_445.match,function(_446){var _447=_446._shape;if(!_446.visible){_446.show();_447=_446._shape;_447&&_447._moveToFront();}if(_442._ager&&_447){_442._repaint(_446);}});_42c.forEach(_445.noMatch,function(_448){if(_448.visible){_448.hide();}});}else{this._toggleVisibility(false);}}else{if(_443){_443.addFeatures(_442.graphics);}this._toggleVisibility(true);}if(_443){_443.moveLatestToFront();_443.drawTracks();}if(!_441){_442._fireUpdateEnd();}}});if(has("extend-esri")){lang.setObject("layers._RenderMode",_42f,_42e);}return _42f;});},"url:esri/dijit/templates/AttributeInspector.html":"<div class=\"esriAttributeInspector\">\r\n    <div class=\"atiLayerName\" dojoAttachPoint=\"layerName\"></div>\r\n    <div class=\"atiAttributes\" dojoAttachPoint=\"attributeTable\"></div>\r\n    <div dojoAttachPoint=\"attachmentEditor\"></div>\r\n    <div class=\"atiEditorTrackingInfo\" dojoAttachPoint=\"editorTrackingInfoDiv\"></div>\r\n    <div class=\"atiButtons\" dojoAttachPoint=\"editButtons\">\r\n        <button  dojoType=\"dijit.form.Button\" class=\"atiButton atiDeleteButton\"  dojoAttachPoint=\"deleteBtn\" dojoAttachEvent=\"onClick: onDeleteBtn\" showLabel=\"true\" type=\"button\">${NLS_deleteFeature}</button>\r\n        <div class=\"atiNavButtons\" dojoAttachPoint=\"navButtons\">\r\n            <div class=\"atiNavMessage\" dojoAttachPoint=\"navMessage\"></div>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiFirstIcon\" dojoAttachPoint=\"firstFeatureButton\" dojoAttachEvent=\"onClick: onFirstFeature\" showLabel=\"false\" type=\"button\">${NLS_first}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiPrevIcon\" dojoAttachPoint=\"prevFeatureButton\" dojoAttachEvent=\"onClick: onPreviousFeature\" showLabel=\"false\" type=\"button\">${NLS_previous}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiNextIcon\" dojoAttachPoint=\"nextFeatureButton\" dojoAttachEvent=\"onClick: onNextFeature\" showLabel=\"false\" type=\"button\">${NLS_next}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiLastIcon\" dojoAttachPoint=\"lastFeatureButton\" dojoAttachEvent=\"onClick: onLastFeature\" showLabel=\"false\" type=\"button\">${NLS_last}</button>\r\n        </div>\r\n    </div>\r\n</div>\r\n","dijit/form/NumberSpinner":function(){define("dijit/form/NumberSpinner",["dojo/_base/declare","dojo/_base/event","dojo/keys","./_Spinner","./NumberTextBox"],function(_449,_44a,keys,_44b,_44c){return _449("dijit.form.NumberSpinner",[_44b,_44c.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(val,_44d){var tc=this.constraints,v=isNaN(val),_44e=!isNaN(tc.max),_44f=!isNaN(tc.min);if(v&&_44d!=0){val=(_44d>0)?_44f?tc.min:_44e?tc.max:0:_44e?this.constraints.max:_44f?tc.min:0;}var _450=val+_44d;if(v||isNaN(_450)){return val;}if(_44e&&(_450>tc.max)){_450=tc.max;}if(_44f&&(_450<tc.min)){_450=tc.min;}return _450;},_onKeyPress:function(e){if((e.charOrCode==keys.HOME||e.charOrCode==keys.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.get("value")!="undefined"){var _451=this.constraints[(e.charOrCode==keys.HOME?"min":"max")];if(typeof _451=="number"){this._setValueAttr(_451,false);}_44a.stop(e);}}});});},"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(_452,lang,_453,has,_454,_455,_456,_457,_458,_459,_45a){var _45b=_452(null,{declaredClass:"esri.layers.FeatureType",constructor:function(json){if(json&&lang.isObject(json)){this.id=json.id;this.name=json.name;var _45c=json.symbol;if(_45c){this.symbol=_456.fromJson(_45c);}var _45d=json.domains,_45e,i;var _45f=this.domains={};for(_45e in _45d){if(_45d.hasOwnProperty(_45e)){var _460=_45d[_45e];switch(_460.type){case "range":_45f[_45e]=new _457(_460);break;case "codedValue":_45f[_45e]=new _458(_460);break;case "inherited":_45f[_45e]=new _459(_460);break;}}}var _461=json.templates;if(_461){var _462=this.templates=[];for(i=0;i<_461.length;i++){_462.push(new _45a(_461[i]));}}}},toJson:function(){var json={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _463,_464=this.domains,_465=this.templates,_466=_455.fixJson;if(_464){var _467=json.domains={};for(_463 in _464){if(_464.hasOwnProperty(_463)){_467[_463]=_464[_463]&&_464[_463].toJson();}}_466(_467);}if(_465){json.templates=_453.map(_465,function(_468){return _468.toJson();});}return _466(json);}});if(has("extend-esri")){lang.setObject("layers.FeatureType",_45b,_454);}return _45b;});},"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(_469,lang,_46a,has,_46b,_46c,_46d,_46e){var _46f=_469(null,{declaredClass:"esri.layers._TrackManager",constructor:function(_470){this.layer=_470;this.trackMap={};},initialize:function(map){this.map=map;var _471=this.layer,_472=_471.renderer.trackRenderer;if(_472&&(_471.geometryType==="esriGeometryPoint")){var _473=(this.container=new _46e._GraphicsLayer({id:_471.id+"_tracks",_child:true}));_473.loaded=true;_473.onLoad(_473);_473._setMap(map,_471._div);_473.setRenderer(_472);}},addFeatures:function(_474){var tkid,_475=this.trackMap,_476=this.layer,_477=_476._trackIdField;_46a.forEach(_474,function(_478){var _479=_478.attributes;tkid=_479[_477];var ary=(_475[tkid]=(_475[tkid]||[]));ary.push(_478);});var _47a=_476._startTimeField,_47b=_476.objectIdField;var _47c=function(a,b){var _47d=a.attributes[_47a],_47e=b.attributes[_47a];if(_47d===_47e){return (a.attributes[_47b]<b.attributes[_47b])?-1:1;}else{return (_47d<_47e)?-1:1;}};for(tkid in _475){_475[tkid].sort(_47c);}},drawTracks:function(){var _47f=this.container;if(!_47f){return;}var _480=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_481,_482=this.layer._trackIdField,_483;for(tkid in _480){ary=_480[tkid];path=[];for(i=ary.length-1;i>=0;i--){_481=ary[i].geometry;if(_481){path.push([_481.x,_481.y]);}}_483={};_483[_482]=tkid;if(path.length>0){_47f.add(new _46c(new _46d({paths:[path],spatialReference:sr}),null,_483));}}},moveLatestToFront:function(){_46a.forEach(this.getLatestObservations(),function(_484){var _485=_484._shape;_485&&_485._moveToFront();this._repaint(_484,null,true);},this.layer);},getLatestObservations:function(){var _486=[];if(!this.layer.renderer.latestObservationRenderer){return _486;}var _487=this.trackMap,tkid;for(tkid in _487){var ary=_487[tkid];_486.push(ary[ary.length-1]);}return _486;},clearTracks:function(){var _488=this.getLatestObservations();this.trackMap={};var _489=this.container;if(_489){_489.clear();}_46a.forEach(_488,function(_48a){this._repaint(_48a,null,true);},this.layer);},isLatestObservation:function(_48b){var _48c=this.layer._trackIdField;var _48d=this.trackMap[_48b.attributes[_48c]];if(_48d){return (_48d[_48d.length-1]===_48b);}return false;},destroy:function(){var _48e=this.container;if(_48e){_48e.clear();_48e._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",_46f,_46b);}return _46f;});},"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(_48f,lang,_490,has,_491,_492,_493,_494){var _495=_48f(null,{declaredClass:"esri.layers._GridLayout",constructor:function(_496,_497,_498,_499){this.origin=_496;this.cellWidth=_497.width;this.cellHeight=_497.height;this.mapWidth=_498.width;this.mapHeight=_498.height;this.srInfo=_499;},setResolution:function(_49a){this._resolution=(_49a.xmax-_49a.xmin)/this.mapWidth;if(this.srInfo){var _49b=Math.round((2*this.srInfo.valid[1])/this._resolution),_49c=Math.round(_49b/this.cellWidth);this._frameStats=[_49c,0,_49c-1];}},getCellCoordinates:function(_49d){var res=this._resolution,_49e=this.origin;return {row:Math.floor((_49e.y-_49d.y)/(this.cellHeight*res)),col:Math.floor((_49d.x-_49e.x)/(this.cellWidth*res))};},normalize:function(col){var _49f=this._frameStats;if(_49f){var _4a0=_49f[0],m180=_49f[1],p180=_49f[2];if(col<m180){col=col%_4a0;col=col<m180?col+_4a0:col;}else{if(col>p180){col=col%_4a0;}}}return col;},intersects:function(_4a1,_4a2){var _4a3=this.srInfo;if(_4a3){return _490.some(_4a2._getParts(_4a3),function(_4a4){return _4a1.intersects(_4a4.extent);});}else{return _4a1.intersects(_4a2);}},getCellExtent:function(row,col){var res=this._resolution,_4a5=this.origin,_4a6=this.cellWidth,_4a7=this.cellHeight;return new _493((col*_4a6*res)+_4a5.x,_4a5.y-((row+1)*_4a7*res),((col+1)*_4a6*res)+_4a5.x,_4a5.y-(row*_4a7*res),new _492(_4a5.spatialReference.toJson()));},getLatticeID:function(_4a8){var _4a9=this.getCellCoordinates({x:_4a8.xmin,y:_4a8.ymax}),_4aa=this.getCellCoordinates({x:_4a8.xmax,y:_4a8.ymin}),_4ab=_4a9.row,_4ac=_4aa.row,_4ad=this.normalize(_4a9.col),_4ae=this.normalize(_4aa.col);return _4ab+"_"+_4ac+"_"+_4ad+"_"+_4ae;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_4af,_4b0){var _4b1=this.getCellCoordinates({x:_4af.xmin,y:_4af.ymax}),_4b2=this.getCellCoordinates({x:_4af.xmax,y:_4af.ymin}),_4b3=_4b1.row,_4b4=_4b2.row,_4b5=_4b1.col,_4b6=_4b2.col,_4b7=[],i,j,nj,_4b8=[],_4b9=[],len,xmin,xmax,ymin,ymax,_4ba=[],_4bb,_4bc;for(i=_4b3;i<=_4b4;i++){for(j=_4b5;j<=_4b6;j++){nj=this.normalize(j);_4af=this.getCellExtent(i,nj);_4b7.push({row:i,col:nj,extent:_4af,resolution:this._resolution});if(_4b0){_4b8.push(_4af.xmin,_4af.xmax);_4b9.push(_4af.ymin,_4af.ymax);}}}_4b5=this.normalize(_4b5);_4b6=this.normalize(_4b6);_4b8.sort(this.sorter);_4b9.sort(this.sorter);len=_4b8.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_4b8[i]===_4b8[i+1]){_4b8.splice(i,1);}}}len=_4b9.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_4b9[i]===_4b9[i+1]){_4b9.splice(i,1);}}}if(_4b8.length&&_4b9.length){xmin=_4b8[0];xmax=_4b8[_4b8.length-1];ymin=_4b9[0];ymax=_4b9[_4b9.length-1];len=_4b8.length;for(i=0;i<len;i++){_4ba.push([[_4b8[i],ymax],[_4b8[i],ymin]]);}len=_4b9.length;for(i=0;i<len;i++){_4ba.push([[xmin,_4b9[i]],[xmax,_4b9[i]]]);}_4bb=new _494({paths:_4ba,spatialReference:this.origin.spatialReference.toJson()});_4bc=_4b3+"_"+_4b4+"_"+_4b5+"_"+_4b6;_4b7.push({latticeID:_4bc,lattice:_4bb,resolution:this._resolution});}return {minRow:_4b3,maxRow:_4b4,minCol:_4b5,maxCol:_4b6,cells:_4b7};}});if(has("extend-esri")){lang.setObject("layers._GridLayout",_495,_491);}return _495;});},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(lang,_4bd,_4be){var _4bf={};lang.setObject("dojo.data.util.simpleFetch",_4bf);_4bf.errorHandler=function(_4c0,_4c1){if(_4c1.onError){var _4c2=_4c1.scope||_4bd.global;_4c1.onError.call(_4c2,_4c0,_4c1);}};_4bf.fetchHandler=function(_4c3,_4c4){var _4c5=_4c4.abort||null,_4c6=false,_4c7=_4c4.start?_4c4.start:0,_4c8=(_4c4.count&&(_4c4.count!==Infinity))?(_4c7+_4c4.count):_4c3.length;_4c4.abort=function(){_4c6=true;if(_4c5){_4c5.call(_4c4);}};var _4c9=_4c4.scope||_4bd.global;if(!_4c4.store){_4c4.store=this;}if(_4c4.onBegin){_4c4.onBegin.call(_4c9,_4c3.length,_4c4);}if(_4c4.sort){_4c3.sort(_4be.createSortFunction(_4c4.sort,this));}if(_4c4.onItem){for(var i=_4c7;(i<_4c3.length)&&(i<_4c8);++i){var item=_4c3[i];if(!_4c6){_4c4.onItem.call(_4c9,item,_4c4);}}}if(_4c4.onComplete&&!_4c6){var _4ca=null;if(!_4c4.onItem){_4ca=_4c3.slice(_4c7,_4c8);}_4c4.onComplete.call(_4c9,_4ca,_4c4);}};_4bf.fetch=function(_4cb){_4cb=_4cb||{};if(!_4cb.store){_4cb.store=this;}this._fetchItems(_4cb,lang.hitch(this,"fetchHandler"),lang.hitch(this,"errorHandler"));return _4cb;};return _4bf;});},"dijit/form/ComboBoxMixin":function(){require({cache:{"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n"}});define("dijit/form/ComboBoxMixin",["dojo/_base/declare","dojo/_base/Deferred","dojo/_base/kernel","dojo/_base/lang","dojo/store/util/QueryResults","./_AutoCompleterMixin","./_ComboBoxMenu","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(_4cc,_4cd,_4ce,lang,_4cf,_4d0,_4d1,_4d2,_4d3){return _4cc("dijit.form.ComboBoxMixin",[_4d2,_4d0],{dropDownClass:_4d1,hasDownArrow:true,templateString:_4d3,baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},_setHasDownArrowAttr:function(val){this._set("hasDownArrow",val);this._buttonNode.style.display=val?"":"none";},_showResultList:function(){this.displayMessage("");this.inherited(arguments);},_setStoreAttr:function(_4d4){if(!_4d4.get){lang.mixin(_4d4,{_oldAPI:true,get:function(id){var _4d5=new _4cd();this.fetchItemByIdentity({identity:id,onItem:function(_4d6){_4d5.resolve(_4d6);},onError:function(_4d7){_4d5.reject(_4d7);}});return _4d5.promise;},query:function(_4d8,_4d9){var _4da=new _4cd(function(){_4db.abort&&_4db.abort();});_4da.total=new _4cd();var _4db=this.fetch(lang.mixin({query:_4d8,onBegin:function(_4dc){_4da.total.resolve(_4dc);},onComplete:function(_4dd){_4da.resolve(_4dd);},onError:function(_4de){_4da.reject(_4de);}},_4d9));return _4cf(_4da);}});}this._set("store",_4d4);},postMixInProperties:function(){var _4df=this.params.store||this.store;if(_4df){this._setStoreAttr(_4df);}this.inherited(arguments);if(!this.params.store&&!this.store._oldAPI){var _4e0=this.declaredClass;lang.mixin(this.store,{getValue:function(item,attr){_4ce.deprecated(_4e0+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly","","2.0");return item[attr];},getLabel:function(item){_4ce.deprecated(_4e0+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly","","2.0");return item.name;},fetch:function(args){_4ce.deprecated(_4e0+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");var shim=["dojo/data/ObjectStore"];require(shim,lang.hitch(this,function(_4e1){new _4e1({objectStore:this}).fetch(args);}));}});}}});});},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(lang){var _4e2={};lang.setObject("dojo.data.util.sorter",_4e2);_4e2.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;};_4e2.createSortFunction=function(_4e3,_4e4){var _4e5=[];function _4e6(attr,dir,comp,s){return function(_4e7,_4e8){var a=s.getValue(_4e7,attr);var b=s.getValue(_4e8,attr);return dir*comp(a,b);};};var _4e9;var map=_4e4.comparatorMap;var bc=_4e2.basicComparator;for(var i=0;i<_4e3.length;i++){_4e9=_4e3[i];var attr=_4e9.attribute;if(attr){var dir=(_4e9.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_4e5.push(_4e6(attr,dir,comp,_4e4));}}return function(rowA,rowB){var i=0;while(i<_4e5.length){var ret=_4e5[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};return _4e2;});},"dojox/date/islamic":function(){define("dojox/date/islamic",["..","dojo/_base/lang","dojo/date","./islamic/Date"],function(_4ea,lang,dd,_4eb){var _4ec=lang.getObject("date.islamic",true,_4ea);_4ec.getDaysInMonth=function(_4ed){return _4ed.getDaysInIslamicMonth(_4ed.getMonth(),_4ed.getFullYear());};_4ec.compare=function(_4ee,_4ef,_4f0){if(_4ee instanceof _4eb){_4ee=_4ee.toGregorian();}if(_4ef instanceof _4eb){_4ef=_4ef.toGregorian();}return dd.compare.apply(null,arguments);};_4ec.add=function(date,_4f1,_4f2){var _4f3=new _4eb(date);switch(_4f1){case "day":_4f3.setDate(date.getDate()+_4f2);break;case "weekday":var day=date.getDay();if(((day+_4f2)<5)&&((day+_4f2)>0)){_4f3.setDate(date.getDate()+_4f2);}else{var _4f4=0,_4f5=0;if(day==5){day=4;_4f5=(_4f2>0)?-1:1;}else{if(day==6){day=4;_4f5=(_4f2>0)?-2:2;}}var add=(_4f2>0)?(5-day-1):-day;var _4f6=_4f2-add;var div=parseInt(_4f6/5);if(_4f6%5!=0){_4f4=(_4f2>0)?2:-2;}_4f4=_4f4+div*7+_4f6%5+add;_4f3.setDate(date.getDate()+_4f4+_4f5);}break;case "year":_4f3.setFullYear(date.getFullYear()+_4f2);break;case "week":_4f2*=7;_4f3.setDate(date.getDate()+_4f2);break;case "month":var _4f7=date.getMonth();_4f3.setMonth(_4f7+_4f2);break;case "hour":_4f3.setHours(date.getHours()+_4f2);break;case "minute":_4f3._addMinutes(_4f2);break;case "second":_4f3._addSeconds(_4f2);break;case "millisecond":_4f3._addMilliseconds(_4f2);break;}return _4f3;};_4ec.difference=function(_4f8,_4f9,_4fa){_4f9=_4f9||new _4eb();_4fa=_4fa||"day";var _4fb=_4f9.getFullYear()-_4f8.getFullYear();var _4fc=1;switch(_4fa){case "weekday":var days=Math.round(_4ec.difference(_4f8,_4f9,"day"));var _4fd=parseInt(_4ec.difference(_4f8,_4f9,"week"));var mod=days%7;if(mod==0){days=_4fd*5;}else{var adj=0;var aDay=_4f8.getDay();var bDay=_4f9.getDay();_4fd=parseInt(days/7);mod=days%7;var _4fe=new _4eb(_4f8);_4fe.setDate(_4fe.getDate()+(_4fd*7));var _4ff=_4fe.getDay();if(days>0){switch(true){case aDay==5:adj=-1;break;case aDay==6:adj=0;break;case bDay==5:adj=-1;break;case bDay==6:adj=-2;break;case (_4ff+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==5:adj=0;break;case aDay==6:adj=1;break;case bDay==5:adj=2;break;case bDay==6:adj=1;break;case (_4ff+mod)<0:adj=2;}}}days+=adj;days-=(_4fd*2);}_4fc=days;break;case "year":_4fc=_4fb;break;case "month":var _500=(_4f9.toGregorian()>_4f8.toGregorian())?_4f9:_4f8;var _501=(_4f9.toGregorian()>_4f8.toGregorian())?_4f8:_4f9;var _502=_500.getMonth();var _503=_501.getMonth();if(_4fb==0){_4fc=_500.getMonth()-_501.getMonth();}else{_4fc=12-_503;_4fc+=_502;var i=_501.getFullYear()+1;var e=_500.getFullYear();for(i;i<e;i++){_4fc+=12;}}if(_4f9.toGregorian()<_4f8.toGregorian()){_4fc=-_4fc;}break;case "week":_4fc=parseInt(_4ec.difference(_4f8,_4f9,"day")/7);break;case "day":_4fc/=24;case "hour":_4fc/=60;case "minute":_4fc/=60;case "second":_4fc/=1000;case "millisecond":_4fc*=_4f9.toGregorian().getTime()-_4f8.toGregorian().getTime();}return Math.round(_4fc);};return _4ec;});},"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(_504,_505,_506,_507,keys,_508,_509,_50a,lang){return _508("dijit._KeyNavContainer",[_506,_505],{tabIndex:"0",connectKeyNavHandlers:function(_50b,_50c){var _50d=(this._keyNavCodes={});var prev=lang.hitch(this,"focusPrev");var next=lang.hitch(this,"focusNext");_507.forEach(_50b,function(code){_50d[code]=prev;});_507.forEach(_50c,function(code){_50d[code]=next;});_50d[keys.HOME]=lang.hitch(this,"focusFirstChild");_50d[keys.END]=lang.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){_504.deprecated("startupKeyNavChildren() call no longer needed","","2.0");},startup:function(){this.inherited(arguments);_507.forEach(this.getChildren(),lang.hitch(this,"_startupChild"));},addChild:function(_50e,_50f){this.inherited(arguments);this._startupChild(_50e);},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(_510,last){if(!_510){return;}if(this.focusedChild&&_510!==this.focusedChild){this._onChildBlur(this.focusedChild);}_510.set("tabIndex",this.tabIndex);_510.focus(last?"end":"start");this._set("focusedChild",_510);},_startupChild:function(_511){_511.set("tabIndex","-1");this.connect(_511,"_onFocus",function(){_511.set("tabIndex",this.tabIndex);});this.connect(_511,"_onBlur",function(){_511.set("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode||this.focusedChild){return;}this.focusFirstChild();_50a.set(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){_50a.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();_509.stop(evt);}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1);},_getNextFocusableChild:function(_512,dir){if(_512){_512=this._getSiblingOfChild(_512,dir);}var _513=this.getChildren();for(var i=0;i<_513.length;i++){if(!_512){_512=_513[(dir>0)?0:(_513.length-1)];}if(_512.isFocusable()){return _512;}_512=this._getSiblingOfChild(_512,dir);}return null;}});});},"esri/layers/SnapshotMode":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/SpatialReference","esri/tasks/query","esri/layers/RenderMode"],function(_514,lang,has,_515,_516,_517,_518){var _519=_514([_518],{declaredClass:"esri.layers._SnapshotMode",constructor:function(_51a){this.featureLayer=_51a;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(_51b){var _51c=this.featureLayer,_51d=_51c.objectIdField,oid=_51b.attributes[_51d];this._addFeatureIIf(oid,_51b);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _51e=this.featureLayer;if(_51e._collection){_51e._fireUpdateStart();_51e._refresh(true);_51e._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_51f){var id="_"+_51f.name+_51f.layerId+_51f._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _520=this.featureLayer;if(_520._collection){return;}_520._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_521=this.featureLayer,_522=_521.getDefinitionExpression();var _523=new _517();_523.outFields=_521.getOutFields();_523.where=_522||"1=1";_523.returnGeometry=true;_523.outSpatialReference=new _516(map.spatialReference.toJson());_523.timeExtent=_521.getTimeDefinition();_523.maxAllowableOffset=_521._maxOffset;if(_521._ts){_523._ts=(new Date()).getTime();}var _524;if(_521._usePatch){_524=this._getRequestId(_521);this._cancelPendingRequest(null,_524);}_521._task.execute(_523,this._drawFeatures,this._queryErrorHandler,_524);},_drawFeatures:function(_525){this._purgeRequests();var _526=_525.features,_527=this.featureLayer,_528=_527.objectIdField,i,len=_526.length,_529,oid;for(i=0;i<len;i++){_529=_526[i];oid=_529.attributes[_528];this._addFeatureIIf(oid,_529);this._incRefCount(oid);}this._applyTimeFilter(true);_527._fireUpdateEnd(null,_525.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_525.exceededTransferLimit){_527.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _52a=this.featureLayer;_52a._errorHandler(err);_52a._fireUpdateEnd(err);}});if(has("extend-esri")){lang.setObject("layers._SnapshotMode",_519,_515);}return _519;});},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(dojo,lang,_52b,_52c){var _52d={};lang.setObject("dojo.colors",_52d);var _52e=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=_52b.fromRgb=function(_52f,obj){var m=_52f.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=_52c.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return _52b.fromArray(a,obj);}return _52b.fromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_52e(m1,m2,H+1/3)*256,_52e(m1,m2,H)*256,_52e(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return _52b.fromArray(a,obj);}}return null;};var _530=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};_52b.prototype.sanitize=function(){var t=this;t.r=Math.round(_530(t.r,0,255));t.g=Math.round(_530(t.g,0,255));t.b=Math.round(_530(t.b,0,255));t.a=_530(t.a,0,1);return this;};_52d.makeGrey=_52b.makeGrey=function(g,a){return _52b.fromArray([g,g,g,a]);};lang.mixin(_52b.named,{"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"blanchedalmond":[255,235,205],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"oldlace":[253,245,230],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"whitesmoke":[245,245,245],"yellowgreen":[154,205,50]});return _52b;});},"url:esri/dijit/editing/templates/AttachmentEditor.html":"<div class=\"attachmentEditor\">\r\n    <br />\r\n    <div>\r\n        <b>${NLS_attachments}</b>\r\n        <hr />\r\n        <div dojoAttachPoint=\"_attachmentError\" style='color:red;display:none'></div>\r\n        <br />\r\n        <span dojoAttachPoint='_attachmentList' style='word-wrap: break-word;'></span>\r\n        <br><br>\r\n        <form dojoAttachPoint='_uploadForm'> ${NLS_add}:&nbsp;&nbsp;<input type='file' name='attachment' dojoAttachPoint='_uploadField' /> </form>\r\n    </div>\r\n</div>","esri/layers/SelectionMode":function(){define("esri/layers/SelectionMode",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/layers/RenderMode"],function(_531,lang,has,_532,_533){var _534=_531([_533],{declaredClass:"esri.layers._SelectionMode",constructor:function(_535){this.featureLayer=_535;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",_534,_532);}return _534;});},"esri/dijit/AttributeInspector":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/sniff","dojo/_base/kernel","dojo/has","dojo/dom-style","dojo/dom-construct","esri/kernel","esri/lang","esri/domUtils","esri/layers/InheritedDomain","esri/layers/FeatureLayer","dojo/i18n!esri/nls/jsapi","dojo/fx","dojox/gfx","dijit/_Widget","dijit/_Templated","dijit/Editor","dijit/_editor/plugins/LinkDialog","dijit/_editor/plugins/TextColor","esri/dijit/_EventedWidget","esri/dijit/editing/AttachmentEditor","esri/dijit/editing/Util","esri/tasks/query","dijit/form/DateTextBox","dijit/form/TextBox","dijit/form/NumberTextBox","dijit/form/FilteringSelect","dijit/form/NumberSpinner","dijit/form/Button","dijit/form/SimpleTextarea","dijit/Tooltip","dojo/data/ItemFileReadStore","dojox/date/islamic","dojox/date/islamic/Date","dojox/date/islamic/locale","dojo/text!esri/dijit/templates/AttributeInspector.html"],function(_536,lang,_537,_538,_539,_53a,has,_53b,_53c,_53d,_53e,_53f,_540,_541,_542,fx,gfx,_543,_544,_545,_546,_547,_548,_549,Util,_54a,_54b,_54c,_54d,_54e,_54f,_550,_551,_552,_553,_554,_555,_556,_557){var ATI=_536([_548,_543,_544],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:true,templateString:_557,_navMessage:"( ${idx} ${of} ${numFeatures} )",onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},_eventMap:{"update":true,"delete":["feature"],"attribute-change":["feature","fieldName","fieldValue"],"next":["feature"],"reset":true,"cancel":true},constructor:function(_558,_559){lang.mixin(this,_542.widgets.attributeInspector);_558=_558||{};if(!_558.featureLayer&&!_558.layerInfos){console.error("esri.AttributeInspector: please provide correct parameter in the constructor");}this._datePackage=this._getDatePackage(_558);this._layerInfos=_558.layerInfos||[{featureLayer:_558.featureLayer,options:_558.options||[]}];this._aiConnects=[];this._selection=[];this._toolTips=[];this._numFeatures=0;this._featureIdx=0;this._currentLInfo=null;this._currentFeature=null;this._hideNavButtons=_558.hideNavButtons||false;},postCreate:function(){if(_537.every(this._layerInfos,function(_55a){return _55a.featureLayer.loaded;})){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();}else{var _55b=this._layerInfos.length;_537.forEach(this._layerInfos,function(_55c){var _55d=_55c.featureLayer;if(_55d.loaded){_55b--;}else{var _55e=_538.connect(_55d,"onLoad",this,function(_55f){_538.disconnect(_55e);_55e=null;_55b--;if(!_55b){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();}});}},this);}},destroy:function(){this._destroyAttributeTable();_537.forEach(this._aiConnects,_538.disconnect);delete this._aiConnects;if(this._attachmentEditor){this._attachmentEditor.destroy();delete this._attachmentEditor;}delete this._layerInfos;this._selection=this._currentFeature=this._currentLInfo=this._attributes=this._layerInfos=null;this.inherited(arguments);},refresh:function(){this._updateSelection();},first:function(){this.onFirstFeature();},last:function(){this.onLastFeature();},next:function(){this.onNextFeature();},previous:function(){this.onPreviousFeature();},showFeature:function(_560,_561){if(_561){this._createOnlyFirstTime=true;}this._updateSelection([_560],_561);this._updateUI();},onLayerSelectionChange:function(_562,_563,_564){this._createOnlyFirstTime=false;this._featureIdx=(_564===_541.SELECTION_NEW)?0:this._featureIdx;this._updateSelection();this._updateUI();},onLayerSelectionClear:function(){if(!this._selection||this._selection.length<=0){return;}this._numFeatures=0;this._featureIdx=0;this._selection=[];this._currentFeature=null;this._currentLInfo=null;this._updateUI();},onLayerEditsComplete:function(_565,adds,_566,_567){_567=_567||[];if(_567.length){var _568=this._selection;var _569=_565.featureLayer.objectIdField;_537.forEach(_567,lang.hitch(this,function(del){_537.some(_568,lang.hitch(this,function(item,idx){if(item.attributes[_569]!==del.objectId){return false;}this._selection.splice(idx,1);return true;}));}));}adds=adds||[];if(adds.length){this._selection=Util.findFeatures(adds,_565.featureLayer);this._featureIdx=0;}var _56a=this._numFeatures=this._selection?this._selection.length:0;if(adds.length){var _56b=_56a?this._selection[this._featureIdx]:null;if(_56b){var _56c=_56b.getLayer();var _56d=_56c.getEditCapabilities();if(!(_56d.canCreate&&!_56d.canUpdate)){this._showFeature(_56b);}}}this._updateUI();},onFieldValueChange:function(_56e,_56f){_56f=(typeof _56f==="undefined")?null:_56f;var _570=_56e.field;if(_570.type==="esriFieldTypeDate"){_56f=(_56f&&_56f.getTime)?_56f.getTime():(_56f&&_56f.toGregorian?_56f.toGregorian().getTime():_56f);}if(this._currentFeature.attributes[_570.name]===_56f){return;}var _571=this._currentLInfo;var _572=this._currentFeature;var _573=_570.name;if(_573===_571.typeIdField){var type=this._findFirst(_571.types,"id",_56f);var _574=_571.fieldInfos;_537.forEach(_574,function(_575){_570=_575.field;if(!_570||_570.name===_571.typeIdField){return;}var node=_575.dijit;var _576=this._setFieldDomain(node,type,_570);if(_576&&node){this._setValue(node,_572.attributes[_570.name]+"");if(node.isValid()===false){this._setValue(node,null);}}},this);}this.onAttributeChange(_572,_573,_56f);},onDeleteBtn:function(evt){this._deleteFeature();},onNextFeature:function(evt){this._onNextFeature(1);},onPreviousFeature:function(evt){this._onNextFeature(-1);},onFirstFeature:function(evt){this._onNextFeature(this._featureIdx*-1);},onLastFeature:function(evt){this._onNextFeature((this._numFeatures-1)-this._featureIdx);},_initLayerInfos:function(){var _577=this._layerInfos;this._editorTrackingInfos={};_537.forEach(_577,this._initLayerInfo,this);},_initLayerInfo:function(_578){var _579=_578.featureLayer,_57a,_57b;this._userIds={};var _57c=_579.id;if(_579.credential){this._userIds[_57c]=_579.credential.userId;}if(_578.userId){this._userIds[_57c]=_578.userId;}this._connect(_579,"onSelectionComplete",lang.hitch(this,"onLayerSelectionChange",_578));this._connect(_579,"onSelectionClear",lang.hitch(this,"onLayerSelectionClear",_578));this._connect(_579,"onEditsComplete",lang.hitch(this,"onLayerEditsComplete",_578));_578.showAttachments=_579.hasAttachments?(_53e.isDefined(_578.showAttachments)?_578.showAttachments:true):false;_578.hideFields=_578.hideFields||[];_578.htmlFields=_578.htmlFields||[];_578.isEditable=_579.isEditable()?(_53e.isDefined(_578.isEditable)?_578.isEditable:true):false;_578.typeIdField=_579.typeIdField;_578.layerId=_579.id;_578.types=_579.types;if(_579.globalIdField){_57a=this._findFirst(_578.fieldInfos,"fieldName",_579.globalIdField);if(!_57a&&!_578.showGlobalID){_578.hideFields.push(_579.globalIdField);}}_57b=this._findFirst(_578.fieldInfos,"fieldName",_579.objectIdField);if(!_57b&&!_578.showObjectID){_578.hideFields.push(_579.objectIdField);}var _57d=this._getFields(_578.featureLayer);if(!_57d){return;}var _57e=_578.fieldInfos||[];_57e=_537.map(_57e,function(_57f){return lang.mixin({},_57f);});if(!_57e.length){_57d=_537.filter(_57d,lang.hitch(this,function(_580){return !this._isInFields(_580.name,_578.hideFields);}));_578.fieldInfos=_537.map(_57d,lang.hitch(this,function(_581){var _582=(this._isInFields(_581.name,_578.htmlFields)?ATI.STRING_FIELD_OPTION_RICHTEXT:ATI.STRING_FIELD_OPTION_TEXTBOX);return {"fieldName":_581.name,"field":_581,"stringFieldOption":_582};}));}else{_578.fieldInfos=_537.filter(_537.map(_57e,lang.hitch(this,function(_583){var _584=_583.stringFieldOption||(this._isInFields(_583.fieldName,_578.htmlFields)?ATI.STRING_FIELD_OPTION_RICHTEXT:ATI.STRING_FIELD_OPTION_TEXTBOX);return lang.mixin(_583,{"field":this._findFirst(_57d,"name",_583.fieldName),"stringFieldOption":_584});})),"return item.field;");}if(_578.showGlobalID&&!_57a){_57e.push(this._findFirst(_57d,"name",_579.globalIdField));}if(_578.showObjectID&&!_57b){_57e.push(this._findFirst(_57d,"name",_579.objectIdField));}var _585=[];if(_579.editFieldsInfo){if(_579.editFieldsInfo.creatorField){_585.push(_579.editFieldsInfo.creatorField);}if(_579.editFieldsInfo.creationDateField){_585.push(_579.editFieldsInfo.creationDateField);}if(_579.editFieldsInfo.editorField){_585.push(_579.editFieldsInfo.editorField);}if(_579.editFieldsInfo.editDateField){_585.push(_579.editFieldsInfo.editDateField);}}this._editorTrackingInfos[_579.id]=_585;},_createAttachmentEditor:function(){this._attachmentEditor=null;var _586=this._layerInfos;var _587=_537.filter(_586,function(item){return item.showAttachments;});if(!_587||!_587.length){return;}this._attachmentEditor=new _549({"class":"atiAttachmentEditor"},this.attachmentEditor);this._attachmentEditor.startup();},_setCurrentLInfo:function(_588){var _589=this._currentLInfo?this._currentLInfo.featureLayer:null;var _58a=_588.featureLayer;if(_589&&_589.id===_58a.id&&!_589.ownershipBasedAccessControlForFeatures){var _58b=_58a.getEditCapabilities();if(!(_58b.canCreate&&!_58b.canUpdate)){return;}}this._currentLInfo=_588;this._createTable();},_updateSelection:function(_58c,_58d){this._selection=_58c||[];var _58e=this._layerInfos;_537.forEach(_58e,this._getSelection,this);var _58f=this._numFeatures=this._selection.length;var _590=_58f?this._selection[this._featureIdx]:null;this._showFeature(_590,_58d);},_getSelection:function(_591){var _592=_591.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(_592);},_updateUI:function(){var _593=this._numFeatures;var _594=this._currentLInfo;this.layerName.innerHTML=(!_594||_593===0)?this.NLS_noFeaturesSelected:(_594.featureLayer?_594.featureLayer.name:"");_53b.set(this.attributeTable,"display",_593?"":"none");_53b.set(this.editButtons,"display",_593?"":"none");_53b.set(this.navButtons,"display",(!this._hideNavButtons&&(_593>1)?"":"none"));this.navMessage.innerHTML=_53e.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);if(this._attachmentEditor){_53b.set(this._attachmentEditor.domNode,"display",((_594&&_594.showAttachments)&&_593)?"":"none");}var _595=((_594&&_594.showDeleteButton===false)||!this._canDelete)?false:true;_53b.set(this.deleteBtn.domNode,"display",_595?"":"none");if(this.domNode.parentNode&&this.domNode.parentNode.scrollTop>0){this.domNode.parentNode.scrollTop=0;}},_onNextFeature:function(_596){this._featureIdx+=_596;if(this._featureIdx<0){this._featureIdx=this._numFeatures-1;}else{if(this._featureIdx>=this._numFeatures){this._featureIdx=0;}}var _597=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(_597);this._updateUI();this.onNext(_597);},_deleteFeature:function(){this.onDelete(this._currentFeature);},_showFeature:function(_598,_599){if(!_598){return;}this._currentFeature=_598;var _59a=_599?_599:_598.getLayer();var _59b=_59a.getEditCapabilities({feature:_598,userId:this._userIds[_59a.id]});this._canUpdate=_59b.canUpdate;this._canDelete=_59b.canDelete;var _59c=this._getLInfoFromFeatureLayer(_59a);if(!_59c){return;}this._setCurrentLInfo(_59c);var _59d=_598.attributes;var type=this._findFirst(_59c.types,"id",_59d[_59c.typeIdField]);var node,_59e=null;var _59f=_59c.fieldInfos;_537.forEach(_59f,function(_5a0){_59e=_5a0.field;node=_5a0.dijit||null;if(!node){return;}var _5a1=this._setFieldDomain(node,type,_59e);var _5a2=_59d[_59e.name];_5a2=(_5a2&&_5a1&&_5a1.codedValues&&_5a1.codedValues.length)?(_5a1.codedValues[_5a2]?_5a1.codedValues[_5a2].name:_5a2):_5a2;if(!_53e.isDefined(_5a2)){_5a2="";}if(node.declaredClass==="dijit.form.DateTextBox"){_5a2=(_5a2==="")?null:new Date(_5a2);}else{if(node.declaredClass==="dijit.form.FilteringSelect"){node._lastValueReported=null;_5a2=_59d[_59e.name]+"";}}try{this._setValue(node,_5a2);if(node.declaredClass==="dijit.form.FilteringSelect"&&node.isValid()===false){this._setValue(node,null);}}catch(error){node.set("displayedValue",this.NLS_errorInvalid,false);}},this);if(this._attachmentEditor&&_59c.showAttachments){this._attachmentEditor.showAttachments(this._currentFeature);}var _5a3=_59a.getEditSummary(_598);if(_5a3){this.editorTrackingInfoDiv.innerHTML=_5a3;_53f.show(this.editorTrackingInfoDiv);}else{_53f.hide(this.editorTrackingInfoDiv);}},_setFieldDomain:function(node,type,_5a4){if(!node){return null;}var _5a5=_5a4.domain;if(type&&type.domains){if(type.domains[_5a4.name]&&type.domains[_5a4.name] instanceof _540===false){_5a5=type.domains[_5a4.name];}}if(!_5a5){return null;}if(_5a5.codedValues&&_5a5.codedValues.length>0){node.set("store",this._toStore(_537.map(_5a5.codedValues,function(item){return {id:item.code+="",name:item.name};})));this._setValue(node,_5a5.codedValues[0].code);}else{node.constraints={min:_53e.isDefined(_5a5.minValue)?_5a5.minValue:Number.MIN_VALUE,max:_53e.isDefined(_5a5.maxValue)?_5a5.maxValue:Number.MAX_VALUE};this._setValue(node,node.constraints.min);}return _5a5;},_setValue:function(node,_5a6){if(!node.set){return;}node._onChangeActive=false;node.set("value",_5a6,true);node._onChangeActive=true;},_getFields:function(_5a7){var _5a8=_5a7._getOutFields();if(!_5a8){return null;}var _5a9=_5a7.fields;return (_5a8=="*")?_5a9:_537.filter(_537.map(_5a8,lang.hitch(this,"_findFirst",_5a9,"name")),_53e.isDefined);},_isInFields:function(_5aa,_5ab){if(!_5aa||!_5ab&&!_5ab.length){return false;}return _537.some(_5ab,function(name){return name.toLowerCase()===_5aa.toLowerCase();});},_findFirst:function(_5ac,_5ad,_5ae){var _5af=_537.filter(_5ac,function(item){return item.hasOwnProperty(_5ad)&&item[_5ad]===_5ae;});return (_5af&&_5af.length)?_5af[0]:null;},_getLInfoFromFeatureLayer:function(_5b0){var _5b1=_5b0?_5b0.id:null;return this._findFirst(this._layerInfos,"layerId",_5b1);},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=_53c.create("table",{cellspacing:"0",cellpadding:"0"},this.attributeTable);var _5b2=_53c.create("tbody",null,this._attributes);var _5b3=this._currentFeature;var _5b4=this._currentLInfo;var type=this._findFirst(_5b4.types,"id",_5b3.attributes[_5b4.typeIdField]);var _5b5=_5b4.fieldInfos;_537.forEach(_5b5,lang.hitch(this,"_createField",type,_5b2),this);this._createOnlyFirstTime=false;},_createField:function(type,_5b6,_5b7){var _5b8=this._currentLInfo;var _5b9=_5b7.field;if(this._isInFields(_5b9.name,_5b8.hideFields)){return;}if(this._isInFields(_5b9.name,this._editorTrackingInfos[_5b8.featureLayer.id])){return;}var node=_53c.create("tr",null,_5b6);var td=_53c.create("td",{innerHTML:_5b7.label||_5b9.alias||_5b9.name,"class":"atiLabel"},node);td=_53c.create("td",null,node);var _5ba=null;var _5bb=false;if(_5b7.customField){_53c.place(_5b7.customField.domNode||_5b7.customField,_53c.create("div",null,td),"first");_5ba=_5b7.customField;}else{if(_5b8.isEditable===false||_5b9.editable===false||_5b7.isEditable===false||_5b9.type==="esriFieldTypeOID"||_5b9.type==="esriFieldTypeGlobalID"||(!this._canUpdate&&!this._createOnlyFirstTime)){_5bb=true;}}if(!_5ba&&(_5b8.typeIdField&&_5b9.name.toLowerCase()==_5b8.typeIdField.toLowerCase())){_5ba=this._createTypeField(_5b9,_5b7,td);}else{if(!_5ba){_5ba=this._createDomainField(_5b9,_5b7,type,td);}}if(!_5ba){switch(_5b9.type){case "esriFieldTypeString":_5ba=this._createStringField(_5b9,_5b7,td);break;case "esriFieldTypeDate":_5ba=this._createDateField(_5b9,_5b7,td);break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":_5ba=this._createIntField(_5b9,_5b7,td);break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":_5ba=this._createFltField(_5b9,_5b7,td);break;default:_5ba=this._createStringField(_5b9,_5b7,td);break;}}if(_5b7.tooltip&&_5b7.tooltip.length){this._toolTips.push(new _552({connectId:[_5ba.id],label:_5b7.tooltip}));}_5ba.onChange=lang.hitch(this,"onFieldValueChange",_5b7);_5ba.set("disabled",_5bb);_5b7.dijit=_5ba;},_createTypeField:function(_5bc,_5bd,node){return new _54e({"class":"atiField",name:_5bc.alias||_5bc.name,store:this._toStore(_537.map(this._currentLInfo.types,function(item){return {id:item.id,name:item.name};})),searchAttr:"name"},_53c.create("div",null,node));},_createDomainField:function(_5be,_5bf,type,node){var _5c0=_5be.domain;if(type&&type.domains){if(type.domains[_5be.name]&&type.domains[_5be.name] instanceof _540===false){_5c0=type.domains[_5be.name];}}if(!_5c0){return null;}if(_5c0.codedValues){return new _54e({"class":"atiField",name:_5be.alias||_5be.name,searchAttr:"name",required:_5be.nullable||false},_53c.create("div",null,node));}else{return new _54f({"class":"atiField"},_53c.create("div",null,node));}},_createStringField:function(_5c1,_5c2,node){var _5c3={"class":"atiField",trim:true,maxLength:_5c1.length};if(_5c2.stringFieldOption===ATI.STRING_FIELD_OPTION_TEXTAREA){_5c3["class"]+=" atiTextAreaField";return new _551(_5c3,_53c.create("div",null,node));}else{if(_5c2.stringFieldOption===ATI.STRING_FIELD_OPTION_RICHTEXT){_5c3["class"]+=" atiRichTextField";_5c3.height="100%";_5c3.width="100%";_5c3.plugins=_5c2.richTextPlugins||["bold","italic","underline","foreColor","hiliteColor","|","justifyLeft","justifyCenter","justifyRight","justifyFull","|","insertOrderedList","insertUnorderedList","indent","outdent","|","createLink"];return new _545(_5c3,_53c.create("div",null,node));}else{return new _54c(_5c3,_53c.create("div",null,node));}}},_createDateField:function(_5c4,_5c5,node){var _5c6={"class":"atiField","trim":true};if(this._datePackage){_5c6.datePackage=this._datePackage;}return new _54b(_5c6,_53c.create("div",null,node));},_createIntField:function(_5c7,_5c8,node){return new _54d({"class":"atiField",constraints:{places:0},invalidMessage:this.NLS_validationInt,trim:true},_53c.create("div",null,node));},_createFltField:function(_5c9,_5ca,node){return new _54d({"class":"atiField",trim:true,invalidMessage:this.NLS_validationFlt},_53c.create("div",null,node));},_toStore:function(_5cb){return new _553({data:{identifier:"id",label:"name",items:_5cb}});},_connect:function(node,evt,func){this._aiConnects.push(_538.connect(node,evt,func));},_getDatePackage:function(_5cc){if(_5cc.datePackage===null){return null;}else{if(_5cc.datePackage){return _5cc.datePackage;}else{if(_53a.locale==="ar"){return "dojox.date.islamic";}}}return null;},_destroyAttributeTable:function(){var _5cd=this._layerInfos;_537.forEach(_5cd,function(_5ce){var _5cf=_5ce.fieldInfos;_537.forEach(_5cf,function(_5d0){var _5d1=_5d0.dijit;if(_5d1){_5d1._onChangeHandle=null;if(_5d0.customField){return;}if(_5d1.destroyRecursive){_5d1.destroyRecursive();}else{if(_5d1.destroy){_5d1.destroy();}}}_5d0.dijit=null;},this);},this);var _5d2=this._toolTips;_537.forEach(_5d2,function(item){item.destroy();delete item;});this._toolTips=[];if(this._attributes){_53c.destroy(this._attributes);}}});lang.mixin(ATI,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});if(has("extend-esri")){lang.setObject("dijit.AttributeInspector",ATI,_53d);}return ATI;});},"dijit/form/_ListBase":function(){define("dijit/form/_ListBase",["dojo/_base/declare","dojo/on","dojo/window"],function(_5d3,on,_5d4){return _5d3("dijit.form._ListBase",null,{selected:null,_listConnect:function(_5d5,_5d6){var self=this;return self.own(on(self.containerNode,on.selector(function(_5d7,_5d8,_5d9){return _5d7.parentNode==_5d9;},_5d5),function(evt){evt.preventDefault();self[_5d6](evt,this);}));},selectFirstNode:function(){var _5da=this.containerNode.firstChild;while(_5da&&_5da.style.display=="none"){_5da=_5da.nextSibling;}this._setSelectedAttr(_5da);},selectLastNode:function(){var last=this.containerNode.lastChild;while(last&&last.style.display=="none"){last=last.previousSibling;}this._setSelectedAttr(last);},selectNextNode:function(){var _5db=this.selected;if(!_5db){this.selectFirstNode();}else{var next=_5db.nextSibling;while(next&&next.style.display=="none"){next=next.nextSibling;}if(!next){this.selectFirstNode();}else{this._setSelectedAttr(next);}}},selectPreviousNode:function(){var _5dc=this.selected;if(!_5dc){this.selectLastNode();}else{var prev=_5dc.previousSibling;while(prev&&prev.style.display=="none"){prev=prev.previousSibling;}if(!prev){this.selectLastNode();}else{this._setSelectedAttr(prev);}}},_setSelectedAttr:function(node){if(this.selected!=node){var _5dd=this.selected;if(_5dd){this.onDeselect(_5dd);this.selected=null;}if(node){this.selected=node;_5d4.scrollIntoView(node);this.onSelect(node);}}else{if(node){this.onSelect(node);}}}});});},"dijit/ToolbarSeparator":function(){define("dijit/ToolbarSeparator",["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(_5de,dom,_5df,_5e0){return _5de("dijit.ToolbarSeparator",[_5df,_5e0],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\" role=\"presentation\"></div>",buildRendering:function(){this.inherited(arguments);dom.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});});},"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n","dojo/data/ItemFileReadStore":function(){define(["../_base/kernel","../_base/lang","../_base/declare","../_base/array","../_base/xhr","../Evented","./util/filter","./util/simpleFetch","../date/stamp"],function(_5e1,lang,_5e2,_5e3,xhr,_5e4,_5e5,_5e6,_5e7){var _5e8=_5e2("dojo.data.ItemFileReadStore",[_5e4],{constructor:function(_5e9){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_5e9.url;this._ccUrl=_5e9.url;this.url=_5e9.url;this._jsonData=_5e9.data;this.data=null;this._datatypeMap=_5e9.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_5ea){return _5e7.fromISOString(_5ea);}};}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(_5e9.urlPreventCache!==undefined){this.urlPreventCache=_5e9.urlPreventCache?true:false;}if(_5e9.hierarchical!==undefined){this.hierarchical=_5e9.hierarchical?true:false;}if(_5e9.clearOnClose){this.clearOnClose=true;}if("failOk" in _5e9){this.failOk=_5e9.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(_5eb){if(typeof _5eb!=="string"){throw new Error(this.declaredClass+": Invalid attribute argument.");}},getValue:function(item,_5ec,_5ed){var _5ee=this.getValues(item,_5ec);return (_5ee.length>0)?_5ee[0]:_5ed;},getValues:function(item,_5ef){this._assertIsItem(item);this._assertIsAttribute(_5ef);return (item[_5ef]||[]).slice(0);},getAttributes:function(item){this._assertIsItem(item);var _5f0=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_5f0.push(key);}}return _5f0;},hasAttribute:function(item,_5f1){this._assertIsItem(item);this._assertIsAttribute(_5f1);return (_5f1 in item);},containsValue:function(item,_5f2,_5f3){var _5f4=undefined;if(typeof _5f3==="string"){_5f4=_5e5.patternToRegExp(_5f3,false);}return this._containsValue(item,_5f2,_5f3,_5f4);},_containsValue:function(item,_5f5,_5f6,_5f7){return _5e3.some(this.getValues(item,_5f5),function(_5f8){if(_5f8!==null&&!lang.isObject(_5f8)&&_5f7){if(_5f8.toString().match(_5f7)){return true;}}else{if(_5f6===_5f8){return true;}}});},isItem:function(_5f9){if(_5f9&&_5f9[this._storeRefPropName]===this){if(this._arrayOfAllItems[_5f9[this._itemNumPropName]]===_5f9){return true;}}return false;},isItemLoaded:function(_5fa){return this.isItem(_5fa);},loadItem:function(_5fb){this._assertIsItem(_5fb.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(_5fc,_5fd,_5fe){var _5ff=[],i,key;if(_5fc.query){var _600,_601=_5fc.queryOptions?_5fc.queryOptions.ignoreCase:false;var _602={};for(key in _5fc.query){_600=_5fc.query[key];if(typeof _600==="string"){_602[key]=_5e5.patternToRegExp(_600,_601);}else{if(_600 instanceof RegExp){_602[key]=_600;}}}for(i=0;i<_5fd.length;++i){var _603=true;var _604=_5fd[i];if(_604===null){_603=false;}else{for(key in _5fc.query){_600=_5fc.query[key];if(!this._containsValue(_604,key,_600,_602[key])){_603=false;}}}if(_603){_5ff.push(_604);}}_5fe(_5ff,_5fc);}else{for(i=0;i<_5fd.length;++i){var item=_5fd[i];if(item!==null){_5ff.push(item);}}_5fe(_5ff,_5fc);}},_fetchItems:function(_605,_606,_607){var self=this;if(this._loadFinished){this.filter(_605,this._getItemsArray(_605.queryOptions),_606);}else{if(this._jsonFileUrl!==this._ccUrl){_5e1.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:_605,filter:lang.hitch(self,"filter"),findCallback:lang.hitch(self,_606)});}else{this._loadInProgress=true;var _608={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _609=xhr.get(_608);_609.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;self.filter(_605,self._getItemsArray(_605.queryOptions),_606);self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_607(e,_605);}});_609.addErrback(function(_60a){self._loadInProgress=false;_607(_60a,_605);});var _60b=null;if(_605.abort){_60b=_605.abort;}_605.abort=function(){var df=_609;if(df&&df.fired===-1){df.cancel();df=null;}if(_60b){_60b.call(_605);}};}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;self.filter(_605,this._getItemsArray(_605.queryOptions),_606);}catch(e){_607(e,_605);}}else{_607(new Error(this.declaredClass+": No JSON source data was provided as either URL or a nested Javascript object."),_605);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _60c=this._queuedFetches[i],_60d=_60c.args,_60e=_60c.filter,_60f=_60c.findCallback;if(_60e){_60e(_60d,this._getItemsArray(_60d.queryOptions),_60f);}else{this.fetchItemByIdentity(_60d);}}this._queuedFetches=[];}},_getItemsArray:function(_610){if(_610&&_610.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_611){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(_612){var _613=false,self=this;function _614(_615){return (_615!==null)&&(typeof _615==="object")&&(!lang.isArray(_615)||_613)&&(!lang.isFunction(_615))&&(_615.constructor==Object||lang.isArray(_615))&&(typeof _615._reference==="undefined")&&(typeof _615._type==="undefined")&&(typeof _615._value==="undefined")&&self.hierarchical;};function _616(_617){self._arrayOfAllItems.push(_617);for(var _618 in _617){var _619=_617[_618];if(_619){if(lang.isArray(_619)){var _61a=_619;for(var k=0;k<_61a.length;++k){var _61b=_61a[k];if(_614(_61b)){_616(_61b);}}}else{if(_614(_619)){_616(_619);}}}}};this._labelAttr=_612.label;var i,item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_612.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];if(lang.isArray(item)){_613=true;}_616(item);item[this._rootItemPropName]=true;}var _61c={},key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _61d=item[key];if(_61d!==null){if(!lang.isArray(_61d)){item[key]=[_61d];}}else{item[key]=[null];}}_61c[key]=key;}}while(_61c[this._storeRefPropName]){this._storeRefPropName+="_";}while(_61c[this._itemNumPropName]){this._itemNumPropName+="_";}while(_61c[this._reverseRefMap]){this._reverseRefMap+="_";}var _61e;var _61f=_612.identifier;if(_61f){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_61f;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_61e=item[_61f];var _620=_61e[0];if(!Object.hasOwnProperty.call(this._itemsByIdentity,_620)){this._itemsByIdentity[_620]=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: ["+_61f+"].  Value collided: ["+_620+"]");}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: ["+_61f+"].  Value collided: ["+_620+"]");}}}}}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){_61e=item[key];for(var j=0;j<_61e.length;++j){_61d=_61e[j];if(_61d!==null&&typeof _61d=="object"){if(("_type" in _61d)&&("_value" in _61d)){var type=_61d._type;var _621=this._datatypeMap[type];if(!_621){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(lang.isFunction(_621)){_61e[j]=new _621(_61d._value);}else{if(lang.isFunction(_621.deserialize)){_61e[j]=_621.deserialize(_61d._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(_61d._reference){var _622=_61d._reference;if(!lang.isObject(_622)){_61e[j]=this._getItemByIdentity(_622);}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _623=this._arrayOfAllItems[k],_624=true;for(var _625 in _622){if(_623[_625]!=_622[_625]){_624=false;}}if(_624){_61e[j]=_623;}}}if(this.referenceIntegrity){var _626=_61e[j];if(this.isItem(_626)){this._addReferenceToMap(_626,item,key);}}}else{if(this.isItem(_61d)){if(this.referenceIntegrity){this._addReferenceToMap(_61d,item,key);}}}}}}}},_addReferenceToMap:function(_627,_628,_629){},getIdentity:function(item){var _62a=this._features["dojo.data.api.Identity"];if(_62a===Number){return item[this._itemNumPropName];}else{var _62b=item[_62a];if(_62b){return _62b[0];}}return null;},fetchItemByIdentity:function(_62c){var item,_62d;if(!this._loadFinished){var self=this;if(this._jsonFileUrl!==this._ccUrl){_5e1.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:_62c});}else{this._loadInProgress=true;var _62e={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _62f=xhr.get(_62e);_62f.addCallback(function(data){var _630=_62c.scope?_62c.scope:_5e1.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;item=self._getItemByIdentity(_62c.identity);if(_62c.onItem){_62c.onItem.call(_630,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_62c.onError){_62c.onError.call(_630,error);}}});_62f.addErrback(function(_631){self._loadInProgress=false;if(_62c.onError){var _632=_62c.scope?_62c.scope:_5e1.global;_62c.onError.call(_632,_631);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;item=self._getItemByIdentity(_62c.identity);if(_62c.onItem){_62d=_62c.scope?_62c.scope:_5e1.global;_62c.onItem.call(_62d,item);}}}}else{item=this._getItemByIdentity(_62c.identity);if(_62c.onItem){_62d=_62c.scope?_62c.scope:_5e1.global;_62c.onItem.call(_62d,item);}}},_getItemByIdentity:function(_633){var item=null;if(this._itemsByIdentity){if(Object.hasOwnProperty.call(this._itemsByIdentity,_633)){item=this._itemsByIdentity[_633];}}else{if(Object.hasOwnProperty.call(this._arrayOfAllItems,_633)){item=this._arrayOfAllItems[_633];}}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _634=this._features["dojo.data.api.Identity"];if(_634===Number){return null;}else{return [_634];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl!==this._ccUrl){_5e1.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 _635={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};var _636=xhr.get(_635);_636.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;}});_636.addErrback(function(_637){throw _637;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});lang.extend(_5e8,_5e6);return _5e8;});},"dijit/_editor/selection":function(){define("dijit/_editor/selection",["dojo/dom","dojo/_base/lang","dojo/sniff","dojo/_base/window","../main"],function(dom,lang,has,win,_638){var _639={getType:function(){if(win.doc.getSelection){var _63a="text";var oSel;try{oSel=win.global.getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _63b=oSel.getRangeAt(0);if((_63b.startContainer==_63b.endContainer)&&((_63b.endOffset-_63b.startOffset)==1)&&(_63b.startContainer.nodeType!=3)){_63a="control";}}return _63a;}else{return win.doc.selection.type.toLowerCase();}},getSelectedText:function(){if(win.doc.getSelection){var _63c=win.global.getSelection();return _63c?_63c.toString():"";}else{if(_638._editor.selection.getType()=="control"){return null;}return win.doc.selection.createRange().text;}},getSelectedHtml:function(){if(win.doc.getSelection){var _63d=win.global.getSelection();if(_63d&&_63d.rangeCount){var i;var html="";for(i=0;i<_63d.rangeCount;i++){var frag=_63d.getRangeAt(i).cloneContents();var div=win.doc.createElement("div");div.appendChild(frag);html+=div.innerHTML;}return html;}return null;}else{if(_638._editor.selection.getType()=="control"){return null;}return win.doc.selection.createRange().htmlText;}},getSelectedElement:function(){if(_638._editor.selection.getType()=="control"){if(win.doc.getSelection){var _63e=win.global.getSelection();return _63e.anchorNode.childNodes[_63e.anchorOffset];}else{var _63f=win.doc.selection.createRange();if(_63f&&_63f.item){return win.doc.selection.createRange().item(0);}}}return null;},getParentElement:function(){if(_638._editor.selection.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(win.doc.getSelection){var _640=win.global.getSelection();if(_640){var node=_640.anchorNode;while(node&&(node.nodeType!=1)){node=node.parentNode;}return node;}}else{var r=win.doc.selection.createRange();r.collapse(true);return r.parentElement();}}return null;},hasAncestorElement:function(_641){return this.getAncestorElement.apply(this,arguments)!=null;},getAncestorElement:function(_642){var node=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(node,arguments);},isTag:function(node,tags){if(node&&node.tagName){var _643=node.tagName.toLowerCase();for(var i=0;i<tags.length;i++){var _644=String(tags[i]).toLowerCase();if(_643==_644){return _644;}}}return "";},getParentOfType:function(node,tags){while(node){if(this.isTag(node,tags).length){return node;}node=node.parentNode;}return null;},collapse:function(_645){if(win.doc.getSelection){var _646=win.global.getSelection();if(_646.removeAllRanges){if(_645){_646.collapseToStart();}else{_646.collapseToEnd();}}else{_646.collapse(_645);}}else{var _647=win.doc.selection.createRange();_647.collapse(_645);_647.select();}},remove:function(){var sel=win.doc.selection;if(win.doc.getSelection){sel=win.global.getSelection();sel.deleteFromDocument();return sel;}else{if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}},selectElementChildren:function(_648,_649){var doc=win.doc;var _64a;_648=dom.byId(_648);if(win.doc.getSelection){var _64b=win.global.getSelection();if(has("opera")){if(_64b.rangeCount){_64a=_64b.getRangeAt(0);}else{_64a=doc.createRange();}_64a.setStart(_648,0);_64a.setEnd(_648,(_648.nodeType==3)?_648.length:_648.childNodes.length);_64b.addRange(_64a);}else{_64b.selectAllChildren(_648);}}else{_64a=_648.ownerDocument.body.createTextRange();_64a.moveToElementText(_648);if(!_649){try{_64a.select();}catch(e){}}}},selectElement:function(_64c,_64d){var _64e;_64c=dom.byId(_64c);var doc=_64c.ownerDocument;var _64f=win.global;if(doc.getSelection){var _650=_64f.getSelection();_64e=doc.createRange();if(_650.removeAllRanges){if(has("opera")){if(_650.getRangeAt(0)){_64e=_650.getRangeAt(0);}}_64e.selectNode(_64c);_650.removeAllRanges();_650.addRange(_64e);}}else{try{var tg=_64c.tagName?_64c.tagName.toLowerCase():"";if(tg==="img"||tg==="table"){_64e=win.body(doc).createControlRange();}else{_64e=win.body(doc).createRange();}_64e.addElement(_64c);if(!_64d){_64e.select();}}catch(e){this.selectElementChildren(_64c,_64d);}}},inSelection:function(node){if(node){var _651;var doc=win.doc;var _652;if(win.doc.getSelection){var sel=win.global.getSelection();if(sel&&sel.rangeCount>0){_652=sel.getRangeAt(0);}if(_652&&_652.compareBoundaryPoints&&doc.createRange){try{_651=doc.createRange();_651.setStart(node,0);if(_652.compareBoundaryPoints(_652.START_TO_END,_651)===1){return true;}}catch(e){}}}else{_652=doc.selection.createRange();try{_651=node.ownerDocument.body.createControlRange();if(_651){_651.addElement(node);}}catch(e1){try{_651=node.ownerDocument.body.createTextRange();_651.moveToElementText(node);}catch(e2){}}if(_652&&_651){if(_652.compareEndPoints("EndToStart",_651)===1){return true;}}}}return false;}};lang.setObject("dijit._editor.selection",_639);return _639;});},"esri/dijit/editing/AttachmentEditor":function(){define(["require","dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/_base/kernel","dojo/has","dojo/query","dojo/io-query","dojo/dom-attr","dijit/_Widget","dijit/_Templated","esri/kernel","esri/lang","esri/domUtils","dojo/text!esri/dijit/editing/templates/AttachmentEditor.html","dojo/i18n!esri/nls/jsapi","dojo/NodeList-dom"],function(_653,_654,lang,_655,_656,_657,has,_658,_659,_65a,_65b,_65c,_65d,_65e,_65f,_660,_661){var AE=_654([_65b,_65c],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:true,templateString:_660,basePath:_653.toUrl("esri/dijit/editing")+"/",_listHtml:"<span id='node_${oid}_${attid}'><a href='${href}' target='_blank'>${name}</a>",_deleteBtnHtml:"(<span style='cursor:pointer;color:red;font-weight:bold;' class='deleteAttachment' id='${attid}');'>X</span>)",_endHtml:"<br/></span>",_aeConnects:[],_layerEditingCapChecked:{},_layerEditingCap:{},constructor:function(_662,_663){lang.mixin(this,_661.widgets.attachmentEditor);},startup:function(){this.inherited(arguments);this._uploadField_connect=_655.connect(this._uploadField,"onchange",this,"_addAttachment");this._uploadFieldFocus_connect=_655.connect(this._uploadField,"onfocus",lang.hitch(this,function(e){_65f.hide(this._attachmentError);}));},destroy:function(){_656.forEach(this._aeConnects,_655.disconnect);_655.disconnect(this._uploadField_connect);_655.disconnect(this._uploadFieldFocus_connect);this.inherited(arguments);},showAttachments:function(_664,_665){var list=this._attachmentList;list.innerHTML=this.NLS_none;this._uploadField.value="";_656.forEach(this.domNode.children,function(_666,idx){_65f.show(_666);});_65f.hide(this._attachmentError);if(!_664){return;}this._featureLayer=_664.getLayer()||_665;if(!this._featureLayer){return;}if(this._featureLayer.declaredClass!=="esri.layers.FeatureLayer"||!this._featureLayer.getEditCapabilities){_65f.hide(this._uploadForm);_656.forEach(this.domNode.children,function(_667,idx){_65f.hide(_667);});return;}this._currentLayerId=this._featureLayer.id;if(!this._layerEditingCapChecked[this._currentLayerId]){this._layerEditingCap[this._currentLayerId]=this._featureLayer.getEditCapabilities();this._layerEditingCapChecked[this._currentLayerId]=true;}this._featureCanUpdate=this._featureLayer.getEditCapabilities({feature:_664}).canUpdate;this._oid=_664.attributes[this._featureLayer.objectIdField];this._getAttachments(_664);},_getAttachments:function(_668){if(!this._featureLayer||!this._featureLayer.queryAttachmentInfos){return;}this._featureLayer.queryAttachmentInfos(this._oid,lang.hitch(this,"_onQueryAttachmentInfosComplete"));},_addAttachment:function(){_65f.hide(this._attachmentError);if(!this._featureLayer||!this._featureLayer.addAttachment){return;}this._featureLayer.addAttachment(this._oid,this._uploadForm,lang.hitch(this,"_onAddAttachmentComplete"),lang.hitch(this,"_onAddAttachmentError"));},_deleteAttachment:function(oid,_669){this._featureLayer.deleteAttachments(oid,[_669],lang.hitch(this,"_onDeleteAttachmentComplete"));},_onQueryAttachmentInfosComplete:function(_66a){var _66b=this._listHtml+this._deleteBtnHtml+this._endHtml;this._uploadForm.style.display="block";if((!this._featureCanUpdate&&this._layerEditingCap[this._currentLayerId].canUpdate)||(!this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate)){_66b=this._listHtml+this._endHtml;this._uploadForm.style.display="none";}else{if(this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate){_66b=this._listHtml+this._endHtml;}}var list=this._attachmentList,_66c=_656.map(_66a,lang.hitch(this,function(info){return _65e.substitute({href:info.url,name:info.name,oid:info.objectId,attid:info.id},_66b);}));list.innerHTML=_66c.join("")||this.NLS_none;this._updateConnects();},_onAddAttachmentComplete:function(_66d){var _66e=this._uploadField;var _66f=_66e.value;var pos=_66f.lastIndexOf("\\");if(pos>-1){_66f=_66f.substring(pos+1,_66f.length);}_66f=_66f.replace(/\ /g,"_");var list=this._attachmentList,_670=_659.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var _671=this._listHtml+this._deleteBtnHtml+this._endHtml;if(this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate){_671=this._listHtml+this._endHtml;}var link=_65e.substitute({href:this._featureLayer._url.path+"/"+_66d.objectId+"/attachments/"+_66d.attachmentId+(_670?("?"+_670):""),name:_66f,oid:_66d.objectId,attid:_66d.attachmentId},_671);list.innerHTML=list.innerHTML==this.NLS_none?link:(list.innerHTML+link);this._updateConnects();_66e.value="";},_onAddAttachmentError:function(_672){if(_672&&_65e.isDefined(_672.code)){var _673,_674=this._attachmentError;if(_672.code===400){_673=this.NLS_fileNotSupported;}else{_673=_672.message||(_672.details&&_672.details.length&&_672.details[0]);}_65a.set(_674,"innerHTML",(_673||this.NLS_error));_65f.show(_674);}},_onDeleteAttachmentComplete:function(_675){var _676=_656.every(_675,function(_677){return _677.success;}),list=this._attachmentList;if(_676){_657.query("#node_"+_675[0].objectId+"_"+_675[0].attachmentId).orphan();if(!list.children||!list.children.length){list.innerHTML=this.NLS_none;}}},_updateConnects:function(){_656.forEach(this._aeConnects,_655.disconnect);_657.query(".deleteAttachment").forEach(function(item){this._aeConnects.push(_655.connect(item,"onclick",lang.hitch(this,"_deleteAttachment",this._oid,item.id)));},this);}});if(has("extend-esri")){lang.setObject("dijit.editing.AttachmentEditor",AE,_65d);}return AE;});},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dijit/_editor/plugins/EnterKeyHandling",["dojo/_base/declare","dojo/dom-construct","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/_base/window","dojo/window","../_Plugin","../RichText","../range","../../_base/focus"],function(_678,_679,_67a,keys,lang,has,win,_67b,_67c,_67d,_67e,_67f){return _678("dijit._editor.plugins.EnterKeyHandling",_67c,{blockNodeForEnter:"BR",constructor:function(args){if(args){if("blockNodeForEnter" in args){args.blockNodeForEnter=args.blockNodeForEnter.toUpperCase();}lang.mixin(this,args);}},setEditor:function(_680){if(this.editor===_680){return;}this.editor=_680;if(this.blockNodeForEnter=="BR"){this.editor.customUndo=true;_680.onLoadDeferred.then(lang.hitch(this,function(d){this.connect(_680.document,"onkeypress",function(e){if(e.charOrCode==keys.ENTER){var ne=lang.mixin({},e);ne.shiftKey=true;if(!this.handleEnterKey(ne)){_67a.stop(e);}}});if(has("ie")>=9){this.connect(_680.document,"onpaste",function(e){setTimeout(dojo.hitch(this,function(){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();r.move("character",1);r.select();}),0);});}return d;}));}else{if(this.blockNodeForEnter){var h=lang.hitch(this,this.handleEnterKey);_680.addKeyHandler(13,0,0,h);_680.addKeyHandler(13,0,1,h);this.connect(this.editor,"onKeyPressed","onKeyPressed");}}},onKeyPressed:function(){if(this._checkListLater){if(win.withGlobal(this.editor.window,"isCollapsed",_67f)){var _681=this.editor._sCall("getAncestorElement",["LI"]);if(!_681){_67d.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);var _682=this.editor._sCall("getAncestorElement",[this.blockNodeForEnter]);if(_682){_682.innerHTML=this.bogusHtmlContent;if(has("ie")<=9){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();}}else{console.error("onKeyPressed: Cannot find the new block node");}}else{if(has("mozilla")){if(_681.parentNode.parentNode.nodeName=="LI"){_681=_681.parentNode.parentNode;}}var fc=_681.firstChild;if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){_681.insertBefore(fc.ownerDocument.createTextNode(" "),fc);var _683=_67e.create(this.editor.window);_683.setStart(_681.firstChild,0);var _684=_67e.getSelection(this.editor.window,true);_684.removeAllRanges();_684.addRange(_683);}}}this._checkListLater=false;}if(this._pressedEnterInBlock){if(this._pressedEnterInBlock.previousSibling){this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);}delete this._pressedEnterInBlock;}},bogusHtmlContent:"&#160;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){var _685,_686,_687,_688,_689,_68a,doc=this.editor.document,br,rs,txt;if(e.shiftKey){var _68b=this.editor._sCall("getParentElement",[]);var _68c=_67e.getAncestor(_68b,this.blockNodes);if(_68c){if(_68c.tagName=="LI"){return true;}_685=_67e.getSelection(this.editor.window);_686=_685.getRangeAt(0);if(!_686.collapsed){_686.deleteContents();_685=_67e.getSelection(this.editor.window);_686=_685.getRangeAt(0);}if(_67e.atBeginningOfContainer(_68c,_686.startContainer,_686.startOffset)){br=doc.createElement("br");_687=_67e.create(this.editor.window);_68c.insertBefore(br,_68c.firstChild);_687.setStartAfter(br);_685.removeAllRanges();_685.addRange(_687);}else{if(_67e.atEndOfContainer(_68c,_686.startContainer,_686.startOffset)){_687=_67e.create(this.editor.window);br=doc.createElement("br");_68c.appendChild(br);_68c.appendChild(doc.createTextNode(" "));_687.setStart(_68c.lastChild,0);_685.removeAllRanges();_685.addRange(_687);}else{rs=_686.startContainer;if(rs&&rs.nodeType==3){txt=rs.nodeValue;_688=doc.createTextNode(txt.substring(0,_686.startOffset));_689=doc.createTextNode(txt.substring(_686.startOffset));_68a=doc.createElement("br");if(_689.nodeValue==""&&has("webkit")){_689=doc.createTextNode(" ");}_679.place(_688,rs,"after");_679.place(_68a,_688,"after");_679.place(_689,_68a,"after");_679.destroy(rs);_687=_67e.create(this.editor.window);_687.setStart(_689,0);_685.removeAllRanges();_685.addRange(_687);return false;}return true;}}}else{_685=_67e.getSelection(this.editor.window);if(_685.rangeCount){_686=_685.getRangeAt(0);if(_686&&_686.startContainer){if(!_686.collapsed){_686.deleteContents();_685=_67e.getSelection(this.editor.window);_686=_685.getRangeAt(0);}rs=_686.startContainer;if(rs&&rs.nodeType==3){var _68d=false;var _68e=_686.startOffset;if(rs.length<_68e){ret=this._adjustNodeAndOffset(rs,_68e);rs=ret.node;_68e=ret.offset;}txt=rs.nodeValue;_688=doc.createTextNode(txt.substring(0,_68e));_689=doc.createTextNode(txt.substring(_68e));_68a=doc.createElement("br");if(!_689.length){_689=doc.createTextNode(" ");_68d=true;}if(_688.length){_679.place(_688,rs,"after");}else{_688=rs;}_679.place(_68a,_688,"after");_679.place(_689,_68a,"after");_679.destroy(rs);_687=_67e.create(this.editor.window);_687.setStart(_689,0);_687.setEnd(_689,_689.length);_685.removeAllRanges();_685.addRange(_687);if(_68d&&!has("webkit")){this.editor._sCall("remove",[]);}else{this.editor._sCall("collapse",[true]);}}else{var _68f;if(_686.startOffset>=0){_68f=rs.childNodes[_686.startOffset];}var _68a=doc.createElement("br");var _689=doc.createTextNode(" ");if(!_68f){rs.appendChild(_68a);rs.appendChild(_689);}else{_679.place(_68a,_68f,"before");_679.place(_689,_68a,"after");}_687=_67e.create(this.editor.window);_687.setStart(_689,0);_687.setEnd(_689,_689.length);_685.removeAllRanges();_685.addRange(_687);this.editor._sCall("collapse",[true]);}}}else{_67d.prototype.execCommand.call(this.editor,"inserthtml","<br>");}}return false;}var _690=true;_685=_67e.getSelection(this.editor.window);_686=_685.getRangeAt(0);if(!_686.collapsed){_686.deleteContents();_685=_67e.getSelection(this.editor.window);_686=_685.getRangeAt(0);}var _691=_67e.getBlockAncestor(_686.endContainer,null,this.editor.editNode);var _692=_691.blockNode;if((this._checkListLater=(_692&&(_692.nodeName=="LI"||_692.parentNode.nodeName=="LI")))){if(has("mozilla")){this._pressedEnterInBlock=_692;}if(/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(_692.innerHTML)){_692.innerHTML="";if(has("webkit")){_687=_67e.create(this.editor.window);_687.setStart(_692,0);_685.removeAllRanges();_685.addRange(_687);}this._checkListLater=false;}return true;}if(!_691.blockNode||_691.blockNode===this.editor.editNode){try{_67d.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);}catch(e2){}_691={blockNode:this.editor._sCall("getAncestorElement",[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(_691.blockNode){if(_691.blockNode!=this.editor.editNode&&(!(_691.blockNode.textContent||_691.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){this.removeTrailingBr(_691.blockNode);return false;}}else{_691.blockNode=this.editor.editNode;}_685=_67e.getSelection(this.editor.window);_686=_685.getRangeAt(0);}var _693=doc.createElement(this.blockNodeForEnter);_693.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(_691.blockNode);var _694=_686.endOffset;var node=_686.endContainer;if(node.length<_694){var ret=this._adjustNodeAndOffset(node,_694);node=ret.node;_694=ret.offset;}if(_67e.atEndOfContainer(_691.blockNode,node,_694)){if(_691.blockNode===_691.blockContainer){_691.blockNode.appendChild(_693);}else{_679.place(_693,_691.blockNode,"after");}_690=false;_687=_67e.create(this.editor.window);_687.setStart(_693,0);_685.removeAllRanges();_685.addRange(_687);if(this.editor.height){_67b.scrollIntoView(_693);}}else{if(_67e.atBeginningOfContainer(_691.blockNode,_686.startContainer,_686.startOffset)){_679.place(_693,_691.blockNode,_691.blockNode===_691.blockContainer?"first":"before");if(_693.nextSibling&&this.editor.height){_687=_67e.create(this.editor.window);_687.setStart(_693.nextSibling,0);_685.removeAllRanges();_685.addRange(_687);_67b.scrollIntoView(_693.nextSibling);}_690=false;}else{if(_691.blockNode===_691.blockContainer){_691.blockNode.appendChild(_693);}else{_679.place(_693,_691.blockNode,"after");}_690=false;if(_691.blockNode.style){if(_693.style){if(_691.blockNode.style.cssText){_693.style.cssText=_691.blockNode.style.cssText;}}}rs=_686.startContainer;var _695;if(rs&&rs.nodeType==3){var _696,_697;_694=_686.endOffset;if(rs.length<_694){ret=this._adjustNodeAndOffset(rs,_694);rs=ret.node;_694=ret.offset;}txt=rs.nodeValue;_688=doc.createTextNode(txt.substring(0,_694));_689=doc.createTextNode(txt.substring(_694,txt.length));_679.place(_688,rs,"before");_679.place(_689,rs,"after");_679.destroy(rs);var _698=_688.parentNode;while(_698!==_691.blockNode){var tg=_698.tagName;var _699=doc.createElement(tg);if(_698.style){if(_699.style){if(_698.style.cssText){_699.style.cssText=_698.style.cssText;}}}if(_698.tagName==="FONT"){if(_698.color){_699.color=_698.color;}if(_698.face){_699.face=_698.face;}if(_698.size){_699.size=_698.size;}}_696=_689;while(_696){_697=_696.nextSibling;_699.appendChild(_696);_696=_697;}_679.place(_699,_698,"after");_688=_698;_689=_699;_698=_698.parentNode;}_696=_689;if(_696.nodeType==1||(_696.nodeType==3&&_696.nodeValue)){_693.innerHTML="";}_695=_696;while(_696){_697=_696.nextSibling;_693.appendChild(_696);_696=_697;}}_687=_67e.create(this.editor.window);var _69a;var _69b=_695;if(this.blockNodeForEnter!=="BR"){while(_69b){_69a=_69b;_697=_69b.firstChild;_69b=_697;}if(_69a&&_69a.parentNode){_693=_69a.parentNode;_687.setStart(_693,0);_685.removeAllRanges();_685.addRange(_687);if(this.editor.height){_67b.scrollIntoView(_693);}if(has("mozilla")){this._pressedEnterInBlock=_691.blockNode;}}else{_690=true;}}else{_687.setStart(_693,0);_685.removeAllRanges();_685.addRange(_687);if(this.editor.height){_67b.scrollIntoView(_693);}if(has("mozilla")){this._pressedEnterInBlock=_691.blockNode;}}}}return _690;},_adjustNodeAndOffset:function(node,_69c){while(node.length<_69c&&node.nextSibling&&node.nextSibling.nodeType==3){_69c=_69c-node.length;node=node.nextSibling;}return {"node":node,"offset":_69c};},removeTrailingBr:function(_69d){var para=/P|DIV|LI/i.test(_69d.tagName)?_69d:this.editor._sCall("getParentOfType",[_69d,["P","DIV","LI"]]);if(!para){return;}if(para.lastChild){if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){_679.destroy(para.lastChild);}}if(!para.childNodes.length){para.innerHTML=this.bogusHtmlContent;}}});});},"dijit/form/_SearchMixin":function(){define("dijit/form/_SearchMixin",["dojo/data/util/filter","dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/query","dojo/sniff","dojo/string","dojo/when","../registry"],function(_69e,_69f,_6a0,keys,lang,_6a1,has,_6a2,when,_6a3){return _69f("dijit.form._SearchMixin",null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:true,_abortQuery:function(){if(this.searchTimer){this.searchTimer=this.searchTimer.remove();}if(this._queryDeferHandle){this._queryDeferHandle=this._queryDeferHandle.remove();}if(this._fetchHandle){if(this._fetchHandle.abort){this._cancelingQuery=true;this._fetchHandle.abort();this._cancelingQuery=false;}if(this._fetchHandle.cancel){this._cancelingQuery=true;this._fetchHandle.cancel();this._cancelingQuery=false;}this._fetchHandle=null;}},_processInput:function(evt){if(this.disabled||this.readOnly){return;}var key=evt.charOrCode;if(evt.altKey||((evt.ctrlKey||evt.metaKey)&&(key!="x"&&key!="v"))||key==keys.SHIFT){return;}var _6a4=false;this._prev_key_backspace=false;switch(key){case keys.DELETE:case keys.BACKSPACE:this._prev_key_backspace=true;this._maskValidSubsetError=true;_6a4=true;break;default:_6a4=typeof key=="string"||key==229;}if(_6a4){if(!this.store){this.onSearch();}else{this.searchTimer=this.defer("_startSearchFromInput",1);}}},onSearch:function(){},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));},_startSearch:function(text){this._abortQuery();var _6a5=this,_6a1=lang.clone(this.query),_6a6={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:true}},qs=_6a2.substitute(this.queryExpr,[text]),q,_6a7=function(){var _6a8=_6a5._fetchHandle=_6a5.store.query(_6a1,_6a6);if(_6a5.disabled||_6a5.readOnly||(q!==_6a5._lastQuery)){return;}when(_6a8,function(res){_6a5._fetchHandle=null;if(!_6a5.disabled&&!_6a5.readOnly&&(q===_6a5._lastQuery)){when(_6a8.total,function(_6a9){res.total=_6a9;var _6aa=_6a5.pageSize;if(isNaN(_6aa)||_6aa>res.total){_6aa=res.total;}res.nextPage=function(_6ab){_6a6.direction=_6ab=_6ab!==false;_6a6.count=_6aa;if(_6ab){_6a6.start+=res.length;if(_6a6.start>=res.total){_6a6.count=0;}}else{_6a6.start-=_6aa;if(_6a6.start<0){_6a6.count=Math.max(_6aa+_6a6.start,0);_6a6.start=0;}}if(_6a6.count<=0){res.length=0;_6a5.onSearch(res,_6a1,_6a6);}else{_6a7();}};_6a5.onSearch(res,_6a1,_6a6);});}},function(err){_6a5._fetchHandle=null;if(!_6a5._cancelingQuery){console.error(_6a5.declaredClass+" "+err.toString());}});};lang.mixin(_6a6,this.fetchProperties);if(this.store._oldAPI){q=qs;}else{q=_69e.patternToRegExp(qs,this.ignoreCase);q.toString=function(){return qs;};}this._lastQuery=_6a1[this.searchAttr]=q;this._queryDeferHandle=this.defer(_6a7,this.searchDelay);},constructor:function(){this.query={};this.fetchProperties={};},postMixInProperties:function(){if(!this.store){var list=this.list;if(list){this.store=_6a3.byId(list);}}this.inherited(arguments);}});});},"url:dijit/templates/Calendar.html":"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" aria-labelledby=\"${id}_mddb ${id}_year\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div data-dojo-attach-point=\"monthNode\">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr role=\"row\">\n\t\t\t${!dayCellsHtml}\n\t\t</tr>\n\t</thead>\n\t<tbody data-dojo-attach-point=\"dateRowsNode\" data-dojo-attach-event=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t\t${!dateRowsHtml}\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\" role=\"presentation\">\n\t\t\t\t<div class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span data-dojo-attach-point=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\" role=\"button\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" role=\"button\" id=\"${id}_year\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\" role=\"button\"></span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n","dijit/form/DataList":function(){define("dijit/form/DataList",["dojo/_base/declare","dojo/dom","dojo/_base/lang","dojo/query","dojo/store/Memory","../registry"],function(_6ac,dom,lang,_6ad,_6ae,_6af){function _6b0(_6b1){return {id:_6b1.value,value:_6b1.value,name:lang.trim(_6b1.innerText||_6b1.textContent||"")};};return _6ac("dijit.form.DataList",_6ae,{constructor:function(_6b2,_6b3){this.domNode=dom.byId(_6b3);lang.mixin(this,_6b2);if(this.id){_6af.add(this);}this.domNode.style.display="none";this.inherited(arguments,[{data:_6ad("option",this.domNode).map(_6b0)}]);},destroy:function(){_6af.remove(this.id);},fetchSelectedItem:function(){var _6b4=_6ad("> option[selected]",this.domNode)[0]||_6ad("> option",this.domNode)[0];return _6b4&&_6b0(_6b4);}});});},"dijit/form/_ListMouseMixin":function(){define("dijit/form/_ListMouseMixin",["dojo/_base/declare","dojo/mouse","dojo/on","dojo/touch","./_ListBase"],function(_6b5,_6b6,on,_6b7,_6b8){return _6b5("dijit.form._ListMouseMixin",_6b8,{postCreate:function(){this.inherited(arguments);this.own(on(this.domNode,_6b7.press,function(evt){evt.preventDefault();}));this._listConnect(_6b7.press,"_onMouseDown");this._listConnect(_6b7.release,"_onMouseUp");this._listConnect(_6b6.enter,"_onMouseOver");this._listConnect(_6b6.leave,"_onMouseOut");},_onMouseDown:function(evt,_6b9){if(this._hoveredNode){this.onUnhover(this._hoveredNode);this._hoveredNode=null;}this._isDragging=true;this._setSelectedAttr(_6b9);},_onMouseUp:function(evt,_6ba){this._isDragging=false;var _6bb=this.selected;var _6bc=this._hoveredNode;if(_6bb&&_6ba==_6bb){this.onClick(_6bb);}else{if(_6bc&&_6ba==_6bc){this._setSelectedAttr(_6bc);this.onClick(_6bc);}}},_onMouseOut:function(evt,_6bd){if(this._hoveredNode){this.onUnhover(this._hoveredNode);this._hoveredNode=null;}if(this._isDragging){this._cancelDrag=(new Date()).getTime()+1000;}},_onMouseOver:function(evt,_6be){if(this._cancelDrag){var time=(new Date()).getTime();if(time>this._cancelDrag){this._isDragging=false;}this._cancelDrag=null;}this._hoveredNode=_6be;this.onHover(_6be);if(this._isDragging){this._setSelectedAttr(_6be);}}});});},"dijit/form/RangeBoundTextBox":function(){define("dijit/form/RangeBoundTextBox",["dojo/_base/declare","dojo/i18n","./MappedTextBox"],function(_6bf,i18n,_6c0){var _6c1=_6bf("dijit.form.RangeBoundTextBox",_6c0,{rangeMessage:"",rangeCheck:function(_6c2,_6c3){return ("min" in _6c3?(this.compare(_6c2,_6c3.min)>=0):true)&&("max" in _6c3?(this.compare(_6c2,_6c3.max)<=0):true);},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints);},_isDefinitelyOutOfRange:function(){var val=this.get("value");if(val==null){return false;}var _6c4=false;if("min" in this.constraints){var min=this.constraints.min;_6c4=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min)<0;}if(!_6c4&&("max" in this.constraints)){var max=this.constraints.max;_6c4=this.compare(val,((typeof max!="number")||max>0)?max:0)>0;}return _6c4;},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();},isValid:function(_6c5){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_6c5));},getErrorMessage:function(_6c6){var v=this.get("value");if(v!=null&&v!==""&&(typeof v!="number"||!isNaN(v))&&!this.isInRange(_6c6)){return this.rangeMessage;}return this.inherited(arguments);},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},applyTextDir:function(){}});return _6c1;});},"dijit/form/FilteringSelect":function(){define("dijit/form/FilteringSelect",["dojo/data/util/filter","dojo/_base/declare","dojo/_base/lang","dojo/when","./MappedTextBox","./ComboBoxMixin"],function(_6c7,_6c8,lang,when,_6c9,_6ca){return _6c8("dijit.form.FilteringSelect",[_6c9,_6ca],{required:true,_lastDisplayedValue:"",_isValidSubset:function(){return this._opened;},isValid:function(){return !!this.item||(!this.required&&this.get("displayedValue")=="");},_refreshState:function(){if(!this.searchTimer){this.inherited(arguments);}},_callbackSetLabel:function(_6cb,_6cc,_6cd,_6ce){if((_6cc&&_6cc[this.searchAttr]!==this._lastQuery)||(!_6cc&&_6cb.length&&this.store.getIdentity(_6cb[0])!=this._lastQuery)){return;}if(!_6cb.length){this.set("value","",_6ce||(_6ce===undefined&&!this.focused),this.textbox.value,null);}else{this.set("item",_6cb[0],_6ce);}},_openResultList:function(_6cf,_6d0,_6d1){if(_6d0[this.searchAttr]!==this._lastQuery){return;}this.inherited(arguments);if(this.item===undefined){this.validate(true);}},_getValueAttr:function(){return this.valueNode.value;},_getValueField:function(){return "value";},_setValueAttr:function(_6d2,_6d3,_6d4,item){if(!this._onChangeActive){_6d3=null;}if(item===undefined){if(_6d2===null||_6d2===""){_6d2="";if(!lang.isString(_6d4)){this._setDisplayedValueAttr(_6d4||"",_6d3);return;}}var self=this;this._lastQuery=_6d2;when(this.store.get(_6d2),function(item){self._callbackSetLabel(item?[item]:[],undefined,undefined,_6d3);});}else{this.valueNode.value=_6d2;this.inherited(arguments);}},_setItemAttr:function(item,_6d5,_6d6){this.inherited(arguments);this._lastDisplayedValue=this.textbox.value;},_getDisplayQueryString:function(text){return text.replace(/([\\\*\?])/g,"\\$1");},_setDisplayedValueAttr:function(_6d7,_6d8){if(_6d7==null){_6d7="";}if(!this._created){if(!("displayedValue" in this.params)){return;}_6d8=false;}if(this.store){this.closeDropDown();var _6d9=lang.clone(this.query);var qs=this._getDisplayQueryString(_6d7),q;if(this.store._oldAPI){q=qs;}else{q=_6c7.patternToRegExp(qs,this.ignoreCase);q.toString=function(){return qs;};}this._lastQuery=_6d9[this.searchAttr]=q;this.textbox.value=_6d7;this._lastDisplayedValue=_6d7;this._set("displayedValue",_6d7);var _6da=this;var _6db={ignoreCase:this.ignoreCase,deep:true};lang.mixin(_6db,this.fetchProperties);this._fetchHandle=this.store.query(_6d9,_6db);when(this._fetchHandle,function(_6dc){_6da._fetchHandle=null;_6da._callbackSetLabel(_6dc||[],_6d9,_6db,_6d8);},function(err){_6da._fetchHandle=null;if(!_6da._cancelingQuery){console.error("dijit.form.FilteringSelect: "+err.toString());}});}},undo:function(){this.set("displayedValue",this._lastDisplayedValue);}});});},"dijit/layout/_LayoutWidget":function(){define("dijit/layout/_LayoutWidget",["dojo/_base/lang","../_Widget","../_Container","../_Contained","../Viewport","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/dom-style"],function(lang,_6dd,_6de,_6df,_6e0,_6e1,_6e2,_6e3,_6e4){return _6e1("dijit.layout._LayoutWidget",[_6dd,_6de,_6df],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);_6e2.add(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}this.inherited(arguments);var _6e5=this.getParent&&this.getParent();if(!(_6e5&&_6e5.isLayoutContainer)){this.resize();this.own(_6e0.on("resize",lang.hitch(this,"resize")));}},resize:function(_6e6,_6e7){var node=this.domNode;if(_6e6){_6e3.setMarginBox(node,_6e6);}var mb=_6e7||{};lang.mixin(mb,_6e6||{});if(!("h" in mb)||!("w" in mb)){mb=lang.mixin(_6e3.getMarginBox(node),mb);}var cs=_6e4.getComputedStyle(node);var me=_6e3.getMarginExtents(node,cs);var be=_6e3.getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=_6e3.getPadExtents(node,cs);this._contentBox={l:_6e4.toPixelValue(node,cs.paddingLeft),t:_6e4.toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_6e8){var cls=this.baseClass+"-child "+(_6e8.baseClass?this.baseClass+"-"+_6e8.baseClass:"");_6e2.add(_6e8.domNode,cls);},addChild:function(_6e9,_6ea){this.inherited(arguments);if(this._started){this._setupChild(_6e9);}},removeChild:function(_6eb){var cls=this.baseClass+"-child"+(_6eb.baseClass?" "+this.baseClass+"-"+_6eb.baseClass:"");_6e2.remove(_6eb.domNode,cls);this.inherited(arguments);}});});},"dijit/_editor/_Plugin":function(){define("dijit/_editor/_Plugin",["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../form/Button"],function(_6ec,_6ed,lang,_6ee){var _6ef=_6ed("dijit._editor._Plugin",null,{constructor:function(args){this.params=args||{};lang.mixin(this,this.params);this._connects=[];this._attrPairNames={};},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:_6ee,disabled:false,getLabel:function(key){return this.editor.commands[key];},_initButton:function(){if(this.command.length){var _6f0=this.getLabel(this.command),_6f1=this.editor,_6f2=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _6f3=lang.mixin({label:_6f0,ownerDocument:_6f1.ownerDocument,dir:_6f1.dir,lang:_6f1.lang,showLabel:false,iconClass:_6f2,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});this.button=new this.buttonClass(_6f3);}}if(this.get("disabled")&&this.button){this.button.set("disabled",this.get("disabled"));}},destroy:function(){var h;while(h=this._connects.pop()){h.remove();}if(this.dropDown){this.dropDown.destroyRecursive();}},connect:function(o,f,tf){this._connects.push(_6ec.connect(o,f,this,tf));},updateState:function(){var e=this.editor,c=this.command,_6f4,_6f5;if(!e||!e.isLoaded||!c.length){return;}var _6f6=this.get("disabled");if(this.button){try{_6f5=!_6f6&&e.queryCommandEnabled(c);if(this.enabled!==_6f5){this.enabled=_6f5;this.button.set("disabled",!_6f5);}if(_6f5){if(typeof this.button.checked=="boolean"){_6f4=e.queryCommandState(c);if(this.checked!==_6f4){this.checked=_6f4;this.button.set("checked",e.queryCommandState(c));}}}}catch(e){console.log(e);}}},setEditor:function(_6f7){this.editor=_6f7;this._initButton();if(this.button&&this.useDefaultCommand){if(this.editor.queryCommandAvailable(this.command)){this.connect(this.button,"onClick",lang.hitch(this.editor,"execCommand",this.command,this.commandArg));}else{this.button.domNode.style.display="none";}}this.connect(this.editor,"onNormalizedDisplayChanged","updateState");},setToolbar:function(_6f8){if(this.button){_6f8.addChild(this.button);}},set:function(name,_6f9){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _6fa=this._getAttrNames(name);if(this[_6fa.s]){var _6fb=this[_6fa.s].apply(this,Array.prototype.slice.call(arguments,1));}else{this._set(name,_6f9);}return _6fb||this;},get:function(name){var _6fc=this._getAttrNames(name);return this[_6fc.g]?this[_6fc.g]():this[name];},_setDisabledAttr:function(_6fd){this.disabled=_6fd;this.updateState();},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(name,_6fe){this[name]=_6fe;}});_6ef.registry={};return _6ef;});},"dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_6ff,_700){return _6ff("dijit._Contained",null,{_getSibling:function(_701){var node=this.domNode;do{node=node[_701+"Sibling"];}while(node&&node.nodeType!=1);return node&&_700.byNode(node);},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);}});});},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../_base/Deferred"],function(_702,lang,_703){var _704=function(_705){if(!_705){return _705;}if(_705.then){_705=lang.delegate(_705);}function _706(_707){if(!_705[_707]){_705[_707]=function(){var args=arguments;return _703.when(_705,function(_708){Array.prototype.unshift.call(args,_708);return _704(_702[_707].apply(_702,args));});};}};_706("forEach");_706("filter");_706("map");if(!_705.total){_705.total=_703.when(_705,function(_709){return _709.length;});}return _705;};lang.setObject("dojo.store.util.QueryResults",_704);return _704;});},"dijit/Editor":function(){define("dijit/Editor",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/Deferred","dojo/i18n","dojo/dom-attr","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/string","dojo/topic","dojo/_base/window","./_base/focus","./_Container","./Toolbar","./ToolbarSeparator","./layout/_LayoutWidget","./form/ToggleButton","./_editor/_Plugin","./_editor/plugins/EnterKeyHandling","./_editor/html","./_editor/range","./_editor/RichText","./main","dojo/i18n!./_editor/nls/commands"],function(_70a,_70b,_70c,_70d,i18n,_70e,_70f,_710,_711,_712,keys,lang,has,_713,_714,win,_715,_716,_717,_718,_719,_71a,_71b,_71c,html,_71d,_71e,_71f){var _720=_70c("dijit.Editor",_71e,{plugins:null,extraPlugins:null,constructor:function(){if(!lang.isArray(this.plugins)){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",_71c];}this._plugins=[];this._editInterval=this.editActionInterval*1000;if(has("ie")){this.events.push("onBeforeDeactivate");this.events.push("onBeforeActivate");}},postMixInProperties:function(){this.setValueDeferred=new _70d();this.inherited(arguments);},postCreate:function(){this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);if(lang.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}this.inherited(arguments);this.commands=i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){this.toolbar=new _717({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang});this.header.appendChild(this.toolbar.domNode);}_70b.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(true);_70f.add(this.iframe.parentNode,"dijitEditorIFrameContainer");_70f.add(this.iframe,"dijitEditorIFrame");_70e.set(this.iframe,"allowTransparency",true);if(has("webkit")){_711.set(this.domNode,"KhtmlUserSelect","none");}this.toolbar.startup();this.onNormalizedDisplayChanged();},destroy:function(){_70b.forEach(this._plugins,function(p){if(p&&p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments);},addPlugin:function(_721,_722){var args=lang.isString(_721)?{name:_721}:lang.isFunction(_721)?{ctor:_721}:_721;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};if(args.name){if(_71b.registry[args.name]){o.plugin=_71b.registry[args.name](args);}else{_714.publish(_71f._scopeName+".Editor.getPlugin",o);}}if(!o.plugin){try{var pc=args.ctor||lang.getObject(args.name)||_70a(args.name);if(pc){o.plugin=new pc(args);}}catch(e){throw new Error(this.id+": cannot find plugin ["+args.name+"]");}}if(!o.plugin){throw new Error(this.id+": cannot find plugin ["+args.name+"]");}_721=o.plugin;}if(arguments.length>1){this._plugins[_722]=_721;}else{this._plugins.push(_721);}_721.setEditor(this);if(lang.isFunction(_721.setToolbar)){_721.setToolbar(this.toolbar);}},resize:function(size){if(size){_719.prototype.resize.apply(this,arguments);}},layout:function(){var _723=(this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+_710.getPadBorderExtents(this.iframe.parentNode).h+_710.getMarginExtents(this.iframe.parentNode).h));this.editingArea.style.height=_723+"px";if(this.iframe){this.iframe.style.height="100%";}this._layoutMode=true;},_onIEMouseDown:function(e){var _724;var b=this.document.body;var _725=b.clientWidth;var _726=b.clientHeight;var _727=b.clientLeft;var _728=b.offsetWidth;var _729=b.offsetHeight;var _72a=b.offsetLeft;if(/^rtl$/i.test(b.dir||"")){if(_725<_728&&e.x>_725&&e.x<_728){_724=true;}}else{if(e.x<_727&&e.x>_72a){_724=true;}}if(!_724){if(_726<_729&&e.y>_726&&e.y<_729){_724=true;}}if(!_724){delete this._cursorToStart;delete this._savedSelection;if(e.target.tagName=="BODY"){this.defer("placeCursorAtEnd");}this.inherited(arguments);}},onBeforeActivate:function(){this._restoreSelection();},onBeforeDeactivate:function(e){if(this.customUndo){this.endEditing(true);}if(e.target.tagName!="BODY"){this._saveSelection();}},customUndo:true,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){this._editTimer.remove();}this._editTimer=this.defer("endEditing",this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{if(this.customUndo){this.endEditing();this._beginEditing();}var r=this.inherited(arguments);if(this.customUndo){this._endEditing();}return r;}},_pasteImpl:function(){return this._clipboardCommand("paste");},_cutImpl:function(){return this._clipboardCommand("cut");},_copyImpl:function(){return this._clipboardCommand("copy");},_clipboardCommand:function(cmd){var r;try{r=this.document.execCommand(cmd,false,null);if(has("webkit")&&!r){throw {code:1011};}}catch(e){if(e.code==1011||(e.code==9&&has("opera"))){var sub=_713.substitute,_72b={cut:"X",copy:"C",paste:"V"};alert(sub(this.commands.systemShortcut,[this.commands[cmd],sub(this.commands[has("mac")?"appleKey":"ctrlKey"],[_72b[cmd]])]));}r=false;}return r;},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited(arguments);}},_moveToBookmark:function(b){var _72c=b.mark;var mark=b.mark;var col=b.isCollapsed;var r,_72d,_72e,sel;if(mark){if(has("ie")<9){if(lang.isArray(mark)){_72c=[];_70b.forEach(mark,function(n){_72c.push(_71d.getNode(n,this.editNode));},this);win.withGlobal(this.window,"moveToBookmark",_715,[{mark:_72c,isCollapsed:col}]);}else{if(mark.startContainer&&mark.endContainer){sel=_71d.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_71d.create(this.window);_72d=_71d.getNode(mark.startContainer,this.editNode);_72e=_71d.getNode(mark.endContainer,this.editNode);if(_72d&&_72e){r.setStart(_72d,mark.startOffset);r.setEnd(_72e,mark.endOffset);sel.addRange(r);}}}}}else{sel=_71d.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_71d.create(this.window);_72d=_71d.getNode(mark.startContainer,this.editNode);_72e=_71d.getNode(mark.endContainer,this.editNode);if(_72d&&_72e){r.setStart(_72d,mark.startOffset);r.setEnd(_72e,mark.endOffset);sel.addRange(r);}}}}},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}this._moveToBookmark(b);},undo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._steps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();delete this._undoRedoActive;ret=true;}delete this._undoRedoActive;}return ret;},redo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();ret=true;}delete this._undoRedoActive;}return ret;},endEditing:function(_72f){if(this._editTimer){this._editTimer=this._editTimer.remove();}if(this._inEditing){this._endEditing(_72f);this._inEditing=false;}},_getBookmark:function(){var b=win.withGlobal(this.window,_715.getBookmark);var tmp=[];if(b&&b.mark){var mark=b.mark;if(has("ie")<9){var sel=_71d.getSelection(this.window);if(!lang.isArray(mark)){if(sel){var _730;if(sel.rangeCount){_730=sel.getRangeAt(0);}if(_730){b.mark=_730.cloneRange();}else{b.mark=win.withGlobal(this.window,_715.getBookmark);}}}else{_70b.forEach(b.mark,function(n){tmp.push(_71d.getIndex(n,this.editNode).o);},this);b.mark=tmp;}}try{if(b.mark&&b.mark.startContainer){tmp=_71d.getIndex(b.mark.startContainer,this.editNode).o;b.mark={startContainer:tmp,startOffset:b.mark.startOffset,endContainer:b.mark.endContainer===b.mark.startContainer?tmp:_71d.getIndex(b.mark.endContainer,this.editNode).o,endOffset:b.mark.endOffset};}}catch(e){b.mark=null;}}return b;},_beginEditing:function(){if(this._steps.length===0){this._steps.push({"text":html.getChildrenHtml(this.editNode),"bookmark":this._getBookmark()});}},_endEditing:function(){var v=html.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:v,bookmark:this._getBookmark()});},onKeyDown:function(e){if(!has("ie")&&!this.iframe&&e.keyCode==keys.TAB&&!this.tabIndent){this._saveSelection();}if(!this.customUndo){this.inherited(arguments);return;}var k=e.keyCode;if(e.ctrlKey&&!e.altKey){if(k==90||k==122){_712.stop(e);this.undo();return;}else{if(k==89||k==121){_712.stop(e);this.redo();return;}}}this.inherited(arguments);switch(k){case keys.ENTER:case keys.BACKSPACE:case keys.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");}else{this.beginEditing("paste");}this.defer("endEditing",1);break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<keys.F1||e.keyCode>keys.F15)){this.beginEditing();break;}case keys.ALT:this.endEditing();break;case keys.UP_ARROW:case keys.DOWN_ARROW:case keys.LEFT_ARROW:case keys.RIGHT_ARROW:case keys.HOME:case keys.END:case keys.PAGE_UP:case keys.PAGE_DOWN:this.endEditing(true);break;case keys.CTRL:case keys.SHIFT:case keys.TAB:break;}},_onBlur:function(){this.inherited(arguments);this.endEditing(true);},_saveSelection:function(){try{this._savedSelection=this._getBookmark();}catch(e){}},_restoreSelection:function(){if(this._savedSelection){delete this._cursorToStart;if(win.withGlobal(this.window,"isCollapsed",_715)){this._moveToBookmark(this._savedSelection);}delete this._savedSelection;}},onClick:function(){this.endEditing(true);this.inherited(arguments);},replaceValue:function(html){if(!this.customUndo){this.inherited(arguments);}else{if(this.isClosed){this.setValue(html);}else{this.beginEditing();if(!html){html="&#160;";}this.setValue(html);this.endEditing();}}},_setDisabledAttr:function(_731){this.setValueDeferred.then(lang.hitch(this,function(){if((!this.disabled&&_731)||(!this._buttonEnabledPlugins&&_731)){_70b.forEach(this._plugins,function(p){p.set("disabled",true);});}else{if(this.disabled&&!_731){_70b.forEach(this._plugins,function(p){p.set("disabled",false);});}}}));this.inherited(arguments);},_setStateClass:function(){try{this.inherited(arguments);if(this.document&&this.document.body){_711.set(this.document.body,"color",_711.get(this.iframe,"color"));}}catch(e){}}});function _732(args){return new _71b({command:args.name});};function _733(args){return new _71b({buttonClass:_71a,command:args.name});};lang.mixin(_71b.registry,{"undo":_732,"redo":_732,"cut":_732,"copy":_732,"paste":_732,"insertOrderedList":_732,"insertUnorderedList":_732,"indent":_732,"outdent":_732,"justifyCenter":_732,"justifyFull":_732,"justifyLeft":_732,"justifyRight":_732,"delete":_732,"selectAll":_732,"removeFormat":_732,"unlink":_732,"insertHorizontalRule":_732,"bold":_733,"italic":_733,"underline":_733,"strikethrough":_733,"subscript":_733,"superscript":_733,"|":function(){return new _71b({setEditor:function(_734){this.editor=_734;this.button=new _718({ownerDocument:_734.ownerDocument});}});}});return _720;});},"esri/layers/FeatureEditResult":function(){define("esri/layers/FeatureEditResult",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel"],function(_735,lang,has,_736){var _737=_735(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",_737,_736);}return _737;});},"dijit/Toolbar":function(){define("dijit/Toolbar",["require","dojo/_base/declare","dojo/has","dojo/keys","dojo/ready","./_Widget","./_KeyNavContainer","./_TemplatedMixin"],function(_738,_739,has,keys,_73a,_73b,_73c,_73d){if(has("dijit-legacy-requires")){_73a(0,function(){var _73e=["dijit/ToolbarSeparator"];_738(_73e);});}return _739("dijit.Toolbar",[_73b,_73d,_73c],{templateString:"<div class=\"dijit\" role=\"toolbar\" tabIndex=\"${tabIndex}\" data-dojo-attach-point=\"containerNode\">"+"</div>",baseClass:"dijitToolbar",postCreate:function(){this.inherited(arguments);this.connectKeyNavHandlers(this.isLeftToRight()?[keys.LEFT_ARROW]:[keys.RIGHT_ARROW],this.isLeftToRight()?[keys.RIGHT_ARROW]:[keys.LEFT_ARROW]);}});});},"dijit/form/_ComboBoxMenu":function(){define("dijit/form/_ComboBoxMenu",["dojo/_base/declare","dojo/dom-class","dojo/dom-style","dojo/keys","../_WidgetBase","../_TemplatedMixin","./_ComboBoxMenuMixin","./_ListMouseMixin"],function(_73f,_740,_741,keys,_742,_743,_744,_745){return _73f("dijit.form._ComboBoxMenu",[_742,_743,_745,_744],{templateString:"<div class='dijitReset dijitMenu' data-dojo-attach-point='containerNode' style='overflow: auto; overflow-x: hidden;' role='listbox'>"+"<div class='dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point='previousButton' role='option'></div>"+"<div class='dijitMenuItem dijitMenuNextButton' data-dojo-attach-point='nextButton' role='option'></div>"+"</div>",baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);if(!this.isLeftToRight()){_740.add(this.previousButton,"dijitMenuItemRtl");_740.add(this.nextButton,"dijitMenuItemRtl");}},_createMenuItem:function(){var item=this.ownerDocument.createElement("div");item.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");item.setAttribute("role","option");return item;},onHover:function(node){_740.add(node,"dijitMenuItemHover");},onUnhover:function(node){_740.remove(node,"dijitMenuItemHover");},onSelect:function(node){_740.add(node,"dijitMenuItemSelected");},onDeselect:function(node){_740.remove(node,"dijitMenuItemSelected");},_page:function(up){var _746=0;var _747=this.domNode.scrollTop;var _748=_741.get(this.domNode,"height");if(!this.getHighlightedOption()){this.selectNextNode();}while(_746<_748){var _749=this.getHighlightedOption();if(up){if(!_749.previousSibling||_749.previousSibling.style.display=="none"){break;}this.selectPreviousNode();}else{if(!_749.nextSibling||_749.nextSibling.style.display=="none"){break;}this.selectNextNode();}var _74a=this.domNode.scrollTop;_746+=(_74a-_747)*(up?-1:1);_747=_74a;}},handleKey:function(evt){switch(evt.keyCode){case keys.DOWN_ARROW:this.selectNextNode();return false;case keys.PAGE_DOWN:this._page(false);return false;case keys.UP_ARROW:this.selectPreviousNode();return false;case keys.PAGE_UP:this._page(true);return false;default:return true;}}});});},"dijit/form/_ComboBoxMenuMixin":function(){define("dijit/form/_ComboBoxMenuMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom-attr","dojo/i18n","dojo/i18n!./nls/ComboBox"],function(_74b,_74c,_74d,i18n){return _74c("dijit.form._ComboBoxMenuMixin",null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=i18n.getLocalization("dijit.form","ComboBox",this.lang);},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages["previousMessage"];this.nextButton.innerHTML=this._messages["nextMessage"];},_setValueAttr:function(_74e){this.value=_74e;this.onChange(_74e);},onClick:function(node){if(node==this.previousButton){this._setSelectedAttr(null);this.onPage(-1);}else{if(node==this.nextButton){this._setSelectedAttr(null);this.onPage(1);}else{this.onChange(node);}}},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null);},_createOption:function(item,_74f){var _750=this._createMenuItem();var _751=_74f(item);if(_751.html){_750.innerHTML=_751.label;}else{_750.appendChild(_750.ownerDocument.createTextNode(_751.label));}if(_750.innerHTML==""){_750.innerHTML="&#160;";}this.applyTextDir(_750,(_750.innerText||_750.textContent||""));return _750;},createOptions:function(_752,_753,_754){this.items=_752;this.previousButton.style.display=(_753.start==0)?"none":"";_74d.set(this.previousButton,"id",this.id+"_prev");_74b.forEach(_752,function(item,i){var _755=this._createOption(item,_754);_755.setAttribute("item",i);_74d.set(_755,"id",this.id+i);this.nextButton.parentNode.insertBefore(_755,this.nextButton);},this);var _756=false;if(_752.total&&!_752.total.then&&_752.total!=-1){if((_753.start+_753.count)<_752.total){_756=true;}else{if((_753.start+_753.count)>_752.total&&_753.count==_752.length){_756=true;}}}else{if(_753.count==_752.length){_756=true;}}this.nextButton.style.display=_756?"":"none";_74d.set(this.nextButton,"id",this.id+"_next");},clearResultList:function(){var _757=this.containerNode;while(_757.childNodes.length>2){_757.removeChild(_757.childNodes[_757.childNodes.length-2]);}this._setSelectedAttr(null);},highlightFirstOption:function(){this.selectFirstNode();},highlightLastOption:function(){this.selectLastNode();},selectFirstNode:function(){this.inherited(arguments);if(this.getHighlightedOption()==this.previousButton){this.selectNextNode();}},selectLastNode:function(){this.inherited(arguments);if(this.getHighlightedOption()==this.nextButton){this.selectPreviousNode();}},getHighlightedOption:function(){return this.selected;}});});},"esri/layers/FeatureTemplate":function(){define("esri/layers/FeatureTemplate",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/lang","esri/graphic"],function(_758,lang,has,_759,_75a,_75b){var _75c=_758(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 _75d=json.prototype;this.prototype=new _75b(_75d.geometry,null,_75d.attributes);}},toJson:function(){return _75a.fixJson({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});lang.mixin(_75c,{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",_75c,_759);}return _75c;});},"dijit/form/_Spinner":function(){require({cache:{"url:dijit/form/templates/Spinner.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\tdata-dojo-attach-point=\"upArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\tdata-dojo-attach-point=\"downArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' data-dojo-attach-point=\"textbox,focusNode\" type=\"${type}\" data-dojo-attach-event=\"onkeypress:_onKeyPress\"\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\n\t/></div\n></div>\n"}});define("dijit/form/_Spinner",["dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/mouse","../typematic","./RangeBoundTextBox","dojo/text!./templates/Spinner.html","./_TextBoxMixin"],function(_75e,_75f,keys,lang,has,_760,_761,_762,_763,_764){return _75e("dijit.form._Spinner",_762,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:_763,baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{"upArrowNode":"dijitUpArrowButton","downArrowNode":"dijitDownArrowButton"},adjust:function(val){return val;},_arrowPressed:function(_765,_766,_767){if(this.disabled||this.readOnly){return;}this._setValueAttr(this.adjust(this.get("value"),_766*_767),false);_764.selectInputText(this.textbox,this.textbox.value.length);},_arrowReleased:function(){this._wheelTimer=null;},_typematicCallback:function(_768,node,evt){var inc=this.smallDelta;if(node==this.textbox){var key=evt.charOrCode;inc=(key==keys.PAGE_UP||key==keys.PAGE_DOWN)?this.largeDelta:this.smallDelta;node=(key==keys.UP_ARROW||key==keys.PAGE_UP)?this.upArrowNode:this.downArrowNode;}if(_768==-1){this._arrowReleased(node);}else{this._arrowPressed(node,(node==this.upArrowNode)?1:-1,inc);}},_wheelTimer:null,_mouseWheeled:function(evt){_75f.stop(evt);var _769=evt.wheelDelta/120;if(Math.floor(_769)!=_769){_769=evt.wheelDelta>0?1:-1;}var _76a=evt.detail?(evt.detail*-1):_769;if(_76a!==0){var node=this[(_76a>0?"upArrowNode":"downArrowNode")];this._arrowPressed(node,_76a,this.smallDelta);if(this._wheelTimer){this._wheelTimer.remove();}this._wheelTimer=this.defer(function(){this._arrowReleased(node);},50);}},_setConstraintsAttr:function(_76b){this.inherited(arguments);if(this.focusNode){if(this.constraints.min!==undefined){this.focusNode.setAttribute("aria-valuemin",this.constraints.min);}else{this.focusNode.removeAttribute("aria-valuemin");}if(this.constraints.max!==undefined){this.focusNode.setAttribute("aria-valuemax",this.constraints.max);}else{this.focusNode.removeAttribute("aria-valuemax");}}},_setValueAttr:function(_76c,_76d){this.focusNode.setAttribute("aria-valuenow",_76c);this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,_760.wheel,"_mouseWheeled");this.own(_761.addListener(this.upArrowNode,this.textbox,{charOrCode:keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_761.addListener(this.downArrowNode,this.textbox,{charOrCode:keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_761.addListener(this.upArrowNode,this.textbox,{charOrCode:keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_761.addListener(this.downArrowNode,this.textbox,{charOrCode:keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));}});});},"dijit/form/_AutoCompleterMixin":function(){define("dijit/form/_AutoCompleterMixin",["dojo/data/util/filter","dojo/_base/declare","dojo/dom-attr","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/query","dojo/regexp","dojo/sniff","dojo/string","./DataList","../registry","./_TextBoxMixin","./_SearchMixin"],function(_76e,_76f,_770,_771,keys,lang,_772,_773,has,_774,_775,_776,_777,_778){return _76f("dijit.form._AutoCompleterMixin",_778,{item:null,autoComplete:true,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(_779){var pos=0;if(typeof (_779.selectionStart)=="number"){pos=_779.selectionStart;}else{if(has("ie")){var tr=_779.ownerDocument.selection.createRange().duplicate();var ntr=_779.createTextRange();tr.move("character",0);ntr.move("character",0);try{ntr.setEndPoint("EndToEnd",tr);pos=String(ntr.text).replace(/\r/g,"").length;}catch(e){}}}return pos;},_setCaretPos:function(_77a,_77b){_77b=parseInt(_77b);_777.selectInputText(_77a,_77b,_77b);},_setDisabledAttr:function(_77c){this.inherited(arguments);this.domNode.setAttribute("aria-disabled",_77c?"true":"false");},_onKey:function(evt){if(evt.charCode>=32){return;}var key=evt.charCode||evt.keyCode;if(key==keys.ALT||key==keys.CTRL||key==keys.META||key==keys.SHIFT){return;}var pw=this.dropDown;var _77d=null;this._abortQuery();this.inherited(arguments);if(evt.altKey||evt.ctrlKey||evt.metaKey){return;}if(this._opened){_77d=pw.getHighlightedOption();}switch(key){case keys.PAGE_DOWN:case keys.DOWN_ARROW:case keys.PAGE_UP:case keys.UP_ARROW:if(this._opened){this._announceOption(_77d);}_771.stop(evt);break;case keys.ENTER:if(_77d){if(_77d==pw.nextButton){this._nextSearch(1);_771.stop(evt);break;}else{if(_77d==pw.previousButton){this._nextSearch(-1);_771.stop(evt);break;}}_771.stop(evt);}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length);}case keys.TAB:var _77e=this.get("displayedValue");if(pw&&(_77e==pw._messages["previousMessage"]||_77e==pw._messages["nextMessage"])){break;}if(_77d){this._selectOption(_77d);}case keys.ESCAPE:if(this._opened){this._lastQuery=null;this.closeDropDown();}break;}},_autoCompleteText:function(text){var fn=this.focusNode;_777.selectInputText(fn,fn.value.length);var _77f=this.ignoreCase?"toLowerCase":"substr";if(text[_77f](0).indexOf(this.focusNode.value[_77f](0))==0){var cpos=this.autoComplete?this._getCaretPos(fn):fn.value.length;if((cpos+1)>fn.value.length){fn.value=text;_777.selectInputText(fn,cpos);}}else{fn.value=text;_777.selectInputText(fn);}},_openResultList:function(_780,_781,_782){var _783=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();if(!_780.length&&_782.start==0){this.closeDropDown();return;}this._nextSearch=this.dropDown.onPage=lang.hitch(this,function(_784){_780.nextPage(_784!==-1);this.focus();});this.dropDown.createOptions(_780,_782,lang.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if("direction" in _782){if(_782.direction){this.dropDown.highlightFirstOption();}else{if(!_782.direction){this.dropDown.highlightLastOption();}}if(_783){this._announceOption(this.dropDown.getHighlightedOption());}}else{if(this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(_781[this.searchAttr].toString())){this._announceOption(this.dropDown.containerNode.firstChild.nextSibling);}}},_showResultList:function(){this.closeDropDown(true);this.openDropDown();this.domNode.setAttribute("aria-expanded","true");},loadDropDown:function(){this._startSearchAll();},isLoaded:function(){return false;},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);this.domNode.setAttribute("aria-expanded","false");this.focusNode.removeAttribute("aria-activedescendant");}},_setBlurValue:function(){var _785=this.get("displayedValue");var pw=this.dropDown;if(pw&&(_785==pw._messages["previousMessage"]||_785==pw._messages["nextMessage"])){this._setValueAttr(this._lastValueReported,true);}else{if(typeof this.item=="undefined"){this.item=null;this.set("displayedValue",_785);}else{if(this.value!=this._lastValueReported){this._handleOnChange(this.value,true);}this._refreshState();}}},_setItemAttr:function(item,_786,_787){var _788="";if(item){if(!_787){_787=this.store._oldAPI?this.store.getValue(item,this.searchAttr):item[this.searchAttr];}_788=this._getValueField()!=this.searchAttr?this.store.getIdentity(item):_787;}this.set("value",_788,_786,_787,item);},_announceOption:function(node){if(!node){return;}var _789;if(node==this.dropDown.nextButton||node==this.dropDown.previousButton){_789=node.innerHTML;this.item=undefined;this.value="";}else{var item=this.dropDown.items[node.getAttribute("item")];_789=(this.store._oldAPI?this.store.getValue(item,this.searchAttr):item[this.searchAttr]).toString();this.set("item",item,false,_789);}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",_770.get(node,"id"));this._autoCompleteText(_789);},_selectOption:function(_78a){this.closeDropDown();if(_78a){this._announceOption(_78a);}this._setCaretPos(this.focusNode,this.focusNode.value.length);this._handleOnChange(this.value,true);},_startSearchAll:function(){this._startSearch("");},_startSearchFromInput:function(){this.item=undefined;this.inherited(arguments);},_startSearch:function(key){if(!this.dropDown){var _78b=this.id+"_popup",_78c=lang.isString(this.dropDownClass)?lang.getObject(this.dropDownClass,false):this.dropDownClass;this.dropDown=new _78c({onChange:lang.hitch(this,this._selectOption),id:_78b,dir:this.dir,textDir:this.textDir});this.focusNode.removeAttribute("aria-activedescendant");this.textbox.setAttribute("aria-owns",_78b);}this._lastInput=key;this.inherited(arguments);},_getValueField:function(){return this.searchAttr;},postMixInProperties:function(){this.inherited(arguments);if(!this.store){var _78d=this.srcNodeRef;this.store=new _775({},_78d);if(!("value" in this.params)){var item=(this.item=this.store.fetchSelectedItem());if(item){var _78e=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(item,_78e):item[_78e];}}}},postCreate:function(){var _78f=_772("label[for=\""+this.id+"\"]");if(_78f.length){if(!_78f[0].id){_78f[0].id=this.id+"_label";}this.domNode.setAttribute("aria-labelledby",_78f[0].id);}this.inherited(arguments);this.connect(this,"onSearch","_openResultList");},_getMenuLabelFromItem:function(item){var _790=this.labelFunc(item,this.store),_791=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){_790=this.doHighlight(_790,this._lastInput);_791="html";}return {html:_791=="html",label:_790};},doHighlight:function(_792,find){var _793=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),i=this.queryExpr.indexOf("${0}");find=_773.escapeString(find);return this._escapeHtml(_792.replace(new RegExp((i==0?"^":"")+"("+find+")"+(i==(this.queryExpr.length-4)?"$":""),_793),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,"<span class=\"dijitComboBoxHighlightMatch\">$1</span>");},_escapeHtml:function(str){str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");return str;},reset:function(){this.item=null;this.inherited(arguments);},labelFunc:function(item,_794){return (_794._oldAPI?_794.getValue(item,this.labelAttr||this.searchAttr):item[this.labelAttr||this.searchAttr]).toString();},_setValueAttr:function(_795,_796,_797,item){this._set("item",item||null);if(_795==null){_795="";}this.inherited(arguments);},_setTextDirAttr:function(_798){this.inherited(arguments);if(this.dropDown){this.dropDown._set("textDir",_798);}}});});},"dijit/form/NumberTextBox":function(){define("dijit/form/NumberTextBox",["dojo/_base/declare","dojo/_base/lang","dojo/number","./RangeBoundTextBox"],function(_799,lang,_79a,_79b){var _79c=_799("dijit.form.NumberTextBoxMixin",null,{pattern:_79a.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:_79a.format,postMixInProperties:function(){this.inherited(arguments);this._set("type","text");},_setConstraintsAttr:function(_79d){var _79e=typeof _79d.places=="number"?_79d.places:0;if(_79e){_79e++;}if(typeof _79d.max!="number"){_79d.max=9*Math.pow(10,15-_79e);}if(typeof _79d.min!="number"){_79d.min=-9*Math.pow(10,15-_79e);}this.inherited(arguments,[_79d]);if(this.focusNode&&this.focusNode.value&&!isNaN(this.value)){this.set("value",this.value);}},_onFocus:function(){if(this.disabled){return;}var val=this.get("value");if(typeof val=="number"&&!isNaN(val)){var _79f=this.format(val,this.constraints);if(_79f!==undefined){this.textbox.value=_79f;}}this.inherited(arguments);},format:function(_7a0,_7a1){var _7a2=String(_7a0);if(typeof _7a0!="number"){return _7a2;}if(isNaN(_7a0)){return "";}if(!("rangeCheck" in this&&this.rangeCheck(_7a0,_7a1))&&_7a1.exponent!==false&&/\de[-+]?\d/i.test(_7a2)){return _7a2;}if(this.editOptions&&this.focused){_7a1=lang.mixin({},_7a1,this.editOptions);}return this._formatter(_7a0,_7a1);},_parser:_79a.parse,parse:function(_7a3,_7a4){var v=this._parser(_7a3,lang.mixin({},_7a4,(this.editOptions&&this.focused)?this.editOptions:{}));if(this.editOptions&&this.focused&&isNaN(v)){v=this._parser(_7a3,_7a4);}return v;},_getDisplayedValueAttr:function(){var v=this.inherited(arguments);return isNaN(v)?this.textbox.value:v;},filter:function(_7a5){return (_7a5==null||_7a5==="")?NaN:this.inherited(arguments);},serialize:function(_7a6,_7a7){return (typeof _7a6!="number"||isNaN(_7a6))?"":this.inherited(arguments);},_setBlurValue:function(){var val=lang.hitch(lang.mixin({},this,{focused:true}),"get")("value");this._setValueAttr(val,true);},_setValueAttr:function(_7a8,_7a9,_7aa){if(_7a8!==undefined&&_7aa===undefined){_7aa=String(_7a8);if(typeof _7a8=="number"){if(isNaN(_7a8)){_7aa="";}else{if(("rangeCheck" in this&&this.rangeCheck(_7a8,this.constraints))||this.constraints.exponent===false||!/\de[-+]?\d/i.test(_7aa)){_7aa=undefined;}}}else{if(!_7a8){_7aa="";_7a8=NaN;}else{_7a8=undefined;}}}this.inherited(arguments,[_7a8,_7a9,_7aa]);},_getValueAttr:function(){var v=this.inherited(arguments);if(isNaN(v)&&this.textbox.value!==""){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)&&(new RegExp("^"+_79a._realNumberRegexp(lang.mixin({},this.constraints))+"$").test(this.textbox.value))){var n=Number(this.textbox.value);return isNaN(n)?undefined:n;}else{return undefined;}}else{return v;}},isValid:function(_7ab){if(!this.focused||this._isEmpty(this.textbox.value)){return this.inherited(arguments);}else{var v=this.get("value");if(!isNaN(v)&&this.rangeCheck(v,this.constraints)){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)){return true;}else{return this.inherited(arguments);}}else{return false;}}}});var _7ac=_799("dijit.form.NumberTextBox",[_79b,_79c],{baseClass:"dijitTextBox dijitNumberTextBox"});_7ac.Mixin=_79c;return _7ac;});},"dojo/_base/query":function(){define(["../query","./NodeList"],function(_7ad){return _7ad;});},"dijit/_editor/plugins/LinkDialog":function(){define("dijit/_editor/plugins/LinkDialog",["require","dojo/_base/declare","dojo/dom-attr","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/_base/query","dojo/string","../../_Widget","../_Plugin","../../form/DropDownButton","../range"],function(_7ae,_7af,_7b0,keys,lang,has,_7b1,_7b2,_7b3,_7b4,_7b5,_7b6){var _7b7=_7af("dijit._editor.plugins.LinkDialog",_7b4,{buttonClass:_7b5,useDefaultCommand:false,urlRegExp:"((https?|ftps?|file)\\://|./|../|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]{0,}(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",emailRegExp:"<?(mailto\\:)([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?A-Z^-~]+"+"@"+"((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?)|localhost|^[^-][a-zA-Z0-9_-]*>?",htmlTemplate:"<a href=\"${urlInput}\" _djrealurl=\"${urlInput}\""+" target=\"${targetSelect}\""+">${textInput}</a>",tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,linkDialogTemplate:["<table role='presentation'><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='true' "+"id='${id}_urlInput' name='urlInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='true' id='${id}_textInput' "+"name='textInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_targetSelect'>${target}</label>","</td><td>","<select id='${id}_targetSelect' name='targetSelect' data-dojo-type='dijit.form.Select'>","<option selected='selected' value='_self'>${currentWindow}</option>","<option value='_blank'>${newWindow}</option>","<option value='_top'>${topWindow}</option>","<option value='_parent'>${parentWindow}</option>","</select>","</td></tr><tr><td colspan='2'>","<button data-dojo-type='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button data-dojo-type='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),_initButton:function(){this.inherited(arguments);this.button.loadDropDown=lang.hitch(this,"_loadDropDown");this._connectTagEvents();},_loadDropDown:function(_7b8){_7ae(["dojo/i18n","../../TooltipDialog","../../registry","../../form/Button","../../form/Select","../../form/ValidationTextBox","dojo/i18n!../../nls/common","dojo/i18n!../nls/LinkDialog"],lang.hitch(this,function(i18n,_7b9,_7ba){var _7bb=this;this.tag=this.command=="insertImage"?"img":"a";var _7bc=lang.delegate(i18n.getLocalization("dijit","common",this.lang),i18n.getLocalization("dijit._editor","LinkDialog",this.lang));var _7bd=(this.dropDown=this.button.dropDown=new _7b9({title:_7bc[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:lang.hitch(this,"setValue"),onOpen:function(){_7bb._onOpenDialog();_7b9.prototype.onOpen.apply(this,arguments);},onCancel:function(){setTimeout(lang.hitch(_7bb,"_onCloseDialog"),0);}}));_7bc.urlRegExp=this.urlRegExp;_7bc.id=_7ba.getUniqueId(this.editor.id);this._uniqueId=_7bc.id;this._setContent(_7bd.title+"<div style='border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'></div>"+_7b2.substitute(this.linkDialogTemplate,_7bc));_7bd.startup();this._urlInput=_7ba.byId(this._uniqueId+"_urlInput");this._textInput=_7ba.byId(this._uniqueId+"_textInput");this._setButton=_7ba.byId(this._uniqueId+"_setButton");this.connect(_7ba.byId(this._uniqueId+"_cancelButton"),"onClick",function(){this.dropDown.onCancel();});if(this._urlInput){this.connect(this._urlInput,"onChange","_checkAndFixInput");}if(this._textInput){this.connect(this._textInput,"onChange","_checkAndFixInput");}this._urlRegExp=new RegExp("^"+this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=lang.hitch(this,function(){var _7be=this._urlInput.get("value");return this._urlRegExp.test(_7be)||this._emailRegExp.test(_7be);});this.connect(_7bd.domNode,"onkeypress",function(e){if(e&&e.charOrCode==keys.ENTER&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!this._setButton.get("disabled")){_7bd.onExecute();_7bd.execute(_7bd.get("value"));}}});_7b8();}));},_checkAndFixInput:function(){var self=this;var url=this._urlInput.get("value");var _7bf=function(url){var _7c0=false;var _7c1=false;if(url&&url.length>1){url=lang.trim(url);if(url.indexOf("mailto:")!==0){if(url.indexOf("/")>0){if(url.indexOf("://")===-1){if(url.charAt(0)!=="/"&&url.indexOf("./")&&url.indexOf("../")!==0){if(self._hostRxp.test(url)){_7c0=true;}}}}else{if(self._userAtRxp.test(url)){_7c1=true;}}}}if(_7c0){self._urlInput.set("value","http://"+url);}if(_7c1){self._urlInput.set("value","mailto:"+url);}self._setButton.set("disabled",!self._isValid());};if(this._delayedCheck){clearTimeout(this._delayedCheck);this._delayedCheck=null;}this._delayedCheck=setTimeout(function(){_7bf(url);},250);},_connectTagEvents:function(){this.editor.onLoadDeferred.then(lang.hitch(this,function(){this.connect(this.editor.editNode,"ondblclick",this._onDblClick);}));},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid();},_setContent:function(_7c2){this.dropDown.set({parserScope:"dojo",content:_7c2});},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}return args;},setValue:function(args){this._onCloseDialog();if(has("ie")<9){var sel=_7b6.getSelection(this.editor.window);var _7c3=sel.getRangeAt(0);var a=_7c3.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=this.editor._sCall("getSelectedElement",[this.tag]);}if(a&&(a.nodeName&&a.nodeName.toLowerCase()===this.tag)){if(this.editor.queryCommandEnabled("unlink")){this.editor._sCall("selectElementChildren",[a]);this.editor.execCommand("unlink");}}}args=this._checkValues(args);this.editor.execCommand("inserthtml",_7b2.substitute(this.htmlTemplate,args));_7b1("a",this.editor.document).forEach(function(a){if(!a.innerHTML&&!_7b0.has(a,"name")){a.parentNode.removeChild(a);}},this);},_onCloseDialog:function(){this.editor.focus();},_getCurrentValues:function(a){var url,text,_7c4;if(a&&a.tagName.toLowerCase()===this.tag){url=a.getAttribute("_djrealurl")||a.getAttribute("href");_7c4=a.getAttribute("target")||"_self";text=a.textContent||a.innerText;this.editor._sCall("selectElement",[a,true]);}else{text=this.editor._sCall("getSelectedText");}return {urlInput:url||"",textInput:text||"",targetSelect:_7c4||""};},_onOpenDialog:function(){var a,b,fc;if(has("ie")){var sel=_7b6.getSelection(this.editor.window);if(sel.rangeCount){var _7c5=sel.getRangeAt(0);a=_7c5.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=this.editor._sCall("getSelectedElement",[this.tag]);}if(!a||(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){b=this.editor._sCall("getAncestorElement",[this.tag]);if(b&&(b.nodeName&&b.nodeName.toLowerCase()==this.tag)){a=b;this.editor._sCall("selectElement",[a]);}else{if(_7c5.startContainer===_7c5.endContainer){fc=_7c5.startContainer.firstChild;if(fc&&(fc.nodeName&&fc.nodeName.toLowerCase()==this.tag)){a=fc;this.editor._sCall("selectElement",[a]);}}}}}}else{a=this.editor._sCall("getAncestorElement",[this.tag]);}this.dropDown.reset();this._setButton.set("disabled",true);this.dropDown.set("value",this._getCurrentValues(a));},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_7b0.get(t,"href")){var _7c6=this.editor;this.editor._sCall("selectElement",[t]);_7c6.onDisplayChanged();if(_7c6._updateTimer){_7c6._updateTimer.remove();delete _7c6._updateTimer;}_7c6.onNormalizedDisplayChanged();var _7c7=this.button;setTimeout(function(){_7c7.set("disabled",false);_7c7.loadAndOpenDropDown().then(function(){if(_7c7.dropDown.focus){_7c7.dropDown.focus();}});},10);}}}});var _7c8=_7af("dijit._editor.plugins.ImgLinkDialog",[_7b7],{linkDialogTemplate:["<table role='presentation'><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' regExp='${urlRegExp}' "+"required='true' id='${id}_urlInput' name='urlInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='false' id='${id}_textInput' "+"name='textInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","</td><td>","</td></tr><tr><td colspan='2'>","<button data-dojo-type='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button data-dojo-type='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),htmlTemplate:"<img src=\"${urlInput}\" _djrealurl=\"${urlInput}\" alt=\"${textInput}\" />",tag:"img",_getCurrentValues:function(img){var url,text;if(img&&img.tagName.toLowerCase()===this.tag){url=img.getAttribute("_djrealurl")||img.getAttribute("src");text=img.getAttribute("alt");this.editor._sCall("selectElement",[img,true]);}else{text=this.editor._sCall("getSelectedText",[]);}return {urlInput:url||"",textInput:text||""};},_isValid:function(){return this._urlInput.isValid();},_connectTagEvents:function(){this.inherited(arguments);this.editor.onLoadDeferred.then(lang.hitch(this,function(){this.connect(this.editor.editNode,"onmousedown",this._selectTag);}));},_selectTag:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag){this.editor._sCall("selectElement",[t]);}}},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}if(args&&args.textInput){args.textInput=args.textInput.replace(/"/g,"&quot;");}return args;},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_7b0.get(t,"src")){var _7c9=this.editor;this.editor._sCall("selectElement",[t]);_7c9.onDisplayChanged();if(_7c9._updateTimer){_7c9._updateTimer.remove();delete _7c9._updateTimer;}_7c9.onNormalizedDisplayChanged();var _7ca=this.button;setTimeout(function(){_7ca.set("disabled",false);_7ca.loadAndOpenDropDown().then(function(){if(_7ca.dropDown.focus){_7ca.dropDown.focus();}});},10);}}}});_7b4.registry["createLink"]=function(){return new _7b7({command:"createLink"});};_7b4.registry["insertImage"]=function(){return new _7c8({command:"insertImage"});};_7b7.ImgLinkDialog=_7c8;return _7b7;});},"dojo/data/util/filter":function(){define(["../../_base/lang"],function(lang){var _7cb={};lang.setObject("dojo.data.util.filter",_7cb);_7cb.patternToRegExp=function(_7cc,_7cd){var rxp="^";var c=null;for(var i=0;i<_7cc.length;i++){c=_7cc.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_7cc.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(_7cd){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};return _7cb;});},"*now":function(r){r(["dojo/i18n!*preload*esri/dijit/nls/AttributeInspector-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/AttributeInspector-all",["esri/layers/FeatureLayer","esri/dijit/AttributeInspector"],function(_7ce,_7cf){return {};});