/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

//>>built
require({cache:{"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(_1){return _1.dojox;});},"dojox/grid/_Grid":function(){define(["dojo/_base/kernel","../main","dojo/_base/declare","./_Events","./_Scroller","./_Layout","./_View","./_ViewManager","./_RowManager","./_FocusManager","./_EditManager","./Selection","./_RowSelector","./util","dijit/_Widget","dijit/_TemplatedMixin","dijit/CheckedMenuItem","dojo/text!./resources/_Grid.html","dojo/string","dojo/_base/array","dojo/_base/lang","dojo/_base/sniff","dojox/html/metrics","dojo/_base/html","dojo/query","dojo/dnd/common","dojo/i18n!dijit/nls/loading"],function(_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15,_16,has,_17,_18,_19){if(!_2.isCopyKey){_2.isCopyKey=_2.dnd.getCopyKeyState;}var _1a=_4("dojox.grid._Grid",[_10,_11,_5],{templateString:_13,classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,sortInfo:0,themeable:true,_placeholders:null,_layoutClass:_7,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex")){this.domNode.tabIndex="0";}this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");_17.initOnFontResize();this.connect(_17,"onFontResize","textSizeChanged");_f.funnelEvents(this.domNode,this,"doKeyEvent",_f.keyEvents);if(this.selectionMode!="none"){this.domNode.setAttribute("aria-multiselectable",this.selectionMode=="single"?"false":"true");}_18.addClass(this.domNode,this.classTag);if(!this.isLeftToRight()){_18.addClass(this.domNode,this.classTag+"Rtl");}},postMixInProperties:function(){this.inherited(arguments);var _1b=_2.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=_14.substitute(this.loadingMessage,_1b);this.errorMessage=_14.substitute(this.errorMessage,_1b);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0;},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);if(this.domNode&&this.autoWidth&&this.initialWidth){this.domNode.style.width=this.initialWidth;}if(this.domNode&&!this.editable){_18.attr(this.domNode,"aria-readonly","true");}},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;if(this.scroller){this.scroller.destroy();delete this.scroller;}this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.focus){this.focus.destroy();delete this.focus;}if(this.headerMenu&&this._placeholders.length){_15.forEach(this._placeholders,function(p){p.unReplace(true);});this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.inherited(arguments);},_setAutoHeightAttr:function(ah,_1c){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);}}}if(typeof ah=="number"){if(isNaN(ah)){ah=false;}if(ah<0){ah=true;}else{if(ah===0){ah=false;}}}this.autoHeight=ah;if(typeof ah=="boolean"){this._autoHeight=ah;}else{if(typeof ah=="number"){this._autoHeight=(ah>=this.get("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_1c){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},textSizeChanged:function(){this.render();},sizeChange:function(){this.update();},createManagers:function(){this.rows=new _a(this);this.focus=new _b(this);this.edit=new _c(this);},createSelection:function(){this.selection=new _d(this);},createScroller:function(){this.scroller=new _6();this.scroller.grid=this;this.scroller.renderRow=_16.hitch(this,"renderRow");this.scroller.removeRow=_16.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.update();},onResizeColumn:function(_1d){},createViews:function(){this.views=new _9(this);this.views.createView=_16.hitch(this,"createView");},createView:function(_1e,idx){var c=_16.getObject(_1e);var _1f=new c({grid:this,index:idx});this.viewsNode.appendChild(_1f.domNode);this.viewsHeaderNode.appendChild(_1f.headerNode);this.views.addView(_1f);_18.attr(this.domNode,"align",this.isLeftToRight()?"left":"right");return _1f;},buildViews:function(){for(var i=0,vs;(vs=this.layout.structure[i]);i++){this.createView(vs.type||_3._scopeName+".grid._View",i).setStructure(vs);}this.scroller.setContentNodes(this.views.getContentNodes());},_setStructureAttr:function(_20){var s=_20;if(s&&_16.isString(s)){_2.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0");s=_16.getObject(s);}this.structure=s;if(!s){if(this.layout.structure){s=this.layout.structure;}else{return;}}this.views.destroyViews();this.focus.focusView=null;if(s!==this.layout.structure){this.layout.setStructure(s);}this._structureChanged();},setStructure:function(_21){_2.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(_21);},getColumnTogglingItems:function(){var _22,_23=[];_22=_15.map(this.layout.cells,function(_24){if(!_24.menuItems){_24.menuItems=[];}var _25=this;var _26=new _12({label:_24.name,checked:!_24.hidden,_gridCell:_24,onChange:function(_27){if(_25.layout.setColumnVisibility(this._gridCell.index,_27)){var _28=this._gridCell.menuItems;if(_28.length>1){_15.forEach(_28,function(_29){if(_29!==this){_29.setAttribute("checked",_27);}},this);}_27=_15.filter(_25.layout.cells,function(c){if(c.menuItems.length>1){_15.forEach(c.menuItems,"item.set('disabled', false);");}else{c.menuItems[0].set("disabled",false);}return !c.hidden;});if(_27.length==1){_15.forEach(_27[0].menuItems,"item.set('disabled', true);");}}},destroy:function(){var _2a=_15.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_2a,1);delete this._gridCell;_12.prototype.destroy.apply(this,arguments);}});_24.menuItems.push(_26);if(!_24.hidden){_23.push(_26);}return _26;},this);if(_23.length==1){_23[0].set("disabled",true);}return _22;},_setHeaderMenuAttr:function(_2b){if(this._placeholders&&this._placeholders.length){_15.forEach(this._placeholders,function(p){p.unReplace(true);});this._placeholders=[];}if(this.headerMenu){this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.headerMenu=_2b;if(!_2b){return;}this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders){this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel);}},setHeaderMenu:function(_2c){_2.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(_2c);},setupHeaderMenu:function(){if(this._placeholders&&this._placeholders.length){_15.forEach(this._placeholders,function(p){if(p._replaced){p.unReplace(true);}p.replace(this.getColumnTogglingItems());},this);}},_fetch:function(_2d){this.setScrollTop(0);},getItem:function(_2e){return null;},showMessage:function(_2f){if(_2f){this.messagesNode.innerHTML=_2f;this.messagesNode.style.display="";}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none";}},_structureChanged:function(){this.buildViews();if(this.autoRender&&this._started){this.render();}},hasLayout:function(){return this.layout.cells.length;},resize:function(_30,_31){this._pendingChangeSize=_30;this._pendingResultSize=_31;this.sizeChange();},_getPadBorder:function(){this._padBorder=this._padBorder||_18._getPadBorderExtents(this.domNode);return this._padBorder;},_getHeaderHeight:function(){var vns=this.viewsHeaderNode.style,t=vns.display=="none"?0:this.views.measureHeader();vns.height=t+"px";this.views.normalizeHeaderNodeHeight();return t;},_resize:function(_32,_33){_32=_32||this._pendingChangeSize;_33=_33||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(!this.domNode){return;}var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _34=this._getPadBorder();var hh=undefined;var h;if(this._autoHeight){this.domNode.style.height="auto";}else{if(typeof this.autoHeight=="number"){h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.domNode.clientHeight<=_34.h){if(pn==document.body){this.domNode.style.height=this.defaultHeight;}else{if(this.height){this.domNode.style.height=this.height;}else{this.fitTo="parent";}}}}}if(_33){_32=_33;}if(!this._autoHeight&&_32){_18.marginBox(this.domNode,_32);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){h=this._parentContentBoxHeight=(this._parentContentBoxHeight>0?this._parentContentBoxHeight:_18._getContentBox(pn).h);this.domNode.style.height=Math.max(0,h)+"px";}}var _35=_15.some(this.views.views,function(v){return v.flexCells;});if(!this._autoHeight&&(h||_18._getContentBox(this.domNode).h)===0){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";if(!_35&&hh===undefined){hh=this._getHeaderHeight();}}if(_35){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _36=(!this.initialWidth&&this.autoWidth);var w=_36?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_36){this.domNode.style.width=vw+"px";}},adaptHeight:function(_37){var t=_37===undefined?this._getHeaderHeight():_37;var h=(this._autoHeight?-1:Math.max(this.domNode.clientHeight-t,0)||0);this.views.onEach("setSize",[0,h]);this.views.onEach("adaptHeight");if(!this._autoHeight){var _38=0,_39=0;var _3a=_15.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_38++;}else{_39++;}return (!has);});if(_38>0&&_39>0){_15.forEach(_3a,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount"))){this.scroller.windowHeight=h;}else{this.scroller.windowHeight=Math.max(this.domNode.clientHeight-t,0);}},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.autoRender){this.render();}},render:function(){if(!this.domNode){return;}if(!this._started){return;}if(!this.hasLayout()){this.scroller.init(0,this.keepRows,this.rowsPerPage);return;}this.update=this.defaultUpdate;this._render();},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender();},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize();},postrender:function(){this.postresize();this.focus.initFocusView();_18.setSelectable(this.domNode,this.selectable);},postresize:function(){if(this._autoHeight){var _3b=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=_3b;}},renderRow:function(_3c,_3d){this.views.renderRow(_3c,_3d,this._skipRowRenormalize);},rowRemoved:function(_3e){this.views.rowRemoved(_3e);},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true;},endUpdate:function(){this.updating=false;var i=this.invalidated,r;if(i.all){this.update();}else{if(i.rowCount!=undefined){this.updateRowCount(i.rowCount);}else{for(r in i){this.updateRow(Number(r));}}}this.invalidated=[];},defaultUpdate:function(){if(!this.domNode||this.edit._noUpdate){return;}if(this.updating){this.invalidated.all=true;return;}this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(this.lastScrollTop);this.postrender();},update:function(){this.render();},updateRow:function(_3f){_3f=Number(_3f);if(this.updating){this.invalidated[_3f]=true;}else{this.views.updateRow(_3f);this.scroller.rowHeightChanged(_3f);}},updateRows:function(_40,_41){_40=Number(_40);_41=Number(_41);var i;if(this.updating){for(i=0;i<_41;i++){this.invalidated[i+_40]=true;}}else{for(i=0;i<_41;i++){this.views.updateRow(i+_40,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_40);}},updateRowCount:function(_42){if(this.updating){this.invalidated.rowCount=_42;}else{this.rowCount=_42;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_42);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_43){this.views.updateRowStyles(_43);},getRowNode:function(_44){if(this.focus.focusView&&!(this.focus.focusView instanceof _e)){return this.focus.focusView.rowNodes[_44];}else{for(var i=0,_45;(_45=this.views.views[i]);i++){if(!(_45 instanceof _e)){return _45.rowNodes[_44];}}}return null;},rowHeightChanged:function(_46){this.views.renormalizeRow(_46);this.scroller.rowHeightChanged(_46);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(has("ie")?100:50),scrollTo:function(_47){if(!this.fastScroll){this.setScrollTop(_47);return;}var _48=Math.abs(this.lastScrollTop-_47);this.lastScrollTop=_47;if(_48>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_47;this.views.setScrollTop(_47);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _49=this;this._pendingScroll=window.setTimeout(function(){delete _49._pendingScroll;_49.finishScrollJob();},200);}else{this.setScrollTop(_47);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_4a){this.scroller.scroll(this.views.setScrollTop(_4a));},scrollToRow:function(_4b){this.setScrollTop(this.scroller.findScrollTop(_4b)+1);},styleRowNode:function(_4c,_4d){if(_4d){this.rows.styleRowNode(_4c,_4d);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_4e){return this.layout.cells[_4e];},setCellWidth:function(_4f,_50){this.getCell(_4f).unitWidth=_50;},getCellName:function(_51){return "Cell "+_51.index;},canSort:function(_52){},sort:function(){},getSortAsc:function(_53){_53=_53==undefined?this.sortInfo:_53;return Boolean(_53>0);},getSortIndex:function(_54){_54=_54==undefined?this.sortInfo:_54;return Math.abs(_54)-1;},setSortIndex:function(_55,_56){var si=_55+1;if(_56!=undefined){si*=(_56?1:-1);}else{if(this.getSortIndex()==_55){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_57){if(this.canSort(_57)){this.sortInfo=_57;this.sort();this.update();}},doKeyEvent:function(e){e.dispatch="do"+e.type;this.onKeyEvent(e);},_dispatch:function(m,e){if(m in this){return this[m](e);}return false;},dispatchKeyEvent:function(e){this._dispatch(e.dispatch,e);},dispatchContentEvent:function(e){this.edit.dispatchEvent(e)||e.sourceView.dispatchContentEvent(e)||this._dispatch(e.dispatch,e);},dispatchHeaderEvent:function(e){e.sourceView.dispatchHeaderEvent(e)||this._dispatch("doheader"+e.type,e);},dokeydown:function(e){this.onKeyDown(e);},doclick:function(e){if(e.cellNode){this.onCellClick(e);}else{this.onRowClick(e);}},dodblclick:function(e){if(e.cellNode){this.onCellDblClick(e);}else{this.onRowDblClick(e);}},docontextmenu:function(e){if(e.cellNode){this.onCellContextMenu(e);}else{this.onRowContextMenu(e);}},doheaderclick:function(e){if(e.cellNode){this.onHeaderCellClick(e);}else{this.onHeaderClick(e);}},doheaderdblclick:function(e){if(e.cellNode){this.onHeaderCellDblClick(e);}else{this.onHeaderDblClick(e);}},doheadercontextmenu:function(e){if(e.cellNode){this.onHeaderCellContextMenu(e);}else{this.onHeaderContextMenu(e);}},doStartEdit:function(_58,_59){this.onStartEdit(_58,_59);},doApplyCellEdit:function(_5a,_5b,_5c){this.onApplyCellEdit(_5a,_5b,_5c);},doCancelEdit:function(_5d){this.onCancelEdit(_5d);},doApplyEdit:function(_5e){this.onApplyEdit(_5e);},addRow:function(){this.updateRowCount(this.get("rowCount")+1);},removeSelectedRows:function(){if(this.allItemsSelected){this.updateRowCount(0);}else{this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));}this.selection.clear();}});_1a.markupFactory=function(_5f,_60,_61,_62){var _63=function(n){var w=_18.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w,10)+"px";}return w;};if(!_5f.structure&&_60.nodeName.toLowerCase()=="table"){_5f.structure=_19("> colgroup",_60).map(function(cg){var sv=_18.attr(cg,"span");var v={noscroll:(_18.attr(cg,"noscroll")=="true")?true:false,__span:(!!sv?parseInt(sv,10):1),cells:[]};if(_18.hasAttr(cg,"width")){v.width=_63(cg);}return v;});if(!_5f.structure.length){_5f.structure.push({__span:Infinity,cells:[]});}_19("thead > tr",_60).forEach(function(tr,_64){var _65=0;var _66=0;var _67;var _68=null;_19("> th",tr).map(function(th){if(!_68){_67=0;_68=_5f.structure[0];}else{if(_65>=(_67+_68.__span)){_66++;_67+=_68.__span;var _69=_68;_68=_5f.structure[_66];}}var _6a={name:_16.trim(_18.attr(th,"name")||th.innerHTML),colSpan:parseInt(_18.attr(th,"colspan")||1,10),type:_16.trim(_18.attr(th,"cellType")||""),id:_16.trim(_18.attr(th,"id")||"")};_65+=_6a.colSpan;var _6b=_18.attr(th,"rowspan");if(_6b){_6a.rowSpan=_6b;}if(_18.hasAttr(th,"width")){_6a.width=_63(th);}if(_18.hasAttr(th,"relWidth")){_6a.relWidth=window.parseInt(_18.attr(th,"relWidth"),10);}if(_18.hasAttr(th,"hidden")){_6a.hidden=(_18.attr(th,"hidden")=="true"||_18.attr(th,"hidden")===true);}if(_62){_62(th,_6a);}_6a.type=_6a.type?_16.getObject(_6a.type):_3.grid.cells.Cell;if(_6a.type&&_6a.type.markupFactory){_6a.type.markupFactory(th,_6a);}if(!_68.cells[_64]){_68.cells[_64]=[];}_68.cells[_64].push(_6a);});});}return new _61(_5f,_60);};return _1a;});},"dojox/grid/_Events":function(){define(["dojo/keys","dojo/dom-class","dojo/_base/declare","dojo/_base/event","dojo/_base/sniff"],function(_6c,_6d,_6e,_6f,has){return _6e("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(e){this.dispatchKeyEvent(e);},onContentEvent:function(e){this.dispatchContentEvent(e);},onHeaderEvent:function(e){this.dispatchHeaderEvent(e);},onStyleRow:function(_70){var i=_70;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_70);this.edit.styleRow(_70);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var _71;switch(e.keyCode){case _6c.ESCAPE:this.edit.cancel();break;case _6c.ENTER:if(!this.edit.isEditing()){_71=this.focus.getHeaderIndex();if(_71>=0){this.setSortIndex(_71);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}_6f.stop(e);}if(!e.shiftKey){var _72=this.edit.isEditing();this.edit.apply();if(!_72){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _73=this.focus.focusView||this.views.views[0];_73.content.decorateEvent(e);this.onRowClick(e);_6f.stop(e);}break;case _6c.SPACE:if(!this.edit.isEditing()){_71=this.focus.getHeaderIndex();if(_71>=0){this.setSortIndex(_71);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);this.focus._focusifyCellNode(true);this.focus.setFocusCell(this.focus.cell,this.focus.rowIndex);}_6f.stop(e);}break;case _6c.TAB:this.focus[e.shiftKey?"previousKey":"nextKey"](e);break;case _6c.LEFT_ARROW:case _6c.RIGHT_ARROW:if(!this.edit.isEditing()){var _74=e.keyCode;_6f.stop(e);_71=this.focus.getHeaderIndex();if(_71>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_71,(_74==_6c.LEFT_ARROW?-1:1)*5);}else{var _75=(_74==_6c.LEFT_ARROW)?1:-1;if(this.isLeftToRight()){_75*=-1;}this.focus.move(0,_75);}}break;case _6c.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_6f.stop(e);this.focus.move(-1,0);}break;case _6c.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_6f.stop(e);this.focus.move(1,0);}break;case _6c.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_6f.stop(e);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1){this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0);}}break;case _6c.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_6f.stop(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;default:break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){_6d.add(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){_6d.remove(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}if(this._click.length>1&&this._click[0]==null){this._click.shift();}this.onRowClick(e);},onCellDblClick:function(e){var _76;if(this._click.length>1&&has("ie")){_76=this._click[1];}else{if(this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex){_76=this._click[0];}else{_76=e;}}this.focus.setFocusCell(_76.cell,_76.rowIndex);this.edit.setEditCell(_76.cell,_76.rowIndex);this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_77,_78){this.edit.cellFocus(_77,_78);},onRowClick:function(e){this.edit.rowClick(e);this.selection.clickSelectEvent(e);},onRowDblClick:function(e){},onRowMouseOver:function(e){},onRowMouseOut:function(e){},onRowMouseDown:function(e){},onRowContextMenu:function(e){_6f.stop(e);},onHeaderMouseOver:function(e){},onHeaderMouseOut:function(e){},onHeaderCellMouseOver:function(e){if(e.cellNode){_6d.add(e.cellNode,this.cellOverClass);}},onHeaderCellMouseOut:function(e){if(e.cellNode){_6d.remove(e.cellNode,this.cellOverClass);}},onHeaderCellMouseDown:function(e){},onHeaderClick:function(e){},onHeaderCellClick:function(e){this.setSortIndex(e.cell.index);this.onHeaderClick(e);},onHeaderDblClick:function(e){},onHeaderCellDblClick:function(e){this.onHeaderDblClick(e);},onHeaderCellContextMenu:function(e){this.onHeaderContextMenu(e);},onHeaderContextMenu:function(e){if(!this.headerMenu){_6f.stop(e);}},onStartEdit:function(_79,_7a){},onApplyCellEdit:function(_7b,_7c,_7d){},onCancelEdit:function(_7e){},onApplyEdit:function(_7f){},onCanSelect:function(_80){return true;},onCanDeselect:function(_81){return true;},onSelected:function(_82){this.updateRowStyles(_82);},onDeselected:function(_83){this.updateRowStyles(_83);},onSelectionChanged:function(){}});});},"dojox/grid/_Scroller":function(){define(["dijit/registry","dojo/_base/declare","dojo/_base/lang","./util","dojo/_base/html"],function(_84,_85,_86,_87,_88){var _89=function(_8a){var i=0,n,p=_8a.parentNode;while((n=p.childNodes[i++])){if(n==_8a){return i-1;}}return -1;};var _8b=function(_8c){if(!_8c){return;}dojo.forEach(_84.toArray(),function(w){if(w.domNode&&_88.isDescendant(w.domNode,_8c,true)){w.destroy();}});};var _8d=function(_8e){var _8f=_88.byId(_8e);return (_8f&&_8f.tagName?_8f.tagName.toLowerCase():"");};var _90=function(_91,_92){var _93=[];var i=0,n;while((n=_91.childNodes[i])){i++;if(_8d(n)==_92){_93.push(n);}}return _93;};var _94=function(_95){return _90(_95,"div");};return _85("dojox.grid._Scroller",null,{constructor:function(_96){this.setContentNodes(_96);this.pageHeights=[];this.pageNodes=[];this.stack=[];},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(_97,_98,_99){switch(arguments.length){case 3:this.rowsPerPage=_99;case 2:this.keepRows=_98;case 1:this.rowCount=_97;default:break;}this.defaultPageHeight=this.defaultRowHeight*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=_86.hitch(this,"onscroll");}},_getPageCount:function(_9a,_9b){return _9a?(Math.ceil(_9a/_9b)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_9c){this.keepRows=_9c;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_9d){this.contentNodes=_9d;this.colCount=(this.contentNodes?this.contentNodes.length:0);this.pageNodes=[];for(var i=0;i<this.colCount;i++){this.pageNodes[i]=[];}},getDefaultNodes:function(){return this.pageNodes[0]||[];},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();this._invalidating=false;},updateRowCount:function(_9e){this.invalidateNodes();this.rowCount=_9e;var _9f=this.pageCount;if(_9f===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_9f){for(var i=_9f-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_9f){this.height+=this.defaultPageHeight*(this.pageCount-_9f-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_a0){return Boolean(this.getDefaultPageNode(_a0));},measurePage:function(_a1){if(this.grid.rowHeight){var _a2=this.grid.rowHeight+1;return ((_a1+1)*this.rowsPerPage>this.rowCount?this.rowCount-_a1*this.rowsPerPage:this.rowsPerPage)*_a2;}var n=this.getDefaultPageNode(_a1);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_a3,_a4){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_a3].style.top=_a4+"px";}},repositionPages:function(_a5){var _a6=this.getDefaultNodes();var _a7=0;for(var i=0;i<this.stack.length;i++){_a7=Math.max(this.stack[i],_a7);}var n=_a6[_a5];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_a5):0);for(var p=_a5+1;p<=_a7;p++){n=_a6[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_a8){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_a8]);}},preparePage:function(_a9,_aa){var p=(_aa?this.popPage():null);for(var i=0;i<this.colCount;i++){var _ab=this.pageNodes[i];var _ac=(p===null?this.createPageNode():this.invalidatePageNode(p,_ab));_ac.pageIndex=_a9;_ab[_a9]=_ac;}},renderPage:function(_ad){var _ae=[];var i,j;for(i=0;i<this.colCount;i++){_ae[i]=this.pageNodes[i][_ad];}for(i=0,j=_ad*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_ae);}},removePage:function(_af){for(var i=0,j=_af*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_b0){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_b0,this.pageNodes[i]);if(n){_88.destroy(n);}}},pacify:function(_b1){},pacifying:false,pacifyTicks:200,setPacifying:function(_b2){if(this.pacifying!=_b2){this.pacifying=_b2;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _b3=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _b3;},endPacify:function(){this.setPacifying(false);},resize:function(){if(this.scrollboxNode){this.windowHeight=this.scrollboxNode.clientHeight;}for(var i=0;i<this.colCount;i++){_87.setStyleHeightPx(this.contentNodes[i],Math.max(1,this.height));}var _b4=(!this._invalidating);if(!_b4){var ah=this.grid.get("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_b4=true;}}if(_b4){this.needPage(this.page,this.pageTop);}var _b5=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _b6=this.getPageHeight(this.page);this.averageRowHeight=(_b6>0&&_b5>0)?(_b6/_b5):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _b7=this.pageCount-1;var _b8=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_b7]=_b8;return _b8;},updateContentHeight:function(_b9){this.height+=_b9;this.resize();},updatePageHeight:function(_ba,_bb,_bc){if(this.pageExists(_ba)){var oh=this.getPageHeight(_ba);var h=(this.measurePage(_ba));if(h===undefined){h=oh;}this.pageHeights[_ba]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.get("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_bb)){if(!_bc){this.grid.sizeChange();}else{var ns=this.grid.viewsNode.style;ns.height=parseInt(ns.height)+h-oh+"px";this.repositionPages(_ba);}}else{this.repositionPages(_ba);}}return h;}return 0;},rowHeightChanged:function(_bd,_be){this.updatePageHeight(Math.floor(_bd/this.rowsPerPage),false,_be);},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");_88.attr(p,"role","presentation");p.style.position="absolute";p.style[this.grid.isLeftToRight()?"left":"right"]="0";return p;},getPageHeight:function(_bf){var ph=this.pageHeights[_bf];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_c0){return this.stack.push(_c0);},popPage:function(){return this.stack.shift();},findPage:function(_c1){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_c1){break;}}this.page=i;this.pageTop=h;},buildPage:function(_c2,_c3,_c4){this.preparePage(_c2,_c3);this.positionPage(_c2,_c4);this.installPage(_c2);this.renderPage(_c2);this.pushPage(_c2);},needPage:function(_c5,_c6){var h=this.getPageHeight(_c5),oh=h;if(!this.pageExists(_c5)){this.buildPage(_c5,(!this.grid._autoHeight&&this.keepPages&&(this.stack.length>=this.keepPages)),_c6);h=this.updatePageHeight(_c5,true);}else{this.positionPage(_c5,_c6);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_c7){this.grid.scrollTop=_c7;if(this.colCount){this.startPacify();this.findPage(_c7);var h=this.height;var b=this.getScrollBottom(_c7);for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){y+=this.needPage(p,y);}this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,_c7);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_c8){return (this.windowHeight>=0?_c8+this.windowHeight:-1);},processNodeEvent:function(e,_c9){var t=e.target;while(t&&(t!=_c9)&&t.parentNode&&(t.parentNode.parentNode!=_c9)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_c9)){return false;}var _ca=t.parentNode;e.topRowIndex=_ca.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_89(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_cb,_cc){},removeRow:function(_cd){},getDefaultPageNode:function(_ce){return this.getDefaultNodes()[_ce];},positionPageNode:function(_cf,_d0){},getPageNodePosition:function(_d1){return _d1.offsetTop;},invalidatePageNode:function(_d2,_d3){var p=_d3[_d2];if(p){delete _d3[_d2];this.removePage(_d2,p);_8b(p);p.innerHTML="";}return p;},getPageRow:function(_d4){return _d4*this.rowsPerPage;},getLastPageRow:function(_d5){return Math.min(this.rowCount,this.getPageRow(_d5+1))-1;},getFirstVisibleRow:function(_d6,_d7,_d8){if(!this.pageExists(_d6)){return 0;}var row=this.getPageRow(_d6);var _d9=this.getDefaultNodes();var _da=_94(_d9[_d6]);for(var i=0,l=_da.length;i<l&&_d7<_d8;i++,row++){_d7+=_da[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_db,_dc,_dd){if(!this.pageExists(_db)){return 0;}var _de=this.getDefaultNodes();var row=this.getLastPageRow(_db);var _df=_94(_de[_db]);for(var i=_df.length-1;i>=0&&_dc>_dd;i--,row--){_dc-=_df[i].offsetHeight;}return row+1;},findTopRow:function(_e0){var _e1=this.getDefaultNodes();var _e2=_94(_e1[this.page]);for(var i=0,l=_e2.length,t=this.pageTop,h;i<l;i++){h=_e2[i].offsetHeight;t+=h;if(t>=_e0){this.offset=h-(t-_e0);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_e3){var _e4=Math.floor(_e3/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_e4;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.page=_e4;this.needPage(_e4,this.pageTop);var _e5=this.getDefaultNodes();var _e6=_94(_e5[_e4]);var r=_e3-this.rowsPerPage*_e4;for(i=0,l=_e6.length;i<l&&i<r;i++){t+=_e6[i].offsetHeight;}return t;},dummy:0});});},"dijit/registry":function(){define("dijit/registry",["dojo/_base/array","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window","."],function(_e7,has,_e8,win,_e9){var _ea={},_eb={};var _ec={length:0,add:function(_ed){if(_eb[_ed.id]){throw new Error("Tried to register widget with id=="+_ed.id+" but that id is already registered");}_eb[_ed.id]=_ed;this.length++;},remove:function(id){if(_eb[id]){delete _eb[id];this.length--;}},byId:function(id){return typeof id=="string"?_eb[id]:id;},byNode:function(_ee){return _eb[_ee.getAttribute("widgetId")];},toArray:function(){var ar=[];for(var id in _eb){ar.push(_eb[id]);}return ar;},getUniqueId:function(_ef){var id;do{id=_ef+"_"+(_ef in _ea?++_ea[_ef]:_ea[_ef]=0);}while(_eb[id]);return _e9._scopeName=="dijit"?id:_e9._scopeName+"_"+id;},findWidgets:function(_f0){var _f1=[];function _f2(_f3){for(var _f4=_f3.firstChild;_f4;_f4=_f4.nextSibling){if(_f4.nodeType==1){var _f5=_f4.getAttribute("widgetId");if(_f5){var _f6=_eb[_f5];if(_f6){_f1.push(_f6);}}else{_f2(_f4);}}}};_f2(_f0);return _f1;},_destroyAll:function(){_e9._curFocus=null;_e9._prevFocus=null;_e9._activeStack=[];_e7.forEach(_ec.findWidgets(win.body()),function(_f7){if(!_f7._destroyed){if(_f7.destroyRecursive){_f7.destroyRecursive();}else{if(_f7.destroy){_f7.destroy();}}}});},getEnclosingWidget:function(_f8){while(_f8){var id=_f8.getAttribute&&_f8.getAttribute("widgetId");if(id){return _eb[id];}_f8=_f8.parentNode;}return null;},_hash:_eb};_e9.registry=_ec;return _ec;});},"dijit/main":function(){define("dijit/main",["dojo/_base/kernel"],function(_f9){return _f9.dijit;});},"dojox/grid/util":function(){define(["../main","dojo/_base/lang","dojo/dom"],function(_fa,_fb,dom){var dgu=_fb.getObject("grid.util",true,_fa);dgu.na="...";dgu.rowIndexTag="gridRowIndex";dgu.gridViewTag="gridView";dgu.fire=function(ob,ev,_fc){var fn=ob&&ev&&ob[ev];return fn&&(_fc?fn.apply(ob,_fc):ob[ev]());};dgu.setStyleHeightPx=function(_fd,_fe){if(_fe>=0){var s=_fd.style;var v=_fe+"px";if(_fd&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_ff,_100,_101,_102){var evts=(_102?_102:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_100.connect(_ff,"on"+evts[i],_101);}};dgu.removeNode=function(_103){_103=dom.byId(_103);_103&&_103.parentNode&&_103.parentNode.removeChild(_103);return _103;};dgu.arrayCompare=function(inA,inB){for(var i=0,l=inA.length;i<l;i++){if(inA[i]!=inB[i]){return false;}}return (inA.length==inB.length);};dgu.arrayInsert=function(_104,_105,_106){if(_104.length<=_105){_104[_105]=_106;}else{_104.splice(_105,0,_106);}};dgu.arrayRemove=function(_107,_108){_107.splice(_108,1);};dgu.arraySwap=function(_109,inI,inJ){var _10a=_109[inI];_109[inI]=_109[inJ];_109[inJ]=_10a;};return _fa.grid.util;});},"dojox/grid/_Layout":function(){define(["dojo/_base/kernel","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-geometry","./cells","./_RowSelector"],function(dojo,_10b,_10c,_10d,lang,_10e){return _10c("dojox.grid._Layout",null,{constructor:function(_10f){this.grid=_10f;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_110,_111,_112,_113,_114){var _115=this.structure[_110].cells[0];var _116=this.structure[_111].cells[0];var cell=null;var _117=0;var _118=0;for(var i=0,c;c=_115[i];i++){if(c.index==_112){_117=i;break;}}cell=_115.splice(_117,1)[0];cell.view=this.grid.views.views[_111];for(i=0,c=null;c=_116[i];i++){if(c.index==_113){_118=i;break;}}if(!_114){_118+=1;}_116.splice(_118,0,cell);var _119=this.grid.getCell(this.grid.getSortIndex());if(_119){_119._currentlySorted=this.grid.getSortAsc();}this.cells=[];_112=0;var v;for(i=0;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0;c=cs[k];k++){c.index=_112;this.cells.push(c);if("_currentlySorted" in c){var si=_112+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_112++;}}}_10d.forEach(this.cells,function(c){var _11a=c.markup[2].split(" ");var _11b=parseInt(_11a[1].substring(5));if(_11b!=c.index){_11a[1]="idx=\""+c.index+"\"";c.markup[2]=_11a.join(" ");}});this.grid.setupHeaderMenu();},setColumnVisibility:function(_11c,_11d){var cell=this.cells[_11c];if(cell.hidden==_11d){cell.hidden=!_11d;var v=cell.view,w=v.viewWidth;if(w&&w!="auto"){v._togglingColumn=_10e.getMarginBox(cell.getHeaderNode()).w||0;}v.update();return true;}else{return false;}},addCellDef:function(_11e,_11f,_120){var self=this;var _121=function(_122){var w=0;if(_122.colSpan>1){w=0;}else{w=_122.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _123={grid:this.grid,subrow:_11e,layoutIndex:_11f,index:this.cells.length};if(_120&&_120 instanceof _10b.grid.cells._Base){var _124=lang.clone(_120);_123.unitWidth=_121(_124._props);_124=lang.mixin(_124,this._defaultCellProps,_120._props,_123);return _124;}var _125=_120.type||_120.cellType||this._defaultCellProps.type||this._defaultCellProps.cellType||_10b.grid.cells.Cell;if(lang.isString(_125)){_125=lang.getObject(_125);}_123.unitWidth=_121(_120);return new _125(lang.mixin({},this._defaultCellProps,_120,_123));},addRowDef:function(_126,_127){var _128=[];var _129=0,_12a=0,_12b=true;for(var i=0,def,cell;(def=_127[i]);i++){cell=this.addCellDef(_126,i,def);_128.push(cell);this.cells.push(cell);if(_12b&&cell.relWidth){_129+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_12a+=window.parseInt(w,10);}else{if(w=="auto"){_12b=false;}}}}}if(_129&&_12b){_10d.forEach(_128,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_129)*(100-_12a))+"%";}});}return _128;},addRowsDef:function(_12c){var _12d=[];if(lang.isArray(_12c)){if(lang.isArray(_12c[0])){for(var i=0,row;_12c&&(row=_12c[i]);i++){_12d.push(this.addRowDef(i,row));}}else{_12d.push(this.addRowDef(0,_12c));}}return _12d;},addViewDef:function(_12e){this._defaultCellProps=_12e.defaultCell||{};if(_12e.width&&_12e.width=="auto"){delete _12e.width;}return lang.mixin({},_12e,{cells:this.addRowsDef(_12e.rows||_12e.cells)});},setStructure:function(_12f){this.fieldIndex=0;this.cells=[];var s=this.structure=[];if(this.grid.rowSelector){var sel={type:_10b._scopeName+".grid._RowSelector"};if(lang.isString(this.grid.rowSelector)){var _130=this.grid.rowSelector;if(_130=="false"){sel=null;}else{if(_130!="true"){sel["width"]=_130;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _131=function(def){return ("name" in def||"field" in def||"get" in def);};var _132=function(def){if(lang.isArray(def)){if(lang.isArray(def[0])||_131(def[0])){return true;}}return false;};var _133=function(def){return (def!==null&&lang.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_131(def))));};if(lang.isArray(_12f)){var _134=false;for(var i=0,st;(st=_12f[i]);i++){if(_133(st)){_134=true;break;}}if(!_134){s.push(this.addViewDef({cells:_12f}));}else{for(i=0;(st=_12f[i]);i++){if(_132(st)){s.push(this.addViewDef({cells:st}));}else{if(_133(st)){s.push(this.addViewDef(st));}}}}}else{if(_133(_12f)){s.push(this.addViewDef(_12f));}}this.cellCount=this.cells.length;this.grid.setupHeaderMenu();}});});},"dojox/grid/cells":function(){define(["../main","./cells/_base"],function(_135){return _135.grid.cells;});},"dojox/grid/cells/_base":function(){define(["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/event","dojo/_base/connect","dojo/_base/array","dojo/_base/sniff","dojo/dom","dojo/dom-attr","dojo/dom-construct","dijit/_Widget","../util"],function(dojo,_136,lang,_137,_138,_139,has,dom,_13a,_13b,_13c,util){var _13d=_136("dojox.grid._DeferredTextWidget",_13c,{deferred:null,_destroyOnRemove:true,postCreate:function(){if(this.deferred){this.deferred.addBoth(lang.hitch(this,function(text){if(this.domNode){this.domNode.innerHTML=text;}}));}}});var _13e=function(_13f){try{util.fire(_13f,"focus");util.fire(_13f,"select");}catch(e){}};var _140=function(){setTimeout(lang.hitch.apply(dojo,arguments),0);};var _141=_136("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_142){this._props=_142||{};lang.mixin(this,_142);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_143,_144){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_143!=this.defaultValue&&f)?f.apply(s,_144):_143;if(typeof v=="undefined"){return this.defaultValue;}if(v&&v.addBoth){v=new _13d({deferred:v},_13b.create("span",{innerHTML:this.defaultValue}));}if(v&&v.declaredClass&&v.startup){return "<div class='dojoxGridStubNode' linkWidget='"+v.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";}return v;},format:function(_145,_146){var f,i=this.grid.edit.info,d=this.get?this.get(_145,_146):(this.value||this.defaultValue);d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&/g,"&amp;").replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_145&&i.cell==this))){return this.formatEditing(d,_145);}else{return this._defaultFormat(d,[d,_145,this]);}},formatEditing:function(_147,_148){},getNode:function(_149){return this.view.getCellNode(_149,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_14a){return (this.getNode(_14a)||0).firstChild||0;},canResize:function(){var uw=this.unitWidth;return uw&&(uw!=="auto");},isFlex:function(){var uw=this.unitWidth;return uw&&lang.isString(uw)&&(uw=="auto"||uw.slice(-1)=="%");},applyEdit:function(_14b,_14c){if(this.getNode(_14c)){this.grid.edit.applyCellEdit(_14b,this,_14c);}},cancelEdit:function(_14d){this.grid.doCancelEdit(_14d);},_onEditBlur:function(_14e){if(this.grid.edit.isEditCell(_14e,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_14f,_150){if(this.commitOnBlur){_138.connect(_14f,"onblur",function(e){setTimeout(lang.hitch(this,"_onEditBlur",_150),250);});}},needFormatNode:function(_151,_152){this._formatPending=true;_140(this,"_formatNode",_151,_152);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_153,_154){if(this._formatPending){this._formatPending=false;if(!has("ie")){dom.setSelectable(this.grid.domNode,true);}this.formatNode(this.getEditNode(_154),_153,_154);}},formatNode:function(_155,_156,_157){if(has("ie")){_140(this,"focus",_157,_155);}else{this.focus(_157,_155);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_158){return this.getEditNode(_158)[this._valueProp];},setValue:function(_159,_15a){var n=this.getEditNode(_159);if(n){n[this._valueProp]=_15a;}},focus:function(_15b,_15c){_13e(_15c||this.getEditNode(_15b));},save:function(_15d){this.value=this.value||this.getValue(_15d);},restore:function(_15e){this.setValue(_15e,this.value);},_finish:function(_15f){dom.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_160){this.applyEdit(this.getValue(_160),_160);this._finish(_160);},cancel:function(_161){this.cancelEdit(_161);this._finish(_161);}});_141.markupFactory=function(node,_162){var _163=lang.trim(_13a.get(node,"formatter")||"");if(_163){_162.formatter=lang.getObject(_163)||_163;}var get=lang.trim(_13a.get(node,"get")||"");if(get){_162.get=lang.getObject(get);}var _164=function(attr,cell,_165){var _166=lang.trim(_13a.get(node,attr)||"");if(_166){cell[_165||attr]=!(_166.toLowerCase()=="false");}};_164("sortDesc",_162);_164("editable",_162);_164("alwaysEditing",_162);_164("noresize",_162);_164("draggable",_162);var _167=lang.trim(_13a.get(node,"loadingText")||_13a.get(node,"defaultValue")||"");if(_167){_162.defaultValue=_167;}var _168=function(attr,cell,_169){var _16a=lang.trim(_13a.get(node,attr)||"")||undefined;if(_16a){cell[_169||attr]=_16a;}};_168("styles",_162);_168("headerStyles",_162);_168("cellStyles",_162);_168("classes",_162);_168("headerClasses",_162);_168("cellClasses",_162);};var Cell=_136("dojox.grid.cells.Cell",_141,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_16b,_16c){this.needFormatNode(_16b,_16c);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_16b+"\">";},formatNode:function(_16d,_16e,_16f){this.inherited(arguments);this.registerOnBlur(_16d,_16f);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){_137.stop(e);}}},_finish:function(_170){this.inherited(arguments);var n=this.getEditNode(_170);try{util.fire(n,"blur");}catch(e){}}});Cell.markupFactory=function(node,_171){_141.markupFactory(node,_171);var _172=lang.trim(_13a.get(node,"keyFilter")||"");if(_172){_171.keyFilter=new RegExp(_172);}};var _173=_136("dojox.grid.cells.RowIndex",Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_174){return _174+1;}});_173.markupFactory=function(node,_175){Cell.markupFactory(node,_175);};var _176=_136("dojox.grid.cells.Select",Cell,{options:null,values:null,returnIndex:-1,constructor:function(_177){this.values=this.values||this.options;},formatEditing:function(_178,_179){this.needFormatNode(_178,_179);var h=["<select class=\"dojoxGridSelect\">"];for(var i=0,o,v;((o=this.options[i])!==undefined)&&((v=this.values[i])!==undefined);i++){v=v.replace?v.replace(/&/g,"&amp;").replace(/</g,"&lt;"):v;o=o.replace?o.replace(/&/g,"&amp;").replace(/</g,"&lt;"):o;h.push("<option",(_178==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},_defaultFormat:function(_17a,_17b){var v=this.inherited(arguments);if(!this.formatter&&this.values&&this.options){var i=_139.indexOf(this.values,v);if(i>=0){v=this.options[i];}}return v;},getValue:function(_17c){var n=this.getEditNode(_17c);if(n){var i=n.selectedIndex,o=n.options[i];return this.returnIndex>-1?i:o.value||o.innerHTML;}}});_176.markupFactory=function(node,cell){Cell.markupFactory(node,cell);var _17d=lang.trim(_13a.get(node,"options")||"");if(_17d){var o=_17d.split(",");if(o[0]!=_17d){cell.options=o;}}var _17e=lang.trim(_13a.get(node,"values")||"");if(_17e){var v=_17e.split(",");if(v[0]!=_17e){cell.values=v;}}};var _17f=_136("dojox.grid.cells.AlwaysEdit",Cell,{alwaysEditing:true,_formatNode:function(_180,_181){this.formatNode(this.getEditNode(_181),_180,_181);},applyStaticValue:function(_182){var e=this.grid.edit;e.applyCellEdit(this.getValue(_182),this,_182);e.start(this,_182,true);}});_17f.markupFactory=function(node,cell){Cell.markupFactory(node,cell);};var Bool=_136("dojox.grid.cells.Bool",_17f,{_valueProp:"checked",formatEditing:function(_183,_184){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_183?" checked=\"checked\"":"")+" style=\"width: auto\" />";},doclick:function(e){if(e.target.tagName=="INPUT"){this.applyStaticValue(e.rowIndex);}}});Bool.markupFactory=function(node,cell){_17f.markupFactory(node,cell);};return _141;});},"dijit/_Widget":function(){define("dijit/_Widget",["dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","dojo/query","dojo/ready","./registry","./_WidgetBase","./_OnDijitClickMixin","./_FocusMixin","dojo/uacss","./hccss"],function(_185,_186,_187,_188,_189,lang,_18a,_18b,_18c,_18d,_18e,_18f){function _190(){};function _191(_192){return function(obj,_193,_194,_195){if(obj&&typeof _193=="string"&&obj[_193]==_190){return obj.on(_193.substring(2).toLowerCase(),lang.hitch(_194,_195));}return _192.apply(_187,arguments);};};_185.around(_187,"connect",_191);if(_189.connect){_185.around(_189,"connect",_191);}var _196=_188("dijit._Widget",[_18d,_18e,_18f],{onClick:_190,onDblClick:_190,onKeyDown:_190,onKeyPress:_190,onKeyUp:_190,onMouseDown:_190,onMouseMove:_190,onMouseOut:_190,onMouseOver:_190,onMouseLeave:_190,onMouseEnter:_190,onMouseUp:_190,constructor:function(_197){this._toConnect={};for(var name in _197){if(this[name]===_190){this._toConnect[name.replace(/^on/,"").toLowerCase()]=_197[name];delete _197[name];}}},postCreate:function(){this.inherited(arguments);for(var name in this._toConnect){this.on(name,this._toConnect[name]);}delete this._toConnect;},on:function(type,func){if(this[this._onMap(type)]===_190){return _187.connect(this.domNode,type.toLowerCase(),this,func);}return this.inherited(arguments);},_setFocusedAttr:function(val){this._focused=val;this._set("focused",val);},setAttribute:function(attr,_198){_189.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_198);},attr:function(name,_199){if(_186.isDebug){var _19a=arguments.callee._ach||(arguments.callee._ach={}),_19b=(arguments.callee.caller||"unknown caller").toString();if(!_19a[_19b]){_189.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_19b,"","2.0");_19a[_19b]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},getDescendants:function(){_189.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?_18a("[widgetId]",this.containerNode).map(_18c.byNode):[];},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});if(!_189.isAsync){_18b(0,function(){var _19c=["dijit/_base"];require(_19c);});}return _196;});},"dijit/_WidgetBase":function(){define("dijit/_WidgetBase",["require","dojo/_base/array","dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/lang","dojo/on","dojo/ready","dojo/Stateful","dojo/topic","dojo/_base/window","./registry"],function(_19d,_19e,_19f,_1a0,_1a1,_1a2,dom,_1a3,_1a4,_1a5,_1a6,_1a7,_1a8,lang,on,_1a9,_1aa,_1ab,win,_1ac){if(!_1a8.isAsync){_1a9(0,function(){var _1ad=["dijit/_base/manager"];_19d(_1ad);});}var _1ae={};function _1af(obj){var ret={};for(var attr in obj){ret[attr.toLowerCase()]=true;}return ret;};function _1b0(attr){return function(val){_1a3[val?"set":"remove"](this.domNode,attr,val);this._set(attr,val);};};function _1b1(a,b){return a===b||(a!==a&&b!==b);};return _1a2("dijit._WidgetBase",_1aa,{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:_1b0("lang"),dir:"",_setDirAttr:_1b0("dir"),textDir:"","class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{},_blankGif:_1a0.blankGif||_19d.toUrl("dojo/resources/blank.gif"),postscript:function(_1b2,_1b3){this.create(_1b2,_1b3);},create:function(_1b4,_1b5){this.srcNodeRef=dom.byId(_1b5);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_1b4){this.params=_1b4;lang.mixin(this,_1b4);}this.postMixInProperties();if(!this.id){this.id=_1ac.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_1ac.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _1b6=this.srcNodeRef;if(_1b6&&_1b6.parentNode&&this.domNode!==_1b6){_1b6.parentNode.replaceChild(this.domNode,_1b6);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var ctor=this.constructor,list=ctor._setterAttrs;if(!list){list=(ctor._setterAttrs=[]);for(var attr in this.attributeMap){list.push(attr);}var _1b7=ctor.prototype;for(var _1b8 in _1b7){if(_1b8 in this.attributeMap){continue;}var _1b9="_set"+_1b8.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();})+"Attr";if(_1b9 in _1b7){list.push(_1b8);}}}_19e.forEach(list,function(attr){if(this.params&&attr in this.params){}else{if(this[attr]){this.set(attr,this[attr]);}}},this);for(var _1ba in this.params){this.set(_1ba,this[_1ba]);}},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_1a5.create("div");}if(this.baseClass){var _1bb=this.baseClass.split(" ");if(!this.isLeftToRight()){_1bb=_1bb.concat(_19e.map(_1bb,function(name){return name+"Rtl";}));}_1a4.add(this.domNode,_1bb);}},postCreate:function(){},startup:function(){if(this._started){return;}this._started=true;_19e.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&lang.isFunction(obj.startup)){obj.startup();obj._started=true;}});},destroyRecursive:function(_1bc){this._beingDestroyed=true;this.destroyDescendants(_1bc);this.destroy(_1bc);},destroy:function(_1bd){this._beingDestroyed=true;this.uninitialize();var c;while((c=this._connects.pop())){c.remove();}var w;while((w=this._supportingWidgets.pop())){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}}this.destroyRendering(_1bd);_1ac.remove(this.id);this._destroyed=true;},destroyRendering:function(_1be){if(this.bgIframe){this.bgIframe.destroy(_1be);delete this.bgIframe;}if(this.domNode){if(_1be){_1a3.remove(this.domNode,"widgetId");}else{_1a5.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_1be){_1a5.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_1bf){_19e.forEach(this.getChildren(),function(_1c0){if(_1c0.destroyRecursive){_1c0.destroyRecursive(_1bf);}});},uninitialize:function(){return false;},_setStyleAttr:function(_1c1){var _1c2=this.domNode;if(lang.isObject(_1c1)){_1a7.set(_1c2,_1c1);}else{if(_1c2.style.cssText){_1c2.style.cssText+="; "+_1c1;}else{_1c2.style.cssText=_1c1;}}this._set("style",_1c1);},_attrToDom:function(attr,_1c3,_1c4){_1c4=arguments.length>=3?_1c4:this.attributeMap[attr];_19e.forEach(lang.isArray(_1c4)?_1c4:[_1c4],function(_1c5){var _1c6=this[_1c5.node||_1c5||"domNode"];var type=_1c5.type||"attribute";switch(type){case "attribute":if(lang.isFunction(_1c3)){_1c3=lang.hitch(this,_1c3);}var _1c7=_1c5.attribute?_1c5.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);_1a3.set(_1c6,_1c7,_1c3);break;case "innerText":_1c6.innerHTML="";_1c6.appendChild(win.doc.createTextNode(_1c3));break;case "innerHTML":_1c6.innerHTML=_1c3;break;case "class":_1a4.replace(_1c6,_1c3,this[attr]);break;}},this);},get:function(name){var _1c8=this._getAttrNames(name);return this[_1c8.g]?this[_1c8.g]():this[name];},set:function(name,_1c9){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _1ca=this._getAttrNames(name),_1cb=this[_1ca.s];if(lang.isFunction(_1cb)){var _1cc=_1cb.apply(this,Array.prototype.slice.call(arguments,1));}else{var _1cd=this.focusNode&&!lang.isFunction(this.focusNode)?"focusNode":"domNode",tag=this[_1cd].tagName,_1ce=_1ae[tag]||(_1ae[tag]=_1af(this[_1cd])),map=name in this.attributeMap?this.attributeMap[name]:_1ca.s in this?this[_1ca.s]:((_1ca.l in _1ce&&typeof _1c9!="function")||/^aria-|^data-|^role$/.test(name))?_1cd:null;if(map!=null){this._attrToDom(name,_1c9,map);}this._set(name,_1c9);}return _1cc||this;},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();});return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr",l:uc.toLowerCase()});},_set:function(name,_1cf){var _1d0=this[name];this[name]=_1cf;if(this._watchCallbacks&&this._created&&!_1b1(_1cf,_1d0)){this._watchCallbacks(name,_1d0,_1cf);}},on:function(type,func){return _19f.after(this,this._onMap(type),func,true);},_onMap:function(type){var ctor=this.constructor,map=ctor._onMap;if(!map){map=(ctor._onMap={});for(var attr in ctor.prototype){if(/^on/.test(attr)){map[attr.replace(/^on/,"").toLowerCase()]=attr;}}}return map[type.toLowerCase()];},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getChildren:function(){return this.containerNode?_1ac.findWidgets(this.containerNode):[];},getParent:function(){return _1ac.getEnclosingWidget(this.domNode.parentNode);},connect:function(obj,_1d1,_1d2){var _1d3=_1a1.connect(obj,_1d1,this,_1d2);this._connects.push(_1d3);return _1d3;},disconnect:function(_1d4){var i=_19e.indexOf(this._connects,_1d4);if(i!=-1){_1d4.remove();this._connects.splice(i,1);}},subscribe:function(t,_1d5){var _1d6=_1ab.subscribe(t,lang.hitch(this,_1d5));this._connects.push(_1d6);return _1d6;},unsubscribe:function(_1d7){this.disconnect(_1d7);},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_1a6.isBodyLtr();},isFocusable:function(){return this.focus&&(_1a7.get(this.domNode,"display")!="none");},placeAt:function(_1d8,_1d9){if(_1d8.declaredClass&&_1d8.addChild){_1d8.addChild(this,_1d9);}else{_1a5.place(this.domNode,_1d8,_1d9);}return this;},getTextDir:function(text,_1da){return _1da;},applyTextDir:function(){},defer:function(fcn,_1db){var _1dc=setTimeout(lang.hitch(this,function(){if(!_1dc){return;}_1dc=null;if(!this._destroyed){lang.hitch(this,fcn)();}}),_1db||0);return {remove:function(){if(_1dc){clearTimeout(_1dc);_1dc=null;}return null;}};}});});},"dojo/Stateful":function(){define(["./_base/kernel","./_base/declare","./_base/lang","./_base/array"],function(dojo,_1dd,lang,_1de){return dojo.declare("dojo.Stateful",null,{postscript:function(_1df){if(_1df){lang.mixin(this,_1df);}},get:function(name){return this[name];},set:function(name,_1e0){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _1e1=this[name];this[name]=_1e0;if(this._watchCallbacks){this._watchCallbacks(name,_1e1,_1e0);}return this;},watch:function(name,_1e2){var _1e3=this._watchCallbacks;if(!_1e3){var self=this;_1e3=this._watchCallbacks=function(name,_1e4,_1e5,_1e6){var _1e7=function(_1e8){if(_1e8){_1e8=_1e8.slice();for(var i=0,l=_1e8.length;i<l;i++){try{_1e8[i].call(self,name,_1e4,_1e5);}catch(e){console.error(e);}}}};_1e7(_1e3["_"+name]);if(!_1e6){_1e7(_1e3["*"]);}};}if(!_1e2&&typeof name==="function"){_1e2=name;name="*";}else{name="_"+name;}var _1e9=_1e3[name];if(typeof _1e9!=="object"){_1e9=_1e3[name]=[];}_1e9.push(_1e2);return {unwatch:function(){_1e9.splice(_1de.indexOf(_1e9,_1e2),1);}};}});});},"dijit/_OnDijitClickMixin":function(){define("dijit/_OnDijitClickMixin",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window"],function(on,_1ea,keys,_1eb,has,_1ec,win){var _1ed=null;if(has("ie")<9){(function(){var _1ee=function(evt){_1ed=evt.srcElement;};win.doc.attachEvent("onkeydown",_1ee);_1ec.addOnWindowUnload(function(){win.doc.detachEvent("onkeydown",_1ee);});})();}else{win.doc.addEventListener("keydown",function(evt){_1ed=evt.target;},true);}var _1ef=function(node,_1f0){if(/input|button/i.test(node.nodeName)){return on(node,"click",_1f0);}else{function _1f1(e){return (e.keyCode==keys.ENTER||e.keyCode==keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;};var _1f2=[on(node,"keypress",function(e){if(_1f1(e)){_1ed=e.target;e.preventDefault();}}),on(node,"keyup",function(e){if(_1f1(e)&&e.target==_1ed){_1ed=null;_1f0.call(this,e);}}),on(node,"click",function(e){_1f0.call(this,e);})];return {remove:function(){_1ea.forEach(_1f2,function(h){h.remove();});}};}};return _1eb("dijit._OnDijitClickMixin",null,{connect:function(obj,_1f3,_1f4){return this.inherited(arguments,[obj,_1f3=="ondijitclick"?_1ef:_1f3,_1f4]);}});});},"dijit/_FocusMixin":function(){define("dijit/_FocusMixin",["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(_1f5,_1f6,_1f7,lang){lang.extend(_1f6,{focused:false,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus();},_onBlur:function(){this.onBlur();}});return _1f7("dijit._FocusMixin",null,{_focusManager:_1f5});});},"dijit/focus":function(){define("dijit/focus",["dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/Evented","dojo/_base/lang","dojo/on","dojo/domReady","dojo/_base/sniff","dojo/Stateful","dojo/_base/window","dojo/window","./a11y","./registry","./main"],function(_1f8,_1f9,dom,_1fa,_1fb,_1fc,lang,on,_1fd,has,_1fe,win,_1ff,a11y,_200,_201){var _202=_1f9([_1fe,_1fc],{curNode:null,activeStack:[],constructor:function(){var _203=lang.hitch(this,function(node){if(dom.isDescendant(this.curNode,node)){this.set("curNode",null);}if(dom.isDescendant(this.prevNode,node)){this.set("prevNode",null);}});_1f8.before(_1fb,"empty",_203);_1f8.before(_1fb,"destroy",_203);},registerIframe:function(_204){return this.registerWin(_204.contentWindow,_204);},registerWin:function(_205,_206){var _207=this,body=_205.document&&_205.document.body;if(body){var mdh=on(body,"mousedown",function(evt){_207._justMouseDowned=true;setTimeout(function(){_207._justMouseDowned=false;},13);if(evt&&evt.target&&evt.target.parentNode==null){return;}_207._onTouchNode(_206||evt.target,"mouse");});var fih=on(body,"focusin",function(evt){if(!evt.target.tagName){return;}var tag=evt.target.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}if(a11y.isTabNavigable(evt.target)){_207._onFocusNode(_206||evt.target);}else{_207._onTouchNode(_206||evt.target);}});var foh=on(body,"focusout",function(evt){_207._onBlurNode(_206||evt.target);});return {remove:function(){mdh.remove();fih.remove();foh.remove();mdh=fih=foh=null;body=null;}};}},_onBlurNode:function(node){if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);}this._clearFocusTimer=setTimeout(lang.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null);}),0);if(this._justMouseDowned){return;}if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);}this._clearActiveWidgetsTimer=setTimeout(lang.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([]);}),100);},_onTouchNode:function(node,by){if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);delete this._clearActiveWidgetsTimer;}var _208=[];try{while(node){var _209=_1fa.get(node,"dijitPopupParent");if(_209){node=_200.byId(_209).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===win.body()){break;}node=_1ff.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_20a=id&&_200.byId(id);if(_20a&&!(by=="mouse"&&_20a.get("disabled"))){_208.unshift(id);}node=node.parentNode;}}}}catch(e){}this._setStack(_208,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);delete this._clearFocusTimer;}this._onTouchNode(node);if(node==this.curNode){return;}this.set("prevNode",this.curNode);this.set("curNode",node);},_setStack:function(_20b,by){var _20c=this.activeStack,_20d=_20c.length-1,_20e=_20b.length-1;if(_20b[_20e]==_20c[_20d]){return;}this.set("activeStack",_20b);var _20f,i;for(i=_20d;i>=0&&_20c[i]!=_20b[i];i--){_20f=_200.byId(_20c[i]);if(_20f){_20f._hasBeenBlurred=true;_20f.set("focused",false);if(_20f._focusManager==this){_20f._onBlur(by);}this.emit("widget-blur",_20f,by);}}for(i++;i<=_20e;i++){_20f=_200.byId(_20b[i]);if(_20f){_20f.set("focused",true);if(_20f._focusManager==this){_20f._onFocus(by);}this.emit("widget-focus",_20f,by);}}},focus:function(node){if(node){try{node.focus();}catch(e){}}}});var _210=new _202();_1fd(function(){var _211=_210.registerWin(_1ff.get(document));if(has("ie")){on(window,"unload",function(){if(_211){_211.remove();_211=null;}});}});_201.focus=function(node){_210.focus(node);};for(var attr in _210){if(!/^_/.test(attr)){_201.focus[attr]=typeof _210[attr]=="function"?lang.hitch(_210,attr):_210[attr];}}_210.watch(function(attr,_212,_213){_201.focus[attr]=_213;});return _210;});},"dojo/window":function(){define(["./_base/lang","./_base/sniff","./_base/window","./dom","./dom-geometry","./dom-style","./dom-construct"],function(lang,has,_214,dom,geom,_215,_216){has.add("rtl-adjust-position-for-verticalScrollBar",function(win,doc){var body=_214.body(doc),_217=_216.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},body,"last"),div=_216.create("div",{style:{overflow:"hidden",direction:"ltr"}},_217,"last"),ret=geom.position(div).x!=0;_217.removeChild(div);body.removeChild(_217);return ret;});has.add("position-fixed-support",function(win,doc){var body=_214.body(doc),_218=_216.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},body,"last"),_219=_216.create("span",{style:{position:"fixed",left:"0",top:"0"}},_218,"last"),ret=geom.position(_219).x!=geom.position(_218).x;_218.removeChild(_219);body.removeChild(_218);return ret;});var _21a=lang.getObject("dojo.window",true);_21a.getBox=function(){var _21b=(_214.doc.compatMode=="BackCompat")?_214.body():_214.doc.documentElement,_21c=geom.docScroll(),w,h;if(has("touch")){var _21d=_214.doc.parentWindow||_214.doc.defaultView;w=_21d.innerWidth||_21b.clientWidth;h=_21d.innerHeight||_21b.clientHeight;}else{w=_21b.clientWidth;h=_21b.clientHeight;}return {l:_21c.x,t:_21c.y,w:w,h:h};};_21a.get=function(doc){if(has("ie")<9&&_21a!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;};_21a.scrollIntoView=function(node,pos){try{node=dom.byId(node);var doc=node.ownerDocument||_214.doc,body=_214.body(doc),html=doc.documentElement||body.parentNode,isIE=has("ie"),isWK=has("webkit");if(node==body||node==html){return;}if(!(has("mozilla")||isIE||isWK||has("opera")||has("trident"))&&("scrollIntoView" in node)){node.scrollIntoView(false);return;}var _21e=doc.compatMode=="BackCompat",_21f=Math.min(body.clientWidth||html.clientWidth,html.clientWidth||body.clientWidth),_220=Math.min(body.clientHeight||html.clientHeight,html.clientHeight||body.clientHeight),_221=(isWK||_21e)?body:html,_222=pos||geom.position(node),el=node.parentNode,_223=function(el){return (isIE<=6||(isIE==7&&_21e))?false:(has("position-fixed-support")&&(_215.get(el,"position").toLowerCase()=="fixed"));},self=this,_224=function(el,x,y){if(el.tagName=="BODY"||el.tagName=="HTML"){self.get(el.ownerDocument).scrollBy(x,y);}else{x&&(el.scrollLeft+=x);y&&(el.scrollTop+=y);}};if(_223(node)){return;}while(el){if(el==body){el=_221;}var _225=geom.position(el),_226=_223(el),rtl=_215.getComputedStyle(el).direction.toLowerCase()=="rtl";if(el==_221){_225.w=_21f;_225.h=_220;if(_221==html&&(isIE||has("trident"))&&rtl){_225.x+=_221.offsetWidth-_225.w;}_225.x=0;_225.y=0;}else{var pb=geom.getPadBorderExtents(el);_225.w-=pb.w;_225.h-=pb.h;_225.x+=pb.l;_225.y+=pb.t;var _227=el.clientWidth,_228=_225.w-_227;if(_227>0&&_228>0){if(rtl&&has("rtl-adjust-position-for-verticalScrollBar")){_225.x+=_228;}_225.w=_227;}_227=el.clientHeight;_228=_225.h-_227;if(_227>0&&_228>0){_225.h=_227;}}if(_226){if(_225.y<0){_225.h+=_225.y;_225.y=0;}if(_225.x<0){_225.w+=_225.x;_225.x=0;}if(_225.y+_225.h>_220){_225.h=_220-_225.y;}if(_225.x+_225.w>_21f){_225.w=_21f-_225.x;}}var l=_222.x-_225.x,t=_222.y-_225.y,r=l+_222.w-_225.w,bot=t+_222.h-_225.h;var s,old;if(r*l>0&&(!!el.scrollLeft||el==_221||el.scrollWidth>el.offsetHeight)){s=Math[l<0?"max":"min"](l,r);if(rtl&&((isIE==8&&!_21e)||has("trident")>=5||has("edge"))){s=-s;}old=el.scrollLeft;_224(el,s,0);s=el.scrollLeft-old;_222.x-=s;}if(bot*t>0&&(!!el.scrollTop||el==_221||el.scrollHeight>el.offsetHeight)){s=Math.ceil(Math[t<0?"max":"min"](t,bot));old=el.scrollTop;_224(el,0,s);s=el.scrollTop-old;_222.y-=s;}el=(el!=_221)&&!_226&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false);}};return _21a;});},"dijit/a11y":function(){define("dijit/a11y",["dojo/_base/array","dojo/dom","dojo/dom-attr","dojo/dom-style","dojo/_base/lang","dojo/_base/sniff","./main"],function(_229,dom,_22a,_22b,lang,has,_22c){var _22d;var a11y={_isElementShown:function(elem){var s=_22b.get(elem);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_22a.get(elem,"type")!="hidden");},hasDefaultTabStop:function(elem){switch(elem.nodeName.toLowerCase()){case "a":return _22a.has(elem,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var body;try{var _22e=elem.contentDocument;if("designMode" in _22e&&_22e.designMode=="on"){return true;}body=_22e.body;}catch(e1){try{body=elem.contentWindow.document.body;}catch(e2){return false;}}return body&&(body.contentEditable=="true"||(body.firstChild&&body.firstChild.contentEditable=="true"));default:return elem.contentEditable=="true";}},effectiveTabIndex:function(elem){if(_22a.get(elem,"disabled")){return _22d;}else{if(_22a.has(elem,"tabIndex")){return +_22a.get(elem,"tabIndex");}else{return a11y.hasDefaultTabStop(elem)?0:_22d;}}},isTabNavigable:function(elem){return a11y.effectiveTabIndex(elem)>=0;},isFocusable:function(elem){return a11y.effectiveTabIndex(elem)>=-1;},_getTabNavigable:function(root){var _22f,last,_230,_231,_232,_233,_234={};function _235(node){return node&&node.tagName.toLowerCase()=="input"&&node.type&&node.type.toLowerCase()=="radio"&&node.name&&node.name.toLowerCase();};var _236=a11y._isElementShown,_237=a11y.effectiveTabIndex;var _238=function(_239){for(var _23a=_239.firstChild;_23a;_23a=_23a.nextSibling){if(_23a.nodeType!=1||(has("ie")<=9&&_23a.scopeName!=="HTML")||!_236(_23a)){continue;}var _23b=_237(_23a);if(_23b>=0){if(_23b==0){if(!_22f){_22f=_23a;}last=_23a;}else{if(_23b>0){if(!_230||_23b<_231){_231=_23b;_230=_23a;}if(!_232||_23b>=_233){_233=_23b;_232=_23a;}}}var rn=_235(_23a);if(_22a.get(_23a,"checked")&&rn){_234[rn]=_23a;}}if(_23a.nodeName.toUpperCase()!="SELECT"){_238(_23a);}}};if(_236(root)){_238(root);}function rs(node){return _234[_235(node)]||node;};return {first:rs(_22f),last:rs(last),lowest:rs(_230),highest:rs(_232)};},getFirstInTabbingOrder:function(root,doc){var _23c=a11y._getTabNavigable(dom.byId(root,doc));return _23c.lowest?_23c.lowest:_23c.first;},getLastInTabbingOrder:function(root,doc){var _23d=a11y._getTabNavigable(dom.byId(root,doc));return _23d.last?_23d.last:_23d.highest;}};1&&lang.mixin(_22c,a11y);return a11y;});},"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./ready","./_base/sniff","./_base/window"],function(_23e,lang,_23f,has,_240){var html=_240.doc.documentElement,ie=has("ie"),_241=has("trident"),_242=has("opera"),maj=Math.floor,ff=has("ff"),_243=_23e.boxModel.replace(/-/,""),_244={"dj_quirks":has("quirks"),"dj_opera":_242,"dj_khtml":has("khtml"),"dj_webkit":has("webkit"),"dj_safari":has("safari"),"dj_chrome":has("chrome"),"dj_gecko":has("mozilla")};if(ie){_244["dj_ie"]=true;_244["dj_ie"+maj(ie)]=true;_244["dj_iequirks"]=has("quirks");}if(_241){_244["dj_trident"]=true;_244["dj_trident"+maj(_241)]=true;}if(ff){_244["dj_ff"+maj(ff)]=true;}_244["dj_"+_243]=true;var _245="";for(var clz in _244){if(_244[clz]){_245+=clz+" ";}}html.className=lang.trim(html.className+" "+_245);_23f(90,function(){if(!_23e.isBodyLtr()){var _246="dj_rtl dijitRtl "+_245.replace(/ /g,"-rtl ");html.className=lang.trim(html.className+" "+_246+"dj_rtl dijitRtl "+_245.replace(/ /g,"-rtl "));}});return has;});},"dijit/hccss":function(){define("dijit/hccss",["require","dojo/_base/config","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dojo/ready","dojo/_base/sniff","dojo/_base/window"],function(_247,_248,_249,_24a,_24b,_24c,has,win){if(has("ie")||has("mozilla")){_24c(90,function(){var div=_24a.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(_248.blankGif||_247.toUrl("dojo/resources/blank.gif"))+"\");"}},win.body());var cs=_24b.getComputedStyle(div);if(cs){var _24d=cs.backgroundImage;var _24e=(cs.borderTopColor==cs.borderRightColor)||(_24d!=null&&(_24d=="none"||_24d=="url(invalid-url:)"));if(_24e){_249.add(win.body(),"dijit_a11y");}if(has("ie")){div.outerHTML="";}else{win.body().removeChild(div);}}});}});},"dojox/grid/_RowSelector":function(){define(["dojo/_base/declare","./_View"],function(_24f,_250){return _24f("dojox.grid._RowSelector",_250,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden";},getWidth:function(){return this.viewWidth||this.defaultWidth;},buildRowContent:function(_251,_252){var w=this.contentWidth||0;_252.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){if(!("contentWidth" in this)&&this.contentNode){this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth;}},doStyleRowNode:function(_253,_254){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_253)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_253)){n.push("dojoxGridRowbarSelected");}_254.className=n.join(" ");},domouseover:function(e){this.grid.onMouseOverRow(e);},domouseout:function(e){if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}});});},"dojox/grid/_View":function(){define(["dojo","dijit/registry","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/_base/connect","dojo/_base/sniff","dojo/query","dojo/_base/window","dojo/text!./resources/View.html","dojo/dnd/Source","dijit/_Widget","dijit/_TemplatedMixin","dojox/html/metrics","./util","dojo/_base/html","./_Builder","dojo/dnd/Avatar","dojo/dnd/Manager"],function(dojo,_255,_256,_257,_258,lang,_259,has,_25a,win,_25b,_25c,_25d,_25e,_25f,util,html,_260,_261){var _262=function(_263,_264){return _263.style.cssText==undefined?_263.getAttribute("style"):_263.style.cssText;};var _265=_257("dojox.grid._View",[_25d,_25e],{defaultWidth:"18em",viewWidth:"",templateString:_25b,themeable:false,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:_260._HeaderBuilder,_contentBuilderClass:_260._ContentBuilder,postMixInProperties:function(){this.rowNodes={};},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");util.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);util.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!this.grid.isLeftToRight()){this.headerNodeContainer.style.width="";}},destroy:function(){html.destroy(this.headerNode);delete this.headerNode;for(var i in this.rowNodes){this._cleanupRowWidgets(this.rowNodes[i]);html.destroy(this.rowNodes[i]);}this.rowNodes={};if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(has("ie")||has("webkit")||has("opera")){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_266){var vs=(this.structure=_266);if(vs.width&&!isNaN(vs.width)){this.viewWidth=vs.width+"em";}else{this.viewWidth=vs.width||(vs.noscroll?"auto":this.viewWidth);}this._onBeforeRow=vs.onBeforeRow||function(){};this._onAfterRow=vs.onAfterRow||function(){};this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},_cleanupRowWidgets:function(_267){if(_267){_258.forEach(_25a("[widgetId]",_267).map(_255.byNode),function(w){if(w._destroyOnRemove){w.destroy();delete w;}else{if(w.domNode&&w.domNode.parentNode){w.domNode.parentNode.removeChild(w.domNode);}}});}},onBeforeRow:function(_268,_269){this._onBeforeRow(_268,_269);if(_268>=0){this._cleanupRowWidgets(this.getRowNode(_268));}},onAfterRow:function(_26a,_26b,_26c){this._onAfterRow(_26a,_26b,_26c);var g=this.grid;_258.forEach(_25a(".dojoxGridStubNode",_26c),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _26d=window.parseInt(html.attr(n,"cellIdx"),10);var _26e=g.getCell(_26d);var w=_255.byId(lw);if(w){n.parentNode.replaceChild(w.domNode,n);if(!w._started){w.startup();}dojo.destroy(n);}else{n.innerHTML="";}}},this);},testFlexCells:function(){this.flexCells=false;for(var j=0,row;(row=this.structure.cells[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.view=this;this.flexCells=this.flexCells||cell.isFlex();}}return this.flexCells;},updateStructure:function(){this.header.update();this.content.update();},getScrollbarWidth:function(){var _26f=this.hasVScrollbar();var _270=html.style(this.scrollboxNode,"overflow");if(this.noscroll||!_270||_270=="hidden"){_26f=false;}else{if(_270=="scroll"){_26f=true;}}return (_26f?_25f.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?(h.firstChild.offsetWidth||html.style(h.firstChild,"width")):0;},setColumnsWidth:function(_271){this.headerContentNode.firstChild.style.width=_271+"px";if(this.viewWidth){this.viewWidth=_271+"px";}},getWidth:function(){return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";},getContentWidth:function(){return Math.max(0,html._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1;}var _272=this.grid.layout.cells;var _273=lang.hitch(this,function(node,_274){!this.grid.isLeftToRight()&&(_274=!_274);var inc=_274?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_272[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_272[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _275="dojoxGrid_bottomMarker";var _276="dojoxGrid_topMarker";if(this.bottomMarker){html.destroy(this.bottomMarker);}this.bottomMarker=html.byId(_275);if(this.topMarker){html.destroy(this.topMarker);}this.topMarker=html.byId(_276);if(!this.bottomMarker){this.bottomMarker=html.create("div",{"id":_275,"class":"dojoxGridColPlaceBottom"},win.body());this._hide(this.bottomMarker);this.topMarker=html.create("div",{"id":_276,"class":"dojoxGridColPlaceTop"},win.body());this._hide(this.topMarker);}this.arrowDim=html.contentBox(this.bottomMarker);var _277=html.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new _25c(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:lang.hitch(this,function(e){this.header.decorateEvent(e);if((this.header.overRightResizeArea(e)||this.header.overLeftResizeArea(e))&&this.header.canResize(e)&&!this.header.moveable){this.header.beginColumnResize(e);}else{if(this.grid.headerMenu){this.grid.headerMenu.onCancel(true);}if(e.button===(has("ie")<9?1:0)){_25c.prototype.onMouseDown.call(this.source,e);}}}),onMouseOver:lang.hitch(this,function(e){var src=this.source;if(src._getChildByEvent(e)){_25c.prototype.onMouseOver.apply(src,arguments);}}),_markTargetAnchor:lang.hitch(this,function(_278){var src=this.source;if(src.current==src.targetAnchor&&src.before==_278){return;}if(src.targetAnchor&&_273(src.targetAnchor,src.before)){src._removeItemClass(_273(src.targetAnchor,src.before),src.before?"After":"Before");}_25c.prototype._markTargetAnchor.call(src,_278);var _279=_278?src.targetAnchor:_273(src.targetAnchor,src.before);var _27a=0;if(!_279){_279=src.targetAnchor;_27a=html.contentBox(_279).w+this.arrowDim.w/2+2;}var pos=html.position(_279,true);var left=Math.floor(pos.x-this.arrowDim.w/2+_27a);html.style(this.bottomMarker,"visibility","visible");html.style(this.topMarker,"visibility","visible");html.style(this.bottomMarker,{"left":left+"px","top":(_277+pos.y)+"px"});html.style(this.topMarker,{"left":left+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_273(src.targetAnchor,src.before)){src._addItemClass(_273(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:lang.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_273(src.targetAnchor,src.before)){src._removeItemClass(_273(src.targetAnchor,src.before),src.before?"After":"Before");}this._hide(this.bottomMarker);this._hide(this.topMarker);_25c.prototype._unmarkTargetAnchor.call(src);}),destroy:lang.hitch(this,function(){_259.disconnect(this._source_conn);_259.unsubscribe(this._source_sub);_25c.prototype.destroy.call(this.source);if(this.bottomMarker){html.destroy(this.bottomMarker);delete this.bottomMarker;}if(this.topMarker){html.destroy(this.topMarker);delete this.topMarker;}}),onDndCancel:lang.hitch(this,function(){_25c.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker);})});this._source_conn=_259.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=_259.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_hide:function(node){html.style(node,{top:"-10000px","visibility":"hidden"});},_onDndDropBefore:function(_27b,_27c,copy){if(dojo.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _27d=this.grid.views.views;var _27e=_27d[_27b.viewIndex];var _27f=_27d[this.index];if(_27f!=_27e){_27e.convertColPctToFixed();_27f.convertColPctToFixed();}},_onDndDrop:function(_280,_281,copy){if(dojo.dnd.manager().target!==this.source){if(dojo.dnd.manager().source===this.source){this._removingColumn=true;}return;}this._hide(this.bottomMarker);this._hide(this.topMarker);var _282=function(n){return n?html.attr(n,"idx"):null;};var w=html.marginBox(_281[0]).w;if(_280.viewIndex!==this.index){var _283=this.grid.views.views;var _284=_283[_280.viewIndex];var _285=_283[this.index];if(_284.viewWidth&&_284.viewWidth!="auto"){_284.setColumnsWidth(_284.getColumnsWidth()-w);}if(_285.viewWidth&&_285.viewWidth!="auto"){_285.setColumnsWidth(_285.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!this.grid.isLeftToRight()&&(stb=!stb);var _286=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_286.moveColumn(_280.viewIndex,idx,_282(_281[0]),_282(stn),stb);},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}util.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode]);},_getHeaderContent:function(_287){var n=_287.name||_287.grid.getCellName(_287);if(/^\s+$/.test(n)){n="&nbsp;";}var ret=["<div class=\"dojoxGridSortNode"];if(_287.index!=_287.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_287.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_287.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\"presentation\"></div>","<div class=\"dojoxGridColCaption\">"]);}ret=ret.concat([n,"</div></div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_288){var _289=this._hasHScroll||false;if(this._hasHScroll==undefined||_288){if(this.noscroll){this._hasHScroll=false;}else{var _28a=html.style(this.scrollboxNode,"overflow");if(_28a=="hidden"){this._hasHScroll=false;}else{if(_28a=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_289!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_28b){var _28c=this._hasVScroll||false;if(this._hasVScroll==undefined||_28b){if(this.noscroll){this._hasVScroll=false;}else{var _28d=html.style(this.scrollboxNode,"overflow");if(_28d=="hidden"){this._hasVScroll=false;}else{if(_28d=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_28c!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _28e=false;this.grid.initialWidth="";var _28f=_25a("th",this.headerContentNode);var _290=_258.map(_28f,function(c,vIdx){var w=c.style.width;html.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_28e=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return html.contentBox(c).w;});if(_28e){_258.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _291=cell.view.getHeaderCellNode(cell.index);if(_291&&html.hasAttr(_291,"vIdx")){var vIdx=window.parseInt(html.attr(_291,"vIdx"));this.setColWidth(idx,_290[vIdx]);html.removeAttr(_291,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_292){if(!this.grid._autoHeight){var h=(this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10))||this.domNode.clientHeight;var self=this;var _293=function(){var v;for(var i in self.grid.views.views){v=self.grid.views.views[i];if(v!==self&&v.hasHScrollbar()){return true;}}return false;};if(_292||(this.noscroll&&_293())){h-=_25f.getScrollbar().h;}util.setStyleHeightPx(this.scrollboxNode,h);}this.hasVScrollbar(true);},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();if(!this._removingColumn){w=Math.max(w,this.getColumnsWidth())+"px";}else{w=Math.min(w,this.getColumnsWidth())+"px";this._removingColumn=false;}var cn=this.contentNode;cn.style.width=w;this.hasHScrollbar(true);},setSize:function(w,h){var ds=this.domNode.style;var hs=this.headerNode.style;if(w){ds.width=w;hs.width=w;}ds.height=(h>=0?h+"px":"");},renderRow:function(_294){var _295=this.createRowNode(_294);this.buildRow(_294,_295);return _295;},createRowNode:function(_296){var node=document.createElement("div");node.className=this.classTag+"Row";if(this instanceof _256.grid._RowSelector){html.attr(node,"role","presentation");}else{html.attr(node,"role","row");if(this.grid.selectionMode!="none"){node.setAttribute("aria-selected","false");}}node[util.gridViewTag]=this.id;node[util.rowIndexTag]=_296;this.rowNodes[_296]=node;return node;},buildRow:function(_297,_298){this.buildRowContent(_297,_298);this.styleRow(_297,_298);},buildRowContent:function(_299,_29a){_29a.innerHTML=this.content.generateHtml(_299,_299);if(this.flexCells&&this.contentWidth){_29a.firstChild.style.width=this.contentWidth;}util.fire(this,"onAfterRow",[_299,this.structure.cells,_29a]);},rowRemoved:function(_29b){if(_29b>=0){this._cleanupRowWidgets(this.getRowNode(_29b));}this.grid.edit.save(this,_29b);delete this.rowNodes[_29b];},getRowNode:function(_29c){return this.rowNodes[_29c];},getCellNode:function(_29d,_29e){var row=this.getRowNode(_29d);if(row){return this.content.getCellNode(row,_29e);}},getHeaderCellNode:function(_29f){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_29f);}},styleRow:function(_2a0,_2a1){_2a1._style=_262(_2a1);this.styleRowNode(_2a0,_2a1);},styleRowNode:function(_2a2,_2a3){if(_2a3){this.doStyleRowNode(_2a2,_2a3);}},doStyleRowNode:function(_2a4,_2a5){this.grid.styleRowNode(_2a4,_2a5);},updateRow:function(_2a6){var _2a7=this.getRowNode(_2a6);if(_2a7){_2a7.style.height="";this.buildRow(_2a6,_2a7);}return _2a7;},updateRowStyles:function(_2a8){this.styleRowNode(_2a8,this.getRowNode(_2a8));},lastTop:0,firstScroll:0,_nativeScroll:false,doscroll:function(_2a9){if(has("ff")>=13||has("chrome")){this._nativeScroll=true;}var _2aa=this.grid.isLeftToRight();if(this.firstScroll<2){if((!_2aa&&this.firstScroll==1)||(_2aa&&this.firstScroll===0)){var s=html.marginBox(this.headerNodeContainer);if(has("ie")){this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";}else{if(has("mozilla")){this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=_2aa?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;}}}this.firstScroll++;}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;var top=this.scrollboxNode.scrollTop;if(top!==this.lastTop){this.grid.scrollTo(top);}this._nativeScroll=false;},setScrollTop:function(_2ab){this.lastTop=_2ab;if(!this._nativeScroll){this.scrollboxNode.scrollTop=_2ab;}return this.scrollboxNode.scrollTop;},doContentEvent:function(e){if(this.content.decorateEvent(e)){this.grid.onContentEvent(e);}},doHeaderEvent:function(e){if(this.header.decorateEvent(e)){this.grid.onHeaderEvent(e);}},dispatchContentEvent:function(e){return this.content.dispatchEvent(e);},dispatchHeaderEvent:function(e){return this.header.dispatchEvent(e);},setColWidth:function(_2ac,_2ad){this.grid.setCellWidth(_2ac,_2ad+"px");},update:function(){if(!this.domNode){return;}this.content.update();this.grid.update();var left=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=left;this.headerNode.scrollLeft=left;}});var _2ae=_257("dojox.grid._GridAvatar",_261,{construct:function(){var dd=win.doc;var a=dd.createElement("table");a.cellPadding=a.cellSpacing="0";a.className="dojoxGridDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dd.createElement("tbody");var tr=dd.createElement("tr");var td=dd.createElement("td");var img=dd.createElement("td");tr.className="dojoxGridDndAvatarItem";img.className="dojoxGridDndAvatarItemImage";img.style.width="16px";var _2af=this.manager.source,node;if(_2af.creator){node=_2af._normalizedCreator(_2af.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);var _2b0,_2b1;if(node.tagName.toLowerCase()=="tr"){_2b0=dd.createElement("table");_2b1=dd.createElement("tbody");_2b1.appendChild(node);_2b0.appendChild(_2b1);node=_2b0;}else{if(node.tagName.toLowerCase()=="th"){_2b0=dd.createElement("table");_2b1=dd.createElement("tbody");var r=dd.createElement("tr");_2b0.cellPadding=_2b0.cellSpacing="0";r.appendChild(node);_2b1.appendChild(r);_2b0.appendChild(_2b1);node=_2b0;}}}node.id="";td.appendChild(node);tr.appendChild(img);tr.appendChild(td);html.style(tr,"opacity",0.9);b.appendChild(tr);a.appendChild(b);this.node=a;var m=dojo.dnd.manager();this.oldOffsetY=m.OFFSET_Y;m.OFFSET_Y=1;},destroy:function(){dojo.dnd.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments);}});var _2b2=dojo.dnd.manager().makeAvatar;dojo.dnd.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined&&!html.hasClass(win.body(),"dijit_a11y")){return new _2ae(this);}return _2b2.call(dojo.dnd.manager());};return _265;});},"url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n","dojo/dnd/Source":function(){define(["../main","./Selector","./Manager"],function(dojo,_2b3,_2b4){if(!dojo.isAsync){dojo.ready(0,function(){var _2b5=["dojo/dnd/AutoSource","dojo/dnd/Target"];require(_2b5);});}return dojo.declare("dojo.dnd.Source",_2b3,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(node,_2b6){dojo.mixin(this,dojo.mixin({},_2b6));var type=this.accept;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){dojo.addClass(this.node,"dojoDndSource");}this.targetState="";if(this.accept){dojo.addClass(this.node,"dojoDndTarget");}if(this.horizontal){dojo.addClass(this.node,"dojoDndHorizontal");}this.topics=[dojo.subscribe("/dnd/source/over",this,"onDndSourceOver"),dojo.subscribe("/dnd/start",this,"onDndStart"),dojo.subscribe("/dnd/drop",this,"onDndDrop"),dojo.subscribe("/dnd/cancel",this,"onDndCancel")];},checkAcceptance:function(_2b7,_2b8){if(this==_2b7){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_2b8.length;++i){var type=_2b7.getItem(_2b8[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_2b9,self){if(_2b9){return true;}if(arguments.length<2){self=this==_2b4.manager().target;}if(self){if(this.copyOnly){return this.selfCopy;}}else{return this.copyOnly;}return false;},destroy:function(){dojo.dnd.Source.superclass.destroy.call(this);dojo.forEach(this.topics,dojo.unsubscribe);this.targetAnchor=null;},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}dojo.dnd.Source.superclass.onMouseMove.call(this,e);var m=_2b4.manager();if(!this.isDragging){if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _2ba=this.getSelectedNodes();if(_2ba.length){m.startDrag(this,_2ba,this.copyState(dojo.isCopyKey(e),true));}}}if(this.isDragging){var _2bb=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=dojo.position(this.current,true);}if(this.horizontal){_2bb=(e.pageX-this.targetBox.x)<(this.targetBox.w/2);}else{_2bb=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_2bb!=this.before){this._markTargetAnchor(_2bb);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}},onMouseDown:function(e){if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){this.mouseDown=true;this._lastX=e.pageX;this._lastY=e.pageY;dojo.dnd.Source.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;dojo.dnd.Source.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_2bc){if(this!=_2bc){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=_2b4.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_2bd,_2be,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_2bd?(copy?"Copied":"Moved"):"");}var _2bf=this.accept&&this.checkAcceptance(_2bd,_2be);this._changeState("Target",_2bf?"":"Disabled");if(this==_2bd){_2b4.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_2c0,_2c1,copy,_2c2){if(this==_2c2){this.onDrop(_2c0,_2c1,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_2c3,_2c4,copy){if(this!=_2c3){this.onDropExternal(_2c3,_2c4,copy);}else{this.onDropInternal(_2c4,copy);}},onDropExternal:function(_2c5,_2c6,copy){var _2c7=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _2c7.call(this,_2c5.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_2c5.getItem(node.id);var n=node.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node,hint){var t=_2c5.getItem(node.id);_2c5.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_2c5.selectNone();}this.insertNodes(true,_2c6,this.before,this.current);if(!copy&&this.creator){_2c5.deleteSelectedNodes();}this._normalizedCreator=_2c7;},onDropInternal:function(_2c8,copy){var _2c9=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _2c9.call(this,this.getItem(node.id).data,hint);};}else{this._normalizedCreator=function(node,hint){var t=this.getItem(node.id);var n=node.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}}else{if(!this.current){return;}this._normalizedCreator=function(node,hint){var t=this.getItem(node.id);return {node:node,data:t.data,type:t.type};};}this._removeSelection();this.insertNodes(true,_2c8,this.before,this.current);this._normalizedCreator=_2c9;},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){dojo.dnd.Source.superclass.onOverEvent.call(this);_2b4.manager().overSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOver();}},onOutEvent:function(){dojo.dnd.Source.superclass.onOutEvent.call(this);_2b4.manager().outSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOut();}},_markTargetAnchor:function(_2ca){if(this.current==this.targetAnchor&&this.before==_2ca){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_2ca;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(!dojo.mouseButtons.isLeft(e)){return false;}if(!this.withHandles){return true;}for(var node=e.target;node&&node!==this.node;node=node.parentNode){if(dojo.hasClass(node,"dojoDndHandle")){return true;}if(dojo.hasClass(node,"dojoDndItem")||dojo.hasClass(node,"dojoDndIgnore")){break;}}return false;}});});},"dojo/dnd/Selector":function(){define(["../main","./common","./Container"],function(dojo){dojo.declare("dojo.dnd.Selector",dojo.dnd.Container,{constructor:function(node,_2cb){if(!_2cb){_2cb={};}this.singular=_2cb.singular;this.autoSync=_2cb.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(dojo.connect(this.node,"onmousedown",this,"onMouseDown"),dojo.connect(this.node,"onmouseup",this,"onMouseUp"));},singular:false,getSelectedNodes:function(){var t=new dojo.NodeList();var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(dojo.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(dojo.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=dojo.byId(i);this.delItem(i);dojo.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||dojo.global;var s=this.selection,e=dojo.dnd._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){dojo.dnd.Selector.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}dojo.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_2cc,data,_2cd,_2ce){var _2cf=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_2cf.call(this,item,hint);if(_2cc){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};dojo.dnd.Selector.superclass.insertNodes.call(this,data,_2cd,_2ce);this._normalizedCreator=_2cf;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!dojo.isCopyKey(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(e.button===dojo.mouseButtons.LEFT){dojo.stopEvent(e);}return;}if(!this.singular&&e.shiftKey){if(!dojo.isCopyKey(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0;for(;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(dojo.isCopyKey(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dojo.isCopyKey(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}dojo.stopEvent(e);},onMouseUp:function(e){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(e){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=dojo.connect(this.node,"onmousemove",this,"onMouseMove");},onOutEvent:function(){dojo.disconnect(this.onmousemoveEvent);delete this.onmousemoveEvent;},_removeSelection:function(){var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=dojo.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});return dojo.dnd.Selector;});},"dojo/dnd/common":function(){define(["../main"],function(dojo){dojo.getObject("dnd",true,dojo);dojo.dnd.getCopyKeyState=dojo.isCopyKey;dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};return dojo.dnd;});},"dojo/dnd/Container":function(){define(["../main","../Evented","./common","../parser"],function(dojo,_2d0){dojo.declare("dojo.dnd.Container",_2d0,{skipForm:false,constructor:function(node,_2d1){this.node=dojo.byId(node);if(!_2d1){_2d1={};}this.creator=_2d1.creator||null;this.skipForm=_2d1.skipForm;this.parent=_2d1.dropParent&&dojo.byId(_2d1.dropParent);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_2d1&&_2d1._skipStartup)){this.startup();}this.events=[dojo.connect(this.node,"onmouseover",this,"onMouseOver"),dojo.connect(this.node,"onmouseout",this,"onMouseOut"),dojo.connect(this.node,"ondragstart",this,"onSelectStart"),dojo.connect(this.node,"onselectstart",this,"onSelectStart")];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||dojo.global;var m=this.map,e=dojo.dnd._empty;for(var i in m){if(i in e){continue;}f.call(o,m[i],i,this);}return o;},clearItems:function(){this.map={};},getAllNodes:function(){return dojo.query("> .dojoDndItem",this.parent);},sync:function(){var map={};this.getAllNodes().forEach(function(node){if(node.id){var item=this.getItem(node.id);if(item){map[node.id]=item;return;}}else{node.id=dojo.dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");map[node.id]={data:data||node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]};},this);this.map=map;return this;},insertNodes:function(data,_2d2,_2d3){if(!this.parent.firstChild){_2d3=null;}else{if(_2d2){if(!_2d3){_2d3=this.parent.firstChild;}}else{if(_2d3){_2d3=_2d3.nextSibling;}}}if(_2d3){for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.insertBefore(t.node,_2d3);}}else{for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.clearItems();this.node=this.parent=this.current=null;},markupFactory:function(_2d4,node,ctor){_2d4._skipStartup=true;return new ctor(node,_2d4);},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}}this.defaultCreator=dojo.dnd._defaultCreator(this.parent);this.sync();},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_2d5){var _2d6="dojoDnd"+type;var _2d7=type.toLowerCase()+"State";dojo.replaceClass(this.node,_2d6+_2d5,_2d6+this[_2d7]);this[_2d7]=_2d5;},_addItemClass:function(node,type){dojo.addClass(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){dojo.removeClass(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _2d8=node.parentNode;_2d8;node=_2d8,_2d8=node.parentNode){if(_2d8==this.parent&&dojo.hasClass(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator||this.defaultCreator).call(this,item,hint);if(!dojo.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=dojo.dnd.getUniqueId();}dojo.addClass(t.node,"dojoDndItem");return t;}});dojo.dnd._createNode=function(tag){if(!tag){return dojo.dnd._createSpan;}return function(text){return dojo.create(tag,{innerHTML:text});};};dojo.dnd._createTrTd=function(text){var tr=dojo.create("tr");dojo.create("td",{innerHTML:text},tr);return tr;};dojo.dnd._createSpan=function(text){return dojo.create("span",{innerHTML:text});};dojo.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};dojo.dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="tbody"||tag=="thead"?dojo.dnd._createTrTd:dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]);return function(item,hint){var _2d9=item&&dojo.isObject(item),data,type,n;if(_2d9&&item.tagName&&item.nodeType&&item.getAttribute){data=item.getAttribute("dndData")||item.innerHTML;type=item.getAttribute("dndType");type=type?type.split(/\s*,\s*/):["text"];n=item;}else{data=(_2d9&&item.data)?item.data:item;type=(_2d9&&item.type)?item.type:["text"];n=(hint=="avatar"?dojo.dnd._createSpan:c)(String(data));}if(!n.id){n.id=dojo.dnd.getUniqueId();}return {node:n,data:data,type:type};};};return dojo.dnd.Container;});},"dojo/parser":function(){define(["./_base/kernel","./_base/lang","./_base/array","./_base/html","./_base/window","./_base/url","./_base/json","./aspect","./date/stamp","./query","./on","./ready"],function(dojo,_2da,_2db,_2dc,_2dd,_2de,_2df,_2e0,_2e1,_2e2,don){new Date("X");var _2e3={"dom-attributes-explicit":document.createElement("div").attributes.length<40};function has(_2e4){return _2e3[_2e4];};dojo.parser=new function(){var _2e5={};function _2e6(_2e7){var map={};for(var name in _2e7){if(name.charAt(0)=="_"){continue;}map[name.toLowerCase()]=name;}return map;};_2e0.after(_2da,"extend",function(){_2e5={};},true);var _2e8={};this._functionFromScript=function(_2e9,_2ea){var _2eb="";var _2ec="";var _2ed=(_2e9.getAttribute(_2ea+"args")||_2e9.getAttribute("args"));if(_2ed){_2db.forEach(_2ed.split(/\s*,\s*/),function(part,idx){_2eb+="var "+part+" = arguments["+idx+"]; ";});}var _2ee=_2e9.getAttribute("with");if(_2ee&&_2ee.length){_2db.forEach(_2ee.split(/\s*,\s*/),function(part){_2eb+="with("+part+"){";_2ec+="}";});}return new Function(_2eb+_2e9.innerHTML+_2ec);};this.instantiate=function(_2ef,_2f0,args){var _2f1=[],_2f0=_2f0||{};args=args||{};var _2f2=(args.scope||dojo._scopeName)+"Type",_2f3="data-"+(args.scope||dojo._scopeName)+"-",_2f4=_2f3+"type",_2f5=_2f3+"props",_2f6=_2f3+"attach-point",_2f7=_2f3+"attach-event",_2f8=_2f3+"id";var _2f9={};_2db.forEach([_2f5,_2f4,_2f2,_2f8,"jsId",_2f6,_2f7,"dojoAttachPoint","dojoAttachEvent","class","style"],function(name){_2f9[name.toLowerCase()]=name.replace(args.scope,"dojo");});_2db.forEach(_2ef,function(obj){if(!obj){return;}var node=obj.node||obj,type=_2f2 in _2f0?_2f0[_2f2]:obj.node?obj.type:(node.getAttribute(_2f4)||node.getAttribute(_2f2)),ctor=_2e8[type]||(_2e8[type]=_2da.getObject(type)),_2fa=ctor&&ctor.prototype;if(!ctor){throw new Error("Could not load class '"+type);}var _2fb={};if(args.defaults){_2da.mixin(_2fb,args.defaults);}if(obj.inherited){_2da.mixin(_2fb,obj.inherited);}var _2fc;if(has("dom-attributes-explicit")){_2fc=node.attributes;}else{var _2fd=/^input$|^img$/i.test(node.nodeName)?node:node.cloneNode(false),_2fe=_2fd.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*/,"").replace(/>.*$/,"");_2fc=_2db.map(_2fe.split(/\s+/),function(name){var _2ff=name.toLowerCase();return {name:name,value:(node.nodeName=="LI"&&name=="value")||_2ff=="enctype"?node.getAttribute(_2ff):node.getAttributeNode(_2ff).value,specified:true};});}var i=0,item;while(item=_2fc[i++]){if(!item||!item.specified){continue;}var name=item.name,_300=name.toLowerCase(),_301=item.value;if(_300 in _2f9){switch(_2f9[_300]){case "data-dojo-props":var _302=_301;break;case "data-dojo-id":case "jsId":var _303=_301;break;case "data-dojo-attach-point":case "dojoAttachPoint":_2fb.dojoAttachPoint=_301;break;case "data-dojo-attach-event":case "dojoAttachEvent":_2fb.dojoAttachEvent=_301;break;case "class":_2fb["class"]=node.className;break;case "style":_2fb["style"]=node.style&&node.style.cssText;break;}}else{if(!(name in _2fa)){var map=(_2e5[type]||(_2e5[type]=_2e6(_2fa)));name=map[_300]||name;}if(name in _2fa){switch(typeof _2fa[name]){case "string":_2fb[name]=_301;break;case "number":_2fb[name]=_301.length?Number(_301):NaN;break;case "boolean":_2fb[name]=_301.toLowerCase()!="false";break;case "function":if(_301===""||_301.search(/[^\w\.]+/i)!=-1){_2fb[name]=new Function(_301);}else{_2fb[name]=_2da.getObject(_301,false)||new Function(_301);}break;default:var pVal=_2fa[name];_2fb[name]=(pVal&&"length" in pVal)?(_301?_301.split(/\s*,\s*/):[]):(pVal instanceof Date)?(_301==""?new Date(""):_301=="now"?new Date():_2e1.fromISOString(_301)):(pVal instanceof dojo._Url)?(dojo.baseUrl+_301):_2df.fromJson(_301);}}else{_2fb[name]=_301;}}}if(_302){try{_302=_2df.fromJson.call(args.propsThis,"{"+_302+"}");_2da.mixin(_2fb,_302);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_302+"'");}}_2da.mixin(_2fb,_2f0);var _304=obj.node?obj.scripts:(ctor&&(ctor._noScript||_2fa._noScript)?[]:_2e2("> script[type^='dojo/']",node));var _305=[],_306=[],_307=[],on=[];if(_304){for(i=0;i<_304.length;i++){var _308=_304[i];node.removeChild(_308);var _309=(_308.getAttribute(_2f3+"event")||_308.getAttribute("event")),prop=_308.getAttribute(_2f3+"prop"),type=_308.getAttribute("type"),nf=this._functionFromScript(_308,_2f3);if(_309){if(type=="dojo/connect"){_305.push({event:_309,func:nf});}else{if(type=="dojo/on"){on.push({event:_309,func:nf});}else{_2fb[_309]=nf;}}}else{if(type=="dojo/watch"){_307.push({prop:prop,func:nf});}else{_306.push(nf);}}}}var _30a=ctor.markupFactory||_2fa.markupFactory;var _30b=_30a?_30a(_2fb,node,ctor):new ctor(_2fb,node);_2f1.push(_30b);if(_303){_2da.setObject(_303,_30b);}for(i=0;i<_305.length;i++){_2e0.after(_30b,_305[i].event,dojo.hitch(_30b,_305[i].func),true);}for(i=0;i<_306.length;i++){_306[i].call(_30b);}for(i=0;i<_307.length;i++){_30b.watch(_307[i].prop,_307[i].func);}for(i=0;i<on.length;i++){don(_30b,on[i].event,on[i].func);}},this);if(!_2f0._started){_2db.forEach(_2f1,function(_30c){if(!args.noStart&&_30c&&_2da.isFunction(_30c.startup)&&!_30c._started){_30c.startup();}});}return _2f1;};this.parse=function(_30d,args){var root;if(!args&&_30d&&_30d.rootNode){args=_30d;root=args.rootNode;}else{root=_30d;}root=root?_2dc.byId(root):_2dd.body();args=args||{};var _30e=(args.scope||dojo._scopeName)+"Type",_30f="data-"+(args.scope||dojo._scopeName)+"-",_310=_30f+"type",_311=_30f+"textdir";var list=[];var node=root.firstChild;var _312=args&&args.inherited;if(!_312){function _313(node,attr){return (node.getAttribute&&node.getAttribute(attr))||(node!==_2dd.doc&&node!==_2dd.doc.documentElement&&node.parentNode?_313(node.parentNode,attr):null);};_312={dir:_313(root,"dir"),lang:_313(root,"lang"),textDir:_313(root,_311)};for(var key in _312){if(!_312[key]){delete _312[key];}}}var _314={inherited:_312};var _315;var _316;function _317(_318){if(!_318.inherited){_318.inherited={};var node=_318.node,_319=_317(_318.parent);var _31a={dir:node.getAttribute("dir")||_319.dir,lang:node.getAttribute("lang")||_319.lang,textDir:node.getAttribute(_311)||_319.textDir};for(var key in _31a){if(_31a[key]){_318.inherited[key]=_31a[key];}}}return _318.inherited;};while(true){if(!node){if(!_314||!_314.node){break;}node=_314.node.nextSibling;_315=_314.scripts;_316=false;_314=_314.parent;continue;}if(node.nodeType!=1){node=node.nextSibling;continue;}if(_315&&node.nodeName.toLowerCase()=="script"){type=node.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_315.push(node);}node=node.nextSibling;continue;}if(_316){node=node.nextSibling;continue;}var type=node.getAttribute(_310)||node.getAttribute(_30e);var _31b=node.firstChild;if(!type&&(!_31b||(_31b.nodeType==3&&!_31b.nextSibling))){node=node.nextSibling;continue;}var _31c={node:node,scripts:_315,parent:_314};var ctor=type&&(_2e8[type]||(_2e8[type]=_2da.getObject(type))),_31d=ctor&&!ctor.prototype._noScript?[]:null;if(type){list.push({"type":type,node:node,scripts:_31d,inherited:_317(_31c)});}node=_31b;_315=_31d;_316=ctor&&ctor.prototype.stopParser&&!(args&&args.template);_314=_31c;}var _31e=args&&args.template?{template:true}:null;return this.instantiate(list,_31e,args);};}();if(dojo.config.parseOnLoad){dojo.ready(100,dojo.parser,"parse");}return dojo.parser;});},"dojo/_base/url":function(){define(["./kernel"],function(dojo){var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"),_31f=function(){var n=null,_320=arguments,uri=[_320[0]];for(var i=1;i<_320.length;i++){if(!_320[i]){continue;}var _321=new _31f(_320[i]+""),_322=new _31f(uri[0]+"");if(_321.path==""&&!_321.scheme&&!_321.authority&&!_321.query){if(_321.fragment!=n){_322.fragment=_321.fragment;}_321=_322;}else{if(!_321.scheme){_321.scheme=_322.scheme;if(!_321.authority){_321.authority=_322.authority;if(_321.path.charAt(0)!="/"){var path=_322.path.substring(0,_322.path.lastIndexOf("/")+1)+_321.path;var segs=path.split("/");for(var j=0;j<segs.length;j++){if(segs[j]=="."){if(j==segs.length-1){segs[j]="";}else{segs.splice(j,1);j--;}}else{if(j>0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){if(j==(segs.length-1)){segs.splice(j,1);segs[j-1]="";}else{segs.splice(j-1,2);j-=2;}}}}_321.path=segs.join("/");}}}}uri=[];if(_321.scheme){uri.push(_321.scheme,":");}if(_321.authority){uri.push("//",_321.authority);}uri.push(_321.path);if(_321.query){uri.push("?",_321.query);}if(_321.fragment){uri.push("#",_321.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};_31f.prototype.toString=function(){return this.uri;};return dojo._Url=_31f;});},"dojo/date/stamp":function(){define(["../_base/kernel","../_base/lang","../_base/array"],function(dojo,lang,_323){lang.getObject("date.stamp",true,dojo);dojo.date.stamp.fromISOString=function(_324,_325){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _326=dojo.date.stamp._isoRegExp.exec(_324),_327=null;if(_326){_326.shift();if(_326[1]){_326[1]--;}if(_326[6]){_326[6]*=1000;}if(_325){_325=new Date(_325);_323.forEach(_323.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _325["get"+prop]();}),function(_328,_329){_326[_329]=_326[_329]||_328;});}_327=new Date(_326[0]||1970,_326[1]||0,_326[2]||1,_326[3]||0,_326[4]||0,_326[5]||0,_326[6]||0);if(_326[0]<100){_327.setFullYear(_326[0]||1970);}var _32a=0,_32b=_326[7]&&_326[7].charAt(0);if(_32b!="Z"){_32a=((_326[8]||0)*60)+(Number(_326[9])||0);if(_32b!="-"){_32a*=-1;}}if(_32b){_32a-=_327.getTimezoneOffset();}if(_32a){_327.setTime(_327.getTime()+_32a*60000);}}return _327;};dojo.date.stamp.toISOString=function(_32c,_32d){var _32e=function(n){return (n<10)?"0"+n:n;};_32d=_32d||{};var _32f=[],_330=_32d.zulu?"getUTC":"get",date="";if(_32d.selector!="time"){var year=_32c[_330+"FullYear"]();date=["0000".substr((year+"").length)+year,_32e(_32c[_330+"Month"]()+1),_32e(_32c[_330+"Date"]())].join("-");}_32f.push(date);if(_32d.selector!="date"){var time=[_32e(_32c[_330+"Hours"]()),_32e(_32c[_330+"Minutes"]()),_32e(_32c[_330+"Seconds"]())].join(":");var _331=_32c[_330+"Milliseconds"]();if(_32d.milliseconds){time+="."+(_331<100?"0":"")+_32e(_331);}if(_32d.zulu){time+="Z";}else{if(_32d.selector!="time"){var _332=_32c.getTimezoneOffset();var _333=Math.abs(_332);time+=(_332>0?"-":"+")+_32e(Math.floor(_333/60))+":"+_32e(_333%60);}}_32f.push(time);}return _32f.join("T");};return dojo.date.stamp;});},"dojo/dnd/Manager":function(){define(["../main","../Evented","./common","./autoscroll","./Avatar"],function(dojo,_334){var _335=dojo.declare("dojo.dnd.Manager",[_334],{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:16,OFFSET_Y:16,overSource:function(_336){if(this.avatar){this.target=(_336&&_336.targetState!="Disabled")?_336:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}dojo.publish("/dnd/source/over",[_336]);},outSource:function(_337){if(this.avatar){if(this.target==_337){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_338,_339,copy){this.source=_338;this.nodes=_339;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_338,_339,this.copy]);this.events=[dojo.connect(dojo.doc,"onmousemove",this,"onMouseMove"),dojo.connect(dojo.doc,"onmouseup",this,"onMouseUp"),dojo.connect(dojo.doc,"onkeydown",this,"onKeyDown"),dojo.connect(dojo.doc,"onkeyup",this,"onKeyUp"),dojo.connect(dojo.doc,"ondragstart",dojo.stopEvent),dojo.connect(dojo.body(),"onselectstart",dojo.stopEvent)];var c="dojoDnd"+(copy?"Copy":"Move");dojo.addClass(dojo.body(),c);},canDrop:function(flag){var _33a=Boolean(this.target&&flag);if(this.canDropFlag!=_33a){this.canDropFlag=_33a;this.avatar.update();}},stopDrag:function(){dojo.removeClass(dojo.body(),["dojoDndCopy","dojoDndMove"]);dojo.forEach(this.events,dojo.disconnect);this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new dojo.dnd.Avatar(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){dojo.dnd.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var copy=Boolean(this.source.copyState(dojo.isCopyKey(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(dojo.isCopyKey(e))),_33b=[this.source,this.nodes,copy,this.target,e];dojo.publish("/dnd/drop/before",_33b);dojo.publish("/dnd/drop",_33b);}else{dojo.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case dojo.keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case dojo.keys.ESCAPE:dojo.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==dojo.keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();dojo.replaceClass(dojo.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"));}});dojo.dnd._manager=null;_335.manager=dojo.dnd.manager=function(){if(!dojo.dnd._manager){dojo.dnd._manager=new dojo.dnd.Manager();}return dojo.dnd._manager;};return _335;});},"dojo/dnd/autoscroll":function(){define(["../main","../window"],function(dojo){dojo.getObject("dnd",true,dojo);dojo.dnd.getViewport=dojo.window.getBox;dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.window.getBox(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){var b,t,w,h,rx,ry,dx=0,dy=0,_33c,_33d;for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n),_33e=(s.overflow.toLowerCase() in dojo.dnd._validOverflow),_33f=(s.overflowX.toLowerCase() in dojo.dnd._validOverflow),_340=(s.overflowY.toLowerCase() in dojo.dnd._validOverflow);if(_33e||_33f||_340){b=dojo._getContentBox(n,s);t=dojo.position(n,true);}if(_33e||_33f){w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2);rx=e.pageX-t.x;if(dojo.isWebKit||dojo.isOpera){rx+=dojo.body().scrollLeft;}dx=0;if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}_33c=n.scrollLeft;n.scrollLeft=n.scrollLeft+dx;}}if(_33e||_340){h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2);ry=e.pageY-t.y;if(dojo.isWebKit||dojo.isOpera){ry+=dojo.body().scrollTop;}dy=0;if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}_33d=n.scrollTop;n.scrollTop=n.scrollTop+dy;}}if(dx||dy){return;}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};return dojo.dnd;});},"dojo/dnd/Avatar":function(){define(["../main","./common"],function(dojo){dojo.declare("dojo.dnd.Avatar",null,{constructor:function(_341){this.manager=_341;this.construct();},construct:function(){this.isA11y=dojo.hasClass(dojo.body(),"dijit_a11y");var a=dojo.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_342=this.manager.source,node,b=dojo.create("tbody",null,a),tr=dojo.create("tr",null,b),td=dojo.create("td",null,tr),icon=this.isA11y?dojo.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td):null,span=dojo.create("span",{innerHTML:_342.generateText?this._generateText():""},td),k=Math.min(5,this.manager.nodes.length),i=0;dojo.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_342.creator){node=_342._normalizedCreator(_342.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _343=dojo.create("table"),_344=dojo.create("tbody",null,_343);_344.appendChild(node);node=_343;}}node.id="";tr=dojo.create("tr",null,b);td=dojo.create("td",null,tr);td.appendChild(node);dojo.attr(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){dojo.destroy(this.node);this.node=false;},update:function(){dojo[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");if(this.isA11y){var icon=dojo.byId("a11yIcon");var text="+";if(this.manager.canDropFlag&&!this.manager.copy){text="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){text="o";}else{if(!this.manager.canDropFlag){text="x";}}}icon.innerHTML=text;}dojo.query(("tr.dojoDndAvatarHeader td span"+(this.isA11y?" span":"")),this.node).forEach(function(node){node.innerHTML=this._generateText();},this);},_generateText:function(){return this.manager.nodes.length.toString();}});return dojo.dnd.Avatar;});},"dijit/_TemplatedMixin":function(){define("dijit/_TemplatedMixin",["dojo/_base/lang","dojo/touch","./_WidgetBase","dojo/string","dojo/cache","dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window"],function(lang,_345,_346,_347,_348,_349,_34a,_34b,has,_34c,win){var _34d=_34a("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _34e=this.declaredClass,_34f=this;return _347.substitute(tmpl,this,function(_350,key){if(key.charAt(0)=="!"){_350=lang.getObject(key.substr(1),false,_34f);}if(typeof _350=="undefined"){throw new Error(_34e+" template:"+key);}if(_350==null){return "";}return key.charAt(0)=="!"?_350:_350.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){if(!this.templateString){this.templateString=_348(this.templatePath,{sanitize:true});}var _351=_34d.getCachedTemplate(this.templateString,this._skipNodeCache);var node;if(lang.isString(_351)){node=_34b.toDom(this._stringRepl(_351));if(node.nodeType!=1){throw new Error("Invalid template: "+_351);}}else{node=_351.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node,function(n,p){return n.getAttribute(p);});this._beforeFillContent();this._fillContent(this.srcNodeRef);},_beforeFillContent:function(){},_fillContent:function(_352){var dest=this.containerNode;if(_352&&dest){while(_352.hasChildNodes()){dest.appendChild(_352.firstChild);}}},_attachTemplateNodes:function(_353,_354){var _355=lang.isArray(_353)?_353:(_353.all||_353.getElementsByTagName("*"));var x=lang.isArray(_353)?0:-1;for(;x<_355.length;x++){var _356=(x==-1)?_353:_355[x];if(this.widgetsInTemplate&&(_354(_356,"dojoType")||_354(_356,"data-dojo-type"))){continue;}var _357=_354(_356,"dojoAttachPoint")||_354(_356,"data-dojo-attach-point");if(_357){var _358,_359=_357.split(/\s*,\s*/);while((_358=_359.shift())){if(lang.isArray(this[_358])){this[_358].push(_356);}else{this[_358]=_356;}this._attachPoints.push(_358);}}var _35a=_354(_356,"dojoAttachEvent")||_354(_356,"data-dojo-attach-event");if(_35a){var _35b,_35c=_35a.split(/\s*,\s*/);var trim=lang.trim;while((_35b=_35c.shift())){if(_35b){var _35d=null;if(_35b.indexOf(":")!=-1){var _35e=_35b.split(":");_35b=trim(_35e[0]);_35d=trim(_35e[1]);}else{_35b=trim(_35b);}if(!_35d){_35d=_35b;}this._attachEvents.push(this.connect(_356,_345[_35b]||_35b,_35d));}}}}},destroyRendering:function(){_349.forEach(this._attachPoints,function(_35f){delete this[_35f];},this);this._attachPoints=[];_349.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_34d._templateCache={};_34d.getCachedTemplate=function(_360,_361){var _362=_34d._templateCache;var key=_360;var _363=_362[key];if(_363){try{if(!_363.ownerDocument||_363.ownerDocument==win.doc){return _363;}}catch(e){}_34b.destroy(_363);}_360=_347.trim(_360);if(_361||_360.match(/\$\{([^\}]+)\}/g)){return (_362[key]=_360);}else{var node=_34b.toDom(_360);if(node.nodeType!=1){throw new Error("Invalid template: "+_360);}return (_362[key]=node);}};if(has("ie")){_34c.addOnWindowUnload(function(){var _364=_34d._templateCache;for(var key in _364){var _365=_364[key];if(typeof _365=="object"){_34b.destroy(_365);}delete _364[key];}});}lang.extend(_346,{dojoAttachEvent:"",dojoAttachPoint:""});return _34d;});},"dojo/touch":function(){define(["./_base/kernel","./aspect","./dom","./on","./has","./mouse","./domReady","./_base/window"],function(dojo,_366,dom,on,has,_367,_368,win){var _369=has("touch");var ios4=false;if(has("ios")){var ua=navigator.userAgent;var v=ua.match(/OS ([\d_]+)/)?RegExp.$1:"1";var os=parseFloat(v.replace(/_/,".").replace(/_/g,""));ios4=os<5;}var _36a;function _36b(_36c,_36d){if(_369){return function(node,_36e){var _36f=on(node,_36d,_36e),_370=on(node,_36c,function(evt){if(!_36a||(new Date()).getTime()>_36a+1000){_36e.call(this,evt);}});return {remove:function(){_36f.remove();_370.remove();}};};}else{return function(node,_371){return on(node,_36c,_371);};}};var _372,_373;if(_369){_368(function(){_373=win.body();win.doc.addEventListener("touchstart",function(evt){_36a=(new Date()).getTime();var _374=_373;_373=evt.target;on.emit(_374,"dojotouchout",{target:_374,relatedTarget:_373,bubbles:true});on.emit(_373,"dojotouchover",{target:_373,relatedTarget:_374,bubbles:true});},true);on(win.doc,"touchmove",function(evt){_36a=(new Date()).getTime();var _375=win.doc.elementFromPoint(evt.pageX-(ios4?0:win.global.pageXOffset),evt.pageY-(ios4?0:win.global.pageYOffset));if(_375&&_373!==_375){on.emit(_373,"dojotouchout",{target:_373,relatedTarget:_375,bubbles:true});on.emit(_375,"dojotouchover",{target:_375,relatedTarget:_373,bubbles:true});_373=_375;}});});_372=function(node,_376){return on(win.doc,"touchmove",function(evt){if(node===win.doc||dom.isDescendant(_373,node)){evt.target=_373;_376.call(this,evt);}});};}var _377={press:_36b("mousedown","touchstart"),move:_36b("mousemove",_372),release:_36b("mouseup","touchend"),cancel:_36b(_367.leave,"touchcancel"),over:_36b("mouseover","dojotouchover"),out:_36b("mouseout","dojotouchout"),enter:_367._eventHandler(_36b("mouseover","dojotouchover")),leave:_367._eventHandler(_36b("mouseout","dojotouchout"))};1&&(dojo.touch=_377);return _377;});},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(dojo,lang){lang.getObject("string",true,dojo);dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_378,map,_379,_37a){_37a=_37a||dojo.global;_379=_379?lang.hitch(_37a,_379):function(v){return v;};return _378.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_37b,key,_37c){var _37d=lang.getObject(key,false,map);if(_37c){_37d=lang.getObject(_37c,false,_37a).call(_37a,_37d,key);}return _379(_37d,key).toString();});};dojo.string.trim=String.prototype.trim?lang.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};return dojo.string;});},"dojo/cache":function(){define(["./_base/kernel","./text"],function(dojo,text){return dojo.cache;});},"dojox/html/metrics":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/sniff","dojo/ready","dojo/_base/unload","dojo/_base/window","dojo/dom-geometry"],function(_37e,lang,has,_37f,_380,_381,_382){var dhm=lang.getObject("dojox.html.metrics",true);var _383=lang.getObject("dojox");dhm.getFontMeasurements=function(){var _384={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};var _385;if(has("ie")){_385=_381.doc.documentElement.style.fontSize||"";if(!_385){_381.doc.documentElement.style.fontSize="100%";}}var div=_381.doc.createElement("div");var ds=div.style;ds.position="absolute";ds.left="-100px";ds.top="0";ds.width="30px";ds.height="1000em";ds.borderWidth="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";_381.body().appendChild(div);for(var p in _384){ds.fontSize=p;_384[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}if(has("ie")){_381.doc.documentElement.style.fontSize=_385;}_381.body().removeChild(div);div=null;return _384;};var _386=null;dhm.getCachedFontMeasurements=function(_387){if(_387||!_386){_386=dhm.getFontMeasurements();}return _386;};var _388=null,_389={};dhm.getTextBox=function(text,_38a,_38b){var m,s;if(!_388){m=_388=_381.doc.createElement("div");var c=_381.doc.createElement("div");c.appendChild(m);s=c.style;s.overflow="scroll";s.position="absolute";s.left="0px";s.top="-10000px";s.width="1px";s.height="1px";s.visibility="hidden";s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";_381.body().appendChild(c);}else{m=_388;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_38a){for(var i in _38a){if(i in _389){continue;}s[i]=_38a[i];}}if(arguments.length>2&&_38b){m.className=_38b;}m.innerHTML=text;var box=_382.position(m);box.w=m.parentNode.scrollWidth;return box;};var _38c={w:16,h:16};dhm.getScrollbar=function(){return {w:_38c.w,h:_38c.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_38d){var f=dhm._fontResizeNode=_381.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";if(has("ie")){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=f.contentWindow.parent[_383._scopeName].html.metrics._fontresize;}};}else{f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[_383._scopeName].html.metrics._fontresize;};}f.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}</script></head><body></body></html>'");_381.body().appendChild(f);dhm.initOnFontResize=function(){};};dhm.onFontResize=function(){};dhm._fontresize=function(){dhm.onFontResize();};_380.addOnUnload(function(){var f=dhm._fontResizeNode;if(f){if(has("ie")&&f.onresize){f.onresize=null;}else{if(f.contentWindow&&f.contentWindow.onresize){f.contentWindow.onresize=null;}}dhm._fontResizeNode=null;}});_37f(function(){try{var n=_381.doc.createElement("div");n.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";_381.body().appendChild(n);_38c.w=n.offsetWidth-n.clientWidth;_38c.h=n.offsetHeight-n.clientHeight;_381.body().removeChild(n);delete n;}catch(e){}if("fontSizeWatch" in _37e.config&&!!_37e.config.fontSizeWatch){dhm.initOnFontResize();}});return dhm;});},"dojox/grid/_Builder":function(){define(["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/window","dojo/_base/event","dojo/_base/sniff","dojo/_base/connect","dojo/dnd/Moveable","dojox/html/metrics","./util","dojo/_base/html"],function(_38e,_38f,lang,win,_390,has,_391,_392,_393,util,html){var dg=_38e.grid;var _394=function(td){return td.cellIndex>=0?td.cellIndex:_38f.indexOf(td.parentNode.cells,td);};var _395=function(tr){return tr.rowIndex>=0?tr.rowIndex:_38f.indexOf(tr.parentNode.childNodes,tr);};var _396=function(_397,_398){return _397&&((_397.rows||0)[_398]||_397.childNodes[_398]);};var _399=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _39a=function(_39b,_39c){for(var n=_39b;n&&_39c(n);n=n.parentNode){}return n;};var _39d=function(_39e){var name=_39e.toUpperCase();return function(node){return node.tagName!=name;};};var _39f=util.rowIndexTag;var _3a0=util.gridViewTag;var _3a1=dg._Builder=lang.extend(function(view){if(view){this.view=view;this.grid=view.grid;}},{view:null,_table:"<table class=\"dojoxGridRowTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"",getTableArray:function(){var html=[this._table];if(this.view.viewWidth){html.push([" style=\"width:",this.view.viewWidth,";\""].join(""));}html.push(">");return html;},generateCellMarkup:function(_3a2,_3a3,_3a4,_3a5){var _3a6=[],html;if(_3a5){var _3a7=_3a2.index!=_3a2.grid.getSortIndex()?"":_3a2.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_3a2.id){_3a2.id=this.grid.id+"Hdr"+_3a2.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_3a7,"id=\"",_3a2.id,"\""];}else{var _3a8=this.grid.editable&&!_3a2.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_3a8];}if(_3a2.colSpan){html.push(" colspan=\"",_3a2.colSpan,"\"");}if(_3a2.rowSpan){html.push(" rowspan=\"",_3a2.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_3a2.classes){html.push(_3a2.classes," ");}if(_3a4){html.push(_3a4," ");}_3a6.push(html.join(""));_3a6.push("");html=["\" idx=\"",_3a2.index,"\" style=\""];if(_3a3&&_3a3[_3a3.length-1]!=";"){_3a3+=";";}html.push(_3a2.styles,_3a3||"",_3a2.hidden?"display:none;":"");if(_3a2.unitWidth){html.push("width:",_3a2.unitWidth,";");}_3a6.push(html.join(""));_3a6.push("");html=["\""];if(_3a2.attrs){html.push(" ",_3a2.attrs);}html.push(">");_3a6.push(html.join(""));_3a6.push("");_3a6.push(_3a5?"</th>":"</td>");return _3a6;},isCellNode:function(_3a9){return Boolean(_3a9&&_3a9!=win.doc&&html.attr(_3a9,"idx"));},getCellNodeIndex:function(_3aa){return _3aa?Number(html.attr(_3aa,"idx")):-1;},getCellNode:function(_3ab,_3ac){for(var i=0,row;((row=_396(_3ab.firstChild,i))&&row.cells);i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_3ac){return cell;}}}return null;},findCellTarget:function(_3ad,_3ae){var n=_3ad;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_3a0 in n.offsetParent.parentNode&&n.offsetParent.parentNode[_3a0]!=this.view.id))&&(n!=_3ae)){n=n.parentNode;}return n!=_3ae?n:null;},baseDecorateEvent:function(e){e.dispatch="do"+e.type;e.grid=this.grid;e.sourceView=this.view;e.cellNode=this.findCellTarget(e.target,e.rowNode);e.cellIndex=this.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);},findTarget:function(_3af,_3b0){var n=_3af;while(n&&(n!=this.domNode)&&(!(_3b0 in n)||(_3a0 in n&&n[_3a0]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_3b1){return this.findTarget(_3b1,_39f);},isIntraNodeEvent:function(e){try{return (e.cellNode&&e.relatedTarget&&html.isDescendant(e.relatedTarget,e.cellNode));}catch(x){return false;}},isIntraRowEvent:function(e){try{var row=e.relatedTarget&&this.findRowTarget(e.relatedTarget);return !row&&(e.rowIndex==-1)||row&&(e.rowIndex==row.gridRowIndex);}catch(x){return false;}},dispatchEvent:function(e){if(e.dispatch in this){return this[e.dispatch](e);}return false;},domouseover:function(e){if(e.cellNode&&(e.cellNode!=this.lastOverCellNode)){this.lastOverCellNode=e.cellNode;this.grid.onMouseOver(e);}this.grid.onMouseOverRow(e);},domouseout:function(e){if(e.cellNode&&(e.cellNode==this.lastOverCellNode)&&!this.isIntraNodeEvent(e,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(e);if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}},domousedown:function(e){if(e.cellNode){this.grid.onMouseDown(e);}this.grid.onMouseDownRow(e);}});var _3b2=dg._ContentBuilder=lang.extend(function(view){_3a1.call(this,view);},_3a1.prototype,{update:function(){this.prepareHtml();},prepareHtml:function(){var _3b3=this.grid.get,_3b4=this.view.structure.cells;for(var j=0,row;(row=_3b4[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_3b3;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_3b5,_3b6){var html=this.getTableArray(),v=this.view,_3b7=v.structure.cells,item=this.grid.getItem(_3b6);util.fire(this.view,"onBeforeRow",[_3b6,_3b7]);for(var j=0,row;(row=_3b7[j]);j++){if(row.hidden||row.header){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,m,cc,cs;(cell=row[i]);i++){m=cell.markup;cc=cell.customClasses=[];cs=cell.customStyles=[];m[5]=cell.format(_3b6,item);if(has("ie")<8&&(m[5]===null||m[5]===""||/^\s+$/.test(m[5]))){m[5]="&nbsp;";}m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_39f];this.baseDecorateEvent(e);e.cell=this.grid.getCell(e.cellIndex);return true;}});var _3b8=dg._HeaderBuilder=lang.extend(function(view){this.moveable=null;_3a1.call(this,view);},_3a1.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap){this.tableMap.mapRows(this.view.structure.cells);}else{this.tableMap=new dg._TableMap(this.view.structure.cells);}},generateHtml:function(_3b9,_3ba){var html=this.getTableArray(),_3bb=this.view.structure.cells;util.fire(this.view,"onBeforeRow",[-1,_3bb]);for(var j=0,row;(row=_3bb[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_3bc;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){if(cell.draggable){if(cell.headerClasses){if(cell.headerClasses.indexOf("dojoDndItem")==-1){cell.headerClasses+=" dojoDndItem";}}else{cell.headerClasses="dojoDndItem";}}if(cell.attrs){if(cell.attrs.indexOf("dndType='gridColumn_")==-1){cell.attrs+=" dndType='gridColumn_"+this.grid.id+"'";}}else{cell.attrs="dndType='gridColumn_"+this.grid.id+"'";}}_3bc=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_3bc[5]=(_3ba!=undefined?_3ba:_3b9(cell));_3bc[3]=cell.customStyles.join(";");_3bc[1]=cell.customClasses.join(" ");html.push(_3bc.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(has("mozilla")||has("ie")>=9){n=_39a(e.target,_39d("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!this.grid.isLeftToRight()){table=_39a(n,_39d("table"));x-=(table&&table.offsetLeft)||0;}}n=_39a(e.target,function(){if(!n||n==e.cellNode){return false;}x+=(n.offsetLeft<0?0:n.offsetLeft);return true;});return x;},decorateEvent:function(e){this.baseDecorateEvent(e);e.rowIndex=-1;e.cellX=this.getCellX(e);return true;},prepareResize:function(e,mod){do{var i=e.cellIndex;e.cellNode=(i?e.cellNode.parentNode.cells[i+mod]:null);e.cellIndex=(e.cellNode?this.getCellNodeIndex(e.cellNode):-1);}while(e.cellNode&&e.cellNode.style.display=="none");return Boolean(e.cellNode);},canResize:function(e){if(!e.cellNode||e.cellNode.colSpan>1){return false;}var cell=this.grid.getCell(e.cellIndex);return !cell.noresize&&cell.canResize();},overLeftResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return (e.cellIndex>0)&&(e.cellX>0&&e.cellX<this.overResizeWidth)&&this.prepareResize(e,-1);}var t=e.cellNode&&(e.cellX>0&&e.cellX<this.overResizeWidth);return t;},overRightResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return e.cellNode&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth);}return (e.cellIndex>0)&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth)&&this.prepareResize(e,-1);},domousemove:function(e){if(!this.moveable){var c=(this.overRightResizeArea(e)?"dojoxGridColResize":(this.overLeftResizeArea(e)?"dojoxGridColResize":""));if(c&&!this.canResize(e)){c="dojoxGridColNoResize";}html.toggleClass(e.sourceView.headerNode,"dojoxGridColNoResize",(c=="dojoxGridColNoResize"));html.toggleClass(e.sourceView.headerNode,"dojoxGridColResize",(c=="dojoxGridColResize"));if(c){_390.stop(e);}}},domousedown:function(e){if(!this.moveable){if((this.overRightResizeArea(e)||this.overLeftResizeArea(e))&&this.canResize(e)){this.beginColumnResize(e);}else{this.grid.onMouseDown(e);this.grid.onMouseOverRow(e);}}},doclick:function(e){if(this._skipBogusClicks){_390.stop(e);return true;}return false;},colResizeSetup:function(e,_3bd){var _3be=html.contentBox(e.sourceView.headerNode);if(_3bd){this.lineDiv=document.createElement("div");var vw=html.position(e.sourceView.headerNode,true);var _3bf=html.contentBox(e.sourceView.domNode);var l=e.pageX;if(!this.grid.isLeftToRight()&&has("ie")<8){l-=_393.getScrollbar().w;}html.style(this.lineDiv,{top:vw.y+"px",left:l+"px",height:(_3bf.h+_3be.h)+"px"});html.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;win.body().appendChild(this.lineDiv);}var _3c0=[],_3c1=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_3c1[i]);i++){_3c0.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=this.grid.isLeftToRight()?1:-1;var _3c2=e.grid.views.views;var _3c3=[];for(var j=view.idx+adj,_3c4;(_3c4=_3c2[j]);j=j+adj){_3c3.push({node:_3c4.headerNode,left:window.parseInt(_3c4.headerNode.style.left)});}var _3c5=view.headerContentNode.firstChild;var drag={scrollLeft:e.sourceView.headerNode.scrollLeft,view:view,node:e.cellNode,index:e.cellIndex,w:html.contentBox(e.cellNode).w,vw:_3be.w,table:_3c5,tw:html.contentBox(_3c5).w,spanners:_3c0,followers:_3c3};return drag;},beginColumnResize:function(e){this.moverDiv=document.createElement("div");html.style(this.moverDiv,{position:"absolute",left:0});win.body().appendChild(this.moverDiv);html.addClass(this.grid.domNode,"dojoxGridColumnResizing");var m=(this.moveable=new _392(this.moverDiv));var drag=this.colResizeSetup(e,true);m.onMove=lang.hitch(this,"doResizeColumn",drag);_391.connect(m,"onMoveStop",lang.hitch(this,function(){this.endResizeColumn(drag);if(drag.node.releaseCapture){drag.node.releaseCapture();}this.moveable.destroy();delete this.moveable;this.moveable=null;html.removeClass(this.grid.domNode,"dojoxGridColumnResizing");}));if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_3c6,_3c7,_3c8){var _3c9=_3c8.l;var data={deltaX:_3c9,w:_3c6.w+(this.grid.isLeftToRight()?_3c9:-_3c9),vw:_3c6.vw+_3c9,tw:_3c6.tw+_3c9};this.dragRecord={inDrag:_3c6,mover:_3c7,leftTop:_3c8};if(data.w>=this.minColWidth){if(!_3c7){this.doResizeNow(_3c6,data);}else{html.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_3ca){if(this.dragRecord){var _3cb=this.dragRecord.leftTop;var _3cc=this.grid.isLeftToRight()?_3cb.l:-_3cb.l;_3cc+=Math.max(_3ca.w+_3cc,this.minColWidth)-(_3ca.w+_3cc);if(has("webkit")&&_3ca.spanners.length){_3cc+=html._getPadBorderExtents(_3ca.spanners[0].node).w;}var data={deltaX:_3cc,w:_3ca.w+_3cc,vw:_3ca.vw+_3cc,tw:_3ca.tw+_3cc};this.doResizeNow(_3ca,data);delete this.dragRecord;}html.destroy(this.lineDiv);html.destroy(this.moverDiv);html.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_3ca.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_3ca.index);},doResizeNow:function(_3cd,data){_3cd.view.convertColPctToFixed();if(_3cd.view.flexCells&&!_3cd.view.testFlexCells()){var t=_399(_3cd.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_3cd.spanners[i]);i++){sw=s.width+data.deltaX;if(sw>0){s.node.style.width=sw+"px";_3cd.view.setColWidth(s.index,sw);}}if(this.grid.isLeftToRight()||!has("ie")){for(i=0;(f=_3cd.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_3cd.node.style.width=data.w+"px";_3cd.view.setColWidth(_3cd.index,data.w);_3cd.view.headerNode.style.width=data.vw+"px";_3cd.view.setColumnsWidth(data.tw);if(!this.grid.isLeftToRight()){_3cd.view.headerNode.scrollLeft=_3cd.scrollLeft+data.deltaX;}}});dg._TableMap=lang.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_3ce){var _3cf=_3ce.length;if(!_3cf){return;}this.map=[];var row;for(var k=0;(row=_3ce[k]);k++){this.map[k]=[];}for(var j=0;(row=_3ce[j]);j++){for(var i=0,x=0,cell,_3d0,_3d1;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_3d1=cell.rowSpan||1;_3d0=cell.colSpan||1;for(var y=0;y<_3d1;y++){for(var s=0;s<_3d0;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_3d0;}}},dumpMap:function(){for(var j=0,row,h="";(row=this.map[j]);j++,h=""){for(var i=0,cell;(cell=row[i]);i++){h+=cell.r+","+cell.c+"   ";}}},getMapCoords:function(_3d2,_3d3){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_3d3&&cell.r==_3d2){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_3d4,_3d5,_3d6){var row=_3d4&&_3d4.rows[_3d5];return row&&row.cells[_3d6];},_findOverlappingNodes:function(_3d7,_3d8,_3d9){var _3da=[];var m=this.getMapCoords(_3d8,_3d9);for(var j=0,row;(row=this.map[j]);j++){if(j==m.j){continue;}var rw=row[m.i];var n=(rw?this.getNode(_3d7,rw.r,rw.c):null);if(n){_3da.push(n);}}return _3da;},findOverlappingNodes:function(_3db){return this._findOverlappingNodes(_399(_3db),_395(_3db.parentNode),_394(_3db));}});return {_Builder:_3a1,_HeaderBuilder:_3b8,_ContentBuilder:_3b2};});},"dojo/dnd/Moveable":function(){define(["../main","../Evented","../touch","./Mover"],function(dojo,_3dc,_3dd){dojo.declare("dojo.dnd.Moveable",[_3dc],{handle:"",delay:0,skip:false,constructor:function(node,_3de){this.node=dojo.byId(node);if(!_3de){_3de={};}this.handle=_3de.handle?dojo.byId(_3de.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_3de.delay>0?_3de.delay:0;this.skip=_3de.skip;this.mover=_3de.mover?_3de.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,_3dd.press,this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_3df,node,ctor){return new ctor(node,_3df);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,_3dd.move,this,"onMouseMove"),dojo.connect(this.handle,_3dd.release,this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}dojo.stopEvent(e);},onMouseUp:function(e){for(var i=0;i<2;++i){dojo.disconnect(this.events.pop());}dojo.stopEvent(e);},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_3e0){dojo.publish("/dnd/move/start",[_3e0]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_3e1){dojo.publish("/dnd/move/stop",[_3e1]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_3e2,e){},onMove:function(_3e3,_3e4,e){this.onMoving(_3e3,_3e4);var s=_3e3.node.style;s.left=_3e4.l+"px";s.top=_3e4.t+"px";this.onMoved(_3e3,_3e4);},onMoving:function(_3e5,_3e6){},onMoved:function(_3e7,_3e8){}});return dojo.dnd.Moveable;});},"dojo/dnd/Mover":function(){define(["../main","../Evented","../touch","./common","./autoscroll"],function(dojo,_3e9,_3ea){dojo.declare("dojo.dnd.Mover",[_3e9],{constructor:function(node,e,host){this.node=dojo.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=(this.host=host),d=node.ownerDocument;this.events=[dojo.connect(d,_3ea.move,this,"onFirstMove"),dojo.connect(d,_3ea.move,this,"onMouseMove"),dojo.connect(d,_3ea.release,this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent)];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY},e);dojo.stopEvent(e);},onMouseUp:function(e){if(dojo.isWebKit&&dojo.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}dojo.stopEvent(e);},onFirstMove:function(e){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left))||0;t=Math.round(parseFloat(s.top))||0;break;default:s.position="absolute";var m=dojo.marginBox(this.node);var b=dojo.doc.body;var bs=dojo.getComputedStyle(b);var bm=dojo._getMarginBox(b,bs);var bc=dojo._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this,e);}dojo.disconnect(this.events.shift());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});return dojo.dnd.Mover;});},"dojox/grid/_ViewManager":function(){define(["dojo/_base/declare","dojo/_base/sniff","dojo/dom-class"],function(_3eb,has,_3ec){return _3eb("dojox.grid._ViewManager",null,{constructor:function(_3ed){this.grid=_3ed;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_3ee){_3ee.idx=this.views.length;this.views.push(_3ee);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _3ef=[];for(var i=0,v;v=this.views[i];i++){_3ef.push(v.contentNode);}return _3ef;},forEach:function(_3f0){for(var i=0,v;v=this.views[i];i++){_3f0(v,i);}},onEach:function(_3f1,_3f2){_3f2=_3f2||[];for(var i=0,v;v=this.views[i];i++){if(_3f1 in v){v[_3f1].apply(v,_3f2);}}},normalizeHeaderNodeHeight:function(){var _3f3=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_3f3.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_3f3);},normalizeRowNodeHeights:function(_3f4){var h=0;var _3f5=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_3f4.length<=1){return;}for(var i=0,n;(n=_3f4[i]);i++){if(!_3ec.contains(n,"dojoxGridNonNormalizedCell")){_3f5[i]=n.firstChild.offsetHeight;h=Math.max(h,_3f5[i]);}}h=(h>=0?h:0);if((has("mozilla")||has("ie")>8)&&h){h++;}}for(i=0;(n=_3f4[i]);i++){if(_3f5[i]!=h){n.firstChild.style.height=h+"px";}}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_3f6){var _3f7=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_3f6));i++){n.firstChild.style.height="";_3f7.push(n);}this.normalizeRowNodeHeights(_3f7);},getViewWidth:function(_3f8){return this.views[_3f8].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_3f9){_3f9.headerContentNode.style.height="";});var h=0;this.forEach(function(_3fa){h=Math.max(_3fa.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_3fb){h=Math.max(_3fb.domNode.offsetHeight,h);});return h;},findClient:function(_3fc){var c=this.grid.elasticView||-1;if(c<0){for(var i=1,v;(v=this.views[i]);i++){if(v.viewWidth){for(i=1;(v=this.views[i]);i++){if(!v.viewWidth){c=i;break;}}break;}}}if(c<0){c=Math.floor(this.views.length/2);}return c;},arrange:function(l,w){var i,v,vw,len=this.views.length,self=this;var c=(w<=0?len:this.findClient());var _3fd=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!self.grid.isLeftToRight()){ds.right=l+"px";if(has("ff")<4){hs.right=l+v.getScrollbarWidth()+"px";}else{hs.right=l+"px";}if(!has("webkit")){hs.width=parseInt(hs.width,10)-v.getScrollbarWidth()+"px";}}else{ds.left=l+"px";hs.left=l+"px";}ds.top=0+"px";hs.top=0;};for(i=0;(v=this.views[i])&&(i<c);i++){vw=this.getViewWidth(i);v.setSize(vw,0);_3fd(v,l);if(v.headerContentNode&&v.headerContentNode.firstChild){vw=v.getColumnsWidth()+v.getScrollbarWidth();}else{vw=v.domNode.offsetWidth;}l+=vw;}i++;var r=w;for(var j=len-1;(v=this.views[j])&&(i<=j);j--){vw=this.getViewWidth(j);v.setSize(vw,0);vw=v.domNode.offsetWidth;r-=vw;_3fd(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_3fd(v,l);}return l;},renderRow:function(_3fe,_3ff,_400){var _401=[];for(var i=0,v,n,_402;(v=this.views[i])&&(n=_3ff[i]);i++){_402=v.renderRow(_3fe);n.appendChild(_402);_401.push(_402);}if(!_400){this.normalizeRowNodeHeights(_401);}},rowRemoved:function(_403){this.onEach("rowRemoved",[_403]);},updateRow:function(_404,_405){for(var i=0,v;v=this.views[i];i++){v.updateRow(_404);}if(!_405){this.renormalizeRow(_404);}},updateRowStyles:function(_406){this.onEach("updateRowStyles",[_406]);},setScrollTop:function(_407){var top=_407;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_407);if(has("ie")&&v.headerNode&&v.scrollboxNode){v.headerNode.scrollLeft=v.scrollboxNode.scrollLeft;}}return top;},getFirstScrollingView:function(){for(var i=0,v;(v=this.views[i]);i++){if(v.hasHScrollbar()||v.hasVScrollbar()){return v;}}return null;}});});},"dojox/grid/_RowManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-class"],function(_408,lang,_409){var _40a=function(_40b,_40c){if(_40b.style.cssText==undefined){_40b.setAttribute("style",_40c);}else{_40b.style.cssText=_40c;}};return _408("dojox.grid._RowManager",null,{constructor:function(_40d){this.grid=_40d;},linesToEms:2,overRow:-2,prepareStylingRow:function(_40e,_40f){return {index:_40e,node:_40f,odd:Boolean(_40e&1),selected:!!this.grid.selection.isSelected(_40e),over:this.isOver(_40e),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_410,_411){var row=this.prepareStylingRow(_410,_411);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_412){var i=_412;i.node.className=i.customClasses;var h=i.node.style.height;_40a(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_413){this.grid.updateRowStyles(_413);},setOverRow:function(_414){var last=this.overRow;this.overRow=_414;if((last!=this.overRow)&&(lang.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_415){return (this.overRow==_415&&!_409.contains(this.grid.domNode,"dojoxGridColumnResizing"));}});});},"dojox/grid/_FocusManager":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/_base/declare","dojo/_base/connect","dojo/_base/event","dojo/_base/sniff","dojo/query","./util","dojo/_base/html"],function(_416,lang,_417,_418,_419,has,_41a,util,html){return _417("dojox.grid._FocusManager",null,{constructor:function(_41b){this.grid=_41b;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(_418.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(_418.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(_418.connect(this.grid.domNode,"mousedown",this,"_mouseDown"));this._connects.push(_418.connect(this.grid.domNode,"mouseup",this,"_mouseUp"));this._connects.push(_418.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(_418.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(_418.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(_418.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(_418.connect(this.grid,"postrender",this,"_delayedHeaderFocus"));},destroy:function(){_416.forEach(this._connects,_418.disconnect);_416.forEach(this._headerConnects,_418.disconnect);delete this.grid;delete this.cell;},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders();},isFocusCell:function(_41c,_41d){return (this.cell==_41c)&&(this.rowIndex==_41d);},isLastFocusCell:function(){if(this.cell){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);}return false;},isFirstFocusCell:function(){if(this.cell){return (this.rowIndex===0)&&(this.cell.index===0);}return false;},isNoFocusCell:function(){return (this.rowIndex<0)||!this.cell;},isNavHeader:function(){return (!!this._colHeadNode);},getHeaderIndex:function(){if(this._colHeadNode){return _416.indexOf(this._findHeaderCells(),this._colHeadNode);}else{return -1;}},_focusifyCellNode:function(_41e){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){html.toggleClass(n,this.focusClass,_41e);if(_41e){var sl=this.scrollIntoView();try{if(!this.grid.edit.isEditing()){util.fire(n,"focus");if(sl){this.cell.view.scrollboxNode.scrollLeft=sl;}}}catch(e){}}}},_delayedCellFocus:function(){if(this.isNavHeader()||!this.grid.focused){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){html.toggleClass(n,this.focusClass,true);if(this._colHeadNode){this.blurHeader();}util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();this.grid.domNode.focus();}},_initColumnHeaders:function(){_416.forEach(this._headerConnects,_418.disconnect);this._headerConnects=[];var _41f=this._findHeaderCells();for(var i=0;i<_41f.length;i++){this._headerConnects.push(_418.connect(_41f[i],"onfocus",this,"doColHeaderFocus"));this._headerConnects.push(_418.connect(_41f[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _420=_41a("th",this.grid.viewsHeaderNode);var _421=[];for(var i=0;i<_420.length;i++){var _422=_420[i];var _423=html.hasAttr(_422,"tabIndex");var _424=html.attr(_422,"tabIndex");if(_423&&_424<0){_421.push(_422);}}return _421;},_setActiveColHeader:function(_425,_426,_427){this.grid.domNode.setAttribute("aria-activedescendant",_425.id);if(_427!=null&&_427>=0&&_427!=_426){html.toggleClass(this._findHeaderCells()[_427],this.focusClass,false);}html.toggleClass(_425,this.focusClass,true);this._colHeadNode=_425;this._colHeadFocusIdx=_426;this._scrollHeader(this._colHeadFocusIdx);},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info||!info.s){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);if(info.n&&info.sr){if(info.n.offsetLeft+info.n.offsetWidth>info.sr.l+info.sr.w){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}}}if(info.r&&info.sr){if(rt+info.r.offsetHeight>info.sr.t+info.sr.h){this.grid.setScrollTop(rt+info.r.offsetHeight-info.sr.h);}else{if(rt<info.sr.t){this.grid.setScrollTop(rt);}}}return info.s.scrollLeft;},_scrollInfo:function(cell,_428){if(cell){var cl=cell,sbn=cl.view.scrollboxNode,sbnr={w:sbn.clientWidth,l:sbn.scrollLeft,t:sbn.scrollTop,h:sbn.clientHeight},rn=cl.view.getRowNode(this.rowIndex);return {c:cl,s:sbn,sr:sbnr,n:(_428?_428:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_429){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_429);if(!cell){return;}info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _42a=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_42a){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}else{if(has("ie")<=7&&cell&&cell.view.headerNode){cell.view.headerNode.scrollLeft=info.s.scrollLeft;}}}}},_isHeaderHidden:function(){var _42b=this.focusView;if(!_42b){for(var i=0,_42c;(_42c=this.grid.views.views[i]);i++){if(_42c.headerNode){_42b=_42c;break;}}}return (_42b&&html.getComputedStyle(_42b.headerNode).display=="none");},colSizeAdjust:function(e,_42d,_42e){var _42f=this._findHeaderCells();var view=this.focusView;if(!view){for(var i=0,_430;(_430=this.grid.views.views[i]);i++){if(_430.header.tableMap.map){view=_430;break;}}}var _431=_42f[_42d];if(!view||(_42d==_42f.length-1&&_42d===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_431;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _432={l:_42e};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_432);view.update();}},styleRow:function(_433){return;},setFocusIndex:function(_434,_435){this.setFocusCell(this.grid.getCell(_435),_434);},setFocusCell:function(_436,_437){if(_436&&!this.isFocusCell(_436,_437)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_436;this.rowIndex=_437;this._focusifyCellNode(true);}if(has("opera")){setTimeout(lang.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);}else{this.grid.onCellFocus(this.cell,this.rowIndex);}},next:function(){if(this.cell){var row=this.rowIndex,col=this.cell.index+1,cc=this.grid.layout.cellCount-1,rc=this.grid.rowCount-1;if(col>cc){col=0;row++;}if(row>rc){col=cc;row=rc;}if(this.grid.edit.isEditing()){var _438=this.grid.getCell(col);if(!this.isLastFocusCell()&&(!_438.editable||this.grid.canEdit&&!this.grid.canEdit(_438,row))){this.cell=_438;this.rowIndex=row;this.next();return;}}this.setFocusIndex(row,col);}},previous:function(){if(this.cell){var row=(this.rowIndex||0),col=(this.cell.index||0)-1;if(col<0){col=this.grid.layout.cellCount-1;row--;}if(row<0){row=0;col=0;}if(this.grid.edit.isEditing()){var _439=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_439.editable){this.cell=_439;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_43a,_43b){var _43c=_43b<0?-1:1;if(this.isNavHeader()){var _43d=this._findHeaderCells();var _43e=currentIdx=_416.indexOf(_43d,this._colHeadNode);currentIdx+=_43b;while(currentIdx>=0&&currentIdx<_43d.length&&_43d[currentIdx].style.display=="none"){currentIdx+=_43c;}if((currentIdx>=0)&&(currentIdx<_43d.length)){this._setActiveColHeader(_43d[currentIdx],currentIdx,_43e);}}else{if(this.cell){var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_43a));if(_43a){if(_43a>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_43a<0){if(row<=sc.getPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop-sc.findScrollTop(r)-sc.findScrollTop(row));}}}}var cc=this.grid.layout.cellCount-1,i=this.cell.index,col=Math.min(cc,Math.max(0,i+_43b));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_43c;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}var n=cell.getNode(row);if(!n&&_43a){if((row+_43a)>=0&&(row+_43a)<=rc){this.move(_43a>0?++_43a:--_43a,_43b);}return;}else{if((!n||html.style(n,"display")==="none")&&_43b){if((col+_43b)>=0&&(col+_43b)<=cc){this.move(_43a,_43b>0?++_43b:--_43b);}return;}}this.setFocusIndex(row,col);if(_43a){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){_419.stop(e);this.previous();}else{if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();_419.stop(e);}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){html.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null;}this._focusifyCellNode(false);}}},nextKey:function(e){var _43f=(this.grid.rowCount===0);if(e.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();_419.stop(e);}else{if(this.isNavHeader()){this.blurHeader();if(!this.findAndFocusGridCell()){this.tabOut(this.grid.lastFocusNode);}this._colHeadNode=this._colHeadFocusIdx=null;}else{if(this.grid.edit.isEditing()){_419.stop(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_440){this.tabbingOut=true;_440.focus();},focusGridView:function(){util.fire(this.focusView,"focus");},focusGrid:function(_441){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _442=true;var _443=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_443){var _444=0;var cell=this.grid.getCell(_444);if(cell.hidden){_444=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_444);}else{if(this.cell&&!_443){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_442=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _442;},focusHeader:function(){var _445=this._findHeaderCells();var _446=this._colHeadFocusIdx;if(this._isHeaderHidden()){this.findAndFocusGridCell();}else{if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}}this._colHeadNode=_445[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_445.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_445[this._colHeadFocusIdx];}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode;}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,_446);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false);}else{this.findAndFocusGridCell();}},blurHeader:function(){html.removeClass(this._colHeadNode,this.focusClass);html.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var _447=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_447);this._contextMenuBindNode=_447;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){_419.stop(e);return;}if(this._clickFocus){return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;_419.stop(e);},doBlur:function(e){_419.stop(e);},doContextMenu:function(e){if(!this.headerMenu){_419.stop(e);}},doLastNodeFocus:function(e){if(this.tabbingOut){this._focusifyCellNode(false);}else{if(this.grid.rowCount>0){if(this.isNoFocusCell()){this.setFocusIndex(0,0);}this._focusifyCellNode(true);}else{this.focusHeader();}}this.tabbingOut=false;_419.stop(e);},doLastNodeBlur:function(e){_419.stop(e);},doColHeaderFocus:function(e){this._setActiveColHeader(e.target,html.attr(e.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());_419.stop(e);},doColHeaderBlur:function(e){html.toggleClass(e.target,this.focusClass,false);},_mouseDown:function(e){this._clickFocus=dojo.some(this.grid.views.views,function(v){return v.scrollboxNode===e.target;});},_mouseUp:function(e){this._clickFocus=false;}});});},"dojox/grid/_EditManager":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/sniff","./util"],function(lang,_448,_449,_44a,has,util){return _449("dojox.grid._EditManager",null,{constructor:function(_44b){this.grid=_44b;if(has("ie")){this.connections=[_44a.connect(document.body,"onfocus",lang.hitch(this,"_boomerangFocus"))];}else{this.connections=[_44a.connect(this.grid,"onBlur",this,"apply")];}},info:{},destroy:function(){_448.forEach(this.connections,_44a.disconnect);},cellFocus:function(_44c,_44d){if(this.grid.singleClickEdit||this.isEditRow(_44d)){this.setEditCell(_44c,_44d);}else{this.apply();}if(this.isEditing()||(_44c&&_44c.editable&&_44c.alwaysEditing)){this._focusEditor(_44c,_44d);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_44e){if(_44e.index==this.info.rowIndex){_44e.customClasses+=" dojoxGridRowEditing";}},dispatchEvent:function(e){var c=e.cell,ed=(c&&c["editable"])?c:0;return ed&&ed.dispatchEvent(e.dispatch,e);},isEditing:function(){return this.info.rowIndex!==undefined;},isEditCell:function(_44f,_450){return (this.info.rowIndex===_44f)&&(this.info.cell.index==_450);},isEditRow:function(_451){return this.info.rowIndex===_451;},setEditCell:function(_452,_453){if(!this.isEditCell(_453,_452.index)&&this.grid.canEdit&&this.grid.canEdit(_452,_453)){this.start(_452,_453,this.isEditRow(_453)||_452.editable);}},_focusEditor:function(_454,_455){util.fire(_454,"focus",[_455]);},focusEditor:function(){if(this.isEditing()){this._focusEditor(this.info.cell,this.info.rowIndex);}},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>new Date().getTime();},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();this._catchBoomerang=0;}},_doCatchBoomerang:function(){if(has("ie")){this._catchBoomerang=new Date().getTime()+this._boomerangWindow;}},start:function(_456,_457,_458){if(!this._isValidInput()){return;}if(has("ie")<9&&this.grid._autoHeight){this._avoidUpdate();}this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_457)){this.applyRowEdit();this.grid.updateRow(_457);}if(_458){this.info={cell:_456,rowIndex:_457};this.grid.doStartEdit(_456,_457);this.grid.updateRow(_457);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_456,_457);this._doCatchBoomerang();},_editorDo:function(_459){var c=this.info.cell;if(c&&c.editable){c[_459](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_45a,_45b,_45c){if(this.grid.canEdit(_45b,_45c)){this.grid.doApplyCellEdit(_45a,_45c,_45b.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()&&this._isValidInput()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_45d,_45e){var c=this.info.cell;if(this.isEditRow(_45d)&&(!_45e||c.view==_45e)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_45f,_460){var c=this.info.cell;if(this.isEditRow(_460)&&c.view==_45f&&c.editable){c.restore(this.info.rowIndex);}},_isValidInput:function(){var w=(this.info.cell||{}).widget;if(!w||!w.isValid){return true;}w.focused=true;return w.isValid(true);},_avoidUpdate:function(){var self=this;self._noUpdate=true;if(self._avoidUpdateHandler){clearTimeout(self._avoidUpdateHandler);}self._avoidUpdateHandler=setTimeout(function(){self._noUpdate=false;},100);}});});},"dojox/grid/Selection":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-attr"],function(_461,_462,lang,_463){return _461("dojox.grid.Selection",null,{constructor:function(_464){this.grid=_464;this.selected=[];this.setMode(_464.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_465){return this.grid.onCanSelect(_465);},onCanDeselect:function(_466){return this.grid.onCanDeselect(_466);},onSelected:function(_467){},onDeselected:function(_468){},onChanging:function(){},onChanged:function(){},isSelected:function(_469){if(this.mode=="none"){return false;}return this.selected[_469];},getFirstSelected:function(){if(!this.selected.length||this.mode=="none"){return -1;}for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getNextSelected:function(_46a){if(this.mode=="none"){return -1;}for(var i=_46a+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _46b=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_46b.push(i);}}return _46b;},getSelectedCount:function(){var c=0;for(var i=0;i<this.selected.length;i++){if(this.selected[i]){c++;}}return c;},_beginUpdate:function(){if(this.updating===0){this.onChanging();}this.updating++;},_endUpdate:function(){this.updating--;if(this.updating===0){this.onChanged();}},select:function(_46c){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_46c);this.addToSelection(_46c);}else{this.toggleSelect(_46c);}},addToSelection:function(_46d){if(this.mode=="none"){return;}if(lang.isArray(_46d)){_462.forEach(_46d,this.addToSelection,this);return;}_46d=Number(_46d);if(this.selected[_46d]){this.selectedIndex=_46d;}else{if(this.onCanSelect(_46d)!==false){this.selectedIndex=_46d;var _46e=this.grid.getRowNode(_46d);if(_46e){_463.set(_46e,"aria-selected","true");}this._beginUpdate();this.selected[_46d]=true;this.onSelected(_46d);this._endUpdate();}}},deselect:function(_46f){if(this.mode=="none"){return;}if(lang.isArray(_46f)){_462.forEach(_46f,this.deselect,this);return;}_46f=Number(_46f);if(this.selectedIndex==_46f){this.selectedIndex=-1;}if(this.selected[_46f]){if(this.onCanDeselect(_46f)===false){return;}var _470=this.grid.getRowNode(_46f);if(_470){_463.set(_470,"aria-selected","false");}this._beginUpdate();delete this.selected[_46f];this.onDeselected(_46f);this._endUpdate();}},setSelected:function(_471,_472){this[(_472?"addToSelection":"deselect")](_471);},toggleSelect:function(_473){if(lang.isArray(_473)){_462.forEach(_473,this.toggleSelect,this);return;}this.setSelected(_473,!this.selected[_473]);},_range:function(_474,inTo,func){var s=(_474>=0?_474:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_475,inTo){this._range(_475,inTo,lang.hitch(this,"addToSelection"));},deselectRange:function(_476,inTo){this._range(_476,inTo,lang.hitch(this,"deselect"));},insert:function(_477){this.selected.splice(_477,0,false);if(this.selectedIndex>=_477){this.selectedIndex++;}},remove:function(_478){this.selected.splice(_478,1);if(this.selectedIndex>=_478){this.selectedIndex--;}},deselectAll:function(_479){for(var i in this.selected){if((i!=_479)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_47a,_47b,_47c){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_47a);}else{if(!_47c||this.rangeStartIndex<0){this.rangeStartIndex=_47a;}if(!_47b){this.deselectAll(_47a);}if(_47c){this.selectRange(this.rangeStartIndex,_47a);}else{if(_47b){this.toggleSelect(_47a);}else{this.addToSelection(_47a);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey);},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate();}});});},"dijit/CheckedMenuItem":function(){require({cache:{"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdata-dojo-attach-event=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n"}});define("dijit/CheckedMenuItem",["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(_47d,_47e,_47f,_480){return _47d("dijit.CheckedMenuItem",_47f,{templateString:_480,checked:false,_setCheckedAttr:function(_481){_47e.toggle(this.domNode,"dijitCheckedMenuItemChecked",_481);this.domNode.setAttribute("aria-checked",_481);this._set("checked",_481);},iconClass:"",onChange:function(){},_onClick:function(e){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked);}this.inherited(arguments);}});});},"dijit/MenuItem":function(){require({cache:{"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\"\n\t\tdata-dojo-attach-event=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"}});define("dijit/MenuItem",["dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/event","dojo/_base/kernel","dojo/_base/sniff","./_Widget","./_TemplatedMixin","./_Contained","./_CssStateMixin","dojo/text!./templates/MenuItem.html"],function(_482,dom,_483,_484,_485,_486,has,_487,_488,_489,_48a,_48b){return _482("dijit.MenuItem",[_487,_488,_489,_48a],{templateString:_48b,baseClass:"dijitMenuItem",label:"",_setLabelAttr:{node:"containerNode",type:"innerHTML"},iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:false,_fillContent:function(_48c){if(_48c&&!("label" in this.params)){this.set("label",_48c.innerHTML);}},buildRendering:function(){this.inherited(arguments);var _48d=this.id+"_text";_483.set(this.containerNode,"id",_48d);if(this.accelKeyNode){_483.set(this.accelKeyNode,"id",this.id+"_accel");_48d+=" "+this.id+"_accel";}this.domNode.setAttribute("aria-labelledby",_48d);dom.setSelectable(this.domNode,false);},_onHover:function(){this.getParent().onItemHover(this);},_onUnhover:function(){this.getParent().onItemUnhover(this);this._set("hovering",false);},_onClick:function(evt){this.getParent().onItemClick(this,evt);_485.stop(evt);},onClick:function(){},focus:function(){try{if(has("ie")==8){this.containerNode.focus();}this.focusNode.focus();}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_48e){_484.toggle(this.domNode,"dijitMenuItemSelected",_48e);},setLabel:function(_48f){_486.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_48f);},setDisabled:function(_490){_486.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_490);},_setDisabledAttr:function(_491){this.focusNode.setAttribute("aria-disabled",_491?"true":"false");this._set("disabled",_491);},_setAccelKeyAttr:function(_492){this.accelKeyNode.style.display=_492?"":"none";this.accelKeyNode.innerHTML=_492;_483.set(this.containerNode,"colSpan",_492?"1":"2");this._set("accelKey",_492);}});});},"dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_493,_494){return _493("dijit._Contained",null,{_getSibling:function(_495){var node=this.domNode;do{node=node[_495+"Sibling"];}while(node&&node.nodeType!=1);return node&&_494.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);}});});},"dijit/_CssStateMixin":function(){define("dijit/_CssStateMixin",["dojo/touch","dojo/_base/array","dojo/_base/declare","dojo/dom-class","dojo/_base/lang","dojo/_base/window"],function(_496,_497,_498,_499,lang,win){return _498("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);_497.forEach(["onmouseenter","onmouseleave",_496.press],function(e){this.connect(this.domNode,e,"_cssMouseEvent");},this);_497.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(attr){this.watch(attr,lang.hitch(this,"_setStateClass"));},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._setStateClass();},_cssMouseEvent:function(_49a){if(!this.disabled){switch(_49a.type){case "mouseenter":case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":case "touchpress":this._set("active",true);this._mouseDown=true;var _49b=this.connect(win.body(),_496.release,function(){this._mouseDown=false;this._set("active",false);this.disconnect(_49b);});break;}}},_setStateClass:function(){var _49c=this.baseClass.split(" ");function _49d(_49e){_49c=_49c.concat(_497.map(_49c,function(c){return c+_49e;}),"dijit"+_49e);};if(!this.isLeftToRight()){_49d("Rtl");}var _49f=this.checked=="mixed"?"Mixed":(this.checked?"Checked":"");if(this.checked){_49d(_49f);}if(this.state){_49d(this.state);}if(this.selected){_49d("Selected");}if(this.disabled){_49d("Disabled");}else{if(this.readOnly){_49d("ReadOnly");}else{if(this.active){_49d("Active");}else{if(this.hovering){_49d("Hover");}}}}if(this.focused){_49d("Focused");}var tn=this.stateNode||this.domNode,_4a0={};_497.forEach(tn.className.split(" "),function(c){_4a0[c]=true;});if("_stateClasses" in this){_497.forEach(this._stateClasses,function(c){delete _4a0[c];});}_497.forEach(_49c,function(c){_4a0[c]=true;});var _4a1=[];for(var c in _4a0){_4a1.push(c);}tn.className=_4a1.join(" ");this._stateClasses=_49c;},_trackMouseState:function(node,_4a2){var _4a3=false,_4a4=false,_4a5=false;var self=this,cn=lang.hitch(this,"connect",node);function _4a6(){var _4a7=("disabled" in self&&self.disabled)||("readonly" in self&&self.readonly);_499.toggle(node,_4a2+"Hover",_4a3&&!_4a4&&!_4a7);_499.toggle(node,_4a2+"Active",_4a4&&!_4a7);_499.toggle(node,_4a2+"Focused",_4a5&&!_4a7);};cn("onmouseenter",function(){_4a3=true;_4a6();});cn("onmouseleave",function(){_4a3=false;_4a4=false;_4a6();});cn(_496.press,function(){_4a4=true;_4a6();});cn(_496.release,function(){_4a4=false;_4a6();});cn("onfocus",function(){_4a5=true;_4a6();});cn("onblur",function(){_4a5=false;_4a6();});this.watch("disabled",_4a6);this.watch("readOnly",_4a6);}});});},"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\"\n\t\tdata-dojo-attach-event=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n","url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdata-dojo-attach-event=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n","url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n","dojox/grid/DataSelection":function(){define(["dojo/_base/declare","./_SelectionPreserver","./Selection"],function(_4a8,_4a9,_4aa){return _4a8("dojox.grid.DataSelection",_4aa,{constructor:function(grid){if(grid.keepSelection){this.preserver=new _4a9(this);}},destroy:function(){if(this.preserver){this.preserver.destroy();}},getFirstSelected:function(){var idx=_4aa.prototype.getFirstSelected.call(this);if(idx==-1){return null;}return this.grid.getItem(idx);},getNextSelected:function(_4ab){var _4ac=this.grid.getItemIndex(_4ab);var idx=_4aa.prototype.getNextSelected.call(this,_4ac);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _4ad=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_4ad.push(this.grid.getItem(i));}}return _4ad;},addToSelection:function(_4ae){if(this.mode=="none"){return;}var idx=null;if(typeof _4ae=="number"||typeof _4ae=="string"){idx=_4ae;}else{idx=this.grid.getItemIndex(_4ae);}_4aa.prototype.addToSelection.call(this,idx);},deselect:function(_4af){if(this.mode=="none"){return;}var idx=null;if(typeof _4af=="number"||typeof _4af=="string"){idx=_4af;}else{idx=this.grid.getItemIndex(_4af);}_4aa.prototype.deselect.call(this,idx);},deselectAll:function(_4b0){var idx=null;if(_4b0||typeof _4b0=="number"){if(typeof _4b0=="number"||typeof _4b0=="string"){idx=_4b0;}else{idx=this.grid.getItemIndex(_4b0);}_4aa.prototype.deselectAll.call(this,idx);}else{this.inherited(arguments);}}});});},"dojox/grid/_SelectionPreserver":function(){define(["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array"],function(_4b1,_4b2,lang,_4b3){return _4b1("dojox.grid._SelectionPreserver",null,{constructor:function(_4b4){this.selection=_4b4;var grid=this.grid=_4b4.grid;this.reset();this._connects=[_4b2.connect(grid,"_setStore",this,"reset"),_4b2.connect(grid,"_addItem",this,"_reSelectById"),_4b2.connect(_4b4,"addToSelection",lang.hitch(this,"_selectById",true)),_4b2.connect(_4b4,"deselect",lang.hitch(this,"_selectById",false)),_4b2.connect(_4b4,"deselectAll",this,"reset")];},destroy:function(){this.reset();_4b3.forEach(this._connects,_4b2.disconnect);delete this._connects;},reset:function(){this._selectedById={};},_reSelectById:function(item,_4b5){if(item&&this.grid._hasIdentity){this.selection.selected[_4b5]=this._selectedById[this.grid.store.getIdentity(item)];}},_selectById:function(_4b6,_4b7){if(this.selection.mode=="none"||!this.grid._hasIdentity){return;}var item=_4b7,g=this.grid;if(typeof _4b7=="number"||typeof _4b7=="string"){var _4b8=g._by_idx[_4b7];item=_4b8&&_4b8.item;}if(item){this._selectedById[g.store.getIdentity(item)]=!!_4b6;}return item;}});});},"*now":function(r){r(["dojo/i18n!*preload*dojox/grid/nls/DataGrid*[\"ar\",\"ca\",\"cs\",\"da\",\"de\",\"el\",\"en-gb\",\"en-us\",\"es-es\",\"fi-fi\",\"fr-fr\",\"he-il\",\"hu\",\"it-it\",\"ja-jp\",\"ko-kr\",\"nl-nl\",\"nb\",\"pl\",\"pt-br\",\"pt-pt\",\"ru\",\"sk\",\"sl\",\"sv\",\"th\",\"tr\",\"zh-tw\",\"zh-cn\",\"ROOT\"]"]);}}});define("dojox/grid/DataGrid",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/json","dojo/_base/sniff","dojo/_base/declare","./_Grid","./DataSelection","dojo/_base/html"],function(_4b9,_4ba,lang,json,has,_4bb,_4bc,_4bd,html){var _4be=_4bb("dojox.grid.DataGrid",_4bc,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,keepSelection:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty={};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments);},destroy:function(){this.selection.destroy();this.inherited(arguments);},createSelection:function(){this.selection=new _4bd(this);},get:function(_4bf,_4c0){if(_4c0&&this.field=="_item"&&!this.fields){return _4c0;}else{if(_4c0&&this.fields){var ret=[];var s=this.grid.store;_4ba.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_4c0,f));});return ret;}else{if(!_4c0&&typeof _4bf==="string"){return this.inherited(arguments);}}}return (!_4c0?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_4c0:this.grid.store.getValue(_4c0,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _4c1=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_4c1=true;}if(!this.updating){this.beginUpdate();_4c1=true;}if(_4c1){var _4c2=this;this._endUpdateDelay=setTimeout(function(){delete _4c2._endUpdateDelay;_4c2.endUpdate();},this.updateDelay);}}},_onSet:function(item,_4c3,_4c4,_4c5){this._checkUpdateStatus();var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_createItem:function(item,_4c6){var idty=this._hasIdentity?this.store.getIdentity(item):json.toJson(this.query)+":idx:"+_4c6+":sort:"+json.toJson(this.getSortProps());var o=this._by_idty[idty]={idty:idty,item:item};return o;},_addItem:function(item,_4c7,_4c8){this._by_idx[_4c7]=this._createItem(item,_4c7);if(!_4c8){this.updateRow(_4c7);}},_onNew:function(item,_4c9){this._checkUpdateStatus();var _4ca=this.get("rowCount");this._addingItem=true;this.updateRowCount(_4ca+1);this._addingItem=false;this._addItem(item,_4ca);this.showMessage();},_onDelete:function(item){this._checkUpdateStatus();var idx=this._getItemIndex(item,true);if(idx>=0){this._pages=[];this._bop=-1;this._eop=-1;var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.get("rowCount")-1);if(this.get("rowCount")===0){this.showMessage(this.noDataMessage);}}if(this.selection.isSelected(idx)){this.selection.deselect(idx);this.selection.selected.splice(idx,1);}},_onRevert:function(){this._refresh();},setStore:function(_4cb,_4cc,_4cd){if(this._requestsPending(0)){return;}this._setQuery(_4cc,_4cd);this._setStore(_4cb);this._refresh(true);},setQuery:function(_4ce,_4cf){if(this._requestsPending(0)){return;}this._setQuery(_4ce,_4cf);this._refresh(true);},setItems:function(_4d0){this.items=_4d0;this._setStore(this.store);this._refresh(true);},_setQuery:function(_4d1,_4d2){this.query=_4d1;this.queryOptions=_4d2||this.queryOptions;},_setStore:function(_4d3){if(this.store&&this._store_connects){_4ba.forEach(this._store_connects,this.disconnect,this);}this.store=_4d3;if(this.store){var f=this.store.getFeatures();var h=[];this._canEdit=!!f["dojo.data.api.Write"]&&!!f["dojo.data.api.Identity"];this._hasIdentity=!!f["dojo.data.api.Identity"];if(!!f["dojo.data.api.Notification"]&&!this.items){h.push(this.connect(this.store,"onSet","_onSet"));h.push(this.connect(this.store,"onNew","_onNew"));h.push(this.connect(this.store,"onDelete","_onDelete"));}if(this._canEdit){h.push(this.connect(this.store,"revert","_onRevert"));}this._store_connects=h;}},_onFetchBegin:function(size,req){if(!this.scroller){return;}if(this.rowCount!=size){if(req.isRender){this.scroller.init(size,this.keepRows,this.rowsPerPage);this.rowCount=size;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false;}else{this.updateRowCount(size);}}if(!size){this.views.render();this._resize();this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}},_onFetchComplete:function(_4d4,req){if(!this.scroller){return;}if(_4d4&&_4d4.length>0){_4ba.forEach(_4d4,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_4d4.length);if(req.isRender){this.setScrollTop(0);this.postrender();}else{if(this._lastScrollTop){this.setScrollTop(this._lastScrollTop);}}if(has("ie")){html.setSelectable(this.domNode,this.selectable);}}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;}this._pending_requests[req.start]=false;},_onFetchError:function(err,req){delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage);}this._pending_requests[req.start]=false;this.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_4d5,_4d6){_4d5=_4d5||0;if(this.store&&!this._pending_requests[_4d5]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_4d5]=true;try{if(this.items){var _4d7=this.items;var _4d8=this.store;this.rowsPerPage=_4d7.length;var req={start:_4d5,count:this.rowsPerPage,isRender:_4d6};this._onFetchBegin(_4d7.length,req);var _4d9=0;_4ba.forEach(_4d7,function(i){if(!_4d8.isItemLoaded(i)){_4d9++;}});if(_4d9===0){this._onFetchComplete(_4d7,req);}else{var _4da=function(item){_4d9--;if(_4d9===0){this._onFetchComplete(_4d7,req);}};_4ba.forEach(_4d7,function(i){if(!_4d8.isItemLoaded(i)){_4d8.loadItem({item:i,onItem:_4da,scope:this});}},this);}}else{this.store.fetch({start:_4d5,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_4d6,onBegin:lang.hitch(this,"_onFetchBegin"),onComplete:lang.hitch(this,"_onFetchComplete"),onError:lang.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_4d5,count:this.rowsPerPage});}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoaded=false;this._isLoading=false;},getItem:function(idx){var data=this._by_idx[idx];if(!data||(data&&!data.item)){this._preparePage(idx);return null;}return data.item;},getItemIndex:function(item){return this._getItemIndex(item,false);},_getItemIndex:function(item,_4db){if(!_4db&&!this.store.isItem(item)){return -1;}var idty=this._hasIdentity?this.store.getIdentity(item):null;for(var i=0,l=this._by_idx.length;i<l;i++){var d=this._by_idx[i];if(d&&((idty&&d.idty==idty)||(d.item===item))){return i;}}return -1;},filter:function(_4dc,_4dd){this.query=_4dc;if(_4dd){this._clearData();}this._fetch();},_getItemAttr:function(idx,attr){var item=this.getItem(idx);return (!item?this.fetchText:this.store.getValue(item,attr));},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_4de){return this._pending_requests[_4de];},_rowToPage:function(_4df){return (this.rowsPerPage?Math.floor(_4df/this.rowsPerPage):_4df);},_pageToRow:function(_4e0){return (this.rowsPerPage?this.rowsPerPage*_4e0:_4e0);},_preparePage:function(_4e1){if((_4e1<this._bop||_4e1>=this._eop)&&!this._addingItem){var _4e2=this._rowToPage(_4e1);this._needPage(_4e2);this._bop=_4e2*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_4e3){if(!this._pages[_4e3]){this._pages[_4e3]=true;this._requestPage(_4e3);}},_requestPage:function(_4e4){var row=this._pageToRow(_4e4);var _4e5=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_4e5>0){this._requests++;if(!this._requestsPending(row)){setTimeout(lang.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_4e6){return _4e6.field;},_refresh:function(_4e7){this._clearData();this._fetch(0,_4e7);},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){if(this.sortFields){return this.sortFields;}return null;}else{var desc=c["sortDesc"];var si=!(this.sortInfo>0);if(typeof desc=="undefined"){desc=si;}else{desc=si?!desc:desc;}return [{attribute:c.field,descending:desc}];}},styleRowState:function(_4e8){if(this.store&&this.store.getState){var _4e9=this.store.getState(_4e8.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_4e9[s]){c=" dojoxGridRow-"+s;break;}}_4e8.customClasses+=c;}},onStyleRow:function(_4ea){this.styleRowState(_4ea);this.inherited(arguments);},canEdit:function(_4eb,_4ec){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _4ed={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_4ee,_4ef){if(!this._cache[_4ef]){this._cache[_4ef]=this._copyAttr(_4ef,_4ee.field);}this.onStartEdit(_4ee,_4ef);},doApplyCellEdit:function(_4f0,_4f1,_4f2){this.store.fetchItemByIdentity({identity:this._by_idx[_4f1].idty,onItem:lang.hitch(this,function(item){var _4f3=this.store.getValue(item,_4f2);if(typeof _4f3=="number"){_4f0=isNaN(_4f0)?_4f0:parseFloat(_4f0);}else{if(typeof _4f3=="boolean"){_4f0=_4f0=="true"?true:_4f0=="false"?false:_4f0;}else{if(_4f3 instanceof Date){var _4f4=new Date(_4f0);_4f0=isNaN(_4f4.getTime())?_4f0:_4f4;}}}this.store.setValue(item,_4f2,_4f0);this.onApplyCellEdit(_4f0,_4f1,_4f2);})});},doCancelEdit:function(_4f5){var _4f6=this._cache[_4f5];if(_4f6){this.updateRow(_4f5);delete this._cache[_4f5];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_4f7,_4f8){var _4f9=this._cache[_4f7];this.onApplyEdit(_4f7);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=lang.hitch(this,function(_4fa){if(_4fa.length){_4ba.forEach(_4fa,this.store.deleteItem,this.store);this.selection.clear();}});if(this.allItemsSelected){this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:fx});}else{fx(this.selection.getSelected());}}}});_4be.cell_markupFactory=function(_4fb,node,_4fc){var _4fd=lang.trim(html.attr(node,"field")||"");if(_4fd){_4fc.field=_4fd;}_4fc.field=_4fc.field||_4fc.name;var _4fe=lang.trim(html.attr(node,"fields")||"");if(_4fe){_4fc.fields=_4fe.split(",");}if(_4fb){_4fb(node,_4fc);}};_4be.markupFactory=function(_4ff,node,ctor,_500){return _4bc.markupFactory(_4ff,node,ctor,lang.partial(_4be.cell_markupFactory,_500));};return _4be;});