var cw=I.ea(bw,"AdfDhtmlRichTextCKEditorPeer",!1);m("AdfDhtmlRichTextCKEditorPeer",cw);window.Qsb=q.b.fP()+A.c.ml("/afr/3rdparty/ckeditor/4.18.0/");cw.Gqb=void 0;m("AdfDhtmlRichTextCKEditorPeer.initInline",cw.Gqb);cw.C=function(){bw.C.call(this);I.sb(this,"editMode");this.Fl()};m("AdfDhtmlRichTextCKEditorPeer.InitSubclass",cw.C);
cw.Fl=function(){bw.Fl.call(this);this.lYa="ckinit";this.Jt={font:{name:"font",items:["Font","FontSize"]},history:{name:"clipboard",items:["Undo","Redo","RemoveFormat"]},mode:{name:"mode",items:["Source"]},color:{name:"mode",items:["TextColor","BGColor"]},formatAll:{name:"basicstyles",items:"Bold Italic Underline - Subscript Superscript Strike".split(" ")},formatCommon:{name:"basicstyles",items:["Bold","Italic","Underline"]},formatUncommon:{name:"basicstyles",items:["Subscript","Superscript","Strike"]},
justify:{name:"justify",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"]},list:{name:"list",items:["NumberedList","BulletedList"]},indent:{name:"indent",items:["Outdent","Indent"]},link:{name:"link",items:["Link","Unlink"]},newline:"/",extra:{name:"extra",items:"Find Replace CopyFormatting Styles Format Cut Copy Paste PasteText PasteFromWord".split(" ")}};this.jAa=1;this.iAa=2;this.kAa=3;this.r0a="Arial/Arial,Helvetica,sans-serif;Courier New/Courier New,Courier,Monaco,monospace;Comic Sans/Comic Sans MS,Comic Sans,cursive;Georgia/Georgia,Hoefler Text,Times New Roman,Times,serif;Helvetica/Helvetica,Arial,sans-serif;Impact/Impact,sans-serif;Tahoma/Tahoma,Verdana,sans-serif;Times New Roman/Times New Roman,Times,serif";
this.s0a="1/x-small;2/small;3/medium;4/large;5/x-large;6/xx-large;7/400%";this.g0a="a abbr acronym address area b basefont bdo big blockquote br caption center cite code col colgroup dd del dfn dir div dl dt em fieldset font h1 h2 h3 h4 h5 h6 hr i iframe ins kbd legend li map menu ol p param pre q s samp small span strike strong style sup sub table tbody td tfoot th thead tr tt u ul var ; img[!src]";this.LAa="2";this.gAa="cke_reset_all";this.fAa="cke_button";this.hAa="cke_toolbar";this.cDa="no_reset_all";
this.zXa="_afrToolbox";this.Cda="_tbr_";this.s3a="none"};m("AdfDhtmlRichTextCKEditorPeer.InitConstants",cw.Fl);cw.prototype.Init=function(a){cw.h.Init.call(this,a)};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.Init",{Init:cw.prototype.Init});cw.prototype.G=function(a,b){a.getReadOnly()||A.c.lv(a);cw.h.G.call(this,a,b);this.$d=q.b.Dd();if(a.getReadOnly()){var d=dw(a);d.innerHTML=d.textContent}this.Rla=!1};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.InitDomElement",{G:cw.prototype.G});
cw.prototype.focus=function(a){u.assert(a);cw.dMa(a)||(cw.uNa(a)?(a.ig=null,ew(this,a)):null!=a.ig&&a.ig.focus())};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.focus",{focus:cw.prototype.focus});cw.prototype.je=function(a){return a.ig.getSelection().Xvb()};cw.prototype.getSelectionRange=cw.prototype.je;r.a("AdfDhtmlRichTextCKEditorPeer.prototype.getSelectionRange",{je:cw.prototype.je});cw.prototype.mI=function(){v.l.warning("Call to this method is not expected.")};
r.a("AdfDhtmlRichTextCKEditorPeer.prototype.setCodeEditingMode",{mI:cw.prototype.mI});cw.prototype.ko=function(a){return null!=a.ig?a.ig.getData():null};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.getCurrentContent",{ko:cw.prototype.ko});cw.prototype.lw=function(a){a.getEditMode()};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.HandleCodeEditingModeChange",{lw:cw.prototype.lw});
cw.prototype.Bj=function(){var a=this.f();if(null!=a.ig&&cw.Sgb(a))return v.l.fine("AdfDhtmlRichTextCKEditorPeer.GetReadyState: RTE loaded"),G.tt;v.l.fine("AdfDhtmlRichTextCKEditorPeer.GetReadyState: richTextEditor's onload has not yet fired");return G.ut};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.GetReadyState",{Bj:cw.prototype.Bj});
cw.prototype.Sa=function(a,b,d,e){a=this.f();cw.dMa(a)||(cw.uNa(a)?(this.f().ig=null,ew(this,this.f())):(a=a.o().Rp().getBoundingClientRect(),b=this.f().ig.vRa.GI.getBoundingClientRect(),d-=a.width-b.width,e-=a.height-b.height,this.f().ig.resize(d,e)))};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.ResizeNotify",{Sa:cw.prototype.Sa});
cw.prototype.Wa=function(a,b){if(this.$d&&this.Ll(a)&&null!=a.ig){var d=this.ko(a),e=this.Vc(a),e=q.b.zh(e,bf.NK),f=fw(0,a);e!=d&&void 0!==e&&f.value!=d&&this.Jj()}return a.getReadOnly()?O.da(a,b).innerHTML:this.Vc(a).value};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.GetSubmittedValue",{Wa:cw.prototype.Wa});cw.prototype.mK=function(a,b){this.Vc(a).value=b;a.ig.setData(b)};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.SetContentFieldValue",{mK:cw.prototype.mK});
cw.prototype.fJ=function(a){null!=a.ig&&(a.ZW&&a.yG.removeEventListener(Xb.Hl,a.ZW),a.ig.Jd())};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.DestroyEditor",{fJ:cw.prototype.fJ});cw.prototype.Ck=function(a,b){var d=this.i();a.getReadOnly()?d.scrollIntoView():a.ig.document.GI.firstElementChild.scrollIntoView();b&&a.ig.focus()};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.ScrollIntoView",{Ck:cw.prototype.Ck});cw.prototype.Jj=function(){var a=this.f(),b=this.ko(a);this.Vc(a).value=b};
r.a("AdfDhtmlRichTextCKEditorPeer.prototype.UpdateValue",{Jj:cw.prototype.Jj});cw.prototype.Cwa=function(a){a.getEditMode()!=a.ig.mode&&a.ig.setMode(a.getEditMode())};r.a("AdfDhtmlRichTextCKEditorPeer.prototype.ComponentEditModeChanged",{Cwa:cw.prototype.Cwa});
function ew(a,b){if(!b.getReadOnly()){var d=b.getRows(),d=null==d||void 0==d?"100%":""+1.4*d+"em",e=b.getColumns(),e=null==e||void 0==e?"100%":""+e/2+"em",f=I.j(b.g(),cw.y2);b.jU=cw.jAa;var g=b.getExtraPlugins(),h="";null!=g&&0<g.length&&((h=g.reduce(function(a,b){return""==a?b:a+","+b},""),window.E_)?window.E_&&!window.F_.YGa&&(v.l.severe("Found another version of ckeditor library loaded in browser. Replacing it with ADF version."),window.F_.YGa=window.E_,window.E_=window.F_):(window.E_=window.F_,
window.F_.YGa="None"));g=b.getLabel();g||(g=b.getShortDesc())||(g=A.c.H().Z("af_richTextEditor.IFRAME_TITLE"));try{CKEDITOR4.Nvb.ctb.mvb=0;var l=CKEDITOR4.replace(f,{toolbar:gw(a,b),Pwb:b.getEditMode(),readOnly:b.getDisabled(),width:e,height:d,Fvb:"",Svb:cw.r0a,Rvb:"Tahoma",Qvb:cw.s0a,kvb:!1,jvb:!1,lvb:2147483646,Hvb:cw.g0a,Ivb:h,Pvb:cw.LAa,title:g,Qta:{cwb:function(a){hw(b.o(),b,a.I8)},focus:function(a){b.o().gV(a)},blur:function(a){b.o().tn(a)},mode:function(a){iw(b.o(),a)},resize:function(a){b.o().Lx(a)}}});
jw(a,l)}catch(n){v.l.severe("error in ckeditor initialization"),v.l.severe(n)}}}function kw(a){a.HIa||(a.HIa=[]);return a.HIa}function jw(a,b){for(var d=kw(a),e=0;e<d.length;e++)b.Gva.add(d[e],CKEDITOR4.atb,{toolbar:d[e]})}k=cw.prototype;k.gV=function(a){a=A.c.m(a.I8.Id);var b=a.o().Vc(a);q.b.tg(b,bf.NK,b.value);a.o().Uq()};k.tn=function(a){a=a.I8;var b=A.c.m(a.Id),d=fw(b.o(),b),e=b.o();if(d.value!=a.getData()||e.Rla)e.Rla=!0,e.Vc(b).value=a.getData(),e.cc(b)};
function iw(a,b){var d=b.I8,e=A.c.m(d.Id);null!=e&&(e.setProperty("editMode",d.mode),lw(e.o(),e));var f;"wysiwyg"==d.mode?f=d.document:d.vRa.hasListeners("keyup")||(f=d.vRa);f&&f.Qta("keyup",function(a){var b=A.c.m(d.Id);a=b.o().w8(b,a.data.GI);b.Hg(a)})}k.Lx=function(a){a=a.I8;var b=A.c.m(a.Id);mw(b.o(),b,a)};
function hw(a,b,d){d.Id=b.g();b.ig=d;sf.$().hI(b);var e=d.Gva.AVa(d.u8.JVa).GI;b.getDisabled()||0==d.toolbar.length?e.style.display="none":(e=e.getElementsByClassName("cke_combo__fontsize"))&&0<e.length&&(e=e[0].getElementsByClassName("cke_combo_inlinelabel cke_combo_text"))&&0<e.length&&(e[0].innerText=cw.LAa);"lazy"==b.getContentDelivery()?(e=document.createElement("iframe"),e.src=A.c.p9(b.g()),e.id="rteLazyFrame",e.style.display="none",e.onload=function(){v.l.info("loaded data for lazy Fetch mode");
d.setData(this.contentDocument.body.innerHTML);nw(b.o(),b,d.getData());this.parentNode.removeChild(this)},document.body.appendChild(e)):nw(b.o(),b,d.getData());1==C.vta(b)&&(b.yG=C.A9(b),b.ZW=function(){b.o().Qka();b.yG.removeEventListener(Xb.Hl,b.ZW);b.ZW=null},b.yG.addEventListener(Xb.Hl,b.ZW));lw(b.o(),b);0<kw(a).length&&ow(a,b,d);b.jU=cw.iAa}
function lw(a,b){var d=b.o().i(),e=window.getComputedStyle(d).getPropertyValue("font-size"),d=d.getElementsByTagName("iframe");null!=d&&0<d.length&&C.jm(d[0].contentDocument.body,"font-size:"+e,!0)}
function ow(a,b,d){var e=A.c.R(),f=d.Gva.AVa(d.u8.JVa);f&&f.GI.classList.remove(cw.gAa);var f=window.getComputedStyle(f.GI,null).getPropertyValue("width"),g=b.o().Rp(),h=b.g()+cw.Cda;a=kw(a);for(i=0;i<a.length;i++){var l=a[i].toLowerCase(),n=e.getElementById(h+l);n.classList.add(cw.fAa);n.style.maxWidth=f;n.style.overflow="hidden";for(var l=g.getElementsByClassName(cw.fAa+"__"+l)[0],t=l.parentElement;null!=t&&t!=g&&!t.classList.contains(cw.hAa);)t=t.parentElement;null!=t&&t.classList.add(cw.cDa);
l.parentElement.replaceChild(n,l)}f=g.getElementsByClassName(cw.hAa);for(i=0;i<f.length;i++)f[i].classList.contains(cw.cDa)||f[i].classList.add(cw.gAa);mw(b.o(),b,d);if(b=e.getElementById(b.g()+cw.zXa))b.style.display="none"}
function mw(a,b,d){d=d.Gva.AVa(d.u8.JVa);d=window.getComputedStyle(d.GI,null).getPropertyValue("width");var e=A.c.R();b=b.g()+cw.Cda;a=kw(a);for(i=0;i<a.length;i++){var f=e.getElementById(b+a[i].toLowerCase());f.style.maxWidth=d;30<f.offsetHeight&&(f.style.zoom=30/f.offsetHeight);A.c.m(f.id).Re()}}function nw(a,b,d){a.Vc(b).value=d;fw(0,b).value=d;a.Rla=!1}
function gw(a,b){if(a.VB)return a.VB;var d=b.getToolboxLayout();null==d&&(d="all");var e=b.g()+cw.Cda,f=A.c.R();a.VB=[];if(Array.isArray(d)){for(var g=!1,h=0;h<d.length;h++)if("formatAll"==d[h]){g=!0;break}for(h=0;h<d.length;h++){var l=d[h];if(!g||"formatCommon"!=l&&"formatUncommon"!=l)if("all"==l)for(var l=pw(),n=0;n<l.length;n++)a.VB.push(l[n]);else n=cw.Jt[l],null!=n?a.VB.push(n):qw(a,l,f,e)}}else l=cw.Jt[d],null!=l?a.VB.push(l):"all"==d?a.VB=pw():qw(a,l,f,e);return a.VB}
function qw(a,b,d,e){cw.s3a!=b&&(a.VB.push({name:b,items:[b]}),d.getElementById(e+b.toLowerCase())&&kw(a).push(b))}function pw(){var a=[];a.push(cw.Jt.font);a.push(cw.Jt.color);a.push(cw.Jt.formatCommon);a.push(cw.Jt.mode);a.push(cw.Jt.history);a.push(cw.Jt.justify);a.push(cw.Jt.list);a.push(cw.Jt.link);return a}function fw(a,b){var d=I.j(b.g(),cw.lYa),d=q.b.getElementById(d);u.u(d);return d}
k.ne=function(a,b){var d=q.b;u.J(a);var e=this.f(),f=e.ig;if(null==f)v.l.severe("Not executing command as ckeditor does not exists");else switch(a){case cw.iD:e=this.Vc(e);this.$d&&d.S()==q.Tc&&e.focus();f.bwb(b);break;case cw.G_:f.setMode("wysiwyg");break;case cw.rba:f.setMode("source");break;case cw.TI:f.execCommand("undo");break;case cw.RI:f.execCommand("redo");break;case cw.KQ:f.execCommand("link");break;case cw.sba:f.execCommand("unlink");break;case cw.qba:f.execCommand("removeFormat");break;
case cw.PR:f.execCommand("bold");break;case cw.RR:f.execCommand("italic");break;case cw.VR:f.execCommand("underline");break;case cw.SR:f.execCommand("strike");break;case cw.eda:f.execCommand("bulletedlist");break;case cw.dda:f.execCommand("numberedlist");break;case cw.K0:f.execCommand("indent");break;case cw.P0:f.execCommand("outdent");break;case cw.N0:f.execCommand("justifyleft");break;case cw.L0:f.execCommand("justifycenter");break;case cw.O0:f.execCommand("justifyright");break;case cw.M0:f.execCommand("justifyblock");
break;case cw.UR:f.execCommand("subscript");break;case cw.TR:f.execCommand("superscript");break;default:v.l.severe("unsupported command")}};k.Qka=function(){v.l.info("popup closed. Destroying CKEditor");this.gb&&(this.gb.ig.Jd(),this.gb.jU=cw.kAa)};k.Vc=function(a){a=I.j(a.g(),bw.y2);a=q.b.getElementById(a);u.u(a);return a};cw.Sgb=function(a){return a.jU==cw.iAa};cw.dMa=function(a){return a.jU==cw.jAa};cw.uNa=function(a){return null==a.ig||a.jU==cw.kAa};cw.prototype.EOa=function(){};