//>>built
require({cache:{"url:dijit/templates/CheckedMenuItem.html":'
\r\n',
"dijit/form/TextBox":function(){require({cache:{"url:dijit/form/templates/TextBox.html":'\r\n'}});define("dijit/form/TextBox","dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/_base/sniff dojo/_base/window ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ..".split(" "),
function(e,h,g,d,c,a,b,f,i,j,k){f=e([f,i],{templateString:j,_singleNodeTemplate:'',_buttonInputDisabled:a("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=
this._singleNodeTemplate;this.inherited(arguments)},_onInput:function(a){this.inherited(arguments);if(this.intermediateChanges){var b=this;setTimeout(function(){b._handleOnChange(b.get("value"),!1)},0)}},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);this._phspan||(this._attachPoints.push("_phspan"),this._phspan=h.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after"));this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));this._updatePlaceHolder()},
_updatePlaceHolder:function(){this._phspan&&(this._phspan.style.display=this.placeHolder&&!this.focused&&!this.textbox.value?"":"none")},_setValueAttr:function(a,b,f){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){d.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.","","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){d.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.",
"","2.0");this.set("displayedValue",a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),this._updatePlaceHolder())},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.inherited(arguments),this._updatePlaceHolder())}});a("ie")?(f=e(f,{declaredClass:"dijit.form.TextBox",_isTextSelected:function(){var a=b.doc.selection.createRange();return a.parentElement()==this.textbox&&0==a.text.length},postCreate:function(){this.inherited(arguments);setTimeout(c.hitch(this,function(){try{var a=
g.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;if(b){var f=this.domNode.getElementsByTagName("INPUT");if(f)for(a=0;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
this.rowIndex||!this.cell},isNavHeader:function(){return!!this._colHeadNode},getHeaderIndex:function(){return this._colHeadNode?e.indexOf(this._findHeaderCells(),this._colHeadNode):-1},_focusifyCellNode:function(a){var b=this.cell&&this.cell.getNode(this.rowIndex);if(b&&(i.toggleClass(b,this.focusClass,a),a)){a=this.scrollIntoView();try{this.grid.edit.isEditing()||(f.fire(b,"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()||(i.toggleClass(a,this.focusClass,!0),this._colHeadNode&&this.blurHeader(),f.fire(a,"focus"))}catch(b){}}},_delayedHeaderFocus:function(){this.isNavHeader()&&(this.focusHeader(),this.grid.domNode.focus())},_initColumnHeaders:function(){e.forEach(this._headerConnects,d.disconnect);this._headerConnects=[];for(var a=this._findHeaderCells(),b=0;bg&&f.push(d)}return f},_setActiveColHeader:function(a,b,f){this.grid.domNode.setAttribute("aria-activedescendant",a.id);null!=f&&(0<=f&&f!=b)&&i.toggleClass(this._findHeaderCells()[f],this.focusClass,!1);i.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.offsetLefta.sr.t+a.sr.h?this.grid.setScrollTop(b+a.r.offsetHeight-a.sr.h):bf.sr.l+f.sr.w?f.s.scrollLeft=f.n.offsetLeft+f.n.offsetWidth-f.sr.w:f.n.offsetLeft=a("ie")&&(c&&c.view.headerNode)&&(c.view.headerNode.scrollLeft=f.s.scrollLeft))},_isHeaderHidden:function(){var a=this.focusView;if(!a)for(var b=0,f;f=this.grid.views.views[b];b++)if(f.headerNode){a=f;break}return a&&"none"==i.getComputedStyle(a.headerNode).display},colSizeAdjust:function(a,b,f){var c=this._findHeaderCells(),d=this.focusView;if(!d)for(var i=0,e;e=this.grid.views.views[i];i++)if(e.header.tableMap.map){d=e;break}i=c[b];d&&!(b==c.length-1&&0===b)&&(d.content.baseDecorateEvent(a),
a.cellNode=i,a.cellIndex=d.content.getCellNodeIndex(a.cellNode),a.cell=0<=a.cellIndex?this.grid.getCell(a.cellIndex):null,d.header.canResize(a)&&(b={l:f},a=d.header.colResizeSetup(a,!1),d.header.doResizeColumn(a,null,b),d.update()))},styleRow:function(){},setFocusIndex:function(a,b){this.setFocusCell(this.grid.getCell(b),a)},setFocusCell:function(b,f){b&&!this.isFocusCell(b,f)&&(this.tabbingOut=!1,this._colHeadNode&&this.blurHeader(),this._colHeadNode=this._colHeadFocusIdx=null,this.focusGridView(),
this._focusifyCellNode(!1),this.cell=b,this.rowIndex=f,this._focusifyCellNode(!0));if(a("opera"))setTimeout(h.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,f=this.grid.layout.cellCount-1,c=this.grid.rowCount-1;b>f&&(b=0,a++);a>c&&(b=f,a=c);if(this.grid.edit.isEditing()&&(f=this.grid.getCell(b),!this.isLastFocusCell()&&(!f.editable||this.grid.canEdit&&!this.grid.canEdit(f,
a)))){this.cell=f;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 f=this.grid.getCell(b);if(!this.isFirstFocusCell()&&!f.editable){this.cell=f;this.rowIndex=a;this.previous();return}}this.setFocusIndex(a,b)}},move:function(a,b){var f=0>b?-1:1;if(this.isNavHeader()){var c=this._findHeaderCells(),d=currentIdx=e.indexOf(c,
this._colHeadNode);for(currentIdx+=b;0<=currentIdx&¤tIdxg.getLastPageRow(g.page)&&this.grid.setScrollTop(this.grid.scrollTop+g.findScrollTop(h)-g.findScrollTop(c)):0>a&&h<=g.getPageRow(g.page)&&this.grid.setScrollTop(this.grid.scrollTop-
g.findScrollTop(c)-g.findScrollTop(h)));for(var g=this.grid.layout.cellCount-1,p=this.cell.index,n=Math.min(g,Math.max(0,p+b)),s=this.grid.getCell(n);0<=n&&n/gm,">").replace(/"/gm,""");c||(d=d.replace(/'/gm,"'"));return d};g._editor.getNodeHtml=function(d){var c;switch(d.nodeType){case 1:var a=d.nodeName.toLowerCase();if(!a||"/"==a.charAt(0))return"";c="<"+a;var b=[],f;if(h("ie")&&d.outerHTML){f=d.outerHTML;f=f.substr(0,f.indexOf(">")).replace(/(['"])[^"']*\1/g,"");for(var i=/(\b\w+)\s?=/g,
j;j=i.exec(f);)if(j=j[1],"_dj"!=j.substr(0,3))if(("src"==j||"href"==j)&&d.getAttribute("_djrealurl"))b.push([j,d.getAttribute("_djrealurl")]);else{var k,m;switch(j){case "style":k=d.style.cssText.toLowerCase();break;case "class":k=d.className;break;case "width":if("img"===a){(m=/width=(\S+)/i.exec(f))&&(k=m[1]);break}case "height":if("img"===a){(m=/height=(\S+)/i.exec(f))&&(k=m[1]);break}default:k=d.getAttribute(j)}null!=k&&b.push([j,k.toString()])}}else for(i=0;f=d.attributes[i++];)if(k=f.name,"_dj"!=
k.substr(0,3)){f=f.value;if("src"==k||"href"==k)d.getAttribute("_djrealurl")&&(f=d.getAttribute("_djrealurl"));b.push([k,f])}b.sort(function(a,b){return a[0]"+d.innerHTML+""+a+">";else if(d.childNodes.length)c+=">"+g._editor.getChildrenHtml(d)+""+a+">";else switch(a){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":c+=
" />";break;default:c+=">"+a+">"}break;case 4:case 3:c=g._editor.escapeXml(d.nodeValue,!0);break;case 8:c="<\!--"+g._editor.escapeXml(d.nodeValue,!0)+"--\>";break;default:c="<\!-- Element not recognized - Type: "+d.nodeType+" Name: "+d.nodeName+"--\>"}return c};g._editor.getChildrenHtml=function(d){var c="";if(!d)return c;for(var a=d.childNodes||d,b=!h("ie")||a!==d,f,i=0;f=a[i++];)if(!b||f.parentNode==d)c+=g._editor.getNodeHtml(f);return c};return g._editor})},"dijit/place":function(){define("dijit/place",
"dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window dojo/window .".split(" "),function(e,h,g,d,c,a,b){function f(b,f,d,g){var o=a.getBox();(!b.parentNode||"body"!=String(b.parentNode.tagName).toLowerCase())&&c.body().appendChild(b);var l=null;e.some(f,function(a){var f=a.corner,c=a.pos,j=0,r={w:{L:o.l+o.w-c.x,R:c.x-o.l,M:o.w}[f.charAt(1)],h:{T:o.t+o.h-c.y,B:c.y-o.t,M:o.h}[f.charAt(0)]};d&&(j=d(b,a.aroundCorner,f,r,g),j="undefined"==typeof j?0:j);var e=b.style,t=
e.display,y=e.visibility;"none"==e.display&&(e.visibility="hidden",e.display="");var q=h.getMarginBox(b);e.display=t;e.visibility=y;t={L:c.x,R:c.x-q.w,M:Math.max(o.l,Math.min(o.l+o.w,c.x+(q.w>>1))-q.w)}[f.charAt(1)];y={T:c.y,B:c.y-q.h,M:Math.max(o.t,Math.min(o.t+o.h,c.y+(q.h>>1))-q.h)}[f.charAt(0)];c=Math.max(o.l,t);e=Math.max(o.t,y);t=Math.min(o.l+o.w,t+q.w);y=Math.min(o.t+o.h,y+q.h);t-=c;y-=e;j+=q.w-t+(q.h-y);if(null==l||j>1)}[a.charAt(1)],y:{T:t,B:t+x,M:t+(x>>1)}[a.charAt(0)]}})}var q="string"==typeof b||"offsetWidth"in b?h.position(b,!0):b;if(b.parentNode)for(var v="absolute"==g.getComputedStyle(b).position,b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){var p=h.position(b,!0),n=g.getComputedStyle(b);/relative|absolute/.test(n.position)&&(v=!1);if(!v&&/hidden|auto|scroll/.test(n.overflow)){var s=Math.min(q.y+q.h,p.y+p.h),r=Math.min(q.x+q.w,p.x+p.w);q.x=Math.max(q.x,p.x);q.y=Math.max(q.y,p.y);q.h=s-
q.y;q.w=r-q.x}"absolute"==n.position&&(v=!0);b=b.parentNode}var u=q.x,t=q.y,y="w"in q?q.w:q.w=q.width,x="h"in q?q.h:(d.deprecated("place.around: dijit.place.__Rectangle: { x:"+u+", y:"+t+", height:"+q.height+", width:"+y+" } has been deprecated. Please use { x:"+u+", y:"+t+", h:"+q.height+", w:"+y+" }","","2.0"),q.h=q.height),A=[];e.forEach(c,function(a){var b=m;switch(a){case "above-centered":l("TM","BM");break;case "below-centered":l("BM","TM");break;case "after-centered":b=!b;case "before-centered":l(b?
"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":l(b?"TL":"TR",b?"TR":"TL");l(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":l(b?"BL":"BR",b?"TL":"TR");l(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":l(b?"TL":"TR",b?"BL":"BR");l(b?"TR":"TL",b?"BR":"BL");break;default:l(a.aroundCorner,a.corner)}});a=f(a,A,o,{w:y,h:x});a.aroundNodePos=q;return a}}})},"dijit/_HasDropDown":function(){define("dijit/_HasDropDown","dojo/_base/declare dojo/_base/Deferred dojo/_base/event dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/touch dojo/_base/window dojo/window ./registry ./focus ./popup ./_FocusMixin".split(" "),
function(e,h,g,d,c,a,b,f,i,j,k,m,o,l,q,v,p,n){return e("dijit._HasDropDown",n,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(a){!this.disabled&&!this.readOnly&&(a.preventDefault(),this._docHandler=this.connect(o.doc,m.release,"_onDropDownMouseUp"),this.toggleDropDown())},_onDropDownMouseUp:function(f){f&&this._docHandler&&this.disconnect(this._docHandler);
var c=this.dropDown,d=!1;if(f&&this._opened){var j=b.position(this._buttonNode,!0);if(!(f.pageX>=j.x&&f.pageX<=j.x+j.w)||!(f.pageY>=j.y&&f.pageY<=j.y+j.h)){for(j=f.target;j&&!d;)a.contains(j,"dijitPopup")?d=!0:j=j.parentNode;if(d){j=f.target;if(c.onItemClick){for(var e;j&&!(e=q.byNode(j));)j=j.parentNode;if(e&&e.onClick&&e.getParent)e.getParent().onItemClick(e,f)}return}}}this._opened?c.focus&&!1!==c.autoFocus&&window.setTimeout(k.hitch(c,"focus"),1):setTimeout(k.hitch(this,"focus"),0);i("ios")&&
(this._justGotMouseUp=!0,setTimeout(k.hitch(this,function(){this._justGotMouseUp=!1}),0))},_onDropDownClick:function(a){i("ios")&&!this._justGotMouseUp&&(this._onDropDownMouseDown(a),this._onDropDownMouseUp(a));this._stopClickEvents&&g.stop(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var b={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?
"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";a.add(this._arrowWrapperNode||this._buttonNode,"dijit"+b+"ArrowButton")},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,m.press,"_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp")},destroy:function(){this.dropDown&&
(this.dropDown._destroyed||this.dropDown.destroyRecursive(),delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&!this.readOnly){var b=this.dropDown,f=a.target;if(b&&(this._opened&&b.handleKey)&&!1===b.handleKey(a))g.stop(a);else if(b&&this._opened&&a.charOrCode==j.ESCAPE)this.closeDropDown(),g.stop(a);else if(!this._opened&&(a.charOrCode==j.DOWN_ARROW||(a.charOrCode==j.ENTER||" "==a.charOrCode)&&("input"!==(f.tagName||"").toLowerCase()||f.type&&"text"!==f.type.toLowerCase())))this._toggleOnKeyUp=
!0,g.stop(a)}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(k.hitch(a,"focus"),1)}},_onBlur:function(){var a=v.curNode&&this.dropDown&&d.isDescendant(v.curNode,this.dropDown.domNode);this.closeDropDown(a);this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},loadAndOpenDropDown:function(){var a=new h,b=k.hitch(this,function(){this.openDropDown();a.resolve(this.dropDown)});this.isLoaded()?
b():this.loadDropDown(b);return a},toggleDropDown:function(){!this.disabled&&!this.readOnly&&(this._opened?this.closeDropDown():this.loadAndOpenDropDown())},openDropDown:function(){var d=this.dropDown,i=d.domNode,j=this._aroundNode||this.domNode,e=this;this._preparedNode||(this._preparedNode=!0,i.style.width&&(this._explicitDDWidth=!0),i.style.height&&(this._explicitDDHeight=!0));if(this.maxHeight||this.forceWidth||this.autoWidth){var g={display:"",visibility:"hidden"};this._explicitDDWidth||(g.width=
"");this._explicitDDHeight||(g.height="");f.set(i,g);g=this.maxHeight;if(-1==g)var g=l.getBox(),n=b.position(j,!1),g=Math.floor(Math.max(n.y,g.h-(n.y+n.h)));p.moveOffScreen(d);d.startup&&!d._started&&d.startup();var n=b.getMarginSize(i),h=g&&n.h>g;f.set(i,{overflowX:"hidden",overflowY:h?"auto":"hidden"});h?(n.h=g,"w"in n&&(n.w+=16)):delete n.h;this.forceWidth?n.w=j.offsetWidth:this.autoWidth?n.w=Math.max(n.w,j.offsetWidth):delete n.w;k.isFunction(d.resize)?d.resize(n):b.setMarginBox(i,n)}d=p.open({parent:this,
popup:d,around:j,orient:this.dropDownPosition,onExecute:function(){e.closeDropDown(!0)},onCancel:function(){e.closeDropDown(!0)},onClose:function(){c.set(e._popupStateNode,"popupActive",!1);a.remove(e._popupStateNode,"dijitHasDropDownOpen");e._opened=!1}});c.set(this._popupStateNode,"popupActive","true");a.add(e._popupStateNode,"dijitHasDropDownOpen");this._opened=!0;return d},closeDropDown:function(a){this._opened&&(a&&this.focus(),p.close(this.dropDown),this._opened=!1)}})})},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dijit/_editor/plugins/EnterKeyHandling",
"dojo/_base/declare dojo/dom-construct dojo/_base/event dojo/keys dojo/_base/lang dojo/_base/sniff dojo/_base/window dojo/window ../_Plugin ../RichText ../range ../selection".split(" "),function(e,h,g,d,c,a,b,f,i,j,k,m){return e("dijit._editor.plugins.EnterKeyHandling",i,{blockNodeForEnter:"BR",constructor:function(a){a&&("blockNodeForEnter"in a&&(a.blockNodeForEnter=a.blockNodeForEnter.toUpperCase()),c.mixin(this,a))},setEditor:function(b){if(this.editor!==b)if(this.editor=b,"BR"==this.blockNodeForEnter)this.editor.customUndo=
!0,b.onLoadDeferred.then(c.hitch(this,function(f){this.connect(b.document,"onkeypress",function(a){if(a.charOrCode==d.ENTER){var b=c.mixin({},a);b.shiftKey=!0;this.handleEnterKey(b)||g.stop(a)}});9==a("ie")&&this.connect(b.document,"onpaste",function(){setTimeout(dojo.hitch(this,function(){var a=this.editor.document.selection.createRange();a.move("character",-1);a.select();a.move("character",1);a.select()}),0)});return f}));else if(this.blockNodeForEnter){var f=c.hitch(this,this.handleEnterKey);b.addKeyHandler(13,
0,0,f);b.addKeyHandler(13,0,1,f);this.connect(this.editor,"onKeyPressed","onKeyPressed")}},onKeyPressed:function(){if(this._checkListLater){if(b.withGlobal(this.editor.window,"isCollapsed",dijit)){var f=b.withGlobal(this.editor.window,"getAncestorElement",m,["LI"]);if(f){a("mozilla")&&"LI"==f.parentNode.parentNode.nodeName&&(f=f.parentNode.parentNode);var c=f.firstChild;if(c&&1==c.nodeType&&("UL"==c.nodeName||"OL"==c.nodeName))f.insertBefore(c.ownerDocument.createTextNode("\u00a0"),c),c=k.create(this.editor.window),
c.setStart(f.firstChild,0),f=k.getSelection(this.editor.window,!0),f.removeAllRanges(),f.addRange(c)}else j.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter),(f=b.withGlobal(this.editor.window,"getAncestorElement",m,[this.blockNodeForEnter]))?(f.innerHTML=this.bogusHtmlContent,a("ie")&&(f=this.editor.document.selection.createRange(),f.move("character",-1),f.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:" ",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(d){var i,e,g,p,n,s,r=this.editor.document,u,t,y;if(d.shiftKey){u=b.withGlobal(this.editor.window,"getParentElement",m);if(d=k.getAncestor(u,this.blockNodes)){if("LI"==d.tagName)return!0;i=k.getSelection(this.editor.window);e=i.getRangeAt(0);e.collapsed||(e.deleteContents(),
i=k.getSelection(this.editor.window),e=i.getRangeAt(0));if(k.atBeginningOfContainer(d,e.startContainer,e.startOffset))u=r.createElement("br"),g=k.create(this.editor.window),d.insertBefore(u,d.firstChild),g.setStartAfter(u),i.removeAllRanges(),i.addRange(g);else if(k.atEndOfContainer(d,e.startContainer,e.startOffset))g=k.create(this.editor.window),u=r.createElement("br"),d.appendChild(u),d.appendChild(r.createTextNode("\u00a0")),g.setStart(d.lastChild,0),i.removeAllRanges(),i.addRange(g);else return(t=
e.startContainer)&&3==t.nodeType?(y=t.nodeValue,b.withGlobal(this.editor.window,function(){p=r.createTextNode(y.substring(0,e.startOffset));n=r.createTextNode(y.substring(e.startOffset));s=r.createElement("br");""==n.nodeValue&&a("webkit")&&(n=r.createTextNode("\u00a0"));h.place(p,t,"after");h.place(s,p,"after");h.place(n,s,"after");h.destroy(t);g=k.create();g.setStart(n,0);i.removeAllRanges();i.addRange(g)}),!1):!0}else if(i=k.getSelection(this.editor.window),i.rangeCount){if((e=i.getRangeAt(0))&&
e.startContainer)if(e.collapsed||(e.deleteContents(),i=k.getSelection(this.editor.window),e=i.getRangeAt(0)),(t=e.startContainer)&&3==t.nodeType)b.withGlobal(this.editor.window,c.hitch(this,function(){var b=!1,f=e.startOffset;t.length");return!1}var A=!0;i=k.getSelection(this.editor.window);e=i.getRangeAt(0);e.collapsed||(e.deleteContents(),i=k.getSelection(this.editor.window),e=i.getRangeAt(0));var d=k.getBlockAncestor(e.endContainer,null,this.editor.editNode),z=d.blockNode;if(this._checkListLater=z&&("LI"==z.nodeName||"LI"==z.parentNode.nodeName))return a("mozilla")&&(this._pressedEnterInBlock=z),/^(\s| | |\xA0|]*\bclass=['"]Apple-style-span['"][^>]*>(\s| | |\xA0)<\/span>)?(
)?$/.test(z.innerHTML)&&
(z.innerHTML="",a("webkit")&&(g=k.create(this.editor.window),g.setStart(z,0),i.removeAllRanges(),i.addRange(g)),this._checkListLater=!1),!0;if(!d.blockNode||d.blockNode===this.editor.editNode){try{j.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(G){}d={blockNode:b.withGlobal(this.editor.window,"getAncestorElement",m,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(d.blockNode){if(d.blockNode!=this.editor.editNode&&!(d.blockNode.textContent||d.blockNode.innerHTML).replace(/^\s+|\s+$/g,
"").length)return this.removeTrailingBr(d.blockNode),!1}else d.blockNode=this.editor.editNode;i=k.getSelection(this.editor.window);e=i.getRangeAt(0)}z=r.createElement(this.blockNodeForEnter);z.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(d.blockNode);var w=e.endOffset,A=e.endContainer;if(A.length=c;i--)if(d=v.byId(f[i]))d._hasBeenBlurred=!0,d.set("focused",!1),d._focusManager==this&&d._onBlur(b),
this.emit("widget-blur",d,b);for(i=c;i