!function(x){x.jqx.jqxWidget("jqxEditor","",{}),x.extend(x.jqx._jqxEditor.prototype,{defineInstance:function(){var e={width:null,height:null,disabled:!1,pasteMode:"html",editable:!0,lineBreak:"default",changeType:null,toolbarPosition:"top",fontFamily:"sans-serif",commands:{bold:{tooltip:"Bold",command:"bold",type:"toggleButton"},italic:{tooltip:"Italic",command:"italic",type:"toggleButton"},underline:{tooltip:"Underline",command:"underline",type:"toggleButton"},format:{placeHolder:"Format Block",tooltip:"Format Block",command:"formatblock",value:[{value:"p",label:"Paragraph"},{value:"h1",label:"Header 1"},{value:"h2",label:"Header 2"},{value:"h3",label:"Header 3"},{value:"h4",label:"Header 4"}],type:"list",width:120,dropDownWidth:190,height:25},font:{placeHolder:"Font",tooltip:"Font Name",command:"fontname",value:[{label:"Arial",value:"Arial, Helvetica, sans-serif"},{label:"Comic Sans MS",value:'"Comic Sans MS", cursive, sans-serif'},{label:"Courier New",value:'"Courier New", Courier, monospace'},{label:"Georgia",value:"Georgia,serif"},{label:"Impact",value:"Impact,Charcoal,sans-serif"},{label:"Lucida Console",value:"'Lucida Console',Monaco,monospace"},{label:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{label:"Times New Roman",value:"'Times New Roman',Times,serif"},{label:"Trebuchet MS",value:'"Trebuchet MS",Helvetica,sans-serif'},{label:"Verdana",value:"Verdana,Geneva,sans-serif"}],type:"list",width:160,height:25,dropDownWidth:160},size:{placeHolder:"Size",tooltip:"Font Size",command:"fontsize",value:[{label:"1 (8pt)",value:"xx-small"},{label:"2 (10pt)",value:"x-small"},{label:"3 (12pt)",value:"small"},{label:"4 (14pt)",value:"medium"},{label:"5 (18pt)",value:"large"},{label:"6 (24pt)",value:"x-large"},{label:"7 (36pt)",value:"xx-large"}],type:"list",width:45,height:25,dropDownWidth:160},color:{tooltip:"Text Color",command:"forecolor",value:"#000",type:"colorPicker"},background:{tooltip:"Fill Color",command:"backcolor",value:"#fff",type:"colorPicker"},left:{tooltip:"Align Left",command:"justifyleft",type:"toggleButton"},center:{tooltip:"Align Center",command:"justifycenter",type:"toggleButton"},right:{tooltip:"Align Right",command:"justifyright",type:"toggleButton"},outdent:{tooltip:"Indent Less",command:"outdent",type:"button"},indent:{tooltip:"Indent More",command:"indent",type:"button"},ul:{tooltip:"Insert unordered list",command:"insertunorderedlist",type:"toggleButton"},ol:{tooltip:"Insert ordered list",command:"insertorderedlist",type:"toggleButton"},image:{tooltip:"Insert image",command:"insertimage",type:"button"},link:{tooltip:"Insert link",command:"createlink",type:"toggleButton"},html:{tooltip:"View source",command:"viewsource",type:"toggleButton"},clean:{tooltip:"Remove Formatting",command:"removeformat",type:"button"}},createCommand:null,defaultLocalization:{bold:"Bold",italic:"Italic",underline:"Underline",format:"Format Block",font:"Font Name",size:"Font Size",color:"Text Color",background:"Fill Color",left:"Align Left",center:"Align Center",right:"Align Right",outdent:"Indent Less",indent:"Indent More",ul:"Insert unordered list",ol:"Insert ordered list",image:"Insert image",link:"Insert link",html:"View source",clean:"Remove Formatting",Remove:"Remove",Ok:"Ok",Cancel:"Cancel",Change:"Change","Go to link":"Go to link","Open in a new window/tab":"Open in a new window/tab",Align:"Align",VSpace:"VSpace",HSpace:"HSpace",Width:"Width",Height:"Height",Title:"Title",URL:"URL","Insert Image":"Insert Image","Insert Link":"Insert Link","Alt Text":"Alt Text","not set":"<not set>",Left:"Left",Right:"Right",Paragraph:"Paragraph",Header:"Header",Arial:"Arial","Comic Sans MS":"Comic Sans MS","Courier New":"Courier New",Georgia:"Georgia",Impact:"Impact","Lucida Console":"Lucida Console",Tahoma:"Tahoma","Times New Roman":"Times New Roman","Trebuchet MS":"Trebuchet MS",Verdana:"Verdana"},localization:null,tools:"bold italic underline | format font size | color background | left center right | outdent indent | ul ol | image | link | clean | html",readOnly:!1,stylesheets:new Array,rtl:!1,colorPickerTemplate:'
',touchMode:!1,keyPressed:null,events:["change"]};return this===x.jqx._jqxEditor.prototype||(x.extend(!0,this,e),this.localization=this.defaultLocalization),e},createInstance:function(e){var n=this;n.textArea=n.host;var t=n.host.attr("contenteditable");if(n.host.addClass(n.toThemeProperty("jqx-widget")),1==t||"true"==t){n.inline=!0,n.widget=n.host,n.editorDocument=document,n.selection=new d(n.editorDocument);t=x("");t.insertBefore(n.host),n.toolbarContainer=t,n.toolbar=t.find(".jqx-editor-toolbar"),n.editor=n.host,n.contentEditableElement=n.element}else{var r=x("
");n.widget=r,n.widget[0].className=n.widget[0].className+" "+n.element.className;try{n.widget[0].style=n.element.style}catch(e){}var a=x.trim(n.host.html())+"";"default"==n.lineBreak||"div"==n.lineBreak?a="
"+a+"
":"p"==n.lineBreak&&(a="
"+a+"
"),a=(a=a.replace(/</gi,"<")).replace(/>/gi,">"),n.host.css("display","none"),n.host.after(r),r.find("iframe").after(n.host),n.container=r.find(".jqx-editor-container"),n.toolbarContainer=r.find(".jqx-editor-toolbar-container"),n.toolbar=r.find(".jqx-editor-toolbar"),n.iframe=r.find("iframe"),n.content=r.find(".jqx-editor-content");var l=function(){n.editorDocument=n.iframe[0].contentWindow.document,n.selection=new d(n.editorDocument);var e=0;n.addHandler(n.iframe,"load",function(){1<++e&&(n.iframe.off("load"),n.content.find("iframe").remove(),x("
").appendTo(n.content),n.iframe=r.find("iframe"),l())}),x.jqx.browser.mozilla||(n.editorDocument.designMode="On"),n.editorDocument.open();var t,o=n.rtl?"direction:rtl;":"",i=x.jqx.browser.msie?"::selection{color: #fff; background: #328EFD;};::-moz-selection{color: #fff; background: #328eD;};::selection:window-inactive {background: #c7c7c7; color: #000;}::-moz-selection:window-inactive {background: #c7c7c7; color: #000;}html{font-size:13px; height:100%;}body{padding-top:1px;margin-top:-1px; padding-right: 1px; overflow-x: hidden;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;":"";n.editorDocument.write("
"+x.map(n.stylesheets,function(e){return"
"}).join("")+""),n.contentEditableElement=n.editorDocument.body,n.host.is("textarea")?(n._textArea=n.element,(t=n.host.data()).jqxEditor.host=r,t.jqxEditor.element=r[0],n.element=r[0],r[0].id=n._textArea.id,n._textArea.id=n._textArea.id+"TextArea",x(n.element).addClass(n.toThemeProperty("jqx-widget"))):((t=n.host.data()).jqxEditor.host=r,t.jqxEditor.element=r[0],n.element=r[0]),n.host=x(n.element),n.host.data(t);try{n.editorDocument.execCommand("useCSS",!1,!1),n.editorDocument.execCommand("enableInlineTableEditing",null,!1)}catch(e){}try{n.editorDocument.execCommand("styleWithCSS",0,!0)}catch(e){}n.editorDocument.close(),n.editor=x(n.editorDocument.body),n.editor.html(a).attr("spellcheck",!1).attr("autocorrect","off")};l(),x.jqx.utilities.resize(n.host,function(){n.widget.css("width",n.width),n.widget.css("height",n.height),n._arrange()})}},focus:function(){var e=this;x.jqx.browser.mozilla&&(e.focused||(e.iframe&&e.iframe.focus(),e.selection.selectNode(e.editor[0].firstChild,!0),e.selection.getRange().collapse(!0))),e.editor.focus();var t=null!=e.range?e.range:e.getRange();e.selectRange(t)},print:function(){var e=window.open("","_blank","width=450,height=470,left=400,top=100,menubar=yes,toolbar=no,location=no,scrollbars=yes");e.document.open(),e.document.write('
Print'+this.val()+""),e.document.close()},refresh:function(e){var v=this;x.each(this.defaultLocalization,function(e,t){v.localization[e]||(v.localization[e]=t)}),v._removeHandlers(),v.toolbar.addClass(v.toThemeProperty("jqx-widget-header")),v.content?(v.widget.css("width",v.width),v.widget.css("height",v.height),v.widget.addClass(v.toThemeProperty("jqx-editor")),v.widget.addClass(v.toThemeProperty("jqx-widget")),v.widget.addClass(v.toThemeProperty("jqx-rc-all")),v.widget.addClass(v.toThemeProperty("jqx-widget-header")),v.content.addClass(v.toThemeProperty("jqx-widget-content")),v.container.addClass(v.toThemeProperty("jqx-editor-container"))):(v.toolbarContainer.addClass(v.toThemeProperty("jqx-widget-header")),v.toolbarContainer.addClass(v.toThemeProperty("jqx-editor-toolbar-inline")),v.toolbarContainer.addClass(v.toThemeProperty("jqx-widget")),v.toolbarContainer.addClass(v.toThemeProperty("jqx-rc-all")),v.toolbarContainer.hide(),v.toolbarContainer.css("position","absolute"),v.editor.addClass(v.toThemeProperty("jqx-editor-inline")),v.toolbarContainer.css("width",v.host.outerWidth()+"px"));var t=v.toolbarContainer.index();if("top"==v.toolbarPosition&&0!=t||"bottom"==v.toolbarPosition&&1!=t)switch(v.toolbarPosition){case"bottom":v.toolbarContainer.insertAfter(v.content);break;case"top":default:v.toolbarContainer.insertBefore(v.content)}t=v.tools;if(!1!==t){function o(f,b){x.each(b,function(e,t){var d=v.commands[this];if(d)v.createCommand&&(r=v.createCommand(this.toString()),d=x.extend(d,r));else{if(!v.createCommand)return!0;if(!(d=v.createCommand(this.toString())))return!0;v.commands[this]||(v.commands[this]=d)}switch(v.localization[this]&&(d.tooltip=v.localization[this]),d.type){case"list":d.widget&&d.widget.jqxDropDownList("destroy");var o="formatblock"==d.command||"fontname"==d.command||"fontsize"==d.command,i=d.value||[],n=new Array,r=d.placeHolder||"Please Choose:";"fontname"==d.command?x.each(i,function(){var e=v.localization[this.label];n.push({label:e,value:this.value})}):"formatblock"==d.command?(r=v.localization.format,x.each(i,function(){var e;e=0<=this.label.indexOf("Header")?this.label.replace("Header",v.localization.Header):v.localization[this.label],n.push({label:e,value:this.value})})):n=i;r={enableBrowserBoundsDetection:!0,touchMode:v.touchMode,width:d.width||100,height:d.height||25,dropDownWidth:d.dropDownWidth||"auto",autoDropDownHeight:(d.value&&d.value.length)<12,placeHolder:r,source:n,theme:v.theme,hint:!1,keyboardSelection:!1,focusable:!1,disabled:v.disabled,rtl:v.rtl,selectionRenderer:"fontsize"==d.command?function(){return"
"}:null,renderer:o?function(e,t,o){return"formatblock"==d.command?"<"+o+' unselectable="on" style="padding: 0px; margin: 0px;">'+t+""+o+">":"fontname"==d.command?'
'+t+"":"fontsize"==d.command?''+t+"":void 0}:null},o="jqx-disableselect "+v.toThemeProperty("jqx-editor-dropdownlist")+" "+v.toThemeProperty("jqx-editor-toolbar-item");(m=x("")).appendTo(f),m.jqxDropDownList(r),d.init&&d.init(m);var t=null,a=null,l="";v.addHandler(m,"mousedown",function(e){var t;0 ').attr("id","picker-"+d.command),o="jqx-disableselect "+v.toThemeProperty("jqx-editor-dropdownpicker")+" "+v.toThemeProperty("jqx-editor-toolbar-item");(m=x("")).appendTo(f),m.append(s),m.jqxDropDownButton({hint:!1,touchMode:v.touchMode,disabled:v.disabled,enableBrowserBoundsDetection:!0,width:d.width||45,height:d.height||25,rtl:v.rtl,focusable:!1,theme:v.theme});var c=x(''),u=v.toThemeProperty("jqx-editor-toolbar-icon")+" "+v.toThemeProperty("jqx-editor-toolbar-icon-"+d.command),g=x("
");c.append(g);var p=x('
').attr("id","bar-"+d.command).css("background-color",d.value);c.append(p),m.jqxDropDownButton("setContent",c),s.append(x(v.colorPickerTemplate)),d.colorPicker=s,d.init&&d.init(m),s.find("tr").attr("role","row").attr("unselectable","on"),s.find("td").attr("role","gridcell").attr("unselectable","on").css("-webkit-user-select","none"),s.find("div").attr("unselectable","on"),v.addHandler(m,"mousedown",function(e){var t;0
"),m=x("
").addClass("jqx-disableselect").addClass(v.toThemeProperty("jqx-editor-toolbar-button"));(!d.init||p)&&m.append(g),m.appendTo(f),"button"==d.type?m.jqxButton({disabled:v.disabled,rtl:v.rtl,theme:v.theme}):"toggleButton"==d.type&&m.jqxToggleButton({disabled:v.disabled,rtl:v.rtl,uiToggle:!1,theme:v.theme}),d.init&&d.init(m),d.toggled=!1,d.toggle=function(){d.toggled=!d.toggled},v.addHandler(m,"mousedown",function(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}),x.jqx.mobile.isTouchDevice()?v._addCommandHandler(m,"mousedown",p,c,d):v._addCommandHandler(m,"click",p,c,d)}if(d.widget=m){try{""!=d.tooltip&&(d.widget.attr("title",d.tooltip),d.widget.attr("data-tooltip",d.tooltip)),d.command&&d.widget.attr("data-command",d.command),d.widget.attr("aria-label",d.tooltip)}catch(e){}"button"!=d.type&&"toggleButton"!=d.type||(2
");a.addClass(v.toThemeProperty("jqx-rc-all")),v.toolbar.append(a),o(a,i)}for(var l=v.toolbar.find(".jqx-editor-toolbar-group"),d=l.length,r=0;r"==d.editorDocument.body.innerHTML&&"br"!=d.lineBreak&&d.selection.insertContent(""),"div"==d.lineBreak?r==d.editorDocument.body?x(r).append("
"):x("
").insertAfter(r):"p"==d.lineBreak?r==d.editorDocument.body?x(r).append("
"):x("
").insertAfter(r):d.execute("insertHTML","
"),d.selectRange(o);n=x(d.editorDocument).find("#INSERTION_MARKER");return"br"!=d.lineBreak?d.selection.selectNode(x(n).prev()[0],!0):(d.selection.selectNode(n[0],!0),d.getRange().setStartAfter&&d.getRange().setStartAfter(n[0])),n.remove(),d.selection.collapse(!1),r&&r.nodeName&&"br"==d.lineBreak&&"#text"!=r.nodeName.toLowerCase()&&(d.selection.selectNode(r,!0),d.getRange().setStartAfter&&d.getRange().setStartAfter(r),d.selection.collapse(!1)),"br"!=d.lineBreak&&(o=d.getRange()).select&&o.select(),e.preventDefault&&e.preventDefault(),!1}}if(t.ctrlKey&&("k"==i||"u"==i||"b"==i||"i"==i)){e.preventDefault&&e.preventDefault();e=null;switch(i){case"k":e="link";break;case"u":e="underline";break;case"b":e="bold";break;case"i":e="italic"}return d.commands[e].widget&&d.commands[e].widget.trigger("click"),!1}}),d.addHandler(d.editor,"paste.editor"+d.element.id,function(e){if("source"==d._documentMode)return!0;if(d.readOnly)return!0;d.updating=!0,d.readOnly=!0;try{var l=d.getRange();"text"!=d.pasteMode||x.jqx.browser.mozilla?d.selection.insertContent('
'):d.selection.insertContent('');var t,o=x(window).scrollTop(),i=x(d.editorDocument).find(".jqx-editor-paste-element");i.css("top",o+"px"),d.editor[0].createTextRange?(e.preventDefault(),(t=d.editor[0].createTextRange()).moveToElementText(i[0]),t.execCommand("Paste")):((t=d.editorDocument.createRange()).selectNodeContents(i[0]),d.selectRange(t)),"text"!=d.pasteMode||x.jqx.browser.mozilla||i.select(),d.marker=i,setTimeout(function(){d.selectRange(l);function e(e){var t=d.editorDocument.createElement("div"),o=d.editorDocument.createDocumentFragment();for(t.innerHTML=e;t.firstChild;)o.appendChild(t.firstChild);return o}if("text"!=d.pasteMode){var t=e(d.marker.html());if(t.firstChild&&"jqx-editor-paste-element"===t.firstChild.className){for(var o=[],i=0,n=t.childNodes.length;i"))}var r=document.createElement("div");r.appendChild(t.cloneNode(!0));var a=r.innerHTML}else{a=d.marker.val();""!=d.marker.html()&&-1==d.marker.val().indexOf("\n")&&(a=(a=(a=(a=(a=(a=d.marker.html()).replace(/ /gm,"")).replace(/\n\n/gm,"\n")).replace(/
]*>/gi,"\n")).replace(/]*>/gi,"\n")).replace(/]*>/gi,"\n"),d.marker.html(a),a=d.marker.text())}r=a,a="text"==d.pasteMode,r=r=a?d.paragraphise?(r=(r="
"+r+"
").replace(/\n/g,"")).replace(/
\s<\/p>/gi,""):r.replace(/\n/g,"
"):((r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/]*?>(.*)/gim,"$1")).replace(/<\/html>/gi,"")).replace(/
]*?>(.*)/gi,"$1")).replace(/<\/body>/gi,"")).replace(/