@richscripts/richtexteditor 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +422 -360
- package/package.json +2 -2
- package/richtexteditor/all_plugins.js +377 -343
- package/richtexteditor/all_plugins.min.js +2 -2
- package/richtexteditor/plugins/accessibilitychecker.js +7 -1
- package/richtexteditor/plugins/all_plugins.js +377 -343
- package/richtexteditor/plugins/all_plugins.min.js +2 -2
- package/richtexteditor/plugins/keyboarda11y.js +370 -342
- package/richtexteditor/rte.js +2 -2
- package/richtexteditor/rte_theme_default.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_a11yenhance=RTE_Plugin_A11yEnhance,typeof RTE_DefaultConfig.a11yEnhance>"u"&&(RTE_DefaultConfig.a11yEnhance=!0);function RTE_Plugin_A11yEnhance(){var E=this,c,n;E.PluginName="A11yEnhance",E.InitConfig=function(K){c=K},E.InitEditor=function(K){if(n=K,c.a11yEnhance!==!1){F();try{n.attachEvent("ready",F)}catch{}try{n.attachEvent("aftersethtml",F)}catch{}setTimeout(F,0),setTimeout(F,200),n.applyAccessibilityMetadata=F}};function S(){return c.contentAriaLabel||c.contentLabel||"Rich text editor. Editing area."}function M(){if(c.contentLang)return c.contentLang;try{var K=c.container&&c.container.ownerDocument&&c.container.ownerDocument.documentElement.getAttribute("lang");if(K)return K}catch{}try{var j=typeof document<"u"&&document.documentElement.getAttribute("lang");if(j)return j}catch{}return"en"}function F(){var K=n.getDocument();if(K){try{var j=M();j&&K.documentElement&&K.documentElement.getAttribute("lang")!==j&&K.documentElement.setAttribute("lang",j)}catch{}try{var o=K.defaultView&&K.defaultView.frameElement;o&&!o.getAttribute("title")&&o.setAttribute("title",S())}catch{}try{var N=n.getEditable();N&&N.nodeType===1&&(N.getAttribute("role")||N.setAttribute("role","textbox"),N.getAttribute("aria-multiline")||N.setAttribute("aria-multiline","true"),!N.getAttribute("aria-label")&&!N.getAttribute("aria-labelledby")&&N.setAttribute("aria-label",S()))}catch{}}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_accessibilitychecker=RTE_Plugin_AccessibilityChecker;function RTE_Plugin_AccessibilityChecker(){var E=this,c,n,S=null,M=null,F=null,K=null,j=null,o=0,N=null,U=-1;E.PluginName="AccessibilityChecker",E.InitConfig=function(V){c=V,c.accessibilityCheckerEnabled!==!1&&(typeof c.accessibilityCheckerAutoOpen!="boolean"&&(c.accessibilityCheckerAutoOpen=!1),c.accessibilityCheckerTitle=c.accessibilityCheckerTitle||"Accessibility",c.accessibilityCheckerHint=c.accessibilityCheckerHint||"Review heading structure, image alt text, and table headers without leaving the editor.",c.accessibilityCheckerEmptyText=c.accessibilityCheckerEmptyText||"No accessibility issues found in the current document.",$("toolbar_default","#{accessibilitychecker}"),$("toolbar_full","#{accessibilitychecker}"))},E.InitEditor=function(V){n=V,c.accessibilityCheckerEnabled!==!1&&(n.accessibilityChecker={close:function(){D()},getIssues:function(){return N?N.issues.slice():[]},open:function(){m()},refresh:function(){return L()},repair:function(Y,Q){return l(Y,Q)},run:function(){return L()},toggle:function(){x()}},W(),n.toolbarFactoryMap=n.toolbarFactoryMap||{},n.toolbarFactoryMap.accessibilitychecker=function(Y){return n.createToolbarButton(Y)},n.attachEvent("exec_command_accessibilitychecker",function(Y){Y.returnValue=!0,Y.stopBubble=!0,x()}),n.attachEvent("change",function(){G()}),q(),L(),c.accessibilityCheckerAutoOpen&&m())};function $(V,Y){c[V]&&c[V].indexOf(Y)===-1&&(c[V]=c[V]+Y)}function W(){var V=c.container.ownerDocument;if(!V.getElementById("rte-accessibility-checker-style")){var Y=V.createElement("style");Y.id="rte-accessibility-checker-style",Y.innerHTML=[".rte-a11y-shell{display:flex;align-items:stretch;gap:10px;}",".rte-a11y-shell>.rte-a11y-host{flex:1 1 auto;min-width:0;}","/* 2026-07-12 accessibility panel precision */",".rte-a11y-panel{display:none;flex:0 0 310px;min-width:270px;max-width:min(360px,32vw);border:1px solid rgba(148,163,184,.22);border-radius:8px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));box-shadow:0 14px 32px rgba(29,78,216,.1),0 2px 8px rgba(15,23,42,.06);overflow:hidden;color:#172033;font-family:Aptos,'Segoe UI',sans-serif;}",".rte-a11y-shell.is-open>.rte-a11y-panel{display:flex;flex-direction:column;}",".rte-a11y-header{padding:12px 12px 9px 14px;border-bottom:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.72);}",".rte-a11y-kicker{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-a11y-title{margin-top:3px;font-size:15px;line-height:1.2;font-weight:850;color:#172033;}",".rte-a11y-copy{margin-top:5px;font-size:12px;line-height:1.42;color:#52657e;}",".rte-a11y-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 8px 14px;border-bottom:1px solid rgba(148,163,184,.16);gap:10px;background:rgba(255,255,255,.52);}",".rte-a11y-count{min-width:0;font-size:12px;font-weight:750;color:#52657e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}",".rte-a11y-actions{display:flex;align-items:center;gap:6px;}",".rte-a11y-link{appearance:none;border:1px solid rgba(100,116,139,.18);background:#fff;color:#315277;cursor:pointer;font-size:12px;font-weight:750;padding:6px 9px;border-radius:7px;line-height:1;}",".rte-a11y-link:hover,.rte-a11y-link:focus-visible{background:#eef4ff;color:#0f3f9f;border-color:rgba(37,99,235,.28);}",".rte-a11y-body{padding:6px;overflow:auto;min-height:160px;max-height:560px;display:flex;flex-direction:column;gap:8px;scrollbar-width:thin;}",".rte-a11y-list{display:flex;flex-direction:column;gap:6px;}",".rte-a11y-item{appearance:none;width:100%;text-align:left;border:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.84);cursor:pointer;border-radius:8px;padding:10px;box-shadow:0 6px 14px rgba(15,23,42,.04);transition:background 160ms ease,box-shadow 160ms ease,transform 160ms ease;}",".rte-a11y-item:hover,.rte-a11y-item:focus-visible{background:#f8fbff;border-color:rgba(37,99,235,.24);}",".rte-a11y-item.is-active{border-color:rgba(37,99,235,.36);background:#eef4ff;box-shadow:0 12px 28px rgba(37,99,235,.14);transform:translateY(-1px);}",".rte-a11y-item-top{display:flex;align-items:center;justify-content:space-between;gap:10px;}",".rte-a11y-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;line-height:1;font-weight:850;letter-spacing:.08em;text-transform:uppercase;}",".rte-a11y-badge-warning{background:#fff8e8;color:#92400e;border:1px solid rgba(245,158,11,.18);}",".rte-a11y-badge-error{background:#fff1f2;color:#9f1239;border:1px solid rgba(159,18,57,.18);}",".rte-a11y-code{font-size:11px;color:#64748b;font-family:Consolas,'Cascadia Mono',monospace;}",".rte-a11y-message{margin-top:7px;font-size:13px;line-height:1.42;color:#172033;}",".rte-a11y-detail{border:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.86);border-radius:8px;padding:11px;display:flex;flex-direction:column;gap:9px;box-shadow:0 6px 14px rgba(15,23,42,.04);}",".rte-a11y-detail-title{font-size:13px;font-weight:850;color:#172033;}",".rte-a11y-detail-copy{font-size:12px;line-height:1.45;color:#52657e;}",".rte-a11y-field{display:flex;flex-direction:column;gap:6px;}",".rte-a11y-label{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-a11y-input{width:100%;border:1px solid rgba(148,163,184,.24);border-radius:7px;padding:9px 10px;font-size:13px;line-height:1.4;box-sizing:border-box;background:#fff;}",".rte-a11y-input:focus{outline:2px solid rgba(37,99,235,.18);border-color:rgba(37,99,235,.38);}",".rte-a11y-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}",".rte-a11y-button{appearance:none;border:1px solid #1d67ba;border-radius:7px;background:#1d67ba;color:#fff;padding:8px 12px;font-size:12px;font-weight:750;cursor:pointer;box-shadow:0 6px 14px rgba(29,103,186,.16);}",".rte-a11y-button-secondary{background:#fff;color:#315277;border-color:rgba(100,116,139,.18);box-shadow:none;}",".rte-a11y-button:hover,.rte-a11y-button:focus-visible{transform:translateY(-1px);}",".rte-a11y-empty{padding:14px;border-radius:8px;background:#fff;color:#52657e;font-size:13px;font-weight:700;line-height:1.55;border:1px dashed rgba(148,163,184,.34);}","@media (max-width: 1420px){.rte-a11y-shell{display:block;}.rte-a11y-panel{margin-top:12px;max-width:none;width:100%;}.rte-a11y-body{max-height:360px;}}"].join(""),V.head.appendChild(Y)}}function q(){if(S)return S;var V=c.container,Y=V.ownerDocument;S=Y.createElement("div"),S.className="rte-a11y-shell";var Q=Y.createElement("div");Q.className="rte-a11y-host";var te=V.parentNode;te.insertBefore(S,V),S.appendChild(Q),Q.appendChild(V),M=Y.createElement("aside"),M.className="rte-a11y-panel",M.setAttribute("aria-label",c.accessibilityCheckerTitle),M.setAttribute("role","complementary");var Z=Y.createElement("div");Z.className="rte-a11y-header",Z.innerHTML='<div class="rte-a11y-kicker">Accessibility</div><div class="rte-a11y-title"></div><div class="rte-a11y-copy"></div>',Z.querySelector(".rte-a11y-title").innerText=c.accessibilityCheckerTitle,Z.querySelector(".rte-a11y-copy").innerText=c.accessibilityCheckerHint;var le=Y.createElement("div");le.className="rte-a11y-toolbar",le.innerHTML='<div class="rte-a11y-count" data-rte-a11y-count="1"></div><div class="rte-a11y-actions"><button type="button" class="rte-a11y-link" data-rte-a11y-refresh="1">Refresh</button><button type="button" class="rte-a11y-link" data-rte-a11y-close="1" aria-label="Hide accessibility checker">Hide</button></div>',le.querySelector("[data-rte-a11y-refresh]").onclick=function(){L()},le.querySelector("[data-rte-a11y-close]").onclick=function(){D()};var ne=Y.createElement("div");return ne.className="rte-a11y-body",F=Y.createElement("div"),F.className="rte-a11y-list",K=Y.createElement("div"),K.className="rte-a11y-empty",K.innerText=c.accessibilityCheckerEmptyText,j=Y.createElement("div"),j.className="rte-a11y-detail",ne.appendChild(F),ne.appendChild(K),ne.appendChild(j),M.appendChild(Z),M.appendChild(le),M.appendChild(ne),S.appendChild(M),S}function x(){S&&S.classList.contains("is-open")?D():m()}function m(){q(),S.classList.add("is-open"),b(),I()}function D(){S&&(S.classList.remove("is-open"),I())}function I(){var V=function(){try{n&&typeof n.fireEvent=="function"&&n.fireEvent("resize")}catch{}try{n&&typeof n.updateLayout=="function"&&n.updateLayout()}catch{}try{var Q=c.container.ownerDocument,te=Q.defaultView||window;te.dispatchEvent(new te.Event("resize"))}catch{}};V();var Y=typeof requestAnimationFrame=="function"?requestAnimationFrame:function(Q){return setTimeout(Q,16)};Y(V)}function G(){clearTimeout(o),o=setTimeout(function(){L()},120)}function L(){q();var V=window.RichTextEditor,Y=n.getJSON?n.getJSON():null;return N=V&&typeof V.auditAccessibility=="function"?V.auditAccessibility(Y):k(),N.issues.length?(U<0||U>=N.issues.length)&&(U=0):U=-1,b(),N}function l(V,Y){if(!N||!N.issues||!N.issues[V])return L();var Q=window.RichTextEditor,te=N.issues[V];if(te._target||N.source==="dom")return y(te,Y||{});if(!Q||typeof Q.repairAccessibilityIssue!="function")return y(te,Y||{});var Z=Q.repairAccessibilityIssue(n.getJSON(),N.issues[V],Y||{});return n.setJSON(Z),U=V,L()}function s(V){if(V){if(V._target&&typeof V._target.scrollIntoView=="function"){V._target.scrollIntoView({behavior:"smooth",block:"center"}),n.focus();return}var Y=n.getEditable?n.getEditable():null;if(Y){var Q=/^content\[(\d+)\]/.exec(V.path||"");if(Q){for(var te=parseInt(Q[1],10),Z=[],le=0;le<Y.childNodes.length;le++)Y.childNodes[le]&&Y.childNodes[le].nodeType===1&&Z.push(Y.childNodes[le]);var ne=Z[te];ne&&typeof ne.scrollIntoView=="function"&&ne.scrollIntoView({behavior:"smooth",block:"center"}),n.focus()}}}}var C=[{name:"Hebrew",lang:"he",re:/[-]/g},{name:"Arabic",lang:"ar",re:/[-ۿݐ-ݿﭐ-﷿ﹰ-]/g},{name:"Greek",lang:"el",re:/[Ͱ-Ͽἀ-]/g},{name:"Cyrillic",lang:"ru",re:/[Ѐ-ӿ]/g},{name:"Han",lang:"zh",re:/[㐀-䶿一-鿿]/g},{name:"Kana",lang:"ja",re:/[-ゟ゠-ヿ]/g},{name:"Hangul",lang:"ko",re:/[가-ᄀ-ᇿ]/g},{name:"Devanagari",lang:"hi",re:/[ऀ-ॿ]/g},{name:"Thai",lang:"th",re:/[-]/g},{name:"Latin",lang:"en",re:/[A-Za-zÀ-ɏ]/g}],p=4;function u(V){for(var Y=[],Q=0;Q<C.length;Q++){var te=String(V).match(C[Q].re);te&&te.length>=p&&Y.push(C[Q])}return Y}function f(){var V=n.getEditable?n.getEditable():null,Y=V&&V.getAttribute("lang")||typeof document<"u"&&document.documentElement.getAttribute("lang")||"en";Y=String(Y).toLowerCase().split("-")[0];for(var Q=0;Q<C.length;Q++)if(C[Q].lang===Y)return C[Q];return C[C.length-1]}function T(V,Y){for(var Q=V&&V.nodeType===3?V.parentNode:V;Q&&Q!==Y&&Q.nodeType===1;){if(Q.hasAttribute&&Q.hasAttribute("lang"))return!0;Q=Q.parentNode}return!1}function w(V,Y,Q,te){var Z=f(),le=V.ownerDocument;if(!(!le||!le.createTreeWalker))for(var ne=le.createTreeWalker(V,4,null,!1),J,oe={};J=ne.nextNode();){var z=J.nodeValue||"";if(z.replace(/\s+/g,"")&&!T(J,Y))for(var ee=u(z),se=0;se<ee.length;se++){var ae=ee[se];ae!==Z&&(oe[ae.name]||(oe[ae.name]=!0,te.push({code:"language-of-parts",severity:"warning",message:ae.name+" text is not marked with a language. Select the phrase and set its language so assistive technology pronounces it correctly (WCAG 3.1.2).",path:Q+".lang",_target:V,_lang:ae.lang,_script:ae.name})))}}}function k(){var V=n.getEditable?n.getEditable():null,Y=[];if(!V)return{document:null,issues:Y,valid:!0,source:"dom"};for(var Q=[],te=0;te<V.childNodes.length;te++){var Z=V.childNodes[te];!Z||Z.nodeType!==1||Q.push(Z)}for(var le=0,ne=0;ne<Q.length;ne++){var J=Q[ne],oe=String(J.nodeName||"").toLowerCase(),z="content["+ne+"]";if(/^h[1-6]$/.test(oe)){var ee=parseInt(oe.substring(1),10),se=d(J);se||Y.push({code:"heading-empty",severity:"warning",message:"Heading is empty. Add a concise label or remove the heading.",path:z,_target:J}),le&&ee>le+1&&Y.push({code:"heading-level-skip",severity:"warning",message:"Heading jumps from H"+le+" to H"+ee+". Use the next heading level for a clearer outline.",path:z+".attrs.level",_target:J}),se&&(le=ee)}for(var ae=J.querySelectorAll?J.querySelectorAll("img"):[],fe=0;fe<ae.length;fe++){var Se=ae[fe];String(Se.getAttribute("alt")||"").replace(/^\s+|\s+$/g,"")||Y.push({code:"image-missing-alt",severity:"error",message:"Image is missing alt text. Describe the image or mark it decorative in your content workflow.",path:z+".image["+fe+"]",_target:Se})}for(var ye=oe==="table"?[J]:J.querySelectorAll?J.querySelectorAll("table"):[],me=0;me<ye.length;me++){var de=ye[me];de.querySelector("th")||Y.push({code:"table-missing-header",severity:"warning",message:"Table has no header cells. Promote the first row to headers when it describes the columns.",path:z+".table["+me+"]",_target:de})}w(J,V,z,Y)}return{document:null,issues:Y,valid:!Y.length,source:"dom"}}function y(V,Y){if(!V||!V._target)return L();var Q=V._target;if(V.code==="image-missing-alt")Q.setAttribute("alt",String(Y.altText||"").replace(/^\s+|\s+$/g,""));else if(V.code==="heading-empty")Q.textContent=String(Y.headingText||"").replace(/^\s+|\s+$/g,"");else if(V.code==="heading-level-skip"){for(var te=Math.max(1,Math.min(6,parseInt(Y.targetLevel,10)||2)),Z=Q.ownerDocument.createElement("h"+te);Q.firstChild;)Z.appendChild(Q.firstChild);A(Q,Z),Q.parentNode.replaceChild(Z,Q)}else V.code==="table-missing-header"?R(Q):V.code==="language-of-parts"&&O(Q,Y&&Y.lang?Y.lang:V._lang,V._script);return U=0,g(),L()}function O(V,Y,Q){if(!(!V||!Y)){for(var te=null,Z=0;Z<C.length;Z++)C[Z].name===Q&&(te=C[Z]);if(te){for(var le=V.ownerDocument,ne=n.getEditable?n.getEditable():null,J=Y==="he"||Y==="ar"||Y==="fa"||Y==="ur",oe=le.createTreeWalker(V,4,null,!1),z=[],ee;ee=oe.nextNode();)T(ee,ne)||z.push(ee);for(var se=0;se<z.length;se++){for(var ae=z[se],fe=ae.nodeValue||"",Se=new RegExp("(?:"+te.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`+te.re.source+"(?:"+te.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`,"g"),ye=le.createDocumentFragment(),me=0,de,Le=!1;de=Se.exec(fe);){var be=de[0],Re=be.length-be.replace(/^[\s.,;:!?'"()‐-‧«»“”]+/,"").length,Ke=be.length-be.replace(/[\s.,;:!?'"()‐-‧«»“”]+$/,"").length,je=de.index+Re,Ye=de.index+be.length-Ke;if(!(Ye-je<p)){je>me&&ye.appendChild(le.createTextNode(fe.slice(me,je)));var Ge=le.createElement("span");Ge.setAttribute("lang",Y),J&&Ge.setAttribute("dir","rtl"),Ge.appendChild(le.createTextNode(fe.slice(je,Ye))),ye.appendChild(Ge),me=Ye,Le=!0,Se.lastIndex===de.index&&Se.lastIndex++}}Le&&(me<fe.length&&ye.appendChild(le.createTextNode(fe.slice(me))),ae.parentNode.replaceChild(ye,ae))}}}}function R(V){var Y=V&&V.rows&&V.rows.length?V.rows[0]:null;if(Y)for(var Q=V.ownerDocument,te=0;te<Y.cells.length;te++){var Z=Y.cells[te];if(!(!Z||String(Z.nodeName||"").toLowerCase()==="th")){for(var le=Q.createElement("th");Z.firstChild;)le.appendChild(Z.firstChild);A(Z,le),le.setAttribute("scope","col"),Y.replaceChild(le,Z)}}}function A(V,Y){if(!(!V||!Y||!V.attributes))for(var Q=0;Q<V.attributes.length;Q++){var te=V.attributes[Q];!te||!te.name||Y.setAttribute(te.name,te.value)}}function g(){try{n&&typeof n.fireEvent=="function"&&n.fireEvent("change")}catch{}try{n&&typeof n.fireEvent=="function"&&n.fireEvent("contentchange")}catch{}}function d(V){return String(V&&(V.innerText||V.textContent)||"").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}function b(){q();for(var V=N&&N.issues?N.issues:[];F.firstChild;)F.removeChild(F.firstChild);var Y=M.querySelector("[data-rte-a11y-count]");Y&&(Y.innerText=V.length?V.length+" issue"+(V.length===1?"":"s")+" to review":"Ready to publish"),K.style.display=V.length?"none":"block";for(var Q=0;Q<V.length;Q++)(function(te,Z){var le=M.ownerDocument.createElement("button");le.type="button",le.className="rte-a11y-item"+(Z===U?" is-active":""),le.setAttribute("aria-selected",Z===U?"true":"false"),le.innerHTML='<div class="rte-a11y-item-top"><span class="rte-a11y-badge rte-a11y-badge-'+te.severity+'">'+te.severity+'</span><span class="rte-a11y-code">'+te.code+'</span></div><div class="rte-a11y-message"></div>',le.querySelector(".rte-a11y-message").innerText=te.message,le.onclick=function(){U=Z,s(te),b()},F.appendChild(le)})(V[Q],Q);_()}function _(){for(;j.firstChild;)j.removeChild(j.firstChild);var V=N&&N.issues?N.issues:[];if(!V.length||U<0||!V[U]){j.innerHTML='<div class="rte-a11y-detail-title">No fixes pending</div><div class="rte-a11y-detail-copy">Run the checker again after major content changes to keep headings, image descriptions, and tables in shape.</div>';return}var Y=V[U],Q=j.ownerDocument.createElement("div");Q.className="rte-a11y-detail-title",Q.innerText=Y.code;var te=j.ownerDocument.createElement("div");if(te.className="rte-a11y-detail-copy",te.innerText=Y.message,j.appendChild(Q),j.appendChild(te),Y.code==="image-missing-alt"){P("Alt text","Describe the image for screen-reader users.",function(Se){l(U,{altText:Se})});return}if(Y.code==="heading-empty"){P("Heading text","Add a concise heading label before publishing.",function(Se){l(U,{headingText:Se})});return}if(Y.code==="heading-level-skip"){var Z=B(Y),le=j.ownerDocument.createElement("div");le.className="rte-a11y-row";var ne=j.ownerDocument.createElement("button");ne.type="button",ne.className="rte-a11y-button",ne.innerText="Normalize to H"+Z,ne.onclick=function(){l(U,{targetLevel:Z})};var J=j.ownerDocument.createElement("button");J.type="button",J.className="rte-a11y-button rte-a11y-button-secondary",J.innerText="Focus issue",J.onclick=function(){s(Y)},le.appendChild(ne),le.appendChild(J),j.appendChild(le);return}if(Y.code==="table-missing-header"){var oe=j.ownerDocument.createElement("div");oe.className="rte-a11y-row";var z=j.ownerDocument.createElement("button");z.type="button",z.className="rte-a11y-button",z.innerText="Promote first row to headers",z.onclick=function(){l(U,{})};var ee=j.ownerDocument.createElement("button");ee.type="button",ee.className="rte-a11y-button rte-a11y-button-secondary",ee.innerText="Focus issue",ee.onclick=function(){s(Y)},oe.appendChild(z),oe.appendChild(ee),j.appendChild(oe);return}if(Y.code==="language-of-parts"){var se=j.ownerDocument.createElement("div");se.className="rte-a11y-row";var ae=j.ownerDocument.createElement("button");ae.type="button",ae.className="rte-a11y-button",ae.innerText="Mark as "+Y._script,ae.onclick=function(){l(U,{lang:Y._lang})};var fe=j.ownerDocument.createElement("button");fe.type="button",fe.className="rte-a11y-button rte-a11y-button-secondary",fe.innerText="Focus issue",fe.onclick=function(){s(Y)},se.appendChild(ae),se.appendChild(fe),j.appendChild(se);return}j.innerHTML+='<div class="rte-a11y-detail-copy">This issue is visible here, but does not have an automatic repair action yet.</div>'}function P(V,Y,Q){var te=j.ownerDocument.createElement("div");te.className="rte-a11y-field";var Z=j.ownerDocument.createElement("div");Z.className="rte-a11y-label",Z.innerText=V;var le=j.ownerDocument.createElement("input");le.type="text",le.className="rte-a11y-input",le.placeholder=Y;var ne=j.ownerDocument.createElement("div");ne.className="rte-a11y-row";var J=j.ownerDocument.createElement("button");J.type="button",J.className="rte-a11y-button",J.innerText="Apply fix",J.onclick=function(){var z=String(le.value||"").replace(/^\s+|\s+$/g,"");z&&Q(z)};var oe=j.ownerDocument.createElement("button");oe.type="button",oe.className="rte-a11y-button rte-a11y-button-secondary",oe.innerText="Focus issue",oe.onclick=function(){var z=N&&N.issues?N.issues:[];z[U]&&s(z[U])},ne.appendChild(J),ne.appendChild(oe),te.appendChild(Z),te.appendChild(le),j.appendChild(te),j.appendChild(ne)}function B(V){var Y=(V&&V.path?V.path:"").replace(/\.attrs\.level$/,""),Q=n.getJSON?n.getJSON():null;if(!Q||!Q.content)return 2;var te=0;function Z(ne,J){if(!ne||typeof ne.type!="string")return!1;if(J===Y)return!0;if(ne.type==="heading"&&ne.attrs&&typeof ne.attrs.level=="number"&&(te=ne.attrs.level),!ne.content||!ne.content.length)return!1;for(var oe=0;oe<ne.content.length;oe++)if(Z(ne.content[oe],J+".content["+oe+"]"))return!0;return!1}for(var le=0;le<Q.content.length&&!Z(Q.content[le],"content["+le+"]");le++);return Math.max(1,Math.min(6,(te||1)+(te?1:0)))}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),(function(){if(!(typeof document>"u")&&!(window.RTE_DefaultConfig&&window.RTE_DefaultConfig.aitoolkit_skip_auto_css)){for(var c=document.querySelectorAll("link[rel=stylesheet]"),n=0;n<c.length;n++){var S=c[n].getAttribute("href")||"";if(/(?:^|\/)aitoolkit\.css(?:\?.*)?$/i.test(S))return}for(var M=null,F=document.getElementsByTagName("script"),K=F.length-1;K>=0;K--){var j=F[K].getAttribute("src")||"";if(/(?:^|\/)(?:aitoolkit|all_plugins)\.js(?:\?.*)?$/i.test(j)){M=F[K];break}}var o=M?M.getAttribute("src"):"",N=o?o.replace(/[^/]+$/,"aitoolkit.css"):(window.RTE_DefaultConfig&&window.RTE_DefaultConfig.url_base||"/richtexteditor")+"/plugins/aitoolkit.css";N.indexOf("?")<0&&(N+="?v=20260703a");var U=document.createElement("link");U.rel="stylesheet",U.href=N,U.setAttribute("data-rte-auto-injected","aitoolkit"),(document.head||document.documentElement).appendChild(U)}})(),RTE_DefaultConfig.svgCode_aiassist||(RTE_DefaultConfig.svgCode_aiassist='<svg viewBox="0 0 24 24" width="20" height="20" fill="none" aria-hidden="true"><defs><linearGradient id="rte-ai-robot-shell" x1="5" y1="6" x2="19" y2="18" gradientUnits="userSpaceOnUse"><stop stop-color="#1fb6ff"/><stop offset=".52" stop-color="#2563eb"/><stop offset="1" stop-color="#7c3aed"/></linearGradient><linearGradient id="rte-ai-robot-glow" x1="8" y1="10" x2="16" y2="15" gradientUnits="userSpaceOnUse"><stop stop-color="#fef9c3"/><stop offset="1" stop-color="#fde68a"/></linearGradient></defs><path d="M12 2.4v2.4" stroke="#f59e0b" stroke-width="1.7" stroke-linecap="round"/><circle cx="12" cy="2.4" r="1" fill="#fbbf24"/><rect x="5.1" y="6.1" width="13.8" height="11.2" rx="3.4" fill="url(#rte-ai-robot-shell)" stroke="#1e40af" stroke-width="1.2"/><path d="M8.2 6.1V5.8A1.8 1.8 0 0110 4h4a1.8 1.8 0 011.8 1.8v.3" stroke="#93c5fd" stroke-width="1.2" stroke-linecap="round"/><rect x="7.7" y="9.2" width="8.6" height="4.8" rx="2.4" fill="#0f172a" opacity=".26"/><circle cx="10" cy="11.6" r="1.15" fill="url(#rte-ai-robot-glow)"/><circle cx="14" cy="11.6" r="1.15" fill="url(#rte-ai-robot-glow)"/><path d="M9.4 14.9c.8.55 1.66.83 2.6.83s1.8-.28 2.6-.83" stroke="#ffffff" stroke-width="1.45" stroke-linecap="round"/><path d="M8.1 19.2l1-2.1M15.9 19.2l-1-2.1" stroke="#2563eb" stroke-width="1.5" stroke-linecap="round"/><path d="M18.8 6.4l.55-1.25.55 1.25 1.25.55-1.25.55-.55 1.25-.55-1.25-1.25-.55z" fill="#fef08a"/></svg>',RTE_DefaultConfig.svgCode_aiassist='<svg viewBox="1.78 0.3 21.8 21.8" width="20" height="20" fill="none" aria-hidden="true"><defs><linearGradient id="rte-ai-bot-v5-shell" x1="3" y1="5" x2="21" y2="20" gradientUnits="userSpaceOnUse"><stop stop-color="#22d3ee"/><stop offset=".52" stop-color="#2563eb"/><stop offset="1" stop-color="#4338ca"/></linearGradient><linearGradient id="rte-ai-bot-v5-visor" x1="7" y1="8" x2="17" y2="15" gradientUnits="userSpaceOnUse"><stop stop-color="#f8fafc"/><stop offset="1" stop-color="#bfdbfe"/></linearGradient></defs><rect x="2.6" y="5.2" width="16.4" height="16" rx="4.8" fill="url(#rte-ai-bot-v5-shell)" stroke="#1e40af" stroke-width="1.6"/><rect x="5.9" y="9.1" width="9.8" height="6.8" rx="3.4" fill="url(#rte-ai-bot-v5-visor)"/><circle cx="8.6" cy="12.5" r="1.35" fill="#0f172a"/><circle cx="13" cy="12.5" r="1.35" fill="#0f172a"/><path d="M8.3 18.2c.9.7 1.8 1 2.5 1s1.6-.3 2.5-1" stroke="#eff6ff" stroke-width="1.7" stroke-linecap="round"/><path d="M19.6 .4l1.25 2.7 2.7 1.25-2.7 1.25-1.25 2.7-1.25-2.7-2.7-1.25 2.7-1.25z" fill="#fbbf24"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_open_dialog||(RTE_DefaultConfig.svgCode_aiassist_open_dialog=RTE_DefaultConfig.svgCode_aiassist),RTE_DefaultConfig.svgCode_aiassist_review||(RTE_DefaultConfig.svgCode_aiassist_review='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5.5 6.5h13"/><path d="M5.5 11.5h8"/><path d="M5.5 16.5h6"/><path d="M16.5 14.2l1.8 1.8 3.2-4.2"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_chat||(RTE_DefaultConfig.svgCode_aiassist_chat=RTE_DefaultConfig.svgCode_aiassist),RTE_DefaultConfig.svgCode_aiassist_proofread||(RTE_DefaultConfig.svgCode_aiassist_proofread='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="4.5"/><path d="M14 14l5 5"/><path d="M8.8 10.5l1.2 1.3 2.3-2.5"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_rewrite||(RTE_DefaultConfig.svgCode_aiassist_rewrite='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h11"/><path d="M4 12h8"/><path d="M4 17h11"/><path d="M16 5l4 4-6.5 6.5H9.5v-4z"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_translate||(RTE_DefaultConfig.svgCode_aiassist_translate='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 6.5h10"/><path d="M8 4v2.5"/><path d="M11 6.5c-.6 2.9-2.2 5.3-4.7 7.1"/><path d="M6.5 10.5c1.2.9 2.5 1.6 3.9 2.1"/><path d="M14.5 9.5h5"/><path d="M17 7v2.5"/><path d="M15 19l2-4.5 2 4.5"/><path d="M15.8 17.2h2.4"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_comment||(RTE_DefaultConfig.svgCode_aiassist_comment='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 7.5A3.5 3.5 0 019.5 4h8A3.5 3.5 0 0121 7.5v5a3.5 3.5 0 01-3.5 3.5H12l-4.5 3v-3H6A3.5 3.5 0 012.5 12.5v-5A3.5 3.5 0 016 4"/><path d="M8 9h8"/><path d="M8 12h5"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_paragraph||(RTE_DefaultConfig.svgCode_aiassist_paragraph='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 7h8"/><path d="M5 12h14"/><path d="M5 17h10"/><path d="M18 5v6"/><path d="M15 8h6"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_justify||(RTE_DefaultConfig.svgCode_aiassist_justify='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 7h14"/><path d="M5 11h14"/><path d="M5 15h9"/><path d="M16 14l2 2 3-4"/></svg>'),RTE_DefaultConfig.plugin_aitoolkit=RTE_Plugin_AIToolkit;function RTE_Plugin_AIToolkit(){var E=this,c,n;E.PluginName="AIToolkit",E.InitConfig=function(e){c=e,c.aiToolkitEnabled!==!1&&(c.text_aiassist=c.text_aiassist||"Ask AI",c.text_aireview=c.text_aireview||"AI Review",c.text_aichat=c.text_aichat||"AI Chat",c.aiToolkitTranslateLanguages=c.aiToolkitTranslateLanguages||[{value:"spanish",label:"Spanish"},{value:"french",label:"French"},{value:"german",label:"German"},{value:"italian",label:"Italian"},{value:"portuguese",label:"Portuguese"},{value:"japanese",label:"Japanese"}],c.aiToolkitActions=c.aiToolkitActions||[{id:"chat-panel",section:"Start",icon:"chat",title:"Chat",description:"Ask follow-up questions about this document.",target:"chat-panel"},{id:"open-dialog",section:"Start",icon:"open_dialog",title:"Draft",description:"Generate, rewrite, translate, or summarize before applying.",target:"dialog"},{id:"review-panel",section:"Start",icon:"review",title:"Review",description:"Accept or reject prepared AI edits.",target:"review-panel"},{id:"proofread",section:"Quick edit",icon:"proofread",title:"Proofread",description:"Check grammar, spacing, and clarity.",resolverMode:"proofread",target:"selection-preview"},{id:"rewrite",section:"Quick edit",icon:"rewrite",title:"Rewrite",description:"Improve clarity without changing intent.",resolverMode:"rewrite",target:"selection-preview"},{id:"translate",section:"Quick edit",icon:"translate",title:"Translate",description:"Choose a language and preview the result.",resolverMode:"translate",target:"dialog",autoRun:!1},{id:"justify",section:"Quick edit",icon:"justify",title:"Explain",description:"Rewrite and show why it changed.",resolverMode:"justify",target:"dialog",autoRun:!1},{id:"comment",section:"Insert",icon:"comment",title:"Add note",description:"Insert a short comment near the selection.",resolverMode:"comment",target:"comment"},{id:"paragraph",section:"Insert",icon:"paragraph",title:"Add paragraph",description:"Draft a supporting paragraph below.",resolverMode:"paragraph",target:"insert"}],c.aiToolkitChatPrompts=c.aiToolkitChatPrompts||[{id:"summarize",label:"Summarize",prompt:"Summarize the current content and suggest the clearest next edit."},{id:"proofread",label:"Proofread",prompt:"Proofread the current content and prepare a cleaner version I can review."},{id:"translate",label:"Translate",prompt:"Translate the current content into Spanish and prepare a reviewable version."},{id:"headings",label:"Headings",prompt:"Suggest better section titles and subheadings for this content."},{id:"expand",label:"Expand",prompt:"Add a short supporting paragraph that strengthens this content."}],c.aiToolkitDialogModes=c.aiToolkitDialogModes||[{id:"proofread",title:"Proofread",description:"Fix grammar & clarity."},{id:"rewrite",title:"Rewrite",description:"Rewrite for clarity."},{id:"translate",title:"Translate",description:"Translate to a language."},{id:"justify",title:"Explain rewrite",description:"Rewrite and explain why."},{id:"shorten",title:"Shorten",description:"Compress to be shorter."},{id:"expand",title:"Expand",description:"Add supporting detail."},{id:"summarize",title:"Summarize",description:"Summarize the source."}],c.aiToolkitResolver=c.aiToolkitResolver||null,c.aiToolkitOperationHandlers=c.aiToolkitOperationHandlers||{},c.aiToolkitPersistenceKey=c.aiToolkitPersistenceKey||"",c.aiToolkitReviewSyncInterval=c.aiToolkitReviewSyncInterval||15e3,c.aiToolkitSuggestionLedgerUrl=c.aiToolkitSuggestionLedgerUrl||"",c.aiToolkitReviewLogUrl=c.aiToolkitReviewLogUrl||"",c.aiToolkitAutoToolbarButtons=c.aiToolkitAutoToolbarButtons!==!1,c.aiToolkitUiVersion=c.aiToolkitUiVersion||"v20260520k",K("toolbar_default","#{aiassist}"),K("toolbar_basic","#{aiassist}"),K("toolbar_full","#{aiassist}"),K("toolbar_mobile","#{aiassist}"),j("controltoolbar_TEXT","|{aiassist}"),c.toolbarfactory_aiassist=function(t,r,a){var i=this;return i.createToolbarItemDropDownPanel(t,function(h){wc(h)})})},E.InitEditor=function(e){n=e,n.aiToolkit={normalizeText:l,ensureSentence:s,buildDemoResult:P,getTranslateLanguages:C,getTranslateLanguageLabel:u,getOperationContract:me,getActionDefinitions:ne,registerAction:ee,removeAction:se,getDialogModes:J,registerDialogMode:ae,removeDialogMode:fe,resolveAction:function(v,H){return Lt(v,H)},loadSelectionText:function(){var v=kt();return v.text||v.wholeText},loadDocumentText:function(){return l(n.getText?n.getText():"")},textToHtml:function(v){return Ve(v)},previewInlineSuggestion:function(v,H){return ds(v,H)},applyResult:function(v,H){return bo(v,H)},executeOperations:function(v,H){return Ii(v,H)},executeResolvedAction:function(v,H){return jn(v,H)},registerOperationHandler:Se,unregisterOperationHandler:ye,getSuggestions:function(){return Xe().slice()},clearSuggestions:function(){return Zu()},getReviewLogEntries:function(){return St().slice()},setResolver:function(v){c.aiToolkitResolver=typeof v=="function"?v:null},openChatPanel:function(v){vi(v)},closeChatPanel:function(){pi({restoreFocus:!0})},toggleChatPanel:function(v){Yc(v)},getChatSessions:function(v){return Fc(v)},loadChatSession:function(v,H){return Uc(v,H)},clearChatSessions:function(v){return zc(v)},openReviewPanel:function(v){Ho(v)},closeReviewPanel:function(){ba()},toggleReviewPanel:function(v){sd(v)},saveSuggestionLedger:function(){return $r()},loadSuggestionLedger:function(){return Wl()},loadRemoteSuggestionLedger:function(v,H){return Vl(v,H)},loadReviewLogEntries:function(v,H){return vt(v,H)},refreshRemoteReviewState:function(v,H){return Ea(v,H)},openDialog:function(v){xi(v)},runQuickAction:function(v,H){return ps(v,H)},setAgent:function(v){c.aiToolkitAgent=typeof v=="function"?v:null},runAgent:function(v,H){return xc(v,H)},streamRequest:function(v){return D(v)},exportDocx:function(v){return G(v)},importDocx:function(v){return L(v)}},cu(),n.reviewLedger={add:function(v){var H=Va(v);if(!H)return null;for(var X=Xe(),ie=0;ie<X.length;ie++)if(X[ie].id===H.id){X[ie]=H;break}return ie===X.length&&X.push(H),$r(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),H},update:function(v,H){for(var X=Xe(),ie=0;ie<X.length;ie++)if(X[ie].id===v){for(var ce in H)Object.prototype.hasOwnProperty.call(H,ce)&&(X[ie][ce]=H[ce]);return $r(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),X[ie]}return null},remove:function(v){for(var H=Xe(),X=0;X<H.length;X++)if(H[X].id===v)return H.splice(X,1),$r(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),!0;return!1},get:function(v){for(var H=Xe(),X=0;X<H.length;X++)if(H[X].id===v)return H[X];return null},list:function(v){var H=Xe().slice();return v?H.filter(function(X){return!(v.author&&X.author&&X.author.id!==v.author||v.status&&X.status!==v.status||v.changeType&&X.changeType!==v.changeType)}):H},refreshPanel:function(){n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1)}},n.attachEvent("exec_command_aiassist",function(v){v.returnValue=!0,v.stopBubble=!0,xi()}),n.attachEvent("exec_command_aichat",function(v){v.returnValue=!0,v.stopBubble=!0,vi({focusComposer:!0})});var t=n.getEditable(),r=t&&t.ownerDocument?t.ownerDocument:document;function a(v){if(!v.__rteAiInlinePreviewClickHandled){var H=v.target&&v.target.closest?v.target.closest("[data-rte-ai-suggestion-id]"):null;if(H){var X=H.getAttribute("data-rte-ai-suggestion-id");if(!(!X||!Kt(X))){v.__rteAiInlinePreviewClickHandled=!0;var ie=v.target&&v.target.closest?v.target.closest("[data-rte-ai-action]"):null;if(!ie){var ce=ut(),ve=H.ownerDocument?H.ownerDocument.activeElement:null;if(ve&&ve.getAttribute&&n.getEditable().contains(ve)&&(ce=ve.getAttribute("data-rte-ai-action")||ce),n.__aiReviewEmptyPreviewSuggestionId&&X===n.__aiReviewEmptyPreviewSuggestionId){Qr(X,{focusPanel:!0,focusAction:ce||ut(),openedQueue:!0});return}if(_r(X),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),go(X,ce))return;Li(H);return}v.preventDefault(),v.stopPropagation();var ge=ie.getAttribute("data-rte-ai-action"),he="",pe=n.__aiActiveSuggestionId===X;(ge==="accept"||ge==="reject")&&pe&&(he=bi(X)),ge==="accept"?Hi(X)&&(he?un(he,{focusInlineAction:ge}):pe&&pr(yo("Accepted",X))):ge==="reject"?Oi(X)&&(he?un(he,{focusInlineAction:ge}):pe&&pr(yo("Rejected",X))):ge==="review"?Qr(X,{focusPanel:!0}):ge==="previous"?vu(X,{focusInlineAction:ge})||pr(An(X,"previous")):ge==="next"?gu(X,{focusInlineAction:ge})||pr(An(X,"next")):ge==="shared-seen"?(Wo(),oi(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),pr("Shared AI review updates cleared for the current item."),Li(H)):ge==="undo"?ea({focusInlineAction:"undo"}):ge==="redo"&&pa({focusInlineAction:"redo"})}}}}function i(){t=n.getEditable?n.getEditable():null,r=t&&t.ownerDocument?t.ownerDocument:document,t&&n.__aiInlinePreviewEventEditable!==t&&(t.addEventListener("click",a),t.addEventListener("keydown",h),n.__aiInlinePreviewEventEditable=t),r&&n.__aiInlinePreviewEventDocument!==r&&(r.addEventListener("click",a,!0),r.addEventListener("keydown",h,!0),n.__aiInlinePreviewEventDocument=r)}function h(v){if(!v.__rteAiInlinePreviewKeydownHandled){var H=v.target&&v.target.closest?v.target.closest(".rte-ai-inline-preview"):v.target&&v.target.classList&&v.target.classList.contains("rte-ai-inline-preview")?v.target:null;if(H){var X=v.target&&v.target.closest?v.target.closest("[data-rte-ai-action]"):null,ie=H.getAttribute("data-rte-ai-suggestion-id");if(!(!ie||!Kt(ie)||v.ctrlKey||v.metaKey||v.altKey)){v.__rteAiInlinePreviewKeydownHandled=!0;var ce=(v.key||"").toLowerCase(),ve=X&&X.getAttribute&&X.getAttribute("data-rte-ai-action")||"",ge=ve||Yo(Kt(ie)),he=!!(n.__aiReviewEmptyPreviewSuggestionId&&ie===n.__aiReviewEmptyPreviewSuggestionId);if(he){(ce==="enter"||ce===" ")&&(v.preventDefault(),Qr(ie,{focusPanel:!0,focusAction:ve||ut(),openedQueue:!0}));return}if(ce==="arrowleft"||ce==="k")v.preventDefault(),vu(ie,{focusInlineAction:ve})||pr(An(ie,"previous"));else if(ce==="arrowright"||ce==="j")v.preventDefault(),gu(ie,{focusInlineAction:ve})||pr(An(ie,"next"));else if(ce==="home")v.preventDefault(),Ff(ie,{focusInlineAction:ve})||pr(An(ie,"first"));else if(ce==="end")v.preventDefault(),Uf(ie,{focusInlineAction:ve})||pr(An(ie,"last"));else if(ce==="a"){v.preventDefault();var pe=bi(ie);Hi(ie)&&(pe?un(pe,{focusInlineAction:ve}):pr(yo("Accepted",ie)))}else if(ce==="r"){v.preventDefault();var xe=bi(ie);Oi(ie)&&(xe?un(xe,{focusInlineAction:ve}):pr(yo("Rejected",ie)))}else if(ce==="u"&&!v.shiftKey&&Rn())v.preventDefault(),ea({focusInlineAction:ge||"accept"});else if(ce==="u"&&v.shiftKey){var Ce=Zn();Ce&&Ce.suggestion&&Ce.suggestion.id===ie&&(v.preventDefault(),pa({focusInlineAction:ge||"accept"}))}else if(ce==="g")bn(ie)&&(v.preventDefault(),Wo(),oi(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),pr("Shared AI review updates cleared for the current item."),Li(H));else if(ce==="enter"||ce===" "){if(X)return;v.preventDefault(),go(ie,ve||ut())}}}}}n.__aiBindInlinePreviewEventHandlers=i,i(),Wl(),Ea(!1),Yu(),Xu()};var S={toolbar_default:"{bold,italic,underline,forecolor,backcolor}|{justifyleft,justifycenter,justifyright,justifyfull}|{insertorderedlist,insertunorderedlist,indent,outdent,insertblockquote,insertemoji}|{aiassist}#{toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",toolbar_mobile:"{bold,italic,underline|fontname:toggle,fontsize:toggle,menu_paragraphop|forecolor,backcolor}{insertlink,insertemoji,inserttable,insertimage,removeformat}|{aiassist}#{toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",toolbar_basic:"{bold,italic,underline}|{fontname,fontsize}|{insertlink,insertemoji,insertimage,insertvideo}|removeformat|code#{toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",toolbar_full:"{bold,italic,underline,forecolor,backcolor}|{justifyleft,justifycenter,justifyright,justifyfull}|{insertorderedlist,insertunorderedlist,indent,outdent}{superscript,subscript}|{insertlink,insertimage,insertvideo,inserttable,insertemoji,find,code,html2pdf}|{aiassist_chat,aiassist_review}|{insertcomment,trackchanges}#{insertmergefield,insertfootnote,inserttoc,insertpagebreak,revisionhistory,newdoc,save,toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",controltoolbar_TEXT:"removeformat | {bold,italic,underline,forecolor,backcolor}|{fontname:toggle,fontsize:toggle}|{insertlink}"};function M(e){return String(e||"").replace(/\s+/g,"")}function F(e){if(c.aiToolkitAutoToolbarButtons===!1)return!1;var t=c[e];if(!t)return!0;var r=S[e];return r?M(t)===M(r):!0}function K(e,t){var r=c[e]||"";r.indexOf("aiassist")===-1&&F(e)&&(c[e]=r?r+" "+t:t)}function j(e,t){var r=c[e]||"";r.indexOf("aiassist")===-1&&F(e)&&(c[e]=r?r+t:t)}function o(e,t,r,a,i){var h=e.ownerDocument.createElement(t);return r&&(h.style.cssText=r),a&&(h.className=a),typeof i<"u"&&(h.innerText=i),e.appendChild(h),h}function N(e,t,r){var a=o(e,"div","",t,r);return a.setAttribute("aria-hidden","true"),a}function U(){return"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 240" role="img" aria-label="Editorial workspace photo"><defs><linearGradient id="ai-photo-sky" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="#e0f2fe"/><stop offset="52%" stop-color="#bfdbfe"/><stop offset="100%" stop-color="#ddd6fe"/></linearGradient><linearGradient id="ai-photo-desk" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#fef3c7"/><stop offset="100%" stop-color="#fdba74"/></linearGradient><filter id="ai-photo-blur" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="14"/></filter></defs><rect width="320" height="240" rx="28" fill="url(#ai-photo-sky)"/><circle cx="248" cy="52" r="40" fill="#ffffff" opacity=".55"/><circle cx="76" cy="44" r="34" fill="#fdf2f8" opacity=".65"/><path d="M0 174C37 155 68 151 99 162c24 9 47 23 75 17 20-4 31-17 51-23 28-7 54 6 95 18v66H0z" fill="#86efac" opacity=".92"/><path d="M0 188c34-24 66-27 100-15 32 12 63 26 95 17 23-6 44-24 66-26 22-2 39 7 59 18v48H0z" fill="#60a5fa" opacity=".3"/><g filter="url(#ai-photo-blur)" opacity=".34"><circle cx="248" cy="154" r="54" fill="#1d4ed8"/><circle cx="92" cy="134" r="48" fill="#7c3aed"/></g><rect x="74" y="72" width="172" height="110" rx="14" fill="#f8fafc" opacity=".95"/><rect x="88" y="86" width="144" height="14" rx="7" fill="#cbd5e1"/><rect x="88" y="110" width="118" height="10" rx="5" fill="#dbeafe"/><rect x="88" y="128" width="128" height="10" rx="5" fill="#dbeafe"/><rect x="88" y="146" width="82" height="10" rx="5" fill="#e9d5ff"/><rect x="198" y="138" width="34" height="28" rx="10" fill="url(#ai-photo-desk)"/><rect x="54" y="183" width="212" height="32" rx="16" fill="#ffffff" opacity=".68"/></svg>')}function $(){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 140" role="img" aria-hidden="true" focusable="false"><defs><linearGradient id="ai-illus-doc" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff"/><stop offset="100%" stop-color="#f1f5fb"/></linearGradient><linearGradient id="ai-illus-bubble" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="#3b82f6"/><stop offset="100%" stop-color="#6366f1"/></linearGradient><linearGradient id="ai-illus-sparkle" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#fbbf24"/><stop offset="100%" stop-color="#f59e0b"/></linearGradient></defs><ellipse cx="100" cy="118" rx="68" ry="8" fill="#0f172a" opacity="0.08"/><rect x="44" y="34" width="92" height="78" rx="10" fill="#cbd5e1" opacity="0.45" transform="translate(2,3)"/><rect x="44" y="34" width="92" height="78" rx="10" fill="url(#ai-illus-doc)" stroke="#cbd5e1" stroke-width="1"/><rect x="56" y="54" width="60" height="6" rx="3" fill="#dbeafe"/><rect x="56" y="66" width="68" height="5" rx="2.5" fill="#e2e8f0"/><rect x="56" y="76" width="52" height="5" rx="2.5" fill="#e2e8f0"/><rect x="56" y="90" width="44" height="5" rx="2.5" fill="#ede9fe"/><g><path d="M118 22 H162 a10 10 0 0 1 10 10 v22 a10 10 0 0 1 -10 10 H140 l-9 8 v-8 H118 a10 10 0 0 1 -10 -10 V32 a10 10 0 0 1 10 -10 z" fill="url(#ai-illus-bubble)"/><circle cx="128" cy="42" r="2.6" fill="#ffffff"/><circle cx="140" cy="42" r="2.6" fill="#ffffff"/><circle cx="152" cy="42" r="2.6" fill="#ffffff"/></g><g fill="url(#ai-illus-sparkle)"><path d="M36 28 l2 6 6 2 -6 2 -2 6 -2 -6 -6 -2 6 -2 z"/><path d="M168 88 l1.6 4.8 4.8 1.6 -4.8 1.6 -1.6 4.8 -1.6 -4.8 -4.8 -1.6 4.8 -1.6 z"/><path d="M30 92 l1.2 3.6 3.6 1.2 -3.6 1.2 -1.2 3.6 -1.2 -3.6 -3.6 -1.2 3.6 -1.2 z"/></g></svg>'}function W(e,t){var r=o(e,"div","","rte-ai-hero"+(t?" is-"+t:"")),a=o(r,"div","","rte-ai-hero-media"),i=o(a,"img","","rte-ai-hero-image");i.alt="Styled editorial workspace preview",i.src=U(),i.loading="eager",i.decoding="async";var h=o(r,"div","","rte-ai-hero-body");return o(h,"div","","rte-ai-hero-kicker",t==="dialog"?"Guided AI flow":"Beautiful drafting"),o(h,"div","","rte-ai-hero-title",t==="dialog"?"Review the change before it lands":"Shape the document with a calmer AI workspace"),o(h,"div","","rte-ai-hero-copy",t==="dialog"?"Load source text, compare the result, and apply only the version that improves the draft.":"Keep context visible, ask for help in smaller steps, and make each suggestion feel intentional."),r}function q(e,t,r){var a=o(e,"div","",t);return r&&a.setAttribute("data-rte-ai-review-group-label",r),o(a,"div","","rte-ai-review-control-group-body")}function x(e,t,r){var a=o(e,"div","",t);return r&&o(a,"div","","rte-ai-review-header-group-label",r),o(a,"div","","rte-ai-review-header-group-body")}function m(e){if(!e)return c.svgCode_aiassist||"";var t=e.icon||e.id||"open_dialog";return c["svgCode_aiassist_"+t]||c.svgCode_aiassist||""}function D(e){e=e||{};var t=e.url||"/richtextbox/ai/stream",r=e.body||{},a=typeof AbortController<"u"?new AbortController:null,i="",h=(function(){return typeof fetch!="function"||typeof ReadableStream>"u"?I(t,r,e):fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(r),signal:a?a.signal:void 0,credentials:"same-origin"}).then(function(v){if(!v.ok)throw new Error("AI stream failed: HTTP "+v.status);if(!v.body||typeof v.body.getReader!="function")return v.text().then(function(ge){return e.onDelta&&e.onDelta(ge),i=ge,e.onDone&&e.onDone(i),i});var H=v.body.getReader(),X=new TextDecoder("utf-8"),ie="";function ce(){return H.read().then(function(ge){if(ge.done)return e.onDone&&e.onDone(i),i;ie+=X.decode(ge.value,{stream:!0});for(var he;(he=ie.indexOf(`
|
|
1
|
+
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_a11yenhance=RTE_Plugin_A11yEnhance,typeof RTE_DefaultConfig.a11yEnhance>"u"&&(RTE_DefaultConfig.a11yEnhance=!0);function RTE_Plugin_A11yEnhance(){var E=this,c,n;E.PluginName="A11yEnhance",E.InitConfig=function(K){c=K},E.InitEditor=function(K){if(n=K,c.a11yEnhance!==!1){F();try{n.attachEvent("ready",F)}catch{}try{n.attachEvent("aftersethtml",F)}catch{}setTimeout(F,0),setTimeout(F,200),n.applyAccessibilityMetadata=F}};function S(){return c.contentAriaLabel||c.contentLabel||"Rich text editor. Editing area."}function M(){if(c.contentLang)return c.contentLang;try{var K=c.container&&c.container.ownerDocument&&c.container.ownerDocument.documentElement.getAttribute("lang");if(K)return K}catch{}try{var j=typeof document<"u"&&document.documentElement.getAttribute("lang");if(j)return j}catch{}return"en"}function F(){var K=n.getDocument();if(K){try{var j=M();j&&K.documentElement&&K.documentElement.getAttribute("lang")!==j&&K.documentElement.setAttribute("lang",j)}catch{}try{var o=K.defaultView&&K.defaultView.frameElement;o&&!o.getAttribute("title")&&o.setAttribute("title",S())}catch{}try{var N=n.getEditable();N&&N.nodeType===1&&(N.getAttribute("role")||N.setAttribute("role","textbox"),N.getAttribute("aria-multiline")||N.setAttribute("aria-multiline","true"),!N.getAttribute("aria-label")&&!N.getAttribute("aria-labelledby")&&N.setAttribute("aria-label",S()))}catch{}}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_accessibilitychecker=RTE_Plugin_AccessibilityChecker;function RTE_Plugin_AccessibilityChecker(){var E=this,c,n,S=null,M=null,F=null,K=null,j=null,o=0,N=null,U=-1;E.PluginName="AccessibilityChecker",E.InitConfig=function(V){c=V,c.accessibilityCheckerEnabled!==!1&&(typeof c.accessibilityCheckerAutoOpen!="boolean"&&(c.accessibilityCheckerAutoOpen=!1),c.accessibilityCheckerTitle=c.accessibilityCheckerTitle||"Accessibility",c.accessibilityCheckerHint=c.accessibilityCheckerHint||"Review heading structure, image alt text, and table headers without leaving the editor.",c.accessibilityCheckerEmptyText=c.accessibilityCheckerEmptyText||"No accessibility issues found in the current document.",$("toolbar_default","#{accessibilitychecker}"),$("toolbar_full","#{accessibilitychecker}"))},E.InitEditor=function(V){n=V,c.accessibilityCheckerEnabled!==!1&&(n.accessibilityChecker={close:function(){D()},getIssues:function(){return N?N.issues.slice():[]},open:function(){m()},refresh:function(){return L()},repair:function(Y,Q){return l(Y,Q)},run:function(){return L()},toggle:function(){x()}},W(),n.toolbarFactoryMap=n.toolbarFactoryMap||{},n.toolbarFactoryMap.accessibilitychecker=function(Y){return n.createToolbarButton(Y)},n.attachEvent("exec_command_accessibilitychecker",function(Y){Y.returnValue=!0,Y.stopBubble=!0,x()}),n.attachEvent("change",function(){G()}),q(),L(),c.accessibilityCheckerAutoOpen&&m())};function $(V,Y){c[V]&&c[V].indexOf(Y)===-1&&(c[V]=c[V]+Y)}function W(){var V=c.container.ownerDocument;if(!V.getElementById("rte-accessibility-checker-style")){var Y=V.createElement("style");Y.id="rte-accessibility-checker-style",Y.innerHTML=[".rte-a11y-shell{display:flex;align-items:stretch;gap:10px;}",".rte-a11y-shell>.rte-a11y-host{flex:1 1 auto;min-width:0;}","/* 2026-07-12 accessibility panel precision */",".rte-a11y-panel{display:none;flex:0 0 310px;min-width:270px;max-width:min(360px,32vw);border:1px solid rgba(148,163,184,.22);border-radius:8px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));box-shadow:0 14px 32px rgba(29,78,216,.1),0 2px 8px rgba(15,23,42,.06);overflow:hidden;color:#172033;font-family:Aptos,'Segoe UI',sans-serif;}",".rte-a11y-shell.is-open>.rte-a11y-panel{display:flex;flex-direction:column;}",".rte-a11y-header{padding:12px 12px 9px 14px;border-bottom:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.72);}",".rte-a11y-kicker{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-a11y-title{margin-top:3px;font-size:15px;line-height:1.2;font-weight:850;color:#172033;}",".rte-a11y-copy{margin-top:5px;font-size:12px;line-height:1.42;color:#52657e;}",".rte-a11y-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 8px 14px;border-bottom:1px solid rgba(148,163,184,.16);gap:10px;background:rgba(255,255,255,.52);}",".rte-a11y-count{min-width:0;font-size:12px;font-weight:750;color:#52657e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}",".rte-a11y-actions{display:flex;align-items:center;gap:6px;}",".rte-a11y-link{appearance:none;border:1px solid rgba(100,116,139,.18);background:#fff;color:#315277;cursor:pointer;font-size:12px;font-weight:750;padding:6px 9px;border-radius:7px;line-height:1;}",".rte-a11y-link:hover,.rte-a11y-link:focus-visible{background:#eef4ff;color:#0f3f9f;border-color:rgba(37,99,235,.28);}",".rte-a11y-body{padding:6px;overflow:auto;min-height:160px;max-height:560px;display:flex;flex-direction:column;gap:8px;scrollbar-width:thin;}",".rte-a11y-list{display:flex;flex-direction:column;gap:6px;}",".rte-a11y-item{appearance:none;width:100%;text-align:left;border:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.84);cursor:pointer;border-radius:8px;padding:10px;box-shadow:0 6px 14px rgba(15,23,42,.04);transition:background 160ms ease,box-shadow 160ms ease,transform 160ms ease;}",".rte-a11y-item:hover,.rte-a11y-item:focus-visible{background:#f8fbff;border-color:rgba(37,99,235,.24);}",".rte-a11y-item.is-active{border-color:rgba(37,99,235,.36);background:#eef4ff;box-shadow:0 12px 28px rgba(37,99,235,.14);transform:translateY(-1px);}",".rte-a11y-item-top{display:flex;align-items:center;justify-content:space-between;gap:10px;}",".rte-a11y-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;line-height:1;font-weight:850;letter-spacing:.08em;text-transform:uppercase;}",".rte-a11y-badge-warning{background:#fff8e8;color:#92400e;border:1px solid rgba(245,158,11,.18);}",".rte-a11y-badge-error{background:#fff1f2;color:#9f1239;border:1px solid rgba(159,18,57,.18);}",".rte-a11y-code{font-size:11px;color:#64748b;font-family:Consolas,'Cascadia Mono',monospace;}",".rte-a11y-message{margin-top:7px;font-size:13px;line-height:1.42;color:#172033;}",".rte-a11y-detail{border:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.86);border-radius:8px;padding:11px;display:flex;flex-direction:column;gap:9px;box-shadow:0 6px 14px rgba(15,23,42,.04);}",".rte-a11y-detail-title{font-size:13px;font-weight:850;color:#172033;}",".rte-a11y-detail-copy{font-size:12px;line-height:1.45;color:#52657e;}",".rte-a11y-field{display:flex;flex-direction:column;gap:6px;}",".rte-a11y-label{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-a11y-input{width:100%;border:1px solid rgba(148,163,184,.24);border-radius:7px;padding:9px 10px;font-size:13px;line-height:1.4;box-sizing:border-box;background:#fff;}",".rte-a11y-input:focus{outline:2px solid rgba(37,99,235,.18);border-color:rgba(37,99,235,.38);}",".rte-a11y-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}",".rte-a11y-button{appearance:none;border:1px solid #1d67ba;border-radius:7px;background:#1d67ba;color:#fff;padding:8px 12px;font-size:12px;font-weight:750;cursor:pointer;box-shadow:0 6px 14px rgba(29,103,186,.16);}",".rte-a11y-button-secondary{background:#fff;color:#315277;border-color:rgba(100,116,139,.18);box-shadow:none;}",".rte-a11y-button:hover,.rte-a11y-button:focus-visible{transform:translateY(-1px);}",".rte-a11y-empty{padding:14px;border-radius:8px;background:#fff;color:#52657e;font-size:13px;font-weight:700;line-height:1.55;border:1px dashed rgba(148,163,184,.34);}","@media (max-width: 1420px){.rte-a11y-shell{display:block;}.rte-a11y-panel{margin-top:12px;max-width:none;width:100%;}.rte-a11y-body{max-height:360px;}}"].join(""),V.head.appendChild(Y)}}function q(){if(S)return S;var V=c.container,Y=V.ownerDocument;S=Y.createElement("div"),S.className="rte-a11y-shell";var Q=Y.createElement("div");Q.className="rte-a11y-host";var te=V.parentNode;te.insertBefore(S,V),S.appendChild(Q),Q.appendChild(V),M=Y.createElement("aside"),M.className="rte-a11y-panel",M.setAttribute("aria-label",c.accessibilityCheckerTitle),M.setAttribute("role","complementary");var Z=Y.createElement("div");Z.className="rte-a11y-header",Z.innerHTML='<div class="rte-a11y-kicker">Accessibility</div><div class="rte-a11y-title"></div><div class="rte-a11y-copy"></div>',Z.querySelector(".rte-a11y-title").innerText=c.accessibilityCheckerTitle,Z.querySelector(".rte-a11y-copy").innerText=c.accessibilityCheckerHint;var le=Y.createElement("div");le.className="rte-a11y-toolbar",le.innerHTML='<div class="rte-a11y-count" data-rte-a11y-count="1"></div><div class="rte-a11y-actions"><button type="button" class="rte-a11y-link" data-rte-a11y-refresh="1">Refresh</button><button type="button" class="rte-a11y-link" data-rte-a11y-close="1" aria-label="Hide accessibility checker">Hide</button></div>',le.querySelector("[data-rte-a11y-refresh]").onclick=function(){L()},le.querySelector("[data-rte-a11y-close]").onclick=function(){D()};var ne=Y.createElement("div");return ne.className="rte-a11y-body",F=Y.createElement("div"),F.className="rte-a11y-list",K=Y.createElement("div"),K.className="rte-a11y-empty",K.innerText=c.accessibilityCheckerEmptyText,j=Y.createElement("div"),j.className="rte-a11y-detail",ne.appendChild(F),ne.appendChild(K),ne.appendChild(j),M.appendChild(Z),M.appendChild(le),M.appendChild(ne),S.appendChild(M),S}function x(){S&&S.classList.contains("is-open")?D():m()}function m(){q(),S.classList.add("is-open"),b(),I()}function D(){S&&(S.classList.remove("is-open"),I())}function I(){var V=function(){try{n&&typeof n.fireEvent=="function"&&n.fireEvent("resize")}catch{}try{n&&typeof n.updateLayout=="function"&&n.updateLayout()}catch{}try{var Q=c.container.ownerDocument,te=Q.defaultView||window;te.dispatchEvent(new te.Event("resize"))}catch{}};V();var Y=typeof requestAnimationFrame=="function"?requestAnimationFrame:function(Q){return setTimeout(Q,16)};Y(V)}function G(){clearTimeout(o),o=setTimeout(function(){L()},120)}function L(){q();var V=window.RichTextEditor,Y=n.getJSON?n.getJSON():null;return N=V&&typeof V.auditAccessibility=="function"?V.auditAccessibility(Y):k(),N.issues.length?(U<0||U>=N.issues.length)&&(U=0):U=-1,b(),N}function l(V,Y){if(!N||!N.issues||!N.issues[V])return L();var Q=window.RichTextEditor,te=N.issues[V];if(te._target||N.source==="dom")return y(te,Y||{});if(!Q||typeof Q.repairAccessibilityIssue!="function")return y(te,Y||{});var Z=Q.repairAccessibilityIssue(n.getJSON(),N.issues[V],Y||{});return n.setJSON(Z),U=V,L()}function s(V){if(V){if(V._target&&typeof V._target.scrollIntoView=="function"){V._target.scrollIntoView({behavior:"smooth",block:"center"}),n.focus();return}var Y=n.getEditable?n.getEditable():null;if(Y){var Q=/^content\[(\d+)\]/.exec(V.path||"");if(Q){for(var te=parseInt(Q[1],10),Z=[],le=0;le<Y.childNodes.length;le++)Y.childNodes[le]&&Y.childNodes[le].nodeType===1&&Z.push(Y.childNodes[le]);var ne=Z[te];ne&&typeof ne.scrollIntoView=="function"&&ne.scrollIntoView({behavior:"smooth",block:"center"}),n.focus()}}}}var C=[{name:"Hebrew",lang:"he",re:/[-]/g},{name:"Arabic",lang:"ar",re:/[-ۿݐ-ݿﭐ-﷿ﹰ-]/g},{name:"Greek",lang:"el",re:/[Ͱ-Ͽἀ-]/g},{name:"Cyrillic",lang:"ru",re:/[Ѐ-ӿ]/g},{name:"Han",lang:"zh",re:/[㐀-䶿一-鿿]/g},{name:"Kana",lang:"ja",re:/[-ゟ゠-ヿ]/g},{name:"Hangul",lang:"ko",re:/[가-ᄀ-ᇿ]/g},{name:"Devanagari",lang:"hi",re:/[ऀ-ॿ]/g},{name:"Thai",lang:"th",re:/[-]/g},{name:"Latin",lang:"en",re:/[A-Za-zÀ-ɏ]/g}],p=4;function u(V){for(var Y=[],Q=0;Q<C.length;Q++){var te=String(V).match(C[Q].re);te&&te.length>=p&&Y.push(C[Q])}return Y}function f(){var V=n.getEditable?n.getEditable():null,Y=V&&V.getAttribute("lang")||typeof document<"u"&&document.documentElement.getAttribute("lang")||"en";Y=String(Y).toLowerCase().split("-")[0];for(var Q=0;Q<C.length;Q++)if(C[Q].lang===Y)return C[Q];return C[C.length-1]}function T(V,Y){for(var Q=V&&V.nodeType===3?V.parentNode:V;Q&&Q!==Y&&Q.nodeType===1;){if(Q.hasAttribute&&Q.hasAttribute("lang"))return!0;Q=Q.parentNode}return!1}function w(V,Y,Q,te){var Z=f(),le=V.ownerDocument;if(!(!le||!le.createTreeWalker))for(var ne=le.createTreeWalker(V,4,null,!1),J,oe={};J=ne.nextNode();){var z=J.nodeValue||"";if(z.replace(/\s+/g,"")&&!T(J,Y))for(var ee=u(z),se=0;se<ee.length;se++){var ae=ee[se];ae!==Z&&(oe[ae.name]||(oe[ae.name]=!0,te.push({code:"language-of-parts",severity:"warning",message:ae.name+" text is not marked with a language. Select the phrase and set its language so assistive technology pronounces it correctly (WCAG 3.1.2).",path:Q+".lang",_target:V,_lang:ae.lang,_script:ae.name})))}}}function k(){var V=n.getEditable?n.getEditable():null,Y=[];if(!V)return{document:null,issues:Y,valid:!0,source:"dom"};for(var Q=[],te=0;te<V.childNodes.length;te++){var Z=V.childNodes[te];!Z||Z.nodeType!==1||Q.push(Z)}for(var le=0,ne=0;ne<Q.length;ne++){var J=Q[ne],oe=String(J.nodeName||"").toLowerCase(),z="content["+ne+"]";if(/^h[1-6]$/.test(oe)){var ee=parseInt(oe.substring(1),10),se=d(J);se||Y.push({code:"heading-empty",severity:"warning",message:"Heading is empty. Add a concise label or remove the heading.",path:z,_target:J}),le&&ee>le+1&&Y.push({code:"heading-level-skip",severity:"warning",message:"Heading jumps from H"+le+" to H"+ee+". Use the next heading level for a clearer outline.",path:z+".attrs.level",_target:J}),se&&(le=ee)}for(var ae=oe==="img"?[J]:J.querySelectorAll?J.querySelectorAll("img"):[],fe=0;fe<ae.length;fe++){var Se=ae[fe];String(Se.getAttribute("alt")||"").replace(/^\s+|\s+$/g,"")||Y.push({code:"image-missing-alt",severity:"error",message:"Image is missing alt text. Describe the image or mark it decorative in your content workflow.",path:z+".image["+fe+"]",_target:Se})}for(var ye=oe==="table"?[J]:J.querySelectorAll?J.querySelectorAll("table"):[],me=0;me<ye.length;me++){var de=ye[me];de.querySelector("th")||Y.push({code:"table-missing-header",severity:"warning",message:"Table has no header cells. Promote the first row to headers when it describes the columns.",path:z+".table["+me+"]",_target:de})}w(J,V,z,Y)}return{document:null,issues:Y,valid:!Y.length,source:"dom"}}function y(V,Y){if(!V||!V._target)return L();var Q=V._target;if(V.code==="image-missing-alt")Q.setAttribute("alt",String(Y.altText||"").replace(/^\s+|\s+$/g,""));else if(V.code==="heading-empty")Q.textContent=String(Y.headingText||"").replace(/^\s+|\s+$/g,"");else if(V.code==="heading-level-skip"){for(var te=Math.max(1,Math.min(6,parseInt(Y.targetLevel,10)||2)),Z=Q.ownerDocument.createElement("h"+te);Q.firstChild;)Z.appendChild(Q.firstChild);A(Q,Z),Q.parentNode.replaceChild(Z,Q)}else V.code==="table-missing-header"?R(Q):V.code==="language-of-parts"&&O(Q,Y&&Y.lang?Y.lang:V._lang,V._script);return U=0,g(),L()}function O(V,Y,Q){if(!(!V||!Y)){for(var te=null,Z=0;Z<C.length;Z++)C[Z].name===Q&&(te=C[Z]);if(te){for(var le=V.ownerDocument,ne=n.getEditable?n.getEditable():null,J=Y==="he"||Y==="ar"||Y==="fa"||Y==="ur",oe=le.createTreeWalker(V,4,null,!1),z=[],ee;ee=oe.nextNode();)T(ee,ne)||z.push(ee);for(var se=0;se<z.length;se++){for(var ae=z[se],fe=ae.nodeValue||"",Se=new RegExp("(?:"+te.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`+te.re.source+"(?:"+te.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`,"g"),ye=le.createDocumentFragment(),me=0,de,Le=!1;de=Se.exec(fe);){var be=de[0],Re=be.length-be.replace(/^[\s.,;:!?'"()‐-‧«»“”]+/,"").length,Ke=be.length-be.replace(/[\s.,;:!?'"()‐-‧«»“”]+$/,"").length,je=de.index+Re,Ye=de.index+be.length-Ke;if(!(Ye-je<p)){je>me&&ye.appendChild(le.createTextNode(fe.slice(me,je)));var Ge=le.createElement("span");Ge.setAttribute("lang",Y),J&&Ge.setAttribute("dir","rtl"),Ge.appendChild(le.createTextNode(fe.slice(je,Ye))),ye.appendChild(Ge),me=Ye,Le=!0,Se.lastIndex===de.index&&Se.lastIndex++}}Le&&(me<fe.length&&ye.appendChild(le.createTextNode(fe.slice(me))),ae.parentNode.replaceChild(ye,ae))}}}}function R(V){var Y=V&&V.rows&&V.rows.length?V.rows[0]:null;if(Y)for(var Q=V.ownerDocument,te=0;te<Y.cells.length;te++){var Z=Y.cells[te];if(!(!Z||String(Z.nodeName||"").toLowerCase()==="th")){for(var le=Q.createElement("th");Z.firstChild;)le.appendChild(Z.firstChild);A(Z,le),le.setAttribute("scope","col"),Y.replaceChild(le,Z)}}}function A(V,Y){if(!(!V||!Y||!V.attributes))for(var Q=0;Q<V.attributes.length;Q++){var te=V.attributes[Q];!te||!te.name||Y.setAttribute(te.name,te.value)}}function g(){try{n&&typeof n.fireEvent=="function"&&n.fireEvent("change")}catch{}try{n&&typeof n.fireEvent=="function"&&n.fireEvent("contentchange")}catch{}}function d(V){return String(V&&(V.innerText||V.textContent)||"").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}function b(){q();for(var V=N&&N.issues?N.issues:[];F.firstChild;)F.removeChild(F.firstChild);var Y=M.querySelector("[data-rte-a11y-count]");Y&&(Y.innerText=V.length?V.length+" issue"+(V.length===1?"":"s")+" to review":"Ready to publish"),K.style.display=V.length?"none":"block";for(var Q=0;Q<V.length;Q++)(function(te,Z){var le=M.ownerDocument.createElement("button");le.type="button",le.className="rte-a11y-item"+(Z===U?" is-active":""),le.setAttribute("aria-selected",Z===U?"true":"false"),le.innerHTML='<div class="rte-a11y-item-top"><span class="rte-a11y-badge rte-a11y-badge-'+te.severity+'">'+te.severity+'</span><span class="rte-a11y-code">'+te.code+'</span></div><div class="rte-a11y-message"></div>',le.querySelector(".rte-a11y-message").innerText=te.message,le.onclick=function(){U=Z,s(te),b()},F.appendChild(le)})(V[Q],Q);_()}function _(){for(;j.firstChild;)j.removeChild(j.firstChild);var V=N&&N.issues?N.issues:[];if(!V.length||U<0||!V[U]){j.innerHTML='<div class="rte-a11y-detail-title">No fixes pending</div><div class="rte-a11y-detail-copy">Run the checker again after major content changes to keep headings, image descriptions, and tables in shape.</div>';return}var Y=V[U],Q=j.ownerDocument.createElement("div");Q.className="rte-a11y-detail-title",Q.innerText=Y.code;var te=j.ownerDocument.createElement("div");if(te.className="rte-a11y-detail-copy",te.innerText=Y.message,j.appendChild(Q),j.appendChild(te),Y.code==="image-missing-alt"){P("Alt text","Describe the image for screen-reader users.",function(Se){l(U,{altText:Se})});return}if(Y.code==="heading-empty"){P("Heading text","Add a concise heading label before publishing.",function(Se){l(U,{headingText:Se})});return}if(Y.code==="heading-level-skip"){var Z=B(Y),le=j.ownerDocument.createElement("div");le.className="rte-a11y-row";var ne=j.ownerDocument.createElement("button");ne.type="button",ne.className="rte-a11y-button",ne.innerText="Normalize to H"+Z,ne.onclick=function(){l(U,{targetLevel:Z})};var J=j.ownerDocument.createElement("button");J.type="button",J.className="rte-a11y-button rte-a11y-button-secondary",J.innerText="Focus issue",J.onclick=function(){s(Y)},le.appendChild(ne),le.appendChild(J),j.appendChild(le);return}if(Y.code==="table-missing-header"){var oe=j.ownerDocument.createElement("div");oe.className="rte-a11y-row";var z=j.ownerDocument.createElement("button");z.type="button",z.className="rte-a11y-button",z.innerText="Promote first row to headers",z.onclick=function(){l(U,{})};var ee=j.ownerDocument.createElement("button");ee.type="button",ee.className="rte-a11y-button rte-a11y-button-secondary",ee.innerText="Focus issue",ee.onclick=function(){s(Y)},oe.appendChild(z),oe.appendChild(ee),j.appendChild(oe);return}if(Y.code==="language-of-parts"){var se=j.ownerDocument.createElement("div");se.className="rte-a11y-row";var ae=j.ownerDocument.createElement("button");ae.type="button",ae.className="rte-a11y-button",ae.innerText="Mark as "+Y._script,ae.onclick=function(){l(U,{lang:Y._lang})};var fe=j.ownerDocument.createElement("button");fe.type="button",fe.className="rte-a11y-button rte-a11y-button-secondary",fe.innerText="Focus issue",fe.onclick=function(){s(Y)},se.appendChild(ae),se.appendChild(fe),j.appendChild(se);return}j.innerHTML+='<div class="rte-a11y-detail-copy">This issue is visible here, but does not have an automatic repair action yet.</div>'}function P(V,Y,Q){var te=j.ownerDocument.createElement("div");te.className="rte-a11y-field";var Z=j.ownerDocument.createElement("div");Z.className="rte-a11y-label",Z.innerText=V;var le=j.ownerDocument.createElement("input");le.type="text",le.className="rte-a11y-input",le.placeholder=Y;var ne=j.ownerDocument.createElement("div");ne.className="rte-a11y-row";var J=j.ownerDocument.createElement("button");J.type="button",J.className="rte-a11y-button",J.innerText="Apply fix",J.onclick=function(){var z=String(le.value||"").replace(/^\s+|\s+$/g,"");z&&Q(z)};var oe=j.ownerDocument.createElement("button");oe.type="button",oe.className="rte-a11y-button rte-a11y-button-secondary",oe.innerText="Focus issue",oe.onclick=function(){var z=N&&N.issues?N.issues:[];z[U]&&s(z[U])},ne.appendChild(J),ne.appendChild(oe),te.appendChild(Z),te.appendChild(le),j.appendChild(te),j.appendChild(ne)}function B(V){var Y=(V&&V.path?V.path:"").replace(/\.attrs\.level$/,""),Q=n.getJSON?n.getJSON():null;if(!Q||!Q.content)return 2;var te=0;function Z(ne,J){if(!ne||typeof ne.type!="string")return!1;if(J===Y)return!0;if(ne.type==="heading"&&ne.attrs&&typeof ne.attrs.level=="number"&&(te=ne.attrs.level),!ne.content||!ne.content.length)return!1;for(var oe=0;oe<ne.content.length;oe++)if(Z(ne.content[oe],J+".content["+oe+"]"))return!0;return!1}for(var le=0;le<Q.content.length&&!Z(Q.content[le],"content["+le+"]");le++);return Math.max(1,Math.min(6,(te||1)+(te?1:0)))}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),(function(){if(!(typeof document>"u")&&!(window.RTE_DefaultConfig&&window.RTE_DefaultConfig.aitoolkit_skip_auto_css)){for(var c=document.querySelectorAll("link[rel=stylesheet]"),n=0;n<c.length;n++){var S=c[n].getAttribute("href")||"";if(/(?:^|\/)aitoolkit\.css(?:\?.*)?$/i.test(S))return}for(var M=null,F=document.getElementsByTagName("script"),K=F.length-1;K>=0;K--){var j=F[K].getAttribute("src")||"";if(/(?:^|\/)(?:aitoolkit|all_plugins)\.js(?:\?.*)?$/i.test(j)){M=F[K];break}}var o=M?M.getAttribute("src"):"",N=o?o.replace(/[^/]+$/,"aitoolkit.css"):(window.RTE_DefaultConfig&&window.RTE_DefaultConfig.url_base||"/richtexteditor")+"/plugins/aitoolkit.css";N.indexOf("?")<0&&(N+="?v=20260703a");var U=document.createElement("link");U.rel="stylesheet",U.href=N,U.setAttribute("data-rte-auto-injected","aitoolkit"),(document.head||document.documentElement).appendChild(U)}})(),RTE_DefaultConfig.svgCode_aiassist||(RTE_DefaultConfig.svgCode_aiassist='<svg viewBox="0 0 24 24" width="20" height="20" fill="none" aria-hidden="true"><defs><linearGradient id="rte-ai-robot-shell" x1="5" y1="6" x2="19" y2="18" gradientUnits="userSpaceOnUse"><stop stop-color="#1fb6ff"/><stop offset=".52" stop-color="#2563eb"/><stop offset="1" stop-color="#7c3aed"/></linearGradient><linearGradient id="rte-ai-robot-glow" x1="8" y1="10" x2="16" y2="15" gradientUnits="userSpaceOnUse"><stop stop-color="#fef9c3"/><stop offset="1" stop-color="#fde68a"/></linearGradient></defs><path d="M12 2.4v2.4" stroke="#f59e0b" stroke-width="1.7" stroke-linecap="round"/><circle cx="12" cy="2.4" r="1" fill="#fbbf24"/><rect x="5.1" y="6.1" width="13.8" height="11.2" rx="3.4" fill="url(#rte-ai-robot-shell)" stroke="#1e40af" stroke-width="1.2"/><path d="M8.2 6.1V5.8A1.8 1.8 0 0110 4h4a1.8 1.8 0 011.8 1.8v.3" stroke="#93c5fd" stroke-width="1.2" stroke-linecap="round"/><rect x="7.7" y="9.2" width="8.6" height="4.8" rx="2.4" fill="#0f172a" opacity=".26"/><circle cx="10" cy="11.6" r="1.15" fill="url(#rte-ai-robot-glow)"/><circle cx="14" cy="11.6" r="1.15" fill="url(#rte-ai-robot-glow)"/><path d="M9.4 14.9c.8.55 1.66.83 2.6.83s1.8-.28 2.6-.83" stroke="#ffffff" stroke-width="1.45" stroke-linecap="round"/><path d="M8.1 19.2l1-2.1M15.9 19.2l-1-2.1" stroke="#2563eb" stroke-width="1.5" stroke-linecap="round"/><path d="M18.8 6.4l.55-1.25.55 1.25 1.25.55-1.25.55-.55 1.25-.55-1.25-1.25-.55z" fill="#fef08a"/></svg>',RTE_DefaultConfig.svgCode_aiassist='<svg viewBox="1.78 0.3 21.8 21.8" width="20" height="20" fill="none" aria-hidden="true"><defs><linearGradient id="rte-ai-bot-v5-shell" x1="3" y1="5" x2="21" y2="20" gradientUnits="userSpaceOnUse"><stop stop-color="#22d3ee"/><stop offset=".52" stop-color="#2563eb"/><stop offset="1" stop-color="#4338ca"/></linearGradient><linearGradient id="rte-ai-bot-v5-visor" x1="7" y1="8" x2="17" y2="15" gradientUnits="userSpaceOnUse"><stop stop-color="#f8fafc"/><stop offset="1" stop-color="#bfdbfe"/></linearGradient></defs><rect x="2.6" y="5.2" width="16.4" height="16" rx="4.8" fill="url(#rte-ai-bot-v5-shell)" stroke="#1e40af" stroke-width="1.6"/><rect x="5.9" y="9.1" width="9.8" height="6.8" rx="3.4" fill="url(#rte-ai-bot-v5-visor)"/><circle cx="8.6" cy="12.5" r="1.35" fill="#0f172a"/><circle cx="13" cy="12.5" r="1.35" fill="#0f172a"/><path d="M8.3 18.2c.9.7 1.8 1 2.5 1s1.6-.3 2.5-1" stroke="#eff6ff" stroke-width="1.7" stroke-linecap="round"/><path d="M19.6 .4l1.25 2.7 2.7 1.25-2.7 1.25-1.25 2.7-1.25-2.7-2.7-1.25 2.7-1.25z" fill="#fbbf24"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_open_dialog||(RTE_DefaultConfig.svgCode_aiassist_open_dialog=RTE_DefaultConfig.svgCode_aiassist),RTE_DefaultConfig.svgCode_aiassist_review||(RTE_DefaultConfig.svgCode_aiassist_review='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5.5 6.5h13"/><path d="M5.5 11.5h8"/><path d="M5.5 16.5h6"/><path d="M16.5 14.2l1.8 1.8 3.2-4.2"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_chat||(RTE_DefaultConfig.svgCode_aiassist_chat=RTE_DefaultConfig.svgCode_aiassist),RTE_DefaultConfig.svgCode_aiassist_proofread||(RTE_DefaultConfig.svgCode_aiassist_proofread='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="4.5"/><path d="M14 14l5 5"/><path d="M8.8 10.5l1.2 1.3 2.3-2.5"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_rewrite||(RTE_DefaultConfig.svgCode_aiassist_rewrite='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h11"/><path d="M4 12h8"/><path d="M4 17h11"/><path d="M16 5l4 4-6.5 6.5H9.5v-4z"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_translate||(RTE_DefaultConfig.svgCode_aiassist_translate='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 6.5h10"/><path d="M8 4v2.5"/><path d="M11 6.5c-.6 2.9-2.2 5.3-4.7 7.1"/><path d="M6.5 10.5c1.2.9 2.5 1.6 3.9 2.1"/><path d="M14.5 9.5h5"/><path d="M17 7v2.5"/><path d="M15 19l2-4.5 2 4.5"/><path d="M15.8 17.2h2.4"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_comment||(RTE_DefaultConfig.svgCode_aiassist_comment='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 7.5A3.5 3.5 0 019.5 4h8A3.5 3.5 0 0121 7.5v5a3.5 3.5 0 01-3.5 3.5H12l-4.5 3v-3H6A3.5 3.5 0 012.5 12.5v-5A3.5 3.5 0 016 4"/><path d="M8 9h8"/><path d="M8 12h5"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_paragraph||(RTE_DefaultConfig.svgCode_aiassist_paragraph='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 7h8"/><path d="M5 12h14"/><path d="M5 17h10"/><path d="M18 5v6"/><path d="M15 8h6"/></svg>'),RTE_DefaultConfig.svgCode_aiassist_justify||(RTE_DefaultConfig.svgCode_aiassist_justify='<svg viewBox="0 0 24 24" fill="none" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 7h14"/><path d="M5 11h14"/><path d="M5 15h9"/><path d="M16 14l2 2 3-4"/></svg>'),RTE_DefaultConfig.plugin_aitoolkit=RTE_Plugin_AIToolkit;function RTE_Plugin_AIToolkit(){var E=this,c,n;E.PluginName="AIToolkit",E.InitConfig=function(e){c=e,c.aiToolkitEnabled!==!1&&(c.text_aiassist=c.text_aiassist||"Ask AI",c.text_aireview=c.text_aireview||"AI Review",c.text_aichat=c.text_aichat||"AI Chat",c.aiToolkitTranslateLanguages=c.aiToolkitTranslateLanguages||[{value:"spanish",label:"Spanish"},{value:"french",label:"French"},{value:"german",label:"German"},{value:"italian",label:"Italian"},{value:"portuguese",label:"Portuguese"},{value:"japanese",label:"Japanese"}],c.aiToolkitActions=c.aiToolkitActions||[{id:"chat-panel",section:"Start",icon:"chat",title:"Chat",description:"Ask follow-up questions about this document.",target:"chat-panel"},{id:"open-dialog",section:"Start",icon:"open_dialog",title:"Draft",description:"Generate, rewrite, translate, or summarize before applying.",target:"dialog"},{id:"review-panel",section:"Start",icon:"review",title:"Review",description:"Accept or reject prepared AI edits.",target:"review-panel"},{id:"proofread",section:"Quick edit",icon:"proofread",title:"Proofread",description:"Check grammar, spacing, and clarity.",resolverMode:"proofread",target:"selection-preview"},{id:"rewrite",section:"Quick edit",icon:"rewrite",title:"Rewrite",description:"Improve clarity without changing intent.",resolverMode:"rewrite",target:"selection-preview"},{id:"translate",section:"Quick edit",icon:"translate",title:"Translate",description:"Choose a language and preview the result.",resolverMode:"translate",target:"dialog",autoRun:!1},{id:"justify",section:"Quick edit",icon:"justify",title:"Explain",description:"Rewrite and show why it changed.",resolverMode:"justify",target:"dialog",autoRun:!1},{id:"comment",section:"Insert",icon:"comment",title:"Add note",description:"Insert a short comment near the selection.",resolverMode:"comment",target:"comment"},{id:"paragraph",section:"Insert",icon:"paragraph",title:"Add paragraph",description:"Draft a supporting paragraph below.",resolverMode:"paragraph",target:"insert"}],c.aiToolkitChatPrompts=c.aiToolkitChatPrompts||[{id:"summarize",label:"Summarize",prompt:"Summarize the current content and suggest the clearest next edit."},{id:"proofread",label:"Proofread",prompt:"Proofread the current content and prepare a cleaner version I can review."},{id:"translate",label:"Translate",prompt:"Translate the current content into Spanish and prepare a reviewable version."},{id:"headings",label:"Headings",prompt:"Suggest better section titles and subheadings for this content."},{id:"expand",label:"Expand",prompt:"Add a short supporting paragraph that strengthens this content."}],c.aiToolkitDialogModes=c.aiToolkitDialogModes||[{id:"proofread",title:"Proofread",description:"Fix grammar & clarity."},{id:"rewrite",title:"Rewrite",description:"Rewrite for clarity."},{id:"translate",title:"Translate",description:"Translate to a language."},{id:"justify",title:"Explain rewrite",description:"Rewrite and explain why."},{id:"shorten",title:"Shorten",description:"Compress to be shorter."},{id:"expand",title:"Expand",description:"Add supporting detail."},{id:"summarize",title:"Summarize",description:"Summarize the source."}],c.aiToolkitResolver=c.aiToolkitResolver||null,c.aiToolkitOperationHandlers=c.aiToolkitOperationHandlers||{},c.aiToolkitPersistenceKey=c.aiToolkitPersistenceKey||"",c.aiToolkitReviewSyncInterval=c.aiToolkitReviewSyncInterval||15e3,c.aiToolkitSuggestionLedgerUrl=c.aiToolkitSuggestionLedgerUrl||"",c.aiToolkitReviewLogUrl=c.aiToolkitReviewLogUrl||"",c.aiToolkitAutoToolbarButtons=c.aiToolkitAutoToolbarButtons!==!1,c.aiToolkitUiVersion=c.aiToolkitUiVersion||"v20260520k",K("toolbar_default","#{aiassist}"),K("toolbar_basic","#{aiassist}"),K("toolbar_full","#{aiassist}"),K("toolbar_mobile","#{aiassist}"),j("controltoolbar_TEXT","|{aiassist}"),c.toolbarfactory_aiassist=function(t,r,a){var i=this;return i.createToolbarItemDropDownPanel(t,function(h){wc(h)})})},E.InitEditor=function(e){n=e,n.aiToolkit={normalizeText:l,ensureSentence:s,buildDemoResult:P,getTranslateLanguages:C,getTranslateLanguageLabel:u,getOperationContract:me,getActionDefinitions:ne,registerAction:ee,removeAction:se,getDialogModes:J,registerDialogMode:ae,removeDialogMode:fe,resolveAction:function(v,H){return Lt(v,H)},loadSelectionText:function(){var v=kt();return v.text||v.wholeText},loadDocumentText:function(){return l(n.getText?n.getText():"")},textToHtml:function(v){return Ve(v)},previewInlineSuggestion:function(v,H){return ds(v,H)},applyResult:function(v,H){return bo(v,H)},executeOperations:function(v,H){return Ii(v,H)},executeResolvedAction:function(v,H){return jn(v,H)},registerOperationHandler:Se,unregisterOperationHandler:ye,getSuggestions:function(){return Xe().slice()},clearSuggestions:function(){return Zu()},getReviewLogEntries:function(){return St().slice()},setResolver:function(v){c.aiToolkitResolver=typeof v=="function"?v:null},openChatPanel:function(v){vi(v)},closeChatPanel:function(){pi({restoreFocus:!0})},toggleChatPanel:function(v){Yc(v)},getChatSessions:function(v){return Fc(v)},loadChatSession:function(v,H){return Uc(v,H)},clearChatSessions:function(v){return zc(v)},openReviewPanel:function(v){Ho(v)},closeReviewPanel:function(){ba()},toggleReviewPanel:function(v){sd(v)},saveSuggestionLedger:function(){return $r()},loadSuggestionLedger:function(){return Wl()},loadRemoteSuggestionLedger:function(v,H){return Vl(v,H)},loadReviewLogEntries:function(v,H){return vt(v,H)},refreshRemoteReviewState:function(v,H){return Ea(v,H)},openDialog:function(v){xi(v)},runQuickAction:function(v,H){return ps(v,H)},setAgent:function(v){c.aiToolkitAgent=typeof v=="function"?v:null},runAgent:function(v,H){return xc(v,H)},streamRequest:function(v){return D(v)},exportDocx:function(v){return G(v)},importDocx:function(v){return L(v)}},cu(),n.reviewLedger={add:function(v){var H=Va(v);if(!H)return null;for(var X=Xe(),ie=0;ie<X.length;ie++)if(X[ie].id===H.id){X[ie]=H;break}return ie===X.length&&X.push(H),$r(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),H},update:function(v,H){for(var X=Xe(),ie=0;ie<X.length;ie++)if(X[ie].id===v){for(var ce in H)Object.prototype.hasOwnProperty.call(H,ce)&&(X[ie][ce]=H[ce]);return $r(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),X[ie]}return null},remove:function(v){for(var H=Xe(),X=0;X<H.length;X++)if(H[X].id===v)return H.splice(X,1),$r(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),!0;return!1},get:function(v){for(var H=Xe(),X=0;X<H.length;X++)if(H[X].id===v)return H[X];return null},list:function(v){var H=Xe().slice();return v?H.filter(function(X){return!(v.author&&X.author&&X.author.id!==v.author||v.status&&X.status!==v.status||v.changeType&&X.changeType!==v.changeType)}):H},refreshPanel:function(){n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1)}},n.attachEvent("exec_command_aiassist",function(v){v.returnValue=!0,v.stopBubble=!0,xi()}),n.attachEvent("exec_command_aichat",function(v){v.returnValue=!0,v.stopBubble=!0,vi({focusComposer:!0})});var t=n.getEditable(),r=t&&t.ownerDocument?t.ownerDocument:document;function a(v){if(!v.__rteAiInlinePreviewClickHandled){var H=v.target&&v.target.closest?v.target.closest("[data-rte-ai-suggestion-id]"):null;if(H){var X=H.getAttribute("data-rte-ai-suggestion-id");if(!(!X||!Kt(X))){v.__rteAiInlinePreviewClickHandled=!0;var ie=v.target&&v.target.closest?v.target.closest("[data-rte-ai-action]"):null;if(!ie){var ce=ut(),ve=H.ownerDocument?H.ownerDocument.activeElement:null;if(ve&&ve.getAttribute&&n.getEditable().contains(ve)&&(ce=ve.getAttribute("data-rte-ai-action")||ce),n.__aiReviewEmptyPreviewSuggestionId&&X===n.__aiReviewEmptyPreviewSuggestionId){Qr(X,{focusPanel:!0,focusAction:ce||ut(),openedQueue:!0});return}if(_r(X),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),go(X,ce))return;Li(H);return}v.preventDefault(),v.stopPropagation();var ge=ie.getAttribute("data-rte-ai-action"),he="",pe=n.__aiActiveSuggestionId===X;(ge==="accept"||ge==="reject")&&pe&&(he=bi(X)),ge==="accept"?Hi(X)&&(he?un(he,{focusInlineAction:ge}):pe&&pr(yo("Accepted",X))):ge==="reject"?Oi(X)&&(he?un(he,{focusInlineAction:ge}):pe&&pr(yo("Rejected",X))):ge==="review"?Qr(X,{focusPanel:!0}):ge==="previous"?vu(X,{focusInlineAction:ge})||pr(An(X,"previous")):ge==="next"?gu(X,{focusInlineAction:ge})||pr(An(X,"next")):ge==="shared-seen"?(Wo(),oi(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),pr("Shared AI review updates cleared for the current item."),Li(H)):ge==="undo"?ea({focusInlineAction:"undo"}):ge==="redo"&&pa({focusInlineAction:"redo"})}}}}function i(){t=n.getEditable?n.getEditable():null,r=t&&t.ownerDocument?t.ownerDocument:document,t&&n.__aiInlinePreviewEventEditable!==t&&(t.addEventListener("click",a),t.addEventListener("keydown",h),n.__aiInlinePreviewEventEditable=t),r&&n.__aiInlinePreviewEventDocument!==r&&(r.addEventListener("click",a,!0),r.addEventListener("keydown",h,!0),n.__aiInlinePreviewEventDocument=r)}function h(v){if(!v.__rteAiInlinePreviewKeydownHandled){var H=v.target&&v.target.closest?v.target.closest(".rte-ai-inline-preview"):v.target&&v.target.classList&&v.target.classList.contains("rte-ai-inline-preview")?v.target:null;if(H){var X=v.target&&v.target.closest?v.target.closest("[data-rte-ai-action]"):null,ie=H.getAttribute("data-rte-ai-suggestion-id");if(!(!ie||!Kt(ie)||v.ctrlKey||v.metaKey||v.altKey)){v.__rteAiInlinePreviewKeydownHandled=!0;var ce=(v.key||"").toLowerCase(),ve=X&&X.getAttribute&&X.getAttribute("data-rte-ai-action")||"",ge=ve||Yo(Kt(ie)),he=!!(n.__aiReviewEmptyPreviewSuggestionId&&ie===n.__aiReviewEmptyPreviewSuggestionId);if(he){(ce==="enter"||ce===" ")&&(v.preventDefault(),Qr(ie,{focusPanel:!0,focusAction:ve||ut(),openedQueue:!0}));return}if(ce==="arrowleft"||ce==="k")v.preventDefault(),vu(ie,{focusInlineAction:ve})||pr(An(ie,"previous"));else if(ce==="arrowright"||ce==="j")v.preventDefault(),gu(ie,{focusInlineAction:ve})||pr(An(ie,"next"));else if(ce==="home")v.preventDefault(),Ff(ie,{focusInlineAction:ve})||pr(An(ie,"first"));else if(ce==="end")v.preventDefault(),Uf(ie,{focusInlineAction:ve})||pr(An(ie,"last"));else if(ce==="a"){v.preventDefault();var pe=bi(ie);Hi(ie)&&(pe?un(pe,{focusInlineAction:ve}):pr(yo("Accepted",ie)))}else if(ce==="r"){v.preventDefault();var xe=bi(ie);Oi(ie)&&(xe?un(xe,{focusInlineAction:ve}):pr(yo("Rejected",ie)))}else if(ce==="u"&&!v.shiftKey&&Rn())v.preventDefault(),ea({focusInlineAction:ge||"accept"});else if(ce==="u"&&v.shiftKey){var Ce=Zn();Ce&&Ce.suggestion&&Ce.suggestion.id===ie&&(v.preventDefault(),pa({focusInlineAction:ge||"accept"}))}else if(ce==="g")bn(ie)&&(v.preventDefault(),Wo(),oi(),n.__aiReviewPanel&&n.__aiReviewPanel.isConnected&&Gt(!1),pr("Shared AI review updates cleared for the current item."),Li(H));else if(ce==="enter"||ce===" "){if(X)return;v.preventDefault(),go(ie,ve||ut())}}}}}n.__aiBindInlinePreviewEventHandlers=i,i(),Wl(),Ea(!1),Yu(),Xu()};var S={toolbar_default:"{bold,italic,underline,forecolor,backcolor}|{justifyleft,justifycenter,justifyright,justifyfull}|{insertorderedlist,insertunorderedlist,indent,outdent,insertblockquote,insertemoji}|{aiassist}#{toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",toolbar_mobile:"{bold,italic,underline|fontname:toggle,fontsize:toggle,menu_paragraphop|forecolor,backcolor}{insertlink,insertemoji,inserttable,insertimage,removeformat}|{aiassist}#{toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",toolbar_basic:"{bold,italic,underline}|{fontname,fontsize}|{insertlink,insertemoji,insertimage,insertvideo}|removeformat|code#{toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",toolbar_full:"{bold,italic,underline,forecolor,backcolor}|{justifyleft,justifycenter,justifyright,justifyfull}|{insertorderedlist,insertunorderedlist,indent,outdent}{superscript,subscript}|{insertlink,insertimage,insertvideo,inserttable,insertemoji,find,code,html2pdf}|{aiassist_chat,aiassist_review}|{insertcomment,trackchanges}#{insertmergefield,insertfootnote,inserttoc,insertpagebreak,revisionhistory,newdoc,save,toggleborder,fullscreenenter,fullscreenexit,undo,redo,togglemore}",controltoolbar_TEXT:"removeformat | {bold,italic,underline,forecolor,backcolor}|{fontname:toggle,fontsize:toggle}|{insertlink}"};function M(e){return String(e||"").replace(/\s+/g,"")}function F(e){if(c.aiToolkitAutoToolbarButtons===!1)return!1;var t=c[e];if(!t)return!0;var r=S[e];return r?M(t)===M(r):!0}function K(e,t){var r=c[e]||"";r.indexOf("aiassist")===-1&&F(e)&&(c[e]=r?r+" "+t:t)}function j(e,t){var r=c[e]||"";r.indexOf("aiassist")===-1&&F(e)&&(c[e]=r?r+t:t)}function o(e,t,r,a,i){var h=e.ownerDocument.createElement(t);return r&&(h.style.cssText=r),a&&(h.className=a),typeof i<"u"&&(h.innerText=i),e.appendChild(h),h}function N(e,t,r){var a=o(e,"div","",t,r);return a.setAttribute("aria-hidden","true"),a}function U(){return"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 240" role="img" aria-label="Editorial workspace photo"><defs><linearGradient id="ai-photo-sky" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="#e0f2fe"/><stop offset="52%" stop-color="#bfdbfe"/><stop offset="100%" stop-color="#ddd6fe"/></linearGradient><linearGradient id="ai-photo-desk" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#fef3c7"/><stop offset="100%" stop-color="#fdba74"/></linearGradient><filter id="ai-photo-blur" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="14"/></filter></defs><rect width="320" height="240" rx="28" fill="url(#ai-photo-sky)"/><circle cx="248" cy="52" r="40" fill="#ffffff" opacity=".55"/><circle cx="76" cy="44" r="34" fill="#fdf2f8" opacity=".65"/><path d="M0 174C37 155 68 151 99 162c24 9 47 23 75 17 20-4 31-17 51-23 28-7 54 6 95 18v66H0z" fill="#86efac" opacity=".92"/><path d="M0 188c34-24 66-27 100-15 32 12 63 26 95 17 23-6 44-24 66-26 22-2 39 7 59 18v48H0z" fill="#60a5fa" opacity=".3"/><g filter="url(#ai-photo-blur)" opacity=".34"><circle cx="248" cy="154" r="54" fill="#1d4ed8"/><circle cx="92" cy="134" r="48" fill="#7c3aed"/></g><rect x="74" y="72" width="172" height="110" rx="14" fill="#f8fafc" opacity=".95"/><rect x="88" y="86" width="144" height="14" rx="7" fill="#cbd5e1"/><rect x="88" y="110" width="118" height="10" rx="5" fill="#dbeafe"/><rect x="88" y="128" width="128" height="10" rx="5" fill="#dbeafe"/><rect x="88" y="146" width="82" height="10" rx="5" fill="#e9d5ff"/><rect x="198" y="138" width="34" height="28" rx="10" fill="url(#ai-photo-desk)"/><rect x="54" y="183" width="212" height="32" rx="16" fill="#ffffff" opacity=".68"/></svg>')}function $(){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 140" role="img" aria-hidden="true" focusable="false"><defs><linearGradient id="ai-illus-doc" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff"/><stop offset="100%" stop-color="#f1f5fb"/></linearGradient><linearGradient id="ai-illus-bubble" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="#3b82f6"/><stop offset="100%" stop-color="#6366f1"/></linearGradient><linearGradient id="ai-illus-sparkle" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#fbbf24"/><stop offset="100%" stop-color="#f59e0b"/></linearGradient></defs><ellipse cx="100" cy="118" rx="68" ry="8" fill="#0f172a" opacity="0.08"/><rect x="44" y="34" width="92" height="78" rx="10" fill="#cbd5e1" opacity="0.45" transform="translate(2,3)"/><rect x="44" y="34" width="92" height="78" rx="10" fill="url(#ai-illus-doc)" stroke="#cbd5e1" stroke-width="1"/><rect x="56" y="54" width="60" height="6" rx="3" fill="#dbeafe"/><rect x="56" y="66" width="68" height="5" rx="2.5" fill="#e2e8f0"/><rect x="56" y="76" width="52" height="5" rx="2.5" fill="#e2e8f0"/><rect x="56" y="90" width="44" height="5" rx="2.5" fill="#ede9fe"/><g><path d="M118 22 H162 a10 10 0 0 1 10 10 v22 a10 10 0 0 1 -10 10 H140 l-9 8 v-8 H118 a10 10 0 0 1 -10 -10 V32 a10 10 0 0 1 10 -10 z" fill="url(#ai-illus-bubble)"/><circle cx="128" cy="42" r="2.6" fill="#ffffff"/><circle cx="140" cy="42" r="2.6" fill="#ffffff"/><circle cx="152" cy="42" r="2.6" fill="#ffffff"/></g><g fill="url(#ai-illus-sparkle)"><path d="M36 28 l2 6 6 2 -6 2 -2 6 -2 -6 -6 -2 6 -2 z"/><path d="M168 88 l1.6 4.8 4.8 1.6 -4.8 1.6 -1.6 4.8 -1.6 -4.8 -4.8 -1.6 4.8 -1.6 z"/><path d="M30 92 l1.2 3.6 3.6 1.2 -3.6 1.2 -1.2 3.6 -1.2 -3.6 -3.6 -1.2 3.6 -1.2 z"/></g></svg>'}function W(e,t){var r=o(e,"div","","rte-ai-hero"+(t?" is-"+t:"")),a=o(r,"div","","rte-ai-hero-media"),i=o(a,"img","","rte-ai-hero-image");i.alt="Styled editorial workspace preview",i.src=U(),i.loading="eager",i.decoding="async";var h=o(r,"div","","rte-ai-hero-body");return o(h,"div","","rte-ai-hero-kicker",t==="dialog"?"Guided AI flow":"Beautiful drafting"),o(h,"div","","rte-ai-hero-title",t==="dialog"?"Review the change before it lands":"Shape the document with a calmer AI workspace"),o(h,"div","","rte-ai-hero-copy",t==="dialog"?"Load source text, compare the result, and apply only the version that improves the draft.":"Keep context visible, ask for help in smaller steps, and make each suggestion feel intentional."),r}function q(e,t,r){var a=o(e,"div","",t);return r&&a.setAttribute("data-rte-ai-review-group-label",r),o(a,"div","","rte-ai-review-control-group-body")}function x(e,t,r){var a=o(e,"div","",t);return r&&o(a,"div","","rte-ai-review-header-group-label",r),o(a,"div","","rte-ai-review-header-group-body")}function m(e){if(!e)return c.svgCode_aiassist||"";var t=e.icon||e.id||"open_dialog";return c["svgCode_aiassist_"+t]||c.svgCode_aiassist||""}function D(e){e=e||{};var t=e.url||"/richtextbox/ai/stream",r=e.body||{},a=typeof AbortController<"u"?new AbortController:null,i="",h=(function(){return typeof fetch!="function"||typeof ReadableStream>"u"?I(t,r,e):fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(r),signal:a?a.signal:void 0,credentials:"same-origin"}).then(function(v){if(!v.ok)throw new Error("AI stream failed: HTTP "+v.status);if(!v.body||typeof v.body.getReader!="function")return v.text().then(function(ge){return e.onDelta&&e.onDelta(ge),i=ge,e.onDone&&e.onDone(i),i});var H=v.body.getReader(),X=new TextDecoder("utf-8"),ie="";function ce(){return H.read().then(function(ge){if(ge.done)return e.onDone&&e.onDone(i),i;ie+=X.decode(ge.value,{stream:!0});for(var he;(he=ie.indexOf(`
|
|
2
2
|
|
|
3
3
|
`))>=0;){var pe=ie.slice(0,he);ie=ie.slice(he+2),ve(pe)}return ce()})}function ve(ge){for(var he="message",pe=[],xe=ge.split(`
|
|
4
4
|
`),Ce=0;Ce<xe.length;Ce++){var ct=xe[Ce];ct.indexOf("event:")===0?he=ct.slice(6).trim():ct.indexOf("data:")===0&&pe.push(ct.slice(5).trim())}if(pe.length!==0){var ke=pe.join(`
|
|
@@ -27,7 +27,7 @@ To add context: this extended version unpacks the idea with an additional senten
|
|
|
27
27
|
`),K=F.split(`
|
|
28
28
|
`);if(this.addControls==!0&&this.bar.appendChild(E.sh.Toolbar.Create(this)),this.showColumns){for(var j=this.CreateElement("div"),o=this.CreateElement("div"),N=10,U=1;U<=150;)U%N==0?(j.innerHTML+=U,U+=(U+"").length):(j.innerHTML+="·",U++);o.className="columns",o.appendChild(j),this.bar.appendChild(o)}for(var U=0,$=this.firstLine;U<K.length-1;U++,$++){var W=this.CreateElement("LI"),q=this.CreateElement("SPAN");W.className=U%2==0?"alt":"",q.innerHTML=K[U]+" ",W.appendChild(q),this.ol.appendChild(W)}this.div.innerHTML=""},E.sh.Highlighter.prototype.Highlight=function(F){function K(q){return q.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function j(q){return q.replace(/\n*$/,"").replace(/^\n*/,"")}function o(q){for(var x=E.sh.Utils.FixForBlogger(q).split(`
|
|
29
29
|
`),m=new Array,D=new RegExp("^\\s*","g"),I=1e3,G=0;G<x.length&&I>0;G++)if(K(x[G]).length!=0){var L=D.exec(x[G]);L!=null&&L.length>0&&(I=Math.min(L[0].length,I))}if(I>0)for(var G=0;G<x.length;G++)x[G]=x[G].substr(I);return x.join(`
|
|
30
|
-
`)}function N(q,x,m){return q.substr(x,m-x)}var U=0;if(F==null&&(F=""),this.originalCode=F,this.code=j(o(F)),this.div=this.CreateElement("DIV"),this.bar=this.CreateElement("DIV"),this.ol=this.CreateElement("OL"),this.matches=new Array,this.div.className="dp-highlighter",this.div.highlighter=this,this.bar.className="bar",this.ol.start=this.firstLine,this.CssClass!=null&&(this.ol.className=this.CssClass),this.collapse&&(this.div.className+=" collapsed"),this.noGutter&&(this.div.className+=" nogutter"),this.tabsToSpaces==!0&&(this.code=this.ProcessSmartTabs(this.code)),this.ProcessRegexList(),this.matches.length==0){this.AddBit(this.code,null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol);return}this.matches=this.matches.sort(E.sh.Highlighter.SortCallback);for(var $=0;$<this.matches.length;$++)this.IsInside(this.matches[$])&&(this.matches[$]=null);for(var $=0;$<this.matches.length;$++){var W=this.matches[$];W==null||W.length==0||(this.AddBit(N(this.code,U,W.index),null),this.AddBit(W.value,W.css),U=W.index+W.length)}this.AddBit(this.code.substr(U),null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol)},E.sh.Highlighter.prototype.GetKeywords=function(F){return"\\b"+F.replace(/ /g,"\\b|\\b")+"\\b"},E.sh.BloggerMode=function(){E.sh.isBloggerMode=!0},E.sh.HighlightAll=function(F,K,j,o,N,U){function $(){for(var w=arguments,k=0;k<w.length;k++)if(w[k]!=null){if(typeof w[k]=="string"&&w[k]!="")return w[k]+"";if(typeof w[k]=="object"&&w[k].value!="")return w[k].value+""}return null}function W(w,k){for(var y=0;y<k.length;y++)if(k[y]==w)return!0;return!1}function q(w,k,y){for(var O=new RegExp("^"+w+"\\[(\\w+)\\]$","gi"),R=null,A=0;A<k.length;A++)if((R=O.exec(k[A]))!=null)return R[1];return y}function x(w,k,y){for(var O=document.getElementsByTagName(y),R=0;R<O.length;R++)O[R].getAttribute("name")==k&&w.push(O[R])}var m=[F],D=null,I={},G="innerHTML";for(var L in E.sh.Brushes){var l=E.sh.Brushes[L].Aliases;if(l!=null)for(var s=0;s<l.length;s++)I[l[s]]=L}for(var s=0;s<m.length;s++){var F=m[s],C=$(F.attributes.class,F.className,F.attributes.language,F.language),p="";if(C!=null&&(C=C.split(":"),p=C[0].toLowerCase(),I[p]!=null)){D=new E.sh.Brushes[I[p]],F.style.display="none",D.noGutter=K==null?W("nogutter",C):!K,D.addControls=j??!W("nocontrols",C),D.collapse=o??W("collapse",C),D.showColumns=U??W("showcolumns",C);var u=document.getElementsByTagName("head")[0];if(D.Style&&u){var f=document.createElement("style");if(f.setAttribute("type","text/css"),f.styleSheet)f.styleSheet.cssText=D.Style;else{var T=document.createTextNode(D.Style);f.appendChild(T)}u.appendChild(f)}D.firstLine=N??parseInt(q("firstline",C,1)),D.Highlight(F[G]),D.source=F,F.parentNode.insertBefore(D.div,F)}}},E.sh.Brushes.JScript=function(){var F="abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-c"},E.sh.Brushes.JScript.prototype=new E.sh.Highlighter,E.sh.Brushes.JScript.Aliases=["js","jscript","javascript"],E.sh.Brushes.Java=function(){var F="abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws true transient try void volatile while";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-j",this.Style=".dp-j .annotation { color: #646464; }.dp-j .number { color: #C00000; }"},E.sh.Brushes.Java.prototype=new E.sh.Highlighter,E.sh.Brushes.Java.Aliases=["java"],E.sh.Brushes.Cpp=function(){var F="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t __wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler sig_atomic_t size_t _stat __stat64 _stati64 terminate_function time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf va_list wchar_t wctrans_t wctype_t wint_t signed",K="break case catch class const __finally __exception __try const_cast continue private public protected __declspec default delete deprecated dllexport dllimport do dynamic_cast else enum explicit extern if for friend goto inline mutable naked namespace new noinline noreturn nothrow register reinterpret_cast return selectany sizeof static static_cast struct switch template this thread throw true false try typedef typeid typename union using uuid virtual void volatile whcar_t while";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"keyword"}],this.CssClass="dp-cpp",this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"},E.sh.Brushes.Cpp.prototype=new E.sh.Highlighter,E.sh.Brushes.Cpp.Aliases=["cpp","c","c++"],E.sh.Brushes.CSharp=function(){var F="abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach get goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed set short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-c",this.Style=".dp-c .vars { color: #d00; }"},E.sh.Brushes.CSharp.prototype=new E.sh.Highlighter,E.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"],E.sh.Brushes.CSS=function(){var F="ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",K="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",j="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(F),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS(K),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(j),"g"),css:"value"}],this.CssClass="dp-css",this.Style=".dp-css .value { color: black; }.dp-css .important { color: red; }"},E.sh.Highlighter.prototype.GetKeywordsCSS=function(F){return"\\b([a-z_]|)"+F.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"},E.sh.Highlighter.prototype.GetValuesCSS=function(F){return"\\b"+F.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"},E.sh.Brushes.CSS.prototype=new E.sh.Highlighter,E.sh.Brushes.CSS.Aliases=["css"],E.sh.Brushes.Php=function(){var F="abs acos acosh addcslashes addslashes array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists closedir closelog copy cos cosh count count_chars date decbin dechex decoct deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime strtoupper strtr strval substr substr_compare",K="and or xor __FILE__ __LINE__ array as break case cfunction class const continue declare default die do else elseif empty enddeclare endfor endforeach endif endswitch endwhile extends for foreach function include include_once global if new old_function return static switch use require require_once var while __FUNCTION__ __CLASS__ __METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(F),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"keyword"}],this.CssClass="dp-c"},E.sh.Brushes.Php.prototype=new E.sh.Highlighter,E.sh.Brushes.Php.Aliases=["php"],E.sh.Brushes.Python=function(){var F="and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try yield while",K="None True False self cls class_";this.regexList=[{regex:E.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp(`(['"]{3})([^\\1])*?\\1`,"gm"),css:"comment"},{regex:new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"',"gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"special"}],this.CssClass="dp-py",this.Style=".dp-py .builtins { color: #ff1493; }.dp-py .magicmethods { color: #808080; }.dp-py .exceptions { color: brown; }.dp-py .types { color: brown; font-style: italic; }.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"},E.sh.Brushes.Python.prototype=new E.sh.Highlighter,E.sh.Brushes.Python.Aliases=["py","python"],E.sh.Brushes.Xml=function(){this.CssClass="dp-xml",this.Style=".dp-xml .cdata { color: #ff1493; }.dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }.dp-xml .attribute { color: red; }.dp-xml .attribute-value { color: blue; }"},E.sh.Brushes.Xml.prototype=new E.sh.Highlighter,E.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"],E.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function F(N,U){N[N.length]=U}var K=0,j=null,o=null;for(this.GetMatches(new RegExp("(<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](>|>)","gm"),"cdata"),this.GetMatches(new RegExp("(<|<)!--\\s*.*?\\s*--(>|>)","gm"),"comments"),o=new RegExp(`([:\\w-.]+)\\s*=\\s*(".*?"|'.*?'|\\w+)*|(\\w+)`,"gm");(j=o.exec(this.code))!=null;)j[1]!=null&&(F(this.matches,new E.sh.Match(j[1],j.index,"attribute")),j[2]!=null&&F(this.matches,new E.sh.Match(j[2],j.index+j[0].indexOf(j[2]),"attribute-value")));for(this.GetMatches(new RegExp("(<|<)/*\\?*(?!\\!)|/*\\?*(>|>)","gm"),"tag"),o=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");(j=o.exec(this.code))!=null;)F(this.matches,new E.sh.Match(j[1],j.index+j[0].indexOf(j[1]),"tag-name"))},E.sh.Brushes.Vb=function(){var F="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit False Finally For Friend Function Get GetType GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-vb"},E.sh.Brushes.Vb.prototype=new E.sh.Highlighter,E.sh.Brushes.Vb.Aliases=["vb","vb.net"],E.sh.Brushes.Ruby=function(){var F="alias and BEGIN begin break case class def define_method defined do each else elsif END end ensure false for if in module new next nil not or raise redo rescue retry return self super then throw true undef unless until when while yield",K="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ThreadGroup Thread Time TrueClass";this.regexList=[{regex:E.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"builtin"}],this.CssClass="dp-rb",this.Style=".dp-rb .symbol { color: #a70; }.dp-rb .variable { color: #a70; font-weight: bold; }"},E.sh.Brushes.Ruby.prototype=new E.sh.Highlighter,E.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"],E.sh.Brushes.Sql=function(){var F="abs avg case cast coalesce convert count current_timestamp current_user day isnull left lower month nullif replace right session_user space substring sum system_user upper user year",K="absolute action add after alter as asc at authorization begin bigint binary bit by cascade char character check checkpoint close collate column commit committed connect connection constraint contains continue create cube current current_date current_time cursor database date deallocate dec decimal declare default delete desc distinct double drop dynamic else end end-exec escape except exec execute false fetch first float for force foreign forward free from full function global goto grant group grouping having hour ignore index inner insensitive insert instead int integer intersect into is isolation key last level load local max min minute modify move name national nchar next no numeric of off on only open option order out output partial password precision prepare primary prior privileges procedure public read real references relative repeatable restrict return returns revoke rollback rollup rows rule schema scroll second section select sequence serializable set size smallint static statistics table temp temporary then time timestamp to top transaction translation trigger true truncate uncommitted union unique update values varchar varying view when where with work",j="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(F),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(j),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords(K),"gmi"),css:"keyword"}],this.CssClass="dp-sql",this.Style=".dp-sql .func { color: #ff1493; }.dp-sql .op { color: #808080; }"},E.sh.Brushes.Sql.prototype=new E.sh.Highlighter,E.sh.Brushes.Sql.Aliases=["sql"];var c=this,n,S;c.PluginName="InsertCode",c.InitConfig=function(F){n=F},c.InitEditor=function(F){S=F,S.attachEvent("exec_command_insertcode",function(K,j,o){c.DoShowDialog(),K.returnValue=!0}),S.toolbarFactoryMap.insertcode=function(K){var j=S.createToolbarButton(K);return j.style.backgroundColor="",j}};function M(F,K,j,o){var N=F.ownerDocument.createElement(K);return j&&(N.style.cssText=j),o&&(N.className=o),F.appendChild(N),N}c.DoShowDialog=function(){var F=null;try{var K=S.getDocument(),j=K.defaultView.getSelection();j&&j.rangeCount&&(F=j.getRangeAt(0).cloneRange())}catch{F=null}function o(){if(!F)return!1;try{var l=S.getDocument(),s=l.defaultView.getSelection();return s.removeAllRanges(),s.addRange(F),!0}catch{return!1}}function N(l){if(!o())return!1;var s=S.getDocument(),C=s.defaultView.getSelection();if(!C||!C.rangeCount)return!1;for(var p=C.getRangeAt(0),u=p.startContainer,f=null;u&&u!==s.body;){if(u.nodeType===1&&/^(P|H[1-6]|LI|TD|TH|DIV|BLOCKQUOTE)$/.test(u.tagName)){f=u;break}u=u.parentNode}var T=s.createElement("div");T.innerHTML=l;var w=T.firstChild;if(!w)return!1;if(!f||!/^(P|H[1-6])$/.test(f.tagName))return p.deleteContents(),p.insertNode(w),!0;p.deleteContents();var k=p.cloneRange();k.setEndAfter(f.lastChild||f);var y=k.extractContents();f.parentNode.insertBefore(w,f.nextSibling);var O=s.createElement(f.tagName);return O.appendChild(y),(O.textContent.replace(/^\s+|\s+$/g,"")!==""||O.querySelector("*"))&&f.parentNode.insertBefore(O,w.nextSibling),f.textContent.replace(/^\s+|\s+$/g,"")===""&&!f.querySelector("img,table")&&f.parentNode.removeChild(f),!0}var U=S.createDialog(S.getLangText("insertcode"),"rte-dialog-insertcode"),$=M(U,"div","position:relative;text-align:center;");M($,"label").innerText=S.getLangText("language")+":";var W=M($,"select","width:200px;");W.options.add(new Option("Plain Text",""));for(var q in E.sh.Brushes){var x=E.sh.Brushes[q].Aliases;if(x!=null){W.options.add(new Option(x,q));var m=sessionStorage.getItem("rte-insertcode-lang");m&&(W.value=m)}}var D=M(U,"div","position:relative;text-align:center;"),I=M(D,"textarea","width:100%;min-width:300px;height:200px"),G=M(U,"rte-dialog-footer",null,"rte-dialog-footer-center"),L=M(G,"rte-dialog-button");L.innerText="Insert",setTimeout(function(){I.focus()},300),L.onclick=function(){if(U.close(),sessionStorage.setItem("rte-insertcode-lang",W.value),W.value!=""){var l=E.sh.Brushes[W.value];I.language=l.Aliases[0]+":nocontrols",I.name="rteinsertcode"+new Date().getTime(),I.textContent=I.value,E.sh.HighlightAll(I);var s=I.previousSibling;if(!N('<div class="dp-highlighter">'+s.innerHTML+"</div>")){var C=S.insertRootParagraph();C.innerHTML='<div class="dp-highlighter">'+s.innerHTML+"</div>"}}else if(o())S.insertText(I.value);else{var C=S.insertRootParagraph();C.innerText=I.value}S.focus()}}}RTE_DefaultConfig.plugin_insertemoji=RTE_Plugin_InsertEmoji;function RTE_Plugin_InsertEmoji(){function E(N){if(N.length>2)return N;if(N.length==1||N.charCodeAt(1)==65039||N.charCodeAt(1)==65039)return"&#"+N.charCodeAt(0)+";";var U=N.charCodeAt(0)-55356;if(U<0&&U>3)return N;var $=N.charCodeAt(1)-56324,W=U*1024+$+126980;return"&#x"+W.toString(16)+";"}var c=["smileys","people","animals","food","travel","activities","objects","symbols"],n=["\u{1F600}#grinning face|\u{1F603}#grinning face with big eyes|\u{1F604}#grinning face with smiling eyes|\u{1F601}#beaming face with smiling eyes|\u{1F606}#grinning squinting face|\u{1F605}#grinning face with sweat|\u{1F923}#rolling on the floor laughing|\u{1F602}#face with tears of joy|\u{1F642}#slightly smiling face|\u{1F643}#upside-down face|\u{1F609}#winking face|\u{1F60A}#smiling face with smiling eyes|\u{1F607}#smiling face with halo|\u{1F60D}#smiling face with heart-eyes|\u{1F929}#star-struck|\u{1F618}#face blowing a kiss|\u{1F617}#kissing face|\u{1F61A}#kissing face with closed eyes|\u{1F619}#kissing face with smiling eyes|\u{1F60B}#face savoring food|\u{1F61B}#face with tongue|\u{1F61C}#winking face with tongue|\u{1F92A}#zany face|\u{1F61D}#squinting face with tongue|\u{1F911}#money-mouth face|\u{1F917}#hugging face|\u{1F92D}#face with hand over mouth|\u{1F92B}#shushing face|\u{1F914}#thinking face|\u{1F910}#zipper-mouth face|\u{1F928}#face with raised eyebrow|\u{1F610}#neutral face|\u{1F611}#expressionless face|\u{1F636}#face without mouth|\u{1F60F}#smirking face|\u{1F612}#unamused face|\u{1F644}#face with rolling eyes|\u{1F62C}#grimacing face|\u{1F925}#lying face|\u{1F60C}#relieved face|\u{1F614}#pensive face|\u{1F62A}#sleepy face|\u{1F924}#drooling face|\u{1F634}#sleeping face|\u{1F637}#face with medical mask|\u{1F912}#face with thermometer|\u{1F915}#face with head-bandage|\u{1F922}#nauseated face|\u{1F92E}#face vomiting|\u{1F927}#sneezing face|\u{1F635}#dizzy face|\u{1F92F}#exploding head|\u{1F920}#cowboy hat face|\u{1F60E}#smiling face with sunglasses|\u{1F913}#nerd face|\u{1F9D0}#face with monocle|\u{1F615}#confused face|\u{1F61F}#worried face|\u{1F641}#slightly frowning face|\u2639\uFE0F#frowning face|\u{1F62E}#face with open mouth|\u{1F62F}#hushed face|\u{1F632}#astonished face|\u{1F633}#flushed face|\u{1F626}#frowning face with open mouth|\u{1F627}#anguished face|\u{1F628}#fearful face|\u{1F630}#anxious face with sweat|\u{1F625}#sad but relieved face|\u{1F622}#crying face|\u{1F62D}#loudly crying face|\u{1F631}#face screaming in fear|\u{1F616}#confounded face|\u{1F623}#persevering face|\u{1F61E}#disappointed face|\u{1F613}#downcast face with sweat|\u{1F629}#weary face|\u{1F62B}#tired face|\u{1F624}#face with steam from nose|\u{1F621}#pouting face|\u{1F620}#angry face|\u{1F92C}#face with symbols on mouth|\u{1F608}#smiling face with horns|\u{1F47F}#angry face with horns|\u{1F480}#skull|\u2620\uFE0F#skull and crossbones|\u{1F4A9}#pile of poo|\u{1F921}#clown face|\u{1F479}#ogre|\u{1F47A}#goblin|\u{1F47B}#ghost|\u{1F47D}#alien|\u{1F47E}#alien monster|\u{1F916}#robot|\u{1F63A}#grinning cat|\u{1F638}#grinning cat with smiling eyes|\u{1F639}#cat with tears of joy|\u{1F63B}#smiling cat with heart-eyes|\u{1F63C}#cat with wry smile|\u{1F63D}#kissing cat|\u{1F640}#weary cat|\u{1F63F}#crying cat|\u{1F63E}#pouting cat|\u{1F648}#see-no-evil monkey|\u{1F649}#hear-no-evil monkey|\u{1F64A}#speak-no-evil monkey|\u{1F48B}#kiss mark|\u{1F48C}#love letter|\u{1F498}#heart with arrow|\u{1F49D}#heart with ribbon|\u{1F496}#sparkling heart|\u{1F497}#growing heart|\u{1F493}#beating heart|\u{1F49E}#revolving hearts|\u{1F495}#two hearts|\u{1F49F}#heart decoration|\u2763\uFE0F#heart exclamation|\u{1F494}#broken heart|\u2764\uFE0F#red heart|\u{1F9E1}#orange heart|\u{1F49B}#yellow heart|\u{1F49A}#green heart|\u{1F499}#blue heart|\u{1F49C}#purple heart|\u{1F5A4}#black heart|\u{1F4AF}#hundred points|\u{1F4A2}#anger symbol|\u{1F4A5}#collision|\u{1F4AB}#dizzy|\u{1F4A6}#sweat droplets|\u{1F4A8}#dashing away|\u{1F4A3}#bomb|\u{1F4AC}#speech balloon|\u{1F4AD}#thought balloon|\u{1F4A4}#zzz","\u{1F44B}#waving hand|\u{1F91A}#raised back of hand|\u270B#raised hand|\u{1F596}#vulcan salute|\u{1F44C}#OK hand|\u270C\uFE0F#victory hand|\u{1F91E}#crossed fingers|\u{1F91F}#love-you gesture|\u{1F918}#sign of the horns|\u{1F919}#call me hand|\u{1F448}#backhand index pointing left|\u{1F449}#backhand index pointing right|\u{1F446}#backhand index pointing up|\u{1F595}#middle finger|\u{1F447}#backhand index pointing down|\u261D\uFE0F#index pointing up|\u{1F44D}#thumbs up|\u{1F44E}#thumbs down|\u270A#raised fist|\u{1F44A}#oncoming fist|\u{1F91B}#left-facing fist|\u{1F91C}#right-facing fist|\u{1F44F}#clapping hands|\u{1F64C}#raising hands|\u{1F450}#open hands|\u{1F932}#palms up together|\u{1F91D}#handshake|\u{1F64F}#folded hands|\u270D\uFE0F#writing hand|\u{1F485}#nail polish|\u{1F933}#selfie|\u{1F4AA}#flexed biceps|\u{1F442}#ear|\u{1F443}#nose|\u{1F9E0}#brain|\u{1F440}#eyes|\u{1F445}#tongue|\u{1F444}#mouth|\u{1F476}#baby|\u{1F9D2}#child|\u{1F466}#boy|\u{1F467}#girl|\u{1F9D1}#person|\u{1F471}#person with blond hair|\u{1F468}#man|\u{1F9D4}#man with beard|\u{1F469}#woman|\u{1F9D3}#older person|\u{1F474}#old man|\u{1F475}#old woman|\u{1F64D}#person frowning|\u{1F64E}#person pouting|\u{1F645}#person gesturing NO|\u{1F646}#person gesturing OK|\u{1F481}#person tipping hand|\u{1F64B}#person raising hand|\u{1F647}#person bowing|\u{1F926}#person facepalming|\u{1F937}#person shrugging|\u{1F46E}#police officer|\u{1F482}#guard|\u{1F477}#construction worker|\u{1F934}#prince|\u{1F478}#princess|\u{1F473}#person wearing turban|\u{1F472}#person with skullcap|\u{1F9D5}#woman with headscarf|\u{1F935}#person in tuxedo|\u{1F470}#person with veil|\u{1F930}#pregnant woman|\u{1F931}#breast-feeding|\u{1F47C}#baby angel|\u{1F385}#Santa Claus|\u{1F936}#Mrs. Claus|\u{1F9D9}#mage|\u{1F9DA}#fairy|\u{1F9DB}#vampire|\u{1F9DC}#merperson|\u{1F9DD}#elf|\u{1F9DE}#genie|\u{1F9DF}#zombie|\u{1F486}#person getting massage|\u{1F487}#person getting haircut|\u{1F6B6}#person walking|\u{1F3C3}#person running|\u{1F483}#woman dancing|\u{1F57A}#man dancing|\u{1F46F}#people with bunny ears|\u{1F9D6}#person in steamy room|\u{1F9D7}#person climbing|\u{1F93A}#person fencing|\u{1F3C7}#horse racing|\u26F7\uFE0F#skier|\u{1F3C2}#snowboarder|\u{1F3C4}#person surfing|\u{1F6A3}#person rowing boat|\u{1F3CA}#person swimming|\u26F9\uFE0F#person bouncing ball|\u{1F6B4}#person biking|\u{1F6B5}#person mountain biking|\u{1F938}#person cartwheeling|\u{1F93C}#people wrestling|\u{1F93D}#person playing water polo|\u{1F93E}#person playing handball|\u{1F939}#person juggling|\u{1F9D8}#person in lotus position|\u{1F6C0}#person taking bath|\u{1F6CC}#person in bed|\u{1F46D}#women holding hands|\u{1F46B}#woman and man holding hands|\u{1F46C}#men holding hands|\u{1F48F}#kiss|\u{1F491}#couple with heart|\u{1F46A}#family|\u{1F464}#bust in silhouette|\u{1F465}#busts in silhouette|\u{1F463}#footprints","\u{1F435}#monkey face|\u{1F412}#monkey|\u{1F98D}#gorilla|\u{1F436}#dog face|\u{1F415}#dog|\u{1F429}#poodle|\u{1F43A}#wolf|\u{1F98A}#fox|\u{1F431}#cat face|\u{1F408}#cat|\u{1F981}#lion|\u{1F42F}#tiger face|\u{1F405}#tiger|\u{1F406}#leopard|\u{1F434}#horse face|\u{1F40E}#horse|\u{1F984}#unicorn|\u{1F993}#zebra|\u{1F98C}#deer|\u{1F42E}#cow face|\u{1F402}#ox|\u{1F403}#water buffalo|\u{1F404}#cow|\u{1F437}#pig face|\u{1F416}#pig|\u{1F417}#boar|\u{1F43D}#pig nose|\u{1F40F}#ram|\u{1F411}#ewe|\u{1F410}#goat|\u{1F42A}#camel|\u{1F42B}#two-hump camel|\u{1F992}#giraffe|\u{1F418}#elephant|\u{1F98F}#rhinoceros|\u{1F42D}#mouse face|\u{1F401}#mouse|\u{1F400}#rat|\u{1F439}#hamster|\u{1F430}#rabbit face|\u{1F407}#rabbit|\u{1F994}#hedgehog|\u{1F987}#bat|\u{1F43B}#bear|\u{1F428}#koala|\u{1F43C}#panda|\u{1F43E}#paw prints|\u{1F983}#turkey|\u{1F414}#chicken|\u{1F413}#rooster|\u{1F423}#hatching chick|\u{1F424}#baby chick|\u{1F425}#front-facing baby chick|\u{1F426}#bird|\u{1F427}#penguin|\u{1F985}#eagle|\u{1F986}#duck|\u{1F989}#owl|\u{1F438}#frog|\u{1F40A}#crocodile|\u{1F422}#turtle|\u{1F98E}#lizard|\u{1F40D}#snake|\u{1F432}#dragon face|\u{1F409}#dragon|\u{1F995}#sauropod|\u{1F996}#T-Rex|\u{1F433}#spouting whale|\u{1F40B}#whale|\u{1F42C}#dolphin|\u{1F41F}#fish|\u{1F420}#tropical fish|\u{1F421}#blowfish|\u{1F988}#shark|\u{1F419}#octopus|\u{1F41A}#spiral shell|\u{1F40C}#snail|\u{1F98B}#butterfly|\u{1F41B}#bug|\u{1F41C}#ant|\u{1F41D}#honeybee|\u{1F41E}#lady beetle|\u{1F997}#cricket|\u{1F982}#scorpion|\u{1F490}#bouquet|\u{1F338}#cherry blossom|\u{1F4AE}#white flower|\u{1F339}#rose|\u{1F940}#wilted flower|\u{1F33A}#hibiscus|\u{1F33B}#sunflower|\u{1F33C}#blossom|\u{1F337}#tulip|\u{1F331}#seedling|\u{1F332}#evergreen tree|\u{1F333}#deciduous tree|\u{1F334}#palm tree|\u{1F335}#cactus|\u{1F33E}#sheaf of rice|\u{1F33F}#herb|\u2618\uFE0F#shamrock|\u{1F340}#four leaf clover|\u{1F341}#maple leaf|\u{1F342}#fallen leaf|\u{1F343}#leaf fluttering in wind","\u{1F347}#grapes|\u{1F348}#melon|\u{1F349}#watermelon|\u{1F34A}#tangerine|\u{1F34B}#lemon|\u{1F34C}#banana|\u{1F34D}#pineapple|\u{1F34E}#red apple|\u{1F34F}#green apple|\u{1F350}#pear|\u{1F351}#peach|\u{1F352}#cherries|\u{1F353}#strawberry|\u{1F95D}#kiwi fruit|\u{1F345}#tomato|\u{1F965}#coconut|\u{1F951}#avocado|\u{1F346}#eggplant|\u{1F954}#potato|\u{1F955}#carrot|\u{1F33D}#ear of corn|\u{1F952}#cucumber|\u{1F966}#broccoli|\u{1F344}#mushroom|\u{1F95C}#peanuts|\u{1F330}#chestnut|\u{1F35E}#bread|\u{1F950}#croissant|\u{1F956}#baguette bread|\u{1F968}#pretzel|\u{1F95E}#pancakes|\u{1F9C0}#cheese wedge|\u{1F356}#meat on bone|\u{1F357}#poultry leg|\u{1F969}#cut of meat|\u{1F953}#bacon|\u{1F354}#hamburger|\u{1F35F}#french fries|\u{1F355}#pizza|\u{1F32D}#hot dog|\u{1F96A}#sandwich|\u{1F32E}#taco|\u{1F32F}#burrito|\u{1F959}#stuffed flatbread|\u{1F95A}#egg|\u{1F373}#cooking|\u{1F958}#shallow pan of food|\u{1F372}#pot of food|\u{1F963}#bowl with spoon|\u{1F957}#green salad|\u{1F37F}#popcorn|\u{1F96B}#canned food|\u{1F371}#bento box|\u{1F358}#rice cracker|\u{1F359}#rice ball|\u{1F35A}#cooked rice|\u{1F35B}#curry rice|\u{1F35C}#steaming bowl|\u{1F35D}#spaghetti|\u{1F360}#roasted sweet potato|\u{1F362}#oden|\u{1F363}#sushi|\u{1F364}#fried shrimp|\u{1F365}#fish cake with swirl|\u{1F361}#dango|\u{1F95F}#dumpling|\u{1F960}#fortune cookie|\u{1F961}#takeout box|\u{1F980}#crab|\u{1F990}#shrimp|\u{1F991}#squid|\u{1F366}#soft ice cream|\u{1F367}#shaved ice|\u{1F368}#ice cream|\u{1F369}#doughnut|\u{1F36A}#cookie|\u{1F382}#birthday cake|\u{1F370}#shortcake|\u{1F967}#pie|\u{1F36B}#chocolate bar|\u{1F36C}#candy|\u{1F36D}#lollipop|\u{1F36E}#custard|\u{1F36F}#honey pot|\u{1F37C}#baby bottle|\u{1F95B}#glass of milk|\u2615#hot beverage|\u{1F375}#teacup without handle|\u{1F376}#sake|\u{1F37E}#bottle with popping cork|\u{1F377}#wine glass|\u{1F378}#cocktail glass|\u{1F379}#tropical drink|\u{1F37A}#beer mug|\u{1F37B}#clinking beer mugs|\u{1F942}#clinking glasses|\u{1F943}#tumbler glass|\u{1F964}#cup with straw|\u{1F962}#chopsticks|\u{1F374}#fork and knife|\u{1F944}#spoon|\u{1F52A}#kitchen knife|\u{1F3FA}#amphora","\u{1F30D}#globe showing Europe-Africa|\u{1F30E}#globe showing Americas|\u{1F30F}#globe showing Asia-Australia|\u{1F310}#globe with meridians|\u{1F5FE}#map of Japan|\u26F0\uFE0F#mountain|\u{1F30B}#volcano|\u{1F5FB}#mount fuji|\u{1F3E0}#house|\u{1F3E1}#house with garden|\u{1F3E2}#office building|\u{1F3E3}#Japanese post office|\u{1F3E4}#post office|\u{1F3E5}#hospital|\u{1F3E6}#bank|\u{1F3E8}#hotel|\u{1F3E9}#love hotel|\u{1F3EA}#convenience store|\u{1F3EB}#school|\u{1F3EC}#department store|\u{1F3ED}#factory|\u{1F3EF}#Japanese castle|\u{1F3F0}#castle|\u{1F492}#wedding|\u{1F5FC}#Tokyo tower|\u{1F5FD}#Statue of Liberty|\u26EA#church|\u{1F54C}#mosque|\u{1F54D}#synagogue|\u26E9\uFE0F#shinto shrine|\u{1F54B}#kaaba|\u26F2#fountain|\u26FA#tent|\u{1F301}#foggy|\u{1F303}#night with stars|\u{1F304}#sunrise over mountains|\u{1F305}#sunrise|\u{1F306}#cityscape at dusk|\u{1F307}#sunset|\u{1F309}#bridge at night|\u2668\uFE0F#hot springs|\u{1F3A0}#carousel horse|\u{1F3A1}#ferris wheel|\u{1F3A2}#roller coaster|\u{1F488}#barber pole|\u{1F3AA}#circus tent|\u{1F682}#locomotive|\u{1F683}#railway car|\u{1F684}#high-speed train|\u{1F685}#bullet train|\u{1F686}#train|\u{1F687}#metro|\u{1F688}#light rail|\u{1F689}#station|\u{1F68A}#tram|\u{1F69D}#monorail|\u{1F69E}#mountain railway|\u{1F68B}#tram car|\u{1F68C}#bus|\u{1F68D}#oncoming bus|\u{1F68E}#trolleybus|\u{1F690}#minibus|\u{1F691}#ambulance|\u{1F692}#fire engine|\u{1F693}#police car|\u{1F694}#oncoming police car|\u{1F695}#taxi|\u{1F696}#oncoming taxi|\u{1F697}#automobile|\u{1F698}#oncoming automobile|\u{1F699}#sport utility vehicle|\u{1F69A}#delivery truck|\u{1F69B}#articulated lorry|\u{1F69C}#tractor|\u{1F6F5}#motor scooter|\u{1F6B2}#bicycle|\u{1F6F4}#kick scooter|\u{1F68F}#bus stop|\u26FD#fuel pump|\u{1F6A8}#police car light|\u{1F6A5}#horizontal traffic light|\u{1F6A6}#vertical traffic light|\u{1F6D1}#stop sign|\u{1F6A7}#construction|\u2693#anchor|\u26F5#sailboat|\u{1F6F6}#canoe|\u{1F6A4}#speedboat|\u26F4\uFE0F#ferry|\u{1F6A2}#ship|\u2708\uFE0F#airplane|\u{1F6EB}#airplane departure|\u{1F6EC}#airplane arrival|\u{1F4BA}#seat|\u{1F681}#helicopter|\u{1F69F}#suspension railway|\u{1F6A0}#mountain cableway|\u{1F6A1}#aerial tramway|\u{1F680}#rocket|\u{1F6F8}#flying saucer|\u231B#hourglass done|\u23F3#hourglass not done|\u231A#watch|\u23F0#alarm clock|\u23F1\uFE0F#stopwatch|\u23F2\uFE0F#timer clock|\u{1F55B}#twelve o\u2019clock|\u{1F567}#twelve-thirty|\u{1F550}#one o\u2019clock|\u{1F55C}#one-thirty|\u{1F551}#two o\u2019clock|\u{1F55D}#two-thirty|\u{1F552}#three o\u2019clock|\u{1F55E}#three-thirty|\u{1F553}#four o\u2019clock|\u{1F55F}#four-thirty|\u{1F554}#five o\u2019clock|\u{1F560}#five-thirty|\u{1F555}#six o\u2019clock|\u{1F561}#six-thirty|\u{1F556}#seven o\u2019clock|\u{1F562}#seven-thirty|\u{1F557}#eight o\u2019clock|\u{1F563}#eight-thirty|\u{1F558}#nine o\u2019clock|\u{1F564}#nine-thirty|\u{1F559}#ten o\u2019clock|\u{1F565}#ten-thirty|\u{1F55A}#eleven o\u2019clock|\u{1F566}#eleven-thirty|\u{1F311}#new moon|\u{1F312}#waxing crescent moon|\u{1F313}#first quarter moon|\u{1F314}#waxing gibbous moon|\u{1F315}#full moon|\u{1F316}#waning gibbous moon|\u{1F317}#last quarter moon|\u{1F318}#waning crescent moon|\u{1F319}#crescent moon|\u{1F31A}#new moon face|\u{1F31B}#first quarter moon face|\u{1F31C}#last quarter moon face|\u2600\uFE0F#sun|\u{1F31D}#full moon face|\u{1F31E}#sun with face|\u2B50#star|\u{1F31F}#glowing star|\u{1F320}#shooting star|\u{1F30C}#milky way|\u2601\uFE0F#cloud|\u26C5#sun behind cloud|\u26C8\uFE0F#cloud with lightning and rain|\u{1F300}#cyclone|\u{1F308}#rainbow|\u{1F302}#closed umbrella|\u2602\uFE0F#umbrella|\u2614#umbrella with rain drops|\u26F1\uFE0F#umbrella on ground|\u26A1#high voltage|\u2744\uFE0F#snowflake|\u2603\uFE0F#snowman|\u26C4#snowman without snow|\u2604\uFE0F#comet|\u{1F525}#fire|\u{1F4A7}#droplet|\u{1F30A}#water wave","\u{1F383}#jack-o-lantern|\u{1F384}#Christmas tree|\u{1F386}#fireworks|\u{1F387}#sparkler|\u2728#sparkles|\u{1F388}#balloon|\u{1F389}#party popper|\u{1F38A}#confetti ball|\u{1F38B}#tanabata tree|\u{1F38D}#pine decoration|\u{1F38E}#Japanese dolls|\u{1F38F}#carp streamer|\u{1F390}#wind chime|\u{1F391}#moon viewing ceremony|\u{1F380}#ribbon|\u{1F381}#wrapped gift|\u{1F3AB}#ticket|\u{1F3C6}#trophy|\u{1F3C5}#sports medal|\u{1F947}#1st place medal|\u{1F948}#2nd place medal|\u{1F949}#3rd place medal|\u26BD#soccer ball|\u26BE#baseball|\u{1F3C0}#basketball|\u{1F3D0}#volleyball|\u{1F3C8}#american football|\u{1F3C9}#rugby football|\u{1F3BE}#tennis|\u{1F3B3}#bowling|\u{1F3CF}#cricket game|\u{1F3D1}#field hockey|\u{1F3D2}#ice hockey|\u{1F3D3}#ping pong|\u{1F3F8}#badminton|\u{1F94A}#boxing glove|\u{1F94B}#martial arts uniform|\u{1F945}#goal net|\u26F3#flag in hole|\u26F8\uFE0F#ice skate|\u{1F3A3}#fishing pole|\u{1F3BD}#running shirt|\u{1F3BF}#skis|\u{1F6F7}#sled|\u{1F94C}#curling stone|\u{1F3AF}#direct hit|\u{1F3B1}#pool 8 ball|\u{1F52E}#crystal ball|\u{1F3AE}#video game|\u{1F3B0}#slot machine|\u{1F3B2}#game die|\u2660\uFE0F#spade suit|\u2665\uFE0F#heart suit|\u2666\uFE0F#diamond suit|\u2663\uFE0F#club suit|\u{1F0CF}#joker|\u{1F004}#mahjong red dragon|\u{1F3B4}#flower playing cards|\u{1F3AD}#performing arts|\u{1F3A8}#artist palette","\u{1F453}#glasses|\u{1F454}#necktie|\u{1F455}#t-shirt|\u{1F456}#jeans|\u{1F9E3}#scarf|\u{1F9E4}#gloves|\u{1F9E5}#coat|\u{1F9E6}#socks|\u{1F457}#dress|\u{1F458}#kimono|\u{1F459}#bikini|\u{1F45A}#woman\u2019s clothes|\u{1F45B}#purse|\u{1F45C}#handbag|\u{1F45D}#clutch bag|\u{1F392}#backpack|\u{1F45E}#man\u2019s shoe|\u{1F45F}#running shoe|\u{1F460}#high-heeled shoe|\u{1F461}#woman\u2019s sandal|\u{1F462}#woman\u2019s boot|\u{1F451}#crown|\u{1F452}#woman\u2019s hat|\u{1F3A9}#top hat|\u{1F393}#graduation cap|\u{1F9E2}#billed cap|\u26D1\uFE0F#rescue worker\u2019s helmet|\u{1F4FF}#prayer beads|\u{1F484}#lipstick|\u{1F48D}#ring|\u{1F48E}#gem stone|\u{1F507}#muted speaker|\u{1F508}#speaker low volume|\u{1F509}#speaker medium volume|\u{1F50A}#speaker high volume|\u{1F4E2}#loudspeaker|\u{1F4E3}#megaphone|\u{1F4EF}#postal horn|\u{1F514}#bell|\u{1F515}#bell with slash|\u{1F3BC}#musical score|\u{1F3B5}#musical note|\u{1F3B6}#musical notes|\u{1F3A4}#microphone|\u{1F3A7}#headphone|\u{1F4FB}#radio|\u{1F3B7}#saxophone|\u{1F3B8}#guitar|\u{1F3B9}#musical keyboard|\u{1F3BA}#trumpet|\u{1F3BB}#violin|\u{1F941}#drum|\u{1F4F1}#mobile phone|\u{1F4F2}#mobile phone with arrow|\u260E\uFE0F#telephone|\u{1F4DE}#telephone receiver|\u{1F4DF}#pager|\u{1F4E0}#fax machine|\u{1F50B}#battery|\u{1F50C}#electric plug|\u{1F4BB}#laptop|\u2328\uFE0F#keyboard|\u{1F4BD}#computer disk|\u{1F4BE}#floppy disk|\u{1F4BF}#optical disk|\u{1F4C0}#dvd|\u{1F3A5}#movie camera|\u{1F3AC}#clapper board|\u{1F4FA}#television|\u{1F4F7}#camera|\u{1F4F8}#camera with flash|\u{1F4F9}#video camera|\u{1F4FC}#videocassette|\u{1F50D}#magnifying glass tilted left|\u{1F50E}#magnifying glass tilted right|\u{1F4A1}#light bulb|\u{1F526}#flashlight|\u{1F3EE}#red paper lantern|\u{1F4D4}#notebook with decorative cover|\u{1F4D5}#closed book|\u{1F4D6}#open book|\u{1F4D7}#green book|\u{1F4D8}#blue book|\u{1F4D9}#orange book|\u{1F4DA}#books|\u{1F4D3}#notebook|\u{1F4D2}#ledger|\u{1F4C3}#page with curl|\u{1F4DC}#scroll|\u{1F4C4}#page facing up|\u{1F4F0}#newspaper|\u{1F4D1}#bookmark tabs|\u{1F516}#bookmark|\u{1F4B0}#money bag|\u{1F4B4}#yen banknote|\u{1F4B5}#dollar banknote|\u{1F4B6}#euro banknote|\u{1F4B7}#pound banknote|\u{1F4B8}#money with wings|\u{1F4B3}#credit card|\u{1F4B9}#chart increasing with yen|\u2709\uFE0F#envelope|\u{1F4E7}#e-mail|\u{1F4E8}#incoming envelope|\u{1F4E9}#envelope with arrow|\u{1F4E4}#outbox tray|\u{1F4E5}#inbox tray|\u{1F4E6}#package|\u{1F4EB}#closed mailbox with raised flag|\u{1F4EA}#closed mailbox with lowered flag|\u{1F4EC}#open mailbox with raised flag|\u{1F4ED}#open mailbox with lowered flag|\u{1F4EE}#postbox|\u270F\uFE0F#pencil|\u2712\uFE0F#black nib|\u{1F4DD}#memo|\u{1F4BC}#briefcase|\u{1F4C1}#file folder|\u{1F4C2}#open file folder|\u{1F4C5}#calendar|\u{1F4C6}#tear-off calendar|\u{1F4C7}#card index|\u{1F4C8}#chart increasing|\u{1F4C9}#chart decreasing|\u{1F4CA}#bar chart|\u{1F4CB}#clipboard|\u{1F4CC}#pushpin|\u{1F4CD}#round pushpin|\u{1F4CE}#paperclip|\u{1F4CF}#straight ruler|\u{1F4D0}#triangular ruler|\u2702\uFE0F#scissors|\u{1F512}#locked|\u{1F513}#unlocked|\u{1F50F}#locked with pen|\u{1F510}#locked with key|\u{1F511}#key|\u{1F528}#hammer|\u26CF\uFE0F#pick|\u2692\uFE0F#hammer and pick|\u2694\uFE0F#crossed swords|\u{1F52B}#pistol|\u{1F3F9}#bow and arrow|\u{1F527}#wrench|\u{1F529}#nut and bolt|\u2699\uFE0F#gear|\u2696\uFE0F#balance scale|\u{1F517}#link|\u26D3\uFE0F#chains|\u2697\uFE0F#alembic|\u{1F52C}#microscope|\u{1F52D}#telescope|\u{1F4E1}#satellite antenna|\u{1F489}#syringe|\u{1F48A}#pill|\u{1F6AA}#door|\u{1F6BD}#toilet|\u{1F6BF}#shower|\u{1F6C1}#bathtub|\u{1F6D2}#shopping cart|\u{1F6AC}#cigarette|\u26B0\uFE0F#coffin|\u26B1\uFE0F#funeral urn|\u{1F5FF}#moai","\u{1F3E7}#ATM sign|\u{1F6AE}#litter in bin sign|\u{1F6B0}#potable water|\u267F#wheelchair symbol|\u{1F6B9}#men\u2019s room|\u{1F6BA}#women\u2019s room|\u{1F6BB}#restroom|\u{1F6BC}#baby symbol|\u{1F6BE}#water closet|\u{1F6C2}#passport control|\u{1F6C3}#customs|\u{1F6C4}#baggage claim|\u{1F6C5}#left luggage|\u26A0\uFE0F#warning|\u{1F6B8}#children crossing|\u26D4#no entry|\u{1F6AB}#prohibited|\u{1F6B3}#no bicycles|\u{1F6AD}#no smoking|\u{1F6AF}#no littering|\u{1F6B1}#non-potable water|\u{1F6B7}#no pedestrians|\u{1F4F5}#no mobile phones|\u{1F51E}#no one under eighteen|\u2622\uFE0F#radioactive|\u2623\uFE0F#biohazard|\u2B06\uFE0F#up arrow|\u2197\uFE0F#up-right arrow|\u27A1\uFE0F#right arrow|\u2198\uFE0F#down-right arrow|\u2B07\uFE0F#down arrow|\u2199\uFE0F#down-left arrow|\u2B05\uFE0F#left arrow|\u2196\uFE0F#up-left arrow|\u2195\uFE0F#up-down arrow|\u2194\uFE0F#left-right arrow|\u21A9\uFE0F#right arrow curving left|\u21AA\uFE0F#left arrow curving right|\u2934\uFE0F#right arrow curving up|\u2935\uFE0F#right arrow curving down|\u{1F503}#clockwise vertical arrows|\u{1F504}#counterclockwise arrows button|\u{1F519}#BACK arrow|\u{1F51A}#END arrow|\u{1F51B}#ON! arrow|\u{1F51C}#SOON arrow|\u{1F51D}#TOP arrow|\u{1F6D0}#place of worship|\u269B\uFE0F#atom symbol|\u2721\uFE0F#star of David|\u2638\uFE0F#wheel of dharma|\u262F\uFE0F#yin yang|\u271D\uFE0F#latin cross|\u2626\uFE0F#orthodox cross|\u262A\uFE0F#star and crescent|\u262E\uFE0F#peace symbol|\u{1F54E}#menorah|\u{1F52F}#dotted six-pointed star|\u2648#Aries|\u2649#Taurus|\u264A#Gemini|\u264B#Cancer|\u264C#Leo|\u264D#Virgo|\u264E#Libra|\u264F#Scorpio|\u2650#Sagittarius|\u2651#Capricorn|\u2652#Aquarius|\u2653#Pisces|\u26CE#Ophiuchus|\u{1F500}#shuffle tracks button|\u{1F501}#repeat button|\u{1F502}#repeat single button|\u25B6\uFE0F#play button|\u23E9#fast-forward button|\u23ED\uFE0F#next track button|\u23EF\uFE0F#play or pause button|\u25C0\uFE0F#reverse button|\u23EA#fast reverse button|\u23EE\uFE0F#last track button|\u{1F53C}#upwards button|\u23EB#fast up button|\u{1F53D}#downwards button|\u23EC#fast down button|\u23F8\uFE0F#pause button|\u23F9\uFE0F#stop button|\u23FA\uFE0F#record button|\u23CF\uFE0F#eject button|\u{1F3A6}#cinema|\u{1F505}#dim button|\u{1F506}#bright button|\u{1F4F6}#antenna bars|\u{1F4F3}#vibration mode|\u{1F4F4}#mobile phone off|\u2640\uFE0F#female sign|\u2642\uFE0F#male sign|\u2716\uFE0F#multiply|\u2795#plus|\u2796#minus|\u2797#divide|\u203C\uFE0F#double exclamation mark|\u2049\uFE0F#exclamation question mark|\u2753#question mark|\u2754#white question mark|\u2755#white exclamation mark|\u2757#exclamation mark|\u3030\uFE0F#wavy dash|\u{1F4B1}#currency exchange|\u{1F4B2}#heavy dollar sign|\u2695\uFE0F#medical symbol|\u267B\uFE0F#recycling symbol|\u269C\uFE0F#fleur-de-lis|\u{1F531}#trident emblem|\u{1F4DB}#name badge|\u{1F530}#Japanese symbol for beginner|\u2B55#hollow red circle|\u2705#check mark button|\u2611\uFE0F#check box with check|\u2714\uFE0F#check mark|\u274C#cross mark|\u274E#cross mark button|\u27B0#curly loop|\u27BF#double curly loop|\u303D\uFE0F#part alternation mark|\u2733\uFE0F#eight-spoked asterisk|\u2734\uFE0F#eight-pointed star|\u2747\uFE0F#sparkle|\xA9\uFE0F#copyright|\xAE\uFE0F#registered|\u2122\uFE0F#trade mark|\u{1F51F}#keycap: 10|\u{1F520}#input latin uppercase|\u{1F521}#input latin lowercase|\u{1F522}#input numbers|\u{1F523}#input symbols|\u{1F524}#input latin letters|\u{1F18E}#AB button (blood type)|\u{1F191}#CL button|\u{1F192}#COOL button|\u{1F193}#FREE button|\u2139\uFE0F#information|\u{1F194}#ID button|\u24C2\uFE0F#circled M|\u{1F195}#NEW button|\u{1F196}#NG button|\u{1F197}#OK button|\u{1F198}#SOS button|\u{1F199}#UP! button|\u{1F19A}#VS button|\u{1F201}#Japanese \u201Chere\u201D button|\u{1F236}#Japanese \u201Cnot free of charge\u201D button|\u{1F22F}#Japanese \u201Creserved\u201D button|\u{1F250}#Japanese \u201Cbargain\u201D button|\u{1F239}#Japanese \u201Cdiscount\u201D button|\u{1F21A}#Japanese \u201Cfree of charge\u201D button|\u{1F232}#Japanese \u201Cprohibited\u201D button|\u{1F251}#Japanese \u201Cacceptable\u201D button|\u{1F238}#Japanese \u201Capplication\u201D button|\u{1F234}#Japanese \u201Cpassing grade\u201D button|\u{1F233}#Japanese \u201Cvacancy\u201D button|\u3297\uFE0F#Japanese \u201Ccongratulations\u201D button|\u3299\uFE0F#Japanese \u201Csecret\u201D button|\u{1F23A}#Japanese \u201Copen for business\u201D button|\u{1F235}#Japanese \u201Cno vacancy\u201D button|\u{1F534}#red circle|\u{1F535}#blue circle|\u26AB#black circle|\u26AA#white circle|\u2B1B#black large square|\u2B1C#white large square|\u25FC\uFE0F#black medium square|\u25FB\uFE0F#white medium square|\u25FE#black medium-small square|\u25FD#white medium-small square|\u25AA\uFE0F#black small square|\u25AB\uFE0F#white small square|\u{1F536}#large orange diamond|\u{1F537}#large blue diamond|\u{1F538}#small orange diamond|\u{1F539}#small blue diamond|\u{1F53A}#red triangle pointed up|\u{1F53B}#red triangle pointed down|\u{1F4A0}#diamond with a dot|\u{1F518}#radio button|\u{1F533}#white square button|\u{1F532}#black square button"],S=null;function M(){if(!S){S=[];for(var N=0;N<c.length;N++){for(var U=[],$={index:N,name:c[N],items:U},W=n[N].split("|"),q=0;q<W.length;q++){var x=W[q],m=x.split("#");U.push({emoji:m[0],keyword:m[1]})}S.push($)}}}var F=this,K,j;F.PluginName="InsertEmoji",F.InitConfig=function(N){K=N},F.InitEditor=function(N){j=N,j.toolbarFactoryMap.insertemoji=function(U){return j.createToolbarItemDropDownPanel(U,function($){M(),$.style.width="360px",$.style.height="420px",$.style.display="flex",$.style.flexDirection="column",$.onclick=function(g){if(g.target.nodeName=="GSPAN"){j.closeCurrentPopup();var d=g.target.getAttribute("htmlcode");j.insertHTML(d),j.collapse(!1),j.focus()}};function W(){var g=f.style.display!=="none"?f:T;return[].slice.call(g.querySelectorAll("gspan"))}function q(g,d,b){var _=d.getBoundingClientRect(),P=g.filter(function(te){var Z=te.getBoundingClientRect();return b<0?Z.bottom<=_.top+1:Z.top>=_.bottom-1});if(!P.length)return null;var B=null;P.forEach(function(te){var Z=te.getBoundingClientRect();(B===null||(b<0?Z.top>B:Z.top<B))&&(B=Z.top)});var V=P.filter(function(te){return Math.abs(te.getBoundingClientRect().top-B)<2}),Y=V[0],Q=1/0;return V.forEach(function(te){var Z=Math.abs(te.getBoundingClientRect().left-_.left);Z<Q&&(Q=Z,Y=te)}),Y}$.addEventListener("keydown",function(g){var d=g.target;if(!(!d||d.nodeName!=="GSPAN")){var b=W(),_=b.indexOf(d),P=null;if(g.key==="ArrowRight")P=b[_+1];else if(g.key==="ArrowLeft")P=b[_-1];else if(g.key==="ArrowDown")P=q(b,d,1);else if(g.key==="ArrowUp")P=q(b,d,-1);else if(g.key==="Home")P=b[0];else if(g.key==="End")P=b[b.length-1];else if(g.key==="Enter"||g.key===" "||g.key==="Spacebar"){g.preventDefault(),g.stopPropagation(),d.click();return}else if(g.key==="Escape"){g.preventDefault(),g.stopPropagation(),j.closeCurrentPopup();return}else return;g.preventDefault(),g.stopPropagation(),P&&P.focus()}},!0);var x=null,m=null;function D(){x!=null&&(x.style.backgroundColor="",x=null)}function I(){D(),x=m,x.style.backgroundColor="#e6e6e6",m=null}var G=0;$.onmouseover=function(g){for(var d=g.target;d!=$;d=d.parentNode)if(d.nodeName=="GITEM"){if(d==m)return;m=d,clearTimeout(G),G=setTimeout(I,10);return}},$.onmouseout=function(){clearTimeout(G),G=setTimeout(D,10)};var L=o($,"label","margin:5px;position:relative;");L.setAttribute("id","emojis_searchbar");var l=o(L,"input","width:100%;padding:5px 20px;border:solid 1px #ccc;border-radius:5px;");l.setAttribute("placeholder",j.getLangText("searchemojis"));var s=0;l.onchange=l.onkeyup=l.onkeypress=l.onpaste=function(){clearTimeout(s),s=setTimeout(p,100)};function C(g){var d=[];d.push('<div style="padding:3px;margin-top:5px;color:darkblue;">'+g.name[0].toUpperCase()+g.name.substring(1)+"</div>"),d.push('<div style="display:flex;flex-direction:row;flex-wrap:wrap;">');for(var b=0;b<g.items.length;b++){var _=g.items[b],P=E(_.emoji);d.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="'+(_.keyword||_.emoji).replace(/"/g,"")+'" htmlcode="'+P+'" title="'+_.emoji+" "+(_.keyword||"").replace(/"/g,"")+'">'+P+"</gspan></gitem>")}return d.push("</div>"),d.join("")}function p(){var g=l.value.trim().toLowerCase();if(!g){u.style.display=T.style.display="",f.style.display="none";return}u.style.display=T.style.display="none",f.style.display="flex";for(var d=[],b=0,_=0;_<S.length;_++)for(var P=S[_],B=0;B<P.items.length;B++){var V=P.items[B];if(!(!V.keyword||V.keyword.indexOf(g)==-1)){b++;var Y=E(V.emoji);d.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="'+(V.keyword||V.emoji).replace(/"/g,"")+'" htmlcode="'+Y+'" title="'+V.emoji+" "+(V.keyword||"").replace(/"/g,"")+'">'+Y+"</gspan></gitem>")}}f.innerHTML='<div style="width:100%;padding:3px;margin-top:5px;color:darkblue;text-align:center;">'+b+" items</div>"+d.join("")}$.setAttribute("id","emoji-picker");var u=o($,"div"),f=o($,"div","display:none;flex-direction:row;flex-wrap:wrap;overflow-y:scroll;padding-bottom:55px"),T=o($,"div","overflow-y:scroll;padding-bottom:55px;flex:999"),w=0;function k(g){w=g,T.innerHTML=C(S[g]),T.scrollTop=0;for(var d=0;d<R.length;d++)R[d].className=d===g?"rte-ui-active":""}var y=o(u,"rte-tabui");y.setAttribute("id","emoji-picker");for(var O=o(y,"rte-tabui-toolbar"),R=[],A=0;A<S.length;A++)(function(g){var d=o(O,"rte-tabui-toolbar-button","width:32px;text-align:center;margin:4px");d.setAttribute("title",g.name),d.innerHTML=g.items[0].emoji,d.onclick=function(){k(g.index)},R.push(d)})(S[A]);k(0),l.focus()})}};function o(N,U,$,W){var q=N.ownerDocument.createElement(U);return $&&(q.style.cssText=$),W&&(q.className=W),N.appendChild(q),q}}RTE_DefaultConfig.plugin_insertgallery=RTE_Plugin_InsertGallery;function RTE_Plugin_InsertGallery(){var E=this,c,n;E.PluginName="InsertGallery",E.InitConfig=function(x){c=x,c.galleryImages||(c.galleryImages=[])},E.InitEditor=function(x){n=x,n.attachEvent("exec_command_insertgallery",function(m){m.returnValue=!0,E.DoInsertGallery()})};function S(x,m,D,I){var G=x.ownerDocument.createElement(m);return D&&(G.style.cssText=D),I&&(G.className=I),x.appendChild(G),G}function M(){return c.galleryEndpoint||window.RichTextBoxGalleryUrl||""}function F(x,m){var D=x.indexOf("?")>=0?"&":"?";return x+D+"folder="+encodeURIComponent(m||"")}function K(x,m,D,I){var G=new XMLHttpRequest;if(G.open(x,m,!0),G.onreadystatechange=function(){if(G.readyState===4){if(G.status<200||G.status>=300){I(null,"http-"+G.status);return}try{I(JSON.parse(G.responseText),null)}catch{I(null,"invalid-json")}}},G.onerror=function(){I(null,"network-error")},D){G.send(D);return}G.send()}function j(x){var m=String(x||"").split("#")[0].split("?")[0],D=m.lastIndexOf("/"),I=D>=0?m.substring(D+1):m;try{I=decodeURIComponent(I)}catch{}return I||"Image"}function o(x){return x?x<1024?x+" B":x<1024*1024?Math.round(x/1024)+" KB":Math.round(x*10/(1024*1024))/10+" MB":""}function N(x){var m=null;if(typeof x=="string")m={url:x,thumbnail:x,name:j(x)};else if(x instanceof Array)m={url:x[0],thumbnail:x[0],name:x[1]||j(x[0]),meta:x[2]||""};else if(x&&typeof x=="object"){var D=x.url||x.src||x.href;if(!D)return null;m={url:D,thumbnail:x.thumbnail||x.thumb||x.preview||D,name:x.name||x.text||x.title||j(D),meta:x.meta||x.description||x.alt||""}}return!m||!m.url?null:(m.thumbnail=m.thumbnail||m.url,m.name=m.name||j(m.url),m.source="preset",m.folder="",m.searchText=(m.name+" "+(m.meta||"")+" "+m.url).toLowerCase(),m)}function U(x){if(!x||!x.folder)return null;var m=x.name||j(x.folder)||x.folder;return{name:m,folder:x.folder,searchText:(m+" "+x.folder).toLowerCase()}}function $(x){if(!x||!x.url)return null;var m=x.name||j(x.url);return{name:m,url:x.url,thumbnail:x.thumbnail||x.url,folder:x.folder||"",source:x.source||"upload",size:x.size||0,searchText:(m+" "+x.url).toLowerCase()}}function W(x,m){x.disabled=!!m,m?x.setAttribute("aria-disabled","true"):x.removeAttribute("aria-disabled")}function q(x,m){x.style.display=m?"":"none"}E.DoInsertGallery=function(){var x=M(),m=!!x,D=typeof window.richTextBoxUploadFile=="function",I=typeof window.rte_file_upload_handler=="function",G=D||I,L=[],l=c.galleryImages||[],s;for(s=0;s<l.length;s++){var C=N(l[s]);C&&L.push(C)}var p=n.createDialog(n.getLangText("insertgallerytitle")||"Image gallery","rte-dialog-insertgallery"),u=typeof p.close=="function"?function(){p.close()}:function(){n.closeCurrentPopup()},f=S(p,"div","","rte-gallery-browser"),T=[".jpg",".jpeg",".jfif",".png",".gif",".webp",".bmp",".avif"],w=S(f,"div","","rte-dialog-browser-header"),k=S(w,"div","","rte-dialog-browser-copy");k.innerText=m?"Browse folders, upload new files, and insert the selected image into the editor.":"Browse the available images, filter by name, and insert the selected image into the editor.";var y=S(w,"div","","rte-dialog-browser-accept");y.innerText="Accepted formats: "+T.map(function(Ee){return Ee.replace(".","").toUpperCase()}).join(", ");var O=S(f,"div","","rte-gallery-browser-toolbar"),R=S(O,"div","","rte-gallery-browser-toolbar-group"),A=S(O,"div","","rte-gallery-browser-toolbar-group rte-gallery-browser-toolbar-group-right"),g=S(R,"button","","rte-gallery-browser-button");g.type="button",g.innerText="Up",g.setAttribute("aria-label","Go to the parent folder");var d=S(R,"div","","rte-gallery-browser-path");d.innerText="/";var b=S(R,"div","","rte-gallery-browser-type");b.innerText="Image files";var _=S(R,"button","","rte-gallery-browser-button");_.type="button",_.innerText="New folder";var P=S(R,"button","","rte-gallery-browser-button rte-gallery-browser-button-primary");P.type="button",P.innerText="Upload";var B=S(R,"button","","rte-gallery-browser-button");B.type="button",B.innerText="Refresh";var V=S(A,"input","","rte-gallery-browser-search");V.type="search",V.placeholder="Search images",V.setAttribute("aria-label","Search images");var Y=S(A,"input","display:none;");Y.type="file",Y.accept=T.join(","),Y.multiple=!0,q(g,m),q(d,m),q(_,m),q(P,G);var Q=S(f,"div","","rte-gallery-browser-status");Q.setAttribute("role","status"),Q.setAttribute("aria-live","polite");var te=S(f,"div","","rte-gallery-browser-surface"),Z=S(te,"div","","rte-gallery-browser-grid rte-gallery-browser-grid-folders");Z.setAttribute("role","group"),Z.setAttribute("aria-label","Folders");var le=S(te,"div","","rte-gallery-browser-grid");le.setAttribute("role","listbox"),le.setAttribute("aria-label","Available images");var ne=S(te,"div","","rte-gallery-browser-error");ne.setAttribute("role","status"),q(ne,!1);var J=S(te,"div","","rte-gallery-browser-empty"),oe=S(f,"div","","rte-gallery-browser-footer"),z=S(oe,"div","","rte-gallery-browser-footer-text"),ee=S(oe,"button","","rte-gallery-browser-button");ee.type="button",ee.innerText="Cancel";var se=S(oe,"button","","rte-gallery-browser-button rte-gallery-browser-button-primary");se.type="button",se.innerText="Insert";var ae={currentFolder:"",currentFolderDisplay:"/",parentFolder:null,folders:[],images:L.slice(0),selectedUrl:"",loading:!1,error:"",fallbackMode:!m};function fe(Ee){var He=V.value.toLowerCase();if(!He)return Ee.slice(0);for(var Je=[],it=0;it<Ee.length;it++)Ee[it].searchText.indexOf(He)>=0&&Je.push(Ee[it]);return Je}function Se(Ee){ae.selectedUrl=Ee||"",ae.error="",Re()}function ye(){for(var Ee=null,He=0;He<ae.images.length;He++)if(ae.images[He].url===ae.selectedUrl){Ee=ae.images[He];break}Ee&&(n.insertImageByUrl(Ee.url),u(),n.focus())}function me(Ee,He){var Je=Ee+He,it=m?" in "+ae.currentFolderDisplay:"",Ct=Je+" item"+(Je===1?"":"s")+it+". ";if(!ae.selectedUrl){Q.innerText=Ct+"No image selected.",z.innerText=ae.fallbackMode&&m?"Showing packaged gallery items. Uploads still save into the current folder.":"Choose an image to enable insert.",W(se,!0);return}var Lt=j(ae.selectedUrl);Q.innerText=Ct+"Selected: "+Lt+".",W(se,ae.loading);for(var kt=0;kt<ae.images.length;kt++)if(ae.images[kt].url===ae.selectedUrl){var Oe=o(ae.images[kt].size);z.innerText=Lt+" ready to insert"+(Oe?" ("+Oe+").":".");return}z.innerText=Lt+" ready to insert."}function de(Ee){var He=S(Z,"button","","rte-gallery-browser-card rte-gallery-folder-card");He.type="button",He.title="Open "+Ee.name;var Je=S(He,"div","","rte-gallery-browser-selection");Je.innerHTML=" ";var it=S(He,"div","","rte-gallery-browser-thumbnail rte-gallery-browser-thumbnail-folder");S(it,"div","","rte-gallery-browser-folder-icon");var Ct=S(He,"div","","rte-gallery-browser-name");Ct.innerText=Ee.name;var Lt=S(He,"div","","rte-gallery-browser-meta");Lt.innerText="Folder",He.onclick=function(){Ye(Ee.folder)}}function Le(Ee){var He=Ee.url===ae.selectedUrl,Je=S(le,"button","","rte-gallery-browser-card rte-gallery-image-card"+(He?" is-selected":""));Je.type="button",Je.title=Ee.name,Je.setAttribute("role","option"),Je.setAttribute("aria-selected",He?"true":"false");var it=S(Je,"div","","rte-gallery-browser-selection");it.innerHTML=He?"✓":" ";var Ct=S(Je,"div","","rte-gallery-browser-thumbnail"),Lt=S(Ct,"img","","rte-gallery-browser-thumbnail-image");Lt.src=Ee.thumbnail||Ee.url,Lt.alt=Ee.name;var kt=S(Je,"div","","rte-gallery-browser-name");kt.innerText=Ee.name;var Oe=S(Je,"div","","rte-gallery-browser-meta");Oe.innerText=Ee.meta||(Ee.source==="preset"?"Preset image":o(Ee.size))||Ee.url,Je.onclick=function(){Se(Ee.url)},Je.ondblclick=function(){Se(Ee.url),ye()}}function be(Ee){var He=[],Je={},it;for(it=0;it<Ee.length;it++)He.push(Ee[it]),Je[Ee[it].url]=!0;if(ae.currentFolder)return He;for(it=0;it<L.length;it++)Je[L[it].url]||He.push(L[it]);return He}function Re(){var Ee=fe(ae.folders),He=fe(ae.images);if(d.innerText=ae.currentFolderDisplay||"/",W(g,ae.loading||ae.parentFolder===null),W(_,ae.loading),W(P,ae.loading),W(B,ae.loading),Z.innerHTML="",le.innerHTML="",q(J,!1),q(Z,!1),q(le,!0),ae.loading){J.innerText="Loading gallery...",q(J,!0),q(le,!1),me(0,0);return}ae.error?(ne.innerText=ae.error,q(ne,!0)):q(ne,!1);for(var Je=0;Je<Ee.length;Je++)de(Ee[Je]);q(Z,Ee.length>0);for(var it=0;it<He.length;it++)Le(He[it]);q(le,He.length>0),me(Ee.length,He.length),!Ee.length&&!He.length&&(J.innerText=V.value?"No folders or images match the current filter.":m?"This folder is empty. Create a folder or upload an image to get started.":"No images are available. Upload a file to get started.",q(J,!0))}function Ke(Ee,He){var Je=[],it=[],Ct;if(ae.currentFolder=Ee.currentFolder||"",ae.currentFolderDisplay=Ee.currentFolderDisplay||"/",ae.parentFolder=typeof Ee.parentFolder>"u"?null:Ee.parentFolder,ae.fallbackMode=!!He,ae.error="",Ee.folders)for(Ct=0;Ct<Ee.folders.length;Ct++){var Lt=U(Ee.folders[Ct]);Lt&&Je.push(Lt)}if(Ee.images)for(Ct=0;Ct<Ee.images.length;Ct++){var kt=$(Ee.images[Ct]);kt&&it.push(kt)}if(ae.folders=Je,ae.images=be(it),ae.selectedUrl){var Oe=!1;for(Ct=0;Ct<ae.images.length;Ct++)if(ae.images[Ct].url===ae.selectedUrl){Oe=!0;break}Oe||(ae.selectedUrl="")}}function je(Ee){Ke({currentFolder:"",currentFolderDisplay:"/",parentFolder:null,folders:[],images:[]},!0),ae.images=L.slice(0),ae.error=L.length?"":"The image gallery is unavailable right now ("+Ee+").",ae.loading=!1,Re()}function Ye(Ee,He){if(!m){ae.images=L.slice(0),Re();return}ae.loading=!0,ae.error="",Re(),K("GET",F(x,Ee),null,function(Je,it){if(it){je(it);return}Ke(Je||{},!1),He&&(ae.selectedUrl=He),ae.loading=!1,Re()})}function Ge(){var Ee=window.prompt("New folder name","");if(Ee){ae.loading=!0,ae.error="",Re();var He=new FormData;He.append("action","create-folder"),He.append("folder",ae.currentFolder||""),He.append("name",Ee),K("POST",x,He,function(Je,it){if(it){ae.loading=!1,ae.error="The folder could not be created right now.",Re();return}Ke(Je||{},!1),ae.loading=!1,Re()})}}function et(Ee){var He=[],Je;for(Je=0;Je<Ee.length;Je++)He.push(Ee[Je]);if(!He.length||!G)return;var it="";function Ct(Lt){if(Lt>=He.length){if(m){Ye(ae.currentFolder,it);return}if(it){var kt=N(it);kt&&(kt.source="upload",L.unshift(kt),c.galleryImages.unshift(it)),ae.selectedUrl=it}ae.images=L.slice(0),ae.loading=!1,Re();return}var Oe=He[Lt];function Fe(Me,Ve){if(!Me){ae.error=Ve||"Upload failed for "+Oe.name+".",ae.loading=!1,Re();return}it=Me,Ct(Lt+1)}if(D){window.richTextBoxUploadFile(Oe,function(Me,Ve){Fe(Ve?"":Me,Ve?"Upload failed for "+Oe.name+".":"")},{folder:ae.currentFolder},Lt,He);return}window.rte_file_upload_handler(Oe,function(Me,Ve){Fe(Me,Ve)},Lt,He)}ae.loading=!0,ae.error="",Re(),Ct(0)}g.onclick=function(){ae.parentFolder!==null&&Ye(ae.parentFolder)},_.onclick=Ge,P.onclick=function(){Y.click()},Y.onchange=function(){et(this.files),this.value=""},B.onclick=function(){Ye(ae.currentFolder,ae.selectedUrl)},V.oninput=Re,ee.onclick=u,se.onclick=ye,m?Ye(""):Re(),V.focus()}}RTE_DefaultConfig.plugin_inserttemplate=RTE_Plugin_InsertTemplate;function RTE_Plugin_InsertTemplate(){var E=this,c,n;E.PluginName="InsertTemplate",E.InitConfig=function(o){c=o,c.htmlTemplates||(c.htmlTemplates=[])},E.InitEditor=function(o){n=o,n.attachEvent("exec_command_inserttemplate",function(N){N.returnValue=!0,E.DoInsertTemplate()})};function S(o,N,U,$){var W=o.ownerDocument.createElement(N);return U&&(W.style.cssText=U),$&&(W.className=$),o.appendChild(W),W}function M(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function F(o){var N=document.createElement("div");return N.innerHTML=o||"",N.innerText||N.textContent||""}function K(o,N){return o instanceof Array?{id:"template-"+N,title:o[0]||"Template "+(N+1),html:o[1]||"",meta:o[2]||""}:o&&typeof o=="object"?{id:o.id||"template-"+N,title:o.title||o.name||o.text||"Template "+(N+1),html:o.html||o.content||"",meta:o.meta||o.description||""}:typeof o=="string"?{id:"template-"+N,title:"Template "+(N+1),html:o,meta:""}:null}function j(o,N){var U=206,$=166,W=Math.max(N.scrollWidth,1),q=Math.max(N.scrollHeight,1),x=Math.min(1,U/W,$/q);N.style.transformOrigin="top left",N.style.transform="scale("+x+")",N.style.width=W+"px",N.style.height=q+"px"}E.DoInsertTemplate=function(){var o=n.createDialog(n.getLangText("inserttemplatetitle")||"Insert template","rte-dialog-inserttemplate"),N=typeof o.close=="function"?function(){o.close()}:function(){n.closeCurrentPopup()},U=S(o,"div","","rte-dialog-browser"),$=S(U,"div","","rte-dialog-browser-header"),W=S($,"div","","rte-dialog-browser-copy");W.innerText="Preview reusable layouts, search by name, and replace the current editor content with a selected template.";var q=S(U,"div","","rte-dialog-browser-toolbar"),x=S(q,"input","","rte-dialog-browser-search");x.type="search",x.placeholder="Search templates",x.setAttribute("aria-label","Search templates");var m=S(q,"div","","rte-dialog-browser-count");m.setAttribute("role","status"),m.setAttribute("aria-live","polite");var D=S(U,"div","","rte-dialog-browser-scrollpanel"),I=S(D,"div","","rte-dialog-browser-grid rte-template-grid");I.setAttribute("role","listbox"),I.setAttribute("aria-label","Available templates");var G=S(D,"div","","rte-dialog-browser-empty");G.innerText="No templates match the current filter.";var L=S(U,"div","","rte-gallery-browser-footer"),l=S(L,"div","","rte-gallery-browser-footer-text");l.innerText="Select a template to replace the current content.";var s=S(L,"button","","rte-gallery-browser-button");s.type="button",s.innerText="Cancel";var C=S(L,"button","","rte-gallery-browser-button rte-gallery-browser-button-primary");C.type="button",C.innerText="Replace Content",C.disabled=!0;var p="";function u(){var y=[],O=c.htmlTemplates||[],R;for(R=0;R<O.length;R++){var A=K(O[R],R);A&&A.html&&y.push(A)}return y}function f(){var y=x.value.replace(/^\s+|\s+$/g,"").toLowerCase(),O=u();return y?O.filter(function(R){var A=F(R.html).toLowerCase();return R.title.toLowerCase().indexOf(y)>=0||A.indexOf(y)>=0||R.meta&&R.meta.toLowerCase().indexOf(y)>=0}):O}function T(y){var O=null,R;for(R=0;R<y.length;R++)if(y[R].id===p){O=y[R];break}m.innerText=y.length+" template"+(y.length===1?"":"s"),l.innerText=O?"Ready to replace the editor content with "+O.title+".":"Select a template to replace the current content.",C.disabled=!O}function w(){var y=u(),O;for(O=0;O<y.length;O++)if(y[O].id===p){n.setHTMLCode(y[O].html),N(),n.focus();return}}function k(){M(I);var y=f(),O;for(G.style.display=y.length?"none":"block",O=0;O<y.length;O++)(function(A){var g=S(I,"button","","rte-dialog-browser-card");g.type="button",g.setAttribute("role","option"),g.setAttribute("aria-selected",A.id===p?"true":"false"),A.id===p&&g.classList.add("is-selected");var d=S(g,"div","","rte-template-card-preview"),b=S(d,"div","","rte-template-card-preview-body"),_=S(b,"div","","rte-template-card-preview-canvas");_.innerHTML=A.html,j(b,_);var P=S(g,"div","","rte-template-card-footer"),B=S(P,"div","","rte-template-card-title");B.innerText=A.title;var V=S(P,"div","","rte-template-card-meta");V.innerText=A.meta||F(A.html).substring(0,80)||"Reusable template",g.onclick=function(){p=A.id,k()},g.ondblclick=function(){p=A.id,w()}})(y[O]);if(p){var R=!1;for(O=0;O<y.length;O++)if(y[O].id===p){R=!0;break}R||(p="")}T(y)}x.oninput=k,s.onclick=N,C.onclick=w,k(),x.focus()}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_keyboarda11y=RTE_Plugin_KeyboardA11y,typeof RTE_DefaultConfig.keyboardA11y>"u"&&(RTE_DefaultConfig.keyboardA11y=!0);function RTE_Plugin_KeyboardA11y(){var E=this,c,n,S=[],M=null,F=[];E.PluginName="KeyboardA11y",E.InitConfig=function(s){c=s},E.InitEditor=function(s){if(n=s,c.keyboardA11y!==!1){n.focusToolbar=function(){return m()},j();try{n.attachEvent("ready",j)}catch{}setTimeout(j,0),setTimeout(j,400)}};function K(){try{var s=n.getEditable();if(!s)return null;for(var C=s.ownerDocument.defaultView,p=C&&C.frameElement?C.frameElement:s;p&&p.classList&&!p.classList.contains("richtexteditor");)p=p.parentNode;return p&&p.classList?p:null}catch{return null}}function j(){var s=K();s&&(o(),x(s),I(s),G(s),l(s))}function o(){var s;try{s=n.getEditable()}catch{return}!s||s.__rteEscapeHatch||(s.__rteEscapeHatch=!0,s.addEventListener("keydown",function(C){C.key!=="Escape"&&C.keyCode!==27||N()||(C.preventDefault(),C.stopPropagation(),m()||$())},!1),U(s))}function N(){try{for(var s=document.querySelectorAll("rte-dropdown-panel, rte-dialog-float, rte-floatpanel"),C=0;C<s.length;C++){var p=getComputedStyle(s[C]);if(p.display!=="none"&&p.visibility!=="hidden")return!0}}catch{}return!1}function U(s){var C=c.a11yEscapeHint||"Press Escape to leave the editing area.",p=s.getAttribute("aria-label")||"";p.indexOf(C)>=0||s.setAttribute("aria-label",(p?p.replace(/\s*$/," "):"")+C)}function $(){var s=K();if(!s)return!1;for(var C=[].slice.call(document.querySelectorAll('a[href],button,input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(function(u){return!s.contains(u)&&u.offsetParent!==null}),p=0;p<C.length;p++)if(s.compareDocumentPosition(C[p])&Node.DOCUMENT_POSITION_FOLLOWING)return C[p].focus(),!0;return!1}function W(s){return[].slice.call(s.querySelectorAll('[role="toolbar"]'))}function q(s){return[].slice.call(s.querySelectorAll('[role="button"]')).filter(function(C){return C.getAttribute("aria-disabled")==="true"||C.offsetParent===null?!1:(C.closest&&C.closest('[role="toolbar"]'))===s})}function x(s){if(c.a11yRovingToolbar!==!1)for(var C=W(s),p=0;p<C.length;p++)(function(u){var f=q(u);if(f.length){for(var T=f.filter(function(k){return k.getAttribute("tabindex")==="0"})[0]||f[0],w=0;w<f.length;w++)f[w].setAttribute("tabindex",f[w]===T?"0":"-1");u.__rteRoving||(u.__rteRoving=!0,u.addEventListener("keydown",function(k){var y=q(u),O=y.indexOf(document.activeElement);if(!(O<0)){var R=!!(u.closest&&u.closest('[dir="rtl"]')),A=null;if(k.key==="ArrowRight")A=y[(O+(R?-1:1)+y.length)%y.length];else if(k.key==="ArrowLeft")A=y[(O+(R?1:-1)+y.length)%y.length];else if(k.key==="Home")A=y[0];else if(k.key==="End")A=y[y.length-1];else return;k.preventDefault();for(var g=0;g<y.length;g++)y[g].setAttribute("tabindex",y[g]===A?"0":"-1");A.focus()}},!1),u.addEventListener("focusin",function(k){var y=q(u);if(!(y.indexOf(k.target)<0))for(var O=0;O<y.length;O++)y[O].setAttribute("tabindex",y[O]===k.target?"0":"-1")},!1))}})(C[p])}function m(){var s=K();if(!s)return!1;for(var C=W(s),p=0;p<C.length;p++){var u=q(C[p]);if(u.length){var f=u.filter(function(T){return T.getAttribute("tabindex")==="0"})[0]||u[0];return f.focus(),!0}}return!1}var D=/^(bold|italic|underline|strikethrough|subscript|superscript|justifyleft|justifycenter|justifyright|justifyfull|insertorderedlist|insertunorderedlist|outdent|indent|insertblockquote|toggleborder|inlinecode|trackchanges|typewriter|focusmode|pagination|formattingmarks|linenumbers|permanentpen|rtlui)$/;function I(s){for(var C=[].slice.call(s.querySelectorAll('[role="button"][rte-cmd-name]')),p=0;p<C.length;p++){var u=(C[p].getAttribute("rte-cmd-name")||"").toLowerCase();if(D.test(u)){var f=C[p].classList.contains("rte-command-active"),T=f?"true":"false";C[p].getAttribute("aria-pressed")!==T&&C[p].setAttribute("aria-pressed",T)}}}function G(s){for(var C=[].slice.call(s.querySelectorAll("[aria-haspopup]")),p=0;p<C.length;p++)C[p].hasAttribute("aria-expanded")||C[p].setAttribute("aria-expanded","false"),!C[p].__rtePopupBound&&(C[p].__rtePopupBound=!0,(function(f){function T(){M=f}f.addEventListener("mousedown",T,!0),f.addEventListener("keydown",function(w){(w.key==="Enter"||w.key===" "||w.key==="ArrowDown")&&T()},!0)})(C[p]));if(!G.bound){G.bound=!0;var u=new MutationObserver(function(f){for(var T=0;T<f.length;T++){for(var w=f[T],k=0;k<w.addedNodes.length;k++){var y=w.addedNodes[k];y.nodeType!==1||!L(y)||M&&(M.setAttribute("aria-expanded","true"),F.push({panel:y,owner:M}),M=null)}for(var O=0;O<w.removedNodes.length;O++){var R=w.removedNodes[O];if(!(R.nodeType!==1||!L(R)))for(var A=F.length-1;A>=0;A--)F[A].panel===R&&(F[A].owner.setAttribute("aria-expanded","false"),F.splice(A,1))}}});u.observe(document.body,{childList:!0,subtree:!0}),S.push(u)}}function L(s){var C=(s.tagName||"").toLowerCase();return C==="rte-dropdown-panel"||C==="rte-floatpanel"||C==="rte-dialog-float"}function l(s){if(!s.__rteA11yWatch){s.__rteA11yWatch=!0;var C=null,p=new MutationObserver(function(){C||(C=setTimeout(function(){C=null,I(s),x(s),G(s)},60))});p.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","aria-disabled"]}),S.push(p)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_linenumbers=RTE_Plugin_LineNumbers,typeof RTE_DefaultConfig.lineNumberRestart>"u"&&(RTE_DefaultConfig.lineNumberRestart="continuous"),typeof RTE_DefaultConfig.lineNumberInterval>"u"&&(RTE_DefaultConfig.lineNumberInterval=1),typeof RTE_DefaultConfig.lineNumberStart>"u"&&(RTE_DefaultConfig.lineNumberStart=1),typeof RTE_DefaultConfig.lineNumberGutter>"u"&&(RTE_DefaultConfig.lineNumberGutter=38);function RTE_Plugin_LineNumbers(){var E=this,c,n,S=null,M=!1,F=null,K=0,j="",o=!1,N=0;E.PluginName="LineNumbers",E.InitConfig=function(f){c=f},E.InitEditor=function(f){n=f,n.attachEvent("exec_command_linenumbers",function(T){T.returnValue=!0,E.Toggle()}),U();try{n.attachEvent("ready",U)}catch{}try{n.attachEvent("aftersethtml",function(){U(),x()})}catch{}setTimeout(U,0),n.setLineNumbers=function(T){return M=!!T,q(),M},n.toggleLineNumbers=function(){return E.Toggle()},n.isLineNumbers=function(){return M},n.getLineCount=function(){return M&&I(),N},n.setLineNumberOptions=function(T){return T&&typeof T=="object"&&(T.restart!=null&&(c.lineNumberRestart=T.restart),T.interval!=null&&(c.lineNumberInterval=T.interval),T.start!=null&&(c.lineNumberStart=T.start),T.gutter!=null&&(c.lineNumberGutter=T.gutter)),j="",q(),{restart:c.lineNumberRestart,interval:c.lineNumberInterval,start:c.lineNumberStart,gutter:c.lineNumberGutter}},n.getLineNumbersCss=function(){return p()}},E.Toggle=function(){return M=!M,q(),M};function U(){var f=$();if(f&&(u(f),C(),f!==S)){S=f,f.addEventListener("input",x,!0),f.addEventListener("keyup",x,!0);var T=f.defaultView||f.parentWindow;T&&T.addEventListener("resize",x)}}function $(){try{return n.getDocument()}catch{return null}}function W(){try{return n.getEditable()}catch{return null}}function q(){var f=W();f&&f.classList&&(M?f.classList.add("rte-linenumbers-on"):f.classList.remove("rte-linenumbers-on")),f&&(f.style.paddingLeft=M?parseInt(c.lineNumberGutter,10)+12+"px":""),M?(j="",I()):l()}function x(){if(M&&!K){var f=$(),T=f&&(f.defaultView||f.parentWindow)||window,w=T&&typeof T.requestAnimationFrame=="function"?function(k){return T.requestAnimationFrame(k)}:function(k){return setTimeout(k,16)};K=w(function(){K=0,I()})}}function m(){var f=$(),T=W();if(!f||!T)return[];for(var w=[],k=T.children,y=T.getBoundingClientRect(),O=T.scrollTop||0,R=0;R<k.length;R++){var A=k[R];if(A.nodeType===1&&!(A.getAttribute&&(A.getAttribute("data-rte-linenumbers")==="true"||A.getAttribute("data-rte-page-overlay")==="true"))){if(!A.textContent&&!A.querySelector("img,table,hr")){var g=A.getBoundingClientRect();g.height>0&&w.push({top:g.top-y.top+O,block:R});continue}for(var d=D(f,A),b=0;b<d.length;b++)w.push({top:d[b]-y.top+O,block:R})}}return w}function D(f,T){var w=[],k={};try{var y=f.createRange();y.selectNodeContents(T);for(var O=y.getClientRects(),R=0;R<O.length;R++){var A=O[R];if(!(!A||A.height<=0||A.width<=0)){var g=Math.round(A.top);k[g]||(k[g]=!0,w.push(A.top))}}}catch{}if(!w.length){var d=T.getBoundingClientRect();d.height>0&&w.push(d.top)}return w.sort(function(b,_){return b-_}),w}function I(){if(M){var f=$(),T=W();if(!(!f||!T)){var w=m();N=w.length;var k=String(c.lineNumberRestart||"continuous"),y=Math.max(1,parseInt(c.lineNumberInterval,10)||1),O=parseInt(c.lineNumberStart,10);isNaN(O)&&(O=1);var R=[];if(k==="page")try{typeof n.isPageView=="function"&&n.isPageView()&&typeof n.getPageOfElement=="function"&&(R=null)}catch{}var A=w.length+"|"+k+"|"+y+"|"+O+"|"+(w.length?Math.round(w[w.length-1].top):0)+"|"+T.offsetHeight;if(!(A===j&&F&&F.parentNode)){j=A;for(var g=L(f,T);g.firstChild;)g.removeChild(g.firstChild);g.style.width=parseInt(c.lineNumberGutter,10)+"px";for(var d=O,b=null,_=null,P=0;P<w.length;P++){var B=w[P];if(k==="block")_!==null&&B.block!==_&&(d=O),_=B.block;else if(k==="page"){var V=G(T,B);b!==null&&V!==b&&(d=O),b=V}if((d-O)%y===0){var Y=f.createElement("div");Y.className="rte-linenumber",Y.style.top=Math.round(B.top)+"px",Y.textContent=String(d),g.appendChild(Y)}d++}}}}}function G(f,T){try{var w=f.children[T.block];if(w&&typeof n.getPageOfElement=="function"){var k=n.getPageOfElement(w);if(k)return k}}catch{}return 1}function L(f,T){return F&&F.parentNode||(F=f.createElement("div"),F.setAttribute("data-rte-linenumbers","true"),F.setAttribute("contenteditable","false"),F.setAttribute("aria-hidden","true"),F.className="rte-linenumber-gutter",(T.parentNode||f.body||f.documentElement).appendChild(F)),F}function l(){F&&F.parentNode&&F.parentNode.removeChild(F),F=null,j=""}function s(){var f=W();if(!f)return function(){};for(var T=$(),w=T?T.querySelectorAll("[data-rte-linenumbers]"):[],k=[],y=0;y<w.length;y++){var O=w[y];k.push({node:O,parent:O.parentNode,next:O.nextSibling}),O.parentNode&&O.parentNode.removeChild(O)}var R=f.style.paddingLeft;return f.style.paddingLeft="",function(){f.style.paddingLeft=R;for(var g=0;g<k.length;g++)k[g].parent&&k[g].parent.insertBefore(k[g].node,k[g].next||null)}}function C(){if(!o){for(var f=["getHTMLCode","getJSON","getHTMLContent","getText"],T=!1,w=0;w<f.length;w++)(function(k){var y=n[k];if(!(typeof y!="function"||y.__rteLnWrapped)){var O=function(){var R=s();try{return y.apply(n,arguments)}finally{R()}};O.__rteLnWrapped=!0,n[k]=O,T=!0}})(f[w]);T&&(o=!0)}}function p(){return".rte-linenumber-gutter{position:absolute;left:0;top:0;pointer-events:none;user-select:none;z-index:2;}.rte-linenumber{position:absolute;right:6px;text-align:right;width:100%;font-size:11px;line-height:1;color:#8a94a6;font-variant-numeric:tabular-nums;font-family:Consolas,Menlo,monospace;}.rte-linenumbers-on{position:relative;}"}function u(f){if(f){var T=f.getElementById("rte-linenumber-styles"),w=p();if(T){if(T.getAttribute("data-css")===w)return;T.parentNode&&T.parentNode.removeChild(T)}var k=f.createElement("style");k.id="rte-linenumber-styles",k.setAttribute("data-css",w),k.appendChild(f.createTextNode(w)),(f.head||f.getElementsByTagName("head")[0]||f.documentElement).appendChild(k)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_linkchecker=RTE_Plugin_LinkChecker,typeof RTE_DefaultConfig.linkCheckResolver>"u"&&(RTE_DefaultConfig.linkCheckResolver=null),typeof RTE_DefaultConfig.linkCheckUnsafeSchemes>"u"&&(RTE_DefaultConfig.linkCheckUnsafeSchemes=["javascript:","data:","vbscript:","file:"]),typeof RTE_DefaultConfig.linkCheckMixedContent>"u"&&(RTE_DefaultConfig.linkCheckMixedContent=!0);function RTE_Plugin_LinkChecker(){var E=this,c,n,S=null,M=!1,F=[],K=!1;E.PluginName="LinkChecker",E.InitConfig=function(s){c=s},E.InitEditor=function(s){n=s,n.attachEvent("exec_command_checklinks",function(C){C.returnValue=!0,E.Check()}),j();try{n.attachEvent("ready",j)}catch{}try{n.attachEvent("aftersethtml",j)}catch{}setTimeout(j,0),n.checkLinks=function(){return E.Check()},n.getLinkIssues=function(){return F.slice()},n.highlightLinkIssues=function(C){return x(C!==!1)},n.clearLinkHighlights=function(){return x(!1)},n.getLinkCheckerCss=function(){return L()}};function j(){var s=o();s&&(l(s),G(),S=s)}function o(){try{return n.getDocument()}catch{return null}}function N(){try{return n.getEditable()}catch{return null}}function U(){var s=N();if(!s)return[];for(var C=s.querySelectorAll("a"),p=[],u=0;u<C.length;u++){var f=C[u];if(f.hasAttribute("href")){p.push(f);continue}f.getAttribute("name")||f.getAttribute("id")||p.push(f)}return p}function $(){var s=N(),C=[];if(!s)return C;var p=U(),u=c.linkCheckUnsafeSchemes||[],f=!1;try{f=window.location.protocol==="https:"}catch{}for(var T={},w=0;w<p.length;w++){var k=p[w],y=(k.getAttribute("href")||"").trim(),O=(k.textContent||"").trim(),R=function(z,ee,se){C.push({element:k,href:y,text:O,severity:z,code:ee,message:se})};if(!k.hasAttribute("href")){R("error","empty-href","Link has no destination \u2014 its address may have been removed for being unsafe.");continue}if(!y||y==="#"){R("error","empty-href","Link has no destination.");continue}for(var A=y.toLowerCase(),g=null,d=0;d<u.length;d++)if(A.indexOf(u[d])===0){g=u[d];break}if(g){R("error","unsafe-scheme","Link uses the "+g+" scheme, which is unsafe in published content.");continue}if(y.charAt(0)==="#"){var b=y.substring(1),_=null;try{_=s.querySelector("#"+b.replace(/["\\\]\[]/g,"\\$&"))||s.querySelector('[name="'+b.replace(/"/g,'\\"')+'"]')}catch{_=null}_||R("error","broken-anchor","Links to #"+b+", which does not exist in this document.")}else if(/^[a-z][a-z0-9+.-]*:/i.test(y)||y.indexOf("//")===0){var P=W(y);if(!P)R("error","malformed","Link address cannot be parsed as a URL.");else if(c.linkCheckMixedContent!==!1&&f&&P.protocol==="http:"&&R("warning","mixed-content","Insecure http:// link on a secure page; browsers may block or warn."),/^(https?:\/\/|www\.)/i.test(O)){var B=W(/^www\./i.test(O)?"http://"+O:O);B&&B.hostname&&P.hostname&&B.hostname.toLowerCase()!==P.hostname.toLowerCase()&&R("warning","deceptive-text","Link text shows "+B.hostname+" but the link goes to "+P.hostname+".")}}if(O){var te=O.toLowerCase();(T[te]=T[te]||[]).push({a:k,href:y})}else{for(var V=!1,Y=k.querySelectorAll?k.querySelectorAll("img[alt]"):[],Q=0;Q<Y.length;Q++)(Y[Q].getAttribute("alt")||"").trim()&&(V=!0);!V&&!(k.getAttribute("aria-label")||"").trim()&&!(k.getAttribute("title")||"").trim()&&R("error","empty-text","Link has no text, image alt, aria-label or title, so it has no accessible name.")}}for(var Z in T)if(T.hasOwnProperty(Z)){var le=T[Z];if(!(le.length<2)){for(var ne={},J=0;J<le.length;J++)ne[le[J].href]=!0;if(!(Object.keys(ne).length<2))for(var oe=0;oe<le.length;oe++)C.push({element:le[oe].a,href:le[oe].href,text:le[oe].a.textContent.trim(),severity:"warning",code:"ambiguous-text",message:"Several links share the text \u201C"+le[oe].a.textContent.trim()+"\u201D but point to different destinations."})}}return C}function W(s){try{var C=o()||document,p=C.createElement("a");return p.href=s,!p.protocol||p.protocol===":"?null:{protocol:p.protocol,hostname:p.hostname,pathname:p.pathname}}catch{return null}}E.Check=function(){var s=$(),C=c.linkCheckResolver;if(typeof C!="function")return F=s,q(s),typeof Promise=="function"?Promise.resolve(s.slice()):s.slice();for(var p={},u=0;u<s.length;u++)p[s[u].href]=!0;for(var f=[],T={},w=U(),k=0;k<w.length;k++){var y=(w[k].getAttribute("href")||"").trim();!y||y.charAt(0)==="#"||p[y]||T[y]||/^https?:/i.test(y)&&(T[y]=!0,f.push(y))}return f.length?Promise.resolve().then(function(){return C(f.slice())}).then(function(O){O=O||{};for(var R={},A=0;A<w.length;A++){var g=(w[A].getAttribute("href")||"").trim();(R[g]=R[g]||[]).push(w[A])}for(var d in O)if(O.hasOwnProperty(d)){var b=O[d];if(!(!b||b.ok!==!1))for(var _=R[d]||[],P=0;P<_.length;P++)s.push({element:_[P],href:d,text:(_[P].textContent||"").trim(),severity:"error",code:"unreachable",message:"Link did not resolve"+(b.status?" (HTTP "+b.status+")":"")+"."})}return F=s,q(s),s.slice()}).catch(function(){return F=s,q(s),s.slice()}):(F=s,q(s),typeof Promise=="function"?Promise.resolve(s.slice()):s.slice())};function q(s){K&&D(s);try{n.fireEvent&&n.fireEvent("linkcheck",s)}catch{}}function x(s){return K=!!s,K?D(F):m(),K}function m(){var s=N();if(s)for(var C=s.querySelectorAll("a[data-rte-link-issue]"),p=0;p<C.length;p++)C[p].removeAttribute("data-rte-link-issue"),C[p].removeAttribute("data-rte-link-issue-message")}function D(s){m();for(var C=0;C<s.length;C++){var p=s[C].element;!p||!p.setAttribute||p.getAttribute("data-rte-link-issue")!=="error"&&(p.setAttribute("data-rte-link-issue",s[C].severity),p.setAttribute("data-rte-link-issue-message",s[C].message))}}function I(){var s=N();if(!s)return function(){};for(var C=s.querySelectorAll("a[data-rte-link-issue]"),p=[],u=0;u<C.length;u++)p.push({el:C[u],sev:C[u].getAttribute("data-rte-link-issue"),msg:C[u].getAttribute("data-rte-link-issue-message")}),C[u].removeAttribute("data-rte-link-issue"),C[u].removeAttribute("data-rte-link-issue-message");return function(){for(var T=0;T<p.length;T++)p[T].el.setAttribute("data-rte-link-issue",p[T].sev),p[T].msg&&p[T].el.setAttribute("data-rte-link-issue-message",p[T].msg)}}function G(){if(!M){for(var s=["getHTMLCode","getJSON","getHTMLContent","getText"],C=!1,p=0;p<s.length;p++)(function(u){var f=n[u];if(!(typeof f!="function"||f.__rteLcWrapped)){var T=function(){var w=I();try{return f.apply(n,arguments)}finally{w()}};T.__rteLcWrapped=!0,n[u]=T,C=!0}})(s[p]);C&&(M=!0)}}function L(){return"a[data-rte-link-issue='error']{background:rgba(220,38,38,.12);box-shadow:inset 0 -2px 0 rgba(220,38,38,.65);border-radius:2px;}a[data-rte-link-issue='warning']{background:rgba(217,119,6,.12);box-shadow:inset 0 -2px 0 rgba(217,119,6,.6);border-radius:2px;}"}function l(s){if(s){var C=s.getElementById("rte-link-checker-styles"),p=L();if(C){if(C.getAttribute("data-css")===p)return;C.parentNode&&C.parentNode.removeChild(C)}var u=s.createElement("style");u.id="rte-link-checker-styles",u.setAttribute("data-css",p),u.appendChild(s.createTextNode(p)),(s.head||s.getElementsByTagName("head")[0]||s.documentElement).appendChild(u)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_localdraft=RTE_Plugin_LocalDraft,typeof RTE_DefaultConfig.localDraft>"u"&&(RTE_DefaultConfig.localDraft=!1);function RTE_Plugin_LocalDraft(){var E=this,c,n,S=null,M=null,F=null,K="",j=null,o=!1,N=null;E.PluginName="LocalDraft",E.InitConfig=function(y){c=y},E.InitEditor=function(y){if(n=y,n.saveLocalDraft=function(){return L(!0)},n.hasLocalDraft=function(){return!!l()},n.getLocalDraft=function(){return l()},n.clearLocalDraft=function(){try{D().removeItem(m())}catch{}return T(),!0},n.restoreLocalDraft=function(){var R=l();if(!R)return!1;try{n.setHTMLCode(R.html)}catch{return!1}try{typeof n.fireChange=="function"&&n.fireChange()}catch{}return T(),!0},!!c.localDraft){S=typeof c.localDraft=="object"?c.localDraft:{},M=m();var O=function(){o||(K=G(),p(),W())};try{n.attachEvent("ready",O)}catch{}try{n.attachEvent("ready",$)}catch{}try{n.attachEvent("aftersethtml",$)}catch{}setTimeout(O,0)}};var U=function(){I()};function $(){if(!(!c||!c.localDraft)){var y=n.getDocument();if(y&&y!==N){try{y.addEventListener("input",U,!0)}catch{}N=y}}}function W(){if(!o){o=!0;try{n.attachEvent("change",U)}catch{}try{n.attachEvent("keyup",U)}catch{}$();try{window.addEventListener("beforeunload",function(){L(!1)},!1),window.addEventListener("pagehide",function(){L(!1)},!1)}catch{}}}function q(){var y=S&&+S.intervalMs;return y&&y>250?y:2500}function x(){var y=S&&+S.ttlMs;return y&&y>0?y:336*60*60*1e3}function m(){if(S&&S.key)return"rte-draft:"+S.key;var y="";try{var O=n.getEditable();y=O&&(O.id||O.getAttribute&&O.getAttribute("data-rte-id"))||""}catch{}if(!y)try{y=location.pathname}catch{y="default"}return"rte-draft:"+y}function D(){return window.localStorage}function I(){F||(F=setTimeout(function(){F=null,L(!1)},q()))}function G(){try{return n.getHTMLCode()||""}catch{return""}}function L(y){if(!c||!c.localDraft)return!1;var O=G();if(!y&&(O===K||s(O)))return!1;var R={html:O,t:C()};try{return D().setItem(m(),JSON.stringify(R)),!0}catch{return!1}}function l(){try{var y=D().getItem(m());if(!y)return null;var O=JSON.parse(y);if(!O||typeof O.html!="string")return null;if(O.t&&C()-O.t>x()){try{D().removeItem(m())}catch{}return null}return O}catch{return null}}function s(y){if(!y)return!0;var O=y.replace(/<[^>]*>/g,"").replace(/ /gi," ").replace(/\s+/g,"");return O.length===0}function C(){try{return Date.now()}catch{return 0}}function p(){if(!(S&&S.promptRestore===!1)){var y=l();y&&(y.html===K||s(y.html)||u(y))}}function u(y){T();var O=w();if(!(!O||!O.parentNode)){var R=k(y.t);j=document.createElement("div"),j.className="rte-localdraft-bar",j.setAttribute("data-rte-localdraft","1"),j.setAttribute("role","status"),j.setAttribute("aria-live","polite");var A=document.createElement("span");A.className="rte-localdraft-message",A.textContent="An unsaved draft"+(R?" from "+R:"")+" was found.";var g=f("Restore","primary"),d=f("Discard","secondary");g.onclick=function(){n.restoreLocalDraft()},d.onclick=function(){n.clearLocalDraft()},j.appendChild(A),j.appendChild(g),j.appendChild(d),O.parentNode.insertBefore(j,O)}}function f(y,O){var R=document.createElement("button");return R.type="button",R.textContent=y,R.className="rte-localdraft-button is-"+O,R}function T(){j&&j.parentNode&&j.parentNode.removeChild(j),j=null}function w(){try{var y=n.getDocument(),O=y&&y.defaultView&&y.defaultView.frameElement;if(O){for(var R=O,A=0;A<4&&R.parentNode;A++){if(R.parentNode&&/rte[_-](outer|container|wrapper)/i.test(R.parentNode.className||""))return R.parentNode;R=R.parentNode}return O}}catch{}try{return n.getEditable()}catch{return null}}function k(y){if(!y)return"";try{var O=new Date(y),R=(C()-y)/1e3;return R<60?"just now":R<3600?Math.round(R/60)+" min ago":R<86400?Math.round(R/3600)+" hr ago":O.toLocaleString()}catch{return""}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_markdownexport=RTE_Plugin_MarkdownExport,typeof RTE_DefaultConfig.markdownExportEnabled>"u"&&(RTE_DefaultConfig.markdownExportEnabled=!0);function RTE_Plugin_MarkdownExport(){var E=this,c,n;E.PluginName="MarkdownExport",E.InitConfig=function(o){c=o},E.InitEditor=function(o){n=o,n.getMarkdown=function(){if(typeof n.toMarkdown=="function")return n.toMarkdown();var N=n.getEditable();return N&&(N.innerText||N.textContent)||""},n.copyAsMarkdown=function(){var N=n.getMarkdown();return F(N)},n.downloadMarkdown=function(N){var U=n.getMarkdown(),$=M(N),W=$?$+".md":S();return j(U,W)}};function S(){try{var o=n.getEditable();if(o){var N=o.querySelector("h1,h2,h3"),U=N?N.textContent:o.textContent||"";U=(U||"").trim().split(`
|
|
30
|
+
`)}function N(q,x,m){return q.substr(x,m-x)}var U=0;if(F==null&&(F=""),this.originalCode=F,this.code=j(o(F)),this.div=this.CreateElement("DIV"),this.bar=this.CreateElement("DIV"),this.ol=this.CreateElement("OL"),this.matches=new Array,this.div.className="dp-highlighter",this.div.highlighter=this,this.bar.className="bar",this.ol.start=this.firstLine,this.CssClass!=null&&(this.ol.className=this.CssClass),this.collapse&&(this.div.className+=" collapsed"),this.noGutter&&(this.div.className+=" nogutter"),this.tabsToSpaces==!0&&(this.code=this.ProcessSmartTabs(this.code)),this.ProcessRegexList(),this.matches.length==0){this.AddBit(this.code,null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol);return}this.matches=this.matches.sort(E.sh.Highlighter.SortCallback);for(var $=0;$<this.matches.length;$++)this.IsInside(this.matches[$])&&(this.matches[$]=null);for(var $=0;$<this.matches.length;$++){var W=this.matches[$];W==null||W.length==0||(this.AddBit(N(this.code,U,W.index),null),this.AddBit(W.value,W.css),U=W.index+W.length)}this.AddBit(this.code.substr(U),null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol)},E.sh.Highlighter.prototype.GetKeywords=function(F){return"\\b"+F.replace(/ /g,"\\b|\\b")+"\\b"},E.sh.BloggerMode=function(){E.sh.isBloggerMode=!0},E.sh.HighlightAll=function(F,K,j,o,N,U){function $(){for(var w=arguments,k=0;k<w.length;k++)if(w[k]!=null){if(typeof w[k]=="string"&&w[k]!="")return w[k]+"";if(typeof w[k]=="object"&&w[k].value!="")return w[k].value+""}return null}function W(w,k){for(var y=0;y<k.length;y++)if(k[y]==w)return!0;return!1}function q(w,k,y){for(var O=new RegExp("^"+w+"\\[(\\w+)\\]$","gi"),R=null,A=0;A<k.length;A++)if((R=O.exec(k[A]))!=null)return R[1];return y}function x(w,k,y){for(var O=document.getElementsByTagName(y),R=0;R<O.length;R++)O[R].getAttribute("name")==k&&w.push(O[R])}var m=[F],D=null,I={},G="innerHTML";for(var L in E.sh.Brushes){var l=E.sh.Brushes[L].Aliases;if(l!=null)for(var s=0;s<l.length;s++)I[l[s]]=L}for(var s=0;s<m.length;s++){var F=m[s],C=$(F.attributes.class,F.className,F.attributes.language,F.language),p="";if(C!=null&&(C=C.split(":"),p=C[0].toLowerCase(),I[p]!=null)){D=new E.sh.Brushes[I[p]],F.style.display="none",D.noGutter=K==null?W("nogutter",C):!K,D.addControls=j??!W("nocontrols",C),D.collapse=o??W("collapse",C),D.showColumns=U??W("showcolumns",C);var u=document.getElementsByTagName("head")[0];if(D.Style&&u){var f=document.createElement("style");if(f.setAttribute("type","text/css"),f.styleSheet)f.styleSheet.cssText=D.Style;else{var T=document.createTextNode(D.Style);f.appendChild(T)}u.appendChild(f)}D.firstLine=N??parseInt(q("firstline",C,1)),D.Highlight(F[G]),D.source=F,F.parentNode.insertBefore(D.div,F)}}},E.sh.Brushes.JScript=function(){var F="abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-c"},E.sh.Brushes.JScript.prototype=new E.sh.Highlighter,E.sh.Brushes.JScript.Aliases=["js","jscript","javascript"],E.sh.Brushes.Java=function(){var F="abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws true transient try void volatile while";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-j",this.Style=".dp-j .annotation { color: #646464; }.dp-j .number { color: #C00000; }"},E.sh.Brushes.Java.prototype=new E.sh.Highlighter,E.sh.Brushes.Java.Aliases=["java"],E.sh.Brushes.Cpp=function(){var F="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t __wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler sig_atomic_t size_t _stat __stat64 _stati64 terminate_function time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf va_list wchar_t wctrans_t wctype_t wint_t signed",K="break case catch class const __finally __exception __try const_cast continue private public protected __declspec default delete deprecated dllexport dllimport do dynamic_cast else enum explicit extern if for friend goto inline mutable naked namespace new noinline noreturn nothrow register reinterpret_cast return selectany sizeof static static_cast struct switch template this thread throw true false try typedef typeid typename union using uuid virtual void volatile whcar_t while";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"keyword"}],this.CssClass="dp-cpp",this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"},E.sh.Brushes.Cpp.prototype=new E.sh.Highlighter,E.sh.Brushes.Cpp.Aliases=["cpp","c","c++"],E.sh.Brushes.CSharp=function(){var F="abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach get goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed set short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-c",this.Style=".dp-c .vars { color: #d00; }"},E.sh.Brushes.CSharp.prototype=new E.sh.Highlighter,E.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"],E.sh.Brushes.CSS=function(){var F="ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",K="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",j="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(F),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS(K),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(j),"g"),css:"value"}],this.CssClass="dp-css",this.Style=".dp-css .value { color: black; }.dp-css .important { color: red; }"},E.sh.Highlighter.prototype.GetKeywordsCSS=function(F){return"\\b([a-z_]|)"+F.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"},E.sh.Highlighter.prototype.GetValuesCSS=function(F){return"\\b"+F.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"},E.sh.Brushes.CSS.prototype=new E.sh.Highlighter,E.sh.Brushes.CSS.Aliases=["css"],E.sh.Brushes.Php=function(){var F="abs acos acosh addcslashes addslashes array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists closedir closelog copy cos cosh count count_chars date decbin dechex decoct deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime strtoupper strtr strval substr substr_compare",K="and or xor __FILE__ __LINE__ array as break case cfunction class const continue declare default die do else elseif empty enddeclare endfor endforeach endif endswitch endwhile extends for foreach function include include_once global if new old_function return static switch use require require_once var while __FUNCTION__ __CLASS__ __METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:E.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:E.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(F),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"keyword"}],this.CssClass="dp-c"},E.sh.Brushes.Php.prototype=new E.sh.Highlighter,E.sh.Brushes.Php.Aliases=["php"],E.sh.Brushes.Python=function(){var F="and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try yield while",K="None True False self cls class_";this.regexList=[{regex:E.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp(`(['"]{3})([^\\1])*?\\1`,"gm"),css:"comment"},{regex:new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"',"gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"special"}],this.CssClass="dp-py",this.Style=".dp-py .builtins { color: #ff1493; }.dp-py .magicmethods { color: #808080; }.dp-py .exceptions { color: brown; }.dp-py .types { color: brown; font-style: italic; }.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"},E.sh.Brushes.Python.prototype=new E.sh.Highlighter,E.sh.Brushes.Python.Aliases=["py","python"],E.sh.Brushes.Xml=function(){this.CssClass="dp-xml",this.Style=".dp-xml .cdata { color: #ff1493; }.dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }.dp-xml .attribute { color: red; }.dp-xml .attribute-value { color: blue; }"},E.sh.Brushes.Xml.prototype=new E.sh.Highlighter,E.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"],E.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function F(N,U){N[N.length]=U}var K=0,j=null,o=null;for(this.GetMatches(new RegExp("(<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](>|>)","gm"),"cdata"),this.GetMatches(new RegExp("(<|<)!--\\s*.*?\\s*--(>|>)","gm"),"comments"),o=new RegExp(`([:\\w-.]+)\\s*=\\s*(".*?"|'.*?'|\\w+)*|(\\w+)`,"gm");(j=o.exec(this.code))!=null;)j[1]!=null&&(F(this.matches,new E.sh.Match(j[1],j.index,"attribute")),j[2]!=null&&F(this.matches,new E.sh.Match(j[2],j.index+j[0].indexOf(j[2]),"attribute-value")));for(this.GetMatches(new RegExp("(<|<)/*\\?*(?!\\!)|/*\\?*(>|>)","gm"),"tag"),o=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");(j=o.exec(this.code))!=null;)F(this.matches,new E.sh.Match(j[1],j.index+j[0].indexOf(j[1]),"tag-name"))},E.sh.Brushes.Vb=function(){var F="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit False Finally For Friend Function Get GetType GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"}],this.CssClass="dp-vb"},E.sh.Brushes.Vb.prototype=new E.sh.Highlighter,E.sh.Brushes.Vb.Aliases=["vb","vb.net"],E.sh.Brushes.Ruby=function(){var F="alias and BEGIN begin break case class def define_method defined do each else elsif END end ensure false for if in module new next nil not or raise redo rescue retry return self super then throw true undef unless until when while yield",K="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ThreadGroup Thread Time TrueClass";this.regexList=[{regex:E.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords(F),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(K),"gm"),css:"builtin"}],this.CssClass="dp-rb",this.Style=".dp-rb .symbol { color: #a70; }.dp-rb .variable { color: #a70; font-weight: bold; }"},E.sh.Brushes.Ruby.prototype=new E.sh.Highlighter,E.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"],E.sh.Brushes.Sql=function(){var F="abs avg case cast coalesce convert count current_timestamp current_user day isnull left lower month nullif replace right session_user space substring sum system_user upper user year",K="absolute action add after alter as asc at authorization begin bigint binary bit by cascade char character check checkpoint close collate column commit committed connect connection constraint contains continue create cube current current_date current_time cursor database date deallocate dec decimal declare default delete desc distinct double drop dynamic else end end-exec escape except exec execute false fetch first float for force foreign forward free from full function global goto grant group grouping having hour ignore index inner insensitive insert instead int integer intersect into is isolation key last level load local max min minute modify move name national nchar next no numeric of off on only open option order out output partial password precision prepare primary prior privileges procedure public read real references relative repeatable restrict return returns revoke rollback rollup rows rule schema scroll second section select sequence serializable set size smallint static statistics table temp temporary then time timestamp to top transaction translation trigger true truncate uncommitted union unique update values varchar varying view when where with work",j="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:E.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:E.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(F),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(j),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords(K),"gmi"),css:"keyword"}],this.CssClass="dp-sql",this.Style=".dp-sql .func { color: #ff1493; }.dp-sql .op { color: #808080; }"},E.sh.Brushes.Sql.prototype=new E.sh.Highlighter,E.sh.Brushes.Sql.Aliases=["sql"];var c=this,n,S;c.PluginName="InsertCode",c.InitConfig=function(F){n=F},c.InitEditor=function(F){S=F,S.attachEvent("exec_command_insertcode",function(K,j,o){c.DoShowDialog(),K.returnValue=!0}),S.toolbarFactoryMap.insertcode=function(K){var j=S.createToolbarButton(K);return j.style.backgroundColor="",j}};function M(F,K,j,o){var N=F.ownerDocument.createElement(K);return j&&(N.style.cssText=j),o&&(N.className=o),F.appendChild(N),N}c.DoShowDialog=function(){var F=null;try{var K=S.getDocument(),j=K.defaultView.getSelection();j&&j.rangeCount&&(F=j.getRangeAt(0).cloneRange())}catch{F=null}function o(){if(!F)return!1;try{var l=S.getDocument(),s=l.defaultView.getSelection();return s.removeAllRanges(),s.addRange(F),!0}catch{return!1}}function N(l){if(!o())return!1;var s=S.getDocument(),C=s.defaultView.getSelection();if(!C||!C.rangeCount)return!1;for(var p=C.getRangeAt(0),u=p.startContainer,f=null;u&&u!==s.body;){if(u.nodeType===1&&/^(P|H[1-6]|LI|TD|TH|DIV|BLOCKQUOTE)$/.test(u.tagName)){f=u;break}u=u.parentNode}var T=s.createElement("div");T.innerHTML=l;var w=T.firstChild;if(!w)return!1;if(!f||!/^(P|H[1-6])$/.test(f.tagName))return p.deleteContents(),p.insertNode(w),!0;p.deleteContents();var k=p.cloneRange();k.setEndAfter(f.lastChild||f);var y=k.extractContents();f.parentNode.insertBefore(w,f.nextSibling);var O=s.createElement(f.tagName);return O.appendChild(y),(O.textContent.replace(/^\s+|\s+$/g,"")!==""||O.querySelector("*"))&&f.parentNode.insertBefore(O,w.nextSibling),f.textContent.replace(/^\s+|\s+$/g,"")===""&&!f.querySelector("img,table")&&f.parentNode.removeChild(f),!0}var U=S.createDialog(S.getLangText("insertcode"),"rte-dialog-insertcode"),$=M(U,"div","position:relative;text-align:center;");M($,"label").innerText=S.getLangText("language")+":";var W=M($,"select","width:200px;");W.options.add(new Option("Plain Text",""));for(var q in E.sh.Brushes){var x=E.sh.Brushes[q].Aliases;if(x!=null){W.options.add(new Option(x,q));var m=sessionStorage.getItem("rte-insertcode-lang");m&&(W.value=m)}}var D=M(U,"div","position:relative;text-align:center;"),I=M(D,"textarea","width:100%;min-width:300px;height:200px"),G=M(U,"rte-dialog-footer",null,"rte-dialog-footer-center"),L=M(G,"rte-dialog-button");L.innerText="Insert",setTimeout(function(){I.focus()},300),L.onclick=function(){if(U.close(),sessionStorage.setItem("rte-insertcode-lang",W.value),W.value!=""){var l=E.sh.Brushes[W.value];I.language=l.Aliases[0]+":nocontrols",I.name="rteinsertcode"+new Date().getTime(),I.textContent=I.value,E.sh.HighlightAll(I);var s=I.previousSibling;if(!N('<div class="dp-highlighter">'+s.innerHTML+"</div>")){var C=S.insertRootParagraph();C.innerHTML='<div class="dp-highlighter">'+s.innerHTML+"</div>"}}else if(o())S.insertText(I.value);else{var C=S.insertRootParagraph();C.innerText=I.value}S.focus()}}}RTE_DefaultConfig.plugin_insertemoji=RTE_Plugin_InsertEmoji;function RTE_Plugin_InsertEmoji(){function E(N){if(N.length>2)return N;if(N.length==1||N.charCodeAt(1)==65039||N.charCodeAt(1)==65039)return"&#"+N.charCodeAt(0)+";";var U=N.charCodeAt(0)-55356;if(U<0&&U>3)return N;var $=N.charCodeAt(1)-56324,W=U*1024+$+126980;return"&#x"+W.toString(16)+";"}var c=["smileys","people","animals","food","travel","activities","objects","symbols"],n=["\u{1F600}#grinning face|\u{1F603}#grinning face with big eyes|\u{1F604}#grinning face with smiling eyes|\u{1F601}#beaming face with smiling eyes|\u{1F606}#grinning squinting face|\u{1F605}#grinning face with sweat|\u{1F923}#rolling on the floor laughing|\u{1F602}#face with tears of joy|\u{1F642}#slightly smiling face|\u{1F643}#upside-down face|\u{1F609}#winking face|\u{1F60A}#smiling face with smiling eyes|\u{1F607}#smiling face with halo|\u{1F60D}#smiling face with heart-eyes|\u{1F929}#star-struck|\u{1F618}#face blowing a kiss|\u{1F617}#kissing face|\u{1F61A}#kissing face with closed eyes|\u{1F619}#kissing face with smiling eyes|\u{1F60B}#face savoring food|\u{1F61B}#face with tongue|\u{1F61C}#winking face with tongue|\u{1F92A}#zany face|\u{1F61D}#squinting face with tongue|\u{1F911}#money-mouth face|\u{1F917}#hugging face|\u{1F92D}#face with hand over mouth|\u{1F92B}#shushing face|\u{1F914}#thinking face|\u{1F910}#zipper-mouth face|\u{1F928}#face with raised eyebrow|\u{1F610}#neutral face|\u{1F611}#expressionless face|\u{1F636}#face without mouth|\u{1F60F}#smirking face|\u{1F612}#unamused face|\u{1F644}#face with rolling eyes|\u{1F62C}#grimacing face|\u{1F925}#lying face|\u{1F60C}#relieved face|\u{1F614}#pensive face|\u{1F62A}#sleepy face|\u{1F924}#drooling face|\u{1F634}#sleeping face|\u{1F637}#face with medical mask|\u{1F912}#face with thermometer|\u{1F915}#face with head-bandage|\u{1F922}#nauseated face|\u{1F92E}#face vomiting|\u{1F927}#sneezing face|\u{1F635}#dizzy face|\u{1F92F}#exploding head|\u{1F920}#cowboy hat face|\u{1F60E}#smiling face with sunglasses|\u{1F913}#nerd face|\u{1F9D0}#face with monocle|\u{1F615}#confused face|\u{1F61F}#worried face|\u{1F641}#slightly frowning face|\u2639\uFE0F#frowning face|\u{1F62E}#face with open mouth|\u{1F62F}#hushed face|\u{1F632}#astonished face|\u{1F633}#flushed face|\u{1F626}#frowning face with open mouth|\u{1F627}#anguished face|\u{1F628}#fearful face|\u{1F630}#anxious face with sweat|\u{1F625}#sad but relieved face|\u{1F622}#crying face|\u{1F62D}#loudly crying face|\u{1F631}#face screaming in fear|\u{1F616}#confounded face|\u{1F623}#persevering face|\u{1F61E}#disappointed face|\u{1F613}#downcast face with sweat|\u{1F629}#weary face|\u{1F62B}#tired face|\u{1F624}#face with steam from nose|\u{1F621}#pouting face|\u{1F620}#angry face|\u{1F92C}#face with symbols on mouth|\u{1F608}#smiling face with horns|\u{1F47F}#angry face with horns|\u{1F480}#skull|\u2620\uFE0F#skull and crossbones|\u{1F4A9}#pile of poo|\u{1F921}#clown face|\u{1F479}#ogre|\u{1F47A}#goblin|\u{1F47B}#ghost|\u{1F47D}#alien|\u{1F47E}#alien monster|\u{1F916}#robot|\u{1F63A}#grinning cat|\u{1F638}#grinning cat with smiling eyes|\u{1F639}#cat with tears of joy|\u{1F63B}#smiling cat with heart-eyes|\u{1F63C}#cat with wry smile|\u{1F63D}#kissing cat|\u{1F640}#weary cat|\u{1F63F}#crying cat|\u{1F63E}#pouting cat|\u{1F648}#see-no-evil monkey|\u{1F649}#hear-no-evil monkey|\u{1F64A}#speak-no-evil monkey|\u{1F48B}#kiss mark|\u{1F48C}#love letter|\u{1F498}#heart with arrow|\u{1F49D}#heart with ribbon|\u{1F496}#sparkling heart|\u{1F497}#growing heart|\u{1F493}#beating heart|\u{1F49E}#revolving hearts|\u{1F495}#two hearts|\u{1F49F}#heart decoration|\u2763\uFE0F#heart exclamation|\u{1F494}#broken heart|\u2764\uFE0F#red heart|\u{1F9E1}#orange heart|\u{1F49B}#yellow heart|\u{1F49A}#green heart|\u{1F499}#blue heart|\u{1F49C}#purple heart|\u{1F5A4}#black heart|\u{1F4AF}#hundred points|\u{1F4A2}#anger symbol|\u{1F4A5}#collision|\u{1F4AB}#dizzy|\u{1F4A6}#sweat droplets|\u{1F4A8}#dashing away|\u{1F4A3}#bomb|\u{1F4AC}#speech balloon|\u{1F4AD}#thought balloon|\u{1F4A4}#zzz","\u{1F44B}#waving hand|\u{1F91A}#raised back of hand|\u270B#raised hand|\u{1F596}#vulcan salute|\u{1F44C}#OK hand|\u270C\uFE0F#victory hand|\u{1F91E}#crossed fingers|\u{1F91F}#love-you gesture|\u{1F918}#sign of the horns|\u{1F919}#call me hand|\u{1F448}#backhand index pointing left|\u{1F449}#backhand index pointing right|\u{1F446}#backhand index pointing up|\u{1F595}#middle finger|\u{1F447}#backhand index pointing down|\u261D\uFE0F#index pointing up|\u{1F44D}#thumbs up|\u{1F44E}#thumbs down|\u270A#raised fist|\u{1F44A}#oncoming fist|\u{1F91B}#left-facing fist|\u{1F91C}#right-facing fist|\u{1F44F}#clapping hands|\u{1F64C}#raising hands|\u{1F450}#open hands|\u{1F932}#palms up together|\u{1F91D}#handshake|\u{1F64F}#folded hands|\u270D\uFE0F#writing hand|\u{1F485}#nail polish|\u{1F933}#selfie|\u{1F4AA}#flexed biceps|\u{1F442}#ear|\u{1F443}#nose|\u{1F9E0}#brain|\u{1F440}#eyes|\u{1F445}#tongue|\u{1F444}#mouth|\u{1F476}#baby|\u{1F9D2}#child|\u{1F466}#boy|\u{1F467}#girl|\u{1F9D1}#person|\u{1F471}#person with blond hair|\u{1F468}#man|\u{1F9D4}#man with beard|\u{1F469}#woman|\u{1F9D3}#older person|\u{1F474}#old man|\u{1F475}#old woman|\u{1F64D}#person frowning|\u{1F64E}#person pouting|\u{1F645}#person gesturing NO|\u{1F646}#person gesturing OK|\u{1F481}#person tipping hand|\u{1F64B}#person raising hand|\u{1F647}#person bowing|\u{1F926}#person facepalming|\u{1F937}#person shrugging|\u{1F46E}#police officer|\u{1F482}#guard|\u{1F477}#construction worker|\u{1F934}#prince|\u{1F478}#princess|\u{1F473}#person wearing turban|\u{1F472}#person with skullcap|\u{1F9D5}#woman with headscarf|\u{1F935}#person in tuxedo|\u{1F470}#person with veil|\u{1F930}#pregnant woman|\u{1F931}#breast-feeding|\u{1F47C}#baby angel|\u{1F385}#Santa Claus|\u{1F936}#Mrs. Claus|\u{1F9D9}#mage|\u{1F9DA}#fairy|\u{1F9DB}#vampire|\u{1F9DC}#merperson|\u{1F9DD}#elf|\u{1F9DE}#genie|\u{1F9DF}#zombie|\u{1F486}#person getting massage|\u{1F487}#person getting haircut|\u{1F6B6}#person walking|\u{1F3C3}#person running|\u{1F483}#woman dancing|\u{1F57A}#man dancing|\u{1F46F}#people with bunny ears|\u{1F9D6}#person in steamy room|\u{1F9D7}#person climbing|\u{1F93A}#person fencing|\u{1F3C7}#horse racing|\u26F7\uFE0F#skier|\u{1F3C2}#snowboarder|\u{1F3C4}#person surfing|\u{1F6A3}#person rowing boat|\u{1F3CA}#person swimming|\u26F9\uFE0F#person bouncing ball|\u{1F6B4}#person biking|\u{1F6B5}#person mountain biking|\u{1F938}#person cartwheeling|\u{1F93C}#people wrestling|\u{1F93D}#person playing water polo|\u{1F93E}#person playing handball|\u{1F939}#person juggling|\u{1F9D8}#person in lotus position|\u{1F6C0}#person taking bath|\u{1F6CC}#person in bed|\u{1F46D}#women holding hands|\u{1F46B}#woman and man holding hands|\u{1F46C}#men holding hands|\u{1F48F}#kiss|\u{1F491}#couple with heart|\u{1F46A}#family|\u{1F464}#bust in silhouette|\u{1F465}#busts in silhouette|\u{1F463}#footprints","\u{1F435}#monkey face|\u{1F412}#monkey|\u{1F98D}#gorilla|\u{1F436}#dog face|\u{1F415}#dog|\u{1F429}#poodle|\u{1F43A}#wolf|\u{1F98A}#fox|\u{1F431}#cat face|\u{1F408}#cat|\u{1F981}#lion|\u{1F42F}#tiger face|\u{1F405}#tiger|\u{1F406}#leopard|\u{1F434}#horse face|\u{1F40E}#horse|\u{1F984}#unicorn|\u{1F993}#zebra|\u{1F98C}#deer|\u{1F42E}#cow face|\u{1F402}#ox|\u{1F403}#water buffalo|\u{1F404}#cow|\u{1F437}#pig face|\u{1F416}#pig|\u{1F417}#boar|\u{1F43D}#pig nose|\u{1F40F}#ram|\u{1F411}#ewe|\u{1F410}#goat|\u{1F42A}#camel|\u{1F42B}#two-hump camel|\u{1F992}#giraffe|\u{1F418}#elephant|\u{1F98F}#rhinoceros|\u{1F42D}#mouse face|\u{1F401}#mouse|\u{1F400}#rat|\u{1F439}#hamster|\u{1F430}#rabbit face|\u{1F407}#rabbit|\u{1F994}#hedgehog|\u{1F987}#bat|\u{1F43B}#bear|\u{1F428}#koala|\u{1F43C}#panda|\u{1F43E}#paw prints|\u{1F983}#turkey|\u{1F414}#chicken|\u{1F413}#rooster|\u{1F423}#hatching chick|\u{1F424}#baby chick|\u{1F425}#front-facing baby chick|\u{1F426}#bird|\u{1F427}#penguin|\u{1F985}#eagle|\u{1F986}#duck|\u{1F989}#owl|\u{1F438}#frog|\u{1F40A}#crocodile|\u{1F422}#turtle|\u{1F98E}#lizard|\u{1F40D}#snake|\u{1F432}#dragon face|\u{1F409}#dragon|\u{1F995}#sauropod|\u{1F996}#T-Rex|\u{1F433}#spouting whale|\u{1F40B}#whale|\u{1F42C}#dolphin|\u{1F41F}#fish|\u{1F420}#tropical fish|\u{1F421}#blowfish|\u{1F988}#shark|\u{1F419}#octopus|\u{1F41A}#spiral shell|\u{1F40C}#snail|\u{1F98B}#butterfly|\u{1F41B}#bug|\u{1F41C}#ant|\u{1F41D}#honeybee|\u{1F41E}#lady beetle|\u{1F997}#cricket|\u{1F982}#scorpion|\u{1F490}#bouquet|\u{1F338}#cherry blossom|\u{1F4AE}#white flower|\u{1F339}#rose|\u{1F940}#wilted flower|\u{1F33A}#hibiscus|\u{1F33B}#sunflower|\u{1F33C}#blossom|\u{1F337}#tulip|\u{1F331}#seedling|\u{1F332}#evergreen tree|\u{1F333}#deciduous tree|\u{1F334}#palm tree|\u{1F335}#cactus|\u{1F33E}#sheaf of rice|\u{1F33F}#herb|\u2618\uFE0F#shamrock|\u{1F340}#four leaf clover|\u{1F341}#maple leaf|\u{1F342}#fallen leaf|\u{1F343}#leaf fluttering in wind","\u{1F347}#grapes|\u{1F348}#melon|\u{1F349}#watermelon|\u{1F34A}#tangerine|\u{1F34B}#lemon|\u{1F34C}#banana|\u{1F34D}#pineapple|\u{1F34E}#red apple|\u{1F34F}#green apple|\u{1F350}#pear|\u{1F351}#peach|\u{1F352}#cherries|\u{1F353}#strawberry|\u{1F95D}#kiwi fruit|\u{1F345}#tomato|\u{1F965}#coconut|\u{1F951}#avocado|\u{1F346}#eggplant|\u{1F954}#potato|\u{1F955}#carrot|\u{1F33D}#ear of corn|\u{1F952}#cucumber|\u{1F966}#broccoli|\u{1F344}#mushroom|\u{1F95C}#peanuts|\u{1F330}#chestnut|\u{1F35E}#bread|\u{1F950}#croissant|\u{1F956}#baguette bread|\u{1F968}#pretzel|\u{1F95E}#pancakes|\u{1F9C0}#cheese wedge|\u{1F356}#meat on bone|\u{1F357}#poultry leg|\u{1F969}#cut of meat|\u{1F953}#bacon|\u{1F354}#hamburger|\u{1F35F}#french fries|\u{1F355}#pizza|\u{1F32D}#hot dog|\u{1F96A}#sandwich|\u{1F32E}#taco|\u{1F32F}#burrito|\u{1F959}#stuffed flatbread|\u{1F95A}#egg|\u{1F373}#cooking|\u{1F958}#shallow pan of food|\u{1F372}#pot of food|\u{1F963}#bowl with spoon|\u{1F957}#green salad|\u{1F37F}#popcorn|\u{1F96B}#canned food|\u{1F371}#bento box|\u{1F358}#rice cracker|\u{1F359}#rice ball|\u{1F35A}#cooked rice|\u{1F35B}#curry rice|\u{1F35C}#steaming bowl|\u{1F35D}#spaghetti|\u{1F360}#roasted sweet potato|\u{1F362}#oden|\u{1F363}#sushi|\u{1F364}#fried shrimp|\u{1F365}#fish cake with swirl|\u{1F361}#dango|\u{1F95F}#dumpling|\u{1F960}#fortune cookie|\u{1F961}#takeout box|\u{1F980}#crab|\u{1F990}#shrimp|\u{1F991}#squid|\u{1F366}#soft ice cream|\u{1F367}#shaved ice|\u{1F368}#ice cream|\u{1F369}#doughnut|\u{1F36A}#cookie|\u{1F382}#birthday cake|\u{1F370}#shortcake|\u{1F967}#pie|\u{1F36B}#chocolate bar|\u{1F36C}#candy|\u{1F36D}#lollipop|\u{1F36E}#custard|\u{1F36F}#honey pot|\u{1F37C}#baby bottle|\u{1F95B}#glass of milk|\u2615#hot beverage|\u{1F375}#teacup without handle|\u{1F376}#sake|\u{1F37E}#bottle with popping cork|\u{1F377}#wine glass|\u{1F378}#cocktail glass|\u{1F379}#tropical drink|\u{1F37A}#beer mug|\u{1F37B}#clinking beer mugs|\u{1F942}#clinking glasses|\u{1F943}#tumbler glass|\u{1F964}#cup with straw|\u{1F962}#chopsticks|\u{1F374}#fork and knife|\u{1F944}#spoon|\u{1F52A}#kitchen knife|\u{1F3FA}#amphora","\u{1F30D}#globe showing Europe-Africa|\u{1F30E}#globe showing Americas|\u{1F30F}#globe showing Asia-Australia|\u{1F310}#globe with meridians|\u{1F5FE}#map of Japan|\u26F0\uFE0F#mountain|\u{1F30B}#volcano|\u{1F5FB}#mount fuji|\u{1F3E0}#house|\u{1F3E1}#house with garden|\u{1F3E2}#office building|\u{1F3E3}#Japanese post office|\u{1F3E4}#post office|\u{1F3E5}#hospital|\u{1F3E6}#bank|\u{1F3E8}#hotel|\u{1F3E9}#love hotel|\u{1F3EA}#convenience store|\u{1F3EB}#school|\u{1F3EC}#department store|\u{1F3ED}#factory|\u{1F3EF}#Japanese castle|\u{1F3F0}#castle|\u{1F492}#wedding|\u{1F5FC}#Tokyo tower|\u{1F5FD}#Statue of Liberty|\u26EA#church|\u{1F54C}#mosque|\u{1F54D}#synagogue|\u26E9\uFE0F#shinto shrine|\u{1F54B}#kaaba|\u26F2#fountain|\u26FA#tent|\u{1F301}#foggy|\u{1F303}#night with stars|\u{1F304}#sunrise over mountains|\u{1F305}#sunrise|\u{1F306}#cityscape at dusk|\u{1F307}#sunset|\u{1F309}#bridge at night|\u2668\uFE0F#hot springs|\u{1F3A0}#carousel horse|\u{1F3A1}#ferris wheel|\u{1F3A2}#roller coaster|\u{1F488}#barber pole|\u{1F3AA}#circus tent|\u{1F682}#locomotive|\u{1F683}#railway car|\u{1F684}#high-speed train|\u{1F685}#bullet train|\u{1F686}#train|\u{1F687}#metro|\u{1F688}#light rail|\u{1F689}#station|\u{1F68A}#tram|\u{1F69D}#monorail|\u{1F69E}#mountain railway|\u{1F68B}#tram car|\u{1F68C}#bus|\u{1F68D}#oncoming bus|\u{1F68E}#trolleybus|\u{1F690}#minibus|\u{1F691}#ambulance|\u{1F692}#fire engine|\u{1F693}#police car|\u{1F694}#oncoming police car|\u{1F695}#taxi|\u{1F696}#oncoming taxi|\u{1F697}#automobile|\u{1F698}#oncoming automobile|\u{1F699}#sport utility vehicle|\u{1F69A}#delivery truck|\u{1F69B}#articulated lorry|\u{1F69C}#tractor|\u{1F6F5}#motor scooter|\u{1F6B2}#bicycle|\u{1F6F4}#kick scooter|\u{1F68F}#bus stop|\u26FD#fuel pump|\u{1F6A8}#police car light|\u{1F6A5}#horizontal traffic light|\u{1F6A6}#vertical traffic light|\u{1F6D1}#stop sign|\u{1F6A7}#construction|\u2693#anchor|\u26F5#sailboat|\u{1F6F6}#canoe|\u{1F6A4}#speedboat|\u26F4\uFE0F#ferry|\u{1F6A2}#ship|\u2708\uFE0F#airplane|\u{1F6EB}#airplane departure|\u{1F6EC}#airplane arrival|\u{1F4BA}#seat|\u{1F681}#helicopter|\u{1F69F}#suspension railway|\u{1F6A0}#mountain cableway|\u{1F6A1}#aerial tramway|\u{1F680}#rocket|\u{1F6F8}#flying saucer|\u231B#hourglass done|\u23F3#hourglass not done|\u231A#watch|\u23F0#alarm clock|\u23F1\uFE0F#stopwatch|\u23F2\uFE0F#timer clock|\u{1F55B}#twelve o\u2019clock|\u{1F567}#twelve-thirty|\u{1F550}#one o\u2019clock|\u{1F55C}#one-thirty|\u{1F551}#two o\u2019clock|\u{1F55D}#two-thirty|\u{1F552}#three o\u2019clock|\u{1F55E}#three-thirty|\u{1F553}#four o\u2019clock|\u{1F55F}#four-thirty|\u{1F554}#five o\u2019clock|\u{1F560}#five-thirty|\u{1F555}#six o\u2019clock|\u{1F561}#six-thirty|\u{1F556}#seven o\u2019clock|\u{1F562}#seven-thirty|\u{1F557}#eight o\u2019clock|\u{1F563}#eight-thirty|\u{1F558}#nine o\u2019clock|\u{1F564}#nine-thirty|\u{1F559}#ten o\u2019clock|\u{1F565}#ten-thirty|\u{1F55A}#eleven o\u2019clock|\u{1F566}#eleven-thirty|\u{1F311}#new moon|\u{1F312}#waxing crescent moon|\u{1F313}#first quarter moon|\u{1F314}#waxing gibbous moon|\u{1F315}#full moon|\u{1F316}#waning gibbous moon|\u{1F317}#last quarter moon|\u{1F318}#waning crescent moon|\u{1F319}#crescent moon|\u{1F31A}#new moon face|\u{1F31B}#first quarter moon face|\u{1F31C}#last quarter moon face|\u2600\uFE0F#sun|\u{1F31D}#full moon face|\u{1F31E}#sun with face|\u2B50#star|\u{1F31F}#glowing star|\u{1F320}#shooting star|\u{1F30C}#milky way|\u2601\uFE0F#cloud|\u26C5#sun behind cloud|\u26C8\uFE0F#cloud with lightning and rain|\u{1F300}#cyclone|\u{1F308}#rainbow|\u{1F302}#closed umbrella|\u2602\uFE0F#umbrella|\u2614#umbrella with rain drops|\u26F1\uFE0F#umbrella on ground|\u26A1#high voltage|\u2744\uFE0F#snowflake|\u2603\uFE0F#snowman|\u26C4#snowman without snow|\u2604\uFE0F#comet|\u{1F525}#fire|\u{1F4A7}#droplet|\u{1F30A}#water wave","\u{1F383}#jack-o-lantern|\u{1F384}#Christmas tree|\u{1F386}#fireworks|\u{1F387}#sparkler|\u2728#sparkles|\u{1F388}#balloon|\u{1F389}#party popper|\u{1F38A}#confetti ball|\u{1F38B}#tanabata tree|\u{1F38D}#pine decoration|\u{1F38E}#Japanese dolls|\u{1F38F}#carp streamer|\u{1F390}#wind chime|\u{1F391}#moon viewing ceremony|\u{1F380}#ribbon|\u{1F381}#wrapped gift|\u{1F3AB}#ticket|\u{1F3C6}#trophy|\u{1F3C5}#sports medal|\u{1F947}#1st place medal|\u{1F948}#2nd place medal|\u{1F949}#3rd place medal|\u26BD#soccer ball|\u26BE#baseball|\u{1F3C0}#basketball|\u{1F3D0}#volleyball|\u{1F3C8}#american football|\u{1F3C9}#rugby football|\u{1F3BE}#tennis|\u{1F3B3}#bowling|\u{1F3CF}#cricket game|\u{1F3D1}#field hockey|\u{1F3D2}#ice hockey|\u{1F3D3}#ping pong|\u{1F3F8}#badminton|\u{1F94A}#boxing glove|\u{1F94B}#martial arts uniform|\u{1F945}#goal net|\u26F3#flag in hole|\u26F8\uFE0F#ice skate|\u{1F3A3}#fishing pole|\u{1F3BD}#running shirt|\u{1F3BF}#skis|\u{1F6F7}#sled|\u{1F94C}#curling stone|\u{1F3AF}#direct hit|\u{1F3B1}#pool 8 ball|\u{1F52E}#crystal ball|\u{1F3AE}#video game|\u{1F3B0}#slot machine|\u{1F3B2}#game die|\u2660\uFE0F#spade suit|\u2665\uFE0F#heart suit|\u2666\uFE0F#diamond suit|\u2663\uFE0F#club suit|\u{1F0CF}#joker|\u{1F004}#mahjong red dragon|\u{1F3B4}#flower playing cards|\u{1F3AD}#performing arts|\u{1F3A8}#artist palette","\u{1F453}#glasses|\u{1F454}#necktie|\u{1F455}#t-shirt|\u{1F456}#jeans|\u{1F9E3}#scarf|\u{1F9E4}#gloves|\u{1F9E5}#coat|\u{1F9E6}#socks|\u{1F457}#dress|\u{1F458}#kimono|\u{1F459}#bikini|\u{1F45A}#woman\u2019s clothes|\u{1F45B}#purse|\u{1F45C}#handbag|\u{1F45D}#clutch bag|\u{1F392}#backpack|\u{1F45E}#man\u2019s shoe|\u{1F45F}#running shoe|\u{1F460}#high-heeled shoe|\u{1F461}#woman\u2019s sandal|\u{1F462}#woman\u2019s boot|\u{1F451}#crown|\u{1F452}#woman\u2019s hat|\u{1F3A9}#top hat|\u{1F393}#graduation cap|\u{1F9E2}#billed cap|\u26D1\uFE0F#rescue worker\u2019s helmet|\u{1F4FF}#prayer beads|\u{1F484}#lipstick|\u{1F48D}#ring|\u{1F48E}#gem stone|\u{1F507}#muted speaker|\u{1F508}#speaker low volume|\u{1F509}#speaker medium volume|\u{1F50A}#speaker high volume|\u{1F4E2}#loudspeaker|\u{1F4E3}#megaphone|\u{1F4EF}#postal horn|\u{1F514}#bell|\u{1F515}#bell with slash|\u{1F3BC}#musical score|\u{1F3B5}#musical note|\u{1F3B6}#musical notes|\u{1F3A4}#microphone|\u{1F3A7}#headphone|\u{1F4FB}#radio|\u{1F3B7}#saxophone|\u{1F3B8}#guitar|\u{1F3B9}#musical keyboard|\u{1F3BA}#trumpet|\u{1F3BB}#violin|\u{1F941}#drum|\u{1F4F1}#mobile phone|\u{1F4F2}#mobile phone with arrow|\u260E\uFE0F#telephone|\u{1F4DE}#telephone receiver|\u{1F4DF}#pager|\u{1F4E0}#fax machine|\u{1F50B}#battery|\u{1F50C}#electric plug|\u{1F4BB}#laptop|\u2328\uFE0F#keyboard|\u{1F4BD}#computer disk|\u{1F4BE}#floppy disk|\u{1F4BF}#optical disk|\u{1F4C0}#dvd|\u{1F3A5}#movie camera|\u{1F3AC}#clapper board|\u{1F4FA}#television|\u{1F4F7}#camera|\u{1F4F8}#camera with flash|\u{1F4F9}#video camera|\u{1F4FC}#videocassette|\u{1F50D}#magnifying glass tilted left|\u{1F50E}#magnifying glass tilted right|\u{1F4A1}#light bulb|\u{1F526}#flashlight|\u{1F3EE}#red paper lantern|\u{1F4D4}#notebook with decorative cover|\u{1F4D5}#closed book|\u{1F4D6}#open book|\u{1F4D7}#green book|\u{1F4D8}#blue book|\u{1F4D9}#orange book|\u{1F4DA}#books|\u{1F4D3}#notebook|\u{1F4D2}#ledger|\u{1F4C3}#page with curl|\u{1F4DC}#scroll|\u{1F4C4}#page facing up|\u{1F4F0}#newspaper|\u{1F4D1}#bookmark tabs|\u{1F516}#bookmark|\u{1F4B0}#money bag|\u{1F4B4}#yen banknote|\u{1F4B5}#dollar banknote|\u{1F4B6}#euro banknote|\u{1F4B7}#pound banknote|\u{1F4B8}#money with wings|\u{1F4B3}#credit card|\u{1F4B9}#chart increasing with yen|\u2709\uFE0F#envelope|\u{1F4E7}#e-mail|\u{1F4E8}#incoming envelope|\u{1F4E9}#envelope with arrow|\u{1F4E4}#outbox tray|\u{1F4E5}#inbox tray|\u{1F4E6}#package|\u{1F4EB}#closed mailbox with raised flag|\u{1F4EA}#closed mailbox with lowered flag|\u{1F4EC}#open mailbox with raised flag|\u{1F4ED}#open mailbox with lowered flag|\u{1F4EE}#postbox|\u270F\uFE0F#pencil|\u2712\uFE0F#black nib|\u{1F4DD}#memo|\u{1F4BC}#briefcase|\u{1F4C1}#file folder|\u{1F4C2}#open file folder|\u{1F4C5}#calendar|\u{1F4C6}#tear-off calendar|\u{1F4C7}#card index|\u{1F4C8}#chart increasing|\u{1F4C9}#chart decreasing|\u{1F4CA}#bar chart|\u{1F4CB}#clipboard|\u{1F4CC}#pushpin|\u{1F4CD}#round pushpin|\u{1F4CE}#paperclip|\u{1F4CF}#straight ruler|\u{1F4D0}#triangular ruler|\u2702\uFE0F#scissors|\u{1F512}#locked|\u{1F513}#unlocked|\u{1F50F}#locked with pen|\u{1F510}#locked with key|\u{1F511}#key|\u{1F528}#hammer|\u26CF\uFE0F#pick|\u2692\uFE0F#hammer and pick|\u2694\uFE0F#crossed swords|\u{1F52B}#pistol|\u{1F3F9}#bow and arrow|\u{1F527}#wrench|\u{1F529}#nut and bolt|\u2699\uFE0F#gear|\u2696\uFE0F#balance scale|\u{1F517}#link|\u26D3\uFE0F#chains|\u2697\uFE0F#alembic|\u{1F52C}#microscope|\u{1F52D}#telescope|\u{1F4E1}#satellite antenna|\u{1F489}#syringe|\u{1F48A}#pill|\u{1F6AA}#door|\u{1F6BD}#toilet|\u{1F6BF}#shower|\u{1F6C1}#bathtub|\u{1F6D2}#shopping cart|\u{1F6AC}#cigarette|\u26B0\uFE0F#coffin|\u26B1\uFE0F#funeral urn|\u{1F5FF}#moai","\u{1F3E7}#ATM sign|\u{1F6AE}#litter in bin sign|\u{1F6B0}#potable water|\u267F#wheelchair symbol|\u{1F6B9}#men\u2019s room|\u{1F6BA}#women\u2019s room|\u{1F6BB}#restroom|\u{1F6BC}#baby symbol|\u{1F6BE}#water closet|\u{1F6C2}#passport control|\u{1F6C3}#customs|\u{1F6C4}#baggage claim|\u{1F6C5}#left luggage|\u26A0\uFE0F#warning|\u{1F6B8}#children crossing|\u26D4#no entry|\u{1F6AB}#prohibited|\u{1F6B3}#no bicycles|\u{1F6AD}#no smoking|\u{1F6AF}#no littering|\u{1F6B1}#non-potable water|\u{1F6B7}#no pedestrians|\u{1F4F5}#no mobile phones|\u{1F51E}#no one under eighteen|\u2622\uFE0F#radioactive|\u2623\uFE0F#biohazard|\u2B06\uFE0F#up arrow|\u2197\uFE0F#up-right arrow|\u27A1\uFE0F#right arrow|\u2198\uFE0F#down-right arrow|\u2B07\uFE0F#down arrow|\u2199\uFE0F#down-left arrow|\u2B05\uFE0F#left arrow|\u2196\uFE0F#up-left arrow|\u2195\uFE0F#up-down arrow|\u2194\uFE0F#left-right arrow|\u21A9\uFE0F#right arrow curving left|\u21AA\uFE0F#left arrow curving right|\u2934\uFE0F#right arrow curving up|\u2935\uFE0F#right arrow curving down|\u{1F503}#clockwise vertical arrows|\u{1F504}#counterclockwise arrows button|\u{1F519}#BACK arrow|\u{1F51A}#END arrow|\u{1F51B}#ON! arrow|\u{1F51C}#SOON arrow|\u{1F51D}#TOP arrow|\u{1F6D0}#place of worship|\u269B\uFE0F#atom symbol|\u2721\uFE0F#star of David|\u2638\uFE0F#wheel of dharma|\u262F\uFE0F#yin yang|\u271D\uFE0F#latin cross|\u2626\uFE0F#orthodox cross|\u262A\uFE0F#star and crescent|\u262E\uFE0F#peace symbol|\u{1F54E}#menorah|\u{1F52F}#dotted six-pointed star|\u2648#Aries|\u2649#Taurus|\u264A#Gemini|\u264B#Cancer|\u264C#Leo|\u264D#Virgo|\u264E#Libra|\u264F#Scorpio|\u2650#Sagittarius|\u2651#Capricorn|\u2652#Aquarius|\u2653#Pisces|\u26CE#Ophiuchus|\u{1F500}#shuffle tracks button|\u{1F501}#repeat button|\u{1F502}#repeat single button|\u25B6\uFE0F#play button|\u23E9#fast-forward button|\u23ED\uFE0F#next track button|\u23EF\uFE0F#play or pause button|\u25C0\uFE0F#reverse button|\u23EA#fast reverse button|\u23EE\uFE0F#last track button|\u{1F53C}#upwards button|\u23EB#fast up button|\u{1F53D}#downwards button|\u23EC#fast down button|\u23F8\uFE0F#pause button|\u23F9\uFE0F#stop button|\u23FA\uFE0F#record button|\u23CF\uFE0F#eject button|\u{1F3A6}#cinema|\u{1F505}#dim button|\u{1F506}#bright button|\u{1F4F6}#antenna bars|\u{1F4F3}#vibration mode|\u{1F4F4}#mobile phone off|\u2640\uFE0F#female sign|\u2642\uFE0F#male sign|\u2716\uFE0F#multiply|\u2795#plus|\u2796#minus|\u2797#divide|\u203C\uFE0F#double exclamation mark|\u2049\uFE0F#exclamation question mark|\u2753#question mark|\u2754#white question mark|\u2755#white exclamation mark|\u2757#exclamation mark|\u3030\uFE0F#wavy dash|\u{1F4B1}#currency exchange|\u{1F4B2}#heavy dollar sign|\u2695\uFE0F#medical symbol|\u267B\uFE0F#recycling symbol|\u269C\uFE0F#fleur-de-lis|\u{1F531}#trident emblem|\u{1F4DB}#name badge|\u{1F530}#Japanese symbol for beginner|\u2B55#hollow red circle|\u2705#check mark button|\u2611\uFE0F#check box with check|\u2714\uFE0F#check mark|\u274C#cross mark|\u274E#cross mark button|\u27B0#curly loop|\u27BF#double curly loop|\u303D\uFE0F#part alternation mark|\u2733\uFE0F#eight-spoked asterisk|\u2734\uFE0F#eight-pointed star|\u2747\uFE0F#sparkle|\xA9\uFE0F#copyright|\xAE\uFE0F#registered|\u2122\uFE0F#trade mark|\u{1F51F}#keycap: 10|\u{1F520}#input latin uppercase|\u{1F521}#input latin lowercase|\u{1F522}#input numbers|\u{1F523}#input symbols|\u{1F524}#input latin letters|\u{1F18E}#AB button (blood type)|\u{1F191}#CL button|\u{1F192}#COOL button|\u{1F193}#FREE button|\u2139\uFE0F#information|\u{1F194}#ID button|\u24C2\uFE0F#circled M|\u{1F195}#NEW button|\u{1F196}#NG button|\u{1F197}#OK button|\u{1F198}#SOS button|\u{1F199}#UP! button|\u{1F19A}#VS button|\u{1F201}#Japanese \u201Chere\u201D button|\u{1F236}#Japanese \u201Cnot free of charge\u201D button|\u{1F22F}#Japanese \u201Creserved\u201D button|\u{1F250}#Japanese \u201Cbargain\u201D button|\u{1F239}#Japanese \u201Cdiscount\u201D button|\u{1F21A}#Japanese \u201Cfree of charge\u201D button|\u{1F232}#Japanese \u201Cprohibited\u201D button|\u{1F251}#Japanese \u201Cacceptable\u201D button|\u{1F238}#Japanese \u201Capplication\u201D button|\u{1F234}#Japanese \u201Cpassing grade\u201D button|\u{1F233}#Japanese \u201Cvacancy\u201D button|\u3297\uFE0F#Japanese \u201Ccongratulations\u201D button|\u3299\uFE0F#Japanese \u201Csecret\u201D button|\u{1F23A}#Japanese \u201Copen for business\u201D button|\u{1F235}#Japanese \u201Cno vacancy\u201D button|\u{1F534}#red circle|\u{1F535}#blue circle|\u26AB#black circle|\u26AA#white circle|\u2B1B#black large square|\u2B1C#white large square|\u25FC\uFE0F#black medium square|\u25FB\uFE0F#white medium square|\u25FE#black medium-small square|\u25FD#white medium-small square|\u25AA\uFE0F#black small square|\u25AB\uFE0F#white small square|\u{1F536}#large orange diamond|\u{1F537}#large blue diamond|\u{1F538}#small orange diamond|\u{1F539}#small blue diamond|\u{1F53A}#red triangle pointed up|\u{1F53B}#red triangle pointed down|\u{1F4A0}#diamond with a dot|\u{1F518}#radio button|\u{1F533}#white square button|\u{1F532}#black square button"],S=null;function M(){if(!S){S=[];for(var N=0;N<c.length;N++){for(var U=[],$={index:N,name:c[N],items:U},W=n[N].split("|"),q=0;q<W.length;q++){var x=W[q],m=x.split("#");U.push({emoji:m[0],keyword:m[1]})}S.push($)}}}var F=this,K,j;F.PluginName="InsertEmoji",F.InitConfig=function(N){K=N},F.InitEditor=function(N){j=N,j.toolbarFactoryMap.insertemoji=function(U){return j.createToolbarItemDropDownPanel(U,function($){M(),$.style.width="360px",$.style.height="420px",$.style.display="flex",$.style.flexDirection="column",$.onclick=function(g){if(g.target.nodeName=="GSPAN"){j.closeCurrentPopup();var d=g.target.getAttribute("htmlcode");j.insertHTML(d),j.collapse(!1),j.focus()}};function W(){var g=f.style.display!=="none"?f:T;return[].slice.call(g.querySelectorAll("gspan"))}function q(g,d,b){var _=d.getBoundingClientRect(),P=g.filter(function(te){var Z=te.getBoundingClientRect();return b<0?Z.bottom<=_.top+1:Z.top>=_.bottom-1});if(!P.length)return null;var B=null;P.forEach(function(te){var Z=te.getBoundingClientRect();(B===null||(b<0?Z.top>B:Z.top<B))&&(B=Z.top)});var V=P.filter(function(te){return Math.abs(te.getBoundingClientRect().top-B)<2}),Y=V[0],Q=1/0;return V.forEach(function(te){var Z=Math.abs(te.getBoundingClientRect().left-_.left);Z<Q&&(Q=Z,Y=te)}),Y}$.addEventListener("keydown",function(g){var d=g.target;if(!(!d||d.nodeName!=="GSPAN")){var b=W(),_=b.indexOf(d),P=null;if(g.key==="ArrowRight")P=b[_+1];else if(g.key==="ArrowLeft")P=b[_-1];else if(g.key==="ArrowDown")P=q(b,d,1);else if(g.key==="ArrowUp")P=q(b,d,-1);else if(g.key==="Home")P=b[0];else if(g.key==="End")P=b[b.length-1];else if(g.key==="Enter"||g.key===" "||g.key==="Spacebar"){g.preventDefault(),g.stopPropagation(),d.click();return}else if(g.key==="Escape"){g.preventDefault(),g.stopPropagation(),j.closeCurrentPopup();return}else return;g.preventDefault(),g.stopPropagation(),P&&P.focus()}},!0);var x=null,m=null;function D(){x!=null&&(x.style.backgroundColor="",x=null)}function I(){D(),x=m,x.style.backgroundColor="#e6e6e6",m=null}var G=0;$.onmouseover=function(g){for(var d=g.target;d!=$;d=d.parentNode)if(d.nodeName=="GITEM"){if(d==m)return;m=d,clearTimeout(G),G=setTimeout(I,10);return}},$.onmouseout=function(){clearTimeout(G),G=setTimeout(D,10)};var L=o($,"label","margin:5px;position:relative;");L.setAttribute("id","emojis_searchbar");var l=o(L,"input","width:100%;padding:5px 20px;border:solid 1px #ccc;border-radius:5px;");l.setAttribute("placeholder",j.getLangText("searchemojis"));var s=0;l.onchange=l.onkeyup=l.onkeypress=l.onpaste=function(){clearTimeout(s),s=setTimeout(p,100)};function C(g){var d=[];d.push('<div style="padding:3px;margin-top:5px;color:darkblue;">'+g.name[0].toUpperCase()+g.name.substring(1)+"</div>"),d.push('<div style="display:flex;flex-direction:row;flex-wrap:wrap;">');for(var b=0;b<g.items.length;b++){var _=g.items[b],P=E(_.emoji);d.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="'+(_.keyword||_.emoji).replace(/"/g,"")+'" htmlcode="'+P+'" title="'+_.emoji+" "+(_.keyword||"").replace(/"/g,"")+'">'+P+"</gspan></gitem>")}return d.push("</div>"),d.join("")}function p(){var g=l.value.trim().toLowerCase();if(!g){u.style.display=T.style.display="",f.style.display="none";return}u.style.display=T.style.display="none",f.style.display="flex";for(var d=[],b=0,_=0;_<S.length;_++)for(var P=S[_],B=0;B<P.items.length;B++){var V=P.items[B];if(!(!V.keyword||V.keyword.indexOf(g)==-1)){b++;var Y=E(V.emoji);d.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="'+(V.keyword||V.emoji).replace(/"/g,"")+'" htmlcode="'+Y+'" title="'+V.emoji+" "+(V.keyword||"").replace(/"/g,"")+'">'+Y+"</gspan></gitem>")}}f.innerHTML='<div style="width:100%;padding:3px;margin-top:5px;color:darkblue;text-align:center;">'+b+" items</div>"+d.join("")}$.setAttribute("id","emoji-picker");var u=o($,"div"),f=o($,"div","display:none;flex-direction:row;flex-wrap:wrap;overflow-y:scroll;padding-bottom:55px"),T=o($,"div","overflow-y:scroll;padding-bottom:55px;flex:999"),w=0;function k(g){w=g,T.innerHTML=C(S[g]),T.scrollTop=0;for(var d=0;d<R.length;d++)R[d].className=d===g?"rte-ui-active":""}var y=o(u,"rte-tabui");y.setAttribute("id","emoji-picker");for(var O=o(y,"rte-tabui-toolbar"),R=[],A=0;A<S.length;A++)(function(g){var d=o(O,"rte-tabui-toolbar-button","width:32px;text-align:center;margin:4px");d.setAttribute("title",g.name),d.innerHTML=g.items[0].emoji,d.onclick=function(){k(g.index)},R.push(d)})(S[A]);k(0),l.focus()})}};function o(N,U,$,W){var q=N.ownerDocument.createElement(U);return $&&(q.style.cssText=$),W&&(q.className=W),N.appendChild(q),q}}RTE_DefaultConfig.plugin_insertgallery=RTE_Plugin_InsertGallery;function RTE_Plugin_InsertGallery(){var E=this,c,n;E.PluginName="InsertGallery",E.InitConfig=function(x){c=x,c.galleryImages||(c.galleryImages=[])},E.InitEditor=function(x){n=x,n.attachEvent("exec_command_insertgallery",function(m){m.returnValue=!0,E.DoInsertGallery()})};function S(x,m,D,I){var G=x.ownerDocument.createElement(m);return D&&(G.style.cssText=D),I&&(G.className=I),x.appendChild(G),G}function M(){return c.galleryEndpoint||window.RichTextBoxGalleryUrl||""}function F(x,m){var D=x.indexOf("?")>=0?"&":"?";return x+D+"folder="+encodeURIComponent(m||"")}function K(x,m,D,I){var G=new XMLHttpRequest;if(G.open(x,m,!0),G.onreadystatechange=function(){if(G.readyState===4){if(G.status<200||G.status>=300){I(null,"http-"+G.status);return}try{I(JSON.parse(G.responseText),null)}catch{I(null,"invalid-json")}}},G.onerror=function(){I(null,"network-error")},D){G.send(D);return}G.send()}function j(x){var m=String(x||"").split("#")[0].split("?")[0],D=m.lastIndexOf("/"),I=D>=0?m.substring(D+1):m;try{I=decodeURIComponent(I)}catch{}return I||"Image"}function o(x){return x?x<1024?x+" B":x<1024*1024?Math.round(x/1024)+" KB":Math.round(x*10/(1024*1024))/10+" MB":""}function N(x){var m=null;if(typeof x=="string")m={url:x,thumbnail:x,name:j(x)};else if(x instanceof Array)m={url:x[0],thumbnail:x[0],name:x[1]||j(x[0]),meta:x[2]||""};else if(x&&typeof x=="object"){var D=x.url||x.src||x.href;if(!D)return null;m={url:D,thumbnail:x.thumbnail||x.thumb||x.preview||D,name:x.name||x.text||x.title||j(D),meta:x.meta||x.description||x.alt||""}}return!m||!m.url?null:(m.thumbnail=m.thumbnail||m.url,m.name=m.name||j(m.url),m.source="preset",m.folder="",m.searchText=(m.name+" "+(m.meta||"")+" "+m.url).toLowerCase(),m)}function U(x){if(!x||!x.folder)return null;var m=x.name||j(x.folder)||x.folder;return{name:m,folder:x.folder,searchText:(m+" "+x.folder).toLowerCase()}}function $(x){if(!x||!x.url)return null;var m=x.name||j(x.url);return{name:m,url:x.url,thumbnail:x.thumbnail||x.url,folder:x.folder||"",source:x.source||"upload",size:x.size||0,searchText:(m+" "+x.url).toLowerCase()}}function W(x,m){x.disabled=!!m,m?x.setAttribute("aria-disabled","true"):x.removeAttribute("aria-disabled")}function q(x,m){x.style.display=m?"":"none"}E.DoInsertGallery=function(){var x=M(),m=!!x,D=typeof window.richTextBoxUploadFile=="function",I=typeof window.rte_file_upload_handler=="function",G=D||I,L=[],l=c.galleryImages||[],s;for(s=0;s<l.length;s++){var C=N(l[s]);C&&L.push(C)}var p=n.createDialog(n.getLangText("insertgallerytitle")||"Image gallery","rte-dialog-insertgallery"),u=typeof p.close=="function"?function(){p.close()}:function(){n.closeCurrentPopup()},f=S(p,"div","","rte-gallery-browser"),T=[".jpg",".jpeg",".jfif",".png",".gif",".webp",".bmp",".avif"],w=S(f,"div","","rte-dialog-browser-header"),k=S(w,"div","","rte-dialog-browser-copy");k.innerText=m?"Browse folders, upload new files, and insert the selected image into the editor.":"Browse the available images, filter by name, and insert the selected image into the editor.";var y=S(w,"div","","rte-dialog-browser-accept");y.innerText="Accepted formats: "+T.map(function(Ee){return Ee.replace(".","").toUpperCase()}).join(", ");var O=S(f,"div","","rte-gallery-browser-toolbar"),R=S(O,"div","","rte-gallery-browser-toolbar-group"),A=S(O,"div","","rte-gallery-browser-toolbar-group rte-gallery-browser-toolbar-group-right"),g=S(R,"button","","rte-gallery-browser-button");g.type="button",g.innerText="Up",g.setAttribute("aria-label","Go to the parent folder");var d=S(R,"div","","rte-gallery-browser-path");d.innerText="/";var b=S(R,"div","","rte-gallery-browser-type");b.innerText="Image files";var _=S(R,"button","","rte-gallery-browser-button");_.type="button",_.innerText="New folder";var P=S(R,"button","","rte-gallery-browser-button rte-gallery-browser-button-primary");P.type="button",P.innerText="Upload";var B=S(R,"button","","rte-gallery-browser-button");B.type="button",B.innerText="Refresh";var V=S(A,"input","","rte-gallery-browser-search");V.type="search",V.placeholder="Search images",V.setAttribute("aria-label","Search images");var Y=S(A,"input","display:none;");Y.type="file",Y.accept=T.join(","),Y.multiple=!0,q(g,m),q(d,m),q(_,m),q(P,G);var Q=S(f,"div","","rte-gallery-browser-status");Q.setAttribute("role","status"),Q.setAttribute("aria-live","polite");var te=S(f,"div","","rte-gallery-browser-surface"),Z=S(te,"div","","rte-gallery-browser-grid rte-gallery-browser-grid-folders");Z.setAttribute("role","group"),Z.setAttribute("aria-label","Folders");var le=S(te,"div","","rte-gallery-browser-grid");le.setAttribute("role","listbox"),le.setAttribute("aria-label","Available images");var ne=S(te,"div","","rte-gallery-browser-error");ne.setAttribute("role","status"),q(ne,!1);var J=S(te,"div","","rte-gallery-browser-empty"),oe=S(f,"div","","rte-gallery-browser-footer"),z=S(oe,"div","","rte-gallery-browser-footer-text"),ee=S(oe,"button","","rte-gallery-browser-button");ee.type="button",ee.innerText="Cancel";var se=S(oe,"button","","rte-gallery-browser-button rte-gallery-browser-button-primary");se.type="button",se.innerText="Insert";var ae={currentFolder:"",currentFolderDisplay:"/",parentFolder:null,folders:[],images:L.slice(0),selectedUrl:"",loading:!1,error:"",fallbackMode:!m};function fe(Ee){var He=V.value.toLowerCase();if(!He)return Ee.slice(0);for(var Je=[],it=0;it<Ee.length;it++)Ee[it].searchText.indexOf(He)>=0&&Je.push(Ee[it]);return Je}function Se(Ee){ae.selectedUrl=Ee||"",ae.error="",Re()}function ye(){for(var Ee=null,He=0;He<ae.images.length;He++)if(ae.images[He].url===ae.selectedUrl){Ee=ae.images[He];break}Ee&&(n.insertImageByUrl(Ee.url),u(),n.focus())}function me(Ee,He){var Je=Ee+He,it=m?" in "+ae.currentFolderDisplay:"",Ct=Je+" item"+(Je===1?"":"s")+it+". ";if(!ae.selectedUrl){Q.innerText=Ct+"No image selected.",z.innerText=ae.fallbackMode&&m?"Showing packaged gallery items. Uploads still save into the current folder.":"Choose an image to enable insert.",W(se,!0);return}var Lt=j(ae.selectedUrl);Q.innerText=Ct+"Selected: "+Lt+".",W(se,ae.loading);for(var kt=0;kt<ae.images.length;kt++)if(ae.images[kt].url===ae.selectedUrl){var Oe=o(ae.images[kt].size);z.innerText=Lt+" ready to insert"+(Oe?" ("+Oe+").":".");return}z.innerText=Lt+" ready to insert."}function de(Ee){var He=S(Z,"button","","rte-gallery-browser-card rte-gallery-folder-card");He.type="button",He.title="Open "+Ee.name;var Je=S(He,"div","","rte-gallery-browser-selection");Je.innerHTML=" ";var it=S(He,"div","","rte-gallery-browser-thumbnail rte-gallery-browser-thumbnail-folder");S(it,"div","","rte-gallery-browser-folder-icon");var Ct=S(He,"div","","rte-gallery-browser-name");Ct.innerText=Ee.name;var Lt=S(He,"div","","rte-gallery-browser-meta");Lt.innerText="Folder",He.onclick=function(){Ye(Ee.folder)}}function Le(Ee){var He=Ee.url===ae.selectedUrl,Je=S(le,"button","","rte-gallery-browser-card rte-gallery-image-card"+(He?" is-selected":""));Je.type="button",Je.title=Ee.name,Je.setAttribute("role","option"),Je.setAttribute("aria-selected",He?"true":"false");var it=S(Je,"div","","rte-gallery-browser-selection");it.innerHTML=He?"✓":" ";var Ct=S(Je,"div","","rte-gallery-browser-thumbnail"),Lt=S(Ct,"img","","rte-gallery-browser-thumbnail-image");Lt.src=Ee.thumbnail||Ee.url,Lt.alt=Ee.name;var kt=S(Je,"div","","rte-gallery-browser-name");kt.innerText=Ee.name;var Oe=S(Je,"div","","rte-gallery-browser-meta");Oe.innerText=Ee.meta||(Ee.source==="preset"?"Preset image":o(Ee.size))||Ee.url,Je.onclick=function(){Se(Ee.url)},Je.ondblclick=function(){Se(Ee.url),ye()}}function be(Ee){var He=[],Je={},it;for(it=0;it<Ee.length;it++)He.push(Ee[it]),Je[Ee[it].url]=!0;if(ae.currentFolder)return He;for(it=0;it<L.length;it++)Je[L[it].url]||He.push(L[it]);return He}function Re(){var Ee=fe(ae.folders),He=fe(ae.images);if(d.innerText=ae.currentFolderDisplay||"/",W(g,ae.loading||ae.parentFolder===null),W(_,ae.loading),W(P,ae.loading),W(B,ae.loading),Z.innerHTML="",le.innerHTML="",q(J,!1),q(Z,!1),q(le,!0),ae.loading){J.innerText="Loading gallery...",q(J,!0),q(le,!1),me(0,0);return}ae.error?(ne.innerText=ae.error,q(ne,!0)):q(ne,!1);for(var Je=0;Je<Ee.length;Je++)de(Ee[Je]);q(Z,Ee.length>0);for(var it=0;it<He.length;it++)Le(He[it]);q(le,He.length>0),me(Ee.length,He.length),!Ee.length&&!He.length&&(J.innerText=V.value?"No folders or images match the current filter.":m?"This folder is empty. Create a folder or upload an image to get started.":"No images are available. Upload a file to get started.",q(J,!0))}function Ke(Ee,He){var Je=[],it=[],Ct;if(ae.currentFolder=Ee.currentFolder||"",ae.currentFolderDisplay=Ee.currentFolderDisplay||"/",ae.parentFolder=typeof Ee.parentFolder>"u"?null:Ee.parentFolder,ae.fallbackMode=!!He,ae.error="",Ee.folders)for(Ct=0;Ct<Ee.folders.length;Ct++){var Lt=U(Ee.folders[Ct]);Lt&&Je.push(Lt)}if(Ee.images)for(Ct=0;Ct<Ee.images.length;Ct++){var kt=$(Ee.images[Ct]);kt&&it.push(kt)}if(ae.folders=Je,ae.images=be(it),ae.selectedUrl){var Oe=!1;for(Ct=0;Ct<ae.images.length;Ct++)if(ae.images[Ct].url===ae.selectedUrl){Oe=!0;break}Oe||(ae.selectedUrl="")}}function je(Ee){Ke({currentFolder:"",currentFolderDisplay:"/",parentFolder:null,folders:[],images:[]},!0),ae.images=L.slice(0),ae.error=L.length?"":"The image gallery is unavailable right now ("+Ee+").",ae.loading=!1,Re()}function Ye(Ee,He){if(!m){ae.images=L.slice(0),Re();return}ae.loading=!0,ae.error="",Re(),K("GET",F(x,Ee),null,function(Je,it){if(it){je(it);return}Ke(Je||{},!1),He&&(ae.selectedUrl=He),ae.loading=!1,Re()})}function Ge(){var Ee=window.prompt("New folder name","");if(Ee){ae.loading=!0,ae.error="",Re();var He=new FormData;He.append("action","create-folder"),He.append("folder",ae.currentFolder||""),He.append("name",Ee),K("POST",x,He,function(Je,it){if(it){ae.loading=!1,ae.error="The folder could not be created right now.",Re();return}Ke(Je||{},!1),ae.loading=!1,Re()})}}function et(Ee){var He=[],Je;for(Je=0;Je<Ee.length;Je++)He.push(Ee[Je]);if(!He.length||!G)return;var it="";function Ct(Lt){if(Lt>=He.length){if(m){Ye(ae.currentFolder,it);return}if(it){var kt=N(it);kt&&(kt.source="upload",L.unshift(kt),c.galleryImages.unshift(it)),ae.selectedUrl=it}ae.images=L.slice(0),ae.loading=!1,Re();return}var Oe=He[Lt];function Fe(Me,Ve){if(!Me){ae.error=Ve||"Upload failed for "+Oe.name+".",ae.loading=!1,Re();return}it=Me,Ct(Lt+1)}if(D){window.richTextBoxUploadFile(Oe,function(Me,Ve){Fe(Ve?"":Me,Ve?"Upload failed for "+Oe.name+".":"")},{folder:ae.currentFolder},Lt,He);return}window.rte_file_upload_handler(Oe,function(Me,Ve){Fe(Me,Ve)},Lt,He)}ae.loading=!0,ae.error="",Re(),Ct(0)}g.onclick=function(){ae.parentFolder!==null&&Ye(ae.parentFolder)},_.onclick=Ge,P.onclick=function(){Y.click()},Y.onchange=function(){et(this.files),this.value=""},B.onclick=function(){Ye(ae.currentFolder,ae.selectedUrl)},V.oninput=Re,ee.onclick=u,se.onclick=ye,m?Ye(""):Re(),V.focus()}}RTE_DefaultConfig.plugin_inserttemplate=RTE_Plugin_InsertTemplate;function RTE_Plugin_InsertTemplate(){var E=this,c,n;E.PluginName="InsertTemplate",E.InitConfig=function(o){c=o,c.htmlTemplates||(c.htmlTemplates=[])},E.InitEditor=function(o){n=o,n.attachEvent("exec_command_inserttemplate",function(N){N.returnValue=!0,E.DoInsertTemplate()})};function S(o,N,U,$){var W=o.ownerDocument.createElement(N);return U&&(W.style.cssText=U),$&&(W.className=$),o.appendChild(W),W}function M(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function F(o){var N=document.createElement("div");return N.innerHTML=o||"",N.innerText||N.textContent||""}function K(o,N){return o instanceof Array?{id:"template-"+N,title:o[0]||"Template "+(N+1),html:o[1]||"",meta:o[2]||""}:o&&typeof o=="object"?{id:o.id||"template-"+N,title:o.title||o.name||o.text||"Template "+(N+1),html:o.html||o.content||"",meta:o.meta||o.description||""}:typeof o=="string"?{id:"template-"+N,title:"Template "+(N+1),html:o,meta:""}:null}function j(o,N){var U=206,$=166,W=Math.max(N.scrollWidth,1),q=Math.max(N.scrollHeight,1),x=Math.min(1,U/W,$/q);N.style.transformOrigin="top left",N.style.transform="scale("+x+")",N.style.width=W+"px",N.style.height=q+"px"}E.DoInsertTemplate=function(){var o=n.createDialog(n.getLangText("inserttemplatetitle")||"Insert template","rte-dialog-inserttemplate"),N=typeof o.close=="function"?function(){o.close()}:function(){n.closeCurrentPopup()},U=S(o,"div","","rte-dialog-browser"),$=S(U,"div","","rte-dialog-browser-header"),W=S($,"div","","rte-dialog-browser-copy");W.innerText="Preview reusable layouts, search by name, and replace the current editor content with a selected template.";var q=S(U,"div","","rte-dialog-browser-toolbar"),x=S(q,"input","","rte-dialog-browser-search");x.type="search",x.placeholder="Search templates",x.setAttribute("aria-label","Search templates");var m=S(q,"div","","rte-dialog-browser-count");m.setAttribute("role","status"),m.setAttribute("aria-live","polite");var D=S(U,"div","","rte-dialog-browser-scrollpanel"),I=S(D,"div","","rte-dialog-browser-grid rte-template-grid");I.setAttribute("role","listbox"),I.setAttribute("aria-label","Available templates");var G=S(D,"div","","rte-dialog-browser-empty");G.innerText="No templates match the current filter.";var L=S(U,"div","","rte-gallery-browser-footer"),l=S(L,"div","","rte-gallery-browser-footer-text");l.innerText="Select a template to replace the current content.";var s=S(L,"button","","rte-gallery-browser-button");s.type="button",s.innerText="Cancel";var C=S(L,"button","","rte-gallery-browser-button rte-gallery-browser-button-primary");C.type="button",C.innerText="Replace Content",C.disabled=!0;var p="";function u(){var y=[],O=c.htmlTemplates||[],R;for(R=0;R<O.length;R++){var A=K(O[R],R);A&&A.html&&y.push(A)}return y}function f(){var y=x.value.replace(/^\s+|\s+$/g,"").toLowerCase(),O=u();return y?O.filter(function(R){var A=F(R.html).toLowerCase();return R.title.toLowerCase().indexOf(y)>=0||A.indexOf(y)>=0||R.meta&&R.meta.toLowerCase().indexOf(y)>=0}):O}function T(y){var O=null,R;for(R=0;R<y.length;R++)if(y[R].id===p){O=y[R];break}m.innerText=y.length+" template"+(y.length===1?"":"s"),l.innerText=O?"Ready to replace the editor content with "+O.title+".":"Select a template to replace the current content.",C.disabled=!O}function w(){var y=u(),O;for(O=0;O<y.length;O++)if(y[O].id===p){n.setHTMLCode(y[O].html),N(),n.focus();return}}function k(){M(I);var y=f(),O;for(G.style.display=y.length?"none":"block",O=0;O<y.length;O++)(function(A){var g=S(I,"button","","rte-dialog-browser-card");g.type="button",g.setAttribute("role","option"),g.setAttribute("aria-selected",A.id===p?"true":"false"),A.id===p&&g.classList.add("is-selected");var d=S(g,"div","","rte-template-card-preview"),b=S(d,"div","","rte-template-card-preview-body"),_=S(b,"div","","rte-template-card-preview-canvas");_.innerHTML=A.html,j(b,_);var P=S(g,"div","","rte-template-card-footer"),B=S(P,"div","","rte-template-card-title");B.innerText=A.title;var V=S(P,"div","","rte-template-card-meta");V.innerText=A.meta||F(A.html).substring(0,80)||"Reusable template",g.onclick=function(){p=A.id,k()},g.ondblclick=function(){p=A.id,w()}})(y[O]);if(p){var R=!1;for(O=0;O<y.length;O++)if(y[O].id===p){R=!0;break}R||(p="")}T(y)}x.oninput=k,s.onclick=N,C.onclick=w,k(),x.focus()}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_keyboarda11y=RTE_Plugin_KeyboardA11y,typeof RTE_DefaultConfig.keyboardA11y>"u"&&(RTE_DefaultConfig.keyboardA11y=!0);function RTE_Plugin_KeyboardA11y(){var E=this,c,n,S=[],M=null,F=[];E.PluginName="KeyboardA11y",E.InitConfig=function(s){c=s},E.InitEditor=function(s){if(n=s,c.keyboardA11y!==!1){n.focusToolbar=function(){return m()},j();try{n.attachEvent("ready",j)}catch{}setTimeout(j,0),setTimeout(j,400)}};function K(){try{var s=n.getEditable();if(!s)return null;for(var C=s.ownerDocument.defaultView,p=C&&C.frameElement?C.frameElement:s;p&&p.classList&&!p.classList.contains("richtexteditor");)p=p.parentNode;return p&&p.classList?p:null}catch{return null}}function j(){var s=K();s&&(o(),x(s),I(s),G(s),l(s))}function o(){var s,C;try{s=n.getEditable(),C=s&&s.ownerDocument}catch{return}!s||!C||(C.__rteEscapeHatch||(C.__rteEscapeHatch=!0,C.addEventListener("keydown",function(p){p.key!=="Escape"&&p.keyCode!==27||N()||(p.preventDefault(),p.stopPropagation(),m()||$())},!1)),U(s))}function N(){try{for(var s=document.querySelectorAll("rte-dropdown-panel, rte-dialog-float, rte-floatpanel"),C=0;C<s.length;C++){var p=getComputedStyle(s[C]);if(p.display!=="none"&&p.visibility!=="hidden")return!0}}catch{}return!1}function U(s){var C=c.a11yEscapeHint||"Press Escape to leave the editing area.",p=s.getAttribute("aria-label")||"";if(!(p.indexOf(C)>=0)){var u=p||c.a11yEditorLabel||"Rich text editor";s.setAttribute("aria-label",u.replace(/\s*$/,"")+" "+C)}}function $(){var s=K();if(!s)return!1;for(var C=[].slice.call(document.querySelectorAll('a[href],button,input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(function(u){return!s.contains(u)&&u.offsetParent!==null}),p=0;p<C.length;p++)if(s.compareDocumentPosition(C[p])&Node.DOCUMENT_POSITION_FOLLOWING)return C[p].focus(),!0;return!1}function W(s){return[].slice.call(s.querySelectorAll('[role="toolbar"]'))}function q(s){return[].slice.call(s.querySelectorAll('[role="button"]')).filter(function(C){return C.getAttribute("aria-disabled")==="true"||C.offsetParent===null?!1:(C.closest&&C.closest('[role="toolbar"]'))===s})}function x(s){if(c.a11yRovingToolbar!==!1)for(var C=W(s),p=0;p<C.length;p++)(function(u){var f=q(u);if(f.length){for(var T=f.filter(function(k){return k.getAttribute("tabindex")==="0"})[0]||f[0],w=0;w<f.length;w++)f[w].setAttribute("tabindex",f[w]===T?"0":"-1");u.__rteRoving||(u.__rteRoving=!0,u.addEventListener("keydown",function(k){var y=q(u),O=y.indexOf(document.activeElement);if(!(O<0)){var R=!!(u.closest&&u.closest('[dir="rtl"]')),A=null;if(k.key==="ArrowRight")A=y[(O+(R?-1:1)+y.length)%y.length];else if(k.key==="ArrowLeft")A=y[(O+(R?1:-1)+y.length)%y.length];else if(k.key==="Home")A=y[0];else if(k.key==="End")A=y[y.length-1];else return;k.preventDefault();for(var g=0;g<y.length;g++)y[g].setAttribute("tabindex",y[g]===A?"0":"-1");A.focus()}},!1),u.addEventListener("focusin",function(k){var y=q(u);if(!(y.indexOf(k.target)<0))for(var O=0;O<y.length;O++)y[O].setAttribute("tabindex",y[O]===k.target?"0":"-1")},!1))}})(C[p])}function m(){var s=K();if(!s)return!1;for(var C=W(s),p=0;p<C.length;p++){var u=q(C[p]);if(u.length){var f=u.filter(function(T){return T.getAttribute("tabindex")==="0"})[0]||u[0];return f.focus(),!0}}return!1}var D=/^(bold|italic|underline|strikethrough|subscript|superscript|justifyleft|justifycenter|justifyright|justifyfull|insertorderedlist|insertunorderedlist|outdent|indent|insertblockquote|toggleborder|inlinecode|trackchanges|typewriter|focusmode|pagination|formattingmarks|linenumbers|permanentpen|rtlui)$/;function I(s){for(var C=[].slice.call(s.querySelectorAll('[role="button"][rte-cmd-name]')),p=0;p<C.length;p++){var u=(C[p].getAttribute("rte-cmd-name")||"").toLowerCase();if(D.test(u)){var f=C[p].classList.contains("rte-command-active"),T=f?"true":"false";C[p].getAttribute("aria-pressed")!==T&&C[p].setAttribute("aria-pressed",T)}}}function G(s){for(var C=[].slice.call(s.querySelectorAll("[aria-haspopup]")),p=0;p<C.length;p++)C[p].hasAttribute("aria-expanded")||C[p].setAttribute("aria-expanded","false"),!C[p].__rtePopupBound&&(C[p].__rtePopupBound=!0,(function(f){function T(){M=f}f.addEventListener("mousedown",T,!0),f.addEventListener("keydown",function(w){(w.key==="Enter"||w.key===" "||w.key==="ArrowDown")&&T()},!0)})(C[p]));if(!G.bound){G.bound=!0;var u=new MutationObserver(function(f){for(var T=0;T<f.length;T++){for(var w=f[T],k=0;k<w.addedNodes.length;k++){var y=w.addedNodes[k];y.nodeType!==1||!L(y)||M&&(M.setAttribute("aria-expanded","true"),F.push({panel:y,owner:M}),M=null)}for(var O=0;O<w.removedNodes.length;O++){var R=w.removedNodes[O];if(!(R.nodeType!==1||!L(R)))for(var A=F.length-1;A>=0;A--)F[A].panel===R&&(F[A].owner.setAttribute("aria-expanded","false"),F.splice(A,1))}}});u.observe(document.body,{childList:!0,subtree:!0}),S.push(u)}}function L(s){var C=(s.tagName||"").toLowerCase();return C==="rte-dropdown-panel"||C==="rte-floatpanel"||C==="rte-dialog-float"}function l(s){if(!s.__rteA11yWatch){s.__rteA11yWatch=!0;var C=null,p=new MutationObserver(function(){C||(C=setTimeout(function(){C=null,I(s),x(s),G(s)},60))});p.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","aria-disabled"]}),S.push(p)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_linenumbers=RTE_Plugin_LineNumbers,typeof RTE_DefaultConfig.lineNumberRestart>"u"&&(RTE_DefaultConfig.lineNumberRestart="continuous"),typeof RTE_DefaultConfig.lineNumberInterval>"u"&&(RTE_DefaultConfig.lineNumberInterval=1),typeof RTE_DefaultConfig.lineNumberStart>"u"&&(RTE_DefaultConfig.lineNumberStart=1),typeof RTE_DefaultConfig.lineNumberGutter>"u"&&(RTE_DefaultConfig.lineNumberGutter=38);function RTE_Plugin_LineNumbers(){var E=this,c,n,S=null,M=!1,F=null,K=0,j="",o=!1,N=0;E.PluginName="LineNumbers",E.InitConfig=function(f){c=f},E.InitEditor=function(f){n=f,n.attachEvent("exec_command_linenumbers",function(T){T.returnValue=!0,E.Toggle()}),U();try{n.attachEvent("ready",U)}catch{}try{n.attachEvent("aftersethtml",function(){U(),x()})}catch{}setTimeout(U,0),n.setLineNumbers=function(T){return M=!!T,q(),M},n.toggleLineNumbers=function(){return E.Toggle()},n.isLineNumbers=function(){return M},n.getLineCount=function(){return M&&I(),N},n.setLineNumberOptions=function(T){return T&&typeof T=="object"&&(T.restart!=null&&(c.lineNumberRestart=T.restart),T.interval!=null&&(c.lineNumberInterval=T.interval),T.start!=null&&(c.lineNumberStart=T.start),T.gutter!=null&&(c.lineNumberGutter=T.gutter)),j="",q(),{restart:c.lineNumberRestart,interval:c.lineNumberInterval,start:c.lineNumberStart,gutter:c.lineNumberGutter}},n.getLineNumbersCss=function(){return p()}},E.Toggle=function(){return M=!M,q(),M};function U(){var f=$();if(f&&(u(f),C(),f!==S)){S=f,f.addEventListener("input",x,!0),f.addEventListener("keyup",x,!0);var T=f.defaultView||f.parentWindow;T&&T.addEventListener("resize",x)}}function $(){try{return n.getDocument()}catch{return null}}function W(){try{return n.getEditable()}catch{return null}}function q(){var f=W();f&&f.classList&&(M?f.classList.add("rte-linenumbers-on"):f.classList.remove("rte-linenumbers-on")),f&&(f.style.paddingLeft=M?parseInt(c.lineNumberGutter,10)+12+"px":""),M?(j="",I()):l()}function x(){if(M&&!K){var f=$(),T=f&&(f.defaultView||f.parentWindow)||window,w=T&&typeof T.requestAnimationFrame=="function"?function(k){return T.requestAnimationFrame(k)}:function(k){return setTimeout(k,16)};K=w(function(){K=0,I()})}}function m(){var f=$(),T=W();if(!f||!T)return[];for(var w=[],k=T.children,y=T.getBoundingClientRect(),O=T.scrollTop||0,R=0;R<k.length;R++){var A=k[R];if(A.nodeType===1&&!(A.getAttribute&&(A.getAttribute("data-rte-linenumbers")==="true"||A.getAttribute("data-rte-page-overlay")==="true"))){if(!A.textContent&&!A.querySelector("img,table,hr")){var g=A.getBoundingClientRect();g.height>0&&w.push({top:g.top-y.top+O,block:R});continue}for(var d=D(f,A),b=0;b<d.length;b++)w.push({top:d[b]-y.top+O,block:R})}}return w}function D(f,T){var w=[],k={};try{var y=f.createRange();y.selectNodeContents(T);for(var O=y.getClientRects(),R=0;R<O.length;R++){var A=O[R];if(!(!A||A.height<=0||A.width<=0)){var g=Math.round(A.top);k[g]||(k[g]=!0,w.push(A.top))}}}catch{}if(!w.length){var d=T.getBoundingClientRect();d.height>0&&w.push(d.top)}return w.sort(function(b,_){return b-_}),w}function I(){if(M){var f=$(),T=W();if(!(!f||!T)){var w=m();N=w.length;var k=String(c.lineNumberRestart||"continuous"),y=Math.max(1,parseInt(c.lineNumberInterval,10)||1),O=parseInt(c.lineNumberStart,10);isNaN(O)&&(O=1);var R=[];if(k==="page")try{typeof n.isPageView=="function"&&n.isPageView()&&typeof n.getPageOfElement=="function"&&(R=null)}catch{}var A=w.length+"|"+k+"|"+y+"|"+O+"|"+(w.length?Math.round(w[w.length-1].top):0)+"|"+T.offsetHeight;if(!(A===j&&F&&F.parentNode)){j=A;for(var g=L(f,T);g.firstChild;)g.removeChild(g.firstChild);g.style.width=parseInt(c.lineNumberGutter,10)+"px";for(var d=O,b=null,_=null,P=0;P<w.length;P++){var B=w[P];if(k==="block")_!==null&&B.block!==_&&(d=O),_=B.block;else if(k==="page"){var V=G(T,B);b!==null&&V!==b&&(d=O),b=V}if((d-O)%y===0){var Y=f.createElement("div");Y.className="rte-linenumber",Y.style.top=Math.round(B.top)+"px",Y.textContent=String(d),g.appendChild(Y)}d++}}}}}function G(f,T){try{var w=f.children[T.block];if(w&&typeof n.getPageOfElement=="function"){var k=n.getPageOfElement(w);if(k)return k}}catch{}return 1}function L(f,T){return F&&F.parentNode||(F=f.createElement("div"),F.setAttribute("data-rte-linenumbers","true"),F.setAttribute("contenteditable","false"),F.setAttribute("aria-hidden","true"),F.className="rte-linenumber-gutter",(T.parentNode||f.body||f.documentElement).appendChild(F)),F}function l(){F&&F.parentNode&&F.parentNode.removeChild(F),F=null,j=""}function s(){var f=W();if(!f)return function(){};for(var T=$(),w=T?T.querySelectorAll("[data-rte-linenumbers]"):[],k=[],y=0;y<w.length;y++){var O=w[y];k.push({node:O,parent:O.parentNode,next:O.nextSibling}),O.parentNode&&O.parentNode.removeChild(O)}var R=f.style.paddingLeft;return f.style.paddingLeft="",function(){f.style.paddingLeft=R;for(var g=0;g<k.length;g++)k[g].parent&&k[g].parent.insertBefore(k[g].node,k[g].next||null)}}function C(){if(!o){for(var f=["getHTMLCode","getJSON","getHTMLContent","getText"],T=!1,w=0;w<f.length;w++)(function(k){var y=n[k];if(!(typeof y!="function"||y.__rteLnWrapped)){var O=function(){var R=s();try{return y.apply(n,arguments)}finally{R()}};O.__rteLnWrapped=!0,n[k]=O,T=!0}})(f[w]);T&&(o=!0)}}function p(){return".rte-linenumber-gutter{position:absolute;left:0;top:0;pointer-events:none;user-select:none;z-index:2;}.rte-linenumber{position:absolute;right:6px;text-align:right;width:100%;font-size:11px;line-height:1;color:#8a94a6;font-variant-numeric:tabular-nums;font-family:Consolas,Menlo,monospace;}.rte-linenumbers-on{position:relative;}"}function u(f){if(f){var T=f.getElementById("rte-linenumber-styles"),w=p();if(T){if(T.getAttribute("data-css")===w)return;T.parentNode&&T.parentNode.removeChild(T)}var k=f.createElement("style");k.id="rte-linenumber-styles",k.setAttribute("data-css",w),k.appendChild(f.createTextNode(w)),(f.head||f.getElementsByTagName("head")[0]||f.documentElement).appendChild(k)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_linkchecker=RTE_Plugin_LinkChecker,typeof RTE_DefaultConfig.linkCheckResolver>"u"&&(RTE_DefaultConfig.linkCheckResolver=null),typeof RTE_DefaultConfig.linkCheckUnsafeSchemes>"u"&&(RTE_DefaultConfig.linkCheckUnsafeSchemes=["javascript:","data:","vbscript:","file:"]),typeof RTE_DefaultConfig.linkCheckMixedContent>"u"&&(RTE_DefaultConfig.linkCheckMixedContent=!0);function RTE_Plugin_LinkChecker(){var E=this,c,n,S=null,M=!1,F=[],K=!1;E.PluginName="LinkChecker",E.InitConfig=function(s){c=s},E.InitEditor=function(s){n=s,n.attachEvent("exec_command_checklinks",function(C){C.returnValue=!0,E.Check()}),j();try{n.attachEvent("ready",j)}catch{}try{n.attachEvent("aftersethtml",j)}catch{}setTimeout(j,0),n.checkLinks=function(){return E.Check()},n.getLinkIssues=function(){return F.slice()},n.highlightLinkIssues=function(C){return x(C!==!1)},n.clearLinkHighlights=function(){return x(!1)},n.getLinkCheckerCss=function(){return L()}};function j(){var s=o();s&&(l(s),G(),S=s)}function o(){try{return n.getDocument()}catch{return null}}function N(){try{return n.getEditable()}catch{return null}}function U(){var s=N();if(!s)return[];for(var C=s.querySelectorAll("a"),p=[],u=0;u<C.length;u++){var f=C[u];if(f.hasAttribute("href")){p.push(f);continue}f.getAttribute("name")||f.getAttribute("id")||p.push(f)}return p}function $(){var s=N(),C=[];if(!s)return C;var p=U(),u=c.linkCheckUnsafeSchemes||[],f=!1;try{f=window.location.protocol==="https:"}catch{}for(var T={},w=0;w<p.length;w++){var k=p[w],y=(k.getAttribute("href")||"").trim(),O=(k.textContent||"").trim(),R=function(z,ee,se){C.push({element:k,href:y,text:O,severity:z,code:ee,message:se})};if(!k.hasAttribute("href")){R("error","empty-href","Link has no destination \u2014 its address may have been removed for being unsafe.");continue}if(!y||y==="#"){R("error","empty-href","Link has no destination.");continue}for(var A=y.toLowerCase(),g=null,d=0;d<u.length;d++)if(A.indexOf(u[d])===0){g=u[d];break}if(g){R("error","unsafe-scheme","Link uses the "+g+" scheme, which is unsafe in published content.");continue}if(y.charAt(0)==="#"){var b=y.substring(1),_=null;try{_=s.querySelector("#"+b.replace(/["\\\]\[]/g,"\\$&"))||s.querySelector('[name="'+b.replace(/"/g,'\\"')+'"]')}catch{_=null}_||R("error","broken-anchor","Links to #"+b+", which does not exist in this document.")}else if(/^[a-z][a-z0-9+.-]*:/i.test(y)||y.indexOf("//")===0){var P=W(y);if(!P)R("error","malformed","Link address cannot be parsed as a URL.");else if(c.linkCheckMixedContent!==!1&&f&&P.protocol==="http:"&&R("warning","mixed-content","Insecure http:// link on a secure page; browsers may block or warn."),/^(https?:\/\/|www\.)/i.test(O)){var B=W(/^www\./i.test(O)?"http://"+O:O);B&&B.hostname&&P.hostname&&B.hostname.toLowerCase()!==P.hostname.toLowerCase()&&R("warning","deceptive-text","Link text shows "+B.hostname+" but the link goes to "+P.hostname+".")}}if(O){var te=O.toLowerCase();(T[te]=T[te]||[]).push({a:k,href:y})}else{for(var V=!1,Y=k.querySelectorAll?k.querySelectorAll("img[alt]"):[],Q=0;Q<Y.length;Q++)(Y[Q].getAttribute("alt")||"").trim()&&(V=!0);!V&&!(k.getAttribute("aria-label")||"").trim()&&!(k.getAttribute("title")||"").trim()&&R("error","empty-text","Link has no text, image alt, aria-label or title, so it has no accessible name.")}}for(var Z in T)if(T.hasOwnProperty(Z)){var le=T[Z];if(!(le.length<2)){for(var ne={},J=0;J<le.length;J++)ne[le[J].href]=!0;if(!(Object.keys(ne).length<2))for(var oe=0;oe<le.length;oe++)C.push({element:le[oe].a,href:le[oe].href,text:le[oe].a.textContent.trim(),severity:"warning",code:"ambiguous-text",message:"Several links share the text \u201C"+le[oe].a.textContent.trim()+"\u201D but point to different destinations."})}}return C}function W(s){try{var C=o()||document,p=C.createElement("a");return p.href=s,!p.protocol||p.protocol===":"?null:{protocol:p.protocol,hostname:p.hostname,pathname:p.pathname}}catch{return null}}E.Check=function(){var s=$(),C=c.linkCheckResolver;if(typeof C!="function")return F=s,q(s),typeof Promise=="function"?Promise.resolve(s.slice()):s.slice();for(var p={},u=0;u<s.length;u++)p[s[u].href]=!0;for(var f=[],T={},w=U(),k=0;k<w.length;k++){var y=(w[k].getAttribute("href")||"").trim();!y||y.charAt(0)==="#"||p[y]||T[y]||/^https?:/i.test(y)&&(T[y]=!0,f.push(y))}return f.length?Promise.resolve().then(function(){return C(f.slice())}).then(function(O){O=O||{};for(var R={},A=0;A<w.length;A++){var g=(w[A].getAttribute("href")||"").trim();(R[g]=R[g]||[]).push(w[A])}for(var d in O)if(O.hasOwnProperty(d)){var b=O[d];if(!(!b||b.ok!==!1))for(var _=R[d]||[],P=0;P<_.length;P++)s.push({element:_[P],href:d,text:(_[P].textContent||"").trim(),severity:"error",code:"unreachable",message:"Link did not resolve"+(b.status?" (HTTP "+b.status+")":"")+"."})}return F=s,q(s),s.slice()}).catch(function(){return F=s,q(s),s.slice()}):(F=s,q(s),typeof Promise=="function"?Promise.resolve(s.slice()):s.slice())};function q(s){K&&D(s);try{n.fireEvent&&n.fireEvent("linkcheck",s)}catch{}}function x(s){return K=!!s,K?D(F):m(),K}function m(){var s=N();if(s)for(var C=s.querySelectorAll("a[data-rte-link-issue]"),p=0;p<C.length;p++)C[p].removeAttribute("data-rte-link-issue"),C[p].removeAttribute("data-rte-link-issue-message")}function D(s){m();for(var C=0;C<s.length;C++){var p=s[C].element;!p||!p.setAttribute||p.getAttribute("data-rte-link-issue")!=="error"&&(p.setAttribute("data-rte-link-issue",s[C].severity),p.setAttribute("data-rte-link-issue-message",s[C].message))}}function I(){var s=N();if(!s)return function(){};for(var C=s.querySelectorAll("a[data-rte-link-issue]"),p=[],u=0;u<C.length;u++)p.push({el:C[u],sev:C[u].getAttribute("data-rte-link-issue"),msg:C[u].getAttribute("data-rte-link-issue-message")}),C[u].removeAttribute("data-rte-link-issue"),C[u].removeAttribute("data-rte-link-issue-message");return function(){for(var T=0;T<p.length;T++)p[T].el.setAttribute("data-rte-link-issue",p[T].sev),p[T].msg&&p[T].el.setAttribute("data-rte-link-issue-message",p[T].msg)}}function G(){if(!M){for(var s=["getHTMLCode","getJSON","getHTMLContent","getText"],C=!1,p=0;p<s.length;p++)(function(u){var f=n[u];if(!(typeof f!="function"||f.__rteLcWrapped)){var T=function(){var w=I();try{return f.apply(n,arguments)}finally{w()}};T.__rteLcWrapped=!0,n[u]=T,C=!0}})(s[p]);C&&(M=!0)}}function L(){return"a[data-rte-link-issue='error']{background:rgba(220,38,38,.12);box-shadow:inset 0 -2px 0 rgba(220,38,38,.65);border-radius:2px;}a[data-rte-link-issue='warning']{background:rgba(217,119,6,.12);box-shadow:inset 0 -2px 0 rgba(217,119,6,.6);border-radius:2px;}"}function l(s){if(s){var C=s.getElementById("rte-link-checker-styles"),p=L();if(C){if(C.getAttribute("data-css")===p)return;C.parentNode&&C.parentNode.removeChild(C)}var u=s.createElement("style");u.id="rte-link-checker-styles",u.setAttribute("data-css",p),u.appendChild(s.createTextNode(p)),(s.head||s.getElementsByTagName("head")[0]||s.documentElement).appendChild(u)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_localdraft=RTE_Plugin_LocalDraft,typeof RTE_DefaultConfig.localDraft>"u"&&(RTE_DefaultConfig.localDraft=!1);function RTE_Plugin_LocalDraft(){var E=this,c,n,S=null,M=null,F=null,K="",j=null,o=!1,N=null;E.PluginName="LocalDraft",E.InitConfig=function(y){c=y},E.InitEditor=function(y){if(n=y,n.saveLocalDraft=function(){return L(!0)},n.hasLocalDraft=function(){return!!l()},n.getLocalDraft=function(){return l()},n.clearLocalDraft=function(){try{D().removeItem(m())}catch{}return T(),!0},n.restoreLocalDraft=function(){var R=l();if(!R)return!1;try{n.setHTMLCode(R.html)}catch{return!1}try{typeof n.fireChange=="function"&&n.fireChange()}catch{}return T(),!0},!!c.localDraft){S=typeof c.localDraft=="object"?c.localDraft:{},M=m();var O=function(){o||(K=G(),p(),W())};try{n.attachEvent("ready",O)}catch{}try{n.attachEvent("ready",$)}catch{}try{n.attachEvent("aftersethtml",$)}catch{}setTimeout(O,0)}};var U=function(){I()};function $(){if(!(!c||!c.localDraft)){var y=n.getDocument();if(y&&y!==N){try{y.addEventListener("input",U,!0)}catch{}N=y}}}function W(){if(!o){o=!0;try{n.attachEvent("change",U)}catch{}try{n.attachEvent("keyup",U)}catch{}$();try{window.addEventListener("beforeunload",function(){L(!1)},!1),window.addEventListener("pagehide",function(){L(!1)},!1)}catch{}}}function q(){var y=S&&+S.intervalMs;return y&&y>250?y:2500}function x(){var y=S&&+S.ttlMs;return y&&y>0?y:336*60*60*1e3}function m(){if(S&&S.key)return"rte-draft:"+S.key;var y="";try{var O=n.getEditable();y=O&&(O.id||O.getAttribute&&O.getAttribute("data-rte-id"))||""}catch{}if(!y)try{y=location.pathname}catch{y="default"}return"rte-draft:"+y}function D(){return window.localStorage}function I(){F||(F=setTimeout(function(){F=null,L(!1)},q()))}function G(){try{return n.getHTMLCode()||""}catch{return""}}function L(y){if(!c||!c.localDraft)return!1;var O=G();if(!y&&(O===K||s(O)))return!1;var R={html:O,t:C()};try{return D().setItem(m(),JSON.stringify(R)),!0}catch{return!1}}function l(){try{var y=D().getItem(m());if(!y)return null;var O=JSON.parse(y);if(!O||typeof O.html!="string")return null;if(O.t&&C()-O.t>x()){try{D().removeItem(m())}catch{}return null}return O}catch{return null}}function s(y){if(!y)return!0;var O=y.replace(/<[^>]*>/g,"").replace(/ /gi," ").replace(/\s+/g,"");return O.length===0}function C(){try{return Date.now()}catch{return 0}}function p(){if(!(S&&S.promptRestore===!1)){var y=l();y&&(y.html===K||s(y.html)||u(y))}}function u(y){T();var O=w();if(!(!O||!O.parentNode)){var R=k(y.t);j=document.createElement("div"),j.className="rte-localdraft-bar",j.setAttribute("data-rte-localdraft","1"),j.setAttribute("role","status"),j.setAttribute("aria-live","polite");var A=document.createElement("span");A.className="rte-localdraft-message",A.textContent="An unsaved draft"+(R?" from "+R:"")+" was found.";var g=f("Restore","primary"),d=f("Discard","secondary");g.onclick=function(){n.restoreLocalDraft()},d.onclick=function(){n.clearLocalDraft()},j.appendChild(A),j.appendChild(g),j.appendChild(d),O.parentNode.insertBefore(j,O)}}function f(y,O){var R=document.createElement("button");return R.type="button",R.textContent=y,R.className="rte-localdraft-button is-"+O,R}function T(){j&&j.parentNode&&j.parentNode.removeChild(j),j=null}function w(){try{var y=n.getDocument(),O=y&&y.defaultView&&y.defaultView.frameElement;if(O){for(var R=O,A=0;A<4&&R.parentNode;A++){if(R.parentNode&&/rte[_-](outer|container|wrapper)/i.test(R.parentNode.className||""))return R.parentNode;R=R.parentNode}return O}}catch{}try{return n.getEditable()}catch{return null}}function k(y){if(!y)return"";try{var O=new Date(y),R=(C()-y)/1e3;return R<60?"just now":R<3600?Math.round(R/60)+" min ago":R<86400?Math.round(R/3600)+" hr ago":O.toLocaleString()}catch{return""}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_markdownexport=RTE_Plugin_MarkdownExport,typeof RTE_DefaultConfig.markdownExportEnabled>"u"&&(RTE_DefaultConfig.markdownExportEnabled=!0);function RTE_Plugin_MarkdownExport(){var E=this,c,n;E.PluginName="MarkdownExport",E.InitConfig=function(o){c=o},E.InitEditor=function(o){n=o,n.getMarkdown=function(){if(typeof n.toMarkdown=="function")return n.toMarkdown();var N=n.getEditable();return N&&(N.innerText||N.textContent)||""},n.copyAsMarkdown=function(){var N=n.getMarkdown();return F(N)},n.downloadMarkdown=function(N){var U=n.getMarkdown(),$=M(N),W=$?$+".md":S();return j(U,W)}};function S(){try{var o=n.getEditable();if(o){var N=o.querySelector("h1,h2,h3"),U=N?N.textContent:o.textContent||"";U=(U||"").trim().split(`
|
|
31
31
|
`)[0].slice(0,60);var $=M(U);if($)return $+".md"}}catch{}return"document.md"}function M(o){return o?(o=String(o).replace(/\.md$/i,""),o=o.replace(/[\\/:*?"<>|\u0000-\u001f]+/g," ").replace(/\s+/g," ").trim(),o=o.replace(/[ .]+$/,""),o):""}function F(o){try{if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(o).then(function(){return!0},function(){return K(o)})}catch{}return Promise.resolve(K(o))}function K(o){try{var N=document,U=N.createElement("textarea");U.value=o,U.style.position="fixed",U.style.top="-1000px",U.style.opacity="0",N.body.appendChild(U),U.focus(),U.select();var $=!1;try{$=N.execCommand("copy")}catch{$=!1}return N.body.removeChild(U),$}catch{return!1}}function j(o,N){try{var U=new Blob([o],{type:"text/markdown;charset=utf-8"}),$=(window.URL||window.webkitURL).createObjectURL(U),W=document.createElement("a");return W.href=$,W.download=N,W.style.display="none",document.body.appendChild(W),W.click(),setTimeout(function(){try{document.body.removeChild(W)}catch{}try{(window.URL||window.webkitURL).revokeObjectURL($)}catch{}},0),!0}catch{return!1}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_mathdialog=RTE_Plugin_MathDialog,RTE_DefaultConfig.mathDialogSamples=RTE_DefaultConfig.mathDialogSamples||["x^2 + y^2 = z^2","\\frac{a}{b}","\\sqrt{x}","\\sum_{i=1}^{n} i","\\int_0^1 x\\,dx","\\alpha\\beta\\gamma"];function RTE_Plugin_MathDialog(){var E=this,c,n;E.PluginName="MathDialog",E.InitConfig=function(K){c=K},E.InitEditor=function(K){n=K,n.attachEvent("exec_command_insertmath",function(j){j.returnValue=!0,E.OpenMathDialog()})};function S(K,j,o,N){var U=K.ownerDocument.createElement(j);return o&&(U.style.cssText=o),N&&(U.className=N),K.appendChild(U),U}function M(){try{var K=n.getSelection();if(!K||K.rangeCount===0)return null;for(var j=K.getRangeAt(0).startContainer,o=n.getEditable();j&&j!==o;){if(j.nodeType===1&&j.classList&&j.classList.contains("rte-math-inline"))return j;j=j.parentNode}}catch{}return null}function F(K){var j=K.katex||K.parent&&K.parent.katex;if(j&&typeof j.render=="function")return{kind:"katex",katex:j};var o=K.MathJax||K.parent&&K.parent.MathJax;return o&&o.typesetPromise?{kind:"mathjax",MathJax:o}:null}E.OpenMathDialog=function(){var K=M(),j=K&&K.getAttribute("data-tex")||"",o=n.createDialog(n.getLangText&&n.getLangText("insertmathtitle")||"Insert / edit equation","rte-dialog-math"),N=typeof o.close=="function"?function(){o.close()}:function(){n.closeCurrentPopup()},U=o.ownerDocument.defaultView||window,$=S(o,"div","padding:14px;min-width:420px;font:13px -apple-system,Segoe UI,sans-serif");S($,"div","font-weight:600;margin-bottom:4px","").innerText=n.getLangText&&n.getLangText("insertmathlabel")||"TeX / LaTeX";var W=S($,"textarea","width:100%;box-sizing:border-box;min-height:72px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:13px ui-monospace,Consolas,monospace;resize:vertical");W.value=j,W.placeholder="e.g. x^2 + y^2 = z^2";var q=S($,"div","display:flex;flex-wrap:wrap;gap:6px;margin:8px 0");(c.mathDialogSamples||[]).forEach(function(s){var C=S(q,"button","font:11px ui-monospace,monospace;padding:3px 8px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;cursor:pointer","");C.type="button",C.textContent=s,C.onclick=function(){W.value=s,I(),W.focus()}}),S($,"div","font-weight:600;margin:10px 0 4px","").innerText=n.getLangText&&n.getLangText("insertmathpreview")||"Preview";var x=S($,"div","min-height:48px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;overflow:auto;text-align:center"),m=S($,"div","font-size:11px;color:#94a3b8;margin-top:4px",""),D=F(U);D||(m.innerText="No KaTeX/MathJax detected on the page \u2014 the equation is stored as markup and will render wherever a math renderer is loaded.");function I(){var s=W.value;if(!s.trim()){x.textContent="";return}if(D&&D.kind==="katex")try{D.katex.render(s,x,{throwOnError:!1,displayMode:!1})}catch(C){x.textContent="\u26A0 "+(C&&C.message?C.message:"render error")}else if(D&&D.kind==="mathjax"){x.textContent="\\("+s+"\\)";try{D.MathJax.typesetPromise([x])}catch{}}else x.textContent="$"+s+"$"}W.oninput=I,setTimeout(function(){W.focus(),I()},0);var G=S($,"div","display:flex;justify-content:flex-end;gap:8px;margin-top:14px"),L=S(G,"button","padding:6px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;cursor:pointer","");L.type="button",L.textContent="Cancel",L.onclick=N;var l=S(G,"button","padding:6px 14px;border:1px solid #1d67ba;border-radius:8px;background:#1d67ba;color:#fff;cursor:pointer","");l.type="button",l.textContent=K?"Update":"Insert",l.onclick=function(){var s=W.value.trim();if(!s){N();return}if(K){K.setAttribute("data-tex",s),K.textContent="$"+s+"$",N(),n.renderMath&&n.renderMath(),n.focus();return}var C=String(s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),p=("$"+s+"$").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");n.insertHTML('<span class="rte-math-inline" data-tex="'+C+'">'+p+"</span>\u200B"),N(),n.renderMath&&n.renderMath(),n.focus()}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_mention=RTE_Plugin_Mention;function RTE_Plugin_Mention(){var E=this,c,n,S=null,M=null,F=null,K=[],j=null,o=null,N=[],U=0,$=!1,W=0,q=null;E.PluginName="Mention",E.InitConfig=function(Q){c=Q,c.mentionEnabled!==!1&&(c.mentionTrigger=c.mentionTrigger||"@",c.mentionDebounceMs=c.mentionDebounceMs==null?150:c.mentionDebounceMs,c.mentionMaxItems=c.mentionMaxItems||8,c.mentionStaticList=c.mentionStaticList||null,c.mentionSource=c.mentionSource||null,c.mentionInsertClass=c.mentionInsertClass||"rte-mention",c.mentionTriggers=c.mentionTriggers||null)},E.InitEditor=function(Q){if(n=Q,c.mentionEnabled!==!1){if(n.mentions={register:x,remove:m,list:function(){return K.slice()},close:u,isOpen:function(){return!!M}},(c.mentionSource||c.mentionStaticList)&&x({trigger:c.mentionTrigger,source:c.mentionSource||function(le){return L(c.mentionStaticList,le)}}),Array.isArray(c.mentionTriggers))for(var te=0;te<c.mentionTriggers.length;te++)x(c.mentionTriggers[te]);Y();var Z=n.getDocument();Z.addEventListener("keydown",l,!0),Z.addEventListener("input",s,!0),Z.addEventListener("compositionstart",function(){$=!0}),Z.addEventListener("compositionend",function(){$=!1}),Z.addEventListener("mousedown",function(le){le.target&&le.target.closest&&le.target.closest("."+c.mentionInsertClass)||u()},!0),Z.addEventListener("blur",function(){setTimeout(u,150)},!0),window.addEventListener("scroll",V,!0),window.addEventListener("resize",V,!0)}};function x(Q){if(!(!Q||!Q.trigger||typeof Q.source!="function")){var te=D(Q.trigger),Z={trigger:Q.trigger,source:Q.source,renderItem:Q.renderItem||null,renderInsert:Q.renderInsert||null,insertClass:Q.insertClass||c.mentionInsertClass,label:Q.label||"mentions "+Q.trigger};te>=0?K[te]=Z:K.push(Z)}}function m(Q){var te=D(Q);te>=0&&K.splice(te,1)}function D(Q){for(var te=0;te<K.length;te++)if(K[te].trigger===Q)return te;return-1}function I(Q){return Q&&(Q.label||Q.name||Q.id)||""}function G(Q){return Q&&(Q.subtitle||Q.email)||""}function L(Q,te){if(!Array.isArray(Q))return[];if(!te)return Q.slice(0,50);var Z=te.toLowerCase();return Q.filter(function(le){var ne=(I(le)+" "+G(le)+" "+(le.id||"")).toLowerCase();return ne.indexOf(Z)!==-1})}function l(Q){if(!$){if(M)switch(Q.key){case"ArrowDown":Q.preventDefault(),Q.stopPropagation(),d(1);return;case"ArrowUp":Q.preventDefault(),Q.stopPropagation(),d(-1);return;case"Enter":case"Tab":if(N.length){Q.preventDefault(),Q.stopPropagation(),b();return}u();return;case"Escape":case"Esc":Q.preventDefault(),Q.stopPropagation(),u();return}if(!Q.ctrlKey&&!Q.metaKey&&!Q.altKey){var te=D(Q.key);if(te>=0&&C()){var Z=K[te];setTimeout(function(){p(Z)},0)}}}}function s(){M&&f()}function C(){var Q=n.getSelection();if(!Q||Q.rangeCount===0||!Q.isCollapsed)return!1;for(var te=Q.getRangeAt(0),Z=te.startContainer,le=te.startOffset,ne=n.getEditable(),J=Z.nodeType===1?Z:Z.parentNode;J&&J!==ne;){var oe=J.nodeName;if(oe==="CODE"||oe==="PRE"||J.classList&&J.classList.contains(c.mentionInsertClass))return!1;J=J.parentNode}if(Z.nodeType===3){if(le===0)return!0;var z=Z.nodeValue.charAt(le-1);return/\s/.test(z)}return!0}function p(Q){u();var te=n.getSelection();if(!(!te||te.rangeCount===0)){var Z=te.getRangeAt(0).cloneRange();j=Q,o={range:Z,startNode:Z.startContainer,startOffset:Z.startOffset,triggerCharCount:1,query:""},w(),B(),T("")}}function u(){q&&(clearTimeout(q),q=null),M&&M.parentNode&&M.parentNode.removeChild(M),M=null,F=null,j=null,o=null,N=[],U=0}function f(){if(o){var Q=n.getSelection();if(!Q||Q.rangeCount===0||!Q.isCollapsed){u();return}var te=Q.getRangeAt(0),Z=te.startContainer;if(Z!==o.startNode){u();return}var le=te.startOffset;if(le<o.startOffset){u();return}var ne=(Z.nodeType===3?Z.nodeValue:"")||"",J=ne.substring(o.startOffset,le);if(/\s/.test(J)){u();return}o.query=J,T(J),B()}}function T(Q){if(!j)return;var te=++W;q&&(clearTimeout(q),q=null);var Z=Q.length===0?0:c.mentionDebounceMs;function le(){k();var ne;try{ne=j.source(Q,{trigger:j.trigger})}catch(J){console.warn("Mention source threw:",J),ne=[]}Promise.resolve(ne).then(function(J){te!==W||!M||(N=Array.isArray(J)?J.slice(0,c.mentionMaxItems):[],U=0,y())},function(J){te!==W||!M||(console.warn("Mention source failed:",J),N=[],y())})}Z>0?q=setTimeout(le,Z):le()}function w(){S=n.iframe.ownerDocument,M=S.createElement("div"),M.className="rte-mention-popup",M.setAttribute("role","listbox"),M.setAttribute("aria-label",j.label),S.body.appendChild(M)}function k(){if(M){M.innerHTML="";var Q=S.createElement("div");Q.className="rte-mention-loading",Q.textContent="Searching\u2026",M.appendChild(Q),F=Q}}function y(){if(M){if(M.innerHTML="",F=null,!N.length){var Q=S.createElement("div");Q.className="rte-mention-empty",Q.textContent="No matches",M.appendChild(Q);return}for(var te=0;te<N.length;te++)(function(Z,le){var ne=S.createElement("button");ne.type="button",ne.className="rte-mention-item"+(le===U?" rte-mention-item-active":""),ne.setAttribute("role","option"),ne.setAttribute("aria-selected",le===U?"true":"false"),ne.setAttribute("data-index",le),j.renderItem?j.renderItem(ne,Z):O(ne,Z),ne.addEventListener("mousedown",function(J){J.preventDefault(),J.stopPropagation(),U=le,b()}),ne.addEventListener("click",function(J){M&&(J.preventDefault(),J.stopPropagation(),U=le,b())}),ne.addEventListener("mouseenter",function(){U!==le&&(U=le,A())}),M.appendChild(ne)})(N[te],te)}}function O(Q,te){var Z=S.createElement("span");if(Z.className="rte-mention-avatar",te.avatarUrl){var le=S.createElement("img");le.src=te.avatarUrl,le.alt="",Z.appendChild(le)}else Z.textContent=R(I(te)||"?");Q.appendChild(Z);var ne=S.createElement("span");ne.className="rte-mention-body";var J=S.createElement("span");J.className="rte-mention-label",J.textContent=I(te),ne.appendChild(J);var oe=G(te);if(oe){var z=S.createElement("span");z.className="rte-mention-subtitle",z.textContent=oe,ne.appendChild(z)}Q.appendChild(ne)}function R(Q){var te=String(Q).trim().split(/\s+/);return te[0]?te.length===1?te[0].charAt(0).toUpperCase():(te[0].charAt(0)+te[te.length-1].charAt(0)).toUpperCase():"?"}function A(){if(M){for(var Q=M.querySelectorAll(".rte-mention-item"),te=0;te<Q.length;te++){var Z=+Q[te].getAttribute("data-index"),le=Z===U;Q[te].classList.toggle("rte-mention-item-active",le),Q[te].setAttribute("aria-selected",le?"true":"false")}g()}}function g(){if(M){var Q=M.querySelector(".rte-mention-item-active");if(Q){var te=Q.offsetTop,Z=te+Q.offsetHeight;te<M.scrollTop?M.scrollTop=te:Z>M.scrollTop+M.clientHeight&&(M.scrollTop=Z-M.clientHeight)}}}function d(Q){N.length&&(U=(U+Q+N.length)%N.length,A())}function b(){if(!N.length){u();return}var Q=N[U],te=o,Z=j;u(),!(!Q||!te||!Z)&&(_(te),P(Z,Q))}function _(Q){var te=Q.startNode;if(te){var Z=Q.startOffset-(Q.triggerCharCount||0);Z<0&&(Z=0);var le=n.getSelection();if(!(!le||le.rangeCount===0)){var ne=le.getRangeAt(0),J=ne.startContainer,oe=ne.startOffset,z=n.getDocument().createRange();z.setStart(te,Z),z.setEnd(J,oe);try{z.deleteContents()}catch{return}le.removeAllRanges(),le.addRange(z)}}}function P(Q,te){var Z=n.getDocument(),le;if(Q.renderInsert?le=Q.renderInsert(Z,te):(le=Z.createElement("span"),le.className=Q.insertClass,le.setAttribute("contenteditable","false"),le.setAttribute("data-rte-mention-id",te.id!=null?te.id:""),le.setAttribute("data-rte-mention-trigger",Q.trigger),le.textContent=Q.trigger+I(te)),!!le){var ne=n.getSelection();if(!(!ne||ne.rangeCount===0)){var J=ne.getRangeAt(0);J.insertNode(le);var oe=Z.createTextNode("\xA0");le.parentNode.insertBefore(oe,le.nextSibling);var z=Z.createRange();z.setStartAfter(oe),z.collapse(!0),ne.removeAllRanges(),ne.addRange(z)}}}function B(){if(!(!M||!o)){var Q=n.iframe,te=Q.getBoundingClientRect(),Z=o.range.getClientRects(),le=Z&&Z.length?Z[Z.length-1]:null;le||(le=o.range.getBoundingClientRect());var ne=te.left+(le.left||0)+window.pageXOffset,J=te.top+(le.bottom||le.top||0)+window.pageYOffset+4;M.style.position="absolute",M.style.left=ne+"px",M.style.top=J+"px";var oe=window.innerHeight||document.documentElement.clientHeight,z=M.getBoundingClientRect();z.bottom>oe-8&&te.top+(le.top||0)>z.height+16&&(M.style.top=te.top+(le.top||0)+window.pageYOffset-z.height-4+"px")}}function V(){M&&B()}function Y(){var Q=n&&n.iframe&&n.iframe.ownerDocument||document;if(!Q.querySelector("style[data-rte-mention]")){var te=Q.createElement("style");te.setAttribute("data-rte-mention","1"),te.textContent=["/* 2026-07-12 mention picker precision */",".rte-mention-popup{position:absolute;z-index:2147483000;min-width:240px;max-width:min(340px,calc(100vw - 24px));max-height:min(320px,60vh);overflow-y:auto;padding:5px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));border:1px solid rgba(148,163,184,.22);box-shadow:0 14px 32px rgba(29,78,216,.12),0 2px 8px rgba(15,23,42,.08);border-radius:8px;font-family:Aptos,'Segoe UI',sans-serif;font-size:13px;color:#172033;scrollbar-width:thin}",".rte-mention-item{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:6px 8px;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit;font:inherit;border-radius:7px}",".rte-mention-item:hover,.rte-mention-item-active{background:#eef4ff;color:#0f3f9f}",".rte-mention-avatar{flex:0 0 30px;width:30px;height:30px;border-radius:8px;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:#e7eefb;color:#315277;font-size:11px;font-weight:800;letter-spacing:.02em;box-shadow:inset 0 0 0 1px rgba(148,163,184,.18)}",".rte-mention-avatar img{width:100%;height:100%;object-fit:cover}",".rte-mention-item-active .rte-mention-avatar{background:#ffffff;color:#0f3f9f}",".rte-mention-body{display:flex;flex-direction:column;min-width:0;flex:1}",".rte-mention-label{font-weight:750;font-size:13px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".rte-mention-subtitle{font-size:11px;color:#64748b;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}",".rte-mention-item-active .rte-mention-subtitle{color:#315277}",".rte-mention-loading,.rte-mention-empty{padding:14px 16px;color:#52657e;font-size:12px;font-weight:700;text-align:center}",".rte-mention{display:inline-block;padding:1px 7px;border-radius:999px;background:#eef4ff;color:#0f3f9f;font-weight:650;cursor:default;border:1px solid rgba(37,99,235,.16)}",".rte-mention:hover{background:#e4edff}"].join(`
|
|
32
32
|
`),Q.head.appendChild(te);var Z=n.getDocument();if(Z&&Z.head&&!Z.querySelector("style[data-rte-mention-inline]")){var le=Z.createElement("style");le.setAttribute("data-rte-mention-inline","1"),le.textContent=[".rte-mention{display:inline-block;padding:1px 7px;border-radius:999px;background:#eef4ff;color:#0f3f9f;font-weight:650;cursor:default;border:1px solid rgba(37,99,235,.16);user-select:all}",".rte-mention:hover{background:#e4edff}"].join(`
|
|
33
33
|
`),Z.head.appendChild(le)}}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_mergefields=RTE_Plugin_MergeFields,typeof RTE_DefaultConfig.mergeFields>"u"&&(RTE_DefaultConfig.mergeFields=[{id:"recipient.name",label:"Recipient name",sample:"Ada Lovelace"},{id:"recipient.email",label:"Recipient email",sample:"ada@example.com"},{id:"company.name",label:"Company name",sample:"Analytical Engines Ltd"},{id:"document.title",label:"Document title",sample:"Statement of Work"},{id:"date.today",label:"Today's date",sample:function(){return new Date().toLocaleDateString()}}]),typeof RTE_DefaultConfig.mergeFieldPrefix>"u"&&(RTE_DefaultConfig.mergeFieldPrefix="{{"),typeof RTE_DefaultConfig.mergeFieldSuffix>"u"&&(RTE_DefaultConfig.mergeFieldSuffix="}}"),typeof RTE_DefaultConfig.mergeFieldMissing>"u"&&(RTE_DefaultConfig.mergeFieldMissing="placeholder");function RTE_Plugin_MergeFields(){var E=this,c,n,S=null,M=!1,F=!1;E.PluginName="MergeFields",E.InitConfig=function(p){c=p},E.InitEditor=function(p){n=p,n.attachEvent("exec_command_insertmergefield",function(u){u.returnValue=!0,E.Insert(u&&u.value)}),K();try{n.attachEvent("ready",K)}catch{}try{n.attachEvent("aftersethtml",K)}catch{}setTimeout(K,0),n.getMergeFieldDefinitions=function(){return N().slice()},n.insertMergeField=function(u){return E.Insert(u)},n.listMergeFields=function(){return E.List()},n.setMergeFieldPreview=function(u){return x(!!u)},n.toggleMergeFieldPreview=function(){return x(!M)},n.isMergeFieldPreview=function(){return M},n.renderMergeFields=function(u){return E.Render(u)},n.getMergeFieldCss=function(){return s()}};function K(){var p=j();p&&(C(p),L(),p!==S&&(S=p,m()))}function j(){try{return n.getDocument()}catch{return null}}function o(){try{return n.getEditable()}catch{return null}}function N(){var p=c.mergeFields;return Object.prototype.toString.call(p)==="[object Array]"?p:[]}function U(p){for(var u=N(),f=0;f<u.length;f++)if(u[f]&&u[f].id===p)return u[f];return null}function $(p){var u=U(p),f=u&&u.label?u.label:p;return String(c.mergeFieldPrefix||"")+f+String(c.mergeFieldSuffix||"")}function W(p){var u=U(p);if(!u)return"";var f=u.sample;if(typeof f=="function")try{return String(f(p))}catch{return""}return f==null?"":String(f)}E.Insert=function(p){var u=j(),f=o();if(!u||!f)return!1;if(!p){var T=N()[0];if(!T)return!1;p=T.id}var w=u.createElement("span");w.className="rte-merge-field",w.setAttribute("data-merge-field",p),w.setAttribute("contenteditable","false"),w.textContent=M?W(p):$(p),M&&(w.className+=" rte-merge-preview");var k=!1;try{typeof n.insertElement=="function"&&(n.insertElement(w),k=!0)}catch{}if(!k)try{var y=n.getSelection();if(y&&y.rangeCount){var O=y.getRangeAt(0);O.collapse(!1),O.insertNode(w),O.setStartAfter(w),O.collapse(!0),y.removeAllRanges(),y.addRange(O),k=!0}}catch{}return k||f.appendChild(w),l(),p};function q(){var p=o();return p?Array.prototype.slice.call(p.querySelectorAll("span.rte-merge-field[data-merge-field]")):[]}E.List=function(){for(var p=[],u={},f=q(),T=0;T<f.length;T++){var w=f[T].getAttribute("data-merge-field"),k=U(w);p.push({id:w,label:k&&k.label?k.label:w,known:!!k,count:u[w]=(u[w]||0)+1})}return p};function x(p){return M=!!p,m(),M}function m(){for(var p=q(),u=0;u<p.length;u++)D(p[u])}function D(p){var u=p.getAttribute("data-merge-field");M?(p.textContent=W(u),p.classList&&p.classList.add("rte-merge-preview")):(p.textContent=$(u),p.classList&&p.classList.remove("rte-merge-preview"))}E.Render=function(p){var u=o();if(!u)return"";for(var f=u.cloneNode(!0),T=f.querySelectorAll("span.rte-merge-field[data-merge-field]"),w=0;w<T.length;w++){var k=T[w],y=k.getAttribute("data-merge-field"),O=I(p,y);if(O==null){String(c.mergeFieldMissing)==="empty"?k.parentNode&&k.parentNode.removeChild(k):k.textContent=$(y);continue}var R=k.ownerDocument.createTextNode(String(O));k.parentNode&&k.parentNode.replaceChild(R,k)}return f.innerHTML};function I(p,u){if(!p||typeof p!="object")return null;if(Object.prototype.hasOwnProperty.call(p,u))return p[u];for(var f=String(u).split("."),T=p,w=0;w<f.length;w++){if(T==null||typeof T!="object"||!Object.prototype.hasOwnProperty.call(T,f[w]))return null;T=T[f[w]]}return T??null}function G(){if(!M)return function(){};for(var p=q(),u=[],f=0;f<p.length;f++)u.push({chip:p[f],text:p[f].textContent}),p[f].textContent=$(p[f].getAttribute("data-merge-field")),p[f].classList&&p[f].classList.remove("rte-merge-preview");return function(){for(var w=0;w<u.length;w++)u[w].chip.textContent=u[w].text,u[w].chip.classList&&u[w].chip.classList.add("rte-merge-preview")}}function L(){if(!F){for(var p=["getHTMLCode","getJSON","getHTMLContent","getText"],u=!1,f=0;f<p.length;f++)(function(T){var w=n[T];if(!(typeof w!="function"||w.__rteMfWrapped)){var k=function(){var y=G();try{return w.apply(n,arguments)}finally{y()}};k.__rteMfWrapped=!0,n[T]=k,u=!0}})(p[f]);u&&(F=!0)}}function l(){try{typeof n.updateDesign=="function"&&n.updateDesign()}catch{}try{typeof n.fireChange=="function"&&n.fireChange()}catch{}}function s(){return"span.rte-merge-field{display:inline-block;padding:0 .35em;border-radius:3px;background:#e8f0fe;color:#1a4fa0;border:1px solid #c3d8f7;font-size:.94em;white-space:nowrap;user-select:none;cursor:default;}span.rte-merge-field.rte-merge-preview{background:#eef7ed;color:#1e6b32;border-color:#c6e3c8;}"}function C(p){if(p){var u=p.getElementById("rte-merge-field-styles"),f=s();if(u){if(u.getAttribute("data-css")===f)return;u.parentNode&&u.parentNode.removeChild(u)}var T=p.createElement("style");T.id="rte-merge-field-styles",T.setAttribute("data-css",f),T.appendChild(p.createTextNode(f)),(p.head||p.getElementsByTagName("head")[0]||p.documentElement).appendChild(T)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_mermaiddiagram=RTE_Plugin_MermaidDiagram,RTE_DefaultConfig.diagramResolver=RTE_DefaultConfig.diagramResolver||null,RTE_DefaultConfig.diagramSamples=RTE_DefaultConfig.diagramSamples||[`graph TD
|