editoria11y-1.0.0-alpha8/library/dist/js/ed11y.esm.min.js
library/dist/js/ed11y.esm.min.js
/*!
* Editoria11y accessibility checker.
* @version 3.0.0-dev092225
* @author John Jameson
* @license GPL-2.0
* @copyright 2025 The Trustees of Princeton University.
* @contact jjameson@princeton.edu
* GitHub: https://github.com/itmaybejj/editoria11y
* The above copyright notice shall be included in all copies or substantial portions of the Software.
*
* Acknowledgements:
* Icons from Font Awesome by Dave Gandy, http://fontawesome.io, Font Awesome license: CC BY 3.0, URL: http://creativecommons.org/licenses/by/3.0/
*
* Rulesets co-developed with Sa11y under shared license:
* Sa11y, the accessibility quality assurance assistant.
* @version 4.4.0-dev
* @author Adam Chaboryk
* @license GPL-2.0-or-later
* @copyright 2020 - 2025 Toronto Metropolitan University.
* @contact adam.chaboryk@torontomu.ca
* GitHub: git+https://github.com/ryersondmp/sa11y.git | Website: https://sa11y.netlify.app
* For all acknowledgements, please visit: https://sa11y.netlify.app/acknowledgements/
* The above copyright notice shall be included in all copies or substantial portions of the Software.
**/
const e={langStrings:{},addI18n(e){this.langStrings=e},_(e){return this.translate(e)},sprintf(e,...t){let n=this._(e);return n=this.prepHTML(n),t&&t.length&&t.forEach(e=>{n=n.replace(/%\([a-zA-z]+\)/,e)}),n},translate(e){return this.langStrings[e]||e},prepHTML:t=>t.replaceAll(/<hr>/g,'<hr aria-hidden="true">').replaceAll(/<a[\s]href=/g,'<a target="_blank" rel="noopener noreferrer" href=').replaceAll(/<\/a>/g,`<span class="visually-hidden"> (${e._("NEW_TAB")})</span></a>`).replaceAll(/{C}/g,'class="colour"').replaceAll(/{B}/g,'class="badge"').replaceAll(/{ALT}/g,`<strong class="badge">${e._("ALT")}</strong>`).replaceAll(/{L}/g,`<strong class="badge"><span class="link-icon"></span><span class="visually-hidden">${e._("LINKED")}</span></strong>`)};function t(){const e=document.querySelector("sa11y-control-panel").shadowRoot,t=e.getElementById("panel-alert"),n=e.getElementById("panel-alert-text"),s=e.getElementById("panel-alert-preview");for(t.classList.remove("active"),s.classList.remove("panel-alert-preview");n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)s.removeChild(s.firstChild)}function n(e,n,s){t();const i=document.querySelector("sa11y-control-panel").shadowRoot,o=i.getElementById("panel-alert"),l=i.getElementById("panel-alert-text"),r=i.getElementById("panel-alert-preview"),a=i.getElementById("close-alert"),c=i.getElementById("skip-button");o.classList.add("active"),l.innerHTML=e;const d=s?`<div class="element-preview">${s}</div>`:"";function h(){t();(c.hasAttribute("disabled")?i.getElementById("toggle"):c).focus()}n&&(r.classList.add("panel-alert-preview"),r.innerHTML=`${d}<div class="preview-message">${n}</div>`),setTimeout(()=>a.focus(),300),a.addEventListener("click",h),o.onkeydown=e=>{"Escape"===(e||window.event).key&&o.classList.contains("active")&&h()}}const s=function(){const t={};const i={};const o={};const l={};const r={};return{initializeRoot:function(o,l,r){if(i.areaToCheck=[],i.Readability=[],r)return i.areaToCheck=r,void(i.Readability=r);try{const e=document.querySelectorAll(o);e.length>0?e.forEach(e=>{s.Root.areaToCheck.push(e)}):console.error(`Sa11y: The target root (${o}) does not exist.`)}catch{i.areaToCheck.length=0}0===i.areaToCheck.length&&!1===t.headless&&(n(e.sprintf("MISSING_ROOT",o)),i.areaToCheck.push(document.body));try{const e=document.querySelectorAll(l);e.length>0?e.forEach(e=>{s.Root.Readability.push(e)}):console.error(`Sa11y: The target readability root (${l}) does not exist.`)}catch{i.Readability.length=0}0===i.Readability.length&&!1===t.headless&&(0===i.areaToCheck.length?i.Readability.push(document.body):(i.Readability=i.areaToCheck,setTimeout(()=>{const{readabilityDetails:t,readabilityToggle:n}=s.Panel,o="true"===n?.getAttribute("aria-pressed"),r=s.Panel.readability.querySelector("#readability-alert");if(t&&o&&!r){const n=i.areaToCheck.map(e=>e.id?`#${e.id}`:e.className?`.${e.className.split(/\s+/).filter(Boolean).join(".")}`:e.tagName.toLowerCase()).join(", "),s=document.createElement("div");s.id="readability-alert",s.innerHTML=`<hr><p>${e.sprintf("MISSING_READABILITY_ROOT",n,l)}</p>`,t.insertAdjacentElement("afterend",s)}},100)))},Root:i,initializeGlobal:function(e){t.html=document.querySelector("html"),t.headless=e.headless,t.panelPosition=e.panelPosition,t.dismissAnnotations=e.dismissAnnotations,t.aboutContent=e.aboutContent,t.contrastAPCA=e.contrastAPCA,t.contrastSuggestions=e.contrastSuggestions,t.contrastAAA=e.contrastAAA,t.shadowDetection=e.shadowComponents.length>0||!0===e.autoDetectShadowComponents,t.fixedRoots=e.fixedRoots,t.ignoreAriaOnElements=e.ignoreAriaOnElements,t.ignoreTextInElements=e.ignoreTextInElements,t.developerPlugin=e.developerPlugin,t.colourFilterPlugin=e.colourFilterPlugin,t.checkAllHideToggles=e.checkAllHideToggles,t.exportResultsPlugin=e.exportResultsPlugin,t.readabilityPlugin=e.readabilityPlugin,t.showImageOutline=e.showImageOutline,t.editImageURLofCMS=e.editImageURLofCMS,t.relativePathImageSRC=e.relativePathImageSRC,t.relativePathImageID=e.relativePathImageID,t.ignoreEditImageURL=e.ignoreEditImageURL,t.ignoreEditImageClass=e.ignoreEditImageClass,t.showMovePanelToggle=e.showMovePanelToggle;let n=!1;"function"==typeof window.matchMedia&&(n=window.matchMedia("(prefers-reduced-motion: reduce)")),t.scrollBehaviour=!n||n.matches?"auto":"smooth",t.langDirection="rtl"===t.html.getAttribute("dir")?"rtl":"ltr";const s=e.checks.QA_DOCUMENT.sources,i='a[href$=".doc"], a[href$=".docx"], a[href*=".doc?"], a[href*=".docx?"], a[href$=".ppt"], a[href$=".pptx"], a[href*=".ppt?"], a[href*=".pptx?"], a[href^="https://drive.google.com/file"], a[href^="https://docs.google."], a[href^="https://sway."]';t.documentSources=s?`${i}, ${s}`:i;const o=e.checks.EMBED_VIDEO.sources,l='video, [src*="Video"], [src*="video"], [src*="watch"], [src*="youtube.com"], [src*="vimeo.com"], [src*="panopto.com"], [src*="wistia.com"], [src*="dailymotion.com"], [src*="brightcove.com"], [src*="vidyard.com"]';if(o){const e=o.split(/\s*[\s,]\s*/).map(e=>`[src*="${e}"]`);t.VideoSources=`${l}, ${e.join(", ")}`}else t.VideoSources=l;const r=e.checks.EMBED_AUDIO.sources,a='audio, [src*="soundcloud.com"], [src*="simplecast.com"], [src*="podbean.com"], [src*="buzzsprout.com"], [src*="blubrry.com"], [src*="transistor.fm"], [src*="fusebox.fm"], [src*="libsyn.com"], [src*="spotify.com"], [src*="podcasts.apple.com"], [src*="castbox.fm"], [src*="megaphone.fm"], [src*="spreaker.com"], [src*="anchor.fm"], [src*="rss.com"], [src*="redcircle.com"]';if(r){const e=r.split(/\s*[\s,]\s*/).map(e=>`[src*="${e}"]`);t.AudioSources=`${a}, ${e.join(", ")}`}else t.AudioSources=a;const c=e.checks.EMBED_DATA_VIZ.sources,d='[src*="datastudio"], [src*="tableau"], [src*="lookerstudio"], [src*="powerbi"], [src*="qlik"]';if(c){const e=c.split(/\s*[\s,]\s*/).map(e=>`[src*="${e}"]`);t.VisualizationSources=`${d}, ${e.join(", ")}`}else t.VisualizationSources=d;t.AllEmbeddedContent=`${t.VideoSources}, ${t.AudioSources}, ${t.VisualizationSources}`},Global:t,initializePanelSelectors:function(){const e=document.querySelector("sa11y-control-panel").shadowRoot;o.panel=e.getElementById("panel"),o.content=e.getElementById("panel-content"),o.controls=e.getElementById("panel-controls"),o.outline=e.getElementById("outline-panel"),o.outlineContent=e.getElementById("outline-content"),o.outlineList=e.getElementById("outline-list"),o.outlineHeader=e.getElementById("outline-header"),o.images=e.getElementById("images-panel"),o.imagesContent=e.getElementById("images-content"),o.imagesList=e.getElementById("images-list"),o.imagesHeader=e.getElementById("images-header"),o.notifBadge=e.getElementById("notification-badge"),o.notifCount=e.getElementById("notification-count"),o.notifText=e.getElementById("notification-text"),o.status=e.getElementById("status"),o.pageIssues=e.getElementById("page-issues"),o.pageIssuesList=e.getElementById("page-issues-list"),o.pageIssuesHeader=e.getElementById("page-issues-header"),o.pageIssuesContent=e.getElementById("page-issues-content"),o.settings=e.getElementById("settings-panel"),o.settingsHeader=e.getElementById("settings-header"),o.settingsContent=e.getElementById("settings-content"),o.developerToggle=e.getElementById("developer-toggle"),o.readabilityToggle=e.getElementById("readability-toggle"),o.themeToggle=e.getElementById("theme-toggle"),o.developerItem=e.getElementById("developer-item"),o.readabilityItem=e.getElementById("readability-item"),o.darkModeItem=e.getElementById("dark-mode-item"),o.colourPanel=e.getElementById("panel-colour-filters"),o.colourFilterItem=e.getElementById("colour-filter-item"),o.colourFilterSelect=e.getElementById("colour-filter-select"),o.colourFilterIcon=e.getElementById("filter-icon"),o.toggle=e.getElementById("toggle"),o.outlineToggle=e.getElementById("outline-toggle"),o.imagesToggle=e.getElementById("images-toggle"),o.settingsToggle=e.getElementById("settings-toggle"),o.movePanelToggle=e.getElementById("move-panel"),o.skipButton=e.getElementById("skip-button"),o.dismissButton=e.getElementById("dismiss-button"),o.dismissTooltip=e.getElementById("dismiss-tooltip"),o.skipToPageIssues=e.getElementById("skip-to-page-issues"),o.exportHTML=e.getElementById("export-html"),o.exportCSV=e.getElementById("export-csv"),o.alert=e.getElementById("panel-alert"),o.alertText=e.getElementById("panel-alert-text"),o.alertPreview=e.getElementById("panel-alert-preview"),o.alertClose=e.getElementById("close-alert"),o.readability=e.getElementById("readability-panel"),o.readabilityInfo=e.getElementById("readability-info"),o.readabilityDetails=e.getElementById("readability-details")},Panel:o,initializeReadability:function(t){if(t.readabilityPlugin){l.Lang=e._("LANG_CODE").substring(0,2);const t=["en","fr","es","de","nl","it","sv","fi","da","no","nb","nn","pt"],n=s.Global.html.getAttribute("lang");if(n){const e=n.toLowerCase().substring(0,2);t.includes(e)&&t.includes(l.Lang)?l.Plugin=!0:l.Plugin=!1}else l.Plugin=!1}},Readability:l,initializeExclusions:function(e){r.Sa11yElements=["sa11y-heading-label","sa11y-heading-anchor","sa11y-annotation","sa11y-tooltips","sa11y-panel-tooltips","sa11y-control-panel","#sa11y-colour-filters","#sa11y-colour-filters *"];const t=["style","script","noscript"];if(r.Container=["#wpadminbar","#wpadminbar *",...t],e.containerIgnore){const t=e.containerIgnore.split(",").map(e=>e.trim());r.Container=r.Container.concat(t.flatMap(e=>[`${e} *`,e]))}r.Contrast=["link","hr","option","audio","audio *","video","video *",'input[type="color"]','input[type="range"]',"progress","progress *","meter","meter *","iframe","svg title","svg desc",...t],e.contrastIgnore&&(r.Contrast=e.contrastIgnore.split(",").map(e=>e.trim()).flatMap(e=>[e,`${e} *`]).concat(r.Contrast)),r.Readability=["nav li",'[role="navigation"] li',...t],e.readabilityIgnore&&(r.Readability=e.readabilityIgnore.split(",").map(e=>e.trim()).flatMap(e=>[e,`${e} *`]).concat(r.Readability)),r.Headings=e.headerIgnore?e.headerIgnore.split(",").map(e=>e.trim()):[],r.HeaderSpan=e.headerIgnoreSpan?e.headerIgnoreSpan.split(",").map(e=>e.trim()):[],r.Outline=e.outlineIgnore?e.outlineIgnore.split(",").map(e=>e.trim()):[],r.Images=['img[role="presentation"]:not(a img[role="presentation"]), img[aria-hidden="true"]:not(a img[aria-hidden="true"])'],e.imageIgnore&&(r.Images=e.imageIgnore.split(",").map(e=>e.trim()).concat(r.Images)),r.Links=[".anchorjs-link"],e.linkIgnore&&(r.Links=e.linkIgnore.split(",").map(e=>e.trim()).concat(r.Links)),r.LinkSpan=e.linkIgnoreSpan?e.linkIgnoreSpan.split(",").map(e=>e.trim()):[]},Exclusions:r}}(),i=(e,t)=>{const n=e=>{if("none"===e)return"";const t=e.includes("url(")||e.includes("image-set(")?e.match(/\/\s*"([^"]+)"/):e.match(/"([^"]+)"/);return t?t[1]:""};return`${n(window.getComputedStyle(e,":before").getPropertyValue("content"))}${t}${n(window.getComputedStyle(e,":after").getPropertyValue("content"))}`},o=e=>{for(let t=0;t<1e3;t++){if(e.nextSibling())return e.previousNode();if(!e.parentNode())return!1}return!1},l=(e,t=!1)=>{if(s.Global.ignoreAriaOnElements&&e.matches(s.Global.ignoreAriaOnElements))return"noAria";if(s.Global.ignoreTextInElements&&e.matches(s.Global.ignoreTextInElements))return"";const n=e.getAttribute("aria-labelledby");if(!t&&n)return n.split(/\s+/).filter(e=>e.trim()).map(e=>{const t=document.querySelector(`#${CSS.escape(e)}`);return t?r(t,"",1):""}).join(" ");const{ariaLabel:i}=e;return i&&i.trim().length>0?i:"noAria"},r=(e,t=[],n=0)=>{const s=l(e,n);if("noAria"!==s)return s;let a="";if(!e.children.length)return a=i(e,e.textContent),!a.trim()&&e.hasAttribute("title")?e.getAttribute("title"):a;const c=(d=e,h=!0,p=!0,document.createTreeWalker(d,NodeFilter.SHOW_ALL,{acceptNode:e=>h&&e.nodeType===Node.ELEMENT_NODE||p&&e.nodeType===Node.TEXT_NODE?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}));var d,h,p;const u=[...t,"noscript","style","script","video","audio"].join(", "),m=u?e.querySelectorAll(u):[];let E=!1,g=!1,A=0,_=!0;for(;c.nextNode()&&_;){A+=1;const e=c.currentNode;if(Array.from(m).some(t=>t.contains(e)))continue;if(e.shadowRoot){const s=e.shadowRoot.querySelectorAll("*");for(let e=0;e<s.length;e++){const i=s[e];u&&i.closest(u)||(a+=r(i,t,n+1))}}if(e.nodeType===Node.TEXT_NODE){"SLOT"!==e.parentNode.tagName&&(a+=` ${e.nodeValue}`);continue}if(E&&!e.closest("a")&&(g===a&&(a+=E),E=!1,g=!1),"true"===e.ariaHidden&&!(n&&A<3)){o(c)||(_=!1);continue}const s=l(e,n);if("noAria"===s)switch(e.tagName){case"IMG":e.hasAttribute("alt")&&"presentation"!==e.role&&(a+=e.getAttribute("alt"));break;case"SVG":if("img"===e.role||"graphics-document"===e.role)a+=l(e);else{const t=e.querySelector("title");t&&(a+=t.textContent)}break;case"A":e.hasAttribute("title")?(E=e.getAttribute("title"),g=a):(E=!1,g=!1),a+=i(e,"");break;case"INPUT":a+=i(c.currentNode,""),c.currentNode.hasAttribute("title")&&(E=c.currentNode.getAttribute("title"));break;case"SLOT":{const t=e.assignedNodes?.()||[];let n="";t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE?n+=r(e):e.nodeType===Node.TEXT_NODE&&(n+=e.nodeValue)}),a+=n,a+=i(e,"");break}default:a+=i(e,"")}else a+=` ${s}`,o(c)||(_=!1)}return E&&!g&&(a+=` ${E}`),a=a.replace(/[\uE000-\uF8FF]/gu,""),!a.trim()&&e.hasAttribute("title")?e.getAttribute("title"):a};function a(e,t,n){const i=[];"document"===t?(i.push(document.body),s.Global.fixedRoots&&i.push(s.Global.fixedRoots)):"root"===t?i.push(s.Root.areaToCheck):i.push(document.querySelectorAll(t));const o=s.Exclusions.Container.join(", "),l=n?.join(", ")||"",r=l?`, ${l}`:"";let a=[];return i.flat().filter(Boolean)?.forEach(t=>{const n=t?.querySelectorAll("[data-sa11y-has-shadow-root]"),s=n?", [data-sa11y-has-shadow-root]":"",i=Array.from(t.querySelectorAll(`:is(${e}${s}):not(${o}${r})`));if(n.length){const t=[];if(i.forEach((n,s)=>{n&&n.matches&&n.matches("[data-sa11y-has-shadow-root]")&&n.shadowRoot&&(t[s]=n.shadowRoot.querySelectorAll(`:is(${e}):not(${o}${r})`))}),t.length>0)for(let e=t.length-1;e>=0;e--)t[e]&&i.splice(e,1,...t[e])}a=a.concat(i.filter(e=>"SLOT"!==e.parentNode.tagName))}),a}function c(e){const t=getComputedStyle(e);if(t.getPropertyValue("clip-path").startsWith("inset(50%)"))return!0;if("rect(1px, 1px, 1px, 1px)"===t.clip||"rect(0px, 0px, 0px, 0px)"===t.clip)return!0;const n=parseInt(t.textIndent,10);return!Number.isNaN(n)&&Math.abs(n)>5e3||("hidden"===t.overflow&&parseFloat(t.width)<2&&parseFloat(t.height)<2||(!("absolute"!==t.position||!["left","right","top","bottom"].some(e=>Math.abs(parseInt(t[e],10))>5e3))||parseFloat(t.fontSize)<2))}function d(e){return e.hidden||"none"===getComputedStyle(e).getPropertyValue("display")}function h(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML.replaceAll('"',""").replaceAll("'","'").replaceAll("`","`")}function p(e){return e.replace(/[^\w. ]/gi,e=>`&#${e.charCodeAt(0)};`)}function u(e,t=!1){const n=document.createElement("div");n.innerHTML=e,["script","style","noscript","iframe","form"].forEach(e=>{const t=n.getElementsByTagName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])});return Array.from(n.getElementsByTagName("*")).forEach(e=>{Array.from(e.attributes).forEach(t=>{t.name.startsWith("on")&&e.removeAttribute(t.name)}),t||e.removeAttribute("style")}),n.innerHTML}function m(e,t=[]){const n=["noscript","script","style","audio","video","form","iframe",...t].join(", "),s=e.cloneNode(!0);return Array.from(s.querySelectorAll(n)).forEach(e=>{e.parentElement.removeChild(e)}),s}function E(e){return m(e).textContent.replace(/[\r\n]+/g,"").replace(/\s+/g," ").trim()}function g(e){return e.replace(/[\r\n]+/g," ").replace(/\s+/g," ").trim()}function A(e,t){const n=e.substring(0,t).trimEnd();return e.length>t?`${n}...`:e}const _={getItem(e){try{return null===localStorage.getItem(e)?sessionStorage.getItem(e):localStorage.getItem(e)}catch(e){return!1}},setItem(e,t){try{localStorage.setItem(e,t)}catch(n){sessionStorage.setItem(e,t)}return!0},removeItem(e){try{localStorage.removeItem(e)}catch(t){sessionStorage.removeItem(e)}return!0}};function T(e){return String(e).replace(/([^0-9a-zA-Z])/g,"").substring(0,256)}function L(e){const t=e=>e?.split(/,\s+/).pop()?.trim()?.split(/\s+/)[0],n=e=>e?new URL(e,window.location.href).href:null,s=t(e.getAttribute("data-src")||e.getAttribute("srcset"));if(s)return n(s);const i=e.closest("picture")?.querySelector("source[srcset]")?.getAttribute("srcset"),o=t(i);return n(o||e.getAttribute("src"))}function f(e){let t="";const n=r(e).toLowerCase();e.childNodes.forEach(e=>{var n;e.nodeType===Node.TEXT_NODE?t+=e.textContent:e.nodeType===Node.ELEMENT_NODE&&(0===(n=e).offsetWidth&&0===n.offsetHeight||1===n.clientHeight&&1===n.clientWidth||d(n)||(t+=e.textContent))});let s=t.replace(/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu,"");return s=g(s).toLowerCase(),"x"!==s&&(0!==s.length&&!n.includes(s))}const y={version:"3.0.0",english:!0,running:!1,watching:[],seen:[],ignore:"",ignoreAll:!1,totalCount:1,warningCount:1,errorCount:1,dismissedCount:1,dismissedAlerts:{},activeRange:!1,inlineAlerts:!1,incremental:!1,interaction:!1,forceFullCheck:!1,browserSpeed:1,browserLag:1,customTestsRemaining:0,customTestTimeout:0,loopStop:!1,oldResults:[],roots:[],headingOutline:[],headingOutlineOverrides:[],elements:{altMark:[],delayedReset:[]},splitConfiguration:{active:!1,checks:[],results:[],showOptions:{},syncOptions:{}},once:!1,disabled:!1,onLoad:!0,open:!1,showPanel:!1,showDismissed:!1,nextText:"",panelAttachTo:document.body,visualizing:!1,jumpList:[],lastOpenTip:Number-1,viaJump:!1,toggledFrom:!1,scrollPending:0,scrollTicking:!1,tipOpen:!1,openTip:{button:{},tip:{}},positionedFrames:[],recentlyAddedNodes:new WeakMap},I={},N={editableHighlight:[],imageAlts:[],attachCSS:()=>{},panel:!1,message:{},panelElement:{},panelNoCover:[],panelToggle:{},panelToggleTitle:{},panelCount:{},panelJumpNext:{},panelShowDismissed:{}},S=[],b={checkRoot:!1,fixedRoots:!1,containerIgnore:"",contrastIgnore:".sr-only",outlineIgnore:"",headerIgnore:"",headerIgnoreSpan:"ed11y-element-heading-label",headerIgnoreStrings:"",imageIgnore:'img[aria-hidden], [aria-hidden] img, img[role="presentation"], a[href][aria-label] img, button[aria-label] img, a[href][aria-labelledby] img, button[aria-labelledby] img',linkIgnore:'[aria-hidden][tabindex="-1"]',linkIgnoreSpan:".ed11y-element",linkIgnoreStrings:"",ignoreContentOutsideRoots:!1,panelPosition:"right",developerChecksOnByDefault:!1,showHinPageOutline:!1,showTitleInPageOutline:!1,showImageOutline:!0,editImageURLofCMS:"",relativePathImageSRC:"",relativePathImageID:"",ignoreEditImageURL:[],ignoreEditImageClass:[],delayCheck:0,delayCustomCheck:500,detectSPArouting:!1,doNotRun:"",headless:!1,selectorPath:!1,shadowComponents:"",autoDetectShadowComponents:!1,showGoodImageButton:!0,showGoodLinkButton:!0,dismissAnnotations:!0,dismissAll:!0,ignoreHiddenOverflow:"",insertAnnotationBefore:"",readabilityPlugin:!1,readabilityRoot:"main",readabilityIgnore:"",contrastPlugin:!1,contrastAAA:!1,contrastAPCA:!1,customChecks:!1,linksAdvancedPlugin:!0,formLabelsPlugin:!0,embeddedContentPlugin:!0,developerPlugin:!1,externalDeveloperChecks:!1,colourFilterPlugin:!1,exportResultsPlugin:!1,ignoreAriaOnElements:!1,ignoreTextInElements:!1,susAltStopWords:"",linkStopWords:"",extraPlaceholderStopWords:"",imageWithinLightbox:"",initialHeadingLevel:[],syncOnlyConfiguration:!1,alertMode:"userPreference",inlineAlerts:!0,watchForChanges:"checkRoots",editableContent:'[contenteditable="true"]:not(.gutenberg__editor [contenteditable]), .gutenberg__editor .run-run-skeleton__content',currentPage:window.location.pathname,allowHide:!0,allowOK:!0,syncedDismissals:!1,reportsURL:!1,showDismissed:!1,ignoreAllIfAbsent:!1,ignoreAllIfPresent:!1,preventCheckingIfPresent:!1,preventCheckingIfAbsent:!1,checkVisible:!0,hiddenHandlers:"",panelOffsetX:"25px",panelOffsetY:"25px",panelNoCover:"",panelAttachTo:document.body,constrainButtons:!1,theme:"sleekTheme",sleekTheme:{bg:"#eff2ff",bgHighlight:"#7b1919",text:"#20160c",primary:"#276499",primaryText:"#eff2ff",button:"transparent",panelBar:"#1e517c",panelBarText:"#fffdf7",panelBarShadow:"0 0 0 1px #276499",activeTab:"#276499",activeTabText:"#fffffe",focusRing:"#007aff",outlineWidth:"0",borderRadius:"3px",ok:"#1f5381",warning:"rgb(250, 216, 89)",warningText:"#20160c",alert:"rgb(184, 5, 25)",alertText:"#f4f7ff"},darkTheme:{bg:"#0a2051",bgHighlight:"#7b1919",text:"#f4f7ff",primary:"#3052a0",primaryText:"#f4f7ff",button:"transparent",panelBar:"#3052a0",panelBarText:"#f4f7ff",panelBarShadow:"inset 0 0 1px, 0 0 0 1px #0a2051",activeTab:"#0a2051",activeTabText:"#fffffe",focusRing:"cyan",outlineWidth:"2px",borderRadius:"3px",ok:"#0a307a",warning:"rgb(250, 216, 89)",warningText:"#20160c",alert:"rgb(184, 5, 25)",alertText:"#f4f7ff"},lightTheme:{bg:"#fffffe",bgHighlight:"#7b1919",text:"#20160c",primary:"#0a307a",primaryText:"#fffdf7",panelBar:"#0a307a",panelBarText:"#f4f7ff",panelBarShadow:"0 0 0 1px #0a307a",button:"transparent",activeTab:"#b9c0cf",activeTabText:"#20160c",focusRing:"#007aff",outlineWidth:"0",borderRadius:"3px",ok:"#0a307a",warning:"rgb(250, 216, 89)",warningText:"#20160c",alert:"rgb(184, 5, 25)",alertText:"#f4f7ff"},buttonZIndex:1299,baseFontSize:"clamp(14px, 1.5vw, 16px)",baseFontFamily:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',embeddedContent:!1,embeddedContentTitle:"",embeddedContentMessage:"",linksUrls:!1,linksMeaningless:!1,altPlaceholder:"",editLinks:!1,userPrefersShut:"0"===localStorage.getItem("editoria11yShow"),customTests:0,checks:{HEADING_SKIPPED_LEVEL:{type:"warning"},HEADING_EMPTY_WITH_IMAGE:!0,HEADING_EMPTY:!0,HEADING_FIRST:!0,HEADING_LONG:{maxLength:170},HEADING_MISSING_ONE:!1,MISSING_ALT_LINK:!0,MISSING_ALT_LINK_HAS_TEXT:!0,MISSING_ALT:!0,IMAGE_DECORATIVE_CAROUSEL:!1,LINK_IMAGE_NO_ALT_TEXT:{type:"error"},LINK_IMAGE_TEXT:!1,IMAGE_FIGURE_DECORATIVE:{type:"warning"},IMAGE_DECORATIVE:{type:"warning"},LINK_ALT_FILE_EXT:!0,ALT_FILE_EXT:!0,LINK_PLACEHOLDER_ALT:!0,ALT_PLACEHOLDER:!0,LINK_SUS_ALT:!0,SUS_ALT:!0,LINK_IMAGE_LONG_ALT:{maxLength:250},IMAGE_ALT_TOO_LONG:{maxLength:250},LINK_IMAGE_ALT:!1,LINK_IMAGE_ALT_AND_TEXT:!0,IMAGE_FIGURE_DUPLICATE_ALT:!1,IMAGE_PASS:{dismissAll:!0},ALT_UNPRONOUNCEABLE:!0,LINK_ALT_UNPRONOUNCEABLE:!0,ALT_MAYBE_BAD:{minLength:15},LINK_ALT_MAYBE_BAD:{minLength:15},DUPLICATE_TITLE:!1,LINK_EMPTY_LABELLEDBY:!1,LINK_EMPTY_NO_LABEL:!0,LINK_STOPWORD:{type:"warning"},LINK_STOPWORD_ARIA:!1,LINK_SYMBOLS:!1,LINK_CLICK_HERE:!1,LINK_DOI:!1,LINK_URL:{maxLength:40},LINK_LABEL:{dismissAll:!0},LINK_EMPTY:!0,LINK_IDENTICAL_NAME:!1,LINK_NEW_TAB:{dismissAll:!0},LINK_FILE_EXT:!1,EMBED_AUDIO:{sources:""},EMBED_VIDEO:{sources:""},EMBED_DATA_VIZ:{sources:""},EMBED_UNFOCUSABLE:!0,EMBED_MISSING_TITLE:{type:"warning"},EMBED_GENERAL:!0,QA_BAD_LINK:{sources:""},QA_STRONG_ITALICS:!1,QA_IN_PAGE_LINK:!1,QA_DOCUMENT:!1,QA_PDF:{sources:"a[href$='.pdf'], a[href*='.pdf?']",dismissAll:!0},QA_BLOCKQUOTE:!0,TABLES_MISSING_HEADINGS:!0,TABLES_SEMANTIC_HEADING:!0,TABLES_EMPTY_HEADING:!0,QA_FAKE_HEADING:!0,QA_FAKE_LIST:!0,QA_UPPERCASE:!0,QA_UNDERLINE:!1,QA_SUBSCRIPT:!1,QA_NESTED_COMPONENTS:!1,QA_JUSTIFY:!1,QA_SMALL_TEXT:!1,META_LANG:!1,META_SCALABLE:!1,META_MAX:!1,META_REFRESH:!1,DUPLICATE_ID:!1,META_TITLE:!1,UNCONTAINED_LI:!1,TABINDEX_ATTR:!1,HIDDEN_FOCUSABLE:!1,LABEL_IN_NAME:!1,BTN_EMPTY:!1,BTN_EMPTY_LABELLEDBY:!1,BTN_ROLE_IN_NAME:!1,CONTRAST_WARNING:{dismissAll:!0},CONTRAST_INPUT:!0,CONTRAST_ERROR:!0,CONTRAST_PLACEHOLDER:!0,CONTRAST_PLACEHOLDER_UNSUPPORTED:!0,CONTRAST_ERROR_GRAPHIC:!0,CONTRAST_WARNING_GRAPHIC:!1,CONTRAST_UNSUPPORTED:{dismissAll:!0},HEADING_EXCEEDS_LEVEL:!0,EMBED_CUSTOM:{sources:"#embed"}}},k=function(){const e={};const t={};return{initializeElements:function(t){e.Everything=a("*","root",s.Exclusions.Sa11yElements),e.Contrast=e.Everything.filter(e=>!s.Exclusions.Contrast.some(t=>e.matches(t))&&!s.Exclusions.Contrast.includes(e)),e.Images=e.Everything.filter(e=>"IMG"===e.tagName&&!s.Exclusions.Images.some(t=>e.matches(t))),e.Links=e.Everything.filter(e=>("A"===e.tagName||"a"===e.tagName)&&e.hasAttribute("href")&&!e.matches('[role="button"]')&&!s.Exclusions.Links.some(t=>e.matches(t))),e.Headings=a('h1, h2, h3, h4, h5, h6, [role="heading"][aria-level]',t.ignoreContentOutsideRoots||t.fixedRoots?"root":"document",s.Exclusions.Headings),e.HeadingOne=a('h1, [role="heading"][aria-level="1"]',t.ignoreContentOutsideRoots||t.fixedRoots?"root":"document",s.Exclusions.Headings),e.HeadingOverrideStart=new WeakMap,e.HeadingOverrideEnd=new WeakMap,t.initialHeadingLevel&&t.initialHeadingLevel.forEach(n=>{const i=a(`${n.selector} :is(h1,h2,h3,h4,h5,h6,[aria-role=heading][aria-level])`,t.ignoreContentOutsideRoots||t.fixedRoots?"root":"document",s.Exclusions.Headings);i.length>0&&(e.HeadingOverrideStart.set(i[0],n.previousHeading),e.HeadingOverrideEnd.set(i.pop(),n.previousHeading))}),e.ExcludedHeadings=e.Headings.filter(e=>s.Exclusions.Headings.some(t=>e.matches(t))),e.ExcludedOutlineHeadings=e.Headings.filter(e=>s.Exclusions.Outline.some(t=>e.matches(t))),e.OutlineIgnore=k.Found.ExcludedOutlineHeadings.concat(k.Found.ExcludedHeadings),e.Paragraphs=e.Everything.filter(e=>"P"===e.tagName&&!e.closest("table")),e.Lists=e.Everything.filter(e=>"LI"===e.tagName),e.Blockquotes=e.Everything.filter(e=>"BLOCKQUOTE"===e.tagName),e.Tables=e.Everything.filter(e=>"TABLE"===e.tagName&&!e.matches('[role="presentation"]')&&!e.matches('[role="none"]')),e.StrongItalics=e.Everything.filter(e=>["STRONG","EM"].includes(e.tagName)),e.Subscripts=e.Everything.filter(e=>["SUP","SUB"].includes(e.tagName));const n=t.checks.QA_BAD_LINK.sources;e.CustomErrorLinks=n.length?e.Links.filter(e=>n.split(",").some(t=>e.matches(t.trim()))):[];const i=e=>s.Root.Readability.some(t=>t.contains(e))&&!s.Exclusions.Readability.some(t=>e.matches(t));e.Readability=[...e.Paragraphs.filter(i),...e.Lists.filter(i)];const o=t.checks.QA_NESTED_COMPONENTS.sources||'[role="tablist"], details';e.NestedComponents=o?e.Everything.filter(e=>e.matches(o)):[],e.TabIndex=e.Everything.filter(e=>e.hasAttribute("tabindex")&&"0"!==e.getAttribute("tabindex")&&!e.getAttribute("tabindex").startsWith("-")),e.Svg=e.Everything.filter(e=>"svg"===e.tagName),e.Buttons=e.Everything.filter(e=>"BUTTON"===e.tagName||e.matches('[role="button"]')),e.Inputs=e.Everything.filter(e=>["INPUT","SELECT","TEXTAREA","METER","PROGRESS"].includes(e.tagName)),e.Labels=e.Everything.filter(e=>"LABEL"===e.tagName),e.iframes=e.Everything.filter(e=>["IFRAME","AUDIO","VIDEO"].includes(e.tagName)),e.Videos=e.iframes.filter(e=>e.matches(s.Global.VideoSources)),e.Audio=e.iframes.filter(e=>e.matches(s.Global.AudioSources)),e.Visualizations=e.iframes.filter(e=>e.matches(s.Global.VisualizationSources)),e.EmbeddedContent=e.iframes.filter(e=>!e.matches(s.Global.AllEmbeddedContent));const l=document.querySelector("html");e.Language=l.getAttribute("lang")},Found:e,initializeAnnotations:function(){t.Array=a("sa11y-annotation","document"),t.Array.forEach((e,t)=>{e.setAttribute("data-sa11y-position",t)})},Annotations:t}}();class C extends HTMLElement{constructor(e){super(),this.error=e}connectedCallback(){const t=this.attachShadow({mode:"open"}),n=document.createElement("dialog");n.ariaLabel=e._("ERROR");const s=window.location,i=`## Error Description\n\`\`\`javascript\n${this.error.stack}\n\`\`\`\n\n## Details\n- **URL:** ${s}\n- **Version:** ${y.version}\n\n## Comments\n`,o=`https://github.com/ryersondmp/sa11y/issues/new?title=Bug%20report&body=${encodeURIComponent(i)}`;n.innerHTML=`\n <button class="close-btn" aria-describedby="ed11y-console-error"><span aria-hidden="true">×</span> ${e._("ALERT_CLOSE")}</button>\n <h2 id="ed11y-console-error">${e._("ERROR")}</h2>\n <p>${e.sprintf("CONSOLE_ERROR","https://forms.gle/sjzK9XykETaoqZv99",o)}</p>\n <p><strong>${e._("DEVELOPER_CHECKS")}:</strong></p>\n <pre>\nVersion: ${y.version}\nURL: ${s}</pre>\n \t\t<p><strong>${e._("ERRORS")}:</strong></p>\n<pre>${h(this.error.stack)}</pre>\n `,t.appendChild(n),setTimeout(()=>{n.show();const e=n.querySelector("button");e.style.setProperty("padding","1em;"),e.style.setProperty("filter","invert(1)");const t=n.querySelectorAll(".visually-hidden");t?.forEach(e=>{e.style.setProperty("position","absolute"),e.style.setProperty("width","1px"),e.style.setProperty("height","1px"),e.style.setProperty("overflow","hidden")});n.querySelectorAll("pre").forEach(e=>{e.style.setProperty("margin-left","18px")});n.querySelector(".close-btn").addEventListener("click",()=>{n.close()})},0)}}function w(e,t,n=s.Exclusions.Sa11yElements){return a(e,t,n)}function v(e,t,n=!0){const i=n?"root":"document";k.Found[e]=a(t,i,s.Exclusions.Sa11yElements)}function R(e){if(!y.recentlyAddedNodes.has(e))return!0;const t=e.textContent.trim().length;if(!t&&y.recentlyAddedNodes.get(e)>Date.now()-5e3||y.activeRange&&e.contains(y.activeRange.startContainer))return!1;if(e.matches("table")&&e.querySelectorAll("td:not(:empty)")){let n="";if(t){e.querySelectorAll("td:not(:empty)").forEach(e=>{n+=e.textContent})}return!!n&&(y.recentlyAddedNodes.delete(e),!0)}return y.recentlyAddedNodes.delete(e),!0}const M=function(e,t=!1,n=!0,s=!1){for(let i=e.length-1;i>=0;i--)(s&&!F(e[i])||n&&!R(e[i]))&&(t&&t.push(e[i]),e.splice(i,1))};function O(t=!1){y.ignoreAll=b.ignoreAllIfAbsent&&null===document.querySelector(`:is(${b.ignoreAllIfAbsent})`),!y.ignoreAll&&b.ignoreAllIfPresent&&(y.ignoreAll=null!==document.querySelector(`:is(${b.ignoreAllIfPresent})`)),y.elements=[],y.mediaCount=0,y.headingOutline=[],function(t,i,o){if(s.Root.areaToCheck=[],s.Root.Readability=[],o)return s.Root.areaToCheck=o,void(s.Root.Readability=o);try{const e=document.querySelectorAll(t);e.length>0?e.forEach(e=>{s.Root.areaToCheck.push(e)}):console.error(`Sa11y: The target readability root (${t}) does not exist.`)}catch{s.Root.areaToCheck.length=0}0===s.Root.areaToCheck.length&&!1===s.Global.headless&&(n(e.sprintf("MISSING_ROOT",t)),s.Root.areaToCheck.push(document.body));try{const e=document.querySelectorAll(i);e.length>0?e.forEach(e=>{s.Root.Readability.push(e)}):console.error(`Sa11y: The target readability root (${selector}) does not exist.`)}catch{s.Root.Readability.length=0}0===s.Root.Readability.length&&!1===s.Global.headless&&(0===s.Root.areaToCheck.length?s.Root.Readability.push(document.body):(s.Root.Readability=s.Root.areaToCheck,setTimeout(()=>{const{readabilityDetails:t,readabilityToggle:n}=s.Panel,o="true"===n?.getAttribute("aria-pressed"),l=s.Panel.readability.querySelector("#readability-alert");if(t&&o&&!l){const n=s.Root.areaToCheck.map(e=>e.id?`#${e.id}`:e.className?`.${e.className.split(/\s+/).filter(Boolean).join(".")}`:e.tagName.toLowerCase()).join(", "),o=document.createElement("div");o.id="readability-alert",o.innerHTML=`<hr><p>${e.sprintf("MISSING_READABILITY_ROOT",n,i)}</p>`,t.insertAdjacentElement("afterend",o)}},100)))}(b.checkRoot,b.checkRoot);for(let e=0;e<y.roots.length;e++)b.fixedRoots&&(y.roots[e].dataset.ed11yRoot=`${e}`),y.roots[e].shadowRoot?(y.roots.setAttribute("data-ed11y-has-shadow-root","true"),K(y.roots[e]),y.roots[e]=y.roots[e].shadowRoot):K(y.roots[e]);!function(e){if(e.autoDetectShadowComponents){const t=s.Exclusions.Sa11yElements,n=document.querySelector(e.checkRoot);(n?Array.from(n.querySelectorAll(`*:not(${t})`)):Array.from(document.body.querySelectorAll(`*:not(${t})`))).forEach(e=>{e.shadowRoot&&"open"===e.shadowRoot.mode&&e.setAttribute("data-sa11y-has-shadow-root","")})}else e.shadowComponents&&document.querySelectorAll(e.shadowComponents).forEach(e=>{e.setAttribute("data-sa11y-has-shadow-root","")})}(b),t?(k.Found.Everything=a("*","root",s.Exclusions.Sa11yElements),k.Found.Contrast=k.Found.Everything.filter(e=>!s.Exclusions.Contrast.some(t=>e.matches(t))&&!s.Exclusions.Contrast.includes(e)),k.Found.Images=k.Found.Everything.filter(e=>"IMG"===e.tagName&&!s.Exclusions.Images.some(t=>e.matches(t))),k.Found.Links=k.Found.Everything.filter(e=>("A"===e.tagName||"a"===e.tagName)&&e.hasAttribute("href")&&!e.matches('[role="button"]')&&!s.Exclusions.Links.some(t=>e.matches(t))),k.Found.Headings=a('h1, h2, h3, h4, h5, h6, [role="heading"][aria-level]',b.ignoreContentOutsideRoots||b.fixedRoots?"root":"document",s.Exclusions.Headings),k.Found.ExcludedHeadings=k.Found.Headings.filter(e=>s.Exclusions.Headings.some(t=>e.matches(t))),k.Found.ExcludedOutlineHeadings=k.Found.Headings.filter(e=>s.Exclusions.Outline.some(t=>e.matches(t))),k.Found.OutlineIgnore=k.Found.ExcludedOutlineHeadings.concat(k.Found.ExcludedHeadings)):k.initializeElements(b),t||(M(k.Found.Headings,k.Found.OutlineIgnore,!0,!0),M(k.Found.Blockquotes),M(k.Found.Tables)),"string"==typeof b.editableContent?k.Found.editable=w(b.editableContent,"document"):k.Found.editable=b.editableContent,y.inlineAlerts&&k.Found.editable.length>0&&(y.inlineAlerts=!1,console.warn("Editable content detected; Editoria11y inline alerts disabled")),b.panelNoCover&&(k.Found.panelNoCover=w(b.panelNoCover,"document"))}function P(e,t){let n;return(...s)=>{window.clearTimeout(n),n=window.setTimeout(()=>{e.apply(null,s)},t+y.browserLag)}}function D(e){let t=[];for(t.push(e);e&&e.parentElement&&"HTML"!==e.parentElement.tagName;)t.push(e.parentElement),e=e.parentElement;return t}function x(e){e?.forEach(e=>{const t=w(`.${e}`,"document",[]);t?.forEach(t=>{t.classList.remove(e)})})}function B(e){if(e){if(!e.checkVisibility({opacityProperty:!0,visibilityProperty:!0}))return!1;let t=window.getComputedStyle(e);return!(e.closest(".sr-only, .visually-hidden")||t.getPropertyValue("z-index")<0||"hidden"===t.getPropertyValue("overflow")&&(e.offsetWidth<10||e.offsetHeight<10))}}function G(e){if(B(e)){let t=e=>B(e);return D(e).every(t)}return!1}function H(e){let t=e.parentElement;return!!t&&(B(t)||(t=H(t)),t)}function U(e){let t=window.getComputedStyle(e);return!("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")||e.hasAttribute("aria-hidden")||e.hasAttribute("hidden"))}function F(e){if(U(e)){let t=e=>U(e);return D(e).every(t)}return!1}function K(e){if(b.autoDetectShadowComponents){const t=`*:not(${s.Exclusions.Container.join(", ")}, .ed11y-element)`;let n;e.shadowRoot&&"open"===e.shadowRoot.mode?(e.matches("[data-ed11y-has-shadow-root]")||(e.setAttribute("data-ed11y-has-shadow-root","true"),N.attachCSS(e.shadowRoot),N.attachCSS(e)),n=e.shadowRoot.querySelectorAll(t)):n=e.querySelectorAll(t),n?.forEach(e=>{e.shadowRoot&&"open"===e.shadowRoot.mode&&K(e)})}else if(b.shadowComponents){e.querySelectorAll(b.shadowComponents).forEach(t=>{t.shadowRoot&&"open"===t.shadowRoot.mode?(e.matches("[data-ed11y-has-shadow-root]")||(t.setAttribute("data-ed11y-has-shadow-root","true"),N.attachCSS(t.shadowRoot),N.attachCSS(t)),K(t)):console.warn(`Editoria11y: A specified shadow host has no shadowRoot: ${t.tagName}`)})}}function $(){y.watching?.forEach(e=>{e.observer.disconnect()})}function W(){y.watching?.forEach(e=>{e.observer.observe(e.root,e.config)})}function q(){let e=!!b.preventCheckingIfPresent&&document.querySelector(b.preventCheckingIfPresent);return e?console.warn(`Editoria11y is disabled because an element matched the "preventCheckingIfPresent" parameter: "${b.preventCheckingIfPresent}"`):!e&&b.preventCheckingIfAbsent&&(e=null===document.querySelector(`:is(${b.preventCheckingIfAbsent})`),e&&console.warn(`Editoria11y is disabled because no elements matched the "preventCheckingIfAbsent" parameter: "${b.preventCheckingIfAbsent}"`)),e}function Y(t){y.jumpList=[],y.tipOpen=!1,y.openTip={button:!1,tip:!1},y.lastOpenTip=-1,x(["ed11y-ring-red","ed11y-ring-yellow","ed11y-hidden-highlight","ed11y-warning-inline","ed11y-warning-block","ed11y-error-block","ed11y-error-inline"]),k.Found.reset=w(t?"ed11y-element-highlight":"ed11y-element-heading-label, ed11y-element-alt, ed11y-element-highlight","document",[]),k.Found.reset?.forEach(e=>e.remove()),k.Found.delayedReset=w("ed11y-element-result, ed11y-element-tip","document",[]),window.setTimeout(()=>{k.Found.delayedReset?.forEach(e=>e.remove())},100,k.Found.delayedReset),"function"==typeof N.panelJumpNext&&(N.panelJumpNext.querySelector(".ed11y-sr-only").textContent=y.english?e._("buttonFirstContent"):e._("SKIP_TO_ISSUE")+" 1")}function z(e){customElements.define("sa11y-console-error",C);const t=new C(e);throw document.body.appendChild(t),Error(e)}function Q(t,n){const i=n.linkStopWords?[...e._("PARTIAL_ALT_STOPWORDS"),...n.linkStopWords.split(",").map(e=>e.trim())]:e._("PARTIAL_ALT_STOPWORDS"),o=e=>e.replace(/[^\w\s./]/g,"").replace(/\s+/g," ").trim(),l=(e,t)=>{const n=e.replace(/\./g,"").toLowerCase();let s=null;return t.forEach(e=>{n.length===e.length&&n.indexOf(e.toLowerCase())>=0&&(s=e)}),s},a={};return k.Found.Links.forEach(c=>{const d=function(e){let t=e.getAttribute("href");return t=g(t).toLowerCase(),t.endsWith("/")&&(t=t.slice(0,-1)),t=t.replace(/^https?:\/\/(www\.)?/,""),t=t.replace(/\.(html|php|htm|asp|aspx)$/i,""),t}(c),h=g(r(c,s.Exclusions.LinkSpan)),u=Array.isArray(n.linkIgnoreStrings)?n.linkIgnoreStrings.reduce((e,t)=>e.replace(t,""),h):h,A=(t=>{const n=[null,null,null,null];return n[0]=l(t,i),e._("CLICK").forEach(e=>(new RegExp(`\\b${e}\\b`,"i").test(t)&&(n[1]=e),!1)),["doi.org/","dl.acm.org/","link.springer.com/","pubmed.ncbi.nlm.nih.gov/","scholar.google.com/","ieeexplore.ieee.org/","researchgate.net/publication/","sciencedirect.com/science/article/"].forEach(e=>(t.toLowerCase().indexOf(e)>=0&&(n[2]=e),!1)),["www.","http"].forEach(e=>(t.toLowerCase().startsWith(e)&&(n[3]=e),!1)),[".edu/",".com/",".net/",".org/",".us/",".ca/",".de/",".icu/",".uk/",".ru/",".info/",".top/",".xyz/",".tk/",".cn/",".ga/",".cf/",".nl/",".io/",".fr/",".pe/",".nz/",".pt/",".es/",".pl/",".ua/"].forEach(e=>(t.toLowerCase().indexOf(e)>=0&&(n[3]=e),!1)),n})(o(u)),_=1===u.length&&/[^a-zA-Z0-9]/g.test(u),L=u.match(/([<>↣↳←→↓«»↴]+)/),y=L?L[1]:null,I=c.getAttribute("title"),N="true"===c.getAttribute("aria-hidden"),S="-1"===c.getAttribute("tabindex"),b=c.querySelector(":scope [aria-labelledby], :scope [aria-label]")||c.getAttribute("aria-labelledby")||c.getAttribute("aria-label"),k=c.querySelector(":scope [aria-labelledby]")||c.getAttribute("aria-labelledby"),C=e._("NEW_WINDOW_PHRASES").some(e=>h.toLowerCase().includes(e)),w=e._("CLICK").some(e=>new RegExp(`\\b${e}\\b`,"i").test(c.textContent)),v=["pdf","doc","docx","word","mp3","ppt","text","pptx","txt","exe","dmg","rtf","windows","macos","csv","xls","xlsx","mp4","mov","avi","zip"].concat(e._("FILE_TYPE_PHRASES")).some(e=>u.toLowerCase().includes(e)||E(c).toLowerCase().includes(e)),R=c.matches("\n a[href$='.pdf'],\n a[href$='.doc'],\n a[href$='.docx'],\n a[href$='.zip'],\n a[href$='.mp3'],\n a[href$='.txt'],\n a[href$='.exe'],\n a[href$='.dmg'],\n a[href$='.rtf'],\n a[href$='.pptx'],\n a[href$='.ppt'],\n a[href$='.xls'],\n a[href$='.xlsx'],\n a[href$='.csv'],\n a[href$='.mp4'],\n a[href$='.mov'],\n a[href$='.avi']\n "),M=u.replace(/'|"|-|\.|\s+/g,"").toLowerCase(),O=c.textContent.trim().toLowerCase();let P;const D=(s,i)=>{n.checks.LINK_STOPWORD&&!P&&(P=!0,t.push({test:"LINK_STOPWORD",element:s,type:n.checks.LINK_STOPWORD.type||"error",content:n.checks.LINK_STOPWORD.content?e.sprintf(n.checks.LINK_STOPWORD.content,i):e.sprintf("LINK_STOPWORD",i)+e.sprintf("LINK_TIP"),inline:!0,position:"afterend",dismiss:T(`LINKSTOPWORD${d+M}`),dismissAll:!!n.checks.LINK_STOPWORD.dismissAll&&"LINK_STOPWORD",developer:n.checks.LINK_STOPWORD.developer||!1}))};if(!c.querySelectorAll("img").length){if(N)return void(S||n.checks.HIDDEN_FOCUSABLE&&t.push({test:"HIDDEN_FOCUSABLE",element:c,type:n.checks.HIDDEN_FOCUSABLE.type||"error",content:e.sprintf(n.checks.HIDDEN_FOCUSABLE.content||"HIDDEN_FOCUSABLE"),inline:!0,position:"afterend",dismiss:T(`LINKHIDDENFOCUS${d+M}`),dismissAll:!!n.checks.HIDDEN_FOCUSABLE.dismissAll&&"LINK_HIDDEN_FOCUSABLE",developer:n.checks.HIDDEN_FOCUSABLE.developer||!0}));if(C){const t=e._("NEW_WINDOW_PHRASES").find(e=>e.toLowerCase()===O);O===t&&D(c,t)}let r=!1;if(n.linkIgnoreStrings&&n.linkIgnoreStrings.forEach(e=>{O===e.toLowerCase()&&(D(c,e),r=!0)}),!d&&""!==d||0!==u.length)if(null!==A[0])D(c,A[0]);else if(null!==A[2])u.length>8&&n.checks.LINK_DOI&&t.push({test:"LINK_DOI",element:c,type:n.checks.LINK_DOI.type||"warning",content:e.sprintf(n.checks.LINK_DOI.content||"LINK_DOI"),inline:!0,dismiss:T(`LINKDOI${d+M}`),dismissAll:!!n.checks.LINK_DOI.dismissAll&&"LINK_DOI",developer:n.checks.LINK_DOI.developer||!1});else if(null!==A[3])u.length>(n.checks.LINK_URL.maxLength||40)&&n.checks.LINK_URL&&t.push({test:"LINK_URL",element:c,type:n.checks.LINK_URL.type||"warning",content:n.checks.LINK_URL.content?e.sprintf(n.checks.LINK_URL.content):e.sprintf("LINK_URL")+e.sprintf("LINK_TIP"),inline:!0,dismiss:T(`LINKURLNAME${d+M}`),dismissAll:!!n.checks.LINK_URL.dismissAll&&"LINK_URL",developer:n.checks.LINK_URL.developer||!1});else if(b){const r=p(u),a=m(c,s.Exclusions.LinkSpan),h=n.linkIgnoreStrings?E(a).replace(n.linkIgnoreStrings,""):E(a),g=o(h),A=l(g,i);n.checks.LINK_STOPWORD_ARIA&&null!==A?t.push({test:"LINK_STOPWORD_ARIA",element:c,type:n.checks.LINK_STOPWORD_ARIA.type||"warning",content:n.checks.LINK_STOPWORD_ARIA.content?e.sprintf(n.checks.LINK_STOPWORD_ARIA.content,A,r):e.sprintf("LINK_STOPWORD_ARIA",A,r)+e.sprintf("LINK_TIP"),inline:!0,dismiss:T(`LINKSTOPWORDARIA${d+M}`),dismissAll:!!n.checks.LINK_STOPWORD_ARIA.dismissAll&&" LINK_STOPWORD_ARIA",developer:n.checks.LINK_STOPWORD_ARIA.developer||!0}):n.checks.LINK_LABEL&&t.push({test:"LINK_LABEL",element:c,type:n.checks.LINK_LABEL.type||"good",content:n.checks.LINK_LABEL.content?e.sprintf(n.checks.LINK_LABEL.content,r):`${e.sprintf("ACC_NAME",r)} ${e.sprintf("ACC_NAME_TIP")}`,inline:!0,position:"afterend",dismiss:T(`LINKGOOD${d+M}`),dismissAll:!!n.checks.LINK_LABEL.dismissAll&&"LINK_LABEL",developer:n.checks.LINK_LABEL.developer||!0});const _=f(c);n.checks.LABEL_IN_NAME&&_&&0!==c.textContent.length&&t.push({test:"LABEL_IN_NAME",element:c,type:n.checks.LABEL_IN_NAME.type||"warning",content:e.sprintf(n.checks.LABEL_IN_NAME.content||"LABEL_IN_NAME",r),inline:!0,position:"afterend",dismiss:T(`LINKLABELNAME${d+M}`),dismissAll:!!n.checks.LABEL_IN_NAME.dismissAll&&"BTN_LABEL_IN_NAME",developer:n.checks.LABEL_IN_NAME.developer||!0})}else y?n.checks.LINK_SYMBOLS&&t.push({test:"LINK_SYMBOLS",element:c,type:n.checks.LINK_SYMBOLS.type||"warning",content:e.sprintf(n.checks.LINK_SYMBOLS.content||"LINK_SYMBOLS",y),inline:!0,dismiss:T(`LINKSYMBOL${d+M}`),dismissAll:!!n.checks.LINK_SYMBOLS.dismissAll&&"LINK_SYMBOLS",developer:n.checks.LINK_SYMBOLS.developer||!1}):_&&n.checks.LINK_EMPTY&&t.push({test:"LINK_EMPTY",element:c,type:n.checks.LINK_EMPTY.type||"error",content:e.sprintf(n.checks.LINK_EMPTY.content||"LINK_EMPTY"),inline:!0,position:"afterend",dismiss:T(`LINKCHAR${d}`),dismissAll:!!n.checks.LINK_EMPTY.dismissAll&&"LINK_EMPTY",developer:n.checks.LINK_EMPTY.developer||!1});else if(k)n.checks.LINK_EMPTY_LABELLEDBY&&t.push({test:"LINK_EMPTY_LABELLEDBY",element:c,type:n.checks.LINK_EMPTY_LABELLEDBY.type||"error",content:e.sprintf(n.checks.LINK_EMPTY_LABELLEDBY.content||"LINK_EMPTY_LABELLEDBY"),inline:!0,position:"afterend",dismiss:T(`LINKEMPTYLABELLEDBY${d}`),dismissAll:!!n.checks.LINK_EMPTY_LABELLEDBY.dismissAll&&"LINK_EMPTY_LABELLEDBY",developer:n.checks.LINK_EMPTY_LABELLEDBY.developer||!0});else if(c.children.length){let s=!1;if(n.linkIgnoreSpan){const e=c.querySelector(n.linkIgnoreSpan);if(e){const t=o(e.textContent).trim().toLowerCase();t===O&&(D(c,t),s=!0)}}!s&&n.checks.LINK_EMPTY_NO_LABEL&&t.push({test:"LINK_EMPTY_NO_LABEL",element:c,type:n.checks.LINK_EMPTY_NO_LABEL.type||"error",content:e.sprintf(n.checks.LINK_EMPTY_NO_LABEL.content||"LINK_EMPTY_NO_LABEL"),inline:!0,position:"afterend",dismiss:T(`LINKEMPTYNOLABEL${d}`),dismissAll:!!n.checks.LINK_EMPTY_NO_LABEL.dismissAll&&"LINK_EMPTY_NO_LABEL",developer:n.checks.LINK_EMPTY_NO_LABEL.developer||!1})}else!r&&n.checks.LINK_EMPTY&&t.push({test:"LINK_EMPTY",element:c,type:n.checks.LINK_EMPTY.type||"error",content:e.sprintf(n.checks.LINK_EMPTY.content||"LINK_EMPTY"),inline:!0,position:"afterend",dismiss:T(`LINKEMPTY${d}`),dismissAll:!!n.checks.LINK_EMPTY.dismissAll&&"LINK_EMPTY",developer:n.checks.LINK_EMPTY.developer||!1});(null!==A[1]||w)&&n.checks.LINK_CLICK_HERE&&t.push({test:"LINK_CLICK_HERE",element:c,type:n.checks.LINK_CLICK_HERE.type||"warning",content:n.checks.LINK_CLICK_HERE.content?e.sprintf(n.checks.LINK_CLICK_HERE.content):e.sprintf("LINK_CLICK_HERE")+e.sprintf("LINK_TIP"),inline:!0,dismiss:T(`LINKCLICKHERE${d+M}`),dismissAll:!!n.checks.LINK_CLICK_HERE.dismissAll&&"LINK_CLICK_HERE",developer:n.checks.LINK_CLICK_HERE.developer||!1}),0!==E(c).length&&I?.toLowerCase()===u.toLowerCase()&&n.checks.DUPLICATE_TITLE&&t.push({test:"DUPLICATE_TITLE",element:c,type:n.checks.DUPLICATE_TITLE.type||"warning",content:e.sprintf(n.checks.DUPLICATE_TITLE.content||"DUPLICATE_TITLE"),inline:!0,dismiss:T(`LINKDUPLICATETITLE${d+M}`),dismissAll:!!n.checks.DUPLICATE_TITLE.dismissAll&&"DUPLICATE_TITLE",developer:n.checks.DUPLICATE_TITLE.developer||!1})}if(n.linksAdvancedPlugin&&0!==M.length){if(a[M]&&!a[d]){const s="true"===c.ariaHidden&&"-1"===c.getAttribute("tabindex"),i=c.hasAttribute("role")||c.hasAttribute("disabled");if(n.checks.LINK_IDENTICAL_NAME&&!i&&!s){const s=p(u);t.push({test:"LINK_IDENTICAL_NAME",element:c,type:n.checks.LINK_IDENTICAL_NAME.type||"warning",content:n.checks.LINK_IDENTICAL_NAME.content?e.sprintf(n.checks.LINK_IDENTICAL_NAME.content,s):`${e.sprintf("LINK_IDENTICAL_NAME",s)} ${e.sprintf("ACC_NAME_TIP")}`,inline:!0,dismiss:T(`LINKSEEN${d+M}`),dismissAll:!!n.checks.LINK_IDENTICAL_NAME.dismissAll&&"LINK_IDENTICAL_NAME",developer:n.checks.LINK_IDENTICAL_NAME.developer||!1})}}else a[M]=!0,a[d]=!0;"_blank"!==c.getAttribute("target")?.toLowerCase()||R||C||n.checks.LINK_NEW_TAB&&t.push({test:"LINK_NEW_TAB",element:c,type:n.checks.LINK_NEW_TAB.type||"warning",content:e.sprintf(n.checks.LINK_NEW_TAB.content||"LINK_NEW_TAB"),inline:!0,dismiss:T(`LINKNEWTAB${d+M}`),dismissAll:!!n.checks.LINK_NEW_TAB.dismissAll&&"LINK_NEW_TAB",developer:n.checks.LINK_NEW_TAB.developer||!1}),R&&!v&&n.checks.LINK_FILE_EXT&&t.push({test:"LINK_FILE_EXT",element:c,type:n.checks.LINK_FILE_EXT.type||"warning",content:e.sprintf(n.checks.LINK_FILE_EXT.content||"LINK_FILE_EXT"),inline:!0,dismiss:T(`LINKEXT${d+M}`),dismissAll:!!n.checks.LINK_FILE_EXT.dismissAll&&"LINK_FILE_EXT",developer:n.checks.LINK_FILE_EXT.developer||!1})}}),t}function V(t,n){return k.Found.Images.forEach(i=>{const o="noAria"===l(i)?i.getAttribute("alt"):l(i),a=i.closest(n.imageWithinLightbox?`a[href]:not(${n.imageWithinLightbox})`:"a[href]"),c=i.getAttribute("src")?i.getAttribute("src"):i.getAttribute("srcset"),h=a?m(a,s.Exclusions.LinkSpan).textContent:"",u=Array.isArray(n.linkIgnoreStrings)?n.linkIgnoreStrings.reduce((e,t)=>e.replace(t,""),h):h,E=a?g(u).length:0;if(!(i.height<2&&i.width<2)||!d(i)&&""!==o){if(a&&"true"===a.getAttribute("aria-hidden")){const s="-1"===a.getAttribute("tabindex");return void(n.checks.HIDDEN_FOCUSABLE&&!s&&t.push({test:"HIDDEN_FOCUSABLE",element:i,type:n.checks.HIDDEN_FOCUSABLE.type||"error",content:e.sprintf(n.checks.HIDDEN_FOCUSABLE.content||"HIDDEN_FOCUSABLE"),dismiss:T(`IMGHIDDENFOCUSABLE${c}`),dismissAll:!!n.checks.HIDDEN_FOCUSABLE.dismissAll&&"LINK_HIDDEN_FOCUSABLE",developer:n.checks.HIDDEN_FOCUSABLE.developer||!0}))}if(null===o)if(a){const s=0===E?n.checks.MISSING_ALT_LINK:n.checks.MISSING_ALT_LINK_HAS_TEXT,o=0===E?"MISSING_ALT_LINK":"MISSING_ALT_LINK_HAS_TEXT";s&&t.push({test:o,element:i,type:s.type||"error",content:e.sprintf(s.content||o),dismiss:T(`${o+c+E}`),dismissAll:!!s.dismissAll&&o,developer:s.developer||!1})}else n.checks.MISSING_ALT&&t.push({test:"MISSING_ALT",element:i,type:n.checks.MISSING_ALT.type||"error",content:e.sprintf(n.checks.MISSING_ALT.content||"MISSING_ALT"),dismiss:T(`IMGNOALT${c}`),dismissAll:!!n.checks.MISSING_ALT.dismissAll&&"MISSING_ALT",developer:n.checks.MISSING_ALT.developer||!1});else{const s=g(p(o)),l=(t=>{const s=[null,null,null];[".avif",".png",".jpg",".jpeg",".webp",".gif",".tiff",".svg",".heif",".heic","http"].forEach(e=>{if(-1!==t.toLowerCase().indexOf(e.toLowerCase()))s[0]=e;else{const e=/\b\d{2,6}\s*x\s*\d{2,6}\b/,n=t.toLowerCase().match(e);n&&([s[0]]=n)}}),(n.susAltStopWords?n.susAltStopWords.split(",").map(e=>e.trim()):e._("SUS_ALT_STOPWORDS")).forEach(e=>{const n=t.toLowerCase().indexOf(e);n>-1&&n<6&&(s[1]=e)}),e._("PLACEHOLDER_ALT_STOPWORDS").forEach(e=>{t.length===e.length&&t.toLowerCase().indexOf(e)>=0&&(s[2]=e)});const{extraPlaceholderStopWords:i}=n;i.length&&i.split(",").map(e=>e.trim()).forEach(e=>{const n=t.toLowerCase().indexOf(e);n>-1&&n<6&&(s[2]=e)});return s})(s),d=i.getAttribute("aria-label")||i.getAttribute("aria-labelledby"),h=i.getAttribute("title"),u=""===o,m=i.closest("figure"),_=m?.querySelector("figcaption"),L=_?_.textContent.trim():"",f=n.checks.LINK_IMAGE_LONG_ALT.maxLength||250,y=n.checks.IMAGE_ALT_TOO_LONG.maxLength||250;if(n.checks.MISSING_ALT&&d&&""===s)return void t.push({test:"MISSING_ALT",element:i,type:n.checks.MISSING_ALT.type||"error",content:e.sprintf(n.checks.MISSING_ALT.content||"MISSING_ALT"),dismiss:T(`IMGNOALTARIA${c}`),dismissAll:!!n.checks.MISSING_ALT.dismissAll&&"MISSING_ALT",developer:n.checks.MISSING_ALT.developer||!1});const I=n.altPlaceholder&&n.altPlaceholder.some(e=>o.toLowerCase().startsWith(e.toLowerCase()));if(u||I){const s=n.checks.IMAGE_DECORATIVE_CAROUSEL.sources,o=s?i.closest(s):"";if(o){const s=o.querySelectorAll("img"),l=1===s.length?n.checks.IMAGE_DECORATIVE:n.checks.IMAGE_DECORATIVE_CAROUSEL,r=1===s.length?"IMAGE_DECORATIVE":"IMAGE_DECORATIVE_CAROUSEL";l&&t.push({test:r,element:i,type:l.type||"warning",content:e.sprintf(l.content||r),dismiss:T(r+c),dismissAll:!!l.dismissAll&&r,developer:l.developer||!1})}else if(a){const s=0===E?n.checks.LINK_IMAGE_NO_ALT_TEXT:n.checks.LINK_IMAGE_TEXT,o=0===E?"LINK_IMAGE_NO_ALT_TEXT":"LINK_IMAGE_TEXT";s&&t.push({test:o,element:i,type:s.type||(0===E?"error":"good"),content:e.sprintf(s.content||o),dismiss:T(`${o+c+E}`),dismissAll:!!s.dismissAll&&o,developer:s.developer||!1})}else if(m){const s=_&&L.length?n.checks.IMAGE_FIGURE_DECORATIVE:n.checks.IMAGE_DECORATIVE,o=_&&L.length?"IMAGE_FIGURE_DECORATIVE":"IMAGE_DECORATIVE";s&&t.push({test:o,element:i,type:s.type||"warning",content:e.sprintf(s.content||o),dismiss:T(`${o+c+L}`),dismissAll:!!s.dismissAll&&o,developer:s.developer||!1})}else n.checks.IMAGE_DECORATIVE&&t.push({test:"IMAGE_DECORATIVE",element:i,type:n.checks.IMAGE_DECORATIVE.type||"warning",content:e.sprintf(n.checks.IMAGE_DECORATIVE.content||"IMAGE_DECORATIVE"),dismiss:T(`DECIMAGE${c}`),dismissAll:!!n.checks.IMAGE_DECORATIVE.dismissAll&&"IMAGE_DECORATIVE",developer:n.checks.IMAGE_DECORATIVE.developer||!1});return}const N=a?n.checks.LINK_ALT_UNPRONOUNCEABLE:n.checks.ALT_UNPRONOUNCEABLE;if(N&&""===o.replace(/"|'|\?|\.|-|\s+/g,"")&&0===E){const n=a?"LINK_ALT_UNPRONOUNCEABLE":"ALT_UNPRONOUNCEABLE";return void t.push({test:n,element:i,type:N.type||"error",content:e.sprintf(N.content||n,s),dismiss:T(`UNPRONOUNCEABLE${c}`),dismissAll:!!N.dismissAll&&"ALT_UNPRONOUNCEABLE",developer:N.developer||!1})}const S=a?n.checks.LINK_ALT_MAYBE_BAD:n.checks.ALT_MAYBE_BAD,b=new RegExp(`^\\S{${S.minLength||15},}$`),k=/[^\p{L}\-,.!?]/u.test(o);if(null!==l[0]){const o=a?n.checks.LINK_ALT_FILE_EXT:n.checks.ALT_FILE_EXT,r=a?"LINK_ALT_FILE_EXT":"ALT_FILE_EXT";o&&t.push({test:r,element:i,type:o.type||"error",content:e.sprintf(o.content||r,l[0],s),dismiss:T(`${r+c+s}`),dismissAll:!!o.dismissAll&&r,developer:o.developer||!1})}else if(null!==l[2]){const o=a?n.checks.LINK_PLACEHOLDER_ALT:n.checks.ALT_PLACEHOLDER,l=a?"LINK_PLACEHOLDER_ALT":"ALT_PLACEHOLDER";o&&t.push({test:l,element:i,type:o.type||"error",content:e.sprintf(o.content||l,s),dismiss:T(`${l+c+s}`),dismissAll:!!o.dismissAll&&l,developer:o.developer||!1})}else if(null!==l[1]){const o=a?n.checks.LINK_SUS_ALT:n.checks.SUS_ALT,r=a?"LINK_SUS_ALT":"SUS_ALT";o&&t.push({test:r,element:i,type:o.type||"warning",content:e.sprintf(o.content||r,l[1],s),dismiss:T(`${r+c+s}`),dismissAll:!!o.dismissAll&&r,developer:o.developer||!1})}else if(S&&b.test(o)&&k){const n=a?"LINK_ALT_MAYBE_BAD":"ALT_MAYBE_BAD";t.push({test:n,element:i,type:S.type||"warning",content:e.sprintf(S.content||n,s),dismiss:T(`${n+c+s}`),dismissAll:!!S.dismissAll&&n,developer:S.developer||!1})}else if(a?o.length>f:o.length>y){const l=a?n.checks.LINK_IMAGE_LONG_ALT:n.checks.IMAGE_ALT_TOO_LONG,r=a?"LINK_IMAGE_LONG_ALT":"IMAGE_ALT_TOO_LONG",d=A(s,600);l&&t.push({test:r,element:i,type:l.type||"warning",content:e.sprintf(l.content||r,o.length,d),dismiss:T(`${r+c+s}`),dismissAll:!!l.dismissAll&&r,developer:l.developer||!1})}else if(a){const o=0===E?n.checks.LINK_IMAGE_ALT:n.checks.LINK_IMAGE_ALT_AND_TEXT,l=0===E?"LINK_IMAGE_ALT":"LINK_IMAGE_ALT_AND_TEXT";if(o){const n=p(g(r(a))),d=0===E?e.sprintf("LINK_IMAGE_ALT",s):`${e.sprintf("LINK_IMAGE_ALT_AND_TEXT",s,n)} ${e.sprintf("ACC_NAME_TIP")}`;t.push({test:l,element:i,type:o.type||"warning",content:o.content?e.sprintf(o.content,s,n):d,dismiss:T(`${l+c+s}`),dismissAll:!!o.dismissAll&&l,developer:o.developer||!1})}}else if(m){!!_&&L.toLowerCase()===s.trim().toLowerCase()?n.checks.IMAGE_FIGURE_DUPLICATE_ALT&&t.push({test:"IMAGE_FIGURE_DUPLICATE_ALT",element:i,type:n.checks.IMAGE_FIGURE_DUPLICATE_ALT.type||"warning",content:e.sprintf(n.checks.IMAGE_FIGURE_DUPLICATE_ALT.content||"IMAGE_FIGURE_DUPLICATE_ALT",s),dismiss:T(`FIGDUPLICATE${c}`),dismissAll:!!n.checks.IMAGE_FIGURE_DUPLICATE_ALT.dismissAll&&"IMAGE_FIGURE_DUPLICATE_ALT",developer:n.checks.IMAGE_FIGURE_DUPLICATE_ALT.developer||!1}):n.checks.IMAGE_PASS&&t.push({test:"IMAGE_PASS",element:i,type:n.checks.IMAGE_PASS.type||"good",content:e.sprintf(n.checks.IMAGE_PASS.content||"IMAGE_PASS",s),dismiss:T(`FIGIMGPASS${c+s}`),dismissAll:!!n.checks.IMAGE_PASS.dismissAll&&"IMAGE_PASS",developer:n.checks.IMAGE_PASS.developer||!1})}else n.checks.IMAGE_PASS&&(i.closest('button, [role="button"]')||t.push({test:"IMAGE_PASS",element:i,type:n.checks.IMAGE_PASS.type||"good",content:e.sprintf(n.checks.IMAGE_PASS.content||"IMAGE_PASS",s),dismiss:T(`IMAGEPASS${c+s}`),dismissAll:!!n.checks.IMAGE_PASS.dismissAll&&"IMAGE_PASS",developer:n.checks.IMAGE_PASS.developer||!1}));h?.toLowerCase()===o.toLowerCase()&&n.checks.DUPLICATE_TITLE&&t.push({test:"DUPLICATE_TITLE",element:i,type:n.checks.DUPLICATE_TITLE.type||"warning",content:e.sprintf(n.checks.DUPLICATE_TITLE.content||"DUPLICATE_TITLE"),inline:!0,dismiss:T(`ALTDUPLICATETITLE${s}`),dismissAll:!!n.checks.DUPLICATE_TITLE.dismissAll&&"DUPLICATE_TITLE",developer:n.checks.DUPLICATE_TITLE.developer||!1})}}}),t}function j(t,n){if(n.checks.QA_BAD_LINK&&k.Found.CustomErrorLinks.forEach(s=>{t.push({test:"QA_BAD_LINK",element:s,type:n.checks.QA_BAD_LINK.type||"error",content:e.sprintf(n.checks.QA_BAD_LINK.content||"QA_BAD_LINK",s),inline:!0,dismiss:T(s.tagName+s.textContent),dismissAll:!!n.checks.QA_BAD_LINK.dismissAll&&"QA_BAD_LINK",developer:n.checks.QA_BAD_LINK.developer||!1})}),n.checks.QA_STRONG_ITALICS&&k.Found.StrongItalics.forEach(s=>{const i=E(s);0!==i.length&&i.length>400&&t.push({test:"QA_STRONG_ITALICS",element:s.parentNode,type:n.checks.QA_STRONG_ITALICS.type||"warning",content:e.sprintf(n.checks.QA_STRONG_ITALICS.content||"QA_STRONG_ITALICS"),dismiss:T(s.tagName+s.textContent),dismissAll:!!n.checks.QA_STRONG_ITALICS.dismissAll&&"QA_STRONG_ITALICS",developer:n.checks.QA_STRONG_ITALICS.developer||!1})}),k.Found.Links.forEach(i=>{if(i.hasAttribute("href")){const o=i.getAttribute("href"),l=i.matches(s.Global.documentSources),r=i.matches('a[href$=".pdf"], a[href*=".pdf?"]');if(n.checks.QA_IN_PAGE_LINK){const s=0!==E(i).length,l="true"===i.ariaHidden&&"-1"===i.getAttribute("tabindex"),r=i.hasAttribute("role")||i.hasAttribute("aria-haspopup")||i.hasAttribute("aria-expanded")||i.hasAttribute("onclick")||i.hasAttribute("disabled")||i.closest('nav, [role="navigation"]');if((o.startsWith("#")||""===o)&&s&&!l&&!r){const s=o.substring(1),l=i.getAttribute("aria-controls");s&&(document.getElementById(s)||document.getElementById(decodeURIComponent(s))||document.getElementById(encodeURIComponent(s))||document.getElementById(l)||document.querySelector(`a[name="${s}"]`))||t.push({test:"QA_IN_PAGE_LINK",element:i,type:n.checks.QA_IN_PAGE_LINK.type||"error",content:e.sprintf(n.checks.QA_IN_PAGE_LINK.content||"QA_IN_PAGE_LINK"),inline:!0,dismiss:T(`QAINPAGE${o}`),dismissAll:!!n.checks.QA_IN_PAGE_LINK.dismissAll&&"QA_IN_PAGE_LINK",developer:n.checks.QA_IN_PAGE_LINK.developer||!1})}}n.checks.QA_DOCUMENT&&l?t.push({test:"QA_DOCUMENT",element:i,type:n.checks.QA_DOCUMENT.type||"warning",content:e.sprintf(n.checks.QA_DOCUMENT.content||"QA_DOCUMENT"),inline:!0,dismiss:T(`DOC${o}`),dismissAll:!!n.checks.QA_DOCUMENT.dismissAll&&"QA_DOCUMENT",developer:n.checks.QA_DOCUMENT.developer||!1}):n.checks.QA_PDF&&r&&t.push({test:"QA_PDF",element:i,type:n.checks.QA_PDF.type||"warning",content:e.sprintf(n.checks.QA_PDF.content||"QA_PDF"),inline:!0,dismiss:T(`PDF${o}`),dismissAll:!!n.checks.QA_PDF.dismissAll&&"QA_PDF",developer:n.checks.QA_PDF.developer||!1})}}),n.checks.QA_BLOCKQUOTE&&k.Found.Blockquotes.forEach(s=>{const i=E(s);if(0!==i.length&&i.length<25){const o=p(i);t.push({test:"QA_BLOCKQUOTE",element:s,type:n.checks.QA_BLOCKQUOTE.type||"warning",content:e.sprintf(n.checks.QA_BLOCKQUOTE.content||"QA_BLOCKQUOTE",o),dismiss:T(`BLOCKQUOTE${o}`),dismissAll:!!n.checks.QA_BLOCKQUOTE.dismissAll&&"QA_BLOCKQUOTE",developer:n.checks.QA_BLOCKQUOTE.developer||!1})}}),k.Found.Tables.forEach(s=>{if(!1===d(s)){const i=s.querySelectorAll("th"),o=s.querySelectorAll("h1, h2, h3, h4, h5, h6"),l=T(`TABLE${s.textContent}`);n.checks.TABLES_MISSING_HEADINGS&&0===i.length&&t.push({test:"TABLES_MISSING_HEADINGS",element:s,type:n.checks.TABLES_MISSING_HEADINGS.type||"error",content:e.sprintf(n.checks.TABLES_MISSING_HEADINGS.content||"TABLES_MISSING_HEADINGS"),dismiss:l,dismissAll:!!n.checks.TABLES_MISSING_HEADINGS.dismissAll&&"TABLES_MISSING_HEADINGS",developer:n.checks.TABLES_MISSING_HEADINGS.developer||!1}),n.checks.TABLES_SEMANTIC_HEADING&&o.length>0&&o.forEach(s=>{t.push({test:"TABLES_SEMANTIC_HEADING",element:s,type:n.checks.TABLES_SEMANTIC_HEADING.type||"error",content:e.sprintf(n.checks.TABLES_SEMANTIC_HEADING.content||"TABLES_SEMANTIC_HEADING"),dismiss:l,dismissAll:!!n.checks.TABLES_SEMANTIC_HEADING.dismissAll&&"TABLES_SEMANTIC_HEADING",developer:n.checks.TABLES_SEMANTIC_HEADING.developer||!1})}),i.forEach(s=>{n.checks.TABLES_EMPTY_HEADING&&0===s.textContent.trim().length&&t.push({test:"TABLES_EMPTY_HEADING",element:s,type:n.checks.TABLES_EMPTY_HEADING.type||"error",content:e.sprintf(n.checks.TABLES_EMPTY_HEADING.content||"TABLES_EMPTY_HEADING"),position:"afterbegin",dismiss:l,dismissAll:!!n.checks.TABLES_EMPTY_HEADING.dismissAll&&"TABLES_EMPTY_HEADING",developer:n.checks.TABLES_EMPTY_HEADING.developer||!1})})}}),n.checks.QA_FAKE_HEADING){const s=(s,i)=>{t.push({test:"QA_FAKE_HEADING",element:s,type:n.checks.QA_FAKE_HEADING.type||"warning",content:e.sprintf(n.checks.QA_FAKE_HEADING.content||"QA_FAKE_HEADING",i),dismiss:T(`BOLD${i}`),inline:!0,dismissAll:!!n.checks.QA_FAKE_HEADING.dismissAll&&"QA_FAKE_HEADING",developer:n.checks.QA_FAKE_HEADING.developer||!1})},i=e=>{const t=e.previousElementSibling;if(!t)return!1;return["H1","H2","H3","H4","H5","H6"].includes(t.tagName)},o='h1, h2, h3, h4, h5, h6, [role="heading"][aria-level], blockquote, table',l=e=>{const t=getComputedStyle(e).fontSize.replace("px",""),n=E(e),l=null===n.match(/[.;?!"]/),r=n.length>=4&&n.length<=120;if(t>=24&&!e.closest(o)&&r&&l&&!i(e)){const t=p(n);s(e,t)}},r=e=>{if(/^<\s*(strong|b)(\s+[^>]*)?>/i.test(e.innerHTML.trim())&&!e.closest(o)){const t=e.querySelector("strong, b"),n=E(t),i=null===n.match(/[.:;?!"']/);if(n.length>=3&&n.length<=120&&i){const i=m(e,["strong","b"]).textContent.trim().length;if(0!==i&&i<=250)return;const o=p(n);s(t,o)}}};k.Found.Paragraphs.forEach(e=>{l(e),r(e)})}if(n.checks.QA_FAKE_LIST){const s=new RegExp(/(([023456789][\d\s])|(1\d))/,""),i=new RegExp(/(^[aA1αаΑ]|[^\p{Alphabetic}\s])[-\s.)]/,"u"),o=new RegExp(/\p{Extended_Pictographic}/,"u"),l=["a","A","α","Α","а","А","1"],r=/[([{#]/,a={2:"1",b:"a",B:"A","β":"α","Β":"Α","б":"а","Б":"А"},c=e=>e.replace(/^b|^B|^б|^Б|^β|^В|^2/,e=>a[e]);let d="",h="",p=!1;k.Found.Paragraphs.forEach((a,u)=>{let m=!1,g=!1;h=h||E(a).replace("(","");const A=h.substring(0,2),_=A.match(i),L=A.match(s),f=A.match(o),y=r.test(A.charAt(0));if(A.length>0&&A!==d&&!L&&(_||f||y)){const s=k.Found.Paragraphs[u+1];if(s){if(m=E(s).replace("(","").substring(0,2),l.includes(m?.toLowerCase().trim()))return;const e=c(m);_?"A "!==A&&A===e&&(g=!0):f&&!p&&e.match(o)&&(g=!0,p=!0)}if(!g){let e=a?.querySelector("br")?.nextSibling?.nodeValue;if(e){e=e.replace(/<\/?[^>]+(>|$)/g,"").trim().substring(0,2);(r.test(e.charAt(0))||A===c(e)||!p&&e.match(o))&&(g=!0)}}g?(t.push({test:"QA_FAKE_LIST",element:a,type:n.checks.QA_FAKE_LIST.type||"warning",content:e.sprintf(n.checks.QA_FAKE_LIST.content||"QA_FAKE_LIST",A),dismiss:T(`LIST${a.textContent}`),dismissAll:!!n.checks.QA_FAKE_LIST.dismissAll&&"QA_FAKE_LIST",developer:n.checks.QA_FAKE_LIST.developer||!1}),d=A):d=""}h=m?"":m})}if(n.checks.QA_UPPERCASE){const s=s=>{let i="";"LI"===s.tagName?s.childNodes.forEach(e=>{3===e.nodeType&&(i+=e.textContent)}):i=E(s);const o=i.match(/([A-Z]{2,}[ ])([A-Z]{2,}[ ])([A-Z]{2,}[ ])([A-Z]{2,})/g);o&&o[0].length>10&&t.push({test:"QA_UPPERCASE",element:s,type:n.checks.QA_UPPERCASE.type||"warning",content:e.sprintf(n.checks.QA_UPPERCASE.content||"QA_UPPERCASE"),dismiss:T(`UPPERCASE${i}`),dismissAll:!!n.checks.QA_UPPERCASE.dismissAll&&"QA_UPPERCASE",developer:n.checks.QA_UPPERCASE.developer||!1})};k.Found.Paragraphs.forEach(e=>s(e)),k.Found.Headings.forEach(e=>s(e)),k.Found.Lists.forEach(e=>s(e)),k.Found.Blockquotes.forEach(e=>s(e))}const i=s=>{const i=getComputedStyle(s),{textDecorationLine:o,textAlign:l,fontSize:r}=i,a='a[href], button, abbr, [role="link"], [role="button"], [tabindex="0"], [onclick]';!n.checks.QA_UNDERLINE||!s.closest("u")&&"underline"!==o||s.closest(a)||s.matches(a)||(s=>{t.push({test:"QA_UNDERLINE",element:s,type:n.checks.QA_UNDERLINE.type||"warning",content:e.sprintf(n.checks.QA_UNDERLINE.content||"QA_UNDERLINE"),inline:!0,dismiss:T(`UNDERLINE${s.textContent}`),dismissAll:!!n.checks.QA_UNDERLINE.dismissAll&&"QA_UNDERLINE",developer:n.checks.QA_UNDERLINE.developer||!1})})(s);const c=n.checks.QA_SMALL_TEXT.fontSize||10,d=parseFloat(r),h=!((s.parentElement?parseFloat(getComputedStyle(s.parentElement).fontSize):null)===d)&&d>1&&d<=c;n.checks.QA_SMALL_TEXT&&h&&(s=>{t.push({test:"QA_SMALL_TEXT",element:s,type:n.checks.QA_SMALL_TEXT.type||"warning",content:e.sprintf(n.checks.QA_SMALL_TEXT.content||"QA_SMALL_TEXT"),dismiss:T(`SMALL${s.textContent}`),dismissAll:!!n.checks.QA_SMALL_TEXT.dismissAll&&"QA_SMALL_TEXT",developer:n.checks.QA_SMALL_TEXT.developer||!1})})(s);const p=(s.parentElement?getComputedStyle(s.parentElement).textAlign:null)===l;n.checks.QA_JUSTIFY&&"justify"===l&&!p&&(s=>{t.push({test:"QA_JUSTIFY",element:s,type:n.checks.QA_JUSTIFY.type||"warning",content:e.sprintf(n.checks.QA_JUSTIFY.content||"QA_JUSTIFY"),dismiss:T(`JUSTIFIED${s.textContent}`),dismissAll:!!n.checks.QA_JUSTIFY.dismissAll&&"QA_JUSTIFY",developer:n.checks.QA_JUSTIFY.developer||!1})})(s)};if(n.checks.QA_UNDERLINE||n.checks.QA_JUSTIFY||n.checks.QA_SMALL_TEXT)for(let e=0;e<k.Found.Everything.length;e++){const t=k.Found.Everything[e];0!==Array.from(t.childNodes).filter(e=>3===e.nodeType).map(e=>e.textContent).join("").trim().length&&i(t)}return n.checks.QA_SUBSCRIPT&&k.Found.Subscripts.forEach(s=>{const i=E(s);i.length>=80&&t.push({test:"QA_SUBSCRIPT",element:s,type:n.checks.QA_SUBSCRIPT.type||"warning",content:e.sprintf(n.checks.QA_SUBSCRIPT.content||"QA_SUBSCRIPT"),inline:!0,dismiss:T(s.tagName+i),dismissAll:!!n.checks.QA_SUBSCRIPT.dismissAll&&"QA_SUBSCRIPT",developer:n.checks.QA_SUBSCRIPT.developer||!1})}),n.checks.QA_NESTED_COMPONENTS&&k.Found.NestedComponents.forEach(s=>{const i=n.checks.QA_NESTED_COMPONENTS.sources||'[role="tablist"], details';s.querySelector(i)&&t.push({test:"QA_NESTED_COMPONENTS",element:s,type:n.checks.QA_NESTED_COMPONENTS.type||"warning",content:e.sprintf(n.checks.QA_NESTED_COMPONENTS.content||"QA_NESTED_COMPONENTS"),dismiss:T(`NESTED${s.textContent}`),dismissAll:!!n.checks.QA_NESTED_COMPONENTS.dismissAll&&"QA_NESTED_COMPONENTS",developer:n.checks.QA_NESTED_COMPONENTS.developer||!1})}),t}const X=function(e=[0,0,0,1],t=[0,0,0]){const n=1-e[3];return[e[0]*e[3]+n*t[0],e[1]*e[3]+n*t[1],e[2]*e[3]+n*t[2]]};function J(e){const t=parseInt(e,10);if(!Number.isNaN(t))return t;return{lighter:100,normal:400,bold:700,bolder:900}[e]||400}function Z(e,t){const n=e;let s,i,o,l=1;if(n.startsWith("rgb")){const e=n.match(/[\d.]+/g).map(Number);[s,i,o,l]=4===e.length?e:[...e,1]}else{if(n.startsWith("color(rec2020")||n.startsWith("color(display-p3")||n.startsWith("url("))return"unsupported";const e=document.createElement("canvas").getContext("2d");e.fillStyle=n,e.fillRect(0,0,1,1);const t=e.getImageData(0,0,1,1);[s,i,o,l]=t.data,l=(l/255).toFixed(2)}return t&&t<1&&(l=(l*t).toFixed(2)),[s,i,o,Number(l)]}function ee(e){let t=e;for(;t&&1===t.nodeType;){if(s.Global.shadowDetection){const e=t.getRootNode();if(e instanceof ShadowRoot){let n=t;for(;n&&n!==e.host;){const e=getComputedStyle(n);if(e.backgroundImage&&"none"!==e.backgroundImage)return{type:"image",value:e.backgroundImage};const t=Z(e.backgroundColor);if(0!==t[3]&&"transparent"!==t)return t;n=n.parentElement}return ee(e.host)}}const e=getComputedStyle(t),n=e.backgroundImage;if("none"!==n)return{type:"image",value:n};const i=Z(e.backgroundColor);if(0!==i[3]&&"transparent"!==i){if(i[3]<1){let e=t.parentElement,n="rgba(255, 255, 255, 1)";for(;e&&1===e.nodeType;){if(n=getComputedStyle(e).backgroundColor,"rgba(0, 0, 0, 0)"!==n)break;"rgba(0, 0, 0, 0)"===n&&"HTML"===e.tagName&&(n="rgba(255, 255, 255, 1)"),e=e.parentElement}const s=Z(n||"rgba(255, 255, 255, 1)");return X(i,s)}return i}if("HTML"===t.tagName)return[255,255,255];t=t.parentNode}return[255,255,255]}function te(e){const t=e.slice(0,3).map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*t[0]+.7152*t[1]+.0722*t[2]}function ne(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function se(e){const[t,n,s]=e.map(e=>Math.min(255,Math.max(0,e)));return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}function ie(e){if(s.Global.contrastAPCA)return Math.abs(Number(e.toFixed(1)));const t=Math.trunc(10*e)/10;return`${Number.isInteger(t)?t.toFixed(0):t}:1`}function oe(e,t){let n;const s=X(e,t).slice(0,4);return n=ne(te(s),te(t)),{ratio:n,blendedColor:s}}function le(e,t,n,s=!1){let i;i=s?n?4.5:7:n?3:4.5;const o=te(e),l=te(t),r=o>l?ne(1,l)>i:ne(0,l)<i,a=(e,t,n)=>n?function(e,t){return e.map((e,n)=>{if(n<3){const n=Math.ceil(e+(255-e)*t);return n>=255?255:n}return e})}(e,t):function(e,t){return e.map((e,n)=>{if(n<3){const n=Math.floor(e*(1-t));return n<=0?0:n}return e})}(e,t);let c=e,d=c,h=ne(o,l),p=h,u=e,m=.16;let E=0;for(;m>=.01;){if(E+=1,E>100)return{color:null};c=a(c,m,r);h=ne(te(c),l),h>=i&&(d=h<=p?c:d,p=h,c=u,m*=.5),u=c}return{color:se(d)}}function re(e,t,n,s,i,o,l=!1){return function(e,t,n,s,i,o,l=!1){const{ratio:r,blendedColor:a}=oe(t,n),c=s>=24||s>=18.67&&i>=700;let d;d=l?c?r<4.5:r<7:c?r<3:r>1&&r<4.5;return d?{$el:e,ratio:ie(r),color:a,background:n,fontSize:s,fontWeight:i,isLargeText:c,opacity:o,textUnderline:getComputedStyle(e).textDecorationLine}:null}(e,t,n,s,i,o,l)}const ae=function(e,t,n,s,i=17){return!(e+i<n||e>n+i||t+i<s||t>s+i)};function ce(e){if(b.constrainButtons&&e.closest(b.constrainButtons))return e.closest(b.constrainButtons);let t=e.parentElement;return!(!t||"BODY"===t.tagName)&&(function(e){let t=e.clientHeight&&e.clientHeight<e.scrollHeight;t&&(t="visible"!==window.getComputedStyle(e).overflowY);return t}(t)||(t=ce(t)),t)}function de(){if(!N.panelElement)return!1;"left"===b.panelPosition&&N.panel.classList.add("ed11y-pin-left");let e=0,t=0;k.Found.panelNoCover&&k.Found.panelNoCover.forEach(n=>{let s=n.getBoundingClientRect();e="right"===b.panelPosition?window.innerWidth-s.left>e&&s.left>window.innerWidth/3?window.innerWidth-s.left:e:s.right>e&&e+s.right<window.innerWidth/3?e+s.right:e,t=s.height>t&&s.height+t<window.innerHeight/2?t+s.height:t}),e>0&&e<window.innerWidth-240?(N.panelElement.style.setProperty(b.panelPosition,e+10+"px"),N.panelElement.style.setProperty("bottom",b.panelOffsetY)):e>0&&e>window.innerWidth-240&&t>0?(N.panelElement.style.setProperty(b.panelPosition,b.panelOffsetX),N.panelElement.style.setProperty("bottom",`calc(${b.panelOffsetY} + ${t}px)`)):(N.panelElement.style.setProperty(b.panelPosition,b.panelOffsetX),N.panelElement.style.setProperty("bottom",b.panelOffsetY))}function he(){N.imageAlts?.forEach(e=>{if(!e.mark)return;const t=e.mark;t.style.setProperty("transform",null),t.style.setProperty("height",null),t.style.setProperty("width",null);let n=e.element;"IMG"!==n.tagName&&(n=n.querySelector("img"));let s=t.getBoundingClientRect(),i=n.getBoundingClientRect().left-s.left,o=getComputedStyle(n).height;o="auto"===o?n.offsetHeight:Math.max(n.offsetHeight,parseInt(o)),t.style.setProperty("transform",`translate(${i}px, 0px)`),t.style.setProperty("height",`${o}px`),t.style.setProperty("width",`${n.offsetWidth}px`)})}function pe(e=!1){(e||document.querySelector("[contenteditable]:focus, [contenteditable] :focus"))&&y.activeRange?y.jumpList?.forEach(e=>{const t=e.result.fixedRoot&&y.positionedFrames[e.result.fixedRoot]?y.positionedFrames[e.result.fixedRoot]:{top:0,left:0},n=y.activeRange.getBoundingClientRect(),s={};s.top=n.top+t.top,s.left=n.left+t.left,s.bottom=n.bottom+t.top,s.right=n.right+t.left;const i=e.shadowRoot.querySelector(".toggle");!function(e,t,n=10){return e.left-n<=t.right&&t.left-n<=e.right&&e.top-n<=t.bottom&&t.top-n<=e.bottom}(s,i.getBoundingClientRect(),0)?(e.classList.remove("intersecting","was-intersecting"),i.classList.remove("intersecting","was-intersecting")):i.classList.contains("was-intersecting")||(e.classList.add("intersecting"),i.classList.add("intersecting"))}):y.jumpList?.forEach(e=>{e.classList.remove("intersecting")})}function ue(){if(0===y.jumpList.length)return;y.alignPending=!0,b.fixedRoots&&(y.positionedFrames.length=0,b.fixedRoots.forEach(e=>{e.framePositioner&&y.positionedFrames.push(e.framePositioner.getBoundingClientRect())}));let e=0,t=0;const n=window.scrollY;y.inlineAlerts?(y.jumpList.forEach(e=>{if(e.style.setProperty("transform",null),e.style.setProperty("top","initial"),e.style.setProperty("left","initial"),e.style.transform){let t=window.getComputedStyle(e).getPropertyValue("transform");t=t.split(","),e.xOffset=parseFloat(t[4]),e.yOffset=parseFloat(t[5])}else e.xOffset=0,e.yOffset=0}),y.jumpList.forEach(e=>{e.markOffset=e.getBoundingClientRect(),e.markLeft=e.markOffset.left,e.markTop=e.markOffset.top})):y.jumpList.forEach((e,t)=>{e.result.element.isConnected||(y.forceFullCheck=!0,y.interaction=!0,e.style.display="none");let s=e.result.element.getBoundingClientRect(),i=s.top+n;if(!G(e.result.element)){const t=H(e.result.element);s=t?t.getBoundingClientRect():s,i=s.top+n}let o=s.left;"IMG"===e.result.element.tagName?(i+=10,o+=10):o=y.inlineAlerts?o-34:o,e.result.fixedRoot&&y.positionedFrames[e.result.fixedRoot]&&(i+=y.positionedFrames[e.result.fixedRoot].top,o+=y.positionedFrames[e.result.fixedRoot].left),"IMG"===e.result.element.tagName?(i+=10,o+=10):o=y.inlineAlerts?o-34:o,e.result.scrollableParent?(y.jumpList[t].bounds=e.result.scrollableParent.getBoundingClientRect(),o<y.jumpList[t].bounds.left?o=y.jumpList[t].bounds.left:o+40>y.jumpList[t].bounds.right&&(o=y.jumpList[t].bounds.right-40)):e.result.fixedRoot&&y.positionedFrames[e.result.fixedRoot]&&(y.jumpList[t].bounds=y.positionedFrames[e.result.fixedRoot],o<y.jumpList[t].bounds.left?o=y.jumpList[t].bounds.left:o+40>y.jumpList[t].bounds.right&&(o=y.jumpList[t].bounds.right-40)),y.jumpList[t].targetOffset=s,y.jumpList[t].markTop=i,y.jumpList[t].markLeft=o}),y.jumpList.forEach((s,i)=>{let o=10,l="IMG"===s.result.element.tagName?10:-34;s.markTop+n<0&&(o=-1*(s.markTop+n)-6),(i>0&&ae(s.markLeft,s.markTop,y.jumpList[i-1].markLeft,y.jumpList[i-1].markTop)||i>1&&ae(s.markLeft,s.markTop,y.jumpList[i-2].markLeft,y.jumpList[i-2].markTop)||i>2&&ae(s.markLeft,s.markTop,y.jumpList[i-3].markLeft,y.jumpList[i-3].markTop))&&(o=o+14+e,l=14+t);let r=0,a=window.innerWidth;if(s.result.scrollableParent){const e=s.result.scrollableParent.getBoundingClientRect();r=e.left,a=r+e.width}else s.result.fixedRoot&&y.positionedFrames[s.result.fixedRoot]&&(r=y.positionedFrames[s.result.fixedRoot].left,a=y.positionedFrames[s.result.fixedRoot].right);let c=!1;s.markLeft+l-r<44?(l=44-s.markLeft+l+r,c=!0):s.markLeft+l+80>a?(c=!0,l=a-l-s.markLeft-100):0!==o&&(c=!0),y.inlineAlerts?function(e,t,n){if(e.style.transform){let s=window.getComputedStyle(e).getPropertyValue("transform");s=s.split(","),e.style.transform=`translate(${parseFloat(s[4])+t}px, ${parseFloat(s[5])+n}px)`}else e.style.transform=`translate(${t}px, ${n}px)`}(s,l,o):s.style.transform=c?`translate(${s.markLeft+l}px, ${s.markTop+o}px)`:`translate(${s.markLeft}px, ${s.markTop}px)`,s.nudgeLeft=l,s.nudgeTop=o,e=o,t=l}),y.inlineAlerts||y.jumpList.forEach(e=>{e.result.scrollableParent?e.bounds&&(e.targetOffset.top-e.bounds.top<0||e.targetOffset.top-e.bounds.bottom>0)&&!e.matches(':focus, :focus-within, [data-ed11y-open="true"]')?(e.classList.add("ed11y-offscreen"),e.style.transform="translate(0px, -50px)",e.style.pointerEvents="none","true"===e.getAttribute("data-ed11y-open")&&e.setAttribute("data-ed11y-action","shut")):(e.classList.remove("ed11y-offscreen"),e.style.pointerEvents="auto"):e.result.fixedRoot&&y.positionedFrames[e.result.fixedRoot]&&e.bounds&&(e.targetOffset.top<-40||e.targetOffset.top+e.bounds.top-e.bounds.bottom>-10)&&!e.matches(':focus, :focus-within, [data-ed11y-open="true"]')?(e.classList.add("ed11y-offscreen"),e.style.transform="translate(0px, -50px)",e.style.pointerEvents="none","true"===e.getAttribute("data-ed11y-open")&&e.setAttribute("data-ed11y-action","shut")):(e.classList.remove("ed11y-offscreen"),e.style.pointerEvents="auto")}),y.jumpList?.forEach(e=>{e.classList.remove("ed11y-preload")})}function me(e){y.incremental||window.setTimeout(function(){document.dispatchEvent(new CustomEvent("ed11yResults",{detail:{results:e}}))},0)}function Ee(e){const t=e?y.splitConfiguration.results:S;for(let n=t.length-1;n>=0;n--){let i=!1;if("READABILITY"===t[n].test){if(y.readability=t[n],y.visualizing){const e=s.Panel.readabilityInfo?.querySelector(".readability-score");if(e){const s="GOOD"===t[n].difficultyToken?"readability-score":"readability-score ed11y-warning";e.setAttribute("class",s)}}i=!0}else"META_TITLE"===t[n].test?k.Found.Headings.length>0&&(e?y.splitConfiguration.results.element=k.Found.Everything[0]:S[n].element=k.Found.Everything[0]):t[n].element&&"good"!==t[n].type?b.currentPage in y.dismissedAlerts&&t[n].test in y.dismissedAlerts[b.currentPage]&&t[n].dismiss in y.dismissedAlerts[b.currentPage][t[n].test]&&(e?y.splitConfiguration.results.dismissalStatus=!0:S.dismissalStatus=!0):i=!0;i&&(e?y.splitConfiguration.results.splice(n,1):S.splice(n,1))}return t}function ge(t){const n=function(e,t){const n=[],s=[".","?","!"];e.forEach(e=>{const t=e[e.length-1],i=s.includes(t)?e:`${e}.`;n.push(i)});const i=n.join(" ");if(0===i.length)return null;if(["en","es","fr","de","nl","it","pt"].includes(t)){const e=e=>{let t=e;if(t=t.toLowerCase().replace(".","").replace("\n",""),t.length<=3)return 1;t=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,""),t=t.replace(/^y/,"");const n=t.match(/[aeiouy]{1,2}/g);let s=0;return n&&(s=n.length),s},n=i.replace(/[.!?-]+/g," ").split(" ");let s=0;for(let e=0;e<n.length;e++)0!=n[e]&&(s+=1);const o=i.split(/[.!?]+/);let l=0;for(let e=0;e<o.length;e++)""!==o[e]&&(l+=1);let r=0,a=0,c=0;for(let t=0;t<n.length;t++)if(0!=n[t]){const s=e(n[t]);1===s&&(a+=1),2===s&&(c+=1),r+=s}let d=!1;"en"===t?d=206.835-s/l*1.015-r/s*84.6:"fr"===t?d=207-s/l*1.015-r/s*73.6:"es"===t?d=206.84-s/l*1.02-r/s*100*.6:"de"===t?d=180-s/l-r/s*58.5:"nl"===t?d=206.84-r/s*100*.77-s/l*.93:"it"===t?d=217-s/l*1.3-r/s*100*.6:"pt"===t&&(d=248.835-s/l*1.015-r/s*84.6),d>100?d=100:d<0&&(d=0);const h=Number(d.toFixed(1));let p;return p=h>=0&&h<30?"VERY_DIFFICULT":h>31&&h<49?"DIFFICULT":h>50&&h<60?"FAIRLY_DIFFICULT":"GOOD",{score:h,averageWordsPerSentence:Number((s/l).toFixed(1)),complexWords:Math.round((s-(a+c))/s*100),difficultyToken:p,wordCount:s,charCount:i.length}}if(["sv","fi","da","no","nb","nn"].includes(t)){const e=()=>i.split(/\?|!|\.|\n/g).filter(Boolean),t=i.replace(/[-'.]/gi,"").split(/[^a-zA-ZöäåÖÄÅÆæØø0-9]/g).filter(Boolean),n=t.length,s=t.filter(e=>e.length>6).length,o=e().length||1,l=Math.round(n/o+100*s/n);let r;return r=l>=0&&l<39?"GOOD":l>40&&l<50?"FAIRLY_DIFFICULT":l>51&&l<61?"DIFFICULT":"VERY_DIFFICULT",{score:l,averageWordsPerSentence:Number((n/o).toFixed(1)),complexWords:Math.round(s/n*100),difficultyToken:r,wordCount:n,charCount:i.length}}return null}(k.Found.Readability.map(e=>E(m(e))).filter(Boolean),s.Readability.Lang);let i;return n&&(i={test:"READABILITY",difficultyLevel:e._(n.difficultyToken),...n},t.push(i)),!1===s.Global.headless&&(n&&i.wordCount>30?(s.Panel.readabilityInfo.innerHTML=`${Math.ceil(i.score)} <span class="readability-score">${i.difficultyLevel}</span>`,s.Panel.readabilityDetails.innerHTML=`<li><strong>${e._("AVG_SENTENCE")}</strong> ${Math.ceil(i.averageWordsPerSentence)}</li><li><strong>${e._("COMPLEX_WORDS")}</strong> ${i.complexWords}%</li><li><strong>${e._("TOTAL_WORDS")}</strong> ${i.wordCount}</li>`):s.Panel.readabilityInfo.innerHTML=`<br>${e._("READABILITY_NOT_ENOUGH")}`),t}const Ae=function(){let t=N.panel.querySelector("#ed11y-alt-list");if(N.imageAlts=[],k.Found.Images.forEach(e=>{const t=S.find(t=>t.element===e);t?N.imageAlts.push({element:e,type:t.type,dismiss:t.dismiss,developer:t.developer}):N.imageAlts.push({element:e,type:"pass"})}),N.imageAlts.length>0){t.innerHTML="";for(let n=0;n<N.imageAlts.length;n++){const s=N.imageAlts[n];let i="noAria"===l(s.element)?h(s.element.getAttribute("alt")):l(s.element);if(N.imageAlts[n].altText=i,y.inlineAlerts){const e=document.createElement("ed11y-element-alt");e.classList.add("ed11y-element"),e.dataset.ed11yImg=n.toString(),e.setAttribute("id","ed11y-alt-"+n),e.setAttribute("tabindex","-1"),N.imageAlts[n].mark=e,s.element.insertAdjacentElement("beforebegin",e)}let o=document.createElement("span");if(""!==i)o.textContent=i;else{const t=document.createElement("span");t.classList.add("ed11y-decorative"),t.textContent=e._("DECORATIVE"),o.append(t)}let r=document.createElement("li");r.classList.add("ed11y-"+s.type);let a=document.createElement("img");if(a.setAttribute("src",L(s.element)),a.setAttribute("alt",""),y.inlineAlerts){let e=document.createElement("a");e.href="#ed11y-alt-"+n,e.classList.add("alt-parent"),r.append(e),e.append(a),e.append(o)}else r.classList.add("alt-parent"),r.append(a),r.append(o);t.append(r)}y.inlineAlerts?he():N.imageAlts.length=0}else{const n=document.createElement("p"),s=document.createElement("em");s.textContent=e._("NO_IMAGES"),n.appendChild(s),t.innerHTML="",t.appendChild(n)}};function _e(){if(N.panel){if(y.inlineAlerts){const e=w("ed11y-element-heading-label, ed11y-element-alt, ed11y-element-highlight","document",[]);e?.forEach(e=>e.remove())}if(y.visualizing)return y.visualizing=!1,N.panel.querySelector("#ed11y-visualize .ed11y-sr-only").textContent=e._("PANEL_HEADING"),N.panel.querySelector("#ed11y-visualize").setAttribute("data-ed11y-pressed","false"),void N.panel.querySelector("#ed11y-visualizers").setAttribute("hidden","true");y.visualizing=!0,N.panel.querySelector("#ed11y-visualize .ed11y-sr-only").textContent=e._("buttonToolsActive"),N.panel.querySelector("#ed11y-visualize").setAttribute("data-ed11y-pressed","true"),N.panel.querySelector("#ed11y-visualizers").removeAttribute("hidden"),Ae(),Le(),b.readabilityPlugin&&Te()}}const Te=function(){ge(S);for(let e=S.length-1;e>=0;e--)S[e].element||S.splice(e,1)};function Le(){let t=N.panel.querySelector("#ed11y-outline");y.headingOutline.length?(t.innerHTML="",y.headingOutline.forEach((e,n)=>{if(y.inlineAlerts){const t=document.createElement("ed11y-element-heading-label");t.classList.add("ed11y-element","ed11y-element-heading"),t.dataset.ed11yHeadingOutline=n.toString(),t.setAttribute("id","ed11y-heading-"+n),t.setAttribute("tabindex","-1"),e.element.insertAdjacentElement("afterbegin",t),N.attachCSS(t.shadowRoot)}let s=10*e.headingLevel-10,i=document.createElement("li");i.classList.add("level"+e.headingLevel),i.style.setProperty("margin-left",s+"px");let o=document.createElement("strong");o.textContent=`H${e.headingLevel}: `;let l=document.createElement("span");l.innerHTML=e.text;let r=document.createElement("a");y.inlineAlerts?(r.setAttribute("href","#ed11y-heading-"+n),i.append(r),r.append(o),r.append(l)):(i.append(o),i.append(l)),e.type&&i.classList.add(`ed11y-${e.type}`),t.append(i)})):t.innerHTML=`<p><em>${e._("PANEL_NO_HEADINGS")}</em></p>`}function fe(){Ne(),document.dispatchEvent(new CustomEvent("ed11yPanelOpened")),ue(),y.inlineAlerts||(pe(),k.Found.editable?.forEach(e=>{Pe(e)}),Pe(document),document.addEventListener("selectionchange",function(){y.running||De()},{passive:!0}))}const ye=function(e){e.preventDefault(),y.toggledFrom=e.target.closest("button"),y.showPanel?ke():(We(),window.setTimeout(function(){ke()},500))};function Ie(){if($(),y.incremental){if(!y.forceFullCheck&&!function(){if(y.forceFullCheck||S.length!==y.oldResults.length)return!0;let e=`${y.errorCount} ${y.warningCount}`;S.forEach(t=>{e+=t.test+t.element.outerHTML});let t=e!==y.oldResultString;return y.oldResultString=e,t}())return S.push(y.oldResults),y.alignPending||(ue(),de(),y.alignPending=!1),y.running=!1,void W();y.forceFullCheck=!1,Y(!0)}else y.totalCount>0?(y.seen[encodeURI(b.currentPage)]=y.totalCount,localStorage.setItem("editoria11yResultCount",JSON.stringify(y.seen))):delete y.seen[encodeURI(b.currentPage)];if(!b.headless){if(y.bodyStyle||function(){if(!b.cssUrls){const e=document.querySelector('link[href*="editoria11y.css"], link[href*="editoria11y.min.css"]');e?b.cssUrls=[e.getAttribute("href")]:(console.warn("Editoria11y CSS file parameter is missing; attempting to load from CDN."),b.cssUrls=[`https://cdn.jsdelivr.net/gh/itmaybejj/editoria11y@${y.version}/dist/editoria11y.min.css`])}for(const[e,t]of Object.entries(I))document.documentElement.style.setProperty("--ed11y-"+e,`${t}`);document.querySelector("body")&&N.attachCSS(document.querySelector("body"));y.roots.forEach(e=>{b.shadowComponents&&e.querySelectorAll(b.shadowComponents)?.forEach(e=>{e.shadowRoot&&N.attachCSS(e.shadowRoot)})}),y.bodyStyle=!0}(),!0===y.onLoad){if(y.onLoad=!1,N.panelElement=document.createElement("ed11y-element-panel"),N.panelElement.classList.add("ed11y-preload"),document.body.appendChild(N.panelElement),N.panel=N.panelElement.shadowRoot.getElementById("ed11y-panel"),N.attachCSS(N.panel),N.panelToggle=N.panel.querySelector("#ed11y-toggle"),N.panelToggleTitle=N.panel.querySelector("#ed11y-toggle .ed11y-sr-only"),N.panelCount=N.panel.querySelector(".toggle-count"),N.panelJumpNext=N.panel.querySelector(".ed11y-jump.next"),N.panelJumpNext.addEventListener("click",ye),N.panelShowDismissed=N.panel.querySelector("#ed11y-show-hidden"),N.message=N.panel.querySelector("#ed11y-message"),b.readabilityPlugin){const t=document.createElement("details");t.id="ed11y-readability-tab",t.innerHTML='\n <summary>\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" aria-hidden="true"><path fill="currentColor" d="M528.3 46.5l-139.8 0c-48.1 0-89.9 33.3-100.4 80.3-10.6-47-52.3-80.3-100.4-80.3L48 46.5C21.5 46.5 0 68 0 94.5L0 340.3c0 26.5 21.5 48 48 48l89.7 0c102.2 0 132.7 24.4 147.3 75 .7 2.8 5.2 2.8 6 0 14.7-50.6 45.2-75 147.3-75l89.7 0c26.5 0 48-21.5 48-48l0-245.7c0-26.4-21.3-47.9-47.7-48.1zM242 311.9c0 1.9-1.5 3.5-3.5 3.5l-160.3 0c-1.9 0-3.5-1.5-3.5-3.5l0-22.9c0-1.9 1.5-3.5 3.5-3.5l160.4 0c1.9 0 3.5 1.5 3.5 3.5l0 22.9-.1 0zm0-60.9c0 1.9-1.5 3.5-3.5 3.5l-160.3 0c-1.9 0-3.5-1.5-3.5-3.5l0-22.9c0-1.9 1.5-3.5 3.5-3.5l160.4 0c1.9 0 3.5 1.5 3.5 3.5l0 22.9-.1 0zm0-60.9c0 1.9-1.5 3.5-3.5 3.5l-160.3 0c-1.9 0-3.5-1.5-3.5-3.5l0-22.9c0-1.9 1.5-3.5 3.5-3.5l160.4 0c1.9 0 3.5 1.5 3.5 3.5l0 22.9-.1 0zM501.3 311.8c0 1.9-1.5 3.5-3.5 3.5l-160.3 0c-1.9 0-3.5-1.5-3.5-3.5l0-22.9c0-1.9 1.5-3.5 3.5-3.5l160.4 0c1.9 0 3.5 1.5 3.5 3.5l0 22.9-.1 0zm0-60.9c0 1.9-1.5 3.5-3.5 3.5l-160.3 0c-1.9 0-3.5-1.5-3.5-3.5l0-22.9c0-1.9 1.5-3.5 3.5-3.5l160.4 0c1.9 0 3.5 1.5 3.5 3.5l0 22.9-.1 0zm0-60.9c0 1.9-1.5 3.5-3.5 3.5l-160.3 0c-1.9 0-3.5-1.5-3.5-3.5l0-22.8c0-1.9 1.5-3.5 3.5-3.5l160.4 0c1.9 0 3.5 1.5 3.5 3.5l0 22.8-.1 0z"/></svg> <span class="summary-title"></span>\n </summary>\n <div class="details">\n\t\t\t\t\t\t\t<div id="readability-content">\n\t\t\t\t\t\t\t\t<p id="readability-info"></p>\n\t\t\t\t\t\t\t\t<ul id="readability-details"></ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>',N.panel.querySelector("#ed11y-visualizers").appendChild(t),N.panel.querySelector("#readability-info").appendChild(s.Panel.readabilityInfo),N.panel.querySelector("#readability-details").appendChild(s.Panel.readabilityDetails),N.panel.querySelector("#ed11y-readability-tab .summary-title").textContent=e._("READABILITY")}if(window.setTimeout(()=>{N.panelElement.classList.remove("ed11y-preload")},0,N.panel),N.panel.querySelector("#ed11y-visualize .ed11y-sr-only").textContent=e._("PANEL_HEADING"),N.panel.querySelector("#ed11y-headings-tab .summary-title").textContent=e._("OUTLINE"),N.panel.querySelector("#ed11y-alts-tab .summary-title").textContent=e._("IMAGES"),y.english&&(N.panel.querySelector("#ed11y-headings-tab .details-title").innerHTML=e._("panelCheckOutline"),N.panel.querySelector("#ed11y-alts-tab .details-title").innerHTML=e._("panelCheckAltText")),N.panel.querySelector(".jump-next.ed11y-sr-only").textContent=y.english?e._("buttonFirstContent"):e._("SKIP_TO_ISSUE")+" 1",N.panel.setAttribute("aria-label",e._("CONTAINER_LABEL")),b.reportsURL){let t=document.createElement("a");t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M0 96C0 61 29 32 64 32l384 0c35 0 64 29 64 64l0 320c0 35-29 64-64 64L64 480c-35 0-64-29-64-64L0 96zm64 0l0 64 64 0 0-64L64 96zm384 0L192 96l0 64 256 0 0-64zM64 224l0 64 64 0 0-64-64 0zm384 0l-256 0 0 64 256 0 0-64zM64 352l0 64 64 0 0-64-64 0zm384 0l-256 0 0 64 256 0 0-64z"/></svg><span class="ed11y-sr-only"></span>',t.setAttribute("id","ed11y-reports-link"),t.setAttribute("href",b.reportsURL),t.setAttribute("target","_blank"),t.setAttribute("aria-label",e._("reportsLink")),t.querySelector(".ed11y-sr-only").textContent=e._("reportsLink"),N.panelShowDismissed.insertAdjacentElement("beforebegin",t)}const t=function(e){27===e.keyCode&&(e.target.closest("ed11y-element-panel")&&"true"===N.panelToggle.getAttribute("aria-expanded")?(N.panelToggle.focus(),N.panelToggle.click()):e.target.hasAttribute("data-ed11y-open")&&y.tipOpen&&(y.toggledFrom?.focus(),y.openTip.button.shadowRoot.querySelector("button").click()))};document.addEventListener("keyup",function(e){t(e)}),y.ignoreAll||!y.inlineAlerts&&y.totalCount>75?y.showPanel=!1:("active"===b.alertMode||!b.userPrefersShut||y.showDismissed||y.totalCount>0&&!y.ignoreAll&&("assertive"===b.alertMode||"polite"===b.alertMode&&y.seen[encodeURI(b.currentPage)]!==y.totalCount))&&(y.showPanel=!0)}else y.inlineAlerts||(y.oldResultString=`${y.errorCount} ${y.warningCount}`,S.forEach(e=>{y.oldResultString+=e.test+e.element.outerHTML}));if(y.showPanel){y.showPanel=!0,N.panel.classList.remove("ed11y-shut"),N.panel.classList.add("ed11y-active");const t=y.dismissedCount>1?e.sprintf("buttonHideHiddenAlerts",y.dismissedCount):e._("buttonHideHiddenAlert");if(0===y.dismissedCount)N.panelShowDismissed.setAttribute("hidden",""),N.panelShowDismissed.setAttribute("data-ed11y-pressed","false"),y.showDismissed=!1;else if(1===y.dismissedCount){const n=y.english?e._("buttonShowHiddenAlert"):e.sprintf("PANEL_DISMISS_BUTTON","1");N.panelShowDismissed.querySelector(".ed11y-sr-only").textContent=y.showDismissed?t:n,N.panelShowDismissed.dataset.ed11yPressed=`${y.showDismissed}`,y.english||(N.panelShowDismissed.ariaPressed=y.showDismissed),N.panelShowDismissed.removeAttribute("hidden")}else N.panelShowDismissed.querySelector(".ed11y-sr-only").textContent=y.showDismissed?t:e.sprintf("PANEL_DISMISS_BUTTON",y.dismissedCount),N.panelShowDismissed.dataset.ed11yPressed=`${y.showDismissed}`,y.english||(N.panelShowDismissed.ariaPressed=y.showDismissed),N.panelShowDismissed.removeAttribute("hidden");window.setTimeout(function(){y.ignoreAll||requestAnimationFrame(()=>fe())},0)}else ze();y.totalCount>0||y.showDismissed&&y.dismissedCount>0?(N.panelToggleTitle.textContent=e._("MAIN_TOGGLE_LABEL"),N.panelToggle.ariaExpanded=`${y.showPanel}`,N.panelJumpNext.removeAttribute("hidden"),y.errorCount>0?(N.panel.classList.remove("ed11y-warnings","ed11y-pass"),N.panel.classList.add("ed11y-errors"),document.documentElement.style.setProperty("--ed11y-activeBackground",I.alert),document.documentElement.style.setProperty("--ed11y-activeColor","#fff"),document.documentElement.style.setProperty("--ed11y-activeBorder","#fff7"),document.documentElement.style.setProperty("--ed11y-activePanelBorder","#def")):y.warningCount>0?(N.panel.classList.remove("ed11y-errors","ed11y-pass"),N.panel.classList.add("ed11y-warnings"),document.documentElement.style.setProperty("--ed11y-activeBackground",I.warning),document.documentElement.style.setProperty("--ed11y-activeColor","#111"),document.documentElement.style.setProperty("--ed11y-activeBorder","#947605"),document.documentElement.style.setProperty("--ed11y-activePanelBorder","#947605")):(N.panel.classList.remove("ed11y-errors","ed11y-warnings"),N.panel.classList.add("ed11y-pass"),document.documentElement.style.setProperty("--ed11y-activeBackground",I.panelBar),document.documentElement.style.setProperty("--ed11y-activeColor",I.panelBarText),document.documentElement.style.setProperty("--ed11y-activeBorder",I.panelBarText+"44"),document.documentElement.style.setProperty("--ed11y-activePanelBorder",I.panelBarText+"88")),y.dismissedCount>0&&0===y.totalCount?N.panelCount.textContent=y.dismissedCount:N.panelCount.textContent=y.totalCount>99?"99+":y.totalCount):(N.panelJumpNext.setAttribute("hidden",""),document.documentElement.style.setProperty("--ed11y-activeBackground",I.panelBar),document.documentElement.style.setProperty("--ed11y-activeColor",I.panelBarText),document.documentElement.style.setProperty("--ed11y-activeBorder",I.panelBarText+"44"),document.documentElement.style.setProperty("--ed11y-activePanelBorder",I.panelBarText+"88"),N.panelCount.style.display="display: none;",N.panel.classList.remove("ed11y-warnings","ed11y-errors"),N.panel.classList.add("ed11y-pass"),y.dismissedCount>0?(N.panelCount.textContent="i",y.showPanel?N.panelToggleTitle.textContent=e._("MAIN_TOGGLE_LABEL"):N.panelToggleTitle.textContent=y.dismissedCount>1?e.sprintf("PANEL_DISMISS_BUTTON",y.dismissedCount):e._("buttonShowHiddenAlert")):N.panelToggleTitle.textContent=e._("MAIN_TOGGLE_LABEL")),N.panelToggle.classList.remove("disabled"),N.panelToggle.removeAttribute("aria-disabled"),de(),N.panel.classList.remove("ed11y-preload")}W(),y.running=!1}function Ne(){y.jumpList=[],$(),S.forEach(function(e){let t=e.element.getBoundingClientRect().top;if(!t){const n=H(e.element);n&&(t=n.getBoundingClientRect().top)}if(t+=window.scrollY,b.fixedRoots){const t=e.element.closest("[data-ed11y-root]");e.fixedRoot=t.dataset.ed11yRoot}e.scrollableParent=ce(e.element),e.scrollableParent&&(t*=1e-6),e.sortPos=t}),S.sort((e,t)=>t.sortPos-e.sortPos),S?.forEach(function(t,n){S[n].dismissalStatus&&!y.showDismissed||function(t,n){let s=document.createElement("ed11y-element-result");s.classList.add("ed11y-element"),s.setAttribute("id","ed11y-result-"+n),s.setAttribute("data-ed11y-result",n),s.setAttribute("data-ed11y-open","false"),y.inlineAlerts?t.element.insertAdjacentElement(t.position,s):(s.classList.add("ed11y-editable-result"),y.panelAttachTo.insertAdjacentElement("beforeend",s));const i=s.attachShadow({mode:"open"});s.resultID=s.dataset.ed11yResult,s.result=S[s.resultID],s.wrapper=document.createElement("div"),s.dismissable="error"!==s.result.type,s.dismissed=!!s.result.dismissalStatus,s.wrapper.classList.add("ed11y-wrapper","ed11y-result-wrapper"),s.wrapper.style.setProperty("opacity","0"),s.wrapper.classList.add("ed11y-result"),s.toggle=document.createElement("button"),s.toggle.setAttribute("class","toggle");let o=s.dismissable?e._("WARNING"):e._("ERROR");s.toggle.setAttribute("aria-label",o),s.toggle.setAttribute("aria-expanded","false"),s.toggle.setAttribute("aria-haspopup","dialog"),s.toggle.setAttribute("data-ed11y-result",s.dataset.ed11yResult),s.toggle.setAttribute("data-ed11y-ready","false"),s.toggle.setAttribute("data-ed11y-race","false"),y.inlineAlerts||s.toggle.style.setProperty("font-size","16px"),s.dismissed?(s.toggle.innerHTML='<svg aria-hidden="true" width="10" class="hidden" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="Currentcolor" d="M39 5C28-3 13-1 5 9S-1 35 9 43l592 464c10 8 26 6 34-4s6-26-4-34L526 387c39-41 66-86 78-118c3-8 3-17 0-25c-15-36-46-88-93-131C466 69 401 32 320 32c-68 0-125 26-169 61L39 5zM223 150C249 126 283 112 320 112c80 0 144 65 144 144c0 25-6 48-17 69L408 295c8-19 11-41 5-63c-11-42-48-69-89-71c-6-0-9 6-7 12c2 6 3 13 3 20c0 10-2 20-7 28l-90-71zM373 390c-16 7-34 10-53 10c-80 0-144-65-144-144c0-7 1-14 1-20L83 162C60 191 44 221 35 244c-3 8-3 17 0 25c15 36 46 86 93 131C175 443 239 480 320 480c47 0 89-13 126-33L373 390z"/></svg>',s.toggle.classList.add("dismissed"),"ok"!==s.result.dismissalStatus?s.toggle.classList.add("notok"):s.toggle.classList.add("ok")):s.dismissable&&s.toggle.classList.add("dismissable"),s.wrapper.appendChild(s.toggle),s.toggle.addEventListener("click",s.toggleClick),s.toggle.addEventListener("focus",s.handleFocus),s.toggle.addEventListener("mouseover",s.handleHover),s.tipNeedsBuild=!0,N.attachCSS(s.wrapper),i.appendChild(s.wrapper),y.jumpList.unshift(s),S[n].toggle=s}(t,n)}),y.jumpList.forEach((t,n)=>{t.dataset.ed11yJumpPosition=`${n}`;const s=`${e._("ALERT_TEXT")} ${n+1} / ${y.jumpList.length-1}, ${t.shadowRoot.querySelector(".toggle").getAttribute("aria-label")}`;t.shadowRoot.querySelector(".toggle").setAttribute("aria-label",s)});let t=new CustomEvent("ed11yResultsPainted");document.dispatchEvent(t),W()}function Se(e,t,n){if("reset"===e)delete y.dismissedAlerts[b.currentPage][t][n],0===Object.keys(y.dismissedAlerts[b.currentPage][t]).length&&delete y.dismissedAlerts[b.currentPage][t],0===Object.keys(y.dismissedAlerts[b.currentPage]).length&&delete y.dismissedAlerts[b.currentPage];else{let s={};if(s[n]=e,void 0===y.dismissedAlerts[b.currentPage]){let e={};e[t]=s,y.dismissedAlerts[b.currentPage]=e}else void 0===y.dismissedAlerts[b.currentPage][t]?y.dismissedAlerts[b.currentPage][t]=s:y.dismissedAlerts[b.currentPage][t][n]=e;N.panelShowDismissed.removeAttribute("hidden")}!1===b.syncedDismissals&&localStorage.setItem("ed11ydismissed",JSON.stringify(y.dismissedAlerts));let s={dismissPage:b.currentPage,dismissTest:t,dismissKey:n,dismissAction:e},i=new CustomEvent("ed11yDismissalUpdate",{detail:s});window.setTimeout(()=>{document.dispatchEvent(i)},100)}function be(e,t,n){if(!t)return void N.editableHighlight[e]?.highlight.style.setProperty("opacity","0");const s=S[e];let i=N.editableHighlight[e]?.highlight;i||(i=document.createElement("ed11y-element-highlight"),i.classList.add("ed11y-element"),N.editableHighlight[e]={highlight:i,resultID:e},i.style.setProperty("position","absolute"),i.style.setProperty("pointer-events","none"),y.panelAttachTo.appendChild(i)),N.editableHighlight[e].target=n||s.element;const o=s.dismissalStatus?"calc(var(--ed11y-buttonZIndex, 9999) - 2)":"calc(var(--ed11y-buttonZIndex, 9999) - 1)";i.style.setProperty("z-index",o);const l="warning"===s.type?"0 0 0 1px #fff, inset 0 0 0 2px var(--ed11y-warning, #fad859), 0 0 0 3px var(--ed11y-warning, #fad859), 0 0 0 4px var(--ed11y-primary)":"0 0 0 1px #fff, inset 0 0 0 2px var(--ed11y-alert, #b80519), 0 0 0 3px var(--ed11y-alert, #b80519), 0 0 1px 3px";i.style.setProperty("box-shadow",l),i.style.setProperty("border-radius","3px"),i.style.setProperty("top","0"),i.style.setProperty("left","0"),Re(),i.style.setProperty("opacity","1")}function ke(t=!0){if(!y.showPanel)return!1;y.viaJump=!0;let n=y.jumpList.length-1,s=t?+y.lastOpenTip+1:+y.lastOpenTip-1;if(s<0)y.nextText=e._("SKIP_TO_ISSUE"),s=n;else if(s>n)s=0,y.nextText=e._("SKIP_TO_ISSUE");else{const t=isNaN(s)?2:s+2;y.nextText=e._("SKIP_TO_ISSUE")+" "+t}y.lastOpenTip=s,window.setTimeout(function(){N.panelJumpNext.querySelector(".ed11y-sr-only").textContent=y.nextText},250),x(["ed11y-hidden-highlight"]),0===y.jumpList.length&&Ne();let i=y.jumpList[s];i||(i=y.jumpList[0],y.lastOpenTip=0);let o=i.getAttribute("data-ed11y-result");const l=S[o].element;let r=window.innerHeight>900||window.innerWidth>800&&window.innerHeight>600?"center":"start",a=y.inlineAlerts?i:l;if(!i.dataset.ed11yHiddenResult&&G(a)||(a=H(l)),!a||"function"!=typeof a.scrollIntoView)return qe(),!1;a.scrollIntoView({block:r,behavior:"instant"}),i.setAttribute("data-ed11y-action","open"),y.scrollPending=2,ve()}const Ce=P(()=>{y.running||y.alignPending?Ce():(y.scrollPending++,ve(),y.alignPending=!1)},10);function we(e,t,n=0,s=!1){if(!t)return;let i=t.shadowRoot.querySelector(".arrow"),o=i.nextElementSibling,l=n-1;n>0&&window.setTimeout(function(){requestAnimationFrame(()=>we(e,t,l,s))},200/l,e,t,l,s),s&&window.setTimeout(()=>{t.style.setProperty("opacity","1")},140,t,o);const r=e.getRootNode().host,a=e.dataset.ed11yResult,c=S[a],d=window.scrollY;let h=y.inlineAlerts?window.scrollX:0,p=e.getBoundingClientRect(),u=p.width,m=p.left+h,E=p.top+d,g=d,A=0,_=window.innerWidth,T=window.innerHeight+d,L=T;if(!y.inlineAlerts&&c.scrollableParent){let e=c.scrollableParent.getBoundingClientRect();e.width>0&&(A=Math.max(0,e.left),_=Math.min(_,e.width-30),T=e.bottom+d,g=e.top+d,L=e.top+c.scrollableParent.scrollHeight)}else if("true"===r.dataset.ed11yHiddenResult||!(G(r)||0===p.top&&0===p.left)){const e=H(r.result.element);e?(p=e.getBoundingClientRect(),m=p.left,E=p.top):o.style.setProperty("max-width","none"),u=window.innerWidth>800?38:33}document.documentElement.style.setProperty("--ed11y-buttonWidth",u+"px"),o.style.setProperty("max-width",`min(${_>280?_:280}px, 90vw)`);const f=Math.min(window.innerWidth,A+_);t.style.setProperty("top",p.top+d+"px"),t.style.setProperty("left",p.left+h+"px");const I=o.offsetWidth,N=o.offsetHeight;let b="under";0===E&&0===m?b="whompWhomp":E+N+d+u+22>T&&(f>u+I+m+30&&g+N+30<T?b="right":E-N-15>g?b="above":A<m-(u+I+30)&&g+N+30<T?b="left":E+N+u>L&&(b="above")),i.dataset.direction=b;let k=0,C=0;const w=function(e,t,n,s){let i=e-(t+n+u);return i<0?"horizontal"===s&&t+i<0?Math.max(0-t,4-n):Math.max(i,u+10-n):0};switch(b){case"under":k=w(f,m,I,"horizontal"),i.style.setProperty("top",u+"px"),i.style.setProperty("right","auto"),i.style.setProperty("bottom","auto"),i.style.setProperty("left",u/2-10+"px"),o.style.setProperty("top",u+10+"px"),o.style.setProperty("right","auto"),o.style.setProperty("bottom","auto"),o.style.setProperty("left","-4px");break;case"above":k=w(f,m,I,"horizontal"),i.style.setProperty("top","auto"),i.style.setProperty("right","auto"),i.style.setProperty("bottom","2px"),i.style.setProperty("left",u/2-10+"px"),o.style.setProperty("top","auto"),o.style.setProperty("right","auto"),o.style.setProperty("bottom","12px"),o.style.setProperty("left","-4px");break;case"right":C=w(T,E,N,"vertical"),i.style.setProperty("top",u/2-10+"px"),i.style.setProperty("right","auto"),i.style.setProperty("bottom","auto"),i.style.setProperty("left",u+"px"),o.style.setProperty("top","-4px"),o.style.setProperty("right","auto"),o.style.setProperty("bottom","auto"),o.style.setProperty("left",u+10+"px");break;case"left":C=w(T,E,N,"vertical"),i.style.setProperty("top",u/2-10+"px"),i.style.setProperty("right","0"),i.style.setProperty("bottom","auto"),i.style.setProperty("left","auto"),o.style.setProperty("top","-4px"),o.style.setProperty("right","10px"),o.style.setProperty("bottom","auto"),o.style.setProperty("left","auto");break;case"whompWhomp":C=w(T,E,N,"horizontal"),i.style.setProperty("top","0"),i.style.setProperty("right","0"),i.style.setProperty("bottom","0"),i.style.setProperty("left","0"),o.style.setProperty("top",`calc(50vh - ${I/2}px)`),o.style.setProperty("right","auto"),o.style.setProperty("bottom","auto"),o.style.setProperty("left",`calc(50vh - ${N/2}px)`)}k||C?o.style.setProperty("transform",`translate(${k}px, ${C}px)`):o.style.setProperty("transform","none"),Re()}function ve(){!y.scrollTicking&&y.scrollPending>0&&!y.running&&y.jumpList&&y.showPanel&&(y.scrollTicking=!0,ue(),y.tipOpen&&we(y.openTip.button.shadowRoot.querySelector("button"),y.openTip.tip),y.scrollPending--),y.scrollTicking=!1,y.scrollPending>0&&requestAnimationFrame(()=>ve())}function Re(){b.fixedRoots&&N.editableHighlight.length>0&&(y.positionedFrames=[],b.fixedRoots.forEach(e=>{e.framePositioner&&y.positionedFrames.push(e.framePositioner.getBoundingClientRect())})),N.editableHighlight.forEach(e=>{if(!S[e.resultID])return y.interaction=!0,y.forceFullCheck=!0,N.editableHighlight=[],Fe(!0),!1;const t=S[e.resultID].fixedRoot&&y.positionedFrames[S[e.resultID].fixedRoot]?y.positionedFrames[S[e.resultID].fixedRoot]:{top:0,left:0};let n=e.target.getBoundingClientRect();if(!G(e.target)){const t=H(e.target);n=t?t.getBoundingClientRect():n}e.highlight.style.setProperty("width",n.width+6+"px"),e.highlight.style.setProperty("top",n.top+t.top+window.scrollY-3+"px"),e.highlight.style.setProperty("left",n.left+t.left-3+"px"),e.highlight.style.setProperty("height",n.height+6+"px")})}const Me=P(()=>{y.interaction=!0,Fe()},500);function Oe(){!0===N.panel?.classList.contains("ed11y-active")&&(he(),ue()),y.tipOpen&&we(y.openTip.button.shadowRoot.querySelector("button"),y.openTip.tip),de()}const Pe=function(e){e.addEventListener("scroll",function(){y.inlineAlerts?y.tipOpen&&we(y.openTip.button.shadowRoot.querySelector("button"),y.openTip.tip):(y.scrollPending=y.scrollPending<2?y.scrollPending+1:y.scrollPending,requestAnimationFrame(()=>ve()))},{passive:!0})};const De=P(()=>{(function(e){let t=e||window.getSelection()?.anchorNode;const n=t&&t.parentNode&&"object"==typeof t.parentNode&&"function"==typeof t.parentNode.matches;if(!t||n&&(t.parentNode.matches(b.checkRoot)||!t.parentNode.matches(b.checkRoot)&&t.parentNode.matches('div[contenteditable="true"]')))return y.activeRange=!1,!1;if(n){const e=t.parentNode.closest("p, td, th, li, h2, h3, h4, h5, h6");e&&(t=e)}const s=document.createRange();"object"==typeof t&&(s.setStartBefore(t),s.setEndAfter(t));if("object"!=typeof s||"function"!=typeof s.getBoundingClientRect)return!!y.activeRange&&(y.activeRange=!1,!0);{let e=y.activeRange&&s.startContainer===y.activeRange.startContainer&&s.startOffset===y.activeRange.startOffset;return y.activeRange=s,!e}})()&&(ve(),pe())},100);function xe(e){if("function"==typeof e.closest){if(e.closest("[data-editoria11y-observer]"))return;e.dataset.editoria11yObserver="true"}else{if("function"!=typeof e.host||void 0!==e.host.dataset.editoria11yObserver)return;e.host.dataset.editoria11yObserver="true"}const t={childList:!0,subtree:!0,characterData:!0},n=function(e){if(!e||1!==e.nodeType||!e.isConnected||e.closest("script, link, head, .ed11y-wrapper, .ed11y-style, .ed11y-element"))return 0;if(y.inlineAlerts)return 1;if(!e.matches("[contenteditable] *"))return 0;if(y.inlineAlerts)return!0;const t="table, h1, h2, h3, h4, h5, h6, blockquote";return y.inlineAlerts||e.matches(e.matches(t))||!e.matches("[contenteditable] *")||(e.matches("table *")?e=e.closest("table"):e.matches(t)||(e=e.querySelector(t))),e&&e.matches(t)?(y.recentlyAddedNodes.set(e,Date.now()),Ce(),0):1},s=new MutationObserver(e=>{let t=0;for(const s of e){if("characterData"===s.type&&s.target.parentElement&&s.target.parentElement.matches("[contenteditable] *, [contenteditable]"))return Ce(),void Me();"childList"===s.type&&(s.removedNodes.length>0?t+=1:s.addedNodes.length>0&&s.addedNodes.forEach(e=>{t+=n(e)}))}t&&(window.setTimeout(function(){Ce(),y.alignPending=!1},0),window.setTimeout(function(){Fe()},0))});s.observe(e,t),y.watching.push({observer:s,root:e,config:t}),document.addEventListener("readystatechange",()=>{window.setTimeout(function(){y.scrollPending++,ve()},100)},{passive:!0}),document.addEventListener("paste",()=>{y.scrollPending++,ve(),window.setTimeout(function(){y.forceFullCheck=!0,Fe()},100)},{passive:!0}),window.setTimeout(function(){y.scrollPending++,ve()},1e3)}const Be=function(t,n){const i=t.pop();y.testsRemaining--;try{switch(i){case"group1":!function(t,n,i){let o,l="";k.Found.Headings.forEach((a,c)=>{const d=r(a,s.Exclusions.HeaderSpan),h=g(n.headerIgnoreStrings?d.replace(n.headerIgnoreStrings,""):d),u=p(h),m=s.Root.areaToCheck.some(e=>e.contains(a)),E=s.Root.areaToCheck.some(e=>e.contains(a.getRootNode().host)),_=m||E,L=k.Found.HeadingOverrideStart.get(a);L&&(o=L);const f=parseInt(a.getAttribute("aria-level")||a.tagName.slice(1),10),y=h.length,I=n.checks.HEADING_LONG.maxLength||160;let N=null,S=null,b=null,C=null,w=null,v=null;if(0===y)if(a.querySelectorAll("img").length){const t=a.querySelector("img")?.getAttribute("alt");!a.querySelector("img")||t&&""!==t.trim()||n.checks.HEADING_EMPTY_WITH_IMAGE&&(N="HEADING_EMPTY_WITH_IMAGE",S=n.checks.HEADING_EMPTY_WITH_IMAGE.type||"error",b=e.sprintf(n.checks.HEADING_EMPTY_WITH_IMAGE.content||"HEADING_EMPTY_WITH_IMAGE",f),C=n.checks.HEADING_EMPTY_WITH_IMAGE.developer||!1,w=!!n.checks.HEADING_EMPTY_WITH_IMAGE.dismissAll&&"HEADING_EMPTY_WITH_IMAGE",v="-15px 30px")}else n.checks.HEADING_EMPTY&&(N="HEADING_EMPTY",S=n.checks.HEADING_EMPTY.type||"error",b=e.sprintf(n.checks.HEADING_EMPTY.content||"HEADING_EMPTY",f),C=n.checks.HEADING_EMPTY.developer||!1,w=!!n.checks.HEADING_EMPTY.dismissAll&&"HEADING_EMPTY",v="0");else f-o>1&&0!==c?n.checks.HEADING_SKIPPED_LEVEL&&(N="HEADING_SKIPPED_LEVEL",S=n.checks.HEADING_SKIPPED_LEVEL.type||"error",b=e.sprintf(n.checks.HEADING_SKIPPED_LEVEL.content||"HEADING_SKIPPED_LEVEL",o,f,A(u,60),A(l,60),o+1),C=n.checks.HEADING_SKIPPED_LEVEL.developer||!1,w=!!n.checks.HEADING_SKIPPED_LEVEL.dismissAll&&"HEADING_SKIPPED_LEVEL"):0===c&&1!==f&&2!==f?n.checks.HEADING_FIRST&&(N="HEADING_FIRST",S=n.checks.HEADING_FIRST.type||"error",b=e.sprintf(n.checks.HEADING_FIRST.content||"HEADING_FIRST"),C=n.checks.HEADING_FIRST.developer||!1,w=!!n.checks.HEADING_FIRST.dismissAll&&"HEADING_FIRST"):y>I&&n.checks.HEADING_LONG&&(N="HEADING_LONG",S=n.checks.HEADING_LONG.type||"warning",b=e.sprintf(n.checks.HEADING_LONG.content||"HEADING_LONG",I,y),C=n.checks.HEADING_LONG.developer||!1,w=!!n.checks.HEADING_LONG.dismissAll&&"HEADING_LONG");b&&S&&t.push({test:N,element:a,type:S,content:b,dismiss:T(`H${f+u}`),dismissAll:w,isWithinRoot:_,developer:C,margin:v}),o=f,l=u,k.Found.OutlineIgnore.includes(a)||i.push({element:a,headingLevel:f,text:u,type:S,dismiss:T(`H${f+u}`),isWithinRoot:_})}),n.checks.HEADING_MISSING_ONE&&0===k.Found.HeadingOne.length&&t.push({test:"HEADING_MISSING_ONE",type:n.checks.HEADING_MISSING_ONE.type||"warning",content:e.sprintf(n.checks.HEADING_MISSING_ONE.content||"HEADING_MISSING_ONE"),dismiss:"MISSINGH1",developer:n.checks.HEADING_MISSING_ONE.developer||!1})}(n,b,y.headingOutline),V(n,b),function(t,n){const s=e=>e.getAttribute("src")||e.querySelector("source[src]")?.getAttribute("src")||e.querySelector("[src]")?.getAttribute("src")||null;n.checks.EMBED_AUDIO&&k.Found.Audio.forEach(i=>{t.push({test:"EMBED_AUDIO",element:i,type:n.checks.EMBED_AUDIO.type||"warning",content:e.sprintf(n.checks.EMBED_AUDIO.content||"EMBED_AUDIO"),dismiss:T(`AUDIO${s(i)}`),dismissAll:!!n.checks.EMBED_AUDIO.dismissAll&&"EMBED_AUDIO",developer:n.checks.EMBED_AUDIO.developer||!1})}),n.checks.EMBED_VIDEO&&k.Found.Videos.forEach(i=>{const o=i.querySelector("track"),l=o?.getAttribute("src");null!==o&&null!==l&&0!==l.trim().length||t.push({test:"EMBED_VIDEO",element:i,type:n.checks.EMBED_VIDEO.type||"warning",content:e.sprintf(n.checks.EMBED_VIDEO.content||"EMBED_VIDEO"),dismiss:T(`VIDEO${s(i)}`),dismissAll:!!n.checks.EMBED_VIDEO.dismissAll&&"EMBED_VIDEO",developer:n.checks.EMBED_VIDEO.developer||!1})}),n.checks.EMBED_DATA_VIZ&&k.Found.Visualizations.forEach(i=>{t.push({test:"EMBED_DATA_VIZ",element:i,type:n.checks.EMBED_DATA_VIZ.type||"warning",content:e.sprintf(n.checks.EMBED_DATA_VIZ.content||"EMBED_DATA_VIZ"),dismiss:T(`DATAVIZ${s(i)}`),dismissAll:!!n.checks.EMBED_DATA_VIZ.dismissAll&&"EMBED_DATA_VIZ",developer:n.checks.EMBED_DATA_VIZ.developer||!1})}),k.Found.iframes.forEach(i=>{const o=["presentation","none"].includes(i.getAttribute("role")),r=d(i),a="VIDEO"===i.tagName||"AUDIO"===i.tagName,c="true"===i.getAttribute("aria-hidden"),h="-1"===i.getAttribute("tabindex");if(!(r||a||c&&h||o))if(h)n.checks.EMBED_UNFOCUSABLE&&t.push({test:"EMBED_UNFOCUSABLE",element:i,type:n.checks.EMBED_UNFOCUSABLE.type||"error",content:e.sprintf(n.checks.EMBED_UNFOCUSABLE.content||"EMBED_UNFOCUSABLE"),dismiss:T(`EMBEDUNFOCUSABLE${s(i)}`),dismissAll:!!n.checks.EMBED_UNFOCUSABLE.dismissAll&&"EMBED_UNFOCUSABLE",developer:n.checks.EMBED_UNFOCUSABLE.developer||!0});else if(n.checks.EMBED_MISSING_TITLE){const o=l(i);0===g("noAria"===o?i.getAttribute("title")||"":o).length&&t.push({test:"EMBED_MISSING_TITLE",element:i,type:n.checks.EMBED_MISSING_TITLE.type||"error",content:e.sprintf(n.checks.EMBED_MISSING_TITLE.content||"EMBED_MISSING_TITLE"),dismiss:T(`EMBEDMISSTITLE${s(i)}`),dismissAll:!!n.checks.EMBED_MISSING_TITLE.dismissAll&&"EMBED_MISSING_TITLE",developer:n.checks.EMBED_MISSING_TITLE.developer||!0})}}),n.checks.EMBED_GENERAL&&k.Found.EmbeddedContent.forEach(i=>{const o=["presentation","none"].includes(i.getAttribute("role")),l="true"===i.getAttribute("aria-hidden"),r="-1"===i.getAttribute("tabindex");d(i)||l&&r||o||"VIDEO"!==i.tagName&&"AUDIO"!==i.tagName&&t.push({test:"EMBED_GENERAL",element:i,type:n.checks.EMBED_GENERAL.type||"warning",content:e.sprintf(n.checks.EMBED_GENERAL.content||"EMBED_GENERAL"),dismiss:T(`IFRAMEGENERAL${s(i)}`),dismissAll:!!n.checks.EMBED_GENERAL.dismissAll&&"EMBED_GENERAL",developer:n.checks.EMBED_GENERAL.developer||!1})})}(n,b),function(t){if(b.checks.EMBED_CUSTOM){const n=w(b.checks.EMBED_CUSTOM.sources,"root");e.langStrings.embeddedContent=`<div class="title" tabindex="-1"><div class="ed11y-tip-alert"></div>${b.embeddedContentTitle}</div>${b.embeddedContentMessage}`,n.forEach(n=>{t.push({test:"EMBED_CUSTOM",element:n,type:"warning",content:e.sprintf("EMBED_CUSTOM"),inline:!1,dismiss:T(n.tagName+n.getAttribute("src")),dismissAll:"embeddedContent",developer:!1})})}}(n),j(n,b);break;case"group2":Q(n,b);break;case"checkLabels":!function(t,n){n.formLabelsPlugin&&k.Found.Inputs.forEach(s=>{const i="true"===s.getAttribute("aria-hidden"),o="-1"===s.getAttribute("tabindex");if(d(s)||i&&o)return;const l=g(r(s)),a=s.getAttribute("alt"),c=s.getAttribute("type"),h=s.getAttribute("title"),u=s.placeholder&&0!==s.placeholder,m=s.getAttribute("aria-label")||s.getAttribute("aria-labelledby");if("submit"===c||"button"===c||"hidden"===c)return;if("image"===c)return void(!n.checks.LABELS_MISSING_IMAGE_INPUT||a&&""!==a.trim()||m||h||t.push({test:"LABELS_MISSING_IMAGE_INPUT",element:s,type:n.checks.LABELS_MISSING_IMAGE_INPUT.type||"error",content:e.sprintf(n.checks.LABELS_MISSING_IMAGE_INPUT.content||"LABELS_MISSING_IMAGE_INPUT"),dismiss:T(`INPUTIMAGE${c+l}`),dismissAll:!!n.checks.LABELS_MISSING_IMAGE_INPUT.dismissAll&&"LABELS_MISSING_IMAGE_INPUT",developer:n.checks.LABELS_MISSING_IMAGE_INPUT.developer||!0}));if("reset"===c)return void(n.checks.LABELS_INPUT_RESET&&t.push({test:"LABELS_INPUT_RESET",element:s,type:n.checks.LABELS_INPUT_RESET.type||"warning",content:e.sprintf(n.checks.LABELS_INPUT_RESET.content||"LABELS_INPUT_RESET"),dismiss:T(`INPUTRESET${c+l}`),dismissAll:!!n.checks.LABELS_INPUT_RESET.dismissAll&&"LABELS_INPUT_RESET",developer:n.checks.LABELS_INPUT_RESET.developer||!1}));if(m||h||u){if(u&&n.checks.LABELS_PLACEHOLDER)t.push({test:"LABELS_PLACEHOLDER",element:s,type:n.checks.LABELS_PLACEHOLDER.type||"warning",content:e.sprintf(n.checks.LABELS_PLACEHOLDER.content||"LABELS_PLACEHOLDER"),dismiss:T(`INPUTPLACEHOLDER${c+l}`),dismissAll:!!n.checks.LABELS_PLACEHOLDER.dismissAll&&"LABELS_PLACEHOLDER",developer:n.checks.LABELS_PLACEHOLDER.developer||!0});else if(0===l.length)n.checks.LABELS_MISSING_LABEL&&t.push({test:"LABELS_MISSING_LABEL",element:s,type:n.checks.LABELS_MISSING_LABEL.type||"error",content:e.sprintf(n.checks.LABELS_MISSING_LABEL.content||"LABELS_MISSING_LABEL"),dismiss:T(`INPUTMISSING${c+l}`),dismissAll:!!n.checks.LABELS_MISSING_LABEL.dismissAll&&"LABELS_MISSING_LABEL",developer:n.checks.LABELS_MISSING_LABEL.developer||!0});else if(n.checks.LABELS_ARIA_LABEL_INPUT){const i=p(l);t.push({test:"LABELS_ARIA_LABEL_INPUT",element:s,type:n.checks.LABELS_ARIA_LABEL_INPUT.type||"warning",content:n.checks.LABELS_ARIA_LABEL_INPUT.content?e.sprintf(n.checks.LABELS_ARIA_LABEL_INPUT.content,i):`${e.sprintf("LABELS_ARIA_LABEL_INPUT",i)} ${e.sprintf("ACC_NAME_TIP")}`,dismiss:T(`INPUTARIA${c+l}`),dismissAll:!!n.checks.LABELS_ARIA_LABEL_INPUT.dismissAll&&"LABELS_ARIA_LABEL_INPUT",developer:n.checks.LABELS_ARIA_LABEL_INPUT.developer||!0})}return}const E=s.closest("label"),A=E?g(r(E)):"";if(E&&A.length)return;const _=s.getAttribute("id");_?k.Found.Labels.some(e=>e.getAttribute("for")===_)||n.checks.LABELS_NO_FOR_ATTRIBUTE&&t.push({test:"LABELS_NO_FOR_ATTRIBUTE",element:s,type:n.checks.LABELS_NO_FOR_ATTRIBUTE.type||"error",content:e.sprintf(n.checks.LABELS_NO_FOR_ATTRIBUTE.content||"LABELS_NO_FOR_ATTRIBUTE",_),dismiss:T(`INPUTNOFOR${c+l}`),dismissAll:!!n.checks.LABELS_NO_FOR_ATTRIBUTE.dismissAll&&"LABELS_NO_FOR_ATTRIBUTE",developer:n.checks.LABELS_NO_FOR_ATTRIBUTE.developer||!0}):n.checks.LABELS_MISSING_LABEL&&t.push({test:"LABELS_MISSING_LABEL",element:s,type:n.checks.LABELS_MISSING_LABEL.type||"error",content:e.sprintf(n.checks.LABELS_MISSING_LABEL.content||"LABELS_MISSING_LABEL"),dismiss:T(`INPUTNOID${c+l}`),dismissAll:!!n.checks.LABELS_MISSING_LABEL.dismissAll&&"LABELS_MISSING_LABEL",developer:n.checks.LABELS_MISSING_LABEL.developer||!0})})}(n,b);break;case"checkContrast":!function(t,n){const s=[];for(let e=0;e<k.Found.Contrast.length;e++){const t=k.Found.Contrast[e],i=getComputedStyle(t),o=parseFloat(i.opacity),l=Z(i.color,o),r=parseFloat(i.fontSize),a=J(i.fontWeight),h=ee(t),p=c(t),u=d(t)||p||0===o||0===r,m=Array.from(t.childNodes).filter(e=>3===e.nodeType).map(e=>e.textContent).join("").trim(),E=["SELECT","INPUT","TEXTAREA"].includes(t.tagName);if(0!==m.length||E){const e=r>=24||r>=18.67&&a>=700;if("unsupported"===l||"unsupported"===h)s.push({$el:t,type:"unsupported",fontSize:r,fontWeight:a,isLargeText:e,opacity:o,..."unsupported"!==h&&{background:h},..."unsupported"!==l&&{color:l}});else if("image"===h.type)u||s.push({$el:t,type:"background-image",color:l,isLargeText:e,background:h,fontSize:r,fontWeight:a,opacity:o});else if(!u&&se(l)!==se(h)){const e=re(t,l,h,r,a,o,n.contrastAAA);e&&(e.type=E?"input":"text",s.push(e))}}}k.Found.Svg.forEach(e=>{const t={$el:e,type:"svg-warning"},i=ee(e),o="unsupported"!==i&&"image"!==i.type,l=e.querySelectorAll("path, rect, circle, ellipse, polygon, text, use"),r=e.querySelectorAll("*:not(path):not(rect):not(circle):not(ellipse):not(polygon):not(text):not(use):not(title)");let a=!1;if(l.length){const e=getComputedStyle(l[0]);a=Array.from(l).every(t=>{const n=getComputedStyle(t);return n.fill===e.fill&&n.fillOpacity===e.fillOpacity&&n.stroke===e.stroke&&n.strokeOpacity===e.strokeOpacity&&n.opacity===e.opacity})}if(1!==l.length&&!a||0!==r.length)o&&(t.background=i),s.push(t);else{const r=getComputedStyle(l[0]),{fill:a,stroke:c,strokeWidth:d,opacity:h}=r;let p=0;const{width:u,height:m}=e.getBBox();c&&"none"!==c&&(p=d.endsWith("%")?parseFloat(d)/100*Math.min(u,m):["inherit","initial","unset"].includes(d)?1:parseFloat(d));const E=Math.min(u,m)<50?1:3,g=c&&p>=E&&"none"!==c,A=a&&"none"!==a&&!a.startsWith("url("),_=Z("currentColor"===a?getComputedStyle(l[0]).color:a,h),T=Z("currentColor"===c?getComputedStyle(l[0]).color:c,h);if(![_,T].includes("unsupported")&&o){let t,o=!1,l=!1;if(A&&(t=oe(_,i),o=n.contrastAPCA?t.ratio>=45:t.ratio>=3),g&&(t=oe(T,i),l=n.contrastAPCA?t.ratio>=45:t.ratio>=3),A&&g&&!o&&!l||A&&!g&&!o||!A&&g&&!l){const n=se(i),o=se(_),l=se(T);if(o===n&&!g||l===n&&!A)return;s.push({$el:e,ratio:ie(t.ratio),color:t.blendedColor,type:"svg-error",isLargeText:!0,background:i})}}else A&&"unsupported"!==_?t.color=_:g&&"unsupported"!==T&&(t.color=T),o&&(t.background=i),s.push(t)}}),k.Found.Inputs.forEach(e=>{if(e.placeholder&&0!==e.placeholder.length){const t=getComputedStyle(e,"::placeholder"),i=Z(t.getPropertyValue("color")),o=parseFloat(t.fontSize),l=J(t.fontWeight),r=ee(e),a=parseFloat(t.opacity);if("unsupported"===i)s.push({$el:e,type:"placeholder-unsupported"});else if("image"===r.type);else{const t=re(e,i,r,o,l,a,n.contrastAAA);t&&(t.type="placeholder",s.push(t))}}}),(e=>{const t=e.filter(e=>"background-image"===e.type),s=e.filter(e=>"background-image"!==e.type);let i;if(n.contrastAPCA)i=t.map(e=>({...e}));else{const e=t.reduce((e,t)=>{const n=e,s=JSON.stringify({background:t.background.value,color:t.color,isLargeText:t.isLargeText});return n[s]||(n[s]=[]),n[s].push(t),n},{});i=Object.values(e).map(e=>({...e[0]}))}return[...i,...s]})(s).forEach(s=>{const{$el:i,ratio:o}=s,l=s,r="OPTION"===i.tagName?i.closest("datalist, select, optgroup"):i,a=p(A(E(m(r,["option:not(option:first-child)"])),80));let c;c="placeholder"===s.type||"placeholder-unsupported"===s.type?p(i.placeholder):"svg-error"===s.type||"svg-warning"===s.type?"":a,l.sanitizedText=c;let d="";if(!n.contrastAPCA){const t=n.contrastAAA?"7:1":"4.5:1",i=n.contrastAAA?"4.5:1":"3:1",o=s.isLargeText?i:t,l=s.isLargeText?"CONTRAST_LARGE":"CONTRAST_NORMAL";d=` ${e.sprintf(l,o)}`}const h=n.contrastAPCA?"":` ${e.sprintf("CONTRAST_TIP_GRAPHIC")}`;switch(s.type){case"text":n.checks.CONTRAST_ERROR&&t.push({test:"CONTRAST_ERROR",element:i,type:n.checks.CONTRAST_ERROR.type||"error",content:n.checks.CONTRAST_ERROR.content?e.sprintf(n.checks.CONTRAST_ERROR.content):e.sprintf("CONTRAST_ERROR")+d,dismiss:T(`CONTRAST${a}`),dismissAll:!!n.checks.CONTRAST_ERROR.dismissAll&&"CONTRAST_ERROR",developer:n.checks.CONTRAST_ERROR.developer||!1,contrastDetails:l});break;case"input":if(n.checks.CONTRAST_INPUT){const s=u(i.outerHTML);t.push({test:"CONTRAST_INPUT",element:r,type:n.checks.CONTRAST_INPUT.type||"error",content:n.checks.CONTRAST_INPUT.content?e.sprintf(n.checks.CONTRAST_INPUT.content):e.sprintf("CONTRAST_INPUT",o)+d,dismiss:T(`CONTRAST${s}`),dismissAll:!!n.checks.CONTRAST_INPUT.dismissAll&&"CONTRAST_INPUT",developer:n.checks.CONTRAST_INPUT.developer||!0,contrastDetails:l})}break;case"placeholder":if(n.checks.CONTRAST_PLACEHOLDER){const s=u(i.outerHTML);t.push({test:"CONTRAST_PLACEHOLDER",element:i,type:n.checks.CONTRAST_PLACEHOLDER.type||"error",content:n.checks.CONTRAST_PLACEHOLDER.content?e.sprintf(n.checks.CONTRAST_PLACEHOLDER.content):e.sprintf("CONTRAST_PLACEHOLDER")+d,position:"afterend",dismiss:T(`CPLACEHOLDER${s}`),dismissAll:!!n.checks.CONTRAST_PLACEHOLDER.dismissAll&&"CONTRAST_PLACEHOLDER",developer:n.checks.CONTRAST_PLACEHOLDER.developer||!0,contrastDetails:l})}break;case"placeholder-unsupported":if(n.checks.CONTRAST_PLACEHOLDER_UNSUPPORTED){const s=u(i.outerHTML);t.push({test:"CONTRAST_PLACEHOLDER_UNSUPPORTED",element:i,type:n.checks.CONTRAST_PLACEHOLDER_UNSUPPORTED.type||"warning",content:n.checks.CONTRAST_PLACEHOLDER_UNSUPPORTED.content?e.sprintf(n.checks.CONTRAST_PLACEHOLDER_UNSUPPORTED.content):e.sprintf("CONTRAST_PLACEHOLDER_UNSUPPORTED")+d,position:"afterend",dismiss:T(`CPLACEHOLDERUN${s}`),dismissAll:!!n.checks.CONTRAST_PLACEHOLDER_UNSUPPORTED.dismissAll&&"CONTRAST_PLACEHOLDER_UNSUPPORTED",developer:n.checks.CONTRAST_PLACEHOLDER_UNSUPPORTED.developer||!0,contrastDetails:l})}break;case"svg-error":if(n.checks.CONTRAST_ERROR_GRAPHIC){const s=u(i.outerHTML);t.push({test:"CONTRAST_ERROR_GRAPHIC",element:i,type:n.checks.CONTRAST_ERROR_GRAPHIC.type||"error",content:n.checks.CONTRAST_ERROR_GRAPHIC.content?e.sprintf(n.checks.CONTRAST_ERROR_GRAPHIC.content):e.sprintf("CONTRAST_ERROR_GRAPHIC")+h,dismiss:T(`CONTRASTERROR${s}`),dismissAll:!!n.checks.CONTRAST_ERROR_GRAPHIC.dismissAll&&"CONTRAST_ERROR_GRAPHIC",developer:n.checks.CONTRAST_ERROR_GRAPHIC.developer||!0,contrastDetails:l,margin:"-25px"})}break;case"svg-warning":if(n.checks.CONTRAST_WARNING_GRAPHIC){const s=u(i.outerHTML);t.push({test:"CONTRAST_WARNING_GRAPHIC",element:i,type:n.checks.CONTRAST_WARNING_GRAPHIC.type||"warning",content:n.checks.CONTRAST_WARNING_GRAPHIC.content?e.sprintf(n.checks.CONTRAST_WARNING_GRAPHIC.content):e.sprintf("CONTRAST_WARNING_GRAPHIC")+h,dismiss:T(`CONTRASTWARNING${s}`),dismissAll:!!n.checks.CONTRAST_WARNING_GRAPHIC.dismissAll&&"CONTRAST_WARNING_GRAPHIC",developer:n.checks.CONTRAST_WARNING_GRAPHIC.developer||!0,contrastDetails:l,margin:"-25px"})}break;case"background-image":n.checks.CONTRAST_WARNING&&t.push({test:"CONTRAST_WARNING",element:r,type:n.checks.CONTRAST_WARNING.type||"warning",content:n.checks.CONTRAST_WARNING.content?e.sprintf(n.checks.CONTRAST_WARNING.content):e.sprintf("CONTRAST_WARNING")+d,dismiss:T(`CONTRAST${a}`),dismissAll:!!n.checks.CONTRAST_WARNING.dismissAll&&"CONTRAST_WARNING",developer:n.checks.CONTRAST_WARNING.developer||!1,contrastDetails:l});break;case"unsupported":n.checks.CONTRAST_UNSUPPORTED&&t.push({test:"CONTRAST_UNSUPPORTED",element:r,type:n.checks.CONTRAST_UNSUPPORTED.type||"warning",content:n.checks.CONTRAST_UNSUPPORTED.content?e.sprintf(n.checks.CONTRAST_UNSUPPORTED.content):e.sprintf("CONTRAST_WARNING")+d,dismiss:T(`CONTRAST${a}`),dismissAll:!!n.checks.CONTRAST_UNSUPPORTED.dismissAll&&"CONTRAST_UNSUPPORTED",developer:n.checks.CONTRAST_UNSUPPORTED.developer||!1,contrastDetails:l})}})}(n,b);break;case"checkDeveloper":!function(t,n){if(n.checks.META_LANG&&(!k.Found.Language||k.Found.Language.length<2)&&t.push({test:"META_LANG",type:n.checks.META_LANG.type||"error",content:e.sprintf(n.checks.META_LANG.content||"META_LANG"),dismiss:T("LANG"),developer:n.checks.META_LANG.developer||!0}),n.checks.META_TITLE){const s=document.querySelector("title:not(svg title)");s&&0!==s.textContent.trim().length||t.push({test:"META_TITLE",type:n.checks.META_TITLE.type||"error",content:e.sprintf(n.checks.META_TITLE.content||"META_TITLE"),dismiss:T("TITLE"),developer:n.checks.META_TITLE.developer||!0})}if(n.checks.META_SCALABLE||n.checks.META_MAX){const s=document.querySelector('meta[name="viewport"]');if(s){const i=s.getAttribute("content");if(i){const s=i.split(",").reduce((e,t)=>{const[n,s]=t.split("=").map(e=>e.trim());return e[n]=s,e},{});!n.checks.META_SCALABLE||"no"!==s["user-scalable"]&&"0"!==s["user-scalable"]||t.push({test:"META_SCALABLE",type:n.checks.META_SCALABLE.type||"error",content:e.sprintf(n.checks.META_SCALABLE.content||"META_SCALABLE"),dismiss:T("SCALABLE"),developer:n.checks.META_SCALABLE.developer||!0});const o=parseFloat(s["maximum-scale"]);n.checks.META_MAX&&!Number.isNaN(o)&&o<2&&t.push({test:"META_MAX",type:n.checks.META_MAX.type||"error",content:e.sprintf(n.checks.META_MAX.content||"META_MAX"),dismiss:T("MAXSCALE"),developer:n.checks.META_MAX.developer||!0})}}}n.checks.META_REFRESH&&document.querySelector('meta[http-equiv="refresh"]')&&t.push({test:"META_REFRESH",type:n.checks.META_REFRESH.type||"error",content:e.sprintf(n.checks.META_REFRESH.content||"META_REFRESH"),dismiss:T("REFRESH"),developer:n.checks.META_REFRESH.developer||!0});n.checks.DUPLICATE_ID&&document.querySelectorAll("body, [data-sa11y-has-shadow-root]").forEach(i=>{const o=new Set,l=(s,i)=>{s.forEach(s=>{const{id:l}=s;"string"==typeof l&&0!==l.trim().length&&(l&&!o.has(l)?o.add(l):Array.from(i.querySelectorAll(`\n a[href*="${l}"],\n label[for*="${l}"],\n [aria-labelledby*="${l}"],\n [aria-controls*="${l}"],\n [aria-owns*="${l}"]`)).length>0&&t.push({test:"DUPLICATE_ID",element:s,type:n.checks.DUPLICATE_ID.type||"error",content:e.sprintf(n.checks.DUPLICATE_ID.content||"DUPLICATE_ID",l),dismiss:T(`DUPLICATEID${l}${s.textContent}`),dismissAll:!!n.checks.DUPLICATE_ID.dismissAll&&"DUPLICATE_ID",developer:n.checks.DUPLICATE_ID.developer||!0}))})};i.shadowRoot&&l(Array.from(i.shadowRoot.querySelectorAll(`[id]:not(${s.Exclusions.Container})`)),i.shadowRoot),l(Array.from(i.querySelectorAll(`[id]:not(${s.Exclusions.Container})`)),i)});(n.checks.BTN_EMPTY||n.checks.BTN_EMPTY_LABELLEDBY||n.checks.BTN_LABEL||n.checks.HIDDEN_FOCUSABLE||n.checks.LABEL_IN_NAME)&&k.Found.Buttons.forEach(s=>{const i=r(s),o=i.replace(/'|"|-|\.|\s+/g,"").toLowerCase(),l=T(`BTN${s.tagName+s.id+s.className+i}`),a=s.querySelector(":scope [aria-labelledby], :scope [aria-label]")||s.getAttribute("aria-labelledby")||s.getAttribute("aria-label"),c=s.querySelector(":scope [aria-labelledby]")||s.getAttribute("aria-labelledby"),d="true"===s.getAttribute("aria-hidden"),h="-1"===s.getAttribute("tabindex");if(d)return void(h||n.checks.HIDDEN_FOCUSABLE&&t.push({test:"HIDDEN_FOCUSABLE",element:s,type:n.checks.HIDDEN_FOCUSABLE.type||"error",content:e.sprintf(n.checks.HIDDEN_FOCUSABLE.content||"HIDDEN_FOCUSABLE"),dismiss:l,dismissAll:!!n.checks.HIDDEN_FOCUSABLE.dismissAll&&"BTN_HIDDEN_FOCUSABLE",developer:n.checks.HIDDEN_FOCUSABLE.developer||!0}));if(0===o.length)return void(n.checks.BTN_EMPTY_LABELLEDBY&&c?t.push({test:"BTN_EMPTY_LABELLEDBY",element:s,type:n.checks.BTN_EMPTY_LABELLEDBY.type||"error",content:n.checks.BTN_EMPTY_LABELLEDBY.content?e.sprintf(n.checks.BTN_EMPTY_LABELLEDBY.content):`${e.sprintf("BTN_EMPTY_LABELLEDBY")} ${e.sprintf("BTN_TIP")}`,dismiss:T(l),dismissAll:!!n.checks.BTN_EMPTY_LABELLEDBY.dismissAll&&"BTN_EMPTY_LABELLEDBY",developer:n.checks.BTN_EMPTY_LABELLEDBY.developer||!0}):n.checks.BTN_EMPTY&&t.push({test:"BTN_EMPTY",element:s,type:n.checks.BTN_EMPTY.type||"error",content:n.checks.BTN_EMPTY.content?e.sprintf(n.checks.BTN_EMPTY.content):`${e.sprintf("BTN_EMPTY")} ${e.sprintf("BTN_TIP")}`,dismiss:l,dismissAll:!!n.checks.BTN_EMPTY.dismissAll&&"BTN_EMPTY",developer:n.checks.BTN_EMPTY.developer||!0}));const u=f(s);if(n.checks.LABEL_IN_NAME&&a&&u){const o=p(i);return void t.push({test:"LABEL_IN_NAME",element:s,type:n.checks.LABEL_IN_NAME.type||"warning",content:n.checks.LABEL_IN_NAME.content?e.sprintf(n.checks.LABEL_IN_NAME.content,o):`${e.sprintf("LABEL_IN_NAME",o)} ${e.sprintf("ACC_NAME_TIP")}`,dismiss:l,dismissAll:!!n.checks.LABEL_IN_NAME.dismissAll&&"BTN_LABEL_IN_NAME",developer:n.checks.LABEL_IN_NAME.developer||!0})}n.checks.BTN_ROLE_IN_NAME&&i.includes(e._("BTN"))&&t.push({test:"BTN_ROLE_IN_NAME",element:s,type:n.checks.BTN_ROLE_IN_NAME.type||"warning",content:n.checks.BTN_ROLE_IN_NAME.content?e.sprintf(n.checks.BTN_ROLE_IN_NAME.content):`${e.sprintf("BTN_ROLE_IN_NAME")} ${e.sprintf("BTN_TIP")}`,dismiss:l,dismissAll:!!n.checks.BTN_ROLE_IN_NAME.dismissAll&&"BTN_ROLE_IN_NAME",developer:n.checks.BTN_ROLE_IN_NAME.developer||!0})}),n.checks.UNCONTAINED_LI&&k.Found.Lists.forEach(s=>{s.closest("ul, ol, menu")||t.push({test:"UNCONTAINED_LI",element:s,type:n.checks.UNCONTAINED_LI.type||"error",content:e.sprintf(n.checks.UNCONTAINED_LI.content||"UNCONTAINED_LI"),dismiss:T(`UNCONTAINEDLI${s.textContent}`),dismissAll:!!n.checks.UNCONTAINED_LI.dismissAll&&"UNCONTAINED_LI",developer:n.checks.UNCONTAINED_LI.developer||!0})}),n.checks.TABINDEX_ATTR&&k.Found.TabIndex.forEach(s=>{t.push({test:"TABINDEX_ATTR",element:s,type:n.checks.TABINDEX_ATTR.type||"error",content:e.sprintf(n.checks.TABINDEX_ATTR.content||"TABINDEX_ATTR"),dismiss:T(`TABINDEX${s.tagName+s.id+s.className}`),dismissAll:!!n.checks.TABINDEX_ATTR.dismissAll&&"TABINDEX_ATTR",developer:n.checks.TABINDEX_ATTR.developer||!0})})}(n,b)}}catch(e){z(e)}t.length>0?y.browserSpeed<100||b.headless?Be(t,n):window.setTimeout(function(e){Be(e,n)},0,t,n):He()};function Ge(){if(y.tipOpen)return!1;if(y.disabled=!1,q()&&Ye(),y.customTestsRunning=!1,y.roots=[],b.fixedRoots?b.fixedRoots.forEach(e=>{y.roots.push(e.fixedRoot)}):y.roots=document.querySelectorAll(`:is(${b.checkRoot})`),y.roots||!1!==b.headless||console.warn(e.sprintf("MISSING_ROOT",b.checkRoot)),0===y.roots.length)return y.onLoad&&console.warn(e._("MISSING_ROOT")),void Ye();if(y.incremental&&(y.oldResults=S),S.length=0,y.splitConfiguration.results.length=0,y.splitConfiguration.active&&Object.assign(b,y.splitConfiguration.sync),O(),b.customTests>0){y.customTestsRemaining+=b.customTests,window.clearTimeout(y.customTestTimeout),y.customTestTimeout=window.setTimeout(function(){y.customTestsRemaining>0&&(console.error("Editoria11y has disabled a custom test that is not returning results within 1000ms."),b.customTests--,y.customTestsRemaining=0,He(!0),0===b.customTests&&document.removeEventListener("ed11yResume",function(){He(!0)}))},1e3);let e=new CustomEvent("ed11yRunCustomTests");document.dispatchEvent(e)}let t=["group1","group2"];!b.readabilityPlugin||y.incremental&&!y.visualizing||t.push("checkReadability"),b.formLabelsPlugin&&t.push("checkLabels"),b.developerPlugin&&t.push("checkDeveloper"),b.contrastPlugin&&t.push("checkContrast"),y.testsRemaining=t.length,Be(t,y.splitConfiguration.active?y.splitConfiguration.results:S)}function He(t=!1){t&&y.customTestsRemaining--,y.customTestsRemaining+y.testsRemaining>0||(y.splitConfiguration.active&&y.splitConfiguration.results.length>0?function(){y.splitConfiguration.results=Ee(!0),Object.assign(b,y.splitConfiguration.showOptions),me(y.splitConfiguration.results),O(!0);let e=!1,t=!1,n=!1,s=!1,i=!1,o=!1;for(let l=0;l<y.splitConfiguration.results.length;l++){let r=y.splitConfiguration.results[l];r.element&&(y.splitConfiguration.checks.has(r.test)||(0!==r.test.indexOf("HEADING")?r.test.indexOf("CONTRAST")>-1?(i||(i=new WeakSet(k.Found.Contrast)),i.has(r.element)&&S.push(r)):r.element.matches("img")?(n||(n=new WeakSet(k.Found.Images)),n.has(r.element)&&S.push(r)):r.element.matches("a")?(o=new WeakSet(k.Found.Links),o.has(r.element)&&S.push(r)):(e||(e=new WeakSet(k.Found.Everything)),e.has(r.element)&&S.push(r)):(t||(t=new WeakSet(k.Found.Headings),s=new WeakSet(k.Found.ExcludedHeadings)),t.has(r.element)&&!s.has(r.element)&&S.push(r))))}}():(Ee(!1),me(S)),function(){y.dismissedCount=0,y.errorCount=0,y.warningCount=0,y.dismissedCount=0;for(let e=S.length-1;e>=0;e--){S[e].dismissalStatus?y.dismissedCount++:"warning"===S[e].type?y.warningCount++:y.errorCount++;let t=S[e].element,n=t.closest('a, button, img, svg, input, iframe, [role="button"], [role="link"]'),s=!n&&t.closest("p, table, li, blockquote, h1, h2, h3, h4, h5, h6");if(S[e].element.shadowRoot)for(;t.parentElement&&t.parentElement.shadowRoot;)t=t.parentElement;else s?(S[e].location=t,S[e].position="afterbegin"):(S[e].location=n??t,S[e].position="beforebegin")}y.totalCount=y.errorCount+y.warningCount,y.ignoreAll&&(y.dismissedCount=y.totalCount+y.dismissedCount,y.errorCount=0,y.warningCount=0,y.totalCount=0)}(),"function"==typeof N.panelToggle.querySelector&&(N.panelToggle.querySelector(".ed11y-sr-only").textContent=e._("MAIN_TOGGLE_LABEL")),y.visualizing&&(Le(),Ae()),Ie(),window.setTimeout(()=>{b.watchForChanges&&(k.Found.editable?.forEach(e=>{e.matches(".drag-observe")||(e.classList.add("drag-observe"),e.addEventListener("drop",()=>{y.forceFullCheck=!0,Fe()}))}),"checkRoots"===b.watchForChanges?y.roots?.forEach(e=>{xe(e)}):xe(document.body),W())},0))}function Ue(){if(y.running)window.setTimeout(()=>{Fe()},250);else{if(y.tipOpen||!y.interaction&&!y.forceFullCheck)return;y.interaction=!1,y.running=!0;let e=performance.now();y.incremental=!0,y.disabled&&y.closedByDisable&&(y.showPanel=!0,y.closedByDisable=!1,y.disabled=!1),Ge(),window.setTimeout(function(){y.visualizing&&document.dispatchEvent(new CustomEvent("ed11yEndVisualization"))},500),e=performance.now()-e,y.browserSpeed=e>100?100:(y.browserSpeed+e)/2,y.browserLag=y.browserSpeed<1?0:100*y.browserSpeed+y.totalCount}}y.testsRemaining=0;const Fe=P(()=>{Ue()},250);function Ke(e,t=!1){let n=y.openTip,s=n.tip.dataset.ed11yResult,i=S[s].test;if(t)S.forEach(t=>{t.test===i&&t.dismissalStatus!==e&&Se(e,i,t.dismiss)});else{let t=S[s].dismiss;Se(e,i,t)}x(["ed11y-hidden-highlight","ed11y-ring-red","ed11y-ring-yellow"]),n.tip?.parentNode?.removeChild(n.tip),n.button?.parentNode?.removeChild(n.button),function(e,t){a(`${e}`,`${t}`).forEach(e=>{e?.parentNode?.removeChild(e)})}("ed11y-element-highlight","document"),N.editableHighlight=[],ze(),y.showPanel=!0,Ge();let o=y.lastOpenTip;window.setTimeout(function(){y.jumpList.length>0?(y.lastOpenTip=o-1,N.panelJumpNext?.focus()):window.setTimeout(function(){N.panelToggle?.focus()},100)},500,o)}function $e(){y.ignoreAll=!1,y.showDismissed=!y.showDismissed,y.forceFullCheck=!0,y.showPanel=!0,Y(),Ue(),N.panelShowDismissed.setAttribute("data-ed11y-pressed",`${y.showDismissed}`),window.setTimeout(function(){N.panelShowDismissed.focus()},0)}function We(){return y.ignoreAll=!1,y.doubleClickPrevent||!0!==y.running&&(y.running=!0,y.showPanel?(N.panelToggleTitle.textContent=e._("MAIN_TOGGLE_LABEL"),y.showDismissed=!1,y.showPanel=!1,ze(),b.userPrefersShut=!0,localStorage.setItem("editoria11yShow","0")):(y.onLoad=!1,y.incremental=!1,y.showPanel=!0,y.dismissedCount>0&&0===y.warningCount&&0===y.errorCount?(y.showDismissed=!1,$e()):Ge(),b.userPrefersShut=!1,localStorage.setItem("editoria11yShow","1"))),y.doubleClickPrevent=!0,window.setTimeout(function(){y.doubleClickPrevent=!1},200),!1}function qe(){y.loopStop||(y.loopStop=!0,ze(),y.showPanel=!0,Ge(),window.setTimeout(function(){S.length>0&&y.loopStop&&(ke(),y.loopStop=!1)},100,y.loopStop))}function Ye(){y.showPanel&&!y.closedByDisable&&(y.closedByDisable=!0),y.disabled=!0,ze(),document.documentElement.style.setProperty("--ed11y-activeBackground",I.panelBar),document.documentElement.style.setProperty("--ed11y-activeColor",I.panelBarText),document.documentElement.style.setProperty("--ed11y-activeBorder",I.panelBarText+"44"),document.documentElement.style.setProperty("--ed11y-activePanelBorder","transparent"),"function"==typeof N.panelToggle.querySelector&&(N.panel?.classList.remove("ed11y-errors","ed11y-warnings"),N.panelCount.textContent="i",N.panelJumpNext.setAttribute("hidden",""),N.panelToggle.classList.add("disabled"),N.panelToggle.querySelector(".ed11y-sr-only").textContent=y.english?e._("toggleDisabled"):e._("CONTAINER_LABEL"))}function ze(){$(),Y(),y.visualizing=!0,_e(),0===y.totalCount&&y.dismissedCount>0&&(N.panelCount.textContent="i",N.panelToggleTitle.textContent=1===y.dismissedCount?e._("buttonShowHiddenAlert"):e.sprintf("PANEL_DISMISS_BUTTON",y.dismissedCount)),"object"==typeof N.panel&&(N.panel?.classList.add("ed11y-shut"),N.panel?.classList.remove("ed11y-active"),N.panelToggle.ariaExpanded=!1,y.showDismissed||"function"!=typeof N.panelShowDismissed||(N.panelShowDismissed.setAttribute("data-ed11y-pressed","false"),N.panelShowDismissed.querySelector(".ed11y-sr-only").textContent=1===y.dismissedCount?e._("buttonShowHiddenAlert"):e.sprintf("PANEL_DISMISS_BUTTON",y.dismissedCount))),y.incremental=!1,y.running=!1,y.showPanel=!1}window.addEventListener("ed11yEndVisualization",()=>{y.visualizing=!1,$(),_e(),W()});const Qe={strings:{OUTLINE:"Headings",IMAGES:"Alt text",SKIP_TO_ISSUE:"Go to issue",buttonFirstContent:"Go to first alert",MAIN_TOGGLE_LABEL:"Toggle accessibility tools",toggleDisabled:"No content available for Editoria11y to check.",PANEL_HEADING:"Check headings & alt text",buttonToolsActive:"Hide headings & alt text",PANEL_DISMISS_BUTTON:"Show %(dismissCount) hidden alerts",buttonShowHiddenAlert:"Show hidden alert",buttonHideHiddenAlert:"Hide hidden alert",buttonHideHiddenAlerts:"Hide %(count) hidden alerts",NO_IMAGES:"No images found.",ALT:"Alt Text: ",MISSING:"(missing!)",panelCheckOutline:'<p class="ed11y-small">This shows the <a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">heading outline</a>. Check that it matches how the content is organized visually.</p>',panelCheckAltText:'<p class="ed11y-small">Check that each image <a href="https://www.w3.org/WAI/tutorials/images/informative/">describes what it means in context</a>, and that there are no images of text.</p>',DECORATIVE:"Marked decorative",NOT_VISIBLE:"Note: this content may not be visible. Look for it inside the outlined container.",SUS_ALT_STOPWORDS:["image","graphic","picture","photo","thumbnail","icon","placeholder","spacer","tbd","todo","copyright","courtesy of"],WARNING:"manual check needed",ALERT_TEXT:"Issue",transferFocus:"Edit this content",dismissOkButtonContent:"Mark as OK",DISMISS:"Mark as ignored",dismissActions:"%(count) similar issues",DISMISS_ALL:"Ignore all like this",dismissOkAllButton:"Mark all like this as OK",dismissOkTitle:"Hides this alert for all editors",dismissHideTitle:"Hides this alert for you",undismissOKButton:"Restore this alert marked as OK",undismissHideButton:"Restore this hidden alert",undismissNotePermissions:"This alert has been hidden by an administrator",reportsLink:"Open site reports in new tab",ALERT_CLOSE:"Close",panelHelpTitle:"About this tool",panelHelp:'\n <p><a href="https://editoria11y.princeton.edu/">Editoria11y</a> checks for common accessibility needs, such as image alternative text, meaningful heading outlines and well-named links.</p>\n <p>Many alerts are "manual checks." Manual checks can be dismissed:</p>\n <ul>\n <li>"Mark as checked and OK" hides the alert for all editors.</li>\n <li>"Ignore this manual check" leaves the tip visible to other editors.</li>\n </ul>\n <p>Dismissed alerts can be found via the "Show hidden alerts" toggle.</p>\n <p>If an incorrect alert is appearing on many pages, site administrators can tell the checker to ignore particular elements and page regions.</p>\n <p>And remember that automated checkers cannot replace <a href=\'https://webaim.org/resources/evalquickref/\'> proofreading and testing for accessibility</a>.</p>\n <p><br><a href=\'https://github.com/itmaybejj/editoria11y/issues\' class=\'ed11y-small\'>Report bugs & request changes <span aria-hidden="true">»</span></a></p>\n ',NEW_WINDOW_PHRASES:["external","download","new tab","new window","pop-up","pop up","opens new tab","opens new window"]},testNames:{ALT_FILE_EXT_TEST_NAME:"Image's text alternative is a URL",ALT_MAYBE_BAD_TEST_NAME:"Manual check: alt text may be meaningless",ALT_PLACEHOLDER_TEST_NAME:"Alt text is meaningless",ALT_UNPRONOUNCEABLE_TEST_NAME:"Image's text alternative is unpronounceable",EMBED_AUDIO_TEST_NAME:"Manual check: is an accurate transcript provided?",EMBED_CUSTOM_TEST_NAME:"Manual check: is this embedded content accessible?",EMBED_DATA_VIZ_TEST_NAME:"Manual check: is this visualization accessible?",EMBED_VIDEO_TEST_NAME:"Manual check: is this video accurately captioned?",HEADING_EMPTY_TEST_NAME:"Heading tag without any text",HEADING_LONG_TEST_NAME:"Manual check: long heading",HEADING_SKIPPED_LEVEL_TEST_NAME:"Manual check: was a heading level skipped?",IMAGE_ALT_TOO_LONG_TEST_NAME:"Manual check: very long alternative text",IMAGE_DECORATIVE_TEST_NAME:"Manual check: image has no alt text",LINK_ALT_FILE_EXT_TEST_NAME:"Linked image's text alternative is a URL",LINK_ALT_MAYBE_BAD_TEST_NAME:"Manual check: linked alt text may be meaningless",LINK_EMPTY_NO_LABEL_TEST_NAME:"Link with no accessible label",LINK_EMPTY_TEST_NAME:"Link with no accessible text",LINK_IMAGE_ALT_AND_TEXT_TEST_NAME:"Manual check: link contains both text and an image",LINK_IMAGE_LONG_ALT_TEST_NAME:"Manual check: very long alternative text in linked image",LINK_IMAGE_NO_ALT_TEXT_TEST_NAME:"Linked Image has no alt text",LINK_NEW_TAB_TEST_NAME:"Manual check: is opening a new window expected?",LINK_PLACEHOLDER_ALT_TEST_NAME:"Linked alt text is meaningless",LINK_STOPWORD_TEST_NAME:"Manual check: is this link meaningful and concise?",LINK_SUS_ALT_TEST_NAME:"Manual check: possibly redundant text in linked image",LINK_URL_TEST_NAME:"Manual check: is this link text a URL?",MISSING_ALT_LINK_HAS_TEXT_TEST_NAME:"Image in link with text has no alternative text attribute",MISSING_ALT_LINK_TEST_NAME:"Linked image has no alternative text attribute",MISSING_ALT_TEST_NAME:"Image has no alternative text attribute",QA_BLOCKQUOTE_TEST_NAME:"Manual check: is this a blockquote?",QA_FAKE_HEADING_TEST_NAME:"Manual check: should this be a heading?",QA_FAKE_LIST_TEST_NAME:"Manual check: should this have list formatting?",QA_PDF_TEST_NAME:"Manual check: is the linked document accessible?",QA_UPPERCASE_TEST_NAME:"Manual check: is this uppercase text needed?",SUS_ALT_TEST_NAME:"Manual check: possibly redundant text in alt",TABLES_EMPTY_HEADING_TEST_NAME:"Empty table header cell",TABLES_MISSING_HEADINGS_TEST_NAME:"Table has no header cells",TABLES_SEMANTIC_HEADING_TEST_NAME:"Content heading inside a table",HEADING_EMPTY_WITH_IMAGE_TEST_NAME:"Heading has no text, but contains an image",HEADING_FIRST_TEST_NAME:"The first heading on a page should usually be a Heading 1 or Heading 2",HEADING_MISSING_ONE_TEST_NAME:"Missing Heading 1",IMAGE_DECORATIVE_CAROUSEL_TEST_NAME:"Image in a carousel or gallery marked as decorative",LINK_IMAGE_TEXT_TEST_NAME:"Manual check: Image is marked as decorative, although the link is using the surrounding text as a descriptive label.",IMAGE_FIGURE_DECORATIVE_TEST_NAME:"Manual check: image in a figure marked as decorative",LINK_IMAGE_ALT_TEST_NAME:"Manual check: linked image link contains alt text",IMAGE_FIGURE_DUPLICATE_ALT_TEST_NAME:"Alt is the same as caption text",LINK_ALT_UNPRONOUNCEABLE_TEST_NAME:"Alt text in linked image is unpronounceable.",DUPLICATE_TITLE_TEST_NAME:"Duplicate title attribute",LINK_EMPTY_LABELLEDBY_TEST_NAME:"Link invalid aria-labelledby attribute",LINK_STOPWORD_ARIA_TEST_NAME:"Manual check: link text overridden by ARIA that may not be meaningful",LINK_SYMBOLS_TEST_NAME:"Manual check: are the symbols or emoji in this link meaningful?",LINK_CLICK_HERE_TEST_NAME:'Manual check: link contains "click here"',LINK_DOI_TEST_NAME:"APA Style guide recommends using descriptive DOI links",LINK_IDENTICAL_NAME_TEST_NAME:"Manual check: link has identical text as another link but points to a different page",LINK_FILE_EXT_TEST_NAME:"Link points to a file without warning",EMBED_UNFOCUSABLE_TEST_NAME:'Frame with tabindex="-1" will not be keyboard accessible.',EMBED_MISSING_TITLE_TEST_NAME:"Frame missing title attribute",EMBED_GENERAL_TEST_NAME:"Manual check: iframe content",QA_BAD_LINK_TEST_NAME:"Manual check: link target may be invalid",QA_STRONG_ITALICS_TEST_NAME:"Manual check: entire paragraph is emphasized",QA_IN_PAGE_LINK_TEST_NAME:"Broken same-page link",QA_DOCUMENT_TEST_NAME:"Manual check: linked document",QA_UNDERLINE_TEST_NAME:"Underlined text",QA_SUBSCRIPT_TEST_NAME:"Manual check: use of subscript or superscript as visual formatting",QA_NESTED_COMPONENTS_TEST_NAME:"Nested interactive layout components",QA_JUSTIFY_TEST_NAME:"Justified text",QA_SMALL_TEXT_TEST_NAME:"Small text",META_LANG_TEST_NAME:"Meta tag for page language missing",META_SCALABLE_TEST_NAME:"Meta tag prevents user scaling",META_MAX_TEST_NAME:"Meta tag sets max user scaling",META_REFRESH_TEST_NAME:"Meta tag automatically refreshes page",DUPLICATE_ID_TEST_NAME:"Manual check: duplicate ID",META_TITLE_TEST_NAME:"Meta tag for page title missing",UNCONTAINED_LI_TEST_NAME:"Invalid HTML list",TABINDEX_ATTR_TEST_NAME:"Provided tabindex value removes element from reading order",HIDDEN_FOCUSABLE_TEST_NAME:"Screen readers told not to speak the name of an interactive element",LABEL_IN_NAME_TEST_NAME:"Visible name different than machine-readable name",LABELS_ARIA_LABEL_INPUT_TEST_NAME:"Manual check: is there a visible label for this field?",BTN_EMPTY_TEST_NAME:"Button purpose is not machine-readable",BTN_EMPTY_LABELLEDBY_TEST_NAME:"Button has an invalid ARIA label",BTN_ROLE_IN_NAME_TEST_NAME:'Button name repeats the word "button"',CONTRAST_WARNING_TEST_NAME:"Manual check: does this text have enough contrast?",CONTRAST_INPUT_TEST_NAME:"Input does not provide enough contrast to be easily legible",CONTRAST_ERROR_TEST_NAME:"Text does not have enough contrast to be easily legible",CONTRAST_PLACEHOLDER_TEST_NAME:"Placeholder text does not have enough contrast to be easily legible",CONTRAST_PLACEHOLDER_UNSUPPORTED_TEST_NAME:"Manual check: does this placeholder text have enough contrast?",CONTRAST_ERROR_GRAPHIC_TEST_NAME:"Graphic or icon does not have enough contrast with the background",CONTRAST_WARNING_GRAPHIC_TEST_NAME:"Manual check: does this graphic or icon have enough contrast?"},tests:{HEADING_SKIPPED_LEVEL:'<p>Headings and subheadings create a <a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">navigable table of contents</a> for assistive devices. The numbers indicate indents in a nesting relationship:</p>\n <ul><li>Heading level 1<ul><li>Heading level 2: a topic<ul><li>Heading level 3: a subtopic</li></ul></li><li>Heading level 2: a new topic</li></ul></li></ul>\n <p>This heading skipped from level %(prevLevel) to level %(level). From a screen reader, this sounds like content is missing.</p>\n <p><strong>To fix:</strong> adjust levels to form an accurate outline, without gaps.</p>\n ',HEADING_EMPTY:'<p>Headings and subheadings create a <a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">navigable table of contents</a> for assistive devices. The numbers indicate indents in a nesting relationship:</p>\n <ul><li>Heading level 1<ul><li>Heading level 2: a topic<ul><li>Heading level 3: a subtopic</li></ul></li><li>Heading level 2: a new topic</li></ul></li></ul>\n <p>Empty headings create confusing gaps in this outline: they could mean the following content is still part of the previous section, or that the text was unpronounceable for some reason.</p>\n <p><strong>To fix:</strong> add text to this heading, or delete this empty line.</p>\n ',HEADING_LONG:'<p>Headings should be brief and clear. Assistive devices use them as a <a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">navigable table of contents</a> for the page. The numbers indicate indents in a nesting relationship:</p> \n <ul><li>Heading level 1<ul><li>Heading level 2: a topic<ul><li>Heading level 3: a subtopic</li></ul></li><li>Heading level 2: a new topic</li></ul></li></ul>\n <p><strong>To fix:</strong> shorten this heading if possible, or remove the heading style if it was only applied to this text to provide visual emphasis.</p>\n ',QA_BLOCKQUOTE:'<p>Blockquote formatting tells screen readers that the text should be announced as a quotation. This was flagged because short blockquotes are <em>sometimes</em> actually <a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">headings</a>. If this is a heading and not a quotation, use heading formatting instead, so this appears in the page outline.</p>',MISSING_ALT:'<p>When screen readers encounter an image with no alt attribute at all, they dictate the url of the image file instead, often one letter at a time.</p>\n <p><strong>To fix:</strong> either add an empty alt (alt="") to indicate this image should be ignored by screen readers, or add descriptive alt text.</p>\n <p>Note that a <a href="https://www.w3.org/WAI/tutorials/images/informative">good alt describes the image\'s message</a>, not simply what it contains. Depending on the context, the alt for the picture of a child kicking a ball might emphasize the setting, the child, the kick or the ball:</p>\n <ul>\n <li>The sunny spring day brought kids to the park for some soccer.</li>\n <li>A.J. wearing the new team uniform.</li>\n <li>The game-winning kick curved in from the left sideline!</li>\n <li>The size 4 ball is the right size for this 9-year-old child.</li>\n </ul>',MISSING_ALT_LINK_HAS_TEXT:'<p>When screen readers encounter an image with no alt attribute at all, they dictate the url of the image file instead, often one letter at a time.</p>\n\t\t<p>This image is part of a link with text. If the visible text is sufficient to describe the link, add an empty alt (alt="") to tell screen readers to ignore this image. Otherwise, provide the title of the linked page as the alt text.</p>',MISSING_ALT_LINK:'<p>When screen readers encounter an image with no alt attribute at all, they dictate the url of the image file instead, often one letter at a time. This is especially a problem for linked images.</p>\n <p><strong>To fix:</strong> either add an empty alt (alt="") to indicate this image should be ignored by screen readers, or add descriptive alt text.</p>\n ',IMAGE_DECORATIVE:'<p>Unless this image is purely decorative (a spacer icon or background texture), an alt should probably be provided. Photos in page content <strong>almost always need alt text.</strong> Since many screen reader users can see there is an image present, it can be very confusing to move the cursor across the place on the page where an image is visible, but hear nothing.</p>\n <p>Note that a <a href="https://www.w3.org/WAI/tutorials/images/informative">good alt describes the image\'s message</a>, not simply what it contains. Depending on the context, the alt for the picture of a child kicking a ball might emphasize the setting, the child, the kick or the ball:</p>\n <ul>\n <li>The sunny spring day brought kids to the park for some soccer.</li>\n <li>A.J. wearing the new team uniform.</li>\n <li>The game-winning kick curved in from the left sideline!</li>\n <li>The size 4 ball is the right size for this 9-year-old child.</li>\n </ul>',ALT_FILE_EXT:'This image\'s alt text is "%(alt)," which probably describes the file name, not the contents of the image.\n <p><strong>To fix:</strong> set this image\'s alternative text to a concise description of what this image means in this context.</p>\n <p>Note that a <a href="https://www.w3.org/WAI/tutorials/images/informative">good alt describes the image\'s message</a>, not simply what it contains. Depending on the context, the alt for the picture of a child kicking a ball might emphasize the setting, the child, the kick or the ball:</p>\n <ul>\n <li>The sunny spring day brought kids to the park for some soccer.</li>\n <li>A.J. wearing the new team uniform.</li>\n <li>The game-winning kick curved in from the left sideline!</li>\n <li>The size 4 ball is the right size for this 9-year-old child.</li>\n </ul>',ALT_PLACEHOLDER:'<p>This image\'s alt text is "%(alt)," which was flagged for being common placeholder text.</p>\n <p><strong>To fix:</strong> set this image\'s alternative text to a concise description of what this image means in this context.</p>\n <p>Note that a <a href="https://www.w3.org/WAI/tutorials/images/informative">good alt describes the image\'s message</a>, not simply what it contains. Depending on the context, the alt for the picture of a child kicking a ball might emphasize the setting, the child, the kick or the ball:</p>\n <ul>\n <li>The sunny spring day brought kids to the park for some soccer.</li>\n <li>A.J. wearing the new team uniform.</li>\n <li>The game-winning kick curved in from the left sideline!</li>\n <li>The size 4 ball is the right size for this 9-year-old child.</li>\n </ul>',ALT_MAYBE_BAD:'<p>This image\'s alt text is "%(alt)," which was flagged as containing a suspicious number of characters that may not form words.</p>\n <p><strong>To fix:</strong> if this is placeholder text, set this image\'s alternative text to a concise description of what this image means in this context.</p>\n <p>Note that a <a href="https://www.w3.org/WAI/tutorials/images/informative">good alt describes the image\'s message</a>, not simply what it contains. Depending on the context, the alt for the picture of a child kicking a ball might emphasize the setting, the child, the kick or the ball:</p>\n <ul>\n <li>The sunny spring day brought kids to the park for some soccer.</li>\n <li>A.J. wearing the new team uniform.</li>\n <li>The game-winning kick curved in from the left sideline!</li>\n <li>The size 4 ball is the right size for this 9-year-old child.</li>\n </ul>',LINK_ALT_MAYBE_BAD:'<p>When a link includes an image, <a href="https://webaim.org/techniques/hypertext/link_text#alt_link" title="opens in new tab">the image\'s alt text becomes the link text</a> announced by screen readers.\n Links should clearly and concisely describe their destination, even out of context.</p>\n <p>This image\'s alt text is "%(alt)," which may not describe this link.</p>',LINK_PLACEHOLDER_ALT:'<p>When a link includes an image, <a href="https://webaim.org/techniques/hypertext/link_text#alt_link" title="opens in new tab">the image\'s alt text becomes the link text</a> announced by screen readers.\n Links should clearly and concisely describe their destination, even out of context.</p>\n <p>This image\'s alt text is "%(alt)," which probably does not describe this link.</p>',LINK_ALT_FILE_EXT:'<p>This image\'s alt text is "%(alt)," which is probably a filename.</p>\n <p>When a link is wrapped around an image and there is no other text, the <a href="https://webaim.org/techniques/hypertext/link_text#alt_link">image\'s alt text becomes the link text</a> announced by screen readers.\n Links should clearly and concisely describe their destination; a URL (usually pronounced by the screen reader one letter at a time) does not.</p>\n <ul>\n <li>Good link text: "About us"</li>\n <li>Bad link text: "H T T P S colon forward slash forward slash example dot com forward slash aye bee oh you tee you ess"</li>\n </ul>',SUS_ALT:'<p>This image\'s alt text is "%(alt)," which mentions that this image is an image.</p>\n <p>Screen readers announce they are describing an image when reading alt text, so \n phrases like "image of" and "photo of" are usually redundant in alt text; the screen reader user hears "image: image of something."</p>\n <p>Note that this is OK if the format is referring to the <strong>content</strong> of the image:</p>\n <ul><li>Format is redundant: "<em>photo of</em> a VHS tape"</li>\n <li>Format is relevant: "<em>photo of</em> a VHS tape in a photo album being discussed in a history class"</li></ul>',LINK_SUS_ALT:'<p>This image\'s alt text is "%(alt)," which mentions that this image is an image.</p>\n <hr><p>Links should clearly and concisely describe their destination. Since words like "image," "graphic" or "photo" are already redundant in text alternatives (screen readers already identify the image as an image), their presence in a linked image usually means the image\'s text alternative is <a href="https://webaim.org/techniques/hypertext/link_text#alt_link">describing the image instead of the link</a>.</p>\n <ul>\n <li>Good link text: "About us"</li>\n <li>Bad link text: "Image of five people jumping"</li>\n </ul>',ALT_UNPRONOUNCEABLE:'<p>This image\'s alt text is "%(alt)," which only contains unpronounceable symbols and/or spaces. Screen readers will announce that an image is present, and then pause awkwardly: "image: ____."</p>\n <p><strong>To fix:</strong> add a descriptive alt, or provide a <em>completely</em> empty alt (alt="") if this is just an icon or spacer, and screen readers should ignore it.</p>\n <p>Note that a <a href="https://www.w3.org/WAI/tutorials/images/informative">good alt describes the image\'s message</a>, not simply what it contains. Depending on the context, the alt for the picture of a child kicking a ball might emphasize the setting, the child, the kick or the ball:</p>\n <ul>\n <li>The sunny spring day brought kids to the park for some soccer.</li>\n <li>A.J. wearing the new team uniform.</li>\n <li>The game-winning kick curved in from the left sideline!</li>\n <li>The size 4 ball is the right size for this 9-year-old child.</li>\n </ul>',LINK_IMAGE_NO_ALT_TEXT:"<p>When a link is wrapped around an image, the image's alt text <a href=\"https://webaim.org/techniques/hypertext/link_text#alt_link\">provides the link's title for screen readers</a>.</p>\n <p><strong>To fix:</strong> set this image's alternative text to something that describes the link's destination, or add text next to the image, within the link.</p>",IMAGE_ALT_TOO_LONG:'<p>Image text alternatives are announced by screen readers as a single run-on sentence; listeners must listen to the entire alt a second time if they miss something. If this cannot be reworded to something succinct, it is better to use the alt to reference a <em>visible</em> <a href="https://www.w3.org/WAI/tutorials/images/complex/">text alternative for complex images</a>. For example:</p>\n <ul><li>"Event poster; details follow in caption"</li>\n <li>"Chart showing our issues going to zero; details follow in table"</li></ul>\n This image\'s alt text is: <em>%(alt)</em>\n ',LINK_IMAGE_LONG_ALT:"<p><a href=\"https://webaim.org/techniques/hypertext/link_text#alt_link\">The alt text on a linked image is used to describe the link destination</a>. Links should be brief, clear and concise, as screen reader users often listen to the list of links on the page to find content of interest. Long alternative text inside a link often indicates that the image's text alternative is describing the image instead rather than the link.</p>\n This image's alt text is: <em>%(alt)</em>",LINK_IMAGE_ALT_AND_TEXT:'<p>Screen readers will <a href="https://www.w3.org/WAI/tutorials/images/functional/">include the image\'s alt text when describing this link</a>.</p>\n <p>Check that the combined text is concise and meaningful:<br>"<em><strong>%(alt)</strong></em>"</p>\n <p></p>\n <ul>\n <li>Keep alts that add relevant meaning:<br>"Buy (A Tigers v. Falcons ticket)."</li>\n <li>Edit unhelpful or irrelevant alts:<br>"Buy (A piece of paper with team logos on it)."</li>\n <li>Remove unnecessary alts:<br>"Buy Tigers v. Falcons tickets (A Tigers v. Falcons ticket)."</li>\n </ul>\n ',LINK_EMPTY:'<p>This link is either a typo (a linked space character), or a linked image with no text alternative.</p>\n <p>Screen readers will either say nothing when they reach this link: <br><em>"Link, [...awkward pause where the link title should be...],"</em><br>or read the URL: <br><em>"Link, H-T-T-P-S forward-slash forward-slash example dot com"</em></p>\n <p><strong>To fix:</strong></p>\n <ul><li>If this a typo, delete it. Note that typo links can be hard to see if they are next to a "real" link: one will be on the text, one on a space.</li><li>If it is a real link, add text to describe where it goes.</li>',LINK_EMPTY_NO_LABEL:'<p>This link is either a typo (a linked space character), or a linked image with no text alternative.</p>\n <p>Screen readers will either say nothing when they reach this link: <br><em>"Link, [...awkward pause where the link title should be...],"</em><br>or read the URL: <br><em>"Link, H-T-T-P-S forward-slash forward-slash example dot com"</em></p>\n <p><strong>To fix:</strong></p>\n <ul><li>If this a typo, delete it. Note that typo links can be hard to see if they are next to a "real" link: one will be on the text, one on a space.</li><li>If it is a real link, add text to describe where it goes.</li>',LINK_URL:'<p>This link\'s text is:<br> <strong>%(text)</strong></p>\n <p><a href="https://webaim.org/techniques/hypertext/link_text">Links should be meaningful and concise</a>. Readers often skim by link titles. This is especially true of screen reader users, who navigate using a list of on-page links.</p>\n <p>A linked URL breaks this pattern; the reader has to read the preceding paragraph to figure out the link\'s purpose from context.</p>\n <ul>\n <li>Meaningful and concise link: "Tips for writing meaningful links"</li>\n <li>Linked URL, as pronounced by a screen reader: "H T T P S colon forward-slash forward-slash example dot com forward-slash tips forward-slash meaningful-links"</li>\n </ul>',LINK_STOPWORD:'<p>This link\'s text is: <strong>%(text)</strong></p>\n <p>Readers skim for links. This is especially true of screen reader users, who navigate using a list of on-page links.</p>\n <p>Generic links like "click here," "read more" or "download" expect the reader be reading slowly and carefully enough to figure out each link\'s purpose from context. Few readers do this, so click-through rates on meaningless links are extremely poor.</p>\n <ul>\n <li>Ideal: "Learn about <a href="https://webaim.org/techniques/hypertext/link_text">meaningful links"</a></strong></li>\n <li>Not meaningful: "Click <a href="https://webaim.org/techniques/hypertext/link_text">here</a> to learn about meaningful links."</li>\n <li>Not concise: "<a href="https://webaim.org/techniques/hypertext/link_text">Click here to learn more about meaningful links</a>"</li>\n </ul>\n ',QA_PDF:"<p>Many mobile and assistive device users struggle to read content in PDFs. PDFs generally do not allow for changing font sizes, and often contain features that are incompatible with screen readers.</p>\n <p>Ideally make the content of this linked PDF available on a Web page or in an editable document, and only link to this PDF as a \"printable\" alternative. If this PDF is the only way you are providing to access this content, you will need to <a href='https://webaim.org/techniques/acrobat/' target='_blank'>manually check that the PDF is well-structured</a>, with headings, lists and table headers, and provides alt text for its images.</p>",LINK_NEW_TAB:'<p>Readers can always choose to open a link a new window. When a link forces open a new window, it can be confusing and annoying, especially for assistive device users who may wonder why their browser\'s "back" button is suddenly disabled.</p>\n <p>There are two general exceptions:</p>\n <ul>\n <li>When the user is filling out a form, and opening a link in the same window would cause them to lose their work.</li>\n <li>When the user is clearly warned a link will open a new window.</li>\n </ul>\n <p><strong>To fix:</strong> set this link back its default target, or add a screen-reader accessible warning (text or an icon with alt text).</p>\n ',TABLES_MISSING_HEADINGS:"\n <p>To fix:</p>\n <ul><li>If this table contains data that is meaningfully organized by row and column, edit the table's properties and specify whether headers have been placed in the first row, column or both. This lets screen reader users hear the headers repeated while navigating the content.</li>\n <li>If this table does not contain rows and columns of data, but is instead being used for visual layout, remove it. Tables overflow the page rather than reflowing on mobile devices, and should only be used when the horizontal relationships are necessary to understand the content.</li></ul>\n ",TABLES_SEMANTIC_HEADING:'<p>To fix: remove heading formatting. Use row and column headers instead.</p>\n <p>Content headings ("Heading 1", "Heading 2") form a navigable table of contents for screen reader users, \n labelling all content <strong>until the next heading</strong>. Table headers label specific columns or rows within a table.</p> \n <p></p>\n <table><tr><th>1</th><th>2</th><th>3</th><td rowspan="2">To illustrate: a <strong>table</strong> header in cell 2 would only label its column: cell B. <br><br>\n A <strong>content</strong> heading in cell 2 would label all subsequent text, reading from left to right: cells 3, A, B and C, as well as this text!</td></tr>\n <tr><td>A</td><td>B</td><td>C</td></table>\n ',TABLES_EMPTY_HEADING:"\n <p>When exploring tables, screen readers repeat table header cells as needed to orient users. \n Without headers, it is very easy to get lost; screen reader users have to count columns and rows and try to remember which columns went with which rows.</p>\n <p><strong>To fix:</strong> make sure each header cell in this table contains text.</p>\n ",QA_FAKE_LIST:'<p>List formatting is structural:</p> \n <ol><li>List formatting indents and reflows on overflow. Text aligns vertically with the line above it.</li>\n <li>Lists are machine-readable. Screen readers can orient their users, announcing this as "list item, 2 of 3."</li></ol>\n <p> 3. But this third item is just a sentence with a number in front of it. It wraps incorrectly, and screen readers do not know it is related to the other items in the list.</p>\n <p><strong>To fix:</strong> if this "%(text)" is part of a list, replace it with list formatting.</p>\n ',QA_FAKE_HEADING:'<p>If this all-bold line of text is functioning as a heading for the following text rather than a visual emphasis, replace the bold formatting with the appropriately numbered heading. Otherwise, dismiss this alert.</p>\n <p>Headings and subheadings create a <a href="https://www.w3.org/WAI/tutorials/page-structure/headings/">navigable table of contents</a> for assistive devices. The heading\'s <strong><em>number</em></strong> indicates its <strong><em>depth</em></strong> in the page outline; e.g.:</p>\n <ul><li>Heading level 1<ul><li>Heading level 2: a topic<ul><li>Heading level 3: a subtopic</li></ul></li><li>Heading level 2: a new topic</li></ul></li></ul>\n ',QA_UPPERCASE:"<p>UPPERCASE TEXT CAN BE MORE DIFFICULT TO READ FOR MANY PEOPLE, AND IS OFTEN INTERPRETED AS SHOUTING.</p>\n <p>Consider using sentence case instead, and using bold text or font changes for visual emphasis, or structural formatting like headings for emphasis that will also be announced by screen readers.</p>",EMBED_VIDEO:'<p>If a recorded video contains speech or meaningful sounds, it must <a href="https://www.w3.org/WAI/media/av/captions/" title="Opens in new window">provide captions</a>.</p>\n <p>Note that automatic, machine-generated captions must be proofread, and speaker identifications must be added, before being considered an equal alternative.</p>',EMBED_AUDIO:'<p>If this audio contains speech, a <a href="https://www.w3.org/WAI/media/av/transcribing/" title="Opens in new window">text alternative</a> must be provided on this page or linked.</p>\n <p>Note that automatic, machine-generated transcripts must be proofread, and speaker identifications must be added, before being considered an equal alternative</p>',EMBED_DATA_VIZ:"<p>Visualization widgets are often difficult or impossible for assistive devices to operate, and can be difficult to understand for readers with low vision or colorblindness.</p>\n\t\t\t\t\t\t\t<p>Unless this particular widget has high visual contrast, can be operated by a keyboard and described by a screen reader, assume that an alternate format (text description, data table or downloadable spreadsheet) should also be provided.</p>",EMBED_CUSTOM:"<p>This checker cannot test inside embedded content. Check to sure images inside this embed have alt text, videos have captions, and interactive components can be <a href='https://webaim.org/techniques/keyboard/'>operated by a keyboard</a>.</p>",LABELS_ARIA_LABEL_INPUT:"<p>Labeling fields with only a title or placeholder means the label visually disappears as soon as someone starts writing. This makes it difficult for people to review input when there are several fields. Check to make sure a visible field label remains and matches the invisible field title or placeholder.</p><p><strong {B}>Invisible field name:</strong> <strong {C}>%(TEXT)</strong></p>"}};class Ve extends HTMLElement{constructor(){super()}connectedCallback(){if(!this.initialized){const t=this.attachShadow({mode:"open"});let n=document.createElement("div");n.classList.add("ed11y-wrapper","ed11y-alt-wrapper");let s=N.imageAlts[this.dataset.ed11yImg],i=document.createElement("span");""!==s.altText?i.textContent=s.altText:(i.classList.add("ed11y-decorative"),i.textContent=e._("DECORATIVE")),i.classList.add(`ed11y-${s.type}`),n.appendChild(i),N.attachCSS(n),t.appendChild(n),this.initialized=!0}}}class je extends HTMLElement{constructor(){super()}connectedCallback(){this.initialized||(this.open=!1,this.racing=!1,this.style.setProperty("outline","0px solid transparent"),this.initialized=!0)}handleHover(e){e.preventDefault();let t=this.getRootNode().host;this.classList.contains("intersecting")||!0===t.open||!1!==t.racing||(this.open=!0,t.racing=!0,t.toggleTip(!0),y.toggledFrom=this,window.setTimeout(function(){t.racing=!1},250,t))}handleFocus(){let e=this.getRootNode().host;this.getRootNode().host.classList.contains("ed11y-offscreen")&&(e.result.element.scrollIntoView(),ue())}toggleClick(e){e.preventDefault();let t=this.getRootNode().host;if(!1===t.racing){t.racing=!0,y.toggledFrom=this;let e="false"===t.getAttribute("data-ed11y-open")?"open":"close";t.setAttribute("data-ed11y-action",e),"open"===e&&window.setTimeout(function(){let e=document.querySelector('ed11y-element-tip[data-ed11y-open="true"]');e?.shadowRoot.querySelector(".title").focus()},500),window.setTimeout(function(){t.racing=!1},250,t)}}closeOtherTips(){y.tipOpen&&y.openTip.button.setAttribute("data-ed11y-action","close")}buildTip(){this.tipNeedsBuild=!1;let e=document.createElement("ed11y-element-tip");e.result=this.result,e.setAttribute("data-ed11y-result",this.resultID),e.classList.add("ed11y-element"),e.style.setProperty("opacity","0"),y.panelAttachTo.insertAdjacentElement("beforeend",e),this.tip=e}toggleTip(e){this.tipNeedsBuild&&this.buildTip(),this.toggle.setAttribute("aria-expanded",e);let t=this.dismissable?"ed11y-ring-yellow":"ed11y-ring-red";y.inlineAlerts?x(["ed11y-hidden-highlight","ed11y-ring-red","ed11y-ring-yellow","ed11y-warning-block","ed11y-error-block","ed11y-warning-inline","ed11y-error-inline"]):be(this.resultID,e),!0===e?(this.tip.style.setProperty("opacity","0"),document.dispatchEvent(new CustomEvent("ed11yPop",{detail:{id:"ed11y-result-"+this.toggle.getAttribute("data-ed11y-result"),result:this.result,tip:this.tip}})),this.closeOtherTips(),this.tip.setAttribute("data-ed11y-action","open"),y.inlineAlerts&&this.result.element.classList.add(t),requestAnimationFrame(()=>we(this.toggle,this.tip,4,!0)),0===y.jumpList.length&&Ne(),y.lastOpenTip=Number(this.getAttribute("data-ed11y-jump-position")),y.tipOpen=!0,y.openTip={button:this,tip:this.tip},this.result.highlight?.style.setProperty("opacity","1")):(document.dispatchEvent(new CustomEvent("ed11yShut",{detail:{id:"ed11y-result-"+this.toggle.getAttribute("data-ed11y-result")}})),this.tip.setAttribute("data-ed11y-action","shut"),this.result.highlight?.style.setProperty("opacity","0"),y.tipOpen=!1,y.openTip={button:!1,tip:!1}),this.setAttribute("data-ed11y-open",e),this.open=e}static get observedAttributes(){return["data-ed11y-action"]}attributeChangedCallback(e,t,n){if(this.initialized&&"data-ed11y-action"===e)if("false"!==n){let e="open"===n;this.setAttribute("data-ed11y-action","false"),this.toggleTip(e)}}}class Xe extends HTMLElement{constructor(){super()}template(){return'\n <div class=\'ed11y-buttonbar\'>\n <button id=\'ed11y-show-hidden\' data-ed11y-pressed=\'false\' hidden>\n <svg aria-hidden="true" class="shown" xmlns="http://www.w3.org/2000/svg" width="10" viewBox="9 0 640 512"><path fill="Currentcolor" d="M288 32c-81 0-146 37-193 81C49 156 17 208 3 244c-3 8-3 17 0 25C17 304 49 356 95 399C142.5 443 207 480 288 480s146-37 193-81c47-44 78-95 93-131c3-8 3-17 0-25c-15-36-46-88-93-131C434 69 369 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35-29 64-64 64c-7 0-14-1-20-3c-6-2-12 2-12 7c.3 7 1 14 3 21c14 51 66 82 118 68s82-66 68-118c-11-42-48-69-89-71c-6-.2-9 6-7 12c2 6 3 13 3 20z"/></svg>\n <svg aria-hidden="true" class="hidden" xmlns="http://www.w3.org/2000/svg" viewBox="39 0 640 512"><path fill="Currentcolor" d="M39 5C28-3 13-1 5 9S-1 35 9 43l592 464c10 8 26 6 34-4s6-26-4-34L526 387c39-41 66-86 78-118c3-8 3-17 0-25c-15-36-46-88-93-131C466 69 401 32 320 32c-68 0-125 26-169 61L39 5zM223 150C249 126 283 112 320 112c80 0 144 65 144 144c0 25-6 48-17 69L408 295c8-19 11-41 5-63c-11-42-48-69-89-71c-6-0-9 6-7 12c2 6 3 13 3 20c0 10-2 20-7 28l-90-71zM373 390c-16 7-34 10-53 10c-80 0-144-65-144-144c0-7 1-14 1-20L83 162C60 191 44 221 35 244c-3 8-3 17 0 25c15 36 46 86 93 131C175 443 239 480 320 480c47 0 89-13 126-33L373 390z"/></svg>\n <span class="ed11y-sr-only"></span>\n </button>\n <button id=\'ed11y-visualize\' data-ed11y-pressed="false" class=\'ed11y-panel-fa\'>\n <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="10" viewBox="0 10 512 512"><path fill="Currentcolor" d="M152 38c10 9 11 24 2 34l-72 80c-4 5-11 8-17 8s-13-2-18-7L7 113C-2 104-2 88 7 79s25-9 34 0l22 22 55-61c9-10 24-11 34-2zm0 160c10 9 11 24 2 34l-72 80c-4 5-11 8-17 8s-13-2-18-7L7 273c-9-9-9-25 0-34s25-9 35 0l22 22 55-61c9-10 24-11 34-2zM224 96c0-18 14-32 32-32l224 0c18 0 32 14 32 32s-14 32-32 32l-224 0c-18 0-32-14-32-32zm0 160c0-18 14-32 32-32l224 0c18 0 32 14 32 32s-14 32-32 32l-224 0c-18 0-32-14-32-32zM160 416c0-18 14-32 32-32l288 0c18 0 32 14 32 32s-14 32-32 32l-288 0c-18 0-32-14-32-32zM48 368a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>\n <span class="ed11y-sr-only"></span>\n </button>\n <div id=\'ed11y-visualizers\' class="content" hidden>\n <details id="ed11y-headings-tab">\n <summary>\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" aria-hidden="true"><path fill="currentColor" d="M0 96C0 78 14 64 32 64l384 0c18 0 32 14 32 32s-14 32-32 32L32 128C14 128 0 114 0 96zM64 256c0-18 14-32 32-32l384 0c18 0 32 14 32 32s-14 32-32 32L96 288c-18 0-32-14-32-32zM448 416c0 18-14 32-32 32L32 448c-18 0-32-14-32-32s14-32 32-32l384 0c18 0 32 14 32 32z"></path></svg> <span class="summary-title"></span>\n </summary>\n <div class="details">\n <span class="details-title"></span>\n <ul id=\'ed11y-outline\'></ul>\n </div>\n </details>\n <details id="ed11y-alts-tab">\n <summary>\n <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 576 512"><path fill="currentColor" d="M160 80l352 0c9 0 16 7 16 16l0 224c0 8.8-7.2 16-16 16l-21 0L388 179c-4-7-12-11-20-11s-16 4-20 11l-52 80-12-17c-5-6-12-10-19-10s-15 4-19 10L176 336 160 336c-9 0-16-7-16-16l0-224c0-9 7-16 16-16zM96 96l0 224c0 35 29 64 64 64l352 0c35 0 64-29 64-64l0-224c0-35-29-64-64-64L160 32c-35 0-64 29-64 64zM48 120c0-13-11-24-24-24S0 107 0 120L0 344c0 75 61 136 136 136l320 0c13 0 24-11 24-24s-11-24-24-24l-320 0c-49 0-88-39-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"></path></svg> <span class="summary-title"></span>\n </summary>\n <div class="details">\n <span class="details-title"></span>\n <ul id=\'ed11y-alt-list\'></ul>\n </div>\n </details>\n </div>\n <button type=\'button\' id=\'ed11y-toggle\'><span class="ed11y-sr-only"></span><span class="ed11y-toggle-circle"><span class=\'icon\'><svg class="errors-icon" xmlns="http://www.w3.org/2000/svg" width="10" aria-hidden="true" viewBox="0 0 448 512"><path fill="currentColor" d="M64 32C64 14 50 0 32 0S0 14 0 32L0 64 0 368 0 480c0 18 14 32 32 32s32-14 32-32l0-128 64-16c41-10 85-5 123 13c44.2 22 96 25 142 7l35-13c13-5 21-17 21-30l0-248c0-23-24-38-45-28l-10 5c-46 23-101 23-147 0c-35-18-75-22-114-13L64 48l0-16z"></path></svg><svg class="pass-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="-.75 -3.5 10.1699 19.1777"><path fill="currentColor" d="M3.7031,10.5527c-.3633-.6562-.6426-1.1387-.8379-1.4473l-.3105-.4863-.2344-.3574c-.5117-.7969-1.0449-1.4551-1.5996-1.9746.3164-.2617.6113-.3926.8848-.3926.3359,0,.6348.123.8965.3691s.5918.7148.9902,1.4062c.4531-1.4727,1.0293-2.8691,1.7285-4.1895.3867-.7188.7314-1.2021,1.0342-1.4502s.7041-.3721,1.2041-.3721c.2656,0,.5938.041.9844.123-1.0039.8086-1.8066,1.7695-2.4082,2.8828s-1.3789,3.0762-2.332,5.8887Z"/></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="close-icon" viewBox="0 0 384 512"><path fill="currentColor" d="M343 151c13-13 13-33 0-46s-33-13-45 0L192 211 87 105c-13-13-33-13-45 0s-13 33 0 45L147 256 41 361c-13 13-13 33 0 45s33 13 45 0L192 301 297 407c13 13 33 13 45 0s13-33 0-45L237 256 343 151z"></path></svg></span></span></button>\n <button class=\'ed11y-jump next\' data-ed11y-goto=\'0\' aria-haspopup="dialog"><svg class="hover-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="11" viewBox="0 -15 90 120"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m30 00 50 50-50 50" stroke-width="18"></path></svg><span class=\'toggle-count\'></span><span class=\'jump-next ed11y-sr-only\'></span></button>\n </div>\n </div>\n <div id="ed11y-message" aria-live="polite"></div>\n '}connectedCallback(){if(!this.initialized){this.style.setProperty("outline","0"),this.classList.add("ed11y-element");const e=this.attachShadow({mode:"open"}),t=document.createElement("aside");t.style.setProperty("opacity","0"),t.setAttribute("id","ed11y-panel"),t.classList.add("ed11y-wrapper","ed11y-panel-wrapper","ed11y-pass","ed11y-preload"),t.innerHTML=this.template(),e.appendChild(t);t.querySelectorAll(".ed11y-buttonbar button").forEach(e=>{e.addEventListener("click",this.handleBarClick)});const n=t.querySelector("#ed11y-alts-tab"),s=t.querySelector("#ed11y-headings-tab");t.querySelector("#ed11y-readability-tab"),n.addEventListener("toggle",()=>{n.open&&s.open&&s.removeAttribute("open")}),s.addEventListener("toggle",()=>{n.open&&s.open&&n.removeAttribute("open")}),this.initialized=!0}}handleBarClick(e){switch(e.preventDefault(),N.message.textContent="",e.currentTarget.getAttribute("id")){case"ed11y-toggle":We();break;case"ed11y-show-hidden":$e();break;case"ed11y-visualize":y.showPanel||We(),_e()}}}class Je extends HTMLElement{constructor(){super()}connectedCallback(){if(!this.initialized){const e=this.attachShadow({mode:"open"});let t=document.createElement("div");t.classList.add("ed11y-wrapper","ed11y-heading-wrapper");let n=this.dataset.ed11yHeadingOutline,s=y.headingOutline[n];t.innerHTML="H"+s.headingLevel;let i=Math.max(52-8*s.headingLevel,12);t.style.setProperty("font-size",i+"px"),e.appendChild(t),this.initialized=!0}}}class Ze extends HTMLElement{constructor(){super()}connectedCallback(){!this.initialized&&this.result&&this.renderOnce()}renderOnce(){this.initialized=!0,this.open=!0,this.style.setProperty("opacity","0"),this.style.setProperty("outline","0px solid transparent");const t=this.attachShadow({mode:"open"});this.issueIndex=Number.parseInt(this.result.toggle.dataset.ed11yJumpPosition),this.issueNext=this.issueIndex<y.jumpList.length?this.issueIndex+2:0,this.issuePrev=this.issueIndex>0?this.issueIndex:y.jumpList.length,this.wrapper=document.createElement("div"),this.wrapper.setAttribute("role","dialog"),this.wrapper.dataset.ed11yTest=this.result.test,this.dismissable="error"!==this.result.type,this.dismissed=!!this.result.dismissalStatus,this.wrapper.classList.add("ed11y-tip-wrapper","ed11y-wrapper"),this.wrapper.style.setProperty("opacity","0"),this.wrapper.setAttribute("aria-label",`${e._("ALERT_TEXT")}\n ${this.issueIndex+1}`),this.addEventListener("mouseover",this.handleHover,{passive:!0}),N.attachCSS(this.wrapper),this.tip=document.createElement("div"),this.tip.classList.add("tip");let n=document.createElement("div");n.classList.add("content");const i=document.createElement("div");if(i.classList.add("ed11y-tip-alert"),this.result.content.includes('class="title"'))n.innerHTML=this.result.content.split("<hr")[0],n.querySelector(".title").prepend(i);else{let e=document.createElement("div");const t=this.result.content.split(/[.!]/),s=document.createElement("div");s.innerHTML=t.shift()+".",s.classList.add("title"),s.prepend(i),s.setAttribute("tabindex","-1"),e.append(s);const o=document.createElement("div");o.classList.add("sa11y-tip"),o.innerHTML=t.join("."),e.appendChild(o),n.append(e)}if(this.result.contrastDetails){const t=document.createElement("div");t.classList.add("ed11y-contrast-tools"),n.append(t);const i=function(t){const{sanitizedText:n,color:s,background:i,fontWeight:o,fontSize:l,ratio:r,textUnderline:a}=t,c=i&&"image"!==i.type,d=c?se(i):"#000000",h=s?se(s):"#000000",p=o?`font-weight:${o};`:"",u=l?`font-size:${l}px;`:"",m=a?`text-decoration:${a};`:"",E=s?"":'class="unknown"',g=i&&"image"!==i.type?"":'class="unknown"',A=s?"":`<span class="visually-hidden">(${e._("UNKNOWN")})</span>`,_=i?"":`<span class="visually-hidden">(${e._("UNKNOWN")})</span>`;let T;T=r||e._("UNKNOWN");const L=document.createElement("div");return L.id="contrast-tools",L.innerHTML=`\n <hr aria-hidden="true">\n <div id="contrast" class="badge">${e._("CONTRAST")}</div>\n <div id="value" class="badge">${T}</div>\n <div id="good" class="badge good-contrast" hidden>${e._("GOOD")} <span class="good-icon"></span></div>\n <div id="contrast-preview" style="color:${h};${c?`background:${d};`:""}${p+u+m}">${n}</div>\n <div id="color-pickers">\n <label for="fg-text">${e._("FG")} ${A}\n <input type="color" id="fg-input" value="${h}" ${E}/>\n </label>\n <label for="bg">${e._("BG")} ${_}\n <input type="color" id="bg-input" value="${d}" ${g}/>\n </label>\n </div>`,L}(this.result.contrastDetails);t.appendChild(i),function(e,t){const n=e?.querySelector("#contrast-tools");if(n){const{fontSize:n,fontWeight:i,type:o,isLargeText:l}=t,r=e.querySelector("#contrast"),a=e.querySelector("#contrast-preview"),c=e.querySelector("#fg-input"),d=e.querySelector("#bg-input"),h=e.querySelector("#value"),p=e.querySelector("#good"),u=(e,t)=>{e.forEach(e=>{e.classList.toggle("good-contrast",t),e.classList.toggle("error-badge",!t)})},m=()=>{const e=c.value,t=d.value;[c,d].forEach(e=>e.classList.remove("unknown")),a.style.color=e,a.style.backgroundColor=t,a.style.backgroundImage="none";const n=oe(Z(e),Z(t)),i=[h,r],m=n.ratio;h.textContent=ie(m);const E=s.Global.contrastAAA,g=m>=3,A=m>=(E?7:4.5),_=m>=(E?4.5:3);switch(o){case"svg-error":case"svg-text":case"svg-warning":p.hidden=!g,u(i,g);break;default:l?(u([h,r],_),p.hidden=!_):(u([h,r],A),p.hidden=!A)}};c.addEventListener("input",m),d.addEventListener("input",m),setTimeout(()=>{const t=e.querySelector("#suggest");if(t){const e=()=>{const e=t.textContent;c.value=e,m(),navigator.clipboard.writeText(e).catch(()=>{})};t.addEventListener("click",e)}},0)}}(t,this.result.contrastDetails);const o=function(t){let n;const{color:i,background:o,fontWeight:l,fontSize:r,isLargeText:a,type:c}=t;if(i&&o&&"image"!==o.type&&("text"===c||"svg-error"===c||"input"===c)){const l=le(i,o,a,s.Global.contrastAAA);let r;const c='<hr aria-hidden="true">',d=`<button id="suggest" class="badge" style="color:${l.color};background-color:${se(t.background)};">${l.color}</button>`;l.size,r=null===l.color?`${c} ${e._("NO_SUGGESTION")}`:`${c} ${e._("CONTRAST_COLOR")} ${d}`,n=document.createElement("div"),n.id="advice";const h=t.opacity<1?`<hr aria-hidden="true"> ${e.sprintf("CONTRAST_OPACITY")}`:r;n.innerHTML=h}return n}(this.result.contrastDetails);o&&t.appendChild(o)}if(!y.inlineAlerts||b.editLinks){const t=document.createElement("div");if(y.inlineAlerts)t.classList.add("ed11y-custom-edit-links"),t.append(b.editLinks.cloneNode(!0));else{t.classList.add("ed11y-tip-dismissals");const n=document.createElement("button"),s=document.createElement("span");s.classList.add("ed11y-transfer-icon"),s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 256 512"><path fill="currentColor" d="M0 29C-1 47 12 62 29 64l8 1C71 67 96 95 96 128L96 224l-32 0c-18 0-32 14-32 32s14 32 32 32l32 0 0 96c0 33-26 61-59 64l-8 1C12 450-1 465 0 483s17 31 35 29l8-1c34-3 64-19 85-43c21 24 51 40 85 43l8 1c18 2 33-12 35-29s-12-33-29-35l-8-1C186 445 160 417 160 384l0-96 32 0c18 0 32-14 32-32s-14-32-32-32l-32 0 0-96c0-33 26-61 59-64l8-1c18-2 31-17 29-35S239-1 221 0l-8 1C179 4 149 20 128 44c-21-24-51-40-85-43l-8-1C17-1 2 12 0 29z"/></svg>',n.textContent=e._("transferFocus"),n.prepend(s),n.classList.add("dismiss","ed11y-transfer-focus"),t.append(n),n.addEventListener("click",function(){!function(){if(!y.tipOpen)return;const e=y.openTip.tip.dataset.ed11yResult,t=S[e].element,n=t.closest("[contenteditable]");if(n||t.closest("textarea, input")){if(y.toggledFrom=!1,"true"===t.getAttribute("contenteditable")?y.toggledFrom=t:t.closest('p[contenteditable="true"]')?y.toggledFrom=t.closest('p[contenteditable="true"]'):y.toggledFrom=!1,y.openTip.tip.shadowRoot.querySelector(".close").click(),!y.toggledFrom&&n){n.focus();const e=document.createRange(),s=window.getSelection();e.setStart(t,0),e.collapse(!0),s.removeAllRanges(),s.addRange(e)}}else t.closest("a")?y.toggledFrom=t.closest("a"):(null!==t.getAttribute("tabindex")||t.setAttribute("tabindex","0"),y.toggledFrom=t),y.openTip.tip.shadowRoot.querySelector(".close").click()}()})}n.append(t)}if(this.dismissable){const t=document.createElement("div");t.classList.add("ed11y-tip-dismissals");const s=document.createElement("span");if(s.classList.add("ed11y-dismiss-icon"),s.innerHTML='<svg aria-hidden="true" class="hidden" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="Currentcolor" d="M39 5C28-3 13-1 5 9S-1 35 9 43l592 464c10 8 26 6 34-4s6-26-4-34L526 387c39-41 66-86 78-118c3-8 3-17 0-25c-15-36-46-88-93-131C466 69 401 32 320 32c-68 0-125 26-169 61L39 5zM223 150C249 126 283 112 320 112c80 0 144 65 144 144c0 25-6 48-17 69L408 295c8-19 11-41 5-63c-11-42-48-69-89-71c-6-0-9 6-7 12c2 6 3 13 3 20c0 10-2 20-7 28l-90-71zM373 390c-16 7-34 10-53 10c-80 0-144-65-144-144c0-7 1-14 1-20L83 162C60 191 44 221 35 244c-3 8-3 17 0 25c15 36 46 86 93 131C175 443 239 480 320 480c47 0 89-13 126-33L373 390z"/></svg>',y.showDismissed&&this.dismissed){let n="ok"===y.dismissedAlerts[b.currentPage][this.result.test][this.result.dismiss];if(n&&b.allowOK||!n){const s=document.createElement("button"),i=document.createElement("span");i.classList.add("ed11y-dismiss-icon"),i.innerHTML='<svg aria-hidden="true" class="shown" xmlns="http://www.w3.org/2000/svg" width="10" viewBox="-30 0 640 512"><path fill="Currentcolor" d="M288 32c-81 0-146 37-193 81C49 156 17 208 3 244c-3 8-3 17 0 25C17 304 49 356 95 399C142.5 443 207 480 288 480s146-37 193-81c47-44 78-95 93-131c3-8 3-17 0-25c-15-36-46-88-93-131C434 69 369 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35-29 64-64 64c-7 0-14-1-20-3c-6-2-12 2-12 7c.3 7 1 14 3 21c14 51 66 82 118 68s82-66 68-118c-11-42-48-69-89-71c-6-.2-9 6-7 12c2 6 3 13 3 20z"/></svg>',s.classList.add("dismiss"),s.textContent=n?e._("undismissOKButton"):e._("undismissHideButton"),s.prepend(i),t.append(s),s.addEventListener("click",function(){Ke("reset")})}else{const n=document.createElement("div");n.classList.add("dismissed-note"),n.textContent=e._("undismissNotePermissions"),t.append(n)}}else{const n=document.createElement("details"),i=document.createElement("summary"),o=S.filter(e=>e.test===this.result.test).length,l=o>3&&b.allowHide&&b.allowOK;if(l&&(n.classList.add("ed11y-bulk-actions","dismiss"),i.textContent=e.sprintf("dismissActions",o),n.appendChild(i),t.appendChild(n)),b.allowOK){const s=document.createElement("span");s.setAttribute("aria-hidden","true"),s.textContent="✓";const i=document.createElement("button");if(i.classList.add("dismiss"),b.syncedDismissals&&i.setAttribute("title",e._("dismissOkTitle")),i.textContent=e._("dismissOkButtonContent"),t.prepend(i),l){const t=i.cloneNode(!0);t.textContent=e._("dismissOkAllButton"),t.prepend(s.cloneNode(!0)),n.append(t),t.addEventListener("click",function(){Ke("ok",!0)})}i.prepend(s),i.addEventListener("click",function(){Ke("ok")})}if(b.allowHide){const n=document.createElement("button");if(n.classList.add("dismiss"),b.syncedDismissals&&n.setAttribute("title",`${e._("dismissHideTitle")}`),n.textContent=e._("DISMISS"),n.prepend(s.cloneNode(!0)),t.prepend(n),n.addEventListener("click",function(){Ke("hide")}),l){const t=document.createElement("button");t.classList.add("dismiss"),t.textContent=e._("DISMISS_ALL"),t.prepend(s.cloneNode(!0)),i.insertAdjacentElement("afterend",t),t.addEventListener("click",function(){Ke("hide",!0)})}}}n.append(t)}this.tip.append(n),this.navBar=document.createElement("div"),this.navBar.classList.add("ed11y-tip-header"),this.count=document.createElement("div"),this.count.classList.add("ed11y-tip-count"),this.count.textContent=`${e._("ALERT_TEXT")} ${this.issueIndex+1} / ${y.jumpList.length}`,this.navBar.append(this.count),y.jumpList.length>1&&(this.prev=document.createElement("button"),this.prev.classList.add("ed11y-tip-prev"),this.prev.setAttribute("title",`${e._("SKIP_TO_ISSUE")} ${this.issuePrev}`),this.prev.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path fill="currentColor" d="M9 233c-12 12-12 33 0 45l160 160c12 12 33 12 45 0s12-33 0-45L77 256 215 119c12-12 12-33 0-45s-33-12-45 0l-160 160z"/></svg>',this.prev.addEventListener("click",e=>{e.preventDefault(),ke(!1)}),this.navBar.append(this.prev),this.next=document.createElement("button"),this.next.classList.add("ed11y-tip-next"),this.next.setAttribute("title",`${e._("SKIP_TO_ISSUE")} ${this.issueNext}`),this.next.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path fill="currentColor" d="M9 233c-12 12-12 33 0 45l160 160c12 12 33 12 45 0s12-33 0-45L77 256 215 119c12-12 12-33 0-45s-33-12-45 0l-160 160z"/></svg>',this.next.addEventListener("click",e=>{e.preventDefault(),ke()}),this.navBar.append(this.next)),this.help=document.createElement("details"),this.help.classList.add("button"),this.helpContent=document.createElement("div"),this.helpContent.classList.add("ed11y-tip-help-content"),this.helpContent.innerHTML=e._("panelHelp"),this.help.append(this.helpContent),this.helpToggle=document.createElement("summary"),this.helpToggle.textContent="?",this.helpToggle.setAttribute("aria-label",e._("panelHelpTitle")),this.helpToggle.setAttribute("title",e._("panelHelpTitle")),this.help.insertAdjacentElement("afterbegin",this.helpToggle),this.navBar.append(this.help);let o=document.createElement("button");o.setAttribute("title",e._("ALERT_CLOSE")),o.classList.add("close"),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 384 512"><path fill="currentColor" d="M343 151c13-13 13-33 0-46s-33-13-45 0L192 211 87 105c-13-13-33-13-45 0s-13 33 0 45L147 256 41 361c-13 13-13 33 0 45s33 13 45 0L192 301 297 407c13 13 33 13 45 0s13-33 0-45L237 256 343 151z"/></svg>',this.navBar.append(o),this.tip.append(this.navBar);let l=document.createElement("div");l.classList.add("arrow"),o.addEventListener("click",e=>{if(e.preventDefault(),this.open){let e=w('ed11y-element-result[data-ed11y-open="true"]',"document");y.toggledFrom&&y.toggledFrom.focus(),e[0]?.setAttribute("data-ed11y-action","shut"),this.setAttribute("data-ed11y-action","shut")}}),document.addEventListener("click",e=>{if(this.open&&!e.target.closest("ed11y-element-tip, ed11y-element-result, ed11y-element-panel")){let e=w('ed11y-element-result[data-ed11y-open="true"]',"document",[]);e[0]?.setAttribute("data-ed11y-action","shut"),this.setAttribute("data-ed11y-action","shut")}}),t.appendChild(this.wrapper);let r=document.createElement("div");r.setAttribute("tabIndex","0");let a=document.createElement("div");a.setAttribute("tabindex","0"),this.wrapper.appendChild(r),this.wrapper.appendChild(l),this.wrapper.appendChild(this.tip),this.wrapper.appendChild(a);let c=this.wrapper.querySelectorAll('a, button, [tabindex="0"]'),d=c.length;c[0].addEventListener("focus",()=>{c[d-2].focus()}),c[d-1].addEventListener("focus",()=>{c[1].focus()}),this.initialized=!0,this.rendering=!1}toggleTip(t){t?(this.wrapper.classList.add("open"),function(t,n){let s=100;b.hiddenHandlers.length>0&&n.closest(b.hiddenHandlers)&&(s=333,document.dispatchEvent(new CustomEvent("ed11yShowHidden",{detail:{result:t.getAttribute("data-ed11y-result")}})));const i=n.closest("details");i&&!i.open&&(i.open=!0,s=333),window.setTimeout((t,n)=>{N.message.textContent="";let s,i=!1;if(b.checkVisible&&!G(n)?(t.dataset.ed11yHiddenResult="true",i=H(n),s=e._("NOT_VISIBLE")):n.closest('[aria-hidden="true"]')&&(i=n.closest('[aria-hidden="true"]'),i=i.closest(':not([aria-hidden="true"])'),s=e._("NOT_VISIBLE")),i){const e=y.openTip.tip?.shadowRoot.querySelector(".ed11y-tip-alert");e.textContent=s}if(y.viaJump){let e=window.innerHeight>900||window.innerWidth>800&&window.innerHeight>600?"center":"start",s=y.inlineAlerts?t:n;if(!t.dataset.ed11yHiddenResult&&G(s)||(s=H(n)),!s||"function"!=typeof s.scrollIntoView)return qe(),!1;s.scrollIntoView({block:e,behavior:"instant"})}y.inlineAlerts?i&&i.classList.add("ed11y-hidden-highlight"):be(t.dataset.ed11yResult,!0,i);let o=document.querySelector('ed11y-element-tip[data-ed11y-open="true"]');o?y.viaJump&&window.setTimeout(()=>{o?.shadowRoot.querySelector(".title").focus()},100,o):(t.setAttribute("data-ed11y-action","open"),y.viaJump&&window.setTimeout(()=>{let e=document.querySelector('ed11y-element-tip[data-ed11y-open="true"]');y.viaJump&&e?.shadowRoot.querySelector(".title").focus()},100)),y.viaJump=!1},s,t,n)}(this.result.toggle,this.result.element)):this.wrapper.classList.remove("open"),this.setAttribute("data-ed11y-open",t)}static get observedAttributes(){return["data-ed11y-action"]}attributeChangedCallback(e,t,n){if(!this.initialized&&this.result&&this.renderOnce(),this.initialized&&"data-ed11y-action"===e)if("false"!==n){let e="open"===n;this.open=e,this.setAttribute("data-ed11y-action","false"),this.toggleTip(e)}}}function et(t){var n;y.once?console.error("double init"):(y.once=!0,function(e){Object.assign(b,e),b.checkRoot||(b.checkRoot=null!==document.querySelector("main")?"main":"body"),e.syncOnlyConfiguration&&(y.splitConfiguration.active=!0,y.splitConfiguration.syncOptions=e.syncOnlyConfiguration.options,y.splitConfiguration.showOptions={},Object.keys(y.splitConfiguration.syncOptions).forEach(t=>{y.splitConfiguration.showOptions[t]=e[t]}),y.splitConfiguration.checks=new Set(e.syncOnlyConfiguration.checks)),b.headless="headless"===e.alertMode,e.panelAttachTo&&(y.panelAttachTo=e.panelAttachTo),I.push=b[b.theme],I.baseFontSize=b.baseFontSize,I.buttonZIndex=b.buttonZIndex,I.baseFontFamily=b.baseFontFamily,y.inlineAlerts=b.inlineAlerts,y.showDismissed=b.showDismissed,e.linkIgnoreSelector&&!e.linkIgnoreSpan&&(b.linkIgnoreSpan=e.linkIgnoreSelector);let t=e.cssUrls;if(!t){const e=document.querySelector('link[href*="editoria11y.css"], link[href*="editoria11y.min.css"]');e?t=[e.getAttribute("href")]:(t=[`https://cdn.jsdelivr.net/gh/itmaybejj/editoria11y@${y.version}/dist/editoria11y.min.css`],console.warn("Editoria11y CSS file parameter is missing; attempting to load from CDN."))}const n=document.createElement("div");n.classList.add("ed11y-style"),n.setAttribute("hidden",""),t?.forEach(e=>{const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("media","all"),e.indexOf("?")<0&&(e=e+"?ver="+y.version),t.setAttribute("href",e),n.append(t)}),N.attachCSS=function(e){const t=n.cloneNode(!0);e.appendChild(t)}}(t),s.initializeGlobal(b),s.initializeReadability(b),s.initializeExclusions(b),function(t){if(s.Exclusions.Sa11yElements=[".ed11y-element","ed11y-element-heading-label"],s.Exclusions.Container=["style","script","noscript"],b.containerIgnore){const e=b.containerIgnore.split(",").map(e=>e.trim());s.Exclusions.Container=s.Exclusions.Container.concat(e.flatMap(e=>[`${e} *`,e]))}if(t.ignoreElements){const e=t.ignoreElements.split(",").map(e=>e.trim());s.Exclusions.Container=s.Exclusions.Container.concat(e)}s.Panel.readabilityInfo=document.createElement("div"),s.Panel.readabilityDetails=document.createElement("div"),y.english=e.langStrings.LANG_CODE.startsWith("en"),Object.assign(I,b[b.theme]),I.baseFontSize=b.baseFontSize,I.buttonZIndex=b.buttonZIndex,I.baseFontFamily=b.baseFontFamily,b.linkStringsNewWindows||(b.linkStringsNewWindows=e._("linkStringsNewWindows")),t.documentLinks&&(s.Global.documentSources=t.documentLinks),Object.assign(e.langStrings,Qe.strings,Qe.testNames);const n=Object.entries(Qe.tests);if(y.english)for(let t=0;t<n.length;t++)y.english&&(e.langStrings[n[t][0]]=`<div class="title" tabindex="-1"><div class="ed11y-tip-alert"></div>${Qe.testNames[n[t][0]+"_TEST_NAME"]}</div>${n[t][1]}`);let i=_.getItem("editoria11yResultCount");y.seen=i&&"undefined"!==i?JSON.parse(i):{},!1===b.syncedDismissals?(y.dismissedAlerts=localStorage.getItem("ed11ydismissed"),y.dismissedAlerts=y.dismissedAlerts?JSON.parse(y.dismissedAlerts):{}):(y.dismissedAlerts={},y.dismissedAlerts[b.currentPage]=b.syncedDismissals)}(t),customElements.define("ed11y-element-alt",Ve),customElements.define("ed11y-element-result",je),customElements.define("ed11y-element-heading-label",Je),customElements.define("ed11y-element-panel",Xe),customElements.define("ed11y-element-tip",Ze),n=()=>{if(q())return y.disabled=!0,!1;y.running=!0,Ge(),document.addEventListener("ed11yResume",function(){He(!0)}),window.addEventListener("keydown",()=>{y.interaction=!0},{passive:!0}),window.addEventListener("click",()=>{y.interaction=!0},{passive:!0}),window.addEventListener("resize",function(){Oe()},{passive:!0});const e=document.querySelectorAll("[aria-expanded], [aria-controls]");e?.forEach(e=>{e.addEventListener("click",()=>{window.setTimeout(()=>{Oe()},333)},{passive:!0})})},"complete"===document.readyState?n():window.addEventListener("load",n))}const tt="3.0.0-dev092225";class nt{constructor(e){if(CSS.supports("selector(:has(body))"))try{et(e)}catch(e){z(e)}}}const st=k.Found;export{nt as Ed11y,e as Lang,b as Options,S as Results,y as State,I as Theme,N as UI,Ge as checkAll,r as computeAccessibleName,st as elements,v as findElements,w as getElements,Ue as incrementalCheck,T as prepareDismissal,ze as reset,tt as version};
