//>>built
require({cache:{"dojox/grid/EnhancedGrid":function(){define("dojo/_base/kernel ../main dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/sniff dojo/dom dojo/dom-geometry ./DataGrid ./DataSelection ./enhanced/_PluginManager ./enhanced/plugins/_SelectionPreserver dojo/i18n!./enhanced/nls/EnhancedGrid".split(" "),function(p,k,m,g,e,d,c,b,h,a,f,r,n){p.experimental("dojox.grid.EnhancedGrid");p=m("dojox.grid.EnhancedGrid",h,{plugins:null,pluginMgr:null,_pluginMgrClass:f,postMixInProperties:function(){this._nls=
n;this.inherited(arguments)},postCreate:function(){this.pluginMgr=new this._pluginMgrClass(this);this.pluginMgr.preInit();this.inherited(arguments);this.pluginMgr.postInit()},plugin:function(f){return this.pluginMgr.getPlugin(f)},startup:function(){this.inherited(arguments);this.pluginMgr.startup()},createSelection:function(){this.selection=new k.grid.enhanced.DataSelection(this)},canSort:function(f,a){return!0},doKeyEvent:function(f){try{var a=this.focus.focusView;a.content.decorateEvent(f);f.cell||
a.header.decorateEvent(f)}catch(b){}this.inherited(arguments)},doApplyCellEdit:function(f,a,b){b?this.inherited(arguments):this.invalidated[a]=!0},mixin:function(f,a){var b={},l;for(l in a)"_inherited"==l||("declaredClass"==l||"constructor"==l||a.privates&&a.privates[l])||(b[l]=a[l]);g.mixin(f,b)},_copyAttr:function(f,a){if(a)return this.inherited(arguments)},_getHeaderHeight:function(){this.inherited(arguments);return b.getMarginBox(this.viewsHeaderNode).h},_fetch:function(f,a){if(this.items)return this.inherited(arguments);
f=f||0;if(this.store&&!this._pending_requests[f]){!this._isLoaded&&!this._isLoading&&(this._isLoading=!0,this.showMessage(this.loadingMessage));this._pending_requests[f]=!0;try{var b={start:f,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:a,onBegin:g.hitch(this,"_onFetchBegin"),onComplete:g.hitch(this,"_onFetchComplete"),onError:g.hitch(this,"_onFetchError")};this._storeLayerFetch(b)}catch(l){this._onFetchError(l,{start:f,count:this.rowsPerPage})}}return 0},
_storeLayerFetch:function(f){this.store.fetch(f)},getCellByField:function(f){return e.filter(this.layout.cells,function(a){return a.field==f})[0]},onMouseUp:function(f){},createView:function(){var f=this.inherited(arguments);if(d("mozilla")){var a=function(f){var a=f.toUpperCase();return function(f){return f.tagName!=a}},b=f.header.getCellX;f.header.getCellX=function(l){var h=b.call(f.header,l),d;d=a("th");for(var u=l.target;u&&d(u);u=u.parentNode);(d=u)&&(d!==l.target&&c.isDescendant(l.target,d))&&
(h+=d.firstChild.offsetLeft);return h}}return f},destroy:function(){delete this._nls;this.pluginMgr.destroy();this.inherited(arguments)}});m("dojox.grid.enhanced.DataSelection",a,{constructor:function(f){f.keepSelection&&(this.preserver&&this.preserver.destroy(),this.preserver=new r(this))},_range:function(f,a){this.grid._selectingRange=!0;this.inherited(arguments);this.grid._selectingRange=!1;this.onChanged()},deselectAll:function(f){this.grid._selectingRange=!0;this.inherited(arguments);this.grid._selectingRange=
!1;this.onChanged()}});p.markupFactory=function(f,a,b,l){return k.grid._Grid.markupFactory(f,a,b,g.partial(h.cell_markupFactory,l))};p.registerPlugin=function(a,b){f.registerPlugin(a,b)};return p})},"dojox/grid/DataGrid":function(){define("../main dojo/_base/array dojo/_base/lang dojo/_base/json dojo/_base/sniff dojo/_base/declare ./_Grid ./DataSelection dojo/_base/html dojo/has dojo/has!dojo-bidi?./bidi/_BidiMixin".split(" "),function(p,k,m,g,e,d,c,b,h){var a=d("dojox.grid.DataGrid",c,{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:!1,_isLoading:!1,keepSelection:!1,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 b(this)},get:function(f,a){if(a&&"_item"==this.field&&!this.fields)return a;if(a&&this.fields){var b=[],c=this.grid.store;k.forEach(this.fields,function(f){b=b.concat(c.getValues(a,f))});return b}return!a&&"string"===typeof f?this.inherited(arguments):!a?this.defaultValue:!this.field?this.value:"_item"==this.field?a:this.grid.store.getValue(a,this.field)},_checkUpdateStatus:function(){if(0<this.updateDelay){var f=!1;this._endUpdateDelay&&(clearTimeout(this._endUpdateDelay),
delete this._endUpdateDelay,f=!0);this.updating||(this.beginUpdate(),f=!0);if(f){var a=this;this._endUpdateDelay=setTimeout(function(){delete a._endUpdateDelay;a.endUpdate()},this.updateDelay)}}},_onSet:function(f,a,b,c){this._checkUpdateStatus();f=this.getItemIndex(f);-1<f&&this.updateRow(f)},_createItem:function(f,a){var b=this._hasIdentity?this.store.getIdentity(f):g.toJson(this.query)+":idx:"+a+":sort:"+g.toJson(this.getSortProps());return this._by_idty[b]={idty:b,item:f}},_addItem:function(f,
a,b){this._by_idx[a]=this._createItem(f,a);b||this.updateRow(a)},_onNew:function(f,a){this._checkUpdateStatus();var b=this.get("rowCount");this._addingItem=!0;this.updateRowCount(b+1);this._addingItem=!1;this._addItem(f,b);this.showMessage()},_onDelete:function(f){this._checkUpdateStatus();f=this._getItemIndex(f,!0);if(0<=f){this._pages=[];this._eop=this._bop=-1;var a=this._by_idx[f];this._by_idx.splice(f,1);delete this._by_idty[a.idty];this.updateRowCount(this.get("rowCount")-1);0===this.get("rowCount")&&
this.showMessage(this.noDataMessage)}this.selection.isSelected(f)&&(this.selection.deselect(f),this.selection.selected.splice(f,1))},_onRevert:function(){this._refresh()},setStore:function(f,a,b){this._requestsPending(0)||(this._setQuery(a,b),this._setStore(f),this._refresh(!0))},setQuery:function(a,b){this._requestsPending(0)||(this._setQuery(a,b),this._refresh(!0))},setItems:function(a){this.items=a;this._setStore(this.store);this._refresh(!0)},_setQuery:function(a,b){this.query=a;this.queryOptions=
b||this.queryOptions},_setStore:function(a){this.store&&this._store_connects&&k.forEach(this._store_connects,this.disconnect,this);if(this.store=a){a=this.store.getFeatures();var b=[];this._canEdit=!!a["dojo.data.api.Write"]&&!!a["dojo.data.api.Identity"];this._hasIdentity=!!a["dojo.data.api.Identity"];a["dojo.data.api.Notification"]&&!this.items&&(b.push(this.connect(this.store,"onSet","_onSet")),b.push(this.connect(this.store,"onNew","_onNew")),b.push(this.connect(this.store,"onDelete","_onDelete")));
this._canEdit&&b.push(this.connect(this.store,"revert","_onRevert"));this._store_connects=b}},_onFetchBegin:function(a,b){this.scroller&&(this.rowCount!=a&&(b.isRender?(this.scroller.init(a,this.keepRows,this.rowsPerPage),this.rowCount=a,this._setAutoHeightAttr(this.autoHeight,!0),this._skipRowRenormalize=!0,this.prerender(),this._skipRowRenormalize=!1):this.updateRowCount(a)),a?this.showMessage():(this.views.render(),this._resize(),this.showMessage(this.noDataMessage),this.focus.initFocusView()))},
_onFetchComplete:function(a,b){this.scroller&&(a&&0<a.length&&(k.forEach(a,function(a,f){this._addItem(a,b.start+f,!0)},this),this.updateRows(b.start,a.length),b.isRender?(this.setScrollTop(0),this.postrender()):this._lastScrollTop&&this.setScrollTop(this._lastScrollTop),e("ie")&&h.setSelectable(this.domNode,this.selectable)),delete this._lastScrollTop,this._isLoaded||(this._isLoading=!1,this._isLoaded=!0),this._pending_requests[b.start]=!1)},_onFetchError:function(a,b){delete this._lastScrollTop;
this._isLoaded||(this._isLoading=!1,this._isLoaded=!0,this.showMessage(this.errorMessage));this._pending_requests[b.start]=!1;this.onFetchError(a,b)},onFetchError:function(a,b){},_fetch:function(a,b){a=a||0;if(this.store&&!this._pending_requests[a]){!this._isLoaded&&!this._isLoading&&(this._isLoading=!0,this.showMessage(this.loadingMessage));this._pending_requests[a]=!0;try{if(this.items){var c=this.items,h=this.store;this.rowsPerPage=c.length;var d={start:a,count:this.rowsPerPage,isRender:b};this._onFetchBegin(c.length,
d);var e=0;k.forEach(c,function(a){h.isItemLoaded(a)||e++});if(0===e)this._onFetchComplete(c,d);else{var l=function(a){e--;0===e&&this._onFetchComplete(c,d)};k.forEach(c,function(a){h.isItemLoaded(a)||h.loadItem({item:a,onItem:l,scope:this})},this)}}else this.store.fetch({start:a,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:b,onBegin:m.hitch(this,"_onFetchBegin"),onComplete:m.hitch(this,"_onFetchComplete"),onError:m.hitch(this,"_onFetchError")})}catch(v){this._onFetchError(v,
{start:a,count:this.rowsPerPage})}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoading=this._isLoaded=!1},getItem:function(a){var b=this._by_idx[a];return!b||b&&!b.item?(this._preparePage(a),null):b.item},getItemIndex:function(a){return this._getItemIndex(a,!1)},_getItemIndex:function(a,b){if(!b&&!this.store.isItem(a))return-1;for(var c=this._hasIdentity?this.store.getIdentity(a):null,h=0,d=this._by_idx.length;h<d;h++){var e=
this._by_idx[h];if(e&&(c&&e.idty==c||e.item===a))return h}return-1},filter:function(a,b){this.query=a;b&&this._clearData();this._fetch()},_getItemAttr:function(a,b){var c=this.getItem(a);return!c?this.fetchText:this.store.getValue(c,b)},_render:function(){this.domNode.parentNode&&(this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage),this.prerender(),this._fetch(0,!0))},_requestsPending:function(a){return this._pending_requests[a]},_rowToPage:function(a){return this.rowsPerPage?
Math.floor(a/this.rowsPerPage):a},_pageToRow:function(a){return this.rowsPerPage?this.rowsPerPage*a:a},_preparePage:function(a){if((a<this._bop||a>=this._eop)&&!this._addingItem)a=this._rowToPage(a),this._needPage(a),this._bop=a*this.rowsPerPage,this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"))},_needPage:function(a){this._pages[a]||(this._pages[a]=!0,this._requestPage(a))},_requestPage:function(a){a=this._pageToRow(a);0<Math.min(this.rowsPerPage,this.get("rowCount")-a)&&(this._requests++,
this._requestsPending(a)||setTimeout(m.hitch(this,"_fetch",a,!1),1))},getCellName:function(a){return a.field},_refresh:function(a){this._clearData();this._fetch(0,a)},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh()},canSort:function(){return!this._isLoading},getSortProps:function(){var a=this.getCell(this.getSortIndex());if(a){var b=a.sortDesc,c=!(0<this.sortInfo);return[{attribute:a.field,descending:"undefined"==typeof b?c:c?!b:b}]}return this.sortFields?this.sortFields:
null},styleRowState:function(a){if(this.store&&this.store.getState){for(var b=this.store.getState(a.index),c="",h=0,d=["inflight","error","inserting"],e;e=d[h];h++)if(b[e]){c=" dojoxGridRow-"+e;break}a.customClasses+=c}},onStyleRow:function(a){this.styleRowState(a);this.inherited(arguments)},canEdit:function(a,b){return this._canEdit},_copyAttr:function(a,b){var c=this.getItem(a);return this.store.getValue(c,b)},doStartEdit:function(a,b){this._cache[b]||(this._cache[b]=this._copyAttr(b,a.field));
this.onStartEdit(a,b)},doApplyCellEdit:function(a,b,c){this.store.fetchItemByIdentity({identity:this._by_idx[b].idty,onItem:m.hitch(this,function(h){var d=this.store.getValue(h,c);"number"==typeof d?a=isNaN(a)?a:parseFloat(a):"boolean"==typeof d?a="true"==a?!0:"false"==a?!1:a:d instanceof Date&&(d=new Date(a),a=isNaN(d.getTime())?a:d);this.store.setValue(h,c,a);this.onApplyCellEdit(a,b,c)})})},doCancelEdit:function(a){this._cache[a]&&(this.updateRow(a),delete this._cache[a]);this.onCancelEdit.apply(this,
arguments)},doApplyEdit:function(a,b){this.onApplyEdit(a)},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var a=m.hitch(this,function(a){a.length&&(k.forEach(a,this.store.deleteItem,this.store),this.selection.clear())});this.allItemsSelected?this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:a}):a(this.selection.getSelected())}}});a.cell_markupFactory=function(a,b,c){var d=m.trim(h.attr(b,"field")||"");d&&(c.field=d);c.field=c.field||c.name;if(d=m.trim(h.attr(b,
"fields")||""))c.fields=d.split(",");a&&a(b,c)};a.markupFactory=function(b,h,d,e){return c.markupFactory(b,h,d,m.partial(a.cell_markupFactory,e))};return a})},"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".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s,l,v,C,u,x,A,w,z,D){p.isCopyKey||(p.isCopyKey=p.dnd.getCopyKeyState);m=m("dojox.grid._Grid",[t,s,g],{templateString:v,classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:!1,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:!0,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:!1,selectionMode:"extended",rowSelector:"",columnReordering:!1,headerMenu:null,placeholderLabel:"GridColumns",selectable:!1,_click:null,loadingMessage:"\x3cspan class\x3d'dojoxGridLoading'\x3e${loadingState}\x3c/span\x3e",
errorMessage:"\x3cspan class\x3d'dojoxGridError'\x3e${errorState}\x3c/span\x3e",noDataMessage:"",escapeHTMLInData:!0,formatterScope:null,editable:!1,summary:"",_setSummaryAttr:"domNode",sortInfo:0,_placeholders:null,_layoutClass:d,buildRendering:function(){this.inherited(arguments);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");w.initOnFontResize();this.connect(w,"onFontResize","textSizeChanged");q.funnelEvents(this.domNode,this,"doKeyEvent",q.keyEvents);"none"!=this.selectionMode&&this.domNode.setAttribute("aria-multiselectable","single"==this.selectionMode?"false":"true");z.addClass(this.domNode,this.classTag);this.isLeftToRight()||z.addClass(this.domNode,this.classTag+"Rtl");0<this.rowHeight&&z.addClass(this.viewsNode,
this.classTag+"FixedRowHeight")},postMixInProperties:function(){this.inherited(arguments);var a=p.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=C.substitute(this.loadingMessage,a);this.errorMessage=C.substitute(this.errorMessage,a);this.srcNodeRef&&this.srcNodeRef.style.height&&(this.height=this.srcNodeRef.style.height);this._setAutoHeightAttr(this.autoHeight,!0);this.lastScrollTop=this.scrollTop=0},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);
this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);this.domNode&&(this.autoWidth&&this.initialWidth)&&(this.domNode.style.width=this.initialWidth);this.domNode&&!this.editable&&z.attr(this.domNode,"aria-readonly","true")},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;this.scroller&&(this.scroller.destroy(),delete this.scroller);this.edit.destroy();delete this.edit;this.views.destroyViews();this.focus&&(this.focus.destroy(),
delete this.focus);this.headerMenu&&this._placeholders.length&&(u.forEach(this._placeholders,function(a){a.unReplace(!0)}),this.headerMenu.unBindDomNode(this.viewsHeaderNode));this.inherited(arguments)},_setAutoHeightAttr:function(a,b){"string"==typeof a&&(a=!a||"false"==a?!1:"true"==a?!0:window.parseInt(a,10));"number"==typeof a&&(isNaN(a)&&(a=!1),0>a?a=!0:0===a&&(a=!1));this.autoHeight=a;this._autoHeight="boolean"==typeof a?a:"number"==typeof a?a>=this.get("rowCount"):!1;this._started&&!b&&this.render()},
_getRowCountAttr:function(){return this.updating&&this.invalidated&&void 0!=this.invalidated.rowCount?this.invalidated.rowCount:this.rowCount},textSizeChanged:function(){this.render()},sizeChange:function(){this.update()},createManagers:function(){this.rows=new h(this);this.focus=new a(this);this.edit=new f(this)},createSelection:function(){this.selection=new r(this)},createScroller:function(){this.scroller=new e;this.scroller.grid=this;this.scroller.renderRow=x.hitch(this,"renderRow");this.scroller.removeRow=
x.hitch(this,"rowRemoved")},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn")},onMoveColumn:function(){this.update()},onResizeColumn:function(a){},createViews:function(){this.views=new b(this);this.views.createView=x.hitch(this,"createView")},createView:function(a,b){var f=new (x.getObject(a))({grid:this,index:b});this.viewsNode.appendChild(f.domNode);this.viewsHeaderNode.appendChild(f.headerNode);this.views.addView(f);z.attr(this.domNode,
"align",this.isLeftToRight()?"left":"right");return f},buildViews:function(){for(var a=0,b;b=this.layout.structure[a];a++)this.createView(b.type||k._scopeName+".grid._View",a).setStructure(b);this.scroller.setContentNodes(this.views.getContentNodes())},_setStructureAttr:function(a){a&&x.isString(a)&&(p.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0"),a=x.getObject(a));this.structure=a;if(!a)if(this.layout.structure)a=this.layout.structure;
else return;this.views.destroyViews();this.focus.focusView=null;a!==this.layout.structure&&this.layout.setStructure(a);this._structureChanged()},setStructure:function(a){p.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(a)},getColumnTogglingItems:function(){var a,b=[];a=u.map(this.layout.cells,function(a){a.menuItems||(a.menuItems=[]);var f=this,c=new l({label:a.name,checked:!a.hidden,_gridCell:a,onChange:function(a){if(f.layout.setColumnVisibility(this._gridCell.index,
a)){var b=this._gridCell.menuItems;1<b.length&&u.forEach(b,function(b){b!==this&&b.setAttribute("checked",a)},this);a=u.filter(f.layout.cells,function(a){1<a.menuItems.length?u.forEach(a.menuItems,"item.set('disabled', false);"):a.menuItems[0].set("disabled",!1);return!a.hidden});1==a.length&&u.forEach(a[0].menuItems,"item.set('disabled', true);")}},destroy:function(){var a=u.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(a,1);delete this._gridCell;l.prototype.destroy.apply(this,
arguments)}});a.menuItems.push(c);a.hidden||b.push(c);return c},this);1==b.length&&b[0].set("disabled",!0);return a},_setHeaderMenuAttr:function(a){this._placeholders&&this._placeholders.length&&(u.forEach(this._placeholders,function(a){a.unReplace(!0)}),this._placeholders=[]);this.headerMenu&&this.headerMenu.unBindDomNode(this.viewsHeaderNode);if(this.headerMenu=a)this.headerMenu.bindDomNode(this.viewsHeaderNode),this.headerMenu.getPlaceholders&&(this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel))},
setHeaderMenu:function(a){p.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(a)},setupHeaderMenu:function(){this._placeholders&&this._placeholders.length&&u.forEach(this._placeholders,function(a){a._replaced&&a.unReplace(!0);a.replace(this.getColumnTogglingItems())},this)},_fetch:function(a){this.setScrollTop(0)},getItem:function(a){return null},showMessage:function(a){a?(this.messagesNode.innerHTML=a,this.messagesNode.style.display=
""):(this.messagesNode.innerHTML="",this.messagesNode.style.display="none")},_structureChanged:function(){this.buildViews();this.autoRender&&this._started&&this.render()},hasLayout:function(){return this.layout.cells.length},resize:function(a,b){this._pendingChangeSize=a;this._pendingResultSize=b;this.sizeChange()},_getPadBorder:function(){return this._padBorder=this._padBorder||z._getPadBorderExtents(this.domNode)},_getHeaderHeight:function(){var a=this.viewsHeaderNode.style,b="none"==a.display?
0:this.views.measureHeader();a.height=b+"px";this.views.normalizeHeaderNodeHeight();return b},_resize:function(a,b){a=a||this._pendingChangeSize;b=b||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(this.domNode){var f=this.domNode.parentNode;if(f&&!(1!=f.nodeType||!this.hasLayout()||"hidden"==f.style.visibility||"none"==f.style.display)){var l=this._getPadBorder(),c=void 0,h;this._autoHeight?this.domNode.style.height="auto":"number"==typeof this.autoHeight?
(h=c=this._getHeaderHeight(),h+=this.scroller.averageRowHeight*this.autoHeight,this.domNode.style.height=h+"px"):this.domNode.clientHeight<=l.h&&(f==document.body?this.domNode.style.height=this.defaultHeight:this.height?this.domNode.style.height=this.height:this.fitTo="parent");b&&(a=b);!this._autoHeight&&a?(z.marginBox(this.domNode,a),this.height=this.domNode.style.height,delete this.fitTo):"parent"==this.fitTo&&(h=this._parentContentBoxHeight=0<this._parentContentBoxHeight?this._parentContentBoxHeight:
z._getContentBox(f).h,this.domNode.style.height=Math.max(0,h)+"px");f=u.some(this.views.views,function(a){return a.flexCells});!this._autoHeight&&0===(h||z._getContentBox(this.domNode).h)?this.viewsHeaderNode.style.display="none":(this.viewsHeaderNode.style.display="block",!f&&void 0===c&&(c=this._getHeaderHeight()));f&&(c=void 0);this.adaptWidth();this.adaptHeight(c);this.postresize()}}},adaptWidth:function(){var a=!this.initialWidth&&this.autoWidth,b=a?0:this.domNode.clientWidth||this.domNode.offsetWidth-
this._getPadBorder().w,b=this.views.arrange(1,b);this.views.onEach("adaptWidth");a&&(this.domNode.style.width=b+"px")},adaptHeight:function(a){a=void 0===a?this._getHeaderHeight():a;var b=this._autoHeight?-1:Math.max(this.domNode.clientHeight-a,0)||0;this.views.onEach("setSize",[0,b]);this.views.onEach("adaptHeight");if(!this._autoHeight){var f=0,l=0,c=u.filter(this.views.views,function(a){(a=a.hasHScrollbar())?f++:l++;return!a});0<f&&0<l&&u.forEach(c,function(a){a.adaptHeight(!0)})}!0===this.autoHeight||
-1!=b||"number"==typeof this.autoHeight&&this.autoHeight>=this.get("rowCount")?this.scroller.windowHeight=b:this.scroller.windowHeight=Math.max(this.domNode.clientHeight-a,0)},startup:function(){this._started||(this.inherited(arguments),this.autoRender&&this.render())},render:function(){this.domNode&&this._started&&(this.hasLayout()?(this.update=this.defaultUpdate,this._render()):this.scroller.init(0,this.keepRows,this.rowsPerPage))},_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();z.setSelectable(this.domNode,this.selectable)},postresize:function(){if(this._autoHeight){var a=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=a}},renderRow:function(a,b){this.views.renderRow(a,
b,this._skipRowRenormalize)},rowRemoved:function(a){this.views.rowRemoved(a)},invalidated:null,updating:!1,beginUpdate:function(){this.invalidated=[];this.updating=!0},endUpdate:function(){this.updating=!1;var a=this.invalidated,b;if(a.all)this.update();else if(void 0!=a.rowCount)this.updateRowCount(a.rowCount);else for(b in a)this.updateRow(Number(b));this.invalidated=[]},defaultUpdate:function(){this.domNode&&(this.updating?this.invalidated.all=!0:(this.lastScrollTop=this.scrollTop,this.prerender(),
this.scroller.invalidateNodes(),this.setScrollTop(this.lastScrollTop),this.postrender()))},update:function(){this.render()},updateRow:function(a){a=Number(a);this.updating?this.invalidated[a]=!0:(this.views.updateRow(a),this.scroller.rowHeightChanged(a))},updateRows:function(a,b){a=Number(a);b=Number(b);var f;if(this.updating)for(f=0;f<b;f++)this.invalidated[f+a]=!0;else{for(f=0;f<b;f++)this.views.updateRow(f+a,this._skipRowRenormalize);this.scroller.rowHeightChanged(a)}},updateRowCount:function(a){this.updating?
this.invalidated.rowCount=a:(this.rowCount=a,this._setAutoHeightAttr(this.autoHeight,!0),this.layout.cells.length&&this.scroller.updateRowCount(a),this._resize(),this.layout.cells.length&&this.setScrollTop(this.scrollTop))},updateRowStyles:function(a){this.views.updateRowStyles(a)},getRowNode:function(a){if(this.focus.focusView&&!(this.focus.focusView instanceof n))return this.focus.focusView.rowNodes[a];for(var b=0,f;f=this.views.views[b];b++)if(!(f instanceof n))return f.rowNodes[a];return null},
rowHeightChanged:function(a){this.views.renormalizeRow(a);this.scroller.rowHeightChanged(a)},fastScroll:!0,delayScroll:!1,scrollRedrawThreshold:A("ie")?100:50,scrollTo:function(a){if(this.fastScroll){var b=Math.abs(this.lastScrollTop-a);this.lastScrollTop=a;if(b>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=!0;this.scrollTop=a;this.views.setScrollTop(a);this._pendingScroll&&window.clearTimeout(this._pendingScroll);var f=this;this._pendingScroll=window.setTimeout(function(){delete f._pendingScroll;
f.finishScrollJob()},200)}else this.setScrollTop(a)}else this.setScrollTop(a)},finishScrollJob:function(){this.delayScroll=!1;this.setScrollTop(this.scrollTop)},setScrollTop:function(a){this.scroller.scroll(this.views.setScrollTop(a))},scrollToRow:function(a){this.setScrollTop(this.scroller.findScrollTop(a)+1)},styleRowNode:function(a,b){b&&this.rows.styleRowNode(a,b)},_mouseOut:function(a){this.rows.setOverRow(-2)},getCell:function(a){return this.layout.cells[a]},setCellWidth:function(a,b){this.getCell(a).unitWidth=
b},getCellName:function(a){return"Cell "+a.index},canSort:function(a){},sort:function(){},getSortAsc:function(a){a=void 0==a?this.sortInfo:a;return Boolean(0<a)},getSortIndex:function(a){a=void 0==a?this.sortInfo:a;return Math.abs(a)-1},setSortIndex:function(a,b){var f=a+1;void 0!=b?f*=b?1:-1:this.getSortIndex()==a&&(f=-this.sortInfo);this.setSortInfo(f)},setSortInfo:function(a){this.canSort(a)&&(this.sortInfo=a,this.sort(),this.update())},doKeyEvent:function(a){a.dispatch="do"+a.type;this.onKeyEvent(a)},
_dispatch:function(a,b){return a in this?this[a](b):!1},dispatchKeyEvent:function(a){this._dispatch(a.dispatch,a)},dispatchContentEvent:function(a){this.edit.dispatchEvent(a)||a.sourceView.dispatchContentEvent(a)||this._dispatch(a.dispatch,a)},dispatchHeaderEvent:function(a){a.sourceView.dispatchHeaderEvent(a)||this._dispatch("doheader"+a.type,a)},dokeydown:function(a){this.onKeyDown(a)},doclick:function(a){if(a.cellNode)this.onCellClick(a);else this.onRowClick(a)},dodblclick:function(a){if(a.cellNode)this.onCellDblClick(a);
else this.onRowDblClick(a)},docontextmenu:function(a){if(a.cellNode)this.onCellContextMenu(a);else this.onRowContextMenu(a)},doheaderclick:function(a){if(a.cellNode)this.onHeaderCellClick(a);else this.onHeaderClick(a)},doheaderdblclick:function(a){if(a.cellNode)this.onHeaderCellDblClick(a);else this.onHeaderDblClick(a)},doheadercontextmenu:function(a){if(a.cellNode)this.onHeaderCellContextMenu(a);else this.onHeaderContextMenu(a)},doStartEdit:function(a,b){this.onStartEdit(a,b)},doApplyCellEdit:function(a,
b,f){this.onApplyCellEdit(a,b,f)},doCancelEdit:function(a){this.onCancelEdit(a)},doApplyEdit:function(a){this.onApplyEdit(a)},addRow:function(){this.updateRowCount(this.get("rowCount")+1)},removeSelectedRows:function(){this.allItemsSelected?this.updateRowCount(0):this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));this.selection.clear()}});m.markupFactory=function(a,b,f,l){var c=function(a){a=z.attr(a,"width")||"auto";"auto"!=a&&("em"!=a.slice(-2)&&"%"!=a.slice(-1))&&
(a=parseInt(a,10)+"px");return a};!a.structure&&"table"==b.nodeName.toLowerCase()&&(a.structure=D("\x3e colgroup",b).map(function(a){var b=z.attr(a,"span"),b={noscroll:"true"==z.attr(a,"noscroll")?!0:!1,__span:b?parseInt(b,10):1,cells:[]};z.hasAttr(a,"width")&&(b.width=c(a));return b}),a.structure.length||a.structure.push({__span:Infinity,cells:[]}),D("thead \x3e tr",b).forEach(function(b,f){var h=0,d=0,v,u=null;D("\x3e th",b).map(function(b){u?h>=v+u.__span&&(d++,v+=u.__span,u=a.structure[d]):(v=
0,u=a.structure[0]);var e={name:x.trim(z.attr(b,"name")||b.innerHTML),colSpan:parseInt(z.attr(b,"colspan")||1,10),type:x.trim(z.attr(b,"cellType")||""),id:x.trim(z.attr(b,"id")||"")};h+=e.colSpan;var q=z.attr(b,"rowspan");q&&(e.rowSpan=q);z.hasAttr(b,"width")&&(e.width=c(b));z.hasAttr(b,"relWidth")&&(e.relWidth=window.parseInt(z.attr(b,"relWidth"),10));z.hasAttr(b,"hidden")&&(e.hidden="true"==z.attr(b,"hidden")||!0===z.attr(b,"hidden"));l&&l(b,e);e.type=e.type?x.getObject(e.type):k.grid.cells.Cell;
e.type&&e.type.markupFactory&&e.type.markupFactory(b,e);u.cells[f]||(u.cells[f]=[]);u.cells[f].push(e)})}));return new f(a,b)};return m})},"dojox/grid/_Events":function(){define(["dojo/keys","dojo/dom-class","dojo/_base/declare","dojo/_base/event","dojo/_base/sniff"],function(p,k,m,g,e){return m("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(d){this.dispatchKeyEvent(d)},onContentEvent:function(d){this.dispatchContentEvent(d)},onHeaderEvent:function(d){this.dispatchHeaderEvent(d)},
onStyleRow:function(d){d.customClasses+=(d.odd?" dojoxGridRowOdd":"")+(d.selected?" dojoxGridRowSelected":"")+(d.over?" dojoxGridRowOver":"");this.focus.styleRow(d);this.edit.styleRow(d)},onKeyDown:function(d){if(!d.altKey&&!d.metaKey){var c;switch(d.keyCode){case p.ESCAPE:this.edit.cancel();break;case p.ENTER:if(!this.edit.isEditing()){c=this.focus.getHeaderIndex();if(0<=c){this.setSortIndex(c);break}else this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(d),d.shiftKey);g.stop(d)}d.shiftKey||
(c=this.edit.isEditing(),this.edit.apply(),c||this.edit.setEditCell(this.focus.cell,this.focus.rowIndex));this.edit.isEditing()||((this.focus.focusView||this.views.views[0]).content.decorateEvent(d),this.onRowClick(d),g.stop(d));break;case p.SPACE:if(!this.edit.isEditing()){c=this.focus.getHeaderIndex();if(0<=c){this.setSortIndex(c);break}else this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(d),d.shiftKey),this.focus._focusifyCellNode(!0),this.focus.setFocusCell(this.focus.cell,this.focus.rowIndex);
g.stop(d)}break;case p.TAB:this.focus[d.shiftKey?"previousKey":"nextKey"](d);break;case p.LEFT_ARROW:case p.RIGHT_ARROW:if(!this.edit.isEditing()){var b=d.keyCode;g.stop(d);c=this.focus.getHeaderIndex();0<=c&&d.shiftKey&&d.ctrlKey?this.focus.colSizeAdjust(d,c,5*(b==p.LEFT_ARROW?-1:1)):(d=b==p.LEFT_ARROW?1:-1,this.isLeftToRight()&&(d*=-1),this.focus.move(0,d))}break;case p.UP_ARROW:!this.edit.isEditing()&&0!==this.focus.rowIndex&&(g.stop(d),this.focus.move(-1,0));break;case p.DOWN_ARROW:!this.edit.isEditing()&&
this.focus.rowIndex+1!=this.rowCount&&(g.stop(d),this.focus.move(1,0));break;case p.PAGE_UP:!this.edit.isEditing()&&0!==this.focus.rowIndex&&(g.stop(d),this.focus.rowIndex!=this.scroller.firstVisibleRow+1?this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0):(this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1)),this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0)));break;case p.PAGE_DOWN:!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount&&
(g.stop(d),this.focus.rowIndex!=this.scroller.lastVisibleRow-1?this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0):(this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1)),this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0)))}}},onMouseOver:function(d){-1==d.rowIndex?this.onHeaderCellMouseOver(d):this.onCellMouseOver(d)},onMouseOut:function(d){-1==d.rowIndex?this.onHeaderCellMouseOut(d):this.onCellMouseOut(d)},onMouseDown:function(d){-1==
d.rowIndex?this.onHeaderCellMouseDown(d):this.onCellMouseDown(d)},onMouseOverRow:function(d){this.rows.isOver(d.rowIndex)||(this.rows.setOverRow(d.rowIndex),-1==d.rowIndex?this.onHeaderMouseOver(d):this.onRowMouseOver(d))},onMouseOutRow:function(d){if(this.rows.isOver(-1))this.onHeaderMouseOut(d);else this.rows.isOver(-2)||(this.rows.setOverRow(-2),this.onRowMouseOut(d))},onMouseDownRow:function(d){if(-1!=d.rowIndex)this.onRowMouseDown(d)},onCellMouseOver:function(d){d.cellNode&&k.add(d.cellNode,
this.cellOverClass)},onCellMouseOut:function(d){d.cellNode&&k.remove(d.cellNode,this.cellOverClass)},onCellMouseDown:function(d){},onCellClick:function(d){this._click[0]=this._click[1];this._click[1]=d;this.edit.isEditCell(d.rowIndex,d.cellIndex)||this.focus.setFocusCell(d.cell,d.rowIndex);1<this._click.length&&null==this._click[0]&&this._click.shift();this.onRowClick(d)},onCellDblClick:function(d){var c;c=1<this._click.length&&e("ie")?this._click[1]:1<this._click.length&&this._click[0].rowIndex!=
this._click[1].rowIndex?this._click[0]:d;this.focus.setFocusCell(c.cell,c.rowIndex);this.edit.setEditCell(c.cell,c.rowIndex);this.onRowDblClick(d)},onCellContextMenu:function(d){this.onRowContextMenu(d)},onCellFocus:function(d,c){this.edit.cellFocus(d,c)},onRowClick:function(d){this.edit.rowClick(d);this.selection.clickSelectEvent(d)},onRowDblClick:function(d){},onRowMouseOver:function(d){},onRowMouseOut:function(d){},onRowMouseDown:function(d){},onRowContextMenu:function(d){g.stop(d)},onHeaderMouseOver:function(d){},
onHeaderMouseOut:function(d){},onHeaderCellMouseOver:function(d){d.cellNode&&k.add(d.cellNode,this.cellOverClass)},onHeaderCellMouseOut:function(d){d.cellNode&&k.remove(d.cellNode,this.cellOverClass)},onHeaderCellMouseDown:function(d){},onHeaderClick:function(d){},onHeaderCellClick:function(d){this.setSortIndex(d.cell.index);this.onHeaderClick(d)},onHeaderDblClick:function(d){},onHeaderCellDblClick:function(d){this.onHeaderDblClick(d)},onHeaderCellContextMenu:function(d){this.onHeaderContextMenu(d)},
onHeaderContextMenu:function(d){this.headerMenu||g.stop(d)},onStartEdit:function(d,c){},onApplyCellEdit:function(d,c,b){},onCancelEdit:function(d){},onApplyEdit:function(d){},onCanSelect:function(d){return!0},onCanDeselect:function(d){return!0},onSelected:function(d){this.updateRowStyles(d)},onDeselected:function(d){this.updateRowStyles(d)},onSelectionChanged:function(){}})})},"dojox/grid/_Scroller":function(){define(["dijit/registry","dojo/_base/declare","dojo/_base/lang","./util","dojo/_base/html"],
function(p,k,m,g,e){var d=function(b){b&&dojo.forEach(p.toArray(),function(c){c.domNode&&e.isDescendant(c.domNode,b,!0)&&c.destroy()})},c=function(b,c){for(var a=[],f=0,d;d=b.childNodes[f];){f++;var n=e.byId(d);(n&&n.tagName?n.tagName.toLowerCase():"")==c&&a.push(d)}return a};return k("dojox.grid._Scroller",null,{constructor:function(b){this.setContentNodes(b);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(b,c,a){switch(arguments.length){case 3:this.rowsPerPage=a;case 2:this.keepRows=c;case 1:this.rowCount=b}this.defaultPageHeight=(0<this.grid.rowHeight?this.grid.rowHeight:this.defaultRowHeight)*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();this.scrollboxNode&&(this.scrollboxNode.scrollTop=
0,this.scroll(0),this.scrollboxNode.onscroll=m.hitch(this,"onscroll"))},_getPageCount:function(b,c){return b?Math.ceil(b/c)||1:0},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode},setKeepInfo:function(b){this.keepRows=b;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2)},setContentNodes:function(b){this.colCount=(this.contentNodes=b)?this.contentNodes.length:0;this.pageNodes=[];for(b=
0;b<this.colCount;b++)this.pageNodes[b]=[]},getDefaultNodes:function(){return this.pageNodes[0]||[]},invalidate:function(){this._invalidating=!0;this.invalidateNodes();this.pageHeights=[];this.height=this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0;this.resize();this._invalidating=!1},updateRowCount:function(b){this.invalidateNodes();this.rowCount=b;b=this.pageCount;0===b&&(this.height=1);this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<
b)for(b-=1;b>=this.pageCount;b--)this.height-=this.getPageHeight(b),delete this.pageHeights[b];else this.pageCount>b&&(this.height+=this.defaultPageHeight*(this.pageCount-b-1)+this.calcLastPageHeight());this.resize()},pageExists:function(b){return Boolean(this.getDefaultPageNode(b))},measurePage:function(b){return this.grid.rowHeight?((b+1)*this.rowsPerPage>this.rowCount?this.rowCount-b*this.rowsPerPage:this.rowsPerPage)*this.grid.rowHeight:(b=this.getDefaultPageNode(b))&&b.innerHTML?b.offsetHeight:
void 0},positionPage:function(b,c){for(var a=0;a<this.colCount;a++)this.pageNodes[a][b].style.top=c+"px"},repositionPages:function(b){for(var c=this.getDefaultNodes(),a=0,f=0;f<this.stack.length;f++)a=Math.max(this.stack[f],a);var d=(f=c[b])?this.getPageNodePosition(f)+this.getPageHeight(b):0;for(b+=1;b<=a;b++){if(f=c[b]){if(this.getPageNodePosition(f)==d)break;this.positionPage(b,d)}d+=this.getPageHeight(b)}},installPage:function(b){for(var c=0;c<this.colCount;c++)this.contentNodes[c].appendChild(this.pageNodes[c][b])},
preparePage:function(b,c){for(var a=c?this.popPage():null,f=0;f<this.colCount;f++){var d=this.pageNodes[f],e=null===a?this.createPageNode():this.invalidatePageNode(a,d);e.pageIndex=b;d[b]=e}},renderPage:function(b){var c=[],a;for(a=0;a<this.colCount;a++)c[a]=this.pageNodes[a][b];a=0;for(b*=this.rowsPerPage;a<this.rowsPerPage&&b<this.rowCount;a++,b++)this.renderRow(b,c)},removePage:function(b){var c=0;for(b*=this.rowsPerPage;c<this.rowsPerPage;c++,b++)this.removeRow(b)},destroyPage:function(b){for(var c=
0;c<this.colCount;c++){var a=this.invalidatePageNode(b,this.pageNodes[c]);a&&e.destroy(a)}},pacify:function(b){},pacifying:!1,pacifyTicks:200,setPacifying:function(b){this.pacifying!=b&&(this.pacifying=b,this.pacify(this.pacifying))},startPacify:function(){this.startPacifyTicks=(new Date).getTime()},doPacify:function(){var b=(new Date).getTime()-this.startPacifyTicks>this.pacifyTicks;this.setPacifying(!0);this.startPacify();return b},endPacify:function(){this.setPacifying(!1)},resize:function(){this.scrollboxNode&&
(this.windowHeight=this.scrollboxNode.clientHeight);for(var b=0;b<this.colCount;b++)g.setStyleHeightPx(this.contentNodes[b],Math.max(1,this.height));b=!this._invalidating;if(!b){var c=this.grid.get("autoHeight");"number"==typeof c&&c<=Math.min(this.rowsPerPage,this.rowCount)&&(b=!0)}b&&this.needPage(this.page,this.pageTop);b=this.page<this.pageCount-1?this.rowsPerPage:this.rowCount%this.rowsPerPage||this.rowsPerPage;c=this.getPageHeight(this.page);this.averageRowHeight=0<c&&0<b?c/b:0},calcLastPageHeight:function(){if(!this.pageCount)return 0;
var b=(this.rowCount%this.rowsPerPage||this.rowsPerPage)*this.defaultRowHeight;return this.pageHeights[this.pageCount-1]=b},updateContentHeight:function(b){this.height+=b;this.resize()},updatePageHeight:function(b,c,a){if(this.pageExists(b)){var f=this.getPageHeight(b),d=this.measurePage(b);void 0===d&&(d=f);this.pageHeights[b]=d;if(f!=d){this.updateContentHeight(d-f);var e=this.grid.get("autoHeight");"number"==typeof e&&e>this.rowCount||!0===e&&!c?a?(c=this.grid.viewsNode.style,c.height=parseInt(c.height)+
d-f+"px",this.repositionPages(b)):this.grid.sizeChange():this.repositionPages(b)}return d}return 0},rowHeightChanged:function(b,c){this.updatePageHeight(Math.floor(b/this.rowsPerPage),!1,c)},invalidateNodes:function(){for(;this.stack.length;)this.destroyPage(this.popPage())},createPageNode:function(){var b=document.createElement("div");e.attr(b,"role","presentation");b.style.position="absolute";b.style[this.grid.isLeftToRight()?"left":"right"]="0";return b},getPageHeight:function(b){b=this.pageHeights[b];
return void 0!==b?b:this.defaultPageHeight},pushPage:function(b){return this.stack.push(b)},popPage:function(){return this.stack.shift()},findPage:function(b){for(var c=0,a=0,f=0;c<this.pageCount&&!(f=this.getPageHeight(c),a+f>=b);c++,a+=f);this.page=c;this.pageTop=a},buildPage:function(b,c,a){this.preparePage(b,c);this.positionPage(b,a);this.installPage(b);this.renderPage(b);this.pushPage(b)},needPage:function(b,c){var a=this.getPageHeight(b);this.pageExists(b)?this.positionPage(b,c):(this.buildPage(b,
!this.grid._autoHeight&&this.keepPages&&this.stack.length>=this.keepPages,c),a=this.updatePageHeight(b,!0));return a},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop)},scroll:function(b){this.grid.scrollTop=b;if(this.colCount){this.startPacify();this.findPage(b);for(var c=this.height,a=this.getScrollBottom(b),f=this.page,d=this.pageTop;f<this.pageCount&&(0>a||d<a);f++)d+=this.needPage(f,d);this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,b);this.lastVisibleRow=this.getLastVisibleRow(f-
1,d,a);c!=this.height&&this.repositionPages(f-1);this.endPacify()}},getScrollBottom:function(b){return 0<=this.windowHeight?b+this.windowHeight:-1},processNodeEvent:function(b,c){for(var a=b.target;a&&a!=c&&a.parentNode&&a.parentNode.parentNode!=c;)a=a.parentNode;if(!a||!a.parentNode||a.parentNode.parentNode!=c)return!1;b.topRowIndex=a.parentNode.pageIndex*this.rowsPerPage;var f=b.topRowIndex,d;a:{d=0;for(var e,q=a.parentNode;e=q.childNodes[d++];)if(e==a){d-=1;break a}d=-1}b.rowIndex=f+d;b.rowTarget=
a;return!0},processEvent:function(b){return this.processNodeEvent(b,this.contentNode)},renderRow:function(b,c){},removeRow:function(b){},getDefaultPageNode:function(b){return this.getDefaultNodes()[b]},positionPageNode:function(b,c){},getPageNodePosition:function(b){return b.offsetTop},invalidatePageNode:function(b,c){var a=c[b];a&&(delete c[b],this.removePage(b,a),d(a),a.innerHTML="");return a},getPageRow:function(b){return b*this.rowsPerPage},getLastPageRow:function(b){return Math.min(this.rowCount,
this.getPageRow(b+1))-1},getFirstVisibleRow:function(b,d,a){if(!this.pageExists(b))return 0;var f=this.getPageRow(b),e=this.getDefaultNodes();b=c(e[b],"div");for(var e=0,n=b.length;e<n&&d<a;e++,f++)d+=b[e].offsetHeight;return f?f-1:f},getLastVisibleRow:function(b,d,a){if(!this.pageExists(b))return 0;var f=this.getDefaultNodes(),e=this.getLastPageRow(b);b=c(f[b],"div");for(f=b.length-1;0<=f&&d>a;f--,e--)d-=b[f].offsetHeight;return e+1},findTopRow:function(b){for(var d=this.getDefaultNodes(),d=c(d[this.page],
"div"),a=0,f=d.length,e=this.pageTop,n;a<f;a++)if(n=d[a].offsetHeight,e+=n,e>=b)return this.offset=n-(e-b),a+this.page*this.rowsPerPage;return-1},findScrollTop:function(b){var d=Math.floor(b/this.rowsPerPage),a=0,f;for(f=0;f<d;f++)a+=this.getPageHeight(f);this.pageTop=a;this.page=d;this.needPage(d,this.pageTop);f=this.getDefaultNodes();var e=c(f[d],"div"),d=b-this.rowsPerPage*d;f=0;for(b=e.length;f<b&&f<d;f++)a+=e[f].offsetHeight;return a},dummy:0})})},"dojox/grid/util":function(){define(["../main",
"dojo/_base/lang","dojo/dom"],function(p,k,m){var g=k.getObject("grid.util",!0,p);g.na="...";g.rowIndexTag="gridRowIndex";g.gridViewTag="gridView";g.fire=function(e,d,c){var b=e&&d&&e[d];return b&&(c?b.apply(e,c):e[d]())};g.setStyleHeightPx=function(e,d){if(0<=d){var c=e.style,b=d+"px";e&&c.height!=b&&(c.height=b)}};g.mouseEvents="mouseover mouseout mousedown mouseup click dblclick contextmenu".split(" ");g.keyEvents=["keyup","keydown","keypress"];g.funnelEvents=function(e,d,c,b){b=b?b:g.mouseEvents.concat(g.keyEvents);
for(var h=0,a=b.length;h<a;h++)d.connect(e,"on"+b[h],c)};g.removeNode=function(e){(e=m.byId(e))&&e.parentNode&&e.parentNode.removeChild(e);return e};g.arrayCompare=function(e,d){for(var c=0,b=e.length;c<b;c++)if(e[c]!=d[c])return!1;return e.length==d.length};g.arrayInsert=function(e,d,c){e.length<=d?e[d]=c:e.splice(d,0,c)};g.arrayRemove=function(e,d){e.splice(d,1)};g.arraySwap=function(e,d,c){var b=e[d];e[d]=e[c];e[c]=b};return g})},"dojox/grid/_Layout":function(){define("dojo/_base/kernel ../main dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/dom-geometry ./cells ./_RowSelector".split(" "),
function(p,k,m,g,e,d){return m("dojox.grid._Layout",null,{constructor:function(c){this.grid=c},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(c,b,d,a,f){var e=this.structure[c].cells[0],n=this.structure[b].cells[0],q=null,t=q=0;c=0;for(var s;s=e[c];c++)if(s.index==d){q=c;break}q=e.splice(q,1)[0];q.view=this.grid.views.views[b];c=0;for(s=null;s=n[c];c++)if(s.index==a){t=c;break}f||(t+=1);n.splice(t,0,q);if(d=this.grid.getCell(this.grid.getSortIndex()))d._currentlySorted=this.grid.getSortAsc();
this.cells=[];for(c=d=0;b=this.structure[c];c++)for(a=0;f=b.cells[a];a++)for(e=0;s=f[e];e++)s.index=d,this.cells.push(s),"_currentlySorted"in s&&(n=d+1,n*=s._currentlySorted?1:-1,this.grid.sortInfo=n,delete s._currentlySorted),d++;g.forEach(this.cells,function(a){var b=a.markup[2].split(" ");parseInt(b[1].substring(5))!=a.index&&(b[1]='idx\x3d"'+a.index+'"',a.markup[2]=b.join(" "))});this.grid.setupHeaderMenu()},setColumnVisibility:function(c,b){var e=this.cells[c];if(e.hidden==b){e.hidden=!b;var a=
e.view,f=a.viewWidth;f&&"auto"!=f&&(a._togglingColumn=d.getMarginBox(e.getHeaderNode()).w||0);a.update();return!0}return!1},addCellDef:function(c,b,d){var a=this,f=function(b){var f=0;1<b.colSpan?f=0:(f=b.width||a._defaultCellProps.width||a.defaultWidth,isNaN(f)||(f+="em"));return f};c={grid:this.grid,subrow:c,layoutIndex:b,index:this.cells.length};if(d&&d instanceof k.grid.cells._Base)return b=e.clone(d),c.unitWidth=f(b._props),b=e.mixin(b,this._defaultCellProps,d._props,c);b=d.type||d.cellType||
this._defaultCellProps.type||this._defaultCellProps.cellType||k.grid.cells.Cell;e.isString(b)&&(b=e.getObject(b));c.unitWidth=f(d);return new b(e.mixin({},this._defaultCellProps,d,c))},addRowDef:function(c,b){for(var d=[],a=0,f=0,e=!0,n=0,q;q=b[n];n++)q=this.addCellDef(c,n,q),d.push(q),this.cells.push(q),e&&q.relWidth?a+=q.relWidth:q.width&&(q=q.width,"string"==typeof q&&"%"==q.slice(-1)?f+=window.parseInt(q,10):"auto"==q&&(e=!1));a&&e&&g.forEach(d,function(b){b.relWidth&&(b.width=b.unitWidth=b.relWidth/
a*(100-f)+"%")});return d},addRowsDef:function(c){var b=[];if(e.isArray(c))if(e.isArray(c[0]))for(var d=0,a;c&&(a=c[d]);d++)b.push(this.addRowDef(d,a));else b.push(this.addRowDef(0,c));return b},addViewDef:function(c){this._defaultCellProps=c.defaultCell||{};c.width&&"auto"==c.width&&delete c.width;return e.mixin({},c,{cells:this.addRowsDef(c.rows||c.cells)})},setStructure:function(c){this.fieldIndex=0;this.cells=[];var b=this.structure=[];if(this.grid.rowSelector){var d={type:k._scopeName+".grid._RowSelector"};
if(e.isString(this.grid.rowSelector)){var a=this.grid.rowSelector;"false"==a?d=null:"true"!=a&&(d.width=a)}else this.grid.rowSelector||(d=null);d&&b.push(this.addViewDef(d))}d=function(a){return null!==a&&e.isObject(a)&&("cells"in a||"rows"in a||"type"in a&&!("name"in a||"field"in a||"get"in a))};if(e.isArray(c)){for(var a=!1,f=0,g;g=c[f];f++)if(d(g)){a=!0;break}if(a)for(f=0;g=c[f];f++)e.isArray(g)&&(e.isArray(g[0])||"name"in g[0]||"field"in g[0]||"get"in g[0])?b.push(this.addViewDef({cells:g})):
d(g)&&b.push(this.addViewDef(g));else b.push(this.addViewDef({cells:c}))}else d(c)&&b.push(this.addViewDef(c));this.cellCount=this.cells.length;this.grid.setupHeaderMenu()}})})},"dojox/grid/cells":function(){define(["../main","./cells/_base"],function(p){return p.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".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r){var n=k("dojox.grid._DeferredTextWidget",f,{deferred:null,_destroyOnRemove:!0,postCreate:function(){this.deferred&&this.deferred.addBoth(m.hitch(this,function(a){this.domNode&&(this.domNode.innerHTML=a)}))}}),q=function(){setTimeout(m.hitch.apply(p,arguments),0)},t=k("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:!1,alwaysEditing:!1,formatter:null,defaultValue:"...",value:null,hidden:!1,noresize:!1,draggable:!0,_valueProp:"value",_formatPending:!1,constructor:function(a){this._props=
a||{};m.mixin(this,a);void 0===this.draggable&&(this.draggable=!0)},_defaultFormat:function(b,f){var c=this.grid.formatterScope||this,l=this.formatter;l&&(c&&"string"==typeof l)&&(l=this.formatter=c[l]);c=b!=this.defaultValue&&l?l.apply(c,f):b;if("undefined"==typeof c)return this.defaultValue;c&&c.addBoth&&(c=new n({deferred:c},a.create("span",{innerHTML:this.defaultValue})));return c&&c.declaredClass&&c.startup?"\x3cdiv class\x3d'dojoxGridStubNode' linkWidget\x3d'"+c.id+"' cellIdx\x3d'"+this.index+
"'\x3e"+this.defaultValue+"\x3c/div\x3e":c},format:function(a,b){var f=this.grid.edit.info,c=this.get?this.get(a,b):this.value||this.defaultValue,c=c&&c.replace&&this.grid.escapeHTMLInData?c.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;"):c;return this.editable&&(this.alwaysEditing||f.rowIndex==a&&f.cell==this)?this.formatEditing(f.value?f.value:c,a):this._defaultFormat(c,[c,a,this])},formatEditing:function(a,b){},getNode:function(a){return this.view.getCellNode(a,this.index)},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index)},
getEditNode:function(a){return(this.getNode(a)||0).firstChild||0},canResize:function(){var a=this.unitWidth;return a&&"auto"!==a},isFlex:function(){var a=this.unitWidth;return a&&m.isString(a)&&("auto"==a||"%"==a.slice(-1))},applyEdit:function(a,b){this.getNode(b)&&this.grid.edit.applyCellEdit(a,this,b)},cancelEdit:function(a){this.grid.doCancelEdit(a)},_onEditBlur:function(a){this.grid.edit.isEditCell(a,this.index)&&this.grid.edit.apply()},registerOnBlur:function(a,b){this.commitOnBlur&&e.connect(a,
"onblur",function(a){setTimeout(m.hitch(this,"_onEditBlur",b),250)})},needFormatNode:function(a,b){this._formatPending=!0;q(this,"_formatNode",a,b)},cancelFormatNode:function(){this._formatPending=!1},_formatNode:function(a,f){this._formatPending&&(this._formatPending=!1,c("ie")||b.setSelectable(this.grid.domNode,!0),this.formatNode(this.getEditNode(f),a,f))},formatNode:function(a,b,f){c("ie")?q(this,"focus",f,a):this.focus(f,a)},dispatchEvent:function(a,b){if(a in this)return this[a](b)},getValue:function(a){return this.getEditNode(a)[this._valueProp]},
setValue:function(a,b){var f=this.getEditNode(a);f&&(f[this._valueProp]=b)},focus:function(a,b){var f=b||this.getEditNode(a);try{r.fire(f,"focus"),r.fire(f,"select")}catch(c){}},save:function(a){this.value=this.value||this.getValue(a)},restore:function(a){this.setValue(a,this.value)},_finish:function(a){b.setSelectable(this.grid.domNode,!1);this.cancelFormatNode()},apply:function(a){this.applyEdit(this.getValue(a),a);this._finish(a)},cancel:function(a){this.cancelEdit(a);this._finish(a)}});t.markupFactory=
function(a,b){var f=m.trim(h.get(a,"formatter")||"");f&&(b.formatter=m.getObject(f)||f);if(f=m.trim(h.get(a,"get")||""))b.get=m.getObject(f);f=function(b,f,c){var l=m.trim(h.get(a,b)||"");l&&(f[c||b]="false"!=l.toLowerCase())};f("sortDesc",b);f("editable",b);f("alwaysEditing",b);f("noresize",b);f("draggable",b);if(f=m.trim(h.get(a,"loadingText")||h.get(a,"defaultValue")||""))b.defaultValue=f;f=function(b,f,c){var l=m.trim(h.get(a,b)||"")||void 0;l&&(f[c||b]=l)};f("styles",b);f("headerStyles",b);f("cellStyles",
b);f("classes",b);f("headerClasses",b);f("cellClasses",b)};var s=t.Cell=k("dojox.grid.cells.Cell",t,{constructor:function(){this.keyFilter=this.keyFilter},keyFilter:null,formatEditing:function(a,b){this.needFormatNode(a,b);return'\x3cinput class\x3d"dojoxGridInput" type\x3d"text" value\x3d"'+a+'"\x3e'},formatNode:function(a,b,f){this.inherited(arguments);this.registerOnBlur(a,f)},doKey:function(a){this.keyFilter&&-1==String.fromCharCode(a.charCode).search(this.keyFilter)&&g.stop(a)},_finish:function(a){this.inherited(arguments);
var b=this.getEditNode(a);try{r.fire(b,"blur")}catch(f){}}});s.markupFactory=function(a,b){t.markupFactory(a,b);var f=m.trim(h.get(a,"keyFilter")||"");f&&(b.keyFilter=RegExp(f))};(t.RowIndex=k("dojox.grid.cells.RowIndex",s,{name:"Row",postscript:function(){this.editable=!1},get:function(a){return a+1}})).markupFactory=function(a,b){s.markupFactory(a,b)};(t.Select=k("dojox.grid.cells.Select",s,{options:null,values:null,returnIndex:-1,constructor:function(a){this.values=this.values||this.options},formatEditing:function(a,
b){this.needFormatNode(a,b);for(var f=['\x3cselect class\x3d"dojoxGridSelect"\x3e'],c=0,l,d;void 0!==(l=this.options[c])&&void 0!==(d=this.values[c]);c++)d=d.replace?d.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;"):d,l=l.replace?l.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;"):l,f.push("\x3coption",a==d?" selected":"",' value\x3d"'+d+'"',"\x3e",l,"\x3c/option\x3e");f.push("\x3c/select\x3e");return f.join("")},_defaultFormat:function(a,b){var f=this.inherited(arguments);if(!this.formatter&&this.values&&
this.options){var c=d.indexOf(this.values,f);0<=c&&(f=this.options[c])}return f},getValue:function(a){var b=this.getEditNode(a);if(b)return a=b.selectedIndex,b=b.options[a],-1<this.returnIndex?a:b.value||b.innerHTML}})).markupFactory=function(a,b){s.markupFactory(a,b);var f=m.trim(h.get(a,"options")||"");if(f){var c=f.split(",");c[0]!=f&&(b.options=c)}if(f=m.trim(h.get(a,"values")||""))c=f.split(","),c[0]!=f&&(b.values=c)};var l=t.AlwaysEdit=k("dojox.grid.cells.AlwaysEdit",s,{alwaysEditing:!0,_formatNode:function(a,
b){this.formatNode(this.getEditNode(b),a,b)},applyStaticValue:function(a){var b=this.grid.edit;b.applyCellEdit(this.getValue(a),this,a);b.start(this,a,!0)}});l.markupFactory=function(a,b){s.markupFactory(a,b)};(t.Bool=k("dojox.grid.cells.Bool",l,{_valueProp:"checked",formatEditing:function(a,b){return'\x3cinput class\x3d"dojoxGridInput" type\x3d"checkbox"'+(a?' checked\x3d"checked"':"")+' style\x3d"width: auto" /\x3e'},doclick:function(a){"INPUT"==a.target.tagName&&this.applyStaticValue(a.rowIndex)}})).markupFactory=
function(a,b){l.markupFactory(a,b)};return t})},"dojox/grid/_RowSelector":function(){define(["dojo/_base/declare","./_View"],function(p,k){return p("dojox.grid._RowSelector",k,{defaultWidth:"2em",noscroll:!0,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(k,g){g.innerHTML='\x3ctable class\x3d"dojoxGridRowbarTable" style\x3d"width:'+
(this.contentWidth||0)+'px;height:1px;" border\x3d"0" cellspacing\x3d"0" cellpadding\x3d"0" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd class\x3d"dojoxGridRowbarInner"\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e'},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight()},adaptWidth:function(){!("contentWidth"in this)&&(this.contentNode&&0<this.contentNode.offsetWidth)&&(this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth)},doStyleRowNode:function(k,
g){var e=["dojoxGridRowbar dojoxGridNonNormalizedCell"];this.grid.rows.isOver(k)&&e.push("dojoxGridRowbarOver");this.grid.selection.isSelected(k)&&e.push("dojoxGridRowbarSelected");g.className=e.join(" ")},domouseover:function(k){this.grid.onMouseOverRow(k)},domouseout:function(k){if(!this.isIntraRowEvent(k))this.grid.onMouseOutRow(k)}})})},"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".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s,l,v,C,u){f=g("dojox.grid._View",[n,q],{defaultWidth:"18em",viewWidth:"",templateString:f,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:v._HeaderBuilder,_contentBuilderClass:v._ContentBuilder,postMixInProperties:function(){this.rowNodes={}},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");s.funnelEvents(this.contentNode,this,"doContentEvent","mouseover mouseout click dblclick contextmenu mousedown".split(" "));
s.funnelEvents(this.headerNode,this,"doHeaderEvent","dblclick mouseover mouseout mousemove mousedown click contextmenu".split(" "));this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);this.grid.isLeftToRight()||(this.headerNodeContainer.style.width="")},destroy:function(){l.destroy(this.headerNode);delete this.headerNode;for(var a in this.rowNodes)this._cleanupRowWidgets(this.rowNodes[a]),l.destroy(this.rowNodes[a]);this.rowNodes={};this.source&&this.source.destroy();
this.inherited(arguments)},focus:function(){b("ie")||b("webkit")||b("opera")?this.hiddenFocusNode.focus():this.scrollboxNode.focus()},setStructure:function(a){a=this.structure=a;a.width&&!isNaN(a.width)?this.viewWidth=a.width+"em":this.viewWidth=a.width||(a.noscroll?"auto":this.viewWidth);this._onBeforeRow=a.onBeforeRow||function(){};this._onAfterRow=a.onAfterRow||function(){};if(this.noscroll=a.noscroll)this.scrollboxNode.style.overflow="hidden";this.simpleStructure=Boolean(1==a.cells.length);this.testFlexCells();
this.updateStructure()},_cleanupRowWidgets:function(a){a&&e.forEach(h("[widgetId]",a).map(k.byNode),function(a){a._destroyOnRemove?(a.destroy(),delete a):a.domNode&&a.domNode.parentNode&&a.domNode.parentNode.removeChild(a.domNode)})},onBeforeRow:function(a,b){this._onBeforeRow(a,b);0<=a&&this._cleanupRowWidgets(this.getRowNode(a))},onAfterRow:function(a,b,f){this._onAfterRow(a,b,f);var c=this.grid;e.forEach(h(".dojoxGridStubNode",f),function(a){if(a&&a.parentNode){var b=a.getAttribute("linkWidget"),
f=window.parseInt(l.attr(a,"cellIdx"),10);c.getCell(f);(b=k.byId(b))?(a.parentNode.replaceChild(b.domNode,a),b._started||b.startup(),p.destroy(a)):a.innerHTML=""}},this)},testFlexCells:function(){this.flexCells=!1;for(var a=0,b;b=this.structure.cells[a];a++)for(var f=0,c;c=b[f];f++)c.view=this,this.flexCells=this.flexCells||c.isFlex();return this.flexCells},updateStructure:function(){this.header.update();this.content.update()},getScrollbarWidth:function(){var a=this.hasVScrollbar(),b=l.style(this.scrollboxNode,
"overflow");this.noscroll||!b||"hidden"==b?a=!1:"scroll"==b&&(a=!0);return a?t.getScrollbar().w:0},getColumnsWidth:function(){var a=this.headerContentNode;return a&&a.firstChild?a.firstChild.offsetWidth||l.style(a.firstChild,"width"):0},setColumnsWidth:function(a){this.headerContentNode.firstChild.style.width=a+"px";this.viewWidth&&(this.viewWidth=a+"px")},getWidth:function(){return this.viewWidth||this.getColumnsWidth()+this.getScrollbarWidth()+"px"},getContentWidth:function(){return Math.max(0,
l._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px"},render:function(){this.scrollboxNode.style.height="";this.renderHeader();0<=this._togglingColumn&&(this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn),this._togglingColumn=-1);var f=this.grid.layout.cells,e=d.hitch(this,function(a,b){!this.grid.isLeftToRight()&&(b=!b);for(var c=b?-1:1,l=this.header.getCellNodeIndex(a)+c,d=f[l];d&&d.getHeaderNode()&&"none"==d.getHeaderNode().style.display;)l+=c,d=f[l];return d?d.getHeaderNode():
null});if(this.grid.columnReordering&&this.simpleStructure){this.source&&this.source.destroy();this.bottomMarker&&l.destroy(this.bottomMarker);this.bottomMarker=l.byId("dojoxGrid_bottomMarker");this.topMarker&&l.destroy(this.topMarker);this.topMarker=l.byId("dojoxGrid_topMarker");this.bottomMarker||(this.bottomMarker=l.create("div",{id:"dojoxGrid_bottomMarker","class":"dojoxGridColPlaceBottom"},a.body()),this._hide(this.bottomMarker),this.topMarker=l.create("div",{id:"dojoxGrid_topMarker","class":"dojoxGridColPlaceTop"},
a.body()),this._hide(this.topMarker));this.arrowDim=l.contentBox(this.bottomMarker);var h=l.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new r(this.headerContentNode.firstChild.rows[0],{horizontal:!0,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:!1,onMouseDown:d.hitch(this,function(a){this.header.decorateEvent(a);if((this.header.overRightResizeArea(a)||this.header.overLeftResizeArea(a))&&this.header.canResize(a)&&!this.header.moveable)this.header.beginColumnResize(a);
else{if(this.grid.headerMenu)this.grid.headerMenu.onCancel(!0);a.button===(9>b("ie")?1:0)&&r.prototype.onMouseDown.call(this.source,a)}}),onMouseOver:d.hitch(this,function(a){var b=this.source;b._getChildByEvent(a)&&r.prototype.onMouseOver.apply(b,arguments)}),_markTargetAnchor:d.hitch(this,function(a){var b=this.source;if(!(b.current==b.targetAnchor&&b.before==a)){b.targetAnchor&&e(b.targetAnchor,b.before)&&b._removeItemClass(e(b.targetAnchor,b.before),b.before?"After":"Before");r.prototype._markTargetAnchor.call(b,
a);var f=a?b.targetAnchor:e(b.targetAnchor,b.before);a=0;f||(f=b.targetAnchor,a=l.contentBox(f).w+this.arrowDim.w/2+2);f=l.position(f,!0);a=Math.floor(f.x-this.arrowDim.w/2+a);l.style(this.bottomMarker,"visibility","visible");l.style(this.topMarker,"visibility","visible");l.style(this.bottomMarker,{left:a+"px",top:h+f.y+"px"});l.style(this.topMarker,{left:a+"px",top:f.y-this.arrowDim.h+"px"});b.targetAnchor&&e(b.targetAnchor,b.before)&&b._addItemClass(e(b.targetAnchor,b.before),b.before?"After":"Before")}}),
_unmarkTargetAnchor:d.hitch(this,function(){var a=this.source;a.targetAnchor&&(a.targetAnchor&&e(a.targetAnchor,a.before)&&a._removeItemClass(e(a.targetAnchor,a.before),a.before?"After":"Before"),this._hide(this.bottomMarker),this._hide(this.topMarker),r.prototype._unmarkTargetAnchor.call(a))}),destroy:d.hitch(this,function(){c.disconnect(this._source_conn);c.unsubscribe(this._source_sub);r.prototype.destroy.call(this.source);this.bottomMarker&&(l.destroy(this.bottomMarker),delete this.bottomMarker);
this.topMarker&&(l.destroy(this.topMarker),delete this.topMarker)}),onDndCancel:d.hitch(this,function(){r.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker)})});this._source_conn=c.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=c.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup()}},_hide:function(a){l.style(a,{top:"-10000px",visibility:"hidden"})},_onDndDropBefore:function(a,b,f){u.manager().target===this.source&&
(this.source._targetNode=this.source.targetAnchor,this.source._beforeTarget=this.source.before,b=this.grid.views.views,a=b[a.viewIndex],b=b[this.index],b!=a&&(a.convertColPctToFixed(),b.convertColPctToFixed()))},_onDndDrop:function(a,b,f){if(u.manager().target!==this.source)u.manager().source===this.source&&(this._removingColumn=!0);else{this._hide(this.bottomMarker);this._hide(this.topMarker);f=l.marginBox(b[0]).w;if(a.viewIndex!==this.index){var c=this.grid.views.views,d=c[a.viewIndex],c=c[this.index];
d.viewWidth&&"auto"!=d.viewWidth&&d.setColumnsWidth(d.getColumnsWidth()-f);c.viewWidth&&"auto"!=c.viewWidth&&c.setColumnsWidth(c.getColumnsWidth())}f=this.source._targetNode;d=this.source._beforeTarget;!this.grid.isLeftToRight()&&(d=!d);var c=this.grid.layout,e=this.index;delete this.source._targetNode;delete this.source._beforeTarget;c.moveColumn(a.viewIndex,e,b[0]?l.attr(b[0],"idx"):null,f?l.attr(f,"idx"):null,d)}},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);
this.flexCells&&(this.contentWidth=this.getContentWidth(),this.headerContentNode.firstChild.style.width=this.contentWidth);s.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode])},_getHeaderContent:function(a){var b=a.name||a.grid.getCellName(a);/^\s+$/.test(b)&&(b="\x26nbsp;");var f=['\x3cdiv class\x3d"dojoxGridSortNode'];a.index!=a.grid.getSortIndex()?f.push('"\x3e'):f=f.concat([" ",0<a.grid.sortInfo?"dojoxGridSortUp":"dojoxGridSortDown",'"\x3e\x3cdiv class\x3d"dojoxGridArrowButtonChar"\x3e',
0<a.grid.sortInfo?"\x26#9650;":"\x26#9660;",'\x3c/div\x3e\x3cdiv class\x3d"dojoxGridArrowButtonNode" role\x3d"presentation"\x3e\x3c/div\x3e','\x3cdiv class\x3d"dojoxGridColCaption"\x3e']);f=f.concat([b,"\x3c/div\x3e\x3c/div\x3e"]);return f.join("")},resize:function(){this.adaptHeight();this.adaptWidth()},hasHScrollbar:function(a){var b=this._hasHScroll||!1;if(void 0==this._hasHScroll||a)this.noscroll?this._hasHScroll=!1:(a=l.style(this.scrollboxNode,"overflow"),this._hasHScroll="hidden"==a?!1:"scroll"==
a?!0:this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);b!==this._hasHScroll&&this.grid.update();return this._hasHScroll},hasVScrollbar:function(a){var b=this._hasVScroll||!1;if(void 0==this._hasVScroll||a)this.noscroll?this._hasVScroll=!1:(a=l.style(this.scrollboxNode,"overflow"),this._hasVScroll="hidden"==a?!1:"scroll"==a?!0:this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);b!==this._hasVScroll&&this.grid.update();return this._hasVScroll},convertColPctToFixed:function(){var a=
!1;this.grid.initialWidth="";var b=h("th",this.headerContentNode),f=e.map(b,function(b,f){var c=b.style.width;l.attr(b,"vIdx",f);if(c&&"%"==c.slice(-1))a=!0;else if(c&&"px"==c.slice(-2))return window.parseInt(c,10);return l.contentBox(b).w});return a?(e.forEach(this.grid.layout.cells,function(a,b){if(a.view==this){var c=a.view.getHeaderCellNode(a.index);if(c&&l.hasAttr(c,"vIdx")){var d=window.parseInt(l.attr(c,"vIdx"));this.setColWidth(b,f[d]);l.removeAttr(c,"vIdx")}}},this),!0):!1},adaptHeight:function(a){if(!this.grid._autoHeight){var b=
this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10)||this.domNode.clientHeight;if(!a&&(a=this.noscroll))a:{for(var f in this.grid.views.views)if(a=this.grid.views.views[f],a!==this&&a.hasHScrollbar()){a=!0;break a}a=!1}a&&(b-=t.getScrollbar().h);s.setStyleHeightPx(this.scrollboxNode,b)}this.hasVScrollbar(!0)},adaptWidth:function(){this.flexCells&&(this.contentWidth=this.getContentWidth(),this.headerContentNode.firstChild.style.width=this.contentWidth);var a=this.scrollboxNode.offsetWidth-
this.getScrollbarWidth();this._removingColumn?(a=Math.min(a,this.getColumnsWidth())+"px",this._removingColumn=!1):a=Math.max(a,this.getColumnsWidth())+"px";this.contentNode.style.width=a;this.hasHScrollbar(!0)},setSize:function(a,b){var f=this.domNode.style,c=this.headerNode.style;a&&(f.width=a,c.width=a);f.height=0<=b?b+"px":""},renderRow:function(a){var b=this.createRowNode(a);this.buildRow(a,b);return b},createRowNode:function(a){var b=document.createElement("div");b.className=this.classTag+"Row";
this instanceof m.grid._RowSelector?l.attr(b,"role","presentation"):(l.attr(b,"role","row"),"none"!=this.grid.selectionMode&&b.setAttribute("aria-selected","false"));b[s.gridViewTag]=this.id;b[s.rowIndexTag]=a;return this.rowNodes[a]=b},buildRow:function(a,b){this.buildRowContent(a,b);this.styleRow(a,b)},buildRowContent:function(a,b){b.innerHTML=this.content.generateHtml(a,a);this.flexCells&&this.contentWidth&&(b.firstChild.style.width=this.contentWidth);s.fire(this,"onAfterRow",[a,this.structure.cells,
b])},rowRemoved:function(a){0<=a&&this._cleanupRowWidgets(this.getRowNode(a));this.grid.edit.save(this,a);delete this.rowNodes[a]},getRowNode:function(a){return this.rowNodes[a]},getCellNode:function(a,b){var f=this.getRowNode(a);if(f)return this.content.getCellNode(f,b)},getHeaderCellNode:function(a){if(this.headerContentNode)return this.header.getCellNode(this.headerContentNode,a)},styleRow:function(a,b){b._style=void 0==b.style.cssText?b.getAttribute("style"):b.style.cssText;this.styleRowNode(a,
b)},styleRowNode:function(a,b){b&&this.doStyleRowNode(a,b)},doStyleRowNode:function(a,b){this.grid.styleRowNode(a,b)},updateRow:function(a){var b=this.getRowNode(a);b&&(b.style.height="",this.buildRow(a,b));return b},updateRowStyles:function(a){this.styleRowNode(a,this.getRowNode(a))},lastTop:0,firstScroll:0,_nativeScroll:!1,doscroll:function(a){if(13<=b("ff")||b("chrome"))this._nativeScroll=!0;a=this.grid.isLeftToRight();if(2>this.firstScroll){if(!a&&1==this.firstScroll||a&&0===this.firstScroll){var f=
l.marginBox(this.headerNodeContainer);b("ie")?this.headerNodeContainer.style.width=f.w+this.getScrollbarWidth()+"px":b("mozilla")&&(this.headerNodeContainer.style.width=f.w-this.getScrollbarWidth()+"px",this.scrollboxNode.scrollLeft=a?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth)}this.firstScroll++}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;a=this.scrollboxNode.scrollTop;a!==this.lastTop&&this.grid.scrollTo(a);
this._nativeScroll=!1},setScrollTop:function(a){this.lastTop=a;this._nativeScroll||(this.scrollboxNode.scrollTop=a);return this.scrollboxNode.scrollTop},doContentEvent:function(a){if(this.content.decorateEvent(a))this.grid.onContentEvent(a)},doHeaderEvent:function(a){if(this.header.decorateEvent(a))this.grid.onHeaderEvent(a)},dispatchContentEvent:function(a){return this.content.dispatchEvent(a)},dispatchHeaderEvent:function(a){return this.header.dispatchEvent(a)},setColWidth:function(a,b){this.grid.setCellWidth(a,
b+"px")},update:function(){if(this.domNode){this.content.update();this.grid.update();var a=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=a;this.headerNode.scrollLeft=a}}});var x=g("dojox.grid._GridAvatar",C,{construct:function(){var b=a.doc,f=b.createElement("table");f.cellPadding=f.cellSpacing="0";f.className="dojoxGridDndAvatar";f.style.position="absolute";f.style.zIndex=1999;f.style.margin="0px";var c=b.createElement("tbody"),d=b.createElement("tr"),e=b.createElement("td"),h=b.createElement("td");
d.className="dojoxGridDndAvatarItem";h.className="dojoxGridDndAvatarItemImage";h.style.width="16px";var q=this.manager.source;if(q.creator)q=q._normalizedCreator(q.getItem(this.manager.nodes[0].id).data,"avatar").node;else{var q=this.manager.nodes[0].cloneNode(!0),y,n;"tr"==q.tagName.toLowerCase()?(y=b.createElement("table"),n=b.createElement("tbody"),n.appendChild(q),y.appendChild(n),q=y):"th"==q.tagName.toLowerCase()&&(y=b.createElement("table"),n=b.createElement("tbody"),b=b.createElement("tr"),
y.cellPadding=y.cellSpacing="0",b.appendChild(q),n.appendChild(b),y.appendChild(n),q=y)}q.id="";e.appendChild(q);d.appendChild(h);d.appendChild(e);l.style(d,"opacity",0.9);c.appendChild(d);f.appendChild(c);this.node=f;f=u.manager();this.oldOffsetY=f.OFFSET_Y;f.OFFSET_Y=1},destroy:function(){u.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments)}}),A=u.manager().makeAvatar;u.manager().makeAvatar=function(){return void 0!==this.source.viewIndex&&!l.hasClass(a.body(),"dijit_a11y")?new x(this):
A.call(u.manager())};return f})},"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".split(" "),function(p,k,m,g,e,d,c){var b=k.getObject("dojox.html.metrics",!0),h=k.getObject("dojox");b.getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},b;m("ie")&&(b=d.doc.documentElement.style.fontSize||
"",b||(d.doc.documentElement.style.fontSize="100%"));var f=d.doc.createElement("div"),c=f.style;c.position="absolute";c.left="-100px";c.top="0";c.width="30px";c.height="1000em";c.borderWidth="0";c.margin="0";c.padding="0";c.outline="0";c.lineHeight="1";c.overflow="hidden";d.body().appendChild(f);for(var e in a)c.fontSize=e,a[e]=16*Math.round(12*f.offsetHeight/16)/12/1E3;m("ie")&&(d.doc.documentElement.style.fontSize=b);d.body().removeChild(f);return a};var a=null;b.getCachedFontMeasurements=function(f){if(f||
!a)a=b.getFontMeasurements();return a};var f=null,r={};b.getTextBox=function(a,b,l){var e,h;if(f)e=f;else{e=f=d.doc.createElement("div");var q=d.doc.createElement("div");q.appendChild(e);h=q.style;h.overflow="scroll";h.position="absolute";h.left="0px";h.top="-10000px";h.width="1px";h.height="1px";h.visibility="hidden";h.borderWidth="0";h.margin="0";h.padding="0";h.outline="0";d.body().appendChild(q)}e.className="";h=e.style;h.borderWidth="0";h.margin="0";h.padding="0";h.outline="0";if(1<arguments.length&&
b)for(var n in b)n in r||(h[n]=b[n]);2<arguments.length&&l&&(e.className=l);e.innerHTML=a;h=c.position(e);h.w=e.parentNode.scrollWidth;return h};var n=16,q=16;b.getScrollbar=function(){return{w:n,h:q}};b._fontResizeNode=null;b.initOnFontResize=function(a){var f=b._fontResizeNode=d.doc.createElement("iframe");a=f.style;a.position="absolute";a.width="5em";a.height="10em";a.top="-10000px";a.display="none";m("ie")?f.onreadystatechange=function(){"complete"==f.contentWindow.document.readyState&&(f.onresize=
f.contentWindow.parent[h._scopeName].html.metrics._fontresize)}:f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[h._scopeName].html.metrics._fontresize};f.setAttribute("src","javascript:'\x3chtml\x3e\x3chead\x3e\x3cscript\x3eif(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}\x3c/script\x3e\x3c/head\x3e\x3cbody\x3e\x3c/body\x3e\x3c/html\x3e'");d.body().appendChild(f);b.initOnFontResize=function(){}};b.onFontResize=function(){};b._fontresize=function(){b.onFontResize()};
e.addOnUnload(function(){var a=b._fontResizeNode;a&&(m("ie")&&a.onresize?a.onresize=null:a.contentWindow&&a.contentWindow.onresize&&(a.contentWindow.onresize=null),b._fontResizeNode=null)});g(function(){try{var a=d.doc.createElement("div");a.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";d.body().appendChild(a);n=a.offsetWidth-a.clientWidth;q=a.offsetHeight-a.clientHeight;d.body().removeChild(a);delete a}catch(f){}"fontSizeWatch"in p.config&&
p.config.fontSizeWatch&&b.initOnFontResize()});return b})},"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 dojo/dom-geometry".split(" "),function(p,k,m,g,e,d,c,b,h,a,f,r){var n=p.grid,q=function(a){for(;a&&"TABLE"!=a.tagName;a=a.parentNode);return a},t=function(a){var b=a.toUpperCase();return function(a){return a.tagName!=b}},s=a.rowIndexTag,
l=a.gridViewTag,v=n._Builder=m.extend(function(a){a&&(this.view=a,this.grid=a.grid)},{view:null,_table:'\x3ctable class\x3d"dojoxGridRowTable" border\x3d"0" cellspacing\x3d"0" cellpadding\x3d"0" role\x3d"presentation"',getTableArray:function(){var a=[this._table];this.view.viewWidth&&a.push([' style\x3d"width:',this.view.viewWidth,';"'].join(""));a.push("\x3e");return a},generateCellMarkup:function(a,b,f,c){var l=[],d;c?(d=a.index!=a.grid.getSortIndex()?"":0<a.grid.sortInfo?'aria-sort\x3d"ascending"':
'aria-sort\x3d"descending"',a.id||(a.id=this.grid.id+"Hdr"+a.index),d=['\x3cth tabIndex\x3d"-1" aria-readonly\x3d"true" role\x3d"columnheader"',d,' id\x3d"',a.id,'"']):d=['\x3ctd tabIndex\x3d"-1" role\x3d"gridcell"',this.grid.editable&&!a.editable?'aria-readonly\x3d"true"':""];a.colSpan&&d.push(' colspan\x3d"',a.colSpan,'"');a.rowSpan&&d.push(' rowspan\x3d"',a.rowSpan,'"');d.push(' class\x3d"dojoxGridCell ');a.classes&&d.push(a.classes," ");f&&d.push(f," ");l.push(d.join(""));l.push("");d=['" idx\x3d"',
a.index,'" style\x3d"'];b&&";"!=b[b.length-1]&&(b+=";");d.push(a.styles,b||"",a.hidden?"display:none;":"");a.unitWidth&&d.push("width:",a.unitWidth,";");l.push(d.join(""));l.push("");d=['"'];a.attrs&&d.push(" ",a.attrs);d.push("\x3e");l.push(d.join(""));l.push("");l.push(c?"\x3c/th\x3e":"\x3c/td\x3e");return l},isCellNode:function(a){return Boolean(a&&a!=g.doc&&f.attr(a,"idx"))},getCellNodeIndex:function(a){return a?Number(f.attr(a,"idx")):-1},getCellNode:function(a,b){for(var f=0,c;(c=a.firstChild&&
((a.firstChild.rows||0)[f]||a.firstChild.childNodes[f]))&&c.cells;f++)for(var d=0,l;l=c.cells[d];d++)if(this.getCellNodeIndex(l)==b)return l;return null},findCellTarget:function(a,b){for(var f=a;f&&(!this.isCellNode(f)||f.offsetParent&&l in f.offsetParent.parentNode&&f.offsetParent.parentNode[l]!=this.view.id)&&f!=b;)f=f.parentNode;return f!=b?f:null},baseDecorateEvent:function(a){a.dispatch="do"+a.type;a.grid=this.grid;a.sourceView=this.view;a.cellNode=this.findCellTarget(a.target,a.rowNode);a.cellIndex=
this.getCellNodeIndex(a.cellNode);a.cell=0<=a.cellIndex?this.grid.getCell(a.cellIndex):null},findTarget:function(a,b){for(var f=a;f&&f!=this.domNode&&(!(b in f)||l in f&&f[l]!=this.view.id);)f=f.parentNode;return f!=this.domNode?f:null},findRowTarget:function(a){return this.findTarget(a,s)},isIntraNodeEvent:function(a){try{return a.cellNode&&a.relatedTarget&&f.isDescendant(a.relatedTarget,a.cellNode)}catch(b){return!1}},isIntraRowEvent:function(a){try{var b=a.relatedTarget&&this.findRowTarget(a.relatedTarget);
return!b&&-1==a.rowIndex||b&&a.rowIndex==b.gridRowIndex}catch(f){return!1}},dispatchEvent:function(a){return a.dispatch in this?this[a.dispatch](a):!1},domouseover:function(a){a.cellNode&&a.cellNode!=this.lastOverCellNode&&(this.lastOverCellNode=a.cellNode,this.grid.onMouseOver(a));this.grid.onMouseOverRow(a)},domouseout:function(a){if(a.cellNode&&(a.cellNode==this.lastOverCellNode&&!this.isIntraNodeEvent(a,this.lastOverCellNode))&&(this.lastOverCellNode=null,this.grid.onMouseOut(a),!this.isIntraRowEvent(a)))this.grid.onMouseOutRow(a)},
domousedown:function(a){if(a.cellNode)this.grid.onMouseDown(a);this.grid.onMouseDownRow(a)},_getTextDirStyle:function(a,b,f){return""}});p=n._ContentBuilder=m.extend(function(a){v.call(this,a)},v.prototype,{update:function(){this.prepareHtml()},prepareHtml:function(){for(var a=this.grid.get,b=this.view.structure.cells,f=0,c;c=b[f];f++)for(var d=0,l;l=c[d];d++)l.get=l.get||void 0==l.value&&a,l.markup=this.generateCellMarkup(l,l.cellStyles,l.cellClasses,!1),!this.grid.editable&&l.editable&&(this.grid.editable=
!0)},generateHtml:function(b,f){var c=this.getTableArray(),d,l=this.view.structure.cells,e=this.grid.getItem(f);a.fire(this.view,"onBeforeRow",[f,l]);for(var h=0,q;q=l[h];h++)if(!q.hidden&&!q.header){c.push(!q.invisible?"\x3ctr\x3e":'\x3ctr class\x3d"dojoxGridInvisible"\x3e');for(var n=0,g,y,v;g=q[n];n++)y=g.markup,d=g.customClasses=[],v=g.customStyles=[],y[5]=g.format(f,e),y[1]=d.join(" "),y[3]=v.join(";"),(d=g.textDir||this.grid.textDir)&&(y[3]+=this._getTextDirStyle(d,g,f)),c.push.apply(c,y);c.push("\x3c/tr\x3e")}c.push("\x3c/table\x3e");
return c.join("")},decorateEvent:function(a){a.rowNode=this.findRowTarget(a.target);if(!a.rowNode)return!1;a.rowIndex=a.rowNode[s];this.baseDecorateEvent(a);a.cell=this.grid.getCell(a.cellIndex);return!0}});var C=n._HeaderBuilder=m.extend(function(a){this.moveable=null;v.call(this,a)},v.prototype,{_skipBogusClicks:!1,overResizeWidth:4,minColWidth:1,update:function(){this.tableMap?this.tableMap.mapRows(this.view.structure.cells):this.tableMap=new n._TableMap(this.view.structure.cells)},generateHtml:function(b,
f){var c,d=this.getTableArray(),l=this.view.structure.cells;a.fire(this.view,"onBeforeRow",[-1,l]);for(var e=0,h;h=l[e];e++)if(!h.hidden){d.push(!h.invisible?"\x3ctr\x3e":'\x3ctr class\x3d"dojoxGridInvisible"\x3e');for(var q=0,n,g;n=h[q];q++)n.customClasses=[],n.customStyles=[],this.view.simpleStructure&&(n.draggable&&(n.headerClasses?-1==n.headerClasses.indexOf("dojoDndItem")&&(n.headerClasses+=" dojoDndItem"):n.headerClasses="dojoDndItem"),n.attrs?-1==n.attrs.indexOf("dndType\x3d'gridColumn_")&&
(n.attrs+=" dndType\x3d'gridColumn_"+this.grid.id+"'"):n.attrs="dndType\x3d'gridColumn_"+this.grid.id+"'"),g=this.generateCellMarkup(n,n.headerStyles,n.headerClasses,!0),g[5]=void 0!=f?f:b(n),g[3]=n.customStyles.join(";"),(c=n.textDir||this.grid.textDir)&&(g[3]+=this._getTextDirStyle(c,n,f)),g[1]=n.customClasses.join(" "),d.push(g.join(""));d.push("\x3c/tr\x3e")}d.push("\x3c/table\x3e");return d.join("")},getCellX:function(a){var b;b=t("th");for(var f=a.target;f&&b(f);f=f.parentNode);(b=f)?(b=r.position(b),
a=a.clientX-b.x):a=a.layerX;return a},decorateEvent:function(a){this.baseDecorateEvent(a);a.rowIndex=-1;a.cellX=this.getCellX(a);return!0},prepareResize:function(a,b){do{var f=a.cellIndex;a.cellNode=f?a.cellNode.parentNode.cells[f+b]:null;a.cellIndex=a.cellNode?this.getCellNodeIndex(a.cellNode):-1}while(a.cellNode&&"none"==a.cellNode.style.display);return Boolean(a.cellNode)},canResize:function(a){if(!a.cellNode||1<a.cellNode.colSpan)return!1;a=this.grid.getCell(a.cellIndex);return!a.noresize&&a.canResize()},
overLeftResizeArea:function(a){if(f.hasClass(g.body(),"dojoDndMove"))return!1;if(d("ie")){var b=a.target;if(f.hasClass(b,"dojoxGridArrowButtonNode")||f.hasClass(b,"dojoxGridArrowButtonChar")||f.hasClass(b,"dojoxGridColCaption"))return!1}return this.grid.isLeftToRight()?0<a.cellIndex&&0<a.cellX&&a.cellX<this.overResizeWidth&&this.prepareResize(a,-1):a.cellNode&&0<a.cellX&&a.cellX<this.overResizeWidth},overRightResizeArea:function(a){if(f.hasClass(g.body(),"dojoDndMove"))return!1;if(d("ie")){var b=
a.target;if(f.hasClass(b,"dojoxGridArrowButtonNode")||f.hasClass(b,"dojoxGridArrowButtonChar")||f.hasClass(b,"dojoxGridColCaption"))return!1}return this.grid.isLeftToRight()?a.cellNode&&a.cellX>=a.cellNode.offsetWidth-this.overResizeWidth:0<a.cellIndex&&a.cellX>=a.cellNode.offsetWidth-this.overResizeWidth&&this.prepareResize(a,-1)},domousemove:function(a){if(!this.moveable){var b=this.overRightResizeArea(a)?"dojoxGridColResize":this.overLeftResizeArea(a)?"dojoxGridColResize":"";b&&!this.canResize(a)&&
(b="dojoxGridColNoResize");f.toggleClass(a.sourceView.headerNode,"dojoxGridColNoResize","dojoxGridColNoResize"==b);f.toggleClass(a.sourceView.headerNode,"dojoxGridColResize","dojoxGridColResize"==b);b&&e.stop(a)}},domousedown:function(a){this.moveable||((this.overRightResizeArea(a)||this.overLeftResizeArea(a))&&this.canResize(a)?this.beginColumnResize(a):(this.grid.onMouseDown(a),this.grid.onMouseOverRow(a)))},doclick:function(a){return this._skipBogusClicks?(e.stop(a),!0):!1},colResizeSetup:function(a,
b){var c=f.contentBox(a.sourceView.headerNode);if(b){this.lineDiv=document.createElement("div");var l=f.position(a.sourceView.headerNode,!0),e=f.contentBox(a.sourceView.domNode),q=a.pageX;!this.grid.isLeftToRight()&&8>d("ie")&&(q-=h.getScrollbar().w);f.style(this.lineDiv,{top:l.y+"px",left:q+"px",height:e.h+c.h+"px"});f.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=q;g.body().appendChild(this.lineDiv)}for(var l=[],e=this.tableMap.findOverlappingNodes(a.cellNode),q=0,n;n=e[q];q++)l.push({node:n,
index:this.getCellNodeIndex(n),width:n.offsetWidth});e=a.sourceView;n=this.grid.isLeftToRight()?1:-1;for(var v=a.grid.views.views,q=[],r=e.idx+n,s;s=v[r];r+=n)q.push({node:s.headerNode,left:window.parseInt(s.headerNode.style.left)});n=e.headerContentNode.firstChild;return{scrollLeft:a.sourceView.headerNode.scrollLeft,view:e,node:a.cellNode,index:a.cellIndex,w:f.contentBox(a.cellNode).w,vw:c.w,table:n,tw:f.contentBox(n).w,spanners:l,followers:q}},beginColumnResize:function(a){this.moverDiv=document.createElement("div");
f.style(this.moverDiv,{position:"absolute",left:0});g.body().appendChild(this.moverDiv);f.addClass(this.grid.domNode,"dojoxGridColumnResizing");var d=this.moveable=new b(this.moverDiv),l=this.colResizeSetup(a,!0);d.onMove=m.hitch(this,"doResizeColumn",l);c.connect(d,"onMoveStop",m.hitch(this,function(){this.endResizeColumn(l);l.node.releaseCapture&&l.node.releaseCapture();this.moveable.destroy();delete this.moveable;this.moveable=null;f.removeClass(this.grid.domNode,"dojoxGridColumnResizing")}));
a.cellNode.setCapture&&a.cellNode.setCapture();d.onMouseDown(a)},doResizeColumn:function(a,b,c){var d=c.l,d={deltaX:d,w:a.w+(this.grid.isLeftToRight()?d:-d),vw:a.vw+d,tw:a.tw+d};this.dragRecord={inDrag:a,mover:b,leftTop:c};d.w>=this.minColWidth&&(b?f.style(this.lineDiv,"left",this.lineDiv._origLeft+d.deltaX+"px"):this.doResizeNow(a,d))},endResizeColumn:function(a){if(this.dragRecord){var b=this.dragRecord.leftTop,b=this.grid.isLeftToRight()?b.l:-b.l,b=b+(Math.max(a.w+b,this.minColWidth)-(a.w+b));
d("webkit")&&a.spanners.length&&(b+=f._getPadBorderExtents(a.spanners[0].node).w);this.doResizeNow(a,{deltaX:b,w:a.w+b,vw:a.vw+b,tw:a.tw+b});delete this.dragRecord}f.destroy(this.lineDiv);f.destroy(this.moverDiv);f.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=!0;a.view.update();this._skipBogusClicks=!1;this.grid.onResizeColumn(a.index)},doResizeNow:function(a,b){a.view.convertColPctToFixed();if(a.view.flexCells&&!a.view.testFlexCells()){var f=q(a.node);f&&(f.style.width="")}for(var c,
l,f=0;c=a.spanners[f];f++)l=c.width+b.deltaX,0<l&&(c.node.style.width=l+"px",a.view.setColWidth(c.index,l));if(this.grid.isLeftToRight()||!d("ie"))for(f=0;c=a.followers[f];f++)l=c.left+b.deltaX,c.node.style.left=l+"px";a.node.style.width=b.w+"px";a.view.setColWidth(a.index,b.w);a.view.headerNode.style.width=b.vw+"px";a.view.setColumnsWidth(b.tw);this.grid.isLeftToRight()||(a.view.headerNode.scrollLeft=a.scrollLeft+b.deltaX)}});n._TableMap=m.extend(function(a){this.mapRows(a)},{map:null,mapRows:function(a){if(a.length){this.map=
[];var b;for(b=0;a[b];b++)this.map[b]=[];for(var f=0;b=a[f];f++)for(var c=0,d=0,l,e;l=b[c];c++){for(;this.map[f][d];)d++;this.map[f][d]={c:c,r:f};e=l.rowSpan||1;l=l.colSpan||1;for(var h=0;h<e;h++)for(var q=0;q<l;q++)this.map[f+h][d+q]=this.map[f][d];d+=l}}},dumpMap:function(){for(var a=0,b;b=this.map[a];a++)for(var f=0;b[f];f++);},getMapCoords:function(a,b){for(var f=0,c;c=this.map[f];f++)for(var d=0,l;l=c[d];d++)if(l.c==b&&l.r==a)return{j:f,i:d};return{j:-1,i:-1}},getNode:function(a,b,f){return(a=
a&&a.rows[b])&&a.cells[f]},_findOverlappingNodes:function(a,b,f){var c=[];b=this.getMapCoords(b,f);f=0;for(var d;d=this.map[f];f++)f!=b.j&&(d=(d=d[b.i])?this.getNode(a,d.r,d.c):null)&&c.push(d);return c},findOverlappingNodes:function(a){return this._findOverlappingNodes(q(a),0<=a.parentNode.rowIndex?a.parentNode.rowIndex:k.indexOf(a.parentNode.parentNode.childNodes,a.parentNode),0<=a.cellIndex?a.cellIndex:k.indexOf(a.parentNode.cells,a))}});return{_Builder:v,_HeaderBuilder:C,_ContentBuilder:p}})},
"dojox/grid/_ViewManager":function(){define(["dojo/_base/declare","dojo/_base/sniff","dojo/dom-class"],function(p,k,m){return p("dojox.grid._ViewManager",null,{constructor:function(g){this.grid=g},defaultWidth:200,views:[],resize:function(){this.onEach("resize")},render:function(){this.onEach("render")},addView:function(g){g.idx=this.views.length;this.views.push(g)},destroyViews:function(){for(var g=0,e;e=this.views[g];g++)e.destroy();this.views=[]},getContentNodes:function(){for(var g=[],e=0,d;d=
this.views[e];e++)g.push(d.contentNode);return g},forEach:function(g){for(var e=0,d;d=this.views[e];e++)g(d,e)},onEach:function(g,e){e=e||[];for(var d=0,c;c=this.views[d];d++)g in c&&c[g].apply(c,e)},normalizeHeaderNodeHeight:function(){for(var g=[],e=0,d;d=this.views[e];e++)d.headerContentNode.firstChild&&g.push(d.headerContentNode);this.normalizeRowNodeHeights(g)},normalizeRowNodeHeights:function(g){var e=0,d=[];if(this.grid.rowHeight)e=this.grid.rowHeight;else{if(1>=g.length)return;for(var c=0,
b;b=g[c];c++)m.contains(b,"dojoxGridNonNormalizedCell")||(d[c]=b.firstChild.offsetHeight,e=Math.max(e,d[c]));e=0<=e?e:0;(k("mozilla")||8<k("ie"))&&e&&e++}for(c=0;b=g[c];c++)d[c]!=e&&(b.firstChild.style.height=e+"px")},resetHeaderNodeHeight:function(){for(var g=0,e;e=this.views[g];g++)if(e=e.headerContentNode.firstChild)e.style.height=""},renormalizeRow:function(g){for(var e=[],d=0,c,b;(c=this.views[d])&&(b=c.getRowNode(g));d++)b.firstChild.style.height="",e.push(b);this.normalizeRowNodeHeights(e)},
getViewWidth:function(g){return this.views[g].getWidth()||this.defaultWidth},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(e){e.headerContentNode.style.height=""});var g=0;this.forEach(function(e){g=Math.max(e.headerNode.offsetHeight,g)});return g},measureContent:function(){var g=0;this.forEach(function(e){g=Math.max(e.domNode.offsetHeight,g)});return g},findClient:function(g){g=this.grid.elasticView||-1;if(0>g)for(var e=1,d;d=this.views[e];e++)if(d.viewWidth){for(e=
1;d=this.views[e];e++)if(!d.viewWidth){g=e;break}break}0>g&&(g=Math.floor(this.views.length/2));return g},arrange:function(g,e){var d,c,b,h=this.views.length,a=this,f=0>=e?h:this.findClient(),r=function(b,f){var c=b.domNode.style,d=b.headerNode.style;a.grid.isLeftToRight()?(c.left=f+"px",d.left=f+"px"):(c.right=f+"px",4>k("ff")?d.right=f+b.getScrollbarWidth()+"px":d.right=f+"px",!k("webkit")&&"auto"!=d.width&&(d.width=parseInt(d.width,10)-b.getScrollbarWidth()+"px"));c.top="0px";d.top=0};for(d=0;(c=
this.views[d])&&d<f;d++)b=this.getViewWidth(d),c.setSize(b,0),r(c,g),b=c.headerContentNode&&c.headerContentNode.firstChild?c.getColumnsWidth()+c.getScrollbarWidth():c.domNode.offsetWidth,g+=b;d++;for(var n=e,q=h-1;(c=this.views[q])&&d<=q;q--)b=this.getViewWidth(q),c.setSize(b,0),b=c.domNode.offsetWidth,n-=b,r(c,n);f<h&&(c=this.views[f],b=Math.max(1,n-g),c.setSize(b+"px",0),r(c,g));return g},renderRow:function(g,e,d){for(var c=[],b=0,h,a;(h=this.views[b])&&(a=e[b]);b++)h=h.renderRow(g),a.appendChild(h),
c.push(h);d||this.normalizeRowNodeHeights(c)},rowRemoved:function(g){this.onEach("rowRemoved",[g])},updateRow:function(g,e){for(var d=0,c;c=this.views[d];d++)c.updateRow(g);e||this.renormalizeRow(g)},updateRowStyles:function(g){this.onEach("updateRowStyles",[g])},setScrollTop:function(g){for(var e=g,d=0,c;c=this.views[d];d++)e=c.setScrollTop(g),k("ie")&&(c.headerNode&&c.scrollboxNode)&&(c.headerNode.scrollLeft=c.scrollboxNode.scrollLeft);return e},getFirstScrollingView:function(){for(var g=0,e;e=
this.views[g];g++)if(e.hasHScrollbar()||e.hasVScrollbar())return e;return null}})})},"dojox/grid/_RowManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-class"],function(p,k,m){return p("dojox.grid._RowManager",null,{constructor:function(g){this.grid=g},linesToEms:2,overRow:-2,prepareStylingRow:function(g,e){return{index:g,node:e,odd:Boolean(g&1),selected:!!this.grid.selection.isSelected(g),over:this.isOver(g),customStyles:"",customClasses:"dojoxGridRow"}},styleRowNode:function(g,
e){var d=this.prepareStylingRow(g,e);this.grid.onStyleRow(d);this.applyStyles(d)},applyStyles:function(g){g.node.className=g.customClasses;var e=g.node.style.height,d=g.node,c=g.customStyles+";"+(g.node._style||"");void 0==d.style.cssText?d.setAttribute("style",c):d.style.cssText=c;g.node.style.height=e},updateStyles:function(g){this.grid.updateRowStyles(g)},setOverRow:function(g){var e=this.overRow;this.overRow=g;e!=this.overRow&&(k.isString(e)||0<=e)&&this.updateStyles(e);this.updateStyles(this.overRow)},
isOver:function(g){return this.overRow==g&&!m.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".split(" "),function(p,k,m,g,e,d,c,b,h){return m("dojox.grid._FocusManager",null,{constructor:function(a){this.grid=a;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;
this._connects.push(g.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(g.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(g.connect(this.grid.domNode,"mousedown",this,"_mouseDown"));this._connects.push(g.connect(this.grid.domNode,"mouseup",this,"_mouseUp"));this._connects.push(g.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(g.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(g.connect(this.grid.lastFocusNode,
"onblur",this,"doLastNodeBlur"));this._connects.push(g.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(g.connect(this.grid,"postrender",this,"_delayedHeaderFocus"))},destroy:function(){p.forEach(this._connects,g.disconnect);p.forEach(this._headerConnects,g.disconnect);delete this.grid;delete this.cell},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:!1,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=
this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders()},isFocusCell:function(a,b){return this.cell==a&&this.rowIndex==b},isLastFocusCell:function(){return this.cell?this.rowIndex==this.grid.rowCount-1&&this.cell.index==this.grid.layout.cellCount-1:!1},isFirstFocusCell:function(){return this.cell?0===this.rowIndex&&0===this.cell.index:!1},isNoFocusCell:function(){return 0>this.rowIndex||!this.cell},isNavHeader:function(){return!!this._colHeadNode},
getHeaderIndex:function(){return this._colHeadNode?p.indexOf(this._findHeaderCells(),this._colHeadNode):-1},_focusifyCellNode:function(a){var f=this.cell&&this.cell.getNode(this.rowIndex);if(f&&(h.toggleClass(f,this.focusClass,a),a)){a=this.scrollIntoView();try{if(d("webkit")||!this.grid.edit.isEditing())b.fire(f,"focus"),a&&(this.cell.view.scrollboxNode.scrollLeft=a)}catch(c){}}},_delayedCellFocus:function(){if(!this.isNavHeader()&&this.grid.focused){var a=this.cell&&this.cell.getNode(this.rowIndex);
if(a)try{this.grid.edit.isEditing()||(h.toggleClass(a,this.focusClass,!0),this._colHeadNode&&this.blurHeader(),b.fire(a,"focus"))}catch(f){}}},_delayedHeaderFocus:function(){this.isNavHeader()&&this.focusHeader()},_initColumnHeaders:function(){p.forEach(this._headerConnects,g.disconnect);this._headerConnects=[];for(var a=this._findHeaderCells(),b=0;b<a.length;b++)this._headerConnects.push(g.connect(a[b],"onfocus",this,"doColHeaderFocus")),this._headerConnects.push(g.connect(a[b],"onblur",this,"doColHeaderBlur"))},
_findHeaderCells:function(){for(var a=c("th",this.grid.viewsHeaderNode),b=[],d=0;d<a.length;d++){var e=a[d],q=h.hasAttr(e,"tabIndex"),g=h.attr(e,"tabIndex");q&&0>g&&b.push(e)}return b},_setActiveColHeader:function(a,b,c){this.grid.domNode.setAttribute("aria-activedescendant",a.id);null!=c&&(0<=c&&c!=b)&&h.toggleClass(this._findHeaderCells()[c],this.focusClass,!1);h.toggleClass(a,this.focusClass,!0);this._colHeadNode=a;this._colHeadFocusIdx=b;this._scrollHeader(this._colHeadFocusIdx)},scrollIntoView:function(){var a=
this.cell?this._scrollInfo(this.cell):null;if(!a||!a.s)return null;var b=this.grid.scroller.findScrollTop(this.rowIndex);a.n&&a.sr&&(a.n.offsetLeft+a.n.offsetWidth>a.sr.l+a.sr.w?a.s.scrollLeft=a.n.offsetLeft+a.n.offsetWidth-a.sr.w:a.n.offsetLeft<a.sr.l&&(a.s.scrollLeft=a.n.offsetLeft));a.r&&a.sr&&(b+a.r.offsetHeight>a.sr.t+a.sr.h?this.grid.setScrollTop(b+a.r.offsetHeight-a.sr.h):b<a.sr.t&&this.grid.setScrollTop(b));return a.s.scrollLeft},_scrollInfo:function(a,b){if(a){var c=a.view.scrollboxNode,
d={w:c.clientWidth,l:c.scrollLeft,t:c.scrollTop,h:c.clientHeight},e=a.view.getRowNode(this.rowIndex);return{c:a,s:c,sr:d,n:b?b:a.getNode(this.rowIndex),r:e}}return null},_scrollHeader:function(a){var b=null;if(this._colHeadNode){var c=this.grid.getCell(a);if(!c)return;b=this._scrollInfo(c,c.getNode(0))}b&&(b.s&&b.sr&&b.n)&&(b.n.offsetLeft+b.n.offsetWidth>b.sr.l+b.sr.w?b.s.scrollLeft=b.n.offsetLeft+b.n.offsetWidth-b.sr.w:b.n.offsetLeft<b.sr.l?b.s.scrollLeft=b.n.offsetLeft:7>=d("ie")&&(c&&c.view.headerNode)&&
(c.view.headerNode.scrollLeft=b.s.scrollLeft))},_isHeaderHidden:function(){var a=this.focusView;if(!a)for(var b=0,c;c=this.grid.views.views[b];b++)if(c.headerNode){a=c;break}return a&&"none"==h.getComputedStyle(a.headerNode).display},colSizeAdjust:function(a,b,c){var d=this._findHeaderCells(),e=this.focusView;if(!e||!e.header.tableMap.map)for(var h=0,g;g=this.grid.views.views[h];h++)if(g.header.tableMap.map){e=g;break}h=d[b];e&&!(b==d.length-1&&0===b)&&(e.content.baseDecorateEvent(a),a.cellNode=h,
a.cellIndex=e.content.getCellNodeIndex(a.cellNode),a.cell=0<=a.cellIndex?this.grid.getCell(a.cellIndex):null,e.header.canResize(a)&&(b={l:c},a=e.header.colResizeSetup(a,!1),e.header.doResizeColumn(a,null,b),e.update()))},styleRow:function(a){},setFocusIndex:function(a,b){this.setFocusCell(this.grid.getCell(b),a)},setFocusCell:function(a,b){a&&!this.isFocusCell(a,b)&&(this.tabbingOut=!1,this._colHeadNode&&this.blurHeader(),this._colHeadNode=this._colHeadFocusIdx=null,this.focusGridView(),this._focusifyCellNode(!1),
this.cell=a,this.rowIndex=b,this._focusifyCellNode(!0));if(d("opera"))setTimeout(k.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);else this.grid.onCellFocus(this.cell,this.rowIndex)},next:function(){if(this.cell){var a=this.rowIndex,b=this.cell.index+1,c=this.grid.layout.cellCount-1,d=this.grid.rowCount-1;b>c&&(b=0,a++);a>d&&(b=c,a=d);if(this.grid.edit.isEditing()&&(c=this.grid.getCell(b),!this.isLastFocusCell()&&(!c.editable||this.grid.canEdit&&!this.grid.canEdit(c,a)))){this.cell=c;this.rowIndex=
a;this.next();return}this.setFocusIndex(a,b)}},previous:function(){if(this.cell){var a=this.rowIndex||0,b=(this.cell.index||0)-1;0>b&&(b=this.grid.layout.cellCount-1,a--);0>a&&(b=a=0);if(this.grid.edit.isEditing()){var c=this.grid.getCell(b);if(!this.isFirstFocusCell()&&!c.editable){this.cell=c;this.rowIndex=a;this.previous();return}}this.setFocusIndex(a,b)}},move:function(a,b){var c=0>b?-1:1;if(this.isNavHeader()){var d=this._findHeaderCells(),e=currentIdx=p.indexOf(d,this._colHeadNode);for(currentIdx+=
b;0<=currentIdx&&currentIdx<d.length&&"none"==d[currentIdx].style.display;)currentIdx+=c;0<=currentIdx&&currentIdx<d.length&&this._setActiveColHeader(d[currentIdx],currentIdx,e)}else if(this.cell){var g=this.grid.scroller,d=this.rowIndex,e=this.grid.rowCount-1,s=Math.min(e,Math.max(0,d+a));a&&(0<a?s>g.getLastPageRow(g.page)&&this.grid.setScrollTop(this.grid.scrollTop+g.findScrollTop(s)-g.findScrollTop(d)):0>a&&s<=g.getPageRow(g.page)&&this.grid.setScrollTop(this.grid.scrollTop-g.findScrollTop(d)-
g.findScrollTop(s)));for(var g=this.grid.layout.cellCount-1,l=this.cell.index,v=Math.min(g,Math.max(0,l+b)),C=this.grid.getCell(v);0<=v&&v<g&&C&&!0===C.hidden;)v+=c,C=this.grid.getCell(v);if(!C||!0===C.hidden)v=l;c=C.getNode(s);!c&&a?0<=s+a&&s+a<=e&&this.move(0<a?++a:--a,b):(!c||"none"===h.style(c,"display"))&&b?0<=v+b&&v+b<=g&&this.move(a,0<b?++b:--b):(this.setFocusIndex(s,v),a&&this.grid.updateRow(d))}},previousKey:function(a){this.grid.edit.isEditing()?(e.stop(a),this.previous()):!this.isNavHeader()&&
!this._isHeaderHidden()?(this.grid.domNode.focus(),e.stop(a)):(this.tabOut(this.grid.domNode),null!=this._colHeadFocusIdx&&(h.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,!1),this._colHeadFocusIdx=null),this._focusifyCellNode(!1))},nextKey:function(a){a.target===this.grid.domNode&&null==this._colHeadFocusIdx?(this.focusHeader(),e.stop(a)):this.isNavHeader()?(this.blurHeader(),this.findAndFocusGridCell()||this.tabOut(this.grid.lastFocusNode),this._colHeadNode=this._colHeadFocusIdx=
null):this.grid.edit.isEditing()?(e.stop(a),this.next()):this.tabOut(this.grid.lastFocusNode)},tabOut:function(a){this.tabbingOut=!0;a.focus()},focusGridView:function(){b.fire(this.focusView,"focus")},focusGrid:function(a){this.focusGridView();this._focusifyCellNode(!0)},findAndFocusGridCell:function(){var a=!0,b=0===this.grid.rowCount;this.isNoFocusCell()&&!b?(b=0,this.grid.getCell(b).hidden&&(b=this.isNavHeader()?this._colHeadFocusIdx:0),this.setFocusIndex(0,b)):this.cell&&!b?(this.focusView&&!this.focusView.rowNodes[this.rowIndex]&&
this.grid.scrollToRow(this.rowIndex),this.focusGrid()):a=!1;this._colHeadNode=this._colHeadFocusIdx=null;return a},focusHeader:function(){var a=this._findHeaderCells(),b=this._colHeadFocusIdx;this._isHeaderHidden()?this.findAndFocusGridCell():this._colHeadFocusIdx||(this.isNoFocusCell()?this._colHeadFocusIdx=0:this._colHeadFocusIdx=this.cell.index);for(this._colHeadNode=a[this._colHeadFocusIdx];this._colHeadNode&&0<=this._colHeadFocusIdx&&this._colHeadFocusIdx<a.length&&"none"==this._colHeadNode.style.display;)this._colHeadFocusIdx++,
this._colHeadNode=a[this._colHeadFocusIdx];this._colHeadNode&&"none"!=this._colHeadNode.style.display?(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,b),this._scrollHeader(this._colHeadFocusIdx),this._focusifyCellNode(!1)):this.findAndFocusGridCell()},blurHeader:function(){h.removeClass(this._colHeadNode,
this.focusClass);h.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var a=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(a);this._contextMenuBindNode=a}},doFocus:function(a){a&&a.target!=a.currentTarget?e.stop(a):this._clickFocus||(this.tabbingOut||this.focusHeader(),this.tabbingOut=!1,e.stop(a))},doBlur:function(a){e.stop(a)},doContextMenu:function(a){this.headerMenu||e.stop(a)},
doLastNodeFocus:function(a){this.tabbingOut?this._focusifyCellNode(!1):0<this.grid.rowCount?(this.isNoFocusCell()&&this.setFocusIndex(0,0),this._focusifyCellNode(!0)):this.focusHeader();this.tabbingOut=!1;e.stop(a)},doLastNodeBlur:function(a){e.stop(a)},doColHeaderFocus:function(a){this._setActiveColHeader(a.target,h.attr(a.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());e.stop(a)},doColHeaderBlur:function(a){h.toggleClass(a.target,this.focusClass,!1)},_mouseDown:function(a){this._clickFocus=
dojo.some(this.grid.views.views,function(b){return b.scrollboxNode===a.target})},_mouseUp:function(a){this._clickFocus=!1}})})},"dojox/grid/_EditManager":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/_base/connect dojo/_base/sniff ./util".split(" "),function(p,k,m,g,e,d){return m("dojox.grid._EditManager",null,{constructor:function(c){this.grid=c;this.connections=!e("ie")?[]:[g.connect(document.body,"onfocus",p.hitch(this,"_boomerangFocus"))];this.connections.push(g.connect(this.grid,
"onBlur",this,"apply"));this.connections.push(g.connect(this.grid,"prerender",this,"_onPreRender"))},info:{},destroy:function(){k.forEach(this.connections,g.disconnect)},cellFocus:function(c,b){this.grid.singleClickEdit||this.isEditRow(b)?this.setEditCell(c,b):this.apply();(this.isEditing()||c&&c.editable&&c.alwaysEditing)&&this._focusEditor(c,b)},rowClick:function(c){this.isEditing()&&!this.isEditRow(c.rowIndex)&&this.apply()},styleRow:function(c){c.index==this.info.rowIndex&&(c.customClasses+=" dojoxGridRowEditing")},
dispatchEvent:function(c){var b=c.cell;return(b=b&&b.editable?b:0)&&b.dispatchEvent(c.dispatch,c)},isEditing:function(){return void 0!==this.info.rowIndex},isEditCell:function(c,b){return this.info.rowIndex===c&&this.info.cell.index==b},isEditRow:function(c){return this.info.rowIndex===c},setEditCell:function(c,b){!this.isEditCell(b,c.index)&&(this.grid.canEdit&&this.grid.canEdit(c,b))&&this.start(c,b,this.isEditRow(b)||c.editable)},_focusEditor:function(c,b){d.fire(c,"focus",[b])},focusEditor:function(){this.isEditing()&&
this._focusEditor(this.info.cell,this.info.rowIndex)},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>(new Date).getTime()},_boomerangFocus:function(){this._shouldCatchBoomerang()&&(this.grid.focus.focusGrid(),this.focusEditor(),this._catchBoomerang=0)},_doCatchBoomerang:function(){e("ie")&&(this._catchBoomerang=(new Date).getTime()+this._boomerangWindow)},start:function(c,b,d){this._isValidInput()&&(this.grid.beginUpdate(),this.editorApply(),this.isEditing()&&!this.isEditRow(b)&&
(this.applyRowEdit(),this.grid.updateRow(b)),d?(this.info={cell:c,rowIndex:b},this.grid.doStartEdit(c,b),this.grid.updateRow(b)):this.info={},this.grid.endUpdate(),this.grid.focus.focusGrid(),this._focusEditor(c,b),this._doCatchBoomerang())},_editorDo:function(c){var b=this.info.cell;if(b&&b.editable)b[c](this.info.rowIndex)},editorApply:function(){this._editorDo("apply")},editorCancel:function(){this._editorDo("cancel")},applyCellEdit:function(c,b,d){this.grid.canEdit(b,d)&&this.grid.doApplyCellEdit(c,
d,b.field)},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field)},apply:function(){this.isEditing()&&this._isValidInput()&&(this.grid.beginUpdate(),this.editorApply(),this.applyRowEdit(),this.info={},this.grid.endUpdate(),this.grid.focus.focusGrid(),this._doCatchBoomerang())},cancel:function(){this.isEditing()&&(this.grid.beginUpdate(),this.editorCancel(),this.info={},this.grid.endUpdate(),this.grid.focus.focusGrid(),this._doCatchBoomerang())},save:function(c,b){var d=
this.info.cell;this.isEditRow(c)&&((!b||d.view==b)&&d.editable)&&d.save(d,this.info.rowIndex)},restore:function(c,b){var d=this.info.cell;this.isEditRow(b)&&(d.view==c&&d.editable)&&d.restore(this.info.rowIndex)},_isValidInput:function(){var c=(this.info.cell||{}).widget;if(!c||!c.isValid)return!0;c.focused=!0;return c.isValid(!0)},_onPreRender:function(){this.isEditing()&&(this.info.value=this.info.cell.getValue())}})})},"dojox/grid/Selection":function(){define(["dojo/_base/declare","dojo/_base/array",
"dojo/_base/lang","dojo/dom-attr"],function(p,k,m,g){return p("dojox.grid.Selection",null,{constructor:function(e){this.grid=e;this.selected=[];this.setMode(e.selectionMode)},mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-1,setMode:function(e){this.selected.length&&this.deselectAll();this.mode="extended"!=e&&"multiple"!=e&&"single"!=e&&"none"!=e?"extended":e},onCanSelect:function(e){return this.grid.onCanSelect(e)},onCanDeselect:function(e){return this.grid.onCanDeselect(e)},
onSelected:function(e){},onDeselected:function(e){},onChanging:function(){},onChanged:function(){},isSelected:function(e){return"none"==this.mode?!1:this.selected[e]},getFirstSelected:function(){if(!this.selected.length||"none"==this.mode)return-1;for(var e=0,d=this.selected.length;e<d;e++)if(this.selected[e])return e;return-1},getNextSelected:function(e){if("none"==this.mode)return-1;e+=1;for(var d=this.selected.length;e<d;e++)if(this.selected[e])return e;return-1},getSelected:function(){for(var e=
[],d=0,c=this.selected.length;d<c;d++)this.selected[d]&&e.push(d);return e},getSelectedCount:function(){for(var e=0,d=0;d<this.selected.length;d++)this.selected[d]&&e++;return e},_beginUpdate:function(){if(0===this.updating)this.onChanging();this.updating++},_endUpdate:function(){this.updating--;if(0===this.updating)this.onChanged()},select:function(e){"none"!=this.mode&&("multiple"!=this.mode?(this.deselectAll(e),this.addToSelection(e)):this.toggleSelect(e))},addToSelection:function(e){if("none"!=
this.mode)if(m.isArray(e))k.forEach(e,this.addToSelection,this);else if(e=Number(e),this.selected[e])this.selectedIndex=e;else if(!1!==this.onCanSelect(e)){this.selectedIndex=e;var d=this.grid.getRowNode(e);d&&g.set(d,"aria-selected","true");this._beginUpdate();this.selected[e]=!0;this.onSelected(e);this._endUpdate()}},deselect:function(e){if("none"!=this.mode)if(m.isArray(e))k.forEach(e,this.deselect,this);else if(e=Number(e),this.selectedIndex==e&&(this.selectedIndex=-1),this.selected[e]&&!1!==
this.onCanDeselect(e)){var d=this.grid.getRowNode(e);d&&g.set(d,"aria-selected","false");this._beginUpdate();delete this.selected[e];this.onDeselected(e);this._endUpdate()}},setSelected:function(e,d){this[d?"addToSelection":"deselect"](e)},toggleSelect:function(e){m.isArray(e)?k.forEach(e,this.toggleSelect,this):this.setSelected(e,!this.selected[e])},_range:function(e,d,c){var b=0<=e?e:d;e=d;b>e&&(e=b,b=d);for(d=b;d<=e;d++)c(d)},selectRange:function(e,d){this._range(e,d,m.hitch(this,"addToSelection"))},
deselectRange:function(e,d){this._range(e,d,m.hitch(this,"deselect"))},insert:function(e){this.selected.splice(e,0,!1);this.selectedIndex>=e&&this.selectedIndex++},remove:function(e){this.selected.splice(e,1);this.selectedIndex>=e&&this.selectedIndex--},deselectAll:function(e){for(var d in this.selected)d!=e&&!0===this.selected[d]&&this.deselect(d)},clickSelect:function(e,d,c){if("none"!=this.mode){this._beginUpdate();if("extended"!=this.mode)this.select(e);else{if(!c||0>this.rangeStartIndex)this.rangeStartIndex=
e;d||this.deselectAll(e);c?this.selectRange(this.rangeStartIndex,e):d?this.toggleSelect(e):this.addToSelection(e)}this._endUpdate()}},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey)},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate()}})})},"dojox/grid/DataSelection":function(){define(["dojo/_base/declare","./_SelectionPreserver","./Selection"],function(p,k,m){return p("dojox.grid.DataSelection",m,{constructor:function(g){g.keepSelection&&
(this.preserver=new k(this))},destroy:function(){this.preserver&&this.preserver.destroy()},getFirstSelected:function(){var g=m.prototype.getFirstSelected.call(this);return-1==g?null:this.grid.getItem(g)},getNextSelected:function(g){g=this.grid.getItemIndex(g);g=m.prototype.getNextSelected.call(this,g);return-1==g?null:this.grid.getItem(g)},getSelected:function(){for(var g=[],e=0,d=this.selected.length;e<d;e++)this.selected[e]&&g.push(this.grid.getItem(e));return g},addToSelection:function(g){if("none"!=
this.mode){var e=null,e="number"==typeof g||"string"==typeof g?g:this.grid.getItemIndex(g);m.prototype.addToSelection.call(this,e)}},deselect:function(g){if("none"!=this.mode){var e=null,e="number"==typeof g||"string"==typeof g?g:this.grid.getItemIndex(g);m.prototype.deselect.call(this,e)}},deselectAll:function(g){var e=null;g||"number"==typeof g?(e="number"==typeof g||"string"==typeof g?g:this.grid.getItemIndex(g),m.prototype.deselectAll.call(this,e)):this.inherited(arguments)}})})},"dojox/grid/_SelectionPreserver":function(){define(["dojo/_base/declare",
"dojo/_base/connect","dojo/_base/lang","dojo/_base/array"],function(p,k,m,g){return p("dojox.grid._SelectionPreserver",null,{constructor:function(e){this.selection=e;var d=this.grid=e.grid;this.reset();this._connects=[k.connect(d,"_setStore",this,"reset"),k.connect(d,"_addItem",this,"_reSelectById"),k.connect(e,"onSelected",m.hitch(this,"_selectById",!0)),k.connect(e,"onDeselected",m.hitch(this,"_selectById",!1)),k.connect(e,"deselectAll",this,"reset")]},destroy:function(){this.reset();g.forEach(this._connects,
k.disconnect);delete this._connects},reset:function(){this._selectedById={}},_reSelectById:function(e,d){e&&this.grid._hasIdentity&&(this.selection.selected[d]=this._selectedById[this.grid.store.getIdentity(e)])},_selectById:function(e,d){if("none"!=this.selection.mode&&this.grid._hasIdentity){var c=d,b=this.grid;if("number"==typeof d||"string"==typeof d)c=(c=b._by_idx[d])&&c.item;c&&(this._selectedById[b.store.getIdentity(c)]=!!e);return c}}})})},"dojox/grid/enhanced/_PluginManager":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/_base/connect ./_Events ./_FocusManager ../util".split(" "),
function(p,k,m,g,e,d,c,b){var h=m("dojox.grid.enhanced._PluginManager",null,{_options:null,_plugins:null,_connects:null,constructor:function(a){this.grid=a;this._store=a.store;this._options={};this._plugins=[];this._connects=[];this._parseProps(this.grid.plugins);a.connect(a,"_setStore",k.hitch(this,function(a){this._store!==a&&(this.forEach("onSetStore",[a,this._store]),this._store=a)}))},startup:function(){this.forEach("onStartUp")},preInit:function(){this.grid.focus.destroy();this.grid.focus=new c(this.grid);
new d(this.grid);this._init(!0);this.forEach("onPreInit")},postInit:function(){this._init(!1);g.forEach(this.grid.views.views,this._initView,this);this._connects.push(e.connect(this.grid.views,"addView",k.hitch(this,this._initView)));if(0<this._plugins.length){var a=this.grid.edit;a&&(a.styleRow=function(a){})}this.forEach("onPostInit")},forEach:function(a,b){g.forEach(this._plugins,function(c){c&&c[a]&&c[a].apply(c,b?b:[])})},_parseProps:function(a){if(a){var b,c={},d=this._options,e=this.grid,g=
h.registry;for(b in a)a[b]&&this._normalize(b,a,g,c);d.dnd&&(d.columnReordering=!1);k.mixin(e,d)}},_normalize:function(a,b,c,d){if(!c[a])throw Error("Plugin "+a+" is required.");if(d[a])throw Error("Recursive cycle dependency is not supported.");var e=this._options;if(e[a])return e[a];d[a]=!0;e[a]=k.mixin({},c[a],k.isObject(b[a])?b[a]:{});var h=e[a].dependency;h&&(k.isArray(h)||(h=e[a].dependency=[h]),g.forEach(h,function(a){if(!this._normalize(a,b,c,d))throw Error("Plugin "+a+" is required.");},
this));delete d[a];return e[a]},_init:function(a){var b,c,d=this._options;for(b in d)c=d[b].preInit,(a?c:!c)&&(d[b]["class"]&&!this.pluginExisted(b))&&this.loadPlugin(b)},loadPlugin:function(a){var b=this._options[a];if(!b)return null;if(a=this.getPlugin(a))return a;g.forEach(b.dependency,function(a){if(!this.loadPlugin(a))throw Error("Plugin "+a+" is required.");},this);a=b["class"];delete b["class"];a=(new this.getPluginClazz(a))(this.grid,b);this._plugins.push(a);return a},_initView:function(a){a&&
(b.funnelEvents(a.contentNode,a,"doContentEvent",["mouseup","mousemove"]),b.funnelEvents(a.headerNode,a,"doHeaderEvent",["mouseup"]))},pluginExisted:function(a){return!!this.getPlugin(a)},getPlugin:function(a){var b=this._plugins;a=a.toLowerCase();for(var c=0,d=b.length;c<d;c++)if(a==b[c].name.toLowerCase())return b[c];return null},getPluginClazz:function(a){if(k.isFunction(a))return a;var b='Please make sure Plugin "'+a+'" is existed.';try{var c=k.getObject(a);if(!c)throw Error(b);return c}catch(d){throw Error(b);
}},isFixedCell:function(a){return a&&(a.isRowSelector||a.fixedPos)},destroy:function(){g.forEach(this._connects,e.disconnect);this.forEach("destroy");this.grid.unwrap&&this.grid.unwrap();delete this._connects;delete this._plugins;delete this._options}});h.registerPlugin=function(a,b){if(a){var c=h;c.registry=c.registry||{};c.registry[a.prototype.name]=k.mixin({"class":a},b?b:{})}else console.warn("Failed to register plugin, class missed!")};return h})},"dojox/grid/enhanced/_Events":function(){define("dojo/_base/kernel dojo/_base/declare dojo/keys dojo/_base/html dojo/_base/event dojox/grid/_Events".split(" "),
function(p,k,m,g,e,d){return k("dojox.grid.enhanced._Events",null,{_events:null,headerCellActiveClass:"dojoxGridHeaderActive",cellActiveClass:"dojoxGridCellActive",rowActiveClass:"dojoxGridRowActive",constructor:function(c){this._events=new d;c.mixin(c,this)},dokeyup:function(c){this.focus.currentArea().keyup(c)},onKeyDown:function(c){if(!c.altKey&&!c.metaKey){var b=this.focus,d=this.edit.isEditing();switch(c.keyCode){case m.TAB:if(c.ctrlKey)break;b.tab(c.shiftKey?-1:1,c);break;case m.UP_ARROW:case m.DOWN_ARROW:if(d)break;
b.currentArea().move(c.keyCode==m.UP_ARROW?-1:1,0,c);break;case m.LEFT_ARROW:case m.RIGHT_ARROW:if(d)break;d=c.keyCode==m.LEFT_ARROW?1:-1;g._isBodyLtr()&&(d*=-1);b.currentArea().move(0,d,c);break;case m.F10:if(this.menus&&c.shiftKey)this.onRowContextMenu(c);break;default:b.currentArea().keydown(c)}}},domouseup:function(c){if(c.cellNode)this.onMouseUp(c);else this.onRowSelectorMouseUp(c)},domousedown:function(c){if(!c.cellNode)this.onRowSelectorMouseDown(c)},onMouseUp:function(c){this[-1==c.rowIndex?
"onHeaderCellMouseUp":"onCellMouseUp"](c)},onCellMouseDown:function(c){g.addClass(c.cellNode,this.cellActiveClass);g.addClass(c.rowNode,this.rowActiveClass)},onCellMouseUp:function(c){g.removeClass(c.cellNode,this.cellActiveClass);g.removeClass(c.rowNode,this.rowActiveClass)},onCellClick:function(c){this._events.onCellClick.call(this,c);this.focus.contentMouseEvent(c)},onCellDblClick:function(c){if(!this.pluginMgr.isFixedCell(c.cell)){if(1<this._click.length&&(!this._click[0]||!this._click[1]))this._click[0]=
this._click[1]=c;this._events.onCellDblClick.call(this,c)}},onRowClick:function(c){this.edit.rowClick(c);(!c.cell||!this.plugin("indirectSelection"))&&this.selection.clickSelectEvent(c)},onRowContextMenu:function(c){!this.edit.isEditing()&&this.menus&&this.showMenu(c)},onSelectedRegionContextMenu:function(c){this.selectedRegionMenu&&(this.selectedRegionMenu._openMyself({target:c.target,coords:c.keyCode!==m.F10&&"pageX"in c?{x:c.pageX,y:c.pageY}:null}),e.stop(c))},onHeaderCellMouseOut:function(c){c.cellNode&&
(g.removeClass(c.cellNode,this.cellOverClass),g.removeClass(c.cellNode,this.headerCellActiveClass))},onHeaderCellMouseDown:function(c){c.cellNode&&g.addClass(c.cellNode,this.headerCellActiveClass)},onHeaderCellMouseUp:function(c){c.cellNode&&g.removeClass(c.cellNode,this.headerCellActiveClass)},onHeaderCellClick:function(c){this.focus.currentArea("header");c.cell.isRowSelector||this._events.onHeaderCellClick.call(this,c);this.focus.headerMouseEvent(c)},onRowSelectorMouseDown:function(c){this.focus.focusArea("rowHeader",
c)},onRowSelectorMouseUp:function(c){},onMouseUpRow:function(c){if(-1!=c.rowIndex)this.onRowMouseUp(c)},onRowMouseUp:function(c){}})})},"dojox/grid/enhanced/_FocusManager":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/_base/connect dojo/_base/event dojo/_base/sniff dojo/_base/html dojo/keys dijit/a11y dijit/focus ../_FocusManager".split(" "),function(p,k,m,g,e,d,c,b,h,a,f,r){var n=m("dojox.grid.enhanced._FocusArea",null,{constructor:function(a,b){this._fm=
b;this._evtStack=[a.name];var c=function(){return!0};a.onFocus=a.onFocus||c;a.onBlur=a.onBlur||c;a.onMove=a.onMove||c;a.onKeyUp=a.onKeyUp||c;a.onKeyDown=a.onKeyDown||c;k.mixin(this,a)},move:function(a,b,c){if(this.name){var f;for(f=this._evtStack.length-1;0<=f;--f)if(!1===this._fm._areas[this._evtStack[f]].onMove(a,b,c))return!1}return!0},_onKeyEvent:function(a,b){if(this.name){var c,f=this._evtStack.length;for(c=f-1;0<=c;--c)if(!1===this._fm._areas[this._evtStack[c]][b](a,!1))return!1;for(c=0;c<
f;++c)if(!1===this._fm._areas[this._evtStack[c]][b](a,!0))return!1}return!0},keydown:function(a){return this._onKeyEvent(a,"onKeyDown")},keyup:function(a){return this._onKeyEvent(a,"onKeyUp")},contentMouseEventPlanner:function(){return 0},headerMouseEventPlanner:function(){return 0}});return m("dojox.grid.enhanced._FocusManager",r,{_stopEvent:function(a){try{a&&a.preventDefault&&d.stop(a)}catch(b){}},constructor:function(a){this.grid=a;this._areas={};this._areaQueue=[];this._contentMouseEventHandlers=
[];this._headerMouseEventHandlers=[];this._currentAreaIdx=-1;this._gridBlured=!0;this._connects.push(e.connect(a,"onBlur",this,"_doBlur"));this._connects.push(e.connect(a.scroller,"renderPage",this,"_delayedCellFocus"));this.addArea({name:"header",onFocus:k.hitch(this,this.focusHeader),onBlur:k.hitch(this,this._blurHeader),onMove:k.hitch(this,this._navHeader),getRegions:k.hitch(this,this._findHeaderCells),onRegionFocus:k.hitch(this,this.doColHeaderFocus),onRegionBlur:k.hitch(this,this.doColHeaderBlur),
onKeyDown:k.hitch(this,this._onHeaderKeyDown)});this.addArea({name:"content",onFocus:k.hitch(this,this._focusContent),onBlur:k.hitch(this,this._blurContent),onMove:k.hitch(this,this._navContent),onKeyDown:k.hitch(this,this._onContentKeyDown)});this.addArea({name:"editableCell",onFocus:k.hitch(this,this._focusEditableCell),onBlur:k.hitch(this,this._blurEditableCell),onKeyDown:k.hitch(this,this._onEditableCellKeyDown),onContentMouseEvent:k.hitch(this,this._onEditableCellMouseEvent),contentMouseEventPlanner:function(a,
b){return-1}});this.placeArea("header");this.placeArea("content");this.placeArea("editableCell");this.placeArea("editableCell","above","content")},destroy:function(){for(var a in this._areas){var b=this._areas[a];g.forEach(b._connects,e.disconnect);b._connects=null;b.uninitialize&&b.uninitialize()}this.inherited(arguments)},addArea:function(a){a.name&&k.isString(a.name)&&(this._areas[a.name]&&g.forEach(a._connects,e.disconnect),this._areas[a.name]=new n(a,this),a.onHeaderMouseEvent&&this._headerMouseEventHandlers.push(a.name),
a.onContentMouseEvent&&this._contentMouseEventHandlers.push(a.name))},getArea:function(a){return this._areas[a]},_bindAreaEvents:function(){var a,b,c=this._areas;g.forEach(this._areaQueue,function(f){a=c[f];!a._initialized&&k.isFunction(a.initialize)&&(a.initialize(),a._initialized=!0);a.getRegions&&(a._regions=a.getRegions()||[],g.forEach(a._connects||[],e.disconnect),a._connects=[],g.forEach(a._regions,function(c){a.onRegionFocus&&(b=e.connect(c,"onfocus",a.onRegionFocus),a._connects.push(b));a.onRegionBlur&&
(b=e.connect(c,"onblur",a.onRegionBlur),a._connects.push(b))}))})},removeArea:function(a){var b=this._areas[a];if(b){this.ignoreArea(a);var c=g.indexOf(this._contentMouseEventHandlers,a);0<=c&&this._contentMouseEventHandlers.splice(c,1);c=g.indexOf(this._headerMouseEventHandlers,a);0<=c&&this._headerMouseEventHandlers.splice(c,1);g.forEach(b._connects,e.disconnect);b.uninitialize&&b.uninitialize();delete this._areas[a]}},currentArea:function(a,b){var c,f=this._currentAreaIdx;if(k.isString(a)&&0<=
(c=g.indexOf(this._areaQueue,a))){if(f!=c){this.tabbingOut=!1;if(b&&0<=f&&f<this._areaQueue.length)this._areas[this._areaQueue[f]].onBlur();this._currentAreaIdx=c}}else return 0>f||f>=this._areaQueue.length?new n({},this):this._areas[this._areaQueue[this._currentAreaIdx]];return null},placeArea:function(a,b,c){if(this._areas[a]){var f=g.indexOf(this._areaQueue,c);switch(b){case "after":0<=f&&++f;case "before":if(0<=f){this._areaQueue.splice(f,0,a);break}default:this._areaQueue.push(a);break;case "above":var d=
!0;case "below":(b=this._areas[c])&&(d?b._evtStack.push(a):b._evtStack.splice(0,0,a))}}},ignoreArea:function(a){this._areaQueue=g.filter(this._areaQueue,function(b){return b!=a})},focusArea:function(a,b){var c;c="number"==typeof a?0>a?this._areaQueue.length+a:a:g.indexOf(this._areaQueue,k.isString(a)?a:a&&a.name);0>c&&(c=0);c-=this._currentAreaIdx;this._gridBlured=!1;if(c)this.tab(c,b);else this.currentArea().onFocus(b,c)},tab:function(a,b){this.tabbingOut=this._gridBlured=!1;if(0!==a){var c=this._currentAreaIdx,
d=0<a?1:-1;if(0>c||c>=this._areaQueue.length)c=this._currentAreaIdx+=a;else{var e=this._areas[this._areaQueue[c]].onBlur(b,a);!0===e?c=this._currentAreaIdx+=a:k.isString(e)&&this._areas[e]&&(c=this._currentAreaIdx=g.indexOf(this._areaQueue,e))}for(;0<=c&&c<this._areaQueue.length;c+=d)if(this._currentAreaIdx=c,this._areaQueue[c]&&this._areas[this._areaQueue[c]].onFocus(b,a))return;this.tabbingOut=!0;0>a?(this._currentAreaIdx=-1,f.focus(this.grid.domNode)):(this._currentAreaIdx=this._areaQueue.length,
f.focus(this.grid.lastFocusNode))}},_onMouseEvent:function(a,b){for(var c=a.toLowerCase(),f=this["_"+c+"MouseEventHandlers"],d=g.map(f,function(a){return{area:a,idx:this._areas[a][c+"MouseEventPlanner"](b,f)}},this).sort(function(a,b){return b.idx-a.idx}),e=g.map(d,function(a){return d.area}),h=d.length;0<=--h&&!1!==this._areas[d[h].area]["on"+a+"MouseEvent"](b,e););},contentMouseEvent:function(a){this._onMouseEvent("Content",a)},headerMouseEvent:function(a){this._onMouseEvent("Header",a)},initFocusView:function(){this.focusView=
this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._bindAreaEvents()},isNavHeader:function(){return"header"==this._areaQueue[this._currentAreaIdx]},previousKey:function(a){this.tab(-1,a)},nextKey:function(a){this.tab(1,a)},setFocusCell:function(a,b){a&&(this.currentArea(this.grid.edit.isEditing()?"editableCell":"content",!0),this._focusifyCellNode(!1),this.cell=a,this.rowIndex=b,this._focusifyCellNode(!0));this.grid.onCellFocus(this.cell,this.rowIndex)},doFocus:function(a){a&&
a.target==a.currentTarget&&!this.tabbingOut?this._gridBlured&&(this._gridBlured=!1,0>this._currentAreaIdx||this._currentAreaIdx>=this._areaQueue.length?this.focusArea(0,a):this.focusArea(this._currentAreaIdx,a)):this.tabbingOut=!1;d.stop(a)},_doBlur:function(){this._gridBlured=!0},doLastNodeFocus:function(a){this.tabbingOut?this.tabbingOut=!1:this.focusArea(-1,a)},_delayedHeaderFocus:function(){this.isNavHeader()&&!c("ie")&&this.focusHeader()},_delayedCellFocus:function(){},_changeMenuBindNode:function(a,
b){var c=this.grid.headerMenu;c&&this._contextMenuBindNode==a&&(c.unBindDomNode(a),c.bindDomNode(b),this._contextMenuBindNode=b)},focusHeader:function(a,c){var d=!1;this.inherited(arguments);this._colHeadNode&&"none"!=b.style(this._colHeadNode,"display")&&(f.focus(this._colHeadNode),this._stopEvent(a),d=!0);return d},_blurHeader:function(a,c){this._colHeadNode&&b.removeClass(this._colHeadNode,this.focusClass);b.removeAttr(this.grid.domNode,"aria-activedescendant");this._changeMenuBindNode(this.grid.domNode,
this.grid.viewsHeaderNode);this._colHeadNode=this._colHeadFocusIdx=null;return!0},_navHeader:function(a,b,c){var f=0>b?-1:1,d=g.indexOf(this._findHeaderCells(),this._colHeadNode);0<=d&&c.shiftKey&&c.ctrlKey?this.colSizeAdjust(c,d,5*f):this.move(a,b)},_onHeaderKeyDown:function(a,b){if(b)switch(a.keyCode){case h.ENTER:case h.SPACE:var c=this.getHeaderIndex();0<=c&&!this.grid.pluginMgr.isFixedCell(a.cell)&&(this.grid.setSortIndex(c,null,a),d.stop(a))}return!0},_setActiveColHeader:function(){this.inherited(arguments);
f.focus(this._colHeadNode)},findAndFocusGridCell:function(){this._focusContent()},_focusContent:function(a,b){var c=!0,f=0===this.grid.rowCount;if(this.isNoFocusCell()&&!f){for(var f=0,d=this.grid.getCell(0);d&&d.hidden;d=this.grid.getCell(++f));this.setFocusIndex(0,d?f:0)}else this.cell&&!f?this.focusView&&!this.focusView.rowNodes[this.rowIndex]?(this.grid.scrollToRow(this.rowIndex),this.focusGrid()):this.setFocusIndex(this.rowIndex,this.cell.index):c=!1;c&&this._stopEvent(a);return c},_blurContent:function(a,
b){this._focusifyCellNode(!1);return!0},_navContent:function(a,b,c){0===this.rowIndex&&0>a||this.rowIndex===this.grid.rowCount-1&&0<a||(this._colHeadNode=null,this.move(a,b,c),c&&d.stop(c))},_onContentKeyDown:function(a,b){if(b){var c=this.grid.scroller;switch(a.keyCode){case h.ENTER:case h.SPACE:c=this.grid;if(c.indirectSelection)break;c.selection.clickSelect(this.rowIndex,e.isCopyKey(a),a.shiftKey);c.onRowClick(a);d.stop(a);break;case h.PAGE_UP:0!==this.rowIndex&&(this.rowIndex!=c.firstVisibleRow+
1?this._navContent(c.firstVisibleRow-this.rowIndex,0):(this.grid.setScrollTop(c.findScrollTop(this.rowIndex-1)),this._navContent(c.firstVisibleRow-c.lastVisibleRow+1,0)),d.stop(a));break;case h.PAGE_DOWN:this.rowIndex+1!=this.grid.rowCount&&(d.stop(a),this.rowIndex!=c.lastVisibleRow-1?this._navContent(c.lastVisibleRow-this.rowIndex-1,0):(this.grid.setScrollTop(c.findScrollTop(this.rowIndex+1)),this._navContent(c.lastVisibleRow-c.firstVisibleRow-1,0)),d.stop(a))}}return!0},_blurFromEditableCell:!1,
_isNavigating:!1,_navElems:null,_focusEditableCell:function(a,b){var c=!1;if(this._isNavigating)c=!0;else if(this.grid.edit.isEditing()&&this.cell){if(this._blurFromEditableCell||!this._blurEditableCell(a,b))this.setFocusIndex(this.rowIndex,this.cell.index),c=!0;this._stopEvent(a)}return c},_applyEditableCell:function(){try{this.grid.edit.apply()}catch(a){console.warn("_FocusManager._applyEditableCell() error:",a)}},_blurEditableCell:function(a,f){this._blurFromEditableCell=!1;if(this._isNavigating){var d=
!0;if(a)var l=this._navElems,d=l.lowest||l.first,l=l.last||l.highest||d,d=(c("ie")?a.srcElement:a.target)==(0<f?l:d);return d?(this._isNavigating=!1,b.setSelectable(this.cell.getNode(this.rowIndex),!1),"content"):!1}if(this.grid.edit.isEditing()&&this.cell){if(!f||"number"!=typeof f)return!1;for(var d=0<f?1:-1,l=this.grid.layout.cellCount,e,h=this.cell.index+d;0<=h&&h<l;h+=d)if(e=this.grid.getCell(h),e.editable)return this.cell=e,this._blurFromEditableCell=!0,!1;if((0<this.rowIndex||1==d)&&(this.rowIndex<
this.grid.rowCount||-1==d)){this.rowIndex+=d;for(h=0<d?0:l-1;0<=h&&h<l;h+=d)if(e=this.grid.getCell(h),e.editable){this.cell=e;break}this._applyEditableCell();return"content"}}return!0},_initNavigatableElems:function(){this._navElems=a._getTabNavigable(this.cell.getNode(this.rowIndex))},_onEditableCellKeyDown:function(a,c){var e=this.grid,l=e.edit,g=!1,n=!0;switch(a.keyCode){case h.ENTER:c&&l.isEditing()&&(this._applyEditableCell(),g=!0,d.stop(a));case h.SPACE:if(!c&&this._isNavigating){n=!1;break}if(c){if(!this.cell.editable&&
this.cell.navigatable){this._initNavigatableElems();var r=this._navElems.lowest||this._navElems.first;if(r){this._isNavigating=!0;b.setSelectable(this.cell.getNode(this.rowIndex),!0);f.focus(r);d.stop(a);this.currentArea("editableCell",!0);break}}!g&&(!l.isEditing()&&!e.pluginMgr.isFixedCell(this.cell))&&l.setEditCell(this.cell,this.rowIndex);g?this.currentArea("content",!0):this.cell.editable&&e.canEdit()&&this.currentArea("editableCell",!0)}break;case h.PAGE_UP:case h.PAGE_DOWN:!c&&l.isEditing()&&
(n=!1);break;case h.ESCAPE:c||(l.cancel(),this.currentArea("content",!0))}return n},_onEditableCellMouseEvent:function(a){if("click"==a.type){var d=this.cell||a.cell;if(d&&!d.editable&&d.navigatable){if(this._initNavigatableElems(),this._navElems.lowest||this._navElems.first){var e=c("ie")?a.srcElement:a.target;if(e!=d.getNode(a.rowIndex))return this._isNavigating=!0,this.focusArea("editableCell",a),b.setSelectable(d.getNode(a.rowIndex),!0),f.focus(e),!1}}else if(this.grid.singleClickEdit)return this.currentArea("editableCell"),
!1}return!0}})})},"dojox/grid/enhanced/plugins/_SelectionPreserver":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","../../_SelectionPreserver"],function(p,k,m,g){return p("dojox.grid.enhanced.plugins._SelectionPreserver",g,{constructor:function(e){var d=this.grid;d.onSelectedById=this.onSelectedById;this._oldClearData=d._clearData;var c=this;d._clearData=function(){c._updateMapping(!d._noInternalMapping);c._trustSelection=[];c._oldClearData.apply(d,arguments)};this._connects.push(m.connect(e,
"selectRange",k.hitch(this,"_updateMapping",!0,!0,!1)),m.connect(e,"deselectRange",k.hitch(this,"_updateMapping",!0,!1,!1)),m.connect(e,"deselectAll",k.hitch(this,"_updateMapping",!0,!1,!0)))},destroy:function(){this.inherited(arguments);this.grid._clearData=this._oldClearData},reset:function(){this.inherited(arguments);this._idMap=[];this._trustSelection=[];this._defaultSelected=!1},_reSelectById:function(e,d){var c=this.selection,b=this.grid;if(e&&b._hasIdentity){var h=b.store.getIdentity(e);void 0===
this._selectedById[h]?this._trustSelection[d]||(c.selected[d]=this._defaultSelected):c.selected[d]=this._selectedById[h];this._idMap.push(h);b.onSelectedById(h,d,c.selected[d])}},_selectById:function(e,d){this.inherited(arguments)||(this._trustSelection[d]=!0)},onSelectedById:function(e,d,c){},_updateMapping:function(e,d,c,b,h){var a=this.selection,f=this.grid,g=0,n=0,q,k;for(q=f.rowCount-1;0<=q;--q)if(f._by_idx[q]){if((k=f._by_idx[q].idty)&&(e||void 0===this._selectedById[k]))this._selectedById[k]=
!!a.selected[q]}else++n,g+=a.selected[q]?1:-1;n&&(this._defaultSelected=0<g);!c&&(void 0!==b&&void 0!==h)&&(c=!f.usingPagination&&Math.abs(h-b+1)===f.rowCount);if(c&&(!f.usingPagination||"single"===f.selectionMode))for(q=this._idMap.length-1;0<=q;--q)this._selectedById[this._idMap[q]]=d}})})},"dojox/grid/enhanced/plugins/IndirectSelection":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/event dojo/_base/lang dojo/_base/html dojo/_base/window dojo/_base/connect dojo/_base/sniff dojo/query dojo/keys dojo/string ../_Plugin ../../EnhancedGrid ../../cells/dijit".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n){var q=g.getObject("dojox.grid.cells"),q=p("dojox.grid.cells.RowSelector",q._Widget,{inputType:"",map:null,disabledMap:null,isRowSelector:!0,_connects:null,_subscribes:null,checkedText:"\x26#10003;",unCheckedText:"O",constructor:function(){this.map={};this.disabledMap={};this.disabledCount=0;this._connects=[];this._subscribes=[];this.inA11YMode=e.hasClass(d.body(),"dijit_a11y");this.baseClass="dojoxGridRowSelector dijitReset dijitInline dijit"+this.inputType;this.checkedClass=
" dijit"+this.inputType+"Checked";this.disabledClass=" dijit"+this.inputType+"Disabled";this.checkedDisabledClass=" dijit"+this.inputType+"CheckedDisabled";this.statusTextClass=" dojoxGridRowSelectorStatusText";this._connects.push(c.connect(this.grid,"dokeyup",this,"_dokeyup"));this._connects.push(c.connect(this.grid.selection,"onSelected",this,"_onSelected"));this._connects.push(c.connect(this.grid.selection,"onDeselected",this,"_onDeselected"));this._connects.push(c.connect(this.grid.scroller,"invalidatePageNode",
this,"_pageDestroyed"));this._connects.push(c.connect(this.grid,"onCellClick",this,"_onClick"));this._connects.push(c.connect(this.grid,"updateRow",this,"_onUpdateRow"))},formatter:function(a,b,c){a=c.baseClass;var d=!!c.getValue(b),e=!!c.disabledMap[b];d?(a+=c.checkedClass,e&&(a+=c.checkedDisabledClass)):e&&(a+=c.disabledClass);return["\x3cdiv tabindex \x3d -1 ","id \x3d '"+c.grid.id+"_rowSelector_"+b+"' ","name \x3d '"+c.grid.id+"_rowSelector' class \x3d '"+a+"' ","role \x3d "+c.inputType.toLowerCase()+
" aria-checked \x3d '"+d+"' aria-disabled \x3d '"+e+"' aria-label \x3d '"+f.substitute(c.grid._nls["indirectSelection"+c.inputType],[b+1])+"'\x3e","\x3cspan class \x3d '"+c.statusTextClass+"'\x3e"+(d?c.checkedText:c.unCheckedText)+"\x3c/span\x3e","\x3c/div\x3e"].join("")},setValue:function(a,b){},getValue:function(a){return this.grid.selection.isSelected(a)},toggleRow:function(a,b){this._nativeSelect(a,b)},setDisabled:function(a,b){0>a||this._toggleDisabledStyle(a,b)},disabled:function(a){return!!this.disabledMap[a]},
_onClick:function(a){a.cell===this&&this._selectRow(a)},_dokeyup:function(b){b.cellIndex==this.index&&(0<=b.rowIndex&&b.keyCode==a.SPACE)&&this._selectRow(b)},focus:function(a){(a=this.map[a])&&a.focus()},_focusEndingCell:function(a,b){var c=this.grid.getCell(b);this.grid.focus.setFocusCell(c,a)},_nativeSelect:function(a,b){this.grid.selection[b?"select":"deselect"](a)},_onSelected:function(a){this._toggleCheckedStyle(a,!0)},_onDeselected:function(a){this._toggleCheckedStyle(a,!1)},_onUpdateRow:function(a){delete this.map[a]},
_toggleCheckedStyle:function(a,b){var c=this._getSelector(a);c&&(e.toggleClass(c,this.checkedClass,b),this.disabledMap[a]&&e.toggleClass(c,this.checkedDisabledClass,b),c.setAttribute("aria-checked",b),this.inA11YMode&&(c.firstChild.innerHTML=b?this.checkedText:this.unCheckedText))},_toggleDisabledStyle:function(a,b){var c=this._getSelector(a);c&&(e.toggleClass(c,this.disabledClass,b),this.getValue(a)&&e.toggleClass(c,this.checkedDisabledClass,b),c.setAttribute("aria-disabled",b));this.disabledMap[a]=
b;0<=a&&(this.disabledCount+=b?1:-1)},_getSelector:function(a){var b=this.map[a];if(!b){var c=this.view.rowNodes[a];c&&(b=h(".dojoxGridRowSelector",c)[0])&&(this.map[a]=b)}return b},_pageDestroyed:function(a){var b=this.grid.scroller.rowsPerPage;a*=b;for(b=a+b-1;a<=b;a++)this.map[a]&&(e.destroy(this.map[a]),delete this.map[a])},destroy:function(){for(var a in this.map)e.destroy(this.map[a]),delete this.map[a];for(a in this.disabledMap)delete this.disabledMap[a];k.forEach(this._connects,c.disconnect);
k.forEach(this._subscribes,c.unsubscribe);delete this._connects;delete this._subscribes}}),t=p("dojox.grid.cells.SingleRowSelector",q,{inputType:"Radio",_selectRow:function(a){var b=a.rowIndex;this.disabledMap[b]||(this._focusEndingCell(b,a.cellIndex),this._nativeSelect(b,!this.grid.selection.selected[b]))}}),s=p("dojox.grid.cells.MultipleRowSelector",q,{inputType:"CheckBox",swipeStartRowIndex:-1,swipeMinRowIndex:-1,swipeMaxRowIndex:-1,toSelect:!1,lastClickRowIdx:-1,unCheckedText:"\x26#9633;",constructor:function(){this._connects.push(c.connect(d.doc,
"onmouseup",this,"_domouseup"));this._connects.push(c.connect(this.grid,"onRowMouseOver",this,"_onRowMouseOver"));this._connects.push(c.connect(this.grid.focus,"move",this,"_swipeByKey"));this._connects.push(c.connect(this.grid,"onCellMouseDown",this,"_onMouseDown"));this.headerSelector&&(this._connects.push(c.connect(this.grid.views,"render",this,"_addHeaderSelector")),this._connects.push(c.connect(this.grid,"_onFetchComplete",this,"_addHeaderSelector")),this._connects.push(c.connect(this.grid,"onSelectionChanged",
this,"_onSelectionChanged")),this._connects.push(c.connect(this.grid,"onKeyDown",this,function(b){-1==b.rowIndex&&(b.cellIndex==this.index&&b.keyCode==a.SPACE)&&this._toggletHeader()})))},toggleAllSelection:function(a){var b=this.grid,c=b.selection;a?c.selectRange(0,b.rowCount-1):c.deselectAll()},_onMouseDown:function(a){a.cell==this&&(this._startSelection(a.rowIndex),m.stop(a))},_onRowMouseOver:function(a){this._updateSelection(a,0)},_domouseup:function(a){b("ie")&&this.view.content.decorateEvent(a);
0<=a.cellIndex&&(this.inSwipeSelection()&&!this.grid.edit.isEditRow(a.rowIndex))&&this._focusEndingCell(a.rowIndex,a.cellIndex);this._finishSelect()},_dokeyup:function(a){this.inherited(arguments);a.shiftKey||this._finishSelect()},_startSelection:function(a){this.swipeStartRowIndex=this.swipeMinRowIndex=this.swipeMaxRowIndex=a;this.toSelect=!this.getValue(a)},_updateSelection:function(a,b){if(this.inSwipeSelection()){var c=0!==b,f=a.rowIndex,d=f-this.swipeStartRowIndex+b;0<d&&this.swipeMaxRowIndex<
f+b&&(this.swipeMaxRowIndex=f+b);0>d&&this.swipeMinRowIndex>f+b&&(this.swipeMinRowIndex=f+b);for(var e=0<d?this.swipeStartRowIndex:f+b,f=0<d?f+b:this.swipeStartRowIndex,d=this.swipeMinRowIndex;d<=this.swipeMaxRowIndex;d++)this.disabledMap[d]||0>d||(d>=e&&d<=f?this._nativeSelect(d,this.toSelect):c||this._nativeSelect(d,!this.toSelect))}},_swipeByKey:function(a,b,c){if(c&&!(0===a||!c.shiftKey||c.cellIndex!=this.index||0>this.grid.focus.rowIndex))b=c.rowIndex,0>this.swipeStartRowIndex&&(this.swipeStartRowIndex=
b,0<a?(this.swipeMaxRowIndex=b+a,this.swipeMinRowIndex=b):(this.swipeMinRowIndex=b+a,this.swipeMaxRowIndex=b),this.toSelect=this.getValue(b)),this._updateSelection(c,a)},_finishSelect:function(){this.swipeMaxRowIndex=this.swipeMinRowIndex=this.swipeStartRowIndex=-1;this.toSelect=!1},inSwipeSelection:function(){return 0<=this.swipeStartRowIndex},_nativeSelect:function(a,b){this.grid.selection[b?"addToSelection":"deselect"](a)},_selectRow:function(a){var b=a.rowIndex;if(!this.disabledMap[b]){m.stop(a);
this._focusEndingCell(b,a.cellIndex);var c=b-this.lastClickRowIdx,f=!this.grid.selection.selected[b];if(0<=this.lastClickRowIdx&&!a.ctrlKey&&!a.altKey&&a.shiftKey){a=0<c?b:this.lastClickRowIdx;for(c=0<c?this.lastClickRowIdx:b;0<=c&&c<=a;c++)this._nativeSelect(c,f)}else this._nativeSelect(b,f);this.lastClickRowIdx=b}},getValue:function(a){if(-1==a){var b=this.grid;return 0<b.rowCount&&b.rowCount<=b.selection.getSelectedCount()}return this.inherited(arguments)},_addHeaderSelector:function(){var a=this.view.getHeaderCellNode(this.index);
if(a){e.empty(a);var b=this.grid,a=a.appendChild(e.create("div",{"aria-label":b._nls.selectAll,tabindex:-1,id:b.id+"_rowSelector_-1","class":this.baseClass,role:"Checkbox",innerHTML:"\x3cspan class \x3d '"+this.statusTextClass+"'\x3e\x3c/span\x3e\x3cspan style\x3d'height: 0; width: 0; overflow: hidden; display: block;'\x3e"+b._nls.selectAll+"\x3c/span\x3e"}));this.map[-1]=a;b=this._headerSelectorConnectIdx;void 0!==b&&(c.disconnect(this._connects[b]),this._connects.splice(b,1));this._headerSelectorConnectIdx=
this._connects.length;this._connects.push(c.connect(a,"onclick",this,"_toggletHeader"));this._onSelectionChanged()}},_toggletHeader:function(){this.disabledMap[-1]||(this.grid._selectingRange=!0,this.toggleAllSelection(!this.getValue(-1)),this._onSelectionChanged(),this.grid._selectingRange=!1)},_onSelectionChanged:function(){var a=this.grid;this.map[-1]&&!a._selectingRange&&(a.allItemsSelected=this.getValue(-1),this._toggleCheckedStyle(-1,a.allItemsSelected))},_toggleDisabledStyle:function(a,b){this.inherited(arguments);
if(this.headerSelector){var c=this.grid.rowCount==this.disabledCount;c!=!!this.disabledMap[-1]&&(arguments[0]=-1,arguments[1]=c,this.inherited(arguments))}}});p=p("dojox.grid.enhanced.plugins.IndirectSelection",r,{name:"indirectSelection",constructor:function(){var a=this.grid.layout;this.connect(a,"setStructure",g.hitch(a,this.addRowSelectCell,this.option))},addRowSelectCell:function(a){if(this.grid.indirectSelection&&"none"!=this.grid.selectionMode){var b=!1,c=["get","formatter","field","fields"],
f={type:s,name:"",width:"30px",styles:"text-align: center;"};a.headerSelector&&(a.name="");this.grid.rowSelectCell&&this.grid.rowSelectCell.destroy();k.forEach(this.structure,function(d){var e=d.cells;if(e&&0<e.length&&!b){d=e[0];if(!d[0]||!d[0].isRowSelector){var h;h=g.mixin(f,a,{type:"single"==this.grid.selectionMode?t:s,editable:!1,notselectable:!0,filterable:!1,navigatable:!0,nosort:!0});k.forEach(c,function(a){a in h&&delete h[a]});1<e.length&&(h.rowSpan=e.length);k.forEach(this.cells,function(a,
b){0<=a.index?a.index+=1:console.warn("Error:IndirectSelection.addRowSelectCell()-  cell "+b+" has no index!")});e=this.addCellDef(0,0,h);e.index=0;d.unshift(e);this.cells.unshift(e);this.grid.rowSelectCell=e}b=!0}},this);this.cellCount=this.cells.length}},destroy:function(){this.grid.rowSelectCell.destroy();delete this.grid.rowSelectCell;this.inherited(arguments)}});n.registerPlugin(p,{preInit:!0});return p})},"dojox/grid/enhanced/_Plugin":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/_base/connect ../EnhancedGrid".split(" "),
function(p,k,m,g,e){return m("dojox.grid.enhanced._Plugin",null,{name:"plugin",grid:null,option:{},_connects:[],_subscribes:[],privates:{},constructor:function(d,c){this.grid=d;this.option=c;this._connects=[];this._subscribes=[];this.privates=k.mixin({},dojox.grid.enhanced._Plugin.prototype);this.init()},init:function(){},onPreInit:function(){},onPostInit:function(){},onStartUp:function(){},connect:function(d,c,b){d=e.connect(d,c,this,b);this._connects.push(d);return d},disconnect:function(d){g.some(this._connects,
function(c,b,h){return c==d?(e.disconnect(d),h.splice(b,1),!0):!1})},subscribe:function(d,c){var b=e.subscribe(d,this,c);this._subscribes.push(b);return b},unsubscribe:function(d){g.some(this._subscribes,function(c,b,h){return c==d?(e.unsubscribe(d),h.splice(b,1),!0):!1})},onSetStore:function(d){},destroy:function(){g.forEach(this._connects,e.disconnect);g.forEach(this._subscribes,e.unsubscribe);delete this._connects;delete this._subscribes;delete this.option;delete this.privates}})})},"dojox/grid/cells/dijit":function(){define("dojo/_base/kernel ../../main dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/json dojo/_base/connect dojo/_base/sniff dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/dom-geometry dojo/data/ItemFileReadStore dijit/form/DateTextBox dijit/form/TimeTextBox dijit/form/ComboBox dijit/form/CheckBox dijit/form/TextBox dijit/form/NumberSpinner dijit/form/NumberTextBox dijit/form/CurrencyTextBox dijit/form/HorizontalSlider dijit/form/_TextBoxMixin dijit/Editor ../util ./_base".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s,l,v,C,u,x,A,w,z,D,B,G){k={};var F=k._Widget=m("dojox.grid.cells._Widget",G,{widgetClass:C,constructor:function(a){this.widget=null;"string"==typeof this.widgetClass&&(p.deprecated("Passing a string to widgetClass is deprecated","pass the widget class object instead","2.0"),this.widgetClass=e.getObject(this.widgetClass))},formatEditing:function(a,b){this.needFormatNode(a,b);return"\x3cdiv\x3e\x3c/div\x3e"},getValue:function(a){return this.widget.get("value")},
_unescapeHTML:function(a){return a&&a.replace&&this.grid.escapeHTMLInData?a.replace(/&lt;/g,"\x3c").replace(/&amp;/g,"\x26"):a},setValue:function(a,b){if(this.widget&&this.widget.set)if(b=this._unescapeHTML(b),this.widget.onLoadDeferred){var c=this;this.widget.onLoadDeferred.addCallback(function(){c.widget.set("value",null===b?"":b)})}else this.widget.set("value",b);else this.inherited(arguments)},getWidgetProps:function(a){return e.mixin({dir:this.dir,lang:this.lang},this.widgetProps||{},{constraints:e.mixin({},
this.constraint)||{},required:(this.constraint||{}).required,value:this._unescapeHTML(a)})},createWidget:function(a,b,c){return new this.widgetClass(this.getWidgetProps(b),a)},attachWidget:function(a,b,c){a.appendChild(this.widget.domNode);this.setValue(c,b)},formatNode:function(a,b,c){if(!this.widgetClass)return b;this.widget?this.attachWidget.apply(this,arguments):this.widget=this.createWidget.apply(this,arguments);this.sizeWidget.apply(this,arguments);this.grid.views.renormalizeRow(c);this.grid.scroller.rowHeightChanged(c,
!0);this.focus()},sizeWidget:function(a,b,c){a=this.getNode(c);p.marginBox(this.widget.domNode,{w:r.get(a,"width")})},focus:function(a,b){this.widget&&setTimeout(e.hitch(this.widget,function(){B.fire(this,"focus");this.focusNode&&"INPUT"===this.focusNode.tagName&&z.selectInputText(this.focusNode)}),0)},_finish:function(a){this.inherited(arguments);B.removeNode(this.widget.domNode);b("ie")&&h.setSelectable(this.widget.domNode,!0)}});F.markupFactory=function(b,c){G.markupFactory(b,c);var f=e.trim(a.get(b,
"widgetProps")||""),l=e.trim(a.get(b,"constraint")||""),h=e.trim(a.get(b,"widgetClass")||"");f&&(c.widgetProps=d.fromJson(f));l&&(c.constraint=d.fromJson(l));h&&(c.widgetClass=e.getObject(h))};l=k.ComboBox=m("dojox.grid.cells.ComboBox",F,{widgetClass:l,getWidgetProps:function(a){var b=[];g.forEach(this.options,function(a){b.push({name:a,value:a})});var c=new q({data:{identifier:"name",items:b}});return e.mixin({},this.widgetProps||{},{value:a,store:c})},getValue:function(){var a=this.widget;a.set("displayedValue",
a.get("displayedValue"));return a.get("value")}});l.markupFactory=function(b,c){F.markupFactory(b,c);var f=e.trim(a.get(b,"options")||"");if(f){var d=f.split(",");d[0]!=f&&(c.options=d)}};t=k.DateTextBox=m("dojox.grid.cells.DateTextBox",F,{widgetClass:t,setValue:function(a,b){this.widget?this.widget.set("value",new Date(b)):this.inherited(arguments)},getWidgetProps:function(a){return e.mixin(this.inherited(arguments),{value:new Date(a)})}});t.markupFactory=function(a,b){F.markupFactory(a,b)};v=k.CheckBox=
m("dojox.grid.cells.CheckBox",F,{widgetClass:v,getValue:function(){return this.widget.checked},setValue:function(a,b){this.widget&&this.widget.attributeMap.checked?this.widget.set("checked",b):this.inherited(arguments)},sizeWidget:function(a,b,c){}});v.markupFactory=function(a,b){F.markupFactory(a,b)};D=k.Editor=m("dojox.grid.cells.Editor",F,{widgetClass:D,getWidgetProps:function(a){return e.mixin({},this.widgetProps||{},{height:this.widgetHeight||"100px"})},createWidget:function(a,b,c){a=new this.widgetClass(this.getWidgetProps(b),
a);a.onLoadDeferred.then(e.hitch(this,"populateEditor"));return a},formatNode:function(a,c,d){this.content=c;this.inherited(arguments);if(b("mozilla")){var e=this.widget;e.open();this.widgetToolbar&&f.place(e.toolbar.domNode,e.editingArea,"before")}},populateEditor:function(){this.widget.set("value",this.content);this.widget.placeCursorAtEnd()}});D.markupFactory=function(b,c){F.markupFactory(b,c);var f=e.trim(a.get(b,"widgetHeight")||"");f&&("auto"!=f&&"em"!=f.substr(-2)&&(f=parseInt(f,10)+"px"),
c.widgetHeight=f)};return k})},"dojo/data/ItemFileReadStore":function(){define("../_base/kernel ../_base/lang ../_base/declare ../_base/array ../_base/xhr ../Evented ./util/filter ./util/simpleFetch ../date/stamp".split(" "),function(p,k,m,g,e,d,c,b,h){m=m("dojo.data.ItemFileReadStore",[d],{constructor:function(a){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=!1;this.url=this._ccUrl=this._jsonFileUrl=a.url;this._jsonData=a.data;this.data=null;this._datatypeMap=a.typeMap||
{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return h.fromISOString(a)}});this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=!1;this._queuedFetches=[];void 0!==a.urlPreventCache&&(this.urlPreventCache=a.urlPreventCache?!0:!1);void 0!==a.hierarchical&&(this.hierarchical=a.hierarchical?
!0:!1);a.clearOnClose&&(this.clearOnClose=!0);"failOk"in a&&(this.failOk=a.failOk?!0:!1)},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:!1,urlPreventCache:!1,failOk:!1,hierarchical:!0,_assertIsItem:function(a){if(!this.isItem(a))throw Error(this.declaredClass+": Invalid item argument.");},_assertIsAttribute:function(a){if("string"!==typeof a)throw Error(this.declaredClass+": Invalid attribute argument.");},getValue:function(a,b,c){a=this.getValues(a,b);return 0<a.length?a[0]:c},getValues:function(a,
b){this._assertIsItem(a);this._assertIsAttribute(b);return(a[b]||[]).slice(0)},getAttributes:function(a){this._assertIsItem(a);var b=[],c;for(c in a)c!==this._storeRefPropName&&(c!==this._itemNumPropName&&c!==this._rootItemPropName&&c!==this._reverseRefMap)&&b.push(c);return b},hasAttribute:function(a,b){this._assertIsItem(a);this._assertIsAttribute(b);return b in a},containsValue:function(a,b,d){var e=void 0;"string"===typeof d&&(e=c.patternToRegExp(d,!1));return this._containsValue(a,b,d,e)},_containsValue:function(a,
b,c,d){return g.some(this.getValues(a,b),function(a){if(null!==a&&!k.isObject(a)&&d){if(a.toString().match(d))return!0}else if(c===a)return!0})},isItem:function(a){return a&&a[this._storeRefPropName]===this&&this._arrayOfAllItems[a[this._itemNumPropName]]===a?!0:!1},isItemLoaded:function(a){return this.isItem(a)},loadItem:function(a){this._assertIsItem(a.item)},getFeatures:function(){return this._features},getLabel:function(a){if(this._labelAttr&&this.isItem(a))return this.getValue(a,this._labelAttr)},
getLabelAttributes:function(a){return this._labelAttr?[this._labelAttr]:null},filter:function(a,b,d){var e=[],h,g;if(a.query){var k;h=a.queryOptions?a.queryOptions.ignoreCase:!1;var l={};for(g in a.query)k=a.query[g],"string"===typeof k?l[g]=c.patternToRegExp(k,h):k instanceof RegExp&&(l[g]=k);for(h=0;h<b.length;++h){var v=!0,m=b[h];if(null===m)v=!1;else for(g in a.query)k=a.query[g],this._containsValue(m,g,k,l[g])||(v=!1);v&&e.push(m)}}else for(h=0;h<b.length;++h)g=b[h],null!==g&&e.push(g);d(e,a)},
_fetchItems:function(a,b,c){var d=this;if(this._loadFinished)this.filter(a,this._getItemsArray(a.queryOptions),b);else if(this._jsonFileUrl!==this._ccUrl?(p.deprecated(this.declaredClass+": ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url),null!=this.data&&(this._jsonData=this.data,this.data=null),this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:a,
filter:k.hitch(d,"filter"),findCallback:k.hitch(d,b)});else{this._loadInProgress=!0;var h=e.get({url:d._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});h.addCallback(function(e){try{d._getItemsFromLoadedData(e),d._loadFinished=!0,d._loadInProgress=!1,d.filter(a,d._getItemsArray(a.queryOptions),b),d._handleQueuedFetches()}catch(h){d._loadFinished=!0,d._loadInProgress=!1,c(h,a)}});h.addErrback(function(b){d._loadInProgress=!1;c(b,a)});var g=null;a.abort&&
(g=a.abort);a.abort=function(){h&&-1===h.fired&&h.cancel();g&&g.call(a)}}else if(this._jsonData)try{this._loadFinished=!0,this._getItemsFromLoadedData(this._jsonData),this._jsonData=null,d.filter(a,this._getItemsArray(a.queryOptions),b)}catch(s){c(s,a)}else c(Error(this.declaredClass+": No JSON source data was provided as either URL or a nested Javascript object."),a)},_handleQueuedFetches:function(){if(0<this._queuedFetches.length){for(var a=0;a<this._queuedFetches.length;a++){var b=this._queuedFetches[a],
c=b.args,d=b.filter,b=b.findCallback;d?d(c,this._getItemsArray(c.queryOptions),b):this.fetchItemByIdentity(c)}this._queuedFetches=[]}},_getItemsArray:function(a){return a&&a.deep?this._arrayOfAllItems:this._arrayOfTopLevelItems},close:function(a){this.clearOnClose&&(this._loadFinished&&!this._loadInProgress)&&(this._arrayOfAllItems=[],this._arrayOfTopLevelItems=[],this._loadFinished=!1,this._itemsByIdentity=null,this._loadInProgress=!1,this._queuedFetches=[])},_getItemsFromLoadedData:function(a){function b(a){return null!==
a&&"object"===typeof a&&(!k.isArray(a)||d)&&!k.isFunction(a)&&(a.constructor==Object||k.isArray(a))&&"undefined"===typeof a._reference&&"undefined"===typeof a._type&&"undefined"===typeof a._value&&e.hierarchical}function c(a){e._arrayOfAllItems.push(a);for(var d in a){var h=a[d];if(h)if(k.isArray(h))for(var l=0;l<h.length;++l){var g=h[l];b(g)&&c(g)}else b(h)&&c(h)}}var d=!1,e=this;this._labelAttr=a.label;var h,g;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=a.items;for(h=0;h<this._arrayOfTopLevelItems.length;++h)g=
this._arrayOfTopLevelItems[h],k.isArray(g)&&(d=!0),c(g),g[this._rootItemPropName]=!0;var l={},v;for(h=0;h<this._arrayOfAllItems.length;++h)for(v in g=this._arrayOfAllItems[h],g){if(v!==this._rootItemPropName){var m=g[v];null!==m?k.isArray(m)||(g[v]=[m]):g[v]=[null]}l[v]=v}for(;l[this._storeRefPropName];)this._storeRefPropName+="_";for(;l[this._itemNumPropName];)this._itemNumPropName+="_";for(;l[this._reverseRefMap];)this._reverseRefMap+="_";if(l=a.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=
l;for(h=0;h<this._arrayOfAllItems.length;++h)if(g=this._arrayOfAllItems[h],a=g[l],a=a[0],Object.hasOwnProperty.call(this._itemsByIdentity,a)){if(this._jsonFileUrl)throw Error(this.declaredClass+":  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+l+"].  Value collided: ["+a+"]");if(this._jsonData)throw Error(this.declaredClass+":  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+
l+"].  Value collided: ["+a+"]");}else this._itemsByIdentity[a]=g}else this._features["dojo.data.api.Identity"]=Number;for(h=0;h<this._arrayOfAllItems.length;++h)g=this._arrayOfAllItems[h],g[this._storeRefPropName]=this,g[this._itemNumPropName]=h;for(h=0;h<this._arrayOfAllItems.length;++h)for(v in g=this._arrayOfAllItems[h],g){a=g[v];for(l=0;l<a.length;++l)if(m=a[l],null!==m&&"object"==typeof m){if("_type"in m&&"_value"in m){var u=m._type,p=this._datatypeMap[u];if(p)if(k.isFunction(p))a[l]=new p(m._value);
else if(k.isFunction(p.deserialize))a[l]=p.deserialize(m._value);else throw Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");else throw Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+u+"'");}if(m._reference){m=m._reference;if(k.isObject(m))for(u=0;u<this._arrayOfAllItems.length;++u){var p=this._arrayOfAllItems[u],A=!0,w;for(w in m)p[w]!=m[w]&&
(A=!1);A&&(a[l]=p)}else a[l]=this._getItemByIdentity(m);this.referenceIntegrity&&(m=a[l],this.isItem(m)&&this._addReferenceToMap(m,g,v))}else this.isItem(m)&&this.referenceIntegrity&&this._addReferenceToMap(m,g,v)}}},_addReferenceToMap:function(a,b,c){},getIdentity:function(a){var b=this._features["dojo.data.api.Identity"];return b===Number?a[this._itemNumPropName]:(a=a[b])?a[0]:null},fetchItemByIdentity:function(a){var b,c;if(this._loadFinished)b=this._getItemByIdentity(a.identity),a.onItem&&(c=
a.scope?a.scope:p.global,a.onItem.call(c,b));else{var d=this;this._jsonFileUrl!==this._ccUrl?(p.deprecated(this.declaredClass+": ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url);null!=this.data&&null==this._jsonData&&(this._jsonData=this.data,this.data=null);this._jsonFileUrl?this._loadInProgress?this._queuedFetches.push({args:a}):
(this._loadInProgress=!0,c=e.get({url:d._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk}),c.addCallback(function(c){var e=a.scope?a.scope:p.global;try{d._getItemsFromLoadedData(c),d._loadFinished=!0,d._loadInProgress=!1,b=d._getItemByIdentity(a.identity),a.onItem&&a.onItem.call(e,b),d._handleQueuedFetches()}catch(h){d._loadInProgress=!1,a.onError&&a.onError.call(e,h)}}),c.addErrback(function(b){d._loadInProgress=!1;a.onError&&a.onError.call(a.scope?
a.scope:p.global,b)})):this._jsonData&&(d._getItemsFromLoadedData(d._jsonData),d._jsonData=null,d._loadFinished=!0,b=d._getItemByIdentity(a.identity),a.onItem&&(c=a.scope?a.scope:p.global,a.onItem.call(c,b)))}},_getItemByIdentity:function(a){var b=null;this._itemsByIdentity?Object.hasOwnProperty.call(this._itemsByIdentity,a)&&(b=this._itemsByIdentity[a]):Object.hasOwnProperty.call(this._arrayOfAllItems,a)&&(b=this._arrayOfAllItems[a]);void 0===b&&(b=null);return b},getIdentityAttributes:function(a){a=
this._features["dojo.data.api.Identity"];return a===Number?null:[a]},_forceLoad:function(){var a=this;this._jsonFileUrl!==this._ccUrl?(p.deprecated(this.declaredClass+": ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url);null!=this.data&&(this._jsonData=this.data,this.data=null);if(this._jsonFileUrl){var b=e.get({url:this._jsonFileUrl,
handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:!0});b.addCallback(function(b){try{if(!0!==a._loadInProgress&&!a._loadFinished)a._getItemsFromLoadedData(b),a._loadFinished=!0;else if(a._loadInProgress)throw Error(this.declaredClass+":  Unable to perform a synchronous load, an async load is in progress.");}catch(c){throw c;}});b.addErrback(function(a){throw a;})}else this._jsonData&&(a._getItemsFromLoadedData(a._jsonData),a._jsonData=null,a._loadFinished=
!0)}});k.extend(m,b);return m})},"dijit/form/DateTextBox":function(){define(["dojo/_base/declare","../Calendar","./_DateTimeTextBox"],function(p,k,m){return p("dijit.form.DateTextBox",m,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:k,_selector:"date",maxHeight:Infinity,value:new Date("")})})},"dijit/Calendar":function(){define("dojo/_base/array dojo/date dojo/date/locale dojo/_base/declare dojo/dom-attr dojo/dom-class dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/sniff ./CalendarLite ./_Widget ./_CssStateMixin ./_TemplatedMixin ./form/DropDownButton".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s){var l=g("dijit.Calendar",[r,n,q],{cssStateNodes:{decrementMonth:"dijitCalendarArrow",incrementMonth:"dijitCalendarArrow",previousYearLabelNode:"dijitCalendarPreviousYear",nextYearLabelNode:"dijitCalendarNextYear"},setValue:function(a){c.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",a)},_createMonthWidget:function(){return new l._MonthDropDownButton({id:this.id+"_mddb",tabIndex:-1,onMonthSelect:h.hitch(this,
"_onMonthSelect"),lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode)},postCreate:function(){this.inherited(arguments);this.own(a(this.domNode,"keydown",h.hitch(this,"_onKeyDown")),a(this.dateRowsNode,"mouseover",h.hitch(this,"_onDayMouseOver")),a(this.dateRowsNode,"mouseout",h.hitch(this,"_onDayMouseOut")),a(this.dateRowsNode,"mousedown",h.hitch(this,"_onDayMouseDown")),a(this.dateRowsNode,"mouseup",h.hitch(this,"_onDayMouseUp")))},_onMonthSelect:function(a){var b=new this.dateClassObj(this.currentFocus);
b.setDate(1);b.setMonth(a);a=this.dateModule.getDaysInMonth(b);var c=this.currentFocus.getDate();b.setDate(Math.min(c,a));this._setCurrentFocusAttr(b)},_onDayMouseOver:function(a){if((a=d.contains(a.target,"dijitCalendarDateLabel")?a.target.parentNode:a.target)&&(a.dijitDateValue&&!d.contains(a,"dijitCalendarDisabledDate")||a==this.previousYearLabelNode||a==this.nextYearLabelNode))d.add(a,"dijitCalendarHoveredDate"),this._currentNode=a},_onDayMouseOut:function(a){this._currentNode&&!(a.relatedTarget&&
a.relatedTarget.parentNode==this._currentNode)&&(a="dijitCalendarHoveredDate",d.contains(this._currentNode,"dijitCalendarActiveDate")&&(a+=" dijitCalendarActiveDate"),d.remove(this._currentNode,a),this._currentNode=null)},_onDayMouseDown:function(a){if((a=a.target.parentNode)&&a.dijitDateValue&&!d.contains(a,"dijitCalendarDisabledDate"))d.add(a,"dijitCalendarActiveDate"),this._currentNode=a},_onDayMouseUp:function(a){(a=a.target.parentNode)&&a.dijitDateValue&&d.remove(a,"dijitCalendarActiveDate")},
handleKey:function(a){var c=-1,d,f=this.currentFocus;switch(a.keyCode){case b.RIGHT_ARROW:c=1;case b.LEFT_ARROW:d="day";this.isLeftToRight()||(c*=-1);break;case b.DOWN_ARROW:c=1;case b.UP_ARROW:d="week";break;case b.PAGE_DOWN:c=1;case b.PAGE_UP:d=a.ctrlKey||a.altKey?"year":"month";break;case b.END:f=this.dateModule.add(f,"month",1),d="day";case b.HOME:f=new this.dateClassObj(f);f.setDate(1);break;default:return!0}d&&(f=this.dateModule.add(f,d,c));this._setCurrentFocusAttr(f);return!1},_onKeyDown:function(a){this.handleKey(a)||
(a.stopPropagation(),a.preventDefault())},onValueSelected:function(){},onChange:function(a){this.onValueSelected(a)},getClassForDate:function(){}});l._MonthDropDownButton=g("dijit.Calendar._MonthDropDownButton",s,{onMonthSelect:function(){},postCreate:function(){this.inherited(arguments);this.dropDown=new l._MonthDropDown({id:this.id+"_mdd",onChange:this.onMonthSelect})},_setMonthAttr:function(a){var b=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,a);this.dropDown.set("months",
b);this.containerNode.innerHTML=(6==f("ie")?"":"\x3cdiv class\x3d'dijitSpacer'\x3e"+this.dropDown.domNode.innerHTML+"\x3c/div\x3e")+"\x3cdiv class\x3d'dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'\x3e"+b[a.getMonth()]+"\x3c/div\x3e"}});l._MonthDropDown=g("dijit.Calendar._MonthDropDown",[n,t],{months:[],templateString:"\x3cdiv class\x3d'dijitCalendarMonthMenu dijitMenu' data-dojo-attach-event\x3d'onclick:_onClick,onmouseover:_onMenuHover,onmouseout:_onMenuHover'\x3e\x3c/div\x3e",_setMonthsAttr:function(a){this.domNode.innerHTML=
p.map(a,function(a,b){return a?"\x3cdiv class\x3d'dijitCalendarMonthLabel' month\x3d'"+b+"'\x3e"+a+"\x3c/div\x3e":""}).join("")},_onClick:function(a){this.onChange(e.get(a.target,"month"))},onChange:function(){},_onMenuHover:function(a){d.toggle(a.target,"dijitCalendarMonthLabelHover","mouseover"==a.type)}});return l})},"dojo/date":function(){define(["./has","./_base/lang"],function(p,k){var m={getDaysInMonth:function(g){var e=g.getMonth();return 1==e&&m.isLeapYear(g)?29:[31,28,31,30,31,30,31,31,
30,31,30,31][e]},isLeapYear:function(g){g=g.getFullYear();return!(g%400)||!(g%4)&&!!(g%100)},getTimezoneName:function(g){var e=g.toString(),d="",c=e.indexOf("(");if(-1<c)d=e.substring(++c,e.indexOf(")"));else if(c=/([A-Z\/]+) \d{4}$/,e=e.match(c))d=e[1];else if(e=g.toLocaleString(),c=/ ([A-Z\/]+)$/,e=e.match(c))d=e[1];return"AM"==d||"PM"==d?"":d},compare:function(g,e,d){g=new Date(+g);e=new Date(+(e||new Date));"date"==d?(g.setHours(0,0,0,0),e.setHours(0,0,0,0)):"time"==d&&(g.setFullYear(0,0,0),e.setFullYear(0,
0,0));return g>e?1:g<e?-1:0},add:function(g,e,d){var c=new Date(+g),b=!1,h="Date";switch(e){case "day":break;case "weekday":var a;(e=d%5)?a=parseInt(d/5):(e=0<d?5:-5,a=0<d?(d-5)/5:(d+5)/5);var f=g.getDay(),k=0;6==f&&0<d?k=1:0==f&&0>d&&(k=-1);f+=e;if(0==f||6==f)k=0<d?2:-2;d=7*a+e+k;break;case "year":h="FullYear";b=!0;break;case "week":d*=7;break;case "quarter":d*=3;case "month":b=!0;h="Month";break;default:h="UTC"+e.charAt(0).toUpperCase()+e.substring(1)+"s"}if(h)c["set"+h](c["get"+h]()+d);b&&c.getDate()<
g.getDate()&&c.setDate(0);return c},difference:function(g,e,d){e=e||new Date;d=d||"day";var c=e.getFullYear()-g.getFullYear(),b=1;switch(d){case "quarter":g=g.getMonth();e=e.getMonth();g=Math.floor(g/3)+1;e=Math.floor(e/3)+1;b=e+4*c-g;break;case "weekday":c=Math.round(m.difference(g,e,"day"));d=parseInt(m.difference(g,e,"week"));b=c%7;if(0==b)c=5*d;else{var h=0,a=g.getDay();e=e.getDay();d=parseInt(c/7);b=c%7;g=new Date(g);g.setDate(g.getDate()+7*d);g=g.getDay();if(0<c)switch(!0){case 6==a:h=-1;break;
case 0==a:h=0;break;case 6==e:h=-1;break;case 0==e:h=-2;break;case 5<g+b:h=-2}else if(0>c)switch(!0){case 6==a:h=0;break;case 0==a:h=1;break;case 6==e:h=2;break;case 0==e:h=1;break;case 0>g+b:h=2}c=c+h-2*d}b=c;break;case "year":b=c;break;case "month":b=e.getMonth()-g.getMonth()+12*c;break;case "week":b=parseInt(m.difference(g,e,"day")/7);break;case "day":b/=24;case "hour":b/=60;case "minute":b/=60;case "second":b/=1E3;case "millisecond":b*=e.getTime()-g.getTime()}return Math.round(b)}};k.mixin(k.getObject("dojo.date",
!0),m);return m})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),function(p,k,m,g,e,d,c,b,h){function a(a,b,d,f){return f.replace(/([a-z])\1*/ig,function(e){var h,q,k=e.charAt(0);e=e.length;var r=["abbr","wide","narrow"];switch(k){case "G":h=b[4>e?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":h=a.getFullYear();switch(e){case 1:break;case 2:if(!d.fullYear){h=
String(h);h=h.substr(h.length-2);break}default:q=!0}break;case "Q":case "q":h=Math.ceil((a.getMonth()+1)/3);q=!0;break;case "M":case "L":h=a.getMonth();3>e?(h+=1,q=!0):(k=["months","L"==k?"standAlone":"format",r[e-3]].join("-"),h=b[k][h]);break;case "w":h=n._getWeekOfYear(a,0);q=!0;break;case "d":h=a.getDate();q=!0;break;case "D":h=n._getDayOfYear(a);q=!0;break;case "e":case "c":if(h=a.getDay(),2>e){h=(h-g.getFirstDayOfWeek(d.locale)+8)%7;break}case "E":h=a.getDay();3>e?(h+=1,q=!0):(k=["days","c"==
k?"standAlone":"format",r[e-3]].join("-"),h=b[k][h]);break;case "a":k=12>a.getHours()?"am":"pm";h=d[k]||b["dayPeriods-format-wide-"+k];break;case "h":case "H":case "K":case "k":q=a.getHours();switch(k){case "h":h=q%12||12;break;case "H":h=q;break;case "K":h=q%12;break;case "k":h=q||24}q=!0;break;case "m":h=a.getMinutes();q=!0;break;case "s":h=a.getSeconds();q=!0;break;case "S":h=Math.round(a.getMilliseconds()*Math.pow(10,e-3));q=!0;break;case "v":case "z":if(h=n._getZone(a,!0,d))break;e=4;case "Z":k=
n._getZone(a,!1,d);k=[0>=k?"+":"-",c.pad(Math.floor(Math.abs(k)/60),2),c.pad(Math.abs(k)%60,2)];4==e&&(k.splice(0,0,"GMT"),k.splice(3,0,":"));h=k.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+f);}q&&(h=c.pad(h,e));return h})}function f(a,b,c,d){var f=function(a){return a};b=b||f;c=c||f;d=d||f;var e=a.match(/(''|[^'])+/g),h="'"==a.charAt(0);k.forEach(e,function(a,d){a?(e[d]=(h?c:b)(a.replace(/''/g,"'")),h=!h):e[d]=""});return d(e.join(""))}function r(a,b,c,f){f=
d.escapeString(f);c.strict||(f=f.replace(" a"," ?a"));return f.replace(/([a-z])\1*/ig,function(d){var f;f=d.charAt(0);var e=d.length,h="",g="";c.strict?(1<e&&(h="0{"+(e-1)+"}"),2<e&&(g="0{"+(e-2)+"}")):(h="0?",g="0{0,2}");switch(f){case "y":f="\\d{2,4}";break;case "M":case "L":f=2<e?"\\S+?":"1[0-2]|"+h+"[1-9]";break;case "D":f="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+h+"[1-9][0-9]|"+g+"[1-9]";break;case "d":f="3[01]|[12]\\d|"+h+"[1-9]";break;case "w":f="[1-4][0-9]|5[0-3]|"+h+"[1-9]";break;case "E":case "e":case "c":f=
".+?";break;case "h":f="1[0-2]|"+h+"[1-9]";break;case "k":f="1[01]|"+h+"\\d";break;case "H":f="1\\d|2[0-3]|"+h+"\\d";break;case "K":f="1\\d|2[0-4]|"+h+"[1-9]";break;case "m":case "s":f="[0-5]\\d";break;case "S":f="\\d{"+e+"}";break;case "a":e=c.am||b["dayPeriods-format-wide-am"];h=c.pm||b["dayPeriods-format-wide-pm"];f=e+"|"+h;c.strict||(e!=e.toLowerCase()&&(f+="|"+e.toLowerCase()),h!=h.toLowerCase()&&(f+="|"+h.toLowerCase()),-1!=f.indexOf(".")&&(f+="|"+f.replace(/\./g,"")));f=f.replace(/\./g,"\\.");
break;default:f=".*"}a&&a.push(d);return"("+f+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var n={};p.setObject(h.id.replace(/\//g,"."),n);n._getZone=function(a,b,c){return b?m.getTimezoneName(a):a.getTimezoneOffset()};n.format=function(b,c){c=c||{};var d=e.normalizeLocale(c.locale),h=c.formatLength||"short",d=n._getGregorianBundle(d),g=[],q=p.hitch(this,a,b,d,c);if("year"==c.selector)return f(d["dateFormatItem-yyyy"]||"yyyy",q);var k;"date"!=c.selector&&(k=c.timePattern||d["timeFormat-"+h])&&g.push(f(k,
q));"time"!=c.selector&&(k=c.datePattern||d["dateFormat-"+h])&&g.push(f(k,q));return 1==g.length?g[0]:d["dateTimeFormat-"+h].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(a,b){return g[b]})};n.regexp=function(a){return n._parseInfo(a).regexp};n._parseInfo=function(a){a=a||{};var b=e.normalizeLocale(a.locale),b=n._getGregorianBundle(b),c=a.formatLength||"short",d=a.datePattern||b["dateFormat-"+c],h=a.timePattern||b["timeFormat-"+c],c="date"==a.selector?d:"time"==a.selector?h:b["dateTimeFormat-"+
c].replace(/\{(\d+)\}/g,function(a,b){return[h,d][b]}),g=[];return{regexp:f(c,p.hitch(this,r,g,b,a)),tokens:g,bundle:b}};n.parse=function(a,b){var c=/[\u200E\u200F\u202A\u202E]/g,d=n._parseInfo(b),f=d.tokens,e=d.bundle,c=RegExp("^"+d.regexp.replace(c,"")+"$",d.strict?"":"i").exec(a&&a.replace(c,""));if(!c)return null;var h=["abbr","wide","narrow"],g=[1970,0,1,0,0,0,0],q="",c=k.every(c,function(a,c){if(!c)return!0;var d=f[c-1],y=d.length,d=d.charAt(0);switch(d){case "y":if(2!=y&&b.strict)g[0]=a;else if(100>
a)a=Number(a),d=""+(new Date).getFullYear(),y=100*d.substring(0,2),d=Math.min(Number(d.substring(2,4))+20,99),g[0]=a<d?y+a:y-100+a;else{if(b.strict)return!1;g[0]=a}break;case "M":case "L":if(2<y){if(y=e["months-"+("L"==d?"standAlone":"format")+"-"+h[y-3]].concat(),b.strict||(a=a.replace(".","").toLowerCase(),y=k.map(y,function(a){return a.replace(".","").toLowerCase()})),a=k.indexOf(y,a),-1==a)return!1}else a--;g[1]=a;break;case "E":case "e":case "c":y=e["days-"+("c"==d?"standAlone":"format")+"-"+
h[y-3]].concat();b.strict||(a=a.toLowerCase(),y=k.map(y,function(a){return a.toLowerCase()}));a=k.indexOf(y,a);if(-1==a)return!1;break;case "D":g[1]=0;case "d":g[2]=a;break;case "a":y=b.am||e["dayPeriods-format-wide-am"];d=b.pm||e["dayPeriods-format-wide-pm"];if(!b.strict){var n=/\./g;a=a.replace(n,"").toLowerCase();y=y.replace(n,"").toLowerCase();d=d.replace(n,"").toLowerCase()}if(b.strict&&a!=y&&a!=d)return!1;q=a==d?"p":a==y?"a":"";break;case "K":24==a&&(a=0);case "h":case "H":case "k":if(23<a)return!1;
g[3]=a;break;case "m":g[4]=a;break;case "s":g[5]=a;break;case "S":g[6]=a}return!0}),d=+g[3];"p"===q&&12>d?g[3]=d+12:"a"===q&&12==d&&(g[3]=0);d=new Date(g[0],g[1],g[2],g[3],g[4],g[5],g[6]);b.strict&&d.setFullYear(g[0]);var r=f.join(""),p=-1!=r.indexOf("d"),r=-1!=r.indexOf("M");if(!c||r&&d.getMonth()>g[1]||p&&d.getDate()>g[2])return null;if(r&&d.getMonth()<g[1]||p&&d.getDate()<g[2])d=m.add(d,"hour",1);return d};var q=[],t={};n.addCustomFormats=function(a,b){q.push({pkg:a,name:b});t={}};n._getGregorianBundle=
function(a){if(t[a])return t[a];var b={};k.forEach(q,function(c){c=e.getLocalization(c.pkg,c.name,a);b=p.mixin(b,c)},this);return t[a]=b};n.addCustomFormats(h.id.replace(/\/date\/locale$/,".cldr"),"gregorian");n.getNames=function(a,b,c,d){var f;d=n._getGregorianBundle(d);a=[a,c,b];"standAlone"==c&&(c=a.join("-"),f=d[c],1==f[0]&&(f=void 0));a[1]="format";return(f||d[a.join("-")]).concat()};n.isWeekend=function(a,b){var c=g.getWeekend(b),d=(a||new Date).getDay();c.end<c.start&&(c.end+=7,d<c.start&&
(d+=7));return d>=c.start&&d<=c.end};n._getDayOfYear=function(a){return m.difference(new Date(a.getFullYear(),0,1,a.getHours()),a)+1};n._getWeekOfYear=function(a,b){1==arguments.length&&(b=0);var c=(new Date(a.getFullYear(),0,1)).getDay(),d=Math.floor((n._getDayOfYear(a)+(c-b+7)%7-1)/7);c==b&&d++;return d};return n})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(p,k){var m={};p.setObject("dojo.cldr.supplemental",m);m.getFirstDayOfWeek=function(g){g={bd:5,mv:5,ae:6,
af:6,bh:6,dj:6,dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,pr:0,py:0,sg:0,sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[m._region(g)];return void 0===g?1:g};m._region=function(g){g=k.normalizeLocale(g);g=g.split("-");var e=g[1];e?4==e.length&&
(e=g[2]):e={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",fa:"ir",ff:"sn",fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb",ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",
ik:"us","in":"id",is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",mn:"mn",mo:"ro",mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no",no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",
qu:"pe",rm:"ch",rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",ur:"pk",uz:"uz",ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id",ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",
bbc:"id",bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",crk:"ca",csb:"pl",dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf",ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",
gez:"et",gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",khq:"ml",kht:"in",kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru",kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",
lif:"np",lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",nds:"de","new":"np",niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph",pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",
saf:"gh",sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",teo:"ug",tet:"tl",tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv",twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",
wal:"et",war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[g[0]];return e};m.getWeekend=function(g){var e=m._region(g);g={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[e];e={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[e];void 0===g&&(g=6);void 0===e&&(e=0);return{start:g,end:e}};return m})},"dijit/CalendarLite":function(){define("dojo/_base/array dojo/_base/declare dojo/cldr/supplemental dojo/date dojo/date/locale dojo/date/stamp dojo/dom dojo/dom-class dojo/_base/lang dojo/on dojo/sniff dojo/string ./_WidgetBase ./_TemplatedMixin dojo/text!./templates/Calendar.html ./a11yclick ./hccss".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t){var s=k("dijit.CalendarLite",[n,q],{templateString:t,dowTemplateString:'\x3cth class\x3d"dijitReset dijitCalendarDayLabelTemplate" role\x3d"columnheader" scope\x3d"col"\x3e\x3cspan class\x3d"dijitCalendarDayLabel"\x3e${d}\x3c/span\x3e\x3c/th\x3e',dateTemplateString:'\x3ctd class\x3d"dijitReset" role\x3d"gridcell" data-dojo-attach-point\x3d"dateCells"\x3e\x3cspan class\x3d"dijitCalendarDateLabel" data-dojo-attach-point\x3d"dateLabels"\x3e\x3c/span\x3e\x3c/td\x3e',
weekTemplateString:'\x3ctr class\x3d"dijitReset dijitCalendarWeekTemplate" role\x3d"row"\x3e${d}${d}${d}${d}${d}${d}${d}\x3c/tr\x3e',value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",currentFocus:new Date,_setSummaryAttr:"gridNode",baseClass:"dijitCalendar",_isValidDate:function(a){return a&&!isNaN(a)&&"object"==typeof a&&a.toString()!=this.constructor.prototype.value.toString()},_getValueAttr:function(){var a=this._get("value");if(a&&!isNaN(a)){var b=new this.dateClassObj(a);b.setHours(0,
0,0,0);b.getDate()<a.getDate()&&(b=this.dateModule.add(b,"hour",1));return b}return null},_setValueAttr:function(a,b){"string"==typeof a&&(a=d.fromISOString(a));a=this._patchDate(a);if(this._isValidDate(a)&&!this.isDisabledDate(a,this.lang)){if(this._set("value",a),this.set("currentFocus",a),this._markSelectedDates([a]),this._created&&(b||"undefined"==typeof b))this.onChange(this.get("value"))}else this._set("value",null),this._markSelectedDates([])},_patchDate:function(a){a&&(a=new this.dateClassObj(a),
a.setHours(1,0,0,0));return a},_setText:function(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(a.ownerDocument.createTextNode(b))},_populateGrid:function(){var a=new this.dateClassObj(this.currentFocus);a.setDate(1);var b=a.getDay(),c=this.dateModule.getDaysInMonth(a),d=this.dateModule.getDaysInMonth(this.dateModule.add(a,"month",-1)),f=new this.dateClassObj,e=m.getFirstDayOfWeek(this.lang);e>b&&(e-=7);if(!this.summary){var h=this.dateLocaleModule.getNames("months","wide","standAlone",
this.lang,a);this.gridNode.setAttribute("summary",h[a.getMonth()])}this._date2cell={};p.forEach(this.dateCells,function(h,g){var n=g+e,q=new this.dateClassObj(a),k="dijitCalendar",r=0;n<b?(n=d-b+n+1,r=-1,k+="Previous"):n>=b+c?(n=n-b-c+1,r=1,k+="Next"):(n=n-b+1,k+="Current");r&&(q=this.dateModule.add(q,"month",r));q.setDate(n);this.dateModule.compare(q,f,"date")||(k="dijitCalendarCurrentDate "+k);this.isDisabledDate(q,this.lang)?(k="dijitCalendarDisabledDate "+k,h.setAttribute("aria-disabled","true")):
(k="dijitCalendarEnabledDate "+k,h.removeAttribute("aria-disabled"),h.setAttribute("aria-selected","false"));(r=this.getClassForDate(q,this.lang))&&(k=r+" "+k);h.className=k+"Month dijitCalendarDateTemplate";k=q.valueOf();this._date2cell[k]=h;h.dijitDateValue=k;this._setText(this.dateLabels[g],q.getDateLocalized?q.getDateLocalized(this.lang):q.getDate())},this)},_populateControls:function(){var a=new this.dateClassObj(this.currentFocus);a.setDate(1);this.monthWidget.set("month",a);var b=a.getFullYear()-
1,c=new this.dateClassObj;p.forEach(["previous","current","next"],function(a){c.setFullYear(b++);this._setText(this[a+"YearLabelNode"],this.dateLocaleModule.format(c,{selector:"year",locale:this.lang}))},this)},goToToday:function(){this.set("value",new this.dateClassObj)},constructor:function(a){this.dateModule=a.datePackage?h.getObject(a.datePackage,!1):g;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=a.datePackage?h.getObject(a.datePackage+".locale",!1):e},_createMonthWidget:function(){return s._MonthWidget({id:this.id+
"_mddb",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode)},buildRendering:function(){var a=this.dowTemplateString,b=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),d=m.getFirstDayOfWeek(this.lang);this.dayCellsHtml=r.substitute([a,a,a,a,a,a,a].join(""),{d:""},function(){return b[d++%7]});a=r.substitute(this.weekTemplateString,{d:this.dateTemplateString});this.dateRowsHtml=[a,a,a,a,a,a].join("");this.dateCells=[];this.dateLabels=[];this.inherited(arguments);
c.setSelectable(this.domNode,!1);a=new this.dateClassObj(this.currentFocus);this.monthWidget=this._createMonthWidget();this.set("currentFocus",a,!1)},postCreate:function(){this.inherited(arguments);this._connectControls()},_connectControls:function(){var b=h.hitch(this,function(b,c,d){return a(this[b],"click",h.hitch(this,function(){this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,c,d))}))});this.own(b("incrementMonth","month",1),b("decrementMonth","month",-1),b("nextYearLabelNode",
"year",1),b("previousYearLabelNode","year",-1))},_setCurrentFocusAttr:function(a,b){var c=this.currentFocus,d=this._getNodeByDate(c);a=this._patchDate(a);this._set("currentFocus",a);if(!this._date2cell||0!=this.dateModule.difference(c,a,"month"))this._populateGrid(),this._populateControls(),this._markSelectedDates([this.value]);c=this._getNodeByDate(a);c.setAttribute("tabIndex",this.tabIndex);(this.focused||b)&&c.focus();d&&d!=c&&(f("webkit")?d.setAttribute("tabIndex","-1"):d.removeAttribute("tabIndex"))},
focus:function(){this._setCurrentFocusAttr(this.currentFocus,!0)},_onDayClick:function(a){a.stopPropagation();a.preventDefault();for(a=a.target;a&&!a.dijitDateValue;a=a.parentNode);a&&!b.contains(a,"dijitCalendarDisabledDate")&&this.set("value",a.dijitDateValue)},_getNodeByDate:function(a){return(a=this._patchDate(a))&&this._date2cell?this._date2cell[a.valueOf()]:null},_markSelectedDates:function(a){function c(a,d){b.toggle(d,"dijitCalendarSelectedDate",a);d.setAttribute("aria-selected",a?"true":
"false")}p.forEach(this._selectedCells||[],h.partial(c,!1));this._selectedCells=p.filter(p.map(a,this._getNodeByDate,this),function(a){return a});p.forEach(this._selectedCells,h.partial(c,!0))},onChange:function(){},isDisabledDate:function(){},getClassForDate:function(){}});s._MonthWidget=k("dijit.CalendarLite._MonthWidget",n,{_setMonthAttr:function(a){var b=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,a),c=6==f("ie")?"":"\x3cdiv class\x3d'dijitSpacer'\x3e"+p.map(b,function(a){return"\x3cdiv\x3e"+
a+"\x3c/div\x3e"}).join("")+"\x3c/div\x3e";this.domNode.innerHTML=c+"\x3cdiv class\x3d'dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'\x3e"+b[a.getMonth()]+"\x3c/div\x3e"}});return s})},"dijit/form/_DateTimeTextBox":function(){define("dojo/date dojo/date/locale dojo/date/stamp dojo/_base/declare dojo/_base/lang ./RangeBoundTextBox ../_HasDropDown dojo/text!./templates/DropDownBox.html".split(" "),function(p,k,m,g,e,d,c,b){new Date("X");return g("dijit.form._DateTimeTextBox",[d,c],{templateString:b,
hasDownArrow:!0,cssStateNodes:{_buttonNode:"dijitDownArrowButton"},pattern:k.regexp,datePackage:"",postMixInProperties:function(){this.inherited(arguments);this._set("type","text")},compare:function(b,a){var c=this._isInvalidDate(b),d=this._isInvalidDate(a);return c?d?0:-1:d?1:p.compare(b,a,this._selector)},autoWidth:!0,format:function(b,a){return!b?"":this.dateLocaleModule.format(b,a)},parse:function(b,a){return this.dateLocaleModule.parse(b,a)||(this._isEmpty(b)?null:void 0)},serialize:function(b,
a){b.toGregorian&&(b=b.toGregorian());return m.toISOString(b,a)},dropDownDefaultValue:new Date,value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(b){b=b||{};this.dateModule=b.datePackage?e.getObject(b.datePackage,!1):p;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=b.datePackage?e.getObject(b.datePackage+".locale",!1):k;this._set("pattern",this.dateLocaleModule.regexp);this._invalidDate=this.constructor.prototype.value.toString()},buildRendering:function(){this.inherited(arguments);
this.hasDownArrow||(this._buttonNode.style.display="none");this.hasDownArrow||(this._buttonNode=this.domNode,this.baseClass+=" dijitComboBoxOpenOnClick")},_setConstraintsAttr:function(b){b.selector=this._selector;b.fullYear=!0;var a=m.fromISOString;"string"==typeof b.min&&(b.min=a(b.min));"string"==typeof b.max&&(b.max=a(b.max));this.inherited(arguments)},_isInvalidDate:function(b){return!b||isNaN(b)||"object"!=typeof b||b.toString()==this._invalidDate},_setValueAttr:function(b,a,c){void 0!==b&&("string"==
typeof b&&(b=m.fromISOString(b)),this._isInvalidDate(b)&&(b=null),b instanceof Date&&!(this.dateClassObj instanceof Date)&&(b=new this.dateClassObj(b)));this.inherited(arguments);this.value instanceof Date&&(this.filterString="");this.dropDown&&this.dropDown.set("value",b,!1)},_set:function(b,a){var c=this._get("value");"value"==b&&c instanceof Date&&0==this.compare(a,c)||this.inherited(arguments)},_setDropDownDefaultValueAttr:function(b){this._isInvalidDate(b)&&(b=new this.dateClassObj);this._set("dropDownDefaultValue",
b)},openDropDown:function(b){this.dropDown&&this.dropDown.destroy();var a=e.isString(this.popupClass)?e.getObject(this.popupClass,!1):this.popupClass,c=this,d=this.get("value");this.dropDown=new a({onChange:function(a){c.set("value",a,!0)},id:this.id+"_popup",dir:c.dir,lang:c.lang,value:d,textDir:c.textDir,currentFocus:!this._isInvalidDate(d)?d:this.dropDownDefaultValue,constraints:c.constraints,filterString:c.filterString,datePackage:c.datePackage,isDisabledDate:function(a){return!c.rangeCheck(a,
c.constraints)}});this.inherited(arguments)},_getDisplayedValueAttr:function(){return this.textbox.value},_setDisplayedValueAttr:function(b,a){this._setValueAttr(this.parse(b,this.constraints),a,b)}})})},"dijit/form/TimeTextBox":function(){define(["dojo/_base/declare","dojo/keys","dojo/_base/lang","../_TimePicker","./_DateTimeTextBox"],function(p,k,m,g,e){return p("dijit.form.TimeTextBox",e,{baseClass:"dijitTextBox dijitComboBox dijitTimeTextBox",popupClass:g,_selector:"time",value:new Date(""),maxHeight:-1,
_onInput:function(){this.inherited(arguments);var d=this.get("displayedValue");this.filterString=d&&!this.parse(d,this.constraints)?d.toLowerCase():"";this._opened&&this.closeDropDown();this.openDropDown()}})})},"dijit/_TimePicker":function(){define("dojo/_base/array dojo/date dojo/date/locale dojo/date/stamp dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/_base/kernel dojo/keys dojo/_base/lang dojo/sniff dojo/query dojo/mouse dojo/on ./_WidgetBase ./form/_ListMouseMixin".split(" "),function(p,
k,m,g,e,d,c,b,h,a,f,r,n,q,t,s){return e("dijit._TimePicker",[t,s],{baseClass:"dijitTimePicker",clickableIncrement:"T00:15:00",visibleIncrement:"T01:00:00",value:new Date,_visibleIncrement:2,_clickableIncrement:1,_totalIncrements:10,constraints:{},serialize:g.toISOString,buildRendering:function(){this.inherited(arguments);this.timeMenu=this.containerNode=this.domNode},setValue:function(a){b.deprecated("dijit._TimePicker:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",
a)},_setValueAttr:function(a){this._set("value",a);this._showText()},_setFilterStringAttr:function(a){this._set("filterString",a);this._showText()},isDisabledDate:function(){return!1},_getFilteredNodes:function(a,b,c,d){a=[];for(b=0;b<this._maxIncrement;b++)(c=this._createOption(b))&&a.push(c);return a},_showText:function(){var a=g.fromISOString;this.domNode.innerHTML="";this._clickableIncrementDate=a(this.clickableIncrement);this._visibleIncrementDate=a(this.visibleIncrement);var b=3600*this._clickableIncrementDate.getHours()+
60*this._clickableIncrementDate.getMinutes()+this._clickableIncrementDate.getSeconds(),c=3600*this._visibleIncrementDate.getHours()+60*this._visibleIncrementDate.getMinutes()+this._visibleIncrementDate.getSeconds();(this.value||this.currentFocus).getTime();this._refDate=a("T00:00:00");this._refDate.setFullYear(1970,0,1);this._clickableIncrement=1;this._visibleIncrement=c/b;this._maxIncrement=86400/b;a=this._getFilteredNodes();p.forEach(a,function(a){this.domNode.appendChild(a)},this);!a.length&&this.filterString&&
(this.filterString="",this._showText())},constructor:function(){this.constraints={}},postMixInProperties:function(){this.inherited(arguments);this._setConstraintsAttr(this.constraints)},_setConstraintsAttr:function(a){for(var b in{clickableIncrement:1,visibleIncrement:1})b in a&&(this[b]=a[b]);a.locale||(a.locale=this.lang)},_createOption:function(a){var b=new Date(this._refDate),f=this._clickableIncrementDate;b.setHours(b.getHours()+f.getHours()*a,b.getMinutes()+f.getMinutes()*a,b.getSeconds()+f.getSeconds()*
a);"time"==this.constraints.selector&&b.setFullYear(1970,0,1);f=m.format(b,this.constraints);if(this.filterString&&0!==f.toLowerCase().indexOf(this.filterString))return null;var e=this.ownerDocument.createElement("div");e.className=this.baseClass+"Item";e.date=b;e.idx=a;c.create("div",{"class":this.baseClass+"ItemInner",innerHTML:f},e);1>a%this._visibleIncrement&&-1<a%this._visibleIncrement?d.add(e,this.baseClass+"Marker"):a%this._clickableIncrement||d.add(e,this.baseClass+"Tick");this.isDisabledDate(b)&&
d.add(e,this.baseClass+"ItemDisabled");this.value&&!k.compare(this.value,b,this.constraints.selector)&&(e.selected=!0,d.add(e,this.baseClass+"ItemSelected"),this._selectedDiv=e,d.contains(e,this.baseClass+"Marker")?d.add(e,this.baseClass+"MarkerSelected"):d.add(e,this.baseClass+"TickSelected"),this._highlightOption(e,!0));return e},onOpen:function(){this.inherited(arguments);this.set("selected",this._selectedDiv)},_onOptionSelected:function(a){if((a=a.target.date||a.target.parentNode.date)&&!this.isDisabledDate(a))this._highlighted_option=
null,this.set("value",a),this.onChange(a)},onChange:function(){},_highlightOption:function(a,b){if(a){if(b)this._highlighted_option&&this._highlightOption(this._highlighted_option,!1),this._highlighted_option=a;else{if(this._highlighted_option!==a)return;this._highlighted_option=null}d.toggle(a,this.baseClass+"ItemHover",b);d.contains(a,this.baseClass+"Marker")?d.toggle(a,this.baseClass+"MarkerHover",b):d.toggle(a,this.baseClass+"TickHover",b)}},handleKey:function(a){if(a.keyCode==h.DOWN_ARROW)return this.selectNextNode(),
a.stopPropagation(),a.preventDefault(),!1;if(a.keyCode==h.UP_ARROW)return this.selectPreviousNode(),a.stopPropagation(),a.preventDefault(),!1;if(a.keyCode==h.ENTER||a.keyCode===h.TAB){if(!this._keyboardSelected&&a.keyCode===h.TAB)return!0;this._highlighted_option&&this._onOptionSelected({target:this._highlighted_option});return a.keyCode===h.TAB}},onHover:function(a){this._highlightOption(a,!0)},onUnhover:function(a){this._highlightOption(a,!1)},onSelect:function(a){this._highlightOption(a,!0)},onDeselect:function(a){this._highlightOption(a,
!1)},onClick:function(a){this._onOptionSelected({target:a})}})})},"dijit/form/CurrencyTextBox":function(){define(["dojo/currency","dojo/_base/declare","dojo/_base/lang","./NumberTextBox"],function(p,k,m,g){return k("dijit.form.CurrencyTextBox",g,{currency:"",baseClass:"dijitTextBox dijitCurrencyTextBox",_formatter:p.format,_parser:p.parse,_regExpGenerator:p.regexp,parse:function(e,d){var c=this.inherited(arguments);isNaN(c)&&/\d+/.test(e)&&(c=m.hitch(m.delegate(this,{_parser:g.prototype._parser}),
"inherited")(arguments));return c},_setConstraintsAttr:function(e){!e.currency&&this.currency&&(e.currency=this.currency);this.inherited(arguments,[p._mixInDefaults(m.mixin(e,{exponent:!1}))])}})})},"dojo/currency":function(){define("./_base/array ./_base/lang ./number ./i18n ./i18n!./cldr/nls/currency ./cldr/monetary".split(" "),function(p,k,m,g,e,d){var c={};k.setObject("dojo.currency",c);c._mixInDefaults=function(b){b=b||{};b.type="currency";var c=g.getLocalization("dojo.cldr","currency",b.locale)||
{},a=b.currency,f=d.getData(a);p.forEach(["displayName","symbol","group","decimal"],function(b){f[b]=c[a+"_"+b]});f.fractional=[!0,!1];return k.mixin(f,b)};c.format=function(b,d){return m.format(b,c._mixInDefaults(d))};c.regexp=function(b){return m.regexp(c._mixInDefaults(b))};c.parse=function(b,d){return m.parse(b,c._mixInDefaults(d))};return c})},"dojo/cldr/monetary":function(){define(["../_base/kernel","../_base/lang"],function(p,k){var m={};k.setObject("dojo.cldr.monetary",m);m.getData=function(g){var e=
{ADP:0,AFN:0,ALL:0,AMD:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,COP:0,CRC:0,DJF:0,ESP:0,GNF:0,GYD:0,HUF:0,IDR:0,IQD:0,IRR:3,ISK:0,ITL:0,JOD:3,JPY:0,KMF:0,KPW:0,KRW:0,KWD:3,LAK:0,LBP:0,LUF:0,LYD:3,MGA:0,MGF:0,MMK:0,MNT:0,MRO:0,MUR:0,OMR:3,PKR:2,PYG:0,RSD:0,RWF:0,SLL:0,SOS:0,STD:0,SYP:0,TMM:0,TND:3,TRL:0,TZS:0,UGX:0,UZS:0,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0,ZWD:0}[g];g={}[g];"undefined"==typeof e&&(e=2);"undefined"==typeof g&&(g=0);return{places:e,round:g}};return m})},"dijit/form/HorizontalSlider":function(){define("dojo/_base/array dojo/_base/declare dojo/dnd/move dojo/_base/fx dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/dnd/Moveable dojo/dnd/Mover dojo/query dojo/mouse dojo/on ../_base/manager ../focus ../typematic ./Button ./_FormValueWidget ../_Container dojo/text!./templates/HorizontalSlider.html".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s,l,v,C,u,x){var A=k("dijit.form._SliderMover",f,{onMouseMove:function(a){var c=this.widget,d=c._abspos;d||(d=c._abspos=e.position(c.sliderBarContainer,!0),c._setPixelValue_=b.hitch(c,"_setPixelValue"),c._isReversed_=c._isReversed());a=a[c._mousePixelCoord]-d[c._startingPixelCoord];c._setPixelValue_(c._isReversed_?d[c._pixelCount]-a:a,d[c._pixelCount],!1)},destroy:function(a){f.prototype.destroy.apply(this,arguments);var b=this.widget;b._abspos=null;b._setValueAttr(b.value,
!0)}});m=k("dijit.form.HorizontalSlider",[C,u],{templateString:x,value:0,showButtons:!0,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:!0,slideDuration:t.defaultDuration,_setIdAttr:"",_setNameAttr:"valueNode",baseClass:"dijitSlider",cssStateNodes:{incrementButton:"dijitSliderIncrementButton",decrementButton:"dijitSliderDecrementButton",focusNode:"dijitSliderThumb"},_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_handleOffsetCoord:"left",_progressPixelSize:"width",
_onKeyUp:function(a){!this.disabled&&(!this.readOnly&&!a.altKey&&!a.ctrlKey&&!a.metaKey)&&this._setValueAttr(this.value,!0)},_onKeyDown:function(a){if(!this.disabled&&!this.readOnly&&!a.altKey&&!a.ctrlKey&&!a.metaKey){switch(a.keyCode){case c.HOME:this._setValueAttr(this.minimum,!1);break;case c.END:this._setValueAttr(this.maximum,!1);break;case this._descending||this.isLeftToRight()?c.RIGHT_ARROW:c.LEFT_ARROW:case !1===this._descending?c.DOWN_ARROW:c.UP_ARROW:case !1===this._descending?c.PAGE_DOWN:
c.PAGE_UP:this.increment(a);break;case this._descending||this.isLeftToRight()?c.LEFT_ARROW:c.RIGHT_ARROW:case !1===this._descending?c.UP_ARROW:c.DOWN_ARROW:case !1===this._descending?c.PAGE_UP:c.PAGE_DOWN:this.decrement(a);break;default:return}a.stopPropagation();a.preventDefault()}},_onHandleClick:function(a){!this.disabled&&!this.readOnly&&(h("ie")||s.focus(this.sliderHandle),a.stopPropagation(),a.preventDefault())},_isReversed:function(){return!this.isLeftToRight()},_onBarClick:function(a){if(!this.disabled&&
!this.readOnly&&this.clickSelect){s.focus(this.sliderHandle);a.stopPropagation();a.preventDefault();var b=e.position(this.sliderBarContainer,!0),c=a[this._mousePixelCoord]-b[this._startingPixelCoord];this._setPixelValue(this._isReversed()?b[this._pixelCount]-c:c,b[this._pixelCount],!0);this._movable.onMouseDown(a)}},_setPixelValue:function(a,b,c){if(!this.disabled&&!this.readOnly){var d=this.discreteValues;if(1>=d||Infinity==d)d=b;d--;a=Math.round(a/(b/d));this._setValueAttr(Math.max(Math.min((this.maximum-
this.minimum)*a/d+this.minimum,this.maximum),this.minimum),c)}},_setValueAttr:function(a,b){this._set("value",a);this.valueNode.value=a;this.focusNode.setAttribute("aria-valuenow",a);this.inherited(arguments);var c=(a-this.minimum)/(this.maximum-this.minimum),d=!1===this._descending?this.remainingBar:this.progressBar,f=!1===this._descending?this.progressBar:this.remainingBar;this._inProgressAnim&&"stopped"!=this._inProgressAnim.status&&this._inProgressAnim.stop(!0);if(b&&0<this.slideDuration&&d.style[this._progressPixelSize]){var e=
this,h={},y=parseFloat(d.style[this._progressPixelSize]),n=this.slideDuration*(c-y/100);0!=n&&(0>n&&(n=0-n),h[this._progressPixelSize]={start:y,end:100*c,units:"%"},this._inProgressAnim=g.animateProperty({node:d,duration:n,onAnimate:function(a){f.style[e._progressPixelSize]=100-parseFloat(a[e._progressPixelSize])+"%"},onEnd:function(){delete e._inProgressAnim},properties:h}),this._inProgressAnim.play())}else d.style[this._progressPixelSize]=100*c+"%",f.style[this._progressPixelSize]=100*(1-c)+"%"},
_bumpValue:function(a,b){if(!this.disabled&&!this.readOnly){var c=d.getComputedStyle(this.sliderBarContainer),f=e.getContentBox(this.sliderBarContainer,c),c=this.discreteValues;if(1>=c||Infinity==c)c=f[this._pixelCount];c--;f=(this.value-this.minimum)*c/(this.maximum-this.minimum)+a;0>f&&(f=0);f>c&&(f=c);f=f*(this.maximum-this.minimum)/c+this.minimum;this._setValueAttr(f,b)}},_onClkBumper:function(a){!this.disabled&&(!this.readOnly&&this.clickSelect)&&this._setValueAttr(a,!0)},_onClkIncBumper:function(){this._onClkBumper(!1===
this._descending?this.minimum:this.maximum)},_onClkDecBumper:function(){this._onClkBumper(!1===this._descending?this.maximum:this.minimum)},decrement:function(a){this._bumpValue(a.keyCode==c.PAGE_DOWN?-this.pageIncrement:-1)},increment:function(a){this._bumpValue(a.keyCode==c.PAGE_UP?this.pageIncrement:1)},_mouseWheeled:function(a){this.focused&&(a.stopPropagation(),a.preventDefault(),this._bumpValue(0>a.wheelDelta?-1:1,!0))},startup:function(){this._started||(p.forEach(this.getChildren(),function(a){this[a.container]!=
this.containerNode&&this[a.container].appendChild(a.domNode)},this),this.inherited(arguments))},_typematicCallback:function(a,b,c){if(-1==a)this._setValueAttr(this.value,!0);else this[b==(this._descending?this.incrementButton:this.decrementButton)?"decrement":"increment"](c)},buildRendering:function(){this.inherited(arguments);this.showButtons&&(this.incrementButton.style.display="",this.decrementButton.style.display="");var a=r('label[for\x3d"'+this.id+'"]');a.length&&(a[0].id||(a[0].id=this.id+
"_label"),this.focusNode.setAttribute("aria-labelledby",a[0].id));this.focusNode.setAttribute("aria-valuemin",this.minimum);this.focusNode.setAttribute("aria-valuemax",this.maximum)},postCreate:function(){this.inherited(arguments);this.showButtons&&this.own(l.addMouseListener(this.decrementButton,this,"_typematicCallback",25,500),l.addMouseListener(this.incrementButton,this,"_typematicCallback",25,500));this.own(q(this.domNode,n.wheel,b.hitch(this,"_mouseWheeled")));var c=k(A,{widget:this});this._movable=
new a(this.sliderHandle,{mover:c});this._layoutHackIE7()},destroy:function(){this._movable.destroy();this._inProgressAnim&&"stopped"!=this._inProgressAnim.status&&this._inProgressAnim.stop(!0);this.inherited(arguments)}});m._Mover=A;return m})},"dijit/Editor":function(){define("require dojo/_base/array dojo/_base/declare dojo/Deferred dojo/i18n dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/string dojo/topic ./_Container ./Toolbar ./ToolbarSeparator ./layout/_LayoutWidget ./form/ToggleButton ./_editor/_Plugin ./_editor/plugins/EnterKeyHandling ./_editor/html ./_editor/range ./_editor/RichText ./main dojo/i18n!./_editor/nls/commands".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s,l,v,C,u,x,A,w,z,D){function B(a){return new u({command:a.name})}function G(a){return new u({buttonClass:C,command:a.name})}m=m("dijit.Editor",z,{plugins:null,extraPlugins:null,constructor:function(){f.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",x]);this._plugins=
[];this._editInterval=1E3*this.editActionInterval;if(r("ie")||r("trident")||r("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new g;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);f.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=e.getLocalization("dijit._editor",
"commands",this.lang);r("webkit")&&h.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new s({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));k.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(!0);c.add(this.iframe.parentNode,"dijitEditorIFrameContainer");c.add(this.iframe,"dijitEditorIFrame");d.set(this.iframe,"allowTransparency",
!0);this.toolbar.startup();this.onNormalizedDisplayChanged()},destroy:function(){k.forEach(this._plugins,function(a){a&&a.destroy&&a.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(a,b){var c=f.isString(a)?{name:a}:f.isFunction(a)?{ctor:a}:a;if(!c.setEditor){var d={args:c,plugin:null,editor:this};c.name&&(u.registry[c.name]?d.plugin=u.registry[c.name](c):q.publish(D._scopeName+".Editor.getPlugin",d));if(!d.plugin)try{var e=
c.ctor||f.getObject(c.name)||p(c.name);e&&(d.plugin=new e(c))}catch(h){throw Error(this.id+": cannot find plugin ["+c.name+"]");}if(!d.plugin)throw Error(this.id+": cannot find plugin ["+c.name+"]");a=d.plugin}1<arguments.length?this._plugins[b]=a:this._plugins.push(a);a.setEditor(this);f.isFunction(a.setToolbar)&&a.setToolbar(this.toolbar)},resize:function(a){a&&v.prototype.resize.apply(this,arguments)},layout:function(){var a=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+b.getPadBorderExtents(this.iframe.parentNode).h+
b.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=a+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(a){var b,c=this.document.body,d=c.clientWidth,f=c.clientHeight,e=c.clientLeft,h=c.offsetWidth,g=c.offsetHeight,n=c.offsetLeft;/^rtl$/i.test(c.dir||"")?d<h&&(a.x>d&&a.x<h)&&(b=!0):a.x<e&&a.x>n&&(b=!0);b||f<g&&(a.y>f&&a.y<g)&&(b=!0);b||(delete this._cursorToStart,delete this._savedSelection,"BODY"==a.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(a){this.customUndo&&this.endEditing(!0);"BODY"!=a.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(a){this._inEditing||(this._inEditing=!0,this._beginEditing(a));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(a){if(this.customUndo&&
("undo"==a||"redo"==a))return this[a]();this.customUndo&&(this.endEditing(),this._beginEditing());var b=this.inherited(arguments);this.customUndo&&this._endEditing();return b},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(a){var b;try{if(b=this.document.execCommand(a,!1,null),r("webkit")&&!b)throw{};}catch(c){b=n.substitute,alert(b(this.commands.systemShortcut,
[this.commands[a],b(this.commands[r("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[a]])])),b=!1}return b},queryCommandEnabled:function(a){return this.customUndo&&("undo"==a||"redo"==a)?"undo"==a?1<this._steps.length:0<this._undoedSteps.length:this.inherited(arguments)},_moveToBookmark:function(a){var b=a.mark,c=a.mark;a=a.isCollapsed;var d,e,h;if(c)if(9>r("ie")||9===r("ie")&&r("quirks"))if(f.isArray(c))b=[],k.forEach(c,function(a){b.push(w.getNode(a,this.editNode))},this),this.selection.moveToBookmark({mark:b,
isCollapsed:a});else{if(c.startContainer&&c.endContainer&&(h=w.getSelection(this.window))&&h.removeAllRanges)h.removeAllRanges(),a=w.create(this.window),d=w.getNode(c.startContainer,this.editNode),e=w.getNode(c.endContainer,this.editNode),d&&e&&(a.setStart(d,c.startOffset),a.setEnd(e,c.endOffset),h.addRange(a))}else if((h=w.getSelection(this.window))&&h.removeAllRanges)h.removeAllRanges(),a=w.create(this.window),d=w.getNode(c.startContainer,this.editNode),e=w.getNode(c.endContainer,this.editNode),
d&&e&&(a.setStart(d,c.startOffset),a.setEnd(e,c.endOffset),h.addRange(a))},_changeToStep:function(a,b){this.setValue(b.text);var c=b.bookmark;c&&this._moveToBookmark(c)},undo:function(){var a=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var b=this._steps.pop();b&&0<this._steps.length&&(this.focus(),this._changeToStep(b,this._steps[this._steps.length-1]),this._undoedSteps.push(b),this.onDisplayChanged(),delete this._undoRedoActive,a=!0);delete this._undoRedoActive}return a},
redo:function(){var a=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var b=this._undoedSteps.pop();b&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],b),this._steps.push(b),this.onDisplayChanged(),a=!0);delete this._undoRedoActive}return a},endEditing:function(a){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(a),this._inEditing=!1)},_getBookmark:function(){var a=this.selection.getBookmark(),
b=[];if(a&&a.mark){var c=a.mark;if(9>r("ie")||9===r("ie")&&r("quirks")){var d=w.getSelection(this.window);if(f.isArray(c))k.forEach(a.mark,function(a){b.push(w.getIndex(a,this.editNode).o)},this),a.mark=b;else if(d){var e;d.rangeCount&&(e=d.getRangeAt(0));a.mark=e?e.cloneRange():this.selection.getBookmark()}}try{a.mark&&a.mark.startContainer&&(b=w.getIndex(a.mark.startContainer,this.editNode).o,a.mark={startContainer:b,startOffset:a.mark.startOffset,endContainer:a.mark.endContainer===a.mark.startContainer?
b:w.getIndex(a.mark.endContainer,this.editNode).o,endOffset:a.mark.endOffset})}catch(h){a.mark=null}}return a},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:A.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var a=A.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:a,bookmark:this._getBookmark()})},onKeyDown:function(b){!r("ie")&&(!this.iframe&&b.keyCode==a.TAB&&!this.tabIndent)&&this._saveSelection();if(this.customUndo){var c=
b.keyCode;if(b.ctrlKey&&!b.shiftKey&&!b.altKey){if(90==c||122==c){b.stopPropagation();b.preventDefault();this.undo();return}if(89==c||121==c){b.stopPropagation();b.preventDefault();this.redo();return}}this.inherited(arguments);switch(c){case a.ENTER:case a.BACKSPACE:case a.DELETE:this.beginEditing();break;case 88:case 86:if(b.ctrlKey&&!b.altKey&&!b.metaKey){this.endEditing();88==b.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!b.ctrlKey&&!b.altKey&&
!b.metaKey&&(b.keyCode<a.F1||b.keyCode>a.F15)){this.beginEditing();break}case a.ALT:this.endEditing();break;case a.UP_ARROW:case a.DOWN_ARROW:case a.LEFT_ARROW:case a.RIGHT_ARROW:case a.HOME:case a.END:case a.PAGE_UP:case a.PAGE_DOWN:this.endEditing(!0);case a.CTRL:case a.SHIFT:case a.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(a){}},_restoreSelection:function(){this._savedSelection&&
(delete this._cursorToStart,this.selection.isCollapsed()&&this._moveToBookmark(this._savedSelection),delete this._savedSelection)},onClick:function(){this.endEditing(!0);this.inherited(arguments)},replaceValue:function(a){this.customUndo?this.isClosed?this.setValue(a):(this.beginEditing(),a||(a="\x26#160;"),this.setValue(a),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(a){this.setValueDeferred.then(f.hitch(this,function(){!this.disabled&&a||!this._buttonEnabledPlugins&&a?
k.forEach(this._plugins,function(a){a.set("disabled",!0)}):this.disabled&&!a&&k.forEach(this._plugins,function(a){a.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&h.set(this.document.body,"color",h.get(this.iframe,"color"))}catch(a){}}});f.mixin(u.registry,{undo:B,redo:B,cut:B,copy:B,paste:B,insertOrderedList:B,insertUnorderedList:B,indent:B,outdent:B,justifyCenter:B,justifyFull:B,justifyLeft:B,justifyRight:B,
"delete":B,selectAll:B,removeFormat:B,unlink:B,insertHorizontalRule:B,bold:G,italic:G,underline:G,strikethrough:G,subscript:G,superscript:G,"|":function(){return new u({setEditor:function(a){this.editor=a;this.button=new l({ownerDocument:a.ownerDocument})}})}});return m})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(p,k,m,g){return p("dijit.ToolbarSeparator",[m,g],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',
buildRendering:function(){this.inherited(arguments);k.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/_editor/_Plugin":function(){define(["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../Destroyable","../form/Button"],function(p,k,m,g,e){k=k("dijit._editor._Plugin",g,{constructor:function(d){this.params=d||{};m.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:e,
disabled:!1,getLabel:function(d){return this.editor.commands[d]},_initButton:function(){if(this.command.length){var d=this.getLabel(this.command),c=this.editor,b=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(d=m.mixin({label:d,ownerDocument:c.ownerDocument,dir:c.dir,lang:c.lang,showLabel:!1,iconClass:b,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),this.button=new this.buttonClass(d))}this.get("disabled")&&this.button&&
this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(d,c,b){this.own(p.connect(d,c,this,b))},updateState:function(){var d=this.editor,c=this.command,b,e;if(d&&d.isLoaded&&c.length){var a=this.get("disabled");if(this.button)try{e=!a&&d.queryCommandEnabled(c),this.enabled!==e&&(this.enabled=e,this.button.set("disabled",!e)),e&&"boolean"==typeof this.button.checked&&(b=d.queryCommandState(c),this.checked!==
b&&(this.checked=b,this.button.set("checked",d.queryCommandState(c))))}catch(f){}}},setEditor:function(d){this.editor=d;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",m.hitch(this.editor,"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",m.hitch(this,"updateState")))},setToolbar:function(d){this.button&&d.addChild(this.button)},
set:function(d,c){if("object"===typeof d){for(var b in d)this.set(b,d[b]);return this}b=this._getAttrNames(d);if(this[b.s])var e=this[b.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(d,c);return e||this},get:function(d){var c=this._getAttrNames(d);return this[c.g]?this[c.g]():this[d]},_setDisabledAttr:function(d){this._set("disabled",d);this.updateState()},_getAttrNames:function(d){var c=this._attrPairNames;if(c[d])return c[d];var b=d.charAt(0).toUpperCase()+d.substr(1);return c[d]=
{s:"_set"+b+"Attr",g:"_get"+b+"Attr"}},_set:function(d,c){this[d]=c}});k.registry={};return k})},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dojo/_base/declare dojo/dom-construct dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/_base/window dojo/window ../_Plugin ../RichText ../range ../../_base/focus".split(" "),function(p,k,m,g,e,d,c,b,h,a,f,r){return p("dijit._editor.plugins.EnterKeyHandling",h,{blockNodeForEnter:"BR",constructor:function(a){a&&("blockNodeForEnter"in a&&(a.blockNodeForEnter=
a.blockNodeForEnter.toUpperCase()),g.mixin(this,a))},setEditor:function(a){if(this.editor!==a)if(this.editor=a,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,a.onLoadDeferred.then(g.hitch(this,function(b){this.own(e(a.document,"keydown",g.hitch(this,function(a){if(a.keyCode==m.ENTER){var b=g.mixin({},a);b.shiftKey=!0;this.handleEnterKey(b)||(a.stopPropagation(),a.preventDefault())}})));9<=d("ie")&&10>=d("ie")&&this.own(e(a.document,"paste",g.hitch(this,function(a){setTimeout(g.hitch(this,
function(){var a=this.editor.document.selection.createRange();a.move("character",-1);a.select();a.move("character",1);a.select()}),0)})));return b}));else if(this.blockNodeForEnter){var b=g.hitch(this,"handleEnterKey");a.addKeyHandler(13,0,0,b);a.addKeyHandler(13,0,1,b);this.own(this.editor.on("KeyPressed",g.hitch(this,"onKeyPressed")))}},onKeyPressed:function(){if(this._checkListLater){if(c.withGlobal(this.editor.window,"isCollapsed",r)){var b=this.editor.selection.getAncestorElement("LI");if(b){d("mozilla")&&
"LI"==b.parentNode.parentNode.nodeName&&(b=b.parentNode.parentNode);var e=b.firstChild;if(e&&1==e.nodeType&&("UL"==e.nodeName||"OL"==e.nodeName))b.insertBefore(e.ownerDocument.createTextNode("\u00a0"),e),e=f.create(this.editor.window),e.setStart(b.firstChild,0),b=f.getSelection(this.editor.window,!0),b.removeAllRanges(),b.addRange(e)}else a.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter),(b=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(b.innerHTML=
this.bogusHtmlContent,9>=d("ie")&&(b=this.editor.document.selection.createRange(),b.move("character",-1),b.select())):console.error("onKeyPressed: Cannot find the new block node")}this._checkListLater=!1}this._pressedEnterInBlock&&(this._pressedEnterInBlock.previousSibling&&this.removeTrailingBr(this._pressedEnterInBlock.previousSibling),delete this._pressedEnterInBlock)},bogusHtmlContent:"\x26#160;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(c){var e,h,g,l,r=this.editor.document,
m,p,x;if(c.shiftKey){c=this.editor.selection.getParentElement();if(l=f.getAncestor(c,this.blockNodes)){if("LI"==l.tagName)return!0;c=f.getSelection(this.editor.window);e=c.getRangeAt(0);e.collapsed||(e.deleteContents(),c=f.getSelection(this.editor.window),e=c.getRangeAt(0));if(f.atBeginningOfContainer(l,e.startContainer,e.startOffset))m=r.createElement("br"),e=f.create(this.editor.window),l.insertBefore(m,l.firstChild),e.setStartAfter(m),c.removeAllRanges(),c.addRange(e);else if(f.atEndOfContainer(l,
e.startContainer,e.startOffset))e=f.create(this.editor.window),m=r.createElement("br"),l.appendChild(m),l.appendChild(r.createTextNode("\u00a0")),e.setStart(l.lastChild,0),c.removeAllRanges(),c.addRange(e);else return(p=e.startContainer)&&3==p.nodeType?(x=p.nodeValue,h=r.createTextNode(x.substring(0,e.startOffset)),g=r.createTextNode(x.substring(e.startOffset)),l=r.createElement("br"),""==g.nodeValue&&d("webkit")&&(g=r.createTextNode("\u00a0")),k.place(h,p,"after"),k.place(l,h,"after"),k.place(g,
l,"after"),k.destroy(p),e=f.create(this.editor.window),e.setStart(g,0),c.removeAllRanges(),c.addRange(e),!1):!0}else if(c=f.getSelection(this.editor.window),c.rangeCount){if((e=c.getRangeAt(0))&&e.startContainer)e.collapsed||(e.deleteContents(),c=f.getSelection(this.editor.window),e=c.getRangeAt(0)),(p=e.startContainer)&&3==p.nodeType?(l=e.startOffset,p.length<l&&(g=this._adjustNodeAndOffset(p,l),p=g.node,l=g.offset),x=p.nodeValue,h=r.createTextNode(x.substring(0,l)),g=r.createTextNode(x.substring(l)),
l=r.createElement("br"),g.length||(g=r.createTextNode("\u00a0")),h.length?k.place(h,p,"after"):h=p,k.place(l,h,"after"),k.place(g,l,"after"),k.destroy(p)):(0<=e.startOffset&&(m=p.childNodes[e.startOffset]),l=r.createElement("br"),g=r.createTextNode("\u00a0"),m?(k.place(l,m,"before"),k.place(g,l,"after")):(p.appendChild(l),p.appendChild(g))),e=f.create(this.editor.window),e.setStart(g,0),e.setEnd(g,g.length),c.removeAllRanges(),c.addRange(e),this.editor.selection.collapse(!0)}else a.prototype.execCommand.call(this.editor,
"inserthtml","\x3cbr\x3e");return!1}var A=!0;c=f.getSelection(this.editor.window);e=c.getRangeAt(0);e.collapsed||(e.deleteContents(),c=f.getSelection(this.editor.window),e=c.getRangeAt(0));m=f.getBlockAncestor(e.endContainer,null,this.editor.editNode);var w=m.blockNode;if(this._checkListLater=w&&("LI"==w.nodeName||"LI"==w.parentNode.nodeName))return d("mozilla")&&(this._pressedEnterInBlock=w),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(w.innerHTML)&&
(w.innerHTML="",d("webkit")&&(e=f.create(this.editor.window),e.setStart(w,0),c.removeAllRanges(),c.addRange(e)),this._checkListLater=!1),!0;if(!m.blockNode||m.blockNode===this.editor.editNode){try{a.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(z){}m={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),blockContainer:this.editor.editNode};if(m.blockNode){if(m.blockNode!=this.editor.editNode&&!(m.blockNode.textContent||m.blockNode.innerHTML).replace(/^\s+|\s+$/g,
"").length)return this.removeTrailingBr(m.blockNode),!1}else m.blockNode=this.editor.editNode;c=f.getSelection(this.editor.window);e=c.getRangeAt(0)}w=r.createElement(this.blockNodeForEnter);w.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(m.blockNode);g=e.endOffset;A=e.endContainer;A.length<g&&(g=this._adjustNodeAndOffset(A,g),A=g.node,g=g.offset);if(f.atEndOfContainer(m.blockNode,A,g))m.blockNode===m.blockContainer?m.blockNode.appendChild(w):k.place(w,m.blockNode,"after"),A=!1,e=f.create(this.editor.window),
e.setStart(w,0),c.removeAllRanges(),c.addRange(e),this.editor.height&&b.scrollIntoView(w);else if(f.atBeginningOfContainer(m.blockNode,e.startContainer,e.startOffset))k.place(w,m.blockNode,m.blockNode===m.blockContainer?"first":"before"),w.nextSibling&&this.editor.height&&(e=f.create(this.editor.window),e.setStart(w.nextSibling,0),c.removeAllRanges(),c.addRange(e),b.scrollIntoView(w.nextSibling)),A=!1;else{m.blockNode===m.blockContainer?m.blockNode.appendChild(w):k.place(w,m.blockNode,"after");A=
!1;m.blockNode.style&&(w.style&&m.blockNode.style.cssText)&&(w.style.cssText=m.blockNode.style.cssText);if((p=e.startContainer)&&3==p.nodeType){g=e.endOffset;p.length<g&&(g=this._adjustNodeAndOffset(p,g),p=g.node,g=g.offset);x=p.nodeValue;h=r.createTextNode(x.substring(0,g));g=r.createTextNode(x.substring(g,x.length));k.place(h,p,"before");k.place(g,p,"after");k.destroy(p);for(h=h.parentNode;h!==m.blockNode;){x=r.createElement(h.tagName);h.style&&(x.style&&h.style.cssText)&&(x.style.cssText=h.style.cssText);
"FONT"===h.tagName&&(h.color&&(x.color=h.color),h.face&&(x.face=h.face),h.size&&(x.size=h.size));for(e=g;e;)p=e.nextSibling,x.appendChild(e),e=p;k.place(x,h,"after");g=x;h=h.parentNode}e=g;if(1==e.nodeType||3==e.nodeType&&e.nodeValue)w.innerHTML="";for(h=e;e;)p=e.nextSibling,w.appendChild(e),e=p}e=f.create(this.editor.window);r=h;if("BR"!==this.blockNodeForEnter){for(;r;)l=r,r=p=r.firstChild;l&&l.parentNode?(w=l.parentNode,e.setStart(w,0),c.removeAllRanges(),c.addRange(e),this.editor.height&&b.scrollIntoView(w),
d("mozilla")&&(this._pressedEnterInBlock=m.blockNode)):A=!0}else e.setStart(w,0),c.removeAllRanges(),c.addRange(e),this.editor.height&&b.scrollIntoView(w),d("mozilla")&&(this._pressedEnterInBlock=m.blockNode)}return A},_adjustNodeAndOffset:function(a,b){for(;a.length<b&&a.nextSibling&&3==a.nextSibling.nodeType;)b-=a.length,a=a.nextSibling;return{node:a,offset:b}},removeTrailingBr:function(a){if(a=/P|DIV|LI/i.test(a.tagName)?a:this.editor.selection.getParentOfType(a,["P","DIV","LI"]))a.lastChild&&
(1<a.childNodes.length&&3==a.lastChild.nodeType&&/^[\s\xAD]*$/.test(a.lastChild.nodeValue)||"BR"==a.lastChild.tagName)&&k.destroy(a.lastChild),a.childNodes.length||(a.innerHTML=this.bogusHtmlContent)}})})},"dijit/_editor/RichText":function(){define("dojo/_base/array dojo/_base/config dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/query dojo/domReady dojo/sniff dojo/topic dojo/_base/unload dojo/_base/url dojo/window ../_Widget ../_CssStateMixin ../selection ./range ./html ../focus ../main".split(" "),
function(p,k,m,g,e,d,c,b,h,a,f,r,n,q,t,s,l,v,C,u,x,A,w,z,D,B,G,F){var E=m("dijit._editor.RichText",[A,w],{constructor:function(a){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};a&&n.isString(a.value)&&(this.value=a.value);this.onLoadDeferred=new g},baseClass:"dijitEditor",inheritWidth:!1,focusOnLoad:!1,name:"",styleSheets:"",height:"300px",minHeight:"1em",
isClosed:!0,isLoaded:!1,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:!1,disableSpellCheck:!1,postCreate:function(){"textarea"===this.domNode.tagName.toLowerCase()&&console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");this.contentPreFilters=[n.trim,n.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);l("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));l("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(l("ie")||l("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[n.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[n.hitch(this,
"_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);v.publish(F._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var a=n.hitch(this,function(a,b){return function(){return!this.execCommand(a,b)}}),b={b:a("bold"),i:a("italic"),u:a("underline"),a:a("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:a("formatblock",
"h1"),2:a("formatblock","h2"),3:a("formatblock","h3"),4:a("formatblock","h4"),"\\":a("insertunorderedlist")};l("ie")||(b.Z=a("redo"));for(var c in b)this.addKeyHandler(c,!0,!1,b[c])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(E._editorCommandsLocalized)this._local2NativeFormatNames=E._local2NativeFormatNames,this._native2LocalFormatNames=E._native2LocalFormatNames;else{E._editorCommandsLocalized=!0;E._local2NativeFormatNames={};
E._native2LocalFormatNames={};this._local2NativeFormatNames=E._local2NativeFormatNames;this._native2LocalFormatNames=E._native2LocalFormatNames;for(var a="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),c="",d,f=0;d=a[f++];)c="l"!==d.charAt(1)?c+("\x3c"+d+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+d+"\x3e\x3cbr/\x3e"):c+("\x3c"+d+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+d+"\x3e\x3cbr/\x3e");var e=b.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:0.01},innerHTML:c});this.ownerDocumentBody.appendChild(e);
a=n.hitch(this,function(){for(var a=e.firstChild;a;)try{this.selection.selectElement(a.firstChild);var c=a.tagName.toLowerCase();this._local2NativeFormatNames[c]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[c]]=c;a=a.nextSibling.nextSibling}catch(d){}b.destroy(e)});this.defer(a)}},open:function(f){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new g;this.isClosed||this.close();v.publish(F._scopeName+"._editor.RichText::open",
this);1===arguments.length&&f.nodeName&&(this.domNode=f);var h=this.domNode,m;if(n.isString(this.value))m=this.value,h.innerHTML="";else if(h.nodeName&&"textarea"==h.nodeName.toLowerCase()){var r=this.textarea=h;this.name=r.name;m=r.value;h=this.domNode=this.ownerDocument.createElement("div");h.setAttribute("widgetId",this.id);r.removeAttribute("widgetId");h.cssText=r.cssText;h.className+=" "+r.className;b.place(h,r,"before");var p=n.hitch(this,function(){a.set(r,{display:"block",position:"absolute",
top:"-1000px"});if(l("ie")){var b=r.style;this.__overflow=b.overflow;b.overflow="hidden"}});l("ie")?this.defer(p,10):p();if(r.form){var s=r.value;this.reset=function(){this.getValue()!==s&&this.replaceValue(s)};q(r.form,"submit",n.hitch(this,function(){d.set(r,"disabled",this.disabled);r.value=this.getValue()}))}}else m=B.getChildrenHtml(h),h.innerHTML="";this.value=m;h.nodeName&&"LI"===h.nodeName&&(h.innerHTML=" \x3cbr\x3e");this.header=h.ownerDocument.createElement("div");h.appendChild(this.header);
this.editingArea=h.ownerDocument.createElement("div");h.appendChild(this.editingArea);this.footer=h.ownerDocument.createElement("div");h.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!k.useXDomain||k.allowXdRichTextSave)){if((p=e.byId(F._scopeName+"._editor.RichText.value"))&&""!==p.value)for(var t=p.value.split(this._SEPARATOR),H=0,u;u=t[H++];)if(u=u.split(this._NAME_CONTENT_SEP),u[0]===this.name){m=u[1];t=t.splice(H,1);p.value=t.join(this._SEPARATOR);break}E._globalSaveHandler||
(E._globalSaveHandler={},C.addOnUnload(function(){for(var a in E._globalSaveHandler){var b=E._globalSaveHandler[a];n.isFunction(b)&&b()}}));E._globalSaveHandler[this.id]=n.hitch(this,"_saveContent")}this.isClosed=!1;p=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");p.id=this.id+"_iframe";p.style.border="none";p.style.width="100%";this._layoutMode?p.style.height="100%":7<=l("ie")?(this.height&&(p.style.height=this.height),this.minHeight&&(p.style.minHeight=this.minHeight)):
p.style.height=this.height?this.height:this.minHeight;p.frameBorder=0;p._loadFunc=n.hitch(this,function(a){this.window=a;this.document=a.document;this.selection=new z.SelectionManager(a);l("ie")&&this._localizeEditorCommands();this.onLoad(m)});t=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");t=11>l("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+t+"');document.close()":"javascript: '"+t+"'";9==l("ie")?(this.editingArea.appendChild(p),
p.src=t):(p.setAttribute("src",t),this.editingArea.appendChild(p));"LI"===h.nodeName&&(h.lastChild.style.marginTop="-1.2em");c.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var b=a.getComputedStyle(this.domNode),c=[b.fontWeight,b.fontSize,b.fontFamily].join(" "),d=b.lineHeight,d=0<=d.indexOf("px")?parseFloat(d)/parseFloat(b.fontSize):0<=d.indexOf("em")?parseFloat(d):"normal",f="",h=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,
function(b){b=b.replace(/^;/ig,"")+";";var c=b.split(":")[0];if(c){var c=n.trim(c),c=c.toLowerCase(),d,e="";for(d=0;d<c.length;d++){var g=c.charAt(d);switch(g){case "-":d++,g=c.charAt(d).toUpperCase();default:e+=g}}a.set(h.domNode,e,"")}f+=b+";"});var b=t('label[for\x3d"'+this.id+'"]'),g="";b.length?g=b[0].innerHTML:this["aria-label"]?g=this["aria-label"]:this["aria-labelledby"]&&(g=e.byId(this["aria-labelledby"]).innerHTML);this.iframe.setAttribute("title",g);return["\x3c!DOCTYPE html\x3e",this.isLeftToRight()?
"\x3chtml lang\x3d'"+this.lang+"'\x3e\n\x3chead\x3e\n":"\x3chtml dir\x3d'rtl' lang\x3d'"+this.lang+"'\x3e\n\x3chead\x3e\n",g?"\x3ctitle\x3e"+g+"\x3c/title\x3e":"","\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n\x3cstyle\x3e\n\tbody,html {\n\t\tbackground:transparent;\n\t\tpadding: 1px 0 0 0;\n\t\tmargin: -1px 0 0 0;\n\t}\n\tbody,html,#dijitEditorBody { outline: none; }html { height: 100%; width: 100%; overflow: hidden; }\n",this.height?"\tbody,#dijitEditorBody { height: 100%; width: 100%; overflow: auto; }\n":
"\tbody,#dijitEditorBody { min-height: "+this.minHeight+"; width: 100%; overflow-x: auto; overflow-y: hidden; }\n","\tbody{\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tright:0px;\n\t\tfont:",c,";\n",this.height||l("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",d,";\n\t}\n\tp{ margin: 1em 0; }\n\tli \x3e ul:-moz-first-node, li \x3e ol:-moz-first-node{ padding-top: 1.2em; }\n",l("ie")||l("trident")||l("edge")?"":"\tli{ min-height:1.2em; }\n","\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody ",
"onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+f+"'\x3e","\x3cdiv id\x3d'dijitEditorBody' role\x3d'main'\x3e\x3c/div\x3e\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var a=[];this.styleSheets&&(a=this.styleSheets.split(";"),this.styleSheets="");a=a.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var b=
"",c=0,d,f=x.get(this.ownerDocument);d=a[c++];)d=(new u(f.location,d)).toString(),this.editingAreaStyleSheets.push(d),b+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+d+'"/\x3e';return b},addStyleSheet:function(a){var b=a.toString(),c=x.get(this.ownerDocument);if("."===b.charAt(0)||"/"!==b.charAt(0)&&!a.host)b=(new u(c.location,b)).toString();-1<p.indexOf(this.editingAreaStyleSheets,b)||(this.editingAreaStyleSheets.push(b),this.onLoadDeferred.then(n.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(b);
else{var a=this.document.getElementsByTagName("head")[0],c=this.document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=b;a.appendChild(c)}})))},removeStyleSheet:function(a){var b=a.toString(),c=x.get(this.ownerDocument);if("."===b.charAt(0)||"/"!==b.charAt(0)&&!a.host)b=(new u(c.location,b)).toString();a=p.indexOf(this.editingAreaStyleSheets,b);-1!==a&&(delete this.editingAreaStyleSheets[a],t('link[href\x3d"'+b+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},
_setDisabledAttr:function(a){a=!!a;this._set("disabled",a);if(this.isLoaded){var b=l("ie")&&(this.isLoaded||!this.focusOnLoad);b&&(this.editNode.unselectable="on");this.editNode.contentEditable=!a;this.editNode.tabIndex=a?"-1":this.tabIndex;b&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(l("mozilla")&&!a&&this._mozSettingProps){a=this._mozSettingProps;for(var c in a)if(a.hasOwnProperty(c))try{this.document.execCommand(c,!1,a[c])}catch(d){}}this._disabledOK=!0}},onLoad:function(a){this.window.__registeredWindow||
(this.window.__registeredWindow=!0,this._iframeRegHandle=G.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var c=this;this.beforeIframeNode=b.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=b.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){c.editNode.focus()};this.focusNode=this.editNode;var d=this.events.concat(this.captureEvents),f=this.iframe?this.document:
this.editNode;this.own(p.map(d,function(a){var b=a.toLowerCase().replace(/^on/,"");q(f,b,n.hitch(this,a))},this));this.own(q(f,"mouseup",n.hitch(this,"onClick")));l("ie")?(this.own(q(this.document,"mousedown",n.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1):this.own(q(this.document,"mousedown",n.hitch(this,function(){delete this._cursorToStart})));l("webkit")&&(this._webkitListener=this.own(q(this.document,"mouseup",n.hitch(this,"onDisplayChanged")))[0],this.own(q(this.document,"mousedown",
n.hitch(this,function(a){(a=a.target)&&(a===this.document.body||a===this.document)&&this.defer("placeCursorAtEnd")}))));if(l("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(e){}this.isLoaded=!0;this.set("disabled",this.disabled);d=n.hitch(this,function(){this.setValue(a);this.onLoadDeferred&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&s(n.hitch(this,"defer","focus",this.updateInterval));this.value=this.getValue(!0)});this.setValueDeferred?
this.setValueDeferred.then(d):d()},onKeyDown:function(a){if(a.keyCode===r.SHIFT||a.keyCode===r.ALT||a.keyCode===r.META||a.keyCode===r.CTRL)return!0;if(a.keyCode===r.TAB&&this.isTabIndent&&(a.stopPropagation(),a.preventDefault(),this.queryCommandEnabled(a.shiftKey?"outdent":"indent")))this.execCommand(a.shiftKey?"outdent":"indent");if(a.keyCode==r.TAB&&!this.isTabIndent&&!a.ctrlKey&&!a.altKey)return a.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),!0;9>l("ie")&&(a.keyCode===r.BACKSPACE&&
"Control"===this.document.selection.type)&&(a.stopPropagation(),a.preventDefault(),this.execCommand("delete"));l("ff")&&(a.keyCode===r.PAGE_UP||a.keyCode===r.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&a.preventDefault();var b=this._keyHandlers[a.keyCode],c=arguments;b&&!a.altKey&&p.some(b,function(b){if(!(b.shift^a.shiftKey)&&!(b.ctrl^(a.ctrlKey||a.metaKey)))return b.handler.apply(this,c)||a.preventDefault(),!0},this);this.defer("onKeyPressed",1);return!0},onKeyUp:function(){},
setDisabled:function(a){f.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",a)},_setValueAttr:function(a){this.setValue(a)},_setDisableSpellCheckAttr:function(a){this.document?d.set(this.document.body,"spellcheck",!a):this.onLoadDeferred.then(n.hitch(this,function(){d.set(this.document.body,"spellcheck",!a)}));this._set("disableSpellCheck",a)},addKeyHandler:function(a,b,c,d){"string"==typeof a&&(a=a.toUpperCase().charCodeAt(0));
n.isArray(this._keyHandlers[a])||(this._keyHandlers[a]=[]);this._keyHandlers[a].push({shift:c||!1,ctrl:b||!1,handler:d})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(a){this.onDisplayChanged(a)},_onIEMouseDown:function(){!this.focused&&!this.disabled&&this.focus()},_onBlur:function(a){(l("ie")||l("trident"))&&this.defer(function(){G.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var b=this.getValue(!0);if(b!==this.value)this.onChange(b);this._set("value",
b)},_onFocus:function(a){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!l("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus?this.window.document.documentElement.focus():this.ownerDocumentBody.focus&&this.ownerDocumentBody.focus()},focus:function(){if(this.isLoaded){if(this._cursorToStart&&(delete this._cursorToStart,this.editNode.childNodes)){this.placeCursorAtStart();return}9>l("ie")?this.iframe.fireEvent("onfocus",
document.createEventObject()):this.editNode.focus()}else this.focusOnLoad=!0},updateInterval:200,_updateTimer:null,onDisplayChanged:function(){this._updateTimer&&this._updateTimer.remove();this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval)},onNormalizedDisplayChanged:function(){delete this._updateTimer},onChange:function(){},_normalizeCommand:function(a,b){var c=a.toLowerCase();"formatblock"===c?l("safari")&&void 0===b&&(c="heading"):"hilitecolor"===c&&!l("mozilla")&&(c=
"backcolor");return c},_qcaCache:{},queryCommandAvailable:function(a){var b=this._qcaCache[a];return void 0!==b?b:this._qcaCache[a]=this._queryCommandAvailable(a)},_queryCommandAvailable:function(a){switch(a.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":case "cut":case "copy":case "paste":return!0;
case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":return l("ie")||l("trident")||l("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!l("webkit");default:return!1}},execCommand:function(a,b){var c;this.focused&&this.focus();a=this._normalizeCommand(a,b);if(void 0!==b){if("heading"===a)throw Error("unimplemented");if("formatblock"===
a&&(l("ie")||l("trident")))b="\x3c"+b+"\x3e"}var d="_"+a+"Impl";if(this[d])c=this[d](b);else if((b=1<arguments.length?b:null)||"createlink"!==a)c=this.document.execCommand(a,!1,b);this.onDisplayChanged();return c},queryCommandEnabled:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);var b="_"+a+"EnabledImpl";return this[b]?this[b](a):this._browserQueryCommandEnabled(a)},queryCommandState:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);
try{return this.document.queryCommandState(a)}catch(b){return!1}},queryCommandValue:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);if(l("ie")&&"formatblock"===a)a=this._native2LocalFormatNames[this.document.queryCommandValue(a)];else if(l("mozilla")&&"hilitecolor"===a){var b;try{b=this.document.queryCommandValue("styleWithCSS")}catch(c){b=!1}this.document.execCommand("styleWithCSS",!1,!0);a=this.document.queryCommandValue(a);this.document.execCommand("styleWithCSS",
!1,b)}else a=this.document.queryCommandValue(a);return a},_sCall:function(a,b){return this.selection[a].apply(this.selection,b)},placeCursorAtStart:function(){this.focus();var a=!1;if(l("mozilla"))for(var b=this.editNode.firstChild;b;){if(3===b.nodeType){if(0<b.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(b);break}}else if(1===b.nodeType){var a=!0,c=b.tagName?b.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(c)?this.selection.selectElement(b):
this.selection.selectElementChildren(b);break}b=b.nextSibling}else a=!0,this.selection.selectElementChildren(this.editNode);a&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var a=!1;if(l("mozilla"))for(var b=this.editNode.lastChild;b;){if(3===b.nodeType){if(0<b.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(b);break}}else if(1===b.nodeType){a=!0;this.selection.selectElement(b.lastChild||b);break}b=b.previousSibling}else a=!0,this.selection.selectElementChildren(this.editNode);
a&&this.selection.collapse(!1)},getValue:function(a){return this.textarea&&(this.isClosed||!this.isLoaded)?this.textarea.value:this.isLoaded?this._postFilterContent(null,a):this.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(a){if(this.isLoaded){this._cursorToStart=!0;if(this.textarea&&(this.isClosed||!this.isLoaded))this.textarea.value=a;else{a=this._preFilterContent(a);var b=this.isClosed?this.domNode:this.editNode;b.innerHTML=a;this._preDomFilterContent(b)}this.onDisplayChanged();
this._set("value",this.getValue(!0))}else this.onLoadDeferred.then(n.hitch(this,function(){this.setValue(a)}))},replaceValue:function(a){this.isClosed?this.setValue(a):this.window&&this.window.getSelection&&!l("mozilla")?this.setValue(a):this.window&&this.window.getSelection?(a=this._preFilterContent(a),this.execCommand("selectall"),this.execCommand("inserthtml",a),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(a);this._set("value",this.getValue(!0))},
_preFilterContent:function(a){var b=a;p.forEach(this.contentPreFilters,function(a){a&&(b=a(b))});return b},_preDomFilterContent:function(a){a=a||this.editNode;p.forEach(this.contentDomPreFilters,function(b){b&&n.isFunction(b)&&b(a)},this)},_postFilterContent:function(a,b){var c;n.isString(a)?c=a:(a=a||this.editNode,this.contentDomPostFilters.length&&(b&&(a=n.clone(a)),p.forEach(this.contentDomPostFilters,function(b){a=b(a)})),c=B.getChildrenHtml(a));n.trim(c.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,
"")).length||(c="");p.forEach(this.contentPostFilters,function(a){c=a(c)});return c},_saveContent:function(){var a=e.byId(F._scopeName+"._editor.RichText.value");a&&(a.value&&(a.value+=this._SEPARATOR),a.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(a,b){a=a.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");b||(a=a.replace(/'/gm,"\x26#39;"));return a},getNodeHtml:function(a){f.deprecated("dijit.Editor::getNodeHtml is deprecated",
"use dijit/_editor/html::getNodeHtml instead",2);return B.getNodeHtml(a)},getNodeChildrenHtml:function(a){f.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return B.getChildrenHtml(a)},close:function(a){if(!this.isClosed){arguments.length||(a=!0);a&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);l("ie")&&(this.iframe.onfocus=
null);this.iframe._loadFunc=null;this._iframeRegHandle&&(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var d=this.textarea.style;d.position="";d.left=d.top="";l("ie")&&(d.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;b.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;c.remove(this.domNode,this.baseClass);this.isClosed=!0;this.isLoaded=!1;delete this.editNode;delete this.focusNode;
this.window&&this.window._frameElement&&(this.window._frameElement=null);this.editorObject=this.editingArea=this.document=this.window=null}},destroy:function(){this.isClosed||this.close(!1);this._updateTimer&&this._updateTimer.remove();this.inherited(arguments);E._globalSaveHandler&&delete E._globalSaveHandler[this.id]},_removeMozBogus:function(a){return a.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(a){a=a.replace(/\sclass="webkit-block-placeholder"/gi,
"");a=a.replace(/\sclass="apple-style-span"/gi,"");return a=a.replace(/<meta charset=\"utf-8\" \/>/gi,"")},_normalizeFontStyle:function(a){return a.replace(/<(\/)?strong([ \>])/gi,"\x3c$1b$2").replace(/<(\/)?em([ \>])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(a){return a.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2")},
_browserQueryCommandEnabled:function(a){if(!a)return!1;var b=9>l("ie")?this.document.selection.createRange():this.document;try{return b.queryCommandEnabled(a)}catch(c){return!1}},_createlinkEnabledImpl:function(){var a=!0;return a=l("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var a=!0;return a=l("mozilla")||l("webkit")?this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},
_inserttableEnabledImpl:function(){var a=!0;return a=l("mozilla")||l("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var a=!0;l("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("cut");return a},_copyEnabledImpl:function(){var a=!0;l("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("copy");return a},_pasteEnabledImpl:function(){var a=!0;return l("webkit")?
!0:a=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(a){return l("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,a)},_unlinkImpl:function(a){return this.queryCommandEnabled("unlink")&&(l("mozilla")||l("webkit"))?(a=this.selection.getAncestorElement("a"),this.selection.selectElement(a),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",!1,a)},_hilitecolorImpl:function(a){var b;this._handleTextColorOrProperties("hilitecolor",
a)||(l("mozilla")?(this.document.execCommand("styleWithCSS",!1,!0),b=this.document.execCommand("hilitecolor",!1,a),this.document.execCommand("styleWithCSS",!1,!1)):b=this.document.execCommand("hilitecolor",!1,a));return b},_backcolorImpl:function(a){l("ie")&&(a=a?a:null);var b=this._handleTextColorOrProperties("backcolor",a);b||(b=this.document.execCommand("backcolor",!1,a));return b},_forecolorImpl:function(a){l("ie")&&(a=a?a:null);var b=!1;(b=this._handleTextColorOrProperties("forecolor",a))||(b=
this.document.execCommand("forecolor",!1,a));return b},_inserthtmlImpl:function(a){a=this._preFilterContent(a);var c=!0;if(9>l("ie")){var d=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var f=d.item(0);d.length;)d.remove(d.item(0));f.outerHTML=a}else d.pasteHTML(a);d.select()}else if(8>l("trident")){var e=D.getSelection(this.window);if(e&&e.rangeCount&&e.getRangeAt){d=e.getRangeAt(0);d.deleteContents();var h=b.create("div");h.innerHTML=a;for(var g,
f=this.document.createDocumentFragment();a=h.firstChild;)g=f.appendChild(a);d.insertNode(f);g&&(d=d.cloneRange(),d.setStartAfter(g),d.collapse(!1),e.removeAllRanges(),e.addRange(d))}}else l("mozilla")&&!a.length?this.selection.remove():c=this.document.execCommand("inserthtml",!1,a);return c},_boldImpl:function(a){var b=!1;if(l("ie")||l("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("bold");b||(b=this.document.execCommand("bold",!1,a));return b},_italicImpl:function(a){var b=
!1;if(l("ie")||l("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("italic");b||(b=this.document.execCommand("italic",!1,a));return b},_underlineImpl:function(a){var b=!1;if(l("ie")||l("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("underline");b||(b=this.document.execCommand("underline",!1,a));return b},_strikethroughImpl:function(a){var b=!1;if(l("ie")||l("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("strikethrough");b||(b=this.document.execCommand("strikethrough",
!1,a));return b},_superscriptImpl:function(a){var b=!1;if(l("ie")||l("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("superscript");b||(b=this.document.execCommand("superscript",!1,a));return b},_subscriptImpl:function(a){var b=!1;if(l("ie")||l("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("subscript");b||(b=this.document.execCommand("subscript",!1,a));return b},_fontnameImpl:function(a){var b;if(l("ie")||l("trident"))b=this._handleTextColorOrProperties("fontname",
a);b||(b=this.document.execCommand("fontname",!1,a));return b},_fontsizeImpl:function(a){var b;if(l("ie")||l("trident"))b=this._handleTextColorOrProperties("fontsize",a);b||(b=this.document.execCommand("fontsize",!1,a));return b},_insertorderedlistImpl:function(a){var b=!1;if(l("ie")||l("trident")||l("edge"))b=this._adaptIEList("insertorderedlist",a);b||(b=this.document.execCommand("insertorderedlist",!1,a));return b},_insertunorderedlistImpl:function(a){var b=!1;if(l("ie")||l("trident")||l("edge"))b=
this._adaptIEList("insertunorderedlist",a);b||(b=this.document.execCommand("insertunorderedlist",!1,a));return b},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(a){var b=0;if(a&&a.childNodes){var c;for(c=0;c<a.childNodes.length;c++)var d=h.position(a.childNodes[c]),b=b+d.h}return b},_isNodeEmpty:function(a,b){return 1===a.nodeType?0<a.childNodes.length?this._isNodeEmpty(a.childNodes[0],
b):!0:3===a.nodeType?""===a.nodeValue.substring(b):!1},_removeStartingRangeFromRange:function(a,b){if(a.nextSibling)b.setStart(a.nextSibling,0);else{for(var c=a.parentNode;c&&null==c.nextSibling;)c=c.parentNode;c&&b.setStart(c.nextSibling,0)}return b},_adaptIESelection:function(){var a=D.getSelection(this.window);if(a&&a.rangeCount&&!a.isCollapsed){for(var b=a.getRangeAt(0),c=b.startContainer,d=b.startOffset;3===c.nodeType&&d>=c.length&&c.nextSibling;)d-=c.length,c=c.nextSibling;for(var f=null;this._isNodeEmpty(c,
d)&&c!==f;)f=c,b=this._removeStartingRangeFromRange(c,b),c=b.startContainer,d=0;a.removeAllRanges();a.addRange(b)}},_adaptIEFormatAreaAndExec:function(a){var c=D.getSelection(this.window),d=this.document,f,e,h,g,l,n,k;if(a&&c&&c.isCollapsed){if(this.queryCommandValue(a)){a=this._tagNamesForCommand(a);h=c.getRangeAt(0);g=h.startContainer;3===g.nodeType&&(e=h.endOffset,g.length<e&&(e=this._adjustNodeAndOffset(f,e),g=e.node));for(;g&&g!==this.editNode;){f=g.tagName?g.tagName.toLowerCase():"";if(-1<p.indexOf(a,
f)){k=g;break}g=g.parentNode}if(k&&(f=h.startContainer,a=d.createElement(k.tagName),b.place(a,k,"after"),f&&3===f.nodeType)){e=h.endOffset;f.length<e&&(e=this._adjustNodeAndOffset(f,e),f=e.node,e=e.offset);g=f.nodeValue;h=d.createTextNode(g.substring(0,e));var r=g.substring(e,g.length);r&&(l=d.createTextNode(r));b.place(h,f,"before");l&&(n=d.createElement("span"),n.className="ieFormatBreakerSpan",b.place(n,f,"after"),b.place(l,n,"after"),l=n);b.destroy(f);h=h.parentNode;for(f=[];h!==k;){g=h.tagName;
e={tagName:g};f.push(e);g=d.createElement(g);h.style&&(g.style&&h.style.cssText)&&(g.style.cssText=h.style.cssText,e.cssText=h.style.cssText);"FONT"===h.tagName&&(h.color&&(g.color=h.color,e.color=h.color),h.face&&(g.face=h.face,e.face=h.face),h.size&&(g.size=h.size,e.size=h.size));h.className&&(g.className=h.className,e.className=h.className);if(l)for(;l;)e=l.nextSibling,g.appendChild(l),l=e;g.tagName==h.tagName?(n=d.createElement("span"),n.className="ieFormatBreakerSpan",b.place(n,h,"after"),b.place(g,
n,"after")):b.place(g,h,"after");l=g;h=h.parentNode}if(l){if(1===l.nodeType||3===l.nodeType&&l.nodeValue)a.innerHTML="";for(;l;)e=l.nextSibling,a.appendChild(l),l=e}if(f.length){e=f.pop();l=d.createElement(e.tagName);e.cssText&&l.style&&(l.style.cssText=e.cssText);e.className&&(l.className=e.className);"FONT"===e.tagName&&(e.color&&(l.color=e.color),e.face&&(l.face=e.face),e.size&&(l.size=e.size));for(b.place(l,a,"before");f.length;)e=f.pop(),k=d.createElement(e.tagName),e.cssText&&k.style&&(k.style.cssText=
e.cssText),e.className&&(k.className=e.className),"FONT"===e.tagName&&(e.color&&(k.color=e.color),e.face&&(k.face=e.face),e.size&&(k.size=e.size)),l.appendChild(k),l=k;k=d.createTextNode(".");n.appendChild(k);l.appendChild(k)}else n=d.createElement("span"),n.className="ieFormatBreakerSpan",k=d.createTextNode("."),n.appendChild(k),b.place(n,a,"before");l=D.create(this.window);l.setStart(k,0);l.setEnd(k,k.length);c.removeAllRanges();c.addRange(l);this.selection.collapse(!1);k.parentNode.innerHTML="";
a.firstChild||b.destroy(a);return!0}return!1}h=c.getRangeAt(0);if((f=h.startContainer)&&3===f.nodeType)return e=h.startOffset,f.length<e&&(e=this._adjustNodeAndOffset(f,e),f=e.node,e=e.offset),g=f.nodeValue,h=d.createTextNode(g.substring(0,e)),r=g.substring(e),""!==r&&(l=d.createTextNode(g.substring(e))),n=d.createElement("span"),k=d.createTextNode("."),n.appendChild(k),h.length?b.place(h,f,"after"):h=f,b.place(n,h,"after"),l&&b.place(l,n,"after"),b.destroy(f),l=D.create(this.window),l.setStart(k,
0),l.setEnd(k,k.length),c.removeAllRanges(),c.addRange(l),d.execCommand(a),b.place(n.firstChild,n,"before"),b.destroy(n),l.setStart(k,0),l.setEnd(k,k.length),c.removeAllRanges(),c.addRange(l),this.selection.collapse(!1),k.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(a){var c=D.getSelection(this.window);if(c.isCollapsed&&c.rangeCount&&!this.queryCommandValue(a)){var d=c.getRangeAt(0),f=d.startContainer;if(f&&3==f.nodeType&&!d.startOffset)return d="ul","insertorderedlist"===a&&(d=
"ol"),a=this.document.createElement(d),d=b.create("li",null,a),b.place(a,f,"before"),d.appendChild(f),b.create("br",null,a,"after"),a=D.create(this.window),a.setStart(f,0),a.setEnd(f,f.length),c.removeAllRanges(),c.addRange(a),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(c,d){var f=D.getSelection(this.window),e=this.document,h,g,n,k,r;d=d||null;if(c&&(f&&f.isCollapsed)&&f.rangeCount&&(g=f.getRangeAt(0),(h=g.startContainer)&&3===h.nodeType)){r=g.startOffset;h.length<
r&&(g=this._adjustNodeAndOffset(h,r),h=g.node,r=g.offset);n=h.nodeValue;g=e.createTextNode(n.substring(0,r));""!==n.substring(r)&&(k=e.createTextNode(n.substring(r)));n=e.createElement("span");r=e.createTextNode(".");n.appendChild(r);e=e.createElement("span");n.appendChild(e);g.length?b.place(g,h,"after"):g=h;b.place(n,g,"after");k&&b.place(k,n,"after");b.destroy(h);h=D.create(this.window);h.setStart(r,0);h.setEnd(r,r.length);f.removeAllRanges();f.addRange(h);if(l("webkit")){f="color";if("hilitecolor"===
c||"backcolor"===c)f="backgroundColor";a.set(n,f,d);this.selection.remove();b.destroy(e);n.innerHTML="\x26#160;";this.selection.selectElement(n);this.focus()}else this.execCommand(c,d),b.place(n.firstChild,n,"before"),b.destroy(n),h.setStart(r,0),h.setEnd(r,r.length),f.removeAllRanges(),f.addRange(h),this.selection.collapse(!1),r.parentNode.removeChild(r);return!0}return!1},_adjustNodeAndOffset:function(a,b){for(;a.length<b&&a.nextSibling&&3===a.nextSibling.nodeType;)b-=a.length,a=a.nextSibling;return{node:a,
offset:b}},_tagNamesForCommand:function(a){return"bold"===a?["b","strong"]:"italic"===a?["i","em"]:"strikethrough"===a?["s","strike"]:"superscript"===a?["sup"]:"subscript"===a?["sub"]:"underline"===a?["u"]:[]},_stripBreakerNodes:function(a){if(this.isLoaded)return t(".ieFormatBreakerSpan",a).forEach(function(a){for(;a.firstChild;)b.place(a.firstChild,a,"before");b.destroy(a)}),a},_stripTrailingEmptyNodes:function(a){for(;a.lastChild&&(/^(p|div|br)$/i.test(a.lastChild.nodeName)&&0==a.lastChild.children.length&&
/^[\s\xA0]*$/.test(a.lastChild.textContent||a.lastChild.innerText||"")||3===a.lastChild.nodeType&&/^[\s\xA0]*$/.test(a.lastChild.nodeValue));)b.destroy(a.lastChild);return a}});return E})},"dijit/selection":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/sniff dojo/_base/window dijit/focus".split(" "),function(p,k,m,g,e,d){var c=function(b){var a=b.document;this.getType=function(){if(a.getSelection){var c="text",d;try{d=b.getSelection()}catch(e){}d&&1==d.rangeCount&&(d=d.getRangeAt(0),
d.startContainer==d.endContainer&&(1==d.endOffset-d.startOffset&&3!=d.startContainer.nodeType)&&(c="control"));return c}return a.selection.type.toLowerCase()};this.getSelectedText=function(){if(a.getSelection){var c=b.getSelection();return c?c.toString():""}return"control"==this.getType()?null:a.selection.createRange().text};this.getSelectedHtml=function(){if(a.getSelection){var c=b.getSelection();if(c&&c.rangeCount){var d,e="";for(d=0;d<c.rangeCount;d++){var g=c.getRangeAt(d).cloneContents(),k=a.createElement("div");
k.appendChild(g);e+=k.innerHTML}return e}return null}return"control"==this.getType()?null:a.selection.createRange().htmlText};this.getSelectedElement=function(){if("control"==this.getType()){if(a.getSelection){var c=b.getSelection();return c.anchorNode.childNodes[c.anchorOffset]}if((c=a.selection.createRange())&&c.item)return a.selection.createRange().item(0)}return null};this.getParentElement=function(){if("control"==this.getType()){var b=this.getSelectedElement();if(b)return b.parentNode}else if(a.getSelection){if(b=
a.getSelection()){for(b=b.anchorNode;b&&1!=b.nodeType;)b=b.parentNode;return b}}else return b=a.selection.createRange(),b.collapse(!0),b.parentElement();return null};this.hasAncestorElement=function(a){return null!=this.getAncestorElement.apply(this,arguments)};this.getAncestorElement=function(a){var b=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(b,arguments)};this.isTag=function(a,b){if(a&&a.tagName)for(var c=a.tagName.toLowerCase(),d=0;d<b.length;d++){var e=String(b[d]).toLowerCase();
if(c==e)return e}return""};this.getParentOfType=function(a,b){for(;a;){if(this.isTag(a,b).length)return a;a=a.parentNode}return null};this.collapse=function(c){if(a.getSelection){var d=b.getSelection();d.removeAllRanges?c?d.collapseToStart():d.collapseToEnd():d.collapse(c)}else d=a.selection.createRange(),d.collapse(c),d.select()};this.remove=function(){var c=a.selection;a.getSelection?(c=b.getSelection(),c.deleteFromDocument()):"none"!=c.type.toLowerCase()&&c.clear();return c};this.selectElementChildren=
function(c,d){var e;c=k.byId(c);if(a.getSelection){var m=b.getSelection();g("opera")?(e=m.rangeCount?m.getRangeAt(0):a.createRange(),e.setStart(c,0),e.setEnd(c,3==c.nodeType?c.length:c.childNodes.length),m.addRange(e)):m.selectAllChildren(c)}else if(e=c.ownerDocument.body.createTextRange(),e.moveToElementText(c),!d)try{e.select()}catch(p){}};this.selectElement=function(b,c){var d;b=k.byId(b);if(a.getSelection){var h=a.getSelection();d=a.createRange();h.removeAllRanges&&(g("opera")&&h.getRangeAt(0)&&
(d=h.getRangeAt(0)),d.selectNode(b),h.removeAllRanges(),h.addRange(d))}else try{h=b.tagName?b.tagName.toLowerCase():"",d="img"===h||"table"===h?e.body(a).createControlRange():e.body(a).createRange(),d.addElement(b),c||d.select()}catch(m){this.selectElementChildren(b,c)}};this.inSelection=function(c){if(c){var d,e;if(a.getSelection){var g=b.getSelection();g&&0<g.rangeCount&&(e=g.getRangeAt(0));if(e&&e.compareBoundaryPoints&&a.createRange)try{if(d=a.createRange(),d.setStart(c,0),1===e.compareBoundaryPoints(e.START_TO_END,
d))return!0}catch(k){}}else{e=a.selection.createRange();try{d=c.ownerDocument.body.createTextRange(),d.moveToElementText(c)}catch(m){}if(e&&d&&1===e.compareEndPoints("EndToStart",d))return!0}}return!1};this.getBookmark=function(){var c,e,g=a.selection,k=d.curNode;if(a.getSelection){if(g=b.getSelection())if(g.isCollapsed){if(c=k?k.tagName:"")if(c=c.toLowerCase(),"textarea"==c||"input"==c&&(!k.type||"text"==k.type.toLowerCase()))return g={start:k.selectionStart,end:k.selectionEnd,node:k,pRange:!0},
{isCollapsed:g.end<=g.start,mark:g};c={isCollapsed:!0};g.rangeCount&&(c.mark=g.getRangeAt(0).cloneRange())}else e=g.getRangeAt(0),c={isCollapsed:!1,mark:e.cloneRange()}}else if(g){c=k?k.tagName:"";c=c.toLowerCase();if(k&&c&&("button"==c||"textarea"==c||"input"==c)){if(g.type&&"none"==g.type.toLowerCase())return{isCollapsed:!0,mark:null};e=g.createRange();return{isCollapsed:e.text&&e.text.length?!1:!0,mark:{range:e,pRange:!0}}}c={};try{e=g.createRange(),c.isCollapsed=!("Text"==g.type?e.htmlText.length:
e.length)}catch(m){return c.isCollapsed=!0,c}if("CONTROL"==g.type.toUpperCase())if(e.length){c.mark=[];g=0;for(k=e.length;g<k;)c.mark.push(e.item(g++))}else c.isCollapsed=!0,c.mark=null;else c.mark=e.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return c};this.moveToBookmark=function(c){if(c=c.mark)if(a.getSelection){var d=b.getSelection();d&&d.removeAllRanges?c.pRange?(d=c.node,d.selectionStart=c.start,d.selectionEnd=c.end):(d.removeAllRanges(),d.addRange(c)):
console.warn("No idea how to restore selection for this browser!")}else if(a.selection&&c){var e;c.pRange?e=c.range:m.isArray(c)?(e=a.body.createControlRange(),p.forEach(c,function(a){e.addElement(a)})):(e=a.body.createTextRange(),e.moveToBookmark(c));e.select()}};this.isCollapsed=function(){return this.getBookmark().isCollapsed}},b=new c(window);b.SelectionManager=c;return b})},"dijit/_editor/range":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang"],function(p,k,m){var g=
{getIndex:function(c,b){for(var d=[],a=[],e=c,g,k;c!=b;){var m=0;for(g=c.parentNode;k=g.childNodes[m++];)if(k===c){--m;break}d.unshift(m);a.unshift(m-g.childNodes.length);c=g}if(0<d.length&&3==e.nodeType){for(k=e.previousSibling;k&&3==k.nodeType;)d[d.length-1]--,k=k.previousSibling;for(k=e.nextSibling;k&&3==k.nodeType;)a[a.length-1]++,k=k.nextSibling}return{o:d,r:a}},getNode:function(c,b){if(!m.isArray(c)||0==c.length)return b;var d=b;p.every(c,function(a){if(0<=a&&a<d.childNodes.length)d=d.childNodes[a];
else return d=null,!1;return!0});return d},getCommonAncestor:function(c,b,d){d=d||c.ownerDocument.body;var a=function(a){for(var b=[];a;)if(b.unshift(a),a!==d)a=a.parentNode;else break;return b};c=a(c);b=a(b);for(var a=Math.min(c.length,b.length),e=c[0],g=1;g<a;g++)if(c[g]===b[g])e=c[g];else break;return e},getAncestor:function(c,b,d){for(d=d||c.ownerDocument.body;c&&c!==d;){var a=c.nodeName.toUpperCase();if(b.test(a))return c;c=c.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,
getBlockAncestor:function(c,b,d){d=d||c.ownerDocument.body;b=b||g.BlockTagNames;for(var a=null,e;c&&c!==d;){var k=c.nodeName.toUpperCase();!a&&b.test(k)&&(a=c);!e&&/^(?:BODY|TD|TH|CAPTION)$/.test(k)&&(e=c);c=c.parentNode}return{blockNode:a,blockContainer:e||c.ownerDocument.body}},atBeginningOfContainer:function(c,b,d){var a=!1,e=0==d;!e&&3==b.nodeType&&/^[\s\xA0]+$/.test(b.nodeValue.substr(0,d))&&(e=!0);if(e)for(a=!0;b&&b!==c;){if(b.previousSibling){a=!1;break}b=b.parentNode}return a},atEndOfContainer:function(c,
b,d){var a=!1,e=d==(b.length||b.childNodes.length);!e&&3==b.nodeType&&/^[\s\xA0]+$/.test(b.nodeValue.substr(d))&&(e=!0);if(e)for(a=!0;b&&b!==c;){if(b.nextSibling){a=!1;break}b=b.parentNode}return a},adjacentNoneTextNode:function(c,b){for(var d=c,a=0-c.length||0,e=b?"nextSibling":"previousSibling";d&&3==d.nodeType;)a+=d.length,d=d[e];return[d,a]},create:function(c){c=c||window;return c.getSelection?c.document.createRange():new d},getSelection:function(c,b){if(c.getSelection)return c.getSelection();
var d=new e.selection(c);b||d._getCurrentSelection();return d}};if(!window.getSelection)var e=g.ie={cachedSelection:{},selection:function(c){this._ranges=[];this.addRange=function(b,c){this._ranges.push(b);c||b._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(b){return this._ranges[b]};this._getCurrentSelection=function(){this.removeAllRanges();var b;b=c.document.selection.createRange();b="CONTROL"==c.document.selection.type.toUpperCase()?
new d(e.decomposeControlRange(b)):new d(e.decomposeTextRange(b));b?(this.addRange(b,!0),this.isCollapsed=b.collapsed):this.isCollapsed=!0}},decomposeControlRange:function(c){var b=c.item(0),d=c.item(c.length-1);c=b.parentNode;var a=d.parentNode,b=g.getIndex(b,c).o[0],d=g.getIndex(d,a).o[0]+1;return[c,b,a,d]},getEndPoint:function(c,b){var d=c.duplicate();d.collapse(!b);var a="EndTo"+(b?"End":"Start"),e=d.parentElement(),k,m,q;0<e.childNodes.length?p.every(e.childNodes,function(b,l){var p;if(3!=b.nodeType)if(d.moveToElementText(b),
0<d.compareEndPoints(a,c))if(q&&3==q.nodeType)k=q,p=!0;else return k=e,m=l,!1;else{if(l==e.childNodes.length-1)return k=e,m=e.childNodes.length,!1}else l==e.childNodes.length-1&&(k=b,p=!0);if(p&&k){k=(p=g.adjacentNoneTextNode(k)[0])?p.nextSibling:e.firstChild;var t=g.adjacentNoneTextNode(k);p=t[0];t=t[1];p?(d.moveToElementText(p),d.collapse(!1)):d.moveToElementText(e);d.setEndPoint(a,c);m=d.text.length-t;return!1}q=b;return!0}):(k=e,m=0);if(!b&&1==k.nodeType&&m==k.childNodes.length){var t=k.nextSibling;
t&&3==t.nodeType&&(k=t,m=0)}return[k,m]},setEndPoint:function(c,b,d){c=c.duplicate();var a;if(3!=b.nodeType)if(0<d){if(a=b.childNodes[d-1])if(3==a.nodeType)b=a,d=a.length;else if(a.nextSibling&&3==a.nextSibling.nodeType)b=a.nextSibling,d=0;else{c.moveToElementText(a.nextSibling?a:b);var e=a.parentNode;a=e.insertBefore(a.ownerDocument.createTextNode(" "),a.nextSibling);c.collapse(!1);e.removeChild(a)}}else c.moveToElementText(b),c.collapse(!0);3==b.nodeType&&(a=g.adjacentNoneTextNode(b),e=a[0],a=a[1],
e?(c.moveToElementText(e),c.collapse(!1),"inherit"!=e.contentEditable&&a++):(c.moveToElementText(b.parentNode),c.collapse(!0),c.move("character",1),c.move("character",-1)),d+=a,0<d&&c.move("character",d)!=d&&console.error("Error when moving!"));return c},decomposeTextRange:function(c){var b=e.getEndPoint(c),d=b[0],a=b[1],f=b[0],b=b[1];c.htmlText.length&&(c.htmlText==c.text?b=a+c.text.length:(b=e.getEndPoint(c,!0),f=b[0],b=b[1]));return[d,a,f,b]},setRange:function(c,b,d,a,f,g){b=e.setEndPoint(c,b,
d);c.setEndPoint("StartToStart",b);if(!g)var k=e.setEndPoint(c,a,f);c.setEndPoint("EndToEnd",k||b);return c}},d=g.W3CRange=k(null,{constructor:function(){0<arguments.length?(this.setStart(arguments[0][0],arguments[0][1]),this.setEnd(arguments[0][2],arguments[0][3])):(this.startContainer=this.commonAncestorContainer=null,this.startOffset=0,this.endContainer=null,this.endOffset=0,this.collapsed=!0)},_updateInternal:function(){this.commonAncestorContainer=this.startContainer!==this.endContainer?g.getCommonAncestor(this.startContainer,
this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(c,b){b=parseInt(b);this.startContainer===c&&this.startOffset==b||(delete this._cachedBookmark,this.startContainer=c,this.startOffset=b,this.endContainer?this._updateInternal():this.setEnd(c,b))},setEnd:function(c,b){b=parseInt(b);this.endContainer===c&&this.endOffset==b||(delete this._cachedBookmark,this.endContainer=c,this.endOffset=b,this.startContainer?
this._updateInternal():this.setStart(c,b))},setStartAfter:function(c,b){this._setPoint("setStart",c,b,1)},setStartBefore:function(c,b){this._setPoint("setStart",c,b,0)},setEndAfter:function(c,b){this._setPoint("setEnd",c,b,1)},setEndBefore:function(c,b){this._setPoint("setEnd",c,b,0)},_setPoint:function(c,b,d,a){d=g.getIndex(b,b.parentNode).o;this[c](b.parentNode,d.pop()+a)},_getIERange:function(){var c=(this._body||this.endContainer.ownerDocument.body).createTextRange();e.setRange(c,this.startContainer,
this.startOffset,this.endContainer,this.endOffset,this.collapsed);return c},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var c=this.startContainer,b=this._getIERange();3===c.nodeType&&!this.startOffset&&this.setStartBefore(c);b.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var c=new d([this.startContainer,this.startOffset,
this.endContainer,this.endOffset]);c._body=this._body;return c},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});m.setObject("dijit.range",g);return g})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(p,k,m){var g={};k.setObject("dijit._editor.html",g);var e=g.escapeXml=function(d,c){d=d.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,
"\x26gt;").replace(/"/gm,"\x26quot;");c||(d=d.replace(/'/gm,"\x26#39;"));return d};g.getNodeHtml=function(d){var c=[];g.getNodeHtmlHelper(d,c);return c.join("")};g.getNodeHtmlHelper=function(d,c){switch(d.nodeType){case 1:var b=d.nodeName.toLowerCase();if(!b||"/"==b.charAt(0))return"";c.push("\x3c",b);var h=[],a={},f;if(m("dom-attributes-explicit")||m("dom-attributes-specified-flag"))for(var k=0;f=d.attributes[k++];){var n=f.name;if("_dj"!==n.substr(0,3)&&(!m("dom-attributes-specified-flag")||f.specified)&&
!(n in a)){f=f.value;if("src"==n||"href"==n)d.getAttribute("_djrealurl")&&(f=d.getAttribute("_djrealurl"));8===m("ie")&&"style"===n&&(f=f.replace("HEIGHT:","height:").replace("WIDTH:","width:"));h.push([n,f]);a[n]=f}}else{var q=(/^input$|^img$/i.test(d.nodeName)?d:d.cloneNode(!1)).outerHTML,a=q.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi),q=q.substr(0,q.indexOf("\x3e"));p.forEach(a,function(a){if(a){var c=a.indexOf("\x3d");if(0<c&&(a=a.substring(0,c),"_dj"!=a.substr(0,3)))if(("src"==a||"href"==a)&&d.getAttribute("_djrealurl"))h.push([a,
d.getAttribute("_djrealurl")]);else{var e;switch(a){case "style":e=d.style.cssText.toLowerCase();break;case "class":e=d.className;break;case "width":if("img"===b){(c=/width=(\S+)/i.exec(q))&&(e=c[1]);break}case "height":if("img"===b){(c=/height=(\S+)/i.exec(q))&&(e=c[1]);break}default:e=d.getAttribute(a)}null!=e&&h.push([a,e.toString()])}}},this)}h.sort(function(a,b){return a[0]<b[0]?-1:a[0]==b[0]?0:1});for(a=0;f=h[a++];)c.push(" ",f[0],'\x3d"',"string"===typeof f[1]?e(f[1],!0):f[1],'"');switch(b){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":c.push(" /\x3e");
break;case "script":c.push("\x3e",d.innerHTML,"\x3c/",b,"\x3e");break;default:c.push("\x3e"),d.hasChildNodes()&&g.getChildrenHtmlHelper(d,c),c.push("\x3c/",b,"\x3e")}break;case 4:case 3:c.push(e(d.nodeValue,!0));break;case 8:c.push("\x3c!--",e(d.nodeValue,!0),"--\x3e");break;default:c.push("\x3c!-- Element not recognized - Type: ",d.nodeType," Name: ",d.nodeName,"--\x3e")}};g.getChildrenHtml=function(d){var c=[];g.getChildrenHtmlHelper(d,c);return c.join("")};g.getChildrenHtmlHelper=function(d,c){if(d)for(var b=
d.childNodes||d,e=!m("ie")||b!==d,a,f=0;a=b[f++];)(!e||a.parentNode==d)&&g.getNodeHtmlHelper(a,c)};return g})},"dijit/_base/focus":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/topic dojo/_base/window ../focus ../selection ../main".split(" "),function(p,k,m,g,e,d,c,b){d.focus=function(c){if(c){var a="node"in c?c.node:c,f=c.bookmark;c=c.openedForWindow;var g=f?f.isCollapsed:!1;if(a){var k="iframe"==a.tagName.toLowerCase()?a.contentWindow:a;if(k&&k.focus)try{k.focus()}catch(m){}d._onFocusNode(a)}if(f&&
e.withGlobal(c||e.global,b.isCollapsed)&&!g){c&&c.focus();try{e.withGlobal(c||e.global,b.moveToBookmark,null,[f])}catch(p){}}}};d.watch("curNode",function(c,a,d){b._curFocus=d;b._prevFocus=a;d&&g.publish("focusNode",d)});d.watch("activeStack",function(c,a,d){b._activeStack=d});d.on("widget-blur",function(b,a){g.publish("widgetBlur",b,a)});d.on("widget-focus",function(b,a){g.publish("widgetFocus",b,a)});m.mixin(b,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return b.getBookmark().isCollapsed},
getBookmark:function(){return(e.global==window?c:new c.SelectionManager(e.global)).getBookmark()},moveToBookmark:function(b){return(e.global==window?c:new c.SelectionManager(e.global)).moveToBookmark(b)},getFocus:function(c,a){var f=!d.curNode||c&&k.isDescendant(d.curNode,c.domNode)?b._prevFocus:d.curNode;return{node:f,bookmark:f&&f==d.curNode&&e.withGlobal(a||e.global,b.getBookmark),openedForWindow:a}},_activeStack:[],registerIframe:function(b){return d.registerIframe(b)},unregisterIframe:function(b){b&&
b.remove()},registerWin:function(b,a){return d.registerWin(b,a)},unregisterWin:function(b){b&&b.remove()}});return b})},"url:dojox/grid/resources/View.html":'\x3cdiv class\x3d"dojoxGridView" role\x3d"presentation"\x3e\n\t\x3cdiv class\x3d"dojoxGridHeader" dojoAttachPoint\x3d"headerNode" role\x3d"presentation"\x3e\n\t\t\x3cdiv dojoAttachPoint\x3d"headerNodeContainer" style\x3d"width:9000em" role\x3d"presentation"\x3e\n\t\t\t\x3cdiv dojoAttachPoint\x3d"headerContentNode" role\x3d"row"\x3e\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3cinput type\x3d"checkbox" class\x3d"dojoxGridHiddenFocus" dojoAttachPoint\x3d"hiddenFocusNode" role\x3d"presentation" /\x3e\n\t\x3cinput type\x3d"checkbox" class\x3d"dojoxGridHiddenFocus" role\x3d"presentation" /\x3e\n\t\x3cdiv class\x3d"dojoxGridScrollbox" dojoAttachPoint\x3d"scrollboxNode" role\x3d"presentation"\x3e\n\t\t\x3cdiv class\x3d"dojoxGridContent" dojoAttachPoint\x3d"contentNode" hidefocus\x3d"hidefocus" role\x3d"presentation"\x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',
"url:dojox/grid/resources/_Grid.html":'\x3cdiv hidefocus\x3d"hidefocus" role\x3d"grid" dojoAttachEvent\x3d"onmouseout:_mouseOut"\x3e\n\t\x3cdiv class\x3d"dojoxGridMasterHeader" dojoAttachPoint\x3d"viewsHeaderNode" role\x3d"presentation"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"dojoxGridMasterView" dojoAttachPoint\x3d"viewsNode" role\x3d"presentation"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"dojoxGridMasterMessages" style\x3d"display: none;" dojoAttachPoint\x3d"messagesNode"\x3e\x3c/div\x3e\n\t\x3cspan dojoAttachPoint\x3d"lastFocusNode" tabindex\x3d"0"\x3e\x3c/span\x3e\n\x3c/div\x3e\n',
"url:dijit/templates/Calendar.html":'\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" class\x3d"dijitCalendarContainer" role\x3d"grid" aria-labelledby\x3d"${id}_mddb ${id}_year" data-dojo-attach-point\x3d"gridNode"\x3e\n\t\x3cthead\x3e\n\t\t\x3ctr class\x3d"dijitReset dijitCalendarMonthContainer" valign\x3d"top"\x3e\n\t\t\t\x3cth class\x3d\'dijitReset dijitCalendarArrow\' data-dojo-attach-point\x3d"decrementMonth" scope\x3d"col"\x3e\n\t\t\t\t\x3cspan class\x3d"dijitInline dijitCalendarIncrementControl dijitCalendarDecrease" role\x3d"presentation"\x3e\x3c/span\x3e\n\t\t\t\t\x3cspan data-dojo-attach-point\x3d"decreaseArrowNode" class\x3d"dijitA11ySideArrow"\x3e-\x3c/span\x3e\n\t\t\t\x3c/th\x3e\n\t\t\t\x3cth class\x3d\'dijitReset\' colspan\x3d"5" scope\x3d"col"\x3e\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"monthNode"\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\x3c/th\x3e\n\t\t\t\x3cth class\x3d\'dijitReset dijitCalendarArrow\' scope\x3d"col" data-dojo-attach-point\x3d"incrementMonth"\x3e\n\t\t\t\t\x3cspan class\x3d"dijitInline dijitCalendarIncrementControl dijitCalendarIncrease" role\x3d"presentation"\x3e\x3c/span\x3e\n\t\t\t\t\x3cspan data-dojo-attach-point\x3d"increaseArrowNode" class\x3d"dijitA11ySideArrow"\x3e+\x3c/span\x3e\n\t\t\t\x3c/th\x3e\n\t\t\x3c/tr\x3e\n\t\t\x3ctr role\x3d"row"\x3e\n\t\t\t${!dayCellsHtml}\n\t\t\x3c/tr\x3e\n\t\x3c/thead\x3e\n\t\x3ctbody data-dojo-attach-point\x3d"dateRowsNode" data-dojo-attach-event\x3d"ondijitclick: _onDayClick" class\x3d"dijitReset dijitCalendarBodyContainer"\x3e\n\t\t\t${!dateRowsHtml}\n\t\x3c/tbody\x3e\n\t\x3ctfoot class\x3d"dijitReset dijitCalendarYearContainer"\x3e\n\t\t\x3ctr\x3e\n\t\t\t\x3ctd class\x3d\'dijitReset\' valign\x3d"top" colspan\x3d"7" role\x3d"presentation"\x3e\n\t\t\t\t\x3cdiv class\x3d"dijitCalendarYearLabel"\x3e\n\t\t\t\t\t\x3cspan data-dojo-attach-point\x3d"previousYearLabelNode" class\x3d"dijitInline dijitCalendarPreviousYear" role\x3d"button"\x3e\x3c/span\x3e\n\t\t\t\t\t\x3cspan data-dojo-attach-point\x3d"currentYearLabelNode" class\x3d"dijitInline dijitCalendarSelectedYear" role\x3d"button" id\x3d"${id}_year"\x3e\x3c/span\x3e\n\t\t\t\t\t\x3cspan data-dojo-attach-point\x3d"nextYearLabelNode" class\x3d"dijitInline dijitCalendarNextYear" role\x3d"button"\x3e\x3c/span\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\x3c/td\x3e\n\t\t\x3c/tr\x3e\n\t\x3c/tfoot\x3e\n\x3c/table\x3e\n',
"url:dijit/form/templates/HorizontalSlider.html":'\x3ctable class\x3d"dijit dijitReset dijitSlider dijitSliderH" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"0" rules\x3d"none" data-dojo-attach-event\x3d"onkeydown:_onKeyDown, onkeyup:_onKeyUp"\n\trole\x3d"presentation"\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"topDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderDecrementIconH" style\x3d"display:none" data-dojo-attach-point\x3d"decrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e-\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper" data-dojo-attach-event\x3d"press:_onClkDecBumper"\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cinput data-dojo-attach-point\x3d"valueNode" type\x3d"hidden" ${!nameAttrSetting}\n\t\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitSliderBarContainerH" role\x3d"presentation" data-dojo-attach-point\x3d"sliderBarContainer"\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"progressBar" class\x3d"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH" data-dojo-attach-event\x3d"press:_onBarClick"\n\t\t\t\t\t\x3e\x3cdiv class\x3d"dijitSliderMoveable dijitSliderMoveableH"\n\t\t\t\t\t\t\x3e\x3cdiv data-dojo-attach-point\x3d"sliderHandle,focusNode" class\x3d"dijitSliderImageHandle dijitSliderImageHandleH" data-dojo-attach-event\x3d"press:_onHandleClick" role\x3d"slider"\x3e\x3c/div\n\t\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"remainingBar" class\x3d"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH" data-dojo-attach-event\x3d"press:_onBarClick"\x3e\x3c/div\n\t\t\t\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper" data-dojo-attach-event\x3d"press:_onClkIncBumper"\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderIncrementIconH" style\x3d"display:none" data-dojo-attach-point\x3d"incrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e+\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"containerNode,bottomDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\x3e\x3c/tr\n\x3e\x3c/table\x3e\n',
"*now":function(p){p(['dojo/i18n!*preload*JBrowse/View/TrackList/nls/Faceted*["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("JBrowse/View/TrackList/Faceted","dojo/_base/declare dojo/_base/array dojo/_base/lang dijit/TitlePane dijit/layout/ContentPane JBrowse/Util dojox/grid/EnhancedGrid dojox/grid/enhanced/plugins/IndirectSelection".split(" "),function(p,k,m,g,e,d,c){var b=d.dojof;return p("JBrowse.View.TrackList.Faceted",null,{constructor:function(b){this.browser=b.browser;this.tracksActive={};this.config=b;this._isSelectableFacet=this._coerceFilter(b.selectableFacetFilter||function(a,b){return 1<b.getFacetStats(a).avgBucketSize&&
!k.some(b.getLabelAttributes().concat(b.getIdentityAttributes()),function(b){return b==a})});this.displayColumns=b.displayColumns;this._isDisplayableColumn=this._coerceFilter(b.displayColumnFilter||function(a){return"label"!=a.toLowerCase()});this.trackDataStore=b.trackMetaData;this.browser.subscribe("/jbrowse/v1/c/tracks/show",m.hitch(this,"setTracksActive"));this.browser.subscribe("/jbrowse/v1/c/tracks/hide",m.hitch(this,"setTracksInactive"));this.browser.subscribe("/jbrowse/v1/c/tracks/delete",
m.hitch(this,"setTracksInactive"));this.renderInitial();this.trackDataStore.onReady(this,function(){this.renderSelectors();dojo.connect(this.dataGrid.selection,"onSelected",this,function(a){this._ifNotSuppressed("selectionEvents",function(){this._suppress("gridUpdate",function(){this.browser.publish("/jbrowse/v1/v/tracks/show",[this.dataGrid.getItem(a).conf])})})});dojo.connect(this.dataGrid.selection,"onDeselected",this,function(a){this._ifNotSuppressed("selectionEvents",function(){this._suppress("gridUpdate",
function(){this.browser.publish("/jbrowse/v1/v/tracks/hide",[this.dataGrid.getItem(a).conf])})})})});this.trackDataStore.onReady(this,"_updateFacetCounts");this.trackDataStore.onReady(this,"_updateMatchCount");dojo.connect(this.trackDataStore,"onFetchSuccess",this,"_updateGridSelections");dojo.connect(this.trackDataStore,"onFetchSuccess",this,"_updateMatchCount")},_coerceFilter:function(b){"string"==typeof b&&(b=[b]);dojo.isArray(b)&&(b=function(a,c){return k.some(b,function(a){return c==a})});return b},
_ifNotSuppressed:function(b,a){"string"==typeof b&&(b=[b]);this.suppress||(this.suppress={});return k.some(b,function(a){return this.suppress[a]},this)?void 0:a.call(this)},_suppress:function(b,a){"string"==typeof b&&(b=[b]);this.suppress||(this.suppress={});dojo.forEach(b,function(a){this.suppress[a]=!0},this);var c=a.call(this);dojo.forEach(b,function(a){this.suppress[a]=!1},this);return c},_suppressRecursion:function(b){var a=["method_"+b],c=this[b];return this._ifNotSuppressed(a,function(){this._suppress(a,
c)})},renderInitial:function(){this.containerElem=dojo.create("div",{id:"faceted_tracksel",style:{left:"-95%",width:"95%",zIndex:500}},document.body);dojo.create("div",{className:"faceted_tracksel_on_off tab",innerHTML:'\x3cimg src\x3d"'+this.browser.resolveUrl("img/left_arrow.png")+'"\x3e\x3cdiv\x3eSelect\x3cbr\x3etracks\x3c/div\x3e'},this.containerElem);this.mainContainer=new dijit.layout.BorderContainer({design:"headline",gutters:!1},dojo.create("div",{className:"mainContainer"},this.containerElem));
this.topPane=new dijit.layout.ContentPane({region:"top",id:"faceted_tracksel_top",content:'\x3cdiv class\x3d"title"\x3eSelect Tracks\x3c/div\x3e \x3cdiv class\x3d"topLink" style\x3d"cursor: help"\x3e\x3ca title\x3d"Track selector help"\x3eHelp\x3c/a\x3e\x3c/div\x3e'});dojo.query('div.topLink a[title\x3d"Track selector help"]',this.topPane.domNode).forEach(function(a){var b=new dijit.Dialog({"class":"help_dialog",refocus:!1,draggable:!1,title:"Track Selection",content:'\x3cdiv class\x3d"main"\x3e\x3cp\x3eThe JBrowse Faceted Track Selector makes it easy to search through large numbers of available tracks to find exactly the ones you want. You can incrementally filter the track display to narrow it down to those your are interested in.  There are two types of filtering available, which can be used together: \x3cb\x3efiltering with data fields\x3c/b\x3e, and free-form \x3cb\x3efiltering with text\x3c/b\x3e.\x3c/p\x3e  \x3cdl\x3e\x3cdt\x3eFiltering with Data Fields\x3c/dt\x3e  \x3cdd\x3eThe left column of the display contains the available \x3cb\x3edata fields\x3c/b\x3e.  Click on the data field name to expand it, and then select one or more values for that field.  This narrows the search to display only tracks that have one of those values for that field.  You can do this for any number of fields.\x3cdd\x3e  \x3cdt\x3eFiltering with Text\x3c/dt\x3e  \x3cdd\x3eType text in the "Contains text" box to filter for tracks whose data contains that text.  If you type multiple words, tracks are filtered such that they must contain all of those words, in any order.  Placing "quotation marks" around the text filters for tracks that contain that phrase exactly.  All text matching is case insensitive.\x3c/dd\x3e  \x3cdt\x3eActivating Tracks\x3c/dt\x3e  \x3cdd\x3eTo activate and deactivate a track, click its check-box in the left-most column.  When the box contains a check mark, the track is activated.  You can also turn whole groups of tracks on and off using the check-box in the table heading.\x3c/dd\x3e  \x3c/dl\x3e\x3c/div\x3e'});
dojo.connect(a,"onclick",this,function(a){b.show();return!1})},this);this.mainContainer.addChild(this.topPane);dojo.query(".faceted_tracksel_on_off").onclick(m.hitch(this,"toggle"));this.centerPane=new dijit.layout.BorderContainer({region:"center","class":"gridPane",gutters:!1});this.mainContainer.addChild(this.centerPane);var b=this.renderTextFilter();this.busyIndicator=dojo.create("div",{innerHTML:'\x3cimg src\x3d"'+this.browser.resolveUrl("img/spinner.gif")+'"\x3e',className:"busy_indicator"},
this.containerElem);this.centerPane.addChild(new dijit.layout.ContentPane({region:"top","class":"gridControls",content:[dojo.create("button",{className:"faceted_tracksel_on_off",innerHTML:'\x3cimg src\x3d"'+this.browser.resolveUrl("img/left_arrow.png")+'"\x3e \x3cdiv\x3eBack to browser\x3c/div\x3e',onclick:m.hitch(this,"hide")}),dojo.create("button",{className:"clear_filters",innerHTML:'\x3cimg src\x3d"'+this.browser.resolveUrl("img/red_x.png")+'"\x3e\x3cdiv\x3eClear All Filters\x3c/div\x3e',onclick:m.hitch(this,
function(a){this._clearTextFilterControl();this._clearAllFacetControls();this._async(function(){this.updateQuery();this._updateFacetCounts()},this).call()})}),this.busyIndicator,b,dojo.create("div",{className:"matching_record_count"})]}))},renderSelectors:function(){var b=this.renderFacetSelectors();b.set("region","left");this.mainContainer.addChild(b);this.dataGrid=this.renderGrid();this.dataGrid.set("region","center");this.centerPane.addChild(this.dataGrid);this.mainContainer.startup()},_async:function(b,
a){var c=this;return function(){var d=arguments,e=this;c._busy(!0);window.setTimeout(function(){b.apply(a||e,d);c._busy(!1)},50)}},_busy:function(b){this.busyCount=Math.max(0,(this.busyCount||0)+(b?1:-1));0<this.busyCount?dojo.addClass(this.containerElem,"busy"):dojo.removeClass(this.containerElem,"busy")},renderGrid:function(){var b=this.displayColumns||dojo.filter(this.trackDataStore.getFacetNames(),m.hitch(this,"_isDisplayableColumn")),a=90/b.length,d=new c({id:"trackSelectGrid",store:this.trackDataStore,
selectable:!0,escapeHTMLInData:"escapeHTMLInData"in this.config?this.config.escapeHTMLInData:!1,noDataMessage:"No tracks match the filtering criteria.",structure:[dojo.map(b,function(b){b={name:"key"}[b.toLowerCase()]||b;return{name:this._facetDisplayName(b),field:b.toLowerCase(),width:a+"%"}},this)],plugins:{indirectSelection:{headerSelector:!0}}}),e=this.config.initialSortColumn||0;"string"==typeof e&&(e=k.indexOf(b,e));d.setSortIndex(e+1);this._monkeyPatchGrid(d);return d},_facetDisplayName:function(b){var a;
if(!(a=this.renameFacets)){a=this.config.renameFacets;var c={},e;for(e in a)c[e.toLowerCase()]=a[e];c.key=c.key||"Name";a=c}this.renameFacets=a;return this.renameFacets[b.toLowerCase()]||d.ucFirst(b.replace("_"," "))},_monkeyPatchGrid:function(b){b.onRowClick=function(){};var a=b.selection.selectRange;b.selection.selectRange=function(b,c){if(30<c-b)alert("Too many tracks selected, please select fewer than 30 tracks. Note: you can use shift+click to select a range of tracks");else return a.apply(this,
arguments)}},renderTextFilter:function(b){this.textFilterLabel=dojo.create("label",{className:"textFilterControl",innerHTML:"Contains text ",id:"tracklist_textfilter",style:{position:"relative"}},b);this.textFilterInput=dojo.create("input",{type:"text",size:40,disabled:!0,onkeypress:m.hitch(this,function(a){a.keyCode==dojo.keys.SHIFT||(a.keyCode==dojo.keys.CTRL||a.keyCode==dojo.keys.ALT)||(this.textFilterTimeout&&window.clearTimeout(this.textFilterTimeout),this.textFilterTimeout=window.setTimeout(m.hitch(this,
function(){this._updateTextFilterControl();this._async(function(){this.updateQuery();this._updateFacetCounts();this.textFilterInput.focus()},this).call();this.textFilterInput.focus()}),500),this._updateTextFilterControl(),a.stopPropagation())})},this.textFilterLabel);this.textFilterClearButton=dojo.create("img",{src:this.browser.resolveUrl("img/red_x.png"),className:"text_filter_clear",onclick:m.hitch(this,function(){this._clearTextFilterControl();this._async(function(){this.updateQuery();this._updateFacetCounts()},
this).call()}),style:{position:"absolute",right:"4px",top:"20%"}},this.textFilterLabel);return this.textFilterLabel},_clearTextFilterControl:function(){this.textFilterInput.value="";this._updateTextFilterControl()},_updateTextFilterControl:function(){this.textFilterInput.value.length?dojo.addClass(this.textFilterLabel,"selected"):dojo.removeClass(this.textFilterLabel,"selected")},renderFacetSelectors:function(){var b=new e({style:"width: 200px"}),a=this.trackDataStore;this.facetSelectors={};var c=
this._renderFacetSelector("My Tracks",["Currently Active","Recently Used"]);c.set("class","myTracks");b.addChild(c);c=dojo.filter(this.config.selectableFacets||a.getFacetNames(),function(a){return this._isSelectableFacet(a,this.trackDataStore)},this);dojo.forEach(c,function(c){var d=a.getFacetValues(c).sort();d&&d.length&&(c=this._renderFacetSelector(c,d),b.addChild(c))},this);return b},_renderFacetSelector:function(b,a){var c=new g({title:'\x3cspan id\x3d"facet_title_'+b+'" class\x3d"facetTitle"\x3e'+
this._facetDisplayName(b)+' \x3ca class\x3d"clearFacet"\x3e\x3cimg src\x3d"'+this.browser.resolveUrl("img/red_x.png")+'" /\x3e\x3c/a\x3e\x3c/span\x3e'}),d=dojo.create("table",{className:"facetSelect"},c.containerNode);this.facetSelectors[b]=dojo.map(a,function(a){var c=this,e=dojo.create("tr",{className:"facetValue",innerHTML:'\x3ctd class\x3d"count"\x3e\x3c/td\x3e\x3ctd class\x3d"value"\x3e'+a+"\x3c/td\x3e",onclick:function(a){dojo.toggleClass(this,"selected");c._updateFacetControl(b);c._async(function(){c.updateQuery();
c._updateFacetCounts(b)}).call()}},d);e.facetValue=a;return e},this);return c},_clearAllFacetControls:function(){dojo.forEach(b.keys(this.facetSelectors),function(b){this._clearFacetControl(b)},this)},_clearFacetControl:function(b){dojo.forEach(this.facetSelectors[b]||[],function(a){dojo.removeClass(a,"selected")},this);this._updateFacetControl(b)},_updateFacetCounts:function(c){dojo.forEach(b.keys(this.facetSelectors),function(a){if("My Tracks"!=a){var b=this.trackDataStore.getFacetCounts(a);dojo.forEach(this.facetSelectors[a]||
[],function(a){dojo.query(".count",a).forEach(function(c){var e=b?b[a.facetValue]||0:0;c.innerHTML=d.addCommas(e);e?dojo.removeClass(a,"disabled"):dojo.addClass(a,"disabled")},this)},this);this._updateFacetControl(a)}},this)},_updateFacetControl:function(b){var a=dojo.byId("facet_title_"+b);k.every(this.facetSelectors[b]||[],function(a){return dojo.hasClass(a,"disabled")},this)&&dojo.addClass(a,"disabled");if(k.some(this.facetSelectors[b]||[],function(a){return dojo.hasClass(a,"selected")},this)){var c=
m.hitch(this,function(a){this._clearFacetControl(b);this._async(function(){this.updateQuery();this._updateFacetCounts(b)},this).call();a.stopPropagation()});dojo.addClass(a.parentNode.parentNode,"activeFacet");dojo.query("\x3e a",a).forEach(function(a){a.onclick=c},this).attr("title","clear selections")}else dojo.removeClass(a.parentNode.parentNode,"activeFacet"),dojo.query("\x3e a",a).onclick(function(){return!1}).removeAttr("title")},updateQuery:function(){this._suppressRecursion("_updateQuery")},
_updateQuery:function(){var c={},a=function(a){return dojo.hasClass(a,"selected")};(function(){var e=this.facetSelectors["My Tracks"],g={};dojo.forEach(e,function(a){g[a.facetValue]=a});if(a(g["Currently Active"])){var m=b.keys(this.tracksActive||{});c.label=d.uniq((c.label||[]).concat(m))}a(g["Recently Used"])&&(m=dojo.map(this.browser.getRecentlyUsedTracks(),function(a){return a.label}),c.label=d.uniq((c.label||[]).concat(m)));if((!c.label||!c.label.length)&&k.some(e,a))c.label=["FAKE LABEL THAT IS HIGHLY UNLIKELY TO EVER MATCH ANYTHING"]}).call(this);
this.textFilterInput.value.length&&(c.text=this.textFilterInput.value);dojo.forEach(this.trackDataStore.getFacetNames(),function(b){var d=this.facetSelectors[b];d&&(d=dojo.map(dojo.filter(d,a),function(a){return a.facetValue}),d.length&&(c[b]=d))},this);this.query=c;this.dataGrid.setQuery(this.query);this._updateMatchCount()},_updateMatchCount:function(){var c=this.dataGrid.store.getCount();dojo.query(".matching_record_count",this.containerElem).forEach(function(a){a.innerHTML=d.addCommas(c)+" "+
(b.keys(this.query||{}).length?"matching ":"")+"track"+(1==c?"":"s")},this)},_updateGridSelections:function(){this._ifNotSuppressed("gridUpdate",function(){this._suppress("selectionEvents",function(){this.dataGrid.selection.deselectAll();for(var b=0;b<Math.min(this.dataGrid.get("rowCount"),this.dataGrid.get("rowsPerPage"));b++){var a=this.dataGrid.getItem(b);a&&(a=this.dataGrid.store.getIdentity(a),this.tracksActive[a]&&this.dataGrid.rowSelectCell.toggleRow(b,!0))}})})},setTracksActive:function(b){dojo.forEach(b,
function(a){this.tracksActive[a.label]=!0},this);this._updateGridSelections()},setTracksInactive:function(b){dojo.forEach(b,function(a){delete this.tracksActive[a.label]},this);this._updateGridSelections()},show:function(){window.setTimeout(m.hitch(this,function(){this.textFilterInput.disabled=!1;this.textFilterInput.focus()}),300);dojo.addClass(this.containerElem,"active");dojo.animateProperty({node:this.containerElem,properties:{left:{start:-95,end:0,units:"%"}}}).play();this.shown=!0},hide:function(){dojo.removeClass(this.containerElem,
"active");dojo.animateProperty({node:this.containerElem,properties:{left:{start:0,end:-95,units:"%"}}}).play();this.textFilterInput.blur();this.textFilterInput.disabled=!0;this.shown=!1},toggle:function(){this.shown?this.hide():this.show()}})});
//# sourceMappingURL=Faceted.js.map