/*
 * Isomorphic SmartClient
 * Version v14.0p_2026-06-21 (2026-06-21)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */

if(window.isc&&window.isc.module_Core&&!window.isc.module_RichTextEditor){isc.module_RichTextEditor=1;isc._moduleStart=isc._RichTextEditor_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'RichTextEditor load/parse time: '+(isc._moduleStart-isc._moduleEnd)+'ms',category:'loadTime'};if(isc.Log&&isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime');else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.isc&&isc.version!="v14.0p_2026-06-21/LGPL Development Only"&&!isc.DevUtil){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'v14.0p_2026-06-21/LGPL Development Only'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))}
isc.defineClass("ListPropertiesSampleTile","StatefulCanvas");isc.A=isc.ListPropertiesSampleTile.getPrototype();isc.A.baseStyle="simpleTile";isc.A.overflow="hidden";isc.A.showRollOver=true;isc.A.redrawOnStateChange=true;isc.A._redrawWithParent=true;isc.A=isc.ListPropertiesSampleTile.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_ListPropertiesSampleTile_initWidget(){this.Super("initWidget",arguments);this.$1177=isc.ListPropertiesPane.getCanonicalListProperties(this.listProperties);this.$1178=this.imgHTML({src:isc.Canvas.$wz,width:40,height:3,extraCSSText:"background-color:#999;vertical-align:middle;"})},isc.A.getInnerHTML=function isc_ListPropertiesSampleTile_getInnerHTML(){var _1=this.$1177,_2=_1.style,_3=isc.ListPropertiesPane.getListType(_1)=="unordered",_4=_3?"ul":"ol",_5=this.creator.listProperties.startNumber;if(_5==null)_5=this.creator.startNumberField.getValue();var _6="<table role='presentation' aria-hidden='true' border='0' cellpadding='0' cellspacing='0' style='width:100%;height:100%;table-layout:fixed'><colgroup><col width='100%'/></colgroup><tr><td class='normal' style='height:100%' valign='middle' align='center'><"+_4;if(!_3){var _7=_2=="decimal"?0:1;_6+=" start='"+Math.max(_7,_5)+"'"}
_6+=" style='margin:0;padding:0 0 0 30px";if(_2=="custom-image"){var _8=_1.image;_6+=";list-style-image:url("+this.getImgURL(_8)+")"}else{_6+=";list-style-type:"+_2}
_6+=";font-size:14px;line-height:22px;text-align:left'><li>"+this.$1178+"</li><li>"+this.$1178+"</li><li>"+this.$1178+"</li></"+_4+"></td></tr></table>";return _6},isc.A.click=function isc_ListPropertiesSampleTile_click(){this.creator.setSelectedStyle(this.listProperties.style,this.listProperties.image,true)});isc.B._maxIndex=isc.C+3;isc.defineClass("ListPropertiesPane","Layout");isc.A=isc.ListPropertiesPane;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.defaultSamplesList=[{style:"disc"},{style:"circle"},{style:"square"},{style:"decimal"},{style:"upper-roman"},{style:"lower-roman"},{style:"upper-alpha"},{style:"lower-alpha"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_blue.png"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_green.png"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_red.png"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_purple.png"}];isc.A.listStyleTypeMap={"lower-latin":"lower-alpha","upper-latin":"upper-alpha"};isc.A.$118k=[1000,"M",900,"CM",500,"D",400,"CD",100,"C",90,"XC",50,"L",40,"XL",10,"X",9,"IX",5,"V",4,"IV",1,"I"];isc.B.push(isc.A.getCanonicalImageURL=function isc_c_ListPropertiesPane_getCanonicalImageURL(_1){if(!_1)return"[SKIN]/RichTextEditor/bullet_blue.png";var _2=_1.indexOf("/images/RichTextEditor/");if(_2>=0){return"[SKIN]/"+_1.substring(_2+8)}
return _1},isc.A.getCanonicalListProperties=function isc_c_ListPropertiesPane_getCanonicalListProperties(_1){if(_1==null)return{$118f:true,style:"disc"};if(_1.$118f)return _1;var _2={$118f:true,style:this.getCanonicalListStyleType(_1.style)};if(this.getListType(_1)=="ordered"){if("startNumber"in _1)_2.startNumber=_1.startNumber<<0}else{if(_2.style=="custom-image"){_2.image=this.getCanonicalImageURL(_1.image)}}
return _2},isc.A.getCanonicalListStyleType=function isc_c_ListPropertiesPane_getCanonicalListStyleType(_1){if(!_1)return"disc";if(this.listStyleTypeMap.hasOwnProperty(_1))return this.listStyleTypeMap[_1];return _1},isc.A.getListType=function isc_c_ListPropertiesPane_getListType(_1){if(_1==null)return"unordered";var _2=this.getCanonicalListStyleType(_1.style);return(_2=="none"||_2=="disc"||_2=="circle"||_2=="square"||_2=="custom-image"||_2=="box"||_2=="check"||_2=="diamond"||_2=="dash"?"unordered":"ordered")},isc.A.convertFromExcelLetters=function isc_c_ListPropertiesPane_convertFromExcelLetters(_1){if(!_1)return null;var _2=_1.charCodeAt(_1.length-1),_3=_2-(_2>=97?96:64),_4=26;for(var _5=_1.length-1;_5>0;--_5,_4*=26){_2=_1.charCodeAt(_5-1);var r=_2-(_2>=97?96:64);_3+=r*_4}
return _3},isc.A.convertFromRomanNumerals=function isc_c_ListPropertiesPane_convertFromRomanNumerals(_1){var _2=this.$118k;_1=_1.toUpperCase();var _3=0,_4=0;for(var p=0;p<_2.length;p+=2){var s=_2[p+1];while(_1.indexOf(s,_4)==_4){_3+=_2[p];_4+=s.length}}
return _3},isc.A.convertToExcelLetters=function isc_c_ListPropertiesPane_convertToExcelLetters(_1,_2){if(!isc.isA.Number(_1))return null;var _3=_2?97:65;if(_1<=26){return String.fromCharCode(_3+_1-1)}
var _4=[];while(_1>26){var r=(_1-1)%26
_4[_4.length]=_3+r;_1=((_1-r)/26)<<0}
_4[_4.length]=_3+_1-1;_4.reverse();return String.fromCharCode.apply(String,_4)},isc.A.convertToRomanNumerals=function isc_c_ListPropertiesPane_convertToRomanNumerals(_1,_2){if(!isc.isA.Number(_1))return null;if(_1>3999)return String(_1);var _3=this.$118k;var _4=[];for(var p=0;p<_3.length;p+=2){var b=_3[p];while(_1>=b){_4[_4.length]=_3[p+1];_1-=b}}
var _7=_4.join(isc.emptyString);if(_2)_7=_7.toLowerCase();return _7});isc.B._maxIndex=isc.C+8;isc.A=isc.ListPropertiesPane.getPrototype();isc.A.vertical=true;isc.A.width=400;isc.A.overflow="visible";isc.A.sampleTileLayoutDefaults={_constructor:"TileLayout",width:400,height:260,tileWidth:80,tileHeight:80,tileMargin:5};isc.A.sampleTileDefaults={_constructor:"ListPropertiesSampleTile"};isc.A.startNumberFormDefaults={_constructor:"DynamicForm",width:"100%",colWidths:[60,"*"],numCols:2};isc.A.startNumberFieldTitle="Start at";isc.A.startNumberFieldDefaults={editorType:"SpinnerItem",defaultValue:1,step:1,width:75,change:function(_1,_2,_3,_4){this.form.creator.setStartNumber(_3,true)},getPreviousValue:function(_1,_2){var _3=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_4=isc.ListPropertiesPane.getListType(_3)=="unordered",_5=_3.style,_6=(_4||_5=="decimal"?0:1);return Math.max(_6,_1+_2)},getNextValue:function(_1,_2){var _3=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_4=_3.style;if(_4=="upper-roman"||_4=="lower-roman"){return Math.min(_1+_2,3999-3)}
return _1+_2},$79d:function(_1){if(!isc.isA.String(_1)||(_1=_1.trim())=="")
{return this.Super("$79d",arguments)}
var _2=_1.indexOf('.');if(_2>=0){_1=_1.substring(0,_2).trim()}
var _3=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_4=_3.style;if(_4=="upper-roman"||_4=="lower-roman"){return isc.ListPropertiesPane.convertFromRomanNumerals(_1)}else if(_4=="upper-alpha"||_4=="lower-alpha"){return isc.ListPropertiesPane.convertFromExcelLetters(_1)}
return this.Super("$79d",arguments)},formatEditorValue:function(_1,_2,_3,_4){var _5=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_6=_5.style;if(_6=="upper-roman"){return isc.ListPropertiesPane.convertToRomanNumerals(_1,false)+"."}else if(_6=="lower-roman"){return isc.ListPropertiesPane.convertToRomanNumerals(_1,true)+"."}else if(_6=="upper-alpha"){return isc.ListPropertiesPane.convertToExcelLetters(_1,false)+"."}else if(_6=="lower-alpha"){return isc.ListPropertiesPane.convertToExcelLetters(_1,true)+"."}
return String(_1)+"."}};isc.A=isc.ListPropertiesPane.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_ListPropertiesPane_initWidget(){this.Super("initWidget",arguments);var _1=this.listProperties=this.listProperties||{};var _2=this.samplesList;if(_2==null){this.samplesList=_2=isc.ListPropertiesPane.defaultSamplesList.duplicate()}
var _3=[];for(var i=0,_5=_2.length;i<_5;++i){_3[i]=this.createAutoChild("sampleTile",{listProperties:_2[i]})}
this.addAutoChild("sampleTileLayout",{tiles:_3});var _6=this.$1175(_1);if(_6!=null){_6.setSelected(true);this.$1176=_6}
var _7=isc.addProperties({},this.startNumberFieldDefaults,this.startNumberFieldProperties,{name:"startNumber",title:this.startNumberFieldTitle,value:_1.startNumber,disabled:isc.ListPropertiesPane.getListType(_1)=="unordered"});this.addAutoChild("startNumberForm",{items:[_7]});_7=this.startNumberField=this.startNumberForm.getField("startNumber");_1.startNumber=_7.getValue()},isc.A.setListProperties=function isc_ListPropertiesPane_setListProperties(_1){_1=this.listProperties=isc.ListPropertiesPane.getCanonicalListProperties(_1);this.setStartNumber(_1.startNumber);this.setSelectedStyle(_1.style,_1.image)},isc.A.setSelectedStyle=function isc_ListPropertiesPane_setSelectedStyle(_1,_2,_3){if(this.$1176!=null){this.$1176.setSelected(false);this.$1176=null}
var _4=this.listProperties;_4.$118f=false;_4.style=_1;_4.image=_2;if(_4.startNumber==null)_4.startNumber=this.startNumberField.getValue();_4=this.listProperties=isc.ListPropertiesPane.getCanonicalListProperties(_4);var _5=this.startNumberField.getValue();this.startNumberField.setValue(_5);var _6=this.startNumberField.getValue();if(_5!=_6){this.setStartNumber(_6)}
var _7=this.$1175(_4);if(_7!=null){_7.setSelected(true);this.$1176=_7}
var _8=isc.ListPropertiesPane.getListType(_4)=="unordered";this.startNumberField.setDisabled(_8);if(_3&&this.listPropertiesChanged)this.listPropertiesChanged(_4)},isc.A.setStartNumber=function isc_ListPropertiesPane_setStartNumber(_1,_2){var _3=this.listProperties;_1=(_1!=null?_1<<0:this.startNumberField.getValue());this.startNumberField.setValue(_1);_3.startNumber=this.startNumberField.getValue();this.sampleTileLayout.markForRedraw();if(_2&&this.listPropertiesChanged)this.listPropertiesChanged(_3)},isc.A.$1175=function isc_ListPropertiesPane__findCorrespondingSampleTile(_1){_1=isc.ListPropertiesPane.getCanonicalListProperties(_1);var _2=_1.style,_3=_1.image,_4=this.sampleTileLayout.tiles,_5=_2=="custom-image";for(var i=0,_7=_4.length;i<_7;++i){var _8=_4[i];_1=_8.$1177;if(_1==null){_1=_8.$1177=isc.ListPropertiesPane.getCanonicalListProperties(_8.listProperties)}
if(_1.style==_2&&(!_5||_1.image==_3)){return _8}}
return null});isc.B._maxIndex=isc.C+5;isc.ListPropertiesPane.registerStringMethods({listPropertiesChanged:"listProperties"});isc.defineClass("ListPropertiesDialog","Window");isc.A=isc.ListPropertiesDialog.getPrototype();isc.A.title="List Properties";isc.A.autoSize=true;isc.A.listPropertiesPaneDefaults={_constructor:"ListPropertiesPane",autoParent:"none"};isc.A.bottomLayoutDefaults={_constructor:"HLayout",autoParent:"none",rightPadding:5,bottomPadding:5,leftPadding:5,width:400,height:22,align:"right",membersMargin:5};isc.A.applyButtonTitle="Apply";isc.A.applyButtonDefaults={_constructor:"IButton",autoParent:"bottomLayout",autoFit:true,click:function(){this.creator.applyClick(this.creator.listPropertiesPane.listProperties)}};isc.A.cancelButtonTitle="Cancel";isc.A.cancelButtonDefaults={_constructor:"IButton",autoParent:"bottomLayout",autoFit:true,click:function(){this.creator.cancelClick()}};isc.A=isc.ListPropertiesDialog.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.applyClick=isc.Class.NO_OP;isc.A.cancelClick=isc.Class.NO_OP;isc.B.push(isc.A.initWidget=function isc_ListPropertiesDialog_initWidget(){var _1=this.addAutoChild("listPropertiesPane"),_2=this.addAutoChild("bottomLayout");if(this.showStartNumberInFooter){var _3=_1.startNumberForm;_1.removeMember(_3);this.bottomLayout.addMember(_3)}
this.addAutoChild("applyButton",{title:this.applyButtonTitle});this.addAutoChild("cancelButton",{title:this.cancelButtonTitle});this.items=[_1,_2];this.Super("initWidget",arguments)});isc.B._maxIndex=isc.C+1;isc.ListPropertiesDialog.registerStringMethods({applyClick:"listProperties",cancelClick:""});isc.ClassFactory.defineClass("RichTextCanvas","Canvas");isc.A=isc.RichTextCanvas;isc.A.FULL="full";isc.A.unsupportedErrorMessage="Rich text editing not supported in this browser";isc.A=isc.RichTextCanvas.getPrototype();isc.A.editable=true;isc.A.canSelectText=true;isc.A.canFocus=true;isc.A._useFocusProxy=false;isc.A.moveFocusOnTab=true;isc.A.overflow=isc.Canvas.AUTO;isc.A.showCustomScrollbars=false;isc.A.fullSyntaxHiliteDelay=3000;isc.A.contents="";isc.A=isc.RichTextCanvas;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.supportsRichTextEditing=function isc_c_RichTextCanvas_supportsRichTextEditing(){var _1=((isc.Browser.isSafari&&isc.Browser.safariVersion>=312)||(isc.Browser.isIE)||(isc.Browser.isMoz&&!isc.Browser.isCamino)||isc.Browser.isOpera);return _1},isc.A.$120i=function isc_c_RichTextCanvas__fixTabSpan(_1){_1.innerHTML="&#9;"});isc.B._maxIndex=isc.C+2;isc.A=isc.RichTextCanvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.useDesignMode=false;isc.A.$160i=["<iframe id='",,"' style='margin:0px;padding:0px;border:0px;width:",,"px;height:",,"px'",(isc.Browser.isWebKit||isc.Browser.isIE?" src='"+isc.Page.getURL("[HELPERS]empty.html")+"'":null)," onload='",,".$22z();' tabindex='",,"'></iframe>"];isc.A.$jf="Tab";isc.A.$120e="<span class='_isc_tab' style='white-space:pre'>\t</span>";isc.A.$9z="<br>";isc.A.$10j="Enter";isc.B.push(isc.A.initWidget=function isc_RichTextCanvas_initWidget(){if(!isc.RichTextCanvas.supportsRichTextEditing()){var _1=isc.RichTextCanvas.unsupportedErrorMessage;this.logError(_1)}
if(this.overflow!=isc.Canvas.AUTO){this.logWarn('RichTextCanvas class currently only supports an overflow property of "auto"');this.overflow=isc.Canvas.AUTO}
if(this.$22y()){this._useNativeTabIndex=false}
this.Super("initWidget",arguments)},isc.A.$rw=function isc_RichTextCanvas__getHandleOverflow(){if(this.$22y()){var _1;if(this.$ks){_1="-moz-scrollbars-none";this.$r3=true}else{_1=this.$nz}
return _1}else return this.Super("$rw",arguments)},isc.A.getInnerHTML=function isc_RichTextCanvas_getInnerHTML(){if(this.$22y()&&!this.isPrinting){return this.getIFrameHTML()}
return this.getContents(true)},isc.A.$22y=function isc_RichTextCanvas__useDesignMode(){if(this.useDesignMode!=null)return this.useDesignMode;return(isc.Browser.isChrome||isc.Browser.isSafari||isc.Browser.isOpera||isc.Browser.isMoz)},isc.A.getIFrameHTML=function isc_RichTextCanvas_getIFrameHTML(){var _1=this.$160i;_1[1]=this.getIFrameID();_1[3]=this.getContentFrameWidth();_1[5]=this.getContentFrameHeight();_1[9]=this.getID();_1[11]=this.getTabIndex();return _1.join(isc.emptyString)},isc.A.$vi=function isc_RichTextCanvas__setHandleTabIndex(_1){if(this.$22y()){var _2=this.getContentFrame();if(_2!=null)_2.tabIndex=_1}else{return this.Super("$vi",arguments)}},isc.A.getBrowserSpellCheck=function isc_RichTextCanvas_getBrowserSpellCheck(){return true},isc.A.$22z=function isc_RichTextCanvas__frameLoaded(){if(!this.$220)return;delete this.$220;if(!this.isDrawn())return;this.$221()},isc.A.getIFrameID=function isc_RichTextCanvas_getIFrameID(){return this.getID()+"$222"},isc.A.getContentDocument=function isc_RichTextCanvas_getContentDocument(){if(!this.$22y())return this.getDocument();var _1=this.getContentWindow(),_2=_1?_1.document:null;if(_2==null){this.logDebug("Unable to get pointer to content document. Content may not be written out")}
return _2},isc.A.getContentBody=function isc_RichTextCanvas_getContentBody(){var _1=this.getContentDocument();if(_1)return _1.body;return null},isc.A.getContentWindow=function isc_RichTextCanvas_getContentWindow(){if(!this.$22y())return this.getWindow();var _1=this.getContentFrame();return _1?_1.contentWindow:null},isc.A.getContentFrame=function isc_RichTextCanvas_getContentFrame(){if(!this.$22y()||!this.isDrawn())return null;return isc.Element.get(this.getIFrameID())},isc.A.setOverflow=function isc_RichTextCanvas_setOverflow(){},isc.A.getScrollHandle=function isc_RichTextCanvas_getScrollHandle(){if(this.$22y())return this.getContentBody();return this.Super("getScrollHandle",arguments)},isc.A.$ux=function isc_RichTextCanvas___adjustOverflow(){this.Super("$ux",arguments);if(!this.$22y()||this.overflow!=isc.Canvas.AUTO)return;var _1=this.getScrollHeight(),_2=this.getScrollWidth(),_3=this.getHeight(),_4=this.getWidth(),_5=this.getScrollbarSize(),_6=false,_7=false;if(_1>_3)_7=true;if(_6)_4-=_5;if(_2>_4)_6=true;if(_6&&!_7&&(_1>_3-_5))_7=true;this.hscrollOn=_6;this.vscrollOn=_7},isc.A.getContentFrameWidth=function isc_RichTextCanvas_getContentFrameWidth(){return this.getWidth()-this.getHMarginBorderPad()},isc.A.getContentFrameHeight=function isc_RichTextCanvas_getContentFrameHeight(){return this.getHeight()-this.getVMarginBorderPad()},isc.A.$q5=function isc_RichTextCanvas__setHandleRect(_1,_2,_3,_4){this.Super("$q5",arguments);if(this.$22y()){var _5=this.getContentFrame();if(_5!=null){var _6=this.getContentFrameWidth(),_7=this.getContentFrameHeight();_5.style.width=_6-1+"px";_5.style.height=_7-1+"px"}}else{var _8=this.getHandle();if(_8!=null){var _6=this.getContentFrameWidth(),_7=this.getContentFrameHeight();_8.style.width=_6-1+"px";_8.style.height=_7-1+"px"}}},isc.A.getScrollWidth=function isc_RichTextCanvas_getScrollWidth(_1){if((this.$su&&!_1)||!this.$22y())
return this.Super("getScrollWidth",arguments);var _2=this.getContentBody();if(!_2)return this.Super("getScrollWidth",arguments);this.$su=isc.Element.getScrollWidth(_2);return this.$su},isc.A.getScrollHeight=function isc_RichTextCanvas_getScrollHeight(_1){if((this.$sz&&!_1)||!this.$22y())
return this.Super("getScrollHeight",arguments);var _2=this.getContentBody();if(!_2)return this.Super("getScrollHeight",arguments);this.$sz=isc.Element.getScrollHeight(_2);return this.$sz},isc.A.$223=function isc_RichTextCanvas__rememberSelection(){if(!isc.Browser.isIE)return;if(!this.$224())return;if(isc.Browser.$120h){var _1=this.getContentDocument().getSelection();if(_1.rangeCount<=0){this.$225=null;this.$160j=null;this.$160k=null;this.$226=null}else{var _2=this.$225=_1.getRangeAt(0);this.$160j=_1.anchorNode;this.$160k=_1.anchorNode;this.$226=String(_2)}}else{this.$225=this.getContentDocument().selection.createRange();this.$226=this.$225.text}},isc.A.$224=function isc_RichTextCanvas__hasSelection(){if(!this.isDrawn())return false
if(!isc.Browser.isIE)return;if(this.$22y()){return(this.getActiveElement()==this.getContentFrame())}
var _1=this.getHandle();if(!_1)return false;var _2=isc.Element.$mk();if(!_2)return false;return _1.contains(_2)},isc.A.selectionChange=function isc_RichTextCanvas_selectionChange(){if(!this.$227){this.$223();if(isc.Browser.isIE&&(isc.Browser.version<=8||(isc.Browser.version==9&&!isc.Browser.isIE9)))
{this.$23k()}}},isc.A.$228=function isc_RichTextCanvas__resetSelection(){if(!this.editable||!this.isDrawn()||!this.isVisible())return;if(isc.Browser.isIE){if(!this.$225)return;var _1=isc.Browser.$120h?String(this.$225):this.$225.text;if(this.$226!=_1){this.$225.collapse(false)}
isc.EH.$mj=true;if(isc.Browser.$120h){var _2=this.getContentDocument(),_3=_2.getSelection();_3.removeAllRanges();_3.addRange(this.$225)}else{this.$225.select()}
delete isc.EH.$mj}else if(isc.Browser.isEdge){var _4=isc.EH.lastEvent;if(_4&&_4.target!=this){var _5=this;isc.Timer.setTimeout(function(){isc.EH.$mj=true;var _2=_5.getContentDocument(),_3=_2.getSelection();if(_3){var _6=_3.getRangeAt(0);_3.removeAllRanges();_3.addRange(_6)}
delete isc.EH.$mj},0)}}},isc.A.setFocus=function isc_RichTextCanvas_setFocus(_1){this.$227=true;this.Super("setFocus",arguments);this.$227=false;if(this.$22y()){var _2=this.getContentWindow();if(!_2)return;if(_1)_2.focus()
else window.focus()}else{}},isc.A.focusChanged=function isc_RichTextCanvas_focusChanged(_1){if(_1){this.$228();this.$227=false}else{this.$227=true}
if(this.parentElement&&this.parentElement.editAreaFocusChanged){this.parentElement.editAreaFocusChanged()}},isc.A.draw=function isc_RichTextCanvas_draw(){this.Super("draw",arguments);if(this.$22y())
isc.EventHandler.registerMaskableItem(this,true);if(this.$22y()){this.$220=true}else{this.$221()}},isc.A.redraw=function isc_RichTextCanvas_redraw(){var _1=this.$22y();if(_1)this.$229();this.Super("redraw",arguments);if(_1)this.$220=true},isc.A.$1729=function isc_RichTextCanvas__domRefreshedByParent(){this.Super("$1729",arguments);var _1=this.$22y();if(_1)this.$220=true},isc.A.$221=function isc_RichTextCanvas__setupEditArea(){if(this.styleWithCSS!=null)this.$230("styleWithCSS",this.styleWithCSS);var _1=this.$22y();if(_1){var _2=isc.Browser.isChrome||isc.Browser.isSafari,_3=(_2?"this.defaultView.frameElement.ownerDocument.defaultView.":"");if(!this.$119j){this.$119j=isc.$aq("",_3+this.getID()+".$119k()")}
if(!this.$23a){this.$23a=isc.$aq("event","event=event||"+this.getID()+".getContentWindow().event;var returnValue="+_3+this.getID()+".$23b(event);if(returnValue==false && event.preventDefault)event.preventDefault();else event.returnValue=(returnValue!=false)")}
if(!this.$200t){this.$200t=isc.$aq("event","event=event||"+this.getID()+".getContentWindow().event;var returnValue="+_3+this.getID()+".$200u(event);/*if(returnValue==false && event.preventDefault)event.preventDefault();else*/ event.returnValue=(returnValue!=false)")}
if(!this.$200v){this.$200v=isc.$aq("event","event=event||"+this.getID()+".getContentWindow().event;var returnValue="+_3+this.getID()+".$200u(event,true);/*if(returnValue==false && event.preventDefault)event.preventDefault();else*/ event.returnValue=(returnValue!=false)")}
if(!this.$23c){this.$23c=isc.$aq("event","event=event||"+this.getID()+".getContentWindow().event;var returnValue="+_3+this.getID()+".$23d(event);if(returnValue==false && event.preventDefault)event.preventDefault();else event.returnValue=(returnValue!=false)")}
if(!this.$23e){this.$23e=isc.$aq("event","event=event||"+this.getID()+".getContentWindow().event;var returnValue="+_3+this.getID()+".$23f(event);if(returnValue==false && event.preventDefault)event.preventDefault();else event.returnValue=(returnValue!=false)")}
if(!this.$23g){this.$23g=isc.$aq("event","event=event||"+this.getID()+".getContentWindow().event;var returnValue="+this.getID()+".$23h(event);if(returnValue==false && event.preventDefault)event.preventDefault();else event.returnValue=(returnValue!=false);return (returnValue!=false)")}
if(!this.$82f){this.$82f=isc.$aq("",this.getID()+".$82g();")}
if(!this.$82h){this.$82h=isc.$aq("",this.getID()+".$82i();")}
var _4=this.getContentWindow(),_5=_4.document;var _6=(_2?_5:_4);if(isc.Browser.isIE&&!isc.Browser.isIE9){_6.attachEvent("keypress",this.$23a);_6.attachEvent("keydown",this.$23c);_6.attachEvent("keyup",this.$23e);_4.onscroll=this.$23g;_4.onfocus=this.$82f;_4.onblur=this.$82h}else{_6.addEventListener("input",this.$119j,false);_6.addEventListener("keypress",this.$23a,false);_6.addEventListener("keydown",this.$23c,false);_6.addEventListener("keyup",this.$23e,false);_6.addEventListener("click",this.$200t,false);_6.addEventListener("dblclick",this.$200v,false);_4.addEventListener("scroll",this.$23g,false);_4.addEventListener("focus",this.$82f,false);_4.addEventListener("blur",this.$82h,false)}
_5.body.handleNativeEvents="false";_5.documentElement.handleNativeEvents="false";var _7=this.getContentBody().style;_7.margin="0px";var _8="",_9="<style>",_10=false,_11=false,_12=document.styleSheets;for(var i=0;i<_12.length;i++){if(_12[i].href!=null){_10=true;_8+="<link href='"+_12[i].href+"' rel='stylesheet' type='text/css'>\n"}else{_11=true;var _14=_12[i].cssRules;for(var _15=0;_15<_14.length;_15++){_9+="\n"+_14[_15].cssText+"\n"}}}
var _16="";if(_10)_16+=_8;if(_11)_16+=_9+"\n</style>";_4.document.head.innerHTML=_16;var _17=isc.Element.getStyleDeclaration(this.className,true);if(_17!=null&&_17.length>0){var _18=isc.Canvas.textStyleAttributes;for(var i=0;i<_18.length;i++){var _19=_18[i];for(var _15=0;_15<_17.length;_15++){if(_17[_15][_19]!=null&&_17[_15][_19]!="")
{_7[_19]=_17[_15][_19];break}}}}}
if(isc.Browser.isMoz){var _20=this.getContentBody();if(_20)_20.spellcheck=(!!this.getBrowserSpellCheck())}
var _21=(this.editable&&!this.isDisabled());if(!_1)this.$23i(_21);else{this.delayCall("$23i",[_21,true],0)}
if(this.syntaxHiliter&&!this.formattedOnce){this.formattedOnce=true;this.contents=this.hiliteAndCount(this.contents)}
if(_1){this.getContentDocument().body.style.backgroundColor="transparent";this.getContentDocument().documentElement.style.backgroundColor="transparent"}
this.$23j(this.contents)},isc.A.$43a=function isc_RichTextCanvas__nativeCutPaste(){if(!this.$160e){this.$223();this.$23k()}},isc.A.$119k=function isc_RichTextCanvas__iFrameInput(){this.$23k()},isc.A.parentResized=function isc_RichTextCanvas_parentResized(){if(this.parentElement){this.setWidth(this.parentElement.getInnerContentWidth());this.setHeight(this.parentElement.getInnerContentHeight())}},isc.A.$200u=function isc_RichTextCanvas__iFrameClick(_1,_2){if(_2){return this.handleDoubleClick({target:this})}else{return this.handleClick({target:this})}},isc.A.$23b=function isc_RichTextCanvas__iFrameKeyPress(_1){isc.EH.getKeyEventProperties(_1);return isc.EH.handleKeyPress(_1,{keyTarget:this})},isc.A.$23d=function isc_RichTextCanvas__iFrameKeyDown(_1){isc.EH.getKeyEventProperties(_1);return isc.EH.handleKeyDown(_1,{keyTarget:this})},isc.A.$23f=function isc_RichTextCanvas__iFrameKeyUp(_1){isc.EH.getKeyEventProperties(_1);return isc.EH.handleKeyUp(_1,{keyTarget:this})},isc.A.$23h=function isc_RichTextCanvas__iFrameScroll(_1){return this.$lh(_1)},isc.A.$82g=function isc_RichTextCanvas__iFrameOnFocus(){if(this.destroyed)return;isc.EH.handleFocus(this,true);return true},isc.A.$82i=function isc_RichTextCanvas__iFrameOnBlur(){if(this.destroyed)return;isc.EH.handleBlur(this,true);return true},isc.A.handleKeyDown=function isc_RichTextCanvas_handleKeyDown(_1,_2,_3,_4,_5){var _6=isc.EH.getKey();if(_6==this.$jf){if(this.moveFocusOnTab){this.$kf(!isc.EH.shiftKeyDown())}else{this.insertHTML(this.$120e)}
return false}
return this.invokeSuper(isc.RichTextCanvas,"handleKeyDown",_1,_2,_3,_4,_5)},isc.A.handleKeyPress=function isc_RichTextCanvas_handleKeyPress(_1,_2){var _3=isc.EH.getKey();if(this.countLines)this.rememberSelectionStartLine();this.$23k();var _4=this.Super("handleKeyPress",arguments);if(isc.Browser.isIE&&this.$23l){isc.Timer.clearTimeout(this.$23l);delete this.$23l}
return _4},isc.A.$23k=function isc_RichTextCanvas__queueContentsChanged(){if(!this.$23m){this.$23m=true;if(!this.$23n)this.$23n="$23o";isc.Page.setEvent(isc.EH.IDLE,this,isc.Page.FIRE_ONCE,this.$23n)}},isc.A.$23o=function isc_RichTextCanvas__contentsChanged(){delete this.$23m;var _1=this.contents,_2=this.getContents();if(_1==_2)return;if(this.countLines&&this.selectionIsCollapsed())this.doLinesChanged(_1,_2);this.adjustOverflow("edited");if(this.changed!=null)this.changed(_1,_2);this.contents=_2},isc.A.setSyntaxHiliter=function isc_RichTextCanvas_setSyntaxHiliter(_1){if(_1==null){this.removeSyntaxHiliter();return}
this.syntaxHiliter=_1;this.countLines=true;var _2=this.getContents()||isc.emptyString;this.setContents(_2)},isc.A.removeSyntaxHiliter=function isc_RichTextCanvas_removeSyntaxHiliter(){var _1=this.getContents()||isc.emptyString;delete this.syntaxHiliter;delete this.countLines;this.setContents(_1)},isc.A.doLinesChanged=function isc_RichTextCanvas_doLinesChanged(_1,_2){var _3=this.getLastSelectionStartLine();if(_3==null)return;var _4=this.getLine(_3);var _5=isc.emptyString;var _6=this.markCurrentSelection();if(isc.Browser.isIE&&isc.Browser.version<11){if(!_4){this.getLineContainer().innerHTML=isc.emptyString;var _7=this.createLine();this.getLineContainer().appendChild(_7);var _8=document.selection.createRange();_8.moveToElementText(_7);_8.collapse();_8.select();_6=this.markCurrentSelection();_3=0;_4=this.getLine(0)}
_5=_4.innerHTML}else{var _9=this.getSelectionStartLine();var _10=this.getLineNumber(_9);if(_10<_3){_4=_9;_3=_10}
var _11=_4;var _12=0;while(_11&&_11!=_9){if(_11.innerHTML){_5+=_11.innerHTML}
_12++;_11=_11.nextSibling}
var _13=_9.nextSibling;if(_13&&_13.tagName.toLowerCase()=="br"){_13.parentNode.removeChild(_13);_9.appendChild(_13)}
_5+=_9.innerHTML;if(!_5.replace(/\n|\r/g,isc.emptyString).match(/<br>$/i)){if(_9.nextSibling){_5+=_9.nextSibling.innerHTML;_12++}}}
if(!_1){_1=this.contents;_2=this.getContents()}
if(this.linesChanged){this.linesChanged(_1,_2,_3,_12,_5,_6)}else if(this.syntaxHiliter){this.doSyntaxHilite(_1,_2,_3,_12,_5,_6)}},isc.A.doSyntaxHilite=function isc_RichTextCanvas_doSyntaxHilite(_1,_2,_3,_4,_5,_6){var _7=this.removeMarkup(_5,true);var _8=this.getSelectionMarkerIndex(_7);if(_8==-1){this.doFullSyntaxHilite();return}
_7=this.removeMarkup(_5);var _9=this.syntaxHiliter.hilite(_7,true,_8,this.$23p(_6));this.overwriteLines(_3,_4,_9);this.moveSelectionToMarker(_6)},isc.A.doFullSyntaxHilite=function isc_RichTextCanvas_doFullSyntaxHilite(){var _1=this.markCurrentSelection();var _2=this.$23q();var _3=this.removeMarkup(_2,true);var _4=this.getSelectionMarkerIndex(_3);if(_4==-1){_4=_2.length}
_3=this.removeMarkup(_2);this.setContents(_3,true,_4,this.$23p(_1));this.moveSelectionToMarker(_1);delete this.fullHiliteTimer},isc.A.queueFullHilite=function isc_RichTextCanvas_queueFullHilite(){if(this.fullHiliteTimer)isc.Timer.clearTimeout(this.fullHiliteTimer);this.fullHiliteTimer=this.delayCall("doFullSyntaxHilite",[],this.fullSyntaxHiliteDelay)},isc.A.selectionIsCollapsed=function isc_RichTextCanvas_selectionIsCollapsed(){if(isc.Browser.$120h){var _1=this.getContentWindow().getSelection();return _1.isCollapsed}else if(isc.Browser.isIE){var _2=document.selection.createRange();return _2.text.length==0}},isc.A.rememberSelectionStartLine=function isc_RichTextCanvas_rememberSelectionStartLine(){this.startLineNum=this.getLineNumber(this.getSelectionStartLine())},isc.A.getLastSelectionStartLine=function isc_RichTextCanvas_getLastSelectionStartLine(){return this.startLineNum},isc.A.$23r=function isc_RichTextCanvas__setPasteTimer(){this.$23l=this.delayCall("doLinesChanged",[],0)},isc.A.$23s=function isc_RichTextCanvas__getOnBeforePaste(){if(!this.$23t)
this.$23t=this.getID()+".rememberSelectionStartLine();event.returnValue=true";return this.$23t},isc.A.$23u=function isc_RichTextCanvas__getOnPaste(){if(!this.$23v)this.$23v=this.getID()+".$23r();event.returnValue=true"
return this.$23v},isc.A.$23w=function isc_RichTextCanvas__getLineSpanHTML(){if(!this.$23x){this.$23x="<span isLine='true'";if(this.syntaxHiliter&&!this.syntaxHiliter.autoWrap)
this.$23x+=" style='white-space:nowrap'";if(isc.Browser.isIE){this.$23x+=" onbeforepaste='"+this.$23s()+"' onpaste='"+this.$23u()+"'"}
this.$23x+=">$1</span>"}
return this.$23x},isc.A.createLine=function isc_RichTextCanvas_createLine(_1){var _2=this.getContentDocument();var _3=_2.createElement("span");_3.setAttribute("isLine","true");if(this.syntaxHiliter&&!this.syntaxHiliter.autoWrap)
_3.setAttribute("style","white-space:nowrap");if(isc.Browser.isIE){_3.setAttribute("onbeforepaste",this.$23s());_3.setAttribute("onpaste",this.$23u())}
_3.innerHTML=_1?_1:this.$9z;return _3},isc.A.$23y=function isc_RichTextCanvas__getNextSelectionId(){if(!this.selectionIdSequence)this.selectionIdSequence=0;return this.getID()+"_selection_"+this.selectionIdSequence++},isc.A.getSelectionStartLine=function isc_RichTextCanvas_getSelectionStartLine(){var _1=this.getContentDocument();var _2;if(isc.Browser.$120h){var _3=this.getContentWindow().getSelection();_2=_3.anchorNode}else if(isc.Browser.isIE){var _4=this.$23y();var _5=_1.selection.createRange();_5.collapse();_5.pasteHTML("<span id='"+_4+"'></span>");var _6=_1.getElementById(_4);_2=_6.parentNode;_2.removeChild(_6)}
var _7=_2;while(_2.parentNode!=null){if(_2.getAttribute&&_2.getAttribute("isLine")!=null)_7=_2;_2=_2.parentNode}
return _7},isc.A.$23p=function isc_RichTextCanvas__getSelectionSpanHTML(_1){return"<span isSelectionSpan='true' id='"+_1+"'></span>"},isc.A.markCurrentSelection=function isc_RichTextCanvas_markCurrentSelection(){var _1=this.$23y();var _2=this.getContentDocument();if(isc.Browser.$120h){var _3=_2.createElement("span");_3.setAttribute('isSelectionSpan',"true");_3.setAttribute('id',_1);var _4=this.getContentWindow().getSelection();var _5=_4.getRangeAt(0);if(_4.isCollapsed){_5.insertNode(_3)}else{var _6=_5.cloneRange();_6.collapse(false);_6.insertNode(_3);_6.detach()}}else if(isc.Browser.isIE){var _5=_2.selection.createRange();_5.collapse();_5.pasteHTML(this.$23p(_1))}
return _1},isc.A.overwriteLines=function isc_RichTextCanvas_overwriteLines(_1,_2,_3){if(!isc.isAn.Array(_3))_3=[_3];var _4=this.getLine(_1);while(_1>=0&&(!_4||!_4.getAttribute||!_4.getAttribute("isLine"))){_4=this.getLine(_1);_1--}
if(_1<0){this.getLineContainer().innerHTML=isc.emptyString;_4=this.createLine();this.getLineContainer().appendChild(_4);if(isc.Browser.isMoz)_1++}
var _5=_4.parentNode;_4.innerHTML=_3[0];while(_2!=null&&_2-->0){var _6=this.getLine(_1+1);if(_6){_5.removeChild(_6)}}
for(var i=1;i<_3.length;i++){if(_3[i]!=-1)this.addLineAfter(_1+i-1,_3[i])}},isc.A.addLineAfter=function isc_RichTextCanvas_addLineAfter(_1,_2){var _3=this.getLine(_1);var _4=this.getNextLine(_3);_2=this.createLine(_2);if(_4){_4.parentNode.insertBefore(_2,_4)}else{_3.parentNode.appendChild(_2)}},isc.A.escapeSelection=function isc_RichTextCanvas_escapeSelection(_1,_2){if(_2==null)_2=isc.emptyString;return _1.replace(/<span [^>]*isSelectionSpan[^>]*><\/span>/gi,_2)},isc.A.getSelectionMarkerIndex=function isc_RichTextCanvas_getSelectionMarkerIndex(_1){var _2=new RegExp("<span [^>]*isSelectionSpan[^>]*>","i");var _3=_2.exec(_1);if(_3)return _3.index;return-1},isc.A.getLineNumber=function isc_RichTextCanvas_getLineNumber(_1){var _2=_1.parentNode.childNodes;for(var i=0;i<_2.length;i++)
if(_2[i]==_1)return i},isc.A.getPreviousLine=function isc_RichTextCanvas_getPreviousLine(_1){return _1.previousSibling},isc.A.getNextLine=function isc_RichTextCanvas_getNextLine(_1){return _1.nextSibling},isc.A.getLineContainer=function isc_RichTextCanvas_getLineContainer(){return this.$22y()?this.getContentBody():this.getHandle()},isc.A.getLine=function isc_RichTextCanvas_getLine(_1){return this.getLineContainer().childNodes[_1]},isc.A.getLineHTML=function isc_RichTextCanvas_getLineHTML(_1){return _1.innerHTML},isc.A.getLineContents=function isc_RichTextCanvas_getLineContents(_1){return this.removeMarkup(this.getLineHTML(_1))},isc.A.removeMarkup=function isc_RichTextCanvas_removeMarkup(_1,_2){if(_2){_1=_1.replace(/\n|\r|(<\/?(?!br|BR|([^>]*isSelectionSpan)).*?>)/gi,isc.emptyString)}else{_1=_1.replace(/\n|\r|(<\/?(?!br|BR).*?>)/gi,isc.emptyString)}
_1=_1.unescapeHTML();if(isc.Browser.isOpera){var _3=new RegExp(String.fromCharCode(160),"g");_1=_1.replace(_3," ")}
return _1},isc.A.moveSelectionToMarker=function isc_RichTextCanvas_moveSelectionToMarker(_1){var _2=this.getContentDocument();var _3=_2.getElementById(_1);if(isc.Browser.$120h){var _4=this.getContentWindow().getSelection();_4.removeAllRanges();var _5=_2.createRange();_5.setStartBefore(_3);_5.setEndBefore(_3);_4.addRange(_5)}else if(isc.Browser.isIE){var _5=_2.selection.createRange();_5.moveToElementText(_3);_5.collapse();_5.select()}
this.destroySelectionMarker(_1)},isc.A.destroySelectionMarker=function isc_RichTextCanvas_destroySelectionMarker(_1){var _2=this.getContentDocument();var _3=_2.getElementById(_1);if(_3)_3.parentNode.removeChild(_3)},isc.A.setEditable=function isc_RichTextCanvas_setEditable(_1){if(_1==this.editable)return;this.editable=_1;this.$23i(_1)},isc.A.$23i=function isc_RichTextCanvas__setHandleEditable(_1,_2){if(this.$22y()){var _3=this.getContentDocument();if(_3!=null){if(_1||_2){if(isc.Browser.isIE&&!isc.Browser.isIE11)_3.body.contentEditable=true;else _3.designMode="on"}
if(isc.Browser.isMoz){try{_3.execCommand("contentReadOnly",false,!_1)}catch(e){}}
if(!_1){if(isc.Browser.isIE&&!isc.Browser.isIE11)_3.body.contentEditable="inherit";else _3.designMode="off"}}}else{var _4=this.getHandle();if(_4!=null){if(isc.Browser.isIE){if(!_4.className.contains("richTextEditor")){_4.className+=" richTextEditor"}}
_4.contentEditable=(_1?true:"inherit");if(isc.Browser.isIE){if(!this.isVisible()&&this.$224())
this.$23z();else if(isc.Browser.version<6)
this.$223();if(this.$119m==null){this.$119m=isc.$aq("",this.getID()+".$43a()")}
if(_1){_4.oncut=this.$119m;_4.onpaste=this.$119m;_4.onfocusout=this.$119m}else{_4.oncut=_4.onpaste=_4.onfocusout=null}
if(isc.Browser.isIE&&(isc.Browser.isIE9||isc.Browser.version>=10)){if(_1){_4.removeEventListener("DOMNodeInserted",this.$119m,false);_4.addEventListener("DOMNodeInserted",this.$119m,false);_4.removeEventListener("DOMNodeRemoved",this.$119m,false);_4.addEventListener("DOMNodeRemoved",this.$119m,false);if(isc.Browser.isIE11){_4.removeEventListener("DOMCharacterDataModified",this.$119m,false);_4.addEventListener("DOMCharacterDataModified",this.$119m,false)}}else{_4.removeEventListener("DOMNodeRemoved",this.$119m,false);_4.removeEventListener("DOMNodeInserted",this.$119m,false);if(isc.Browser.isIE11){_4.removeEventListener("DOMCharacterDataModified",this.$119m,false)}}}}}}});isc.evalBoundary;isc.B.push(isc.A.parentVisibilityChanged=function isc_RichTextCanvas_parentVisibilityChanged(_1){if(!this.$22y()&&isc.Browser.isIE&&(_1==isc.Canvas.HIDDEN)&&this.$224())
{this.$23z()}
return this.Super("parentVisibilityChanged",arguments)},isc.A.$23z=function isc_RichTextCanvas__emptySelectionForHide(){document.body.focus();var _1=isc.EH.getFocusCanvas();if(_1!=this&&_1!=null){_1.focus()}},isc.A.disableKeyboardEvents=function isc_RichTextCanvas_disableKeyboardEvents(_1){this.Super("disableKeyboardEvents",arguments);if(this.editable)this.$23i(_1?false:true)},isc.A.$229=function isc_RichTextCanvas__rememberContents(){if(!this.isDrawn()||this.$220)return;var _1=this.$23q();if(_1!=null)this.contents=_1},isc.A.$23q=function isc_RichTextCanvas__getContents(){var _1;if(this.$22y()){var _2=this.getContentBody();if(!_2)return;_1=_2.innerHTML}else{var _3=this.getHandle();if(_3)_1=_3.innerHTML}
return _1},isc.A.getContents=function isc_RichTextCanvas_getContents(_1){this.$229();if((this.syntaxHiliter||this.countLines)&&!_1){return this.removeMarkup(this.contents)}else{return this.contents}},isc.A.setContents=function isc_RichTextCanvas_setContents(_1,_2,_3,_4){if(_1==this.contents&&!_2)return;this.contents=_1;if(!this.isDrawn()||this.$220)return;this.$23j(this.hiliteAndCount(_1,_3,_4))},isc.A.$23j=function isc_RichTextCanvas__setContents(_1){this.contents=_1;if(!this.isDrawn())return;this.$160e=true;if(this.$22y()){var _2=this.getContentBody();if(_2!=null)_2.innerHTML=_1}else{var _3=this.getHandle();if(_3!=null)_3.innerHTML=_1}
this.$160e=false;this.adjustOverflow()},isc.A.hiliteAndCount=function isc_RichTextCanvas_hiliteAndCount(_1,_2,_3){if(this.syntaxHiliter){_1=this.syntaxHiliter.hilite(_1,false,_2,_3)}
if(this.countLines){if(_1==isc.emptyString)_1=this.$9z;_1=_1.replace(/((?:.*?<br>)|(?:.+$))/gi,this.$23w())}
return _1},isc.A.appendContents=function isc_RichTextCanvas_appendContents(_1,_2,_3){_1=this.hiliteAndCount(_1,_2,_3);var _4=this.$22y()?this.getContentBody():this.getHandle();_4.innerHTML+=_1;this.adjustOverflow()},isc.A.$230=function isc_RichTextCanvas__execCommand(_1,_2){if(!this.isDrawn()||!this.editable)return;if(!isc.Page.isLoaded()){this.logWarn("Unsupported attempt to manipulate RichTextCanvas content style before page load: postponed until the page has done loading.");isc.Page.setEvent("Load",this.getID()+".$230('"+_1+"','"+_2+"');");return}
this.focus();var _3=this.$22y(),_4=_3?this.getContentDocument():document;if(!_4)return;if(!this.$231(_1))return false;try{_4.execCommand(_1,false,_2)}catch(e){return false}
if(_3){var _5=this.getContentWindow();_5.focus()}else{this.$223()}
this.$23o()},isc.A.$231=function isc_RichTextCanvas__commandEnabled(_1){try{var _2=this.$22y()?this.getContentDocument():document;if(!_2)return false;if(!_2.queryCommandEnabled(_1))return false}catch(e){return false}
return true},isc.A.boldSelection=function isc_RichTextCanvas_boldSelection(){this.$230("bold")},isc.A.italicSelection=function isc_RichTextCanvas_italicSelection(){this.$230("italic")},isc.A.underlineSelection=function isc_RichTextCanvas_underlineSelection(){this.$230("underline")},isc.A.strikethroughSelection=function isc_RichTextCanvas_strikethroughSelection(){this.$230("strikethrough")},isc.A.showClipboardDisabledError=function isc_RichTextCanvas_showClipboardDisabledError(){var _1="Your browser does not allow web pages to access the clipboard programmatically.";isc.warn(_1)},isc.A.copySelection=function isc_RichTextCanvas_copySelection(){if(this.$230("copy")==false)this.showClipboardDisabledError()},isc.A.cutSelection=function isc_RichTextCanvas_cutSelection(){if(this.$230("cut")==false)this.showClipboardDisabledError();},isc.A.pasteOverSelection=function isc_RichTextCanvas_pasteOverSelection(){if(this.$230("paste")==false)this.showClipboardDisabledError()},isc.A.deleteSelection=function isc_RichTextCanvas_deleteSelection(){this.$230("delete")},isc.A.indentSelection=function isc_RichTextCanvas_indentSelection(){this.$230("indent")},isc.A.outdentSelection=function isc_RichTextCanvas_outdentSelection(){this.$230("outdent")},isc.A.insertHTML=function isc_RichTextCanvas_insertHTML(_1){if(isc.Browser.isIE){var _2=this.getContentDocument();if(isc.Browser.version<11){var _3=_2.selection.createRange(),_4=_4=_3.parentElement();_3.pasteHTML(_1);if(_4!=null){isc.Element.forEachDescendantHavingClass(_4,"_isc_tab",isc.RichTextCanvas.$120i)}}else{var _5=_2.getSelection(),_3;if(_5.rangeCount<=0){_3=_2.createRange();var _6=this.getLineContainer();if(!_6.lastChild){_6.appendChild(_2.createTextNode(""))}
_3.selectNode(_6.lastChild);_3.collapse(false)}else{_3=_5.getRangeAt(0)}
_3.deleteContents();var _7=_3.createContextualFragment(_1);_3.insertNode(_7);_3.collapse(false);_5.removeAllRanges();_5.addRange(_3)}}else{this.$230("insertHTML",_1)}},isc.A.justifySelection=function isc_RichTextCanvas_justifySelection(_1){if(_1==isc.RichTextCanvas.CENTER){this.$230("justifycenter")}else if(_1==isc.RichTextCanvas.FULL){this.$230("justifyfull")}else if(_1==isc.RichTextCanvas.RIGHT){this.$230("justifyright")}else if(_1==isc.RichTextCanvas.LEFT){this.$230("justifyleft")}},isc.A.setSelectionColor=function isc_RichTextCanvas_setSelectionColor(_1){this.$230("forecolor",_1)},isc.A.setSelectionBackgroundColor=function isc_RichTextCanvas_setSelectionBackgroundColor(_1){var _2=isc.Browser.isMoz?"hilitecolor":"backcolor";this.$230(_2,_1)},isc.A.setSelectionFont=function isc_RichTextCanvas_setSelectionFont(_1){this.$230("fontname",_1)},isc.A.setSelectionFontSize=function isc_RichTextCanvas_setSelectionFontSize(_1){this.$230("fontsize",_1)},isc.A.createLink=function isc_RichTextCanvas_createLink(_1){this.$230("CreateLink",_1)},isc.A.$1179=function isc_RichTextCanvas__getListElementFromSelection(){var _1=this.getContentDocument();if(!isc.Browser.$120h){var _2=null;if(this.$225){_2=this.$225.parentElement()}else{_2=isc.Element.$mk(_1)}
for(var _3=_2;_3!=null;_3=_3.parentNode){if(_3.nodeType!=1)continue;if(_3.tagName==="OL"||_3.tagName==="UL"){return _3}}}else{var _4,_5;if(this.$22y()||this.$225==null){var _6=_1.defaultView.getSelection();_4=_6.anchorNode;_5=_6.focusNode}else{_4=this.$160j;_5=this.$160k}
var _7=[];var _3=_4;for(;_3!=null;_3=_3.parentNode){if(_3.nodeType!=1)continue;if(_3.tagName==="OL"||_3.tagName==="UL"){_7.add(_3)}}
_3=_5;for(;_3!=null;_3=_3.parentNode){if(_3.nodeType!=1)continue;if(_3.tagName==="OL"||_3.tagName==="UL"){if(_7.contains(_3)){return _3}}}}
return null},isc.A.convertSelectionToOrderedList=function isc_RichTextCanvas_convertSelectionToOrderedList(){var _1=this.$1179();if(_1!=null){var _2=this.getListProperties(_1),_3=isc.ListPropertiesPane.getListType(_2)=="unordered";if(_3){this.applyListProperties({style:"decimal"},_1)}else{}}else{this.$230("insertOrderedList")}},isc.A.convertSelectionToUnorderedList=function isc_RichTextCanvas_convertSelectionToUnorderedList(){var _1=this.$1179();if(_1!=null){var _2=this.getListProperties(_1),_3=isc.ListPropertiesPane.getListType(_2)=="unordered";if(!_3){this.applyListProperties({style:"disc"},_1)}else{}}else{this.$230("insertUnorderedList")}},isc.A.getListProperties=function isc_RichTextCanvas_getListProperties(_1){_1=_1||this.$1179();var _2=null;if(_1!=null){var _3=isc.Element.getComputedStyle(_1,{listStyleType:"list-style-type",listStyleImage:"list-style-image"});var _4=_3.listStyleType,_5=_3.listStyleImage;if(_5&&_5!="none"){_4="custom-image";_5=_5.substring(4,_5.length-1);if(_5.length>=2&&_5.charAt(0)=='"'){_5=_5.substring(1,_5.length-1)}}
_2={style:_4,image:_5};if(_1.start!=""&&_1.start!=null)
{_2.startNumber=_1.start<<0}}
return _2},isc.A.applyListProperties=function isc_RichTextCanvas_applyListProperties(_1,_2){_2=_2||this.$1179();if(_2!=null){_1=isc.ListPropertiesPane.getCanonicalListProperties(_1);var _3=isc.ListPropertiesPane.getListType(_1)=="unordered";if((_3&&_2.tagName!="UL")||(!_3&&_2.tagName!="OL"))
{var _4=_2.ownerDocument,_5=_4.createElement(_3?"UL":"OL");var _6;while((_6=_2.firstChild)!=null){_5.appendChild(_6)}
if(_2.attributes){for(var i=0,_8=_2.attributes.length;i<_8;++i){var _9=_2.attributes[i];if(!_3||_9.name!="start"){_5.setAttributeNode(_9.cloneNode())}}}
_2.parentNode.replaceChild(_5,_2);_2=_5}
_2.removeAttribute("start");if(_3){if(_1.style=="custom-image"){_2.style.listStyle="url(\""+this.getImgURL(_1.image)+"\")"}else{_2.style.listStyle=_1.style}}else{_2.style.listStyle=_1.style;if(_1.startNumber!=null){_2.start=_1.startNumber<<0}}}});isc.B._maxIndex=isc.C+114;isc.RichTextCanvas.registerStringMethods({changed:"oldValue,newValue"});isc.ClassFactory.defineClass("RichTextEditor","VLayout");isc.A=isc.RichTextEditor.getPrototype();isc.A.editAreaConstructor="RichTextCanvas";isc.A.editAreaBackgroundColor="white";isc.A.editAreaClassName="normal";isc.A.useDesignMode=false;isc.A.value="";isc.A.toolAreaDefaults={_constructor:"VLayout",width:"100%",overflow:isc.Canvas.VISIBLE};isc.A.toolbarConstructor="HLayout";isc.A.toolbarDefaults={defaultLayoutAlign:isc.Canvas.CENTER,shouldPrint:false,overflow:isc.Canvas.VISIBLE};isc.A.toolbarHeight=24;isc.A.toolbarBackgroundColor="#CCCCCC";isc.A.toolbarSeparatorSrc="[SKIN]/RichTextEditor/separator.png";isc.A.controlButtonWidth=20;isc.A.defaultControlConstructor="IconButton";isc.A.controlGroups=["fontControls","formatControls","styleControls","colorControls"];isc.A.styleControls=["boldSelection","italicSelection","underlineSelection"];isc.A.fontSelectorPrompt="Set Font...";isc.A.fontSizeSelectorPrompt="Set Font Size...";isc.A.linkUrlTitle="Hyperlink URL:";isc.A.boldSelectionPrompt="Make selection bold";isc.A.boldSelectionDefaults={title:"<b>B</b>",showIcon:false};isc.A.italicSelectionPrompt="Make selection italic";isc.A.italicSelectionDefaults={title:"<i>I</i>",showIcon:false};isc.A.underlineSelectionPrompt="Make selection underlined";isc.A.underlineSelectionDefaults={title:"<u>U</u>",showIcon:false};isc.A.strikethroughSelectionPrompt="Strike through selection";isc.A.strikethroughSelectionDefaults={title:"<del>S</del>"};isc.A.fontControls=["fontSelector","fontSizeSelector"];isc.A.fontSelectorConstructor=isc.DynamicForm;isc.A.fontSizeSelectorConstructor=isc.DynamicForm;isc.A.fontNames={"arial,helvetica,sans-serif":"Arial",'courier new,courier,monospace':"Courier New",'georgia,times new roman,times,serif':"Georgia",'tahoma,arial,helvetica,sans-serif':"Tahoma",'times new roman,times,serif':"Times New Roman",'verdana,arial,helvetica,sans-serif':"Verdana","impact":"Impact"};isc.A.fontSizes={"1":"1 (8 pt)","2":"2 (10 pt)","3":"3 (12 pt)","4":"4 (14 pt)","5":"5 (18 pt)","6":"6 (24 pt)","7":"7 (36 pt)"};isc.A.editControls=["copySelection","cutSelection","pasteSelection"];isc.A.copySelectionPrompt="Copy Selection";isc.A.copySelectionDefaults={icon:"[SKIN]/RichTextEditor/copy.png"};isc.A.cutSelectionPrompt="Cut Selection";isc.A.cutSelectionDefaults={icon:"[SKIN]/RichTextEditor/cut.png"};isc.A.pasteSelectionPrompt="Paste";isc.A.pasteSelectionDefaults={icon:"[SKIN]/RichTextEditor/paste.png"};isc.A.formatControls=["alignLeft","alignRight","alignCenter","justify"];isc.A.alignLeftPrompt="Left align selection";isc.A.alignLeftDefaults={actionType:"radio",radioGroup:"radioFormat",showButtonTitle:false,icon:"[SKIN]/RichTextEditor/text_align_left.png",click:function(){this.creator.fireAction('justifySelection','left')}};isc.A.alignCenterPrompt="Center selection";isc.A.alignCenterDefaults={actionType:"radio",radioGroup:"radioFormat",showButtonTitle:false,icon:"[SKIN]/RichTextEditor/text_align_center.png",click:function(){this.creator.fireAction('justifySelection','center')}};isc.A.alignRightPrompt="Right align selection";isc.A.alignRightDefaults={actionType:"radio",radioGroup:"radioFormat",showButtonTitle:false,icon:"[SKIN]/RichTextEditor/text_align_right.png",click:function(){this.creator.fireAction('justifySelection','right')}};isc.A.justifyPrompt="Full justify selection";isc.A.justifyDefaults={actionType:"radio",radioGroup:"radioFormat",showButtonTitle:false,icon:"[SKIN]/RichTextEditor/text_align_justified.png",click:function(){this.creator.fireAction('justifySelection','full')}};isc.A.colorControls=["color","backgroundColor"];isc.A.colorPrompt="Set selection text color";isc.A.colorDefaults={showButtonTitle:false,icon:"[SKIN]/RichTextEditor/text_color.gif",click:"this.creator.chooseTextColor()"};isc.A.backgroundColorPrompt="Set selection background color";isc.A.backgroundColorDefaults={showButtonTitle:false,icon:"[SKIN]/RichTextEditor/background_color.gif",click:"this.creator.chooseBackgroundColor()"};isc.A.insertControls=["link"];isc.A.linkPrompt="Edit Hyperlink";isc.A.linkDefaults={showButtonTitle:false,icon:"[SKIN]/RichTextEditor/link_new.png",click:"this.creator.createLink()"};isc.A.bulletControls=["indent","outdent","orderedList","unorderedList","listProperties"];isc.A.indentPrompt="Increase Indent";isc.A.indentDefaults={showButtonTitle:false,showDownIcon:false,icon:"[SKIN]/RichTextEditor/indent.png",click:"this.creator.indentSelection()"};isc.A.outdentPrompt="Decrease Indent";isc.A.outdentDefaults={showButtonTitle:false,showDownIcon:false,icon:"[SKIN]/RichTextEditor/outdent.png",click:"this.creator.outdentSelection()"};isc.A.orderedListPrompt="Convert to a numbered list";isc.A.orderedListDefaults={showButtonTitle:false,showDownIcon:false,icon:"[SKIN]/RichTextEditor/text_list_numbers.png",click:"this.creator.convertToOrderedList()"};isc.A.unorderedListPrompt="Convert to a bullet list";isc.A.unorderedListDefaults={showButtonTitle:false,showDownIcon:false,icon:"[SKIN]/RichTextEditor/text_list_bullets.png",click:"this.creator.convertToUnorderedList()"};isc.A.listPropertiesPrompt="Configure the list";isc.A.listPropertiesDefaults={showButtonTitle:false,showDownIcon:false,icon:"[SKIN]/RichTextEditor/text_list_edit.png",click:"this.creator.editListProperties()"};isc.A.canFocus=true;isc.A._useFocusProxy=false;isc.A._useNativeTabIndex=false;isc.A.moveFocusOnTab=true;isc.A=isc.RichTextEditor;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$232=function isc_c_RichTextEditor__canvasContentsChanged(_1,_2){this.creator.$233(_1,_2)});isc.B._maxIndex=isc.C+1;isc.A=isc.RichTextEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.dragStartDistance=1;isc.A.ignoreKeys=["Arrow_Up","Arrow_Down","Arrow_Left","Arrow_Right","Ctrl","Alt","Tab","Space","Home","End","Enter"];isc.A.$118g="break";isc.A.listPropertiesDialogDefaults={_constructor:"ListPropertiesDialog",autoParent:"none",autoCenter:true,isModal:true,showModalMask:true,applyClick:function(_1){this.creator.applyListProperties(_1);this.hide()},cancelClick:function(){this.hide()}};isc.A.listPropertiesWarningText="Place the cursor within a list to configure it";isc.B.push(isc.A.initWidget=function isc_RichTextEditor_initWidget(){this.Super("initWidget",arguments);this.createChildren()},isc.A.doWarn=function isc_RichTextEditor_doWarn(){isc.logWarn("Warning: Not all Rich Text Editing features are supported in this browser.")},isc.A.createChildren=function isc_RichTextEditor_createChildren(){if(!this.richEditorSupported())this.delayCall("doWarn");if(!this.autoChildDefaults)this.autoChildDefaults={};this.autoChildDefaults.width=this.controlButtonWidth;this.autoChildDefaults.click=function(){if(this.isControl&&isc.isA.StatefulCanvas(this))this.creator.fireAction(this.controlName)}
if(this.toolbarHeight>0)this.$118h();var _1=isc.addProperties({backgroundColor:this.editAreaBackgroundColor},{useDesignMode:this.useDesignMode,styleWithCSS:this.styleWithCSS},this.editAreaProperties,{top:this.toolbarHeight,className:this.editAreaClassName,left:0,width:"100%",height:"*",contents:this.value,moveFocusOnTab:this.moveFocusOnTab,changed:isc.RichTextEditor.$232,getBrowserSpellCheck:function(){return this.parentElement.getBrowserSpellCheck()},handleClick:function(){var _2=this.Super("handleClick",arguments);if(_2!=false)_2=this.parentElement.handleClick(arguments);return _2},handleDoubleClick:function(){var _2=this.Super("handleDoubleClick",arguments);if(_2!=false)_2=this.creator.handleDoubleClick(arguments);return _2}});this.addAutoChild("editArea",_1)},isc.A.editAreaFocusChanged=function isc_RichTextEditor_editAreaFocusChanged(){},isc.A.handleKeyPress=function isc_RichTextEditor_handleKeyPress(_1,_2){var _3=isc.EH.getKey();if(this.ignoreKeys.contains(_3)){if(this.keyPress)this.keyPress(_1,_2);return isc.EH.STOP_BUBBLING}
var _4=this.Super("handleKeyPress",arguments);return _4},isc.A.richEditorSupported=function isc_RichTextEditor_richEditorSupported(){return!((isc.Browser.isSafari&&isc.Browser.minorVersion<3.1)||(isc.Browser.isOpera&&isc.Browser.minorVersion<9.5))},isc.A.getBrowserSpellCheck=function isc_RichTextEditor_getBrowserSpellCheck(){return this.browserSpellCheck},isc.A.draw=function isc_RichTextEditor_draw(){this.Super("draw",arguments);if(this.editArea&&this.toolArea){this.editArea.setWidth(this.toolArea.getVisibleWidth())}},isc.A.$118h=function isc_RichTextEditor__createToolArea(){var _1=this.addAutoChild("toolArea",{backgroundColor:this.toolbarBackgroundColor});if(_1==null)return;var _2=this.$234();var _3=this.controlGroups;for(var i=0,r=1,c=0;i<_3.length;++i){var _7=_3[i];if(_7==this.$118g){_2=this.$234();++r;c=0;continue}
if(!isc.isA.Canvas(_7)){var _8=_7,_9=this[_8];if(!_9){this.logWarn("Unable to find controlGroup '"+_8+"'. This group should be specified as an array of control names, but is not present.");continue}
if(c>0&&this.showGroupSeparators!=false)_2.addMember(this.$235());for(var j=0;j<_9.length;++j){var _11=_9[j];if(!isc.isA.Canvas(_11)){var _12=_11;this.addAutoChild(_12,{canFocus:true,isControl:true,controlName:_12,prompt:this[_12+"Prompt"]},this.defaultControlConstructor,_2)}else{_11.setCanFocus(true);_11.isControl=true;_2.addMember(_11)}}}else{if(c>0)_2.addMember(this.$235());_2.addMember(_7)}
++c}
if(_3.length==0&&this.showToolArea!=true)_1.hide();_1.setHeight(r*this.toolbarHeight);_1.setMembers(this.toolbars);return _1},isc.A.$234=function isc_RichTextEditor__createToolbar(){var _1=this.createAutoChild("toolbar",{height:this.toolbarHeight,backgroundColor:this.toolbarBackgroundColor});if(this.toolbars==null){this.toolbars=[_1];this.toolbar=_1}else this.toolbars.add(_1);return _1},isc.A.$235=function isc_RichTextEditor__createToolbarSeparator(){if(!this.$236){this.$236={autoDraw:false,width:12,height:"100%",src:this.toolbarSeparatorSrc}}
return isc.Img.create(this.$236)},isc.A.setFocus=function isc_RichTextEditor_setFocus(_1){var _2=this.editArea;if(!_2)return;return _2.setFocus(_1)},isc.A.setMoveFocusOnTab=function isc_RichTextEditor_setMoveFocusOnTab(_1){this.moveFocusOnTab=_1;if(this.editArea)this.editArea.moveFocusOnTab=_1},isc.A.$237=function isc_RichTextEditor__makeFontMap(_1,_2){var _3={$238:_1};return isc.addProperties(_3,_2)},isc.A.$239=function isc_RichTextEditor__makeFontNamesMap(){return this.$237(this.fontSelectorPrompt,this.fontNames)},isc.A.$24a=function isc_RichTextEditor__makeFontSizesMap(){return this.$237(this.fontSizeSelectorPrompt,this.fontSizes)},isc.A.fontSelector_autoMaker=function isc_RichTextEditor_fontSelector_autoMaker(_1){isc.addProperties(_1,{numCols:1,cellPadding:1,items:[isc.addProperties({type:"select",name:"fontname",showTitle:false,pickListProperties:{getCellValue:function(_4,_5,_6){var _2=this.Super("getCellValue",arguments),_3=_4?_4.fontname:null;if(_3&&_3!="$238"){_2="<SPAN style='font-family:"+_3+";'>"+_2+"</SPAN>"}
return _2}},defaultValue:"$238",valueMap:this.$239(),pickValue:function(_4){this.Super("pickValue",arguments);if(_4!="$238"){this.form.creator.fireAction('setSelectionFont',_4)}}},this.fontSelectorItemProperties)]});return this.createAutoChild("fontSelector",_1)},isc.A.fontSizeSelector_autoMaker=function isc_RichTextEditor_fontSizeSelector_autoMaker(_1){isc.addProperties(_1,{numCols:1,cellPadding:1,items:[isc.addProperties({type:"select",name:"fontsize",showTitle:false,defaultValue:"$238",valueMap:this.$24a(),pickValue:function(_2){this.Super("pickValue",arguments);if(_2!="$238"){this.form.creator.fireAction('setSelectionFontSize',_2)}}},this.fontSizeSelectorItemProperties)]});return this.createAutoChild("fontSizeSelector",_1)},isc.A.fireAction=function isc_RichTextEditor_fireAction(_1,_2){var _3=this.editArea;if(!_3||!_1||!_3[_1]||!isc.isA.Function(_3[_1]))
return;this.editArea[_1](_2)},isc.A.chooseColor=function isc_RichTextEditor_chooseColor(_1){this.colorChooser=isc.ColorPicker.getSharedColorPicker({creator:this,showHeaderIcon:true,headerIconProperties:{src:_1?this.color.icon:this.backgroundColor.icon,iconSize:20},ID:this.getID()+"$24b",showNullValue:false,colorSelected:function(_2){this.creator.uncheckColorButton();this.creator.$24c(_2)},closeClick:function(){this.Super("closeClick",arguments);this.pickerCancelled()},pickerCancelled:function(){this.creator.uncheckColorButton();this.creator.editArea.focus()}})
this.$24d=_1;this.colorChooser.show()},isc.A.uncheckColorButton=function isc_RichTextEditor_uncheckColorButton(){if(this.$24d)this.color.setSelected(false);else this.backgroundColor.setSelected(false)},isc.A.$24c=function isc_RichTextEditor__colorSelected(_1){var _2=this.$24d?"setSelectionColor":"setSelectionBackgroundColor";delete this.$24d;this.fireAction(_2,_1)},isc.A.chooseTextColor=function isc_RichTextEditor_chooseTextColor(){this.chooseColor(true)},isc.A.chooseBackgroundColor=function isc_RichTextEditor_chooseBackgroundColor(){this.chooseColor(false)},isc.A.createLink=function isc_RichTextEditor_createLink(){var _1=this;isc.askForValue(this.linkUrlTitle,function(_2){if(_2==null)return;_1.fireAction("createLink",_2)},{defaultValue:"http://",width:320})},isc.A.indentSelection=function isc_RichTextEditor_indentSelection(){this.fireAction("indentSelection")},isc.A.outdentSelection=function isc_RichTextEditor_outdentSelection(){this.fireAction("outdentSelection")},isc.A.convertToOrderedList=function isc_RichTextEditor_convertToOrderedList(){this.fireAction("convertSelectionToOrderedList")},isc.A.convertToUnorderedList=function isc_RichTextEditor_convertToUnorderedList(){this.fireAction("convertSelectionToUnorderedList")},isc.A.applyListProperties=function isc_RichTextEditor_applyListProperties(_1){this.fireAction("applyListProperties",_1)},isc.A.editListProperties=function isc_RichTextEditor_editListProperties(){if(!this.editArea)return;var _1=this.editArea.getListProperties();if(_1==null){isc.warn(this.listPropertiesWarningText);return}
var _2=this.addAutoChild("listPropertiesDialog");_2.listPropertiesPane.setListProperties(_1);_2.show()},isc.A.$233=function isc_RichTextEditor__valueChanged(_1,_2){if(this.valueChanged)this.valueChanged(_1,_2)},isc.A.getValue=function isc_RichTextEditor_getValue(){if(this.editArea)this.value=this.editArea.getContents();return this.value},isc.A.setValue=function isc_RichTextEditor_setValue(_1){this.value=_1;if(this.editArea)this.editArea.setContents(this.value)});isc.B._maxIndex=isc.C+34;isc.RichTextEditor.registerStringMethods({valueChanged:"oldValue,newValue"});isc.ClassFactory.defineClass("RichTextItem",isc.CanvasItem);isc.A=isc.RichTextItem.getPrototype();isc.A.canFocus=true;isc.A.moveFocusOnTab=true;isc.A.shouldSaveValue=true;isc.A.showTitle=false;isc.A.startRow=true;isc.A.endRow=true;isc.A.colSpan="*";isc.A.width=550;isc.A.canvasConstructor="RichTextEditor";isc.A.canvasDefaults={getBrowserSpellCheck:function(){return this.canvasItem.getBrowserSpellCheck()},valueChanged:function(_1,_2){this.canvasItem.storeValue(_2)},editAreaFocusChanged:function(){this.canvasItem.editAreaFocusChanged()}};isc.A=isc.RichTextItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.isMultiLineEditor=true;isc.A.hasInternalNavigation=true;isc.B.push(isc.A.init=function isc_RichTextItem_init(){if(this.value&&isc.isA.String(this.value)){this.value=this.value.replaceAll("<BR>","<br>").replaceAll("<P>","<p>")}
this.Super("init",arguments)},isc.A.$18y=function isc_RichTextItem__createCanvas(){this.$1138=true;var _1=this.getValue();_1=this.mapValueToDisplay(_1);var _2={ID:this.getID()+"$21b",value:_1,moveFocusOnTab:this.moveFocusOnTab};var _3=this.controlGroups;if(_3!=null){var _4="Properties",_5="_autoMaker",_6="Constructor";_2.controlGroups=_3;for(var i=0;i<_3.length;i++){if(this[_3[i]]){var _8=_3[i],_9=this[_8];_2[_8]=_9;for(var _10=0;_10<_9.length;_10++){var _11=_9[_10]+_4,_12=_9[_10]+_5,_13=_9[_10]+_6;if(this[_11])_2[_11]=this[_11];if(this[_12])_2[_12]=this[_12];if(this[_13])
_2[_13]=this[_13]}}}}
if(this.defaultControlConstructor!=null){_2.defaultControlConstructor=this.defaultControlConstructor}
this.canvas=_2;this.Super("$18y",arguments);delete this.$1138},isc.A.setMoveFocusOnTab=function isc_RichTextItem_setMoveFocusOnTab(_1){this.moveFocusOnTab=_1;if(this.canvas)this.canvas.setMoveFocusOnTab(_1)},isc.A.editAreaFocusChanged=function isc_RichTextItem_editAreaFocusChanged(){this.hasFocus=this.canvas.editArea.hasFocus;if(this.hasFocus){this.elementFocus();this.form.setFocusItem(this)}else{this.elementBlur()}},isc.A.mapValueToDisplay=function isc_RichTextItem_mapValueToDisplay(_1){var _2=isc.FormItem.$b4.mapValueToDisplay.call(this,_1);if(_2==null)return isc.emptyString;return _2},isc.A.showValue=function isc_RichTextItem_showValue(_1,_2,_3,_4){if(!this.canvas)return;this.canvas.setValue(_1)},isc.A.setWidth=function isc_RichTextItem_setWidth(_1){this.width=_1;this.canvas.setWidth(_1);if(this.form)this.form.markForRedraw();else this.redraw()},isc.A.getWidth=function isc_RichTextItem_getWidth(){return this.width});isc.B._maxIndex=isc.C+8;isc._nonDebugModules=(isc._nonDebugModules!=null?isc._nonDebugModules:[]);isc._nonDebugModules.push('RichTextEditor');isc.checkForDebugAndNonDebugModules();isc._moduleEnd=isc._RichTextEditor_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('RichTextEditor module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;if(isc.Page)isc.Page.handleEvent(null,"moduleLoaded",{moduleName:'RichTextEditor',loadTime:(isc._moduleEnd-isc._moduleStart)});}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'RichTextEditor'.");}
