@richscripts/richtexteditor 2.14.1 → 2.15.0
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 +173 -10
- package/angular/build-manifest.json +23 -0
- package/angular/index.d.ts +71 -76
- package/angular/index.mjs +2 -0
- package/angular/package.json +4 -0
- package/headless/index.d.ts +3 -1
- package/headless/index.js +72 -16
- package/index.d.ts +33 -54
- package/integrations/initialization-scope.js +27 -0
- package/integrations/native-mount.js +30 -0
- package/integrations/shared.d.ts +23 -1
- package/integrations/shared.js +58 -22
- package/package.json +25 -3
- package/react/index.js +118 -37
- package/react/index.mjs +29 -0
- package/richtexteditor/all_plugins.js +7001 -1078
- package/richtexteditor/all_plugins.min.js +62 -59
- package/richtexteditor/lang/emoji/LICENSE-CLDR.txt +41 -0
- package/richtexteditor/lang/emoji/rte-emoji-de.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-es.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-fr.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-it.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-ja.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-ko.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-nl.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-pt-pt.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-pt.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-ru.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-zh-Hans.js +3 -0
- package/richtexteditor/lang/emoji/rte-emoji-zh-Hant.js +3 -0
- package/richtexteditor/lang/rte-lang-af.js +1 -0
- package/richtexteditor/lang/rte-lang-ar.js +1 -0
- package/richtexteditor/lang/rte-lang-bg.js +1 -0
- package/richtexteditor/lang/rte-lang-bn.js +1 -0
- package/richtexteditor/lang/rte-lang-bs.js +1 -0
- package/richtexteditor/lang/rte-lang-ca.js +1 -0
- package/richtexteditor/lang/rte-lang-cs.js +1 -0
- package/richtexteditor/lang/rte-lang-cy.js +1 -0
- package/richtexteditor/lang/rte-lang-da.js +1 -0
- package/richtexteditor/lang/rte-lang-de.js +1017 -2
- package/richtexteditor/lang/rte-lang-el.js +1 -0
- package/richtexteditor/lang/rte-lang-en.js +1 -0
- package/richtexteditor/lang/rte-lang-es.js +1023 -2
- package/richtexteditor/lang/rte-lang-et.js +1 -0
- package/richtexteditor/lang/rte-lang-fa.js +1 -0
- package/richtexteditor/lang/rte-lang-fi.js +1 -0
- package/richtexteditor/lang/rte-lang-fil.js +1 -0
- package/richtexteditor/lang/rte-lang-fj.js +1 -0
- package/richtexteditor/lang/rte-lang-fr.js +1023 -2
- package/richtexteditor/lang/rte-lang-ga.js +1 -0
- package/richtexteditor/lang/rte-lang-gu.js +1 -0
- package/richtexteditor/lang/rte-lang-he.js +1 -0
- package/richtexteditor/lang/rte-lang-hi.js +1 -0
- package/richtexteditor/lang/rte-lang-hr.js +1 -0
- package/richtexteditor/lang/rte-lang-ht.js +1 -0
- package/richtexteditor/lang/rte-lang-hu.js +1 -0
- package/richtexteditor/lang/rte-lang-id.js +1 -0
- package/richtexteditor/lang/rte-lang-is.js +1 -0
- package/richtexteditor/lang/rte-lang-it.js +1023 -2
- package/richtexteditor/lang/rte-lang-ja.js +1023 -2
- package/richtexteditor/lang/rte-lang-kn.js +1 -0
- package/richtexteditor/lang/rte-lang-ko.js +1023 -2
- package/richtexteditor/lang/rte-lang-lt.js +1 -0
- package/richtexteditor/lang/rte-lang-lv.js +1 -0
- package/richtexteditor/lang/rte-lang-mg.js +1 -0
- package/richtexteditor/lang/rte-lang-mi.js +1 -0
- package/richtexteditor/lang/rte-lang-ml.js +1 -0
- package/richtexteditor/lang/rte-lang-mr.js +1 -0
- package/richtexteditor/lang/rte-lang-ms.js +1 -0
- package/richtexteditor/lang/rte-lang-mt.js +1 -0
- package/richtexteditor/lang/rte-lang-mww.js +1 -0
- package/richtexteditor/lang/rte-lang-nb.js +1 -0
- package/richtexteditor/lang/rte-lang-nl.js +1023 -2
- package/richtexteditor/lang/rte-lang-otq.js +1 -0
- package/richtexteditor/lang/rte-lang-pa.js +1 -0
- package/richtexteditor/lang/rte-lang-pl.js +1 -0
- package/richtexteditor/lang/rte-lang-pt-pt.js +1023 -2
- package/richtexteditor/lang/rte-lang-pt.js +1023 -2
- package/richtexteditor/lang/rte-lang-ro.js +1 -0
- package/richtexteditor/lang/rte-lang-ru.js +1023 -2
- package/richtexteditor/lang/rte-lang-sk.js +1 -0
- package/richtexteditor/lang/rte-lang-sl.js +1 -0
- package/richtexteditor/lang/rte-lang-sm.js +1 -0
- package/richtexteditor/lang/rte-lang-sr-Cyrl.js +1 -0
- package/richtexteditor/lang/rte-lang-sr-Latn.js +1 -0
- package/richtexteditor/lang/rte-lang-sv.js +1 -0
- package/richtexteditor/lang/rte-lang-sw.js +1 -0
- package/richtexteditor/lang/rte-lang-ta.js +1 -0
- package/richtexteditor/lang/rte-lang-te.js +1 -0
- package/richtexteditor/lang/rte-lang-th.js +1 -0
- package/richtexteditor/lang/rte-lang-tlh-Latn.js +1 -0
- package/richtexteditor/lang/rte-lang-tlh-Piqd.js +1 -0
- package/richtexteditor/lang/rte-lang-to.js +1 -0
- package/richtexteditor/lang/rte-lang-tr.js +1 -0
- package/richtexteditor/lang/rte-lang-ty.js +1 -0
- package/richtexteditor/lang/rte-lang-uk.js +1 -0
- package/richtexteditor/lang/rte-lang-ur.js +1 -0
- package/richtexteditor/lang/rte-lang-vi.js +1 -0
- package/richtexteditor/lang/rte-lang-yua.js +1 -0
- package/richtexteditor/lang/rte-lang-zh-Hans.js +1017 -2
- package/richtexteditor/lang/rte-lang-zh-Hant.js +1017 -2
- package/richtexteditor/plugins/a11yenhance.js +2 -1
- package/richtexteditor/plugins/a11yenhance.min.js +1 -1
- package/richtexteditor/plugins/accessibilitychecker.js +252 -60
- package/richtexteditor/plugins/accessibilitychecker.min.js +1 -1
- package/richtexteditor/plugins/aitoolkit.js +966 -303
- package/richtexteditor/plugins/aitoolkit.min.js +7 -7
- package/richtexteditor/plugins/all_plugins.js +7001 -1078
- package/richtexteditor/plugins/all_plugins.min.js +62 -59
- package/richtexteditor/plugins/autocorrect.js +66 -31
- package/richtexteditor/plugins/autocorrect.min.js +1 -1
- package/richtexteditor/plugins/autoembed.js +17 -0
- package/richtexteditor/plugins/autoembed.min.js +1 -1
- package/richtexteditor/plugins/blocktypes.js +18 -9
- package/richtexteditor/plugins/blocktypes.min.js +1 -1
- package/richtexteditor/plugins/bookmarkcard.js +12 -5
- package/richtexteditor/plugins/bookmarkcard.min.js +2 -2
- package/richtexteditor/plugins/changecase.js +72 -19
- package/richtexteditor/plugins/changecase.min.js +1 -1
- package/richtexteditor/plugins/charlimit.js +62 -2
- package/richtexteditor/plugins/charlimit.min.js +2 -2
- package/richtexteditor/plugins/comments.js +458 -59
- package/richtexteditor/plugins/comments.min.js +4 -3
- package/richtexteditor/plugins/contentminimap.js +25 -6
- package/richtexteditor/plugins/contentminimap.min.js +1 -1
- package/richtexteditor/plugins/crossreference.js +1 -1
- package/richtexteditor/plugins/crossreference.min.js +1 -1
- package/richtexteditor/plugins/dialoga11y.js +26 -4
- package/richtexteditor/plugins/dialoga11y.min.js +1 -1
- package/richtexteditor/plugins/dictation.js +1 -1
- package/richtexteditor/plugins/documentimport.js +220 -51
- package/richtexteditor/plugins/documentimport.min.js +4 -4
- package/richtexteditor/plugins/documentoutline.js +47 -8
- package/richtexteditor/plugins/documentoutline.min.js +1 -1
- package/richtexteditor/plugins/docxexport.js +204 -32
- package/richtexteditor/plugins/docxexport.min.js +2 -2
- package/richtexteditor/plugins/draghandle.js +267 -3
- package/richtexteditor/plugins/draghandle.min.js +1 -1
- package/richtexteditor/plugins/emailtoolkit.js +28 -14
- package/richtexteditor/plugins/emailtoolkit.min.js +1 -1
- package/richtexteditor/plugins/emojiautocomplete.js +110 -56
- package/richtexteditor/plugins/emojiautocomplete.min.js +1 -1
- package/richtexteditor/plugins/footnotes.js +65 -11
- package/richtexteditor/plugins/footnotes.min.js +1 -1
- package/richtexteditor/plugins/formatpainter.js +10 -0
- package/richtexteditor/plugins/formatpainter.min.js +1 -1
- package/richtexteditor/plugins/formattingmarks.js +6 -6
- package/richtexteditor/plugins/formattingmarks.min.js +1 -1
- package/richtexteditor/plugins/gapcursor.js +60 -0
- package/richtexteditor/plugins/gapcursor.min.js +1 -1
- package/richtexteditor/plugins/ghostcomplete.js +1 -1
- package/richtexteditor/plugins/html2pdf.js +1 -1
- package/richtexteditor/plugins/html2pdf.min.js +1 -1
- package/richtexteditor/plugins/imageeditor.js +12 -6
- package/richtexteditor/plugins/imageeditor.min.js +1 -1
- package/richtexteditor/plugins/importstyles.js +1 -1
- package/richtexteditor/plugins/inlinecode.js +25 -0
- package/richtexteditor/plugins/inlinecode.min.js +1 -1
- package/richtexteditor/plugins/insertcode.js +21 -3
- package/richtexteditor/plugins/insertcode.min.js +4 -4
- package/richtexteditor/plugins/insertemoji.js +112 -15
- package/richtexteditor/plugins/insertemoji.min.js +1 -1
- package/richtexteditor/plugins/insertgallery.js +42 -36
- package/richtexteditor/plugins/insertgallery.min.js +1 -1
- package/richtexteditor/plugins/inserttemplate.js +33 -17
- package/richtexteditor/plugins/inserttemplate.min.js +1 -1
- package/richtexteditor/plugins/keyboarda11y.js +66 -3
- package/richtexteditor/plugins/keyboarda11y.min.js +1 -1
- package/richtexteditor/plugins/layouttable.js +20 -0
- package/richtexteditor/plugins/layouttable.min.js +1 -1
- package/richtexteditor/plugins/linkchecker.js +29 -9
- package/richtexteditor/plugins/linkchecker.min.js +1 -1
- package/richtexteditor/plugins/localdraft.js +51 -7
- package/richtexteditor/plugins/localdraft.min.js +1 -1
- package/richtexteditor/plugins/markdownexport.js +159 -0
- package/richtexteditor/plugins/markdownexport.min.js +2 -2
- package/richtexteditor/plugins/mathdialog.js +11 -5
- package/richtexteditor/plugins/mathdialog.min.js +1 -1
- package/richtexteditor/plugins/mentionplugin.js +88 -25
- package/richtexteditor/plugins/mentionplugin.min.js +1 -1
- package/richtexteditor/plugins/mermaiddiagram.js +9 -3
- package/richtexteditor/plugins/mermaiddiagram.min.js +2 -2
- package/richtexteditor/plugins/multilevellist.js +4 -0
- package/richtexteditor/plugins/multilevellist.min.js +1 -1
- package/richtexteditor/plugins/pdfexport.js +235 -35
- package/richtexteditor/plugins/pdfexport.min.js +12 -12
- package/richtexteditor/plugins/permanentpen.js +3 -3
- package/richtexteditor/plugins/permanentpen.min.js +1 -1
- package/richtexteditor/plugins/readabilitystats.js +25 -11
- package/richtexteditor/plugins/readabilitystats.min.js +1 -1
- package/richtexteditor/plugins/readaloud.js +29 -15
- package/richtexteditor/plugins/readaloud.min.js +1 -1
- package/richtexteditor/plugins/restrictedediting.js +166 -0
- package/richtexteditor/plugins/restrictedediting.min.js +2 -2
- package/richtexteditor/plugins/revisionhistory.js +169 -37
- package/richtexteditor/plugins/revisionhistory.min.js +3 -3
- package/richtexteditor/plugins/rubyannotation.js +19 -9
- package/richtexteditor/plugins/rubyannotation.min.js +1 -1
- package/richtexteditor/plugins/sanitizer.js +62 -3
- package/richtexteditor/plugins/sanitizer.min.js +1 -1
- package/richtexteditor/plugins/slashcommand.js +30 -16
- package/richtexteditor/plugins/slashcommand.min.js +2 -2
- package/richtexteditor/plugins/smartchips.js +36 -22
- package/richtexteditor/plugins/smartchips.min.js +2 -2
- package/richtexteditor/plugins/spellcheck.js +17 -8
- package/richtexteditor/plugins/spellcheck.min.js +2 -2
- package/richtexteditor/plugins/stateinspector.js +19 -9
- package/richtexteditor/plugins/stateinspector.min.js +2 -2
- package/richtexteditor/plugins/structured-content-bridge.js +56 -24
- package/richtexteditor/plugins/structured-content-bridge.min.js +7 -7
- package/richtexteditor/plugins/tableofcontents.js +5 -2
- package/richtexteditor/plugins/tableofcontents.min.js +1 -1
- package/richtexteditor/plugins/tabletools.js +388 -3
- package/richtexteditor/plugins/tabletools.min.js +1 -1
- package/richtexteditor/plugins/textdirection.js +18 -5
- package/richtexteditor/plugins/textdirection.min.js +1 -1
- package/richtexteditor/plugins/textpartlanguage.js +161 -32
- package/richtexteditor/plugins/textpartlanguage.min.js +1 -1
- package/richtexteditor/plugins/todolist.js +90 -6
- package/richtexteditor/plugins/todolist.min.js +1 -1
- package/richtexteditor/plugins/trackedchanges.js +1812 -25
- package/richtexteditor/plugins/trackedchanges.min.js +5 -3
- package/richtexteditor/plugins/wordexport.js +2 -2
- package/richtexteditor/plugins/yjscollab.js +9 -4
- package/richtexteditor/plugins/yjscollab.min.js +1 -1
- package/richtexteditor/plugins/zz_richtextbox_dialog_style.js +22 -13
- package/richtexteditor/plugins/zz_richtextbox_dialog_style.min.js +1 -1
- package/richtexteditor/rte-config.js +130 -50
- package/richtexteditor/rte-headless.js +19 -4
- package/richtexteditor/rte-webcomponent.js +89 -16
- package/richtexteditor/rte.js +132 -52
- package/scripts/build-angular.mjs +97 -0
- package/svelte/index.d.ts +2 -1
- package/svelte/index.js +80 -9
- package/vue/index.js +130 -34
- package/angular/component.ts +0 -297
- package/angular/index.ts +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_accessibilitychecker=RTE_Plugin_AccessibilityChecker;function RTE_Plugin_AccessibilityChecker(){var fe=this,d,s,A=null,D=null,H=null,R=null,u=null,Ae=0,h=null,v=-1;fe.PluginName="AccessibilityChecker",fe.InitConfig=function(t){d=t,d.accessibilityCheckerEnabled!==!1&&(typeof d.accessibilityCheckerAutoOpen!="boolean"&&(d.accessibilityCheckerAutoOpen=!1),d.accessibilityCheckerTitle=d.accessibilityCheckerTitle||"Accessibility",d.accessibilityCheckerHint=d.accessibilityCheckerHint||"Review heading structure, image alt text, and table headers without leaving the editor.",d.accessibilityCheckerEmptyText=d.accessibilityCheckerEmptyText||"No accessibility issues found in the current document.",Se("toolbar_default","#{accessibilitychecker}"),Se("toolbar_full","#{accessibilitychecker}"))},fe.InitEditor=function(t){s=t,d.accessibilityCheckerEnabled!==!1&&(s.accessibilityChecker={close:function(){pe()},getIssues:function(){return h?h.issues.slice():[]},open:function(){de()},refresh:function(){return _()},repair:function(e,r){return O(e,r)},run:function(){return _()},toggle:function(){ke()}},et(),s.toolbarFactoryMap=s.toolbarFactoryMap||{},s.toolbarFactoryMap.accessibilitychecker=function(e){return s.createToolbarButton(e)},s.attachEvent("exec_command_accessibilitychecker",function(e){e.returnValue=!0,e.stopBubble=!0,ke()}),s.attachEvent("change",function(){tt()}),X(),_(),d.accessibilityCheckerAutoOpen&&de())};function Se(t,e){d[t]&&d[t].indexOf(e)===-1&&(d[t]=d[t]+e)}function et(){var t=d.container.ownerDocument;if(!t.getElementById("rte-accessibility-checker-style")){var e=t.createElement("style");e.id="rte-accessibility-checker-style",e.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(""),t.head.appendChild(e),s&&typeof s.ensureStyleSheetLive=="function"&&s.ensureStyleSheetLive(t,e,"rte-accessibility-checker-style",e.textContent)}}function X(){if(A)return A;var t=d.container,e=t.ownerDocument;A=e.createElement("div"),A.className="rte-a11y-shell";var r=e.createElement("div");r.className="rte-a11y-host";var a=t.parentNode;a.insertBefore(A,t),A.appendChild(r),r.appendChild(t),D=e.createElement("aside"),D.className="rte-a11y-panel",D.setAttribute("aria-label",d.accessibilityCheckerTitle),D.setAttribute("role","complementary");var n=e.createElement("div");n.className="rte-a11y-header",n.innerHTML='<div class="rte-a11y-kicker">Accessibility</div><div class="rte-a11y-title"></div><div class="rte-a11y-copy"></div>',n.querySelector(".rte-a11y-title").innerText=d.accessibilityCheckerTitle,n.querySelector(".rte-a11y-copy").innerText=d.accessibilityCheckerHint;var i=e.createElement("div");i.className="rte-a11y-toolbar",i.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>',i.querySelector("[data-rte-a11y-refresh]").onclick=function(){_()},i.querySelector("[data-rte-a11y-close]").onclick=function(){pe()};var o=e.createElement("div");return o.className="rte-a11y-body",H=e.createElement("div"),H.className="rte-a11y-list",R=e.createElement("div"),R.className="rte-a11y-empty",R.innerText=d.accessibilityCheckerEmptyText,u=e.createElement("div"),u.className="rte-a11y-detail",o.appendChild(H),o.appendChild(R),o.appendChild(u),D.appendChild(n),D.appendChild(i),D.appendChild(o),A.appendChild(D),A}function ke(){A&&A.classList.contains("is-open")?pe():de()}function de(){X(),A.classList.add("is-open"),he(),Ne()}function pe(){A&&(A.classList.remove("is-open"),Ne())}function Ne(){var t=function(){try{s&&typeof s.fireEvent=="function"&&s.fireEvent("resize")}catch{}try{s&&typeof s.updateLayout=="function"&&s.updateLayout()}catch{}try{var r=d.container.ownerDocument,a=r.defaultView||window;a.dispatchEvent(new a.Event("resize"))}catch{}};t();var e=typeof requestAnimationFrame=="function"?requestAnimationFrame:function(r){return setTimeout(r,16)};e(t)}function tt(){clearTimeout(Ae),Ae=setTimeout(function(){_()},120)}function _(){X();var t=window.RichTextEditor,e=s.getJSON?s.getJSON():null;return h=t&&typeof t.auditAccessibility=="function"?t.auditAccessibility(e):it(),h.issues.length?(v<0||v>=h.issues.length)&&(v=0):v=-1,he(),h}function O(t,e){if(!h||!h.issues||!h.issues[t])return _();var r=window.RichTextEditor,a=h.issues[t];if(a._target||h.source==="dom")return De(a,e||{});if(!r||typeof r.repairAccessibilityIssue!="function")return De(a,e||{});var n=r.repairAccessibilityIssue(s.getJSON(),h.issues[t],e||{});return s.setJSON(n),v=t,_()}function V(t){if(t){if(t._target&&typeof t._target.scrollIntoView=="function"){t._target.scrollIntoView({behavior:"smooth",block:"center"}),s.focus();return}var e=s.getEditable?s.getEditable():null;if(e){var r=/^content\[(\d+)\]/.exec(t.path||"");if(r){for(var a=parseInt(r[1],10),n=[],i=0;i<e.childNodes.length;i++)e.childNodes[i]&&e.childNodes[i].nodeType===1&&n.push(e.childNodes[i]);var o=n[a];o&&typeof o.scrollIntoView=="function"&&o.scrollIntoView({behavior:"smooth",block:"center"}),s.focus()}}}}var T=[{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}],Te=4;function rt(t){for(var e=[],r=0;r<T.length;r++){var a=String(t).match(T[r].re);a&&a.length>=Te&&e.push(T[r])}return e}function at(){var t=s.getEditable?s.getEditable():null,e=t&&t.getAttribute("lang")||typeof document<"u"&&document.documentElement.getAttribute("lang")||"en";e=String(e).toLowerCase().split("-")[0];for(var r=0;r<T.length;r++)if(T[r].lang===e)return T[r];return T[T.length-1]}function Ee(t,e){for(var r=t&&t.nodeType===3?t.parentNode:t;r&&r!==e&&r.nodeType===1;){if(r.hasAttribute&&r.hasAttribute("lang"))return!0;r=r.parentNode}return!1}function nt(t,e,r,a){var n=at(),i=t.ownerDocument;if(!(!i||!i.createTreeWalker))for(var o=i.createTreeWalker(t,4,null,!1),l,c={};l=o.nextNode();){var f=l.nodeValue||"";if(f.replace(/\s+/g,"")&&!Ee(l,e))for(var y=rt(f),b=0;b<y.length;b++){var p=y[b];p!==n&&(c[p.name]||(c[p.name]=!0,a.push({code:"language-of-parts",severity:"warning",message:p.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:r+".lang",_target:t,_lang:p.lang,_script:p.name})))}}}function it(){var t=s.getEditable?s.getEditable():null,e=[];if(!t)return{document:null,issues:e,valid:!0,source:"dom"};for(var r=[],a=0;a<t.childNodes.length;a++){var n=t.childNodes[a];!n||n.nodeType!==1||r.push(n)}for(var i=0,o=0;o<r.length;o++){var l=r[o],c=String(l.nodeName||"").toLowerCase(),f="content["+o+"]";if(/^h[1-6]$/.test(c)){var y=parseInt(c.substring(1),10),b=I(l);b||e.push({code:"heading-empty",severity:"warning",message:"Heading is empty. Add a concise label or remove the heading.",path:f,_target:l}),i&&y>i+1&&e.push({code:"heading-level-skip",severity:"warning",message:"Heading jumps from H"+i+" to H"+y+". Use the next heading level for a clearer outline.",path:f+".attrs.level",_target:l}),b&&(i=y)}for(var p=c==="img"?[l]:l.querySelectorAll?l.querySelectorAll("img"):[],m=0;m<p.length;m++){var x=p[m];String(x.getAttribute("alt")||"").replace(/^\s+|\s+$/g,"")||e.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:f+".image["+m+"]",_target:x})}for(var g=c==="a"?[l]:l.querySelectorAll?l.querySelectorAll("a"):[],S=0;S<g.length;S++){var k=g[S];!k.getAttribute||k.getAttribute("href")===null||ge(k)||e.push({code:"link-empty",severity:"error",message:'Link has no text, so it is announced only as "link". Add link text, an aria-label, or alt text on the image inside it.',path:f+".link["+S+"]",_target:k})}for(var E=c==="table"?[l]:l.querySelectorAll?l.querySelectorAll("table"):[],w=0;w<E.length;w++){var N=E[w],z=String(N.getAttribute("role")||"").toLowerCase(),C=z==="presentation"||z==="none";if(C){var U=N.querySelector("th, [scope], caption")||N.getAttribute("summary");U&&e.push({code:"layout-table-semantics",severity:"error",message:"Layout table still carries data-table markup (header cells, scope or a caption). A screen reader will announce relationships this table does not have.",path:f+".table["+w+"]",_target:N})}else if(!N.querySelector("th"))e.push({code:"table-missing-header",severity:"warning",message:"Table has no header cells. Promote the first row to headers, or mark it as a layout table when it only positions content.",path:f+".table["+w+"]",_target:N});else{for(var q=N.querySelectorAll("th"),$e=!1,ye=0;ye<q.length;ye++){var He=q[ye].parentNode;if(He&&He.rowIndex>0){$e=!0;break}}for(var ee=0;ee<q.length;ee++){var te=q[ee];if(!ge(te)){var ze=te.parentNode;$e&&ze&&ze.rowIndex===0&&te.cellIndex===0||e.push({code:"table-header-empty",severity:"error",message:"Header cell is empty, so the column or row it labels is announced with no name. Give it text, or make it a normal cell if it labels nothing.",path:f+".table["+w+"].th["+ee+"]",_target:te})}}}}for(var Fe=l.querySelectorAll?l.querySelectorAll("[style*='color']"):[],Be=l.getAttribute&&/(^|;)\s*color\s*:/i.test(l.getAttribute("style")||"")?[l].concat(Array.prototype.slice.call(Fe)):Array.prototype.slice.call(Fe),re=0;re<Be.length;re++){var J=Be[re],Oe=_e(J.style&&J.style.color);if(Oe){var je=st(J),Re=ct(Oe,je.rgb),Ve=ut(J),Pe=Ve?3:4.5;Re<Pe-.001&&e.push({code:"contrast-insufficient",severity:"error",message:"Text contrast is "+Re.toFixed(2)+":1 against "+(je.assumed?"an assumed white background":"its background")+", below the "+Pe+":1 needed for "+(Ve?"large text":"body text")+" (WCAG 1.4.3).",path:f+".contrast["+re+"]",_target:J})}}for(var Ue=c==="blockquote"?[l]:l.querySelectorAll?l.querySelectorAll("blockquote"):[],ae=0;ae<Ue.length;ae++){var Je=Ue[ae],W=Je.style;if(W){var gt=/^\s*[\d.]+\s*[a-z%]+\s*$/i.test(W.marginLeft||"")&&parseFloat(W.marginLeft)>0,ht=/^(none|0|0px)$/i.test(String(W.borderStyle||W.border||"").trim());gt&&ht&&e.push({code:"blockquote-as-indent",severity:"warning",message:"This looks like indentation, not a quotation: a <blockquote> with a left margin and no quote styling. Screen readers announce it as a quotation. Use the indent button instead.",path:f+".blockquote["+ae+"]",_target:Je})}}for(var yt=/^(click here|here|read more|more|link|this|this link|learn more|details|go)$/i,We=c==="a"?[l]:l.querySelectorAll?l.querySelectorAll("a"):[],ne=0;ne<We.length;ne++){var ie=We[ne];if(!(!ie.getAttribute||ie.getAttribute("href")===null)){var ve=ge(ie);ve&&yt.test(ve.replace(/[\s.,!:;]+$/g,"").replace(/^\s+/,""))&&e.push({code:"link-ambiguous-text",severity:"warning",message:'Link text "'+ve+'" does not say where it goes. Out of context a screen reader announces only this text.',path:f+".link["+ne+"]",_target:ie})}}nt(l,t,f,e)}if(t&&t.querySelectorAll)for(var me=t.querySelectorAll("[id]"),Ge={},G=0;G<me.length;G++){var oe=me[G].getAttribute("id");oe&&(Ge[oe]&&e.push({code:"duplicate-id",severity:"error",message:'id "'+oe+'" is used more than once. Any aria-labelledby, aria-describedby or label pointing at it resolves to only the first element.',path:"document.id["+G+"]",_target:me[G]}),Ge[oe]=!0)}if(t&&t.querySelectorAll){for(var Ye=t.querySelectorAll("p"),le=0;le<Ye.length;le++){var F=Ye[le],Y=I(F);if(!(!Y||Y.length>80||/[.!?:;,]$/.test(Y))){var be=F.ownerDocument.defaultView,xe=F.querySelector("strong, b"),vt=be.getComputedStyle(F),mt=xe&&I(xe)===Y||parseInt(vt.fontWeight,10)>=600;if(mt){var bt=xe||F,xt=parseFloat(be.getComputedStyle(F.ownerDocument.body).fontSize)||16;parseFloat(be.getComputedStyle(bt).fontSize)<xt*1.2||e.push({code:"paragraph-as-heading",severity:"warning",message:'"'+Y+'" looks like a heading (bold, large, on its own line) but is a paragraph. Screen-reader users cannot jump to it. Use a heading level instead.',path:"document.p["+le+"]",_target:F})}}}for(var Ke=function(Ce){if(!Ce||String(Ce.nodeName).toLowerCase()!=="p")return null;var Ie=I(Ce);return/^\d{1,3}[.)]\s+\S/.test(Ie)?"ol":/^[-*•▪●]\s+\S/.test(Ie)?"ul":null},K=t.children,L=0;L<K.length;L++){var we=Ke(K[L]);if(we){for(var j=1;L+j<K.length&&Ke(K[L+j])===we;)j++;j>=2&&e.push({code:"fake-list",severity:"warning",message:j+" paragraphs are typed as a "+(we==="ol"?"numbered":"bulleted")+" list. Screen readers do not announce them as a list or say how many items it has. Use the list button instead.",path:"content["+L+"]",_target:K[L]}),L+=j-1}}for(var Z=t.querySelectorAll("img[alt]"),M=0;M<Z.length;M++){var B=(Z[M].getAttribute("alt")||"").trim();if(B){var Ze=((Z[M].getAttribute("src")||"").split(/[?#]/)[0].split("/").pop()||"").toLowerCase();/\.(jpe?g|png|gif|webp|bmp|svg|avif|tiff?)$/i.test(B)||Ze&&B.toLowerCase()===Ze||/^(img|image|dsc|photo|screenshot)[-_ ]?\d+/i.test(B)?e.push({code:"image-alt-filename",severity:"error",message:'Alt text "'+B+'" is a file name, which describes nothing. Say what the image shows.',path:"document.img["+M+"]",_target:Z[M]}):B.length>150&&e.push({code:"image-alt-too-long",severity:"warning",message:"Alt text is "+B.length+" characters. Keep it to a short description; put longer detail in the text or a caption.",path:"document.img["+M+"]",_target:Z[M]})}}for(var g=t.querySelectorAll("a[href]"),Q=1;Q<g.length;Q++){var Qe=g[Q-1],se=g[Q];if(Qe.getAttribute("href")===se.getAttribute("href")){for(var $=Qe.nextSibling,Xe=!0;$&&$!==se;){if($.nodeType===1||$.nodeType===3&&/\S/.test($.data)){Xe=!1;break}$=$.nextSibling}Xe&&$===se&&e.push({code:"link-adjacent-duplicate",severity:"warning",message:"Two links next to each other go to the same place, so it is announced twice. Combine them into one link.",path:"document.link["+Q+"]",_target:se})}}for(var E=t.querySelectorAll("table"),ce=0;ce<E.length;ce++){var ue=E[ce];(ue.getAttribute("role")||"").toLowerCase()!=="presentation"&&(!ue.querySelector("th")||ue.querySelector("caption")||e.push({code:"table-missing-caption",severity:"warning",message:"Data table has no caption. A short caption lets screen-reader users know what the table is before they enter it.",path:"document.table["+ce+"]",_target:ue}))}}return{document:null,issues:e,valid:!e.length,source:"dom"}}function De(t,e){if(!t||!t._target)return _();var r=t._target;if(t.code==="image-missing-alt")r.setAttribute("alt",String(e.altText||"").replace(/^\s+|\s+$/g,""));else if(t.code==="heading-empty")r.textContent=String(e.headingText||"").replace(/^\s+|\s+$/g,"");else if(t.code==="heading-level-skip"){for(var a=Math.max(1,Math.min(6,parseInt(e.targetLevel,10)||2)),n=r.ownerDocument.createElement("h"+a);r.firstChild;)n.appendChild(r.firstChild);P(r,n),r.parentNode.replaceChild(n,r)}else if(t.code==="table-missing-header")e&&e.markLayout?Le(r):lt(r);else if(t.code==="layout-table-semantics")Le(r);else if(t.code==="table-header-empty"){var i=String(e&&e.headerText||"").replace(/^\s+|\s+$/g,"");if(i)r.textContent=i;else if(e&&e.demoteToCell){for(var o=r.ownerDocument.createElement("td");r.firstChild;)o.appendChild(r.firstChild);P(r,o),o.removeAttribute("scope"),r.parentNode.replaceChild(o,r)}}else if(t.code==="link-empty"){var l=String(e&&e.linkText||"").replace(/^\s+|\s+$/g,"");if(l)r.textContent=l;else{var c=String(e&&e.linkLabel||"").replace(/^\s+|\s+$/g,"");c&&r.setAttribute("aria-label",c)}}else if(t.code==="language-of-parts")ot(r,e&&e.lang?e.lang:t._lang,t._script);else if(t.code==="paragraph-as-heading"){var f=Math.max(1,Math.min(6,parseInt(e&&e.targetLevel,10)||2)),y=r.ownerDocument.createElement("h"+f);y.textContent=(r.textContent||"").replace(/^\s+|\s+$/g,""),P(r,y),y.removeAttribute("style"),r.parentNode.replaceChild(y,r)}else if(t.code==="fake-list"){for(var b=r.ownerDocument,p=r.parentNode,m=/^\d/.test((r.textContent||"").replace(/^\s+/,"")),x=b.createElement(m?"ol":"ul"),g=r;g&&g.nodeName==="P";){var S=(g.textContent||"").replace(/^\s+/,""),k=m?/^\d{1,3}[.)]\s+([\s\S]*)$/.exec(S):/^[-*•▪●]\s+([\s\S]*)$/.exec(S);if(!k)break;var E=b.createElement("li");E.textContent=k[1].replace(/\s+$/,""),x.appendChild(E);var w=g.nextElementSibling;g.parentNode.removeChild(g),g=w}g&&g.parentNode===p?p.insertBefore(x,g):p.appendChild(x)}else if(t.code==="table-missing-caption"){var N=String(e&&e.captionText||"").replace(/^\s+|\s+$/g,"");if(N){var z=r.ownerDocument.createElement("caption");z.textContent=N,r.insertBefore(z,r.firstChild)}}else if(t.code==="link-adjacent-duplicate"){for(var C=r.previousSibling;C&&C.nodeType!==1;)C=C.previousSibling;if(C&&C.nodeName==="A"){for(;r.firstChild;)C.appendChild(r.firstChild);r.parentNode.removeChild(r)}}else(t.code==="image-alt-filename"||t.code==="image-alt-too-long")&&r.setAttribute("alt",String(e&&e.altText||"").replace(/^\s+|\s+$/g,""));return v=0,ft(),_()}function ot(t,e,r){if(!(!t||!e)){for(var a=null,n=0;n<T.length;n++)T[n].name===r&&(a=T[n]);if(a){for(var i=t.ownerDocument,o=s.getEditable?s.getEditable():null,l=e==="he"||e==="ar"||e==="fa"||e==="ur",c=i.createTreeWalker(t,4,null,!1),f=[],y;y=c.nextNode();)Ee(y,o)||f.push(y);for(var b=0;b<f.length;b++){for(var p=f[b],m=p.nodeValue||"",x=new RegExp("(?:"+a.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`+a.re.source+"(?:"+a.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`,"g"),g=i.createDocumentFragment(),S=0,k,E=!1;k=x.exec(m);){var w=k[0],N=w.length-w.replace(/^[\s.,;:!?'"()‐-‧«»“”]+/,"").length,z=w.length-w.replace(/[\s.,;:!?'"()‐-‧«»“”]+$/,"").length,C=k.index+N,U=k.index+w.length-z;if(!(U-C<Te)){C>S&&g.appendChild(i.createTextNode(m.slice(S,C)));var q=i.createElement("span");q.setAttribute("lang",e),l&&q.setAttribute("dir","rtl"),q.appendChild(i.createTextNode(m.slice(C,U))),g.appendChild(q),S=U,E=!0,x.lastIndex===k.index&&x.lastIndex++}}E&&(S<m.length&&g.appendChild(i.createTextNode(m.slice(S))),p.parentNode.replaceChild(g,p))}}}}function lt(t){var e=t&&t.rows&&t.rows.length?t.rows[0]:null;if(e)for(var r=t.ownerDocument,a=0;a<e.cells.length;a++){var n=e.cells[a];if(!(!n||String(n.nodeName||"").toLowerCase()==="th")){for(var i=r.createElement("th");n.firstChild;)i.appendChild(n.firstChild);P(n,i),i.setAttribute("scope","col"),e.replaceChild(i,n)}}}function _e(t){if(!t)return null;var e=String(t).trim(),r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){var a=r[1];return a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}var n=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(e);return n?[Math.round(+n[1]),Math.round(+n[2]),Math.round(+n[3])]:null}function st(t){for(var e=t;e&&e.style;){var r=_e(e.style.backgroundColor);if(r)return{rgb:r,assumed:!1};e=e.parentElement}return{rgb:[255,255,255],assumed:!0}}function qe(t){var e=[t[0],t[1],t[2]].map(function(r){return r=r/255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)});return .2126*e[0]+.7152*e[1]+.0722*e[2]}function ct(t,e){var r=qe(t),a=qe(e),n=Math.max(r,a),i=Math.min(r,a);return(n+.05)/(i+.05)}function ut(t){var e=t.style||{},r=String(e.fontSize||""),a=null,n=/^([\d.]+)(px|pt)$/i.exec(r.trim());if(n&&(a=n[2].toLowerCase()==="pt"?parseFloat(n[1]):parseFloat(n[1])*.75),a===null){var i=(t.tagName||"").toLowerCase();return!!/^h[1-3]$/.test(i)}var o=/bold|^[6-9]00$/.test(String(e.fontWeight||""));return a>=18||a>=14&&o}function ge(t){if(!t)return"";var e=function(c){return String(c||"").replace(/^\s+|\s+$/g,"")},r=e(t.getAttribute&&t.getAttribute("aria-label"));if(r)return r;var a=e(t.textContent);if(a)return a;var n=e(t.getAttribute&&t.getAttribute("title"));if(n)return n;if(t.querySelectorAll)for(var i=t.querySelectorAll("img"),o=0;o<i.length;o++){var l=e(i[o].getAttribute("alt"));if(l)return l}return""}function Le(t){if(t){if(s&&typeof s.setTableLayoutMode=="function")try{s.setTableLayoutMode("layout",t);return}catch{}t.setAttribute("role","presentation"),t.removeAttribute("summary");var e=t.querySelector("caption");e&&e.parentNode===t&&e.parentNode.removeChild(e);for(var r=t.querySelectorAll("th,[scope]"),a=0;a<r.length;a++){var n=r[a];if(!(n.closest&&n.closest("table")!==t)&&(n.removeAttribute("scope"),n.removeAttribute("headers"),String(n.nodeName||"").toLowerCase()==="th")){for(var i=t.ownerDocument.createElement("td");n.firstChild;)i.appendChild(n.firstChild);P(n,i),i.removeAttribute("scope"),n.parentNode.replaceChild(i,n)}}}}function P(t,e){if(!(!t||!e||!t.attributes))for(var r=0;r<t.attributes.length;r++){var a=t.attributes[r];!a||!a.name||e.setAttribute(a.name,a.value)}}function ft(){try{s&&typeof s.fireEvent=="function"&&s.fireEvent("change")}catch{}try{s&&typeof s.fireEvent=="function"&&s.fireEvent("contentchange")}catch{}}function I(t){return String(t&&(t.innerText||t.textContent)||"").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}function he(){X();for(var t=h&&h.issues?h.issues:[];H.firstChild;)H.removeChild(H.firstChild);var e=D.querySelector("[data-rte-a11y-count]");e&&(e.innerText=t.length?t.length+" issue"+(t.length===1?"":"s")+" to review":"Ready to publish"),R.style.display=t.length?"none":"block";for(var r=0;r<t.length;r++)(function(a,n){var i=D.ownerDocument.createElement("button");i.type="button",i.className="rte-a11y-item"+(n===v?" is-active":""),i.setAttribute("aria-selected",n===v?"true":"false"),i.innerHTML='<div class="rte-a11y-item-top"><span class="rte-a11y-badge rte-a11y-badge-'+a.severity+'">'+a.severity+'</span><span class="rte-a11y-code">'+a.code+'</span></div><div class="rte-a11y-message"></div>',i.querySelector(".rte-a11y-message").innerText=a.message,i.onclick=function(){v=n,V(a),he()},H.appendChild(i)})(t[r],r);dt()}function dt(){for(;u.firstChild;)u.removeChild(u.firstChild);var t=h&&h.issues?h.issues:[];if(!t.length||v<0||!t[v]){u.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 e=t[v],r=u.ownerDocument.createElement("div");r.className="rte-a11y-detail-title",r.innerText=e.code;var a=u.ownerDocument.createElement("div");if(a.className="rte-a11y-detail-copy",a.innerText=e.message,u.appendChild(r),u.appendChild(a),e.code==="image-missing-alt"){Me("Alt text","Describe the image for screen-reader users.",function(x){O(v,{altText:x})});return}if(e.code==="heading-empty"){Me("Heading text","Add a concise heading label before publishing.",function(x){O(v,{headingText:x})});return}if(e.code==="heading-level-skip"){var n=pt(e),i=u.ownerDocument.createElement("div");i.className="rte-a11y-row";var o=u.ownerDocument.createElement("button");o.type="button",o.className="rte-a11y-button",o.innerText="Normalize to H"+n,o.onclick=function(){O(v,{targetLevel:n})};var l=u.ownerDocument.createElement("button");l.type="button",l.className="rte-a11y-button rte-a11y-button-secondary",l.innerText="Focus issue",l.onclick=function(){V(e)},i.appendChild(o),i.appendChild(l),u.appendChild(i);return}if(e.code==="table-missing-header"){var c=u.ownerDocument.createElement("div");c.className="rte-a11y-row";var f=u.ownerDocument.createElement("button");f.type="button",f.className="rte-a11y-button",f.innerText="Promote first row to headers",f.onclick=function(){O(v,{})};var y=u.ownerDocument.createElement("button");y.type="button",y.className="rte-a11y-button rte-a11y-button-secondary",y.innerText="Focus issue",y.onclick=function(){V(e)},c.appendChild(f),c.appendChild(y),u.appendChild(c);return}if(e.code==="language-of-parts"){var b=u.ownerDocument.createElement("div");b.className="rte-a11y-row";var p=u.ownerDocument.createElement("button");p.type="button",p.className="rte-a11y-button",p.innerText="Mark as "+e._script,p.onclick=function(){O(v,{lang:e._lang})};var m=u.ownerDocument.createElement("button");m.type="button",m.className="rte-a11y-button rte-a11y-button-secondary",m.innerText="Focus issue",m.onclick=function(){V(e)},b.appendChild(p),b.appendChild(m),u.appendChild(b);return}u.innerHTML+='<div class="rte-a11y-detail-copy">This issue is visible here, but does not have an automatic repair action yet.</div>'}function Me(t,e,r){var a=u.ownerDocument.createElement("div");a.className="rte-a11y-field";var n=u.ownerDocument.createElement("div");n.className="rte-a11y-label",n.innerText=t;var i=u.ownerDocument.createElement("input");i.type="text",i.className="rte-a11y-input",i.placeholder=e;var o=u.ownerDocument.createElement("div");o.className="rte-a11y-row";var l=u.ownerDocument.createElement("button");l.type="button",l.className="rte-a11y-button",l.innerText="Apply fix",l.onclick=function(){var f=String(i.value||"").replace(/^\s+|\s+$/g,"");f&&r(f)};var c=u.ownerDocument.createElement("button");c.type="button",c.className="rte-a11y-button rte-a11y-button-secondary",c.innerText="Focus issue",c.onclick=function(){var f=h&&h.issues?h.issues:[];f[v]&&V(f[v])},o.appendChild(l),o.appendChild(c),a.appendChild(n),a.appendChild(i),u.appendChild(a),u.appendChild(o)}function pt(t){var e=(t&&t.path?t.path:"").replace(/\.attrs\.level$/,""),r=s.getJSON?s.getJSON():null;if(!r||!r.content)return 2;var a=0;function n(o,l){if(!o||typeof o.type!="string")return!1;if(l===e)return!0;if(o.type==="heading"&&o.attrs&&typeof o.attrs.level=="number"&&(a=o.attrs.level),!o.content||!o.content.length)return!1;for(var c=0;c<o.content.length;c++)if(n(o.content[c],l+".content["+c+"]"))return!0;return!1}for(var i=0;i<r.content.length&&!n(r.content[i],"content["+i+"]");i++);return Math.max(1,Math.min(6,(a||1)+(a?1:0)))}}
|
|
1
|
+
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_accessibilitychecker=RTE_Plugin_AccessibilityChecker;function RTE_Plugin_AccessibilityChecker(){var we=this,f,o,q=null,b=null,V=null,Q=null,u=null,de=0,g=null,v=-1,_e=!1;we.PluginName="AccessibilityChecker";function l(e,t,r,a){var n=f&&f["text_"+e]||t;return r!==void 0&&(n=n.split("{0}").join(String(r))),a!==void 0&&(n=n.split("{1}").join(String(a))),n}we.InitConfig=function(e){if(f=e,f.accessibilityCheckerEnabled!==!1&&(typeof f.accessibilityCheckerAutoOpen!="boolean"&&(f.accessibilityCheckerAutoOpen=!1),f.accessibilityCheckerTitle=f.accessibilityCheckerTitle||f.text_a11yc_title||"Accessibility",f.accessibilityCheckerHint=f.accessibilityCheckerHint||f.text_a11yc_hint||"Review heading structure, image alt text, and table headers without leaving the editor.",f.accessibilityCheckerEmptyText=f.accessibilityCheckerEmptyText||f.text_a11yc_empty||"No accessibility issues found in the current document.",$e("toolbar_default","#{accessibilitychecker}"),$e("toolbar_full","#{accessibilitychecker}"),f.accessibilityCheckerEnabled!==!1&&f.container&&f.container.parentNode))try{X()}catch{}},we.InitEditor=function(e){if(o=e,f.accessibilityCheckerEnabled!==!1){o.accessibilityChecker={close:function(){Se()},getIssues:function(){return g?g.issues.slice():[]},open:function(){Ce()},refresh:function(){return M()},repair:function(t,r){return O(t,r)},run:function(){return M()},toggle:function(){Re()}},nt(),o.toolbarFactoryMap=o.toolbarFactoryMap||{},o.toolbarFactoryMap.accessibilitychecker=function(t){return o.createToolbarButton(t)},o.attachEvent("exec_command_accessibilitychecker",function(t){t.returnValue=!0,t.stopBubble=!0,Re()}),o.attachEvent("change",function(){He()});try{o.attachEvent("aftersethtml",function(){He()})}catch{}o.attachEvent("destroy",function(){_e=!0,clearTimeout(de),de=0}),X(),M(),f.accessibilityCheckerAutoOpen&&Ce()}};function $e(e,t){f[e]&&f[e].indexOf(t)===-1&&(f[e]=f[e]+t)}function nt(){var e=f.container.ownerDocument;if(!e.getElementById("rte-accessibility-checker-style")){var t=e.createElement("style");t.id="rte-accessibility-checker-style",t.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-locked-note{margin:6px 10px;padding:6px 8px;border:1px solid #e3b341;border-radius:6px;background:#fff8e1;color:#5c3d00;font-size:12px;}",".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-panel.rte-a11y-dark{background:linear-gradient(180deg,#1e293b,#0f172a);border-color:#334155;color:#e2e8f0;box-shadow:0 18px 40px rgba(0,0,0,.45);}",".rte-a11y-dark .rte-a11y-header,.rte-a11y-dark .rte-a11y-toolbar{background:rgba(15,23,42,.6);border-color:#334155;}",".rte-a11y-dark .rte-a11y-kicker,.rte-a11y-dark .rte-a11y-copy,.rte-a11y-dark .rte-a11y-count,.rte-a11y-dark .rte-a11y-detail-copy,.rte-a11y-dark .rte-a11y-label{color:#94a3b8;}",".rte-a11y-dark .rte-a11y-code{color:#a5b4c8;}",".rte-a11y-dark .rte-a11y-title,.rte-a11y-dark .rte-a11y-message,.rte-a11y-dark .rte-a11y-detail-title{color:#f1f5f9;}",".rte-a11y-dark .rte-a11y-item,.rte-a11y-dark .rte-a11y-detail,.rte-a11y-dark .rte-a11y-empty{background:rgba(15,23,42,.72);border-color:#334155;color:#e2e8f0;}",".rte-a11y-dark .rte-a11y-link,.rte-a11y-dark .rte-a11y-button-secondary{background:#0f172a;color:#bfdbfe;border-color:#475569;}",".rte-a11y-dark .rte-a11y-input{background:#0f172a;color:#e2e8f0;border-color:#475569;}",".rte-a11y-dark .rte-a11y-badge-warning{background:#422006;color:#fde68a;border-color:#92400e;}",".rte-a11y-dark .rte-a11y-badge-error{background:#4c0519;color:#fecdd3;border-color:#9f1239;}",".rte-a11y-dark .rte-a11y-locked-note{background:#422006;color:#fde68a;border-color:#92400e;}",".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(""),e.head.appendChild(t),o&&typeof o.ensureStyleSheetLive=="function"&&o.ensureStyleSheetLive(e,t,"rte-accessibility-checker-style",t.textContent)}}function X(){if(q)return q;var e=f.container,t=e.ownerDocument;q=t.createElement("div"),q.className="rte-a11y-shell";var r=t.createElement("div");r.className="rte-a11y-host";var a=e.parentNode;a.insertBefore(q,e),q.appendChild(r),r.appendChild(e),b=t.createElement("aside"),b.className="rte-a11y-panel",b.setAttribute("aria-label",f.accessibilityCheckerTitle),b.setAttribute("role","complementary"),setTimeout(function(){o&&typeof o.makePanelResizable=="function"&&o.makePanelResizable(b,{label:l("a11yc_resize","Resize accessibility panel")})},0);var n=t.createElement("div");n.className="rte-a11y-header",n.innerHTML='<div class="rte-a11y-kicker"></div><div class="rte-a11y-title"></div><div class="rte-a11y-copy"></div>',n.querySelector(".rte-a11y-kicker").innerText=l("a11yc_title","Accessibility"),n.querySelector(".rte-a11y-title").innerText=f.accessibilityCheckerTitle,n.querySelector(".rte-a11y-copy").innerText=f.accessibilityCheckerHint;var i=t.createElement("div");i.className="rte-a11y-toolbar",i.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"></button><button type="button" class="rte-a11y-link" data-rte-a11y-close="1"></button></div>',i.querySelector("[data-rte-a11y-refresh]").innerText=l("a11yc_refresh","Refresh"),i.querySelector("[data-rte-a11y-close]").innerText=l("a11yc_hide","Hide"),i.querySelector("[data-rte-a11y-close]").setAttribute("aria-label",l("a11yc_hidearia","Hide accessibility checker")),i.querySelector("[data-rte-a11y-refresh]").onclick=function(){M()},i.querySelector("[data-rte-a11y-close]").onclick=function(){Se()};var s=t.createElement("div");return s.className="rte-a11y-body",V=t.createElement("div"),V.className="rte-a11y-list",Q=t.createElement("div"),Q.className="rte-a11y-empty",Q.innerText=f.accessibilityCheckerEmptyText,u=t.createElement("div"),u.className="rte-a11y-detail",s.appendChild(V),s.appendChild(Q),s.appendChild(u),b.appendChild(n),b.appendChild(i),b.appendChild(s),q.appendChild(b),q}function Re(){q&&q.classList.contains("is-open")?Se():Ce()}function it(){try{var e=o.container&&o.container.classList;return!!e&&(e.contains("rte-dark")||e.contains("rte-auto-dark")&&!e.contains("rte-light")&&!!(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches))}catch{return!1}}function Ce(){X(),b&&b.classList&&(it()?b.classList.add("rte-a11y-dark"):b.classList.remove("rte-a11y-dark")),q.classList.add("is-open"),M(),ze()}function Se(){q&&(q.classList.remove("is-open"),ze())}function ze(){var e=function(){try{o&&typeof o.fireEvent=="function"&&o.fireEvent("resize")}catch{}try{o&&typeof o.updateLayout=="function"&&o.updateLayout()}catch{}try{var r=f.container.ownerDocument,a=r.defaultView||window;a.dispatchEvent(new a.Event("resize"))}catch{}};e();var t=typeof requestAnimationFrame=="function"?requestAnimationFrame:function(r){return setTimeout(r,16)};t(e)}function He(){_e||(clearTimeout(de),de=setTimeout(function(){M()},120))}function M(){if(_e)return g||{document:null,issues:[],valid:!0,source:"dom"};X();var e=window.RichTextEditor,t=o.getJSON?o.getJSON():null;return g=e&&typeof e.auditAccessibility=="function"?e.auditAccessibility(t):dt(),g.issues.length?(v<0||v>=g.issues.length)&&(v=0):v=-1,Je(),g}function ot(){try{return!!(o.getReadOnly&&o.getReadOnly()||o.getCommentsOnly&&o.getCommentsOnly())}catch{return!1}}function lt(){if(b){var e=b.querySelector(".rte-a11y-locked-note");e||(e=b.ownerDocument.createElement("div"),e.className="rte-a11y-locked-note",e.setAttribute("role","status"),b.insertBefore(e,b.children[1]||null)),e.textContent="";var t=f&&f.text_a11ycheckerlocked||"This document is read-only, so the fix was not applied.";setTimeout(function(){e.textContent=t},30),e.textContent=t}}function O(e,t){if(ot())return lt(),g||M();if(!g||!g.issues||!g.issues[e])return M();var r=window.RichTextEditor,a=g.issues[e];if(a._target||g.source==="dom")return Fe(a,t||{});if(!r||typeof r.repairAccessibilityIssue!="function")return Fe(a,t||{});var n=r.repairAccessibilityIssue(o.getJSON(),g.issues[e],t||{});return o.setJSON(n),v=e,M()}function I(e){if(e){if(e._target&&typeof e._target.scrollIntoView=="function"){e._target.scrollIntoView({behavior:"smooth",block:"center"}),o.focus();return}var t=o.getEditable?o.getEditable():null;if(t){var r=/^content\[(\d+)\]/.exec(e.path||"");if(r){for(var a=parseInt(r[1],10),n=[],i=0;i<t.childNodes.length;i++)t.childNodes[i]&&t.childNodes[i].nodeType===1&&n.push(t.childNodes[i]);var s=n[a];s&&typeof s.scrollIntoView=="function"&&s.scrollIntoView({behavior:"smooth",block:"center"}),o.focus()}}}}var $=[{name:"Hebrew",lang:"he",re:/[\u0590-\u05ff]/g},{name:"Arabic",lang:"ar",re:/[\u0600-\u06ff\u0750-\u077f\ufb50-\ufdff\ufe70-\ufeff]/g},{name:"Greek",lang:"el",re:/[\u0370-\u03ff\u1f00-\u1fff]/g},{name:"Cyrillic",lang:"ru",re:/[\u0400-\u04ff]/g},{name:"Han",lang:"zh",re:/[\u3400-\u4dbf\u4e00-\u9fff]/g},{name:"Kana",lang:"ja",re:/[\u3040-\u309f\u30a0-\u30ff]/g},{name:"Hangul",lang:"ko",re:/[\uac00-\ud7af\u1100-\u11ff]/g},{name:"Devanagari",lang:"hi",re:/[\u0900-\u097f]/g},{name:"Thai",lang:"th",re:/[\u0e00-\u0e7f]/g},{name:"Latin",lang:"en",re:/[A-Za-z\xc0-\u024f]/g}],Oe=4;function ct(e){for(var t=[],r=0;r<$.length;r++){var a=String(e).match($[r].re);a&&a.length>=Oe&&t.push($[r])}return t}function st(){var e=o.getEditable?o.getEditable():null,t=e&&e.getAttribute("lang")||typeof document<"u"&&document.documentElement.getAttribute("lang")||"en";t=String(t).toLowerCase().split("-")[0];for(var r=0;r<$.length;r++)if($[r].lang===t)return $[r];return $[$.length-1]}function Be(e,t){for(var r=e&&e.nodeType===3?e.parentNode:e;r&&r!==t&&r.nodeType===1;){if(r.hasAttribute&&r.hasAttribute("lang"))return!0;r=r.parentNode}return!1}function ut(e,t,r,a){var n=st(),i=e.ownerDocument;if(!(!i||!i.createTreeWalker))for(var s=i.createTreeWalker(e,4,null,!1),c,d={};c=s.nextNode();){var p=c.nodeValue||"";if(p.replace(/\s+/g,"")&&!Be(c,t))for(var x=ct(p),_=0;_<x.length;_++){var m=x[_];m!==n&&(d[m.name]||(d[m.name]=!0,a.push({code:"language-of-parts",severity:"warning",message:l("a11yc_m_lang","{0} text is not marked with a language. Select the phrase and set its language so assistive technology pronounces it correctly (WCAG 3.1.2).",l("a11yc_script_"+m.lang,m.name)),path:r+".lang",_target:e,_lang:m.lang,_script:m.name})))}}}function dt(){var e=o.getEditable?o.getEditable():null,t=[];if(!e)return{document:null,issues:t,valid:!0,source:"dom"};for(var r=[],a=0;a<e.childNodes.length;a++){var n=e.childNodes[a];!n||n.nodeType!==1||r.push(n)}for(var i=0,s=0;s<r.length;s++){var c=r[s],d=String(c.nodeName||"").toLowerCase(),p="content["+s+"]";if(/^h[1-6]$/.test(d)){var x=parseInt(d.substring(1),10),_=fe(c);_||t.push({code:"heading-empty",severity:"warning",message:l("a11yc_m_hempty","Heading is empty. Add a concise label or remove the heading."),path:p,_target:c}),i&&x>i+1&&t.push({code:"heading-level-skip",severity:"warning",message:l("a11yc_m_hskip","Heading jumps from H{0} to H{1}. Use the next heading level for a clearer outline.",i,x),path:p+".attrs.level",_target:c}),_&&(i=x)}for(var m=d==="img"?[c]:c.querySelectorAll?c.querySelectorAll("img"):[],C=0;C<m.length;C++){var S=m[C];String(S.getAttribute("alt")||"").replace(/^\s+|\s+$/g,"")||t.push({code:"image-missing-alt",severity:"error",message:l("a11yc_m_alt","Image is missing alt text. Describe the image or mark it decorative in your content workflow."),path:p+".image["+C+"]",_target:S})}for(var T=d==="a"?[c]:c.querySelectorAll?c.querySelectorAll("a"):[],k=0;k<T.length;k++){var y=T[k];!y.getAttribute||y.getAttribute("href")===null||Ae(y)||t.push({code:"link-empty",severity:"error",message:l("a11yc_m_linkempty",'Link has no text, so it is announced only as "link". Add link text, an aria-label, or alt text on the image inside it.'),path:p+".link["+k+"]",_target:y})}for(var h=d==="table"?[c]:c.querySelectorAll?c.querySelectorAll("table"):[],w=0;w<h.length;w++){var A=h[w],R=String(A.getAttribute("role")||"").toLowerCase(),N=R==="presentation"||R==="none";if(N){var D=A.querySelector("th, [scope], caption")||A.getAttribute("summary");D&&t.push({code:"layout-table-semantics",severity:"error",message:l("a11yc_m_layouttable","Layout table still carries data-table markup (header cells, scope or a caption). A screen reader will announce relationships this table does not have."),path:p+".table["+w+"]",_target:A})}else if(!A.querySelector("th"))t.push({code:"table-missing-header",severity:"warning",message:l("a11yc_m_noheader","Table has no header cells. Promote the first row to headers, or mark it as a layout table when it only positions content."),path:p+".table["+w+"]",_target:A});else{for(var E=A.querySelectorAll("th"),H=!1,J=0;J<E.length;J++){var ee=E[J].parentNode;if(ee&&ee.rowIndex>0){H=!0;break}}for(var B=0;B<E.length;B++){var L=E[B];if(!Ae(L)){var te=L.parentNode;H&&te&&te.rowIndex===0&&L.cellIndex===0||t.push({code:"table-header-empty",severity:"error",message:l("a11yc_m_headerempty","Header cell is empty, so the column or row it labels is announced with no name. Give it text, or make it a normal cell if it labels nothing."),path:p+".table["+w+"].th["+B+"]",_target:L})}}}}for(var re=c.querySelectorAll?c.querySelectorAll("[style*='color']"):[],ae=c.getAttribute&&/(^|;)\s*color\s*:/i.test(c.getAttribute("style")||"")?[c].concat(Array.prototype.slice.call(re)):Array.prototype.slice.call(re),K=0;K<ae.length;K++){var F=ae[K],ne=Ue(F.style&&F.style.color);if(ne){var z=ht(F),We=gt(ne,z.rgb),Ne=mt(F),Ge=Ne?3:4.5;We<Ge-.001&&t.push({code:"contrast-insufficient",severity:"error",message:l("a11yc_m_contrast_"+(z.assumed?"w":"b")+(Ne?"l":"b"),"Text contrast is {0}:1 against "+(z.assumed?"an assumed white background":"its background")+", below the {1}:1 needed for "+(Ne?"large text":"body text")+" (WCAG 1.4.3).",We.toFixed(2),Ge),path:p+".contrast["+K+"]",_target:F})}}for(var Ie=d==="blockquote"?[c]:c.querySelectorAll?c.querySelectorAll("blockquote"):[],pe=0;pe<Ie.length;pe++){var Ke=Ie[pe],ie=Ke.style;if(ie){var kt=/^\s*[\d.]+\s*[a-z%]+\s*$/i.test(ie.marginLeft||"")&&parseFloat(ie.marginLeft)>0,wt=/^(none|0|0px)$/i.test(String(ie.borderStyle||ie.border||"").trim());kt&&wt&&t.push({code:"blockquote-as-indent",severity:"warning",message:l("a11yc_m_bqindent","This looks like indentation, not a quotation: a <blockquote> with a left margin and no quote styling. Screen readers announce it as a quotation. Use the indent button instead."),path:p+".blockquote["+pe+"]",_target:Ke})}}for(var _t=/^(click here|here|read more|more|link|this|this link|learn more|details|go)$/i,Ye=d==="a"?[c]:c.querySelectorAll?c.querySelectorAll("a"):[],ye=0;ye<Ye.length;ye++){var he=Ye[ye];if(!(!he.getAttribute||he.getAttribute("href")===null)){var Ee=Ae(he);Ee&&_t.test(Ee.replace(/[\s.,!:;]+$/g,"").replace(/^\s+/,""))&&t.push({code:"link-ambiguous-text",severity:"warning",message:l("a11yc_m_ambig",'Link text "{0}" does not say where it goes. Out of context a screen reader announces only this text.',Ee),path:p+".link["+ye+"]",_target:he})}}ut(c,e,p,t)}if(e&&e.querySelectorAll)for(var De=e.querySelectorAll("[id]"),Qe={},oe=0;oe<De.length;oe++){var ge=De[oe].getAttribute("id");ge&&(Qe[ge]&&t.push({code:"duplicate-id",severity:"error",message:l("a11yc_m_dupid",'id "{0}" is used more than once. Any aria-labelledby, aria-describedby or label pointing at it resolves to only the first element.',ge),path:"document.id["+oe+"]",_target:De[oe]}),Qe[ge]=!0)}if(e&&e.querySelectorAll){for(var Xe=e.querySelectorAll("p"),me=0;me<Xe.length;me++){var W=Xe[me],le=fe(W);if(!(!le||le.length>80||/[.!?:;,]$/.test(le))){var Le=W.ownerDocument.defaultView,qe=W.querySelector("strong, b"),Ct=Le.getComputedStyle(W),St=qe&&fe(qe)===le||parseInt(Ct.fontWeight,10)>=600;if(St){var At=qe||W,Tt=parseFloat(Le.getComputedStyle(W.ownerDocument.body).fontSize)||16;parseFloat(Le.getComputedStyle(At).fontSize)<Tt*1.2||t.push({code:"paragraph-as-heading",severity:"warning",message:l("a11yc_m_pheading",'"{0}" looks like a heading (bold, large, on its own line) but is a paragraph. Screen-reader users cannot jump to it. Use a heading level instead.',le),path:"document.p["+me+"]",_target:W})}}}for(var Ze=function(Me){if(!Me||String(Me.nodeName).toLowerCase()!=="p")return null;var at=fe(Me);return/^\d{1,3}[.)]\s+\S/.test(at)?"ol":/^[-*\u2022\u25aa\u25cf]\s+\S/.test(at)?"ul":null},ce=e.children,j=0;j<ce.length;j++){var ve=Ze(ce[j]);if(ve){for(var Y=1;j+Y<ce.length&&Ze(ce[j+Y])===ve;)Y++;Y>=2&&t.push({code:"fake-list",severity:"warning",message:l("a11yc_m_fakelist_"+(ve==="ol"?"ol":"ul"),"{0} paragraphs are typed as a "+(ve==="ol"?"numbered":"bulleted")+" list. Screen readers do not announce them as a list or say how many items it has. Use the list button instead.",Y),path:"content["+j+"]",_target:ce[j]}),j+=Y-1}}for(var se=e.querySelectorAll("img[alt]"),U=0;U<se.length;U++){var G=(se[U].getAttribute("alt")||"").trim();if(G){var et=((se[U].getAttribute("src")||"").split(/[?#]/)[0].split("/").pop()||"").toLowerCase();/\.(jpe?g|png|gif|webp|bmp|svg|avif|tiff?)$/i.test(G)||et&&G.toLowerCase()===et||/^(img|image|dsc|photo|screenshot)[-_ ]?\d+/i.test(G)?t.push({code:"image-alt-filename",severity:"error",message:l("a11yc_m_altfile",'Alt text "{0}" is a file name, which describes nothing. Say what the image shows.',G),path:"document.img["+U+"]",_target:se[U]}):G.length>150&&t.push({code:"image-alt-too-long",severity:"warning",message:l("a11yc_m_altlong","Alt text is {0} characters. Keep it to a short description; put longer detail in the text or a caption.",G.length),path:"document.img["+U+"]",_target:se[U]})}}for(var T=e.querySelectorAll("a[href]"),ue=1;ue<T.length;ue++){var tt=T[ue-1],be=T[ue];if(tt.getAttribute("href")===be.getAttribute("href")){for(var P=tt.nextSibling,rt=!0;P&&P!==be;){if(P.nodeType===1||P.nodeType===3&&/\S/.test(P.data)){rt=!1;break}P=P.nextSibling}rt&&P===be&&t.push({code:"link-adjacent-duplicate",severity:"warning",message:l("a11yc_m_adjlinks","Two links next to each other go to the same place, so it is announced twice. Combine them into one link."),path:"document.link["+ue+"]",_target:be})}}for(var h=e.querySelectorAll("table"),xe=0;xe<h.length;xe++){var ke=h[xe];(ke.getAttribute("role")||"").toLowerCase()!=="presentation"&&(!ke.querySelector("th")||ke.querySelector("caption")||t.push({code:"table-missing-caption",severity:"warning",message:l("a11yc_m_nocaption","Data table has no caption. A short caption lets screen-reader users know what the table is before they enter it."),path:"document.table["+xe+"]",_target:ke}))}}return{document:null,issues:t,valid:!t.length,source:"dom"}}function Fe(e,t){if(!e||!e._target)return M();var r=e._target,a=o.getEditable?o.getEditable():null;if(!r.parentNode||a&&!a.contains(r))return M();if(je(),e.code==="image-missing-alt")r.setAttribute("alt",String(t.altText||"").replace(/^\s+|\s+$/g,""));else if(e.code==="heading-empty")r.textContent=String(t.headingText||"").replace(/^\s+|\s+$/g,"");else if(e.code==="heading-level-skip"){for(var n=Math.max(1,Math.min(6,parseInt(t.targetLevel,10)||2)),i=r.ownerDocument.createElement("h"+n);r.firstChild;)i.appendChild(r.firstChild);Z(r,i),r.parentNode.replaceChild(i,r)}else if(e.code==="table-missing-header")t&&t.markLayout?Ve(r):yt(r);else if(e.code==="layout-table-semantics")Ve(r);else if(e.code==="table-header-empty"){var s=String(t&&t.headerText||"").replace(/^\s+|\s+$/g,"");if(s)r.textContent=s;else if(t&&t.demoteToCell){for(var c=r.ownerDocument.createElement("td");r.firstChild;)c.appendChild(r.firstChild);Z(r,c),c.removeAttribute("scope"),r.parentNode.replaceChild(c,r)}}else if(e.code==="link-empty"||e.code==="link-ambiguous-text"){var d=String(t&&t.linkText||"").replace(/^\s+|\s+$/g,"");if(d){for(var p=r.ownerDocument.createTreeWalker(r,4,null,!1),x,_=[];x=p.nextNode();)/\S/.test(x.data)&&_.push(x);if(!_.length)r.firstChild&&r.firstChild.nodeType===1&&r.appendChild(r.ownerDocument.createTextNode(" ")),r.appendChild(r.ownerDocument.createTextNode(d));else{_[0].data=d;for(var m=1;m<_.length;m++)_[m].data=""}}else{var C=String(t&&t.linkLabel||"").replace(/^\s+|\s+$/g,"");C&&r.setAttribute("aria-label",C)}}else if(e.code==="language-of-parts")pt(r,t&&t.lang?t.lang:e._lang,e._script);else if(e.code==="duplicate-id")r.removeAttribute("id");else if(e.code==="blockquote-as-indent"){for(var S=r.style.marginLeft,T=r.ownerDocument,k=r.parentNode,y=null;r.firstChild;){var h=r.firstChild,w=h.nodeType===1&&/^(P|DIV|H[1-6]|UL|OL|DL|PRE|TABLE|BLOCKQUOTE|FIGURE|ADDRESS|HR|SECTION|ARTICLE|ASIDE|NAV|HEADER|FOOTER|DETAILS|FIELDSET|FORM)$/.test(h.nodeName);if(w){if(y=null,S&&h.nodeName!=="HR"){var A=h.style.marginLeft,R=/^([\d.]+)px$/.exec(A||""),N=/^([\d.]+)px$/.exec(S);h.style.marginLeft=A?R&&N?parseFloat(R[1])+parseFloat(N[1])+"px":"calc("+S+" + "+A+")":S}k.insertBefore(h,r);continue}if(h.nodeType===3&&!/\S/.test(h.data)&&!y){r.removeChild(h);continue}y||(y=T.createElement("p"),S&&(y.style.marginLeft=S),k.insertBefore(y,r)),y.appendChild(h)}k.removeChild(r)}else if(e.code==="paragraph-as-heading"){var D=Math.max(1,Math.min(6,parseInt(t&&t.targetLevel,10)||2)),E=r.ownerDocument.createElement("h"+D);E.textContent=(r.textContent||"").replace(/^\s+|\s+$/g,""),Z(r,E),E.removeAttribute("style"),r.parentNode.replaceChild(E,r)}else if(e.code==="fake-list"){for(var H=r.ownerDocument,J=r.parentNode,ee=/^\d/.test((r.textContent||"").replace(/^\s+/,"")),B=H.createElement(ee?"ol":"ul"),L=r;L&&L.nodeName==="P";){var te=(L.textContent||"").replace(/^\s+/,""),re=ee?/^\d{1,3}[.)]\s+([\s\S]*)$/.exec(te):/^[-*\u2022\u25aa\u25cf]\s+([\s\S]*)$/.exec(te);if(!re)break;var ae=H.createElement("li");ae.textContent=re[1].replace(/\s+$/,""),B.appendChild(ae);var K=L.nextElementSibling;L.parentNode.removeChild(L),L=K}L&&L.parentNode===J?J.insertBefore(B,L):J.appendChild(B)}else if(e.code==="table-missing-caption"){var F=String(t&&t.captionText||"").replace(/^\s+|\s+$/g,"");if(F){var ne=r.ownerDocument.createElement("caption");ne.textContent=F,r.insertBefore(ne,r.firstChild)}}else if(e.code==="link-adjacent-duplicate"){for(var z=r.previousSibling;z&&z.nodeType!==1;)z=z.previousSibling;if(z&&z.nodeName==="A"){for(;r.firstChild;)z.appendChild(r.firstChild);r.parentNode.removeChild(r)}}else(e.code==="image-alt-filename"||e.code==="image-alt-too-long")&&r.setAttribute("alt",String(t&&t.altText||"").replace(/^\s+|\s+$/g,""));return v=0,ft(),vt(),M()}function ft(){try{o.recordUndo?o.recordUndo():o.notifySelectionChange&&o.notifySelectionChange(),o.commitBookmark&&o.commitBookmark()}catch{}je()}function je(){if(typeof o.commitBookmark=="function")try{o.commitBookmark()}catch{}}function pt(e,t,r){if(!(!e||!t)){for(var a=null,n=0;n<$.length;n++)$[n].name===r&&(a=$[n]);if(a){for(var i=e.ownerDocument,s=o.getEditable?o.getEditable():null,c=t==="he"||t==="ar"||t==="fa"||t==="ur",d=i.createTreeWalker(e,4,null,!1),p=[],x;x=d.nextNode();)Be(x,s)||p.push(x);for(var _=0;_<p.length;_++){for(var m=p[_],C=m.nodeValue||"",S=new RegExp("(?:"+a.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`+a.re.source+"(?:"+a.re.source+`|[\\s.,;:!?'"()\\u2010-\\u2027\\u00AB\\u00BB\\u201C\\u201D])*`,"g"),T=i.createDocumentFragment(),k=0,y,h=!1;y=S.exec(C);){var w=y[0],A=w.length-w.replace(/^[\s.,;:!?'"()\u2010-\u2027\xab\xbb\u201c\u201d]+/,"").length,R=w.length-w.replace(/[\s.,;:!?'"()\u2010-\u2027\xab\xbb\u201c\u201d]+$/,"").length,N=y.index+A,D=y.index+w.length-R;if(!(D-N<Oe)){N>k&&T.appendChild(i.createTextNode(C.slice(k,N)));var E=i.createElement("span");E.setAttribute("lang",t),c&&E.setAttribute("dir","rtl"),E.appendChild(i.createTextNode(C.slice(N,D))),T.appendChild(E),k=D,h=!0,S.lastIndex===y.index&&S.lastIndex++}}h&&(k<C.length&&T.appendChild(i.createTextNode(C.slice(k))),m.parentNode.replaceChild(T,m))}}}}function yt(e){var t=e&&e.rows&&e.rows.length?e.rows[0]:null;if(t)for(var r=e.ownerDocument,a=0;a<t.cells.length;a++){var n=t.cells[a];if(!(!n||String(n.nodeName||"").toLowerCase()==="th")){for(var i=r.createElement("th");n.firstChild;)i.appendChild(n.firstChild);Z(n,i),i.setAttribute("scope","col"),t.replaceChild(i,n)}}}function Ue(e){if(!e)return null;var t=String(e).trim(),r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);if(r){var a=r[1];return a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}var n=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(t);return n?[Math.round(+n[1]),Math.round(+n[2]),Math.round(+n[3])]:null}function ht(e){for(var t=e;t&&t.style;){var r=Ue(t.style.backgroundColor);if(r)return{rgb:r,assumed:!1};t=t.parentElement}return{rgb:[255,255,255],assumed:!0}}function Pe(e){var t=[e[0],e[1],e[2]].map(function(r){return r=r/255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)});return .2126*t[0]+.7152*t[1]+.0722*t[2]}function gt(e,t){var r=Pe(e),a=Pe(t),n=Math.max(r,a),i=Math.min(r,a);return(n+.05)/(i+.05)}function mt(e){var t=e.style||{},r=String(t.fontSize||""),a=null,n=/^([\d.]+)(px|pt)$/i.exec(r.trim());if(n&&(a=n[2].toLowerCase()==="pt"?parseFloat(n[1]):parseFloat(n[1])*.75),a===null){var i=(e.tagName||"").toLowerCase();return!!/^h[1-3]$/.test(i)}var s=/bold|^[6-9]00$/.test(String(t.fontWeight||""));return a>=18||a>=14&&s}function Ae(e){if(!e)return"";var t=function(d){return String(d||"").replace(/^\s+|\s+$/g,"")},r=t(e.getAttribute&&e.getAttribute("aria-label"));if(r)return r;var a=t(e.textContent);if(a)return a;var n=t(e.getAttribute&&e.getAttribute("title"));if(n)return n;if(e.querySelectorAll)for(var i=e.querySelectorAll("img"),s=0;s<i.length;s++){var c=t(i[s].getAttribute("alt"));if(c)return c}return""}function Ve(e){if(e){if(o&&typeof o.setTableLayoutMode=="function")try{o.setTableLayoutMode("layout",e);return}catch{}e.setAttribute("role","presentation"),e.removeAttribute("summary");var t=e.querySelector("caption");t&&t.parentNode===e&&t.parentNode.removeChild(t);for(var r=e.querySelectorAll("th,[scope]"),a=0;a<r.length;a++){var n=r[a];if(!(n.closest&&n.closest("table")!==e)&&(n.removeAttribute("scope"),n.removeAttribute("headers"),String(n.nodeName||"").toLowerCase()==="th")){for(var i=e.ownerDocument.createElement("td");n.firstChild;)i.appendChild(n.firstChild);Z(n,i),i.removeAttribute("scope"),n.parentNode.replaceChild(i,n)}}}}function Z(e,t){if(!(!e||!t||!e.attributes))for(var r=0;r<e.attributes.length;r++){var a=e.attributes[r];!a||!a.name||t.setAttribute(a.name,a.value)}}function vt(){try{o&&typeof o.fireEvent=="function"&&o.fireEvent("change")}catch{}try{o&&typeof o.fireEvent=="function"&&o.fireEvent("contentchange")}catch{}}function fe(e){return String(e&&(e.innerText||e.textContent)||"").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}function Je(){X();for(var e=g&&g.issues?g.issues:[];V.firstChild;)V.removeChild(V.firstChild);var t=b.querySelector("[data-rte-a11y-count]");t&&(t.innerText=e.length?e.length===1?l("a11yc_count1","{0} issue to review",1):l("a11yc_countn","{0} issues to review",e.length):l("a11yc_ready","Ready to publish")),Q.style.display=e.length?"none":"block";for(var r=0;r<e.length;r++)(function(a,n){var i=b.ownerDocument.createElement("button");i.type="button",i.className="rte-a11y-item"+(n===v?" is-active":""),i.setAttribute("aria-selected",n===v?"true":"false"),i.innerHTML='<div class="rte-a11y-item-top"><span class="rte-a11y-badge rte-a11y-badge-'+a.severity+'"></span><span class="rte-a11y-code">'+a.code+'</span></div><div class="rte-a11y-message"></div>',i.querySelector(".rte-a11y-message").innerText=a.message,i.querySelector(".rte-a11y-badge").innerText=l("a11yc_sev_"+a.severity,a.severity),i.onclick=function(){v=n,I(a),Je()},V.appendChild(i)})(e[r],r);bt()}function bt(){for(;u.firstChild;)u.removeChild(u.firstChild);var e=g&&g.issues?g.issues:[];if(!e.length||v<0||!e[v]){u.innerHTML='<div class="rte-a11y-detail-title"></div><div class="rte-a11y-detail-copy"></div>',u.querySelector(".rte-a11y-detail-title").innerText=l("a11yc_nofixes","No fixes pending"),u.querySelector(".rte-a11y-detail-copy").innerText=l("a11yc_nofixeshint","Run the checker again after major content changes to keep headings, image descriptions, and tables in shape.");return}var t=e[v],r=u.ownerDocument.createElement("div");r.className="rte-a11y-detail-title",r.innerText=t.code;var a=u.ownerDocument.createElement("div");if(a.className="rte-a11y-detail-copy",a.innerText=t.message,u.appendChild(r),u.appendChild(a),t.code==="image-missing-alt"){Te(l("a11yc_f_alt","Alt text"),l("a11yc_f_althint","Describe the image for screen-reader users."),function(N){O(v,{altText:N})});return}var n={"table-missing-caption":[l("a11yc_f_caption","Caption"),l("a11yc_f_captionhint",'Say what the table shows, e.g. "Sales by quarter".'),"captionText"],"table-header-empty":[l("a11yc_f_header","Header text"),l("a11yc_f_headerhint","Name the column or row this cell labels."),"headerText"],"link-empty":[l("a11yc_f_link","Link text"),l("a11yc_f_linkhint","Say where the link goes."),"linkText"],"link-ambiguous-text":[l("a11yc_f_link","Link text"),l("a11yc_f_linkambighint",'Say where the link goes, not "click here".'),"linkText"],"image-alt-filename":[l("a11yc_f_alt","Alt text"),l("a11yc_f_altfilehint","Describe what the image shows."),"altText"],"image-alt-too-long":[l("a11yc_f_alt","Alt text"),l("a11yc_f_altlonghint","A short description; keep detail in the text."),"altText"]};if(n[t.code]){var i=n[t.code];Te(i[0],i[1],function(N){var D={};D[i[2]]=N,O(v,D)});return}var s={"fake-list":[l("a11yc_a_list","Make it a list"),function(){return{}}],"paragraph-as-heading":[l("a11yc_a_heading","Make it a heading"),function(){for(var N=1,D=t._target,E=D&&D.ownerDocument?D.ownerDocument.querySelectorAll("h1,h2,h3,h4,h5,h6"):[],H=0;H<E.length;H++)E[H].compareDocumentPosition(D)&4&&(N=parseInt(E[H].nodeName.charAt(1),10));return{targetLevel:Math.min(6,N+1)}}],"layout-table-semantics":[l("a11yc_a_layout","Remove table semantics"),function(){return{}}],"link-adjacent-duplicate":[l("a11yc_a_merge","Merge the links"),function(){return{}}],"duplicate-id":[l("a11yc_a_dupid","Remove the repeated id"),function(){return{}}],"blockquote-as-indent":[l("a11yc_a_indent","Make it indentation"),function(){return{}}]};if(s[t.code]){var c=s[t.code],d=u.ownerDocument.createElement("div");d.className="rte-a11y-row";var p=u.ownerDocument.createElement("button");p.type="button",p.className="rte-a11y-button",p.innerText=c[0],p.onclick=function(){O(v,c[1]())};var x=u.ownerDocument.createElement("button");x.type="button",x.className="rte-a11y-button rte-a11y-button-secondary",x.innerText=l("a11yc_focus","Focus issue"),x.onclick=function(){I(t)},d.appendChild(p),d.appendChild(x),u.appendChild(d);return}if(t.code==="heading-empty"){Te(l("a11yc_f_heading","Heading text"),l("a11yc_f_headinghint","Add a concise heading label before publishing."),function(N){O(v,{headingText:N})});return}if(t.code==="heading-level-skip"){var _=xt(t),m=u.ownerDocument.createElement("div");m.className="rte-a11y-row";var C=u.ownerDocument.createElement("button");C.type="button",C.className="rte-a11y-button",C.innerText=l("a11yc_normalize","Normalize to H{0}",_),C.onclick=function(){O(v,{targetLevel:_})};var S=u.ownerDocument.createElement("button");S.type="button",S.className="rte-a11y-button rte-a11y-button-secondary",S.innerText=l("a11yc_focus","Focus issue"),S.onclick=function(){I(t)},m.appendChild(C),m.appendChild(S),u.appendChild(m);return}if(t.code==="table-missing-header"){var T=u.ownerDocument.createElement("div");T.className="rte-a11y-row";var k=u.ownerDocument.createElement("button");k.type="button",k.className="rte-a11y-button",k.innerText=l("a11yc_promote","Promote first row to headers"),k.onclick=function(){O(v,{})};var y=u.ownerDocument.createElement("button");y.type="button",y.className="rte-a11y-button rte-a11y-button-secondary",y.innerText=l("a11yc_focus","Focus issue"),y.onclick=function(){I(t)},T.appendChild(k),T.appendChild(y),u.appendChild(T);return}if(t.code==="language-of-parts"){var h=u.ownerDocument.createElement("div");h.className="rte-a11y-row";var w=u.ownerDocument.createElement("button");w.type="button",w.className="rte-a11y-button",w.innerText=l("a11yc_markas","Mark as {0}",l("a11yc_script_"+t._lang,t._script)),w.onclick=function(){O(v,{lang:t._lang})};var A=u.ownerDocument.createElement("button");A.type="button",A.className="rte-a11y-button rte-a11y-button-secondary",A.innerText=l("a11yc_focus","Focus issue"),A.onclick=function(){I(t)},h.appendChild(w),h.appendChild(A),u.appendChild(h);return}var R=u.ownerDocument.createElement("div");R.className="rte-a11y-detail-copy",R.innerText=l("a11yc_norepair","This issue is visible here, but does not have an automatic repair action yet."),u.appendChild(R)}function Te(e,t,r){var a=u.ownerDocument.createElement("div");a.className="rte-a11y-field";var n=u.ownerDocument.createElement("div");n.className="rte-a11y-label",n.innerText=e;var i=u.ownerDocument.createElement("input");i.type="text",i.className="rte-a11y-input",i.placeholder=t;var s=u.ownerDocument.createElement("div");s.className="rte-a11y-row";var c=u.ownerDocument.createElement("button");c.type="button",c.className="rte-a11y-button",c.innerText=l("a11yc_applyfix","Apply fix"),c.onclick=function(){var p=String(i.value||"").replace(/^\s+|\s+$/g,"");p&&r(p)};var d=u.ownerDocument.createElement("button");d.type="button",d.className="rte-a11y-button rte-a11y-button-secondary",d.innerText=l("a11yc_focus","Focus issue"),d.onclick=function(){var p=g&&g.issues?g.issues:[];p[v]&&I(p[v])},s.appendChild(c),s.appendChild(d),a.appendChild(n),a.appendChild(i),u.appendChild(a),u.appendChild(s)}function xt(e){var t=(e&&e.path?e.path:"").replace(/\.attrs\.level$/,""),r=o.getJSON?o.getJSON():null;if(!r||!r.content)return 2;var a=0;function n(s,c){if(!s||typeof s.type!="string")return!1;if(c===t)return!0;if(s.type==="heading"&&s.attrs&&typeof s.attrs.level=="number"&&(a=s.attrs.level),!s.content||!s.content.length)return!1;for(var d=0;d<s.content.length;d++)if(n(s.content[d],c+".content["+d+"]"))return!0;return!1}for(var i=0;i<r.content.length&&!n(r.content[i],"content["+i+"]");i++);return Math.max(1,Math.min(6,(a||1)+(a?1:0)))}}
|